	function SetValue( select, index, value, text )
	{
		select.options[index].text = text;
		select.options[index].value = value;
	}
	function AdjustSize( length,ref )
	{
		ref.options.length = length;
	}
	function PopulateBoxes( sectorChoice, tradeChoice )
	{
		var sectorBox = document.frmSearch.state;
		var tradeBox = document.frmSearch.county;
			AdjustSize( ArSectorTypes.length,sectorBox );
			var GetRef = 0;
		for( var i = 0; i < ArSectorTypes.length; i++ )
		{
			if( sectorChoice == ArSectorTypes[i][0][1] )
				GetRef = i;
			SetValue( sectorBox, i, ArSectorTypes[i][0][1], ArSectorTypes[i][0][0] );
			sectorBox.selectedIndex = GetRef;
		}
		DropDownVal(tradeChoice);
	}
	function DropDownVal( tradeChoice )
	{
		var sectorBox = document.frmSearch.state;
		var tradeBox = document.frmSearch.county;
		var valChoice;
		valChoice = sectorBox.options[sectorBox.selectedIndex].text;
		for( var i = 0; i < ArSectorTypes.length; i++ )
		{
			if( ArSectorTypes[i][0][0] == valChoice )
			{
				AdjustSize(  ArSectorTypes[i][1].length, tradeBox  );
				var GetRef = 0;
				for( var j = 0; j < ArSectorTypes[i][1].length; j++ )
				{
					if( tradeChoice == ArSectorTypes[i][1][j][1] )
						GetRef = j;
					SetValue( tradeBox, j, ArSectorTypes[i][1][j][1], ArSectorTypes[i][1][j][0] );
				}
				tradeBox.selectedIndex = GetRef;
				break;
			}
		}
	}



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
