var MapEventHandler = function() {
	var SNAP_HEIGHT = 8;
  	var zoomSlider = $D.get("drag");
	var dragTop = parseInt($D.getStyle('dragTop','height'));
	var _this = this;
	this.onChange = new YAHOO.util.CustomEvent("onChange"); 

	var updateZoomSlider = function(zoom) {
		zoomSlider.style.top = ((zoom * SNAP_HEIGHT) + (dragTop)) + 'px';
    }
    
	this.focusChanged = function(center, zoom, southWestPoint, northEastPoint) {		
		updateZoomSlider(zoom);
		if (isMapFeatureEnabled('flickr')) {
			updateMapFeature('flickr', zoom, southWestPoint, northEastPoint);					
		} 
		updatePermlink(zoom, center);
		updateMiniMap();

		ll = center._latitude + ',' + center._longitude;
		z = zoom;

		this.onChange.fire();
		
		if (explorer != undefined) {
			explorer.setEmptyLoaded();
			explorer.update(true);
		}
		
    }
}

var MiniMapEventHandler = function() {

	this.focusChanged = function(center, zoom, southWestPoint, northEastPoint) {
		updateMap();
	}
}
