function abrirPag(valor){  
var url = valor;  
  
  xmlRequest.open("GET",url,true);  
  xmlRequest.onreadystatechange = mudancaEstado;  
  xmlRequest.send(null);  
    
  if (xmlRequest.readyState == 1) {  
  document.getElementById("loadcentro").style.visibility = "visible";
var conteudo = $('#contentajax');
			conteudo.slideToggle("Fast");

  }  
    
  return url;  
  }  
    
  function mudancaEstado(){  
  if (xmlRequest.readyState == 4){

	  document.getElementById("contentajax").innerHTML = xmlRequest.responseText; 

  document.getElementById("loadcentro").style.visibility = "hidden";

var conteudo = $('#contentajax');
			conteudo.show('Fast');
conteudo.find('a').lightBox();

}  

function addLoadEvent(func)
{ 
var oldonload = window.onload;
if (typeof window.onload != 'function'){
window.onload = func;
} else {
window.onload = function(){
oldonload();
func();
}
}

}
function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}}
  } 

