<!--
	//filename:		navigation.js
	//project:		www.altsales.com
	//description:	used for the dropdown menus of the main site navigation links
	
	//initialize the capture ID
	var lngLastDropdownVisible = 0;
	var objDropdownTimer;
	
	function DisplayDropdown( lngParentID )
	{
		//clear any set timeout
		DropdownActive();
		
		//check for a visible dropdown
		if ( objDropdown = document.getElementById( "NavDropdown" + lngLastDropdownVisible ) )
		{
			objDropdown.style.display = "none";
		}
		
		//display the dropdown being called
		if ( objDropdown = document.getElementById( "NavDropdown" + lngParentID ) )
		{
			objDropdown.style.display = "block";
		}
		
		//capture the dropdown ID
		lngLastDropdownVisible = lngParentID;
		return;
	}
	
	function HideDropdown( lngParentID )
	{
		//set the timeout to hide the visible subnavigation
		objDropdownTimer = setTimeout( "HideDropdownDo(" + lngParentID + ")", 500 );
	}
	
	function HideDropdownDo( lngParentID )
	{
		//hide the dropdown
		if ( objDropdown = document.getElementById( "NavDropdown" + lngParentID ) )
		{
			objDropdown.style.display = "none";
		}
		
		//clear any captured dropdown ID
		lngLastDropdownVisible = 0;
		return;
	}
	
	function DropdownActive()
	{
		//clear any timeout set by the HideDropdown function
		clearTimeout( objDropdownTimer );
	}
	
	function SearchSite( strControlID )
	{
		if ( objTerms = document.getElementById( strControlID ) )
		{
			if ( objTerms.value == '' )
			{
				alert( "Please provide your search criteria." );
				return;
			}
			window.location = "search/search.pl?terms=" + objTerms.value;
		}
	}
//-->