// --------------check data from FORM  --------------------------
//	Para mostrar Acentos y caracteres en los ALERTS
//    *   \u00e1 -> á
//    *   \u00e9 -> é
//    *   \u00ed -> í
//    *   \u00f3 -> ó
//    *   \u00fa -> ú
//    *   \u00f1 -> ñ
function checkdataForm(theForm) {
	if (theForm.nombre.value == "") {
	  alert("Por favor escriba su nombre");
	  theForm.nombre.focus();
	  return (false);
	}	if (theForm.nombre.value.length < 5)  {
	  alert("Por favor escriba al menos 5 caracteres en el campo \"Nombre\" .");
	  theForm.nombre.focus();
	  return (false);
	}
	if (theForm.ciudad.value == "") {
	  alert("Por favor escriba el nombre de su ciudad");
	  theForm.ciudad.focus();
	  return (false);
	}	if (theForm.ciudad.value.length < 2)  {
	  alert("Por favor escriba al menos 2 caracteres en el campo \"Ciudad\" .");
	  theForm.ciudad.focus();
	  return (false);
	}
	if (theForm.telefono.value == "")  {
	  alert("Por favor escriba un tel\u00e9fono donde podamos contactarlo.");
	  theForm.telefono.focus();
	  return (false);
	}	if (theForm.telefono.value.length < 6)  {
	  alert("Por favor escriba al menos 6 caracteres en el campo  \"tel\u00e9fono\" .");
	  theForm.telefono.focus();
	  return (false);
	}
// El email no sera obligatorio, pero si el usuario agrega uno entonces si se VALIDA	
	if (theForm.correo.value != "")  {
		//expresion regular
	    var validamail=/^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/
		if (!validamail.test(theForm.correo.value))  {  //si correo no es igual a validamail
		  alert("Por favor escriba un correo electr\u00f3nico v\u00e1lido.");
		  theForm.correo.focus();
		  return (false);
		}
	}
	// terminamos de comprobar el primer bloque de información del cliente--------------------------
}
//  End -->



//================================= GALERIAS de IMAGENES ======================================

// funcion onClic en las imagenes de GALERIAS --------------------
function niuwin(theURL,winName,features) { //v2.0
		  window.open(theURL,'showpag','width=345,height=350');
}

// activa popup de galeria ----------------------------------------
function galeria(nombre){
	var cadena="galerias/eventos/"+nombre+"/galeria.htm";
	var gale=open(cadena,"gale","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=700,height=400,top=1,left=1");
	gale.focus();
}

// activa un mensaje alterno para un popup en la barra de estado
function statusInfo(info){
	window.status=info;
}
// END ================================= GALERIAS de IMAGENES ===========================

