// Define arrays for the option drop-down menus
var one_bedroom = new Array("Davenport", "Eagle's Nest", "Lucerne", "The Outdoor Life Dream Cabin", "Retreat", "Rockwood", "Summit");
var one_bedroom_locations = new Array("blueprints_davenport.php", "blueprints_eagles_nest.php", "lucerne.php", "blueprints_outdoorlife.php", "retreat.php", "rockwood.php", "summit.php");
var three_bedroom = new Array("A Frame", "Belmont", "Berkshire", "Burlington", "Cambridge", "Concord", "Crestmont", "The Field and Stream Dream Cabin", "Hancock", "Harborside", "Kentuckian", "Kineo", "Kingston", "Lexington", "Nantucket", "Newport", "Oakridge", "Rangeley", "Regal", "Sherwood", "Springfield", "Tennessean", "Trenton", "Westfield", "Winthrop", "Yarmouth");
var three_bedroom_locations = new Array("blueprints_a_frame.php", "blueprints_belmont.php", "blueprints_berkshire.php", "blueprints_burlington.php", "blueprints_cambridge.php", "blueprints_concord.php", "blueprints_crestmont.php", "blueprints_fieldstream.php", "blueprints_hancock.php", "blueprints_harborside.php", "blueprints_kentuckian.php", "blueprints_kineo.php", "blueprints_kingston.php", "blueprints_lexington.php", "blueprints_nantucket.php", "blueprints_newport.php", "blueprints_oakridge.php", "blueprints_rangeley.php", "blueprints_regal.php", "blueprints_sherwood.php", "blueprints_springfield.php", "blueprints_tennessean.php", "blueprints_trenton.php", "blueprints_westfield.php", "blueprints_winthrop.php", "blueprints_yarmouth.php");
var four_bedroom = new Array("Aspen", "Bedford", "Bingham", "Bristol", "Greenville", "New Bedford");
var four_bedroom_locations = new Array("blueprints_aspen.php", "blueprints_bedford.php", "blueprints_bingham.php", "blueprints_bristol.php", "blueprints_greenville.php", "blueprints_new_bedford.php");
var garages = new Array("Gambrel Garage", "Standard Garages");
var garages_locations = new Array("blueprints_gambrel_garage.php", "blueprints_standard_garages.php");

function SwapOptions (the_array_name)
{
  if (document.plannav.bedrooms.selectedIndex == 0) {
    document.plannav.plans.length = 1;
    }
  else {
      // Set the length of the sub-menu
      document.plannav.plans.length = eval(the_array_name).length + 1;
      // Run through the array and assign values to the tour menu
      for (loop = 0; loop < eval(the_array_name).length; loop++)
      {
        document.plannav.plans[loop+1].text = eval(the_array_name)[loop];
        document.plannav.plans[loop+1].value = eval(the_array_name+'_locations')[loop];
      } // end of for
    } // end of else
  
} // end of SwapOptions function