[Beschreibung]
[Kompatibilität]
[Code]
<script language="JavaScript"> <!-- Trio3 Script by kurt.grigg@virgin.net modified by N8i (www.nightfire.ch) //Choose colours and size of effect !! - wählen Sie Farben und Grösse var a_Colour='ff0000'; var b_Colour='ffffff'; var c_Colour='0000ff'; var Size=120; //Alter nothing below !! - ab hier nichts mehr ändern //Browser Sniffer var ns4up = (document.layers) ? 1 : 0; var ie4up = (document.all) ? 1 : 0; var mozup = (!document.all && document.getElementById) ? 1 : 0; // Capturing MouseMove function handlerMM(e) { xpos = (ns4up || mozup) ? e.pageX+6 : document.body.scrollLeft+event.clientX+6 ypos = (ns4up || mozup) ? e.pageY+16 : document.body.scrollTop+event.clientY+16 } if (ns4up) { window.captureEvents(Event.MOUSEMOVE); window.onMouseMove = handlerMM; } if (ie4up || mozup) { window.document.onmousemove = handlerMM; } var YDummy=new Array(),XDummy=new Array(),xpos=0,ypos=0,ThisStep=0;step=0.6; function swirl(){ for (i = 0; i < 3; i++) { YDummy[i]=ypos+Size*Math.sin((1*Math.sin((ThisStep)/10))+i*2)*Math.sin((ThisStep)/4); XDummy[i]=xpos+Size*Math.cos((1*Math.sin((ThisStep)/10))+i*2)*Math.sin((ThisStep)/4); } ThisStep+=step; setTimeout('swirl()',10); } var amount=10; if (ns4up){ for (i = 0; i < amount; i++) { document.write('<layer name=nsa'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+a_Colour+'></layer>'); document.write('<layer name=nsb'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+b_Colour+'></layer>'); document.write('<layer name=nsc'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+c_Colour+'></layer>'); } } if (ie4up){ document.write('<div id="ODiv" style="position:absolute;top:0px;left:0px">' +'<div id="IDiv" style="position:relative">'); for (i = 0; i < amount; i++) { document.write('<div id=x style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+a_Colour+';font-size:'+i/2+'"></div>'); document.write('<div id=y style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+b_Colour+';font-size:'+i/2+'"></div>'); document.write('<div id=z style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+c_Colour+';font-size:'+i/2+'"></div>'); } document.write('</div></div>'); } if (mozup) { for (i = 0; i < amount; i++) { document.write('<div id=x'+i+' style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background-color:'+a_Colour+';font-size:'+i/2+'"></div>'); document.write('<div id=y'+i+' style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background-color:'+b_Colour+';font-size:'+i/2+'"></div>'); document.write('<div id=z'+i+' style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background-color:'+c_Colour+';font-size:'+i/2+'"></div>'); } } function prepos(){ var ntscp=document.layers; var msie=document.all; if (ns4up){ for (i = 0; i < amount; i++) { if (i < amount-1) { ntscp['nsa'+i].top=ntscp['nsa'+(i+1)].top;ntscp['nsa'+i].left=ntscp['nsa'+(i+1)].left; ntscp['nsb'+i].top=ntscp['nsb'+(i+1)].top;ntscp['nsb'+i].left=ntscp['nsb'+(i+1)].left; ntscp['nsc'+i].top=ntscp['nsc'+(i+1)].top;ntscp['nsc'+i].left=ntscp['nsc'+(i+1)].left; } else { ntscp['nsa'+i].top=YDummy[0];ntscp['nsa'+i].left=XDummy[0]; ntscp['nsb'+i].top=YDummy[1];ntscp['nsb'+i].left=XDummy[1]; ntscp['nsc'+i].top=YDummy[2];ntscp['nsc'+i].left=XDummy[2]; } } } if (ie4up) { for (i = 0; i < amount; i++) { if (i < amount-1) { msie.x[i].style.top=msie.x[i+1].style.top;msie.x[i].style.left=msie.x[i+1].style.left; msie.y[i].style.top=msie.y[i+1].style.top;msie.y[i].style.left=msie.y[i+1].style.left; msie.z[i].style.top=msie.z[i+1].style.top;msie.z[i].style.left=msie.z[i+1].style.left; } else { msie.x[i].style.top=YDummy[0];msie.x[i].style.left=XDummy[0]; msie.y[i].style.top=YDummy[1];msie.y[i].style.left=XDummy[1]; msie.z[i].style.top=YDummy[2];msie.z[i].style.left=XDummy[2]; } } } if (mozup) { for (i = 0; i < amount; i++) { tempdiv = i+1 if (i < amount-1) { document.getElementById("x"+i).style.top = document.getElementById("x"+tempdiv).style.top; document.getElementById("x"+i).style.left = document.getElementById("x"+tempdiv).style.left; document.getElementById("y"+i).style.top = document.getElementById("y"+tempdiv).style.top; document.getElementById("y"+i).style.left = document.getElementById("y"+tempdiv).style.left; document.getElementById("z"+i).style.top = document.getElementById("z"+tempdiv).style.top; document.getElementById("z"+i).style.left = document.getElementById("z"+tempdiv).style.left; } else { document.getElementById("x"+i).style.top = YDummy[0]; document.getElementById("x"+i).style.left = XDummy[0]; document.getElementById("y"+i).style.top = YDummy[1]; document.getElementById("y"+i).style.left = XDummy[1]; document.getElementById("z"+i).style.top = YDummy[2]; document.getElementById("z"+i).style.left = XDummy[2]; } } } setTimeout("prepos()",10); } function Start(){ swirl(),prepos() } window.onload=Start; // --> </script>
Kurt Grigg modified by N8i (www.nightfire.ch)
Kopieren Sie bitte den Scriptcode