///<reference path="/Scripts/ExtPB_Net.js" />
///<reference path="/Scripts/MyExtPB.js" />
///<reference path="/Scripts/ExtPB_Dll_Pb_Http.js" />
///<reference path="/Scripts/MyExtPb_Input.js" />

function W_CW_CFTDZD_Main() {

    var self = this;
    this.Instance = null;
    var requestor = new PBWindow();
    var wb_1 = new PBWebBrowser(requestor);

    if (typeof (this.bind) == "function") var baseBind = this.bind;
    this.bind = function (win) {
        self.Instance = win;
        if (typeof (baseBind) == "function") baseBind(win);

        if (requestor == null) requestor = new PBWindow();
        requestor.Attach(win);
        if (wb_1 == null) wb_1 = new PBWebBrowser(requestor);
        wb_1.Attach(win.Control("wb_1"));

        if (typeof (self.PostOpen) == "function")
            win.AttachEvent("window", "PostOpen", self.PostOpen);

    }

    if (typeof (this.unbind) == "function") var baseUnBind = this.unbind;
    this.unbind = function () {
        self.Instance = null;
        if (typeof (this.Release) == "function") this.Release();
        if (typeof (baseUnBind) == "function") baseUnBind();

        wb_1.Detach(); wb_1 = null;
        requestor.Detach(); requestor = null;

        setTimeout(CollectGarbage, 100);
    }

    //以上代码由设计器自动生成,请不要手工修改
    //ExtPB.Net JavaScript End  设计器查找标志,请不要删除或修改
    var curUrl = "";
    this.PostOpen = function () {
        curUrl = GetGlobalParm("XTCS", "CW_CFTDZD_URL", "bzxx");
        if (curUrl.length > 0) {
            curUrl = curUrl + "&curDate=" + new Date().toUTCString();
            wb_1.Navigate(curUrl);
        } 
    } 
}