// JavaScript Document

function mostrardiv(ident)
{
	div		= document.getElementById('sector_'+ident);
	div2	= document.getElementById('descripcion_'+ident);
	mostrar	= document.getElementById('abrir_boton_'+ident);
	cerrar	= document.getElementById('cerrar_boton_'+ident);
	
	div.style.display = '';
	cerrar.style.display = '';
	div2.style.display = 'none';
	mostrar.style.display = 'none';
}

function ocultardiv(ident)
{
	div		= document.getElementById('sector_'+ident);
	div2	= document.getElementById('descripcion_'+ident);
	mostrar	= document.getElementById('abrir_boton_'+ident);
	cerrar	= document.getElementById('cerrar_boton_'+ident);
	
	div.style.display = 'none';
	cerrar.style.display = 'none';
	div2.style.display = '';
	mostrar.style.display = '';
}

// AJAX
var xmlhttp
function GetXmlHttpObject()
{
  if (window.XMLHttpRequest)
  {
    // code for IE7+, Firefox, Chrome, Opera, Safari
    return new XMLHttpRequest();
  }
  if (window.ActiveXObject)
  {
    // code for IE6, IE5
    return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function stateChanged()
{
  if (xmlhttp.readyState==4)
  {
    document.getElementById("TEXTOrespuesta").innerHTML = xmlhttp.responseText;
  }
}

function ajaxGO()
{
//  xmlhttp=GetXmlHttpObject();
//  if (xmlhttp==null)
//  {
//    alert ("Tu navegador no tiene soporte para AJAX!");
//    return;
//  }
//  var url="_funciones/recuperarINFO.php";
//  url=url+"?ind="+tipo;
//  url=url+"&ident="+ident;
//  xmlhttp.onreadystatechange=stateChanged;
//  xmlhttp.open("GET",url,true);
//  xmlhttp.send(null);
}

function mostrarDES(ident)
{  
  des = document.getElementById(ident);
  
  marco = document.getElementById('visible');
  marco.innerHTML = des.innerHTML;
  marco.style.display = '';
}

function ocultarDES()
{
  marco = document.getElementById('visible');
  marco.innerHTML = '';
  marco.style.display = 'none';
}
