if (navigator.appName == "Netscape")
{
	window.captureEvents(Event.KEYPRESS)
	window.onKeyPress = checkIt;
}

function submitLogin(){
if (document.forms["login"].userID.value=="") {
    alert("Please enter a valid User Name");
    document.forms["login"].userID.focus();
    //return false;
    }
else if (document.forms["login"].password.value=="") {
    alert("Please enter a valid Password");
    document.forms["login"].password.focus();
    //return false;
    }	
else{
	document.forms["login"].submit();
	return true;
	}
}

function submitNewsletter(){
if (document.forms["newsletter"].nlEmail.value.indexOf('@',0)==-1 ||
    document.forms["newsletter"].nlEmail.value.indexOf('@',0)== 0 ||
    document.forms["newsletter"].nlEmail.value.indexOf('.',0)==-1) {
    alert("Please enter a valid E-mail");
    document.forms["newsletter"].nlEmail.focus();
    //return false;
    }
else{
	document.forms["newsletter"].submit();
	return true;
}
//return true;
}

function checkIt(e)
{ 
  var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
  status = charCode;
  if (charCode == 13)
  {
    checkFields();
  }
  return true;
} 

function checkIt2(e)
{ 
  var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
  status = charCode;
  if (charCode == 13)
  {
    submitLogin();
  }
  return true;
}

function checkIt3(e)
{ 
  var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
  status = charCode;
  if (charCode == 13)
  {
    submitNewsletter();
	return false;
  }
  return true;
} 
function checkItSearch(e)
{ 
  var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
  status = charCode;
  if (charCode == 13)
  {
    CheckForm();
	return false;
  }
  return true;
} 
function checkItSearch2(e)
{ 
  var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
  status = charCode;
  if (charCode == 13)
  {
    CheckForm2();
	return false;
  }
  return true;
} 

function swapImg(name, ON_OFF, path, stat_txt){
	var suff = ""
	var type = ".gif";
		suff = ON_OFF ? "_h" : "";
	document.images[name].src = path + name + suff + type;
	window.status = stat_txt;
}


function NewWindow(mypage,myname,w,h){
if(navigator.userAgent.indexOf("MSIE")==-1)
{
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=yes'+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	win.focus();
}
else
{
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=yes'+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	win.focus();
}
}

function NewWindowPdf(mypage,myname){
w=600
h=500
if(navigator.userAgent.indexOf("MSIE")==-1)
{
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=yes'+',';
	settings +='resizable=yes';
	win=window.open(mypage,myname,settings);
	win.focus();

}
else
{
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=auto'+',';
	settings +='resizable=yes';
	win=window.open(mypage,myname,settings);
	win.focus();
}
}

function NewWindowDisc(mypage,myname){
if(navigator.userAgent.indexOf("MSIE")==-1)
{
w=480;
h=283;
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=no'+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	win.focus();

}
else
w=480;
h=304;
{
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=no'+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	win.focus();
}
}

function NewWindowPU(mypage,myname,h){
if(navigator.userAgent.indexOf("MSIE")==-1)
{
w=480;
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=no'+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	win.focus();

}
else
w=480;
{
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=no'+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	win.focus();
}
}

 function makeRemote(areaName,sectionName) {
    //alert(areaName);
	//alert(areaName);
	opener.location="../"+areaName+"/"+sectionName;
    }
	
	



function CheckForm2 () {

	//Check for a word to search
	//if (document.frmSiteSearch.search.value==""){
	//	alert("Please enter at least one keyword to search");
		//document.frmSiteSearch.search.focus();
	//	return false;
	//}
	var winl =(screen.width)?(screen.width-625)/2:100;
	var wint =(screen.height)?(screen.height-400)/2:100;
	var settings ='height='+400+',';
	settings +='width='+625+',';
	settings +='height='+400+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=yes'+',';
	settings +='resizable=no';
	win=window.open("../common/searchResults.asp?search="+document.forms["frmSiteSearch"].search.value+"&mode=allwords",'siteSearch',settings);
	win.focus();
	//document.forms["frmSiteSearch"].submit();
	//return true
}

function CheckFormHome () {
	//Check for a word to search
	//if (document.frmSiteSearch.search.value==""){
	//	alert("Please enter at least one keyword to search");
		//document.frmSiteSearch.search.focus();
	//	return false;
	//}
	var winl =(screen.width)?(screen.width-625)/2:100;
	var wint =(screen.height)?(screen.height-400)/2:100;
	var settings ='height='+400+',';
	settings +='width='+625+',';
	settings +='height='+400+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=yes'+',';
	settings +='resizable=no';
	win=window.open("../common/searchResults.asp?search="+document.forms["frmSiteSearch"].search.value+"&mode=allwords",'siteSearch',settings);
	win.focus();
	//document.forms["frmSiteSearch"].submit();
	//return true
}

