function quicksearchChangeCountry(objCountry) {
	countryID = objCountry.options[objCountry.selectedIndex].value;
	objRegionBlock = document.getElementById('quicksearchRegion');
	objLocationValue = document.getElementById('quicksearchLocationValue');
	if(objRegionBlock && objLocationValue) {
		objLocationValue.value = countryID;
		if(countryID != '') {
			objRegionBlock.style.display = 'block';
			strURL = 'include/search/quick/countryregion-region.php?country=' + countryID + '&ajaxSTR=';
			var ajax = new Ajax.Updater(
				{success: 'quicksearchRegion'},
				strURL,
				{method: 'get', onFailure: reportQuickSearchError});
		} else {
			objRegionBlock.style.display = 'none';
		}
	}
}

function quicksearchChangeRegion(objRegion) {
	regionID = objRegion.options[objRegion.selectedIndex].value;
	objLocationValue = document.getElementById('quicksearchLocationValue');
	if(objLocationValue) {
		objLocationValue.value = regionID;
	}
}

function reportQuickSearchError() {
        document.getElementById('quicksearchLocation').display = 'none';
}
