function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function verifica_form_buscar(form){
	if(form.frm_name.value == ''){
		alert("Escriba Algun caracter para Buscar");
		return false;
	}
	return true;
}

function verifica_form_subscripcion(form){
	em_val = /^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/;
	if(form.email.value == ''){alert("Escriba su E-mail!");return false;}
	if(!em_val.test(form.email.value)){alert("Verifique su E-Mail");return false;}
	return true;
}


function verifica_form_buscar_av(form){
	if(form.frm_nombre.value == '' && form.frm_zona.value == '' && form.frm_tipo.value == '' && form.frm_postal.value == '' && form.frm_precio.value == ''){
		alert("Para realizar una busqueda avanzada por favor inserte algun parametro para su respectiva busqueda.");
		return false;
	}
	return true;
}

function verificar_comentario(form){
	em_val = /^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/;http = /http/g;java = /script/i;http1 = /HTTP/g;
	if(http.test(form.comenta.value)){alert("No se permite Direcciones url,codigo fuente.!)");return false;}
	if(http1.test(form.comenta.value)){alert("No se permite Direcciones url,codigo fuente.!)");return false;}
	if(java.test(form.comenta.value)){alert("No se permite Direcciones url,codigo fuente.!)");return false;}
	if(form.nombre.value == ''){alert("Escriba su nombre!");return false;}
	if(form.email.value == ''){alert("Escriba su E-mail!");return false;}
	if(!em_val.test(form.email.value)){alert("Verifique su E-Mail");return false;}
	if(form.comenta.value == ''){alert("Escriba su comentario!");return false;}
	if(form.codigo_img.value == ''){alert("Escriba su codigo seguridad!");return false;}
	return true;	

}

function verificar_add(form){
	var alerta="Errores:\n";
	if (form.nombre.value == "") {alerta+="-El nombre no puede estar vacio\n";}
	if (form.email.value == "") {alerta+="-El email no puede estar vacio\n";}
	if (form.direccion.value == "") {alerta+="-La direccion no puede estar vacia\n";}
	if (form.zona.value == "") {alerta+="-La Zona/Barrio no puede estar vacio\n";}
	if (form.informacion.value == "") {alerta+="-La informacion no puede estar vacia\n";}
	if (form.contacto_tel.value == "") {alerta+="-El Telefono no puede estar vacio\n";}
	if (form.contacto_nombre.value == "") {alerta+="-La persona de contacto no puede estar vacio\n";}
	if (form.tipo_cocina.value == "") {alerta+="-El tipo de cocina no puede estar vacio\n";}
	if(form.codigo_img.value == ''){alerta+="-El codigo de seguridad no puede estar vacio\n";}
	if (alerta!="Errores:\n"){
		alert(alerta);	
		return false;
	}else{
		return true;
	}	
	
}

function verificar_edit(form){
	var alerta="Errores:\n";
	em_val = /^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/;
	if(form.email.value == ''){alerta+="-El email no puede estar vacio\n";}
	if(!em_val.test(form.email.value)){alerta+="-Verifique su Email\n";}
	if (form.nombre.value == "") {alerta+="-El nombre del responsable no puede estar vacio\n";}
	if (form.comentario.value == "") {alerta+="-El comentario no puede estar vacio\n";}
	if(form.codigo_img.value == ''){alerta+="-El codigo de seguridad no puede estar vacio\n";}
	if (alerta!="Errores:\n"){
		alert(alerta);	
		return false;
	}else{
		return true;
	}	
	
}

function verificar_env_critica(form){
	var alerta="Errores:\n";
	em_val = /^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/;
	if(form.email.value == ''){alerta+="-El email no puede estar vacio\n";}
	if(!em_val.test(form.email.value)){alerta+="-Verifique su Email\n";}
	if (form.restaurante.value == "") {alerta+="-El nombre del Restaurante no puede estar vacio\n";}
	if (form.nombre.value == "") {alerta+="-El nombre del Responsable no puede estar vacio\n";}
	if (form.telefono.value == "") {alerta+="-El numero del Telefono no puede estar vacio\n";}
	if(form.codigo_img.value == ''){alerta+="-El codigo de seguridad no puede estar vacio\n";}
	if (alerta!="Errores:\n"){
		alert(alerta);	
		return false;
	}else{
		return true;
	}	
	
}
function verificar_contacto(form){
	var alerta="Errores:\n";
	em_val = /^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/;
	if(form.email.value == ''){alerta+="-El email no puede estar vacio\n";}
	if(!em_val.test(form.email.value)){alerta+="-Verifique su Email\n";}
	if (form.nombre.value == "") {alerta+="-El nombre del responsable no puede estar vacio\n";}
	if (form.mensaje.value == "") {alerta+="-El mensaje no puede estar vacio\n";}
	if(form.codigo_img.value == ''){alerta+="-El codigo de seguridad no puede estar vacio\n";}
	if (alerta!="Errores:\n"){
		alert(alerta);	
		return false;
	}else{
		return true;
	}	
	
}