function busy() {
    var map = getMap();
    if (map.isBusy()) {
		alert(MSG_TERKEP_VARJON);
        map.stop();
        map.refresh();
        return true;
    }
    return false;
}

function panMode() {
    if (busy()) return;
    getMap().panMode();
}

function zoomInMode() {
    if (busy()) return;
    getMap().zoomInMode();
}

function zoomOutMode() {
    if (busy()) return;
    getMap().zoomOutMode();
}

function zoomPrevious() {
    if (busy()) return;
    getMap().zoomPrevious();
    getMap().refresh();
}

function zoomOut() {
    if (busy()) return;
    getMap().zoomOut();
    getMap().refresh();
}

function zoomGoto() {
    if (busy()) return;
    getMap().zoomGotoDlg();
}

function distance() {
    if (busy()) return;
    getMap().viewDistance('M');
}

function zoomGotoDlg() {
    getMap().zoomGotoDlg();
}

function pageSetupDlg() {
    getMap().pageSetupDlg();
}

function printDlg() {
    getMap().printDlg();
}

function select() {
    if (Number(getMap().getVersion().substr(0, 1)) < 5) return;
    getMap().selectMode();
}

// csak IE (csak ActiveX control)
var layersViewWidth = 1;
function toggleLayers() {
    if (navigator.appName != 'Microsoft Internet Explorer') return;

    // cserelgetjuk az 1 ?s a 175 ?rt?keket
    layersViewWidth = 176 - layersViewWidth;
    getMap().LayersViewWidth = layersViewWidth;
}

