// ajax_functions.js
function getDistrictsByRegion(selectElement) {
	var params = Form.serializeElements(new Array(selectElement));
	if (params != null && params.length > 0) {
		new Ajax.Updater('districtNumbers', '/SearsStatus/regionDistrictView.do', {
			method: 'post',
			parameters: params		
		});
	} else {
		new Ajax.Updater('districtNumbers', '/SearsStatus/regionDistrict/ajax/regionDistrictViewResultsBlank.jsp', {
			method: 'get'
		});
	}
}

function getStoreMachineResultsReport(formElement) {
	// Display Generating
	new Ajax.Updater('storeMachineReport', '/SearsStatus/regionDistrict/ajax/storeMachinesFilteredResultsLoading.jsp', {
		method: 'get'
	});
	// Display Report
	var params = Form.serialize(formElement);
	new Ajax.Updater('storeMachineReport', '/SearsStatus/storeMachinesFilteredResults.do', {
		method: 'post',
		parameters: params	
	});
}

