function tibe_geo_zoom(map,obj_name,container){
	this.maps = [];
	this.map = map;
	this.obj_name = obj_name;
	this.container = container;
	var size = $(container).getSize();
    this.mWidth = size.x;
	this.mHeight = size.y;
    this.map.enableContinuousZoom();
	this.zoomListener = GEvent.addListener(map,'zoomend',this.zoomEnd);
}
tibe_geo_zoom.prototype.load_point = function(point){
    // Bunch of hidden maps that preload the tiles you're going to need in your flight
	// Zoomout
	for (var n = 17; n > 3 ; n-- ) {
		var nDiv = document.createElement('DIV');
		nDiv.id = 'map' + n;
		nDiv.style.width = this.mWidth + 'px';
		nDiv.style.height = this.mHeight + 'px';
		nDiv.style.position = 'absolute';
		nDiv.style.left = -this.mWidth + 'px';
		document.body.appendChild(nDiv);

		this.maps[n] = new GMap2(nDiv);
		this.maps[n].setCenter(point, n);
		this.maps[n].id =  n;
	}
}
tibe_geo_zoom.prototype.zoomEnd = function(oldZ,newZ) {
	var mapObj = this.map;
	var interval = 100;
	if (oldZ > newZ) {
		if (newZ > 4) {
			window.setTimeout(function(){geo_zoom.zoomOut(mapObj)},interval);
		}
		else {
		    window.setTimeout(function(){geo_zoom.panToTarget(mapObj)},10);
		    window.setTimeout(function(){geo_zoom.zoomIn(mapObj)},interval);
		}
	}
	else if (newZ > oldZ) {
		if (newZ < 17) {
			geo_zoom.panToTarget(mapObj);
			window.setTimeout(function(){geo_zoom.zoomIn(mapObj)},interval);
		}
		else{
			GEvent.removeListener(geo_zoom.zoomListener);
		}
	}
}

tibe_geo_zoom.prototype.panToTarget = function(mapObj) {
	this.map.panTo(this.target);
}

tibe_geo_zoom.prototype.zoomOut = function(mapObj) {
	this.map.zoomOut(null,null,true);
}
tibe_geo_zoom.prototype.zoomIn = function(mapObj) {
	this.map.zoomIn(null,null,true);
}
tibe_geo_zoom.prototype.unload = function() {
	GUnload();
}
