function ajax_update_home_specials () {

	var myAjaxHandler = new ajaxHandler ();
	myAjaxHandler.make_http_request (
		"/ajax/front/home_list_specials.php"
		);
}











function ajax_update_address_countries (formName, countryIdFieldId, countryTextFieldId, stateIdFieldId, stateTextFieldId, suburbIdFieldId, suburbTextFieldId, useTextField) {

	var countryId = '';
	var countryText = '';
	var stateId = '';
	var stateText = '';
	var suburbId = '';
	var suburbText = '';

	if (typeof (useTextField) == 'undefined')
		useTextField = '';

	var temp;
	temp = get_object (countryIdFieldId);
	if (typeof (temp) != 'undefined') {
		countryId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (countryTextFieldId);
	if (typeof (temp) != 'undefined') {
		countryText = temp.value;
		temp.disabled = true;
	}

	temp = get_object (stateIdFieldId);
	if (typeof (temp) != 'undefined') {
		stateId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (stateTextFieldId);
	if (typeof (temp) != 'undefined') {
		stateText = temp.value;
		temp.disabled = true;
	}

	temp = get_object (suburbIdFieldId);
	if (typeof (temp) != 'undefined') {
		suburbId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (suburbTextFieldId);
	if (typeof (temp) != 'undefined') {
		suburbText = temp.value;
		temp.disabled = true;
	}


	ajaxManager.use_ajax_handler (countryIdFieldId);	// use countryIdFieldId to uniquely identify this address in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_address_locations.php?"
		+ "formName=" + formName
		+ "&countryDivId=" + countryIdFieldId + "Div"
		+ "&countryIdFieldId=" + countryIdFieldId
		+ "&countryTextFieldId=" + countryTextFieldId
		+ "&countryIdFieldName=" + countryIdFieldId
		+ "&countryTextFieldName=" + countryTextFieldId
		+ "&countryId=" + countryId
		+ "&countryText=" + countryText
		+ "&stateDivId=" + stateIdFieldId + "Div"
		+ "&stateIdFieldId=" + stateIdFieldId
		+ "&stateTextFieldId=" + stateTextFieldId
		+ "&stateIdFieldName=" + stateIdFieldId
		+ "&stateTextFieldName=" + stateTextFieldId
		+ "&stateId=" + stateId
		+ "&stateText=" + stateText
		+ "&suburbDivId=" + suburbIdFieldId + "Div"
		+ "&suburbIdFieldId=" + suburbIdFieldId
		+ "&suburbTextFieldId=" + suburbTextFieldId
		+ "&suburbIdFieldName=" + suburbIdFieldId
		+ "&suburbTextFieldName=" + suburbTextFieldId
		+ "&suburbId=" + suburbId
		+ "&suburbText=" + suburbText
		+ "&getCountries=Y"
		+ "&getStates=Y"
		+ "&getSuburbs=Y"
		+ "&useTextField=" + useTextField
		);
}

function ajax_update_address_states (formName, countryIdFieldId, countryTextFieldId, stateIdFieldId, stateTextFieldId, suburbIdFieldId, suburbTextFieldId, useTextField) {

	var countryId = '';
	var countryText = '';
	var stateId = '';
	var stateText = '';
	var suburbId = '';
	var suburbText = '';

	if (typeof (useTextField) == 'undefined')
		useTextField = '';

	var temp;
	temp = get_object (countryIdFieldId);
	if (typeof (temp) != 'undefined')
		countryId = temp.value;

	temp = get_object (countryTextFieldId);
	if (typeof (temp) != 'undefined')
		countryText = temp.value;

	temp = get_object (stateIdFieldId);
	if (typeof (temp) != 'undefined') {
		stateId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (stateTextFieldId);
	if (typeof (temp) != 'undefined') {
		stateText = temp.value;
		temp.disabled = true;
	}

	temp = get_object (suburbIdFieldId);
	if (typeof (temp) != 'undefined') {
		suburbId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (suburbTextFieldId);
	if (typeof (temp) != 'undefined') {
		suburbText = temp.value;
		temp.disabled = true;
	}


	ajaxManager.use_ajax_handler (countryIdFieldId);	// use countryIdFieldId to uniquely identify this address in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_address_locations.php?"
		+ "formName=" + formName
		+ "&countryDivId=" + countryIdFieldId + "Div"
		+ "&countryIdFieldId=" + countryIdFieldId
		+ "&countryTextFieldId=" + countryTextFieldId
		+ "&countryIdFieldName=" + countryIdFieldId
		+ "&countryTextFieldName=" + countryTextFieldId
		+ "&countryId=" + countryId
		+ "&countryText=" + countryText
		+ "&stateDivId=" + stateIdFieldId + "Div"
		+ "&stateIdFieldId=" + stateIdFieldId
		+ "&stateTextFieldId=" + stateTextFieldId
		+ "&stateIdFieldName=" + stateIdFieldId
		+ "&stateTextFieldName=" + stateTextFieldId
		+ "&stateId=" + stateId
		+ "&stateText=" + stateText
		+ "&suburbDivId=" + suburbIdFieldId + "Div"
		+ "&suburbIdFieldId=" + suburbIdFieldId
		+ "&suburbTextFieldId=" + suburbTextFieldId
		+ "&suburbIdFieldName=" + suburbIdFieldId
		+ "&suburbTextFieldName=" + suburbTextFieldId
		+ "&suburbId=" + suburbId
		+ "&suburbText=" + suburbText
//		+ "&getCountries=Y"
		+ "&getStates=Y"
		+ "&getSuburbs=Y"
		+ "&useTextField=" + useTextField
		);
}

function ajax_update_address_suburbs (formName, countryIdFieldId, countryTextFieldId, stateIdFieldId, stateTextFieldId, suburbIdFieldId, suburbTextFieldId, useTextField) {

	var countryId = '';
	var countryText = '';
	var stateId = '';
	var stateText = '';
	var suburbId = '';
	var suburbText = '';

	if (typeof (useTextField) == 'undefined')
		useTextField = '';

	var temp;
	temp = get_object (countryIdFieldId);
	if (typeof (temp) != 'undefined')
		countryId = temp.value;

	temp = get_object (countryTextFieldId);
	if (typeof (temp) != 'undefined')
		countryText = temp.value;

	temp = get_object (stateIdFieldId);
	if (typeof (temp) != 'undefined')
		stateId = temp.value;

	temp = get_object (stateTextFieldId);
	if (typeof (temp) != 'undefined')
		stateText = temp.value;

	temp = get_object (suburbIdFieldId);
	if (typeof (temp) != 'undefined') {
		suburbId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (suburbTextFieldId);
	if (typeof (temp) != 'undefined') {
		suburbText = temp.value;
		temp.disabled = true;
	}


	ajaxManager.use_ajax_handler (countryIdFieldId);	// use countryIdFieldId to uniquely identify this address in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_address_locations.php?"
		+ "formName=" + formName
		+ "&countryDivId=" + countryIdFieldId + "Div"
		+ "&countryIdFieldId=" + countryIdFieldId
		+ "&countryTextFieldId=" + countryTextFieldId
		+ "&countryIdFieldName=" + countryIdFieldId
		+ "&countryTextFieldName=" + countryTextFieldId
		+ "&countryId=" + countryId
		+ "&countryText=" + countryText
		+ "&stateDivId=" + stateIdFieldId + "Div"
		+ "&stateIdFieldId=" + stateIdFieldId
		+ "&stateTextFieldId=" + stateTextFieldId
		+ "&stateIdFieldName=" + stateIdFieldId
		+ "&stateTextFieldName=" + stateTextFieldId
		+ "&stateId=" + stateId
		+ "&stateText=" + stateText
		+ "&suburbDivId=" + suburbIdFieldId + "Div"
		+ "&suburbIdFieldId=" + suburbIdFieldId
		+ "&suburbTextFieldId=" + suburbTextFieldId
		+ "&suburbIdFieldName=" + suburbIdFieldId
		+ "&suburbTextFieldName=" + suburbTextFieldId
		+ "&suburbId=" + suburbId
		+ "&suburbText=" + suburbText
//		+ "&getCountries=Y"
//		+ "&getStates=Y"
		+ "&getSuburbs=Y"
		+ "&useTextField=" + useTextField
		);
}


function display_correct_address_type (formName, addressTypeRadioButtonName, streetAddressDivName, poBoxDivName, shopDivName) {
	eval ("addressTypeRadioButton = document." + formName + "." + addressTypeRadioButtonName + ";");

	indexCount = 0;
	if (streetAddressDivName != "")
		streetAddressIndex = indexCount++;
	if (poBoxDivName != "")
		poBoxIndex = indexCount++;
	if (shopDivName != "")
		shopIndex = indexCount++;

	if ((streetAddressDivName != "") && (addressTypeRadioButton[streetAddressIndex].checked == true)) {
		if (streetAddressDivName != "") display_div (streetAddressDivName);
		if (poBoxDivName != "") hide_div (poBoxDivName);
		if (shopDivName != "") hide_div (shopDivName);
	}
	else if ((poBoxDivName != "") && (addressTypeRadioButton[poBoxIndex].checked == true)) {
		if (streetAddressDivName != "") hide_div (streetAddressDivName);
		if (poBoxDivName != "") display_div (poBoxDivName);
		if (shopDivName != "") hide_div (shopDivName);
	}
	else if ((shopDivName != "") && (addressTypeRadioButton[shopIndex].checked == true)) {
		if (streetAddressDivName != "") hide_div (streetAddressDivName);
		if (poBoxDivName != "") hide_div (poBoxDivName);
		if (shopDivName != "") display_div (shopDivName);
	}
}

function ajax_update_home_search_regions (majorRegionId, majorRegionIdFieldId, topSpecialsMajorRegionId, regionIdFieldId) {
	var regionId = '';

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
//		majorRegionId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (topSpecialsMajorRegionId);
	if (typeof (temp) != 'undefined') {
//		majorRegionId = temp.value;
		temp.disabled = true;
	}
	
	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}

	// download the location select box changes
	ajaxManager.use_ajax_handler (majorRegionIdFieldId);	// use majorRegionIdFieldId to uniquely identify this majorRegion/region in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_home_search_locations.php?"
		+ "majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		);

	// download the top rated and most popular restaurant divs
	var postParameters = new Object ();
	postParameters.majorRegionId = majorRegionId;
	postParameters.regionId = regionId;

	gc_ajaxManager.request (
		"/ajax/front/update_home_top_restaurants.php",
		{	method: "post",
			parameters: postParameters },
		majorRegionIdFieldId + 'topRestaurants'
	);
}


function ajax_update_regular_region_selects (majorRegionIdFieldId, regionIdFieldId, mode) {
	var majorRegionId = '';
	var regionId = '';

	if (typeof (mode) == 'undefined')
		mode = '';

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
		temp.disabled = true;
	}
	
	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}

	// download the location select box changes
	ajaxManager.use_ajax_handler ("searchLocations" + mode);	// 
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_search_page_locations.php?"
		+ "majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		+ "&mode=" + mode
		);
}

