function ResizeElementHeight(div_id, height) {
    try {

        if (window.innerHeight) {
            //MOZILLA
            document.getElementById(div_id).style.height = height + "px";
        }
        else if (document.documentElement && document.documentElement.clientHeight) {
            document.getElementById(div_id).style.height = height + "px";
        }
        else if (document.body) {
            //IE 7
            document.getElementById(div_id).style.height = height + "px";
        }
        else {
            document.getElementById(div_id).style.height = height + "px";
        }
    }
    catch (Exception) {
        alert(Exception.description);
    }
}
function ScrollTo(target) {
    try {
        var is_number = parseInt(target, 10);

        if (window.innerHeight) {

            if (isNaN(is_number)) {
                if (target.toUpperCase() == "TOP")
                { window.scrollTo(0, 0); }
                else if (target.toUpperCase() == "BOTTOM")
                { window.scrollTo(0, window.innerHeight); }
            }
            else { window.scrollTo(0, target); }
        }
        else {
            if (isNaN(is_number)) {
                if (target.toUpperCase() == "TOP")
                { window.scrollTo(0, 0); }
                else if (target.toUpperCase() == "BOTTOM")
                { window.scrollTo(0, 50000); }
            }
            else { window.scrollTo(0, target); }
        }

    }
    catch (Exception) {
        alert('ScrollTo() Exception: ' + Exception.description);
    }

}


function ResetElementSize(div_id) {

    try {
        var tempw = document.getElementById(div_id).style.width;
        var temph = document.getElementById(div_id).style.height;

        var div_width = tempw.split("px");
        var div_height = temph.split("px");

        if (window.innerWidth) {

            if (window.innerWidth > div_width[0]) {
                document.getElementById(div_id).style.width = "100%";
            }

            if (window.innerHeight > div_height[0]) {
                document.getElementById(div_id).style.height = "100%";
            }

        }
        else if (document.documentElement && document.documentElement.clientWidth) {

            if (document.documentElement.clientWidth > div_width[0]) {
                document.getElementById(div_id).style.width = "100%";
            }

            if (document.documentElement.clientHeight > div_height[0]) {
                document.getElementById(div_id).style.height = "100%";
            }
        }
        else if (document.body) {
            if (document.body.clientWidth > div_width[0]) {
                document.getElementById(div_id).style.width = "100%";
            }

            if (document.body.clientHeight > div_height[0]) {
                document.getElementById(div_id).style.height = "100%";
            }

        }
    }
    catch (Exception) {
        alert('GetBrowserSize() Exception: ' + Exception.description);
    }
}