eigentl. ganz einfach!
der teil der jetzt folgt wird zwischen <head> und </head> in deinem quelltext reinkopiert:
<SCRIPT LANGUAGE="JavaScript">
<!--
var Dateien = "../index.shtml?jav110.shtml";
if (top.frameset_geladen + "" != "okay"){
if(document.images)
top.location.replace(Dateien);
else
top.location.href = Dateien ;
}
if (parent.frames.length>2) {
err_url = self.location.href;
window.onerror = top.reportError;
}
// -->
</script>
<title>Movin around</title>
<script language="JavaScript">
<!--
//Dieses Skript stammt von Michael Mailer´s JavaScripts
//URL:
http://www.webaid.de/js -- eMail: mm@webaid.de
//Bitte entfernen Sie diesen Vermerk nicht !
<!--DocOzone's Javascript code, copyright 1998
// Feel free to borrow and modify this code,
// but be sure leave this credit in the source!
// Your pal, -Dr. Thaddeus Ozone-
//
http://www.ozones.com/
// this is the initialization and error trapping section
window.onerror=null;
netscape = (document.layers) ? 1:0;
goodIE = (document.all) ? 1:0;
window.onResize="history.go(0); setup()";
document.onmousemove=MoveHandler;
var gotthere = 0;
var count = 0;
toplocation = new Array( 0,30,57,80,101,125,80,80,101,125,80 );
temptoplocation = new Array( 50,100,100,150,150,200,200,100,150,150,200,200 );
leftlocation = new Array( 0,292,318,181,181,217,263,318,181,181,217,263 );
templeftlocation = new Array( 0,0,260,390,420,550,680,390,420,550,680 );
difftop = new Array( 0,0,0,0,0,0,0,0,0,0,0 );
diffleft = new Array( 0,0,0,0,0,0,0,0,0,0,0 );
if (netscape) {
window.captureEvents(Event.MOUSEMOVE);
window.onMouseMove = MoveHandler;
var layerstart = "document.";
var layerleft = ".left";
var layertop = ".top";
var layerstyle = "";
var windowWidth = window.innerWidth;
var windowHeight = window.innerHeight; }
else if (goodIE) {
layerstart = "document.all.";
layerleft = ".left";
layertop = ".top";
layerstyle = ".style";
windowWidth=600;
windowHeight=400; }
// end error trapping
var Ypos2 = 72;
var Xpos2 = 72;
function MoveHandler(e) {
if (netscape || goodIE) {
Xpos2 = (netscape)?e.pageX:event.x
Ypos2 = (netscape)?e.pageY:event.y
Xorigin = Xpos2;
Yorigin = Ypos2;
if (Ypos2 > windowHeight/2) {
if (Xpos2 > windowWidth/2) { direction = 1;}
else { direction = -1;} }
else {
if (Xpos2 > windowWidth/2) { direction = -1;}
else { direction = 1;} }
}}
function setup() {
if (goodIE) {
windowWidth=document.body.clientWidth;
windowHeight=document.body.clientHeight; }
Xorigin = 204;
Yorigin = 147;
spin();run(); }
function setup3() {
Xorigin = 204;
Yorigin = 147;
speed = -0.06;
OrbitSize = 200 }
function setup2() {
Xorigin = 480;
Yorigin = 208;
speed = -0.03;
OrbitSize = 100}
var OrbitSize = 200;
count=1; delay=100; direction = -1;
Count = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
Xpoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
Ypoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
var speed = -0.06;
var offset = 1;
function spin() {
for ( j = 0 ; j <= 9 ; j++ ) {
Count[j] = Count[j] + (speed*direction);
Xpoint[j] = Xorigin + ((OrbitSize*Math.sin(Count[j])*offset));
Ypoint[j] = Yorigin + (OrbitSize*Math.cos(Count[j])); }
setTimeout('spin()',3); }
function run() {
count++;
for ( j = 0 ; j <= 9 ; j++ ) {
difftop[j] = Ypoint[j] - temptoplocation[j];
diffleft[j] = Xpoint[j] - templeftlocation[j];
temptoplocation[j] = temptoplocation[j] + difftop[j]/30;
templeftlocation[j] = templeftlocation[j] + diffleft[j]/30;
eval(layerstart+"a"+j+layerstyle+layerleft+" = templeftlocation["+j+"]");
eval(layerstart+"a"+j+layerstyle+layertop+" = temptoplocation["+j+"]"); }
setTimeout('run()', 12) }
//-- end script -->
</script>
und in den bosy tag fügst du das ein: onLoad="setup()"
sieht dann in etwa so aus:
<body onLoad="setup()">
habs jetzt nur schnell überflogen wenns net funzt meldst dich nochma!