
//QUE SE HACE

function showSHOW(id){

	var NavIdProyecto;
	var NavIdCategoria;
	var NavIdFecha;
		
	NavIdProyecto = document.getElementById("NavIdProyecto").value;
	NavIdCategoria = document.getElementById("NavIdCategoria").value;
	NavIdFecha = document.getElementById("NavIdFecha").value;	
		
	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
  	} 
  
	var url="funcmysql/show2.php";
	url=url+"?NavIdProyecto="+NavIdProyecto;
	url=url+"&NavIdCategoria="+NavIdCategoria;
	url=url+"&NavIdFecha="+NavIdFecha;

	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);

}

function showCATEGORIA(id,type){

	var NavIdProyecto;
	var NavIdCategoria;
	var NavIdFecha;
		
	var selectLength = document.getElementById("NavIdCategoria").options.length;
	for (i=0; i<selectLength; i++){
		selectValue = document.getElementById("NavIdCategoria").options[i].value;
		if(selectValue == id){
			var finalSelectValue = i;	
		}
	}
	document.getElementById("NavIdProyecto").selectedIndex = 0;
	NavIdProyecto = "all";

	document.getElementById("NavIdCategoria").selectedIndex = finalSelectValue;
	NavIdCategoria = id;

	document.getElementById("NavIdFecha").selectedIndex = 0;
	NavIdFecha = "all";


	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
  	} 
  
	var url="funcmysql/show2.php";
	url=url+"?NavIdProyecto="+NavIdProyecto;
	url=url+"&NavIdCategoria="+NavIdCategoria;
	url=url+"&NavIdFecha="+NavIdFecha;

	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);

}

function showPROYECTO(id){

	var NavIdProyecto;
	var NavIdCategoria;
	var NavIdFecha;
		
	var selectLength = document.getElementById("NavIdProyecto").options.length;
	for (i=0; i<selectLength; i++){
		selectValue = document.getElementById("NavIdProyecto").options[i].value;
		if(selectValue == id){
			var finalSelectValue = i;	
		}
	}
	document.getElementById("NavIdProyecto").selectedIndex = finalSelectValue;
	NavIdProyecto = id;

	document.getElementById("NavIdCategoria").selectedIndex = 0;
	NavIdCategoria = "all";

	document.getElementById("NavIdFecha").selectedIndex = 0;
	NavIdFecha = "all";
			

	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
  	} 
  
	var url="funcmysql/show2.php";
	url=url+"?NavIdProyecto="+NavIdProyecto;
	url=url+"&NavIdCategoria="+NavIdCategoria;
	url=url+"&NavIdFecha="+NavIdFecha;

	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);

}


function showFECHA(id){

	var NavIdProyecto;
	var NavIdCategoria;
	var NavIdFecha;
		
	var selectLength = document.getElementById("NavIdFecha").options.length;
	for (i=0; i<selectLength; i++){
		selectValue = document.getElementById("NavIdFecha").options[i].value;
		if(selectValue == id){
			var finalSelectValue = i;	
		}
	}
	document.getElementById("NavIdProyecto").selectedIndex = 0;
	NavIdProyecto = "all";

	document.getElementById("NavIdCategoria").selectedIndex = 0;
	NavIdCategoria = "all";

	document.getElementById("NavIdFecha").selectedIndex = finalSelectValue;
	NavIdFecha = id;
			

	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null){
		alert ("Your browser does not support AJAX!");
		return;
  	} 
  
	var url="funcmysql/show2.php";
	url=url+"?NavIdProyecto="+NavIdProyecto;
	url=url+"&NavIdCategoria="+NavIdCategoria;
	url=url+"&NavIdFecha="+NavIdFecha;

	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);

}

// SE HACE

function stateChanged(){ 

	if (xmlHttp.readyState < 4) {
		document.getElementById("show").innerHTML = "<div class='StatusLoading'></div>";
	}

	if (xmlHttp.readyState==4){ 
		document.getElementById("show").innerHTML = xmlHttp.responseText;
		myLightbox = new Lightbox();
	}
}



// PARA TODOS LOS NAVEGADOPRES GENERICO FOREVER

function GetXmlHttpObject(){
	var xmlHttp=null;
	try{
	  // Firefox, Opera 8.0+, Safari
	  xmlHttp=new XMLHttpRequest();
	}
	catch (e){
  		// Internet Explorer
		try{
	    	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    	}
		catch (e){
		    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	    }	
	}
	return xmlHttp;
} 
