
function MMMenuIcon()
{	
	this.position = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(100,100));

	this.width
	this.height

	this.menuImage = document.createElement("div");

}
MMMenuIcon.prototype = new GControl();

/**
 * Sets GControlPosition of the MenuImage. 
 */
MMMenuIcon.prototype.setPosition = function(position){this.position = position;}
MMMenuIcon.prototype.setTooltipText = function(text){this.menuImage.title = text;}

MMMenuIcon.prototype.setSize = function(width, height){this.width = width; this.height = height;}
MMMenuIcon.prototype.setImage = function(url){this.menuImage.style.backgroundImage = 'url("'+ url +'")';}



/**
 * Returns to the map if the control should be printable. 
 */
MMMenuIcon.prototype.printable = function(){
	return false;
}

/**
 * Returns to the map if the control contains selectable text. 
 */
MMMenuIcon.prototype.selectable = function(){
	return false;
}

/**
 * Returns to the map the position in the map view at which the control appears by default. 
 * This will be overridden by the second argument to GMap2.addControl(). 
 */
MMMenuIcon.prototype.getDefaultPosition = function(){
	return this.position;
}


/**
 * Will be called by the map so the control can initialize itself. The control will 
 * use the method GMap2.getContainer() to get hold of the DOM element that contains 
 * the map, and add itself to it. It returns the added element. 
 */
MMMenuIcon.prototype.initialize = function(map){

	// Add Menu Image to the DOM
	map.getContainer().appendChild(this.menuImage);		
	this.menuImage.style.cursor = "pointer";
	this.menuImage.style.width = this.width +"px";
	this.menuImage.style.height = this.height +"px";
	this.menuImage.style.display = "none";
	
	GEvent.bindDom(this.menuImage, "click", this, this.onClick);
	
	return this.menuImage;
}

MMMenuIcon.prototype.onClick = function(e){
	GEvent.trigger(this, "click");
}


MMMenuIcon.prototype.show = function(){
	this.menuImage.style.display = "block";
}

MMMenuIcon.prototype.hide = function(){
	this.menuImage.style.display = "none";
}

