function inintAjax() {
	try { 
		return new ActiveXObject("Msxml2.XMLHTTP");  
	}
	catch(e) {} //IE
	try { 
		return new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	catch(e) {} //IE
	
	try { 
		return new XMLHttpRequest();         
	}
	catch(e) {} //Native Javascript
	
	alert("XMLHttpRequest not supported");
	return null;
};

function doChange(src, cnt, reg, homeowner) {
	 var req = inintAjax();
	 req.onreadystatechange = function () {
		 
		  if (req.readyState==4) {
			   if (req.status==200) {
					document.getElementById('regionId').innerHTML=req.responseText; //
			   }
		  }
	 };
	 
	 req.open("GET", "dropDownajax.php?data="+src+"&cnt="+cnt+"&reg="+reg+"&homeowner="+homeowner); // connection
	 
	 //req.open("GET", "site/loopdirect_dropDownajax.php?data="+src+"&val="+val"&back="+back); // connection
	 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=tis-620"); // set Header
	 req.send(null); //
}

function doStatechange(src, cnt, reg, homeowner) {
	 
	 var req = inintAjax();
	 req.onreadystatechange = function () {
		  if (req.readyState==4) {
			   if (req.status==200) {
					document.getElementById(src).innerHTML=req.responseText; //
			   }
		  }
	 };
	 
	 req.open("GET", "dropDownajax.php?data="+src+"&cnt1="+cnt+"&reg="+reg+"&homeowner="+homeowner); // connection
	 
	 //req.open("GET", "site/loopdirect_dropDownajax.php?data="+src+"&val1="+val); // connection
	 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=tis-620"); // set Header
	 req.send(null); //
}
	
