﻿function PositionedMapControl(x,y,TheElementName)
{
    this.x=x;
    this.y=y;
    this.TheElementName=TheElementName;
}
PositionedMapControl.prototype = new GControl();

PositionedMapControl.prototype.initialize = function(map) 
{
    var TheElement = $get(this.TheElementName);
    TheElement.style['display']='block';
    map.getContainer().appendChild(TheElement);
    return TheElement;
}

// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
PositionedMapControl.prototype.getDefaultPosition = function() 
{
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(this.x,this.y));
}

