function checkEmail(mod){
	if(mod==1)
		var email=$("#id_ajanlott_email1").val();
	if(mod==2)
		var email=$("#id_ajanlott_email2").val();
	
	
	$.ajax({
		  type: "POST",
		   url: "checkAjanlas.php",
		   data: "email="+email,
		   success: function (msg){
				//alert(msg);
				if(msg=="err1")
					$("#id_ajanlott_email_status"+mod).html("<span style=\"color:FF0000;\">Ezt az e-mail cí­met már ajánlották !</span>");
				else if(msg=="err2")
					$("#id_ajanlott_email_status"+mod).html("<span style=\"color:FF0000;\">Ezzel az e-mail címmel már létezik regisztrált felhasználó !</span>");
				else if(msg=="err1err2")
					$("#id_ajanlott_email_status"+mod).html("<span style=\"color:FF0000;\">Ezt az e-mail címet már ajánlották !</span>");
				else
					$("#id_ajanlott_email_status"+mod).html("");
			}
	  });
}

function checkEmailValid(strEmail) {
	var email = strEmail;
	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(email)) {
		return false;
	}else{
		return true;
	}
}
