function viewphoto(img, width, height){
	newwindow = window.open(img, "image", "width="+(width+20)+", height="+(height+20));
	if(newwindow == null){
		alert("A popup blocker may be preventing you to view this image.  Try disabling your popup blocker to view this image.");
	}
}

	var closetimer = 0;
	var	menuitem = 0;

	function nav_open(){  
		nav_canceltimer();
	   nav_close();
	   menuitem = $(this).find('ul').css('visibility', 'visible');
	}

	function nav_close(){  if(menuitem) menuitem.css('visibility', 'hidden'); }

	function nav_timer(){  closetimer = window.setTimeout(nav_close, 500); }

	function nav_canceltimer(){  
		if(closetimer){  
			window.clearTimeout(closetimer);
			closetimer = null;
		}
	}

	$(document).ready(function(){
		$('#nav > li').bind('mouseover', nav_open);
		$('#nav > li').bind('mouseout',  nav_timer);
	});

	document.onclick = nav_close;