var xmlHttp;
try	{    // Firefox, Opera 8.0+, Safari    
	xmlHttp=new XMLHttpRequest();    
}catch (e){    // Internet Explorer    
	try	{      
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
	}catch (e){      
		try{        
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
		}catch (e){        
			alert("Your browser does not support AJAX!");     
		}      
	}   
}

function myXmlHttp(){
    var xmlhttp = false;
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(e){
            xmlhttp = false;
        }
    }

    if(!xmlhttp && document.createElement){
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp;
}
		
	function loadAjax(url, id){
		var xmlHttp = myXmlHttp();
		xmlHttp.open("GET",url,false);
		xmlHttp.send(null);
		document.getElementById(id).innerHTML=xmlHttp.responseText;
	}
		
	function loadProcessAjax(url, id){		
		document.getElementById(id).innerHTML = '<table width="200" height="25"  border="0" align="left" cellpadding="0" cellspacing="0"><tr><td align="left" valign="middle"><img src="/images/indicator.gif">Loading data.</td></tr></table>';
		var xmlHttp = myXmlHttp();
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		xmlHttp.onreadystatechange=function(){	
			if (xmlHttp.readyState == 4) {
				document.getElementById(id).innerHTML =xmlHttp.responseText;
			}
		}
		//document.getElementById(id).innerHTML=xmlHttp.responseText;
	}
		
	function loadMessageAjax(url, id, msg){		
		document.getElementById(id).innerHTML = '<table width="200" height="25"  border="0" align="left" cellpadding="0" cellspacing="0"><tr><td align="left" valign="middle"><img src="/images/indicator.gif">'+msg+'</td></tr></table>';
		var xmlHttp = myXmlHttp();
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		xmlHttp.onreadystatechange=function(){	
			if (xmlHttp.readyState == 4) {
				document.getElementById(id).innerHTML =xmlHttp.responseText;
			}
		}
		//document.getElementById(id).innerHTML=xmlHttp.responseText;
	}
		
	function loadPostAjax(url, id){
		var xmlHttp = myXmlHttp();
		xmlHttp.open("POST",url,false);
		xmlHttp.send(null);
		document.getElementById(id).innerHTML=xmlHttp.responseText;
	}

	
	
	function getData(url, id){
		var xmlHttp = myXmlHttp();
		xmlHttp.open("GET",url,false);
		xmlHttp.send(null);
		//alert(xmlHttp.responseText);
		document.getElementById(id).value=xmlHttp.responseText;
	}

	
	
	function retData(url, id){
		var xmlHttp = myXmlHttp();
		xmlHttp.open("GET",url,false);
		xmlHttp.send(null);
		//alert(xmlHttp.responseText);
		return xmlHttp.responseText;
	}