function alertSize() {
    var myWidth = 0, myHeight = 0;
    if (typeof (window.innerWidth) == 'number') {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    //  window.alert( 'Width = ' + myWidth + ' Height = ' + myHeight );

    var content = document.getElementById('content');
    var footer = document.getElementById('footer');
    var adverts = document.getElementById('adverts'); 
    var vignette = document.getElementById('background');

    if (content != null) {
        if (myWidth > 950) {
            content.style.width = myWidth + 'px';
            content.style.height = myHeight + 'px';
//            if (vignette != null) {
//                vignette.style.width = myWidth + 'px';
//                vignette.style.height = myHeight + 'px';
//            }
        }
        else {
            content.style.width = 950 + 'px';
            content.style.height = myHeight + 'px';
//            if (vignette != null) {
//                vignette.style.width = 950 + 'px';
//                vignette.style.height = myHeight + 'px';
//            }
        }
    }

    if (footer != null) {
        footer.style.top = myHeight - 62 + 'px';
        footer.style.left = 0 + 'px';
    }
	
	if (adverts != null) {
        adverts.style.top = myHeight - 62 + 'px';
        adverts.style.left = myWidth - 150 + 'px';
    }
}

Event.observe(document.onresize ? document : window, "resize", alertSize);
Event.observe(document.onresize ? document : window, "load", alertSize);
