function check_fields()
{

	if (emptyField(document.getElementById("txtUser")))
	{
		alert("Enter your Email Address");
		document.getElementById("txtUser").focus();
		return false;
	}
	
	arg=document.getElementById("txtUser").value;
	flag=check_email(arg);
	if (flag==0)
	{
		alert('Enter valid e-mail address.');
		document.getElementById("txtUser").focus();
		return false;	
	}
	if (emptyField(document.getElementById("txtPassword")))
	{
		alert("Enter Password");
		document.getElementById("txtPassword").focus();
		return false;
	}
}
function login_fields()
{
 var flag;
 if (emptyField(document.getElementById("txtEmail")))
 {
 alert("Enter your Email Address.");
 document.getElementById("txtEmail").focus();
 return false;
 }
 arg=document.getElementById("txtEmail").value;
 flag=check_email(arg);
 if (flag==0)
 {
 alert('Enter valid e-mail address.');
 document.getElementById("txtEmail").focus();
 return false;	
 }
 if (emptyField(document.getElementById("txtPwd")))
 {
 alert("Enter your Password.");
 document.getElementById("txtPwd").focus();
 return false;
 }
}
