function ToolTip(marker,html,width) {
this.html_ = html;
this.width_ = 'auto';
this.marker_ = marker;
}

ToolTip.prototype = new GOverlay();
 
ToolTip.prototype.initialize = function(map) {
var div = document.createElement("div");
div.style.display = 'none';
map.getPane(G_MAP_FLOAT_PANE).appendChild(div);
 
this.map_ = map;
this.container_ = div;
}
 
ToolTip.prototype.remove = function() {
this.container_.parentNode.removeChild(this.container_);
}
 
ToolTip.prototype.copy = function() {
return new ToolTip(this.html_);
}
 
ToolTip.prototype.redraw = function(force) {
if (!force) return;
 
var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint());
this.container_.innerHTML = this.html_;
this.container_.style.position = 'absolute';
this.container_.style.left = (pixelLocation.x + 8) + "px";
this.container_.style.top = (pixelLocation.y + 0) + "px";
this.container_.style.width = 'auto';
this.container_.style.font = 'bold 10px/10px verdana, arial, sans';
this.container_.style.textAlign = 'left';
this.container_.style.border = '1px solid black';
this.container_.style.lineHeight = '10px';
this.container_.style.background = '#e0f0e0';
this.container_.style.padding = '4px';
 
this.container_.style.display = 'block';
}
 
GMarker.prototype.ToolTipInstance = null;
 
GMarker.prototype.openToolTip = function(content) {
if(this.ToolTipInstance == null) {
this.ToolTipInstance = new ToolTip(this,content)
map.addOverlay(this.ToolTipInstance);

}
}
 
GMarker.prototype.closeToolTip = function() {
if(this.ToolTipInstance != null) {
map.removeOverlay(this.ToolTipInstance);
this.ToolTipInstance = null;
}
}

GMarker.prototype.setTooltip = function(a) {
	this.tooltip = new ToolTip(this, a, 100)
	
	GEvent.addListener(this, "mouseover", function() {
		map.addOverlay(this.tooltip);

	});
	GEvent.addListener(this, "mouseout", function() {
	  map.removeOverlay(this.tooltip);
	});
	
}
