Fine & Country
\n');
}
// measure page width and height (the viewable canvas area)
function getCanvas() {
if (window.innerWidth) this.w = window.innerWidth;
else if (document.width) this.w = document.width;
else if (document.documentElement && document.documentElement.clientWidth) this.w = document.documentElement.clientWidth;
else if (document.body && document.body.clientWidth) this.w = document.body.clientWidth;
else this.w = 0;
if (window.innerHeight) this.h = window.innerHeight;
else if (document.height) this.h = document.height;
else if (document.documentElement && document.documentElement.clientHeight) this.h = document.documentElement.clientHeight;
else if (document.body && document.body.clientHeight) this.h = document.body.clientHeight;
else this.h = 0;
return this;
}
// resize the page / canvas (inner dimensions of the window)
function resizeCanvas(w, h) {
// Check whether page is called in a frame..
if (window.self == window.top) {
// not in a frame
window.moveTo(0, 0);
}
else {
// in a frame - do nothing
}
var canvas = new getCanvas();
window.resizeBy(w - canvas.w, h - canvas.h);
}