/*
Cross browser marquee script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

//Specify the marquee's width (in pixels)
var marqueewidth = 200
//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 = 4
//Specify the marquee contents (moved to calling page to make text dynamic)
//var marqueecontents = "&nbsp;&nbsp;&nbsp;<a href='#' class='ledPanel'>FIRST TIME USING AUTOHOOK ONLINE? ... CREATE A NEW ACCOUNT BY CLICKING 'REGISTER'.</a>";
//var marqueecontents = "&nbsp;&nbsp;<a href=\"#\" class=\"ledPanel\">&nbsp;&nbsp;&nbsp; OLDIES......  COUNTRY...... SMOOTH JAZZ......  LATIN...... ALTERNATIVE...... EURO...... ADULT CONTEMPORARY... 1000s OF SONGS... THE NEWEST ARTISTS. WE'VE GOT THE HOTTEST HOOKS!</a>";

var html;
if (document.all || document.getElementById) { 
	html = '<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>';
	document.write(html);
} else {
	/*html = '<ilayer width=' + marqueewidth + ' height=' + marqueeheight + 'name="cmarquee01">\n';
	html += '<layer name="cmarquee02"></layer>';
	html += '</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;

