var menuTime;
var menuTime2;
//var ncCount = 0;
function navOpen() {
	document.getElementById('nav').style.visibility = 'visible';
	document.getElementById('navTable').style.visibility = 'visible';
	clearTimeout(menuTime);
	clearTimeout(menuTime2);
}
function navClose() {
	menuTime = setTimeout("document.getElementById('nav').style.visibility = 'hidden'",500);
	menuTime2 = setTimeout("document.getElementById('navTable').style.visibility = 'hidden'",500);
	//ncCount++;
	//document.getElementById('debug').innerHTML = ncCount;
}
function nOver(obj) {
	obj.style.backgroundColor = '#666666';
	obj.style.color = '#FFFFFF';
	obj.style.cursor = 'pointer';
	window.status = obj.innerHTML;
}
function nOut(obj) {
	obj.style.backgroundColor = 'transparent';
	obj.style.color = '#333333';
	obj.style.cursor = 'auto';
	window.status = '';
}
function resizeContent() {
	var cHeight = document.getElementById('content').offsetHeight;
	document.getElementById('contentBg').style.height = cHeight;
	document.getElementById('clearance').style.top = cHeight;
	//document.getElementById('debug').innerHTML = cHeight;
}
function iOver(obj,col,txt) {
	obj.style.backgroundColor = '#DDDDDD';
	obj.style.borderColor = col;
	obj.style.cursor = 'pointer';
	window.status = txt;
}
function iOut(obj,col) {
	obj.style.backgroundColor = '';
	obj.style.borderColor = col;
	obj.style.cursor = 'auto';
	window.status = '';
}
function sGoto(URL) {
	window.location.href = URL;
}
function popup(URL,win,width,height) {
	winLeft = (screen.width / 2) - (width / 2);
	winTop	= (screen.height / 2) - (height / 2);
	var pUp = window.open(URL, win, 'menubar=no,scrollbars=yes,width='+ width +',height='+ height +',left='+ winLeft +',top='+ winTop);
	pUp.focus();
}
function viewImage(img) {
	var URL = 'viewImage.php?image='+ img;
	var pUp = window.open(URL,'imgWin','menubar=no,scrollbars=no,width=200,height=100,left=20,top=20');
	pUp.focus();
}
function unhideClose() {
	document.getElementById('close').style.visibility = 'visible';
}