vjuenf, или
<body onResize="func()">
или
window.onresize = function () { }
var wwidth=(window.innerWidth)?window.innerWidth:
((document.all)?document.body.offsetWidth:null);
var wheight=(window.innerHeight)?window.innerHeight:
((document.all)?document.body.offsetHeight:null);
switch (true) {
case (wwidth == 1000 && wheight == 1000): {}
case (...): {}
...
}