var resize = true;

window.onload = initPage;
//window.onresize = alignPage;

function initPage() {
	//fixflashie();
	alignPage();
}

function alignPage() {

	resize = false;
	
	var undefined = undefined;
	var wh = getWindowHeight();
	var con = getControl('wdContent');
	var foo = getControl('wdFooter');
	var conH = getControlOffSetHeight('wdContent') + getY(con);// + 221;
	
	var newH = (Math.max(wh, conH));

	foo.style.top = (newH - 12) + 'px';

	resize = true;
	
}




function adjustPT2() {
    
    var full = true;
    $("#wdItemsCnt").children().each(function(){
        if ($(this).html().length > 0) {
            full = false;
        }
    })
    if (full) {
        $("#wdPageContent").css("width","100%");
    } else {
        $("#wdPageContent").css("width","530px");
    }
}