In IE I get an error 'not implemented' when running the following script. All I want is to pass a variable (field) to the alertContents function, but nothing seems to work. I can get it to work in Firefox, but IE keeps complaining, even *when* it works it throws me the 'not implemented' error:

function sendreply(obj,field){
var str = "";
var fieldname = field;
for(var i = 0;i < obj.elements.length;i++) {
switch(obj.elements[i].type){
case "text":
case "textarea":
case "password":
if (!obj.elements[i].disabled) str += obj.elements[i].name + "=" + encodeURI(obj.elements[i].value) + "&";
break;
case "hidden":
//hidden cannot be disabled
str += obj.elements[i].name + "=" + encodeURI(obj.elements[i].value) + "&";
break;
case "checkbox":
case "radio":
if(obj.elements[i].checked && !obj.elements[i].disabled) str += obj.elements[i].name + "=" + encodeURI(obj.elements[i].value) + "&";
break;
case "select-one":
if (!obj.elements[i].disabled) str += obj.elements[i].name + "=" + encodeURI(obj.elements[i].options[obj.elements[i].selectedIndex].value) + "&";
break;
case "select-multiple":
if (!obj.elements[i].disabled){
for (var j = 0; j < obj.elements[i].length; j++){
var optElem = obj.elements[i].options[j];
if (optElem.selected == true){
str += obj.elements[i].name + "[]" + "=" + encodeURI(optElem.value) + "&";
}
}
}
break;
}
}
//Strip final &amp;
str = str.substr(0,(str.length - 1));
makePOSTRequest2('inc/sendreply.php', str, fieldname);
}

var http_request = false;
function makePOSTRequest2(url, parameters, field) {
var callMessage = "<div align=\"center\" style=\"height:150px\"><br /><br /><img src=\"gfx/wait.gif\"><br /><br /><strong>...sending mail...<br /><br /><br /><br /></strong></div>";
document.getElementById(field).innerHTML = callMessage;
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
// set type accordingly to anticipated content type
http_request.overrideMimeType('text/xml');
//http_request.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}

alert(field);
//up to here all goes fine then the probs start. I cannot add (field) to alertContents - like http_request.onreadystatechange = alertContents(field); - then the 'not implemented' error appears.
http_request.onreadystatechange = alertContents;
http_request.open('POST', url, true);
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(parameters);

}

function alertContents(field) {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
var sentMessage = "<div align=\"center\" style=\"height:150px\"><br /><br /><br /><br /><strong>...mail is sent!...<br /><br /><br /><br /></strong></div>";
document.getElementById(field).innerHTML = sentMessage;
//alert(field);
// here I get "document.getElementById(field).innerHTML is empty or not defined"

} else {
alert('There was a problem with the request.');
}
}
}