function isEmpty(fld,mesg)
{
	reg = / /g;
	str = fld.value;
	res = str.replace(reg,""); 
	if(res == "")
	{
		alert(mesg);
		fld.value="";
		fld.focus();
		return false;
	}		
	return true;
}

function isValidEmail(fld,mesg)
{
	bln = false;
	str = fld.value;
	str = str.match(/(\w+)@(.+)\.(\w+)$/);
	if(str!=null)
	{
		if((str[3].length!=2) || (str[3].length!=3))
		{
			bln=true;
		}
	}
	if(!bln)
	{
		alert(mesg)
		fld.select();
		fld.focus();
		return false
	}
	return true;
}
