﻿OpenLayers.Control.CloseButton = OpenLayers.Class(OpenLayers.Control.Button, {

    /**
    * Property: type
    * TYPE_BUTTON.
    */
    type: OpenLayers.Control.TYPE_BUTTON,

    /**
    * 
    */
    initialize: function() {
         OpenLayers.Control.Button.prototype.initialize.apply(this, arguments);
    },

    /**
    * Method: trigger
    */
    trigger: function(event) {
    },

    /**
    * Method: active_print
    * Setup event for print button
    */
    active_CloseButton: function() {
    OpenLayers.Event.observe(this.div, "mousedown",
            OpenLayers.Function.bindAsEventListener(this.closeMapwindow.bind(this), this.div));
    // Make hover event
    this.div.title = "Luk";
    this.div.style.cursor = "pointer"; // Firefox & IE
    },

    /**
    * Method: openPrintPage
    * Method to open the printpage
    */
    closeMapwindow: function(evt) {
        Event.stop(evt);
        $find('MyMPE').hide();
    },

    CLASS_NAME: "OpenLayers.Control.CloseButton"
});
