Scroll Messages Vertically

[Total: 0    Average: 0/5]

Scrolls up any number of messages as large as desired. Adjustable: Size,

Head Code:

<style type="text/css">
A { text-decoration:none;}
A:link	{color:blue;}
A:visited{color: blue;}
A:hover	{color: red;background-color:#66ffff;}
 .tabb { font-weight:bold; font-size:14px; font-family:Arial,Helvetica;}
 .tan {FONT-SIZE: 12px; COLOR: navy; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center}
 .tann {FONT-WEIGHT: bold;FONT-SIZE: 18px; COLOR: navy; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center}
</style>

<!-- STEP II: Goes between <HEAD> & </HEAD> tags-->
<SCRIPT LANGUAGE="JavaScript">

/***********************************
*   http://javascripts.vbarsan.com/
*   This notice may not be removed 
***********************************/

//-- Begin Scroller's Parameters and messages -->
//scroller's width
var swidth=350;

//scroller's height
var sheight=60;


//scroller's speed 
var sspeed=1;
var restart=sspeed;
var rspeed=sspeed;

//scroller's background
sbcolor="#ccffcc";

//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..</a>
var singletext=new Array();
singletext[0]='<div align="center" class=tabb><a target=anew class=tabb href="http://javascripts.vbarsan.com/">Multiple Message Vertical SCROLLER v6.0 + <br>Multiple Message Belt CONVEYER v6.0 + <br>Multiple Message TICKER v4.0</a></div>';

singletext[1]='<div align="center" class=tann>Multiple Message Scroller V3.0.</div><div align="center" class=tan>After one message left, the next one comes in.<br>Adjust: Size, Speed and Background.<br>Any message may use <b><u>Hyperlinks</u></b></div>';
singletext[2]='<div align="center" class=tan><b>Cross-Browser:</b></div><div align="center" class=tan>ie4+ opera7+ ns4+ ns6+ Mozilla (Firefox ...)</div>';
singletext[3]='<div align="center" class=tan>Any message may be <b><i>as large as desired.</i></B><br>===<br><br>...<br><br>===<br>One may use <b><i>all the basic HTML code.</i></B></div>';
//singletext[...]='...';
//-- end Parameters and message -->

//-- begin: Scroller's Algorithm -->
if (singletext.length>1)ii=1;else ii=0;
function goup(){if(sspeed!=rspeed*8){sspeed=sspeed*2;restart=sspeed;}}
function godown(){if(sspeed>rspeed){sspeed=sspeed/2;restart=sspeed;}}
function start(){if (document.all){iens6div.style.top=sheight;iescroll(iens6div);}
else if (document.layers){document.ns4div.document.ns4div1.top=sheight;document.ns4div.document.ns4div1.visibility='show';ns4scroll(document.ns4div.document.ns4div1);}
else if (document.getElementById){document.getElementById('iens6div').style.top=sheight;ns6scroll(document.getElementById('iens6div'));}}
function iescroll(whichdiv){iediv=eval(whichdiv);sizeup=iediv.offsetHeight;if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll(iediv)",100);}if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed;setTimeout("iescroll(iediv)",100);}else{iediv.style.pixelTop=sheight;iediv.innerHTML=singletext[ii];if(ii==singletext.length-1)ii=0;else ii++;}}
function ns4scroll(whichlayer){ns4layer=eval(whichlayer);sizeup=ns4layer.document.height;if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll(ns4layer)",100);}if (ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll(ns4layer)",100);}else{ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();if(ii==singletext.length-1)ii=0;else ii++;}}
function ns6scroll(whichdiv){ns6div=eval(whichdiv);sizeup=ns6div.offsetHeight;if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll(ns6div)",100);}if (parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed;setTimeout("ns6scroll(ns6div)",100);}else{ns6div.style.top=sheight;ns6div.innerHTML=singletext[ii];if(ii==singletext.length-1)ii=0;else ii++;}}
//-- end Algorithm -->
</script>

Body Code:

<!-- You may remove last cell below (<td> ... </td>) to get rid of Speed-change -->
<table align="center" border="1"><tr><td>
<script language="JavaScript">if(document.layers){document.write('<ilayer id="ns4div" width='+swidth+' height='+sheight+' bgcolor='+sbcolor+'><layer id="ns4div1" width='+swidth+' height='+sheight+' onmouseover="sspeed=0;" onmouseout="sspeed=restart">');document.write(singletext[0]);document.write('</layer></ilayer>')}
if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);background-color:'+sbcolor+';" onmouseover="sspeed=0;" onmouseout="sspeed=restart"><div id="iens6div" style="position:relative;width:'+swidth+';">');document.write(singletext[0]);document.write('</div></div>');}</script>
</td><td bgcolor="#ffffcc"><div><a class=tabb href="#" onClick="goup();">UP</a></div><div class=tan>-</div><div><a href="#" class=tabb onClick="godown();">DN</a></div></td></tr></table>
<!-- end -->
<hr>
<form><input type=button onclick="start()" value="Start"></form>

Times Viewed: 9

Leave a Reply

Your email address will not be published. Required fields are marked *