// PopupWindow

function popupWindow(whatURL) {
	popupWindow1=window.open(whatURL,"popupWindow2");
}

// Generic rollover functions

function overImage(imgName) {
	if (document.images) {
		imgOn = eval(imgName + "on.src");
		document [imgName].src = imgOn;	
	}
}

function offImage(imgName) {
	if (document.images) {
		imgOff = eval(imgName + "off.src");
		document [imgName].src = imgOff;	
	}
}

function loadImages() {
	loginon = new Image();
	loginon.src = "/images/login1.gif";
	loginoff = new Image();
	loginoff.src = "/images/login0.gif";
	logouton = new Image();
	logouton.src = "/images/logout1.gif";
	logoutoff = new Image();
	logoutoff.src = "/images/logout0.gif";
	photoson = new Image();
	photoson.src = "/images/photos1.gif";
	photosoff = new Image();
	photosoff.src = "/images/photos0.gif";
	mapson = new Image();
	mapson.src = "/images/maps1.gif";
	mapsoff = new Image();
	mapsoff.src = "/images/maps0.gif";
	essayson = new Image();
	essayson.src = "/images/essays1.gif";
	essaysoff = new Image();
	essaysoff.src = "/images/essays0.gif";
	submiton = new Image();
	submiton.src = "/images/submit1.gif";
	submitoff = new Image();
	submitoff.src = "/images/submit0.gif";
	aboutuson = new Image();
	aboutuson.src = "/images/aboutus1.gif";
	aboutusoff = new Image();
	aboutusoff.src = "/images/aboutus0.gif";
	contactuson = new Image();
	contactuson.src = "/images/contactus1.gif";
	contactusoff = new Image();
	contactusoff.src = "/images/contactus0.gif";
	resourceson = new Image();
	resourceson.src = "/images/resources1.gif";
	resourcesoff = new Image();
	resourcesoff.src = "/images/resources0.gif";
	phototipson = new Image();
	phototipson.src = "/images/phototips1.gif";
	phototipsoff = new Image();
	phototipsoff.src = "/images/phototips0.gif";
	arthropodson = new Image();
	arthropodson.src = "/images/arthropods1.jpg";
	arthropodsoff = new Image();
	arthropodsoff.src = "/images/arthropods0.jpg";
	birdson = new Image();
	birdson.src = "/images/birds1.jpg";
	birdsoff = new Image();
	birdsoff.src = "/images/birds0.jpg";
	mammalson = new Image();
	mammalson.src = "/images/mammals1.jpg";
	mammalsoff = new Image();
	mammalsoff.src = "/images/mammals0.jpg";
	fishon = new Image();
	fishon.src = "/images/fish1.jpg";
	fishoff = new Image();
	fishoff.src = "/images/fish0.jpg";
	peopleon = new Image();
	peopleon.src = "/images/people1.jpg";
	peopleoff = new Image();
	peopleoff.src = "/images/people0.jpg";
	plantson = new Image();
	plantson.src = "/images/plants1.jpg";
	plantsoff = new Image();
	plantsoff.src = "/images/plants0.jpg";
	reptileson = new Image();
	reptileson.src = "/images/reptiles1.jpg";
	reptilesoff = new Image();
	reptilesoff.src = "/images/reptiles0.jpg";
	weatheron = new Image();
	weatheron.src = "/images/weather1.jpg";
	weatheroff = new Image();
	weatheroff.src = "/images/weather0.jpg";
}

if (document.images) {
	loadImages();
}

// Returns a handle to the named layer.

function getLayer(name) {

	if (document.layers) {
		return(document.layers[name]);
	}
	else {
		layer = document.getElementById(name);
		if (layer) {
			return(layer);
		} else {
			return(null);
		}
	}
}

// Hides the named layer

function hideLayer(name) {

	var layer = getLayer(name);

	if (layer.style) {
		layer.style.visibility="hidden";	
	} else {
		layer.visibility="hide";
	}

}

// Shows the named layer

function showLayer(name) {

	var layer = getLayer(name);

	if (layer.style) {
		layer.style.visibility="visible";	
	} else {
		layer.visibility="show";
	}

}
