function submitForm($input_form, $handler_url, $output_div) {
	//$($output_div).show();
	new Ajax.Updater($output_div, $handler_url, {
		method: 'post',
		parameters: $($input_form).serialize(true),
		onLoading: function(req) {
			$($output_div).innerHTML = "Your request is processing...";
		},
		onFailure: function() {
			$($output_div).innerHTML = "Request failed. Please try again in a moment.";
		},
		onException: function() {
			$($output_div).innerHTML = "Request failed. Please try again in a moment.";
		}
	});
}

function loadDIV($output_div, $handler_url) {
	new Ajax.Updater($output_div, $handler_url, {
		method: 'post',
		onLoading: function(req) {
			$($output_div).innerHTML = "List is loading...";
		},
		onFailure: function() {
			$($output_div).innerHTML = "Request failed. Please try again in a moment.";
		},
		onException: function() {
			$($output_div).innerHTML = "Request failed. Please try again in a moment.";
		}
	});
}

function selectCountry() {
	if (document.dist_form.country.value == 'United States') {
		$('state_wrapper').show();
	}
	else {
		$('state_wrapper').hide();
	}
}