﻿function windowHeight() 
{
    // Standard browsers (Mozilla, Safari, etc.)
    if (self.innerHeight) {
    return self.innerHeight;
    }
    // IE 6
    if (document.documentElement && document.documentElement.clientHeight) {
    return document.documentElement.clientHeight;
    }
    // IE 5
    if (document.body) {
    return document.body.clientHeight;
    }
    // Just in case. 
    return 0;
}

function handleResize() 
{
    var height = windowHeight() - document.getElementById('toolbar').offsetHeight - 30;
    document.getElementById('map').style.height = height + 'px';
    document.getElementById('sidebar').style.height = height + 'px';
}