function checkLogin(frm)
{
	with(frm)
	{
		if(!checkValidNull(vEmail,"Please Enter Email"))
			return false;
		if(!isValidEmail(vEmail.value))
			return false;
		if(!checkValidNull(vPassword,"Please Enter Password"))
			return false;
	}
}
function log_out()
{
	ht = document.getElementsByTagName("html");
	ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
	if (confirm('Are you sure you want to log out?'))
	{
		return true;
	}
	else
	{
		ht[0].style.filter = "";
		return false;
	}
}
function checkLoginMember(frm)
{
	with(frm)
	{
		if(!checkValidNull(vEmail,"Please Enter Email"))
			return false;
		if(!isValidEmail(vEmail.value))
			return false;
		if(!checkValidNull(vPassword,"Please Enter Password"))
			return false;
		if(typeof(Remember)!="undefined"){
			if(Remember.checked==true)
				Remember.value="Yes";
			else
				Remember.value="No";
		}
		//frm.submit();
	}
}
function ForgetPassword(frm) /* FOR CUSTOMER DETAIL */
{
	with (frm)
	{
		if(!checkValidNull(vEmail,"Please Enter Email"))
			return false;
		if(!isValidEmail(vEmail.value))
			return false;
		//frm.submit();
	}
}
function checkforget(frm)
{
	with (frm)
	{
		if(!checkValidNull(vEmail,"Please Enter Email"))
			return false;
		if(!isValidEmail(vEmail.value))
			return false;
		//frm.submit();
	}
	frm.submit();
}
function checkValid_login(frm)
{
	with(frm)
	{
		if(!checkValidNull(vFirstName,"Please Enter First Name"))
			return false;
		if(!checkValidNull(vLastName,"Please Enter Last Name"))
			return false;
		if(!checkValidNull(vEmail,"Please Enter Email"))
			return false;
		if(!isValidEmail(vEmail.value))	
		{
			vEmail.focus();
			return false;
		}
		if(!checkValidNull(vPassword,"Please Enter Password"))
			return false;
		if(!checkValidLength(vPassword,6,"Password has minimum Six charactesrs"))
			return false;
		if(vPassword.value!=vPassword1.value)
		{	
			alert("Confirm Password does not match with Your Password");
			vPassword1.value='';
			vPassword1.focus();
			return false;
		}
		
		if(!checkValidNull(vPhone,"Please Enter Phone No."))
			return false;
		if(!checkValidPhoneFormate(vPhone,"Please Enter Valid Phone No."))
			return false;
		if(!checkValidPhoneFormate(vMobile,"Please Enter Valid Mobile No."))
			return false;
		if(!checkValidPhoneFormate(vFax,"Please Enter Valid Fax No."))
			return false;
		
		if(!checkValidNull(vFirstName_2,"Please Enter First Name"))
			return false;
		if(!checkValidNull(vLastName_2,"Please Enter Last Name"))
			return false;
		if(!checkValidNull(vAddress1,"Please Enter Address"))
			return false;
		if(!checkValidNull(vCity,"Please Enter City"))
			return false;
		if(!checkValidNull(vCountry,"Please Select Country Name"))
			return false;
		if(!checkValidNull(vState,"Please Select State Name"))
			return false;
		if(!checkValidNull(vPinCode,"Please Enter Zip Code"))
			return false;
		//if(!checkValidNumber(vPinCode,"Please Enter Valid Zip Code"))
			//return false;
		if(!checkValidNull(vPhone_2,"Please Enter Phone No."))
			return false;
		if(!checkValidPhoneFormate(vPhone_2,"Please Enter Valid Phone No."))
			return false;
		mode.value='AddCustomer';
		return true;
	}
	//frm.submit();
}
	
function checklogin(frm)
{
	with(frm)
	{
		if(!checkValidNull(vEmail,"Please Enter Email"))
			return false;
		if(!isValidEmail(vEmail.value))
			return false;
		if(frm.login[0].checked)
		{
			window.location='index.php?file=m-mya_register&vEmail='+vEmail.value;
			return false;
		}
		if(frm.login[1].checked)
		{
			if(!checkValidNull(vPassword,"Please Enter Password"))
				return false;
		}
	}
	frm.submit();
}
