Menu
I found this script at [URL=http://dynamicdrive.com/dynamicindex2/crosstick.htm]dynamicdrive.com
but I can’t use it because it uses ilayers…which I’m told are not good. So what I want to know is if anyone has another script that has the same effect but that is actually GOOD. ? Thanks in advance for any hints you can give me.
var absStr = "";
var leftStr = Math.round((screen.width-useWidth-36)/2);
if (useWidth < 350){useWidth = 350};
if (speed < 50){speed = 50};
if (floatTo == 'top'){
alignTo = "";
absStr = "Position:Absolute;Top:1px;Left:"+leftStr+"";}
if (floatTo == 'bottom'){
alignTo = "";
if (useWidth < screen.availWidth-15)
{absStr = "Position:Absolute;Bottom:1px;Left:"+leftStr+"";}
else{absStr = "Position:Absolute;Bottom:16px;Left:"+leftStr+"";}
}
var nList = -1;
var i = 0;
var currItem = new Array();
for (each in rollText){currItem[i++] = rollText[each]}
i = 0;
var linkItem = new Array();
for (each in linkList){linkItem[i++] = linkList[each]}
var xV = 0;
var saveXV = 0;
function openLink(){
if (hasLinks == true)
{
isLink = linkItem[nList];
window.open(isLink);
// or use- window.location = isLink, or window.location.replace(isLink)
}
}
function stayHome(){
nV = document.body.scrollTop;
if (xV > saveXV && saveXV != 0){xV = saveXV};
if (floatTo == 'top'){isFloat.style.top = nV};
if (floatTo == 'bottom'){isFloat.style.top = xV+nV};
saveXV = xV;
}
window.onscroll = stayHome;
var rollLimit = 0;
var pause = pause*1000;
function initRoll(){
if (nList < itemsInUse-1){nList++} else{nList=0;}
iText.innerHTML = currItem[nList];
iText.style.paddingTop = 0;
setTimeout("rollDown()",pause);
}
function rollDown(){
if (rollLimit < 22)
{
rollLimit++;
iText.style.paddingTop = rollLimit;
setTimeout("rollDown()",speed);
}
else {
rollLimit = 0;
setTimeout("initRoll()",1500);
}
}
function buildRollBox(){
styleStr = "<Style> .cDiv {"+absStr+";Height:26pt;Padding-Left:0px; Padding-Right:0px;Padding-Top:3px;Padding-Bottom:0px;Margin-Right:4px;Margin-Left:6px;Margin-Top:4px;Margin-Bottom:2px;Text-Indent:0px;Text-Align:Center;overflow:hidden;width:"+useWidth+";Border-Top:#C0C0C0 1px solid;Border-Left:#C0C0C0 1px solid;Border-Bottom:Black 1px solid;Border-Right:Black 1px solid;background-color:"+backColor+";} .midTbl {Border:None;Padding-Left:0px;Padding-Right:0px;Padding-Top:0px;Padding-Bottom:0px;Margin-Left:0px;Margin-Right:0px;Margin-Top:0px;Margin-Bottom:0px;Text-Indent:0px;Text-Align:none;} .hldr {Padding-Right:0px;Padding-Left:0px;Padding-Top:0px;Padding-Bottom:0px;Margin-Right:0px;Margin-Left:0px;Margin-Top:0px;Margin-Bottom:0px;Text-Indent:0px;Text-Align:none;} .leftPad {Color:"+backColor+";Font-Style:normal;Letter-Spacing:normal;Font-Weight:normal;Text-Align:none;Text-Decoration:None;Text-Indent:0px;} .cBox {Line-Height:140%;Font-Style:normal;Letter-Spacing:normal;Font-Weight:normal;Text-Align:none;Text-Decoration:none;Text-Indent:0px;Font-Family:Tahoma,Arial,Veranda;Font-Size:13pt;Color:"+textColor+";Background-Color:none;Border:None;Text-Transform:none;Padding-Left:0px;Padding-Right:0px;Padding-Top:0px;Padding-Bottom:0px;Margin-Left:0px;Margin-Right:0px;Margin-Top:0px;Margin-Bottom:0px;} </Style>";
tblStr = "<Table class=hldr align="+alignTo+"><TD><DIV id=isFloat class=cDiv ><Table cellpadding=0 class=midTbl><TD id=iText class=cBox></TD></Table></DIV></TD></Table>"
document.write(styleStr);
document.write(tblStr);
if (hasLinks == true)
{
iText.onmouseover = iText.style.cursor = "pointer"
iText.onclick = openLink;
}
}
function runRollMsg(){
buildRollBox();
xV = isFloat.offsetTop-4;
initRoll();
}
0.1.9 — BETA 5.18