function closeIgrach() {
	var stats = document.getElementById('igrachi');
	stats.style.display = 'none';
	}
function startDrag(that, isHeld) {
	that.parentNode.style.position = 'absolute';
	
	firstX = that.parentNode.offsetLeft;
	firstY = that.parentNode.offsetTop;
	var firstPosX = false;
	var firstPosY = false;
	
	document.onmousemove = function(e) {
		if (document.all) {
			positionX = event.clientX + document.body.scrollLeft;
			positionY = event.clientY + document.body.scrollTop;
		}
		else {
			document.captureEvents(Event.MOUSEMOVE)
			positionX = e.pageX;
			positionY = e.pageY;
		}  
		if (positionX < 0){positionX = 00;}
		if (positionY < 0 ){positionY = 0;}  
		
		if(!firstPosX || !firstPosY) {
			firstPosX = positionX;
			firstPosY = positionY;
		}
		document.onmouseup = function() {
			isHeld = false;
			firstPosX = false;
			firstPosY = false;
		}
		
		if(isHeld) {
			that.parentNode.style.top = positionY + firstY - firstPosY + 'px';
			that.parentNode.style.left = positionX + firstX - firstPosX + 'px';
		}
	}
}
