//var isIE = false;
var isIE = /msie/i.test (navigator.userAgent);

/*/function initialiseAJAXRequest()
{
    if (window.XMLHttpRequest)
    {
        isIE = false;
        return new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        isIE = true;
        return new ActiveXObject("Microsoft.XMLHTTP");
    }
}*/

function send2(param) {
    if (param == null)
        this._send("");
    else
        this._send(param);
}

if (!isIE) {
	if (window.XMLHttpRequest && XMLHttpRequest.prototype) {
    		XMLHttpRequest.prototype._send = XMLHttpRequest.prototype.send;
    		XMLHttpRequest.prototype.send = send2;
	}
}

function initialiseAJAXRequest()
{
    var ajaxRequest;
    if (window.XMLHttpRequest) {
        isIE = false;
        ajaxRequest = new XMLHttpRequest();
	//return new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        isIE = true;
        ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
	//return new ActiveXObject("Microsoft.XMLHTTP");
    }
    //alert(isIE);
    return ajaxRequest;
} 

/**
 * This function is required to counter IE caching AJAX GET
 * XMLHttpRequests.
 *
 * By adding the current system date/time to the URL Querystring, 
 * IE treats the request as a new one (wtg IE).
 */

function uncacheurl(strURL)
{
    var dteDate = new Date();
    var strTime = dteDate.getTime();
    return strURL + ((strURL.indexOf(".jsp?") != -1) ? "&" : "?") + "time=" + strTime;
}