function CargarContenido(url,param1){
	var vParam="CodCampeonato="+param1;
	//var url="buscarjuegosdeldia.php";

	var xmlhttp=false;
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}

		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
			xmlhttp = new XMLHttpRequest();
		}

		xmlhttp.open('POST', url, true);
		xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded'); // sending it as encoded formdata
		xmlhttp.setRequestHeader('Content-length',vParam.length); // we need to specify the length of the contents
		xmlhttp.setRequestHeader('Connection','close'); // Connection is to be closed after transfer
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState == 1) {
				document.getElementById('contentCenter').innerHTML="<img src='WEB/img/loadingindicator.gif' />";
			}
			if (xmlhttp.readyState == 4) 
			{ // Wait until everything is fetched!
				resp = xmlhttp.responseText;
				//alert(resp);
				document.getElementById('contentCenter').innerHTML=resp;
			}
		}
		xmlhttp.send(vParam); // This time, we need to send the text.
}

function buscarJuegos(fecha,codCamp,codLiga){
	var vParam="CodCampeonato="+codCamp+"&fecha="+fecha+"&codLiga="+codLiga;
	var url="WEB/prg/buscarjuegosdeldia.php";
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		xmlhttp = false;
		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
		xmlhttp.open('POST', url, true);
		xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded'); // sending it as encoded formdata
		xmlhttp.setRequestHeader('Content-length',vParam.length); // we need to specify the length of the contents
		xmlhttp.setRequestHeader('Connection','close'); // Connection is to be closed after transfer
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState == 1) {
				document.getElementById('JuegosDelDia').innerHTML="<img src='WEB/img/loadingindicator.gif' />";
			}
		if (xmlhttp.readyState == 4) { // Wait until everything is fetched!
				resp = xmlhttp.responseText;
				//alert(resp);
				document.getElementById('JuegosDelDia').innerHTML=resp;
			}
		}
		xmlhttp.send(vParam); // This time, we need to send the text.
}

/*busca los juegos finalizados de un campeonato en una fecha dada*/
function buscarUltJuegos(fecha,codCamp){
	var vParam="CodCampeonato="+codCamp+"&fecha="+fecha;
	var url="WEB/prg/ultJuegos.php";
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		xmlhttp = false;
		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
		xmlhttp.open('POST', url, true);
		xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded'); // sending it as encoded formdata
		xmlhttp.setRequestHeader('Content-length',vParam.length); // we need to specify the length of the contents
		xmlhttp.setRequestHeader('Connection','close'); // Connection is to be closed after transfer
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState == 1) {
				document.getElementById('ultimosJuegos').innerHTML="<img src='WEB/img/loadingindicator.gif' />";
			}
		if (xmlhttp.readyState == 4) { // Wait until everything is fetched!
				resp = xmlhttp.responseText;
				//alert(resp);
				document.getElementById('ultimosJuegos').innerHTML=resp;
			}
		}
		xmlhttp.send(vParam); // This time, we need to send the text.
}


			function mostrarTablas(valor,etapas){
				//alert('valor '+valor);
				var etiqueta = document.getElementById('eta_'+valor);
				var cuadro = document.getElementById('tablas_'+valor);
				//var etapas = document.getElementById('N_etapas');
				//alert('etapas '+etapas.value);
				var etas = 0;
				for(etas=1;etas<=etapas;etas++){
					document.getElementById('tablas_'+etas).style.display = 'none';
					document.getElementById('eta_'+etas).style.background = '#57C737';
					document.getElementById('eta_'+etas).style.color = '#ffffff';
				}
				cuadro.style.display = 'block';
				etiqueta.style.background = '#ffffff';
				etiqueta.style.color = '#000000';
				//cuadro.style.visible = block;
			}