<!--
//------------------FORM VALIDATION-----------------
var error_string;
var first_errorObj;
function chk_error(objName,errMsg){
		if(trim_str(objName.value)==''){
			error_string=error_string+errMsg+'\n';
			if(first_errorObj==null)
                {
                  first_errorObj=objName;
                }
			objName.focus();
		}
}


function chk_number(objName,errMsg){
		if(!isNan(objName.value)){
			error_string=error_string+errMsg+'\n';
			if(first_errorObj==null)
                {
                  first_errorObj=objName;
                }
			objName.focus();
		}
}


ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
v6 = (document.getElementById)? true:false

function showlayer(layerid)
  {
  if (ns4) document.layers[layerid].visibility = "show"
  else if (v6) document.getElementById(layerid).style.visibility = "visible";
  else if (ie4) document.all[layerid].style.visibility = "visible"
  }

function hidelayer(layerid)
  {
  if (ns4) document.layers[layerid].visibility = "hide"
  else if (v6) document.getElementById(layerid).style.visibility = "hidden";
  else if (ie4) document.all[layerid].style.visibility = "hidden"
  }
  


//Funtion to trim the variable. Lines 18
function trim_str(variable){
var icount=0;
var var_len=variable.length;
for (icount=0;icount<=var_len;icount++){
if(variable.charAt(0)==' '){
variable=variable.substring(1,variable.length);
}
}
var_len=variable.length;
for (icount=0;icount<=var_len;icount++){
if (variable.charAt(variable.length-1)==' '){
variable=variable.substring(0,variable.length-1);
}
}
return variable;
}
//End of funtion to trim the variable
/*
in html pages use the function below.
function validate_form(frm) {
	error_string='';
    first_errorObj=null;
	chk_error(frm.client_loginid,"Login Id cannot be blank.");
	if (error_string!="")
	{
		alert(error_string);
		first_errorObj.focus();
		return (false);
	}
}
*/
//------------------xxxxxxx-----------------
//-->

