function hide(el) {
	document.getElementById(el).style.visibility='hidden';
	document.getElementById(el).style.display='none';
}

function show(el) {
	document.getElementById(el).style.visibility='visible';
	document.getElementById(el).style.display='';
}

function highlight(el) {
	for(x=0;x<15;x++) {

		if (document.getElementById("row"+x)) { document.getElementById("row"+x).className = ''; }
	}

	if (document.getElementById(el)) { document.getElementById(el).className = 'highlight'; }
}

function popUp(URL, width, height) {
	day = new Date();
	id = day.getTime();
	left2 = (screen.width - width) /2;
	top2 = (screen.height - height) /2;
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left ='+left2+',top ='+top2);");
}

function changeClassName(el, cname) {
	document.getElementById(el).className = cname;
}

function doNav(theUrl) {
	document.location.href = theUrl;
}

function changeTab(theTab) {
	if (document.getElementById('tab1')) { document.getElementById('tab1').className = ''; }
	if (document.getElementById('tab2')) { document.getElementById('tab2').className = ''; }
	if (document.getElementById('tab3')) { document.getElementById('tab3').className = ''; }
	if (document.getElementById('tab4')) { document.getElementById('tab4').className = ''; }
	if (document.getElementById('tab5')) { document.getElementById('tab5').className = ''; }
	if (document.getElementById(theTab)) { document.getElementById(theTab).className = 'ui-tabs-selected'; }

	if (document.getElementById('tab1content')) { hide('tab1content'); }
	if (document.getElementById('tab2content')) { hide('tab2content'); }
	if (document.getElementById('tab3content')) { hide('tab3content'); }
	if (document.getElementById('tab4content')) { hide('tab4content'); }
	if (document.getElementById('tab5content')) { hide('tab5content'); }
	if (document.getElementById(theTab+'content')) { show(theTab+'content'); }
	
	return false;
}