function ajax_update_takeaway_region_selects (majorRegionIdFieldId, regionIdFieldId, width, newRegionId) {
	var majorRegionId = '';
	var regionId = '';

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
		temp.disabled = true;
	}
	
	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}

	var mode = 'takeawayDeliverySearch';
	if (($('cartType_pickUp') != null) && ($('cartType_pickUp').checked))
		mode = 'takeawayPickUpSearch';

	if (typeof (width) == 'undefined')
		width = '180px';

	if (typeof (newRegionId) == 'undefined')
		newRegionId = '';

	// download the location select box changes
	ajaxManager.use_ajax_handler ("takeawayLocations");	// 
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_search_page_locations.php?"
		+ "majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		+ "&mode=" + mode
		+ "&width=" + width
		+ "&regionIdFieldId=" + regionIdFieldId
		+ "&newRegionId=" + newRegionId
		);
}

function ajax_update_takeaway_delivery_region_selects (majorRegionIdFieldId, regionIdFieldId) {
	var majorRegionId = '';
	var regionId = '';

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
		temp.disabled = true;
	}
	
	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}

	// download the location select box changes
	ajaxManager.use_ajax_handler ("takeawayDeliveryLocations");	// 
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_search_page_locations.php?"
		+ "majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		+ "&mode=takeawayDeliverySearch"
		);
}

