function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-------------------------------------------
// From Suckerfish Dropdowns:
// http://www.alistapart.com/articles/dropdowns
// http://www.htmldog.com/articles/suckerfish/
//
// modified to call hilite and display directly
//-------------------------------------------

function sfHover() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI")
	for (var i =0 ; i < sfEls.length; i++) {
		sfEls[i].onmouseover = function() {
			hiliteImage(this.id + "Btn")
			this.style.backgroundColor = "#FFFFFF"
			if (this.children[1]) {
				this.children[1].style.display = "block"
			}
		}
		
		sfEls[i].onmouseout=function() {
			if (this.id != thisPageName) {
				this.style.backgroundColor = "#F6F2E1"
				restoreImage(this.id + "Btn")
			}
			if (this.children[1]) {
				this.children[1].style.display = "none"
			}
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

// ------------ end Suckerfish --------------

function restoreImage(imgName) {
	var img
	if ((img = document.getElementById(imgName)) != null) {
		var imgSource = img.src
		var imgPath = imgSource.substring(0, imgSource.lastIndexOf("/") + 1)
		if (imgSource.indexOf("_RO") != -1) {
			var restoreImg = imgSource.substring(imgSource.lastIndexOf("/") + 1, imgSource.length - 7) + ".gif"
		} else {
			var restoreImg = imgSource.substring(imgSource.lastIndexOf("/") + 1)		
		}
		img.src = imgPath + restoreImg
	}
}

function hiliteImage(imgName) {
	var img
	if ((img = document.getElementById(imgName)) != null) {
		var imgSource = img.src
		var imgPath = imgSource.substring(0, imgSource.lastIndexOf("/") + 1)
		if (imgSource.indexOf("_RO") < 0) {
			var swapImg = imgSource.substring(imgSource.lastIndexOf("/") + 1, imgSource.length - 4) + "_RO.gif"
		} else {
			var swapImg = imgSource.substring(imgSource.lastIndexOf("/") + 1)
		}
		img.src = imgPath + swapImg
	}
}
