eval(function(B,D,A,G,E,F){function C(A){return A<62?String.fromCharCode(A+=A<26?65:A<52?71:-4):A<63?'_':A<64?'$':C(A>>6)+C(A&63)}while(A>0)E[C(G--)]=D[--A];return B.replace(/[\w$]+/g,function(A){return E[A]==F[A]?A:E[A]})}('(z(){O(v.0)n;U CX=z(N){n CS CR("DD","n Do.prototype.toString.D3(DD)==\'[Cr "+N+"]\'")},Bl=CX("Array"),Bs=CX("Do");v.0={version:"EB.I",pubDate:"2009-03-02",k:z(B,M,N){O(N)0.k(B,N);O(B&&M&&Bs(M))Z(U A BZ M)B[A]=M[A];n B},B1:[]};U Cw=["CF","f"],BK={},H;BX(H=Cw.BB())0[H]=CK("I,z(){BK."+H+"?BK."+H+".g(9):(BK."+H+"=[9])}");U BE=!+"\\v1",BT=2.compatMode=="CSS1Compat",BD=BE&&/MSIE (\\C$)\\./.Ce(navigator.userAgent)&&6(RegExp.$1)=I;C--)1(A[C],B,N);n}Bq{A.h[B]=N}Bz(M){}},5=I,4,DB=I,Cq=z(E,M,D,N){O(!E)n;O(Bl(E)){U B,A=[],C={Bm:[m.Dk,"ok"],Di:[m.Dp,"cancel"]};BX(E.s)(B=E.BB())&&A[A.g(Cq.k(d,C[B]||B))-J]||A.pop();n A}N=N||"ymPrompt_btn_"+DB++;D=D==Ca?"Ca":!!D;n{Q:N,Da:""}},DZ=z(N){O(!N)n 4="";O(!Bl(N))N=[N];O(!N.s)n 4="";4=N.CG();U M=[];BX(N.s)M.g(N.BB().Da);n M.DF("&Dj;&Dj;")},Cb={B4:"\\u5185\\u5bb9",l:300,u:185,BO:"\\u6807\\u9898",Cd:z(){},Dw:"#DX",Cp:I.J,r:i,BV:"",BG:d,Dd:a,B0:a,D9:i,CU:a,CL:a,DQ:"CQ",C_:I.ED,closeBtn:a,B$:i,BQ:i,Bo:{Ch:I.L,Cj:50},closeTxt:"\\DO\\Ds",Dk:" \\u786e \\u5b9a ",Dp:" \\u53d6 \\u6d88 ",DY:"P-content",minBtn:i,minTxt:"\\B7\\Dv\\B6",Dx:i,maxTxt:"\\B7\\De\\B6",DG:i,C0:i},m={};(z(){U o=2.Bv,CB=9.CB;O(!o||typeof o!="Cr")n 3("load",CB,v);O(BE&&2.Dr!="DV")n 3("readystatechange",z(){2.Dr=="DV"&&CB()});o=BT?2.documentElement:o;U CH=2.C8("CH").s;O(!BE&&CH)n;U Bk=z(){n m.B0&&Br?[I,I]:[o.DJ,o.D5]},B_=z(){U N=Bk();0.k(BC,{C4:6(p.h.c)-N[I],C5:6(p.h.Y)-N[J]})},CO="BF:BM;Y:I;c:I;w:b;DM-align:center",T=2.createElement("T");T.8=["",BD?(""):"","",BD?"":"","","I","J","DI","","","","","",BE?"":""].DF("");2.Bv.appendChild(T);U BL=N("BL"),p=N("P-v"),Be=N("P-Df"),BS,CC=N("P-CV"),BA=CC._._,CE=BA._,Ba=CE.CZ,y=N("P-B9")._._._,Bu=N("P-Dh"),Dc=Bu._._,DK=N("P-CY"),Bj=[BL];BD&&Bj.g(N("DA"));U q=Ba.childNodes,BC={},7="Bh",Bw=[I,I],CA=z(){U N=Bk();Bw=[6(p.h.c)-N[I],6(p.h.Y)-N[J]]},CP=z(){CA();7="V";q[J]._.8="K";q[J].BN="DC";BY(o.Bx,o.Bg,[I,I])},Cm=z(){CA();7="W";q[I]._.8="K";q[I].BN="DC";BY(I,Bn(CC),Bw)},Bp=z(N){!N&&7=="W"&&CA();7="Bh";q[I]._.8="I";q[J]._.8="J";q[I].BN="DE";q[J].BN="Dt";BY.k(this,N?[]:[I,I,Bw])},V,W;3("Ck",W=z(){7!="Bh"?Bp():Cm()},q[I]);3("Ck",V=z(){7!="Bh"?Bp():CP()},q[J]);3("dblclick",z(N){m.Dx&&(N.Cs||N.Ct).DU!=Ba&&V()},BA);3("Ck",z(){0.Cc("CW")},q[K]);U CD=z(){n[e.V(o.scrollWidth,o.Bx),e.V(o.scrollHeight,o.Bg)]},Cv=CD(),t=BA.C6&&BA,BR=z(N){!CH&&1(p,N==J&&BT?{BJ:"",x:""}:{BJ:"Dn(x="+N*BH+")",x:N})},CI=z(A){U M=BC.D0+A.C1,C=BC.D1+A.Cz;O(!m.D9){U D=Bk(),N=D[I],B=D[J];M=e.W(e.V(M,N),o.Bx-p.Cu+N);C=e.W(e.V(C,B),o.Bg-p.Bt+B)}Cy O(m.CL&&""+Cv!=""+CD())B8(a);1(BS,{c:M+"R",Y:C+"R"})},Bb=z(){BR(J);$("C9",CI,t);$("DR",Bb,t);B_();m.r&&1(BU().CZ,"w","b");t&&($("DH",Bb,t),t.releaseCapture())};3("mousedown",z(M){O((M.Cs||M.Ct).DU==Ba)n i;BR(m.C_);0.k(BC,{D0:6(p.h.c)-M.C1,D1:6(p.h.Y)-M.Cz});3("C9",CI,t);3("DR",Bb,t);O(m.r){U A={w:""},N=BU();BT&&BD&&0.k(A,{l:N.Cu,u:N.Bt});1(N.CZ,A)}t&&(3("DH",Bb,t),t.C6())},BA);U DS=z(){1(p,{c:BC.C4+o.DJ+"R",Y:BC.C5+o.D5+"R"})},D2=z(A){U M=A.DT;O(M==27)B2();O(4){U C=4.s,B;2.Dy&&2.Dy.Q!=4[5].Q&&(B=a);O(M==C3||M==39)B&&(5=-J),N(4[++5==C?(--5):5].Q).Cf();O(M==37)B&&(5=C),N(4[--5110&&M<123)||M==C3||M==C7)},Bc=z(A,M){A=A||event;O(!M&&/DP|select|textarea/Bd.Ce((A.Cs||A.Ct).tagName))n a;Bq{A.returnValue=i;A.DT=I}Bz(N){A.Du&&A.Du()}n i};BL.DW=Bc;U B8=z(N){1(Bj,"w","b");U A=CD(),M=z(){1(Bj,{l:A[I]+"R",u:A[J]+"R",w:""})};BE?N===a?M():setTimeout(M,I):M();7=="W"?Cm():7=="V"?CP():BY()},B5=z(N){O(!m.CL)n;(N===i?$:3)("resize",B8,v);O(N===i)n 1(Bj,"w","b");1(BL,{CT:m.Dw,BJ:"Dn(x="+m.Cp*BH+")",x:m.Cp});B8(a)},Dz=z(G){G=Bl(G)&&G.s==K?(G[I]+"+{K},{L}+"+G[J]):(CN[G]||CN["CQ"]);U Cx=[o.Bx-p.Cu,o.Bg-p.Bt].CG(Bk()),Ci=G.replace(/\\{(\\C$)\\}/D$,z(M,N){n Cx[N]}).split(",");n[CK(Ci[I]),CK(Ci[J])]},CN={CQ:"{I}/K+{K},{J}/K+{L}",EA:"{K},{J}/K+{L}",DI:"{I}+{K},{J}/K+{L}",H:"{I}/K+{K},{L}",D_:"{I}/K,{J}+{L}",lt:"{K},{L}",lb:"{K},{J}+{L}",rb:"{I}+{K},{J}+{L}",rt:"{I}+{K},{L}"},BY=z(N,M,A){O(p.h.w=="b")n;M=6(M)||m.u;N=6(N)||m.l;1(BS,{l:N+"R",u:M+"R",c:I,Y:I});A=Dz(A||m.DQ);1(BS,{Y:A[J]+"R",c:A[I]+"R"});B_();1(y,"u",M-Bn(CC)-Bn(Bu)-Bn(DK)+"R");BT&&BD&&m.r&&1(BU(),{u:y.Bg})},By=[],BP=[],Co=z(A){U CM=A===i?$:3;CM("scroll",m.B0&&!Br?DS:B_,v);1(BS,"BF",m.B0&&Br?"fixed":"BM");CM("keydown",D2);O(A===i){1(Be,"w","b");U C=z(){1(p,"w","b");1(By,"CJ","visible");By=[];BP.BB();O(BP.s)0.f.k(d,BP[I].CG(a))},M=z(){U A=J,M=z(){A=e.V(A-m.Bo.Ch,I);BR(A);O(A==I){B5(i);C();D4(N)}};M();U N=D6(M,m.Bo.Cj)};m.BQ?M():C();n}Z(U D=2.C8("Cr"),F=D.s-J;F>-J;F--)D[F].h.CJ!="D8"&&By.g(D[F])&&(D[F].h.CJ="D8");1([CE,Ba],"w",(m.CU?"":"b"));BA.BN="P-DL"+(m.CU?"":" P-ttc");CE.8=m.BO;Z(U F=I,B=["W","V","CW"];F"+m.B4+""):"";(z(M,A){Z(U B BZ A){Bq{M[B]=A[B]}Bz(N){}}})(y._,m.r);y.BN="P-Bv "+m.BV;1(Bu,"w",((Dc.8=DZ(Cq(m.BG)))?"":"b"));!m.BQ&&m.B$&&1(Be,"w","");1(p,"w","");Bp(a);BR(m.BQ?I:J);m.BQ&&(z(){U A=I,N=z(){A=e.W(A+m.Bo.Ch,J);BR(A);O(A==J){D4(M);m.B$&&1(Be,"w","")}};N();U M=D6(N,m.Bo.Cj)})();4&&N(4[5=I].Q).Cf();p.onselectstart=m.DG?d:Bc;p.DW=m.C0?d:Bc},DN=z(){BS=[p].CG(m.B$?Be:"");B5();Co()},B2=z(){!m.BQ&&B5(i);Co(i)},BU=z(){n m.r?y._:d};0.k(0,{CW:B2,V:V,W:W,Bh:Bp,BU:BU,f:z(M,N,C){O(!C&&BP.g([M,N])&&BP.s>J)n;U A=[].slice.D3(M,I),B={},D=-J;O(!Bs(A[I])){Z(U E BZ Cb)O(A[++D])B[E]=A[D]}Cy B=A[I];0.k(m,0.k({},B,N),0.CF());Z(E BZ m)m[E]=m[E]!=d?m[E]:0.Cn[E];DN()},Cc:z(N,B,A){O(B==Ca?m.Dd:B)B2();Bq{(m.Cd)(N)}Bz(M){Dl(M.B4)}},resizeWin:BY,CF:z(N){n 0.Cn=0.k({},N,0.k({},0.Cn,Cb))},getButtons:z(){U A=4||[],M,B=[];BX(M=A.BB())B.g(N(M.Q));n B}});0.CF();U H;Z(U Bd BZ BK)BX(H=BK[Bd].BB())0[Bd].k(d,H);3("unload",z(){BX(0.B1.s)$.k(d,0.B1.BB())},v)})()})();0.k(0,{Dl:z(){0.f(9,{BV:"ymPrompt_alert",BG:["Bm"]})},succeedInfo:z(){0.f(9,{BV:"ymPrompt_succeed",BG:["Bm"]})},errorInfo:z(){0.f(9,{BV:"ymPrompt_error",BG:["Bm"]})},confirmInfo:z(){0.f(9,{BV:"ymPrompt_confirm",BG:["Bm","Di"]})},win:z(){0.f(9)}})','G|f|t|0|1|2|3|_|$|if|ym|id|px|fn|div|var|max|min|obj|top|for|true|none|left|null|Math|show|push|style|false|class|apply|width|curCfg|return|rootEl|ym_win|ym_ico|iframe|length|bindEl|height|window|display|opacity|ym_body|function|ymPrompt|setStyle|document|addEvent|btnCache|btnIndex|parseInt|cur_state|innerHTML|arguments|firstChild|detachEvent|ym_head|shift|dragVar|IE6|isIE|position|btn|100|env|filter|_initFn|maskLevel|absolute|className|title|cacheWin|useSlide|filterWin|ym_wins|isCompat|getPage|icoCls|strong|while|setWinSize|in|ym_hTool|uEvent|keyEvent|i|ym_shadow|z|clientHeight|normal|index|maskEl|getScrollPos|isArray|OK|$height|slideCfg|doNormal|try|useFixed|isObj|offsetHeight|ym_btn|body|cur_cord|clientWidth|_obj|catch|fixPosition|eventList|destroy|alpha|message|maskVisible|u5316|u6700|resizeMask|ml|saveWinInfo|showShadow|cal_cord|callee|ym_headbox|getWinSize|ym_hText|setDefaultCfg|concat|frameset|mEvent|visibility|eval|showMask|F|posMap|maskStyle|doMax|c|Function|new|background|titleBar|tl|close|objType|bl|nextSibling|undefined|dftCfg|doHandler|handler|test|focus|attachEvent|increment|arr|interval|click|src|doMin|cfg|winVisible|maskAlpha|mkBtn|object|srcElement|target|offsetWidth|winSize|initFn|pos|else|clientY|allowRightMenu|clientX|header|9|_offX|_offY|setCapture|13|getElementsByTagName|mousemove|winAlpha|d|maskIframe|seed|ymPrompt_normal|o|ymPrompt_min|join|allowSelect|losecapture|r|scrollLeft|ym_bottom|tc|text|init|u5173|input|winPos|mouseup|scrollEvent|keyCode|parentNode|complete|oncontextmenu|000|msgCls|joinBtn|html|cursor|ym_btnContent|autoClose|u5927|shadow|on|btnl|CANCEL|nbsp|okTxt|alert|10000|Alpha|Object|cancelTxt|mr|readyState|u95ed|ymPrompt_max|preventDefault|u5c0f|maskAlphaColor|maxBtn|activeElement|getPos|offX|offY|keydownEvent|call|clearInterval|scrollTop|setInterval|javascript|hidden|dragOut|b|g|l|4|7|8'.split('|'),255,259,{},{})) function alert(message,showMask,handler){ if(!showMask) showMask=true; if(!message) message=''; ymPrompt.alert({message:message,showMask:showMask,handler:handler}); } function alert(message,handler){ ymPrompt.alert({message:message,showMask:true,handler:handler}); } function success(message,showMask,handler){ if(!showMask) showMask=true; if(!message) message='操作成功!'; ymPrompt.succeedInfo({message:message,showMask:showMask,handler:handler}) ; } function error(message,showMask,handler){ if(!showMask) showMask=true; if(!message) message='操作失败!'; ymPrompt.errorInfo({message:message,showMask:showMask,handler:handler}) ; } function confirm(message,handler,cancel){ ymPrompt.confirmInfo({message:message,handler:function(tp){ if(tp=='ok'){ handler(); }else{ cancel(); } } }); } function rightDownMessage(title,message,showMask,icoCls,userSlide,handler){ if(!showMask) showMask=false; if(!icoCls) icoCls=''; if(!userSlide) userSlide=true; ///ymPrompt.alert({message:message,title:title,winPos:'rb',showMask:showMask,icoCls:icoCls,useSlide:userSlide}); ymPrompt.alert({message:message,title:title,winPos:'rb',showMask:false,icoCls:icoCls,useSlide:true,slideCfg:{increment:0.1,interval:50},fixPosition:true,handler:handler}); } // iframe模式展开消息,不会影响其他 alert 执行,系统消息专用 function rightDownMessageOnFrame(title,message,showMask,icoCls,userSlide,handler,hasMoreBtn){ if(!showMask) showMask=false; if(!icoCls) icoCls=''; if(!userSlide) userSlide=true; var btnOBJ; if(hasMoreBtn){ btnOBJ = [['确 定','ok'],['更 多','more']]; } else{ btnOBJ = [['确 定','ok']]; } ymPrompt.win({ iframe:true, message:message, title:title, winPos:'rb', showMask:false, useSlide:true, icoCls:icoCls, slideCfg:{increment:0.1,interval:50}, fixPosition:true, btn:btnOBJ, handler:handler }); } // tab support String.prototype.trim = function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); } function delBlank(str) { // return str.replace(/(^\s*)|(\s*$)/g, ""); } var tabView; function panelLoadingInit(title,close,modal){ YAHOO.namespace("example.container"); if(!YAHOO.example.container.wait){ YAHOO.example.container.wait = new YAHOO.widget.Panel("wait", { width:"240px", fixedcenter:true, close:close, draggable:false, zindex:4, modal:modal, visible:false } ); } if(title) YAHOO.example.container.wait.setHeader(title); else YAHOO.example.container.wait.setHeader("Loading, please wait..."); YAHOO.example.container.wait.setBody(''); YAHOO.example.container.wait.render(document.body); } function showPanelLoading(title,close,modal){ if(close==null) close=false; if(modal==null) modal=true; panelLoadingInit(title,close,modal); YAHOO.example.container.wait.show(); } function hidePanelLoading(){ YAHOO.example.container.wait.hide(); } // remove active tab function removeTab () { var activeId = getactiveId(); tabView.removeTab(tabView.get('activeTab')); var ts = tabView.get('tabs'); if(activeId!='')tabView.set('activeTab',getTab(activeId)); if (getTab(activeId)==null) { tabView.set('activeTab',ts[0]); } } function getactiveId(){ var label = tabView.get('activeTab').get('label'); if(label.indexOf('value')>-1) label= label.substring(label.indexOf('value="')+7,label.indexOf('" title')); else label=''; return label; } function activeTab(tabId) { var t = getTab(tabId) if(t!=null) tabView.set('activeTab',t); } function addResponseTab(id,label,url,property){ //add by zzl closeTab(id); var activeid; if(tabView.get('activeTab')) activeid= tabView.get('activeTab').get('id'); var t = new YAHOO.widget.Tab({id:id, label: label+'  ',href:"javascript:void(0)", dataSrc: "" ,loadMethod:"",cacheData:true,content:'
'}); tabView.addTab( t ); tabView.set('activeTab',t); var success = property.success; var failure = property.failure; var form = property.form; var postData = property.postData; if(!success){ success = function(o){ closeTab(id); tabView.addTab(new YAHOO.widget.Tab({ id:id, loadMethod:"post", label:label+'  ', content:o.responseText, active:true })); } } if(!failure){ failure = function(o){} } if(form) YAHOO.util.Connect.setForm(form); if(postData) YAHOO.util.Connect.asyncRequest('POST', url, {success:success,failure:failure},postData); else YAHOO.util.Connect.asyncRequest('POST', url, {success:success,failure:failure}); } function addTab(id,text,url,fixed,contentChange) { var activeid; if(tabView.get('activeTab')) activeid= tabView.get('activeTab').get('id'); if(!fixed) text += '  '; var t = null; var ts = tabView.get('tabs'); for(var i=0;i< ts.length;i++){ if(ts[i].get('id')==id){ t=ts[i]; t.removeListener('contentChange'); if(contentChange)t.addListener('contentChange',contentChange); t.set('label',text); t.set('dataSrc',url); refreshTab(t,url); break; } } if(!t){ t = new YAHOO.widget.Tab({id:id, label: text,href:"javascript:void(0)", dataSrc: url ,loadMethod:"post",cacheData:true,content:'
'}) if(contentChange){ t.addListener('contentChange',contentChange); } tabView.addTab( t ); } tabView.set('activeTab',t); } function getTab(tabId){ var ts = tabView.get('tabs'); for(var i=0;i< ts.length;i++){ if(ts[i].get('id')==tabId)return ts[i]; } return null; } function getTabForm(tab){ var c = YAHOO.util.Dom.getChildren(tab.get('contentEl')); for(var i=0;i0){ return eles[0]; } } //get element in node function getElementInNodes(node, targetId){ var eles = YAHOO.util.Dom.getElementsBy(function(e) { if(e.id==targetId) return true;},'*',node); return eles; } // get values of selected checkboxes (with class='cbx') in the active tab function getIds(classNameParam){ var els = YAHOO.util.Dom.getElementsByClassName(!classNameParam?'cbx':classNameParam,'input',tabView.get('activeTab').get('contentEl')); var ids = ''; for(var i=0;i0) ids+=","; ids += els[i].value; } } return ids; } function getIdsbyClassName(cbxName){ var els = YAHOO.util.Dom.getElementsByClassName(cbxName,'input',tabView.get('activeTab').get('contentEl')); var ids = ''; for(var i=0;i0) ids+=","; ids += els[i].value; } } return ids; } // set all checkboxes in the active tab checked or unchecked function setCbxStatus(checked){ var els = YAHOO.util.Dom.getElementsByClassName('cbx','input',tabView.get('activeTab').get('contentEl')); for(var i=0;i< els.length;i++){ if(!els[i].disabled){ els[i].checked=checked; } } } // set check against election function setCbxAntiSelection(){ var els = YAHOO.util.Dom.getElementsByClassName('cbx','input',tabView.get('activeTab').get('contentEl')); for(var i=0;i< els.length;i++){ els[i].checked = !els[i].checked; } } // refresh tab function refreshTab(tab,url){ YAHOO.util.Connect.resetFormState(); var rs = function(o){ tab.set('content',o.responseText); } var rf = function(o){ tab.set('content','载入数据失败'); } if(!url){ var fm = getTabForm(tab); if(fm){ if(fm.action && fm.action!='') url = fm.action; YAHOO.util.Connect.setForm(fm); } } if(url){ var content = tab.get('contentEl'); var els = YAHOO.util.Dom.getElementsByClassName('data','table',content); if(els!=''){ var load_div = YAHOO.util.Dom.get('div-loading'); if(load_div==null){ var load = document.createElement("div"); load.id='div-loading'; load.innerHTML = "
"; try { content.insertBefore(load,els[0]); } catch (e){} } }else{ try{tab.set('content','
');}catch(e){} } YAHOO.util.Connect.asyncRequest('POST', url, {success:rs,failure:rf}); } } // refresh all tabs function refreshTabs(){ var ts = tabView.get('tabs'); for(var i=0;i< ts.length;i++){ refreshTab(ts[i]); } } //刷新除指定tabid之外的所有tab function refreshOtherTabs(tabId){ var ts = tabView.get('tabs'); for(var i=0;i< ts.length;i++){ if (ts[i].get('id')!=tabId ) { refreshTab(ts[i]); } } } function closeTab(tabId,activetabId){ var ts = tabView.get('tabs'); for(var i=0;i0){ for(var j=0;j< eles.length;j++){ eles[j].removeNode(true); } } } tabView.removeTab(ts[i]) }; } if(activetabId && getTab(activetabId)!=null) { tabView.set('activeTab',getTab(activetabId)); } else { var ts = tabView.get('tabs'); } if (YAHOO.util.Dom.get('isStating')) { YAHOO.util.Dom.get('isStating').value=0; } } function closeUnActiveTabs(tabId){ if (tabId == null || tabId == '') { tabId = tabView.get('activeTab').get('id'); } if(tabId && getTab(tabId)!=null) { tabView.set('activeTab',getTab(tabId)); } function removeManyTabs(tabId) { var ts = tabView.get('tabs'); for (var i=0;i 1) { removeManyTabs(tabId) }else { return; } } removeManyTabs(tabId); } function closeSomeUnActiveTabs(tabId){ if (tabId == null || tabId == '') { tabId = tabView.get('activeTab').get('id'); } if(tabId && getTab(tabId)!=null) { tabView.set('activeTab',getTab(tabId)); } function removeManyTabs(tabId) { var ts = tabView.get('tabs'); for (var i=0;i< ts.length;i++) { if (ts[i].get('id') != tabId && ts[i].get('id') != 'deal-add' && ts[i].get('id') != 'report-input') { if (ts[i].get('id') != 'downloadUrl-input' && ts[i].get('id') != 'sendPortalInfo-add' && ts[i].get('id') != 'issue-input') { closeTab(ts[i].get('id')); } } } ts = tabView.get('tabs'); var isContinue = false; for (var i=0;i< ts.length;i++) { if (ts[i].get('id') != tabId && ts[i].get('id') != 'deal-add' && ts[i].get('id') != 'report-input') { if (ts[i].get('id') != 'downloadUrl-input' && ts[i].get('id') != 'sendPortalInfo-add' && ts[i].get('id') != 'issue-input') { isContinue = true; break; } } } if (isContinue) { removeManyTabs(tabId) }else { return; } } removeManyTabs(tabId); } // remove all tabs function removeTabs(){ while(true){ var tab0 = tabView.getTab(0); if(tab0)tabView.removeTab(tab0); else break; } } function fetchSimplePage(pn,containerId){ var c = YAHOO.util.Dom.getChildren(YAHOO.util.Dom.get(containerId)); var fm = null; for(var i=0;iparseInt(fm['pageCount'].value) || parseInt(n)<1 || n!=parseInt(n)){ alert('请输入正确的页码'); return; } var rs = function(o){ YAHOO.util.Dom.get(containerId).innerHTML=o.responseText; } var url = null; if(fm.action && fm.action!='') url = fm.action; YAHOO.util.Connect.setForm(fm); if(url){ YAHOO.util.Connect.asyncRequest('POST', url, {success:rs}); } } // page support function fetchPage(pn){ var t = tabView.get('activeTab'); var fm = getTabForm(t); var oldPageNo = fm['pageNo'].value; if(parseInt(pn)) fm['pageNo'].value = pn; else fm['pageNo'].value = YAHOO.util.Dom.get(pn).value; var n = fm['pageNo'].value; if(!n || n==''){ fm['pageNo'].value=oldPageNo; alert('请指定页码'); return; } if(!parseInt(n) || parseInt(n)>parseInt(fm['pageCount'].value) || parseInt(n)<1 || n!=parseInt(n)){ fm['pageNo'].value=oldPageNo; alert('请输入正确的页码'); return; } refreshTab(t); } // cache-disable support function newUrl(url){ if(url.indexOf('?')<0) url += '?'; else url += '&'; url += '___='+Math.random(); return url; } function dateFormat(date,allowNull){ if(allowNull){ if(date.length==0) return true; }else{ if(date.length==0){ alert("时间不能为空!"); return false; } } //modified by songjw 日期格式中月日时分都必须是两位正数 var datePat = /^(\d{4})(\/|-)(\d{2})(\/|-)(\d{2})$/;//日期格式为yyyy-MM-dd var re = /^(\d{4})(\/|-)(\d{2})(\/|-)(\d{2}) (\d{2}):(\d{2})$/;//日期格式为"yyyy-mm-dd hh:mm var matchArray; if(date.length<=10) matchArray = date.match(datePat); else matchArray = date.match(re); if (matchArray == null) { alert("日期格式应为:yyyy-mm-dd或yyyy-mm-dd hh:mm"); return false; } year = matchArray[1]; month = matchArray[3]; day = matchArray[5]; if (month < 1 || month > 12) { alert("月份应在1-12之间。"); return false; } if (day < 1 || day > 31) { alert("日期应在1-31之间。"); return false; } if ((month==4 || month==6 || month==9 || month==11) && day==31) { alert(month+"月没有31天。") return false; } if (month == 2) { var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)); if (day > 29 || (day==29 && !isleap)) { alert(year + "年2月没有" + day + "天。"); return false; } } if(date.length>10){ minute = matchArray[6]; second =matchArray[7]; if(minute>23||second>59){ alert("填写的分秒有错误"); return false; } } return true; } //判断日期,如果日期不符合规定,则把焦点设置在上面 function dateFormatobject(obj,allowNull){ var date = obj.value; if(allowNull){ if(date.length==0) return true; }else{ if(date.length==0){ alert("时间不能为空!",function() { obj.focus(); }); return false; } } //modified by songjw 日期格式中月日时分都必须是两位正数 var datePat = /^(\d{4})(\/|-)(\d{2})(\/|-)(\d{2})$/;//日期格式为yyyy-MM-dd var re = /^(\d{4})(\/|-)(\d{2})(\/|-)(\d{2}) (\d{2}):(\d{2})$/;//日期格式为"yyyy-mm-dd hh:mm var matchArray; if(date.length<=10) matchArray = date.match(datePat); else matchArray = date.match(re); if (matchArray == null) { alert("日期格式应为:yyyy-mm-dd或yyyy-mm-dd hh:mm",function() { obj.focus(); }); return false; } year = matchArray[1]; month = matchArray[3]; day = matchArray[5]; if (month < 1 || month > 12) { alert("月份应在1-12之间。",function() { obj.focus(); }); return false; } if (day < 1 || day > 31) { alert("日期应在1-31之间。",function() { obj.focus(); }); return false; } if ((month==4 || month==6 || month==9 || month==11) && day==31) { alert(month+"月没有31天。",function() { obj.focus(); }); return false; } if (month == 2) { var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)); if (day > 29 || (day==29 && !isleap)) { alert(year + "年2月没有" + day + "天。",function() { obj.focus(); }); return false; } } if(date.length>10){ minute = matchArray[6]; second =matchArray[7]; if(minute>23||second>59){ alert("填写的分秒有错误",function() { obj.focus(); }); return false; } } return true; } function dateBetween(startdate,enddate,allowNull){//判断起始日期小于结束日期 if(!dateFormat(startdate,allowNull)||!dateFormat(enddate,allowNull)) return null; else if(startdate.length>0&&enddate.length>0){ if(startdate.length<=10) startdate = startdate+' 00:00' if(enddate.length<=10) enddate = enddate+' 00:00' var s1 = startdate.split(" "); var s2 = enddate.split(" "); var date1 = s1[0].split("-");//起始日期的年月日 var date2 = s2[0].split("-");//结束日期的年月日 var time1 = s1[1].split(":");//起始日期的分秒 var time2 = s2[1].split(":");//结束日期的分秒 if(parseInt(date1[0]) > parseInt(date2[0])){//年 alert("起始时间不能大于结束时间");return false;} else if(parseInt(date1[0],10) == parseInt(date2[0],10)){ if(parseInt(date1[1],10) > parseInt(date2[1],10)){//月 alert("起始时间不能大于结束时间");return false;} else if(parseInt(date1[1],10) == parseInt(date2[1],10)){ if(parseInt(date1[2],10) > parseInt(date2[2],10)){//日 alert("起始时间不能大于结束时间");return false;} else if(parseInt(date1[2],10) == parseInt(date2[2],10)){ if(parseInt(time1[0],10)>parseInt(time2[0],10)){ alert("起始时间不能大于结束时间");return false;} else if(parseInt(time1[0],10) == parseInt(time2[0],10)){ if(parseInt(time1[1],10) > parseInt(time2[1],10)){ alert("起始时间不能大于结束时间");return false;} } } } } } return true; } function controlTree(type,tree,hiddendiv,bigdiv){ if(type=='close'){ YAHOO.util.Dom.addClass(YAHOO.util.Dom.get(tree),'hidden'); YAHOO.util.Dom.get(hiddendiv).style.width="1%"; YAHOO.util.Dom.get(bigdiv).style.width="97%"; YAHOO.util.Dom.addClass(YAHOO.util.Dom.get("treeclose"),'hidden'); YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get("treeopen"),'hidden'); }else if(type=='open'){ YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get(tree),'hidden'); YAHOO.util.Dom.get(hiddendiv).style.width="18%"; YAHOO.util.Dom.get(bigdiv).style.width="80%"; YAHOO.util.Dom.addClass(YAHOO.util.Dom.get("treeopen"),'hidden'); YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get("treeclose"),'hidden'); } } //查看全部摘要 function allShow(tabId){ var tab = tabView.get('activeTab'); var els = YAHOO.util.Dom.getElementsByClassName('cbx','input',tab.get('contentEl')); for(var i=0;i< els.length;i++){ show(els[i].value); } var allShow = getElementInNodes(tab.get('contentEl'),'allShow'+tabId); var allClose = getElementInNodes(tab.get('contentEl'),'allClose'+tabId); for (var i=0; i < allShow.length; i++){ YAHOO.util.Dom.addClass(allShow[i],'sightless'); YAHOO.util.Dom.removeClass(allClose[i],'sightless'); } } //关闭全部摘要 function allClose(tabId){ var tab = tabView.get('activeTab'); var els = YAHOO.util.Dom.getElementsByClassName('cbx','input',tab.get('contentEl')); for(var i=0;i< els.length;i++){ closeDesc(els[i].value); } var allShow = getElementInNodes(tab.get('contentEl'),'allShow'+tabId); var allClose = getElementInNodes(tab.get('contentEl'),'allClose'+tabId); for (var i=0; i 100){ alert ("检索条件不能超过100个字符!",fm.keyword.focus); return false; } var url ='MetaSearch.action'; if(searchType==1){ url = 'BlurSearch.action'; } fm.action=url; fm.submit(); } } function reset() { var t=tabView.get('activeTab'); if (getTabForm(t)) { getTabForm(t).reset(); } buildSelect(); } //改变皮肤 function changeCssStyle(styleId,oldStyleId){ if (styleId==oldStyleId){ return false; } var rs = function(o){ var url = window.location.href; if (url.lastIndexOf("#")==url.length-1){ url=url.substring(0,url.length-1); } window.location.href= newUrl(url); } var url= 'User!updateCssStyle.action?cssStyle='+styleId; YAHOO.util.Connect.asyncRequest('POST', newUrl(url), {success:rs}); } function setDisabled(o,status){ try { if(YAHOO.util.Dom.get(o)) { YAHOO.util.Dom.get(o).disabled = status; } }catch (e){} } //通过指定字段的内容获取关键词,并把关键词放到指定的字段内 function fnGetKeys(oContent,keyId) { var fm = getTabForm(tabView.get('activeTab')); if (delBlank(oContent.value)!='' && fm[keyId] && delBlank(fm[keyId].value)=='') { var url = 'WiseSearch!getKeywordsByContent.action'; var rs = function(o){ fm[keyId].value = delBlank(o.responseText); } var rf = function(o){ } var postData ='content='+ fnEscapeURL(oContent.value); YAHOO.util.Connect.asyncRequest('POST', newUrl(url), {success:rs,failure:rf},postData); } } String.prototype.startWith=function(str){ var reg=new RegExp("^"+str); return reg.test(this); } function delBlank(str) { // return str.replace(/(^\s*)|(\s*$)/g, ""); } function checkReport(fm){ if(delBlank(fm['report.url'].value).length<1){ alert("被举报链接不能为空!",function(){ fm['report.url'].focus(); }); return false; } if(delBlank(fm['report.url'].value).length>2000){ alert("被举报链接不能超过2000个字!",function(){ fm['report.url'].focus(); }); return false; } if(!(checkURL(fm['report.url'].value.trim().toLowerCase(),false)) && !(checkURL(('http://'+(fm['report.url'].value)).trim().toLowerCase(),false))){ alert('请输入正确的链接地址,如:http://www.xxx.com',function(){ fm['report.url'].focus(); }); return false; } if(fm['report.socialReportSourceId'] && fm['report.socialReportSourceId'].value=='0'){ alert('请选择举报来源',function(){ //fm['report.socialReportSourceId'].focus(); }); return false; } if(fm['report.reportTypeId'].value==''){ alert('请选择举报类型',function(){ //fm['report.reportTypeId'].focus(); }); return false; } if(fm['report.sourceType'].value==''){ alert("请选择内容传播方式", function(tp){ //fm['report.sourceType'].focus(); }); return false; } if(fm['report.representmodeId'].value==''){ alert("请选择不良信息表现形式", function(tp){ //fm['report.representmodeId'].focus(); }); return false; } fm['report.reportDesc'].value = delBlank(fm['report.reportDesc'].value); if(fm['report.reportDesc'].value.length>150){ alert('举报说明不能超过150个字',function(){ fm['report.reportDesc'].focus(); }); return false; } fm['report.source'].value = delBlank(fm['report.source'].value); if(fm['report.source'].value.trim()==''){ alert('请填写被举报网站的名称',function(){ fm['report.source'].focus(); }); return false; } if(fm['report.source'].value.length>120){ alert('网站名称不能超过120个字',function(){ fm['report.source'].focus(); }); return false; } fm['report.icpInfo'].value = delBlank(fm['report.icpInfo'].value); if(fm['report.icpInfo'].value.length>120){ alert('网站备案号不能超过120个字',function(){ fm['report.icpInfo'].focus(); }); return false; } if(fm['report.provinceId'].value=='0'){ alert('请选择被举报网站的所属地',function(){ //fm['report.provinceId'].focus(); }); return false; } if(fm['report.reporterName']){ fm['report.reporterName'].value = delBlank(fm['report.reporterName'].value); if (fm['report.reporterName'].value.trim()=='') { alert('请填写您的姓名',function(){ fm['report.reporterName'].focus(); }); return false; } } if(fm['report.reporterName']&&fm['report.reporterName'].value.length>120){ alert('举报人姓名不能超过120个字',function(){ fm['report.reporterName'].focus(); }); return false; } if(fm['report.reporterProvinceId']&&fm['report.reporterProvinceId'].value=='0'){ alert('请选择您所在的地域',function(){ fm['report.reporterProvinceId'].focus(); }); return false; } if(fm['report.reporterPhone']){ var phone = fm['report.reporterPhone'].value.trim(); if(phone!=''&&(!checkPhoneNum(phone)&&!checkMobileNum(phone))){ alert('请正确填写您的电话',function(){ fm['report.reporterPhone'].focus(); }); return false; } } if(fm['report.reporterPhone']&&fm['report.reporterPhone'].value.length>25){ alert('举报人电话不能超过25个字',function(){ fm['report.reporterPhone'].focus(); }); return false; } if(fm['report.reporterEmail']&&fm['report.reporterEmail'].value.trim()!='') { if(fm['report.reporterEmail']&&(!checkEmail(fm['report.reporterEmail'].value.trim()))){ alert('请正确填写您的电子邮件',function(){ fm['report.reporterEmail'].focus(); }); return false; } if(fm['report.reporterEmail']&&fm['report.reporterEmail'].value.length>75){ alert('电子邮件不能超过75个字',function(){ fm['report.reporterEmail'].focus(); }); return false; } } if(fm['report.reporterAddress']){ fm['report.reporterAddress'].value = delBlank(fm['report.reporterAddress'].value); if (fm['report.reporterAddress'].value.length>120) { alert('通讯地址不能超过120个字',function(){ fm['report.reporterAddress'].focus(); }); return false; } } if(fm['validImage'] && fm['validImage'].value.trim()==''){ alert('请输入验证码',function(){ fm['validImage'].focus(); }); return false; } return true; } function getMoreInfo(e){ setDisabled('btnsubmit',true); var fm = document.getElementById('reportform'); if(fm['report.url'].value.length<1){ alert("被举报链接不能为空!",function(){ setDisabled('btnsubmit',false); }); return; } if(delBlank(fm['report.url'].value).length>2000){ alert("被举报链接不能超过2000个字!",function(){ setDisabled('btnsubmit',false); }); return; } if(!(checkURL(fm['report.url'].value.trim().toLowerCase(),false)) && !(checkURL(('http://'+(fm['report.url'].value)).trim().toLowerCase(),false))){ alert('请输入正确的链接地址,如:http://www.xxx.com',function(){ setDisabled('btnsubmit',false); }); return; } YAHOO.util.Dom.addClass(e,'hidden'); YAHOO.util.Dom.removeClass('waiting','hidden'); YAHOO.util.Dom.addClass('waiting','loading'); getSiteInfo(e);//site info if (fm['isReportManual']) {//内网手工录入补标题 getUrlTitle(e); } if (fm['report.reportId'].value > 0 && fm['report.attachmentId'].value > 0) { ymPrompt.confirmInfo({message:"重新获取网页快照将覆盖原有数据,确定要获取吗?",handler:function(tp){ if(tp=='ok') { resetSnapshotPicture(fm['report.attachmentId'].value); snapshot(); } } }); }else { snapshot();//snapshot } } function getMoreInfo11(e){ var aa = 0; setDisabled('btnsubmit',true); var fm = document.getElementById('reportform'); if(fm['report.url'].value.length<1){ alert("被举报链接不能为空!",function(){ setDisabled('btnsubmit',false); }); return; } var rs = function(o){ var value = o.responseText.trim(); if(value > 0){ ymPrompt.confirmInfo({message:"该网站信息已经存在,确定继续提交?",handler:function(tp){ if(tp=='ok') { getMoreInfo1(); }else{ return; } } }); }else{ getMoreInfo1(); } } YAHOO.util.Connect.setForm(fm); YAHOO.util.Connect.asyncRequest('POST', 'Report!checkDuplicate.action?st=1', {success:rs}); } function getMoreInfo1(e){ setDisabled('btnsubmit',true); var fm = document.getElementById('reportform'); if(fm['report.url'].value.length<1){ alert("被举报链接不能为空!",function(){ setDisabled('btnsubmit',false); }); return; } if(delBlank(fm['report.url'].value).length>2000){ alert("被举报链接不能超过2000个字!",function(){ setDisabled('btnsubmit',false); }); return; } if(!(checkURL(fm['report.url'].value.trim().toLowerCase(),false)) && !(checkURL(('http://'+(fm['report.url'].value)).trim().toLowerCase(),false))){ alert('请输入正确的链接地址,如:http://www.xxx.com',function(){ setDisabled('btnsubmit',false); }); return; } YAHOO.util.Dom.addClass(e,'hidden'); YAHOO.util.Dom.removeClass('waiting','hidden'); YAHOO.util.Dom.addClass('waiting','loading'); getSiteInfo1(e);//site info if (fm['isReportManual']) {//内网手工录入补标题 getUrlTitle(e); } if (fm['report.reportId'].value > 0 && fm['report.attachmentId'].value > 0) { ymPrompt.confirmInfo({message:"重新获取网页快照将覆盖原有数据,确定要获取吗?",handler:function(tp){ if(tp=='ok') { resetSnapshotPicture(fm['report.attachmentId'].value); snapshot(); } } }); }else { snapshot();//snapshot } } function getSiteInfo(e){ var fm = document.getElementById('reportform'); var url = 'Deal!json.action?url='+fm['report.url'].value.trim(); var rs = function(o){ YAHOO.util.Dom.addClass('waiting','hidden'); YAHOO.util.Dom.removeClass(e,'hidden'); if(o.responseText!=null&&o.responseText.trim()!='{}'){ var webSite =eval('('+o.responseText+')'); if (webSite.webSiteId == 0 || webSite.webSiteId =='') { alert('未获取到网站信息,请手工输入',function(){ var provinceSel = YAHOO.util.Dom.get('report.province'); fm['report.webSiteId'].value=''; fm['report.source'].value=''; fm['report.icpInfo'].value=''; provinceSel.options[0].selected=true; fm['report.area'][0].checked=true; }); }else { fm['report.webSiteId'].value=webSite.webSiteId; if (webSite.name == null) { fm['report.source'].value=''; }else { fm['report.source'].value=webSite.name; } if (webSite.icp == null) { fm['report.icpInfo'].value=''; }else { fm['report.icpInfo'].value=webSite.icp; } //change province select var provinceSel = YAHOO.util.Dom.get('report.province'); //alert(webSite.provinceId); for(var i=0;i<(provinceSel.options.length);i++){ if(provinceSel.options[i].value==webSite.provinceId) { provinceSel.options[i].selected=true; break; } } //change area select for(var i=0;i < fm['report.area'].length;i++){ if(fm['report.area'][i].value==webSite.isOverSeas) { fm['report.area'][i].checked=true; break; } } } buildSelect(); }else{ alert('未获取到网站信息,请手工输入',function(){ var provinceSel = YAHOO.util.Dom.get('report.province'); fm['report.webSiteId'].value=''; fm['report.source'].value=''; fm['report.icpInfo'].value=''; provinceSel.options[0].selected=true; fm['report.area'][0].checked=true; }); } } var rf = function(o){ YAHOO.util.Dom.addClass('waiting','hidden'); YAHOO.util.Dom.removeClass(e,'hidden'); alert("获取信息失败!"); } YAHOO.util.Connect.asyncRequest('post', url, {success:rs,failure:rf}); } function getSiteInfo1(e){ var fm = document.getElementById('reportform'); var url = 'Deal!json.action?url='+fm['report.url'].value.trim(); var rs = function(o){ YAHOO.util.Dom.addClass('waiting','hidden'); YAHOO.util.Dom.removeClass(e,'hidden'); if(o.responseText!=null&&o.responseText.trim()!='{}'){ var webSite =eval('('+o.responseText+')'); if (webSite.webSiteId == 0 || webSite.webSiteId =='') { alert('未获取到网站信息,请手工输入',function(){ var provinceSel = YAHOO.util.Dom.get('report.province'); fm['report.webSiteId'].value=''; fm['report.source'].value=''; fm['report.icpInfo'].value=''; provinceSel.options[0].selected=true; fm['report.area'][0].checked=true; }); }else { fm['report.webSiteId'].value=webSite.webSiteId; if (webSite.name == null) { fm['report.source'].value=''; }else { fm['report.source'].value=webSite.name; } if (webSite.icp == null) { fm['report.icpInfo'].value=''; }else { fm['report.icpInfo'].value=webSite.icp; } //change province select var provinceSel = YAHOO.util.Dom.get('report.province'); //alert(webSite.provinceId); var obj; var boo = false; for(var i=0;i<(provinceSel.options.length);i++){ if(provinceSel.options[i].value == 100){ obj = provinceSel.options[i]; } if(provinceSel.options[i].value==webSite.provinceId) { boo = true; provinceSel.options[i].selected=true; break; } } if(!boo){ obj.selected = true; } //change area select for(var i=0;i