function Label( latlng, text )
{
	this.m_text			= text;
	this.m_latlng		= latlng;
}

Label.prototype = new google.maps.Overlay();

Label.prototype.initialize = function( map )
{
	var div = document.createElement( "div" );
	div.appendChild( document.createTextNode( this.m_text ) );
	div.appendChild( document.createElement( "br" ) );
	div.style.backgroundColor="white";
	div.style.border="1px solid black";
	div.style.fontSize="10px";
	div.style.padding="1px";
	div.className = "label";
	div.style.position = "absolute";
	div.style.visibility = "hidden";
	map.getPane( G_MAP_MARKER_PANE ).appendChild( div );
	this.m_map = map;
	this.m_div = div;
}

Label.prototype.redraw = function( force )
{
	if( !force ) 
		return;
	//this.m_div.innerHTML="";
	//this.m_div.appendChild( document.createTextNode( this.m_div.parentNode.getAttribute( "id" ) ) );
	var pos = this.m_map.fromLatLngToDivPixel( this.m_latlng );
	/*
	var labelW = this.m_div.clientWidth;
	var labelH = this.m_div.clientHeight;
	
	if( this.m_alignRight == 1 )
		var xPos = pos.x - labelW / 2;
	else
		var xPos = pos.x + labelW / 3;
	
	if( this.m_alignTop == 1 )
		var yPos = pos.y - labelH / 2;
	else
		var yPos = pos.y + labelH / 3;
				
	this.m_div.style.top = yPos + "px";
	this.m_div.style.left = xPos + "px";
	*/
	this.m_div.style.top = (pos.y - 7) + "px";
	this.m_div.style.left = (pos.x + 7) + "px";
}
Label.prototype.show = function()
{
	this.m_div.style.visibility = "visible";
}
Label.prototype.hide = function()
{
	this.m_div.style.visibility = "hidden";
}
Label.prototype.remove = function()
{
	this.m_div.parentNode.removeChild( this.m_div );
}
