// JavaScript Document
function createRequestObject()
{
	var xmlhttp = false;
	try
	{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
 	{
		try 
		{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  		} 
		catch (E) 
		{
			xmlhttp = false;
		}
 	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined')
	{
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}



function popup()
{

    
////////////////////////////////////////////////ward///////////////////////////////////////////////////////
	
	document.getElementById('ward').innerHTML = '';

/* Setting up an XMLHttpRequest */
    var request = createRequestObject();
	
/* Opening a request */
	request.open("GET", "dropdown1.php?st_ward=ward");
    
/* Defining an event handler.*/
	request.onreadystatechange = function() 
	{ 
		if(request.readyState==4) 
       	{	/* Holding the response received in a memory variable */
			var response = request.responseText;
		/* Populating the DIV with the response received */
			document.getElementById('ward').innerHTML = response;
   		}
   	};
/* Sending the asynchronous request. */
	request.send(null);


}
////////////////////////////////////////////////ward///////////////////////////////////////////////////////
function displayInfo_ward(vv)
{
/* Clearing the contents of the bookDetailsPanel DIV */
	
	document.getElementById('blocks').innerHTML = '';
   // document.getElementById('blocks').style.display = 'block';
/* Setting up an XMLHttpRequest */
    var request = createRequestObject();

/* Opening a request */
	request.open("GET", "dropdown1.php?st_blocks=blocks&dt_blocks=" + vv);
    
/* Defining an event handler.*/
	request.onreadystatechange = function() 
	{ 
		if(request.readyState==4) 
       	{	/* Holding the response received in a memory variable */
			var response = request.responseText;
		/* Populating the DIV with the response received */
			document.getElementById('blocks').innerHTML = response;
   		}
   	};
/* Sending the asynchronous request. */
//document.getElementById('city').innerHTML = '';
//document.getElementById('district').innerHTML = '';

	request.send(null);

}

////////////////////////////////////////////////block///////////////////////////////////////////////////////
function displayInfo_blocks(vv)
{
	//alert("------------------");
/* Clearing the contents of the bookDetailsPanel DIV */
	
	document.getElementById('mohalla').innerHTML = '';

/* Setting up an XMLHttpRequest */
    var request = createRequestObject();

/* Opening a request */
	request.open("GET", "dropdown1.php?st_mohalla=mohalla&dist_mohalla=" + vv);
    
/* Defining an event handler.*/
	request.onreadystatechange = function() 
	{ 
		if(request.readyState==4) 
       	{	/* Holding the response received in a memory variable */
			var response = request.responseText;
		/* Populating the DIV with the response received */
			document.getElementById('mohalla').innerHTML = response;
   		}
   	};
/* Sending the asynchronous request. */
	request.send(null);

}
///////////////////////////////////////////////Mohalla//////////////////////////////////////////////////////////////

function displayInfo_mohalla(vv)
{
	//alert("------------------");
/* Clearing the contents of the bookDetailsPanel DIV */
	
	document.getElementById('mohalla_hindi').innerHTML = '';

/* Setting up an XMLHttpRequest */
    var request = createRequestObject();

/* Opening a request */
	request.open("GET", "dropdown1.php?st_mohalla_hindi=mohalla_hindi&dist_mohalla_hindi=" + vv);
    
/* Defining an event handler.*/
	request.onreadystatechange = function() 
	{ 
		if(request.readyState==4) 
       	{	/* Holding the response received in a memory variable */
			var response = request.responseText;
		/* Populating the DIV with the response received */
			document.getElementById('mohalla_hindi').innerHTML = response;
   		}
   	}
/* Sending the asynchronous request. */
	request.send(null);

}