function ajax_update_takeaway_pick_up_region_selects (majorRegionIdFieldId, regionIdFieldId) {
	var majorRegionId = '';
	var regionId = '';

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
		temp.disabled = true;
	}
	
	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}

	// download the location select box changes
	ajaxManager.use_ajax_handler ("takeawayPickUpLocations");	// 
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_search_page_locations.php?"
		+ "majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		+ "&mode=takeawayPickUpSearch"
		);
}







function ajax_update_all_regions_search_page_regions (countryIdFieldId, majorRegionIdFieldId, regionIdFieldId, suffix) {
	var countryId = '';
	var majorRegionId = '';
	var regionId = '';

	if (typeof (suffix) == 'undefined')
		suffix = '';

	var temp;
	temp = get_object (countryIdFieldId);
	if (typeof (temp) != 'undefined') {
		countryId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}

	// download the location select box changes
	ajaxManager.use_ajax_handler (majorRegionIdFieldId);	// use majorRegionIdFieldId to uniquely identify this majorRegion/region in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_all_regions_search_page_locations.php"
		+ "?countryId=" + countryId
		+ "&majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		+ "&suffix=" + suffix
		+ "&nul=A"
	// nul=A is only used so that a cached version of the response that has been remembered is not used
	);
}

function ajax_update_all_regions_search_page_multiregions (countryIdFieldId, majorRegionIdFieldId, regionIdFieldId) {
	var countryId = '';
	var majorRegionId = '';
	var regionId = '';

	var temp;
	temp = get_object (countryIdFieldId);
	if (typeof (temp) != 'undefined') {
		countryId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}

	var multiRegionId = majorRegionIdFieldId.substring(majorRegionIdFieldId.indexOf("majorRegionId") + 13, majorRegionIdFieldId.length);
	alert (majorRegionIdFieldId + ", " + majorRegionIdFieldId.indexOf("majorRegionId") + ", " + majorRegionIdFieldId.length + ", " + multiRegionId);

	// download the location select box changes
	ajaxManager.use_ajax_handler (majorRegionIdFieldId);	// use majorRegionIdFieldId to uniquely identify this majorRegion/region in the form
	document.write (
		"/ajax/front/update_all_regions_search_page_locations.php"
		+ "?countryId=" + countryId
		+ "&majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		+ "&multiRegionId=" + multiRegionId
	);

}

