function initHelpers() {
    if (!document.getElementsByTagName) return;
}

addEvent(window, 'load', initHelpers, true);

function showDesc(cid) {
    $('#mapdesc div').hide();
    $('#mapdesc div img').hide();

    $('#desc' + cid).show();
    $('#desc' + cid + ' img').show();
    $('#mapdesc').show();
}

function closeDesc() {
    $('#mapdesc').hide();
}

function showVideo(vid) {
    $('#video-' + vid).show();
}

function closeVideo(vid) {
    $('#video-' + vid).hide();
}


// Utility functions - mostly pinched from elsewhere // 

function addEvent(elm, evType, fn, useCapture) {
    if (elm.addEventListener) {
        elm.addEventListener(evType, fn, useCapture);
        return true;
    } else if (elm.attachEvent) {
        var r = elm.attachEvent('on' + evType, fn);
        return r;
    }
}

function getTarget(e) {
    var targ;
    if (!e) var e = window.event;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
        targ = targ.parentNode;
    return targ;
}