// Check UserInfo Validation 

function CheckLoginInfo(frm)
{

 if(frm.mEmail.value==0)
	{
	alert("Please Enter Email id");
	frm.mEmail.focus();
	return false;
	}
else if (((frm.mEmail.value.length < 3) || !isEmailAddr(frm.mEmail.value)) )
	{
	alert("Please enter a complete email address in the form: yourname@yourdomain.com");
	frm.mEmail.focus();
	frm.mEmail.select();
	return false;
	}
else if(frm.mPassword.value==0)
	{
	alert("Please Enter Password");
	frm.mPassword.focus();
	return false;
	}
else
	{
	return true;
	}

}
//-------------------------------------------------------------------------------------------------

function isEmailAddr(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}
//-------------------------------------------------------------------------------------------------
function CheckExit(frm)
{

 if(frm.mEmail.value==0)
	{
	alert("Please Enter Email id");
	frm.mEmail.focus();
	return false;
	}
else if (((frm.mEmail.value.length < 3) || !isEmailAddr(frm.mEmail.value)) )
	{
	alert("Please enter a complete email address in the form: yourname@yourdomain.com");
	frm.mEmail.focus();
	frm.mEmail.select();
	return false;
	}
else if(frm.mPassword.value==0)
	{
	alert("Please Enter Password");
	frm.mPassword.focus();
	return false;
	}
else if(frm.mCpassword.value==0)
	{
	alert("Please Enter Confirm Password");
	frm.mCpassword.focus();
	return false;
	}
else if(frm.mCpassword.value!=frm.mPassword.value)
	{
	alert("Password is not equal to Confirm Password");
	frm.mCpassword.focus();
	return false;
	}
else

	{
	return true;
	}

}
//-------------------------------------------------------------------------------------------------
