try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}
function loadPages(url, onde){
    var content=document.getElementById(onde)
    content.innerHTML='<div id="loader"><img src="images/ajax-loader.gif"/></div>'
    //
    xmlhttp.open("GET",url,onde,true);
    //
    xmlhttp.onreadystatechange=function() {
     if (xmlhttp.readyState==4){
        content.innerHTML=xmlhttp.responseText
     }
    }
    xmlhttp.send(null)
}