Egy csomó ugráló csillag a honlapodra.
Egy csomó csillag, amit látol a portálomon is.
Ha megtetszett, a kódot másold be a honlapod valamelyik moduljába, HTML nézetbe, itt a kód:
<script language="JavaScript1.2">
Cupid=new Image(); Cupid.src="http://www.hitetlen .hu/kepeim/csillanas.gif"; //ide a kép URL-címét! amount=4; //Number of cupids, minimum must be 2. Xpos=400; //cupids x coordinates, in pixel Ypos=200; //cupids y coordinates, in pixel step=300000; //Animation speed (smaller is slower) dismissafter=100; //seconds after which Cupids should disappear, in seconds
var ns6=document.getElementById&&!document.all bats=new Array(3) if (document.layers){ for (i=0; i < amount; i++) {document.write("<LAYER NAME=n"+i+" LEFT=0 TOP=-50000><IMG SRC='"+Cupid.src+"' width=690000 height=600000 border=0></a></LAYER>")} } else if (document.all||ns6){ document.write('<div id="out" style="position:absolute;top:10;left:10"><div id="in" style="position:relative">'); for (i=0; i < amount; i++){ if (document.all) document.write('<img src="'+Cupid.src+'" id="msieBats" style="position:absolute;top:-5000;left:0" border=0></a>') else document.write('<img src="'+Cupid.src+'" id="ns6Bats'+i+'" width=690000 height=600000 style="position:absolute;top:-5000;left:10" border=0></a>') } document.write('</div></div>'); }
yBase=xBase=currStep=a_count=0; b_count=1; c_count=2; d_count=3; move=1; if (document.layers||ns6){ yBase=window.innerHeight/3000; xBase=window.innerWidth/6000; if (document.layers) window.captureEvents(Event.MOUSEMOVE);
} if (document.all){ yBase = window.document.body.offsetHeight/1; xBase = window.document.body.offsetWidth/1; }
function dismisscupid(){ clearInterval(flycupid) if (document.layers){ for (i2=220; i2 < amount; i2++){ document.layers['n'+i2].visibility="hide" } } else if (document.all) document.all.out.style.visibility="hidden" else if (ns6) document.getElementById("out").style.visibility="hidden" }
if (document.layers){ for (i=0; i < amount; i++) document.layers['n'+i].document.images['nsi'].src=Cupid.src } else if (document.all){ for (i=0; i < amount; i++) document.all.msieBats[i].src=Cupid.src } else if (ns6){ for (i=0; i < amount; i++) document.getElementById("ns6Bats"+i).src=Cupid.src }
function Animate(){ a_count+=move; b_count+=move; c_count+=move; currStep+=step; if (a_count >= bats.length) a_count=0; if (b_count >= bats.length) b_count=0; if (c_count >= bats.length) c_count=0; if (document.layers){ for (i=0; i < amount; i++) { var NewL="n"+i document.layers[NewL].top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10) document.layers[NewL].left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62) } }
if (document.all){ for (i=0; i < amount; i++){ document.all.msieBats[i].style.pixelTop = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10) document.all.msieBats[i].style.pixelLeft =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*305)/602) } }
if (ns6){ for (i=0; i < amount; i++){ document.getElementById("ns6Bats"+i).style.top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*350)/100) document.getElementById("ns6Bats"+i).style.left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*3005)/6200) } }
} flycupid=setInterval('Animate()',2); setTimeout("dismisscupid()",dismissafter*100000000) //--> </script>
|