$(document).ready(function(){
 $('#partnerfrm').submit(function(){
//slection type
if($('#affiliate_type').val()=='select')
{
alert("Please Select Registration Type!");
$('#affiliate_type').focus();
return false;
}
//email
if($('#email').val().length<8)
{
alert("Please Enter Email! (Registered with 2tion.com)");
$('#email').focus();
return false;
}
//email 2
if($('#email').val().indexOf("@")==-1)
{
alert("Please Enter Valid Email! (Registered with 2tion.com)");
$('#email').focus();
return false;
}
//email 3
if($('#email').val().indexOf(".")==-1)
{
alert("Please Enter Valid Email! (Registered with 2tion.com)");
$('#email').focus();
return false;
}

//password
if($('#password').val().length<6)
{
alert("Please Enter Password! (must be atleast 6 characters)");
$('#password').focus();
return false;
}
//cpassword
if($('#cpassword').val()!=$('#password').val())
{
alert("Passwords doesn't match! (must be the same as password)");
$('#cpassword').focus();
return false;
}
//payee name
if($('#payee_name').val().length<3)
{
alert("Please Enter Correct Payee Name! (You can't change it)");
$('#payee_name').focus();
return false;
}
//address
if($('#address').val().length<10)
{
alert("Please Enter Correct Postal Address!");
$('#address').focus();
return false;
}

//city
if($('#city').val().length<3)
{
alert("Please Enter Full City Name!");
$('#city').focus();
return false;
}


//state
if($('#state').val().length<3)
{
alert("Please Enter Full State Name!");
$('#state').focus();
return false;
}
//country
if($('#country').val().length<3)
{
alert("Please Enter Your Country Name!");
$('#country').focus();
return false;
}
//zipcode
if($('#zipcode').val().length<5 || isNaN($('#zipcode').val()))
{
alert("Please Enter Valid Zip Code! (Only Numbers Allowed)");
$('#zipcode').focus();
return false;
}
//phone
if($('#phone').val().length<5 || isNaN($('#zipcode').val()))
{
alert("Please Enter Valid Phone No! (Only Numbers Allowed)");
$('#phone').focus();
return false;
}
//mobile
if($('#mobile').val().length>0)
{
if($('#mobile').val().length<10 || isNaN($('#zipcode').val()))
{
alert("Please Enter Valid Mobile No! (Only Numbers Allowed)");
$('#mobile').focus();
return false;
}
}

});
	
});