/******************************************************************************
 * Javascript for the Directory: Master, Domestic
 *****************************************************************************/
var master_domestic = {};

/******************************************************************************
 * variables
 *****************************************************************************/
master_domestic.handleCountryChange = function() {
	try {
	
		// get the region id
		var iRegionId = $("#sel_region_id").val();

		window.location = window.location.pathname + "?sel_region_id=" + iRegionId;
		 	
	} catch (e) {
		publishException(e);
	}	
}

/******************************************************************************
 * Add the master_domestic namespace to the directory namespace
 *****************************************************************************/
directory.master_domestic = master_domestic;

/******************************************************************************
 * Wireup Events
 *****************************************************************************/
$(document).ready(function () {
	
	// wire up the form to submit when someone changes the country
	$("#sel_region_id").change(master_domestic.handleCountryChange);
	
	// hide the submit button
	$("#cmd_submit_master_franchise_region_filter").hide();

});
