var timer;

function start_top( positionX ) {

	tagX  = positionX;
	tagY  = 0;
	timer = null;

	move_top();
}

function move_top() {

	if( window.pageYOffset >= 0 ) {
		pageY = window.pageYOffset;
	} else {
		pageY = window.document.body.scrollTop;
	} 

	desty = pageY + 5;

	if( tagY == desty ) {
		// do nothing for a second
		timer = setTimeout("move_top()",1000);
	} else {

		if( tagY == 0 ) { tagY = desty; }

		vm = (desty - tagY) / 4;
		if( vm < 1 && vm >  0 ) { vm =  1; }
		if( vm < 0 && vm > -1 ) { vm = -1; }

		tagY = Math.round(tagY + vm);

		if( document.layers ) {
			eval('document.toptag.top ='+tagY);
			eval('document.toptag.left='+tagX);
		} else if (document.all) {
			eval('document.all.toptag.style.pixelLeft='+tagX);
			eval('document.all.toptag.style.pixelTop ='+tagY);
		} else if (document.getElementById) {
			document.getElementById('toptag').style.left= tagX;
			document.getElementById('toptag').style.top = tagY; 
		}
		timer = setTimeout("move_top()",100);
	}
}

function stop_top() {
	if( timer != null ) { clearTimeout(timer); }
}

