﻿function validateLogin() {
var strPassword = document.login.strPassword.value;
var strTemp = strPassword.lcl_trim();
if( strTemp.length == 0 ){document.login.strPassword.value = "";alert("Password cannot be blank!");document.login.strPassword.focus();}
else{return true;}
return false;	
}
String.prototype.lcl_trim = function() {
	var temp = this.replace( /^(\s)*|(\s)*$/ , ""  );temp = temp.replace( /(\s)+/g        , " " );temp = temp.replace( /\t|\r|\n/g     , ""  );if( temp == " " ) temp = "";
  	return temp;
}
String.prototype.lcl_remove = function( strRegEx ) {
	var temp = this; var regEx = new RegExp( strRegEx, "g" );temp = temp.replace( regEx, "" );
	return temp;
}	
function lcl_isEmail(who) {
	var email=/^[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*@[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*\.([A-Za-z]){2,4}$/i;
	return(email.test(who));
}
