
function uf_validate(dfrm)
{
	if (dfrm.txt_code.value.trim_val()=='')
	{
		alert('Please enter your Company Account Code.');
		dfrm.txt_code.focus();
		return false;
	}
	if (dfrm.txt_pwd.value.trim_val()=='')
	{
		alert('Please enter your Company Account Password.');
		dfrm.txt_pwd.focus();
		return false;
	}
	dfrm.hf_pass.value = dfrm.txt_pwd.value;
	//alert (dfrm.hf_pass.value);
	return true;
}


String.prototype.trim_val = function()    // trims white space off both ends of this string
{
	var ar;
	return( (ar=/^\s*([\s\S]*\S+)\s*$/.exec(this)) ? ar[1] : "" );
}


