 .fly { COLOR: aqua; FONT-FAMILY: arial; FONT-SIZE: 24px; line-height: 28px; POSITION: absolute; VISIBILITY: hidden; Z-INDEX: 2}
.logo { COLOR: blue; FONT-FAMILY: times; FONT-SIZE: 72px; LEFT: 30px; line-height: 80px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; Z-INDEX: 1} .desc { COLOR: red; FONT-FAMILY: arial; FONT-SIZE: 12px; LEFT: 40px; line-height: 14px; POSITION: absolute; TEXT-ALIGN: center; TOP: 220px; VISIBILITY: hidden; WIDTH: 400px} BODY { BACKGROUND: #000000} A { COLOR: lime} A:hover { COLOR: yellow; TEXT-DECORATION: none}
/* Show an object */ function showObject(object) { object.visibility = VISIBLE; } /* Hide an object */ function hideObject(object) { object.visibility = HIDDEN; } /* Slide the logo from top to middle */ function slideLogo(from, to) { if (from < to) { company.top = (from += 10); setTimeout('slideLogo(' + from + ',' + to + ')', 75); } else initObjects(); } /* Rotate selected objects */ function rotateObjects() { for (var i = 0; i < pos.length; i++) { pos[i] += inc; objects[i].visibility = 'visible'; objects[i].left = (r * Math.cos(pos[i])) + xoff objects[i].top = (r * Math.sin(pos[i])) + yoff; } rotateTimer = setTimeout("rotateObjects()", 70); } /* Initialize selected objects for rotation */ function initObjects() { /* Here is the array of HTML elements that will be rotated, from fly1 to fly4 Just put the shortcut variables to the HTML elements in this little array and they will be rotated automatically */ objects = new Array(fly1, fly2, fly3, fly4); pos = new Array(); pos[0] = 0; for (var i = 1; i < objects.length; i++) { pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length)); } rotateObjects(); } /* Variables for rotating objects */ var objects; var pos; var r = 160; // radius var xoff = 180; // x offset var yoff = 170; // y offset var pi = Math.PI; // get pi var inc = pi / 180; // degrees per rotation cycle var objects; // objects to be rotated var pos; // position for objects
/* Simple version detection */ var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4); /* They can be used in place of hidden and visible because on occasion Navigator has problems with the two */ var HIDDEN = (isNS) ? 'hide' : 'hidden'; var VISIBLE = (isNS) ? 'show' : 'visible';
/* Create shortcut variables for different absolutely positioned elements */ var fly1 = (isNS) ? document.fly1 : document.all.fly1.style; var fly2 = (isNS) ? document.fly2 : document.all.fly2.style; var fly3 = (isNS) ? document.fly3 : document.all.fly3.style; var fly4 = (isNS) ? document.fly4 : document.all.fly4.style; var company = (isNS) ? document.company : document.all.company.style; var desc1 = (isNS) ? document.desc1 : document.all.desc1.style; var desc2 = (isNS) ? document.desc2 : document.all.desc2.style; var desc3 = (isNS) ? document.desc3 : document.all.desc3.style; var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;
/* Begin the sliding of the logo */ slideLogo(0, 140);
|