﻿function UpdateSize(xamlName, setHeight) {
    var width = getClientWidth();
    if (width < minWidth) { width = minWidth }
    var control = document.getElementById("ctl00_MainBody_Xaml");
    control.Content.Page.PageResize(width, setHeight);
    var xamlDiv = document.getElementById("xamlDiv");
    var divWidth = width;
    xamlDiv.style.width = divWidth + "px";
    //xamlDiv.style.marginLeft = "3px";
    //xamlDiv.style.marginRight = "3px";
    control.style.width = width + "px";
    var headerT = document.getElementById("headerTable");
    headerT.style.width = "100%";
}
function getClientWidth() {
    if (typeof (window.innerWidth) == 'number') {    //Non-IE    
        myWidth = window.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) {    //IE 6+ in 'standards compliant mode'    
        myWidth = document.documentElement.clientWidth;
    }
    else if (document.body && document.body.clientWidth) {    //IE 4 compatible
        myWidth = document.body.clientWidth;
    }
    return myWidth - 50;
}
function SetContentHeight(height) {
    var control = document.getElementById("ctl00_MainBody_Xaml");
    var contDiv = document.getElementById("xamlDiv");
    contDiv.style.height = height + "px";
    if (control != null) {
        control.style.height = height + "px";
    }
}
function SetContentWidth(width) {
    var control = document.getElementById("ctl00_MainBody_Xaml");
    var contDiv = document.getElementById("xamlDiv");
    contDiv.style.width = width + "px";
    if (control != null) {
        control.style.width = width + "px";
    }
}
