function toggleAbout() {
    var isShowingNow = Misc.toggleElm('about');
    var anchor = isShowingNow ? 'about' : '';
    window.location.href = '#' + anchor;
}

function Misc() {
}

Misc.getElm = function(id) {
    return document.getElementById(id);
}

Misc.getCreateElement = function(id) {
    var elm = document.getElementById(id);
    if (!elm) {
        elm = document.createElement('div');
        elm.setAttribute('id', id);
        document.body.appendChild(elm);
    }
    return elm;
}

Misc.toggleElm = function(id) {
    var isShowingNow = null;
    var elm = document.getElementById(id);
    if (elm) {
        if (elm.style.display == 'block') {
            elm.style.display = 'none';
            isShowingNow = false;
        }
        else {
            elm.style.display = 'block';
            isShowingNow = true;
        }
    }
    return isShowingNow;
}

Misc.isShowing = function(id) {
    var isShowing = false;
    var elm = document.getElementById(id);
    if (elm) { isShowing = elm.style.display == 'block'; }
    return isShowing;
}

Misc.showElm = function(id) {
    var elm = document.getElementById(id);
    if (elm) { elm.style.display = 'block'; }
}

Misc.hideElm = function(id) {
    var elm = document.getElementById(id);
    if (elm) { elm.style.display = 'none'; }
}

Misc.getHtml = function(id) {
    var html;
    var elm = document.getElementById(id);
    if (elm) {
        html = elm.innerHTML;
    }
    else {
        // alert('Element ' + id + ' not found.');
    }
    return html;
}

Misc.setHtml = function(id, html) {
    var elm = document.getElementById(id);
    if (elm) {
        if (navigator.appName == 'Microsoft Internet Explorer') {
            innerHtmlWorkaroundForIExplorer8(elm, html);
        }
        else {
            elm.innerHTML = html;
        }
    }
    else {
        // alert('Element ' + id + ' not found.');
    }
}
