// JavaScript Document
//***********************************************
//* ProHTML Ticker script- Â© Dynamic Drive (www.dynamicdrive.com)
//* This notice must stay intact for use
//* Visit http://www.dynamicdrive.com/ for full source code
//***********************************************/

var tickspeed=5000 //ticker speed in miliseconds (2000=2 seconds)
var enablesubject=0 //enable scroller subject? Set to 0 to hide

if (document.getElementById){
	document.write('<style type="text/css">\n')
	document.write('.dropcontent{display:none;}\n')
	document.write('</style>\n')
}

var selectedDiv=0
var totalDivs=0

function contractall(){
	var inc=0
	while (document.getElementById("dropmsg"+inc)){
		document.getElementById("dropmsg"+inc).style.display="none"
		inc++
		}
}
function expandone(){
	var selectedDivObj=document.getElementById("dropmsg"+selectedDiv)
	contractall()
	if(selectedDivObj.getAttribute("subject")!=null){document.getElementById("dropcontentsubject").innerHTML=selectedDivObj.getAttribute("subject")}
	selectedDivObj.style.display="block"
	selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0
	setTimeout("expandone()",tickspeed)
}

function startscroller(){
	while (document.getElementById("dropmsg"+totalDivs)!=null)
	totalDivs++
	expandone()
	if (!enablesubject)
		document.getElementById("dropcontentsubject").style.display="none"
}

if (window.addEventListener){
	window.addEventListener("load", startscroller, false);
} else if (window.attachEvent) {
	window.attachEvent("onload", startscroller);
}
