﻿function ResizeDiv() {

    var viewportheight;
    var viewportwidth;

    // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight

    if (typeof window.innerWidth != 'undefined') {
        viewportheight = window.innerHeight;
        viewportwidth = window.innerWidth;
    }

    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

    else if (typeof document.documentElement != 'undefined'
                && typeof document.documentElement.clientWidth != 'undefined'
                && document.documentElement.clientWidth != 0) {
        viewportheight = document.documentElement.clientHeight;
        viewportwidth = document.documentElement.clientWidth;
    }

    // older versions of IE

    else {
        viewportheight = document.getElementsByTagName('body')[0].clientHeight;
        viewportwidth = document.getElementsByTagName('body')[0].clientWidth;
    }

//    var div = document.getElementById('contentDIV');
//    div.style.overflow = "auto";
//    var screenHeight = viewportheight - 144;
//    var styleHeight = screenHeight + "px";
//    div.style.height = styleHeight;

    var panel = document.getElementById('ctl00_Panel1');
    var screenWidth = viewportwidth - 322;
    var styleWidth = screenWidth + "px";
    panel.style.width = styleWidth;
}