// CREDITS: // Floating Right-To-Left-Scroller sticking at the bottom of your webpage // by Urs Dudli and Peter Gehrig // Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved. // Permission given to use the script provided that this notice remains as is. // Additional scripts can be found at http://www.24fun.com. // info@24fun.com // 12/5/2000 // IMPORTANT: // If you add this script to a script-library or script-archive // you have to add a link to http://www.24fun.com on the webpage // where the scrips will be running. // CONFIGURATION: // Go to www.24fun.com, open category 'text' and download // the full-version of this script as ZIP-file containing // step-by-step instructions and copy-and-paste installation for non-programmers. // EDIT THE VARIABLES BELOW: // messages. Add as many messages as you like var message=new Array() message[0]="Please report any broken links to the WebMaster" message[1]="Be sure to check out the Warhammer 40,000 pages" message[2]="Featured Site of the Week: The Taken" message[3]="Visit Dystrophic Downloads" // links of the messages (you need to set up link for each message) var messageurl=new Array() messageurl[0]="mailto:dystrophic@hotmail.com" messageurl[1]="http://dystrophic.tripod.com/40k/index.html" messageurl[2]="http://www.thetaken.org" messageurl[3]="http://soulcent.tripod.com/exe/index.html" // targets of the links (you need to set up a target for each message) // accepted values are '_blank' or '_top' or '_parent' or '_self' // or the name of your target-window (for instance 'main') var messagetarget=new Array() messagetarget[0]="_blank" messagetarget[1]="_blank" messagetarget[2]="_blank" // color of the messages (you need to set up a color for each message) var messagecolor= new Array() messagecolor[0]="black" messagecolor[1]="black" messagecolor[2]="black" messagecolor[3]="black" // width of scroller (pixels) var scrollerwidth=600 // height of scroller (pixels) var scrollerheight=18 // speed 1: lower means faster var pause=8 // speed 2: higher means faster var step=8 // font-size of messages var fntsize=12 // font-family of messages var fntfamily="Arial" // font-weight: 1 means bold, 0 means normal var fntweight=1 // backgroundcolor of scroller var backgroundcolor="white" // borderwidth of scroller (pixels) var borderwidth=1 // width of scrollerpadding (pixels) var cellpad=5 // DO NOT EDIT ANYTHING BELOW THIS LINE!!!! var scrollerleft var scrollertop var screenwidth var clipleft,clipright,cliptop,clipbottom var i_message=0 var timer var textwidth var textcontent="" var bgcontent="" if (fntweight==1) {fntweight="700"} else {fntweight="100"} function init() { getbgcontent() gettextcontent() if (document.all) { screenwidth=document.body.clientWidth scrollertop=document.body.clientHeight+document.body.scrollTop-(scrollerheight+2*cellpad) scrollerleft=screenwidth/2-scrollerwidth/2 text.innerHTML=textcontent bgscroller.innerHTML=bgcontent textwidth=text.offsetWidth document.all.bgscroller.style.posTop=scrollertop-cellpad document.all.bgscroller.style.posLeft=scrollerleft-cellpad document.all.text.style.posTop=scrollertop document.all.text.style.posLeft=scrollerleft+scrollerwidth clipleft=0 clipright=0 cliptop=0 clipbottom=scrollerheight document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrolltext() } if (document.layers) { screenwidth=window.innerWidth scrollertop=pageYOffset+window.innerHeight-(scrollerheight+2*cellpad) scrollerleft=screenwidth/2-scrollerwidth/2 document.text.document.write(textcontent) document.text.document.close() document.bgscroller.document.write(bgcontent) document.bgscroller.document.close() textwidth=document.text.document.width document.bgscroller.top=scrollertop-cellpad document.bgscroller.left=scrollerleft-cellpad document.text.top=scrollertop document.text.left=scrollerleft+scrollerwidth document.text.clip.left=0 document.text.clip.right=0 document.text.clip.top=0 document.text.clip.bottom=scrollerheight scrolltext() } } function scrolltext() { if (document.all) { if (document.all.text.style.posLeft>=scrollerleft-textwidth) { document.all.text.style.posLeft-=step clipright+=step if (clipright>scrollerwidth) { clipleft+=step } document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrollertop=document.body.clientHeight+document.body.scrollTop-(scrollerheight+2*cellpad) document.all.bgscroller.style.posTop=scrollertop-cellpad document.all.text.style.posTop=scrollertop var timer=setTimeout("scrolltext()",pause) } else { changetext() } } if (document.layers) { if (document.text.left>=scrollerleft-textwidth) { document.text.left-=step document.text.clip.right+=step if (document.text.clip.right>scrollerwidth) { document.text.clip.left+=step } scrollertop=pageYOffset+window.innerHeight-(scrollerheight+2*cellpad) document.bgscroller.top=scrollertop-cellpad document.text.top=scrollertop var timer=setTimeout("scrolltext()",pause) } else { changetext() } } } function changetext() { i_message++ if (i_message>message.length-1) {i_message=0} gettextcontent() if (document.all) { text.innerHTML=textcontent textwidth=text.offsetWidth document.all.text.style.posLeft=scrollerleft+scrollerwidth clipleft=0 clipright=0 document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrolltext() } if (document.layers) { document.text.document.write(textcontent) document.text.document.close() textwidth=document.text.document.width document.text.left=scrollerleft+scrollerwidth document.text.clip.left=0 document.text.clip.right=0 scrolltext() } } function gettextcontent() { textcontent="" textcontent+="" textcontent+=""+message[i_message]+"" } function getbgcontent() { var bgwidth=scrollerwidth+2*cellpad var bgheight=scrollerheight+2*cellpad bgcontent="" bgcontent+="
" bgcontent+="
" } window.onresize=init; window.onload=init;
Make your own free website on Tripod.com