var whitespace=" \t\n\r";function isEmpty(s)
{return((s==null)||(s.length==0))||(jQuery.trim(s)=="");}
function trimSpace(s){if(typeof String.prototype.trim!=='function'){String.prototype.trim=function(){return s.replace(/^\s+|\s+$/g,'');};}}
function isWhitespace(s)
{if(isEmpty(s))return true;}
function isEmail(s)
{var reg=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;if(reg.test(s)==false){return false;}else
return true;}
function isValidPhoneNo(str)
{var phone2=/^[\+\-\s\(\)0-9]+$/;if(str.match(phone2)){return true;}else{return false;}}
function ForceEntry(objField)
{var strField=new String(objField.value);if(isWhitespace(strField)){objField.focus();objField.select();return false;}
return true;}
function isNumber(objField)
{var strField=new String(objField.value);if(isWhitespace(strField))return false;var i=0;for(i=0;i<strField.length;i++)
if(strField.charAt(i)<'0'||strField.charAt(i)>'9'){return false;}
return true;}
function ForceLength(objField,nLength,strWarning)
{var strField=new String(objField.value);if(strField.length>nLength){alert(strWarning);return false;}else
return true;}
function ismaxlength(obj){var mlength=obj.getAttribute?parseInt(obj.getAttribute("maxlength")):""
if(obj.getAttribute&&obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)}
function submitLoginForm(action){document.login_form.action=action;document.login_form.submit();}
function disablePriorDates(date){var today=new Date();return date.getTime()<today.getTime()-86400;}
