/* * cares for the adaption of the view according to the browser window */ function init(){ // #page document.getElementById("page").style.width = ( viewWidth() - 2 ) + 'px'; document.getElementById("page").style.height = ( viewHeight() - 2 ) + 'px'; // #content document.getElementById("content").style.width = ( viewWidth() - 22 ) + 'px'; document.getElementById("content").style.height = ( viewHeight() - 22 ) + 'px'; } /* * returns the height of the view area */ function viewHeight(){ if( window.innerHeight ) return window.innerHeight; if( document.body.clientHeight ) return document.body.clientHeight; return 600; } /* * returns the width of the view area */ function viewWidth(){ if( window.innerWidth ) return window.innerWidth; if( document.body.clientWidth ) return document.body.clientWidth; return 800; }