/*
WARNING: this code expects that a variable named "imgPath" already be specified.
*/
// used to tell functions when images are loaded

	var menuflag = 0;

	// short names of each of the main menu buttons

  if (imgPath==contextPath+"/sys/static/img/common/") {
  	//default
		var options = new Array('jobseekers','faculty','departments','hrhome','unchome','searchops','azindex','formfinder','hottopics','hrdir','campusdir','hrdepts','directions');
	}
  if (imgPath==contextPath+"/sys/static/img/epaimg/green/") {	
		// epa
		var options = new Array('acadpers','ohrhome','provost','unchome','azindex','epaformfinder','epacontacts','provostdir','campusdir','aboutepahr','directions','related','epaemail');
  }
  if (imgPath==contextPath+"/sys/static/img/epaimg/blue/") {	  
		// epa-job
		var options = new Array('jobsatunc','nonfaculty','spajobs','facultyjobs');
	}

// empty arrays that will get filled with references to images

	var overImgs = new Array();
	var outImgs = new Array();

// function preloads images for main menu rollovers

	function LoadMenu () {
		var n;
		
		if ( document.images ) {
			for ( n = 0; n < options.length; n++ ) {
				option_name = options[n];
				overImgs[option_name] = new Image(); overImgs[option_name].src = imgPath + option_name + "-on.gif";
				outImgs[option_name] = new Image(); outImgs[option_name].src = imgPath + option_name + "-off.gif";
			}
			menuflag = 1;
		}
	}

// function to show default menu button image

	function ShowOut ( id ) {
		if ( document.images ) {
			if ( menuflag ) {
				document.images[id].src = outImgs[id].src;
			}
		}
	}

// function to display menu button mouseover image

	function ShowOver ( id ) {
		if ( document.images ) {
			if ( menuflag ) {
				document.images[id].src = overImgs[id].src;
			}
		}
	}
