Why won't this ajax call work in this simple object literal ajax frame work for javascript
<pre><code>var ajax = {
xmlHTTP: function() {
    xml = new XMLHttpRequest();
    return xml;
},
xmlHTTPfunction: function() {
    if (xml.readyState == 4 &amp;&amp; xml.status == 200)  {
        document.getElementById("te").innerHTML = xml.responseText; 
         alert(xml.status);
         alert(xml.responseText);
     }

},
xmlHTTPopen: function(url) {
    xml.open("POST", url, true);
},
xmlHTTPheader: function() {
    ajax.xmlHTTP().setRequestHeader("Content-type","application/x-www-form-urlencoded");
},
xmlHTTPsend: function(string) {
    xml.send(string);
},
ajaxCall: function() {
    ajax.xmlHTTP();
    ajax.xmlHTTPopen('testx.php');
    ajax.xmlHTTPsend('test');
    return 1;
}
}
   if(ajax.ajaxCall() == 1) {
document.getElementById("te").innerHTML = xml.responseText; 

}
</code></pre>
