// JavaScript Document

/* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com
Created by: Jerome Caron |  */
prog = new Array(
				new Array(
					"--- Select a Program ---",
					"Farm Animals/Farm Chores",
					"Farmyard Program (Spring/Fall Only)",
					"Farmyard Station Program (Spring/Summer/Fall Only)",
					"Monarch Butterfly Program (Dec-Mid-Feb Only)",
					"Treasures of the Trunk (Spring/Fall Only)",
					"Wonderful Wool"
				),  // Black Diamond programs				
				new Array(				
					"--- Select a Program ---",
					"Black Diamond Geology",
					"California Mining History",
					"Chaparral Nature Trek",
					"Delta Wetlands Walk",
					"Five Senses Walk",
					"Hazel-Atlas Mine Tour",
					"Martinez Marsh Exploration",
					"Reptile Rendezvous",
					"Rose Hill Cemetery"
				),  // Coyote Hills programs
				new Array(
					"--- Select a Program ---",
					"Coyote Hills Discovery Hike",
					"Coyote Hills Nature Walk",
					"Cultural Immersion Program",
					"Garin Nature Walk",
					"Ohlone Peoples and the Landscape",
					"Ohlone Cultures",
					"Tuibun Ohlone Village Site"
				), // Crab Cove programs
				new Array(				
					"--- Select a Program ---",
					"Bay Laboratory (Spring Only)",
					"Birds Around the Bay (Fall/Early Spring Only)",
					"Cove Days (Spring Only)",
					"Creatures of the Bay",
					"Food Chains",
					"Habitats of the Bay-estuary",
					"Nature Walks (Anthony Chabot)",
					"Nature Walks (Huckleberry)",
					"Nature Walks (Lake Chabot)",
					"Nature Walks (Redwood)",
					"Nature Walks (Sibley)",
					"Nature Walks (Temescal)",
					"Redwood Forest Rendezvous",
					"Shoreline Nature Programs (Crown Beach)",
					"Shoreline Nature Programs (MLK Jr.)",
					"Shoreline Nature Programs (Oyster Bay)"
				), //Southeast Sector (Sunol Area) programs			
				new Array(
					"--- Select a Program ---",
					"California History (winter/spring only)",
					"California Native Americans",
					"Geology: If Rocks Could Talk",
					"Nature Programs",
					"The History of the Land: Adventure Hikes",
					"The Nature of the Land: Adventure Hikes",
					"Stream Studies, Watershed and Water Sampling",
					"Watershed Ecology Boat Tour"
				),  // TNA programs
				new Array(
					"--- Select a Program ---",
					"Amazing Adaptations",
					"Animal Signs and Homes",
					"Changes Through the Seasons",
					"Farm Tour",
					"Green and Growing", 
					"Habitat Hunters",
					"Native American Lifestyles",
					"Nature Ramble",
					"Pond Study (Mar-Oct Only)",
					"Re-Storying the Land",
					"Sensory Hike",
					"Wet 'n Wild Watersheds",
					"Wild and Native",
					"Wildlife - Reptiles",
					"Wildlife - Amphibians (Nov-May Only)",
					"Wildlife - Birds",
					"Wildlife - Mammals",
					"Wildlife - Insects (Mar-Oct Only)",
					"Wildlife - Spiders (Sep-Oct & Mar Only)"
				)

		);
		
function fillSelectFromArray(selectCtrl, itemArray, selectVC, selectCtrl2) {
	// selectCtrl == the option list that will be filled up
	// itemArray == prog[] array with the selection index of VC

	var i, j=0;
	// empty existing items
	for (i = selectCtrl.options.length; i >= 0; i--) {
		selectCtrl.options[i] = selectCtrl2.options[i] = null;
	}

	// populate sub list
	if (itemArray != null) {	
		// add new items
		for (i = 0; i < itemArray.length; i++) {
			selectCtrl.options[j] = new Option(itemArray[i]);
			selectCtrl2.options[j] = new Option(itemArray[i]);
			if (itemArray[i] != null) {
				selectCtrl.options[j].value = selectCtrl2.options[j].value = itemArray[i];					
			}					
		j++;
		}		
	// select first item for sub list
	selectCtrl.options[0].selected = true;
	selectCtrl2.options[0].selected = true;
	}

}

