function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
    }
function getState(countryId) {		
		
		///alert('situ');
		var strURL="dropdownfile/findState.php?country="+countryId;
		////alert('situ'+strURL);
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
			///alert('ashu');
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {	
					///alert(req.responseText);					
						document.getElementById('statediv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}
function getCity(countryId,stateId) {
    //alert('situ');
		var strURL="dropdownfile/findCity.php?country="+countryId+"&state="+stateId;
		var req = getXMLHTTP();
		if (req) {
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {
					///alert(req.responseText);
						document.getElementById('citydiv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
function getDistrict(countryId,stateId,cityId) {
	  ///alert('situ');
		var extraId = '1';
		var strURL="dropdownfile/finddistict.php?country="+countryId+"&state="+stateId+"&city="+cityId+"&extra="+extraId;
		var req = getXMLHTTP();
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {	
					//alert(req.responseText);					
						document.getElementById('districtdiv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}

	
	
function getAccomotion(accId) {	

		var strURL="../dropdownfile/getaccomodation_post_property_flat.php?accId="+accId;
		var req = getXMLHTTP();
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('facc').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
function getsoc(location_id)
{
  //alert('situ');
  var strURL="dropdownfile/findsociety_post_property.php?accId="+location_id;
  var req = getXMLHTTP();
  //alert('avijit'+strURL);
  if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
				/// alert(req.responseText)
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('societydiv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
}	
	
