	var nostates = 0;
	
	function showCountry(country) {
        var select     = document.getElementById('lstSuburbs');
        var mapState   = document.getElementById('txtMapState');
        var mapCode    = document.getElementById('txtMapCode');

   		if (select != null) {
			document.images['imageMap'].src='images/maps/country_' + country + '.gif';
			document.images['imageMap'].useMap='#country' + country
			select.length        = 0;

			mapState.value = 0;
			mapCode.value = country;
   		}

		return true
	}

	function showState(state) {
        var select     = document.getElementById('lstSuburbs');
        var mapState   = document.getElementById('txtMapState');
        var mapStateArea   = document.getElementById('txtMapStateArea');
        var mapCode    = document.getElementById('txtMapCode');

   		if (select != null) {
			document.images['imageMap'].src='images/maps/state_' + state + '.gif'
			document.images['imageMap'].useMap='#state' + state
			
			mapState.value = 1;
			mapCode.value = state;

			if (state == 'Victoria') {
				mapStateArea.value = 'VIC';
			} else if (state == 'New South Wales') {
				mapStateArea.value = 'NSW';
			} else if (state == 'Queensland') {
				mapStateArea.value = 'QLD';
			} else if (state == 'Western Australia') {
				mapStateArea.value = 'WA';
			} else if (state == 'Northern Territory') {
				mapStateArea.value = 'NT';
			} else if (state == 'South Australia') {
				mapStateArea.value = 'SA';
			} else if (state == 'Australian Capital Territory') {
				mapStateArea.value = 'ACT';
			} else if (state == 'Tasmania') {
				mapStateArea.value = 'TAS';
			}

			select.length        = 0;
			if (nostates == 0) {
				select.options[0]    = new Option('** All of ' + state + ' **', 's' + state);
				select.selectedIndex = 0; 
			}
   		}

		return true
	}

	function showCity(state, city) {
        var select     = document.getElementById('lstSuburbs');
        var mapState   = document.getElementById('txtMapState');
        var mapCode    = document.getElementById('txtMapCode');
        var mapCode2    = document.getElementById('txtMapCode2');
        
   		if (select != null) {
			document.images['imageMap'].src='images/maps/city_' + city + '.gif';
			document.images['imageMap'].useMap='#city' + city

			mapState.value = 2;
			mapCode.value = state;
			mapCode2.value = city;

			select.length        = 0;
			if (nostates == 0) {
				select.options[0]    = new Option('** All of ' + city + ' **', 'c' + state);
				select.selectedIndex = 0; 
			}
   		}

		return true
	}

    function loadRegion(id) {
		var count;
        var select     = document.getElementById('lstSuburbs');
        var mapState   = document.getElementById('txtMapState');
        var mapCode    = document.getElementById('txtMapCode');

		if (select != null) {
			count                = 0;
			select.length        = 0;

			if (nostates == 0) {
				count                = 2;
				if (arrLocations[id].city.length == 0)
				{
					showState(arrLocations[id].state)
					select.options[0]    = new Option('** All of ' + arrLocations[id].state + ' **', 's' + id);
				}
				else
				{
					showCity(arrLocations[id].state, arrLocations[id].city)
					select.options[0]    = new Option('** All of ' + arrLocations[id].city + ' **', 'c' + id);
				}
			
				select.options[1]    = new Option('** All of ' + arrLocations[id].name + ' **', 'r' + id);
				select.selectedIndex = 0; 

			} else {
				if (arrLocations[id].city.length == 0)
				{
					showState(arrLocations[id].state)
				}
				else
				{
					showCity(arrLocations[id].state, arrLocations[id].city)
				}
			}

			mapState.value = 3;
			mapCode.value = id;

			for (var i = 0; i < arrLocations[id].suburbs.length; i++) {
				select.options[count] = new Option(
					arrLocations[id].suburbs[i],
					arrLocations[id].suburbs[i + 1]
				);
				count++;
				i++;
			}
		}

		return true		
    }

