/* 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 */ //Specify the marquee's width (in pixels) var marqueewidth="610px" //Specify the marquee's height var marqueeheight="19px" //Specify the marquee's marquee speed (larger is faster 1-10) var marqueespeed=2 //configure background color: var marqueebgcolor="#000000" //Pause marquee onMousever (0=no. 1=yes)? var pauseit=1 //Specify the marquee's content (don't delete tag) //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great): var marqueecontent='Buy in Bulk ...click here for our fantastic bulk deals | Delivery on all orders is free...click to find out more!!! |'; ////NO NEED TO EDIT BELOW THIS LINE//////////// marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS var copyspeed=marqueespeed var pausespeed=(pauseit==0)? copyspeed: 0 var iedom=document.all||document.getElementById if (iedom) document.write('') var actualwidth='' var cross_marquee1, ns_marquee1; //CIO Add Second Marquee so scroller can appear continuous var cross_marquee2, ns_marquee2; var dowait=true; function populate(){ if (iedom){ actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth cross_marquee1=document.getElementById? document.getElementById("iemarquee1") : document.all.iemarquee1 cross_marquee1.style.left=parseInt(marqueewidth)+8+"px" cross_marquee1.innerHTML=marqueecontent //initialise 2nd Marquee to be already off to the "left" cross_marquee2=document.getElementById? document.getElementById("iemarquee2") : document.all.iemarquee2 cross_marquee2.style.left="-3000px" cross_marquee2.innerHTML=marqueecontent } else if (document.layers){ actualwidth=ns_marquee.document.width ns_marquee1=document.ns_marquee.document.ns_marquee1 ns_marquee1.left=parseInt(marqueewidth)+8 ns_marquee1.document.write(marqueecontent) ns_marquee1.document.close() //initialise 2nd Marquee to be already off to the "left" ns_marquee2=document.ns_marquee.document.ns_marquee2 ns_marquee2.left=-3000 ns_marquee2.document.write(marqueecontent) ns_marquee2.document.close() } lefttime=setInterval("scrollmarquee()",100) } function scrollmarquee(){ var left1,left2 if (iedom){ if(actualwidth==0||actualwidth==''){ actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth }else{ if(dowait){ window.clearInterval(lefttime); lefttime=setInterval("scrollmarquee()",20); dowait=false; } //if either 1st or 2nd marquee visible then scroll if (parseInt(cross_marquee1.style.left)>(actualwidth*(-1)+8)||parseInt(cross_marquee2.style.left)>(actualwidth*(-1)+8)){ left1=parseInt(cross_marquee1.style.left)-parseInt(copyspeed); left2=parseInt(cross_marquee2.style.left)-parseInt(copyspeed); cross_marquee1.style.left=left1+"px"; cross_marquee2.style.left=left2+"px"; //window.status='['+actualwidth+' - '+'1:'+left1+' - '+'2:'+left2+']'; //if 1st off to left, reset to follow 2nd from the right if(parseInt(left1)<(actualwidth*(-1))){ cross_marquee1.style.left=parseInt(actualwidth)+parseInt(left2)+16+"px"; } //if 2nd off to left, reset to follow 1st from the right if(parseInt(left2)<(actualwidth*(-1))){ cross_marquee2.style.left=parseInt(actualwidth)+parseInt(left1)+16+"px"; } } } } else if (document.layers){ if(actualwidth==0||actualwidth==''){ actualwidth=ns_marquee.document.width; }else{ if(dowait){ window.clearInterval(lefttime); lefttime=setInterval("scrollmarquee()",20); dowait=false; } //if either 1st or 2nd marquee visible then scroll if ((ns_marquee1.left>(actualwidth*(-1)+8))||(ns_marquee2.left>(actualwidth*(-1)+8))){ ns_marquee1.left-=copyspeed; ns_marquee2.left-=copyspeed; //if 1st off to left, reset to follow 2nd from the right if(ns_marquee1.left<(actualwidth*(-1))){ ns_marquee1.left=parseInt(actualwidth)+ns_marquee2.left+16 } //if 2nd off to left, reset to follow 1st from the right if(ns_marquee2.left<(actualwidth*(-1))){ ns_marquee2.left=parseInt(actualwidth)+ns_marquee1.left+16 } } } } }