ILayer Scrolls Message

[Total: 0    Average: 0/5]

This uses an ilayer to scroll a message for you to your readers.

Head Code:

<STYLE><!--// 
A { text-decoration: none; }
A:{color:green} 
A:vlink{color:#660066} 
A:hover{COLOR:red; text-decoration: underline}  
//--></STYLE>



<script language="JavaScript">


var mw=470 	/* The width */
var mh=100 	/* The height */
var sp=1 		/* The Speed */

var text= '<B>Thank You</B> for visiting us.<br>Visit our page of <A HREF="/">Javascript</A>'
if (document.all)document.write('<marquee direction="up" scrollAmount='+sp+' style="width:'+mw+';height:'+mh+'">'+text+'</marquee>')

function loop() 
{
	window.location.reload() 
					}

function loop2() 
{
	if (document.layers) { setTimeout("window.onresize=loop",350) 
	init() 

									} 
								}

function init() 
{
	document.marq.document.marqEx.document.write(text)
	document.marq.document.marqEx.document.close()
	thelength=document.marq.document.marqEx.document.height
	runmarq() 
								}

function runmarq() 
{	
	if (document.marq.document.marqEx.top>=thelength*(-1)) { 
	document.marq.document.marqEx.top-=sp 
	setTimeout("runmarq()",100)
										}

else 
{
	document.marq.document.marqEx.top=mh 
	runmarq() 

							} 
						}

window.onload=loop2

</script>

Body Code:

<ilayer width=&{mw}; height=&{mh}; name="marq"><layer name="marqEx" width=&{mw}; height=&{mh};></layer></ilayer>

Times Viewed: 4

Leave a Reply

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