//preload the background images
image1 = new Image();
image1.src = "images/portfolioBg.jpg";
image2 = new Image();
image2.src  = "images/aboutMeBg.jpg";
image3 = new Image();
image3.src  = "images/loginBg.jpg";
image4 = new Image();
image4.src  = "images/contactMeBg.jpg";
image5 = new Image();
image5.src  = "images/legalBg.jpg";

//change the background image, called from flash
function setBackgroundImage(id, imageURL) {
  if (document.layers)
    document[id].background.src = imageURL == 'none' ? null : imageURL;
  else if (document.all)
    document.all[id].style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
  else if (document.getElementById)
    document.getElementById(id).style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
}