function Rollover(cual,porcual){
	if(document.images){
		document.images[cual].src =  porcual;
	}
}



function Rollover_JPG(cual,porcual){
	if(document.images){
		document.images[cual].src = 'img/' + porcual + '.jpg'
	}
}


function openVideo(){
	window.open('videofulscreen.html','La Quinta de Bella Vista','width=460,height=380,scrollbars=no,resizable=no,toolbar=no,left=100,top=100');
}

function setimage(number)
{
	document.frm.idSeleccion.value = number;
}



function validaMail(string){
	if (typeof(string)!='object'){
			valor = string;
	}
	else{
			var X = new String;
			X = string.value;			
			valor = X;
	}
	if (string == ""){
			return(false);
	}
	else{
		if (valor.search(/[A-Za-z0-9ñ\-\.\_]+@[A-Za-z0-9\-]+\.[A-Za-z0-9]+(\.[A-Za-z0-9]*)?/g) != 0)
			return (false);
		else
			return(true);	
	}
}


function changeId(number)
{
	document.frm.idSeleccion.value = number;
    document.frm.submit();
}

function fcClear(obj){
    obj.value = '';
}

function validarMail(){
		if(document.frm.txNombre.value=='' || document.frm.txNombre.value=='NOMBRE Y APELLIDO'){
			alert('Debe ingresar su nombre y apellido.');
			document.frm.txNombre.focus();
			return false;
		}
		if(document.frm.txEMail.value=='' || document.frm.txEMail.value=='EMAIL'){
			alert('Debe ingresar su dirección de email.');
			document.frm.txEMail.focus();
			return false;
		}else{
			if(!validaMail(document.frm.txEMail.value)){
				alert('Debe ingresar una dirección de email válida');
				document.frm.txEMail.focus();
				return false;
			}
		}
		if(document.frm.txTelefono.value=='' || document.frm.txTelefono.value=='TELÉFONO'){
			alert('Debe ingresar Número de Teléfono.');
			document.frm.txTelefono.focus();
			return false;
}
		if(document.frm.txTipo.value=='' || document.frm.txTipo.value=='ELIJA EL TIPO DE EVENTO'){
			alert('Debe ingresar el tipo de evento.');
			document.frm.txTipo.focus();
			return false;
		}
		if(document.frm.txInvitados.value=='' || document.frm.txInvitados.value=='CANTIDAD DE INVITADOS'){
			alert('Debe ingresar la cantidad de invitados.');
			document.frm.txInvitados.focus();
			return false;
	        	
                }
		if(document.frm.txDia.value=='DÍA'){
			alert('Debe ingresar el día de la fecha del evento.');
			document.frm.txDia.focus();
			return false;
		}
		if(document.frm.txMes.value=='MES'){
			alert('Debe ingresar el mes de la fecha del evento.');
			document.frm.txMes.focus();
			return false;
		}
		if(document.frm.txAnio.value=='AÑO'){
			alert('Debe ingresar el año de la fecha del evento.');
			document.frm.txAnio.focus();
			return false;
		}
        if(document.frm.txMensaje.value=='' || document.frm.txMensaje.value=='MENSAJE'){
			alert('Debe ingresar el mensaje.');
			document.frm.txMensaje.focus();
			return false;
	        	
        }
		document.frm.submit();
	}


