/* preCache images for nav icons */

function preCache () {

Image1 = new Image(29,29)
Image1.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav1_on.gif"
Image2 = new Image(29,29)
Image2.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav1_off.gif"
Image3 = new Image(29,29)
Image3.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav2_on.gif"
Image4 = new Image(29,29)
Image4.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav2_off.gif"
Image5 = new Image(29,29)
Image5.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav3_on.gif"
Image6 = new Image(29,29)
Image6.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav3_off.gif"
Image7 = new Image(29,29)
Image7.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav4_on.gif"
Image8 = new Image(29,29)
Image8.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav4_off.gif"
Image9 = new Image(29,29)
Image9.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav5_on.gif"
Image10 = new Image(29,29)
Image10.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav5_off.gif"
Image11 = new Image(29,29)
Image11.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav6_on.gif"
Image12 = new Image(29,29)
Image12.src = "http://universityofcalifornia.edu/copyright/graphicresources/images/nav6_off.gif"



}


/* css rollover menu functions for home page */

/* rollover function*/
	function chgImg(imgField,newImg) {
		if (document.images) {
			document[imgField].src= eval(newImg + ".src")
		}
	}
	
   if (document.layers){
      //Netscape 4 specific code
      pre = 'document.';
      post = '';
   }
   if (document.getElementById){
      //Netscape 6 specific code
      pre = 'document.getElementById("';
      post = '").style';
   }
   if (document.all){
      //IE4+ specific code
      pre = 'document.all.';
      post = '.style';
   }

// set currentLayer to the bottom (default) layer that is visible when menus are closed 
var currentLayer = 'static';

   function showLayer(lyr){
      hideLayer(currentLayer);
      eval(pre + lyr + post).visibility = 'visible';
      currentLayer = lyr;
   }
   function hideLayer(lyr){
      eval(pre + lyr + post).visibility = 'hidden';
   }
   
/* preload images function */   
  	function preloadImages() {
   if (document.images) {
      for (var i = 0; i < preloadImages.arguments.length; i++) {
         (new Image()).src = preloadImages.arguments[i];
      }
   }
}// JavaScript Document
