/***Clear recent history code***/
var xmlHttp;
function clear_history(url_history)
{
	//alert(url_history);
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null)
    {
        alert ("Your browser does not support AJAX!");
        return;
    }
    xmlHttp.onreadystatechange=function(){
        //alert(xmlHttp.readyState);
        if (xmlHttp.readyState==4){ //This function will execute on receive
            document.getElementById('history_txt_area').innerHTML = xmlHttp.responseText;
        }
    };
    //Send data to the url through ajax
    //sleep(5);
    //alert(url.length/1024);
    xmlHttp.open("GET",url_history,true);
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.setRequestHeader("Connection", "close");
    xmlHttp.send(null);
}

// Intialize XMLHTTP object
function GetXmlHttpObject()
{
    var A;
    if (window.XMLHttpRequest) {
    A = new XMLHttpRequest();
    } else {
    var msxmlhttp = new Array(
    'Msxml2.XMLHTTP.6.0',
    'Msxml2.XMLHTTP.3.0',
    'Msxml2.XMLHTTP',
    'Microsoft.XMLHTTP');
    for (var i = 0; i < msxmlhttp.length; i++) {
    try {
    A = new ActiveXObject(msxmlhttp[i]);
    break;
    } catch (e) {
    A = null;
    }
    }
    }
    
    if (A!=null)
    return A;
}

/****Clear recent history ends***/