/*
* Code for filling the combo with property locality
* @page : fillcombo.php
* @author : Sujata Mahajan (sujata@tarabasoft.com)
* @version : 1.0
* @copyright : Coypright, 2009
* @creationdate : 13/10/2009
* @modificationdate : 07/11/2009
*/
 

var httpObject =null;   //variable declaration
//get HttpObject
 function getHTTPObject()
 {
   if (window.ActiveXObject) 
       return new ActiveXObject("Microsoft.XMLHTTP"); //IE5 and IE6 uses an ActiveXObject
   else if (window.XMLHttpRequest) // All new browsers use the built-in JavaScript XMLHttpRequest object to create an                					 XMLHttpRequest object 
       return new XMLHttpRequest(); //returns XMLHttpRequest object's reference 
   else 
   {
      alert("Your browser does not support AJAX.");
      return null;
   }//End of else
 }//end of function
 
 //get the Response Object
 function setOutput1()
 {
	
	 
   if(httpObject.readyState == 4)
     {  
	   document.getElementById('locality').innerHTML=httpObject.responseText;   //Get Response 
     }	 
 }//End of Function
 
function fillcombo1(countryid)
{	                
 
	httpObject = getHTTPObject(); //variable gets reference of  XMLHttpRequest and ActiveXObject Class so it is now  XMLHttpRequest                                    object
    if (httpObject != null)
	{
	    httpObject.open("GET","get_city.php?id="+countryid,"true");
    	httpObject.send(null);
        httpObject.onreadystatechange=setOutput1; 
   
    }//End of if
 }//End of Function
 

 	 