
var isNav, isIE;
var appV = navigator.appVersion;
var textView = "norm";
var coll = "";
var styleObj = "";
var visible = "";
var hidden = "";
var undef = "undefined";

var context = "";


if (parseInt(appV)>=4){
	if(navigator.appName == "Netscape" && parseInt(navigator.appVersion)!=6) {
		isNav = true;
		visible='show';
  	    hidden='hide';
		textView = "norm";
	} else {
		isIE = true;
		coll ="all.";
		styleObj = ".style";
		visible = 'visible';
	    hidden='hidden';
	}
}
function goSearch(){
if(document.search.keyword.value.length==0){
   return false;
} else {
   return true;
}
}
function goHome(){
    self.location = context+"/Web/index.jsp";
}

function sendPassword(){
	var frmObj = eval("document." + coll + "pwordForm");
	// When you send to a servlet elements which are disabled are not sent
	// with the request
	var pWord = frmObj.pWord.value;
	var confPWord = frmObj.confPWord.value;
	if(pWord.length==0 || confPWord.length==0){
		alert("You must enter a value in both the password field and the confirmation password field.\nPlease try again.");
	}else if(pWord!=confPWord){
		alert("The value given for the password and confirmation password do not match.\nPlease try again.");
	}else{
		frmObj.uName.disabled = false;
		frmObj.submit();
	}
}


function changeView(view){
  var frmObj = eval("document."+coll+"changeView");
  if(view=="pict"){
    frmObj.pict.value = "yes";
  }else{
  	frmObj.pict.value = "no";
  }
  frmObj.submit();
}

function passwordNotOkay(){
	alert("The Username and/or Password given are incorrect.");
}

function popUp(){
var win = document.getElementById("popup");
win.style.visibility = visible;
}
function closeWin(){
var win = document.getElementById("popup");
win.style.visibility = hidden;
}
