function muestra(ide) {
            document.getElementById("img_menu_" + ide).style.visibility = "visible";
}

function oculta(ide) {
            document.getElementById("img_menu_" + ide).style.visibility = "hidden";
}

function ShowDate(oDoc,cDate) {
	window.open("emergente.asp?backf="+oDoc+"&cDate="+cDate,"window", "height=220, width=320, resizeable=no,","");
}

function comprueba() {
	while(''+document.getElementById("titulo").value.charAt(0)==' ') {
	    document.getElementById("titulo").value = document.getElementById("titulo").value.substring(1,document.getElementById("titulo").value.length);
	}
	if (document.getElementById("titulo").value.length==0) {
	    alert ("Tiene que rellenar el campo TÍTULO de la ficha del evento.");
		document.getElementById("titulo").focus();
		return false;
	} 

    if (document.getElementById("destacado").checked) {
        document.getElementById("dest_val").value = "1";
    }
    else {
        document.getElementById("dest_val").value = "0";
    }    
    return true;
}

var x;
function inicio()	{
	x = document.getElementById("tabla");
	for (var i = 1; i < x.rows.length; i ++)	{
		x.rows[i].style.backgroundColor = (i % 2 == 0) ? "#FFF" : "#FFF";
		x.rows[i].onmouseover = (i % 2 == 0) ? 
			function() {this.style.backgroundColor = '#c7c7c7';}:
			function() {this.style.backgroundColor = '#c7c7c7';};
		x.rows[i].onmouseout = (i % 2 == 0) ? 
			function() {this.style.backgroundColor = '#FFF';}:
			function() {this.style.backgroundColor = '#FFF';};
	}
}

function confirmar(idev) {
    if (confirm("¿Eliminar los datos del evento seleccionado?")) {
        document.location = "eliminar_eventos.asp?idev=" + idev;
    }
}

function confirmar_calendario(idev) {
    if (confirm("¿Eliminar los datos del registro seleccionado?")) {
        document.location = "eliminar_calendario.asp?idev=" + idev;
    }
}
