//create the Cross-browser XMLHttpRequest object
function getFile(pURL,pFunc) {
    if (window.XMLHttpRequest) { // code for Mozilla, Safari, etc 
        xmlhttp=new XMLHttpRequest();
        eval('xmlhttp.onreadystatechange='+pFunc+';');
        xmlhttp.open("GET", pURL, true); // leave true for Gecko
        xmlhttp.send(null);
    } else if (window.ActiveXObject) { //IE 
        xmlhttp=new ActiveXObject('Microsoft.XMLHTTP'); 
        if (xmlhttp) {
            eval('xmlhttp.onreadystatechange='+pFunc+';');
            xmlhttp.open('GET', pURL, false);
            xmlhttp.send();
        }
    }
  }
function makeIt() {
    if (xmlhttp.readyState==4) { 
        if (xmlhttp.status==200) { 
            var out=xmlhttp.responseText;
            document.getElementById('weather').innerHTML=out;
        }
    }
  }
  
// Get the Data
getFile('cgi-bin/xml.cgi','makeIt');
