﻿
function WindowPrint(url, w, h) {
    return RunWindow(url, "PrintWindow", w, h)
}

function RunWindow(url, name, width, height, isPrint) {
    if (width == null) width = 0;
    if (height == null) height = 0;
    if (isPrint == null) isPrint = 0;
    if (width <= 0) width = 796;
    if (height <= 0) height = 700;
    if (isPrint != 0) isPrint = 1;
    var win;
    try {
        win = window.open(url, name, "width=" + width + ",height=" + height + ",resizable=1,scrollbars=1,directories=0,toolbar=0,location=0,status=1,menubar=" + isPrint + ",copyhistory=0");
    }
    catch (e) {
        alert(e);
    }
    try {
        win.focus();
    }
    catch (e) {
        alert(e);
    }    
    //return true;
}
