// JavaScript Document

/* preloadImages
 * preload images based on a given image's src. the prototype is:
 *		preloadImages( elementID, image1, image2, image3, ... )
 * where each image is found in the same path as the src attribute for the image element with the given elementID
 */
function preloadImages()
{
	var args = preloadImages.arguments;
	var theElem = args[0];
	var elem = document.getElementById(theElem);
	var path = elem.src;
	path = path.replace(/[^\/]+\.(jpg|gif|png)$/,'');	// peel off the trailing filename, e.g., filename.gif or filename.jpg

	var len = args.length-1;
	var imageArray = new Array(len);
	for(var i=0; i<len; i++)
	{
		imageArray[i] = new Image;
		imageArray[i].src = path+args[i+1];
	}	
}


<!--
 // POPSTYLE - change next two variables based on which pop style you
 //            need. Set true/false (default) for pop-right. Set 
 //            true/true for pop-up-right (when at bottom). Set
 //            false/false for pop-down.
 var pop_right = true;		// true if pop-right vs. pop-down
 var pop_up = false;		// true for pop-up-right (set pop_right too)
 function pop_noma(event, show) {
   var divi = document.getElementById("noma");
   var divm = document.getElementById("noma_menu");
   var divl = document.getElementById("noma_img");
   // next section needs to be more complex to work ideally with
   // FF and IE (and Opera and Mac IE). We have to check onmouseout
   // events to see if really out of the bounding box of the logo and
   // menu. 
   if (show) {
     var ileft = divi.offsetLeft; var itop = divi.offsetTop;
     if (pop_right) {
       ileft += divl.offsetWidth - 10;
       if (pop_up) itop -= divl.offsetHeight; else itop += 10;
     }
     else { ileft += 10; itop += divl.offsetHeight - 20; }
     divm.style.left = ileft + "px";
     divm.style.top = itop + "px";
     divm.className = 'showit';
   } else {
     var par = divi.offsetParent;
     var left = divm.offsetLeft;
     var top = divm.offsetTop;
     if (par) { left += par.offsetLeft; top += par.offsetTop; }
     var right = left+divm.offsetWidth; var bott = top+divm.offsetHeight;
     var evx = event.clientX; var evy = event.clientY;
     if (document.documentElement && document.documentElement.scrollTop)
       evy += document.documentElement.scrollTop; // IE6 workaround
     else 
       evy += document.body.scrollTop; 	// page is scrolled
     if (evx < left+2 || evy <= top+2 || evx >= right || evy >= bott)
     {
       left = divi.offsetLeft + par.offsetLeft; top = divi.offsetTop + par.offsetTop;
       right = left + divl.offsetWidth; bott = top + divl.offsetHeight;
       if (evx < left+2 || evx >= right || evy < top+2 || evy >= bott)
	 divm.className = 'hidden';	// only if out of box
     }
   }
 }
// -->

<!-- INSERT end of insert of script section -->

