var xmlHttp = null;

function verHeader(opcion)
{
	if (typeof(opcion) == 'undefined') var opcion = 0;
	if(opcion==0) {
		crearXmlHTTP();
		var url="../js/login.php";
		xmlHttp.onreadystatechange=ajaxMostrarHeader;
		xmlHttp.open("GET",url,true);		//acá true es para hacerlo sincronico o asincronico....fijate eso
		xmlHttp.send(null);
	}
	else {
		crearXmlHTTP();
		var url="../js/login.php?opcion="+opcion;
		xmlHttp.onreadystatechange=ajaxMostrarHeader;
		xmlHttp.open("GET",url,true);		//acá true es para hacerlo sincronico o asincronico....fijate eso
		xmlHttp.send(null);
	}
}

function ajaxMostrarHeader(){

	if(xmlHttp.readyState==4)
	{	
		var resultado = xmlHttp.responseText;	//respuesta de request.php
		
			document.getElementById('mostrarHeader').innerHTML = resultado;
	}

}

function crearXmlHTTP()
{
	try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
		
      }
    }
}