// JavaScript Document
function xmlHttpPost(strURL, strSubmit, strResultFunc) {

        var xmlHttpReq = false;
        
        // Mozilla/Safari
        /*if (window.XMLHttpRequest) {
                xmlHttpReq = new XMLHttpRequest();
                xmlHttpReq.overrideMimeType('text/xml');
        }
        else*/ if (window.ActiveXObject) { //IE
                xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
        }
		else if (window.XMLHttpRequest) { // Mozilla/Safary
                xmlHttpReq = new XMLHttpRequest();
                xmlHttpReq.overrideMimeType('text/xml');
        }
		
		var string = strURL + strSubmit ;
		//alert(string);
		xmlHttpReq.open('GET', string, false);
        xmlHttpReq.setRequestHeader('Content-Type', 
		     'application/x-www-form-urlencoded');
        xmlHttpReq.onreadystatechange = function() {

			if (xmlHttpReq.readyState == 4) {
		 
		//setAjaxText(xmlHttpReq.responseText);
				 eval(strResultFunc + '(xmlHttpReq.responseText);');
			}
        }
        xmlHttpReq.send(null);/* */
}

function setOpacity(value) {
	testObj.style.opacity = value/10;
	testObj.style.filter = 'alpha(opacity=' + value*10 + ')';
}


/*function xmlhttpPost2(strURL, strSubmit, strResultFunc) {

        var xmlHttpReq = false;
        
        // Mozilla/Safari
        if (window.XMLHttpRequest) {
                xmlHttpReq = new XMLHttpRequest();
                xmlHttpReq.overrideMimeType('text/xml');
        }
        // IE
        else if (window.ActiveXObject) {
                xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
        }
		
		var string = strURL + strSubmit ;
		
		xmlHttpReq.open('POST', string, true);
        xmlHttpReq.setRequestHeader('Content-Type', 
		     'application/x-www-form-urlencoded');
        xmlHttpReq.onreadystatechange = function() {

                if (xmlHttpReq.readyState == 4) {
			 
			//setAjaxText(xmlHttpReq.responseText);
                     eval(strResultFunc + '(xmlHttpReq.responseText);');
                }
        }
        xmlHttpReq.send(null);
}

function sendRequest(doc)
{
    // check for existing requests
    if(xmlobj!=null&&xmlobj.readyState!=0&&xmlobj.readyState!=4){
        xmlobj.abort();
    }
    try{
        // instantiate object for Mozilla, Nestcape, etc.
        xmlobj=new XMLHttpRequest();
    }
    catch(e){
        try{
            // instantiate object for Internet Explorer
            xmlobj=new ActiveXObject('Microsoft.XMLHTTP');
        }
        catch(e){
            // Ajax is not supported by the browser
            xmlobj=null;
            return false;
        }
    }
	   // assign state handler
    xmlobj.onreadystatechange=stateChecker;
    // open socket connection
    xmlobj.open('GET',doc,true);
    // send GET request
    xmlobj.send(null);
}

function stateChecker(){
    // if request is completed
    if(xmlobj.readyState==4){
        // if status == 200 display text file
        if(xmlobj.status==200){
            // create data container
            createDataContainer();
            // read XML data
            data=xmlobj.responseXML.getElementsByTagName('message');
 // display XML data
            displayData();
        }
        else{
            alert('Failed to get response :'+ xmlobj.statusText);
        }
    }
}*/



