/* Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
  For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
  Credit MUST stay intact
  
  Modifications by BB (c) 2007
  
  -- this file to be placed in the BODY; 
  -- put the attribute onLoad="populate()" in de BODY-tag to start the ticker
  -- file marquee1.js is required in the HEAD */

//// No editing required in this file!! ////

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var marqueecontent = '<nobr>' + PictureList() + '</nobr>';

var pausespeed = (pauseit==0) ? marqueespeed : 0;
var copyspeed = marqueespeed;
var iedom = document.getElementById;
if (iedom)
  document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth='';
var cross_marquee;
var lefttime;

function populate(){
  if (iedom){
    cross_marquee = document.getElementById("iemarquee");
    cross_marquee.style.left = parseInt(marqueewidth)+8+"px";
    cross_marquee.innerHTML = marqueecontent;
    actualwidth = document.getElementById("temp").offsetWidth;
  }
  lefttime=setInterval("scrollmarquee()",20);
}

// below line of code was replaced by <body onload="...">, to avoid priority conflicts
// window.onload=populate;

function scrollmarquee(){
  if (iedom){    

    if ( parseInt(cross_marquee.style.left) % parseInt(marqueewidth) == 0) {
      clearInterval(lefttime);
      setTimeout("lefttime=setInterval('scrollmarquee()',20);",4000);
    }
      
    if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
      cross_marquee.style.left = parseInt(cross_marquee.style.left)-marqueespeed+"px";
    else
      cross_marquee.style.left = parseInt(marqueewidth)+8+"px";
  }
}

if (iedom){
  with(document) {
    write('<table border="0" cellspacing="0" cellpadding="0"><tr><td>');
    write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">');
    write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="marqueespeed=pausespeed" onMouseout="marqueespeed=copyspeed">');
    write('<div align="center" style="'+marqueetextstyle+'">',marqueebgtext,'</div>');
    write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>');
    write('</div></div>');
    write('</td></tr></table>');
  }
}

