/***********************************************
* 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=4000 //ticker speed in miliseconds (1000=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=[];
var totalDivs=[];

function contractall(id){
    var inc=1;
    while (document.getElementById("dropmsg_"+id+'_'+inc)){
        document.getElementById("dropmsg_"+id+'_'+inc).style.display="none";
        inc++;
    }
}

function expandone(id){
    var selectedDivObj = document.getElementById("dropmsg_"+id+'_'+selectedDiv[id]);
    contractall(id);
    selectedDivObj.style.display="block";
    selectedDiv[id]=(selectedDiv[id]<totalDivs[id]-1)? selectedDiv[id]+1 : 1;
    setTimeout("expandone("+id+")",tickspeed);
}

function startscroller(id){
    selectedDiv[id] = 1;
    var tmp = 1;
    while (document.getElementById("dropmsg_"+id+'_'+tmp)!=null)
        tmp++;
    totalDivs[id] = tmp;
    expandone(id);
}

if (window.addEventListener)
    window.addEventListener("load", function() {startscroller(1)}, false)
else if (window.attachEvent)
    window.attachEvent("onload", function() {startscroller(1)})
