// JavaScript Document

function tipoSel(idx,cid){
	var c=document.getElementById("carga");
	var e=document.getElementById("ev");
	c.style.display="block";
	e.style.display="none";
	window.location="ver.asp?id=" + cid + "&t=" + idx.options[idx.selectedIndex].value;
}

function claseSel(idx,cid,t){
	var c=document.getElementById("carga");
	var e=document.getElementById("ev");
	c.style.display="block";
	e.style.display="none";
	window.location="ver.asp?id=" + cid + "&t=" + t + "&c=" + idx.options[idx.selectedIndex].value;
}
function coleBackSel(idx){
	window.location="back_eve.asp?c=" + idx.options[idx.selectedIndex].value;
}
function claseBackSel(idx,c){
	window.location="back_eve.asp?c=" + c + "&cl=" + idx.options[idx.selectedIndex].value;
}
function cargaDesc(idx){
	var d=idx.options[idx.selectedIndex].id;
	document.getElementById("desc").innerHTML=d;
	if (idx.options[idx.selectedIndex].value==9999){
		document.getElementById("co2gen").style.display="block";
		document.getElementById("co2ayu").style.display="block";
	}else{
		document.getElementById("co2gen").style.display="none";
		document.getElementById("co2ayu").style.display="none";
	}
}

function goCl(id){
	var idd=id.options[id.selectedIndex].value;	
	document.getElementById("link").href="ver.asp?id=" + idd;
}

function confirma(t){
	return confirm(t);
}

function toggleDiv(id){
	var s=document.getElementById(id);
	if(s.style.display=="none"){
		s.style.display="block";	
	}else{
		s.style.display="none";	
	}
	return false;
}