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

function directionsResize() {
var height = windowHeight();
height -= document.getElementById('toolbar').offsetHeight + 20;
document.getElementById('drt').style.height = height + 'px';
}
