$(document).ready(function(){
    function openBigMap() {
        var $directions_dialog = $('<div id="directions_dialog"></div>');
        $directions_dialog.dialog({
            autoOpen: false,
            position: 'top',
            modal: true,
            dialogClass: "company_dialog",
            title: 'Get Map Directions',
            width: $(document).width() - 20,
            height: $(window).height()-20,
            open: function(event, ui) {
                //$('#stamp').val(new Date.getTime());
                var $frm = $('<iframe id="process_frm" name="process_frm"></iframe>');
                $frm.attr('src', window.full_uri + 'amodules/main_article/map_enlarge.php?map_data=' + map_data);
                $frm.attr('width', '100%');
                $frm.attr('height', '98%');
                $frm.css('border', '1px solid #000000');
                $frm.css('overflow-y', 'hidden');
                $('#directions_dialog').append($frm);

            },
            close: function(event, ui) {
                $('#process_frm').remove();
                $directions_dialog.dialog('destroy');
                $directions_dialog.remove();
            },
            buttons: {
                'Close': function(event, ui) {
                    $(this).dialog('close');
                }
            }
        });
        $directions_dialog.dialog('open');
    }
});
