	    var _DropDownObject=null;
	  
	     function wrapCity()
	    {
			document.getElementById('hdnCityName').value=document.Form1.DD_City.options[document.Form1.DD_City.selectedIndex].value;
		}
	    	    
	    function wrapLocation1()
	    {
		  document.getElementById('hdnLocation1').value=document.Form1.DD_DealerLocation.options[document.Form1.DD_DealerLocation.selectedIndex].value;	  
		}
	   function wrapLocation()
	    {
		  document.getElementById('hdnLocation').value=document.Form1.DD_Location.options[document.Form1.DD_Location.selectedIndex].value;	  
		}
		function dealerFillCity(DD_State,DD_City)
		{
		
		   
		     var state=document.getElementById('DD_State').value;
		     var city=document.getElementById('DD_City').value;
		      document.getElementById('hdnState').value=state;
		     _DropDownObject=DD_City;
		     var listt=document.getElementById(_DropDownObject);listt.options.length = 0 ; 
		     listt.options[listt.options.length]=new Option("Loading...","0");
			 Arena.DealerFillCITY(state,dealerFillCity_CallBack);
	   }
		function dealerCity(DD_State,DD_City)
		{
		
		   
		     var state=document.getElementById('DD_State').value;
		     var city=document.getElementById('DD_City').value;
		      document.getElementById('hdnState').value=state;
		     _DropDownObject=DD_City;
		     var listt=document.getElementById(_DropDownObject);listt.options.length = 0 ; 
		     listt.options[listt.options.length]=new Option("Loading...","0");
			 Arena.DealerCITY(state,dealerCity_CallBack);
	   }
		function ArenaEnqueryLocation(DD_City,DD_Location)
		{
		
		     var city=document.getElementById('DD_City').value;
		    
		     document.getElementById('hdnCityName').value=city;
		     _DropDownObject=DD_Location;
		     var listt=document.getElementById(_DropDownObject);listt.options.length = 0 ; 
		     listt.options[listt.options.length]=new Option("Loading...","0");
			
			 Arena.ArenaEnqueryLocation(city,ArenaEnqueryLocation_CallBack);
	    }
	    function ArenaEnqueryLocation_CallBack(response) 
		{
		
		var objTable = response.value;
		var count=0;
		var NoOfRows;
		if(objTable.Rows==null)
		{
			count=1;
			NoOfRows=objTable.length;
		}

		else
		{
			count=2;
			NoOfRows=objTable.Rows.length;
		}

	   
		if(objTable == null || typeof(objTable) != "object") { return; } 
		 
		var list=document.getElementById(_DropDownObject);list.options.length = 0 ; 
		list.options[list.options.length]=new Option("Select Location","0");
		
			
		for(var i = 0 ; i < NoOfRows; i++) 
		{    
			
			if(count==1)
			{
				list.options[list.options.length] = new Option(objTable[i].LOCATION,objTable[i].LOCATION);
				
			}
			else
			{
				list.options[list.options.length] = new Option(objTable.Rows[i].LOCATION,objTable.Rows[i].LOCATION);
			}
		}

		//list.options[list.options.length]=new Option("All","A");
	
	}
	   
		function dealerLocation(DD_DealerCity,DD_DealerLocation)
		{
		
		   
		     var city=document.getElementById('DD_DealerCity').value;
		     document.getElementById('hdnCityName1').value=city;
		     _DropDownObject=DD_DealerLocation;
		     var listt=document.getElementById(_DropDownObject);listt.options.length = 0 ; 
		     listt.options[listt.options.length]=new Option("Loading...","0");
			 Arena.DealerLocation(city,dealerLocation_CallBack);
	    }
	 
	function dealerFillCity_CallBack(response) 
		{
			
		var objTable = response.value;
		
		var count=0;
		var NoOfRows;
		if(objTable.Rows==null)
		{
			count=1;
			NoOfRows=objTable.length;
			//alert(NoOfRows);
		}

		else
		{
			count=2;
			NoOfRows=objTable.Rows.length;
			//alert(NoOfRows);
		}

	   
		if(objTable == null || typeof(objTable) != "object") { return; } 
		 
		var list=document.getElementById(_DropDownObject);list.options.length = 0 ; 
		list.options[list.options.length]=new Option("Select City","0");
			
		for(var i = 0 ; i < NoOfRows; i++) 
		{    
			if(count==1)
			{	
				list.options[list.options.length] = new Option(objTable[i].CITY,objTable[i].CITY);
				
			}
			else
			{
				list.options[list.options.length] = new Option(objTable.Rows[i].CITY,objTable.Rows[i].CITY);
			}
		}
	
	}
	   
		function dealerCity_CallBack(response) 
		{
			
		var objTable = response.value;
		
		var count=0;
		var NoOfRows;
		if(objTable.Rows==null)
		{
			count=1;
			NoOfRows=objTable.length;
			//alert(NoOfRows);
		}

		else
		{
			count=2;
			NoOfRows=objTable.Rows.length;
			//alert(NoOfRows);
		}

	   
		if(objTable == null || typeof(objTable) != "object") { return; } 
		 
		var list=document.getElementById(_DropDownObject);list.options.length = 0 ; 
		list.options[list.options.length]=new Option("Select City","0");
			
		for(var i = 0 ; i < NoOfRows; i++) 
		{    
			if(count==1)
			{	
				list.options[list.options.length] = new Option(objTable[i].CITY,objTable[i].CITY);
				
			}
			else
			{
				list.options[list.options.length] = new Option(objTable.Rows[i].CITY,objTable.Rows[i].CITY);
			}
		}
	
	}

	function dealerLocation_CallBack(response) 
		{
		
		var objTable = response.value;
		var count=0;
		var NoOfRows;
		if(objTable.Rows==null)
		{
			count=1;
			NoOfRows=objTable.length;
		}

		else
		{
			count=2;
			NoOfRows=objTable.Rows.length;
		}

	   
		if(objTable == null || typeof(objTable) != "object") { return; } 
		 
		var list=document.getElementById(_DropDownObject);list.options.length = 0 ; 
		list.options[list.options.length]=new Option("Select","0");
		
			
		for(var i = 0 ; i < NoOfRows; i++) 
		{    
			
			if(count==1)
			{
				list.options[list.options.length] = new Option(objTable[i].LOCATION,objTable[i].LOCATION);
				
			}
			else
			{
				list.options[list.options.length] = new Option(objTable.Rows[i].LOCATION,objTable.Rows[i].LOCATION);
			}
		}

		//list.options[list.options.length]=new Option("All","A");
	
	}
	
