// JScript source code
function ScrollFunc1(whichlayer) {
	tlayer=eval(whichlayer)
	if (tlayer.top>0 && tlayer.top<=RowOffset) {
	  tlayer.top=0
	  setTimeout("ScrollFunc1(tlayer)",PauseMicroSecond)
	  setTimeout("ScrollFunc2(document.main.document.second)",PauseMicroSecond)
	  return
    }
    if (tlayer.top>=tlayer.document.height*-1) {
        tlayer.top-=RowOffset
		setTimeout("ScrollFunc1(tlayer)",rowspeed)
    }
	else {
		tlayer.top=LayerHeight
    }
}

function ScrollFunc2(whichlayer){
	tlayer2=eval(whichlayer)
	if (tlayer2.top>0&&tlayer2.top<=RowOffset){
		tlayer2.top=0
		setTimeout("ScrollFunc2(tlayer2)",PauseMicroSecond)
		setTimeout("ScrollFunc1(document.main.document.first)",PauseMicroSecond)
		return
	}
	if (tlayer2.top>=tlayer2.document.height*-1) {
		tlayer2.top-=RowOffset
		setTimeout("ScrollFunc2(tlayer2)",rowspeed)
	}
	else {
		tlayer2.top=LayerHeight
	}
}
	
function ScrollFunc3(){
	var tdiv=document.getElementById('first2')
	if (tdiv.style.top.substring(0, tdiv.style.top.indexOf("px"))>0&&tdiv.style.top.substring(0, tdiv.style.top.indexOf("px"))<=RowOffset){
		tdiv.style.top = 0 + "px"
		pasuescroll();
		ScrollFunc3()
		ScrollFunc4()
		return
	}
	
	if (tdiv.style.top.substring(0, tdiv.style.top.indexOf("px"))>=tdiv.offsetHeight*-1){
	    tdiv.style.top = tdiv.style.top.substring(0, tdiv.style.top.indexOf("px")) - RowOffset
	    setTimeout("ScrollFunc3()",rowspeed)
	}
	else{
		tdiv.style.top=LayerHeight+"px"
	}

}

function ScrollFunc4() {

	var tdiv2=document.getElementById('second2')
	if (tdiv2.style.top.substring(0, tdiv2.style.top.indexOf("px"))>0&&tdiv2.style.top.substring(0, tdiv2.style.top.indexOf("px"))<=RowOffset){
		tdiv2.style.top = 0 + "px"
		ScrollFunc4()
		ScrollFunc3();
		return
	}
	
	if (tdiv2.style.top.substring(0, tdiv2.style.top.indexOf("px"))>=tdiv2.offsetHeight*-1){
		tdiv2.style.top = tdiv2.style.top.substring(0, tdiv2.style.top.indexOf("px")) - RowOffset
		setTimeout("ScrollFunc4()",rowspeed)
		if (tdiv2.style.top.substring(0, tdiv2.style.top.indexOf("px"))%(19*4)==0) {
			//pasuescroll();
		}
	}
	else{
		tdiv2.style.top=LayerHeight+"px"
	}
}

function pasuescroll() {
	pasueflag=0
	RowOffset=0;
	setTimeout("Resumescroll()",PauseMicroSecond);
}

function Stopscroll() {
	RowOffset=0;
	pasueflag=1;
}

function Resumescroll() {
	if (pasueflag ==0 ) {
		RowOffset=1;
	}
}

function Continuescroll() {
	pasueflag=0;
	Resumescroll();
}


function findTop(object) {
	var top = 0;
	if (!document.layers)	{
		while (object != null) 	{
			top += object.offsetTop;
			object = object.offsetParent;
		}
	}
	return top;
}

function findLeft(object) {
	var left = 0;
	if (!document.layers)	{
		while (object != null)	{
			left += object.offsetLeft;
			object = object.offsetParent;
		}
	}

	return left;
}

function StartScrolling() {
	if (document.getElementById || document.all) {
		var scrollerAnchor = document.getElementById("myScrollerTag")
		var TTop= findTop(scrollerAnchor) + 0
		var Tleft= findLeft(scrollerAnchor) + 5
		document.getElementById("main2").style.top=TTop+"px"
		document.getElementById("main2").style.left=Tleft+"px"
		ScrollFunc3();
		document.getElementById("second2").style.top=LayerHeight }
	else if (document.layers) {
		document.main.visibility='show'
		ScrollFunc1(document.main.document.first)
		document.main.document.second.top=LayerHeight+RowOffset
		document.main.document.second.visibility='show'
	}
}

function ResizePostion(){
	if (document.all || document.getElementById) {
		var scrollerAnchor1 = document.getElementById("myScrollerTag")
		var TTop1= findTop(scrollerAnchor1) + 0
		var Tleft1= findLeft(scrollerAnchor1) + 10
		document.getElementById("main2").style.top=TTop1+"px"
		document.getElementById("main2").style.left=Tleft1+"px"
	}
	else if (document.layers){
		document.main.document.second.top=LayerHeight+RowOffset
	}
}

function makeLayers() {
	if (document.all || document.getElementById) {
		document.writeln('<div id="main2" style="position:absolute;width:'+scrollerwidth+';height:160;clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:'+scrollerheight+'">')
		document.writeln('<div id="first2" style="position:absolute;left:0;top:1;">')
		document.write(BodyText)
		document.writeln('</div>')
		document.writeln('<div id="second2" style="position:absolute;left:0;top:0">')
		document.write(BodyText)
		document.writeln('</div>')
		document.writeln('</div>')
	}
}

function MakeBody() {
	if (document.layers) {
		document.write(BodyText)
	}
}

function GoStart() {
	makeLayers();
        StartScrolling();
	//window.onload=StartScrolling();
	//window.onresize=ResizePostion();
	setTimeout("window.location.reload()",300000);
}
