


function LinkControl(name, label, url) {
    _name  = name;
    _label = label;
    _url   = url;
}

LinkControl.prototype = new GControl();

LinkControl.prototype._container = null;
LinkControl.prototype._url = '';
LinkControl.prototype._name = '';

LinkControl.prototype.initialize = function(map) {
    var _container = $('<div title="' + _label + '" style="border: 1px solid black; position: absolute; background-color: white; text-align: center; width: 5em; cursor: pointer; right: 10.2em;"><div style="border-style: solid; border-color: white rgb(176, 176, 176) rgb(176, 176, 176) white; border-width: 1px; font-size: 12px;">' + _name + '</div></div>')[0];

    GEvent.addDomListener(_container, "click", function() {
        window.location = _url;
        return false;
    });
 
    map.getContainer().appendChild(_container);

    return _container;
}

LinkControl.prototype.getDefaultPosition = function() {
    return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 7));
}