
<!--

// Programmed by: Jeffrey Ethan Planes
// (c) 2003 Jeffrey Ethan Planes
//http://bw.org/
//
//
//
// No other rights are granted. This program is not "public domain".
//

okay = false;  // wait until variables are initialized

var preload = new Array (

///////////////////////////////////////////////////
// list all your images here.
// Remember: No comma after the last image!
//

"images/flash_site_up.gif", "images/flash_site_ov.gif", 
"images/non_flash_up.gif", "images/non_flash_ov.gif",
"images/designer_footer_up.gif", "designer_footer_ov.gif" 

  

//
// you shouldn't need to modify anything
// below this line
///////////////////////////////////////////////////

  );

// find out what browser this is
with(navigator) {
  code = appCodeName;
  app = appName;
  version = appVersion;
  iver = parseInt(version);
  ua = userAgent;
  }

// this will work in "Mozilla" 3+ (includes MSIE 4)
if ( code == "Mozilla" && iver >= 3 )  okay = true;
else { okay = false; }

if(okay) {
  // compile the RegExp because we use it a lot
  var re = new RegExp();
  re.compile("[\\/.:\\-\\s]", "g");

  // preload the images
  for (var index = 0; index < preload.length; index++) {
    i_preload(preload[index]);
    }
  var preloaded = true
  }

// take a filename and make a legal variable name from it
function iname (img)
{
var s = img.replace(re, "_");
return s;
}

// preload the images
function i_preload(img)
{
if(img) {
  var imgn = iname(img);
  eval(imgn + " = new Image()");
  eval(imgn + ".src = '" + img + "'");
  }
return true;
}

// swap entry function
function swap (name, image)
{
if(!okay) return true; // just leave unless okay

// don't try to do this before the preloading is finished
if(preloaded) document.images[name].src = image;
return true;
}



