﻿var mywindow = null;
function printPage() {
    mywindow = window.open(document.location, "print", "location=1,status=1,scrollbars=1");
    //debugger;
    //mywindow.onload=initPageForPrint;
    setTimeout('initPageForPrint()', 500);
    //mywindow.document.getElementById('printCSS').media = 'screen';
    //mywindow.print();
}
function initPageForPrint() {
    //debugger;
    if (mywindow.document) {
        if (mywindow.document.body) {
            if (mywindow.document.readyState == 'complete' || mywindow.document.getElementById('printCSS')) {
                var printLink = mywindow.document.getElementById('printCSS');
                //printLink.media = 'screen';//debugger;
                mywindow.print();
            }
            else {
                setTimeout('initPageForPrint()', 500);
            }
        }
        else {
            setTimeout('initPageForPrint()', 500);
        }
    }
    else {
        setTimeout('initPageForPrint()', 500);
    }
}

$(document).ready(function() {


});
