
		var strOcc;
		var strFor;
		var strType;
		var strRange;
		var bTypeDone;
		var bOccDone;
		var bForDone;
		
		function getCurrentSelections()
		{
			var selobjOcc;
			var selobjType;
			var selobjFor;
			var hidobjRange;
			hidobjRange = document.SearchForm.hiddenRange
			if( hidobjRange != null)
			{
				strRange = hidobjRange.value;
			}
			else
			{
				strRange = document.SearchForm.rng.value;
			}
			selobjOcc = document.SearchForm.OccSelect;
			if( selobjOcc != null )
			{
				strOcc = selobjOcc.options[selobjOcc.selectedIndex].text;
			}
			else
			{
				strOcc = document.SearchForm.occ.value;
			}
			selobjType = document.SearchForm.TypeSelect;
			if( selobjType != null )
			{
				strType = selobjType.options[selobjType.selectedIndex].text;
			}
			else
			{
				strType = document.SearchForm.adj.value;
			}
			selobjFor = document.SearchForm.ForSelect;
			if( selobjFor != null )
			{
				strFor = selobjFor.options[selobjFor.selectedIndex].text;
			}
			else
			{
				strFor = document.SearchForm.who.value;
			}
		}
		
		/*
		function getCurrentSelections()
		{
			
			strRange = document.SearchForm.rng.value;
			strOcc = document.SearchForm.occ.value;
			strType = document.SearchForm.adj.value;
			strFor = document.SearchForm.who.value;
		}
		*/
		function OccOption_ChangeHandler()
		{
			bTypeDone = false;
			bOccDone = false;
			bForDone = false;
			getCurrentSelections();
			if( strType == "[all]" && !bTypeDone )
			{
				GetTypeDropDown( strOcc, strFor );
				bTypeDone = true;
			}
			else if( strFor == "[all]" && !bForDone )
			{
				GetForDropDown( strOcc, strType );
				bForDone = true;
			}
		}
		
		function TypeOption_ChangeHandler()
		{
			bTypeDone = false;
			bOccDone = false;
			bForDone = false;
			getCurrentSelections();
			if( strOcc == "[all]" && !bOccDone )
			{
				GetOccDropDown( strType, strFor );
				bOccDone = true;
			}
			else if( strFor == "[all]" && !bForDone )
			{
				GetForDropDown( strOcc, strType );
				bForDone = true;
			}
		}
		
		function ForOption_ChangeHandler()
		{
			bTypeDone = false;
			bOccDone = false;
			bForDone = false;
			getCurrentSelections();
			if( strType == "[all]" && !bTypeDone )
			{
				GetTypeDropDown( strOcc, strFor );
				bTypeDone = true;
			}
			else if( strOcc == "[all]" && !bOccDone )
			{
				GetOccDropDown( strType, strFor );
				bOccDone = true;
			}
		}
