//	Google Maps API HtmlControl v1.0
//	based on code posted on Google Maps API Online Forum
//	updated/modified by Martin Pearman April 2007
//	http://warwound.googlepages.com/

function HtmlControl(html, createVisible, isPrintable, isSelectable)
{
	this.html=html;
	this.isVisible=createVisible;
	this.isPrintable=isPrintable;
	this.isSelectable=isSelectable;
	this.setVisible=function(bool)
	{
		this.div.style.display=(bool)? 'block':'none';
		this.isVisible=bool;
	}
}
HtmlControl.prototype=new GControl();
HtmlControl.prototype.initialize=function(map)
{
	this.selectable=function()
	{
		return this.isSelectable;
	}
	this.printable=function()
	{
		return this.isPrintable;
	}
	this.div=document.createElement('div');
	this.div.innerHTML=this.html;
	this.setVisible(this.isVisible);
	map.getContainer().appendChild(this.div);
	return this.div;
}
HtmlControl.prototype.getDefaultPosition=function()
{
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7,7));
}
