function preload_images() {
  if (document.images) {
    if (!document.preloaded)
      document.preloaded = new Array();
    var j = document.preloaded.length;
    for (var i=0; i<arguments.length; i++) {
      document.preloaded[j] = new Image();
      document.preloaded[j++].src = arguments[i];
    }
  }
}

function image_over(name,over_file)
{
  if (document.images) {
    // Save current image to be restored by image_out().
    document[name].oSrc = document[name].src;
    document[name].src = over_file;
  }
}

function image_out(name)
{
  if (document.images && document[name].oSrc) {
    document[name].src = document[name].oSrc;
  }
}

function show_pic(picname, pic_file, loading_file)
{
  if (document.images) {
    // Show the (hopefully preloaded) "Loading Picture..." pic in case
    // the picture takes some time to load.
    document[picname].src =  loading_file;
    // Load the big guest picture.
    document[picname].src = pic_file;
  }
}
