// Login Validator in JavaScript
// Author 	:	by palPalani, Web Designer
// file name:	utility.js; Created Date : 12102005
// Use 		:	onkeypress="return entsub(event, this.form)"
// Browsers :	Independent

//call function based on browsers
function entsub(event, ourform) {
	if (mB.isIE) { if (window.event && window.event.keyCode == 13) kpV(ourform);
	} else { if (event && event.which == 13) kpV(ourform);}
	return true;
}

function kpV(f) {
	var retVal=true;
	var fu=f.fuserid;
	var fp=f.fpassword;
	if (fu.value == "" && fp.value == "") {cS(fu); cS(fp); fu.focus();	retVal=false;}
	else if (fu.value == "") {cS(fu);	fu.focus();	retVal=false;}
	else if (fp.value == "") {cS(fp);	fp.focus();	retVal=false;}
	if(retVal){f.submit();}
	return;
}
function cS(fd){ fd.style.background="none"; fd.style.backgroundColor="#FFB895";}
function newForm(frm, id) { frm.action="index.asp"; frm.abtGlobeInfo.value=id; frm.submit();}