
function modiframe(destino)
{
	document.getElementById("locales").style.visibility="hidden";
	document.getElementById("frameHide").style.visibility="visible";
	document.getElementById("central").src=destino;
}
function modiframe2(destino)
{
	document.getElementById("programa").src=destino;
}
function modiGaleria(fecha,evento,local,idSite)
{
	if (!enProceso && http) {
		var url = "changeGaleria.php?fecha="+fecha+"&evento="+evento+"&local="+local+"&idSite="+idSite;
		http.open("GET", url, true);
		http.onreadystatechange = handleHttpResponse;
		enProceso = true;
		http.send(null);
	}
}
function despliegaMenu(){
	
	if (screen.width == 800){
		document.getElementById("locales").style.left=670;
	}else{
		if (screen.width == 1024){
			document.getElementById("locales").style.left=720;
		}else{
			if (screen.width  == 1152){
				document.getElementById("locales").style.left=750;
			}else{
				if (screen.width == 1440){
					document.getElementById("locales").style.left=920;
				}else{
					if (screen.width== 1280){
						document.getElementById("locales").style.left=860;
					}else{
						document.getElementById("locales").style.left=720;
					}
				}
			}
		}
	}
	
	document.getElementById("locales").style.visibility="visible";
	document.getElementById("frameHide").style.visibility="hidden";
}

//************************** Funciones de sistema *************************************
var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest

function handleHttpResponse() { 
	var msg='';
	var msg2='';
	if (http.readyState == 4) { 
		//clearTimeOut(tmrAnular);
		//tmrAnular="";
		//alert(http.status );
		if (http.status == 200) { 
			if (http.responseText.indexOf('invalid') == -1) {
			 // Armamos un array, usando la coma para separar elementos
				results = http.responseText; 
				document.getElementById("galeria").innerHTML = results;
				enProceso = false;
			}else{
				 aslert("No se pudo recuperar la información: " + http.statusText);
				 enProceso = false;
			}
		}
	}
}
function AnularPeticion()
{
   http.abort();
}
function getHTTPObject() {
	var xmlhttp;
	/*@cc_on
	@if (@_jscript_version >= 5)
	   try {
		  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	   } catch (e) {
		  try {
			 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (E) { xmlhttp = false; }
	   }
	@else
	xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
	   try {
		  xmlhttp = new XMLHttpRequest();
	   } catch (e) { xmlhttp = false; }
	}
	return xmlhttp;
}


