function getDimensions() {
    //var webkit = (navigator.userAgent.toLowerCase().indexOf("webkit") > 0)? true : false;
    var lc = document.getElementById('linkerfotokolom');
    var rc = document.getElementById('rechterfotokolom');
    var mc = 722;
    var pw = document.getElementById('pagina');
    var iw;
    var wk = 0;
    if (self.innerWidth) {
        iw = self.innerWidth;
    } else {
        iw = document.documentElement.offsetWidth;
    }
    if (navigator.userAgent.toLowerCase().indexOf("webkit") > 0) {
        wk = 100;
    }
    pw.style.width = iw + 'px';
    if (mc < iw) {
        lc.style.width = Math.floor(((iw - mc - wk) / 2)) + 'px';
        rc.style.width = Math.floor(((iw - mc - wk) / 2)) + 'px';
    } else {
        lc.style.width = 100 + 'px';
        rc.style.width = 100 + 'px';
    }
}

function Set(url) {
    var f = document.getElementById('contentFrame');
    f.src = url;
}

function startTimer() {
    var timer = $find('Timer1');
    timer._startTimer();
}

function stopTimer() {
    var timer = $find('Timer1');
    timer._stopTimer();
}

//function pageLoad() {
$().ready(function() {
    // animatie van de linker- en rechterfotokolom om op die
    // manier de inhoud beter te kunnen zien
    //

    ///// voorbereiden ///////////////////////////////////////////////

    // veelgebruikte lange namen aliassen voor lokaal gebruik
    var lk = $('#linkerfotokolom');
    var hk = $('#hoofdkolom');
    var rk = $('#rechterfotokolom');
    var lkk = $('#linkerfotokolom_knopje');
    var rkk = $('#rechterfotokolom_knopje');
    var mm = $('#mainMenu a');

    // initiele width()n onthouden
    hk.breedte = 502;

    // open- en sluitanimaties
    lk.open = function() {
        lk.animate({ width: lk.width() + hk.breedte + 'px' });
        lk.is_open = true;
        lk.addClass('is-open');
    }
    lk.sluit = function() {
        lk.animate({ width: lk.width() - hk.breedte + 'px' });
        lk.is_open = false;
        lk.removeClass('is-open');
    }

    hk.open = function() { hk.animate({ width: hk.breedte + 'px' }) }
    hk.sluit = function() { hk.animate({ width: 0 + 'px' }) }

    rk.open = function() {
        rk.animate({ width: rk.width() + hk.breedte + 'px' });
        rk.is_open = true;
        rk.addClass('is-open');
    }
    rk.sluit = function() {
        rk.animate({ width: rk.width() - hk.breedte + 'px' });
        rk.is_open = false;
        rk.removeClass('is-open');
    }

    //click on mainmenu - close both panels
    mm.live('click', function() {
        if (lk.is_open) {
            lk.sluit();
        }
        if (rk.is_open) {
            rk.sluit();
        }
        hk.open();
        startTimer();
    })

    // klik op het linkerfotopaneel
    lk.click(function() {
        if (lk.is_open) {
            if (rk.is_open) {
                // kan niet
            } else {
                lk.sluit();
                hk.open();
                startTimer();
            }
        } else {
            if (rk.is_open) {
                rk.sluit();
            } else {
                hk.sluit();
            }
            lk.open();
            stopTimer();
        }
    })

    // klik op het rechterfotopaneel
    rk.click(function() {
        if (rk.is_open) {
            if (lk.is_open) {
                // kan niet
            } else {
                rk.sluit();
                hk.open();
                startTimer();
            }
        } else {
            if (lk.is_open) {
                lk.sluit();
            } else {
                hk.sluit();
            }
            rk.open();
            stopTimer();
        }
    })
})
	