function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}
	   
var LastPosY = 0;

function move_DIV() {

	var oSamples		= document.getElementById("samples");
	var aSamplesPos		= findPos(oSamples);
	var iSamplesPosX	= aSamplesPos[1] - 15;
	
	var iScrollTop = (ns_pos)? window.pageYOffset : (ie_std && ie_pos) ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : ie_std ? document.documentElement.scrollTop : document.body.scrollTop;
	
	//alert(iScrollTop + ' / ' + iSamplesPosX);
	
	if (iScrollTop > iSamplesPosX)
	{
		document.getElementById('moveLayer').style.top = iScrollTop + "px";
	}
	else
	{
		document.getElementById('moveLayer').style.top = iSamplesPosX + "px";
	}
		
	LastPosY = iScrollTop;
	
	if (TimeScroll)
	{
		window.setTimeout('move_DIV()', 50);
	}
}

var TimeScroll = true;

function initScroll()
{
	ns_pos = (typeof window.pageYOffset!='undefined');
	ie_std = (document.documentElement && typeof document.documentElement.scrollTop!='undefined');
	ie_pos = (document.body && typeof document.body.scrollTop!='undefined');
	
	window.onscroll=function()
	{
		window.onscroll = move_DIV;
		TimeScroll = false;
	}
	
	if (ns_pos || ie_std || ie_pos)
	{
		move_DIV();
	}
}