// JavaScript Document
			var request;
			var response;

			var subcategory = document.getElementById("sub_category");			
            var status = document.getElementById('aja_cnts2');

			function populateCategory()			{
				
				var cat_id = document.getElementById("sel_category");				
				if(cat_id.options[cat_id.selectedIndex].value != '')
				//Check if the selectedItem as not "--Select--"
				{
					return SendRequest2(cat_id.options[cat_id.selectedIndex].value);
				}
				else
				{
					clearSelect2(city);//Clear the Territory dropdown
					status.innerText = "";//Blank the status text label
				}
			}
			function InitializeRequest2()
			{
				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 SendRequest2(ID)
			{			
				var url = "http://www.intldirectoryonline.com/ajaxcategory.asp?ID="+ID;//Create the url to send the request to
				document.getElementById('aja_cnts2').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.linkpage.sub_category.options.length = 1;
				InitializeRequest2();//Call InitializeRequest to set request object									
				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.			
			}

			function ProcessRequest2()
			{
				 if(request.readyState == 4)//If the readyState is in the "Ready" state
					   {					
					   	   var answer = request.responseText;						  
						   var myString=new Array();						   
						   splitString = answer.split(",");
						   document.linkpage.sub_category.options.length = 1;
						   document.getElementById('aja_cnts2').innerHTML='<span class="style4">Sub Category</span>';
						   if(splitString.length > 2)					   
						       
						     { 
							   for (var loop = 0; loop < splitString.length-1; loop++) {
									 document.linkpage.sub_category.options[loop] = new Option(splitString[loop],splitString[loop]);
								 }
							 }	 
		                  else  
						  {  
						  document.linkpage.sub_category.options[0]=new Option("No category found","No category found");  
						  }						       
					  }		
					  
				  return true;//return
			}		   
           function clearSelect2()
           {
              //Set the select box's length to 1 
             //so only "--Select--" is available in the selection on calling this function.
            document.linkpage.sub_category.options.length = 1;
             //You may want to write your own clearSelect logic
          }
   
			
