function MTypeControl() { }
MTypeControl.prototype = new GControl();

MTypeControl.prototype.initialize = function(map) {
// obtain Function Closure on a reference to "this"
	var that=this;
	this.map = map;
	
	var container = document.createElement("div");
	container.className = "imgChangeble";
	container.style.width="207px";
	container.style.height="35px";
	
	var hybrid = document.createElement("img");
	hybrid.style.width="65px";
    hybrid.style.height="35px";
	hybrid.src = "/_html/img/button-hybrid.gif";
	hybrid.style.position = "absolute";
	hybrid.style.right = "0px";
	hybrid.style.cursor = "pointer";
	container.appendChild(hybrid);
	GEvent.addDomListener(hybrid, "click", function(){
		that.map.setMapType(G_HYBRID_MAP);
	});
	var sat = document.createElement("img");
	sat.style.width="80px";
    sat.style.height="35px";
	sat.src = "/_html/img/button-sat.gif";
	sat.style.position = "absolute";
	sat.style.right = "65px";
	sat.style.cursor = "pointer";
	container.appendChild(sat);
	GEvent.addDomListener(sat, "click", function(){
		that.map.setMapType(G_SATELLITE_MAP);
	});
	var norm = document.createElement("img");
	norm.style.width="62px";
    norm.style.height="35px";
	norm.src = "/_html/img/button-map.gif";
	norm.style.position = "absolute";
	norm.style.right = "145px";
	norm.style.cursor = "pointer";
	container.appendChild(norm);
	GEvent.addDomListener(norm, "click", function(){
		that.map.setMapType(G_NORMAL_MAP);
	});
	
	map.getContainer().appendChild(container);
		
	return container;
}

MTypeControl.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(0, 0));
}
