allee100
05-05-2004, 10:35 PM
I have a horizontal scrolling bar on a web page that stopped working. It works fine when I take it off of the page and put it by itself on a sepperate HTML page, but when I added a Flash banner below it the text stopped scrolling. I think that some other JS may be interferring, but not sure, any thoughts?
This is the JS code in the head:
<SCRIPT LANGUAGE="JavaScript">
//-- Begin Scroller's Parameters -->
//scroller width: change to your own;
var wwidth=400
//scroller height: change to your own;
var wheight=20
//background color: change to your own;
var wbcolor="#ffffff"
//scroller's speed: change to your own;
var wspeed=3
var wwholemessage=''
//text: change to your own
wwholemessage='<nobr class=Cell2>Fill with content here and links to that content that gives more detail:<a class=cLink2 href="#" onClick=\'window.top.location.href="http://www.360vinyl.com"\'><u>allee</u></a></nobr>';
//-- end Parameters-->
var resumewspeed=wspeed
var sizeupw=0;
function startw(){
if (document.all) iemarqueew(wslider);
else if (document.getElementById)
ns6marqueew(document.getElementById('wslider'));
else if(document.layers)
ns4marqueew(document.wslider1.document.wslider2);
}
function iemarqueew(whichdiv){
iedivw=eval(whichdiv)
iedivw.style.pixelLeft=wwidth
iedivw.innerHTML='<nobr>'+wwholemessage+'</nobr>'
sizeupw=iedivw.offsetWidth
ieslidew()
}
function ieslidew(){
if (iedivw.style.pixelLeft>=sizeupw*(-1)){
iedivw.style.pixelLeft-=wspeed
setTimeout("ieslidew()",50)
}
else{
iedivw.style.pixelLeft=wwidth
ieslidew()
}
}
function ns4marqueew(whichlayer){
ns4layerw=eval(whichlayer)
ns4layerw.left=wwidth
ns4layerw.document.write('<nobr>'+wwholemessage+'</nobr>')
ns4layerw.document.close()
sizeupw=ns4layerw.document.width
ns4slidew()
}
function ns4slidew(){
if (ns4layerw.left>=sizeupw*(-1)){
ns4layerw.left-=wspeed
setTimeout("ns4slidew()",50)
}
else{
ns4layerw.left=wwidth
ns4slidew()
}
}
function ns6marqueew(whichdiv){
ns6divw=eval(whichdiv)
ns6divw.style.left=wwidth
ns6divw.innerHTML='<nobr>'+wwholemessage+'</nobr>'
sizeupw=ns6divw.offsetWidth
ns6slidew()
}
function ns6slidew(){
if (parseInt(ns6divw.style.left)>=sizeupw*(-1)){
ns6divw.style.left=parseInt(ns6divw.style.left)-wspeed
setTimeout("ns6slidew()",50)
}
else{
ns6divw.style.left=wwidth
ns6slidew()
}
}
//-- end Algorithm -->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
and this is calling the function in the body:
"><!-- begin: body code -->
<script language="JavaScript">
if (document.getElementById || document.all){
document.write('<div style= "position:relative;overflow:hidden;width:'+wwidth+';height:'+wheight+';clip:rect(0 '+wwidth+' '+wheight+' 0);background-color:'+wbcolor+';"onMouseover="wspeed= 0;"onMouseout="wspeed=resumewspeed">')
document.write('<div id="wslider" style="position:relative;width:'+wwidth+';height:'+wheight+';">')
document.write('</div></div>')
}
</script> <ILAYER width="&{wwidth};" height="&{wheight};" name="wslider1" bgcolor="&{wbcolor};"
>
<LAYER name="wslider2" width="&{wwidth};" height="&{wheight};" onMouseover="wspeed=0;" onMouseout="wspeed=resumewspeed">
</LAYER>
</ILAYER><!-- end -->
This is the JS code in the head:
<SCRIPT LANGUAGE="JavaScript">
//-- Begin Scroller's Parameters -->
//scroller width: change to your own;
var wwidth=400
//scroller height: change to your own;
var wheight=20
//background color: change to your own;
var wbcolor="#ffffff"
//scroller's speed: change to your own;
var wspeed=3
var wwholemessage=''
//text: change to your own
wwholemessage='<nobr class=Cell2>Fill with content here and links to that content that gives more detail:<a class=cLink2 href="#" onClick=\'window.top.location.href="http://www.360vinyl.com"\'><u>allee</u></a></nobr>';
//-- end Parameters-->
var resumewspeed=wspeed
var sizeupw=0;
function startw(){
if (document.all) iemarqueew(wslider);
else if (document.getElementById)
ns6marqueew(document.getElementById('wslider'));
else if(document.layers)
ns4marqueew(document.wslider1.document.wslider2);
}
function iemarqueew(whichdiv){
iedivw=eval(whichdiv)
iedivw.style.pixelLeft=wwidth
iedivw.innerHTML='<nobr>'+wwholemessage+'</nobr>'
sizeupw=iedivw.offsetWidth
ieslidew()
}
function ieslidew(){
if (iedivw.style.pixelLeft>=sizeupw*(-1)){
iedivw.style.pixelLeft-=wspeed
setTimeout("ieslidew()",50)
}
else{
iedivw.style.pixelLeft=wwidth
ieslidew()
}
}
function ns4marqueew(whichlayer){
ns4layerw=eval(whichlayer)
ns4layerw.left=wwidth
ns4layerw.document.write('<nobr>'+wwholemessage+'</nobr>')
ns4layerw.document.close()
sizeupw=ns4layerw.document.width
ns4slidew()
}
function ns4slidew(){
if (ns4layerw.left>=sizeupw*(-1)){
ns4layerw.left-=wspeed
setTimeout("ns4slidew()",50)
}
else{
ns4layerw.left=wwidth
ns4slidew()
}
}
function ns6marqueew(whichdiv){
ns6divw=eval(whichdiv)
ns6divw.style.left=wwidth
ns6divw.innerHTML='<nobr>'+wwholemessage+'</nobr>'
sizeupw=ns6divw.offsetWidth
ns6slidew()
}
function ns6slidew(){
if (parseInt(ns6divw.style.left)>=sizeupw*(-1)){
ns6divw.style.left=parseInt(ns6divw.style.left)-wspeed
setTimeout("ns6slidew()",50)
}
else{
ns6divw.style.left=wwidth
ns6slidew()
}
}
//-- end Algorithm -->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
and this is calling the function in the body:
"><!-- begin: body code -->
<script language="JavaScript">
if (document.getElementById || document.all){
document.write('<div style= "position:relative;overflow:hidden;width:'+wwidth+';height:'+wheight+';clip:rect(0 '+wwidth+' '+wheight+' 0);background-color:'+wbcolor+';"onMouseover="wspeed= 0;"onMouseout="wspeed=resumewspeed">')
document.write('<div id="wslider" style="position:relative;width:'+wwidth+';height:'+wheight+';">')
document.write('</div></div>')
}
</script> <ILAYER width="&{wwidth};" height="&{wheight};" name="wslider1" bgcolor="&{wbcolor};"
>
<LAYER name="wslider2" width="&{wwidth};" height="&{wheight};" onMouseover="wspeed=0;" onMouseout="wspeed=resumewspeed">
</LAYER>
</ILAYER><!-- end -->