Duniaweb Blog

Your Interner Life Partner

Gambar mengikuti scroll

ini cocok untuk pemasangan iklan di website

<html>
<head>

<body topmargin=”0″ bgcolor=”#000000″>
<script>
if (!document.layers)
document.write(‘<div id=”divStayTopright” style=”position:absolute”>’)
</script>
</head>

<body bgcolor=”#000000″>

<layer id=”divStayTopright”>
<!–EDIT BELOW CODE TO YOUR OWN MENU–>
<table border=”0″ width=”130″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td><img src=”TN_psd0810.JPG” width=”171″ height=”158″></td>
</tr>
</table>
<!–END OF EDIT–>
</layer>

<script type=”text/javascript”>
/*
Floating Menu script-  Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
//Enter “frombottom” or “fromtop”
var verticalpos=”fromtop”

if (!document.layers)
document.write(‘</div>’)

function JSFX_FloatTopDiv()
{
var startX = 0,
startY = 0;
var ns = (navigator.appName.indexOf(“Netscape”) != -1);
var d = document;
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.right=x;this.style.top=y;};
el.x = startX;
if (verticalpos==”fromtop”)
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopright=function()
{
if (verticalpos==”fromtop”){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY – ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
ftlObj.y += (pY – startY – ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout(“stayTopright()”, 10);
}
ftlObj = ml(“divStayTopright”);
stayTopright();
}
JSFX_FloatTopDiv();
</script>

</body>
</html>

September 22, 2008 - Posted by | JavaScript

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: