»
EnglishFrenchVietnamese

Print - Floating Email Logo - JavaScriptBank.com

Full version: jsB@nk » Image » Floating Email Logo
URL: https://www.javascriptbank.com/floating-email-logo.html

Floating Email Logo © JavaScriptBank.comThis JavaScript creates a image can float no web page.

Full version: jsB@nk » Image » Floating Email Logo
URL: https://www.javascriptbank.com/floating-email-logo.html



JavaScript
<script language="javascript">var w3c=(document.getElementById)?true:false;var ns4=(document.layers)?true:false;var ie4=(document.all && !w3c)?true:false;var ie5=(document.all && w3c)?true:false;var x,y,sx,sy,logo,logoW,logoH;function getwindowsize(){if(ie4||ie5){x=document.body.clientWidth-logoW-10;y=document.body.clientHeight-logoH-10;}else{x=window.innerWidth-logoW-25;y=window.innerHeight-logoH-10;}setInterval('movelogo()',100);}function movelogo(){if(ie4||ie5){sx=document.body.scrollLeft;sy=document.body.scrollTop;}else{sx=pageXOffset;sy=pageYOffset;}if(ns4)logo.moveTo((x+sx),(y+sy));else{logo.style.left=x+sx+'px';logo.style.top=y+sy+'px';}}window.onload=function(){logo=(ns4)?document.layers['logo']:(ie4)?document.all['logo']:document.getElementById('logo');if(ns4){logoW=logo.document.images['logopic'].width;logoH=logo.document.images['logopic'].height;}else{logoW=document.images['logopic'].width;logoH=document.images['logopic'].height;}getwindowsize();}window.onresize=function(){if(ns4)setTimeout('history.go(0)', 400);else getwindowsize();}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<div id="logo" style="position:absolute; left:0px; top:-100px"><a href="mailto:[email protected]"><img src="logojs.gif" border="0" name="logopic" width="150" height="60"></a></div><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->