function limpiaCampo(id){
    document.getElementById(id).value = "";
    return false;
}

function limpiaInput(id, texto){
    var valor = document.getElementById(id).value;
    //alert(valor  + "  " + texto);
    if(valor == texto)
        document.getElementById(id).value = "";
    return false;
}


function validaFormularioVisita(){

    //alert("validaFormularioVisita");

    var valido = false;

    var nombreCentro, direccionCentro, telefonoCentro, contactoCentro, emailCentro, numeroVisitantes, nivelVisitantes, fecha, observaciones;
    direccionCentro = document.getElementById("direccionCentro");
    telefonoCentro = document.getElementById("telefonoCentro");
    contactoCentro = document.getElementById("contactoCentro");
    emailCentro = document.getElementById("emailCentro");
    numeroVisitantes = document.getElementById("numeroVisitantes");
    nivelVisitantes = document.getElementById("nivelVisitantes");
    fecha = document.getElementById("fecha");
    observaciones = document.getElementById("observaciones");

    if(direccionCentro.value == "") muestraError('direccionCentro');
    if(telefonoCentro.value == "") muestraError('telefonoCentro');
    if(contactoCentro.value == "") muestraError('contactoCentro');
    if(direccionCentro.value == "") muestraError('direccionCentro');
    if(telefonoCentro.value == "") muestraError('telefonoCentro');
    if(contactoCentro.value == "") muestraError('contactoCentro');


    return true;

}

function muestraError(idCampo){

    alert(idCampo)
    
}

$(document).ready(function() {
	$(".latest_img").tipTip();	
	$(".latest_img").fadeTo("slow", 1); // This sets the opacity of the thumbs to fade down to 30% when the page loads
     $(".latest_img").hover(function(){									   	
		   $(this).fadeTo("slow", 0.5); // This should set the opacity to 100% on hover
		   },function(){
		   $(this).fadeTo("slow", 1); // This should set the opacity back to 30% on mouseout
	});	  
	$(".latest_img2").fadeTo("slow", 0.5); // This sets the opacity of the thumbs to fade down to 30% when the page loads
     $(".latest_img2").hover(function(){									   	
		   $(this).fadeTo("slow", 1); // This should set the opacity to 100% on hover
		   },function(){
		   $(this).fadeTo("slow", 0.5); // This should set the opacity back to 30% on mouseout
	});	  	 

});
