// JavaScript Document
			var request;
			var response;

			var city = document.getElementById("city");			
            var status = document.getElementById('aja_cnts');

			function populateTerritory()
			{
				var country = document.getElementById("Country");
				if(country.options[country.selectedIndex].value != '')
				//Check if the selectedItem as not "--Select--"
				{
					return SendRequest(country.options[country.selectedIndex].value);
				}
				else
				{
					clearSelect(city);//Clear the Territory dropdown
					status.innerText = "";//Blank the status text label
				}
			}
			function InitializeRequest()
			{
				try
				{
					request = new ActiveXObject("Microsoft.XMLHTTP");//Try creating an XMLHTTP Object
				}
				catch(Ex)
				{
					try
					{
						request = new ActiveXObject("Microsoft.XMLHTTP");//First failure, try again creating an XMLHTTP Object
					}
					catch(Ex)
					{
						request = null;//Else assign null to request
					}
				}

				if(!request&&typeof XMLHttpRequest != 'undefined')
				{
					request = new XMLHttpRequest();
				}
			}

			function SendRequest(ID)
			{				
				document.getElementById('aja_cnts').innerHTML="<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://www.download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 width=107 height=18><param name=movie value=http://www.moverworldwide.com/loadcity.swf><param name=quality value=high><param name=wmode value=transparent><embed src=http://www.moverworldwide.com/loadcity.swf quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=107 height=18 wmode=transparent></embed></object>";//Set the status to "Loading....."
				document.search.city.options.length = 1;
				InitializeRequest();//Call InitializeRequest to set request object
				if(ID=="United States" || ID=="United Kingdom" || ID=="Brazil" || ID=="Canada" || ID=="Australia")
				 {
					var url = "http://www.moverworldwide.com/ajaxstatename.asp?ID="+ID;//Create the url to send the request to
					request.open("GET", url, true);//Open a GET request to the URL
					request.onreadystatechange = ProcessRequest2;//Delegate ProcessRequest to onreadystatechange property so it gets called for every change in readyState value
					request.send(null);//Send the request with a null body.
				 }
				else	
				 {
				    var url = "http://www.moverworldwide.com/ajaxcityname.asp?ID="+ID;//Create the url to send the request to
				    request.open("GET", url, true);//Open a GET request to the URL
					request.onreadystatechange = ProcessRequest;//Delegate ProcessRequest to onreadystatechange property so it gets called for every change in readyState value
					request.send(null);//Send the request with a null body.
			     }					
			}

			function ProcessRequest()
			{
				 if(request.readyState == 4)//If the readyState is in the "Ready" state
					   {					  
						   var answer = request.responseText;
						   var myString=new Array();
						   splitString = answer.split(",");
						   document.search.city.options.length = 1;
						   document.getElementById('aja_cnts').innerHTML='<span class="style4">Search by City</span>';
						   if(splitString.length > 2)					   
						       
						     { 
							   for (var loop = 0; loop < splitString.length-1; loop++) {
									 document.search.city.options[loop] = new Option(splitString[loop],splitString[loop]);
								 }
							 }	 
		                  else  
						  {  
						  document.search.city.options[0]=new Option("No City Found","No City Found");  
						  }						       
					  }					
				  return true;//return
			}
		   function ProcessRequest2()
			{
				 if(request.readyState == 4)//If the readyState is in the "Ready" state
					   {					  
						  
						   var j=2;							   		 
						   var answer = request.responseText;
						   var myString=new Array();
						   splitString = answer.split(",");						   
						   var m=Math.round(splitString.length/2);							   					  
						   document.search.city.options.length = 1;
						   document.getElementById('aja_cnts').innerHTML='<span class="style4">Search by City</span>';
						   if(splitString.length > 1)						     
						      { 							  
							   	   document.search.city.options[0] = new Option("All States","All States");
								   for (var loop=1; loop < m-1;) {							 			   
										  document.search.city.options[loop] = new Option(splitString[j],splitString[j+1]);
										  j=j+2;	
										  loop=loop+1;								  
									 }							    						  	 	 
							  }	 
		                   else  
						  {  
						      document.search.city.options[0]=new Option("No State Found","No State Found");  
						  }						       
					     }					
				  return true;//return
			}			
			
           function clearSelect()
           {
              //Set the select box's length to 1 
             //so only "--Select--" is available in the selection on calling this function.
            document.search.city.options.length = 1;
             //You may want to write your own clearSelect logic
          }
   
			
