function Map(div, mapName){
	//configure map zoom rectangle fill by setting style by calling esri.symbol.SimpleFillSymbol.toJson()
	//var zoomSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([76,69,69]), 2), new dojo.Color([203,203,161,0.5]));
	//esriConfig.defaults.map.zoomSymbol = zoomSymbol.toJson();

	//customize pan animation 
	esriConfig.defaults.map.panDuration = 750; //time in milliseconds; default panDuration:250
    esriConfig.defaults.map.panRate = 50; //refresh rate of zoom animation; default panRate:25
  
    //customize zoom animation 
    esriConfig.defaults.map.zoomDuration = 750; //time in milliseconds; default is 250
    esriConfig.defaults.map.zoomRate = 50; //refresh rate of zoom animation; default is 25

	this.div = div;
	this.map = new esri.Map(div,{nav:true});
	this.map.disableMapNavigation();
	this.mapName = mapName;
}

function MapPrototype(){	
	Map.prototype.addLayer = function (layer) {this.map.addLayer(layer); }
	Map.prototype.changeExtent = function (addressExtent) {this.map.setExtent(addressExtent);}
	Map.prototype.changeExtentByCoords = function(xmin,xmax,ymin,ymax) {  
		var addressExtent = new esri.geometry.Extent(xmin,ymin,xmax,ymax);
		this.map.setExtent(addressExtent);		
	}
	Map.prototype.changeExtentByXY = function(x,y,factor) {  
		var addressExtent = calcPointExtent(x,y,factor);
		this.map.setExtent(addressExtent);		
	}
}

function calcPointExtent(x,y,factor){
	xmin = x - factor;
	xmax = x + factor;
	ymin = y - factor;
	ymax = y + factor;

	var newExtent = new esri.geometry.Extent(xmin,ymin,xmax,ymax);
	return newExtent;	
}



