function swap ( location, action ) {
   if ( document.images ) {
      var newimage = new Image ();
      if ( action == 'over' ) {
         newimage.src = 'images/hover/' + location + '.jpg';
      }

      else {
         newimage.src = 'images/' + location + '.jpg';
      }

      imagelocation = document.getElementById ( location + 'image' );
      imagelocation.src = newimage.src;
   }
}

function preload ( location ) {
   if ( document.images ) {
      var newimage = new Image ();
      newimage.src = 'images/hover/' + location + '.jpg';
   }
}

function popup ( url, name, size ) {
   window.open ( url, name, "scrollbars=no," + size );
}

function wallpaper ( wallpaper ) {
   var wallpapers = new Array();
   wallpapers[0] = 'dualspideys';
   wallpapers[1] = 'peterparker1';
   wallpapers[2] = 'peterparker2';
   wallpapers[3] = 'maryjane1';
   wallpapers[4] = 'maryjane2';
   wallpapers[5] = 'blackspidey';
   wallpapers[6] = 'spiderman';

   for ( i = 0; wallpapers[i]; i++ ) {
      parentlocation = document.getElementById ( wallpapers[i] );
      parentlocation.style.cursor = 'pointer';
      parentlocation.style.backgroundImage = 'url(images/' + wallpapers[i] + 'wallpaper.jpg)';
      divlocation = document.getElementById ( wallpapers[i] + 'content' );
      divlocation.style.display = 'none';
   }

   parentlocation = document.getElementById ( wallpaper );
   parentlocation.style.cursor = 'default';
   parentlocation.style.backgroundImage = 'url(images/selected/' + wallpaper + 'wallpaper.jpg)';
   divlocation = document.getElementById ( wallpaper + 'content' );
   divlocation.style.display = 'block';
}

