var imgNames = new Array()
var imgSRC = new Array() // array of "on" images

function preloadImages() {
	
	imgNames[0] = "animal_adoption"
	imgSRC[0] = new Image()
	imgSRC[0].src = "images/nav_animal_adoption-on.gif"
	imgNames[1] = "portfolio"
	imgSRC[1] = new Image()
	imgSRC[1].src = "images/nav_portfolio-on.gif"
	imgNames[2] = "about"
	imgSRC[2] = new Image()
	imgSRC[2].src = "images/nav_about-on.gif"
	imgNames[3] = "news"
	imgSRC[3] = new Image()
	imgSRC[3].src = "images/nav_news-on.gif"
	imgNames[4] = "contact"
	imgSRC[4] = new Image()
	imgSRC[4].src = "images/nav_contact-on.gif"
	imgNames[5] = "legal"
	imgSRC[5] = new Image()
	imgSRC[5].src = "images/nav_legal-on.gif"
	imgNames[6] = "sitemap"
	imgSRC[6] = new Image()
	imgSRC[6].src = "images/nav_sitemap-on.gif"

}

preloadImages()

function imageOn(whichImage) {
	for (var x=0; x<imgNames.length; x++) {
		if (whichImage == imgNames[x]) {
			document.images[whichImage].src = imgSRC[x].src
		}
	}
}


function imageOff(whichImg) {
	document.images[whichImg].src = "images/nav_" + whichImg + "-off.gif"
}


function linkWindow(theURL) {
	var theWindow = window.open("http://" + theURL,"otherSite","width=600,height=400,resizable=yes,scrollbars=yes,toolbar=yes,status=yes,menubar=yes,location=yes")
	theWindow.focus() // this line just brings the window to the front if it's already been opened
}