function ajax_update_regions (formName, majorRegionIdFieldId, regionIdFieldId, searchResultsPage, showAll) {
	var majorRegionId = '';
	var regionId = '';

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
		temp.disabled = true;
	}

	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}


	ajaxManager.use_ajax_handler (majorRegionIdFieldId);	// use majorRegionIdFieldId to uniquely identify this region/suburb in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_locations.php?"
		+ "formName=" + formName
		+ "&majorRegionDivId=" + majorRegionIdFieldId + "Div"
		+ "&majorRegionIdFieldId=" + majorRegionIdFieldId
		+ "&majorRegionIdFieldName=" + majorRegionIdFieldId
		+ "&majorRegionId=" + majorRegionId
		+ "&regionDivId=" + regionIdFieldId + "Div"
		+ "&regionIdFieldId=" + regionIdFieldId
		+ "&regionIdFieldName=" + regionIdFieldId
		+ "&regionId=" + regionId
		+ "&getMajorRegions=Y"
		+ "&getRegions=Y"
		+ (showAll == true ? "&showAll=Y" : "")
		+ (searchResultsPage == true ? "&searchResultsPage=Y" : "")
		);
}

function ajax_update_suburbs (formName, majorRegionIdFieldId, regionIdFieldId, searchResultsPage, showAll) {
	var majorRegionId = '';
	var regionId = '';

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
		majorRegionId = temp.value;
//		temp.disabled = true;
	}

	temp = get_object (regionIdFieldId);
	if (typeof (temp) != 'undefined') {
		regionId = temp.value;
		temp.disabled = true;
	}


	ajaxManager.use_ajax_handler (majorRegionIdFieldId);	// use majorRegionIdFieldId to uniquely identify this region/suburb in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_locations.php?"
		+ "formName=" + formName
		+ "&majorRegionDivId=" + majorRegionIdFieldId + "Div"
		+ "&majorRegionIdFieldId=" + majorRegionIdFieldId
		+ "&majorRegionIdFieldName=" + majorRegionIdFieldId
		+ "&majorRegionId=" + majorRegionId
		+ "&regionDivId=" + regionIdFieldId + "Div"
		+ "&regionIdFieldId=" + regionIdFieldId
		+ "&regionIdFieldName=" + regionIdFieldId
		+ "&regionId=" + regionId
//		+ "&getMajorRegions=Y"
		+ "&getRegions=Y"
		+ (showAll == true ? "&showAll=Y" : "")
		+ (searchResultsPage == true ? "&searchResultsPage=Y" : "")
		);
}






