function GetXmlHttpObject(){
    var xmlHttp=null;
    try{
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }
    catch(e){
        // Internet Explorer
        try{
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e){
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}
// read a txt to a element
function readTxt(url,element){
    var xmlhttp=GetXmlHttpObject();
    if (xmlhttp==null){
        alert("Your browser does not support XMLHTTP.");
    }
    else{
        function onResponse(){
            if(xmlhttp.readyState!=4) return;
            if(xmlhttp.status!=200){
                alert("Problem retrieving XML data");
                return;
            }
			document.getElementById(element).innerHTML=xmlhttp.responseText;
        }
        xmlhttp.onreadystatechange=onResponse;
        xmlhttp.open("GET",url,true);
        xmlhttp.send(null);
    }	
}



