
var hhg=null;var tvn=null;var fay=null;var urj=null;var gwu=null;var scf=null;var ehq=null;var tnc=null;var pnn=null;var bsy=-1;var qjk=null;var cov=null;var oug="8357E455-0C84-4609-9CBD-04C07EBF7E63";var ftn=null;var aar=null;var pfc=-1;var bln=null;var zhz="3651FF95-A5F7-4926-8197-6C06BBAFA6AE";var rjn=null;var dpy=null;var pmk=12;var suj=null;var eau=null;var $span_NoteCount=null;var qfg=null;var cwr=null;var treeObj=null;var nxq=null;var lim=null;var kij=19;var qus=false;var kpf=false;var bsv=0;var nyg=null;if(ymr(DcxTree["T2029_19"]))DcxTree["T2029_19"]={};var azo=null;var mfz=null;var nbk=null;var zhv=null;var oud=null;Dcx.IsLogin=true;$(document).ready(function(){DcxHome.IsHome=true;var c=function(a){if(!ymr(a))nyg=a;if(ymr(nyg))nyg=zom();mfz=$("#spnWelcomeGreet");nbk=$("#welcomeTrueName");zhv=$("#dvNavTop");if(!ymr(nyg)){var b=nyg.RealName;if(ymr(b))b=nyg.UserName;DcxHome.UserId=nyg.UserId;DcxHome.DeptId=nyg.DeptId;DcxHome.UserName=nyg.UserName;DcxHome.RealName=nyg.RealName;DcxHome.DcxEmail=nyg.DcxEmail;DcxHome.Mac=nyg.Mac;DcxHome.VersionId=nyg.VersionId;if(DcxHome.UserName=="admin")DcxHome.IsAdmin=true;DcxHome.IsSystemMnger=nyg.IsSystemMnger;zhv.html("<div class=\"avatar-mod clearfix\"><a href=\"javascript:void(0);\" class=\"ui_avatar\" style=\"float: left; clear: none;\"><img src=\""+jbc(nyg.UserId,2)+"\" /></a><div class=\"infos\" style=\"float: left; clear: none; margin-left: 10px;\"><div class=\"nickname\"><a href=\"javascript:void(0);\" title=\""+b+"\">"+b+"</a></div></div></div>");nbk.html(b+"，");ruv=$("#divCenter");ruv.html(""+b+"<b class=\"dcx-ico menu-ico-dArr ico-drop\">d</b>")}};nyg=zom();if(ymr(nyg)||nyg.UserId<1){Dcx.IsLogin=false;lmb(function(){Dcx.IsLogin=true;c()})}else{Dcx.IsLogin=true;c(nyg)}});$(window).load(function(){if(Dcx.IsLogin!=true)return;iff("hpEntList");iff("hpMenuObj");iff("hpSearchItems");iff("hpSearchItems");suj=$("#span_WorkCount");eau=$("#span_EmailCount");$span_NoteCount=$("#span_NoteCount");qfg=$("#div_UserList");DcxHome.dhn=qfg;hxi();if(ymr(scf)||scf.length<1)scf=$("#dcxContainer");bsv=parseInt(scf.width(),10);oro($("#div_SearchItem"),null,1);oro($("#divCenter"),null,1);oro($("#divRecently"),null,1);oro($("#divMyApp"),null,1);oro($("#div_Creator"),null,1);setTimeout(function(){uzf()},2000);$(document).mousedown(function(a){var b=$(a.srcElement);var c=false;while(!ymr(b)&&b.length>0){if($.trim(b.attr("isTree"))=="1"){c=true;break}else b=b.parent()}
if(!c){if(ymr(DcxHome.zcb))DcxHome.zcb=$("#sptree19");DcxHome.zcb.hide()}});if(azo==null)azo=$("#gotop");$(window).scroll(function(){if($(window).scrollTop()>50){azo.fadeIn(100)}else{azo.fadeOut(100)}});azo.click(function(){$('body,html').scrollTop(0);return false});mfz=$("#spnWelcomeGreet");mfz.html(tzb());setInterval(function(){mfz.html(tzb())},1200000);if(!DcxHome.IsSystemMnger){$("#divSysManage").hide();$("#divSysMngMenu").hide()}else{}
DcxHome.$divAppArea=$("#divAppArea");var d=DcxHome.$divAppArea.find("li[tabid]");d.unbind("click").bind("click",function(){var a=parseInt($(this).attr("tabid"),10);d.removeClass("dcx-tabs-selected");$(this).addClass("dcx-tabs-selected");var b=DcxHome.$divAppArea.next().children();b.hide();if(a==1){var c=b.filter("[tabid=1]");if(c.find("iframe").length<1)c.html("<iframe width='200' scrolling='no' height='60' style ='margin-left :10px;' frameborder='0' allowtransparency='true' src='http://i.tianqi.com/index.php?c=code&id=12&icon=1&num=4'></iframe>");c.show()}else if(a==2){b.filter("[tabid=2]").show();DcxHome.bgw(b)}else if(a==3){b.filter("[tabid=3]").show();DcxHome.fen(3,b)}});d.filter("[tabid=1]").click();cwr=$("#divRecentlyList");var e=yoj("hpRecentlyApps");if(!ymr(e)){e=unescape(e);try{e=eval("("+e+")")}catch(err){e=null;alert(2)}
var f=new nzy();if(!ymr(e)){for(var i=e.length-1;i>=0;i--){f.append("     <div  class=\"js-component-menuitem nui-menu-item\" style=\"line-height:33px;\">\n");var p="";if(!ymr(e[i].ed)&&e[i].ed>0)p="&EntId="+e[i].ed;var g=e[i].mn;if(!ymr(e[i].en))g=e[i].en;f.append("         <a  href=\"javascript:void(0);\" onclick=\"javascript:jft('"+e[i].u+"',"+e[i].md+",'"+g+"','"+p+"');\" title=\"请点击进入\" class=\"nui-menu-item-link\"><span class=\"nui-menu-item-text\">"+g+"</span></a>\n");f.append("    </div>\n")}}
cwr.html(f.toString())}});function lbt(a,b,c,d,e){var f=yoj("hpRecentlyApps");if(!ymr(f)){f=unescape(f);try{f=eval("("+f+")")}catch(err){f=new Array()}}else f=new Array();for(var i=0;i<f.length;i++){if(f[i].md==b)return}
var v={"u":a,"md":b,"mn":c};if(!ymr(d)&&d>0)v["ed"]=d;if(!ymr(e))v["en"]=e;f.push(v);var g=new nzy();g.append("     <div  class=\"js-component-menuitem nui-menu-item\" style=\"margin-top: 10px;margin-bottom: 6px;\">\n");var p="";if(!ymr(v.ed)&&v.ed>0)p="&EntId="+v.ed;var h=v.mn;if(!ymr(v.en))h=v.en;g.append("         <a  href=\"javascript:void(0);\" onclick=\"javascript:jft('"+v.u+"',"+v.md+",'"+h+"','"+p+"');\"  title=\"请点击进入\" class=\"nui-menu-item-link\"><span class=\"nui-menu-item-text\">"+h+"</span></a>\n");g.append("    </div>\n");if(f.length<2)cwr.html(g.toString());else cwr.prepend(g.toString());if(f.length>10){for(var i=f.length-10;i>=0;i--){f.splice(i,1)}
cwr.children(":last").remove()}
f=escape(JSON2.stringify(f));var j=new Date();j.setFullYear(j.getFullYear()+10);wzu("hpRecentlyApps",f);return true}
function xhe(a){var b=$(a).parent();b.remove()}
function jmp(){scf.children().hide();var a=scf.children("[topmenuid=0]:last");a.fadeIn(500)}
function CreateNewWork(){jft("/Template/default/ListReport/ListReport_Tree001.aspx",2632,"新建工作");return false}
function wox(a){jft("/Template/default/ListReport/ListReport_Tree001.aspx",2633,"待办工作");return false}
function iui(a){jft("/Template/default/form/AllForm_List_Tree_Tag.aspx",3310,"内部邮箱","&entid=2070");return false}
function xzt(a){jft("/Template/default/form/AllForm_List_Tree_Tag.aspx",3311,"私信","&entid=2075");return false}
function jft(c,d,e,f){var g=[1963,1833,2688,3019,3285,3286,3288,3294,3283,3274,3275,3416,3277,3420];for(var i=0;i<g.length;i++){if(d==g[i]){window.open(c,d);return false}}
if(!ymr(c)){if(ymr(scf)||scf.length<1)scf=$("#dcxContainer");var h=scf.children("[menuid="+d+"]");scf.children().hide();if(ymr(h)||h.length<1){h=$("<div MenuId=\""+d+"\"  style=\"width:100%;height:100%;\"></div>");scf.append(h);var t=c.toLowerCase();var j=c;if(t.indexOf("&menuid")<0&&t.indexOf("?menuid")<0){if(t.indexOf("?")>=0)c=c+"&menuid="+d;else c=c+"?menuid="+d}
if(c.indexOf("?")>=0)c=c+"&iframeId=iframe_"+d;else c=c+"?iframeId=iframe_"+d;if(!ymr(f))c=c+f;var k=$("<iframe scrolling=\"no\" frameborder=\"0\"  src=\""+c+"\" oldsrc=\""+j+"\"  class=\"dcx-scroll \" id=\"iframe_"+d+"\" name=\"iframe_"+d+"\" MenuId="+d+" style=\"width: 100%;height:650px;overflow :hidden ; border: 0px none;_border:none;behavior:url(pie.htc);\" ></iframe>");h.append(k);usx(k);ehq=k;k.load(function(){setTimeout(function(){var a=k.contents().find("body").height()+140;k.height(a<750?750:a)},200);var b=k.get(0).contentWindow;$("html",b.document).bind("click",function(){if(DcxHome.zcb==null)DcxHome.zcb=$("#sptree19");DcxHome.zcb.hide()})});if(parseInt(d,10)>0)lbt(c,d,e);$('body,html').scrollTop(0);return h}else{ehq=h.children("iframe");var l=ehq.attr("src");var m=false;if(l.toLowerCase().indexOf(c.toLowerCase())<0)m=true;var n=null;if(!ymr(ehq.get(0).contentWindow))n=ehq.get(0).contentWindow.location.href;if(!ymr(n)){var o=c;if(o.indexOf("?")>=0)o=o+"&menuid="+d;else o=o+"?menuid="+d;if(!m&&n.toLowerCase().indexOf(o.toLowerCase())<0)m=true}
if(!ymr(f)||l.toLowerCase().indexOf("schfieldname")>=0)m=true;if(m){c=ehq.attr("oldsrc");m=true}
var t=c.toLowerCase();if(m&&t.indexOf("&menuid")<0&&t.indexOf("?menuid")<0&&t.indexOf("menuid=")<0){if(t.indexOf("?")>=0)c=c+"&menuid="+d;else c=c+"?menuid="+d}
if(c.indexOf("?")>=0)c=c+"&iframeId=iframe_"+d;else c=c+"?iframeId=iframe_"+d;if(!ymr(f)){c=c+f}
if(m)ehq.attr("src",c);h.show();$('body,html').scrollTop(0);return h}}else return null}
DcxHome.jft=jft;function vve(a){if(ymr(scf)||scf.length<1)scf=$("#dcxContainer");var b=scf.children("[menuid="+a+"]");if(ymr(b)||b.length<1)return null;return b}
function hbq(a){if(ymr(scf)||scf.length<1)scf=$("#dcxContainer");var b=scf.children("[menuid="+a+"]");if(ymr(b)||b.length<1)return true;b.remove();scf.children().hide();var c=scf.children("[topmenuid=0]");try{c.fadeIn(1000)}catch(er){}
c.show();return true}
function whb(a){var b=$(a);var c=b.contents().find("body");var d=c.height()+140;b.height(d<500?500:d);window.scrollTo(0,0)}
function imm(a){var b=$(a);var c=null;if(a.contentDocument){c=a.contentDocument}else if(a.contentWindow){c=a.contentWindow.document}
if(c){var d=c.documentElement.scrollWidth;var e=c.documentElement.scrollHeight+1400;b.height(e<500?500:e);setTimeout(scrollTo,500)}else{alert("this browser doesn't seem to support the iframe document object")}}
function usx(a){var b=$.browser.msie?true:false;if(b&&window.PIE){a.each(function(){PIE.attach(this)})}}
function scrollTo(){window.scrollTo(0,0)}
function hxi(){var c="/WebServices/HomePage/HomePage.asmx/hxi";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:"{msgPageSize:"+msgPageSize+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取主页信息失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(a){a=hmy(a);if(a==null){art.VLdialog.alert("获取主页信息失败！",function(){},8,"提示");return false}
if(a.reMsg.IsOK==false){art.VLdialog.alert(a.reMsg.ErrorMsg,function(){},8,"提示");return false}
try{homePageLoadedMsg=a;if(a.WorkCount>0)suj.show().find("span[isdata=1]").html(a.WorkCount);else suj.hide().find("span[isdata=1]").html("0");if(a.EmailCount>0)eau.show().find("span[isdata=1]").html(a.EmailCount);else eau.hide().find("span[isdata=1]").html("0");if(a.NoteCount>0)$span_NoteCount.show().find("span[isdata=1]").html(a.NoteCount);else $span_NoteCount.hide().find("span[isdata=1]").html("0");goz(a.MsgList,1);goz(a.TopMsgList,2);msgAllCount=a.MsgCount;tmc(1)}catch(e){}
try{DcxIM.Init()}catch(e){}}})}
function gpd(){if(!isNaN(bsy)&&bsy>0)return bsy;var a="/WebServices/Comman/Comman.asmx/gpd";var b=0;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:a,async:false,data:"{}",dataType:'json',success:function(r){r=hmy(r);bsy=r}});return bsy}
function iuu(){if(!ymr(cov))return cov;var c=yoj("hpMenuObj");if(!ymr($.trim(c))){cov=eval("("+c+")");bsy=cov.MenuId;if(!ymr(cov))return}
var d="/WebServices/Menu/Menu_Run.asmx/GetHomePageMenu";var e=0;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:d,async:false,data:"{}",dataType:'json',success:function(r){r=hmy(r);cov=r;if(!ymr(cov)){bsy=cov.MenuId;var a={MenuId:cov.MenuId,MenuName:cov.MenuName,ProPath:cov.ProPath};a=JSON2.stringify(a);var b=new Date();b.setTime(b.getTime()+30*(24*60*60*1000));wzu("hpMenuObj",a,b)}}});return cov}
function sgo(){iuu();if(!ymr(qjk)){ConvertHomePageEntityToHtml();return qjk}
var d=yoj("hpEntList");if(!ymr($.trim(d))){qjk=eval(d);if(!ymr(qjk)){ConvertHomePageEntityToHtml();return qjk}}
var e="/WebServices/HomePage/HomePage.asmx/sgo";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{MenuId:"+bsy+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取网页菜单失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(a){a=hmy(a);if(a==null){art.VLdialog.alert("获取主页应用失败！",function(){},8,"提示");return false}
qjk=a;if(!ymr(qjk)){ConvertHomePageEntityToHtml();var b=new Array();for(var i=0;i<qjk.length;i++){b.push({"EntId":qjk[i].EntId,"EntName":qjk[i].EntName})}
b=JSON2.stringify(b);var c=new Date();c.setTime(c.getTime()+30*(24*60*60*1000));wzu("hpEntList",b,c)}}})}
function uzf(){var d=false;if(!ymr(DcxHome.SearchItems)&&DcxHome.SearchItems.length>0){gxf();d=true}
var e=yoj("hpSearchItems");if(!d&&!ymr($.trim(e))){DcxHome.SearchItems=eval(e);if(!ymr(DcxHome.SearchItems)){gxf();d=true}}
if(d&&!ymr(DcxHome.NavMenus)&&DcxHome.SearchItems.length>0){fmj();return}
var e=yoj("hpNavMenus");if(d&&!ymr($.trim(e))){DcxHome.NavMenus=eval(e);if(!ymr(DcxHome.NavMenus)){fmj();if(d)return}}
var f="/WebServices/HomePage/HomePage.asmx/uzf";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:f,data:"{}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取可搜索项目失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(c){c=hmy(c);if(c==null){art.VLdialog.alert("无可选搜索项目，请联系管理员，通知其设置可搜索项目。",function(){},8,"提示");return false}
DcxHome.SearchItems=c.SearchItems;DcxHome.NavMenus=c.NavMenus;DcxHome.SearchItems.sort(function(a,b){return a.SortOrder-b.SortOrder});DcxHome.NavMenus.sort(function(a,b){return a.SortOrder-b.SortOrder});if(!ymr(DcxHome.SearchItems)){gxf()}
if(!ymr(DcxHome.NavMenus)){fmj()}}})}
function gfq(){if(!ymr(DcxHome.NavMenus)){gxf();return DcxHome.NavMenus}
var e=yoj("hpNavMenus");if(!ymr($.trim(e))){DcxHome.NavMenus=eval(e);if(!ymr(DcxHome.NavMenus)){gxf();return DcxHome.NavMenus}}
var f="/WebServices/HomePage/HomePage.asmx/gfq";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:f,data:"{}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取我的应用失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(c){c=hmy(c);if(c==null){art.VLdialog.alert("您还没配置自己的应用，请点击“管理”进行设置。",function(){},8,"提示");return false}
DcxHome.NavMenus=c;DcxHome.NavMenus.sort(function(a,b){return a.SortOrder-b.SortOrder});if(!ymr(DcxHome.NavMenus)){gxf();e=JSON2.stringify(DcxHome.NavMenus);var d=new Date();d.setTime(d.getTime()+30*(24*60*60*1000));wzu("hpNavMenus",e,d)}}})}
function vkb(){if(!ymr(DcxHome.SearchItems)){gxf();return DcxHome.SearchItems}
var e=yoj("hpSearchItems");if(!ymr($.trim(e))){DcxHome.SearchItems=eval(e);if(!ymr(DcxHome.SearchItems)){gxf();return DcxHome.SearchItems}}
var f="/WebServices/HomePage/HomePage.asmx/vkb";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:f,data:"{}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取可搜索项目失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(c){c=hmy(c);if(c==null){art.VLdialog.alert("无法找到可搜索选项，请联系系统管理员，通知其进入“搜索设置”中添加可搜索选项。",function(){},8,"提示");return false}
DcxHome.SearchItems=c;DcxHome.SearchItems.sort(function(a,b){return a.SortOrder-b.SortOrder});if(!ymr(DcxHome.SearchItems)){gxf();e=JSON2.stringify(DcxHome.SearchItems);var d=new Date();d.setTime(d.getTime()+30*(24*60*60*1000));wzu("hpSearchItems",e,d)}}})}
DcxHome.hbm=function(e){var f={"list":e};var g="/WebServices/HomePage/HomePage.asmx/hbm";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,data:JSON2.stringify(f),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取可搜索项目失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(c){c=hmy(c);if(c==null){art.VLdialog.alert("提交失败！",function(){},8,"提示");return false}else if(!c.IsOK){art.VLdialog.alert("提交失败！原因："+c.ErrorMsg,function(){},8,"提示");return false}
art.VLdialog.tips("保存成功！",1);DcxHome.SearchItems=e;DcxHome.SearchItems.sort(function(a,b){return a.SortOrder-b.SortOrder});if(!ymr(DcxHome.SearchItems)){str=JSON2.stringify(DcxHome.SearchItems);var d=new Date();d.setTime(d.getTime()+30*(24*60*60*1000));wzu("hpSearchItems",str,d)}}})}
DcxHome.tgx=function(e){var f={"list":e};var g="/WebServices/HomePage/HomePage.asmx/tgx";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,data:JSON2.stringify(f),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取可搜索项目失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(c){c=hmy(c);if(c==null){art.VLdialog.alert("提交失败！",function(){},8,"提示");return false}else if(!c.IsOK){art.VLdialog.alert("提交失败！原因："+c.ErrorMsg,function(){},8,"提示");return false}
art.VLdialog.tips("保存成功！",1);DcxHome.NavMenus=e;DcxHome.NavMenus.sort(function(a,b){return a.SortOrder-b.SortOrder});if(!ymr(DcxHome.NavMenus)){str=JSON2.stringify(DcxHome.NavMenus);var d=new Date();d.setTime(d.getTime()+30*(24*60*60*1000));wzu("hpNavMenus",str,d)}}})}
function fmj(){var h=$("#divMyApp");var j=new nzy();var l=new Array();var m=new Array();for(var i=0;i<DcxHome.NavMenus.length;i++){l.push(DcxHome.NavMenus[i].MenuId);m.push(DcxHome.NavMenus[i].MenuName);j.append("<div tabindex=\""+i+"\" class=\"mynui-menu-item\"  navMenuId=\""+DcxHome.NavMenus[i].MenuId+"\"  >");j.append("<a href=\"javascript:void(0);\" turl=\""+DcxHome.NavMenus[i].ProPath+"\" class=\"mynui-menu-item-link\"><span class=\"nui-menu-item-text\">"+DcxHome.NavMenus[i].MenuName+"</span></a>");j.append("</div>")}
j.append("<div tabindex=\"-1\" navMenuId=\"-1\"  class=\"mynui-menu-item\">");j.append(" <a href=\"javascript:void(0);\" class=\"flat-btn \"  style=\"margin-left:26px;\">+ 管理</a></div>");var n=$("#divMyAppNavMore");n.html(j.toString());var o=function(d,e,f){var g=new Array();f.each(function(i){var a={};a.MenuId=parseInt($(this).attr("tvalue"),10);a.MenuName=$(this).find(".nd-right").text();var b=DcxHome.NavMenus;var c=false;for(var k=0;k<b.length;k++){if(b[k].MenuId==a.MenuId){a.ProPath=b[k].ProPath;c=true;break}}
if(!c){var b=ppk.bcpList;for(var k=0;k<b.length;k++){if(parseInt(b[k].Id,10)==a.MenuId){a.ProPath=b[k].V1;break}}}
a.SortOder=i;g.push(a)});DcxHome.NavMenus=g;fmj();DcxHome.tgx(DcxHome.NavMenus)};var p=n.children();if(p.length<1)return;p.each(function(){var c=$(this);c.unbind("click").bind("click",function(){var a=parseInt(c.attr("navMenuId"),10);if(a<1){ppk.eni(null,null,null,19,"全部应用",false,true,false,o);ppk.reo=220;ppk.dkz=220;ppk.Height=500;ppk.rmk=l;ppk.grv=m;ppk.qtt(h.get(0),2099,"",6);return}
var b=null;for(var i=0;i<DcxHome.NavMenus.length;i++){if(DcxHome.NavMenus[i].MenuId==a){b=DcxHome.NavMenus[i];if(ymr(b.ProPath))b.ProPath=ctw(b.MenuId);jft(b.ProPath,b.MenuId,b.MenuName);break}}})})}
function gxf(){var h=$("#divMyApp");var j=new nzy();var l=new Array();var m=new Array();var n=-1;for(var i=0;i<DcxHome.SearchItems.length;i++){if(i==0)n=DcxHome.SearchItems[0].SearchId;l.push(DcxHome.SearchItems[i].SearchId);m.push(DcxHome.SearchItems[i].MenuName);j.append("<div  class=\"js-component-menuitem nui-menu-item\"  SearchId=\""+DcxHome.SearchItems[i].SearchId+"\"  ><a  href=\"javascript:void(0);\" class=\"nui-menu-item-link\">");j.append("<span   class=\"nui-menu-item-text\">"+DcxHome.SearchItems[i].MenuName+"</span>");j.append("</a></div>")}
j.append("<div tabindex=\"-1\" SearchId=\"-1\" class=\"mynui-menu-item\">");j.append(" <a href=\"javascript:void(0);\" class=\"flat-btn \"  style=\"margin-left:26px;\">+ 管理</a></div>");rjn=$("#ul_SearchItem");rjn.html(j.toString());var o=function(d,e,f){var g=new Array();f.each(function(i){var a={};a.SearchId=parseInt($(this).attr("tvalue"),10);a.MenuName=$(this).find(".nd-right").text();var b=DcxHome.zor;var c=false;for(var k=0;k<b.length;k++){if(b[k].SearchId==a.SearchId){a.Title=b[k].Title;break}}
a.SortOder=i;g.push(a)});DcxHome.SearchItems=g;gxf();DcxHome.hbm(DcxHome.SearchItems)};var p=rjn.children();if(p.length<1)return;p.each(function(){var a=$(this);a.unbind("click").bind("click",function(){pfc=parseInt(a.attr("SearchId"),10);if(pfc<1){sdf(true,l,m,o,h.get(0));return}
bln=null;for(var i=0;i<DcxHome.SearchItems.length;i++){if(DcxHome.SearchItems[i].SearchId==pfc){bln=DcxHome.SearchItems[i];break}}
if(dpy==null)dpy=$("#txt_Search");dpy.val("");dpy.prev().html("搜索"+a.text()).show()})});if(n>0)p.filter("[SearchId="+n+"]").click()}
function sdf(f,g,h,j,k){var l="/WebServices/HomePage/HomePage.asmx/sdf";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:l,data:"{}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取可搜索项目失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(c){c=hmy(c);if(c==null){art.VLdialog.alert("获取可搜索项目失败！",function(){},8,"提示");return false}
DcxHome.zor=c;DcxHome.zor.sort(function(a,b){return a.SortOrder-b.SortOrder});if(f){var d=new Array();var e=new Array();for(var i=0;i<c.length;i++){d.push(c[i].SearchId);e.push(c[i].MenuName)}
ppk.eni(null,null,null,27,"搜索项目",false,false,false,j);ppk.reo=220;ppk.dkz=220;ppk.Height=500;ppk.rmk=g;ppk.grv=h;ppk.tqn=d;ppk.fgy=e;ppk.qtt(k,2099,"",7)}}})}
function etq(a){if(dpy==null)dpy=$("#txt_Search");if(ymr(bln)&&!ymr(DcxHome.SearchItems)&&DcxHome.SearchItems.length>0){bln=DcxHome.SearchItems[0]}
var b=ctw(bln.MenuId);var v=$.trim(dpy.val());if(ymr(bln))return false;var c="&EntId="+bln.EntId+"&schFieldName="+escape(bln.FieldName)+"&schFieldValue="+escape(v)+"&schComType="+escape(bln.CompareOperatorType)+"&schDataType="+bln.RunDataTypeId;if(ymr(v)){c=null}
jft(b,bln.MenuId,bln.MenuName,c)}
function ctw(c){var d=null;var e="/WebServices/Menu/Menu_Run.asmx/ctw";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,async:false,data:"{MenuId:"+c+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("获取网页地址失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(a){a=hmy(a);d=a}});return d}
function hcb(){if(!qus)dkp(kij,-1);if(DcxHome.zcb==null)DcxHome.zcb=$("#sptree19");if(nxq==null)nxq=$("#vl_superTreeMsg19");var a=DcxHome.zcb.height();var b=$(window).height();var c=b-a-15;if(c<1)c=10;DcxHome.zcb.css({"bottom":"0px","left":"0px"}).show()}
function dkp(c,d,e){d=ymr(d)?0:d;var f=true;var g=null;var h=wbi(c,e);if(!ymr(e))f=false;if(ymr(h)||h.length<1){art.VLdialog.alert("获取父级节点时失败",function(){},10,"提示");return false}
if(!f&&h.parent().attr("geted")=="1")return true;var i=jrb(c);var j=wtm(c);var k="/WebServices/Menu/Menu_Run.asmx/spqTreeNodeHtml";if(d<0)d=0;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:k,data:"{ParentId:"+d+",TreeId:"+c+",TreeObj:"+JSON2.stringify(j)+",CurMaxIndex:"+i+",FormType:"+vim(c)+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取树节点失败。详情："+b);return false},success:function(a){try{qus=true}catch(err){}
a=hmy(a);if(ymr(a)){art.VLdialog.alert("读取树节点时失败。",function(){},14,"提示");return false}
if(f)h.html(a.Text);else h.append(a.Text);var b=h.prev();if(b.next().children().length<1&&!f&&(i>0&&a.Id<1)){b.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");b.find(".nd-add-all").hide()}
h.parent().attr("geted","1");umq(c,a.Id)}});return}
DcxTree["T2029_19"].egm=function(a,b,c,d,e,f,g,h,i,j,k){if(a==2029&&i==19){var l=$(j).attr("tagName").toLowerCase();if(!isNaN(f))dkp(kij,f,j)}}
DcxTree["T2029_19"].ptq=function(a,b,c,d,e,f,g,h,i,j,k){if(a==2029&&i==19){var l=$(j).attr("tagName").toLowerCase();if(l=="a"&&!isNaN(f)){var m=hnx(j);var n=g;var o=f;o=parseInt(o,10);kpf=o;var p=$("#CurEntmsg");p.attr("MenuName",n);p.attr("MenuId",o);p.attr("EntId",-1);var q=$(j).attr("turl");if(!ymr(q)){if(DcxHome.zcb==null)DcxHome.zcb=$("#sptree19");DcxHome.zcb.hide();jft(q,f,g)}}}}
function tzb(){var d=new Date();var a=d.getDay();var P=d.getHours();if(a>0&&a<6){var V=[];if(P>=3&&P<6){V=["寂静的深夜，除了自己的心跳，还有我在陪你。","夜都睡了，你还不睡吗？","晚安，月亮也一起睡了。","夜深了，天上的星星都已经睡了。","晚睡伤身体，客官早点歇息吧: )","晚安，让美梦开始进入。"]}else if(P>=6&&P<9){V=["清风送来新的一天，早晨好！","一日之计在于晨，早安！","请在清早给自己一个微笑^__^","每个醒后的早晨都是一件礼物，早上好。","每一天都是崭新的，早安！","每天都是新的自己，早上好！","新的一天，你我齐互勉，共努力。"]}else if(P>=9&&P<11){V=["上午好，生活是一面镜子，你笑它也笑。","开启邮箱，开启一天的愉快！","生活每天都是新的，加油！","勤劳的小蜜蜂要开始忙碌的一天啦。","一天之计在于晨，为了梦想努力吧！","记得每天要喝八杯水哦！","好的开始是成功的一半，加油！"]}else if(P>=11&&P<13){V=["午饭要好好吃哇，幸福是吃到饱。","一份可口的午餐，可以补充作战的体力哦。","工作再忙，午餐必不可少哦。","中午好，吃饭的时候最好不要盯着电脑哦。","做个快乐的吃货吧！","中午眠一眠，做事不会粘。"]}else if(P>=13&&P<14){V=["饭饱神虚，先歇一歇。","午休时间，让眼睛去旅行。","午后的小憩，换来百倍的抖擞。","有时间听首歌吧，跳跃的音符带来最好的休憩。","是时候午间小憩了。","饭后百步走，活到99，走走吧！","午后一杯咖啡，赶走酣睡疲惫。"]}else if(P>=14&&P<15){V=["下午好，累了就发发呆吧。","忙碌的你，有着最迷人的剪影，下午好！","忙碌着也是件幸福的事。","坐久了，起来活动一下吧！","抖擞精神，开始下半场的工作。","生命中，再无聊的时光，也都是限量版的。"]}else if(P>=15&&P<18){V=["午后一杯红茶，偷得片刻惬意。","歇一歇吧，享受午后时光。","下午茶时间到啦   : )","喝喝茶，提提神。","抬眼硬拗三分困，不及午后一盏茶。","起来吧，扭动绷紧了的腰，放松紧绷了的神经。"]}else if(P>=18&&P<20){V=["晚饭有着落了吗？赶紧约起！","华灯初上，谁在等你，你又在等谁？","晚上好，要对自己的胃好一些哦。","万家灯火中，总有一盏为你点亮。","夜幕降落，霓红灯亮起，城市迎来另一种喧闹。","下班了，精彩的私生活即将开始。","日落西山，鸟归林，鸡上窝，快乐的你快回家。"]}else if(P>=20&&P<23){V=["还在忙吗，别忘了给自己一个微笑。","在忙吗，是否该问候一下远方的TA？","操劳了一日工作，别忘了陪陪家人。","今天累不累？停下来听首歌吧。","今天运动了没？打字不算哦: )","累了，要记得让心摆渡，倦了，要记得回家的路。"]}else{V=["深夜了，不知道有多少人和你一样还没有睡呢？","夜深了，来日方长，早点休息。","不要活得太累，不要忙得太疲惫。","愿与您分享这夜色，早点休息   : )","还在熬夜的您，让我为您点一盏灯。","今夜微风轻送，伴你入美梦","晚上早点窝被，美梦甜甜入睡。"]}}else{if(P>=6&&P<9){V=["早上好，多久没看日出了？","周末晨光，迎接窗外风光。","早晨扣门的第一缕清风是周末的问候。","祝您度过一个美好的周末！","早晨好！好好享受美好周末！","您起得真早！周末好！"]}else if(P>=9&&P<11){V=["上午好，偶尔需要休息丢掉一些情绪。","出去走走吧，新鲜的空气能令你心旷神怡。","别让忙碌湮没了周末的阳光哦   : )","静谧的一刻，从阳光射进窗台开始，早上好。","周末去郊游，换个环境换种心情。","阳光掉落窗台，把你唤醒。"]}else if(P>=11&&P<14){V=["为自己烹饪一份营养的午餐吧！","周末的空气特别的清新呢！","让脚步慢一些，让忙碌停下来。周末愉快！","中午可要吃点好的啊，周末呀！","云淡风轻，随意放飞美丽心情，周末愉快。","周末的午餐，和心爱的人一起享受！"]}else if(P>=14&&P<18){V=["出去走走吧，去看那万物生长！","午后阳光照在草地上的味道，你闻过么？","下午要睡个午觉。","云淡风轻的周末，何不约三五好友出游？","到郊外走走，感受这座城市别样的美。"]}else if(P>=18&&P<24){V=["周末的夜晚，尽情享受生活的赐福。","多久没给在乎自己的人写信了？","晚上好，你今天过得愉快吗？","周末啦，换一种生活换一份心情。"]}else{V=["走，宵夜时间到啦！","过去，就像愈醇香的酒，甘洌醉人。","欢乐的时间过得特别快，晚安。","周末也要早点休息，晚安地球人。","夜深了，常常熬夜可不好哦。","放假也不能疯狂熬夜哦！晚安: )"]}}
var W=V[Math.floor(V.length*Math.random())];return W}
var DialogList=new Array();var Dialog_EntId=-1;var Dialog_CtrlPrex="DefaultF_";var IsMenuFirst=true;var menuDlObj=null;function xlt(a,b,c){switch(a){case 1:window.open("/System/MyInformation/EditMyMsg.aspx?EntId=2274&mkfv="+nyg.UserId+"&optype=2&navindex=1","runMyMsg");return;break;case 2:window.open("/System/MyInformation/ChangePwd.aspx?EntId=2275&mkfv="+nyg.UserId+"&optype=2&navindex=5","runMyMsg");return;break;case 3:window.open("/System/MyInformation/ChangeMyAvatar.html?EntId=1904&optype=1&navindex=2","runMyMsg");return;break;case 4:return;break;case 5:window.open("/System/ListReport_Tree001.aspx?menuid=3274&navindex=2","runSysMn");return;case 6:window.open("http://www.dcxCreator.com","dcx");return;break;break}}
DcxHome.fen=function(c,e){var d=new Date();var f=new Date(d.getFullYear(),d.getMonth(),d.getDate());var g=new Date(d.getFullYear(),d.getMonth(),d.getDate(),23,59,59);c=3;var h={"modeType":c,"fromDate":f,"toDate":g};var i="/WebServices/MyApp/Remind.asmx/GetMyRemind";e.find("div[ismsglist=1]").html("");e.find("div[isloading=1]").show();$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:i,data:JSON2.stringify(h),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取提醒失败。详情："+b);return false},success:function(a){a=hmy(a);if(ymr(a))a=new Array();DcxHome.RemindList=a;if(a.length>0)e.find("div[ismsglist=1]").html(DcxHome.rky(a));else{e.find("div[iswarn=1]").show()}
e.find("div[isloading=1]").hide()}})}
DcxHome.rky=function(a){if(ymr(a))a=new Array();if(ymr(a)||a.length<1){return null}
var b=new nzy();for(var i=0;i<a.length;i++){var c=a[i];b.append("<div class=\"WB_feed_type SW_fun  S_line2\" RmId=\""+c.RmId+"\" isMsg=1 style=\"margin: -1px 0px 0;padding: 0px 0 0;\">\n");b.append("    <div class=\"WB_feed_datail S_line2 clearfix\" style=\"padding: 0 0 5px;border-color: #eee;\">\n");b.append("        <div class=\"WB_detail\" style=\"margin-left: 1px;\">\n");b.append("            <div class=\"WB_text\" node-type=\"feed_list_content\" isMsgText=1  style=\"font-size: 12px;\">\n");b.append(" "+(i+1)+", "+c.RmContent+"</div>\n");b.append("<div class=\"WB_func clearfix\">\n");b.append("<div class=\"WB_handle\">\n");b.append("<a href=\"javascript:void(0);\" onclick=\"javascript:DcxHome.dqj("+c.RmId+",this);\" >删除</a>\n");b.append("</div>\n");b.append("<div class=\"WB_from\" style=\"padding-top: 0px;\">\n");var d=Dcx.Date.lvk(c.RemindDate);d=(d.getHours()>9?"":"0")+d.getHours()+":"+(d.getMinutes()>9?"":"0")+d.getMinutes();b.append("<a  href=\"javascript:void(0);\" class=\"S_link2 WB_time\">今天 "+d+"</a>\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n")}
return b.toString()}
DcxHome.dqj=function(c,d){art.VLdialog.confirm('确定要删除提醒吗？',function(){if(isNaN(c)||c<1)return null;var b="/WebServices/MyApp/Remind.asmx/dqj";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:b,data:"{\"rmId\":"+c+"}",dataType:'json',beforeSend:function(a){},success:function(r){r=hmy(r);if(r){art.VLdialog.tips("删除成功！",0.8);DcxHome.$divAppArea.next().find("[RmId="+c+"][isMsg=1]").remove();return false}else{art.VLdialog.alert("删除失败。",function(){},12,"提示")}}})},function(){art.VLdialog.tips('你取消了删除',0.8)})}
DcxHome.bgw=function(c){var d={tagId:0,pageIndex:1,pageSize:5};var e="/WebServices/MyApp/News.asmx/bgwList";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:JSON2.stringify(d),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>6000)b=b.substr(0,6000);alert("读取我的公告失败。详情："+b);return false},success:function(a){a=hmy(a);if(ymr(a))a=new Array();DcxHome.NewsList=a;if(a.length>0)c.find("div[ismsglist=1]").html(DcxHome.sgu(a));else{c.find("div[iswarn=1]").show()}
c.find("div[isloading=1]").hide()}})}
DcxHome.sgu=function(a){if(ymr(a))a=new Array();if(ymr(a)||a.length<1){return null}
var b=new nzy();for(var i=0;i<a.length;i++){var c=a[i];b.append("<div class=\"WB_feed_type SW_fun  S_line2\" RmId=\""+c.NId+"\" isMsg=1 style=\"margin: -1px 0px 0;padding: 0px 0 0;\">\n");b.append("    <div class=\"WB_feed_datail S_line2 clearfix\" style=\"padding: 0 0 5px;border-color: #eee;\">\n");b.append("        <div class=\"WB_detail\" style=\"margin-left: 1px;\">\n");b.append("            <div class=\"WB_text\" node-type=\"feed_list_content\" isMsgText=1  style=\"font-size: 12px;\">\n");b.append(" "+(i+1)+", "+c.NewsContent+"</div>\n");b.append("<div class=\"WB_func clearfix\">\n");b.append("<div class=\"WB_handle\">\n");b.append("<a href=\"javascript:void(0);\" onclick=\"javascript:DcxHome.dqj("+c.NId+",this);\" >删除</a>\n");b.append("</div>\n");b.append("<div class=\"WB_from\" style=\"padding-top: 0px;\">\n");var d=Dcx.Date.lvk(c.CreateDate);c.CreateDate=d;b.append("<a  href=\"javascript:void(0);\" class=\"S_link2 WB_time\"> "+Dcx.Date.mnf(c.CreateDate)+"</a>\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n")}
return b.toString()}
$(window).load(function(){try{if(ymr(DcxHome.DcxEmail)){setTimeout(function(){nue()},3000)}else{setTimeout(function(){nue()},2000)}}catch(e){}});function nue(){setTimeout(function(){if(ymr(DcxHome.DcxEmail))DcxHome.DcxEmail="";if(ymr(DcxHome.VersionId))DcxHome.VersionId="";if(ymr(DcxHome.Mac))DcxHome.Mac="";var a="http://www.dcxCreator.com/Designer/Ajax/SendMsgToClientSystem.ashx?jsoncallback=?";$.ajax({url:a,contentType:"application/json; charset=utf-8",dataType:"jsonp",data:{"dataType":1,"dcxEmail":DcxHome.DcxEmail,"VersionId":DcxHome.VersionId,"Mac":DcxHome.Mac,"fvc":"CB6FEABFD18E42989060273BACFBBD21"},success:zaq,error:lfb})},100);return}
function zaq(a){try{if(!a.IsOk){alert(a.Result);return}
if(ymr(a.Result))return;var b=unescape(a.Result);if(ymr(b))return;var c=b.split("&*&");var d=new Array();var f=new nzy();var g=$("#dcxCreatorNoteMsg");for(var i=0;i<c.length;i++){var h=c[i];if(ymr(h))continue;h=h.split('*$*');var j=parseInt(h[0],10);var k=h[1];var l="提示";if(h.length>2)l=h[2];var m="确 定";if(h.length>3)m=h[3];var n="";if(h.length>4)n=h[4];if(j==1){art.VLdialog.alert(k,function(){},100,l)}else if(j==2){g.html(k)}else if(j==3){art.VLdialog({content:k,id:'Fm7',icon:'',okVal:m,title:l,ok:function(){if(!ymr(n))window.open(n,"_blank")},cancel:true})}}}catch(e){}}
function lfb(a,b,c){}
var DcxMsg={NewCount:0,NewMsgList:new Array(),mqw:null,geq:null,nmt:null,zre:null,mfz:null,nbk:null,zhv:null,EntBtns:{}};DcxMsg.EntBtns={"_2071":{"browse":false,"edit":false,"txt":null,"nm":"微邮"},"_2076":{"browse":false,"edit":false,"txt":null,"nm":"私信"}};var msgPageIndex=1;var msgPageSize=10;var msgList=null;var msgTopList=null;var msgEntId=-1;var srx=-1;var msgSecondPageIndex=1;var curMsgTypeId=0;var timerMsgCount=null;var msgAllCount=-1;var appAreaList=null;var azo=null;$(window).load(function(){DcxMsg.mqw=$("#divMsgList");DcxMsg.geq=$("#ulMsgTab");DcxMsg.geq.children("[ismsgtab=1]").unbind("click").click(function(){var a=$(this);msgEntId=parseInt(a.attr("entId"),10);curMsgTypeId=parseInt(a.attr("msgtypeId"),10);if(isNaN(msgEntId))msgEntId=-1;if(isNaN(curMsgTypeId))curMsgTypeId=-1;if(curMsgTypeId==0)srx=-1;DcxMsg.geq.children().removeClass("active");a.addClass("active");msgPageIndex=1;DcxMsg.mqw.children("div[ismsglist=1]").html("");DcxMsg.mqw.children("div[istopmsg=1]").html("");if(akl==null)akl=DcxMsg.mqw.children("div[ispage=1]").find("#divMsgPage");akl.html("");DcxMsg.mqw.children("div[isloading=1]").show();qrf()});DcxMsg.nmt=$("#a_curPage");DcxMsg.zre=DcxMsg.nmt.prev();var b=$.browser.msie?"mouseenter":"mouseover";var c=$.browser.msie?"mouseleave":"mouseout";DcxMsg.nmt.unbind(b).bind(b,function(){DcxMsg.nmt.prev().show()});$(document).mouseup(function(a){DcxMsg.nmt.prev().hide()})});function emf(){var c=false;var d=false;if(curMsgTypeId==1)c=true;else if(curMsgTypeId==4)d=true;if(DcxMsg.mqw==null)DcxMsg.mqw=$("#divMsgList");DcxMsg.mqw.children("div[isloading=1]").show();var e="/WebServices/HomePage/HomePage.asmx/dokPageList";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{IsFlow:"+c+",IsOther:"+d+",EntId:"+msgEntId+", PageIndex:"+msgPageIndex+", PageSize:"+msgPageSize+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取我的消息失败。详情："+b);return false},success:function(a){a=hmy(a);goz(a)}})}
function uio(a,b,p){var c=DcxMsg.mqw.children("div[ispage=1]");if(a<1){if(p==1)msgPageIndex=msgPageIndex-1;else msgPageIndex=msgPageIndex+1;if(msgPageIndex<1){msgPageIndex=1;art.VLdialog.tips("已是第一页",1.8);return}
var d=c.find("[isPageList=1]");d.children().removeClass("current");var e=d.children("[pageId="+msgPageIndex+"]");if(e!=null&&e.length>0)e.addClass("current");c.find("[isCurPage=1]").html("第&nbsp;"+msgPageIndex+"&nbsp;页")}else{msgPageIndex=a;var d=$(b).parent();d.children().removeClass("current");$(b).addClass("current");d.next().find("span").html("第&nbsp;"+a+"&nbsp;页");d.hide()}
DcxMsg.mqw.children("div[ismsglist=1]").html("");DcxMsg.mqw.children("div[istopmsg=1]").html("");DcxMsg.mqw.children("div[isloading=1]").show();$('body,html').scrollTop(0);var f=parseInt(msgAllCount/msgPageSize,10);if(msgAllCount%msgPageSize!=0)f=f+1;if(msgPageIndex<2)c.find("[isPrev=1]").hide();else c.find("[isPrev=1]").show();if(f<=msgPageIndex)c.find("[isNext=1]").hide();else c.find("[isNext=1]").show();emf()}
function qrf(){var c=false;var d=false;if(curMsgTypeId==1)c=true;else if(curMsgTypeId==4)d=true;if(DcxMsg.mqw==null)DcxMsg.mqw=$("#divMsgList");var e="/WebServices/HomePage/HomePage.asmx/qrf";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{IsFlow:"+c+",IsOther:"+d+",EntId:"+msgEntId+", PageIndex:"+msgPageIndex+", PageSize:"+msgPageSize+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取我的消息失败。详情："+b);return false},success:function(a){a=hmy(a);if(!ymr(a)){goz(a.MsgList,1);goz(a.TopMsgList,2);msgAllCount=a.MsgCount;tmc(0)}else{}}})}
function cxr(){var c=false;var d=false;if(curMsgTypeId==1)c=true;else if(curMsgTypeId==4)d=true;if(DcxMsg.mqw==null)DcxMsg.mqw=$("#divMsgList");var e="/WebServices/HomePage/HomePage.asmx/cxr";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{IsFlow:"+c+",IsOther:"+d+",EntId:"+msgEntId+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取我的消息失败。详情："+b);return false},success:function(a){a=hmy(a);goz(a,2)}})}
function goz(a,b){if(DcxMsg.mqw==null)DcxMsg.mqw=$("#divMsgList");DcxMsg.mqw.children("div[isloading=1]").hide();if(b!=2)msgList=a;else msgTopList=a;if((ymr(a)||a.length<1)&&msgPageIndex==1){if(b!=2){DcxMsg.mqw.children("[iswarn=1]").show().html("您有 0 条动态")}
return false}else if(b!=2)DcxMsg.mqw.children("[iswarn=1]").hide();if((b==2&&!ymr(msgTopList)&&msgTopList.length>0)||(b==1&&!ymr(msgTopList)&&msgTopList.length>0))DcxMsg.mqw.children("[iswarn=1]").hide();if(!ymr(a)){var c=cpg(a);if(!ymr(c)){if(b!=2)DcxMsg.mqw.children("div[ismsglist=1]").html(c);else DcxMsg.mqw.children("div[istopMsg=1]").html(c);Dcx.NameCard.htg(DcxMsg.mqw.get(0))}
if(timerMsgCount==null)timerMsgCount=setInterval(qku,1000)}}
function rcc(){DcxMsg.geq.children("[msgtypeId=0]").click()}
function dtn(){DcxMsg.geq.children(".active").click()}
function bej(){}
function qku(){return;var c=false;var d=false;if(curMsgTypeId==1)c=true;else if(curMsgTypeId==4)d=true;if(DcxMsg.mqw==null)DcxMsg.mqw=$("#divMsgList");var e="/WebServices/HomePage/HomePage.asmx/qku";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{IsFlow:"+c+",IsOther:"+d+",EntId:-1, MinMsgId:"+srx+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取我的消息失败。详情："+b);return false},success:function(a){a=hmy(a);if(!isNaN(a)&&parseInt(a,10)>0){var b="有 "+a+" 条新动态，点击查看";DcxMsg.mqw.children("[iswarn=1]").show().html(b)}}})}
function ctx(a,b){if(b){wox(null);return}
switch(a){case 2071:jft('/MyApp/WMail/WMail.html','10','微邮');break;case 2076:jft('/MyApp/WLetter/WLetter.html','11','私信');break;case 1:jft('/MyApp/Document/CmnDoc.html','8','分享文档');break;case 2:jft('/MyApp/News/News.html','9','通知公告');break}}
function cpg(c){if(DcxMsg.mqw==null)DcxMsg.mqw=$("#divMsgList");if(ymr(c)||c.length<1){return null}
if(curMsgTypeId==0&&srx<1)srx=c[0].MsgId;var d=new nzy();c.sort(function(a,b){return b.MsgId-a.MsgId});for(var i=0;i<c.length;i++){var e=c[i];var f=jbc(e.SenderId,2);if(!ymr(e.SenderAvatar))f=e.SenderAvatar;d.append("<div class=\"WB_feed_type SW_fun  S_line2\" MsgId=\""+e.MsgId+"\" RcvId=\""+e.RcvId+"\"  isMsg=1>\n");d.append("    <div class=\"WB_screen\">\n");d.append("        <a href=\"javascript:void(0);\" class=\"W_ico12 icon_choose\"></a>\n");d.append("    </div>\n");d.append("    <div class=\"WB_feed_datail S_line2 clearfix\">\n");d.append("        <div class=\"WB_face\">\n");d.append("            <a class=\"W_face_radius\" href=\"javascript:void(0);\">\n");d.append("                <img src=\""+f+"\" width=\"50\" height=\"50\" namecard=\""+e.SenderName+"\" />\n");d.append("            </a>\n");d.append("        </div>\n");d.append("        <div class=\"WB_detail\">\n");d.append("            <div class=\"WB_info\" >\n");d.append("                <a isTopHtml=1 title=\"取消置顶\" href=\"javascript:void(0);\" onclick=\"javascript:rbd("+e.MsgId+",this);\"  style=\""+(!e.IsTop?"display:none;":"")+"\" ><span class=\"W_ico20 ico_feedpin\"></span></a> \n");d.append("                <span  namecard=\""+e.SenderName+"\" >"+e.SenderName+"</span>\n");d.append("            </div>\n");d.append("            <div class=\"WB_text\" node-type=\"feed_list_content\" isMsgText=1  style=\"");if(!isNaN(e.ColorId)&&e.ColorId>0)d.append("color:"+smo(e.ColorId)+";");d.append("\">\n");d.append("                <span style=\"line-height:23px;margin:0;padding:0;\"><img src=\"/images/common/unread.png\" style=\""+(e.IsRead?"display:none;":"")+"vertical-align:inherit;width:15px;height: 11px;background:url('/images/common/unread.png') no-repeat;\" title=\"未读\" sign=\"logo\" isUnread=\"1\" /></span>");d.append("                <span style=\"line-height:23px;height:23px;margin:0;padding:0;\">"+e.MsgContent+"</span></div>\n");if(!ymr(e.FileJson)){var g=null;try{g=eval("("+e.FileJson+")")}catch(err){}
if(!ymr(g)&&g.length>0){var h=new nzy();var j=new nzy();h.append("<ul class=\"WB_media_list clearfix\" style=\"\">\n");h.append("<li>\n");h.append("<div class=\"list_pic_list out_width\" style=\"height: 115px;\">\n");h.append("<ul class=\"pic_list clearfix inner_width\">\n");j.append("<ul class=\"WB_media_list clearfix\" style=\"padding: 0px 0 5px;\">\n");j.append("<li>\n");j.append("<div class=\"list_pic_list2 \">\n");j.append("<ul class=\"filecell unselect pic_list clearfix inner_width\">\n");var l=false;var m=false;for(var k=0;k<g.length;k++){var n=g[k];if(n.FileTypeId!=2){j.append("<li class=\"filecolumn\" "+($.browser.msie?"onmouseleave='javascript:pcq(this,false);'  onmouseenter='javascript:pcq(this,true);'":"")+" fileId=\""+n.FileId+"\" MsgId=\""+e.MsgId+"\" >\n");j.append("<a class=\"f_type f_type_single\"><span class=\""+fdo(n.FileTypeId)+"\" unselectable=\"on\"></span></a>\n");j.append("<div class=\"filedetail\" data-columnselect=\"1\">\n");j.append("<div onclick=\"Attach.rename(this);getTop().stopPropagation(event);\" class=\"filename\" >"+n.FileName+"</div>\n");j.append("<p class=\"graytext datasize\" data-columnselect=\"1\">"+Dcx.Utility.ucr(n.FileSize)+"</p>\n");j.append("</div>\n");j.append("<div class=\"operation\" >\n");j.append("<ul class=\"btn_operation\">\n");j.append("<li><a class=\"ico_attach ico_odown\" title=\"下载\" onclick=\"Dcx.ped('"+escape(n.FilePath)+"',"+n.FileId+")\"></a></li>\n");j.append("</ul>\n");j.append("</div>\n");j.append("</li>\n");m=true}else{h.append("<li fileId=\""+n.FileId+"\" MsgId=\""+e.MsgId+"\" onclick=\"javascript:DcxComMsg.ggn(this);\">\n");h.append(" <img title=\""+n.FileName+"\" class=\"bigcursor\" src=\""+Dcx.File.trv(n.FilePath)+"\">");h.append("</li>\n");l=true}}
h.append("</ul>\n");h.append("</div>\n");h.append("</li>\n");h.append("</ul>\n");j.append("</ul>\n");j.append("</div>\n");j.append("</li>\n");j.append("</ul>\n");if(l)d.append(h.toString());if(m)d.append(j.toString())}}
d.append("            <div class=\"WB_func clearfix\">\n");d.append("                <div class=\"WB_handle\">\n");if(e.IsPublic!=true)d.append("                       <a href=\"javascript:void(0);\" onclick=\"javascript:fvs("+e.MsgId+",this);\" class=\"hide\">删除</a><i class=\"S_txt3 hide\">|</i>\n");if(e.IsPublic!=true)d.append("                       <a href=\"javascript:void(0);\" onclick=\"javascript:dgo("+e.MsgId+",this);\" val=\""+(e.IsRead?"1":"0")+"\" title=\"请点击\" isReadBtn=1 class=\"\">标记为<b style=\"position:relative;top:1px;\" class=\"dcx-ico menu-ico-dArr\">d</b></a><i class=\"S_txt3 \">|</i>\n");if(e.IsFlow){if(e.IsNote!=true){d.append("                       <a href=\"javascript:void(0);\" isProcessedBtn=\"1\" IsMain=\""+(e.IsMain?"1":"0")+"\" ");if(isNaN(e.PrcsId)||e.PrcsId<1)d.append(" onclick=\"javascript:art.VLdialog.tips('此工作已结束。',1.8);\" style=\"color:#808080;\">已结束");else if(e.IsProcessed){d.append(" onclick=\"javascript:cik("+e.MsgId+",this);return false;\" style=\"color:#808080;\">"+(e.IsMain?"已审批":"已会签"))}else{d.append(" onclick=\"javascript:cik("+e.MsgId+",this);return false;\" style=\"color:red;\" title=\"\">"+(e.IsMain?"审批":"会签"))}
d.append("</a><i class=\"S_txt3\">|</i>\n")}
d.append("                       <a href=\"javascript:void(0);\" onclick=\"javascript:ncz("+e.MsgId+",this);\">更多<b style=\"position:relative;top:1px;\" class=\"dcx-ico menu-ico-dArr\">d</b></a>\n")}else{if(e.ShowEditBtn)d.append("                       <a href=\"javascript:void(0);\" onclick=\"javascript:DcxMsg.bxn("+e.MenuId+","+e.EntId+","+e.MsgId+",'"+e.KeyFieldValue+"',2,this);return false;\">进入表单</a><i class=\"S_txt3\">|</i>\n");d.append("                       <a href=\"javascript:void(0);\" onclick=\"javascript:DcxMsg.bxn("+e.MenuId+","+e.EntId+","+e.MsgId+",'"+e.KeyFieldValue+"',1,this);\">详情</a>\n")}
d.append("                </div>\n");d.append("                <div class=\"WB_from\">\n");d.append("                    <a  href=\"javascript:void(0);\" class=\"S_link2 WB_time\">"+mnf(e.SentDate)+"</a>\n");d.append("                    <em class=\"S_txt2\">类别</em><a class=\"S_link2\" style=\"margin-left:4px;\"  href=\"javascript:void(0);\" onclick=\"javascript:ctx("+e.EntId+","+e.IsFlow+");return false;\">"+e.EntName+"</a>\n");d.append("                </div>\n");d.append("            </div>\n");d.append("            <div class=\"WB_media_expand repeat S_line1 S_bg4\" style=\"display: none;\">\n");d.append("            </div>\n");d.append("        </div>\n");d.append("    </div>\n");d.append("</div>\n")}
return d.toString()}
var akl=null;function tmc(a){if(DcxMsg.mqw==null)DcxMsg.mqw=$("#divMsgList");var b=DcxMsg.mqw.children("div[ispage=1]");if(akl==null)akl=b.find("#divMsgPage");if(isNaN(a)||a<1){a=0}
var c=parseInt(msgAllCount/msgPageSize,10);if(msgAllCount%msgPageSize!=0)c=c+1;if(msgAllCount<1||c==1)b.hide();else b.show();var d=50;var e=a-d;var f=a+d;if(e<1)e=1;if(f>c)f=c;var g=new nzy();for(var i=e;i<=f;i++){g.append("<a pageId=\""+i+"\"    style=\"width:50px;\"  href =\"javascript:void(0);\" onclick=\"javascript:uio("+i+",this);\" "+(i==a?" class=\"current\" ":"")+">第&nbsp;"+i+"&nbsp;页</a>\n")}
akl.html(g.toString());if(a<2)b.find("[isPrev=1]").hide();else b.find("[isPrev=1]").show();if(c<=a)b.find("[isNext=1]").hide();else b.find("[isNext=1]").show();akl.css("overflow-x","hidden");akl.css("overflow-y","auto")}
function fvs(b,c){art.VLdialog.confirm('确定要删除吗？',function(){if(isNaN(b)||b<1)b=parseInt(fokMsg.attr("curValue"),10);if(isNaN(b)||b<1)return null;var a="/WebServices/Message/Message.asmx/ptv";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:a,data:"{msgId:"+b+"}",dataType:'json',success:function(r){r=hmy(r);if(r){art.VLdialog.tips("删除成功！",0.8);DcxMsg.mqw.find("[MsgId="+b+"][isMsg=1]").remove();twv(b,"IsDeleted",true);return false}else{art.VLdialog.alert("删除失败。",function(){},12,"提示")}}})},function(){art.VLdialog.tips('你取消了删除',0.8)})}
function wra(a){if(isNaN(a)||a<1)a=parseInt(fokMsg.attr("curValue"),10);var b=hrk(a,"IsRead");if(b==undefined||b==null)b=true;if(b=="1")b=false;else b=true;if(isNaN(a)||a<1)return null;var c="/WebServices/Message/Message.asmx/SetRead";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:"{msgId:"+a+",IsRead:"+b+"}",dataType:'json',success:function(r){r=hmy(r);if(r){art.VLdialog.tips("设置成功！",0.8);if(b){DcxMsg.mqw.find("[MsgId="+a+"][isMsg=1]").find("[isUnread=1]").hide()}else{DcxMsg.mqw.find("[MsgId="+a+"][isMsg=1]").find("[isUnread=1]").show()}
twv(a,"IsRead",b);return false}else{art.VLdialog.alert("设置失败。",function(){},12,"提示")}}})}
function rbd(c){if(isNaN(c)||c<1)c=parseInt(fokMsg.attr("curValue"),10);var d=hrk(c,"IsTop");if(d==undefined||d==null)d=true;if(d=="1")d=false;else d=true;if(isNaN(c)||c<1)return null;var e="/WebServices/Message/Message.asmx/SetTop";var f=0;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{msgId:"+c+",IsTop:"+d+"}",dataType:'json',success:function(r){r=hmy(r);if(r){art.VLdialog.tips("设置成功！",0.8);var a=DcxMsg.mqw.find("[MsgId="+c+"][isMsg=1]");var b=a;if(d){b.find("[isTopHtml=1]").show()}else{b.find("[isTopHtml=1]").hide()}
twv(c,"IsTop",d);return false}else{art.VLdialog.alert("设置失败。",function(){},12,"提示")}}})}
function ovg(b){if(isNaN(b)||b<1)b=parseInt(fokMsg.attr("curValue"),10);var c=hrk(b,"IsProcessed");if(c==undefined||c==null)c=true;if(c=="1")c=false;else c=true;if(isNaN(b)||b<1)return null;var d="/WebServices/Message/Message.asmx/SetProcessed";var e=0;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:d,data:"{msgId:"+b+",IsProcessed:"+c+"}",dataType:'json',success:function(r){r=hmy(r);if(r){art.VLdialog.tips("设置成功！",0.8);var a=DcxMsg.mqw.find("[MsgId="+b+"][isMsg=1]").find("[isProcessedBtn=1]");if(!ymr(a)&&a.length>0){if(c){a.text("已审批").css("color","#808080")}else{a.text("审批").css("color","red")}}
twv(b,"IsProcessed",c);return false}else{art.VLdialog.alert("设置失败。",function(){},12,"提示")}}})}
var fokMsg=null;function dgo(m,n){if(fokMsg==null){fokMsg=$("#divSetMsgNavMore");var o=$.browser.msie?"mouseenter":"mouseover";var p=$.browser.msie?"mouseleave":"mouseout";var q=fokMsg.children();q.unbind(o).bind(o,function(){q.children("div[isNext=1]").hide();var a=$(this);var b=a.children("div[isNext=1]");if(b.length>0){var c=fokMsg.offset().left;var d=fokMsg.offset().top;var e=a.width();var f=a.height();var g=a.offset().left+e-c;var h=0;var i=$(window).height();var j=b.height();var k=a.offset().top;var l=$(window).scrollTop();if(k+j>i+l)h=l+i-k-j-20;b.css("position","relative").css("top",h+"px").css("left",g+"px").show()}}).unbind(p).bind(p,function(){});var r=false;fokMsg.unbind("click").bind("click",function(){r=true});$(document).mouseup(function(a){if(!r)fokMsg.hide();r=false})}
var s=ikr(m);if(s.IsTop){fokMsg.children("[indexId=1]").hide();fokMsg.children("[indexId=2]").show()}else{fokMsg.children("[indexId=1]").show();fokMsg.children("[indexId=2]").hide()}
if(s.IsRead){fokMsg.children("[indexId=3]").show();fokMsg.children("[indexId=4]").hide()}else{fokMsg.children("[indexId=3]").hide();fokMsg.children("[indexId=4]").show()}
if(s.IsProcessed){fokMsg.children("[indexId=15]").show();fokMsg.children("[indexId=16]").hide()}else{fokMsg.children("[indexId=15]").hide();fokMsg.children("[indexId=16]").show()}
fokMsg.attr("curValue",m);var t=5;var u=16;var v=$(n).offset().left-t;var w=$(n).offset().top+u+10;fokMsg.css("top",w+"px").css("left",v+"px").show();w=$(n).offset().top+u;fokMsg.stop().animate({'top':w+"px"},350)}
function smo(a){if(isNaN(a)||a<1)return"#333";var b=[{"Id":1,Color:"#c7284a",Name:"红色"},{"Id":2,Color:"#349b08",Name:"绿色"},{"Id":3,Color:"#ed501a",Name:"橙色"},{"Id":4,Color:"#1797dc",Name:"蓝色"},{"Id":5,Color:"#e33d97",Name:"粉色"},{"Id":6,Color:"#c79c17",Name:"黄色"},{"Id":7,Color:"#ad50d8",Name:"紫色"},{"Id":8,Color:"#818181",Name:"灰色"}];for(var i=0;i<b.length;i++){if(b[i].Id==a)return b[i].Color}
return"#333"}
function alr(a,b){var c=null;var d=false;var e=null;if(ymr(appAreaList)){appAreaList=new Array();return null}
for(var i=0;i<appAreaList.length;i++){if(appAreaList[i].EntId==a){d=true;var f=appAreaList[i].ModuleTypeId;if((f==16||f==19)&&b==1){c=appAreaList[i];e=c.AreaUrl;if(ymr($.trim(e))){if(f==16)e="/Template/default/Browse/Browse3.aspx";else e="/Template/default/Browse/Browse3.aspx"}
break}else if((f==3||f==18)&&b==2){c=appAreaList[i];e=c.AreaUrl;if(ymr($.trim(e))){if(f==3)e="/Template/Default/Form/AjaxForm/AjaxForm008.aspx";else e="/Template/Default/Form/AjaxForm/DefaultForm008.aspx"}
break}else if((f==1||f==17)&&b==3){c=appAreaList[i];e=c.AreaUrl;if(ymr($.trim(e))){if(f==16)e="/Template/default/Browse/Browse3.aspx";else e="/Template/default/Browse/Browse3.aspx"}
break}}}
if(d&&c==null)return false;else if(c==null)return null;return{Url:e,MtId:c.ModuleTypeId}}
function prc(b,c){var d=null;if(ymr(appAreaList))appAreaList=new Array();var e="/WebServices/Menu/MenuAppArea.asmx/GetArea_ByEntId";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,async:false,data:"{menuId:"+b+",entId:"+c+"}",dataType:'json',success:function(a){a=hmy(a);if(a){for(var i=0;i<a.length;i++)appAreaList.push(a[i])}else appAreaList.push({EntId:c,MenuId:b,ModuleTypeId:-1});return false}})}
function bxn(d,e,f,g,h,i){var j=ikr(f);if(ymr(j)){return}
var e=j.EntId;if(e==1||e==2||e==2071||e==2076||e==1){DcxMsg.pyv(f,parseInt(j.KeyFieldValue,10));return}
var k=alr(e,h);if(k==false)return;else if(k==null){prc(d,e);k=alr(e,h)}
if(k==null){art.VLdialog.tips("此消息无明细。",1);return}
var l=k.MtId;var m=k.Url;var n="";var o=false;switch(l){case 3:n="AjaxF_";o=true;break;case 16:n="DefaultR_";break;case 18:n="DefaultF_";o=true;break;case 19:n="MChildR_";break}
var p=j.EntName;var q="850";var r="480";q=q+"px";r=r+"px";var s=escape(escape(g));if(m.indexOf("?")<0)m=m+"?";else m=m+"&";m=m+"MenuId="+d+"&entid="+e+"&kfv="+s+"&mkfv="+s+"&optype=2"+"&showType="+(o?"2":"3");if(o){art.VLdialog.open(m,{title:p,width:q,height:r,zIndex:10,background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.3,button:[{name:'提  交',title:"提交表单",width:'250px',height:'20px',callback:function(){var b=this.iframe.contentWindow;var c=hpw(EntId,b);var a=b.col(EntId,c);IsOk=a.SubmitForm(false);return false},focus:true},{name:'提交&新建',width:'250px',height:'20px',callback:function(){var b=this.iframe.contentWindow;var c=hpw(EntId,b);var a=b.col(EntId,c);IsOk=a.SubmitForm(true);return false},focus:false},{name:'提交&关闭',width:'250px',height:'20px',callback:function(){var b=this.iframe.contentWindow;var c=hpw(EntId,b);var a=b.col(EntId,c);IsOk=a.SubmitForm(false,true);return false},focus:false},{name:'关  闭'}]},true)}else{art.VLdialog.open(m,{title:p,width:q,height:r,zIndex:10,background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.3,button:[{name:'关  闭',width:'250px',height:'20px'}]},true)}
return true}
DcxMsg.bxn=bxn;function esz(a,b){if(isNaN(a)||a<1)a=parseInt(fokMsg.attr("curValue"),10);if(isNaN(a)||a<1)return null;var c="/WebServices/Message/Message.asmx/SetColor";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:"{msgId:"+a+",colorId:"+b+"}",dataType:'json',success:function(r){r=hmy(r);if(r){art.VLdialog.tips("设置成功！",0.8);DcxMsg.mqw.find("[MsgId="+a+"][isMsg=1]").find("[isMsgText=1]").css("color",smo(b));twv(a,"ColorId",b);return false}else{art.VLdialog.alert("设置失败。",function(){},12,"提示")}}})}
function ikr(a){if(!ymr(msgList)){for(var i=0;i<msgList.length;i++){if(msgList[i].MsgId==a)return msgList[i]}}
if(!ymr(msgTopList)){for(var i=0;i<msgTopList.length;i++){if(msgTopList[i].MsgId==a)return msgTopList[i]}}
return null}
DcxMsg.ikr=ikr;function hrk(a,b){var c=ikr(a);if(c!=null)return c[b];return null}
function twv(a,b,c){if(!ymr(msgList)){for(var i=0;i<msgList.length;i++){if(msgList[i].MsgId==a){msgList[i][b]=c;return true}}}
if(!ymr(msgTopList)){for(var i=0;i<msgTopList.length;i++){if(msgTopList[i].MsgId==a){msgTopList[i][b]=c;return true}}}
false}
var vjb=null;function ncz(f,g){if(vjb==null){vjb=$("#divWFNavMore");var h=$.browser.msie?"mouseenter":"mouseover";var i=$.browser.msie?"mouseleave":"mouseout";var j=false;vjb.unbind("click").bind("click",function(){j=true});dnx=vjb;vjb.find("a").unbind("click").bind("click",function(){var a=parseInt($(this).attr("indexid"),10);var b=parseInt(vjb.attr("curValue"),10);var c=ikr(b);var d={};d.RunId=c.RunId;d.FlowId=c.FlowId;d.PrcsId=c.PrcsId;d.NodeId=c.NodeId;var e=wf_mainObj;if(ymr(wf_mainObj)||e.flowObj.FlowId!=d.FlowId){e=ftj(d.RunId,d.FlowId);wf_mainObj=e}
d.CreatorId=e.runObj.CreatorId;if(a==1){gmr(c.FlowId,false,null,c.RunId,c.PrcsId,false)}else if(a==2){vgu(d,c.EntId,null,c.EntName)}else if(a==3){kmu(d,c.EntId,null,"发起人的详情")}else if(a==4){ixq(d,c.EntId,null,c.EntName)}else if(a==5){ugf(d,c.EntId,null,c.EntName)}else if(a==6){wrf(d,c.EntId,null,c.EntName)}});$(document).mouseup(function(a){if(!j)vjb.hide();j=false})}
var k=ikr(f);vjb.attr("curValue",f);var l=5;var m=16;var n=$(g).offset().left-l;var o=$(g).offset().top+m+10;vjb.css("top",o+"px").css("left",n+"px").show();o=$(g).offset().top+m;vjb.stop().animate({'top':o+"px"},350)}
var FlowList={};function cik(a,b){var c=parseInt($(b).attr("isMain"),10);if(isNaN(c))c=0;var d=-5;var e=vve(d);var f="/Template/default/ListReport/ListReport_Tree001.aspx?menuid=2633";var g=ikr(a);var h={};h.RunId=g.RunId;h.FlowId=g.FlowId;h.PrcsId=g.PrcsId;h.NodeId=g.NodeId;var i=wf_mainObj;if(ymr(wf_mainObj)||i.flowObj.FlowId!=h.FlowId){if(!ymr(FlowList["_"+h.FlowId]))wf_mainObj=FlowList["_"+h.FlowId]}
if(ymr(wf_mainObj)||i.flowObj.FlowId!=h.FlowId){i=ftj(h.RunId,h.FlowId);wf_mainObj=i;FlowList["_"+h.FlowId]=wf_mainObj}
h.CreatorId=i.runObj.CreatorId;var j="";wf_mainObj=i;var k=escape(escape($.trim(i.runObj.KeyField)));var l=escape(escape($.trim(g.KeyFieldValue)));var m=escape(escape($.trim(g.KeyFieldValue)));var n=1;if(!ymr($.trim(g.KeyFieldValue)))n=2;var j=i.flowObj.FormUrl;if(ymr(j))j="/Template/Default/Form/AjaxForm/AjaxForm008.aspx";if(j.indexOf("?")<0)j=j+"?";else j=j+"&";j=j+"isMain="+c+"&entid="+i.flowObj.EntId+"&kfv="+l+"&mkfn="+k+"&mkfv="+m+"&optype="+n+"&RunId="+h.RunId+"&FlowId="+h.FlowId+"&PrcsId="+h.PrcsId+"&NodeId="+h.NodeId+"&targetType="+1;j=j+"&RcvMsgId="+a+"&CloseFrameMid="+d;window.top.oud=i;h.IsMain=(c==1?true:false);window.top.wf_flowRunMsg=h;if(ymr(e)||e.length<1)jft(j,d,"未知",null);else{scf.children().hide();ehq=e.children("iframe");ehq.attr("src",j);e.show();$('body,html').scrollTop(0)}}
var DcxComMsg={};DcxMsg.pyv=function(h,i){var j=ikr(h);if(ymr(j)){return}
var k=j.EntId;var l=j.EntName;var m=j.IsPublic;if(m==undefined)m=false;var n=0;if(m)n=j.SenderId;if(ymr(h)||h<1||ymr(i)||isNaN(i)){art.VLdialog.tips("详情已移除，无法查看。",2);return}
var o={"msgId":h,"userId":n,"entId":k,"keyId":i};var p="/WebServices/Message/Message.asmx/GetMsgEntData";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:p,async:false,data:JSON2.stringify(o),dataType:'json',complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取我的消息失败。详情："+b);return false},success:function(a){a=hmy(a);if(ymr(a)){art.VLdialog.alert("获取详情失败，数据已被删除。");return}
a.SentDate=j.SentDate;a.SenderId=j.SenderId;a.SenderName=j.SenderName;var b=new Array();b.push(a);DcxComMsg.DataList=b;var c="<div class='dscroll' id='msgEntData'>";c=c+"<div class='dscroll-box' style ='width :700px;max-height:500px;'>";c=c+"<div  class='dscroll-container' >";c=c+"<div class='WB_feed clearfix' style=''>"+DcxComMsg.sly(b)+"</div>";c=c+"</div>";c=c+"<div class='dragger-container' ><div class='dscroll-dragger'></div></div>";c=c+"</div>";c=c+"</div>";var d=$(c);d.dcxScrollbar();var e=450;var f={"title":l,"content":d.get(0),"id":"addsdule","background":'#0c2136',"lock":true,"duration":0,opacity:0.2,"zIndex":100,width:700,minHeight:340,ok:function(){return true},cancel:function(){return true}};var g=art.VLdialog(f);DcxMsg.mqw.find("[MsgId="+Id+"][isMsg=1]").find("[isUnread=1]").hide();twv(h,"IsRead",true);return false}})}
DcxComMsg.sly=function(a){if(ymr(a))a=new Array();if(ymr(a)||a.length<1){return null}
var b=new nzy();for(var i=0;i<a.length;i++){var c=a[i];var d=jbc(c.SenderId,2);b.append("<div class=\"WB_feed_type SW_fun  S_line2\" MsgId=\""+c.MsgId+"\" RcvId=\""+c.RcvId+"\" isMsg=1>\n");b.append("    <div class=\"WB_screen\">\n");b.append("        <a href=\"javascript:void(0);\" class=\"W_ico12 icon_choose\"></a>\n");b.append("    </div>\n");b.append("    <div class=\"WB_feed_datail S_line2 clearfix\">\n");b.append("        <div class=\"WB_face\">\n");b.append("            <a class=\"W_face_radius\" href=\"/fwsc\">\n");b.append("                <img src=\""+d+"\" width=\"50\" height=\"50\" namecard=\""+c.SenderName+"\" />\n");b.append("            </a>\n");b.append("        </div>\n");b.append("        <div class=\"WB_detail\" >\n");b.append("            <div class=\"WB_info\" >\n");b.append("                <span  namecard=\""+c.SenderName+"\" >"+c.SenderName+"</span>"+"<div isStar=\"1\" title=\"星标微邮\" style=\""+(c.TagId==1?"":"display:none;")+"float:right;width: 20px;height: 20px;background: url(/images/common/ico_attachment104470.png) no-repeat -94px -65px;\"></div>\n");b.append("            </div>\n");b.append("            <div class=\"WB_text\" node-type=\"feed_list_content\" isMsgText=1  style=\"");if(!isNaN(c.ColorId)&&c.ColorId>0)b.append("color:"+DcxComMsg.smo(c.ColorId)+";");b.append("\">\n");b.append("<a isTopHtml=1 title=\"取消置顶\" href=\"javascript:void(0);\" onclick=\"javascript:DcxComMsg.rbd("+c.MsgId+",this);\"  style=\""+(!c.IsTop?"display:none;":"")+"\" ><span class=\"W_ico20 ico_feedpin\"></span></a>\n");if(!ymr(c.Title))b.append("<span istitle=1 style=\"\">【"+c.Title+"】</span>");b.append(c.MsgContent+"</div>\n");if(!ymr(c.FileJson)){var e=null;try{e=eval("("+c.FileJson+")")}catch(err){}
if(!ymr(e)&&e.length>0){var f=new nzy();var g=new nzy();f.append("<ul class=\"WB_media_list clearfix\" style=\"\">\n");f.append("<li>\n");f.append("<div class=\"list_pic_list out_width\" style=\"height: 115px;\">\n");f.append("<ul class=\"pic_list clearfix inner_width\">\n");g.append("<ul class=\"WB_media_list clearfix\" style=\"padding: 0px 0 5px;\">\n");g.append("<li>\n");g.append("<div class=\"list_pic_list2 \">\n");g.append("<ul class=\"filecell unselect pic_list clearfix inner_width\">\n");var h=false;var j=false;for(var k=0;k<e.length;k++){var l=e[k];if(l.FileTypeId!=2){g.append("<li class=\"filecolumn\" "+($.browser.msie?"onmouseleave='javascript:pcq(this,false);'  onmouseenter='javascript:pcq(this,true);'":"")+" fileId=\""+l.FileId+"\" MsgId=\""+c.MsgId+"\" >\n");g.append("<a class=\"f_type f_type_single\"><span class=\""+fdo(l.FileTypeId)+"\" unselectable=\"on\"></span></a>\n");g.append("<div class=\"filedetail\" data-columnselect=\"1\">\n");g.append("<div onclick=\"Attach.rename(this);getTop().stopPropagation(event);\" class=\"filename\" >"+l.FileName+"</div>\n");g.append("<p class=\"graytext datasize\" data-columnselect=\"1\">"+Dcx.Utility.ucr(l.FileSize)+"</p>\n");g.append("</div>\n");g.append("<div class=\"operation\" onclick=\"\">\n");g.append("<ul class=\"btn_operation\">\n");g.append("<li><a class=\"ico_attach ico_odown\" title=\"下载\" onclick=\"Dcx.ped('"+escape(l.FilePath)+"',"+l.FileId+")\"></a></li>\n");g.append("</ul>\n");g.append("</div>\n");g.append("</li>\n");j=true}else{f.append("<li fileId=\""+l.FileId+"\" MsgId=\""+c.MsgId+"\" onclick=\"javascript:DcxComMsg.ggn(this);\">\n");f.append(" <img title=\""+l.FileName+"\" class=\"bigcursor\" src=\""+Dcx.File.trv(l.FilePath)+"\">");f.append("</li>\n");h=true}}
f.append("</ul>\n");f.append("</div>\n");f.append("</li>\n");f.append("</ul>\n");g.append("</ul>\n");g.append("</div>\n");g.append("</li>\n");g.append("</ul>\n");if(h)b.append(f.toString());if(j)b.append(g.toString())}}
b.append("<div class=\"WB_func clearfix\">\n");b.append("<div class=\"WB_handle\">\n");b.append("</div>\n");b.append("<div class=\"WB_from\" style=\"padding-top: 0px;\">\n");b.append("<a  href=\"javascript:void(0);\" class=\"S_link2 WB_time\">"+Dcx.Date.mnf(c.SentDate)+"</a>\n");b.append("</div>\n");b.append("</div>\n");b.append("<div class=\"WB_media_expand repeat S_line1 S_bg4\" style=\"display: none;\">\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n");b.append("</div>\n")}
return b.toString()}
DcxComMsg.uac=function(a){var b=$(a).parent();while(b.length>0){if(b.hasClass("WB_media_expand"))break;b=b.parent()}
b.prev().show();b.remove()};DcxComMsg.ggn=function(c,d){var e=$(c).parent().parent().parent().parent();e.hide();var d=parseInt($(c).attr("fileId"),10);var f=parseInt($(c).attr("msgId"),10);var c=DcxComMsg.ikr(f);if(ymr(c))c=DcxMsg.ikr(f);if(ymr(c))return;var g=eval("("+c.FileJson+")");var h=null;var i=new nzy();i.append("<div class=\"WB_media_expand SW_fun2 S_line1 S_bg1\" style=\"\">\n");i.append("<div class=\"\" style=\"overflow:hidden;\">\n");i.append("<p class=\"medis_func S_txt3\"><a href=\"javascript:void(0);\" onclick=\"javascript:DcxComMsg.uac(this);\" class=\"retract\"><em class=\"W_ico12 ico_retract\"></em>收起</a><i class=\"W_vline\">|</i><a href=\"javascript:void(0);\" class=\"show_big\" target=\"_blank\"><em class=\"W_ico12 ico_showbig\"></em>查看大图</a><i class=\"W_vline\">|</i><a href=\"javascript:void(0);\" onclick=\"javascript:DcxComMsg.Rotate(this,'left');\" class=\"turn_left\"><em class=\"W_ico12 ico_turnleft\"></em>向左转</a><i class=\"W_vline\">|</i><a href=\"javascript:void(0);\"  onclick=\"javascript:DcxComMsg.Rotate(this,'right');\" class=\"turnRight\"><em class=\"W_ico12 ico_turnright\"></em>向右转</a></p>\n");i.append("<div class=\"pic_list_view\">\n");i.append("<div class=\"pic_show_box\" style=\"position: relative;\">\n");i.append("<ul class=\"clearfix smallcursor\"><img class=\"picloading\" style=\"display: none;\" src=\"/images/common/loading.gif\">");if(!ymr(g)&&g.length>0){for(var k=0;k<g.length;k++){var j=g[k];if(j.FileId==d){i.append("<li fileId=\""+j.FileId+"\" MsgId=\""+c.MsgId+"\" onclick=\"javascript:DcxComMsg.uac(this);\">\n");i.append(" <img isbigImg=1 title=\""+j.FileName+"\" src=\""+j.FilePath+"\" />");i.append("</li>\n");h=j.FilePath;break}}}
i.append("</ul>\n");i.append("<div style=\"top: 0px; left: 0px; display: none;\" class=\"W_layer\">\n");i.append("<div class=\"bg\"><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tbody><tr><td><div class=\"content\">\n");i.append("<a href=\"javascript:void(0);\" action-type=\"closeRecLayer\" class=\"W_close\"></a>\n");i.append("<div class=\"layer_view_morepic\">\n");i.append("<div class=\"W_tips clearfix\">\n");i.append("<p class=\"txt\"> 翻完啦！<a href=\"\" target=\"_blank\" node-type=\"toprofile\">看他的更多图片</a></p>\n");i.append("</div>\n");i.append("<div class=\"view_pic\" node-type=\"recBox\">\n");i.append("<ul class=\"pic_list clearfix\"><li><a href=\"javascript:void(0);\" class=\" current\"><img class=\"S_line2\" src=\"\" alt=\"\"></a></li></ul>");i.append("</div>\n");i.append("</div></div></td></tr></tbody></table>\n");i.append("</div>\n");i.append("</div>\n");i.append("</div>\n");i.append("<div class=\"pic_choose_box clearfix\">\n");i.append("<a href=\"javascript:void(0);\" class=\"arrow_left_small btn_pic_prevdis S_bg2\" title=\"上一页\"><em class=\"ico_pic_prev S_txt3\">&lt;</em></a>\n");i.append("<div class=\"stage_box\"><ul class=\"choose_box clearfix\" style=\"margin-left: 1px;\">");if(!ymr(g)&&g.length>0){for(var k=0;k<g.length;k++){var j=g[k];if(j.FileTypeId==2){i.append("<li fileId=\""+j.FileId+"\" MsgId=\""+c.MsgId+"\" >\n");i.append("<a href=\"javascript:void(0);\" style=\"display:inherit;\" class=\" "+(j.FileId==d?"current":"")+"\"><img title=\""+j.FileName+"\" class=\"S_line2\" src=\""+Dcx.File.trv(j.FilePath)+"\" /></a>");i.append("</li>\n");t1=true}}}
i.append("</ul></div>\n");i.append("<a href=\"javascript:void(0);\"class=\"arrow_right_small btn_pic_prevdis S_bg2\"  title=\"下一页\"><em class=\"ico_pic_next S_txt3\">&gt;</em></a></div>\n");i.append("</div>\n");i.append("</div>\n");i.append("</div>\n");e.after(i.toString());var l=e.next();l.find("ul.choose_box").children().bind("click",function(){var a=$(this).find("img");var b=Dcx.File.fxg(a.attr("src"));l.find("ul.choose_box").find("a").removeClass("current");$(this).find("a").addClass("current");l.find("div.pic_show_box").find("ul").find("li:first").find("img").attr("src",b);l.find("p.medis_func").find("a.show_big").attr("href",b)});l.find("p.medis_func").find("a.show_big").attr("href",h)}
DcxComMsg.Rotate=function(a,p){var b=$(a).parent();while(b.length>0){if(b.hasClass("WB_media_expand"))break;b=b.parent()}
var c=b.find("img[isbigImg=1]").get(0);Dcx.Rotate(c,p)}
DcxComMsg.ikr=function(a){if(!ymr(DcxComMsg.DataList)){for(var i=0;i<DcxComMsg.DataList.length;i++){if(DcxComMsg.DataList[i].MsgId==a)return DcxComMsg.DataList[i]}}
return null}
function fdo(a){if(a==1){return"pic_v2"}else if(a==3){return"pic_v2 v_pic_txt "}else if(a==4){return"pic_v2 v_pic_doc "}else if(a==5){return"ico_fppt"}else if(a==6){return"ico_fexl"}else if(a==7){return"pic_v2 v_pic_pdf"}else if(a==8){return"ico_frar"}else{return"ico_fother"}}
DcxComMsg.hrk=function(a,b){var c=DcxComMsg.ikr(a);if(c!=null)return c[b];return null}
DcxComMsg.twv=function(a,b,c){if(!ymr(DcxComMsg.DataList["P"+DcxComMsg.PageIndex])){for(var i=0;i<DcxComMsg.DataList["P"+DcxComMsg.PageIndex].length;i++){if(DcxComMsg.DataList["P"+DcxComMsg.PageIndex][i].MsgId==a){DcxComMsg.DataList["P"+DcxComMsg.PageIndex][i][b]=c;return true}}}
if(!ymr(DcxComMsg.DataList["T"+DcxComMsg.TagId])){for(var i=0;i<DcxComMsg.DataList["T"+DcxComMsg.TagId].length;i++){if(DcxComMsg.DataList["T"+DcxComMsg.TagId][i].MsgId==a){DcxComMsg.DataList["T"+DcxComMsg.TagId][i][b]=c;return true}}}
false}
$(window).unload(function(){});var DcxIM={irl:null,uxw:null,jci:null,vit:null,hye:null,tep:null,ika:null,upl:null,gvm:null,slx:null,hri:null,twt:null,fce:false,rip:null,gnb:null,sem:null,MainMsg:null,MsgList:{},raq:false,pwm:"/images/common/room2.png",bby:"/images/common/room4.png",Rooms:null,qhy:{},OnLine:{},cnj:null,osu:new Array(),ajf:false,poq:-1,buc:1,nzn:12,zfy:{},owy:-1,abj:new Array(),Init:function(){if(!Dcx.IM)return false;if(DcxIM.irl==null){DcxIM.irl=$("#DcxWebIm");if(!Dcx.IM){DcxIM.irl.hide();return false}
DcxIM.uxw=DcxIM.irl.find("#imFoldDlg");DcxIM.jci=DcxIM.irl.find("#imUnfoldDlg");DcxIM.vit=DcxIM.irl.find("#chatBox");DcxIM.hye=DcxIM.jci.find(".webim_list_main")}
if(!Dcx.IM){DcxIM.irl.hide();return false}
var e=$.browser.msie?"mouseenter":"mouseover";var f=$.browser.msie?"mouseleave":"mouseout";DcxIM.ika=DcxIM.hye.children("[nodeHid='maxContactsScroll']");DcxIM.upl=DcxIM.hye.children("[nodeHid='maxGroupsScroll']");DcxIM.gvm=DcxIM.hye.children("[nodeHid='maxRecentsScroll']");DcxIM.rip=DcxIM.hye.children("[nodeHid='maxSearchScroll']");DcxIM.irl.unbind("click").bind("click",function(){});var g=null;DcxIM.uxw.find("div.webim_state").unbind("click").bind("click",function(){var b=$(this);var c=b.parent();g=c.find("[nodeHid='stateSetting']");g.show();g.find("ul.setting_list").children().unbind("click").bind("click",function(){var a=$(this);var v=parseInt(a.attr("val"),10);if(a.find("em").hasClass("W_chat_stat_offline"))b.find("i").removeClass("WBicon_online").addClass("WBicon_offline");else b.find("i").removeClass("WBicon_offline").addClass("WBicon_online");art.VLdialog.tips("设置成功！",0.8);g.hide()})});$(document).mousedown(function(a){var b=$(a.target);var m=DcxIM.cpr();if(m!=2){var c=DcxIM.irl.attr("id");var d=false;while(!ymr(b)&&b.length>0){if(b.attr("id")==c){d=true;break}
b=b.parent()}
if(!d)DcxIM.lns(null,true);if(ymr(g))g=DcxIM.uxw.find("div.webim_state").parent().find("[nodeHid='stateSetting']")}
if(g!=undefined)g.hide()});gnb=DcxIM.irl.find("#tabheadList");var h=gnb.children();h.unbind("click").bind("click",function(){var a=$(this);DcxIM.hye.children().hide();h.removeClass("cur").removeClass("clearfix").addClass("clearfix");a.addClass("cur");var b=parseInt(a.attr("nodeType2"),10);if(b==1){if(ymr(DcxIM.hri))DcxIM.hri=DcxIM.hye.find("#contactsContainer");DcxIM.hri.show();if(parseInt(DcxIM.hri.attr("hasLoad"),10)!=1)DcxIM.ehc()}else if(b==2){if(ymr(DcxIM.uplContainer))DcxIM.uplContainer=DcxIM.hye.children("[nodeHid='maxGroupsScroll']");DcxIM.uplContainer.show();if(parseInt(DcxIM.uplContainer.attr("hasLoad"),10)!=1)DcxIM.hfe()}else if(b==3){DcxIM.hye.children("[nodeHid='maxRecentsScroll']").show()}});DcxIM.irl.unbind(e).bind(e,function(){if(DcxIM.jci.attr("IsShow")!="1"&&DcxIM.vit.attr("isshow")!="1")DcxIM.uxw.children("div.webim_list_wrap").stop().fadeTo(1000,1)}).unbind(f).bind(f,function(){if(DcxIM.jci.attr("IsShow")!="1"&&DcxIM.vit.attr("isshow")!="1")DcxIM.uxw.children("div.webim_list_wrap").stop().fadeTo(1000,0.5)});DcxIM.iiu=DcxIM.vit.find("#txtMsgContent");if(DcxIM.iiu.attr("tagName").toLowerCase()=="iframe"){if(Dcx.vov()=='IE')DcxIM.iiu.css({"position":"relative","top":"-10px"});DcxIM.jsp=true;DcxIM.vit.$inputIframe=DcxIM.iiu;var i=DcxIM.iiu.get(0);DcxIM.inputIframe=i;i=i.contentWindow;DcxIM.iiu=$(i.document);if(Dcx.vov()=="Firefox"){DcxIM.inputIframe.onload=function(){i.document.designMode="on"}}else{i.document.designMode="on"}}else DcxIM.jsp=false;var j=DcxIM.vit.find("#inputCharCount");var k=false;DcxIM.iiu.unbind("keydown").bind("keydown",function(a){if((a.ctrlKey&&a.keyCode==13)||a.keyCode==13){var m=DcxIM.njr();if(m==1||(a.ctrlKey&&a.keyCode==13)){k=true;return false}}
var c=200-DcxIM.gyr().length;if(c<0)j.addClass("spetxt").text(c);else j.removeClass("spetxt").text(c)});DcxIM.iiu.unbind("keyup").bind("keyup",function(a){if(k){k=false;DcxIM.cow(this)}});DcxIM.hpq=DcxIM.vit.find("#SendBtnPanel");DcxIM.hpq.children("a:first").unbind("click").bind("click",function(a){DcxIM.cow(this)});var l=DcxIM.hpq.children("div:first").children("a");l.unbind("click").bind("click",function(a){var m=DcxIM.njr();l.next().children().removeClass("curr");l.next().children("[val='"+m+"']").addClass("curr");$(this).next().show()});l.next().children().unbind("click").bind("click",function(a){var m=parseInt($(this).attr("val"),10);DcxIM.SendMsgMode=m;var b="dcxIMSendMsgMode";var c=new Date();c.setTime(c.getTime()+142*(24*60*60*1000));wzu(b,m,c);var m=DcxIM.njr();l.next().children().removeClass("curr");$(this).addClass("curr");$(this).parent().hide()});var n=DcxIM.vit.find("#setDisplayModeBtn");var o=DcxIM.vit.find("#setChatDisplayMode");n.unbind("click").bind("click",function(a){var m=DcxIM.cpr();o.find("input[value='"+m+"']").attr("checked",true);o.show()});o.find("input").unbind("click").bind("click",function(a){if($(this).attr("checked")){var m=parseInt($(this).attr("value"),10);DcxIM.DisplayMode=m;var b="dcxIMKeepShowMode";var c=new Date();c.setTime(c.getTime()+142*(24*60*60*1000));wzu(b,m,c);o.hide()}});var p=l.next();var q="sendBtnSelectUl";$(document).mouseup(function(a){var b=$(a.target);if(!wsj(b,q,4))p.hide();if(!wsj(b,"setChatDisplayMode",8))o.hide()});$(window).resize(function(){DcxIM.beg()});DcxIM.zak();setTimeout(function(){DcxIM.knd()},3000);ext()},rtg:function(){if(DcxIM.jsp)return $("body",DcxIM.iiu.get(0)).html();else return DcxIM.iiu.val()},gyr:function(){if(DcxIM.jsp)return $("body",DcxIM.iiu.get(0)).text();else return DcxIM.iiu.val()},sec:function(v){if(DcxIM.jsp)return $("body",DcxIM.iiu.get(0)).html(v);else return DcxIM.iiu.val(v)},qmn:function(a){var b=$(a).parent();if(b.hasClass("list_box_fold")){b.removeClass("list_box_fold").addClass("clearfix")}else{b.addClass("list_box_fold").removeClass("clearfix")}},beg:function(){if(DcxIM.irl==null){DcxIM.irl=$("#DcxWebIm");DcxIM.uxw=DcxIM.irl.find("#imFoldDlg");DcxIM.jci=DcxIM.irl.find("#imUnfoldDlg");DcxIM.vit=DcxIM.irl.find("#chatBox");DcxIM.hye=DcxIM.jci.find(".webim_list_main")}
var h=$(window).height();DcxIM.irl.height(h-100);DcxIM.hye.height(h-110);DcxIM.hye.children().height(h-110);if(DcxIM.tep==null)DcxIM.tep=DcxIM.uxw.find(".webim_list_main");DcxIM.tep.height(h-110);DcxIM.tep.children().height(h-110)},njr:function(){if(!ymr(DcxIM.SendMsgMode))return DcxIM.SendMsgMode;var v=yoj("dcxIMSendMsgMode");if(ymr(v)||isNaN(v)||parseInt(v,10)<1)DcxIM.SendMsgMode=1;else DcxIM.SendMsgMode=parseInt(v,10);return DcxIM.SendMsgMode},cpr:function(){if(!ymr(DcxIM.DisplayMode))return DcxIM.DisplayMode;var v=yoj("dcxIMKeepShowMode");if(ymr(v)||isNaN(v)||parseInt(v,10)<1)DcxIM.DisplayMode=1;else DcxIM.DisplayMode=parseInt(v,10);return DcxIM.DisplayMode},ovd:function(a,b,c,d,e,f){if(isNaN(b))b=1;if(isNaN(c))c=-1;if(ymr(e)||isNaN(e))e=0;var g=null;if(((b==2&&!ymr(a)&&!ymr(f)&&!ymr(f.target)&&!$(f.target).hasClass("WBIM_icon_wbclose"))||b==1)&&!ymr(a)&&(ymr(c)||isNaN(c)||c<1)){c=parseInt($(a).attr("userId"),10);e=parseInt($(a).attr("roomId"),10);d=$(a).attr("title");g=d}else if((a==null&&b==3&&c<1)){c=-1;if(ymr(DcxIM.twt)||DcxIM.twt.length<1)DcxIM.twt=DcxIM.vit.find("#chatingFriends");var h=DcxIM.twt.find("ul.wbim_chat_friend_list");var i=null;if(h.length>0){i=h.children(".wbim_active:first");if(i.length>0){c=parseInt(i.attr("userId"),10);e=parseInt(i.attr("roomId"),10);d=i.attr("title");g=d}}
if(isNaN(c)||c<1){if(!ymr(DcxIM.osu)&&DcxIM.osu.length>0){c=DcxIM.osu[DcxIM.osu.length-1].Sender.ID;e=DcxIM.osu[DcxIM.osu.length-1].RoomId;d=DcxIM.osu[DcxIM.osu.length-1].Sender.UserName;if(!isNaN(e)&&e>0){c=e;g=DcxIM.osu[DcxIM.osu.length-1].Receiver.RealName;d="Room@"+e}}}
if(isNaN(c)||c<1){var j=DcxIM.bwk(-1);if(!ymr(j)){c=j.UserId;e=j.RoomId;d=j.UserName;g=j.UserName;if(e>0)d="Room@"+e}}}
if(b==2&&!ymr(a)&&!ymr(f)&&!ymr(f.target)&&$(f.target).hasClass("WBIM_icon_wbclose")){if(ymr(DcxIM.twt)||DcxIM.twt.length<1)DcxIM.twt=DcxIM.vit.find("#chatingFriends");var h=DcxIM.twt.find("ul.wbim_chat_friend_list");var k=$(a);c=parseInt(k.attr("userId"),10);e=parseInt(k.attr("roomId"),10);d=k.attr("title");g=d;if(isNaN(e)||ymr(e))e=0;if(k.hasClass("wbim_active")){var l=k.next();if(ymr(l)||l.length<1)l=k.prev();DcxIM.alo(c);if(!ymr(l)&&l.length>0){l.addClass("wbim_active");DcxIM.ovd(null,3)}}else{DcxIM.alo(c,a,e)}
return false}
if(isNaN(c)||c<1){return false}
if(b==2&&!ymr(a))$(a).removeClass("wbim_highlight");var m=DcxIM.bwk(c,e);var n=false;if(ymr(m)){if(isNaN(e)||ymr(e))e=0;if(e>0)d="Room@"+e;if(ymr(g))g=d;m={"UserId":c,"UserName":d,"RealName":g,"IsOnLine":true,"IsTemp":true,"GroupId":0,"RoomId":e};if(ymr(DcxIM.MainMsg.Friends))DcxIM.MainMsg.Friends=new Array();var o=new Array();o.push(m);if(e<1){DcxIM.sbr(-1,o)}
if(e>0){m.UserName=g;m.RealName=g}
DcxIM.MainMsg.Friends.push(m);n=true}
if(!ymr(m)){e=m.RoomId;DcxIM.cnj=m;var p=DcxIM.mrz(m.UserId,m.RoomId);var q=DcxIM.vit.find("img[nodehid='user_pic']");if(e>0)q.attr("src",DcxIM.pwm);else q.attr("src",jbc(m.UserId,2));if(e>0||m.IsOnLine)q.parent().next().removeClass("W_chat_stat_offline").addClass("W_chat_stat_online");else q.parent().next().removeClass("W_chat_stat_online").addClass("W_chat_stat_offline");if(e>0)q.attr("title","讨论组："+m.UserName);else q.attr("title","好友："+m.UserName);var r=DcxIM.vit.find("a[nodehid='wbim_tit_lf_name']");if(r.length>0)r.attr("title",(e>0?"讨论组：":"好友：")+m.UserName).text((e>0?m.RealName:m.UserName));DcxIM.vit.show().attr("IsShow",1).attr("UserId",c).attr("RoomId",e);if(parseInt(DcxIM.jci.attr("IsShow"),10)==1)DcxIM.vit.css("right","200px");else DcxIM.vit.css("right","68px");DcxIM.vsl(m.UserId,e,m.UserName,m.IsOnLine,true);if(e>0){DcxIM.uhl(e)}else{if(ymr(DcxIM.uplLgrList)||DcxIM.uplLgrList.length<1)DcxIM.uplLgrList=DcxIM.vit.find("#divRoomLgrList");var w=DcxIM.vit.width();if(DcxIM.uplLgrList.css("display")!="none"){w=w-104;DcxIM.uplLgrList.hide()}
DcxIM.vit.width(w)}
var s=new Array();s.push(m);if(!p)DcxIM.juw(s,false)}else{return false}},alo:function(a,b,c){if(isNaN(a)||a<0){return false}
if(DcxIM.cnj!=null&&DcxIM.cnj.UserId==a)c=DcxIM.cnj.RoomId;if(isNaN(c)||ymr(c)){c=0}
if(ymr(DcxIM.twt)||DcxIM.twt.length<1)DcxIM.twt=DcxIM.vit.find("#chatingFriends");var d=DcxIM.twt.find("ul.wbim_chat_friend_list");if(d.children().length<2){var e=xfx(b,"Left")-200;var f=xfx(b,"Top")-200;art.VLdialog.tips("这已经是最后一个。",1.8,e,f);return false}
var g=d.children("li[userId="+a+"][roomId="+c+"]");if(ymr(g)||g.length<1){return false}
g.remove();var h=d.children();if(h.length<2){var w=DcxIM.vit.width();if(DcxIM.twt.css("display")!="none"){w=w-104}
DcxIM.vit.width(w);DcxIM.twt.hide();if(!DcxIM.vit.hasClass("wbim_chat_box_s"))DcxIM.vit.addClass("wbim_chat_box_s")}
if(ymr(DcxIM.vitList)||DcxIM.vitList.length<1)DcxIM.vitList=DcxIM.vit.find("#talkingContainer");var i=DcxIM.vitList.children(":first").children(".dscroll-container");var j=i.children("[isChatList=1]");if(!ymr(j)&&j.length>0){j.hide().css({"visibility":"hidden","display":"none"});var k=i.children("[userId="+a+"]");if(ymr(k)||k.length<1){return false}
k.hide()}},mrz:function(a,b){if(ymr(b))b=0;var c=DcxIM.MainMsg.LastRencentFriends;if(!ymr(c)){for(var i=0;i<c.length;i++){if(c[i].UserId==a&&c[i].RoomId==b){return true;break}}}
return false},bwk:function(a,b){if(ymr(b))b=0;var c=DcxIM.MainMsg.LastRencentFriends;if(a<1){var d=null;if(!ymr(c)&&c.length>0){d=c[c.length-1];if(ymr(d)){c=DcxIM.MainMsg.Friends;if(!ymr(c)&&c.length>0)d=c[c.length-1]}}
if(b>0)d.UserName=d.RealName;return d}
c=DcxIM.MainMsg.LastRencentFriends;if(!ymr(c)){for(var i=0;i<c.length;i++){if(c[i].UserId==a&&c[i].RoomId==b){if(b>0)c[i].UserName=c[i].RealName;return c[i];break}}}
c=DcxIM.MainMsg.Friends;var d=null;if(!ymr(c)){for(var i=0;i<c.length;i++){if(c[i].UserId==a&&c[i].RoomId==b){if(b>0)c[i].UserName=c[i].RealName;return c[i];break}}}
if(b>0){var e=DcxIM.Rooms;if(!ymr(e)){for(var i=0;i<e.length;i++){if(e[i].RoomId==b){var f={};f.UserId=e[i].RoomId;f.GroupId=0;f.UserName=e[i].RoomName;f.RenewTime=new Date();if(e[i].CreatorId==DcxIM.MainMsg.userMsg.UserId)f.Relationthip=2;else f.Relationthip=0;f.RoomId=e[i].RoomId;f.LastTalkDate=new Date();f.LastMsg=null;f.RealName=e[i].RoomName;return f;break}}}}
return null},ncv:function(a,b){if(ymr(b)||b.length<1)return false;var c=false;if(a<1)c=true;for(var i=0;i<b.length;i++){var d=b[i].UserId;var e=b[i].UserName;var f=DcxIM.bwk(d,0);if(f==null){f={"poq":0,"UserId":d,"GroupId":a,"IsOnLine":false,"IsTemp ":c,"LastMsg":null,"UserName":e,"RenewTime":new Date(),"LastTalkDate":new Date(),"RealName":e,"TalkTimes ":0,"Relationthip":0,"RoomId":0};if(ymr(DcxIM.MainMsg.Friends)){DcxIM.MainMsg.Friends=new Array()}
DcxIM.MainMsg.Friends.push(f)}}},zhg:function(a){var b=DcxIM.MainMsg.LastRencentFriends;if(!ymr(b)){for(var i=0;i<b.length;i++){if(b[i].RoomId==a){return b[i];break}}}
b=DcxIM.MainMsg.Friends;var c=null;if(!ymr(b)){for(var i=0;i<b.length;i++){if(b[i].RoomId==a){return b[i];break}}}
return null},lns:function(a,b){if(b==true||parseInt(DcxIM.jci.attr("IsShow"),10)==1){DcxIM.vit.css("right","68px");DcxIM.uxw.show().attr("IsShow",1);DcxIM.jci.hide().attr("IsShow",0);DcxIM.vit.hide().attr("IsShow","0");if(DcxIM.jci.attr("IsShow")!="1"&&DcxIM.vit.attr("isshow")!="1")DcxIM.uxw.children("div.webim_list_wrap").stop().fadeTo(1000,0.5)}else{DcxIM.hye.height($(window).height()-110);DcxIM.uxw.hide().attr("IsShow",0);DcxIM.jci.show().attr("IsShow",1);DcxIM.vit.css("right","200px")}
if(DcxIM.sem==null)DcxIM.sem=DcxIM.irl.children("[nodehid='chatMiniRoot']");DcxIM.sem.css("right",DcxIM.vit.css("right"))},aes:function(a,b){if(b!=2)DcxIM.vit.hide().attr("IsShow",0);else{DcxIM.vit.hide().attr("IsShow",0);if(DcxIM.sem==null)DcxIM.sem=DcxIM.irl.children("[nodehid='chatMiniRoot']");DcxIM.sem.show().css("right",DcxIM.vit.css("right"));if(ymr(DcxIM.twt)||DcxIM.twt.length<1)DcxIM.twt=DcxIM.vit.find("#chatingFriends");var c=DcxIM.twt.find("ul.wbim_chat_friend_list");var d=null;var e=null;if(c.length>0){d=c.children(".wbim_active:first");if(d.length>0){userId=parseInt(d.attr("userId"),10);e=d.find(".wbimcexrname").text();DcxIM.sem.text(e).attr("userId",userId);DcxIM.sem.unbind("click").bind("click",function(){DcxIM.sem.hide();DcxIM.ovd(null,4,userId)})}}}},mjd:function(){var a=DcxIM.hfs();if(a>0){var b=DcxIM.irl.children("div[nodehid='chatRemind']");b.show().text("你有"+a+"条新私信").unbind("click").bind("click",function(){DcxIM.ypo(DcxIM.osu,false);DcxIM.ovd(null,3,-1);b.hide()});DcxIM.irl.children("div[nodehid='chatMiniRoot']").hide();DcxIM.kuz(0,b,"wbim_min_chat_msg",16)}},ypo:function(a){var b=-1;var c=0;if(!ymr(DcxIM.cnj)){b=DcxIM.cnj.UserId;c=DcxIM.cnj.RoomId}
if(ymr(DcxIM.twt)||DcxIM.twt.length<1)DcxIM.twt=DcxIM.vit.find("#chatingFriends");var d=DcxIM.twt.find("ul.wbim_chat_friend_list");var e=d.children();var f=new Array();for(var i=0;i<a.length;i++){var g=a[i];var h=0;var j={"ID":0,"Sender":"未知"};if(ymr(g.Sender))g.Sender=j;h=g.Sender.ID;var l=g.RoomId;if(!isNaN(l)&&l>0)h=l;var m=false;if(h==b)continue;for(var k=0;k<f.length;k++){if(h==f[k].UserId&&l==f[k].RoomId){m=true;break}}
if(!m){f.push({"UserId":h,"RoomId":l});var n=d.children("li[userId="+h+"][roomId="+l+"]");if(!n.hasClass("wbim_active")&&!ymr(n)&&n.length>0){DcxIM.kuz(0,n,"wbim_highlight",6)}else{var o=DcxIM.bwk(h,l);if(!ymr(o))DcxIM.vsl(h,o.RoomId,o.UserName,o.IsOnLine,false);else DcxIM.vsl(h,l,(l>0?g.Receiver.RealName:g.Sender.UserName),false,false);n=d.children("li[userId="+h+"][roomId="+l+"]");if(!n.hasClass("wbim_active"))DcxIM.kuz(0,n,"wbim_highlight",6)}}}},kuz:function(r,a,b,c){r++;if(r<c){if(r%2==0)a.removeClass(b);else if(!a.hasClass(b))a.addClass(b);if(r%2==0)setTimeout(function(){DcxIM.kuz(r,a,b,c)},600);else setTimeout(function(){DcxIM.kuz(r,a,b,c)},600)}},zak:function(){var c=DcxIM.nzn;var d="/WebServices/WebIM/WebIM.asmx/zak";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:d,data:"{recentCount:"+c+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取IM的基本信息失败。详情："+b);return false},success:function(a){DcxIM.MainMsg=hmy(a);DcxIM.poq=DcxIM.MainMsg.userMsg.UserId;DcxIM.dsh=DcxIM.MainMsg.userMsg.DeptId;DcxIM.zfy["_1"]=DcxIM.MainMsg.LastRencentFriends;DcxIM.vah(DcxIM.zfy["_1"]);DcxIM.dok();DcxIM.xol()}})},ehc:function(){if(DcxIM.ajf){return false}
var c="/WebServices/WebIM/WebIM.asmx/GetFriendsAndLinkGroup";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:"{}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取IM的基本信息失败。详情："+b);return false},success:function(a){var b=hmy(a);DcxIM.MainMsg.Friends=b.Friends;DcxIM.MainMsg.LinkManGroup=b.LinkManGroup;DcxIM.ajf=true;if(ymr(DcxIM.MainMsg.Friends)){DcxIM.MainMsg.Friends=new Array()}
if(ymr(DcxIM.MainMsg.LinkManGroup)){DcxIM.MainMsg.LinkManGroup=new Array()}
DcxIM.csy()}})},lqw:function(c,d){if(c==true){if(DcxIM.buc<2){$(d).find("img").attr("src","/Images/common/dcx14.png");art.VLdialog.tips("已经是第一页",0.8);return}
$(d).find("img").attr("src","/Images/common/dcx11.png");DcxIM.buc=DcxIM.buc-1}else{if(DcxIM.owy>0&&DcxIM.buc>=DcxIM.owy){art.VLdialog.tips("已经是最后一页",0.8);return}
DcxIM.buc=DcxIM.buc+1;$(d).find("img").attr("src","/Images/common/dcx10.png")}
if(!ymr(DcxIM.zfy["_"+DcxIM.buc])){DcxIM.vah(DcxIM.zfy["_"+DcxIM.buc]);return}
var e={"pageSize":DcxIM.nzn,"pageIndex":DcxIM.buc};var f="/WebServices/WebIM/WebIM.asmx/lqw";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:f,data:JSON2.stringify(e),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取好友失败。详情："+b);return false},success:function(a){a=hmy(a);if(ymr(a)||a.length<1){if(!c)DcxIM.buc=DcxIM.buc-1;DcxIM.owy=DcxIM.buc;art.VLdialog.tips("已经是最后一页",0.8);if(!c)$(d).find("img").attr("src","/Images/common/dcx15.png");return}
DcxIM.zfy["_"+DcxIM.buc]=a;DcxIM.vah(a);if(!c)$(d).find("img").attr("src","/Images/common/dcx11.png")}})},xwh:function(c,d){if(!ymr(DcxIM.MainMsg.Friends)){return false}
var e="/WebServices/WebIM/WebIM.asmx/GetFriendGroups";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取IM的基本信息失败。详情："+b);return false},success:function(a){var a=hmy(a);DcxIM.MainMsg.LinkManGroup=a;if(ymr(DcxIM.MainMsg.LinkManGroup)){DcxIM.MainMsg.LinkManGroup=new Array()}
if(!ymr(c)&&!ymr(a))c(a,d)}})},dok:function(){var o="/MyApp/WebIM/GetIMessage.ashx?sessionId="+DcxIM.MainMsg.userMsg.SessionId+"&ServerVersion=1.0.0.0"+"&clientVersion=1.0.0.0";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:o,data:"{}",dataType:'json',success:function(a){a=hmy(a);if(!ymr(a)&&a.IsSucceed&&!ymr(a.Responses)&&a.Responses.length>0){for(var i=0;i<a.Responses.length;i++){var b=a.Responses[i];var c=b.Data;if(ymr(c))continue;if(b.CommandID=="GLOBAL:IM_MESSAGE_NOTIFY"){if(!Dcx.IM){return false}
if(ymr(DcxIM.Unreadmsg))DcxIM.Unreadmsg=new Array();var d=new Array();if(!ymr(c.Message))d.push(c.Message);else if(!ymr(c.Messages))d=c.Messages;if(ymr(d)||d.length<1)continue;var f=DcxIM.vit.css("display");if(f.toLowerCase(f)=="none")f=false;else f=true;if(f){var g=-1;var h=-1;if(!ymr(DcxIM.cnj)){g=DcxIM.cnj.UserId;h=DcxIM.cnj.RoomId}
var j=false;for(var k=0;k<d.length;k++){if(d[k].Sender!=null||!ymr(d[k].MsgContent)){j=true;DcxIM.osu.push(d[k])}}
if(j){DcxIM.ypo(d,false);DcxIM.ibe(null,false,g,h)}}else{var j=false;for(var k=0;k<d.length;k++){if(d[k].Sender!=null||!ymr(d[k].MsgContent)){j=true;DcxIM.osu.push(d[k])}}
if(j)DcxIM.mjd()}}else if(b.CommandID=="UserStateChanged"){if(!Dcx.IM){return false}
var l=c;if(ymr(l))continue;try{if(l.length==undefined){l=new Array();l.push(c)}}catch(e){l=new Array();l.push(c)}
if(l.length<1)continue;for(var k=0;k<l.length;k++){if(l[k].State=="Offline")DcxIM.OnLine[l[k].User]=false;else DcxIM.OnLine[l[k].User]=true;try{DcxHome.OnLines["_"+l[k].User]=l[k]}catch(e){}}}else if(b.CommandID=="WorkMsgCount"){var l=c;if(ymr(l))continue;try{if(l.length==undefined){l=new Array();l.push(c)}}catch(e){l=new Array();l.push(c)}
if(l.length<1)continue;var m=0;for(var k=0;k<l.length;k++){DcxMsg.NewMsgList.push(l[k]);if(ymr(l[k].Count)||isNaN(l[k].Count))l[k].Count=1;m=m+l[k].Count}
if(m>0){DcxMsg.NewCount=DcxMsg.NewCount+m;var n="有 "+m+" 条新动态，点击查看";DcxMsg.mqw.children("[iswarn=1]").show().html(n)}}}}
setTimeout(function(){DcxIM.dok()},3000);return false}})},yhs:function(a,b){if(a.length>0)a=a.find("span.W_chat_stat");if(a.length>0){if(b)a.removeClass("W_chat_stat_offline").addClass("W_chat_stat_online");else a.removeClass("W_chat_stat_online").addClass("W_chat_stat_offline")}},knd:function(){for(var a in DcxIM.OnLine){var b=DcxIM.OnLine[a];if(b!=undefined){var c=null;var d=DcxIM.MainMsg.LastRencentFriends;if(!ymr(d)){for(var i=0;i<d.length;i++){if(d[i].UserId==a){d[i].IsOnLine=b;if(ymr(DcxIM.gvmsContainer))DcxIM.gvmsContainer=DcxIM.uxw.find("#recentsContainer");if(ymr(DcxIM.slx))DcxIM.slx=DcxIM.jci.find("#unfoldRecent");DcxIM.yhs(DcxIM.slx.children("li[userId="+a+"]"),b);DcxIM.yhs(DcxIM.gvmsContainer.children("li[userId="+a+"]"),b);c=d[i];break}}}
d=DcxIM.MainMsg.Friends;if(!ymr(d)){for(var i=0;i<d.length;i++){if(d[i].UserId==a){d[i].IsOnLine=b;if(ymr(DcxIM.hri))DcxIM.hri=DcxIM.jci.find("#contactsContainer");if(ymr(DcxIM.hri2))DcxIM.hri2=DcxIM.hri.children(".dscroll-box").children(".dscroll-container");var e=DcxIM.hri2.children("div[GroupId="+d[i].GroupId+"]");DcxIM.yhs(e.find("li[userId="+a+"]"),b);c=d[i];e=e.find("span[nodehid='OnlineCount']");var v=e.attr("val").split(",");var f=parseInt(v[0],10);if(b)f++;else f--;e.attr("val",f+","+v[1]);e.text(f+"/"+v[1]);break}}}
for(var g in DcxIM.Rooms){var h=DcxIM.qhy[g];if(!ymr(h)){for(var i=0;i<d.length;i++){if(d[i].UserId==a){d[i].IsOnLine=b;if(c==null)c=d[i];if(ymr(DcxIM.uplLgrList)||DcxIM.uplLgrList.length<1)DcxIM.uplLgrList=DcxIM.vit.find("#divRoomLgrList");DcxIM.yhs(DcxIM.uplLgrList.find("li[userId="+a+"]"),b);break}}}}
if(c!=null){if(ymr(DcxIM.twt)||DcxIM.twt.length<1)DcxIM.twt=DcxIM.vit.find("#chatingFriends");if(ymr(DcxIM.$ulChating)||DcxIM.$ulChating.length<1)DcxIM.$ulChating=DcxIM.twt.find("ul.wbim_chat_friend_list");DcxIM.yhs(DcxIM.$ulChating.children("li[userId="+a+"]"),b)}
if(DcxIM.cnj!=null&&DcxIM.cnj.UserId==a){if(ymr(DcxIM.$talkingOnLine)||DcxIM.$talkingOnLine.length<1)DcxIM.$talkingOnLine=DcxIM.vit.find("img[nodehid='user_pic']").parent().next();if(b)DcxIM.$talkingOnLine.removeClass("W_chat_stat_offline").addClass("W_chat_stat_online");else DcxIM.$talkingOnLine.removeClass("W_chat_stat_online").addClass("W_chat_stat_offline")}}
DcxIM.OnLine[a]=undefined}
setTimeout(function(){DcxIM.knd()},5000)},wso:function(){var a=DcxIM.vit.css("display");if(a.toLowerCase(a)=="none")a=false;else a=true;return a},cow:function(f,g){if(ymr(DcxIM.cnj)||ymr(DcxIM.cnj.UserName)||ymr(DcxIM.cnj.UserId)){art.VLdialog.alert("请先点击您的好友，再发送聊天记录。",function(){},12,"提示");return false}
if(ymr(DcxIM.iiu)){art.VLdialog.alert("IM加载失败，请刷新页面重新发送。",function(){},12,"提示");return false}
var h={"msgContent":null,"receiverName":DcxIM.cnj.UserName,"receiverId":DcxIM.cnj.UserId};if(DcxIM.cnj.RoomId>0)h.receiverName="Room@"+DcxIM.cnj.RoomId;h.msgContent=DcxIM.rtg();if(ymr(h.msgContent)){if(ymr(Dcx.UpLoadFile)){var i=xfx(f,"Left")-200;var j=xfx(f,"Top")-200;art.VLdialog.tips("请输入内容！",1.8,i,j);return false}else{h.msgContent="发送文件"}}
DcxIM.sec("");if(!ymr(Dcx.UpLoadFile)){h.newGuid=Dcx.UpLoadFile.NewGuid;h.fileName=Dcx.UpLoadFile.FileName;h.fileSize=Dcx.UpLoadFile.FileSize;h.fileType=Dcx.UpLoadFile.FileTypeId}else{h.newGuid=null;h.fileName=null;h.fileSize=0;h.fileType=0}
var k="/WebServices/WebIM/WebIM.asmx/SendMsg";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:k,data:JSON2.stringify(h),dataType:'json',beforeSend:function(a){},complete:function(a,b){Dcx.UpLoadFile=null},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("发送IM消息失败。详情："+b);return false},success:function(a){a=hmy(a);var b=new Array();var c={};c.MsgContent=a.ErrorMsg;c.MsgId=a.NewId;c.SentDate=new Date();if(!ymr(Dcx.UpLoadFile)){var d=new Date();var s=d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate();var e="/UploadFiles/user/"+Dcx.exd()+"/webIM/"+s+"/";if(Dcx.UpLoadFile.FileTypeId==2)e=e+"cmps/";e=e+Dcx.UpLoadFile.NewGuid+Dcx.UpLoadFile.FileName;c.FileJson="{\"FilePath\":\""+e+"\",\"FileSize\":"+Dcx.UpLoadFile.FileSize+",\"FileTypeId\":"+Dcx.UpLoadFile.FileTypeId+",\"FileName\":\""+Dcx.UpLoadFile.FileName+"\"}";if(!ymr(DcxIM.$upTips))DcxIM.$upTips.hide()}else c.FileJson=null;b.push(c);DcxIM.ibe(b,true,-1,DcxIM.cnj.RoomId)}})},UploadFile:function(h,j){var k=$(h);if(!ymr(Dcx.UpLoadFile)){art.VLdialog.tips("您已上传文件！",2);if(Dcx.UpLoadFile.$file==k)k.val(Dcx.UpLoadFile.sfilePath);return}
if(ymr(k)||k.length<1)return false;var l=k.val();var m=Dcx.File.nnt(l);var n=Dcx.Date.bam()+"_";var o=null;var p=m.toLowerCase();var i=p.lastIndexOf('.');var q="";if(i>=0){q=p.substr(i,p.length-i)}
if(j&&!(q==".jpg"||q==".png"||q==".gif"||q==".bmp")){k.val("");art.VLdialog.tips("上传失败，请选择扩展名为jpg|png|gif|bmp的图片类型！",10);return}
var r=1;switch(q){case".jpg":case".png":case".gif":case".bmp":r=1;break;default:r=2;break}
if(ymr(Dcx.UpLoadFile))Dcx.UpLoadFile={};Dcx.UpLoadFile.FileTypeId=Dcx.File.zde(m);var o="/UploadFiles/user/"+Dcx.exd()+"/webIM/Temp/";Dcx.UpLoadFile.$file=k;if(Dcx.UpLoadFile.FileTypeId==2)j=true;else j=false;Dcx.UpLoadFile.IsImg=j;Dcx.UpLoadFile.NewFilePath=o;Dcx.UpLoadFile.FileExt=q;Dcx.UpLoadFile.FileSize=-1;Dcx.UpLoadFile.FileName=m;Dcx.UpLoadFile.sfilePath=l;Dcx.UpLoadFile.NewGuid=n;var s={"hid_MaxFileSize":10240,"isImg":(j?1:0),"appType":3};var t=1897;var u="AjaxF_";var v=new Array();var w={EntId:t,RowIndex:1,Items:[]};w.Items=new Array();v.push(w);var x={"FId":336,"FN":"ExampleImgUrl","Value":l,"NewFile":o,"OldValue":null,"Obj":k,"Other":s};v[0].Items.push(x);var y=false;var z=false;DcxIM.$upTips=DcxIM.vit.find(".wbim_chat_input_tips");DcxIM.$upTips.find(".wbim_tips_pos_n").hide();DcxIM.$upTips.show();DcxIM.$upTips.find(".wbim_text").html("上传文件中...");DcxIM.$upTips.find(".links").hide();if(Dcx.UpLoadFile.FileTypeId==1)DcxIM.$upTips.find(".wbim_icon").show().addClass("wbim_icon_s_photo");else DcxIM.$upTips.find(".wbim_icon").show().addClass("wbim_icon_s_txt");$.bpd(v,{url:"/Ajax/UploadFile/Upload.ashx",secureuri:false,fileElementId:'fileToUpload',dataType:'text',success:function(a){a=hmy(a);y=true;a=a.split("*()^");var b="";if(a.length>1){b=a[0];a=a[1]}
a=a.split("%$&");var c=parseInt($.trim(a[0]),10);var d=$.trim(a[1]);if(c==0){Dcx.UpLoadFile=null;k.val("");art.VLdialog.tips("上传失败，原因："+b+"您可以继续上传。",2.8);return false}
d=d.replace("amp;","");var e=$.trim(a[2]);e=e.replace("amp;","");Dcx.UpLoadFile.FilePath=d;Dcx.UpLoadFile.NewGuid=e;var f=$.trim(a[3]);f=f.replace("amp;","");Dcx.UpLoadFile.FileSize=parseInt(f,10);if(Dcx.UpLoadFile.FileTypeId==2)o=o+"cmps/";o=o+Dcx.UpLoadFile.NewGuid+m;Dcx.UpLoadFile.NewFilePath=o;if(Dcx.UpLoadFile.FileTypeId==2){var g=DcxIM.$upTips.find(".wbim_tips_pos_n");g.find("img").attr("src",Dcx.UpLoadFile.NewFilePath);g.hide();setTimeout(function(){g.show()},300);DcxIM.$upTips.find(".links").show();DcxIM.$upTips.find(".wbim_icon").show();DcxIM.$upTips.find(".wbim_text").html("")}else{DcxIM.$upTips.find(".wbim_tips_pos_n").hide();DcxIM.$upTips.find(".wbim_text").html(Dcx.UpLoadFile.FileName);DcxIM.$upTips.find(".links").show();DcxIM.$upTips.find(".wbim_icon").show()}},error:function(a,b,e){z=true;if(b=='error'){alert(e)}},complete:function(a,b){z=true}})}};DcxIM.ija=function(f,g,h,j){if(parseInt(g.attr("getedHistory"),10)==1)return false;if(j>0)f="Room@"+j;g.attr("getedHistory","1");var k="/WebServices/WebIM/WebIM.asmx/ija";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:k,data:"{\"talkingUserName\":\""+f+"\"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取IM历史消息失败。详情："+b);return false},success:function(a){a=hmy(a);if(!ymr(a)){var b=g.children(":first");var c=-1;if(!ymr(b)&&b.length>0)c=parseInt(b.attr("MsgId"),10);var d=new Array();if(!ymr(c)&&!isNaN(c))c=-1;if(c<1&&!ymr(DcxIM.osu)){if(j<1){for(var i=0;i<DcxIM.osu.length;i++){if(DcxIM.osu[i].Sender.ID!=h)continue;if(c<1||c>DcxIM.osu[i].MsgId)c=DcxIM.osu[i].MsgId}}else{for(var i=0;i<DcxIM.osu.length;i++){if(DcxIM.osu[i].RoomId!=j)continue;if(c<1||c>DcxIM.osu[i].MsgId)c=DcxIM.osu[i].MsgId}}}
for(var i=0;i<a.length;i++){var e=eval("("+a[i]+")");if(c<1||e.Message.MsgId<c){d.push(e.Message)}else break}
if(!ymr(d)&&d.length>0)DcxIM.ibe(d,false,h,j)}}})};DcxIM.xol=function(){DcxIM.juw(DcxIM.MainMsg.LastRencentFriends,true)};DcxIM.juw=function(a,b){if(b!=true)b=false;if(ymr(DcxIM.gvmsContainer))DcxIM.gvmsContainer=DcxIM.uxw.find("#recentsContainer");if(ymr(a))a=DcxIM.MainMsg.LastRencentFriends;if(!ymr(a)){if(ymr(DcxIM.slx))DcxIM.slx=DcxIM.jci.find("#unfoldRecent");var c=new nzy();var d=new nzy();for(var i=0;i<a.length;i++){var e=a[i];var f=e.UserName;var g=null;if(e.RoomId>0){g=DcxIM.bby;f=e.RealName}else g=jbc(e.UserId,3);c.append("<li class=\"clearfix\" UserId=\""+e.UserId+"\" RoomId=\""+e.RoomId+"\" onclick=\"javscript:DcxIM.ovd(this);\" >\n");c.append("<div class=\"webim_list_head webim_head_30\">\n");c.append("<span class=\"head_pic\">\n");c.append("<img class=\"webimcexr_item_img\" src=\""+g+"\" width=\"30\"   title=\""+(e.RoomId?"讨论组：":"")+f+"\" height=\"30\" />\n");c.append("</span>\n");c.append("<span class=\"W_chat_stat ");if(e.RoomId>0||e.IsOnLine)c.append("W_chat_stat_online\"></span>\n");else c.append("W_chat_stat_offline\"></span>\n");c.append("<span class=\"WBIM_icon_dev WBIM_icon_#{resource}\"></span>\n");c.append("<span class=\"WBIM_icon_new\"></span>\n");c.append("</div>\n");c.append("</li>\n");d.append("<li class=\"clearfix\" UserId=\""+e.UserId+"\"  RoomId=\""+e.RoomId+"\" onclick=\"javscript:DcxIM.ovd(this);\" title=\""+(e.RoomId?"讨论组：":"")+f+"\" >\n");d.append("<div class=\"webim_list_head webim_head_30\">\n");d.append("<span class=\"head_pic\">\n");d.append("<img class=\"webimcexr_item_img\"  src=\""+g+"\" width=\"30\" height=\"30\"  />\n");d.append("</span>\n");d.append("<span class=\"W_chat_stat ");if(e.RoomId>0||e.IsOnLine)d.append("W_chat_stat_online\"></span>\n");else d.append("W_chat_stat_offline\"></span>\n");d.append("<span class=\"WBIM_icon_dev WBIM_icon_#{resource}\"></span>\n");d.append("<span class=\"WBIM_icon_new\"></span>\n");d.append("</div>\n");d.append("<div class=\"webim_list_name\">\n");d.append("    <span class=\"user_name\">"+f+"</span>&nbsp; \n");d.append("</div>\n");d.append("</li>\n");if(!b){var h=DcxIM.gvmsContainer.children("[userId="+e.UserId+"]");if(h.length>0)h.remove();h=DcxIM.slx.children("[userId="+e.UserId+"]");if(h.length>0)h.remove();if(ymr(DcxIM.MainMsg.LastRencentFriends))DcxIM.MainMsg.LastRencentFriends=new Array();var j=false;for(var k=0;k<DcxIM.MainMsg.LastRencentFriends.length;k++){if(DcxIM.MainMsg.LastRencentFriends[k].UserId==e.UserId){j=true;break}}
if(!j){DcxIM.MainMsg.LastRencentFriends.push(e)}}}
DcxIM.gvmsContainer.prepend(c.toString());DcxIM.slx.prepend(d.toString())}};DcxIM.csy=function(){if(ymr(DcxIM.hri))DcxIM.hri=DcxIM.jci.find("#contactsContainer");else if(DcxIM.hri.attr("hasLoad")=="1")return true;if(ymr(DcxIM.MainMsg.Friends)){return}
if(ymr(DcxIM.MainMsg.LinkManGroup)){return}
var a=DcxIM.MainMsg.Friends;var b=DcxIM.MainMsg.LinkManGroup;var c=new nzy();b.push({"GroupId":0,"GroupName":"临时会话"});for(var i=0;i<b.length;i++){var d=new nzy();var e=b[i];d.append("<div class=\"list_box list_box_fold clearfix\" nodehid=\"maxListRoot\" groupId=\""+e.GroupId+"\" >\n");d.append("<div class=\"list_title\" nodehid=\"maxListTitleContainer\"  onclick=\"javscript:DcxIM.qmn(this);\" >\n");d.append("<p class=\"title_cate\">\n");d.append("<a title=\""+e.GroupName+"\" nodehid=\"maxUserListTitle\" href=\"javascript:void(0);\" onclick=\"return false;\" class=\"list_title_a\"><span class=\"WB_webim_arrow\"><em class=\"down\">◆</em></span>\n");var f=DcxIM.riy(e.GroupId,a);if(ymr(f))f={friendCount:0,onlineCount:0,strHtml:""};d.append("<span nodehid=\"maxListTitleNode\">"+e.GroupName+"</span> (<span groupId=\""+e.GroupId+"\" val=\""+f.onlineCount+","+f.friendCount+"\" nodehid=\"OnlineCount\">"+f.onlineCount+"/"+f.friendCount+"</span>)</a></p>\n");d.append("</div>\n");d.append("<div class=\"list_content\">\n");d.append("<ul class=\"list_content_li\" nodehid=\"maxListContainer\">\n");d.append(f.strHtml);d.append("</ul>\n");d.append("</div>\n");d.append("</div>\n");if(b[i].GroupId>0||(b[i].GroupId==0&&f.friendCount>0))c.append(d.toString())}
DcxIM.hri.attr("hasLoad",1);if(ymr(DcxIM.hri2))DcxIM.hri2=DcxIM.hri.children(".dscroll-box").children(".dscroll-container");var g=DcxIM.hri2;g.html(c.toString());if(ymr(DcxIM.hri3))DcxIM.hri3=DcxIM.hri2.find("ul.list_content_li");var h=g.children(":first");if(h.length>0)DcxIM.qmn(h.children(":first").get(0))};DcxIM.riy=function(a,b){var c={friendCount:0,onlineCount:0,strHtml:""};if(ymr(b))return c;var d=0;var e=0;var f=new nzy();for(var k=0;k<b.length;k++){if(b[k].RoomId>0)continue;if(b[k].GroupId<0)b[k].GroupId=0;if(b[k].GroupId!=a)continue;var g=b[k];f.append("<li class=\"clearfix\" UserId=\""+g.UserId+"\" RoomId=\""+g.RoomId+"\" onclick=\"javscript:DcxIM.ovd(this);\" >\n");f.append("<div class=\"webim_list_head webim_head_30\">\n");f.append("<span class=\"head_pic\">\n");var h=jbc(g.UserId,3);f.append("<img class=\"webimcexr_item_img\" src=\""+h+"\" width=\"30\" height=\"30\" title=\""+g.UserName+"\" />\n");f.append("</span>\n");f.append("<span class=\"W_chat_stat ");if(g.IsOnLine){e++;f.append("W_chat_stat_online\"></span>\n")}else f.append("W_chat_stat_offline\"></span>\n");f.append("<span class=\"WBIM_icon_dev WBIM_icon_#{resource}\"></span>\n");f.append("<span class=\"WBIM_icon_new\"></span>\n");f.append("</div>\n");f.append("<div class=\"webim_list_name\">\n");f.append("    <span class=\"user_name\">"+g.UserName+"</span>&nbsp; \n");f.append("</div>\n");f.append("</li>\n");d++}
if(d<1){f.append("<li style=\"display: none;\"></li>\n");f.append("<li style=\"display: none;\"></li>\n")}
c.friendCount=d;c.onlineCount=e;c.strHtml=f.toString();return c};DcxIM.vah=function(a){if(ymr(a))a=DcxIM.MainMsg.LastRencentFriends;if(!ymr(a)){if(ymr(DcxHome.dhn))DcxHome.dhn=$("#div_UserList");var b=new nzy();for(var i=0;i<a.length;i++){var c=a[i];var d=c.UserName;var e=null;if(c.RoomId>0){e=DcxIM.bby;d=c.RealName}else e=jbc(c.UserId,2);b.append("<li UserId=\""+c.UserId+"\" UserName=\""+d+"\" "+(c.RoomId<1?"":"onclick=\"javscript:DcxIM.ovd(null,4,"+c.UserId+",'"+escape(d)+"',"+c.RoomId+");\"")+" RoomId=\""+c.RoomId+"\">\n");b.append("<a  "+(c.RoomId>0?"":" namecard=\""+d+"\" ")+" class=\"ui_avatar q_namecard\" href=\"javascript:void(0);\" >\n");b.append("<img  src=\""+e+"\"  height=\"50\" width=\"50\" title=\""+(c.RoomId?"讨论组：":"")+d+""+(c.RoomId>0?"，可以点击聊天":"")+"\"  >\n");if(c.RoomId>0||c.IsOnLine)b.append("<b class=\" online\" title=\"在线\"></b>\n");else b.append("<b class=\"offline \" title=\"离线\"></b>\n");b.append("</a>\n");b.append("<a  href=\"javascript:void(0);\"  class=\"name textoverflow q_namecard\" style=\"color:#666;margin-top:5px;\">"+d+"</a>\n");b.append("</li>\n");b.append("<span class=\"WBIM_icon_dev WBIM_icon_#{resource}\"></span>\n");b.append("<span class=\"WBIM_icon_new\"></span>\n");b.append("</div>\n");b.append("</li>\n")}}
if(ymr(a)||a.length<1)b.append("<div tabindex=\"-1\" searchid=\"-1\" class=\"mynui-menu-item\"> <a href=\"javascript:void(0);\" onclick=\"javascript:DcxIM.niv(this);\" class=\"flat-btn \" style=\"margin-left:26px;padding:3px 4px;font-size:12px;\">+ 添加好友</a></div>\n");DcxHome.dhn.html(b.toString());Dcx.NameCard.htg(DcxHome.dhn.get(0))};DcxIM.hfs=function(){var c=0;if(!ymr(DcxIM.osu)){msgList=DcxIM.osu;for(var i=0;i<DcxIM.osu.length;i++){if(DcxIM.osu[i].IsRead)continue;c++}}
return c};DcxIM.ibe=function(a,b,c,d){if(b){DcxIM.ibe2(a,b,c,d);return true}
var e=false;if(a!=null)e=true;if(e){DcxIM.ibe2(a,b,c,d);return true}
var i=0;var f=function(){if(!DcxIM.fce){DcxIM.fce=true;DcxIM.ibe2(a,b,c,d)}else if(i<100)setTimeout(function(){i++;f()},20)};f()};DcxIM.ibe2=function(a,b,c,e){if(ymr(DcxIM.vitList)||DcxIM.vitList.length<1)DcxIM.vitList=DcxIM.vit.find("#talkingContainer");var f=DcxIM.vitList.children(":first").children(".dscroll-container");if(ymr(DcxIM.cnj)){}
if(e>0)c=e;var g=DcxIM.cnj.UserId;var h=DcxIM.cnj.RoomId;if(ymr(h))h=0;var j={};var k=new nzy();var l=false;if(b){for(var i=0;i<a.length;i++){var m=a[i];m.RoomId=h;k.append(DcxIM.gma(m.MsgId,m.MsgContent,Dcx.Date.ahu(m.SentDate),m.FileJson,true,h))}}else{if(ymr(c)||isNaN(c))c=-1;if(ymr(e)||isNaN(e))e=-1;if(a!=null)l=true;else a=DcxIM.osu;var n=false;var o=g;var p=0;for(var i=0;i<a.length;i++){var q=a[i];if(a[i].IsRead||(!l&&c>0&&q.Sender.ID!=c&&q.RoomId!=h))continue;var t=lvk(q.SentDate.__Value);var d=new Date();t.setHours(t.getHours()-8);o=q.Sender.ID;p=q.RoomId;if(ymr(p))p=0;if(p>0)o=p;if(l){if((p<1&&q.Sender.ID!=c))n=true;else n=false;if(p<1)o=g}
var r=DcxIM.gma(q.MsgId,q.MsgContent,Dcx.Date.ahu(t),q.FileJson,n,q.RoomId,q.Sender.UserName,q.Sender.ID);if(j[o+"_"+p]==undefined)j[o+"_"+p]=r;else j[o+"_"+p]=j[o+"_"+p]+r;a[i].IsRead=true}
if(!l)DcxIM.fce=false;else{var o=g;if(h>0)o=h;if(!ymr(j[o+"_"+h])&&j[o+"_"+h].length>0){k=new nzy();k.append("<div class=\"  clearfix\" style=\"width:100%;height:30px;margin:10px 0px;\">");k.append("<div class=\"webim_dia_line\" style=\"width:30%;float:left;clear:none;\"></div>");k.append("<div class=\"\" style=\"width:30%;float:left;clear:none;margin:13px 12px 0px 12px;color: #999;\">以上是历史消息</div>");k.append("<div class=\"webim_dia_line\" style=\"width:30%;float:left;clear:none;\"></div>");k.append("</div>");j[o+"_"+h]=j[o+"_"+h]+k.toString()}}}
f.children("[isChatList=1]").hide().css({"visibility":"hidden","display":"none"});if(b){var o=DcxIM.cnj.UserId;if(h>0)o=h;var s=f.children("[userId="+o+"][roomId="+h+"]");if(ymr(s)||s.length<1){s=$("<div class=\"webim_dia_list scroll-centent\" isChatList=\"1\" userId=\""+o+"\" roomId=\""+h+"\" style=\"overflow: hidden; padding: 5px; display: block; visibility: visible;\"></div>");f.prepend(s)}
s.show().css({"visibility":"visible","display":"block"});s.append(k.toString())}else{var u=false;for(var v in j){var w=v.split("_");var x=parseInt(w[0],10);var y=parseInt(w[1],10);u=true;var o=x;if(y>0)o=y;var s=f.children("[userId="+o+"][roomId="+y+"]");if(ymr(s)||s.length<1){var o=x;if(y>0)o=y;s=$("<div class=\"webim_dia_list scroll-centent\"  isChatList=\"1\" userId=\""+o+"\" roomId=\""+y+"\" style=\"overflow: hidden; padding: 5px; display: block; visibility: visible;\"></div>");f.prepend(s)}
if(l)s.prepend(j[v]);else s.append(j[v]);if(y>0)x=y;if(parseInt(x,10)==g&&parseInt(y,10)==h)s.show().css({"visibility":"visible","display":"block"})}
if(!u){var o=DcxIM.cnj.UserId;if(h>0)o=h;var s=f.children("[userId="+o+"][roomId="+h+"]");if(ymr(s)||s.length<1){s=$("<div class=\"webim_dia_list scroll-centent\" isChatList=\"1\" userId=\""+o+"\" roomId=\""+h+"\" style=\"overflow: hidden; padding: 5px; display: block; visibility: visible;\"></div>");f.prepend(s)}
s.show().css({"visibility":"visible","display":"block"})}}}
DcxIM.gma=function(a,b,c,d,e,f,g,h){if(ymr(f))f=0;var i=new nzy();i.append("<div class=\"webim_dia_box "+(e?"webim_dia_r":"webim_dia_l")+" \" node-type=\"msgRoot\" msgId=\""+a+"\" >\n");i.append("<div class=\"dia_info\">\n");i.append("<span class=\"info_date\">"+c+"</span></div>\n");i.append("<div class=\"webim_dia_bg\">\n");i.append("<div class=\"dia_con\" node-type=\"conRoot\">\n");i.append("<p class=\"dia_txt\">\n");if(f>0){if(e||h==DcxIM.poq)i.append("<lable>我：</lable>\n");else i.append("<a username=\""+g+"\" title=\""+g+"\" namecard=\""+h+"\" >"+g+"：</a>\n")}
i.append(""+b+"</p>\n");if(!ymr(d)){var j=eval("("+d+")");if(!ymr(j)){if(j.length!=undefined)j=j[0];i.append("<div class=\"dia_att\" node-type=\"att\">\n");i.append("<p class=\"dia_line\"></p>\n");i.append("<div class=\"dia_file\">\n");if(j.FileTypeId==2){i.append("<div class=\"file_pic\">\n");i.append("<a class=\"pic_show\" href=\"javascript:void(0);\" onclick=\"return false;\">\n");i.append("<img title=\"点击看大图\" src=\""+j.FilePath+"\" style=\"width:150px;hight:auto;\"></a></div>\n")}else{i.append("<div class=\"file_box\">\n");i.append("<div class=\"att_sort\">\n");i.append("<em class=\"wbim_icon_b_default\" title=\"文件\"><em title=\"文件\" class=\"wbim_icon_b_txt\"></em>\n");i.append("</em>\n");i.append("</div>\n");i.append("<div class=\"att_info\">\n");i.append("<p class=\"att_name\">\n");i.append(""+j.FileName+"</p>\n");i.append("<p class=\"att_sizw\">\n");i.append(""+j.FileSize+"K</p>\n");i.append("</div>\n");i.append("<div class=\"att_act\">\n");i.append("<span class=\"pos\"></span>\n");i.append("</div>\n");i.append("</div>\n")}
i.append("</div>\n");i.append("</div>\n")}}
i.append("</div>\n");i.append("<div class=\"msg_arr\">\n");i.append("</div>\n");i.append("</div>\n");i.append("</div>\n");return i.toString()};DcxIM.vsl=function(b,c,d,e,f){if(ymr(c)||isNaN(c))c=0;if(c>0)b=c;if(ymr(DcxIM.vitList)||DcxIM.vitList.length<1)DcxIM.vitList=DcxIM.vit.find("#talkingContainer");var g=DcxIM.vitList.children(":first").children(".dscroll-container");var h=g.children("[isChatList=1]");g.show();if(f){if(!ymr(h)&&h.length>0)h.hide().css({"visibility":"hidden","display":"none"})}
var i=g.children("[userId="+b+"][roomId="+c+"]");if(ymr(i)||i.length<1){i=$("<div class=\"webim_dia_list scroll-centent\" isChatList=\"1\" userId=\""+b+"\" roomId=\""+c+"\" style=\"overflow: hidden; padding: 5px; display: block; visibility: visible;\"></div>");g.prepend(i)}
if(f){i.show().css({"visibility":"visible","display":"block"})}
if(ymr(DcxIM.twt)||DcxIM.twt.length<1)DcxIM.twt=DcxIM.vit.find("#chatingFriends");var j=DcxIM.twt.find("ul.wbim_chat_friend_list");var k=j.children("li[userId="+b+"]");if(ymr(k)||k.length<1){var l=new nzy();l.append("<li title=\""+d+"\" nodehid=\"_root\" class=\"wbim_active\"  userId=\""+b+"\" roomId=\""+c+"\">\n");l.append("<div class=\"list_head_state\">\n");l.append("<span  nodehid=\"_statusNode\" class=\"W_chat_stat ");if(c>0||e){l.append("W_chat_stat_online\"></span>\n")}else l.append("W_chat_stat_offline\"></span>\n");l.append("</div>\n");l.append("<div class=\"wbimcexrname\" nodehid=\"_nickNode\">\n");l.append(""+d+"<span class=\"wbim_icon_vf\"></span></div>\n");l.append("<div class=\"WBIM_icon_wbclose\"  userId=\""+b+"\" hidefocus=\"true\"  nodehid=\"_closeBtn\"></div>\n");l.append("</li>\n");var m=$(l.toString());m.unbind("click").bind("click",function(a){DcxIM.ovd(this,2,null,null,null,a)});j.prepend(m);k=j.children("li[userId="+b+"][roomId="+c+"]")}
var n=j.children();if(n.length>1){var w=DcxIM.vit.width();if(DcxIM.twt.css("display")=="none"){w=w+104}
DcxIM.vit.width(w);DcxIM.vit.removeClass("wbim_chat_box_s");DcxIM.twt.show()}else{var w=DcxIM.vit.width();if(DcxIM.twt.css("display")!="none"){w=w-104}
DcxIM.vit.width(w);if(!DcxIM.vit.hasClass("wbim_chat_box_s"))DcxIM.vit.addClass("wbim_chat_box_s");DcxIM.twt.hide()}
if(f){if(n.length>1){n.removeClass("wbim_active");k.addClass("wbim_active")}else{}
if(i.attr("getedHistory")!="1"){var o=DcxIM.bwk(b,c);if(!ymr(o))DcxIM.ija(o.UserName,i,b,c)}
DcxIM.ibe(null,false,b,c)}else{k.removeClass("wbim_active")}}
DcxIM.odz=function(f){DcxIM.kpp=DcxIM.irl.find("#divFontColorDlg");var w=DcxIM.kpp.width();var h=DcxIM.kpp.height();var g=xfx(f,"Left");var j=xfx(f,"Top");DcxIM.kpp.show();g=(g-w+200)-80;j=(j-h-8);DcxIM.kpp.css({"left":g+"px","top":j+"px"});var k=DcxIM.kpp.find(".colorlist");if(k.attr("hasLoad")!="1"){var l=new nzy();var m=[{"n":"黑","c":'000000'},{"n":"褐红","c":'800000'},{"n":"深褐","c":'8B4513'},{"n":"墨绿","c":'2F4F4F'},{"n":"绿松石","c":'008080'},{"n":"海军蓝","c":'000080'},{"n":"靛蓝","c":'4B0082'},{"n":"暗灰","c":'696969'},{"n":"砖红","c":'B22222'},{"n":"褐","c":'A52A2A'},{"n":"金黄","c":'DAA520'},{"n":"深绿","c":'006400'},{"n":"蓝绿","c":'40E0D0'},{"n":"中蓝","c":'0000CD'},{"n":"紫","c":'800080'},{"n":"灰","c":'808080'},{"n":"红","c":'FF0000'},{"n":"深橙","c":'FF8C00'},{"n":"金","c":'FFD700'},{"n":"绿","c":'008000'},{"n":"青","c":'00FFFF'},{"n":"蓝","c":'0000FF'},{"n":"紫罗兰","c":'EE82EE'},{"n":"深灰","c":'A9A9A9'},{"n":"亮橙","c":'FFA07A'},{"n":"橙","c":'FFA500'},{"n":"黄","c":'FFFF00'},{"n":"水绿","c":'00FF00'},{"n":"粉蓝","c":'AFEEEE'},{"n":"亮蓝","c":'ADD8E6'},{"n":"梅红","c":'DDA0DD'},{"n":"淡灰","c":'D3D3D3'},{"n":"淡紫红","c":'FFF0F5'},{"n":"古董白","c":'FAEBD7'},{"n":"淡黄","c":'FFFFE0'},{"n":"蜜白","c":'F0FFF0'},{"n":"天蓝","c":'F0FFFF'},{"n":"淡蓝","c":'F0F8FF'},{"n":"淡紫","c":'E6E6FA'},{"n":"白","c":'FFFFFF'}];for(var i=0;i<m.length;i++){l.append("<div title=\""+m[i].n+"\" fontcolor=\""+m[i].c+"\" class=\"EmotUnit2\" style=\"background-color :#"+m[i].c+";");if(i==39)l.append("border:solid 1px #A9A9A9;\"></div>\n");else l.append("\"></div>\n")}
k.html(l.toString()).attr("hasLoad","1");k.unbind("mousedown").bind("mousedown",function(a){var b=$(a.target);var c=b.attr("fontColor");if(!ymr(c)){if(Dcx.vov()=='IE'){var d=window.frames["txtMsgContent"];d.focus();DcxEditor.lhh=d.document;DcxEditor.xns=d;var e=DcxEditor.ffk();DcxEditor.qpz();DcxEditor.ejo(DcxEditor.drg(DcxEditor.lhh,e,"color","#"+c))}else{var d=DcxIM.inputIframe;d.focus();DcxEditor.lhh=d.contentWindow.document;DcxEditor.xns=d.contentWindow;var e=DcxEditor.ffk();DcxEditor.qpz();DcxEditor.ejo(DcxEditor.drg(DcxEditor.lhh,e,"color","#"+c))}
DcxIM.kpp.hide()}});if(Dcx.vov()=='IE')$("body",window.frames["txtMsgContent"].document).bind("click",function(){DcxIM.kpp.hide()});else $("body",DcxIM.inputIframe.contentWindow.document).bind("click",function(){DcxIM.kpp.hide()});$(document).mouseup(function(a){var b=$(a.target);if(!wsj(b,"divFontColorDlg",4))DcxIM.kpp.hide()})}};DcxIM.djk=function(e){DcxIM.yje=DcxIM.irl.find("#divFontSizeDlg");var w=DcxIM.yje.width();var h=DcxIM.yje.height();var f=xfx(e,"Left");var g=xfx(e,"Top");DcxIM.yje.show();f=(f-w+200)-240;g=(g-h-330);if($.browser.msie)f=f+130;DcxIM.yje.css({"left":f+"px","top":g+"px"});var j=DcxIM.yje.find(".sizelist");var k=[8,9,10,11,12,13,14,16,18,22,24,36];if(j.attr("hasLoad")!="1"){var l=new nzy();for(var i=0;i<k.length;i++){var m=35;if(k[i]<16)m=24;else if(k[i]<30)m=28;l.append("<div class=\"js-component-menuitem nui-menu-item\" style=\"line-height: "+m+"px;\" fontSize=\""+k[i]+"\">\n");l.append("<a href=\"javascript:void(0);\"   style=\"line-height: "+m+"px;\" class=\"nui-menu-item-link\"><span class=\"nui-menu-item-text\" style=\"font-size:"+k[i]+"px;\">"+k[i]+"</span></a>\n");l.append("</div>\n")}
j.html(l.toString()).attr("hasLoad","1");var n=j.children();n.unbind("mousedown").bind("mousedown",function(a){var b=$(this).attr("fontSize");if(!ymr(b)&&!isNaN(b)){b=parseInt(b,10);if(Dcx.vov()=='IE'){var c=window.frames["txtMsgContent"];c.focus();DcxEditor.lhh=c.document;DcxEditor.xns=c;var d=DcxEditor.ffk();DcxEditor.qpz();DcxEditor.ejo(DcxEditor.drg(DcxEditor.lhh,d,"fontSize",b+'px'))}else{var c=DcxIM.inputIframe;c.focus();DcxEditor.lhh=c.contentWindow.document;DcxEditor.xns=c.contentWindow;var d=DcxEditor.ffk();DcxEditor.qpz();DcxEditor.ejo(DcxEditor.drg(DcxEditor.lhh,d,"fontSize",b+'px'))}
DcxIM.yje.hide()}});if(Dcx.vov()=='IE')$("body",window.frames["txtMsgContent"].document).bind("click",function(){DcxIM.yje.hide()});else $("body",DcxIM.inputIframe.contentWindow.document).bind("click",function(){DcxIM.yje.hide()});$(document).mouseup(function(a){var b=$(a.target);if(!wsj(b,"divFontSizeDlg",4))DcxIM.yje.hide()})}};DcxIM.ppv=function(g){DcxIM.wua=DcxIM.irl.find("#divFaceDlg");var w=DcxIM.wua.width();var h=DcxIM.wua.height();var i=xfx(g,"Left");var j=xfx(g,"Top");DcxIM.wua.show();i=(i-w+200);j=(j-h-20);DcxIM.wua.css({"left":i+"px","top":j+"px"});var k=DcxIM.wua.find("#EmotionForm");if(k.attr("hasLoad")!="1"){var l=new nzy();for(var y=0;y<6;y++){for(var x=0;x<15;x++){l.append("<div r=\""+(y)+"\" c=\""+(x)+"\" class=\"EmotUnit\"></div>\n")}}
k.html(l.toString()).attr("hasLoad","1");k.unbind("mousedown").bind("mousedown",function(a){var b=$(a.target);if(b.hasClass("EmotUnit")){var c=parseInt(b.attr("r"),10);var d=parseInt(b.attr("c"),10);var e="<img src=\"/MyApp/WebIM/Files/Public/Images/Emotion/e"+(c*15+d+100)+".gif\" />";if(Dcx.vov()=='IE'){var f=window.frames["txtMsgContent"];f.focus();var o=f.document.selection.createRange();o.pasteHTML(e)}else{var f=DcxIM.inputIframe;f.contentWindow.document.execCommand('insertHTML',false,e)}
DcxIM.wua.hide()}});if(Dcx.vov()=='IE')$("body",window.frames["txtMsgContent"].document).bind("click",function(){DcxIM.wua.hide()});else $("body",DcxIM.inputIframe.contentWindow.document).bind("click",function(){DcxIM.wua.hide()});$(document).mouseup(function(a){var b=$(a.target);if(!wsj(b,"divFaceDlg",4))DcxIM.wua.hide()})}};DcxIM.ecs=function(a){var b=DcxIM.inputIframe;var c=b.contentWindow.document;var d=b.contentWindow;switch(a){case"B":{c.execCommand("Bold",false,null);d.focus();break}
case"I":{c.execCommand("Italic",false,null);d.focus();break}
case"U":{c.execCommand("Underline",false,null);d.focus();break}
case"A":{c.execCommand("CreateLink",false);d.focus();break}
case"jea":{break}
case"Empty":{break}}};Dcx.Utility.qsd=function(a){return a.innerHTML==undefined}
var DcxEditor={range:null,lhh:null,xns:null,ejo:function(a){if(range!=null){if(Dcx.vov()=="IE"){if(range.pasteHTML!=undefined){range.select();range.pasteHTML(a);return true}}else if(Dcx.vov()=="Firefox"||Dcx.vov()=="Chrome"){if(range.deleteContents!=undefined&&range.insertNode!=undefined){var b=DcxEditor.lhh.createElement("DIV");b.innerHTML=a;var c=[];for(var i=0;i<b.childNodes.length;i++){c.push(b.childNodes[i])}
range.deleteContents();for(var i in c){b.removeChild(c[i]);range.insertNode(c[i])}
return true}}}
return false},qpz:function(){if(Dcx.vov()=="IE"){range=DcxEditor.lhh.selection.createRange();if(range.parentElement().document!=DcxEditor.lhh){range=null}}else if(Dcx.vov()=="Firefox"||Dcx.vov()=="Chrome"){var a=DcxEditor.xns.geteya();if(a.rangeCount>0)range=a.getRangeAt(0);else range=null}},ffk:function(){if(Dcx.vov()=="IE"){var r=DcxEditor.lhh.selection.createRange();if(r.htmlText!=undefined)return r.htmlText;else return""}else if(Dcx.vov()=="Firefox"||Dcx.vov()=="Chrome"){var a=DcxEditor.xns.geteya();if(a.rangeCount>0){var r=null;r=a.getRangeAt(0);return Dcx.Utility.cyo(r.cloneContents().childNodes)}else{return""}}else{return""}},rlv:function(a,b,c,d){if(Dcx.Utility.qsd(b)){return b}else{b.style[c]=d;for(var i=0;i<b.childNodes.length;i++){var e=b.childNodes[i];if(!Dcx.Utility.qsd(b)){DcxEditor.rlv(a,e,c,d)}}
return b}},drg:function(a,b,c,d){var e=a.createElement("DIV");e.innerHTML=b;for(var i=0;i<e.childNodes.length;i++){var f=e.childNodes[i];if(Dcx.Utility.qsd(f)){var g=a.createElement("SPAN");g.style[c]=d;if(f.nodeValue!=undefined)g.innerHTML=f.nodeValue.replace(/\</ig,function(){return"&lt;"});else if(f.textContent!=undefined)g.innetHTML=f.textContent.replace(/\</ig,function(){return"&lt;"});e.replaceChild(g,f)}else{DcxEditor.rlv(a,f,c,d)}}
return e.innerHTML}};Dcx.Utility.cyo=function(a){var b=[];for(var i=0;i<a.length;i++){if(!Dcx.Utility.qsd(a[i])){b.push(a[i].innerHTML)}else{if(a[i].textContent)b.push(a[i].textContent.replace(/\</ig,function(){return"&lt;"}));else if(a[i].nodeValue)b.push(a[i].nodeValue.replace(/\</ig,function(){return"&lt;"}))}}
return b.join("")}
DcxIM.uoh=function(a){if(a==undefined)window.open('/MyApp/WebIM/IMessage.html','_blank');else window.open('/MyApp/WebIM/IMessage.html?userId='+DcxIM.cnj.UserId+"&roomId="+DcxIM.cnj.RoomId,'_blank')};DcxIM.gut=function(a,b){if(ymr(DcxIM.MainMsg.Friends)){DcxIM.MainMsg.Friends=new Array()}
if(ymr(DcxIM.MainMsg.LinkManGroup)){DcxIM.MainMsg.LinkManGroup=new Array()}
var c=a.Friends;var d=a.LinkMans;var f=a.LinkGroups;var g=DcxIM.MainMsg.Friends;if(!ymr(c)&&c.length>0){if(ymr(b)||isNaN(b))b=c[0];for(var i=0;i<c.length;i++){var h=c[i].UserId;var j=false;for(var k=0;k<g.length;k++){if(g[k].UserId==h){j=true;break}}
if(!j){g.pusth(c[i]);try{var l=new Array();l.push(c[i]);var m=DcxIM.riy(c[i].GroupId,l);var n=DcxIM.hri.attr("hasLoad",1).children(".dscroll-box").children(".dscroll-container").children("[groupId="+b+"]");var o=n.find("span[nodehid='maxListOnlineCount']").text().split("/");var p=parseInt(o[0],10);var q=parseInt(o[1],10);if(isNaN(p))p=0;if(isNaN(q))q=0;p=p+m.onlineCount;q=q+m.friendCount;n.find("span[nodehid='maxListOnlineCount']").text(p+"/"+q);n.prepend(m.strHtml)}catch(e){}}}
DcxIM.MainMsg.Friends=g}};DcxIM.sbr=function(c,d,e){if(ymr(d)||d.length<1){art.VLdialog.tips("您还未指定好友。",2);return false}
if(ymr(c)||isNaN(c)||c<1){c=0;if(!ymr(e)){art.VLdialog.tips("您还未选择分组。",2);return false}}
var f={"friends":d};var g="/WebServices/WebIM/WebIM.asmx/";if(c>0){f.groupId=c;g=g+"ncv"}else g=g+"AddTempFriends";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,data:JSON2.stringify(f),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){art.VLdialog.alert("保存好友失败。详情："+JSON2.stringify(a),function(){},668,"提示");return false},success:function(a){a=hmy(a);if(a==null){art.VLdialog.alert("保存好友失败！",function(){},8,"提示");return false}
if(a.reObj.IsOK==false){art.VLdialog.alert(a.reObj.ErrorMsg,function(){},8,"提示");return false}
DcxIM.ncv(c,d);DcxIM.ehc();if(!ymr(e)){e.close();art.VLdialog.tips("保存成功！",2)}}})}
DcxIM.vze=function(c,d){if(ymr(d)||d.length<1){art.VLdialog.tips("您还未指定好友。",2);return false}
if(ymr(c)){c=DcxIM.MainMsg.LinkManGroup;if(ymr(c)){DcxIM.xwh(DcxIM.vze,d)}
return false}
var e=new nzy();e.append("<span class=\"form-ctr\" isfcontain=\"1\">\n");e.append("<div id=\"d1897_MaxVersionId\" class=\"form-radio\" >\n");for(var i=0;i<c.length;i++){var f=c[i];e.append("<span class=\"form-radio-item\">\n");e.append("<input id=\"ddcx_1897_MaxVersionId_"+i+"\" name=\"ddcx_1897_MaxVersionId\" type=\"radio\" text=\""+f.GroupName+"\" value=\""+f.GroupId+"\">\n");e.append("<label onclick=\"javascript:event.cancelBubble=true;\" for=\"ddcx_1897_MaxVersionId_"+i+"\">"+f.GroupName+"</label>\n");e.append("</span>\n");if(i>0&&(i+1)%3==0)e.append("<span class=\"clearfix\"></span>\n")}
e.append("</div>\n");e.append("</span>\n");var g=art.VLdialog({title:"请选择分组",content:e.toString(),ok:function(){var a=$("#d1897_MaxVersionId").find("input:checked");if(a.length<1){art.VLdialog.tips("请选择分组。",2);return false}
var b=parseInt(a.attr("value"),10);if(!ymr(b)&&!isNaN(b)&&b>0)DcxIM.sbr(b,d,g);return false},cancelVal:'关闭',cancel:true})}
DcxIM.niv=function(){var b="590px";var c="520px";var d=art.VLdialog.open("/MyApp/WebIM/AddFriend.html",{id:'dlg_addfriend',title:"添加好友",fixed:true,width:b,height:c,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'确  认',title:"确  认",width:'250px',height:'20px',callback:function(){var a=null;try{a=this.iframe.contentWindow;if(ymr(a)){a=this.iframe}}catch(e){a=this.iframe}
if(ymr(a)){}
a.sbr();return false},focus:true},{name:'关  闭',width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;window.location.reload();return true},focus:false}]},true)}
DcxIM.hfe=function(){var e="/WebServices/WebIM/WebIM.asmx/GetMyRooms";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取群列表失败。详情："+b);return false},success:function(a){var a=hmy(a);DcxIM.uplContainer.attr("hasLoad",1);if(ymr(a)){return}
var b=new nzy();b.append("<div class=\"list_content\">\n");b.append("<ul class=\"list_content_li\" nodehid=\"ulRoomList\" style=\"margin-top: 12px;\">\n");for(var k=0;k<a.length;k++){var c=a[k];if(c.RoomId==undefined)c.RoomId=0;a[k].UserName=a[k].RoomName;a[k].RoomUserName=a[k].RoomName;b.append("<li class=\"clearfix\" RoomId=\""+c.RoomId+"\" userId=\""+c.RoomId+"\" onclick=\"javscript:DcxIM.ovd(this);\" >\n");b.append("<div class=\"webim_list_head webim_head_30\">\n");b.append("<span class=\"head_pic\">\n");var d=DcxIM.bby;b.append("<img class=\"webimcexr_item_img\" src=\""+d+"\" width=\"30\" height=\"30\" title=\""+c.RoomName+"\" />\n");b.append("</span>\n");b.append("<span class=\"W_chat_stat ");b.append("W_chat_stat_online\"></span>\n");b.append("<span class=\"WBIM_icon_dev WBIM_icon_#{resource}\"></span>\n");b.append("<span class=\"WBIM_icon_new\"></span>\n");b.append("</div>\n");b.append("<div class=\"webim_list_name\">\n");b.append("    <span class=\"user_name\">"+c.RoomName+"("+c.LgrCount+")</span>&nbsp; \n");b.append("</div>\n");b.append("</li>\n")}
if(a.length<1){b.append("<li style=\"display: none;\"></li>\n");b.append("<li style=\"display: none;\"></li>\n")}
b.append("</ul>\n");b.append("</div>\n");DcxIM.uplContainer.find(".dscroll-container").prepend(b.toString());DcxIM.Rooms=a}})};DcxIM.tkp=function(a,b){var c=DcxIM.fba(a);var d=DcxIM.zhg(a)};DcxIM.fba=function(a){if(ymr(Dcx.Rooms))return null;for(var k=0;k<Dcx.Rooms.length;k++){var b=Dcx.Rooms[k];if(b.RoomId==a)return b}};DcxIM.uhl=function(a){if(ymr(DcxIM.qhy[a])){DcxIM.gmx(a);return}
if(ymr(DcxIM.uplLgrList)||DcxIM.uplLgrList.length<1)DcxIM.uplLgrList=DcxIM.vit.find("#divRoomLgrList");var b=DcxIM.qhy[a];var c=new nzy();for(var k=0;k<b.length;k++){var d=b[k];if(d.RoomId==undefined)d.RoomId=0;var e=d.UserId;var f=d.UserName;var a=d.RoomId;var g=d.IsOnLine;c.append("<li title=\"和 "+f+" 单独聊天\" style=\"border-width:0px;\" class=\"wbim_active\"  userId=\""+e+"\" roomId=\""+a+"\" onclick=\"javascript:DcxIM.ovd(null,4,"+e+",'"+f+"',0,null);\">\n");c.append("<div class=\"list_head_state\">\n");c.append("<span  nodehid=\"_statusNode\" class=\"W_chat_stat ");if(g){c.append("W_chat_stat_online\"></span>\n")}else c.append("W_chat_stat_offline\"></span>\n");c.append("</div>\n");c.append("<div class=\"wbimcexrname\" nodehid=\"_nickNode\">\n");c.append(""+f+"<span class=\"wbim_icon_vf\"></span></div>\n");c.append("<div class=\"WBIM_icon_wbclose\"  userId=\""+e+"\" hidefocus=\"true\"  nodehid=\"_closeBtn\"></div>\n");c.append("</li>\n")}
if(b.length<1){c.append("<li style=\"display: none;\"></li>\n");c.append("<li style=\"display: none;\"></li>\n");var w=DcxIM.vit.width();if(DcxIM.uplLgrList.css("display")!="none"){w=w-104;DcxIM.uplLgrList.hide()}
DcxIM.vit.width(w)}else{var w=DcxIM.vit.width();if(DcxIM.uplLgrList.css("display")=="none"){w=w+104}
DcxIM.vit.width(w);DcxIM.uplLgrList.show().find("ul.wbim_chat_friend_list").show().html(c.toString())}};DcxIM.gmx=function(c){var d="/WebServices/WebIM/WebIM.asmx/gmx";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:d,data:"{roomId:"+c+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取群列表失败。详情："+b);return false},success:function(a){var a=hmy(a);if(ymr(a)){a=new Array()}
DcxIM.qhy[c]=a;DcxIM.uhl(c)}})};DcxIM.ssi=function(b){var c="590px";var d="520px";var f="创建讨论组";if(b>0)f="组成员管理";var g=art.VLdialog.open("/MyApp/WebIM/Room.html?",{id:'dlg_addfriend',title:f,fixed:true,width:c,height:d,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'确  认',title:"确  认",width:'250px',height:'20px',callback:function(){var a=null;try{a=this.iframe.contentWindow;if(ymr(a)){alert("这是IE");a=this.iframe}}catch(e){alert("这是IE");a=this.iframe}
if(ymr(a)){alert("这是IE")}
a.IMRoom.jps();return false},focus:true},{name:'关  闭',width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;window.location.reload();return true},focus:false}]},true)}
$(document).ready(function(){DcxIM.beg()});$(window).load(function(){});function ext(){DcxIM.vit=DcxIM.irl.find("#chatBox");DcxIM.vit.find("#talkingContainer").dcxScrollbar("vertical",300,"ubs",1.05,"auto","yes","no",15,true,true)}
$.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}
var r=parseFloat(jQuery.css(this.elem,this.prop));return typeof r=='undefined'?0:r}
function toe(a,b){}