{

function WM_imageSwap(daImage, daSrc)
{
  var objStr,obj;
  /*
    WM_imageSwap()
    Changes the source of an image.

    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Shvatz
    Author Email: shvatz@wired.com

    Usage: WM_imageSwap(originalImage, 'newSourceUrl');

    Requires: WM_preloadImages() (optional, but recommended)
    Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
    with variables in ie3 for the mac. 
    */

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}

function WM_preloadImages()
{
  /*
  WM_preloadImages()
  Loads images into the browser's cache for later use.

  Source: Webmonkey Code Library
  (http://www.hotwired.com/webmonkey/javascript/code_library/)

  Author: Nadav Savio
  Author Email: nadav@wired.com

  Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);
  */

  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}

function WM_initializeToolbar(){
    var i;
    if (document.all){
	for(i = 0; i < document.all('container').all.length; i++){
	    if ((document.all('container').all[i].className == 'header') ||
(document.all('container').all[i].className == 'links')){
		document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= document.all('container').all[i];
	    }
	}
    } else if (document.getElementsByTagName && document.getElementById){
	var contained =
document.getElementById('container').getElementsByTagName('div');
	for(i = 0; i < contained.length; i++){
	    if ((contained[i].getAttribute('class') == 'header') ||
(contained[i].getAttribute('class') == 'links')){
		document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= contained[i];
	    }
	}
    }
}

function menuOpen(item)
{
if(document.WM.menu.dropdown.length) {
	document.WM.menu.dropdown[item + 1].style.display = ''; }
}

function menuClose(item)
{
if(document.WM.menu.dropdown.length) {
	for(loop = 0; loop < 7; loop = loop + 2) {
		if (loop != item) {
			temp = loop + 1;
			document.WM.menu.dropdown[temp].style.display = 'none'; }
}}}

function layerprep(layername)
{
if(document.layers) {
	visible = 'show';
	hidden = 'hide';
	var daLayer = document.layers[layername];
	daLayer.visibility = hidden;
} else if(document.all) {
	visible = 'visible';
	hidden = 'hidden';
	var daLayer = document.all(layername).style;
	daLayer.visibility = hidden;
}
}

function layerswap(layername)
{
if(document.layers) {
	visible = 'show';
	hidden = 'hide';
	var daLayer = document.layers[layername];
	if(daLayer.visibility == hidden) {
		daLayer.visibility = visible; }
	else {
		daLayer.visibility = hidden; }
} else if(document.all) {
	visible = 'visible';
	hidden = 'hidden';
	var daLayer = document.all(layername).style;
	if(daLayer.visibility == hidden) {
		daLayer.visibility = visible; }
	else {
		daLayer.visibility = hidden; }
}
}

}