// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'splash/01.jpg'
theImages[1] = 'splash/02.jpg'
theImages[2] = 'splash/03.jpg'
theImages[3] = 'splash/04.jpg'
theImages[4] = 'splash/05.jpg'
theImages[5] = 'splash/06.jpg'
theImages[6] = 'splash/07.jpg'
theImages[7] = 'splash/08.jpg'
theImages[8] = 'splash/09.jpg'
theImages[9] = 'splash/10.jpg'
theImages[10] = 'splash/11.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.images['splash'].src = theImages[whichImage];
  imageId = 'splash';
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);

}


function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 1;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 10);
    }
  }
}
