function jsIndexPage(){

};
jsIndexPage.listIndexNo="tab-callRecord";/*当前选择的是哪一个选项卡*/
jsIndexPage.IsCallReOrBookReg=false;/*纯话务：true;有通讯簿：false;*/

window.onload = function() {
    $(document.body).mask("页面加载中,请稍后...");
    App.SetNullHref(0);
    if (App.clientScreenSize().Width == 1024) {
        $("#rightContainer").width("18%");
    }
    jsIndexPage.setDocumentDetail();
    setTimeout("jsTitle.onLoadTitle()", 100); /*加载模板设计内容*/
    jsRightMessage.LoadRightMessageUI(); /*加载显示短信平台页面*/
    jsRightAudio.onLaodAudioUI();
    /*  jsBottom.LoadBottomUI(); 状态栏加载*/
    App.SetNullHref(1);
    $(document.body).unmask();
}
/*设置导航页签*/
jsIndexPage.setDocumentDetail=function()
{
    var items =
    [                
      { id: "tab-addressBook", text: "通讯簿", closeable: false,url:"frmAddressBook.htm",onactive:jsIndexPage.ActiveBookListTab,loadaction:"jsBookListModle.LoadRefreshBookPage"},  
     // { id: "tab-adrBook", text: "单位模式通讯簿", closeable: false,url:"frmAdrBookForCompany.htm"},  
      { id: "tab-callRecord", text: "通话记录", closeable: false,url:"frmCallRecord.htm",onactive:jsIndexPage.ActiveCallRecordTab,loadaction:"jsTelBillCenterContent.LoadRefreshRecordPage"},
////        { id: "tab-callPlat", text: "话务台", closeable: false,url:"frmCallPlat.htm"},
//      { id: "tab-messageSend", text: "短信管理", closeable: false,url: "SMSMessage/frmSMSMainPage.htm",onactive:jsIndexPage.ActiveMessgeManSet},
//        { id: "tab-faxMan", text: "传真管理", closeable: false, url:""}, 
       { id: "tab-systemMan", text: "系统设置", closeable: false, url: "frmSystemSettings/frmSystemSettings.htm",onactive:jsIndexPage.ActiveSystemSet},
       { id: "tab-callset", text: "话机设置", closeable: false, location:"jsTelParameterSet.LoadDataInfo()", url: "frmTelParameterSet.htm",onactive: jsIndexPage.ActiveCallset}
//       ,{ id: "tab-SMSMan", text: "短信帐户录入", closeable: false, onactive:jsIndexPage.ActiveSMSMan, url:"SMSMessage/frmSMSAccountManage.htm"}
    ];
    $("#div-other-Info").tabpanel({ items: items, width:document.body.clientWidth*0.85,height:document.body.clientHeight-50});
    $("#div-other-Info").opentabitem({ id: "tab-addressBook"});
}
/*主页面执行子页面方法接口*/
jsIndexPage.freshItemPage = function(itemPageName, MthName) {
    itemPageName = "tab_item_frame_" + itemPageName;
    window.frames[itemPageName].execScript(MthName);
};
jsIndexPage.freshItemItemPage=function(itemPageName,MthName)
{
    itemPageName="tab_item_frame_"+itemPageName;
    window.frames[itemPageName].frames["ifrMainContent"].execScript(MthName);
};
/*待拨号串*/
jsIndexPage.WaitDialNumber="";
/*设置待拨号串*/
jsIndexPage.setDialNumberString=function(_numberString)
{
    try
    {
        jsIndexPage.WaitDialNumber=_numberString;
    }
    catch(e)
    {
        alert("jsIndexPage.setDialNumberString:"+e.message);
    }
    CollectGarbage();
};
/*设置待拨号串*/
jsIndexPage.getDialNumberString=function()
{
    return jsIndexPage.WaitDialNumber;
};
//window.onresize=function()
//{
//    alert('a');
//};

 /*点击通话记录时执行操作*/
jsIndexPage.ActiveCallRecordTab = function() {
    jsIndexPage.listIndexNo = "tab-callRecord";
    jsIndexPage.HideOrShowRightPlat();
};

jsIndexPage.loadWithMask = function() {
    $(document.body).mask("页面加载中,请稍后...");
}
jsIndexPage.loadWithUnMask = function() {
    $(document.body).unmask();
}

 /*点击通讯簿时执行操作*/
jsIndexPage.ActiveBookListTab = function() {
    jsIndexPage.listIndexNo="tab-addressBook";
    jsIndexPage.HideOrShowRightPlat();
 };
 
  /*点击短信管理*/
 jsIndexPage.ActiveMessgeManSet = function() {
    jsIndexPage.listIndexNo="tab-messageSend";
    jsIndexPage.HideOrShowRightPlat();
}
 
 /*点击系统设置*/
jsIndexPage.ActiveSystemSet = function() {
    jsIndexPage.listIndexNo="tab-systemMan";
    jsIndexPage.HideOrShowRightPlat();
}

/*点击话机设置*/
jsIndexPage.ActiveCallset = function() {
    jsIndexPage.listIndexNo="tab-callset";
    jsIndexPage.HideOrShowRightPlat();
}

/*点击短信帐户录入*/
jsIndexPage.ActiveSMSMan = function() {
    jsIndexPage.listIndexNo="tab-SMSMan";
    jsIndexPage.HideOrShowRightPlat();
}

/*点击主页便签时显示或隐藏拨号台*/
jsIndexPage.HideOrShowRightPlat = function() {
    var SumWidth = document.body.clientWidth;
    if (App.clientScreenSize().Width == 1024) {
        SumWidth = SumWidth - 40;
    }
    var rightObj = window.frames["tab_item_frame_" + jsIndexPage.listIndexNo].document.getElementById("rightContainer");
    if (jsIndexPage.listIndexNo == "tab-callRecord" || jsIndexPage.listIndexNo == "tab-addressBook") {
        if (rightObj != null) {
            if (rightObj.style.display == "none") {
                document.getElementById("rightContainer").style.display = "none";
                $("#div-other-Info").resizetabpanel(SumWidth, document.body.clientHeight - 50);
            }
            else {
                document.getElementById("rightContainer").style.display = "";
                $("#div-other-Info").resizetabpanel(SumWidth * 0.85, document.body.clientHeight - 50);
            }
        }
        else {
            document.getElementById("rightContainer").style.display = "";
            $("#div-other-Info").resizetabpanel(SumWidth * 0.85, document.body.clientHeight - 50);
        }
        //document.getElementById("bottomCon").style.display="";
    } else {
        document.getElementById("rightContainer").style.display = "none";
        //document.getElementById("bottomCon").style.display="none";
        $("#div-other-Info").resizetabpanel(SumWidth, document.body.clientHeight - 50);
    }
};

/*点击右边div-right-split时显示或隐藏拨号台*/
jsIndexPage.ChangeFrameSize = function(isHide) {
    var SumWidth = document.body.clientWidth;
    if (App.clientScreenSize().Width == 1024) {
        SumWidth = SumWidth - 40;
    }
    if (isHide == "hide") {
        document.getElementById("rightContainer").style.display = "none";
        $("#div-other-Info").resizetabpanel(SumWidth, document.body.clientHeight - 50);
    }
    else {
        document.getElementById("rightContainer").style.display = "";
        $("#div-other-Info").resizetabpanel(SumWidth * 0.85, document.body.clientHeight - 50);
    }
};