function ajax_show_calendar (organisationId, selectedDay, purpose, openWindow, duplicationPrefix) {

	// if the caller did not pass a new date specifically
	if (typeof (selectedDay) == 'undefined') {
		// try and find the date from the form
		var temp;
		temp = get_object ('selectedDay');
		if (typeof (temp) != 'undefined')
			selectedDay = temp.value;
	}

	var width = 300;
	var height = 325;
	switch (purpose) {
		case 'takeawayDeliveryAndPickUpView' :
			width = 500;
			height = 300;
		break;
	}

	if (typeof (duplicationPrefix) == 'undefined')
		duplicationPrefix = '';

	// should a new window be opened
	if ((typeof (openWindow) != 'undefined') && (openWindow)) {
		window.open ("/popup_calendar.php?"
			+ "organisationId=" + organisationId
			+ "&selectedDay=" + selectedDay
			+ "&purpose=" + purpose,
			'calendar', 'width=' + width + ', height=' + height + ', status=yes, menubar=no, resizable=no, scrollbars=yes, toolbar=no');
	}
	else {
		ajaxManager.use_ajax_handler ('ajaxCalendar' + duplicationPrefix);	// 
		ajaxManager.ajaxHandler.make_http_request (
			"/ajax/front/update_calendar.php?"
			+ "organisationId=" + organisationId
			+ "&selectedDay=" + selectedDay
			+ "&purpose=" + purpose
			+ "&duplicationPrefix=" + duplicationPrefix
			);
	}
}




// modified for the facebook app
function ajax_update_home_search_regions_facebook (countryId, majorRegionId, majorRegionIdFieldId, regionId, userId, updateDBMajorRegionId) {

	var temp;
	temp = get_object (majorRegionIdFieldId);
	if (typeof (temp) != 'undefined') {
//		majorRegionId = temp.value;
		temp.disabled = true;
	}


	// download the location select box changes
	ajaxManager.use_ajax_handler (majorRegionIdFieldId);	// use majorRegionIdFieldId to uniquely identify this majorRegion/region in the form
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_home_search_locations_facebook.php?"
		+ "countryId=" + countryId
		+ "&majorRegionId=" + majorRegionId
		+ "&regionId=" + regionId
		+ "&userId=" + userId
		+ "&updateDBMajorRegionId=" + updateDBMajorRegionId
		);

}


// modified for the facebook app
function ajax_update_most_popular_facebook (countryId, majorRegionId, userId, updateDBMajorRegionId) {


	ajaxManager.use_ajax_handler ('mostPopularFacebook');
	ajaxManager.ajaxHandler.make_http_request (
		"/facebook/app1/ajax_render_most_popular.php?"
		+ "countryId=" + countryId
		+ "&majorRegionId=" + majorRegionId
		+ "&userId=" + userId
		+ "&updateDBMajorRegionId=" + updateDBMajorRegionId
		);
}


// currentRestaurantFieldId is the current list of restaurant
// selectedRestaurantFieldId is the new list of resturant to add / remove
function ajax_show_restaurants_delivering_for_suburb (suburbFieldId, premisesId, mode) {

	var suburbId = '';
	var nearbyRestaurantIds = new Array (); // only the checked values of the current restaurants, left check box
	var selectedAssocRestaurantIds = new Array (); // the selected restaurants on the right check box

	var temp;
	temp = get_object (suburbFieldId);
	if (typeof (temp) != 'undefined')
		suburbId = temp.value;




	for (count = 0; count < document.form01.length; count++) {	// loop through the whole form
		// nearby restaurant checkboxes
		if ((document.form01[count].name == 'nearbyRestaurantIds[]') && (document.form01[count].checked == true))
			nearbyRestaurantIds[nearbyRestaurantIds.length] = document.form01[count].value;

		// associated restaurant checkboxes
		if ((document.form01[count].name == 'assocRestaurantIds[]') && (document.form01[count].checked == true))
			selectedAssocRestaurantIds[selectedAssocRestaurantIds.length] = document.form01[count].value;
	}




	ajaxManager.use_ajax_handler ('showRestaurantsDeliveringForSuburb');
/**
	document.write (
		"/ajax/front/update_corporate_restaurants_for_suburb.php?"
		+ "suburbId=" + suburbId
		+ "&premisesId=" + premisesId
		+ "&mode=" + mode
		+ "&nearbyRestaurantIds=" + nearbyRestaurantIds
		+ "&selectedAssocRestaurantIds=" + selectedAssocRestaurantIds
		);
/**/
	ajaxManager.ajaxHandler.make_http_request (
		"/ajax/front/update_corporate_restaurants_for_suburb.php?"
		+ "suburbId=" + suburbId
		+ "&premisesId=" + premisesId
		+ "&mode=" + mode
		+ "&nearbyRestaurantIds=" + nearbyRestaurantIds
		+ "&selectedAssocRestaurantIds=" + selectedAssocRestaurantIds
		);
}