﻿function printBodyContent() {    
    var DocumentContainer = document.getElementById("mainContent");
    var DocumentContainerNews = document.getElementById("left-side-part");
    var sideBox = document.getElementById("sideBox");
    if (sideBox != null) {
        sideBox.style.display = "none";
    }
    var html = '<html><head>' + '<link href="/bigsky-style.css" rel="stylesheet" type="text/css" />';

    if (styleName == 'Large')
        html = html + '<link href="/large.css" rel="stylesheet" type="text/css" />';

    if (styleName == 'Medium')
        html = html + '<link href="/medium.css" rel="stylesheet" type="text/css" />';

    if (styleName == 'Small')
        html = html + '<link href="/small.css" rel="stylesheet" type="text/css" />';
    if (DocumentContainer != null) {        
        html = html + '</head><body style="background:#ffffff;"><br />' + DocumentContainer.innerHTML + '</body></html>';
    }
    else if (DocumentContainerNews != null) {        
        html = html + '</head><body style="background:#ffffff;"><br />' + DocumentContainerNews.innerHTML + '</body></html>';
    }
    var WindowObject = window.open("", "PrintWindow", "width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");
    WindowObject.document.writeln(html);
    WindowObject.document.close();
    WindowObject.focus();
    WindowObject.print();
    WindowObject.close();
    if (sideBox != null) {
        sideBox.style.display = "block";
    }
}
