//
// File : rest-rtwgmap-core.js
//
// Description : Javascript functions for core components on the Dine Albert Restaurants Map
//               implementation. Overrides several functions found in the 
//               RTWGMap's javascript lib
//


	//
	// get all the gmarkers for the specified region
	//
	function getMarkersForRegion(regionId){
    	currentRegionId = regionId;
	    map.closeInfoWindow();    
    	closeDirections();
    	//unapplyFilter();
    	//filterChanged();
    	
	    for(var i = 0; i < regions.length; i++)
    	{
        	if(regions[i].id == regionId) {
    	        map.setCenter(new GLatLng(regions[i].latitude, regions[i].longitude), regions[i].zoomLevel);
	            globalRegion = regions[i];
        	    break;
	        }
    	}

		if(globalRegion.label.indexOf('Downtown') != -1) {
			// if the global region's label contains 'Downtown', we 
			// made it up (doesn't exist in the Dine Ab db)
			//
			// Don't use the standard call to getMarkersForRegion ... 
			//
			updateSideListingForCurrentView();
			return;
		} 
		// the default is to get the rtwgmap lib to return/list the markers in the current view ...
		eval(getDataProviderClassName()).getMarkersForRegion(returnFilteredMarkers, globalRegion.id);
	}