
var delay=50;
var fastScr=5;
var slowScr=1;

var iens6;
var timerPtr;
var containerHeight;
var crossobj;
var contentheight;
var fpause=0;

function stopTimer(){
	if (timerPtr){
		clearTimeout(timerPtr);
		timerPtr=null;
	}
}
function movedown(offset){
	stopTimer();
	if (iens6 && fpause==0){
		if (parseInt(crossobj.style.top)>=(contentheight*(-1)))
			crossobj.style.top=parseInt(crossobj.style.top)-offset+"px";
		else
			crossobj.style.top=containerHeight+"px";
		timerPtr=setTimeout("movedown("+offset+")",delay);
	}
}
function moveup(offset){
	stopTimer();
	if ( iens6 && fpause==0){
		if (parseInt(crossobj.style.top)<=containerHeight) 
			crossobj.style.top=parseInt(crossobj.style.top)+offset+"px";
		else
			crossobj.style.top=(-1)*contentheight+"px";
		timerPtr=setTimeout("moveup("+offset+")",delay);
	}
}
function pause()
{
	stopTimer();
	if (fpause==0){
		fpause=1;
		timerPtr=setTimeout("pause()",2000);
	}
	else
	{
		fpause=0;
		movedown(slowScr);
	}
}

iens6=document.all||document.getElementById;

if (iens6)
{
	containerHeight = document.getElementById ? document.getElementById("container").offsetHeight : document.all.container.offsetHeight;
	crossobj=document.getElementById ? document.getElementById("content") : document.all.content;
	contentheight=crossobj.offsetHeight;
	pause();
}



