var timerOn = false;
var timerCount = 500;
var currentMenu;


function menuTimeOut(){
	//used as a backup for removing highlight from menu item
	if (timerOn && currentMenu){
		var modName = currentMenu.className;
		var pos = 0;
		pos = modName.indexOf("over");
		modName=modName.substr(0,pos);
		currentMenu.className=modName;
		currentMenu="";
		timerOn=false;
	}
}	

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace
        (" over", "");
   }
   }
  }
 }
}
//window.onload=startList;
if (window.attachEvent)
window.attachEvent("onload", startList)
else
window.onload=startList;


function keypress(event) {
	var keycode;
	if (window.event) {
		keycode = window.event.keyCode;
	} else {
		if (event) {
			keycode = event.which;
		}
	}

	if (keycode == 13) {
		search();
		return false;
	}
}


function nude() {
	alert("This gallery contains nude photos, if this offends please leave.");
}

