var objXMLHttp = false;
function getNewHttpObject() {
    
    try {
        objXMLHttp = new ActiveXObject('Msxml2.XMLHTTP');
    } catch(e) {
        try {
            objXMLHttp = new ActiveXObject('Microsoft.XMLHTTP');
        } catch(e) {
            objXMLHttp = new XMLHttpRequest();
        }
    }
    
    return objXMLHttp;
}
function getsrc(url,elementContainer,statusContainer,callBackFunc){
        var theHttpRequest = getNewHttpObject();
        
        if(statusContainer == null){
            statusContainer = elementContainer;
        }
        
        if(typeof(statusContainer) != 'undefined'){
            document.getElementById(statusContainer).innerHTML = '<blink>Loading...<\/blink>';
        }

        theHttpRequest.onreadystatechange = function(){processAXAH(theHttpRequest,elementContainer,statusContainer,callBackFunc);};
	theHttpRequest.open("GET", url);
	theHttpRequest.send(false);
}
function processAXAH(theHttpRequest,elementContainer,statusContainer,callBackFunc){
        if (theHttpRequest.readyState == 4) {
                if (theHttpRequest.status == 200) {
                        if(typeof(statusContainer) != 'undefined'){
                                document.getElementById(statusContainer).innerHTML = "&nbsp;";
                        }                     
                        if(typeof(elementContainer) != 'undefined'){
                                document.getElementById(elementContainer).innerHTML = theHttpRequest.responseText;
                        }
                } else {
                        if(typeof(statusContainer) != 'undefined'){
                                document.getElementById(statusContainer).innerHTML="<p><span class='redtxt'>Error!<\/span> HTTP request return the following status message:&nbsp;" + theHttpRequest.statusText +"<\/p>";
                        }
                }
				if(callBackFunc){
					callBackFunc(theHttpRequest);
				}
        }
}