
<!-- 
   //configure the likelihood that an earthquake will occur (100% means always) 
   var chance_of_occurence="100%" 

   //variable used to store the equivalency of the 10 rector scales (in the form of 1, 3, 6...etc) 
   var rectorscale=new Array(1,3,6,9,12,15,18,21,24,27) 
   chance_of_occurence=parseInt(chance_of_occurence) 

   function earthquake(){ 
      //randomly assign a number from 1 to 10 to variable rectorindex 
      rectorindex=Math.floor(Math.random()*10) 
      //randomly assign one of element rectorscale into variable rector 
      rector=rectorscale[rectorindex] 
      if ((document.all||document.layers)&&Math.floor(Math.random()*100)<=chance_of_occurence) { 
      //shake the browser's screen according to the random rector scale! 
      for (i=0;i,i<20;i++){ 
      window.moveBy(0,rector) 
      window.moveBy(rector,0) 
      window.moveBy(0,-rector) 
      window.moveBy(-rector,0) 
      } 
      // show quake message 
      quakealert() 
      } 
   } 

   if (document.all) 
      document.write('<div id="lala"></div>') 

   function quakealert(){ 
      var quakemessage='An earthquake of magnitude <b>'+eval(rectorindex+1)+'</b> has just occured! Please stay calm...the power has been knocked out, but everything\'s fine now.' 

      if (document.all){ 
      quakemsg_ie=document.all.quakenotice_ie 
      quakemsg_ie.innerHTML=quakemessage 
      //position quake message in center of screen 
      quakemsg_ie.style.left=document.body.scrollLeft+document.body.clientWidth/2-quakemsg_ie.offsetWidth/2 
      quakemsg_ie.style.top=document.body.scrollTop+document.body.clientHeight/2-quakemsg_ie.offsetHeight/2 
      quakemsg_ie.style.visibility="visible" 
      setTimeout("quakemsg_ie.style.visibility='hidden'",5000) 
      } 
      else if (document.layers){ 
      quakemsg_ns=document.quakenotice_ns 
      quakemsg_ns.document.write(quakemessage) 
      quakemsg_ns.document.close() 
      quakemsg_ns.left=pageXOffset+window.innerWidth/2-quakemsg_ns.document.width/2 
      quakemsg_ns.top=pageYOffset+window.innerHeight/2-quakemsg_ns.document.height/2 
      quakemsg_ns.visibility="show" 
      setTimeout("quakemsg_ns.visibility='hide'",5000) 
      } 
   } 
   var layers = document.layers, style = document.all, both = layers || style, idme=908601; 
   if (layers) { layerRef = 'document.layers'; styleRef = ''; } if (style) { layerRef = 'document.all'; styleRef = '.style'; } 

   function writeOnText(obj, str) { 
      if (layers) with (document[obj]) { document.open();  document.write(str); document.close(); } 
      if (style) eval(obj+'.innerHTML= str'); 
   } 

   var dispStr = new Array( 
"<b>loading preset message..... <font color=#ffffff>An error has occured in this building....</b> <br> <br> Power has been knocked out due to a possible malfunction or natural disaster....</font> <br> <br> S t a t i s t i c s . . . . <font color=#00FF00>-stable</font> <br> <br> D a t a & S t o r a g e . . . . <font color=#00FF00>-ok</font> <br> <br> K u l p r i t . . . . <font color=#FF0000> -nowhere to be seen </font> <br> <br>" 
   ); 

   var overMe=0; 

   function txtTyper(str, idx, idObj, spObj, clr1, clr2, delay, plysnd) { 
      var tmp0 = tmp1 = '', skip = 0; 
      if (both && idx <= str.length) { 
      if (str.charAt(idx) == '<') { while (str.charAt(idx) != '>') idx++; idx++; } 
      if (str.charAt(idx) == '&' && str.charAt(idx+1) != ' ') { while (str.charAt(idx) != ';') idx++; idx++; } 
      tmp0 = str.slice(0,idx); 
      tmp1 = str.charAt(idx++); 

      if (overMe==0 && plysnd==1) { 
      if (navigator.plugins[0]) { 
      if (navigator.plugins["LiveAudio"][0].type=="audio/basic" && navigator.javaEnabled()) { 
      document.embeds[0].stop(); 
      setTimeout("document.embeds[0].play(false)",100); } 
      } else if (document.all) { 
      ding.Stop(); 
      setTimeout("ding.Run()",100); 
      } 
      overMe=1; 
      } else overMe=0; 

      writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2+"'>"+tmp1+"</font></span>"); 
      setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay); 
      } 
   } 

   function init() { 
      txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', '#339933', '#99FF33', 50, 0); 
      earthquake(); 
   } 
//--> 
