//Specify the marquee's width (in pixels)
var marqueewidth= getScreenWidth()-370;
if (marqueewidth == 0) {marqueewidth = 430;}

//Specify the marquee's height (in pixels, pertains only to NS)
var marqueeheight=20;
//Specify the marquee's scroll speed (larger is faster)
var speed=3;

function showMarquee() {
	if (document.all)
		document.write("<marquee scrollAmount=\""+speed+"\" style=\"width:"+marqueewidth+"\" onMouseOver=\"this.stop();\" onMouseOut=\"this.start();\">"+marqueecontents+"</marquee>");
	else if (document.layers) {
		document.write("<ilayer width=" + marqueewidth + " height=" + marqueeheight + " name=\"cmarquee01\">");
		document.write("<layer name=\"cmarquee02\"></layer>");
		document.write("</ilayer>");
	}
}

function regenerate(){
	window.location.reload();
}

function regenerate2(){
	if (document.layers){
		setTimeout("window.onresize=regenerate",450);
		intializemarquee();
	}
}

function intializemarquee(){
	document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>');
	document.cmarquee01.document.cmarquee02.document.close();
	thelength=document.cmarquee01.document.cmarquee02.document.width;
	scrollit();
}

function scrollit(){
	if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
		document.cmarquee01.document.cmarquee02.left-=speed;
		setTimeout("scrollit()",100);
	}
	else{
		document.cmarquee01.document.cmarquee02.left=marqueewidth;
		scrollit();
	}
}

window.onload=regenerate2;
