Scroll up
<Div id = "marquees">
<A href = "#"> link 1 </a> <br>
<Br>
<A href = "#"> link 2 </a> <br>
<Br>
<A href = "#"> link 3 </a> <br>
<Br>
<A href = "#"> Link 4 </a>
<Br>
</Div>
<Script language = "JavaScript">
Marqueesheight = 200;
Stopscroll = false;
With (marquees ){
Style. width = 0;
Style. Height = marqueesheight;
Style. overflowx = "visible ";
Style. overflowy = "hidden ";
Nowrap = true;
Onmouseover = new function ("stopscroll = true ");
Onmouseout = new function ("stopscroll = false ");
}
Document. Write ('<Div id = "templayer" style = "position: absolute; Z-index: 1; visibility: hidden"> </div> ');
Pretop = 0; currenttop = 0;
Function Init (){
Templayer. innerhtml = "";
While (templayer. offsetheight <marqueesheight ){
Templayer. innerhtml + = marquees. innerhtml;
}
Marquees. innerhtml = templayer. innerhtml + templayer. innerhtml;
Setinterval ("scrollup ()", 10 );
}
Document. Body. onload = Init;
Function scrollup (){
If (stopscroll = true) return;
Pretop = marquees. scrolltop;
Marquees. scrolltop + = 1;
If (pretop = marquees. scrolltop ){
Marquees. scrolltop = templayer. offsetheight-marqueesheight;
Marquees. scrolltop + = 1;
}
}
</SCRIPT>
Scroll down
<Div id = "marquees"> <a href = "#"> link 1 </a> <br>
<Br>
<A href = "#"> link 2 </a> <br>
<Br>
<A href = "#"> link 3 </a> <br>
<Br>
<A href = "#"> Link 4 </a> <br>
<Br>
</Div>
<Script language = "JavaScript">
Marqueesheight = 200;
With (marquees ){
Style. width = 0;
Style. Height = marqueesheight;
Style. overflowx = "visible ";
Style. overflowy = "hidden ";
Nowrap = true;
Onmouseover = new function ("stopscroll = true ");
Onmouseout = new function ("stopscroll = false ");
}
Document. Write ('<Div id = "templayer" style = "position: absolute; Z-index: 1; visibility: hidden"> </div> ');
Pretop = 0; currenttop = 0; getlimit = 0; stopscroll = false;
Function Init (){
Templayer. innerhtml = "";
While (templayer. offsetheight <marqueesheight ){
Templayer. innerhtml + = marquees. innerhtml;
}
Marquees. innerhtml + = templayer. innerhtml;
Setinterval ("scrolldown ()", 10 );
} Init ();
Function scrolldown (){
If (stopscroll = true) return;
Pretop = marquees. scrolltop;
Marquees. scrolltop-= 1;
If (pretop = marquees. scrolltop ){
If (! Getlimit ){
Marquees. scrolltop = templayer. offsetheight * 2;
Getlimit = marquees. scrolltop;
}
Marquees. scrolltop = getlimit-templayer.offsetHeight + marqueesheight;
Marquees. scrolltop-= 1;
}
}
</SCRIPT>
Scroll left
<Div id = "marquees">
<A href = "#"> link 1 </a>
<A href = "#"> link 2 </a>
<A href = "#"> link 3 </a>
<A href = "#"> Link 4 </a>
</Div>
<Div id = "templayer" style = "position: absolute; left: 0; top: 0; visibility: hidden"> </div>
<Script language = "JavaScript">
Marqueeswidth = 200;
With (marquees ){
Style. Height = 0;
Style. width = marqueeswidth;
Style. overflowx = "hidden ";
Style. overflowy = "visible ";
Nowrap = true;
Onmouseover = new function ("stopscroll = true ");
Onmouseout = new function ("stopscroll = false ");
}
Preleft = 0; currentleft = 0; stopscroll = false;
Function Init (){
Templayer. innerhtml = "";
While (templayer. offsetwidth <marqueeswidth ){
Templayer. innerhtml + = marquees. innerhtml;
}
Marquees. innerhtml + = templayer. innerhtml;
Setinterval ("scrollleft ()", 10 );
} Init ();
Function scrollleft (){
If (stopscroll = true) return;
Preleft = marquees. scrollleft;
Marquees. scrollleft + = 1;
If (preleft = marquees. scrollleft ){
Marquees. scrollleft = templayer. offsetwidth-marqueeswidth + 1;
}
}
</SCRIPT>
Scroll to the right
<Div id = "marquees">
<A href = "#"> link 1 </a>
<A href = "#"> link 2 </a>
<A href = "#"> link 3 </a>
<A href = "#"> Link 4 </a>
</Div>
<Div id = "templayer" style = "position: absolute; left: 0; top: 0; visibility: hidden"> </div>
<Script language = "JavaScript">
Marqueeswidth = 200;
With (marquees ){
Style. Height = 0;
Style. width = marqueeswidth;
Style. overflowx = "hidden ";
Style. overflowy = "visible ";
Nowrap = true;
Onmouseover = new function ("stopscroll = true ");
Onmouseout = new function ("stopscroll = false ");
}
Pretop = 0; currenttop = 0; getlimit = 0; stopscroll = false;
Function Init (){
Templayer. innerhtml = "";
While (templayer. offsetwidth <marqueeswidth ){
Templayer. innerhtml + = marquees. innerhtml;
}
Marquees. innerhtml + = templayer. innerhtml;
Setinterval ("scrollright ()", 10 );
} Init ();
Function scrollright (){
If (stopscroll = true) return;
Preleft = marquees. scrollleft;
Marquees. scrollleft-= 1;
If (preleft = marquees. scrollleft ){
If (! Getlimit ){
Marquees. scrollleft = templayer. offsetwidth * 2;
Getlimit = marquees. scrollleft;
}
Marquees. scrollleft = getlimit-templayer.offsetWidth + marqueeswidth;
Marquees. scrollleft-= 1;
}
}
</SCRIPT>