////////////////////////////////////////////////////////////		
		function GetOccDropDown( strType, strFor )
		{ 
			//debugger;
			
			//Append the name to search for to the requestURL 
			//alert(strName);
			var url = requestURL + "GetSearchDropDowns.asp?type=" + strType + "&for=" + strFor; 
	            
			//Create the xmlHttp object to use in the request 
			//stateChangeHandler will fire when the state has changed, i.e. data is received back 
			// This is non-blocking (asynchronous) 
			xmlHttp = GetXmlHttpObject(occStateChangeHandler); 
	            
			//Send the xmlHttp get to the specified url 
			xmlHttp_Get(xmlHttp, url, true); 

		} 

		//stateChangeHandler will fire when the state has changed, i.e. data is received back 
		// This is non-blocking (asynchronous) 
		function occStateChangeHandler() 
		{ 
			//readyState of 4 or 'complete' represents that data has been returned 
			if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
			{ 
				if(xmlHttp.status == 200)
				{
					//Gather the results from the callback 
					var str = xmlHttp.responseText; 

					//Populate the innerHTML of the div with the results
					
					document.getElementById('OccOptions').innerHTML = str; 
					if( strType == "[all]" && !bTypeDone )
					{
						GetTypeDropDown( strOcc, strFor );
						bTypeDone = true;
					}
					else if( strFor == "[all]" && !bForDone )
					{
						GetForDropDown( strOcc, strType );
						bForDone = true;
					}
				}
				else
				{
					document.getElementById('OccOptions').innerHTML = "<select class='searchSelector' onchange='OccOption_ChangeHandler();' name='OccSelect'><option>[all]</option></select>";
				}
			} 
		} 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////		
		function GetTypeDropDown( strOcc, strFor )
		{ 
			//debugger;

			//Append the name to search for to the requestURL 
			//alert(strName);
			var url = requestURL + "GetSearchDropDowns.asp?occ=" + strOcc + "&for=" + strFor; 
	            
			//Create the xmlHttp object to use in the request 
			//stateChangeHandler will fire when the state has changed, i.e. data is received back 
			// This is non-blocking (asynchronous) 
			xmlHttp = GetXmlHttpObject(typeStateChangeHandler); 
	            
			//Send the xmlHttp get to the specified url 
			xmlHttp_Get(xmlHttp, url, true); 

		} 

		//stateChangeHandler will fire when the state has changed, i.e. data is received back 
		// This is non-blocking (asynchronous) 
		function typeStateChangeHandler() 
		{ 
			//readyState of 4 or 'complete' represents that data has been returned 
			if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
			{ 
				if( xmlHttp.status == 200 )
				{
					//Gather the results from the callback 
					var str = xmlHttp.responseText; 

					//Populate the innerHTML of the div with the results
					
					document.getElementById('TypeOptions').innerHTML = str; 
					
					if( strOcc == "[all]" && !bOccDone )
					{
						GetOccDropDown( strType, strFor );
						bOccDone = true;
					}
					else if( strFor == "[all]" && !bForDone )
					{
						GetForDropDown( strOcc, strType );
						bForDone = true;
					}
				}
				else
				{
					document.getElementById('TypeOptions').innerHTML = "<select class='searchSelector' onchange='TypeOption_ChangeHandler();' name='TypeSelect'><option>[all]</option></select>";
				}
			} 
		} 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////		
		function GetForDropDown( strOcc, strType )
		{ 
			//debugger;
			
			//Append the name to search for to the requestURL 
			//alert(strName);
			var url = requestURL + "GetSearchDropDowns.asp?occ=" + strOcc + "&type=" + strType; 
	            
			//Create the xmlHttp object to use in the request 
			//stateChangeHandler will fire when the state has changed, i.e. data is received back 
			// This is non-blocking (asynchronous) 
			xmlHttp = GetXmlHttpObject(forStateChangeHandler); 
	            
			//Send the xmlHttp get to the specified url 
			xmlHttp_Get(xmlHttp, url, true); 

		} 

		//stateChangeHandler will fire when the state has changed, i.e. data is received back 
		// This is non-blocking (asynchronous) 
		function forStateChangeHandler() 
		{ 
			//readyState of 4 or 'complete' represents that data has been returned 
			if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
			{ 
				if( xmlHttp.status == 200 )
				{
					//Gather the results from the callback 
					var str = xmlHttp.responseText; 

					//Populate the innerHTML of the div with the results
					
					document.getElementById('ForOptions').innerHTML = str; 
					if( strType == "[all]" && !bTypeDone )
					{
						GetTypeDropDown( strOcc, strFor );
						bTypeDone = true;
					}
					else if( strOcc == "[all]" && !bOccDone )
					{
						GetOccDropDown( strType, strFor );
						bOccDone = true;
					}
				}
				else
				{
					document.getElementById('ForOptions').innerHTML = "<select class='searchSelector' onchange='ForOption_ChangeHandler();' name='ForSelect'><option>[all]</option></select>";
				}
			} 
		} 
////////////////////////////////////////////////////////////////////
