var delayb4scroll=1500 
var delayAfterEachAd=6000 
var marqueespeed=110 
var pause=false 
var innerheight=''
var actualheight=''
var copyspeed=marqueespeed
var jobwidth=300
var counter = 0	
var jobCounter = 1	

function scrollmarquee(){

	if (pause == 0)
	{
		if (parseInt(cross_marquee.style.top) > innerheight) //After ad #12, switch width
		{
		counter+=1
		cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px";
		}
		else
		{ 
		cross_marquee.style.top="0px"; 
		} //new heigth after switch 
		
		if (counter > 0)
		{ 
		 clearInterval(toptime)
		 copyspeed=marqueespeed
		 counter=0
		 setTimeout('toptime=setInterval("scrollmarquee()",500)', delayAfterEachAd)
		}
	}
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top="0px"
counter=0
copyspeed=marqueespeed
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
// alert("height vmarquee:"+document.getElementById("vmarquee").offsetHeight+","+marqueeheight)

innerheight=-990;	// Value of innerheight came from document.getElementById("vmarquee").offsetHeigh/2
setTimeout('toptime=setInterval("scrollmarquee()",30)', delayb4scroll)		
}

if (window.addEventListener) // Mozilla, Netscape, Firefox 
	window.addEventListener("load", initializemarquee, false);
else if (window.attachEvent) // IE
	window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
	window.onload=initializemarquee	