
/////////// LOAD VIRUS!!!! ///////////////

function loadVirus() {

  // change letter link
  $('love-letter').src = 'images/shared/love-loaded-trans.png';
  
  // make promo explode (homepage)
  // new Effect.Puff('promo');
    
  // make other content explode
  
  var interval = 200;
  var numImages = $('content').getElementsByTagName('img').length;
  
  for (var i=0; i<numImages; i++) {
    window.setTimeout("new Effect.Puff($('content').getElementsByTagName('img')[" + i + "]);", interval*i);
  }
  
  // fix clean up content div
  window.setTimeout("$('content').style.paddingTop = '20px';" + 
                    "$('content').style.overflow = 'visible';" + 
                    "$('content').style.height = '1000px';" + 
                    "$('content').innerHTML = '';", interval*numImages+500);
                    
  // start effect 
  window.setTimeout(doStuff, interval*numImages+500);                    
  
  // 404
  var deathStar = document.createElement('div');
  deathStar.setAttribute('id', 'deathStar');
  deathStar.style.width = '400px';
  deathStar.style.height = 'auto';
  deathStar.style.overflow = 'hidden';
  deathStar.style.position = 'absolute';
  deathStar.style.top = 0;
  deathStar.style.right = 0;
  deathStar.style.zIndex = '99';
  deathStar.style.border='0px solid red';
  
  var myLord = document.createElement('img');
  myLord.src = 'images/shared/lord-404-VIRUS-trans.png';
  myLord.style.position = 'relative';
  myLord.style.left = '400px';
  myLord.setAttribute('id', 'lord404');
  deathStar.appendChild(myLord);    
  document.body.appendChild(deathStar);
  new Effect.Move('lord404', {x: -360, y: 0, position: 'absolute', duration: 8.0});
  
  // $('container').innerHTML += '<embed src="iMarch.wav" autostart=true width=0 height=0 name="sound1" enablejavascript="true">';
  
  function doStuff() {
    
    // change layout   
    if ($('promo') != null) new Effect.Shrink('promo'); 
    document.getElementsByTagName('body')[0].style.backgroundImage = 'url(images/shared/content-background-VIRUS.jpg)';

    new Effect.Puff($('header').getElementsByTagName('img')[1]);   
    $('header').style.backgroundImage = 'url(images/shared/header-background-VIRUS.jpg)';
    
    $('nav').style.backgroundImage = 'url(images/shared/nav-background-VIRUS.jpg)';
    $('nav').style.backgroundColor = '#fff'; 
    $('subnav').style.backgroundImage = 'url(images/shared/subnav-arrow-VIRUS.jpg)';
    
    var virusGuy = document.createElement('img');
    virusGuy.src = 'images/shared/virus-guy-trans.png';
    virusGuy.setAttribute('id', 'virusGuy');
    virusGuy.style.position = 'absolute';
    virusGuy.style.top = '0';
    virusGuy.style.left = '50%';
    virusGuy.style.marginLeft = '-75px';
    virusGuy.style.display = 'none';
    document.body.appendChild(virusGuy);
    window.setTimeout("new Effect.BlindDown('virusGuy', {duration: 1.0});", 1700);
    
    // da text
    
    var virusTextHTMLFull = '';
    virusTextHTMLFull += '<div id="vTextCont">';
    virusTextHTMLFull += '<h1 style="color: #fff;">*#EF33??*$d90</h1>';
    virusTextHTMLFull += '<p style="font-size: 20px; color: #fff;">Holy crap! Our worst enemies, The W@rmers, have managed to get in!<br /> they were hiding inside an email message!</p>';
    virusTextHTMLFull += '<p style="font-size: 20px; color: #fff;">Wally, where are you... please help!</p>';
    virusTextHTMLFull += '<p><img style="display: none" onload="new Effect.Grow(this);" src="images/shared/big-fuck-VIRUS-trans.png"></p>';
    virusTextHTMLFull += '</div>';
    virusTextHTMLFull += '<div style="clear: both;"></div>';
    
    // add virus text
    $('content').innerHTML = virusTextHTMLFull;
    
    // change heading      
    window.virusHeadings = new Array();             
    window.virusHeadings[window.virusHeadings.length] = 'Server is under attack!'; 
    window.virusHeadings[window.virusHeadings.length] = 'Server is under att@ck!';
    window.virusHeadings[window.virusHeadings.length] = 'Server is under attack!';
    window.virusHeadings[window.virusHeadings.length] = 'Server is under @tta@k!';
    window.virusHeadings[window.virusHeadings.length] = '$erver is under at#aak!';
    window.virusHeadings[window.virusHeadings.length] = 'Server is under attack!'; 
    window.virusHeadings[window.virusHeadings.length] = '$erver is un*er EF33?k!';
    window.virusHeadings[window.virusHeadings.length] = 'Serv8r is under attack!'; 
    window.virusHeadings[window.virusHeadings.length] = 'S3rver is +nder attack!'; 
    window.virusHeadings[window.virusHeadings.length] = 'Server 1s ?nder attack!';
    window.virusHeadings[window.virusHeadings.length] = 'Server is under attack!'; 
    window.virusHeadings[window.virusHeadings.length] = 'Server is under attack!'; 
    window.virusHeadings[window.virusHeadings.length] = 'Server is u##er att@ck!';
    window.virusHeadings[window.virusHeadings.length] = 'Server is un?er attack!';
    window.virusHeadings[window.virusHeadings.length] = 'Server #?sunder attack!';
    window.virusHeadings[window.virusHeadings.length] = 'S4rver is under att@ck!';
    window.virusHeadings[window.virusHeadings.length] = 'Server is under attack!'; 
    window.virusHeadings[window.virusHeadings.length] = 'Server is under att@ck!';
    window.virusHeadings[window.virusHeadings.length] = 'Server i$ under att@ck!';
    window.virusHeadings[window.virusHeadings.length] = 'Server is under attack!'; 
    window.virusHeadings[window.virusHeadings.length] = 'S4rver is under att@ck!';
    window.virusHeadings[window.virusHeadings.length] = 'S4rver is under att@ck!'; 
    
    window.setInterval("$('vTextCont').getElementsByTagName('h1')[0].innerHTML = window.virusHeadings[Math.floor((Math.random()*window.virusHeadings.length))];", 150); 
    
    // window.setTimeout("$('deathStar').style.width = '400px';", 16200);
    
    // reload page
    // window.setTimeout("window.location = '?';", 17500);   
                            
  }   

}
