Help me fix a code,comparison provided
<p>Below are 2 sets of codes provided for comparison,the 2nd set of code is the original code,the first set of code is modified but does not work.So i want it to work.
Please help me check is it syntax or other error..Thanks</p>

<pre><code>function startChat() {
    xmlHttp2 = GetXmlHttpObject();

    if (xmlHttp2 == null) {
        alert("Browser does not support HTTP Request");
        return;
    }

    var url = "startChat.php";
    var params = 'country=' + encodeURIComponent(country) +
                 '&amp;gender=' + encodeURIComponent(gender) +
                 '&amp;topic=' + encodeURIComponent(topic);
    xmlHttp2.open("POST", url, true);
    xmlHttp2.onreadystatechange = stateChanged2;
    xmlHttp2.send(params);              
}
function stateChanged2()
</code></pre>

<p>This code can but with less function</p>

<pre><code>function startChat() {
    xmlHttp2 = GetXmlHttpObject();

    if (xmlHttp2 == null) {
        alert("Browser does not support HTTP Request");
        return;
    }

    var url = "startChat.php";
    xmlHttp2.open("POST", url, true);
    xmlHttp2.onreadystatechange = stateChanged2;
    xmlHttp2.send(null);
}
function stateChanged2()
</code></pre>

<p>Please help me to make the first code working..Thanks alot!</p>
