
var cronos=0;
var theScrollDiv=0;
var thisXBit=0;
var thisYBit=0;
var thisWBit=0;
var thisHBit=0;



function scrollTheSkuare(thaX, thaY, thaW, thaH) {
	clearTimeout(cronos);
	thisXBit=thaX;
	thisYBit=thaY;
	theScrollDiv=document.getElementById('kronos');
	thisWBit=thaW;
	thisHBit=thaH;
	theScrollDov=document.getElementById('historySquare');
	if (parseInt(theScrollDiv.style.top)!=thisYBit || parseInt(theScrollDiv.style.left)!=thisXBit || parseInt(theScrollDov.style.height)!=thisHBit || parseInt(theScrollDov.style.width)!=thisWBit){
		squareDoWeGo();
	}
}

function squareDoWeGo() {
		if (parseInt(theScrollDiv.style.top)!=thisYBit){
		theScrollDiv.style.top=Math.round(parseInt(theScrollDiv.style.top)+((thisYBit-parseInt(theScrollDiv.style.top))/10))+"px";
		if (parseInt(theScrollDiv.style.top)>thisYBit) {
			theScrollDiv.style.top=parseInt(theScrollDiv.style.top)-1+"px";
		}else{
			theScrollDiv.style.top=parseInt(theScrollDiv.style.top)+1+"px";
		}
	}

	if (parseInt(theScrollDiv.style.left)!=thisXBit){
		theScrollDiv.style.left=Math.round(parseInt(theScrollDiv.style.left)+((thisXBit-parseInt(theScrollDiv.style.left))/10))+"px";
		if (parseInt(theScrollDiv.style.left)>thisXBit) {
			theScrollDiv.style.left=parseInt(theScrollDiv.style.left)-1+"px";
		}else{
			theScrollDiv.style.left=parseInt(theScrollDiv.style.left)+1+"px";
		}
	}
	
	if (parseInt(theScrollDov.style.height)!=thisHBit){
		theScrollDov.style.height=Math.round(parseInt(theScrollDov.style.height)+((thisHBit-parseInt(theScrollDov.style.height))/10))+"px";
		if (parseInt(theScrollDov.style.height)>thisHBit) {
			theScrollDov.style.height=parseInt(theScrollDov.style.height)-1+"px";
		}else{
			theScrollDov.style.height=parseInt(theScrollDov.style.height)+1+"px";
		}
	}

	if (parseInt(theScrollDov.style.width)!=thisWBit){
		theScrollDov.style.width=Math.round(parseInt(theScrollDov.style.width)+((thisWBit-parseInt(theScrollDov.style.width))/10))+"px";
		if (parseInt(theScrollDov.style.width)>thisWBit) {
			theScrollDov.style.width=parseInt(theScrollDov.style.width)-1+"px";
		}else{
			theScrollDov.style.width=parseInt(theScrollDov.style.width)+1+"px";
		}
	}

	if (parseInt(theScrollDiv.style.left)!=thisXBit || parseInt(theScrollDiv.style.top)!=thisYBit || parseInt(theScrollDov.style.width)!=thisWBit || parseInt(theScrollDov.style.height)!=thisHBit){
		cronos=setTimeout('squareDoWeGo()',5);
	}
}

function startHistory() {
	document.getElementById('superLoader').style.display="none";
	document.getElementById('superHistory').style.visibility="visible";
}

function start() {
	startHistory();
	x=document.getElementById('kronos');
	x.style.top='0px';
	x.style.left='0px';
	x=document.getElementById('historySquare');
	x.style.width='550px';
	x.style.height='10px';
}







