function getObject(divName) {
    var obj = null;
    if (document.getElementById) {
        // this is the way the standards work
        if (document.getElementById(divName)) {
            obj = document.getElementById(divName);
        }
    } else if (document.all) {
        // this is the way old msie versions work
        if (document.all[divName]) {
            obj = document.all[divName];
        }
    } else if (document.layers) {
        // this is the way nn4 works
        if (document.layers[divName]) {
            obj = document.layers[divName];
        }
    }
    return obj;
}

function hide(elem) {
    getObject(elem).style.display = 'none';
}

function show(elem) {
    getObject(elem).style.display = 'block';
}

function toggleLayer(divName) {
    var style2 = getObject(divName).style;
    if (style2.display != 'block') {
        style2.display = 'block';
    } else {
        style2.display = 'none';
    }
}

function showColumn(i) {
    if (i==1) {
        hide('col2');
    } else if (i==2) {
        hide('col1');
    } else if (i==3) {
        hide('col4');
        hide('col5');
    } else if (i==4) {
        hide('col3');
        hide('col5');
    } else if (i==5) {
        hide('col3');
        hide('col4');
    }
    show('col'+i);
}
