/*function toggle_menu (eid) {
    if (getElementById(eid).style.display == 'none') {
        getElementById(eid).style.display = 'block';
    } else {
        getElementById(eid).style.display = 'none';
    }
}

function switch_element(id) {
    var e = getElementById(id).style;
    if (e.display == 'none') {
        e.display = 'block';
    } else {
        e.display = 'none';
    }
}*/

function image_window(link, iwidth, iheight, header, description) {
    var ibox = document.getElementById('imagebox');
    var scrx = 0;
    var scry = 0;
    var sitetop = 0;
    var top = 0;
    var left = 0;
    var maxh =0;
    var brows = navigator.appName;
    if (brows == 'Microsoft Internet Explorer') { // For IE positioning
        scrx = window.screen.availWidth;
        scry = window.screen.height;
        sitetop = document.documentElement.scrollTop;
        //ibox.style.height = scry;
        ibox.style.overflow = 'auto';
    } else { // For other browsers positioning
        scrx = document.width;
        scry = window.innerHeight;
        sitetop = window.pageYOffset;
        maxh = scry - 40;
        ibox.style.maxHeight = maxh + 'px';
        ibox.style.overflow = 'auto';
    }
    top = sitetop + 10;
    window.onscroll = function() {
        if (brows == 'Microsoft Internet Explorer') { // On IE no scroll handling
            //sitetop = 0;
        } else { // For other browsers scrolling control
            sitetop = window.pageYOffset;
        }
        top = sitetop+10;
        ibox.style.top = top + 'px';
    }
    ibox.innerHTML = '<img src="'+link+'" alt="'+header+'" />';
    if (header != '') ibox.innerHTML += '<p class="imagebox_header">'+header+'</p>';
    if (description != '') ibox.innerHTML += '<p class="imagebox_description">'+description+'</p>';
    left = (scrx - iwidth) / 2;
    ibox.style.position = 'absolute';
    ibox.style.display = 'block';
    ibox.style.zindex = '100';
    ibox.style.left = left + 'px';
    ibox.style.top = top + 'px';
    ibox.style.width = iwidth + 'px';
    ibox.style.backgroundColor = '#009922';
    ibox.style.textAlign = 'center';
    ibox.style.border = '4px solid #dddddd';
}