hv=0;
currentTag=0;
ua=navigator.userAgent;
v=navigator.appVersion.substring(0,1);
if((ua.lastIndexOf("MSIE") != -1) && (v != '1') && (v != '2') && (v != '3')){
	document.onmouseover=flip; document.onmouseout=flop; window.setInterval(flipflop,250);
}

function flipflop(){
	if(hv=='underline'){
		hv='none'
	}else{
		hv='underline'
	}
	if(currentTag){
		currentTag.style.textDecoration=hv
	}
}

function flip(){
	src=event.toElement;
	if(src.tagName=="A"){
		currentTag=src;
		hv='none';
		src.style.textDecoration=hv;
	}
}

function flop(){
	src=event.fromElement;
	if(src.tagName=="A"){
		currentTag=0;
		hv='underline';
		src.style.textDecoration=hv;
	}
}

//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 serach for";
	}
	if (errorMsg != ""){
		msg = "____________________________________________________________________\n\n";
		msg += "Your Search of Web Wiz Guide 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;
}
