//Reloads the window on resize if the user is using Netscape 4
function NetscapeReload(nav) {  
  if (nav == true) with (navigator) {
  	if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
    		document.pageWidth = innerWidth; 
    		document.pageHieght = innerHeight; 
    		onresize = NetscapeReload; 
    	}
   }
  else if (innerWidth != document.pageWidth || innerHeight != document.pageHieght) location.reload();
}
NetscapeReload(true);

//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

//Search form check
function CheckSearchForm () {
	var errorMsg = "";
	if (document.siteSearch.search.value==""){
		errorMsg += "\n\tSearch \t- Please enter at least one word to search for";
	}
	if (errorMsg != ""){
		msg = "____________________________________________________________________\n\n";
		msg += "Your Search of PALATIKA has failed because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "____________________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}	
	return true;
}

//Navigation rollover
function NavIn(menItem) {
	menItem.style.borderColor='#999999'; 
	menItem.style.backgroundColor='';
}

function NavOut(menItem) {
	menItem.style.borderColor='#e1e1e1'; 
	menItem.style.backgroundColor='#F8F8F8';
}

function NavCat(menItem) {
	menItem.style.borderColor='#FFFFFF'; 
	menItem.style.backgroundColor='#FFFFFF';
}