var req = false;

function setHttpRequest() {

  if (window.XMLHttpRequest) { // Mozilla, Safari,...
    req = new XMLHttpRequest();
  }
  else if (window.ActiveXObject) { // IE
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {}
    }
  }
}

function exibe_galeria(page) {

  setHttpRequest();

  if (!req)
    return false;

  
  url = page;
  req.onreadystatechange = carrega_galeria;

  req.open('GET', url, true);
  req.send(null);

}

function carrega_galeria() {

  if (req.readyState == 4) {
    if (req.status == 200) {
      data = req.responseText;
      document.getElementById("images").innerHTML = data;
    }
    else {
      alert("Erro ao exibir a galeria");
    }
  }

}

function changeSection(obj, cursor) {
  obj.style.cursor=cursor;
}
