function hide () {
    document.getElementById('toplayer').style.display = 'none';
    //createCookie('topLayerShowed', 1, 1);
}

function load() {
  var info_1 = '<img src="http://www.emobilen.pl/images/frontend/theme/emobilen/home_icon.gif" /><strong style="padding-left:5px;">MOBILEN</strong> <br/><span style="padding-left:21px;">ul. Monte Cassino 6/22</span><br/><span style="padding-left:21px;">30-337 Kraków</span><br/>';
  var info_2 = '<div style="padding-top:10px;"><img src="http://www.emobilen.pl/images/frontend/theme/emobilen/phone_icon.gif" /><strong style="padding-left:5px;">tel. (+48) 12 681 63 36</strong></div>';
  var info_3 = '<div><img src="http://www.emobilen.pl/images/frontend/theme/emobilen/tel_icon.gif" /><strong style="padding-left:5px;">tel. (+48) 504 677 372</strong></div>';
  var info_4 = '<div><img src="http://www.emobilen.pl/images/frontend/theme/emobilen/mail_icon.gif" /><strong style="padding-left:5px;">e-mail: bok@emobilen.pl</strong></div>';
  if (GBrowserIsCompatible()) {
    if (element = document.getElementById("map")) {
        var map = new GMap2(element);
        map.setCenter(new GLatLng(50.048758,19.92995), 16);
        var infoTabs = [
            new GInfoWindowTab("Adres", '<div style="text-align:left;">' + info_1 + info_2 + info_3 + info_4 + '</div>')
        ];

        var icon = new GIcon();
        icon.image = "http://www.emobilen.pl/images/frontend/theme/emobilen/emobilenMarker.png";
        icon.iconSize = new GSize(19, 30);
        icon.iconAnchor = new GPoint(5, 30);
        icon.infoWindowAnchor = new GPoint(5, 0);
        
        var point = new GLatLng(50.047558, 19.929350);
        var marker = new GMarker(point, icon);
        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowTabsHtml(infoTabs);
        });
        map.addOverlay(marker);
        marker.openInfoWindowTabsHtml(infoTabs);
        
        var logoPark = '<img src="http://www.parkinn.com/parkinn_sc/pk-navigation-global/img/screen/pd-rd-logo.gif" width="157" height="50" />';
        var infoTabs2 = [
            new GInfoWindowTab("Adres", '<center style="text-align:left; font-size:16px; font-weight:bold;">Hotel Park Inn</center><br/>' + logoPark)
        ];
        var point = new GLatLng(50.047758, 19.929990);
        var marker2 = new GMarker(point);
        GEvent.addListener(marker2, "click", function() {
            marker2.openInfoWindowTabsHtml(infoTabs2);
        });
        map.addOverlay(marker2);
        
        
        map.addControl(new GSmallMapControl());
    }
  }
    if (document.getElementById('toplayer') != null && document.getElementById('postIsDone') == null) {
        document.getElementById('toplayer').style.height = document.body.offsetHeight + 'px'; 
        document.getElementById('toplayer').style.width = document.body.offsetWidth + 'px'; 
        document.getElementById('toplayer').style.display = 'block'; 
    }
}
jQuery(document).ready(function() {
    jQuery(document).keyup(function(e) {
        if (e.which == 27) {
            hide();
        }
    });
    jQuery('#hideBannerButton').click(function(){
        hide();
        return false;
    });
});

