function valContacto() {
	var form = document.contacto;

	if(form.nombre.value == "" || form.nombre.value == null) {
		alert("Por favor, Ingrese su nombre.")
		form.nombre.focus();
		return false;
	}
	if(form.email.value == "" || form.email.value == null) {
		alert("Por favor, Ingrese su email.");
		form.email.focus();
		return false;
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value))){
		alert("El email es incorrecto.");
		form.email.focus();
		return false;
	}
	if(form.telefono.value == "" || form.telefono.value == null) {
		alert("Por favor, Ingrese su teléfono.")
		form.telefono.focus();
		return false;
	}
	if(form.mensaje.value == "" || form.mensaje.value == null) {
		alert("Por favor, Ingrese su mensaje.")
		form.mensaje.focus();
		return false;
	}

	//BLOQUEO BOTON ENVIAR
	document.getElementById("btncontacto").disabled = true;
	document.getElementById("btncontacto").value = "procesando...";
	document.getElementById("act").value = "send";
}

//SOLO NUMEROS
function solonumeros(){
	var key=window.event.keyCode;
	if (key < 48 || key > 57){
		window.event.keyCode=0;
	}
}

//FORMULARIO DE CONCURSOS
function valConcurso() {
	var form = document.concursos;
	var flag = false;
	for(i=0; i<3; i++) {
		if(!form.opcion[i].checked) {
			flag = false;
		} else {
			flag = true;
			break;
		}
	}

	if(flag) {
		//BLOQUEO BOTON ENVIAR
		document.getElementById("btnEnviarconcursos").disabled = true;
		document.getElementById("btnEnviarconcursos").value = "procesando...";
		document.getElementById("act").value = "send";
	} else {
		alert ("Debe seleccionar una opci\u00f3n.");
		return false;
	}
}

//FORMULARIO DE CONCURSO 09 ABRIL 2010
function valConcurso09abril() {
	var form = document.concursosAbril;

	if(form.nombre.value == "" || form.nombre.value == null) {
		alert("Por favor, Ingrese su nombre.")
		form.nombre.focus();
		return false;
	}
	if(form.email.value == "" || form.email.value == null) {
		alert("Por favor, Ingrese su email.");
		form.email.focus();
		return false;
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value))){
		alert("El email es incorrecto.");
		form.email.focus();
		return false;
	}
	if(form.fono.value == "" || form.fono.value == null) {
		alert("Por favor, Ingrese su tel\u00e9fono.")
		form.fono.focus();
		return false;
	}
	
	if(form.opcion.value == 0) {
		alert("Debe seleccionar una opci\u00f3n.")
		form.opcion.focus();
		return false;
	}

	//BLOQUEO BOTON ENVIAR
	document.getElementById("btnEnviar").disabled = true;
//	document.getElementById("btnEnviarconcursos").value = "procesando...";
	document.getElementById("act").value = "send";
}

//FORMULARIO 
//CARTAS AL EDITOR
function valCartas() {
	var form = document.frmCartas;
	var codsegres = document.getElementById("codsegres").value;			

	if(form.nombreComent.value == "" || form.nombreComent.value == null) {
		alert("Debe ingresar nombre.");
		form.nombreComent.focus();
		return false;
	}
	if(form.emailComent.value == "" || form.emailComent.value == null) {
		alert("Debe Ingresar email.");
		form.emailComent.focus();
		return false;
	}
	if(form.codsegComent.value == "" || form.codsegComent.value == null) {
		alert("Debe Ingresar Codigo de Seguridad.");
		form.codsegComent.focus();
		return false;
	}
	if(codsegres != form.codsegComent.value) {
		alert("Codigo de Seguridad Erroneo.");
		form.codsegComent.focus();
		return false;
	}
	if(form.comentarioComent.value == "" || form.comentarioComent.value == null) {
		alert("Debe Ingresar comentario.");
		form.comentarioComent.focus();
		return false;
	}
	//BLOQUEO BOTON ENVIAR
	document.getElementById("btncmt").disabled = true;
//	document.getElementById("btncontacto").value = "procesando...";
	document.getElementById("act").value = "send";
}

//FORMULARIO DE BICENTENARIO
function valBicente() {
	var form = document.bicentenario;

	if(form.nombre.value == "" || form.nombre.value == null) {
		alert("Debe ingresar su nombre.");
		form.nombre.focus();
		return false;
	}
	if(form.email.value == "" || form.email.value == null) {
		alert("Debe ingresar su email.");
		form.email.focus();
		return false;
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value))){
		alert("Debe ingresar su email correcto.");
		form.email.focus();
		return false;
	}
	if(form.telefono.value == "" || form.telefono.value == null) {
		alert("Debe ingresar su tel\u00e9fono.");
		form.telefono.focus();
		return false;
	}
	if(form.categoria.value == "0") {
		alert("Debe seleccionar una categor\u00eda.");
		form.categoria.focus();
		return false;
	}
	if(form.documento.value == "" || form.documento.value == null) {
		alert("Debe adjuntar un archivo con la biograf\u00eda.");
		form.documento.focus();
		return false;
	}	
	
	//BLOQUEO BOTON ENVIAR
	document.getElementById("btnEnviarconcursos").disabled = true;
	document.getElementById("act").value = "send";
}


