//we can build a temporary array here so that integration in the future is much easier.
var areaArray = new Array();
areaArray[0] = new Array();		//area name
areaArray[1] = new Array();		//area lon
areaArray[2] = new Array();		//area lat
areaArray[3] = new Array();     //zoom factor

areaArray[0][0] = "Cary";
areaArray[1][0] = -78.785000;
areaArray[2][0] = 35.785000;
areaArray[3][0] = 13;
areaArray[0][1] = "Morrisville";
areaArray[1][1] = -78.825000;
areaArray[2][1] = 35.830000;
areaArray[3][1] = 13;
areaArray[0][2] = "Raleigh";
areaArray[1][2] = -78.638000;
areaArray[2][2] = 35.771000;
areaArray[3][2] = 11;

function zoomToRegion(n) {	
	//here, we'd normally have an array that will store the lat longs and names of area that came from
	//a database
		
	//data is stored in the regionArray. The data is pulled for the dropdown and stored
	//in the array so that it can be used to dynamically update the zoom for the map.
	//an integer is sent to this function and we grab the rest of the data from the array
	//based on the selection of that integer - selectBoxValue
    var thisSelectedArea = areaArray[0][n]
	var thisSelectedLongitude = areaArray[1][n]
	var thisSelectedLatitude = areaArray[2][n]
	var thisSelectedZoomFactor = areaArray[3][n]
	
	if (n == "xx") {
		alert("Please select a valid region to zoom to");
	}
	
	else {
		//zoom to region
		googleMap.setCenter(new GLatLng(thisSelectedLatitude, thisSelectedLongitude), thisSelectedZoomFactor);
	}
}
		
