
function ClassRectangle(bounds, html)
{
	this.bounds_ = bounds
	this.Html = html
	this.prototype = new GOverlay()
}

ClassRectangle.prototype.remove = function() 
{
	this.div_.parentNode.removeChild(this.div_)
}

ClassRectangle.prototype.initialize = function(map)
{
  var div = document.createElement("div");
  div.className = 'markerdiv'
  div.style.position = "absolute";

  GoogleMap.getPane(G_MAP_MAP_PANE).appendChild(div);

  this.map_ = map;
  this.div_ = div;

  div.innerHTML = this.Html
}


ClassRectangle.prototype.redraw = function(force)
{
  if (!force) return;

  var c1 = this.map_.fromLatLngToDivPixel(this.bounds_.getSouthWest());
  var c2 = this.map_.fromLatLngToDivPixel(this.bounds_.getNorthEast());

  this.div_.style.width = Math.abs(c2.x - c1.x) + "px";
  this.div_.style.height = Math.abs(c2.y - c1.y) + "px";
  this.div_.style.left = (Math.min(c2.x, c1.x)) + "px";
  this.div_.style.top = (Math.min(c2.y, c1.y)) + "px";
}
