/* 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/Additions 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 marquee1v.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 actualheight='';
var cross_marquee;
var lefttime;

function populate(){
  if (iedom){
    cross_marquee = document.getElementById("iemarquee");
    cross_marquee.innerHTML = marqueecontent;
    actualheight = document.getElementById("temp").offsetHeight;
    cross_marquee.style.top = -1*actualheight -4 + "px";
  }
  lefttime=setInterval("scrollmarquee()",40);
}

// 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.top) < parseInt(marqueeheight) + 4)
      cross_marquee.style.top = parseInt(cross_marquee.style.top)+marqueespeed+"px";
    else 
      cross_marquee.style.top = -1*actualheight-4 +"px";
  }
}

if (iedom){
  with(document) {
    write('<table border="0" cellspacing="0" cellpadding="0"><tr><td width="',margin_left,'"></td><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 id="iemarquee" style="position:absolute;left:0px;top:0px"></div>');
    write('</div></div>');
    write('</td><td width="',margin_right,'"></td></tr></table>');
  }
}

