var IE = document.all; var mContent = new Array(); mContent[0] = "Here is some <b>HTML</b> content. You can format it however you like, with <font color=red>colors</font>, <font face=impact size=5>different fonts</font> and <u>font styles</u>."; mContent[1] = "And here is some additional content - you can even use form elements:<br><input type=text>"; mContent[2] = "You can also use images:<br><img src=\"http://slayeroffice.com/gr/office_logo.gif\">"; mContent[3] = "<div style=\"background-color:C0C0C0;\">You can even use different background colors.</div>"; mContent[4] = "This works in Gecko/Moz using its proprietary -moz-opacity style and in Internet Explorer 5+ using its alpha filter."; mContent[5] = "After this string, it starts over again from the begining. Thats all there is too it -- enjoy!"; var zTrack = 0; var curOpacity = 0; var direction =0; //constants var INTERVAL = 100; var STEP = 5; function init() { mHTML = ""; for(i=0;i<mContent.length;i++) { mHTML+= "<div id=\"xContent\" name=\"xContent\" class=\"zContent\">" + mContent[i] + "</div>"; } document.getElementById("mContainer").innerHTML = mHTML; mInterval = setInterval("rotate()",INTERVAL); } function rotate() { direction?curOpacity-=STEP:curOpacity+=STEP; IE?document.getElementsByName("xContent")[zTrack].style.filter="alpha(opacity="+ curOpacity+")":document.getElementsByName("xContent")[zTrack].style.MozOpacity=curOpacity/100; if(curOpacity>=90) { curOpacity=90; direction=1; } else if(curOpacity<=0) { curOpacity=0; direction=0; zTrack++; if(zTrack>mContent.length-1)zTrack=0; } }
Fading Marquee III v1.0 Last revision: 06.16.2003 steve@slayeroffice.com http://www.slayeroffice.com |