Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Banner does not float over site: sits to right side of css layout

Status
Not open for further replies.

tshey

Technical User
Dec 28, 2005
78
AU
I have added this code in the <head></head> tags
Code:
<script type="text/javascript" language="JavaScript">var Type = 'Z';
function StartFloat() {
if(document.all) {
	document.all.AdFloater.style.pixelLeft = document.body.clientWidth - document.all.AdFloater.offsetWidth;
	document.all.AdFloater.style.visibility = 'visible';
	Type = 'A';
	}
else if(document.layers) {
	document.AdFloater.left = window.innerWidth - document.AdFloater.clip.width - 16;
	document.AdFloater.visibility = 'show';
	Type = 'B';
	}
else if(document.getElementById) {
	document.getElementById('AdFloater').style.left = (window.innerWidth - 35) + 'px';
	document.getElementById('AdFloater').style.visibility = 'visible';
	Type = 'C';
	}
if (document.all) { window.onscroll = Float; }
else { setInterval('Float()', 100); }
}
function Float() {
if (Type == 'A') { document.all.AdFloater.style.pixelTop = document.body.scrollTop; }
else if (Type == 'B') { document.AdFloater.top = window.pageYOffset; }
else if (Type == 'C') { document.getElementById('AdFloater').style.top = window.pageYOffset + 'px'; }
} //-->
</script>
and this in the <body>
Code:
<body onLoad="StartFloat()">
and this in the content area
Code:
<div id='AdFloater'>
<SCRIPT language='JavaScript' type='text/javascript' >
<!--
document.write("<table width='468' height='60' border='0' cellspacing='0' cellpadding='1' style='display:none;position:absolute;top:10px;left:10px;empty-cells:hide' id='v1771165726553906v181'>");document.write("<tr><td style='background: #FFCC33'>");document.write("<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>");document.write("<tr height='1'><td>");document.write("<table width='100%' border='0' cellspacing='1' cellpadding='0' style='background: #FFFFFF; color: #000000; cursor: default'><tr style='font-family: Arial, sans-serif; font-size: 10pt; font-weight: bold'><td>Voip Communications");document.write("<td style='width: 20px; cursor: pointer;' onclick='javascript:v1771165726553906v183();'>-");document.write("<td style='width: 20px; cursor: pointer;' onclick='javascript:v1771165726553906v184();'>X");document.write("</table>");document.write("<tr><td>");document.write("<table width='100%' height='100%' id='v1771165726553906v185' border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>");document.write("<tr>");document.write("<td>");document.write("<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><p align=\"center\"><a href=\"[URL unfurl="true"]http://nbjmp.com/click/?o=748&a=6789&c=13601&s=2078\"><img[/URL] border=\"0\" src=\"[URL unfurl="true"]http://nbjmp.com/images/748-13601-468x60.jpg?s=2078\"></a><br>&nbsp;</td></tr></table>");document.write("</table></table></table>");[/URL] if ( document.getElementById ) v1771165726553906v186 = document.getElementById ( "v1771165726553906v181" ); else v1771165726553906v186 = document.all ["v1771165726553906v181"]; var v1771165726553906v187 = undefined; var v1771165726553906v188 = false; function v1771165726553906v183 ( ) {   if ( document.getElementById )     v189 = document.getElementById ( "v1771165726553906v185" );   else     v189 = document.all ["v1771165726553906v185"];   if ( v189.style.display == "none" )     {       v189.style.display = "";       v1771165726553906v186.style.height = "60px";     }   else     {       v189.style.display = "none";       v1771165726553906v186.style.height = "20px";     } } function v1771165726553906v184 ( ) {   v1771165726553906v186.style.display = "none";   v1771165726553906v188 = true; } var v1771165726553906v175, v1771165726553906v176; var v1771165726553906v190, v1771165726553906v191; function v1771165726553906v192 ( ) {   return ( ( window.pageXOffset ) ? window.pageXOffset : document.body.scrollLeft ) + v1771165726553906v190; } function v1771165726553906v193 ( ) {   return ( ( window.pageYOffset ) ? window.pageYOffset : document.body.scrollTop ) + v1771165726553906v191; } function v1771165726553906v194 ( ) {   var v195 = 500;   v1771165726553906v186.style.top = v1771165726553906v193 ( );   v1771165726553906v186.style.left = v1771165726553906v192 ( );     setTimeout ( "v1771165726553906v194 ( );", v195 ); } function v1771165726553906v197 ( v198 ) {   if ( v1771165726553906v190 != v1771165726553906v175 || v1771165726553906v191 != v1771165726553906v176 )     {       if ( v1771165726553906v190 != v1771165726553906v175 )         if ( Math.abs ( v1771165726553906v190 - v1771165726553906v175 ) <= v1771165726553906v199 )           v1771165726553906v190 = v1771165726553906v175;         else           if ( v1771165726553906v190 < v1771165726553906v175 )             v1771165726553906v190 += v1771165726553906v199;           else             v1771165726553906v190 -= v1771165726553906v199;       if ( v1771165726553906v191 != v1771165726553906v176 )         if ( Math.abs ( v1771165726553906v191 - v1771165726553906v176 ) <= v1771165726553906v199 )           v1771165726553906v191 = v1771165726553906v176;         else           if ( v1771165726553906v191 < v1771165726553906v176 )             v1771165726553906v191 += v1771165726553906v199;           else             v1771165726553906v191 -= v1771165726553906v199;       v1771165726553906v186.style.top  = v1771165726553906v193 ( );       v1771165726553906v186.style.left = v1771165726553906v192 ( );       setTimeout ( "v1771165726553906v197 ( " + v198 + " );", 20 );     }   else     if ( v198 )       v1771165726553906v194 ( );     else       v1771165726553906v186.style.display = "none"; } function v1771165726553906v200 ( v201, v202 ) {   v1771165726553906v175 = v201;   v1771165726553906v176 = v202;   v1771165726553906v190 = v201;   v1771165726553906v191 = v202;    var v205 = 0, v206 = 0;    v205 = -v201 -468;    v206 = -v202 -60;    if ( v205 != 0 && v206 != 0 )      if ( Math.abs ( v205 ) < Math.abs ( v206 ) )        v206 = v206 / Math.abs ( v206 ) * Math.abs ( v205 );      else        v205 = v205 / Math.abs ( v205 ) * Math.abs ( v206 );   v1771165726553906v190 += v205;   v1771165726553906v191 += v206;   v1771165726553906v186.style.top  = v1771165726553906v193 ( );   v1771165726553906v186.style.left = v1771165726553906v192 ( );   v1771165726553906v186.style.display = "";   v1771165726553906v197 ( true ); } function v1771165726553906v196 ( ) {   if ( v1771165726553906v188 )     return;   v1771165726553906v199 = undefined;    var v205 = 0, v206 = 0;    var v201 = v1771165726553906v175, v202 = v1771165726553906v176;    v205 = -v201 -468;    v206 = -v202 -60;    if ( v205 != 0 && v206 != 0 )      if ( Math.abs ( v205 ) < Math.abs ( v206 ) )        v206 = v206 / Math.abs ( v206 ) * Math.abs ( v205 );      else        v205 = v205 / Math.abs ( v205 ) * Math.abs ( v206 );   v1771165726553906v175 += v205;   v1771165726553906v176 += v206;   v1771165726553906v186.style.top  = v1771165726553906v193 ( );   v1771165726553906v186.style.left = v1771165726553906v192 ( );   v1771165726553906v186.style.display = "";   v1771165726553906v197 ( false ); } var v1771165726553906v199 = 16.970725498515062; setTimeout ( "v1771165726553906v200 ( 220, 100, 16.970725498515062 );", 1500 ); var v1771165726553906v217, v1771165726553906v218; function v1771165726553906v219 ( v220 ) {   v221 = ( document.all ) ? event.clientX : v220.clientX;   v222 = ( document.all ) ? event.clientY : v220.clientY;   v1771165726553906v190 += v221 - v1771165726553906v217;   v1771165726553906v191 += v222 - v1771165726553906v218;   v1771165726553906v217 = v221;   v1771165726553906v218 = v222;   v1771165726553906v186.style.top  = v1771165726553906v193 ( );   v1771165726553906v186.style.left = v1771165726553906v192 ( ); } function v1771165726553906v223 ( ) { } function v1771165726553906v224 ( ) {   document.onmousemove = v1771165726553906v223;   document.onmouseup   = v1771165726553906v223; } function v1771165726553906v225 ( v220 ) {   v1771165726553906v217 = ( document.all ) ? event.clientX : v220.clientX;   v1771165726553906v218 = ( document.all ) ? event.clientY : v220.clientY;   document.onmousemove = v1771165726553906v219;   document.onmouseup   = v1771165726553906v224; } v1771165726553906v186.onmousedown = v1771165726553906v225;
//-->
</SCRIPT></div>
It keeps sitting after my css layout. Why isn't it sitting ontop??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top