gremmie@1: /*********************************************** gremmie@1: * Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com) gremmie@1: * This notice MUST stay intact for legal use gremmie@1: * Visit http://www.dynamicdrive.com/ for this script and 100s more. gremmie@1: ***********************************************/ gremmie@1: gremmie@1: var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds) gremmie@1: var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10) gremmie@1: var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)? gremmie@1: gremmie@1: ////NO NEED TO EDIT BELOW THIS LINE//////////// gremmie@1: gremmie@1: var copyspeed=marqueespeed gremmie@1: var pausespeed=(pauseit==0)? copyspeed: 0 gremmie@1: var actualheight='' gremmie@1: gremmie@1: function scrollmarquee(){ gremmie@1: if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) gremmie@1: cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" gremmie@1: else gremmie@1: cross_marquee.style.top=parseInt(marqueeheight)+8+"px" gremmie@1: } gremmie@1: gremmie@1: function initializemarquee(){ gremmie@1: cross_marquee=document.getElementById("vmarquee") gremmie@1: cross_marquee.style.top=0 gremmie@1: marqueeheight=document.getElementById("marqueecontainer").offsetHeight gremmie@1: actualheight=cross_marquee.offsetHeight gremmie@1: if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit gremmie@1: cross_marquee.style.height=marqueeheight+"px" gremmie@1: cross_marquee.style.overflow="scroll" gremmie@1: return gremmie@1: } gremmie@1: setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll) gremmie@1: } gremmie@1: gremmie@1: if (window.addEventListener) gremmie@1: window.addEventListener("load", initializemarquee, false) gremmie@1: else if (window.attachEvent) gremmie@1: window.attachEvent("onload", initializemarquee) gremmie@1: else if (document.getElementById) gremmie@1: window.onload=initializemarquee gremmie@1: gremmie@1: /////////////////////////////// gremmie@1: gremmie@1: function sb_toggle_smilies() gremmie@1: { gremmie@1: var d = document.getElementById("shoutbox-smiley-frame"); gremmie@1: d.style.display = d.style.display == "none" ? "block" : "none"; gremmie@1: } gremmie@1: gremmie@1: function sb_smiley_click(code) gremmie@1: { gremmie@1: var txt = document.getElementById("shoutbox-smiley-input"); gremmie@1: txt.value += code; gremmie@1: txt.focus(); gremmie@1: }