<!--
okay = false;  // wait until variables are initialized

var preload = new Array (

"images/spiritdance-logo5.gif",
"images/sun2b.gif",
"images/sun1b.gif",
"images/star1b.gif",
"images/star2b.gif",
"images/star3.gif",
"images/koko-small.gif",
"images/sun1b-current.gif",
"images/sun2b-current.gif",
"images/star1b-current.gif",
"images/star2b-current.gif",
"images/star3-current.gif",
"images/koko-small-over.gif",
"images/sun1b-over.gif",
"images/sun2b-over.gif",
"images/star1b-over.gif",
"images/star2b-over.gif",
"images/star3-over.gif",
"images/sun-icon.gif",
"images/penguindanceB2.gif",
"images/penguinstill.gif",
"images/btn-please.gif",
"images/btn-thanks.gif"

  );

// 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 i = 0; i < preload.length; i++) {
    i_preload(preload[i]);
    }
  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 two entries function
function doubleswap (name, image, name2, image2)
{
if(!okay) return true;
// dont try to do this before the preloading is finished
if(preloaded) document.images[name].src = image;
			  document.images[name2].src = image2;
return true;
}

// swap entry function
function swap (name, image)
{
if(!okay) return true;
// dont try to do this before the preloading is finished
	if(preloaded) document.images[name].src = image;
return true;
}

// toggle division visibility status
function toggle(targetId, hideId)
{
if(okay) {
  if(preloaded)	{
  		target = document.all( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "";
  			} else {
  				target.style.display = "none";
  			}
  		hide = document.all( hideId );
  			if (hide.style.display == "none"){
  				hide.style.display = "none";
  			} else {
  				hide.style.display = "none";
  			}
  			
  		}
	}
}
//-->