// Simple form processing functions.

//Set up the state and country events.
statebox = document.getElementById("State");
countrybox = document.getElementById("Country");

if (statebox && countrybox) {
	statebox.onchange = updateCountry;
}

function updateCountry() {
	if (statebox.selectedIndex > 0 && countrybox.selectedIndex <= 0) {
		//Automatically select the USA if a state is chosen.
		countrybox.options.namedItem("USA").selected = true;
	}
}
