|
|
<script language=JavaScript> <!-- if (navigator.appName == "Netscape") { startDelay = 2000; // initial delay of the playing in millisec } else { // Internet Explorer startDelay = 000; // initial delay of the playing in millisec } animationStart = 0; // boolean for turning on the initial delay midiPlaying = 0; // boolean for starting midifile midiDuration = 2500; // duration of the midifile to play durationCount = 0; // total time for playing animation delay = 80; // delay in milliseconds between images imageCounter = 0; // current image to display numImages = 31; // number of images to cycle through anim = new Array(); // images array // preload the images into the array for (i=0; i<numImages; i++) { anim[i] = new Image(); anim[i].src = 'logo/logo' + (i+1) + '.gif'; } anim[numImages] = new Image(); anim[numImages].src = 'logoblank.gif'; function increment() { if ((midiPlaying != 0) && (durationCount <= midiDuration + startDelay)) { durationCount += delay; document.waveanim.src = anim[imageCounter].src; imageCounter++; if (imageCounter >= numImages) { imageCounter = 0; } } else { imageCounter = numImages; document.waveanim.src = anim[imageCounter].src; } } function animate() { increment(); if (durationCount <= midiDuration + startDelay) { if (animationStart ==0) { setTimeout("animate()", startDelay); animationStart = 1; setTimeout("playMidi('logoA.mid')", startDelay); durationCount += startDelay; } else { setTimeout("animate()", delay); } } else { imageCounter = numImages; document.waveanim.src = anim[imageCounter].src; } } function playMidi(name) { midiPlaying = 1; if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 3 && navigator.appVersion.indexOf("68k") == -1 && navigator.javaEnabled() && document.embeds[name] != null && document.embeds[name].IsReady()) { document.embeds[name].play(false); } else { // document.write("<bgsound src=" + name + " loop=1>"); } } // --> </script>