http://news.cnblogs.com/n/107548/
function initpage() {
var e1 = document.getElementById("page")
e1.style.width = document.body.clientWidth - 20 + 'px';
e1.style.height = document.body.clientHeight - 10 + 'px';
document.getElementById("main").style.height = e1.clientHeight - 143 + 'px';
}
function resizepage() {
var e1 = document.getElementById("page");
var width = document.documentElement.clientWidth;
var height = document.documentElement.clientHeight;
document.body.style.width = width < 1000 ? 1000 + 'px' : width + 'px';
document.body.style.height = height < 450 ? 450 + 'px' : height + 'px';
e1.style.width = document.body.clientWidth - 20 + 'px';
e1.style.height = document.body.clientHeight - 10 + 'px';
document.getElementById("main").style.height = e1.clientHeight - 143 + 'px';
}