function checkName(field, rules, i, options){
	
  if (field.val() == "" || field.val() == "Nombre") {
	 // this allows the use of i18 for the error msgs
	 return options.allrules.customText.alertText; 
  }
}

function checkLastname(field, rules, i, options){
	
  if (field.val() == "" || field.val() == "Apellido") {
	 // this allows the use of i18 for the error msgs
	 return options.allrules.customText.alertText; 
  }
}

function checkPhone(field, rules, i, options){
	
  if (field.val() == "" || field.val() == "Teléfono" || (field.val().charAt(0) != "6" && field.val().charAt(0) != "9")){
	 // this allows the use of i18 for the error msgs
	 return options.allrules.customText.alertText; 
  }
}

function validateForm()
{	
	if($("#fsubscribe").validationEngine('validate'))
	{
		// prepare Options Object
		var options = {
			url:        'ajax/subscribe.php',
			success:    function() {
				$("#div_newsletter").hide();
				$("#success").show();
				
			}
		};
		$('#fsubscribe').ajaxSubmit(options);	
	}
}

