(function(aF,bu)
{
var 
ow="QMWL/11.06.17",


bH=aF.QMWLCfg||{},


xa=aF,



Yg=(function(aF)
{
for(var As=aF,Yg=aF;As;)
{
try
{
As=As==As.parent?bu:As.parent;
As.document&&(Yg=As);
}
catch(cg)
{
}
}
return Yg;
}
)(aF),


bq=function(aF,ann,NB)
{
var al=this;
al.cN=aF;

if(!ann&&!NB)
{
al.HO=aF;
al.HX="non-json";
}
else
{
al.HO=ann;
al.HX=NB;
}
},

aRp=1,


Dc=function(aF)
{
return aF.QMWin||(((aF.$=aF.Q=aF.QMWin=new bq(aF))["_guid_"]


=aF["_guid_"]=aRp++)&&(bq.instance_(aF)||true)&&aF.$.ready());
},


AE=function(bQ)
{
return bQ&&typeof bQ.ctor_=="function"
&&bQ.ctor_()===bq;
},





Jw=(
{
"unt":900,
"dev":200,
"err":100,
"usr":0
}
),

bcy=bq.DBG_DEV_TYPE=Jw["unt"],
OU=bq.DBG_DEV_TYPE=Jw["dev"],
amU=bq.DBG_ERR_TYPE=Jw["err"],
aMW=bq.DBG_USR_TYPE=Jw["usr"],


Bd=bq.CFG_DBG_TYPE=(Jw[bH.sMode]||aMW)+1,

aoS="_qMeRR_",


IT=function()
{
var al=this;

try
{
if(anL())
{
var cM=iv(bq.debug)?
gS(bq.debug,arguments):
arguments,
gI=cM&&cM[0];

if(!cM)
{
return al;
}

if(cM.length===0)
{
debugger;
}
else
{

if(aF.console)
{


aF.console.log&&aF.console.log(gI);
}
aF.Console["debug"].add(gI,
wM(gI)&&!Jk(gI)?2:"code");
}
}
}
catch(cg)
{
}

return al;
},













aqw=function(ko)
{
try
{
if(
gS(bq.handleErr,[ko,Bd>=amU])!==true
&&Bd>amU
&&anL())
{
IT(
{
msg:ko.oErr.message,
line:ko.oErr.number
||ko.oErr.lineNumber||bu,
stack:ko.oErr.stack,
url:ko.oErr.fileName,
func:(ko.sName||ko.fFunc)
?[ko.sName,ko.fFunc].join(":")
:bu,
args:CV(ko.oArg)
}
);
}
}
catch(cg)
{
}
return this;
},


anL=function()
{


return!!aF.Console||(aF.console&&aF.console.log);
},


wO=function(ly,XS,ata)
{
return function()
{
try
{
return ly.apply(this,arguments);
}
catch(cg)
{

if(Bd>OU
&&cg&&(!ata||cg.type!==aoS))
{
aqw(
{
oErr:cg,
sName:XS,
fFunc:ly,
oContext:this,
oArg:arguments
}
);
}

if(Bd==bcy+1)
{

throw cg;
}

ata&&wQ(cg&&cg.message,XS);

}
return this;
};
},



Hm=Bd>OU?wO:function(ly)
{
return ly;
},


wQ=function()
{
var cM=arguments,
nh=cM[0],
aqy=
{
type:cM[2]||aoS,
message:mG(nh)&&(cM[1]?[cM[1],nh].join(":"):nh)
};


wQ.aQu=rn();


throw(mG(nh)?aqy:rc(aqy,nh));
},






apk=function(aF,OM,bA)
{
var YF=aPZ(aF),
gu=(bA||{}).oContext;
if(YF.Yn)
{
gS(gu||aF.QMWin,OM);
}
else
{
NL(YF,["ready",OM,false,aF,gu]);
aOy(aF,YF);
}
},


aOy=function(aF,Hf)
{
var bR,Ek,vo;

if(Hf.amr)
{
return;
}

Hf.amr=true;
bR=aF.document,
Ek=bR.documentElement;

function Al()
{
if(!Hf.Yn)
{
if(!bR.body)
{
return aF.setTimeout(Al,13);
}

Hf.Yn=true;
ZQ(Hf,"ready");
}
}

if(bR.readyState==="complete")
{
return Al();
}

if(bR.addEventListener)
{

vo=function()
{
bR.removeEventListener("DOMContentLoaded",vo,false);
aF.removeEventListener("load",vo,false)
Al();
};
bR.addEventListener("DOMContentLoaded",vo,false);
aF.addEventListener("load",vo,false);
}
else if(bR.attachEvent)
{

vo=function(_aoEvent)
{
if(bR.readyState==="complete"||_aoEvent.type==="load")
{
bR.detachEvent("onreadystatechange",vo);
aF.detachEvent("onload",vo);
Al();
}
};
bR.attachEvent("onreadystatechange",vo);
aF.attachEvent("onload",vo);
}
},


aPZ=function(aF)
{
var bM="_rEaDYinFO_",
_oInfo=aF[bM];
if(kD(_oInfo))
{
_oInfo=aF[bM]=
{
amr:false,
Yn:false
};
}
return _oInfo;
},


apw=function(iD,ba)
{
return iD.getElementById(ba);
},


Yo=function(bQ)
{
return bQ.ownerDocument||bQ.document||bQ;
},


va=function(_aoDom)
{
var bR=Yo(_aoDom);
return bR.parentWindow||bR.defaultView;
},


aoj=function(_aoDom,kl)
{

return!(_aoDom.tagName=="TEXTAREA"
&&(kl=="afterBegin"||kl=="beforeEnd"));
},


aNM=function(_aoDom,kl,IM)
{
if(aoj(_aoDom,kl))
{
if(_aoDom.insertAdjacentElement)
{
_aoDom.insertAdjacentElement(kl||"beforeBegin",IM);
}
else
{
switch(kl)
{
case"afterBegin":
_aoDom.insertBefore(IM,_aoDom.firstChild);
break;

case"beforeEnd":
_aoDom.appendChild(IM);
break;
case"afterEnd":
_aoDom.parentNode[_aoDom.nextSibling
?"insertBefore":"appendChild"](IM,_aoDom.nextSibling);
break;
default:
_aoDom.parentNode.insertBefore(IM,_aoDom);
break;
}
}
}
},


Uz=function(_aoDom,kl,eZ)
{
if(aoj(_aoDom,kl))
{
if(_aoDom.insertAdjacentHTML)
{
_aoDom.insertAdjacentHTML(kl,eZ);
}
else
{
var hV=_aoDom.ownerDocument.createRange(),
sk=kl.indexOf("before")==0,
Xc=kl.indexOf("Begin")!=-1;

if(sk==Xc)
{
hV[sk?"setStartBefore":"setStartAfter"](_aoDom);
_aoDom.parentNode.insertBefore(
hV.createContextualFragment(eZ),Xc
?_aoDom
:_aoDom.nextSibling
);
}
else
{
var hu=_aoDom[sk?"lastChild":"firstChild"];
if(hu)
{
hV[sk?"setStartAfter":"setStartBefore"](hu);
_aoDom[sk?"appendChild":"insertBefore"](hV
.createContextualFragment(eZ),hu);
}
else
{
_aoDom.innerHTML=eZ;
}
}
}
}
},






aiI=0,


aPR=/\S/,


gS=function(ik,nm,BY,aKz)
{
var gu=this,
Nz,qL,Aq;
if(iv(ik))
{
qL=ik;
Aq=nm;
}
else if(iv(nm))
{
gu=ik;
qL=nm;
Aq=BY;
}
else if(iv(Nz=ik&&ik[nm]))
{
gu=ik;
qL=Nz;
Aq=BY;
}
else if(iv(Nz=nm&&nm[BY]))
{
gu=ik;
qL=Nz;
Aq=aKz;
}

return qL&&wO(qL).apply(gu,Aq||[]);
},


IQ=function(vz)
{

return!kD(vz)&&!mG(vz)&&tl(vz.length)
&&!nk(vz)&&!AM(vz);
},


Ol=function(Ji,NB,pS,ee,cV)
{
var al=this;

if(pS===1)
{
gS(al,ee,[NB=="array"?Ji[0]:Ji,cV||0,0]);
}
else if(pS>1)
{
for(var i=0;i<pS&&gS(al,ee,[Ji[i],cV||i,i])!==false;i++)
{
;
}
}
else if(pS<0)
{
for(var eN in Ji)
{
if(gS(al,ee,[Ji[eN],cV||eN,eN])===false)
{
break;
}
}
}

return al;
},


aqb=encodeURIComponent,


RA=function(ec)
{
return ec&&ec.replace?(ec.replace(/&/g,"&amp;").replace(/\"/g,"&quot;")
.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\'/g,"&#39;").replace(/\n/g,"<br/>")):ec;
},


uN=function(ly)
{
return function()
{
iv(ly)&&ly.apply(this,arguments);
return this;
};
},


rc=function()
{
for(var cM=arguments,DX=cM[0],i=1,_nLen=cM.length;i<_nLen;i++)
{
var Nf=cM[i];
for(var j in Nf)
{
DX[j]=Nf[j];
}
}
return DX;
},


aQc=/<script(.|\s)*?\/script>/gi,
amo=function(eZ)
{
return eZ.replace(aQc,"");
},


aoG=function(cV)
{

return AE(cV)?cV.data(0):cV;
},


AM=function(aF)
{
try
{
return!!aF.setInterval;
}
catch(cg)
{
return false;
}
},


Jk=function(bQ)
{
return aQN.call(bQ)=="[object Array]";
},


nk=function(bQ)
{
return bQ?bQ.nodeType!==bu:false;
},


iv=function(bQ)
{
return typeof bQ=="function";
},


aPt=null,
kD=function(bQ)
{
return bQ===bu||bQ===aPt;
},


apo=isNaN,


tl=function(bQ)
{
return typeof bQ=="number"&&!apo(bQ);
},


wM=function(bQ)
{
return typeof bQ=="object";
},


mG=function(bQ)
{
return typeof bQ=="string";
},


AD=function()
{
return this;
},


rn=function()
{
return+new Date;
},


aaG=parseInt,


amG=Math.random,


ZF=(function()
{
var aNa=/([\^\.\[\$\(\)\|\*\+\?\{\\])/ig;
return function(ast)
{
return ast.replace(aNa,"\\$1");
}
}
)(),


CV=function(bQ)
{
if(Jk(bQ))
{
return bQ;
}

if(IQ(bQ))
{
for(var i=0,ok=[],_nLen=bQ.length;i<_nLen;i++)
{
ok[i]=bQ[i];
}
return ok;
}

return[bQ];
},


aPd=function(bQ,ank)
{
var ij={};

if(IQ(bQ))
{
for(var i=0,_nLen=bQ.length;i<_nLen;i++)
{
ij[bQ[i]]=ank;
}
}
else if(!kD(ank))
{
ij[bXT]=bQ;
}

return ij;
},


aSg=function(bQ,als)
{
var qE=aaG(bQ);
return!apo(qE)||!tl(als)
?qE:als;
},


anQ=function(bQ)
{
return new String(bQ);
},


aQN=Object.prototype.toString,

arL=function(ec)
{
if(mG(ec))
{
var wN=/\s/,
QN=-1,
QE=ec.length;
while(wN.test(ec.charAt(--QE)));
while(wN.test(ec.charAt(++QN)));

return ec.slice(QN,QE+1);
}
},


XB=function(VC)
{
return[VC,rn(),amG()].join("").split(".").join("");
},


Dm=(function()
{
var ajq="_uNiQUe_",
TR=0;

function Az(eA,Wr)
{
if(wM(eA))
{
if(eA[ajq]!=TR)
{
eA[ajq]=TR;
return true;
}
}
else
{
if(!Wr[eA])
{
Wr[eA]=TR;
return true;
}
}
return false;
};

return function(Vi)
{
var _nLen=Vi.length,
hM=[],
r=-1,
i=0,
lW={},
aed;

for(++TR;i<_nLen;++i)
{
Az(aed=Vi[i],lW)&&(hM[++r]=aed);
}

lW=bu;

return hM;
};
})(),






ano={},



NL=function(bQ,bA)
{
if(!iv(bA[1]))
{
return;
}

var cj=bA[0],
Jp=bA[2],
gu=bA[4],
ht=bQ.ht||(bQ.ht={}),
ahA=!ht[cj],
rY=ht[cj]||(ht[cj]={});

if(ahA&&(nk(bQ)||AM(bQ)))
{
if(cj=="unload")
{
wQ("use 'addPageUnloadEvent(func)' replace add 'unload' event!");
}
else
{
var vu="on"+cj,
aol=bQ[vu];

aol&&!Jp&&
abE(bQ,cj,rY,true,va(bQ),aol);
abE(bQ,cj,rY,Jp,bA[3],bA[1],gu);
bQ[vu]=aPw;
}
}
else
{
abE(bQ,cj,rY,Jp,bA[3],bA[1],gu);
}
},



anH=function(bQ,bA)
{
var AN=bA[0],
Jp=bA[1],
aNc=bA[2],
gu=bA[3];
for(var cj in AN)
{
NL(bQ,[cj,AN[cj],Jp,aNc,gu]);
}
},



apz=function(bQ,bA)
{
var uz=bA[1],
nI=iv(uz)&&uz.nI;
nI&&aat(bQ,bA[0],nI);
},



aQf=function(bQ,bA)
{
var AN=bA[0];
for(var cj in AN)
{
apz(bQ,[cj,AN[cj]]);
}
},


aat=function(bQ,aS,aRy)
{
try
{
var nI=parseInt(aRy);
if(tl(nI))
{

var rY=bQ.ht&&bQ.ht[aS],
bj=rY[nI];
delete rY[nI];
delete bj["_event_"+nI];
}
}
catch(cg)
{
}
},


ZQ=function(bQ,aS,um,aM)
{
var 
rY=bQ.ht&&bQ.ht[aS],
Aq=um||[],
amP=true;

for(var i in rY)
{
var Gq;
try
{
Gq=rY[i][0]["_event_"+i];
}
catch(cg)
{
}

Gq
?Gq.apply(aM||rY[i][1]||bQ,
Aq)===false&&(amP=false)
:aat(bQ,aS,i);
}

return amP;
},

Ze=
{
Mouse:
{
cj:"click|mousedown|mouseup|mouseomove",
alx:function(aS,aF,_aoEvent)
{




return[aS,true,true,aF,0,
_aoEvent.screenX,_aoEvent.screenY,_aoEvent.clientX,_aoEvent.clientY,
false,false,false,false,0,_aoEvent.relativeTarget]
}
},
Key:
{
cj:"keydown|keypress|keyup",
alx:function(aS,aF,_aoEvent)
{



return[aS,aF,true,true,aF,
!!_aoEvent.ctrlKey,!!_aoEvent.altKey,!!_aoEvent.shiftKey,!!_aoEvent.metaKey,
_aoEvent.keyCode,_aoEvent.charCode||_aoEvent.keyCode];
}
}
},

aqC=(function()
{
var ht={},
YX;

for(var cj in Ze)
{
YX=Ze[cj].cj.split("|");
for(var i=YX.length-1;i>-1;i--)
{
ht[YX[i]]=cj;
}
}

return ht;
}
)(),


aNN=function(bQ,aS,_aoEvent)
{
if(nk(bQ)&&aqC[aS])
{
var vu=aqC[aS];

if(bQ.fireEvent)
{


if(aS==="click"&&bQ.tagName==="INPUT"&&bQ.type==="submit")
{
bQ.click();
}
else
{
bQ.fireEvent("on"+aS,rc(
Yo(bQ).createEventObject(),
{
cancelBubble:false,
returnValue:true
},
_aoEvent,
{
type:aS
}
));
}
}

else
{
var eu=Yo(bQ).createEvent(vu+"Events");
eu["init"+vu+"Event"].apply(eu,
Ze[vu].alx(aS,va(bQ),_aoEvent||{}));
bQ.dispatchEvent(eu);
}

return true;
}

return false;
},



aOv=function(bQ,bA)
{
var cj=bA[0];
return!aNN(bQ,cj,bA[1])?
ZQ(bQ,cj,bA[1],bA[4]):true;
},


anN=0,
aoN=bu,
aMx=/a/.bUZ=='//',


aPw=function(_aoEvent)
{
var eu=_aoEvent||va(this).event;

if(aMx)
{
if(eu.type.indexOf("key")==0
&&rn()-anN<100
&&aoN!=eu.view)
{
return;
}
anN=rn();
aoN=eu.view;
}

!eu.currentTarget&&(eu.currentTarget=this);
return ZQ(this,eu.type,[eu]);
},


ON=function(anZ,alw,Do)
{
return function()
{
var al=this,
bj=al.cN,
cM=arguments,
nh=cM[0],
mr=cM[1],
uD=cM[2],
aQb=cM[3];


if(AE(nh))
{
return cM.callee.apply(nh,CV(cM).slice(1));
}



if(iv(mr)||mG(nh))
{
return al.each(anZ,
{vParam:[nh,mr,Do,bj,(uD||{}).oContext]});
}


if(kD(mr)||(wM(mr)&&mr.oContext))
{
return al.each(alw,
{vParam:[nh,Do,bj,(mr||{}).oContext]});
}

if(!wM(nh))
{
wQ("can't add/del/fire event for '"+nh+"'");
}



if(mG(mr))
{
return al.each([nh],anZ,
{vParam:[mr,uD,Do,bj,(aQb||{}).oContext]});
}


return al.each([nh],alw,
{vParam:[mr,Do,bj,(uD||{}).oContext]});
};
},


aON=0,


aPa=function(aad)
{
var YO=aad||"_gLoBAl_eVEnT_";
return ano[YO]||(ano[YO]=
{
name:YO
}
);
},


abE=function(bQ,aS,aLQ,Do,anx,Jm,aM)
{
var nI=Jm.nI||(Jm.nI=++aON);
if(Do)
{
var apd="_LinkEvent_"+aS;
aat(bQ,aS,bQ[apd]);
bQ[apd]=nI;
}


aLQ[nI]=[anx,aM];

anx["_event_"+nI]=wO(Jm,"event:"+aS,true);
}

;













bq.extend=(function()
{
var 
aNQ=function(apq)
{
var
aQh=bq.instance_;

bq.instance_=function(aF)
{
gS(aQh,[aF]);
gS(apq,[aF]);
};

aF.QMWin
&&gS(apq,[aF]);
},

aRD=function(KH,aOp)
{
var 
HA=bq.prototype;
if(aOp===false)
{

for(var kp in KH)
{
HA[kp]=KH[kp];
}
}
else
{

for(var kp in KH)
{
HA[kp]=Hm(KH[kp],kp,true);
}
}
}

aRs=function(afB)
{
var 
ow=bq.version?[bq.version(),afB].join("; "):afB;

bq.version=function()
{
return ow;
};
},

ZJ=function(ly,bz,aS)
{

return bq.CFG_DBG_TYPE>bq.DBG_DEV_TYPE
?function()
{
var cM=arguments;
if(typeof cM[0]!=aS)
{
wQ('error : QMWL.extend("'
+bz+'", _avParam); _avParam must '
+aS+'! err param: '+cM[0]);
}
else
{
ly.apply(aF,cM);
}
}
:ly;
},
gG=
{
"version":ZJ(aRs,"version","string"),
"method":ZJ(aRD,"method","object"),
"instance":ZJ(aNQ,"instance","function")
};


return function()
{
var cM=CV(arguments);
gS(gG[cM.shift()],cM);
return bq;
};
}
)();





bq.extend("version",ow);





bq.extend("method",
{





cfg_:function()
{
return bH;
},






ctor_:function()
{
return bq;
},








fnCreater_:uN
}
);





bq.extend("method",
{











error:wQ,








debug:IT,









log:function(zw,lq)
{
var al=this;
return IT.call(al,al[zw||"data"].apply(al,lq),arguments[0]);
},










safe:wO,







safeByConf:Hm
},
false
);





bq.extend("method",
(function()
{
var

ckg="0.3",


aMj=/\[([\w\-_]+)(=[\'\"]?([\w\-_~@]+)[\'\"]?)?\]/,

aNj=/\[[\w\-_]+(=[\'\"]?[\w\-_~@]+[\'\"]?)?\]/g,


aNU=/^([#\$<:])([\w\-_]+)>?$/,


aIs=/.*?\.([\w\-_]+)/,







atI=/(?:[\w\-~@\\.#\[\]=\'\"]+)+|\*|>/ig,




aaU=/#([\w\-_]+)/,


abt=/^([\w\*\-_]+)/,


AP=[bu,bu],


aMY=
{

"#":function(aF,iD,ba)
{
var _oDom=apw(iD,ba);
return new bq(aF,_oDom,_oDom?"non-json":"none");
},


"$":function(aF,iD,Ml)
{
if(Ml==="top")
{
return Dc(xa);
}
else if(Ml==="this")
{
return Dc(aF);
}
else
{
var HL=apw(iD,Ml),
amO=HL&&(HL.contentWindow||aF.frames[Ml]);
return AM(amO)?Dc(amO):bu;
}
},


"<":function(aF,iD,ty)
{
var _oDom=ty==="fragment"?iD.createDocumentFragment():iD.createElement(ty);
return new bq(aF,_oDom,_oDom?"non-json":"none");
},


":":function(aF,iD,aS)
{
if(aS==="doc")
{
return new bq(aF,iD,"non-json");
}
return aF.QMWin;
}
},


anW=
{
"array":function(aif)
{
return aif.length;
},
"non-json":function()
{
return 1;
},
"none":function()
{
return 0;
},
"json":function()
{
return-1;
}
};


function KO(hS,auD,ads,aOH)
{
var JO=!auD||auD.test(hS.className),
i=0,ZD,Yh;

while(JO&&i<aOH)
{
ZD=hS.getAttribute((Yh=ads[i++])[1]);
JO=Yh[2]?ZD===Yh[3]:!!ZD;
}

return JO;
}


function abh(jy)
{
var jW=jy.match(aNj);
if(jW)
{
for(i=jW.length-1;i>=0;i--)
{
jW[i]=jW[i].match(aMj);
}
}
return jW;
}


function agl(jy)
{
var nP=(jy.match(aIs)||AP)[1];
return nP&&RegExp('(^|\\s)'+nP+'(\\s|$)');
}



function OZ(Oh,MG,aFc)
{
var HE=Oh.pop();

if(HE==='>')
{
return OZ(Oh,MG,true);
}

var bK=(HE.match(aaU)||AP)[1],
oK=agl(HE),
le=(HE.match(abt)||AP)[1],
jW=abh(HE),
wq=jW?jW.length:0,
hM=[],
aDS=-1,
lz=-1,
eF,
eK,
Zm;


le&&(le=le=="*"?"":le.toUpperCase());

while((eF=MG[++lz]))
{
eK=eF.parentNode;

do
{
Zm=(!bK||eK.id===bK)&&
(!le||eK.nodeName==le)&&
KO(eK,oK,jW,wq);

if(aFc||Zm)
{
break;
}

}
while((eK=eK.parentNode)&&eK.getAttribute);

Zm&&(hM[++aDS]=eF);
}

return Oh[0]&&hM[0]?OZ(Oh,hM):hM;
}


function aCx(jy,MG)
{
var mX=jy.match(atI),
we=mX.pop(),
bK=(we.match(aaU)||AP)[1],
oK=agl(we),
jW=abh(we),
wq=jW?jW.length:0,
le=(we.match(abt)||AP)[1],
ia=[],
i=-1,
lz=-1,
eF;

le&&(le=le=="*"?"":le.toUpperCase());

while(eF=MG[++i])
{
(!bK||eF.id===bK)&&
(!le||eF.nodeName==le)&&
KO(eF,oK,jW,wq)&&
(ia[++lz]=eF);
}

return mX[0]&&ia[0]?OZ(mX,ia):ia;
}



function Fd(jy,aM)
{
if(aM.querySelectorAll&&Bd<OU)
{
return CV(aM.querySelectorAll(jy));
}

if(jy.indexOf(',')>-1)
{
var alW=jy.split(/,/g),
hM=[],
i=0,
_nLen=alW.length;
for(;i<_nLen;++i)
{
hM=hM.concat(Fd(alW[i],aM));
}
return Dm(hM);
}

var mX=jy.match(atI),
we=mX.pop(),
bK=(we.match(aaU)||AP)[1],
oK=agl(we),
jW=abh(we),
wq=jW?jW.length:0,
le=(we.match(abt)||AP)[1],
ia;


if(bK)
{
if(aM.getElementById)
{
var _oDom=aM.getElementById(bK);
if(!_oDom||(le&&_oDom.nodeName!=le.toUpperCase())||
!KO(_oDom,oK,jW,wq))
{
return[];
}
ia=[_oDom];
}
else
{
var mp=aM.getElementsByTagName(le||'*'),
i=-1,lz=-1,eF;
ia=[];
while(eF=mp[++i])
{
eF.id==bK&&KO(eF,oK,jW,wq)&&
(ia[++lz]=eF);
}
}
}
else
{
var mp=aM.getElementsByTagName(le||'*');
if(oK||wq)
{
var i=-1,lz=-1,eF;
ia=[];
if(!wq)
{
while(eF=mp[++i])
{
oK.test(eF.className)&&(ia[++lz]=eF);
}
}
else
{
while(eF=mp[++i])
{
KO(eF,oK,jW,wq)&&(ia[++lz]=eF);
}
}
}
else
{
ia=CV(mp);
}
}

return mX[0]&&ia[0]?OZ(mX,ia):ia;
}


function aNJ(_aoDom,bA)
{

if(nk(_aoDom))
{
var uQ=bA.uQ;
uQ.hM=uQ.hM.concat(Fd(bA.anf,_aoDom));
}
}


function Ur(kn,cV)
{
var al=this,
bj=al.cN;


if(!kn)
{
return new bq(bj,kn,"none");
}


if(mG(kn))
{

if(!AE(cV))
{
var bR=al.cN.document,
iG;


if(kn=="body")
{
return new bq(bj,bR.body,"non-json");
}


if(iG=aNU.exec(kn))
{
return aMY[iG[1]](bj,bR,iG[2]);
}


return new bq(al.cN,Fd(kn,cV||bR),"array");
}
else
{

return cV.find(kn);
}
}


if(AE(kn))
{
return kn;
}


if(nk(kn))
{

if(bj!=va(kn))
{
var alE=va(kn);
return AM(alE)
?Dc(alE).$(kn):bu;
}
return new bq(bj,kn,"non-json");
}


if(AM(kn))
{
return Dc(kn);
}


if(anW[cV])
{
return new bq(bj,kn,cV);
}


if(IQ(kn))
{
return new bq(bj,kn,"array");
}


return new bq(bj,kn,"non-json");
}


function aRY(_aoDom,bA)
{
if(nk(_aoDom))
{
var ia=bA.ia;
ia.push(_aoDom=_aoDom.parentNode);

if(bA.aOS)
{
while((_aoDom=_aoDom.parentNode)&&_aoDom.nodeType!==9)
{
ia.push(_aoDom);
}
}
}
}


function ams(jy,atV)
{
var ia=[];
this.each(aRY,{vParam:{ia:ia,aOS:atV}});
return new bq(this.cN,aCx(jy,this.size()>1?Dm(ia):ia),"array");
}


return(
{














$:Ur,














Q:Ur,








parent:function(jy)
{

return ams.call(this,jy,false);
},








parents:function(jy)
{
return ams.call(this,jy,true);
},




























call:gS,




























callEx:uN(gS),























each:function(ik,nm,BY)
{
var al=this,
bZe,bXF,oO,eQ;

if(iv(ik))
{
eQ=nm||{};
Ol.call(eQ.oContext||al,al.HO,al.HX,
al.size(),ik,eQ.vParam);
}
else if(AE(ik))
{
eQ=BY||{};
Ol.call(eQ.oContext||al,ik.HO,ik.HX,
ik.size(),nm,eQ.vParam);
}
else if(iv(nm)&&!kD(ik))
{
eQ=BY||{};
if(IQ(ik))
{
Ol.call(eQ.oContext||al,ik,"array",
ik.length,nm,eQ.vParam);
}
else
{
Ol.call(eQ.oContext||al,ik,"json",
-1,nm,eQ.vParam);
}
}

return al;
},









find:function(jy)
{

var al=this,
uQ={hM:[]};
al.each(aNJ,{vParam:{anf:jy,uQ:uQ}});
return new bq(al.cN,al.size()>1?Dm(uQ.hM):uQ.hM,"array");
},








data:function(GU)
{
var al=this,
aO=al.HO,
awf=al.HX;
return kD(GU)||awf=="non-json"||kD(aO)?aO:aO[GU];
},








is:AE,








isWinEqual:function(bQ)
{


return(AE(bQ)?bQ.cN:bQ)==this.cN;
},







size:function()
{
var al=this;
return anW[al.HX](al.HO);
}
}
);
}
)()
);





bq.extend("method",
(function()
{

var bR=document,
Ek=bR.documentElement,
CZ={},
mH=bR.createElement("script"),
fu=bR.createElement("div"),
bK="script"+rn(),
ZE,qZ;

fu.style.display="none";
fu.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
ZE=fu.getElementsByTagName("*"),
qZ=fu.getElementsByTagName("a")[0];


if(ZE&&ZE.length&&qZ)
{



CZ.opacity=/^0.55$/.test(qZ.style.opacity);



CZ.cssFloat=!!qZ.style.cssFloat;

mH.type="text/javascript";
try
{
mH.appendChild(bR.createTextNode("window."+bK+"=1;"));
}
catch(cg){}

Ek.insertBefore(mH,Ek.firstChild);




if(aF[bK])
{
CZ.scriptEval=true;
delete aF[bK];
}

Ek.removeChild(mH);
}


apk(aF,function()
{
var fu=document.createElement("div");
fu.style.width=fu.style.paddingLeft="1px";

document.body.appendChild(fu);
CZ.boxModel=fu.offsetWidth===2;
document.body.removeChild(fu).style.display='none';
fu=null;
}

);








bq.support=function(ane)
{
return ane?!!CZ[ane]:CZ;
}

return(
{







support:bq.support
}
);
}
)()
);





bq.extend("method",
(function()
{

var ang=navigator.userAgent,
iA=ang.toLowerCase(),



hN=(
{
appName:navigator.appName,
userAgent:ang
}
),



uV,



mq,



pe
;


function YP()
{
if(!uV)
{
var pe=aav(),
iG;

if(pe.ie)
{
iG=/(maxthon)[\x20]([\w.]+)/.exec(iA)
||/(tencenttraveler)[\x20]([\w.]+)/.exec(iA)
||/(the[\x20]?world)[\x20]?([\w.]+)?/.exec(iA)
||/(avant)Browser[\x20]([\w.]+)/.exec(iA)
||/(360se)[\x20]([\w.]+)/.exec(iA)
||/(se)[\x20]([\w.]+)/.exec(iA);
}

else if(pe.webkit)
{
iG=/(chrome)\/([\w.]+)/.exec(iA)
||/(version)\/([\w.]+)/.exec(iA);
}

else if(pe.gecko)
{
iG=/(firefox)\/([\w.]+)/.exec(iA);
}

if(iG)
{
uV={};
uV[
hN.app=
{
tencenttraveler:"tt",
se:"sogou",
version:"safari"
}
[iG[1]]||iG[1]
]=hN.appVersion=iG[2]||"0";

uV[hN.app+hN.appVersion]=
uV[hN.app+hN.appVersion.split(".")[0]]=
hN.appVersion;
}
else
{
uV=pe;
hN.app=hN.engine;
hN.appVersion=hN.engineVersion;
}
}

return uV;
}


function aNL()
{
YP();
aoD();
return hN;
}


function aoD()
{
if(!mq)
{
var mq={};
if(/windows/.test(iA)||/win32/.test(iA))
{
if(/nt\x206.0/.test(iA)||/windows vista/.test(iA))
{
mq[hN.os="vista"]=mq["win"]="6.0";
}
else if(/nt\x206.1/.test(iA))
{
mq[hN.os="win7"]=mq["win"]="6.1";
}
else
{
mq[hN.os="win"]="0";
}
}
else if(/ipad/.test(iA))
{
mq[hN.os="ipad"]="0";
}
else if(/mac\x20os\x20x/.test(iA))
{
mq["mac os x"]=mq["mac"]=(/mac\x20os\x20x\x20([\w.]+)/.exec(iA)||[])[1]||"0";
hN.os="mac os x "+mq["mac"];
}
else if(/macintosh/.test(iA))
{
mq[hN.os="mac"]="0";
}
else if(/linux/.test(iA))
{
mq[hN.os="linux"]="0";
}
}
return mq;
}


function aav()
{
if(!pe)
{
var iG=/(webkit)[\x20\/]([\w.]+)/.exec(iA)
||/(opera)(?:.*version)?[\x20\/]([\w.]+)/.exec(iA)
||/ms(ie)\x20([\w.]+)/.exec(iA)
||!/compatible/.test(iA)&&/(mozilla)(?:.*?\x20rv:([\w.]+))?/.exec(iA)
||[];
pe={};
pe[hN.engine={mozilla:"gecko"}[iG[1]]||iG[1]||"unknow"]
=hN.engineVersion=iG[2]||"0";

pe[hN.engine+hN.engineVersion]=
pe[hN.engine+hN.engineVersion.split(".")[0]]=
hN.engineVersion;
}
return pe;
}


return(
{







browser:function(eb)
{
var _oInfo=aNL();
return eb?_oInfo[eb]:_oInfo;
},










isBrowser:function(aPG)
{
var aly=false,
pe=aav(),
uV=YP();

this.each(aPG.split("|"),function(ya)
{
if(pe[ya]||uV[ya])
{
return!(aly=true);
}
}
);
return aly;
},








browserVersion:function(ya)
{
return YP()[ya]||aav()[ya];
},








isOS:function(aQQ)
{
var aon=false,
mq=aoD();
this.each(aQQ.split("|"),function(aOA)
{
if(mq[aOA])
{
return!(aon=true);
}
}
);
return aon;
}
}
);
}
)()
);





bq.extend("method",
(function()
{
function aQC(alU,jj)
{


var kW=alU.href;
return jj==="hash"&&kW.indexOf("#")>0
&&("#"+kW.split("#")[1])
||alU[jj];
}
var bdY=/^(?:.*?\?)?(\S*?)(?:#.*)?$/,
bbX=/&([^&]+?)=([^&]*?)(?=&)/g;

return{












locSearch:function(cs)
{
var bD={};
(cs||this.cN.location.href).replace(bdY,"&$1&").replace(bbX,function(cwF,WX,aUE)
{
var	Vy=bD[WX=decodeURIComponent(WX)],
agx=decodeURIComponent(aUE);
if(Vy==bu)
{
bD[WX]=agx;
}
else if(mG(Vy))
{
bD[WX]=[Vy,agx];
}
else
{
Vy.push(agx);
}
return"";
}
);
return bD;
},













loc:function(jj,dM)
{
var nJ=this.cN.location;
if(kD(dM))
{
return aQC(nJ,jj);
}
else
{
nJ[jj]=dM;
return this;
}
}
}
})()
);





bq.extend("method",
{







append:function(cV)
{
return this.insert(cV,"beforeEnd");
},








appendTo:function(_aoDom)
{
var al=this;
return al.$(_aoDom).append(al)&&al;
},








prepend:function(cV)
{
return this.insert(cV,"afterBegin");
},








prependTo:function(_aoDom)
{
var al=this;
return al.$(_aoDom).prepend(al)&&al;
},








fragment:function(eZ)
{
var al=this,
bbZ=al.$("<div>").html(eZ),
bft=al.$("<fragment>"),
aAl=bbZ.data(0).childNodes,
ia=[];

for(var i=0,l=aAl.length;i<l;i++)
{
ia[i]=aAl[i].cloneNode(true)
}

return eZ?new bq(va(bft.data(0)),ia,"array"):al;
},








replaceWith:function(eZ)
{
var al=this;
if(mG(eZ))
{
var ayK=[],
mp;
try{mp=al.$("<div>").html(eZ).data(0).childNodes;}catch(e){debug(e.message)}
mp&&mp.length&&al.each(function(_aoDom)
{
if(_aoDom.nodeType===1)
{
var eK=_aoDom.parentNode,
wS=_aoDom.nextSibling,
baF=wS
?function(_aoDom){eK.insertBefore(_aoDom,wS);}
:function(_aoDom){eK.appendChild(_aoDom);};
eK.removeChild(_aoDom);
for(var i=0;i<mp.length;i++)
{
var _oDom=mp[i].cloneNode(true);
baF(_oDom);
ayK.push(_oDom);
}
}
});
return new bq(al.cN,ayK,"array");
}
return al;
},









attr:function(eb,hY)
{
var al=this;

if(kD(hY))
{
var Oy;
al.each(function(_aoDom)
{
if(nk(_aoDom))
{
Oy=_aoDom[eb];
kD(Oy)&&(Oy=_aoDom.getAttribute(eb));
return false;
}
}
);
return Oy;
}
else
{
return al.each(function(_aoDom)
{
if((_aoDom.tagName=="INPUT"||_aoDom.tagName=="TEXTAREA")&&eb=="value")
{
_aoDom.value=hY;
}
else if(tl(hY)||mG(hY))
{
_aoDom.setAttribute(eb,hY)
}
else
{
_aoDom[eb]=hY;
}
}
);
}
},







focus:function()
{
var _oDom=this.data(0);
_oDom&&_oDom.focus&&_oDom.focus();
return this;
},







blur:function()
{
var _oDom=this.data(0);
_oDom&&_oDom.blur&&_oDom.blur();
return this;
},








rmAttr:function(eb)
{
return this.each(function(_aoDom)
{
_aoDom.removeAttribute&&_aoDom.removeAttribute(eb);
_aoDom[eb]&&(_aoDom[eb]=bu);
}
);
},








contain:function(_aoDom)
{
var al=this,
qg=al.data(0),
YM=aoG(_aoDom);

if(nk(qg)&&nk(YM))
{
if(qg.contains)
{
return qg.contains(YM);
}
else if(qg.compareDocumentPosition)
{
var Wz=qg.compareDocumentPosition(YM);
return(Wz==20||Wz==0);
}
}

return false;
},








html:function(eZ)
{
var al=this;

if(kD(eZ))
{
var gj;
al.each(function(_aoDom)
{
if(_aoDom.nodeType===1)
{
gj=_aoDom.innerHTML;
return false;
}
}
);
return gj||"";
}
else
{
return al.each(function(_aoDom)
{
_aoDom.nodeType===1&&(_aoDom.innerHTML=eZ);
}
);
}
},









insert:function(cV,kl)
{
var al=this,
Us=aoG(cV),
alz=nk(Us)
?aNM:Uz;
aNK=alz==Uz;

return al.each(
function(_aoDom)
{
if(nk(_aoDom))
{
alz(_aoDom,kl,Us);
return aNK;
}
}
);
},









insertTo:function(_aoDom,kl)
{
var al=this;
return al.$(_aoDom).insert(al,kl)&&al;
},


















insertIframe:function(Iq,kl)
{
return this.each(
function(_aoDom)
{
if(nk(_aoDom))
{
var $=this,
aam="_ifRAmeoNlQAd_",
gG=Iq||{},
bK=gG.id=gG.id||XB(),
bj=va(_aoDom),
rS=bj[aam],
alH=[];

!iv(rS)&&(rS=bj[aam]=function(ba,Sv)
{
if(!Sv.getAttribute("_ok_")&&!arguments.callee[ba].src)
{
return;
}
$.call(Sv,arguments.callee[ba].onload);
}
);

rS[bK]={onload:gG.onload,src:gG.src};
gG.onload=aam+"('"+bK+"', this);";
gG.src=gG.src||[
"javascript:document.open();document.writeln('<head><script>",
location.host!=document.domain
?"document.domain=\\x22"+document.domain+"\\x22;"
:"",
"frameElement.setAttribute(\\x22_ok_\\x22,true);<\/script></head>');document.close();"
].join("");

$.each(gG,function(dM,eb)
{
alH.push(eb,'="',dM,'" ');
}
);

Uz(_aoDom,kl,'<iframe '+alH.join("")+'></iframe>');
return false;
}
}
);

},








inWin:function(_aoDom)
{
return _aoDom?va(_aoDom):this.cN;
},













ready:function(OM,bA)
{
var al=this;
al.isAccess()&&apk(al.cN,OM,bA);
return al;
},









remove:function()
{
return this.each(wO(function(_aoDom)
{
try{_aoDom.parentNode.removeChild(_aoDom);}catch(cg){}
}
));
},








rewrite:wO(function(eZ)
{
var al=this,
bR=al.cN.document;
bR.open();
bR.write(eZ);
bR.close();
return al;
}
)
}
);






bq.il=
{
apU:function()
{
var fm=document.body,
cJ=document.createElement("div"),
Dx,sW,ki,sG,
aQZ=parseFloat($.$(fm).css("marginTop"))||0,
gj="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div>"
+"<table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";

$.extend(cJ.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});

cJ.innerHTML=gj;
fm.insertBefore(cJ,fm.firstChild);
Dx=cJ.firstChild;
sW=Dx.firstChild;
sG=Dx.nextSibling.firstChild.firstChild;

bq.il.doesNotAddBorder=(sW.offsetTop!==5);
bq.il.doesAddBorderForTableAndCells=(sG.offsetTop===5);

sW.style.position="fixed",sW.style.top="20px";

bq.il.amg=(sW.offsetTop===20||sW.offsetTop===15);
sW.style.position=sW.style.top="";

Dx.style.overflow="hidden",Dx.style.position="relative";
bq.il.aOW=(sW.offsetTop===-5);

bq.il.bVo=(fm.offsetTop!==aQZ);

fm.removeChild(cJ);
fm=cJ=Dx=sW=ki=sG=null;
bq.il.apU=AD;
}













};









































bq.extend("method",
(function()
{
var Dj={};
function aOL(_aoDom,cO,fl,Lo)
{

var MB=[],
eK=_aoDom,
JY,
gB;

while(eK)
{
JY=null;
if(Lo.$(eK).css("display")=="none")
{
JY={};
gB=eK.style;
for(var bM in cO)
{
JY[bM]=gB[bM];
gB[bM]=cO[bM];
}
}
MB.push(eK,JY);
eK=eK.parentNode;
}
gS(fl);

for(var i=MB.length-1;i>0;i-=2)
{
if(MB[i])
{
gB=MB[i-1].style;
for(var bM in cO)
{
gB[bM]=MB[i][bM];
}
}
}
}








function aaa(bz,aRh,aNH,apY)
{
var al=this,
_oDom=al.data(0),
tM=[
aRh?"":"padding",
-1,
aNH?"":"border",
-1,
apY?"margin":"",
1
],
np;

function aqx()
{
var OP;
if(bz.toLowerCase()=='width')
{
np=_oDom.offsetWidth;
OP=["Left","Right"];
}
else
{
np=_oDom.offsetHeight;
OP=["Top","Bottom"];
}
for(var i=tM.length-2;i>=0;i-=2)
{
if(tM[i])
{
for(var j=OP.length-1;j>=0;j--)
{
np+=tM[i+1]*(parseFloat(al.css(tM[i]+OP[j]))||0);
}
}
}
return np;
}

if(_oDom.offsetWidth>0)
{
aqx();
}
else
{
var aPc={
position:"absolute",
visibility:"hidden",
display:"block"
};
aOL(_oDom,aPc,aqx,al);
}
return np;
}


function aQp()
{
var al=this,
eC=al.data(0);
if(!eC||!eC.ownerDocument)
{
return null;
}

if(eC===eC.ownerDocument.body)
{
return null;
}

var tM=eC.getBoundingClientRect(),
bj=al.inWin(eC),
bR=eC.ownerDocument,
fm=bR.body,
jA=bR.documentElement,
Np=jA.clientTop||fm.clientTop||0,
adA=jA.clientLeft||fm.clientLeft||0,
fB=tM.top
+(bj.pageYOffset||bq.support("boxModel")&&jA.scrollTop||fm.scrollTop)
-Np,
gP=tM.left
+(bj.pageXOffset||bq.support("boxModel")&&jA.scrollLeft||fm.scrollLeft)
-adA;
return{top:fB,left:gP};
}
function agL()
{
var al=this,
eC=al.data(0);
if(!eC||!eC.ownerDocument)
{
return null;
}

if(eC===eC.ownerDocument.body)
{
return null;
}
bq.il.apU();
var Yr=eC.offsetParent,
aRK=eC,
bR=eC.ownerDocument,
uM,jA=bR.documentElement,

fm=bR.body,
CU=bR.defaultView,
Iz=CU?CU.getComputedStyle(eC,null):eC.currentStyle,
fB=eC.offsetTop,Aw=eC.offsetLeft;
while((eC=eC.parentNode)&&eC!==fm&&eC!==jA)
{
if(bq.il.amg&&Iz.position==="fixed")
{
break;
}
uM=CU?CU.getComputedStyle(eC,null):eC.currentStyle;
fB-=eC.scrollTop;
Aw-=eC.scrollLeft;

if(eC===Yr)
{
fB+=eC.offsetTop;
Aw+=eC.offsetLeft;

if(bq.il.doesNotAddBorder&&!(bq.il.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(eC.nodeName)))
{
fB+=parseFloat(uM.borderTopWidth)||0;
Aw+=parseFloat(uM.borderLeftWidth)||0;
}

aRK=offsetParent,offsetParent=eC.offsetParent;
}

if(bq.il.aOW&&uM.overflow!=="visible")
{
fB+=parseFloat(uM.borderTopWidth)||0;
Aw+=parseFloat(uM.borderLeftWidth)||0;
}

Iz=uM;
}

if(Iz.position==="relative"||Iz.position==="static")
{
fB+=fm.offsetTop;
Aw+=fm.offsetLeft;
}

if(bq.il.amg&&Iz.position==="fixed")
{
fB+=Math.max(jA.scrollTop,fm.scrollTop);
Aw+=Math.max(jA.scrollLeft,fm.scrollLeft);
}

return{top:fB,left:Aw};
}
Dj.offset="getBoundingClientRect"in document.documentElement?aQp:agL;

function aQR(bz)
{
var kp="scroll"+bz;

Dj[kp]=function()
{
var al=this,
eC=al.data(0),
bj=al.inWin(eC);

if(!eC)
{
return null;
}

return bj?("pageXOffset"in bj)?bj[bz=="Top"?"pageYOffset":"pageXOffset"]:
bq.support("boxModel")&&bj.document.documentElement[kp]||
bj.document.body[kp]:
eC[kp];
};
}
var ok=["Left","Top"];
for(var i=0;i<ok.length;i++)
{
aQR(ok[i]);
}
ok=["Height","Width"];
function aQY(bz)
{
var aS=bz.toLowerCase();

Dj["inner"+bz]=function()
{
var al=this;
return al.size()?gS(al,aaa,[bz,true]):null;
};


Dj["outer"+bz]=function(apY)
{
var al=this;
return al.size()?gS(al,aaa,[bz,true,true,true]):null;
};
Dj[aS]=function()
{

var al=this,
eC=al.data(0);


return(eC&&typeof eC==="object"&&"setInterval"in eC)?

eC.document.compatMode==="CSS1Compat"&&eC.document.documentElement["client"+bz]||
eC.document.body["client"+bz]:

(eC.nodeType===9)?

Math.max(
eC.documentElement["client"+bz],
eC.body["scroll"+bz],eC.documentElement["scroll"+bz],
eC.body["offset"+bz],eC.documentElement["offset"+bz]
):
gS(al,aaa,[aS]);

};
}




for(var i=0;i<ok.length;i++)
{
aQY(ok[i]);

}
return Dj;
}
)()
);



bq.extend("method",
(function()
{
var aoP=/alpha\([^)]*\)/,
aNZ=/z-?index|font-?weight|opacity|zoom|line-?height/i,
aNR=/-([a-z])/ig,
aQB=/opacity=([^)]*)/,
aMn=/([A-Z])/g,
aOn=function(bXZ,aNV)
{
return aNV.toUpperCase();
},

aoB=bq.camelName=function(bz)
{
return bz.replace(aNR,aOn);
}
;

function alv(_aoDom)
{

return!(!_aoDom||_aoDom.nodeType===3||_aoDom.nodeType===8)
}

function aoF(_aoDom,bz)
{
var ahq=_aoDom.style,
CU=va(_aoDom),
AX=_aoDom.currentStyle,
kw;


if(bz==="opacity"&&!bq.support("opacity")&&AX)
{
kw=aQB.test(AX.filter||"")?
(Number(RegExp.$1)/100)+"":"";

return kw===""?"1":kw;
}





if(AX)
{
var aPn=aoB(bz);
kw=AX[bz]||AX[aPn];




}
else if(_aoDom.nodeType!=9)
{
var uM=CU.getComputedStyle(_aoDom,null);
bz=bz.replace(aMn,"-$1").toLowerCase();

kw=uM.getPropertyValue(bz);
bz==="opacity"&&kw===""&&(kw="1");
}

return kw;
}

function YC(_aoDom,bz,hY)
{

if(kD(hY))
{
return;
}
var gB=_aoDom.style||_aoDom;

if(!bq.support("opacity")&&bz==="opacity")
{


gB.zoom=1;

var amB=parseInt(hY,10)+""==="NaN"?"":"alpha(opacity="+hY*100+")",
rJ=gB.filter||aoF(_aoDom,"filter")||"";
gB.filter=aoP.test(rJ)?rJ.replace(aoP,amB):amB;
}
bz=aoB(bz);
if(tl(hY)&&!aNZ.test(bz))
{
hY+="px";
}
_aoDom.style[bz]=hY;
}

function aMs(_aoDom,anX)
{
alv(_aoDom)&&YC(_aoDom,anX[0],anX[1]);
}

function aPL(_aoDom,Ys)
{
if(alv(_aoDom))
{
for(var bM in Ys)
{
Ys.hasOwnProperty(bM)&&YC(_aoDom,bM,Ys[bM]);
}
}
}


return(
{

















css:function(ik,nm)
{
var al=this;

if(kD(nm))
{
if(mG(ik))
{
var _oDom=al.data(0);
if(nk(_oDom))
{
return aoF(_oDom,ik);
}

return bu;
}
else
{
al.each(aPL,{vParam:ik});
}
}
else
{
al.each(aMs,{vParam:arguments});
}

return this;
},







show:function()
{
return this.css("display","");
},







hide:function()
{
return this.css("display","none");
},







toggle:function()
{
return this[this.css("display")=="none"?"show":"hide"]();
},









addClass:function(_asClass)
{
return!kD(_asClass)?this.each(
function(_aoDom)
{
var fK=" "+_aoDom.className+" ";
if(fK.indexOf(" "+_asClass+" ")<0)
{
_aoDom.className+=_aoDom.className?" "+_asClass:_asClass;
}
}
):this;
},








rmClass:function(_asClass)
{
return this.each(
function(_aoDom)
{
if(!kD(_asClass))
{
var fK=" "+_aoDom.className+" ";
fK=fK.replace(" "+_asClass+" "," ");
_aoDom.className=arL(fK);
}
else
{
_aoDom.className="";
}
}
);
},









hasClass:function(_asClass)
{
return!!this.data(0)&&(" "+this.data(0).className+" ").indexOf(" "+_asClass+" ")>-1;
}
}
);
}
)()
);





bq.extend("method",
{






addPageUnloadEvent:function(adz)
{
var al=this,
bj=al.cN;

if(!bj.Wd)
{
bj.Wd=[adz];
bj.onunload&&bj.Wd.push(bj.onunload);
bj.onunload=function()
{
var axa=bj.Wd;

for(var i=axa.length-1;i>-1;i--)
{
gS(bj,axa[i]);
}
};
}
else
{
bj.Wd.push(adz);
}
return al;
},









































addEvent:ON(NL,anH,false),


























delEvent:ON(apz,aQf),










event$:function(aad)
{
return this.$(aPa(aad));
},


























fireEvent:ON(aOv),













































on:ON(NL,anH,true),









stopPropagation:function(_aoEvent)
{
if(_aoEvent)
{
_aoEvent.stopPropagation?_aoEvent.stopPropagation()
:(_aoEvent.cancelBubble=true);
}
return this;
},








preventDefault:function(_aoEvent)
{
if(_aoEvent)
{
_aoEvent.preventDefault?_aoEvent.preventDefault()
:(_aoEvent.returnValue=false);
}

return this;
},








target:function(_aoEvent)
{
return _aoEvent&&(_aoEvent.srcElement||_aoEvent.target);
}
}
);





bq.extend("method",
(function()
{
var aNY=/(\?|&)r=.*?(&|$)/,
aOt=/\?/,

XX=0,

YS=
{
bAsync:true,
bCache:true,
sContentType:"application/x-www-form-urlencoded",
bGlobal:true,
nTimeout:5000,
sType:"GET",




ongetxhr:aF.XMLHttpRequest&&(aF.location.protocol!=="file:"||!aF.ActiveXObject)
?function(XZ)
{
return new(XZ||aF).XMLHttpRequest();
}
:wO(
function(XZ)
{
return new(XZ||aF).ActiveXObject("Microsoft.XMLHTTP");

}
)
},
aqg=
{
xml:"application/xml, text/xml",
html:"text/html",
script:"text/javascript, application/javascript",
json:"application/json, text/javascript",
text:"text/plain",
zL:"*/*"
},
aPf="|onbeforesend|oncomplete|ondatafilter|onerror|onsuccess|";


function Mk(hY,aE,GU)
{
var amu=tl(GU),

eN=amu?hY.name:GU,
Ao=amu?hY.value:hY;
!kD(eN)&&aE.push(aqb(eN)+"="
+aqb(iv(Ao)
?wO(Ao,"ajax build data : "+eN+" func")():Ao));
}


function apL(cs,adh)
{
return cs+(aOt.test(cs)?"&":"?")+adh;
}


function aOw(eA,aSv)
{
var al=this,
aO=[];

if(mG(eA))
{
aO.push(eA);
}
else if(Jk(eA)||wM(eA))
{
al.each(eA,Mk,{vParam:aO});
}

return aO.join("&");
}


function aOB(hk,aS,cG)
{
var Pb=hk.getResponseHeader("content-type")||"",
aoq=aS==="xml"||!aS&&Pb.indexOf("xml")>=0,
gI=aoq?hk.responseXML:hk.responseText;

aoq&&gI.documentElement.nodeName==="parsererror"&&wQ("parsererror");


cG&&iv(cG.ondatafilter)&&(gI=cG.ondatafilter(gI,aS));


if(mG(gI))
{

if(aS==="json"||!aS&&Pb.indexOf("json")>=0)
{

}

else if(aS==="script"||!aS&&Pb.indexOf("javascript")>=0)
{

}
}

return gI;
}


function alR(_aoEvent)
{
var apP=false;
for(var bM in _aoEvent)
{

if(iv(_aoEvent[bM])&&aPf.indexOf("|"+bM+"|")!=-1)
{
apP=true;
break;
}
}
return apP;
}


function aPq(hk)
{
try
{
return!hk.status&&location.protocol==="files:"
||(hk.status>=200&&hk.status<300)
||hk.status===304

||hk.status===1223

||hk.status===0;
}
catch(cg){}

return false;
}


function Zk(tQ,aS,aph)
{
var anK=aph||"onsuccess",
cA=
{
sUrl:tQ[0],
sType:aS
},
mr=tQ[1],
uD=tQ[2];

if(iv(mr))
{
cA[anK]=mr;
cA.sDataType=uD;
}

else if(alR(mr))
{
rc(cA,mr,{sDataType:uD});
}
else if(alR(uD))
{
rc(cA,uD,{vData:mr,sDataType:tQ[3]});
}
else
{
cA.vData=mr;
cA[anK]=uD;
cA.sDataType=tQ[3];
}

return cA;
}

return(
{
































ajax:function(cG)
{
var al=this,
cA=rc({},YS,cG),
gu=cA.oContext||cA,
cj=cA.sType.toUpperCase(),
by=cA.sUrl,
ma=aOw.call(al,cA.vData,cA.sContentType),
HZ=false,
ir,YA,lA,gZ,hC;

if(!by)
{
return al;
}


if(cA.bCache===false&&cj==="GET")
{
var aoL="r="+rn(),
SU=by.replace(aNY,"$1"+aoL+"$2");
by=by===SU?apL(SU,aoL):SU;
}

ma&&cj==="GET"&&(by=apL(by,ma));

if(!(gZ=gS(cA.ongetxhr,[al.cN])))
{
return al;
}


cA.bGlobal&&!XX++&&AG("start");
gZ.open(cj,by,cA.bAsync);


try
{
(ma||cG&&cG.sContentType)
&&gZ.setRequestHeader("Content-Type",cA.sContentType);

gZ.setRequestHeader("Accept",[cA.sDataType&&aqg[cA.sDataType],
aqg.zL].join(", "));
}
catch(cg)
{
}

if(gS(gu,cA.onbeforesend,[gZ])===false)
{

cA.bGlobal&&!--XX&&AG("stop");
gZ.abort();
return al;
}


cA.bGlobal&&AG("send");


gZ.onreadystatechange=NP;



try
{
var aNX=gZ.abort;
gZ.abort=function()
{
gZ&&aNX.call(gZ);
NP("abort");
};
}
catch(cg){}


if(cA.bAsync&&cA.nTimeout>0)
{
hC=setTimeout(
function()
{

gZ&&!HZ&&NP("timeout");
},
cA.nTimeout
);
}


try
{
gZ.send(cj!="GET"?ma:bu);
}
catch(lA)
{
ir="senderr";
aoe();
Yt();
}


!cA.bAsync&&NP();


function AG(hq,um)
{
al.event$("ajax").fireEvent(hq,um,{oContext:gu});
}


function Yt()
{

!!hC&&(clearTimeout(hC)||1)&&(hC=0);

gS(gu,cA.oncomplete,[gZ,ir]);

cA.bGlobal&&AG("complete",[gZ,ir]);

cA.bGlobal&&!--XX&&AG("stop");

}


function aoe()
{
gS(gu,cA.onerror,[gZ,ir,lA]);

cA.bGlobal&&AG("error",[gZ,ir,lA]);
}


function aQi()
{
gS(gu,cA.onsuccess,[YA,ir,gZ]);

cA.bGlobal&&AG("success",[YA,ir,gZ]);
}

function NP(NC)
{

if(!gZ||gZ.readyState===0||NC==="abort")
{
HZ=true;
gZ&&(gZ.onreadystatechange=AD);



!HZ&&Yt();
}

else if(!HZ&&gZ&&(gZ.readyState===4||NC==="timeout"))
{
HZ=true;
gZ.onreadystatechange=AD;
ir=NC==="timeout"?
"timeout":
!aPq(gZ)?"error":"success";

if(ir==="success")
{
try
{
YA=aOB(gZ,cA.sDataType,cA);
}
catch(aAy)
{
ir=aAy.type||"parsererror";
lA=aAy;
}
}

(ir==="success"?aQi:aoe)();

Yt();
NC==="timeout"&&gZ.abort();

cA.bAsync&&(gZ=bu);
}
}

return al;
},










ajaxSetting:function(cG)
{
var Ck=this;
cG?rc(YS,cG):(Ck=YS);
return Ck;
},

















get:function()
{
return this.ajax(Zk(arguments,"GET"));
},















load:function()
{
var al=this,
Ak;

al.each(function(bQ)
{
if(nk(bQ))
{
Ak=bQ;
return false;
}
}
);

if(!Ak)
{
return al;
}

var xh=Zk(arguments,"GET","oncomplete"),

aPF=xh.onsuccess;

return al.ajax(rc(xh,
{
sDataType:"html",
onsuccess:function()
{
Ak.innerHTML=amo(arguments[0]);
gS(this,aPF,arguments);
}
}
));
},




















loadJS:function(vk,cG,aDk)
{
var al=this,
bj=al.cN,
Cf=al.$("<script>"),
NJ=Cf.data(0),
qi=function(Bb,aMT)
{
if(hC!=0)
{
bj.clearTimeout(hC);
hC=0;

aMT
?bj.setTimeout(function(){gS(NJ,cG,"onload",[!!Bb]);},100)
:gS(NJ,cG,"onload",[!!Bb]);
if(cG.bNeedRemove===true)
{
Cf.remove();
}
}
},
hC=bj.setTimeout(function()
{
qi(false);
Cf.remove();
},

tl(cG&&cG.nTimeout)?cG.nTimeout:10000
);

al.each(aDk,function(DK,eb)
{
!kD(DK)&&NJ.setAttribute(eb,DK);
}
)
.$("head").append(
rc(NJ,
{
type:"text/javascript",
src:vk,
onload:qi,
onreadystatechange:function()
{
({loaded:true,complete:true}[this.readyState])&&qi(true,true);
}
}
)
);

return al;
},

















post:function()
{
return this.ajax(Zk(arguments,"POST"));
}
}
);
}
)()
);





bq.extend("method",
(function()
{







function EA(nx,uP,aS)
{
var al=this;
al.Ki=nx.join?nx.join(""):nx.toString();
al.CD=uP||"$";
al.arR=aS=="exp"
?al.atb
:al.aqS;
};

EA.prototype=
{








toString:function()
{
return this.Ki;
},







replace:function(nr,wT)
{
return this.arR(nr,wT);
},





aqS:function(nr,asP)
{

var al=this,
yt=al.CD,
uT=al.Xb,
Kz=al.asi,
VY=!uT;

if(VY)
{

uT=al.Xb=al.Ki.split(al.CD);
Kz=al.asi=al.Xb.concat();
}

for(var i=1,_nLen=uT.length;i<_nLen;i+=2)
{
Kz[i]=al.uB(VY?(uT[i]=uT[i].split("."))
:uT[i],nr,asP,yt);
}

return Kz.join("");
},

atb:function(nr,wT)
{
var al=this,
uz;

if(!al.Wm)
{
al.atW();
}

if(wT)
{
var CF=al.WW[wT];
if(CF)
{
uz=typeof CF!="function"
?al.WW[wT]=al.Xu(CF)
:CF;
}
}
else
{
uz=al.Wm;
}

try
{
return uz&&uz(nr,al.aiw,
al.uB,al.CD,RA)||"";
}
catch(cg)
{
return cg.message;
}
},




atW:function()
{
var al=this,
nu=0,
kL=[],
Kp=[],
Kw=[],
asv=al.WW=[],
yt=al.CD,
pX=new RegExp(["","(.*?)",""].join(ZF(yt)),"g"),
yV="_afG('$1'.split('.'),_oD,_aoD,_aoR)",
EE=al.aiw=al.Ki.split(["","@",""].join(yt)),
hp;

for(var i=0,_nLen=EE.length;i<_nLen;i++)
{
hp=EE[i];

if(i%2==0)
{
kL.push("_oR.push(_aoT[",i,"].replace(_oD,_aoD));");
EE[i]=new EA(hp,yt);
}
else if(hp=="else")
{
kL.push("}else{");
}
else if(hp=="endsec")
{
if(Kw.length)
{
var aO=Kw.pop();
asv[aO[0]]=kL.slice(aO[1]);
}
}
else if(hp=="endfor")
{
Kp.length&&kL.push(
"try{delete _oD._parent_;delete _oD._idx_;}catch(e){}",
"}_oD=_oS",Kp.pop(),";");
}
else if(hp=="endif")
{
kL.push("}");
}
else if(hp.indexOf("else if(")==0)
{
kL.push("}",hp.replace(pX,yV),"{");
}
else if(hp.indexOf("if(")==0)
{
kL.push(hp.replace(pX,yV),"{");
}
else if(hp.indexOf("for(")==0)
{
Kp.push(++nu);
kL.push(
"var _sI",nu,",_oD",nu,",_oS",nu,"=_oD;",
hp.replace(pX,
["_sI",nu," in (_oD",nu,"=",yV,")"].join("")),
"{",
"_oD=_oD",nu,"[_sI",nu,"];",
"try{",
"_oD._parent_=_oS",nu,";",
"_oD._idx_=_sI",nu,";",
"}catch(e){}"
);
}
else if(hp.indexOf("sec ")==0)
{
Kw.push([hp.split(" ").pop(),kL.length]);
}
else if(hp.indexOf("eval ")==0)
{
kL.push("_oR.push(",hp.substr(5).replace(pX,yV),");");
}
else if(hp.indexOf("html(")==0)
{
kL.push("_oR.push(_afE(",hp.substr(5).replace(pX,yV),");");
}
}


al.Wm=al.Xu(kL);

return kL;
},

Xu:function(ase)
{
try
{
return eval(
[
'([function(_aoD,_aoT,_afG,_aoR, _afE){var _oR=[],_oD=_aoD;',
ase.join(""),
'return _oR.join("");}])'
].join("")
)[0];
}
catch(lA)
{
return function(){return"compile err!"};
}
},

uB:function(KC,nr,arC,akj)
{
var _nLen=KC.length,
eN,
mF;

if(_nLen>1)
{
try
{
mF=nr;
for(var i=0;i<_nLen;i++)
{
eN=KC[i];
if(eN=="_root_")
{
mF=arC;
}
else
{
mF=mF[eN];
}
}
}
catch(cg)
{
mF="";
}
}
else
{
mF={
"_var_":akj,
"_this_":nr
}[eN=KC[0]]||nr[eN];
}

return mF;
}
};


return(
{









T:function(nx,uP)
{
return new EA(nx,uP);
},












































TE:function(nx,uP)
{
if(aF.QMTmplChecker)
{
var cg=(new aF.QMTmplChecker(nx.join?nx:[nx],
uP)).getErrors();
cg.length&&aF.debug&&aF.debug(cg.join("\n"),"code");
}
return new EA(nx,uP,"exp");
}
}
);
}
)()
);






bq.extend("method",
(function()
{
function aqz(aPx)
{
return function(CX,pt,bA)
{
var al=this;
return iv(CX)&&al.cN[aPx](
function()
{
al.call((bA&&bA.oContext)||al,CX,bA&&bA.oParam);
},
pt
)||-1;
};
}

return(
{







canLoop:IQ,













setInterval:aqz("setInterval"),













setTimeout:aqz("setTimeout"),








eval:function(lc)
{
if(lc&&aPR.test(lc))
{


var bR=this.cN.document,
Jd=bR.getElementsByTagName("head")[0]||bR.documentElement,
mH=bR.createElement("script");

mH.type="text/javascript";

if(this.support("scriptEval"))
{
mH.appendChild(bR.createTextNode(lc));
}
else
{
mH.text=lc;
}



Jd.insertBefore(mH,Jd.firstChild);
Jd.removeChild(mH);
}

return this;
},










evalVal:function(lc)
{
var eN="_gEVaLvAl_",
bj=this.cN,
mF;
lc&&this.eval("(function(){try{window."+eN+"="+lc+";}catch(_oError){}})();");
mF=bj[eN];
bj[eN]=bu;
return mF;
},












extend:rc,











extendEx:uN(gS),








filteScript:amo,






noop:AD,








isAccess:function()
{
return AM(this.cN);
},








isArr:Jk,








isDom:nk,








isFunc:iv,








isNull:kD,








isNum:tl,








isObj:wM,








isStr:mG,








isAccessWin:AM,







now:rn,








random:amG,








regFilter:ZF,








statTime:function(aS)
{
var al=this,
nB=rn();
aS!="reset"&&IT([aS,nB-aiI].join(":"));
aiI=nB;
return al;
},








toArr:CV,









toMap:aPd,









toNum:aSg,








toStr:anQ,








unikey:XB,








unique:Dm,








trim:arL,








htmlEncode:RA,








htmlDecode:function(ec)
{
return ec&&ec.replace?(ec.replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">")
.replace(/&quot;/gi,"\"").replace(/&#39;/gi,"'").replace(/&amp;/gi,"&")
):ec;
},









getAsiiStrLen:function(ec)
{
return(ec||"").replace(/[^\x00-\xFF]/g,"aa").length;
},











subAsiiStr:function(ec,BP,aji,Xk)
{
var al=this,
Oi=function(gy){return gy},
Qc=Xk?al.htmlEncode:Oi,
iu=(Xk?al.htmlDecode:Oi)(al.trim((ec||"").toString())),
Jn=aji||"",
abT=Math.max(BP-Jn.length,1),
ajR=iu.length,
Fm=0,
Ex=-1,
yW;

for(var i=0;i<ajR;i++)
{
yW=iu.charCodeAt(i);


Fm+=yW==35||yW==87
?1.2
:(yW>255?1.5:1);

if(Ex==-1&&Fm>abT)
{
Ex=i;
}

if(Fm>BP)
{
return Qc(iu.substr(0,Ex))+Jn;
}
}

return Qc(iu);
},








isUrl:function(gy)
{
return(gy||"").replace(
/(((http|https|ftp):\/\/)|www\.)[-\w.]+(:\d+)?(\/([\w\/_=.%-]*(\?[^\s\u4e00-\u9fa5]+)?)?)?/ig,"url")=="url";
},












wait:function(atH,abf,Oc,zB)
{
var al=this,
kK=0,
Ay=Oc||500,
arN=(zB||10*500)/Ay;

(function()
{
if(gS(al,atH))
{
return gS(al,abf,[true]);
}

if(kK++>arN)
{
return gS(al,abf,[false]);
}

setTimeout(arguments.callee,Ay);
}
)();

return al;
}
}
);
}
)()
);





bq.extend(
"method",
(function()
{

function atz()
{
return document.domain;
}

return(
{












setCookie:function(bz,dM,vC,gc,qo,Am)
{
bz&&(document.cookie=this.T(
[
'$name$=$value$; ',
!vC?'':'expires=$expires$; ',
'path=$path$; ',
'domain=$domain$; ',
!Am?'':'$secure$'
]
).replace(
{
name:bz,
value:encodeURIComponent(dM||""),
expires:vC&&vC.toGMTString(),
path:gc||'/',
domain:qo||atz(),
secure:Am?"secure":""
}
)
);

return this;
},








getCookie:function(bz)
{
return(new RegExp(["(?:; )?",ZF(bz),"=([^;]*);?"].join("")))
.test(document.cookie)&&decodeURIComponent(RegExp["$1"]);
},










delCookie:function(bz,gc,qo)
{
return this.setCookie(bz,"",new Date(0),gc,qo);
}
})
}
)()

);




bq.extend("method",
(function()
{
var aEM=
{27:'esc',9:'tab',32:'space',10:"enter",13:'enter',8:'backspace',145:'scroll',
20:'capslock',144:'numlock',19:'pause',45:'insert',36:'home',46:'del',
35:'end',33:'pageup',34:'pagedown',37:'left',38:'up',39:'right',40:'down',
107:'=',109:'-',
112:'f1',113:'f2',114:'f3',115:'f4',116:'f5',117:'f6',118:'f7',119:'f8',
120:'f9',121:'f10',122:'f11',123:'f12',188:'<',190:'>',
191:'/',192:'`',219:'[',220:'\\',221:']',222:'\''




},
agZ=
{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&",
"8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":"\"",",":"<",
".":">","/":"?","\\":"|"
};

function aOM(FX)
{
return FX>=49&&FX<=90;

}


function Kv(Ng)
{
return(Ng||"").toLowerCase().split("+").sort().join("").replace(/\s/ig,'');
}

return{







hotKey:function(_aoEvent)
{
var gA=_aoEvent.keyCode,
Ee=aEM[gA],
Ob=!Ee&&aOM(gA)&&String.fromCharCode(gA).toLowerCase(),
aaA=_aoEvent.ctrlKey,
Ss=_aoEvent.shiftKey,
Zw=_aoEvent.altKey,
agg=Ss&&(agZ[Ob]||agZ[Ee]),
bD=[];

if(!aaA&&!Zw&&agg)
{
Ee=agg;
Ss=Ob=null;
}

aaA&&bD.push("ctrl");
Ss&&bD.push("shift");
Zw&&bD.push("alt");
Ee&&bD.push(Ee);
Ob&&bD.push(Ob);

return bD.join("+");
},









isHotKey:function(_aoEvent,Ng)
{
return(Kv(this.hotKey(_aoEvent))==Kv(Ng));
}
};
}
)()
);





bq.extend("method",
(function()
{
var ND="_aNi_",
aot="_qUEuE_",
Ny="processing",
amj="_step_event_",
aQP=/^([+-]=)?([\d+-.]+)(.*)$/,

Ie={slow:600,fast:200,zL:400},
alj="swing",
Yq=bq.easing=
{
linear:function(p,n,f,d)
{
return f+d*p;
},
swing:function(p,n,f,d)
{
return((-Math.cos(p*Math.PI)/2)+0.5)*d+f;
}
},
alO=
{
opacity:function(tj)
{
tj.gq.css("opacity",tj.Dg);
},

zL:function(tj)
{
tj.gq.css(tj.CT,
(tj.CT==="width"||tj.CT==="height"?
Math.max(0,tj.Dg):tj.Dg)+tj.amY
);
}
},

uF=[],

Mj=0
;


function Dt(bQ,fP)
{
if(wM(bQ))
{
var al=this,
Ar=fP[0]||ND,
Oe=fP[1],
Yk=bQ[aot]=(bQ[aot]||{});
mE=Yk[Ar];

if(Oe==="clear")
{
if(mE)
{
if(mE[0]===Ny)
{
mE.length=1;
}
else
{
delete Yk[Ar];
}
}
}
else if(Oe==="shift")
{
var NY=mE&&mE.shift();


if(NY===Ny)
{
NY=mE.shift();
}

if(NY)
{

Ar===ND&&mE.unshift(Ny);


gS(al,NY,
[
bQ,
function()
{
Dt.call(al,bQ,[Ar,"shift"]);
}
]
);
}
}
else if(Oe==="len")
{
return mE?mE.length:0;
}
else
{
!mE&&(mE=Yk[Ar]=[]);
mE.push(Oe);


if(Ar===ND&&mE[0]!==Ny)
{
Dt.call(al,bQ,[Ar,"shift"]);
}
}
}
}


function nF(DK,ajp)
{
return ajp(DK)?DK:bu;
}


function aQm(bWX,NU,apG,pH)
{
var gG=wM(NU)?NU:
{
vDuration:NU,
sEasing:nF(apG,mG),
oncomplete:nF(pH,iv)||nF(apG,iv)||
nF(NU,iv)
},
aoZ=gG.oncomplete;

gG.kY=tl(gG.vDuration)?gG.vDuration:
Ie[gG.vDuration]||Ie.zL;

gG.oncomplete=function()
{


iv(aoZ)&&this.call(aoZ);
gG.bQueue!==false&&this.dequeue();
};

return gG;
}

function aaw(Zp,apv)
{
var mX=aQP.exec(Zp),
lS,xn;

if(mX)
{
lS=parseFloat(mX[2]);
mX[1]&&(lS=((mX[1]==="-="?-1:1)*lS)+apv);
xn=mX[3];
}
else if(Zp)
{
lS=parseFloat(Zp);
}
else
{
lS=apv;
}

return{lS:lS,xn:xn};
}


function apB(gh,Iq,apn)
{
var al=this,
aPy=Iq.NQ[apn],
aPX=Iq.sEasing||alj;

al.gq=gh;
al.apQ=Iq;
al.CT=apn;
al.aMB=Yq[aPy]||
Yq[aPX]||
Yq[alj];
}


apB.prototype=
{
aMk:function()
{
var al=this,
lS=parseFloat(al.gq.css(al.CT));

return lS&&lS>-10000?lS:0;
},


zn:function(xm,avg,aRV)
{
var al=this;

al.afh=rn();
al.Od=xm;
al.anh=avg;
al.Dg=al.Od;
al.amY=aRV||al.amY||"px";
al.YQ=al.mnState=0;

function aag(uR)
{
return al.ZM(uR);
}

aag._oDom=al.gq.data(0);

aag()&&uF.push(aag)&&!Mj&&
(Mj=setInterval(aDq,13));
},


ZM:function(uR)
{
var al=this,
gG=al.apQ,
kY=gG.kY,
kK=rn(),
amN=true;

if(uR||kK>=kY+al.afh)
{
var tf=gG.tf;

al.Dg=al.anh;
al.YQ=al.km=1;
al.yi();

tf[al.CT]=true;


for(var i in tf)
{
if(tf[i]!==true)
{
amN=false;
break;
}
}

if(amN)
{

!kD(gG.ZO)&&
al.gq.css("overflow",gG.ZO);


al.gq.call(gG.oncomplete);
}

return false;
}
else
{
var Db=kK-al.afh;

al.km=Db/kY;
al.YQ=al.aMB(
al.km,Db,0,1,kY);
al.Dg=al.Od+
((al.anh-al.Od)*al.YQ);

al.yi();

return true;
}
},


yi:function()
{
var al=this,
lo=al.CT;

if(lo===amj)
{
al.gq.call(al.apQ.onstep,[al.Dg,al.km]);
}
else
{
(alO[lo]||alO.zL)(al);
(lo==="height"||lo==="width")&&
al.gq.css("display","");
}
}
}

function aDq()
{
for(var i=0;i<uF.length;i++)
{
!uF[i]()&&uF.splice(i--,1);
}

!uF.length&&aDa();
}



function aDa()
{
clearInterval(Mj);
Mj=0;
}



var
Ie={
slow:600,
fast:200,
zL:400
},
aSa=/^([+-]=)?([\d+-.]+)(.*)$/,
IN="_fxCallback_",
NM="_fxTimeId_";

function aPU(sP,wB,tD){
var	al=this,
fc=sP&&typeof sP==="object"?
sP:
{
oncomplete:tD||!tD&&wB||
al.isFunc(sP)&&sP,
duration:sP,
wB:tD&&wB||wB&&typeof wB==="string"&&wB||"linear"
};

fc.duration=typeof fc.duration==="number"?fc.duration:
Ie[fc.duration]||Ie.zL;


fc.old=fc.oncomplete;
fc.oncomplete=function(){
var al=this;
if(fc.queue!==false){
al.dequeue();
}
if(al.isFunc(fc.old)){
fc.old.call(al);
}
};

return fc;
}




return(
{












queue:function(aS,CX)
{
if(!mG(aS))
{
CX=aS;
aS=ND;
}

return iv(CX)?this.each(Dt,{vParam:[aS,CX]}):this;
},








queueLen:function(aS)
{
return Dt(this.data(0),[aS,"len"]);
},











dequeue:function(aS)
{
return this.each(Dt,{vParam:[aS,"shift"]});
},











clearQueue:function(aS)
{
return this.each(Dt,{vParam:[aS,"clear"]});
},





























animate:function()
{
var al=this,
cM=arguments,
AL=cM[0],
alV=aQm.apply(al,cM);

return al[alV.bQueue===false?"each":"queue"](
function(_aoDom)
{
var al=this.$(_aoDom),
tf={},
NQ={},
gG=al.extend(
{
tf:tf,
NQ:NQ
},
alV
),
lo,NO,Zh;

for(lo in AL)
{
NO=bq.camelName(lo);

if(lo!==NO)
{
AL[NO]=AL[lo];
delete AL[lo];
lo=NO;
}

if((lo==="height"||lo==="width")&&_aoDom.style)
{

gG.ZO=al.css("overflow");
}

if(Jk(Zh=AL[lo]))
{
NQ[lo]=Zh[1];
AL[lo]=Zh[0];
}

tf[lo]=AL[lo];
}

if(gG.ZO!=bu)
{
al.css("overflow","hidden");
}


iv(gG.onstep)&&(tf[amj]=1);


if(al.call(gG.onready)===false)
{
gG.kY=0;
}

al.each(tf,function(hY,bz)
{
var Zd=new apB(al,gG,bz),
NT=Zd.aMk()||0,
Lg=anQ(hY).split(","),
Sp,Bs;

if(Lg.length>1)
{
Sp=aaw(Lg[0],NT);
Bs=aaw(Lg[1],NT);
Zd.zn(Sp.lS,Bs.lS,Sp.xn||Bs.xn);
}
else
{
Bs=aaw(Lg[0],NT);
Zd.zn(NT,Bs.lS,Bs.xn);
}
}
);
}
);
},









stop:function(Yd,uR)
{
var al=this;

Yd&&al.clearQueue();

al.each(function(_aoDom)
{

for(var i=uF.length-1;i>=0;i--)
{
if(uF[i]._oDom===_aoDom)
{

uR&&uF[i](true);
uF.splice(i,1);
}
}
}
);


!uR&&this.dequeue();

return this;
},


animate2:function(Du,sP,wB,tD)
{
var rM=[],bM,anj,aba,
fc=aPU(sP,wB,tD);

for(bM in Du)
{
rM.push(bM);
}
anj=rM.join(", ");

return this[fc.queue===false?"each":"queue"]
(
function(_aoDom)
{
var al=this.$(_aoDom);

fc.onready&&fc.onready.call(al);

for(bM in Du)
{
var parts=aSa.exec(Du[bM]);
if(parts&&parts[1])
{
var end=parseFloat(parts[2]),
start=parseFloat(al.css(bM))||0,
unit=parts[3];

end=((parts[1]==="-="?-1:1)*end)+start;
Du[bM]=end+unit;
}
}
al.css
(
{
"webkitTransitionProperty":anj,
"webkitTransitionDuration":fc.duration+"ms",
"webkitTransitionTimingFunction":fc.easing
}
)
aba=window.setTimeout
(
function()
{
al
.css("webkitTransitionProperty","none");
fc.oncomplete.call(al);
al.data(0)[IN]=bu;
al.data(0)[NM]=bu;
},
fc.duration
);

al.data(0)[IN]=fc.oncomplete;
al.data(0)[NM]=aba;

al.css("display")=="none"&&
al.css("display","block");

al.cN.setTimeout(
function()
{
for(bM in Du){
al.css(bM,Du[bM]);
}
},0
);
}
);
return al;
},

stop2:function(Yd,uR)
{
var al=this;
if(Yd)
{
al.queue([]);
}

al.each(
function(_aoDom)
{
var
bc=al.$(_aoDom),
anw=bc.css("webkitTransitionProperty"),
rM=anw&&anw.split(",")||[],
ij={};

for(var i=0;i<rM.length;i++)
{
var name=al.trim(rM[i]);
ij[name]=bc.css(name,!uR);
}

ij["webkitTransitionProperty"]="none";

for(var i in ij)
{
bc.css(i,ij[i]);
}

if(uR&&bc.data(0)[IN])
{
bc.data(0)[IN]();
}
al.cN.clearTimeout(bc.data(0)[NM]);
bc.data(0)[IN]=bu;
bc.data(0)[NM]=bu;
bc.dequeue();
}
);
return al;
}


}
);
}
)()
);





bq.extend("instance",
function(aF)
{

aF.debug=function()
{
return IT.apply(aF.QMWin,arguments);
};


aF.onerror=function(cf,cs,Xo)
{

var kY=rn()-wQ.aQu;

if(!tl(kY)||kY>100||kY<0)
{
aqw(
{
oErr:(
{
message:cf,
fileName:cs,
number:Xo
}
),
fFunc:arguments.callee.caller
}
);
}

return Bd<OU;
};


try
{
aF.document.execCommand("BackgroundImageCache",false,true);
}
catch(cg)
{
}


if(aF.attachEvent&&!aF.addEventListener)
{
var bdW=aF.QMWin.toMap(
'location|name|status|title|defaultStatus'.split("|"),true);
aF.QMWin.addPageUnloadEvent(function()
{
for(var i in aF)
{
try
{

!bdW[i]&&(aF[i]=null);
}
catch(Sj){}
}
}
);
}
}
);


Dc(aF);

}
)(window);









(function(aF,bu)
{
var 
ow="QMFW/11.01.08",

ay=aF.QMWin,

bq=ay.ctor_(),

xe=bq.prototype,

bH=ay.cfg_(),

uN=xe.fnCreater_;





bq.extend("version",ow);





bq.extend("method",
{






uin:function()
{
return this.toNum(bH.sUin,0);
},







encryptuin:function()
{
return bH.sEncryptUin||"0";
},








path:function(aS)
{
return this.isNull(aS)?bH.oPath:bH.oPath[aS]||"";
},







sid:function()
{
return bH.sSid;
},






from:function()
{
return bH.sFrom||"ml";
},










suffix:function(pa)
{
var mS=pa;

if(bq.CFG_DBG_TYPE>bq.DBG_DEV_TYPE)
{
mS+=(mS.indexOf("?")>-1?"&":"?")+"r="+this.random();
}
return mS;
}
}
);










bq.debug=function()
{
var cM=arguments,
Yf=cM[cM.length-1];


if(ay.isNum(Yf)&&Yf>1000000)
{
cM=Yf==ay.uin()?
ay.toArr(cM).slice(0,-1):bu;
}

return cM;
};





bq.extend("method",
{








package:adp,








pkgStatus:aoi,












loadPkg:function(Yc,eg)
{
var al=this,
cD=eg;
al.isFunc(cD.onload)&&(cD=
{
adJ:al.cN["_guid_"],
onload:function()
{
cD.adJ===al.cN["_guid_"]
&&al.call(eg.onload,arguments);
}
}
);

aMe(al.canLoop(Yc)?Yc:[Yc],cD);
return al;
}
}
);





bq.extend("method",
{












run:function(ib,lq)
{
var al=this,
Yi=al.cN[ZC];
return al.callEx(Yi,ib,lq);
},
























createApp:anr,
























createAppEx:uN(anr),
















main:function(lq)
{
var al=this,
bj=al.cN;
if(!bj[ZC])
{
al.loadPkg(lq.oPkg,
{
onload:al.safeByConf(
function(cq,cf)
{
if(cq)
{
var Yi=lq.sApp?YR[lq.sApp]:lq.fApp;
bj[ZC]=new Yi(bj,lq.oCfg)
}
al.call(lq.oncomplete,arguments);
},
"main_onload_func"
)
}
);
}
return al;
},













lib:amI,









libEx:uN(amI),














createLib:aql,














createLibEx:uN(aql),



























ctrl:anb,























ctrlEx:uN(anb),














createCtrl:anF,














createCtrlEx:uN(anF)
}
);








var
aMi=
[

"none",

"load fail",

"compile err",

"cycle dependent err",

"waiting",

"loading",

"loaded",

"complete"
],

jU={},





aOr=bq.CFG_DBG_TYPE>bq.DBG_DEV_TYPE,
anU=bq.CFG_DBG_TYPE>bq.DBG_ERR_TYPE,
aQG=aOr,

Jj=xe.safe(function(FV,cq,nE,Dy)
{
ay.call(FV,[cq,nE,Dy]);
},
"pkg onload"
);

function ama(AH,ee)
{
var De=AH.apK||(AH.apK=[]);
ay.isFunc(ee)&&De.push(ee);
return De;
}

function aQk(iy,Oz)
{
var Hw=Oz.ani;
if(!Hw)
{
Hw=Oz.ani={};
Hw[Oz.tA]=true;
}

if(Hw[iy]===true)
{

pW(IP(iy),3);
Hb(Oz,false,II(iy),3);
}
else
{
IP(iy).ani=ay.extend(
{bZB:true},Hw);
}
}

function Hb(AH,cq,nE,Dy)
{
var De=AH.apK;
if(De)
{
while(De.length>0)
{
Jj(De.shift(),cq,nE,Dy);
}
}
}

function II(iy,cf)
{
return["[",iy,"] ",cf||aoi(iy),"; "].join("");
}

function IP(iy)
{
return iy?
(jU[iy]||(jU[iy]={tA:iy})):

{aqc:7};
}

function aoi(iy)
{
return aMi[pW(IP(iy))];
}

function pW(AH,amF)
{
return bu===amF
?AH.aqc||0
:AH.aqc=amF;
}




function amn(iy,eg)
{
var jU=IP(iy),
cD=eg||{};

switch(pW(jU))
{

case 0:

case 1:
var kg=ay.path("js"),
mS=ay.suffix(iy),
cD=ay.extend({},eg);

pW(jU,5);
ama(jU,cD.onload);

cD.onload=function(bli)
{


if(pW(jU)==5)
{
pW(jU,1);
Hb(jU,false,II(iy));
}
};


ay.loadJS(kg+mS,cD,{charset:bH.sCharSet});
break;

case 2:

case 3:
Jj(cD.onload,false,II(iy));
break;

case 4:

case 5:

case 6:
ama(jU,cD.onload);
break;

case 7:
Jj(cD.onload,true);
break;
default:
Jj(cD.onload,false,II(iy,"statusid err:"
+pW(jU)));
break;
}
}




function aMe(ZX,eg)
{
var cD=eg||{},
qE=ZX.length,
mw=true,
PU=[],
Zr;
ay.each(ZX,amn,
{
vParam:ay.extend({},cD,
cD.onload?{
onload:function(cq,nE)
{
mw=cq&&mw;
nE&&PU.push(nE);
if(--qE==0)
{
Zr=PU.join(" || ");

anU&&!cq&&debug(
"load pkg["+ZX+"] error:"+Zr);

Jj(cD.onload,mw,Zr);
}
}
}:bu
)
}
);
}




function adp(iy,aNB,aoc)
{
var jU=IP(iy),
Yv=aNB||[],
aNP=Yv.length;

if(pW(jU)<6)
{
function aoT(cq,nE,Dy)
{
if(!cq)
{

pW(jU,Dy||1);
Hb(jU,false,II(iy)+nE,Dy||1);
}

else if(--aNP<0)
{
try
{

aoc();
pW(jU,7);
Hb(jU,true);
}
catch(_aoEvent)
{
if(anU)
{
debug(_aoEvent);
debug(aoc);
}

pW(jU,2);
Hb(jU,false,[iy," compile err:",_aoEvent.message].join(""));
}
return true;
}
}
pW(jU,6);

if(!aoT(true))
{

ay.each(Yv,amn,
{
vParam:{onload:aoT}
}
);

aQG&&ay.each(Yv,aQk,
{
vParam:jU
}
);
}
}
};






bq.extend("method",
(function()
{
var agC={"sid":1,"username":1,"foxacc":1,"reloadurl":1,"reloadurl":1,"m3gmsid":1,"mcookie":1,"msid":1,"defaultf":1,
"qm_flag":1,"QFRIENDUNREADCNT":1,"RSSUNREADCNT":1,"rss_domain":1,"qqmail_activated":1,"qqmail_alias_default":1,
"qqmail_from":1,"wimrefreshrun":1,"new":1,"qm_sk":1,"qm_ssum":1,"qq2self_sid":1,"exstype":1,"lockurl":1,"new_mail_num":1};

return(
{
setUserCookie:function(bz,dM,vC,gc,qo,Am)
{
if(agC[bz]==1)
{
var wH=ay.getCookie(bz),
ge=wH?wH.split("|"):[],
hx=ay.uin(),
bZ=hx+"&"+dM,
kd=true;


for(var i=0;i<ge.length;i++)
{
if(ge[i].match(hx))
{
ge[i]=bZ;
kd=false;
}
}

wH=ge.join("|");
kd&&(wH+=(wH==""?"":"|")+bZ);
return ay.setCookie(bz,wH,vC,gc,qo,Am);
}
else
return ay.setCookie(bz,dM,vC,gc,qo,Am);

},

getUserCookie:function()
{
var kw=ay.getCookie(bz);

if(agC[bz]!=1)
{
return kw;
}
else
{
var ge=kw?kw.split("|"):[],
hx=ay.uin();

for(var i=0;i<ge.length;i++)
{
if(ge[i].match(hx))
{
return((ge[i].split("&"))[1]||ge[i]);
}
}
return kw;
}
}
})

})()
);





bq.extend("method",
(function()
{
var 
bH=
{
url:"/cgi-bin/getinvestigate",
queueLen:100,
interval:5000,
formdata:ay.T('sid=$sid$&$rl$&$ls$')
},

aND=ay.now(),

rP=[],

hC;

function ark(yC)
{
var oX=[];

ay.isStr(yC)?
oX.push("&",yC):
ay.each(yC,function(AQ,eb)
{
oX.push("&",eb,"=",encodeURIComponent(AQ));
}
);

return oX.shift()&&oX.join("");
}

function WI(BZ)
{
return aND%100<100*BZ;
}

function Si(Pq)
{
if(Pq||rP.length>0)
{
ay.ajax(
{
sUrl:bH.url,
sType:"POST",
vData:bH.formdata.replace(
{
sid:ay.sid(),
rl:Pq,
ls:rP.join("&")
}
)
}
);
rP.length=0;
hC&&clearTimeout(hC);
hC=null;
}
}

return(
{














ossLog:function(aqV,Kh,yC,aqM)
{
var aqP=aqV||"realtime",
WQ=ark(yC),
jz=ay.isNum(Kh)?Kh:{all:1}[Kh||"all"]||0.1;


if(aqP=="realtime")
{
WI(jz)&&Si(WQ);
}

else
{

WI(jz)
&&rP.push(["delayurl","=",encodeURIComponent(WQ)].join(""));

rP.length>=bH["queueLen"]?
Si():

(!hC&&rP.length>0&&(hC=setTimeout(Si,bH["interval"])));
}
return this;
},












ossLogSetting:function(at)
{
ay.extend(bH,at);
}
}
);
}
)()
);








var 
gS=xe.call,
Hm=xe.safeByConf;

function aaj(aS,bz,apX,aqn,Hq)
{
var 
HA=apX.prototype=new aqn,

aqf=gS(
Hm(Hq,"create"+aS+":"+bz),
[aqn.prototype]
);

for(var kp in aqf)
{
HA[kp]=
Hm(aqf[kp],bz+"."+kp,true);












































}

HA.name_=function()
{
return bz;
};

return apX;
}

function apH(bm,zw,tQ)
{
return xe.call(this,bm,zw,tQ);
}

function aQy()
{
apH.apply(this,arguments);
return this;
}

function XY(aNh)
{
var aoJ=function(){};
xe.extend(aoJ.prototype,aNh,
{

init_:AD,


super_:apH,
superEx_:aQy
}
);
return aoJ;
}

function anr()
{
var al=this,
rD=arguments,

Of=!al.isStr(rD[0]),

QO=Of?("_PageApp_:"+this.loc("href")):rD[0],

aMD=Of?rD[0]:rD[1],

aOb=Of?rD[1]:rD[2],

abb=function(aF,aI)
{
var al=this,
cA={oContext:al};




aF&&(al.$=aF.QMWin)

&&(al.init_(aI)||true)

&&al.$.ready(al.process_,cA)


.addPageUnloadEvent(function()
{
al.destroy_();
});
};

return aaj(

"App",

QO,

Of?abb:(YR[QO]=abb),

YR[aMD.sSuper||"_defapp_"]||aML,

aOb
);
}

function aql(Or,Op,Hq)
{
var uJ=ng[Or]=function(aF,aI)
{
var al=this;

aF&&(al.$=aF.QMWin)

&&al.init_(aI);
};

uJ.aRI=!!Op.bStatic;

return aaj(

"Lib",

Or,

uJ,

ng[Op.sSuper||"_deflib_"]||aQD,

Hq
);
}

function amI(Or,aI)
{
var uJ=ng[Or];

if(uJ)
{
if(uJ.aRI)
{

return uJ.oJ||(uJ.oJ=new uJ(aF,aI));
}
else
{
return new uJ(this.cN,aI);
}
}
}

function anF(IL,Op,Hq)
{
return aaj(

"Ctrl",

IL,

Kq[IL]=function(aF,aI,_aoEvent)
{
var al=this;

aF&&(al.$=aF.QMWin)

.on(al,_aoEvent||{})

&&al.init_(aI);
},

Kq[Op.sSuper||"_defctrl_"]||aPO,

Hq
);
}

function anb()
{
var al=this,
bj=al.cN,
cM=arguments,
Be=cM[0],
HJ=cM[1],
Yu=cM[2],
alQ=bj[ame]||(bj[ame]={}),
aor=alQ[Be]||(alQ[Be]={}),
aou=Kq[Be],
anz,kf;

if(al.isStr(HJ))
{
kf=aor[HJ];
if(al.isStr(Yu))
{

return al.call(kf,Yu,cM[3]);
}
}
else if(aou)
{
kf=new aou(bj,HJ,Yu);
(anz=HJ&&HJ.sId)&&(aor[anz]=kf);
}

return kf;
}

var AD=xe.noop,

ZC="_QmFw_aPp_",

YR={},

aML=XY(
{

process_:AD,

destroy_:function()
{
this.$=bu;
return this;
},

isDestroy:function()
{
return!this.$;
}
}
),

ng={},

aQD=XY(),

ame="_QmFw_Ctrl_",

Kq={},

aPO=XY(
{


fireEvent_:function(hq,lq)
{
var al=this;
al.$.fireEvent(al,hq,lq);
return al;
}
}
);





bq.handleErr=function(ko,aRO)
{
if(aRO)
{

var gR=(ko.oErr.fileName||"").split("?"),
OX=gR.shift().split("/").pop(),
eQ=gR.join("?").split("&"),
amq={t:"t",s:"s"},
amS=[];

for(var i=0,_nLen=eQ.length,Oo;i<_nLen;i++)
{
Oo=eQ[i].split("=");
amq[Oo[0]]&&
amS.push(amq[Oo[0]],"=",Oo[1]);
}

ay.sid()&&ay.ossLog("delay","all",
{
stat:"js_run_err",
msg:ko.oErr.message,
line:ko.oErr.number||
ko.oErr.lineNumber||-1,
url:[OX,"?",amS.join("")].join(""),
func:(ko.sName||ko.fFunc)
?[ko.sName,ko.fFunc].join(":")
:""
}
);
}
}



var azv=(aF.pkg||{})["_pkgs_"],azD;
aF.pkg=adp;
if(xe.isArr(azv))
{
while(azD=azv.shift())
{
adp.apply(this,azD);
}
}

}
)(window);

$.package(


"comm/ctrl/history.js",


[],


function(bu)
{

var $=bu;












QMWin.createCtrl(


"HashHistory",


{},


function(bm)
{


var ahH="change",
Xq="_HiSToRyfRamE_",
Mz="hash",
Fj=history;

return(
{












hash:function(fQ)
{
var al=this;

if(al.$.isNull(fQ))
{
return al.KM.substr(1);
}
else
{
al.awH(al.KM="#"+fQ)
al.$.loc("hash",al.KM);
return al;
}
},










init_:function(aI)
{
var al=this.aXd()
.bbj()
.bfH();

al.Wu&&QMWin.addPageUnloadEvent(function(){
QMWin.$("$"+Xq).inWin().onunload();
});
},








bbj:function()
{
var al=this,
VM=al.Jg;

if(al.Wu&&VM.$("#"+Xq).size()==0)
{
if(VM.$("body").data(0))
{
VM.$("body").insertIframe(
{
id:Xq,
src:"javascript:document.open();document.writeln('"+
al.aBa(al.Jg.loc(Mz)).replace(/"/g,"\\x22")+
"');document.close();",
style:"position:absolute;display:none;"
},
"afterBegin"
);
}
else
{
VM.setTimeout(arguments.callee,13,{oContext:al});
}
}
return al;
},

aBa:function(fQ)
{
return(
[
'<html>',
'<head>',
location.host!=document.domain
?'<script>document.domain="'+document.domain+'"</script>':'',

'<title>'+document.title+'</title>',
'</head>',
'<body hash="',fQ,'"></body>',
'</html>'
]
.join("")
);
},

xE:function(fQ)
{
var al=this;
al.KM=fQ;
return al.fireEvent_(ahH,[fQ.substr(1)]);
},

aAV:function()
{
var al=this,
afM=al.Jg.loc(Mz),
amz=al.KM,
WT;


if(amz!=afM)
{
al.awH(afM)
.xE(afM);
}
else if(al.Wu&&(WT=al.aUM())
&&amz!=WT)
{
al.Jg.loc(Mz,WT);
al.xE(WT);
}
return al;
},

azP:function()
{
return this.Wu&&this.Jg.$("$"+Xq);
},

aUM:function()
{
var Nx=this.azP();
return Nx&&Nx.$("body").attr(Mz);
},

aXd:function()
{
var al=this;
al.Jg=al.$.$("$top");
al.KM=al.Jg.loc(Mz);
al.Wu=!','.split(/,/).length;
return al;
},

awH:function(fQ)
{
var al=this,
Nx=al.azP();
Nx&&Nx.rewrite(
al.aBa(fQ)
);
return al;
},

bfH:function()
{
var al=this,
aAg="hashchange",
$=al.$;

if($.isBrowser("firefox|safari|chrome|opera")&&'on'+aAg in $.data(0))
{
$.addEvent(aAg,al.aAV,{oContext:al});
}
else
{
$.setInterval(al.aAV,50,{oContext:al});
}

return al;
}
}
);
}
);


}


);

$.package(


"comm/ctrl/tagevent.js",


[],


function(bu)
{

var ow="TagEvent/11.03.22",
ay=QMWin,
bq=ay.ctor_();

function asr(Iu)
{
for(var i=1,dZ=arguments.length;i<dZ;i++)
{
ay.each(arguments[i],function(Vx,hq)
{
if(Iu[hq])
{
ay.each(Vx,function(cE,ZR)
{
if(!Iu[hq][ZR])
{
Iu[hq][ZR]=cE;
}
}
);
}
else
{
Iu[hq]=Vx;
}
}
);
}

return Iu;
};




ay.createLib(
"TagEventCatcher",
{bStatic:true},
function(bm)
{
return(
{








merge:asr
}
);
}
);

function azC(iK)
{
var hE=iK||{},
oD=hE.rule&&hE.rule()||[],
ht=hE.events&&hE.events()||{},
ng=hE.eventLibs&&hE.eventLibs()||[];
$.each(ng,function(wx)
{
var $=ay,
awI=azC($.lib(wx.name));
oD=$.lib("TagEventCatcher").merge(oD,awI.oD);
ht=$.extend(ht,awI.ht);
});
return{hE:hE,oD:oD,ht:ht};
}




ay.createCtrl(
"TagEventModHandle",
{},
function(bm)
{
return(
{







handle:function(iK,at)
{
var al=this,
$=al.$,
cft=al.aVm,

hE=iK,
ht=azC(hE);
al.bbG=$.ctrl("TagEventCatcher",
$.extend(
{
oDom:hE.dom$(),
oRule:ht.oD,
oEvents:ht.ht,
oCallObj:hE
},at)
);
return al;
},
fire:function()
{
var ayj=this.bbG;
ayj.fire.apply(ayj,arguments);
},







init_:function(aI)
{

var al=this,
$=al.superEx_(bm,"init_",[aI]).$;
al.aVm=$.lib("TagEventCatcher");
}
}
);
}
);




ay.createCtrl(

"TagEventCatcher",


{},


function(bm)
{


var 
aXc=
{
click:"ck",
dblclick:"dbl",
mousedown:'md',
mouseup:'mu',
mouseover:'mor',
mousemove:'mm',
mouseout:'mot',
keydown:'kd',
keypress:'kp',
keyup:'ku'
},




bcu=ay.toMap(
(
"click,dblclick,mousedown,mouseup"
+",mouseover,mousemove,mouseout"
+",keydown,keypress,keyup,scroll"
)
.split(","),
true
),


adJ=0,


azt="__taGeVEntcATChErS__",
bdF="un",


aAc="__AdDEdeVeNTcAchE__",


We={}
;




function acP(_aoEvent)
{
azF(_aoEvent,_aoEvent.type);
}

function afV(_aoEvent,oG,aM)
{
azF(_aoEvent,"fire",aM||$.target(_aoEvent),oG);
}

function azF(_aoEvent,hq,aM,oG)
{
var bv=aM||ay.target(_aoEvent),
ayT=[],MW=[],Wv=[],Eb=-1,
bcz=aXc[hq]||hq,
agF,Ry,agp,cmR;
while(bv&&bv.getAttribute)
{

agF=bv===aM?oG:bv.getAttribute(bcz);
agF&&(ayT[++Eb]=bv)
&&(MW[Eb]=agF)
&&(Wv[Eb]={});


if(Eb>-1)
{

Ry=bv.getAttribute(bdF);

Ry&&(Wv[Eb][Ry]=Wv[Eb][Ry]||bv);


agp=bv[azt];

if($.isNum(agp)&&We[agp]
.aWi(
hq,Eb+1,ayT,MW,Wv,_aoEvent
)===false)
{

break;
}
}


bv=bv.parentNode;
}
}

$.addPageUnloadEvent(function()
{
$.each(We,function(cE,eb)
{
We[eb]=null;
}
);
}
);

return(
{









getDom$:function()
{
return this.gq;
},








rule:function()
{
return(
{





}
);
},








events:function()
{
return(
{
}
);
},









merge:asr,









fire:afV,
















init_:function(aI)
{

var al=this,
$=al.superEx_(bm,"init_",[aI]).$,
_oDom=aI&&($.is(aI.oDom)?aI.oDom.data(0):aI.oDom),
awX=$.isDom(_oDom);


if(!awX||!$.isWinEqual($.inWin(_oDom)))
{

$.error(!awX
?"new ctrl cfg.oDom is not dom obj"
:"new ctrl cfg.oDom's window is not match ctrl's window",
[this.name_()+"[TagEventCatcher].init_"]);
}


al.gq=$.$(_oDom);
al.abF=al.aUD(aI.oRule||al.rule());
al.tZ=aI.oEvents||al.events();
al.cfn=aI.sDriven||"event";
al.bco=aI.oCallObj||al;


return al.aUO();
},









aUO:function()
{
var al=this,
$=al.$;

if($.isNum(al.aBb))
{
return al;
}


al.gq.data(0)[azt]=al.aBb=adJ++;
We[al.aBb]=al;




$.each(al.abF,al.aUG,{oContext:al});


return al;
},


aUG:function(cxO,hq)
{
var al=this,
$=al.$,
bc=al.gq;

if(bcu[hq])
{

var azk=al.$.data(0),
ayk=azk[aAc]
||(azk[aAc]={}),
Xh=ayk[hq]
||(ayk[hq]=[]),
axH=true,
Xl;

for(var i=Xh.length-1;i>=0;i--)
{
Xl=$.$(Xh[i]);


if(Xl.contain(bc))
{
axH=false;
break;
}


if(bc.contain(Xl))
{
Xl.delEvent(hq,acP);
Xh.pop();
}
}

if(axH)
{
bc.addEvent(hq,acP);
Xh.push(bc.data(0));
}
}
else
{
bc.addEvent(hq,acP);
}

return al;
},


aWi:function(hq,axR,
azr,aZR,bdy,_aoEvent)
{
var al=this,
$=al.$,
oD=al.abF;

if(oD=oD[hq])
{
for(var i=0;i<axR;i++)
{

var MW=aZR[i].split(","),
afg=true;

for(var j=0,_nLen=MW.length;j<_nLen;j++)
{
var azj=MW[j],
Wq=oD[azj],
aBE,gu;


if(!Wq)
{
break;
}


if(aBE=Wq.sContext)
{
for(var k=i;k<axR;k++)
{

if(gu=bdy[k][aBE])
{
break;
}
}
}
else
{
gu=azr[i];
}

if(gu)
{
var aAd=Wq.sProcess||azj;
afg=afg
&&$.safe(al.tZ[aAd],
[al.name_(),aAd].join("."))

.call(al.bco,_aoEvent,azr[i],gu)!==false
&&(Wq.bPropagable!==false);
}
}

if(!afg)
{

return false;
}
}
}


return true;
},


aUD:function(bgg)
{
return bgg;
}
}
);
}
);


}


);
$.package(
"comm/ctrl/cachemgr.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_();







ay.createLib(
"CacheManager",
{},
function(bm)
{
var awu=function(bfD)
{
var al=this;
al.Nj=[];
al.agm={};
al.aAz={"_default":{dI:{},kB:{}}};
al.bbU=bfD||1000;
}
awu.prototype=
{
Mk:function(nR,eb,gc)
{
var al=this,
ge=al.Nj,
hz=al.aWF(gc);

if(ge.length==al.bbU)
{
al.RH(ge[0]);
}

ge.push(
al.agm[eb]=hz[eb]
=[nR,eb,gc,hz]
);
},
awt:function(gc)
{
var Ij=["_default"];
return(gc||gc!="")?Ij.concat(gc.split("/")):Ij;
},
aWF:function(gc)
{
var al=this,
hz=al.aAz,
Im=al.awt(gc);
for(var i=0;i<Im.length;i++)
{
var kg=Im[i];
hz=(hz[kg]=hz[kg]||{dI:{},kB:{}});
hz=(i==Im.length-1?hz.dI:hz.kB);
}
return hz;
},
uB:function(eb)
{
var al=this,
ge=al.Nj,
Nn=al.agm,
dI=Nn[eb];

if(dI)
{
for(var i=ge.length-1;i>=0;i--)
{
if(ge[i]==dI)
{

(al.Nj
=ge.slice(0,i).concat(ge.slice(i+1,ge.length))
).push(dI);
return dI;
}
}
}
return dI;
},
RH:function(nR)
{
var al=this,
ge=al.Nj;
if(nR)
{
var eN=nR[1],
akt=nR[2];
for(var i=ge.length-1;i>=0;i--)
{
if(ge[i]==nR)
{
al.Nj=ge.slice(0,i).concat(ge.slice(i+1,ge.length));
delete al.agm[eN];
delete nR[3][eN];
delete nR[3];
break;
}
}
}
},
aXR:function(gc,Ww)
{
var al=this,
Im=al.awt(gc),
hz=al.aAz["_default"];
if(!Ww)
{
for(var i=1;i<Im.length;i++)
{
var pL=hz.kB[Im[i]];
if(pL)
{
hz=pL;
}
else
{
break;
}
}
}
al.aBt(hz,Ww);
},
aBt:function(eJ,Ww)
{
var al=this,
dI=eJ.dI,
kB=eJ.kB;
if(!Ww)
{
for(var i in kB)
{
al.aBt(kB[i]);
delete kB[i];
}
}
for(var i in dI)
{
al.RH(dI[i]);
}
}
}
return(
{






init_:function(aI)
{
var al=this,
$=al.superEx_(bm,"init_",[aI]).$;
aI=aI||{};
al.afa=new awu(aI.nCacheCount);
},








add:function(nR,eb,gc)
{
return this.afa.Mk(nR,eb,gc);
},








get:function(eb)
{
return this.afa.uB(eb);
},






remove:function(nR)
{
var ou=this.afa;
return($.isStr(nR)?ou.aXR:ou.RH).apply(ou,arguments);
}
}
);
}
);
}
);
$.package(
"comm/ctrl/urlroute.js",
["comm/ctrl/cachemgr.js","comm/ctrl/history.js"],
function(bu)
{
var beZ="sPkg",
agP="sMod",
bbA="sUrl",
aAJ="sPreAction",
arT="sAction",
aVK="bCache";

var ay=QMWin,
bq=ay.ctor_(),
MX=ay.lib("CacheManager",{});
















function ayh(iK,bdG)
{
if(iK&&iK.ayv)
{
return iK.ayv;
}
var hE=iK||{},
afN=hE.route(),
vO=afN[0]?(bdG||[]).concat([afN[0]]):[],
lP=afN[1]||[],
xM=hE.actions&&hE.actions()||{},
ng=hE.routeLibs&&hE.routeLibs()||[];

$.each(ng,function(wx)
{
var $=ay,
axE=ayh($.lib(wx.name),vO);
lP=lP.concat(axE.lP);
xM=$.extend(xM,axE.xM);
});
return hE.ayv={hE:hE,lP:lP,vO:vO,xM:xM};
}
function axV(Hx,uq)
{
var bet=Hx.length,
axO=uq.length;
if(bet<axO)
{
return false;
}
for(var i=0;i<axO;i++)
{
if(!(new RegExp(["^",uq[i],"([,/]+.*)?$"].join(""),"g")).test(Hx[i]))
{
return false;
}
}
return true;
}
function bcl(Hx,xC,uq)
{
return axV(Hx,uq)
&&(new RegExp(xC,"g"))
.test(Hx.slice(uq.length,Hx.length).join("/"));
}





ay.createCtrl(
"UrlRouteModHandle",
{},
function(bm)
{
return(
{






handle:function(gh,BQ)
{
var al=this,
oY=al.$.loc("hash"),
bc=al.gq=gh;

al.baV=al.Gc=$.ctrl(BQ,{oDom:bc,oHandle:al});
al.Gc.toggle(true);

al.aye(oY.substr(oY.indexOf("#")+1));
return al;
},











hash:function(fQ,nR)
{
var al=this,
$=al.$;
fQ=fQ.replace("#","");
if(nR)
{
MX.remove($.isStr(nR)?nR:fQ);
}

($.loc("hash")!="#"+fQ)&&($.loc("hash")!=fQ)
?$.loc("hash",fQ)
:$.fireEvent(al.aXB,"change",[fQ]);
},





clearCache:function()
{
MX.remove.apply(MX,arguments);
},






init_:function(aI)
{
var al=this,
$=al.superEx_(bm,"init_",[aI]).$,
Pi=al.aXB=$.ctrl("HashHistory");
al.ahl={};
al.aEu=[];
al.aZk=aI.oAjaxSettings;
$.on(Pi,"change",function(fQ)
{
al.aye(fQ);
}
);
},







addEvent:function(hq,aRr)
{
var al=this;
$.addEvent(al,hq,aRr);
return al;
},
axP:function(aS)
{
$.fireEvent(this,"loading",[aS]);
return true;
},
agn:function()
{
$.fireEvent(this,"loaded");
return true;
},
ayQ:function(fC)
{
$.fireEvent(this,"error",[fC]);
return true;
},
aye:function(fQ)
{
var al=this,
Fj=this.aEu;

if(fQ.indexOf("_goback,")==0)
{
Fj.pop();
var oY=Fj.pop()||fQ.slice(8);
$.loc("hash",oY);
return;
}
Fj.push(fQ);
(Fj.length>20)&&Fj.shift();
al.Wg(al.Gc,fQ);
},
afX:function(iK,afX)
{
var al=this;

if(afX||al.ahd==iK.name_())
{
al.ahd=null;
if(al.Gc!=iK)
{
al.Gc&&al.Gc.toggle(false);
al.Gc=iK;
iK.toggle(true);
}
}
return true;
},






Wg:function(iK,fQ,uq,aZP)
{
var al=this,
hE=iK,
vx=fQ.split("/"),
afF=ayh(hE,uq),
agH=afF.lP,
vO=afF.vO,
xM=afF.xM;
for(var i=0;i<agH.length;i++)
{
var azq=agH[i][0],
agr=azq.replace(/\[/g,"(?:").replace(/\]/g,")?").replace(/{\w+}/g,"([^,/]+)"),

JO=bcl(vx,agr!=""?"^"+agr:"",vO);

if(JO)
{

var lP=agH[i][1],
cM=(new RegExp(agr,"g")).exec(vx.slice(vO.length).join("/")).slice(1),
auw=azq.match(/\{\w+\}/gi)||[],
rD=[];
for(var j=0;j<auw.length;j++)
{
rD.push([auw[j],cM[j]||""]);
}
lP[agP]

?al.aAL(fQ,lP,vO)

:al.bef(hE,
lP[bbA],
{bdz:lP[aVK],bfW:vO.join("/"),bgi:rD},
function()
{
lP[aAJ]&&xM[lP[aAJ]].apply(hE,cM);
return true;
},
function(eZ)
{

al.afX(hE,aZP);
ay.isFunc(hE.onpage)&&hE.onpage.call(hE,lP,cM,eZ);

lP[arT]&&xM[lP[arT]].apply(hE,cM);
});

return!lP[agP];
}
}
if(!axV(vx,vO))
{

al.Wg(al.baV,fQ,null,true);
}
},
aAL:function(fQ,xC,uq)
{
var al=this,
pk=xC[agP],
bcd=xC[beZ];
al.ahd=pk;
al.ahl[pk]
?al.Wg(al.ahl[pk],fQ,uq)
:al.axP("mod")&&$.loadPkg(bcd,
{
onload:function(mw)
{
if(!mw)
{
al.ayQ({msg:"加载组件失败"});
}
else if(al.ahd==pk)
{
var aBz=al.ahl[pk]
=$.ctrl(pk,
{
oDom:al.gq,
oRoutePaths:uq,
oHandle:al
});
aBz&&al.agn()&&al.Wg(aBz,fQ,uq);
}
}
});
},


bef:function(iK,cs,afI,aUt,HG)
{

if(cs)
{
var al=this,
QT=afI.bdz,
oY=afI.bfW,
by=bee(cs,afI.bgi)+"&ef=pg"+(!QT?"&r="+$.random():""),
_oDom=iK.dom$();

var ayY=location.href,
ayg=MX.get(by);


QT&&ayg
?_oDom.html(ayg[0])&&al.agn()&&HG&&HG()
:al.axP("page")&&aUt()&&$.ajax(
$.extend(al.aZk,
{
sUrl:by,
onsuccess:function(eA,iE,hk)
{
QT&&(MX.add(eA,by,oY));
ayY===location.href&&_oDom.html(eA)&&
al.agn()&&HG&&HG(eA);
},
onerror:function(hk,iE,fC)
{
if(ayY===location.href)
{
al.ayQ(fC);

history.back();
}
}
}
)
);
}
else
{
HG&&HG();
}
function bee(cs,lq)
{
for(var i=0;i<lq.length;i++)
{
cs=cs.replace(new RegExp(lq[i][0],"g"),lq[i][1]);
}
return cs;
}
}
}
);
}
);
}
);



$.package(
"comm/framework/Page/app/base.js",
[
"comm/ctrl/urlroute.js"
],
function(bu)
{
var ay=QMWin;




ay.createApp(
"Page.Base",
{},
function(bm)
{
return(
{
app_:function()
{
return"";
},
index_:function()
{
return this.app_()+".Index";
},
pageCfg_:function()
{
return{
container:this.$.$("#main"),
route:{oAjaxSettings:{nTimeout:this.EJ}}
};
},
initBase_:function(aI)
{
return this;
},
initData_:function(aI)
{
return this;
},
initRoute_:function(adf)
{
return this;
},

init_:function(aI)
{
this.superEx_(bm,"init_")
.bbS(aI)
.initBase_(aI)
.initData_(aI)
.aPv(aI);
},
bbS:function(aI)
{
return this.xp(aI);
},
xp:function(aI)
{
var al=this;
al.EJ=aI.timeout||0;
return al;
},
aPv:function(aI)
{
var al=this,
bbP=al.pageCfg_();
al.initRoute_(
ay.ctrl("UrlRouteModHandle",bbP.route)
.handle(al.pageCfg_().container,al.index_()));

}
});
}
);

});


$.package(
"comm/framework/Page/controller/base.js",
[
"comm/ctrl/tagevent.js"
],
function(bu)
{




var ay=QMWin,
bq=ay.ctor_(),
ayS=ay.ctrl("TagEventModHandle");

ay.createCtrl(
"Page.Mod",
{},
function(bm)
{











return(
{
dom$:function()
{
return this.gq;
},
mask$:function()
{
var al=this,
bK="___mASkeR___",
mj=al.gq.find("#"+bK);
return!mj.size()?al.$.$("<div>").attr("id",bK).appendTo(al.gq):mj;
},

routeLibs:function()
{
return[];
},
routePaths:function()
{
return this.aPg;
},
route:function()
{
return["",[]];
},
actions:function()
{
return{};
},
toggle:function(aRo)
{
var al=this;
aRo
?ay.addEvent("postCall",al.akm)
&&ay.addEvent("iframeLoad",al.akJ)
&&ayS.handle(al)
:ay.delEvent("postCall",al.akm)
&&ay.delEvent("iframeLoad",al.akJ);
return al;
},

eventLibs:function()
{
return[];
},
rule:function()
{
return{};
},
events:function()
{
return{};
},


pageLibs:function()
{
return[];
},
validLibs:function()
{
return[];
},

initPage:function()
{
var al=this;
return al;
},
page:function()
{
return this.aef;
},
pageTipsCfg:function()
{
return{
tipsErrContainer:this.$.$("#tipsError"),
tipsMsgContainer:this.$.$("#tipsMsg"),
tipsProcessContainer:this.$.$("#tipsProcess")
};
},
showErr:function(cf,xb)
{

var al=this,
yM=xb||2000;
al.hideMsg().pageTipsCfg().tipsErrContainer.show().html(cf);
setTimeout(
function()
{
al.hideMsg();
},
yM
);
return al;
},

hideMsg:function(cf,aI)
{
this.pageTipsCfg().tipsErrContainer.hide();
this.pageTipsCfg().tipsMsgContainer.hide();
return this;
},







showMsg:function(cf,xb,pH)
{
var al=this,
yM=xb||2000;
al.hideMsg().pageTipsCfg().tipsMsgContainer.show().html(cf);
setTimeout(
function()
{
al.hideMsg();
ay.call(pH);
},
yM
);
return al;
},
showProcess:function(cf,aI)
{
this.hideMsg().pageTipsCfg().tipsProcessContainer.show().html(cf);
return this;
},
iframeLoad:function(ba)
{
return this;
},







postSuccess:function(gs)
{
return this;
},
postError:function(gs)
{
return this.showErr(gs.errmsg);
},

ajax:function(cG)
{
ay.ajax(this.fGetAjaxSetting(cG,this));
return this;
},
hash:function(fQ,aRP)
{
var al=this;
al.aoR.hash(fQ,aRP);
return al;
},
clearCache:function()
{
var lP=this.aoR;
lP.clearCache.apply(lP,arguments);
return this;
},

onpage:function(xC,cM,eZ)
{
return this;
},
onloading:function(cqo)
{
var al=this;

al.gq.html("");
},
onsubmit_:function(){},
initUserData:function()
{
return"";
},

fGetAjaxSetting:function(cG,ZN)
{
if(cG&&cG.aOc)
{
return cG;
}
var cA=cG||{},
bZU=cA.sDefaultErrMsg||"",
aMc=cA.onsuccess||function(){},
aOD=cA.onerror||function(){},
aod=cA.onclienterror||function(qY,kr){ZN&&ZN.showErr(kr);},
aPs=cA.onerrorhandle||function(aE)
{

if(aE.sessionTimeout)
{
return ZN.logOut();
}
if(aE.retcode!="0")
{
aE.errmsg==""&&(aE.errmsg=="系统错误");
aod(aE.retcode,aE.errmsg,aE);
return false;
}
return true;
};

cA.onerror=function(hk,iE,fC)
{
aOD.apply(this,arguments);
aod(-99999,"网络错误",fC);
};
cA.onsuccess=function(aE)
{
var aO;
try
{
aO=ay.evalVal(aE);
}
catch(cg)
{
cA.onerror(null,null,{});
return;
}
aO=aO||{retcode:"-999",msg:"数据格式异常"};
aPs(aO)&&aMc(aO);

};
var XL="&ef=js&r="+ay.unikey();
cA.vData?(cA.vData+=XL):(cA.sUrl+=XL);
cA.aOc=true;
return cA;
},



init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
al.gq=aI.oDom;
al.aoR=aI.oHandle;
al.aPg=aI.oRoutePaths||[];
al.initMod_();

},
initMod_:function()
{
return this;
}
}
);
}
);

});$.package(
"comm/ctrl/ajaxform.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_();



ay.createLib(
"AjaxForm",
{bStatic:true},
function(bm)
{
return(
{








ajax:function(_aoEvent,oW,cG)
{
var al=this,
$=al.$,
nH=$.$(oW),
cA=cG||{},
Mw,MK,cj;

nH.find("[name]").each(function(cp)
{
cj=cp.type;

if((cj=="checkbox"||cj=="radio")&&!cp.checked||cp.name=="")
{
return;
}

if(cp.tagName.toLowerCase()=="select"&&cp.multiple&&cp.getAttribute("af")=="sm")
{
MK="";
var bM=cp.name;
for(var i=0;i<cp.options.length;i++)
{
MK+=[i?"&":"",bM,"=",encodeURIComponent(cp[i].value)].join("");
}
}
else
{
MK=cp.name+"="+encodeURIComponent(cp.value);
}
Mw
?(Mw+="&"+MK)
:(Mw=MK);
});
Mw+="&ef=js&resp_charset=UTF8";

cA.sType="POST";
cA.vData=Mw;
cA.sUrl=oW.attributes["action"].value;
cA.bGlobal=true;
$.ajax(cA);
$.preventDefault(_aoEvent);
}
}
);
}
);
}
);
$.package(
"comm/ctrl/formvalid.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
aXs="off",
aWZ="erronly",
FQ=/^[\.a-zA-Z0-9_=-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
bcg=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/,
Vw=/^[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
aUB=/^(\d{3,4})(\-\d{7,8})(\-\d{1,4})?$/,
bbY=/^\d{11}$/,
aZC=ay.T(
[
'<span un="validErr">'
,'<img align="absmiddle" class="icon_error_m" src="',ay.path("img"),'spacer.gif">'
,'<span class="txt_red f_size">&nbsp;$msg$</span>'
,'</span>'
]),
aWO=(
[
'<span class="valid_ok" un="validOK">'
,'&nbsp;<img align="absmiddle" class="icon_finish_m" src="',ay.path("img"),'spacer.gif">'
,'</span>'
]).join("");




ay.createCtrl(
"FormValid",
{},
function(bm)
{
return(
{




add:function(WG)
{
var al=this;
ay.extend(al.axz,WG.func);
ay.extend(al.aAo,WG.field);
},





valid:function(eo)
{
var al=this,
aO=al.axz,
ayN=al.aAo,
CW=true;

eo.each(function(WG)
{
var ys=al.$.$(WG),
bcP=ys.find("[un='validMsg']"),
EG=ys.attr("valid"),
bek=(ys.attr("validMsg")||"").split("|"),
agI="",VK=[];
if(EG.indexOf("#")==-1)
{
VK=EG.split("|");
}
else
{
EG=EG.split("#");
agI=EG[0];
VK=EG[1].split("|");
}

if(agI.indexOf(aXs)!=-1)
{
return true;
}

var bfm=agI.indexOf(aWZ)!=-1

for(var i=0;i<VK.length;i++)
{
var DV=VK[i].split(":"),
cM=(DV[1]||"").split(","),
DV=DV[0];
if(ay.isFunc(aO[DV]))
{

var bD=aO[DV].apply(aO,
[ys,bek[i]||""].concat(cM)),

Ja=ayN[DV]?ys.find(ayN[DV]):bcP;


if(bD[0]==0)
{
Ja.html(bfm?"":aWO);
}
else if(bD[0]>0)
{
Ja.html("");
}
else
{
CW=false;
Ja.html(aZC.replace(bD[1]));
break;
}
}
}
});
return CW;
},






init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
al.axz={};
al.aAo={};
}
});
}
);













ay.createLib(
"FormValid.Default",
{bStatic:true},
function(bm)
{
return(
{























valids:function()
{
return(
{
func:
{

empty:function(eo,cf,lC)
{
return ay.trim(eo.find("input,textarea").attr("value"))!=""
?[0]:[-1,{msg:lC?cf:"请输入"+cf}];
},

len:function(eo,cf,EH,RF,lC)
{
if(EH||RF)
{
var bZ=ay.trim(eo.find("input").attr("value")),
qp=parseInt(EH),
Gt=parseInt(RF);
if(qp&&bZ.length>qp)
{
return[-1,{msg:lC?cf:[cf,"不能超过",qp,"个字符"].join("")}];
}
if(Gt&&bZ.length<Gt)
{
return[-1,{msg:lC?cf:[cf,"不能少于",Gt,"个字符"].join("")}];
}
}
return[0];
},

same:function(eo,cf,lC)
{
var azu=eo.find("input[vl='validsame1']").attr("value"),
bbz=eo.find("input[vl='validsame2']").attr("value");
return azu==bbz?[azu==""?1:0]:[-1,{msg:lC?cf:("请输入相同的"+cf)}];
},
select:function(eo,cf,aVP,lC)
{
return eo.find("select").attr("value")!=aVP
?[0]:[-1,{msg:lC?cf:("请选择")}];
},
check:function(eo,cf,lC)
{
var XE=false;
eo
.find("input[type='checkbox']")
.each(function(bdN)
{
XE|=bdN.checked;
});
return XE?[0]:[-1,{msg:lC?cf:("请确认")}];
},

email:function(eo,cf,lC)
{
return FQ.test(ay.trim(eo.find("input").attr("value")))
?[0]:[-1,{msg:lC?cf:("请输入正确的"+cf)}];
},
ip:function(eo,cf,lC)
{
return bcg.test(ay.trim(eo.find("input").attr("value")))
?[0]:[-1,{msg:lC?cf:("请输入正确的"+cf)}];
},
domain:function(eo,cf,lC)
{
return Vw.test(ay.trim(eo.find("input").attr("value")))
?[0]:[-1,{msg:lC?cf:("请输入正确的"+cf)}];
},
phone:function(eo,cf,lC)
{
var bZ=ay.trim(eo.find("input").attr("value"));
return(aUB.test(bZ)||bbY.test(bZ))
?[0]:[-1,{msg:lC?cf:("请输入正确的"+cf)}];
}
},
field:
{
same:"[un='validSameMsg']"
}
});
}
});
}
);
}
);
$.package(
"comm/ctrl/inputkit.js",
[],
function(bu)
{

var ay=QMWin,
bq=ay.ctor_();
function bel(gy)
{
var $=this;
try
{
if(ay.isBrowser("firefox"))
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper).copyString(gy);
}
else
{

var Eu=ay.$("#copyinputcontainer").data(0);
if(!Eu)
{
$.$("body").insert('<input id="copyinputcontainer" style="position:absolute;top:-1000px;left:-1000px;"/>',"beforeEnd");
Eu=$.$("#copyinputcontainer").data(0);
}
Eu.value=gy;
Eu.select();
$.$(":doc").execCommand('Copy');
}
}
catch(e)
{
alert($.T('您的浏览器安全设置不允许编辑器自动执行复制操作，请使用键盘快捷键($cmd$+C)来完成。').replace({cmd:ay.isOS("mac")?"Command":"Ctrl"}));
}
}
bq.extend("method",(
function()
{
return(
{








copyToClipboard:bel
}
);
}
)()
);
}
);
$.package(
"comm/ui/dock.js",
["comm/ctrl/tagevent.js"],
function(bu)
{






var ay=QMWin,
bq=ay.ctor_(),

xa=ay.$(":win").data(0),
aay=xa.document,

CJ=0,Fx=1,
uA=0,XK=1,asa=2,xz=3,
xu=0,xl=1,
WS=0,VI=1;

function aJM()
{
return(
[
Math.max(aay.body.clientWidth,
aay.documentElement.clientWidth),
Math.max(aay.body.clientHeight,
aay.documentElement.clientHeight)
]
);
}

function aGr(Cb)
{
var aKD=ay.$(Cb);
return[aKD.width(),aKD.height()];
}

function agL(Cb)
{
var il=ay.$(Cb).offset();
return[il.left,il.top];
}

function bqQ(Cb)
{
var Wx=aJM(),
aue=aGr(Cb),
aKe=agL(Cb),

gP=aKe[WS],
fB=aKe[VI],
AU=Wx[xu]-aue[xu]-gP,
aqN=Wx[xl]-aue[xl]-fB;

return[fB,AU,aqN,gP].concat(aue);
}
function aTN(aA,AS,cD)
{
cD=cD||{};
var Wx=aJM(),
uS=bqQ(aA),
aeC=uS.slice(4,6),
ym=[],

Pz=AS[xl]>AS[xu]
?CJ:Fx,

tN=(
[
uS[xz]>uS[XK]
?xz:XK,
uS[uA]>uS[asa]
?uA:asa
]
);

cD.bHor&&(Pz=CJ);
cD.bVer&&(Pz=Fx);

cD.bLeft&&(tN[CJ]=xz);
cD.bRight&&(tN[CJ]=XK);

cD.bTop&&(tN[Fx]=uA);
cD.bBottom&&(tN[Fx]=asa);

if(Pz==CJ)
{
ym=(
[
tN[CJ]==xz
?uS[xz]-AS[xu]
:uS[xz]+aeC[xu],
tN[Fx]==uA
?uS[uA]+aeC[xl]-AS[xl]
:uS[uA]
]
);
}
else
{
ym=(
[
tN[CJ]==xz
?uS[xz]+aeC[xu]-AS[xu]
:uS[xz],
tN[Fx]==uA
?uS[uA]-AS[xl]
:uS[uA]+aeC[xl]
]
);
}
var bjV=true,
aeL=cD.nPadding||120,
atD=AS[xu],
atF=AS[xl];
if(bjV)
{
var adT=
(
tN[CJ]==xz
?ym[WS]-aeL
:Wx[xu]-(ym[WS]+AS[xu])-aeL
),
adX=
(
tN[Fx]==uA
?ym[VI]-aeL
:Wx[xl]-(ym[VI]+AS[xl])-aeL
);

if(adT<0)
{
atD=atD+adT;
tN[CJ]==xz&&(ym[WS]=ym[WS]-adT);
}
if(adX<0)
{
atF=atF+adX;
tN[Fx]==uA&&(ym[VI]=ym[VI]-adX);
}
}








return ym.concat(
[
atD,
atF,
adT<0,
adX<0
]
);
}



$.createLib(
"Dock",
{bStatic:true},
function(bm)
{
return(
{






















fix:function(aA,bsJ,eg)
{
return aTN(aA,aGr(bsJ),eg);
},





init_:function()
{
}
}
);
}
);
}
);
$.package(
"comm/ui/panel.js",
["comm/ctrl/tagevent.js"],
function(bu)
{
var bq=$.ctor_(),
ay=QMWin,
KT=1000;





var aaS="_pANelmAsk_",
cmC=[];

function bgj(at)
{
var mj;

if(at.oDom)
{
var AI=bri(at.oDom.data(0),aaS);
mj=AI?$.$(AI):$.$("<div>").attr("un",aaS);
!AI&&at.oDom.insert(mj,"afterBegin");
}
else
{
mj=$.$("#"+aaS);
if(!mj.size())
{
mj=$.$("<div>").attr("id",aaS);
$.$("body").insert(mj,"afterBegin");
}
}
return mj;
}
function bri(_aoDom,blk)
{
var wC=_aoDom.childNodes;
for(var i=0;i<wC.length;i++)
{
if(wC[i].getAttribute&&wC[i].getAttribute("un")==blk)
{
return wC[i];
}
}
}

function azn(gh,at)
{
var al=this;
al.gq=gh;
this.hw(at=at||{});
}
azn.prototype=
{

hw:function(at)
{
var al=this;
al.aEE(at);
al.Mi(at);
al.aUi=KT=KT+2;
},

aEE:function(at)
{
var al=this,
bc=al.gq,
_oDom=at.oDom||bc.size()&&bc.data(0),
oD=at.oRule,
ht=at.oEvents,
gu=at.oContext;
al.cyI=$.ctrl("TagEventCatcher",
{oDom:_oDom,oRule:oD,oEvents:ht,oCallObj:gu});
},
Mi:function(at)
{
var al=this;
al.aab=at.onbeforeclose,
al.Vl=at.onclose;
al.gq
.appendTo(bgj(at));

},
bpk:function()
{
return this.aUi;
},
qT:function()
{
this.gq.remove();
}
};


function bcV(at)
{
var al=this,
cM=Array.apply(null,arguments);
if($.isStr(at))
{
return aUN.apply(al,cM);
}
else
{
return aZM.call(al,at);
}
}

function aZM(at)
{
var al=this;
al.akn=new azn(al,at);
return al;
}

function aUN(vE)
{
var al=this,
cM=Array.apply(null,arguments);
nN=al.akn;
switch(vE)
{
case"instance":
return nN;
case"close":
nN&&nN.qT.apply(nN,cM.slice(1));
case"z-index":
return nN&&nN.bpk.call(nN);
break;
}
return al;
}

bq.extend("method",(
function()
{
return(
{

















panel:bcV
}
);
}
)()
);
});
$.package(
"comm/ui/qmpanel.js",
[
"comm/ctrl/tagevent.js"
],
function(bu)
{
var bo=QMWin;









bo.createCtrl(
"UI.QMPanel",
{},
function(bm)
{
return{







show:function(cO)
{
var al=this;
al.rX.show();
return cO&&cO.noEvent?al:al.fireEvent_("show");
},








hide:function(cO)
{
var al=this;
al.rX.hide();
return cO&&cO.noEvent?al:al.fireEvent_("hide");
},








isShow:function()
{
var al=this;
return!(al.rX.css("display")=="none"||al.rX.css("visibility")=="hidden");
},





isSee:function()
{
var al=this,
atQ=al.isShow();
atQ&&al.rX.parents("*").each(function(_aoDom)
{
return atQ=_aoDom.style.display=="none"||_aoDom.style.visibility=="hidden";
}
);
return atQ;
},





inDocument:function()
{
try
{
var lg=al.rX.data(0);




if(lg.parentNode==null)
{
return false;
}

if(bo.isBrowser("ie"))
{
return!!lg.ownerDocument;
}
else
{
var bj=lg.ownerDocument.defaultView,
Cj=bj.frameElement;
if(Cj)
{
return Cj.contentDocument==lg.ownerDocument;
}
else
{

return bj==bo.$("$top");
}
}
}
catch(e)
{
return false;
}
return true;
},






getSize:function()
{
var al=this;
return[al.rX.height(),al.rX.width()];
},






getPosition:function()
{
var ej=this.rX.offset();
return[ej.top,ej.left];
},









setPosition:function(Tt,Ug)
{
var al=this;
Tt!=bu&&Tt!=null&&al.rX.css('top',Tt);
Ug!=bu&&Ug!=null&&al.rX.css('left',Ug);
return al;
},





getPanel:function()
{
return this.rX;
},






init_:function(aI)
{
var al=this,
$=al.superEx_(bm,"init_",[aI]).$;
al.aSM=aI;

al.rX=$.$(aI.oDom);
}
};
}
);












bo.createCtrl(
"UI.QMAniPanel",
{sSuper:"UI.QMPanel"},
function(bm)
{
var bqr=0,
bpN=1,
atv=2,
boW=3,
brC=4,
cGn=5;

return{







show:function(cO)
{
var al=this,
aIq=function()
{
al.OB=atv;
return al.superEx_(bm,"show",[cO]);
};
if(!al.super_(bm,"isShow"))
{
if(al.aHR&&!(cO&&cO.noAni))
{
al.OB=bpN;
var mO=al.fireEvent_("showing").rX,
fW=mO.height();
mO.stop().animate(
{
height:"+=5,"+fW
},
"fast",
"",
aIq
);
}
else
{
aIq();
}
}
return al;
},








hide:function(cO)
{
var al=this,
aaY=function()
{
al.OB=brC;
al.superEx_(bm,"hide",[cO]);
};
if(al.super_(bm,"isShow"))
{
if(al.aHR&&!(cO&&cO.noAni))
{
al.OB=boW;
al.fireEvent_("hiding").rX.stop().animate(
{
height:"-=5,0"
},
"fast",
"",
aaY
);
}
else
{
aaY();
}
}
return al;
},





isShow:function()
{
var al=this;
return al.OB==atv&&al.super_(bm,"isShow");
},





isSee:function()
{
var al=this;
return al.OB==atv&&al.super_(bm,"isSee");
},







init_:function(aI)
{
var al=this,
$=al.superEx_(bm,"init_",[aI]).$;
al.aSM=aI;
al.aHR=!(aI.bAnimation===false);

al.OB=bqr;
al.rX=$.$(aI.oDom);
}
};
}
);

























bo.createCtrl(
"UI.QMSelectPanel",
{sSuper:"UI.QMAniPanel"},
function(bm)
{
var bnr=/(\d+)(px)?/,

aIE=bo.isBrowser("ie6"),
adF=bo.lib("TagEventCatcher"),

dK={
wrapDiv:'<div id="selectpanelwrap" style="height:0px;"></div>',

outterDiv:bo.T([
'<div id="$sId$" class="selectpanel $sClass$" style="display:none;position:absolute;top:$nTop$px;left:$nLeft$px;background:#FFF;outline:none;" hidefocus tabindex="0" md="noblur">',
aIE?'<iframe un="shim" src="javascript:\'\'" style="position:absolute;visibility:inherit;top:0px;left:0px;z-index:-1;opacity:0;filter:alpha(opacity=0);"></iframe>':'',
'<div un="header" style="display:"></div>',
'<div un="outbody" class="selectpanelbody" unselectable="on">',
'<div un="body" class="selectpanelbody_inner"></div>',
'</div>',
'<div un="footer" style="display:"></div>',
'</div>'
]),

item:bo.TE([
'$@$for($item$)$@$',
'<div $@$if(!$nSel$)$@$mor="highlight" ck="sel" un="sel"$@$endif$@$>$sHtml$</div>',
'$@$endfor$@$'
])
},
FH={
height:0,
width:0
};




bo.ready(function()
{
var rA=bo.$("<div>").css({
overflow:"scroll",
margin:"0px",
width:"100%",
height:"100%",
position:"absolute",
left:"0px",
top:"0px",
visibility:"hidden"
}).appendTo(bo.$("body")),
fu=rA.data();
FH.height=fu.offsetHeight-fu.clientHeight;
FH.width=fu.offsetWidth-fu.clientWidth;
rA.remove();
}
);





function asE(dM,cIq)
{
if(bnr.test(dM))
{
return parseInt(RegExp.$1);
}







return-1;
}

return{




getTmpl_:function(aS)
{
return dK[aS];
},








upBody_:function(eA,aE)
{

var al=this,
$=al.$,
gj,
aO=aE;
if($.isStr(eA))
{

gj=eA;
}
else
{
aO=$.isFunc(eA)?$.call(al,eA):eA;
gj=al.getTmpl_("item").replace({
item:aO
});
}
var	kB=al.WA.html(gj).data(0).firstChild,
bph=0,
aKm=0;
al.Kl=[];

al.Xy=[];
while(kB)
{
if(kB.getAttribute&&kB.getAttribute("un")=="sel")
{
al.Kl.push(kB);
al.Xy.push(aO[aKm]);
kB.setAttribute("selind",bph++);
}
aKm++;
kB=kB.nextSibling;
}
al.wZ=-1;





return al.resize();
},





setBody:function(aE)
{
var al=this;
return al.upBody_(aE);
},





getOutBody:function()
{
return this.aeu;
},





getBody:function()
{
return this.WA;
},





setHeader:function(eZ)
{
var al=this;
if(eZ)
{
al.atB.html(eZ).show();
}
else if(eZ=="")
{
al.atB.hide();
}
return al;
},





setFooter:function(eZ)
{
var al=this;
if(eZ)
{
al.auC.html(eZ).show();
}
else if(eZ=="")
{
al.auC.hide();
}
return al;
},





aHq:function()
{
var al=this,
dw=al.VX;




al.atx={};
al.$.each(["Height","Width"],function(dM)
{
var lT,
qr,
bmR=dM.toLowerCase();
lT=qr=asE(dw["v"+dM]);
lT<0&&(lT=asE(dw["vMax"+dM]));
qr<0&&(qr=asE(dw["vMin"+dM]));
al.atx[bmR]=[qr,lT];
}
);
return al;
},






resize:function()
{




var aJL=/scroll|auto/i,
bmz="visible",
KG="auto",
aHF="hidden",
al=this,
arq=al.aeu,
CG=arq.data(0),
Km=CG.style,
awh=al.WA,
aeg=awh.data(0).style,
arK=arq.css("overflowX"),
arV=arq.css("overflowY"),
Oj=aIE?al.aKH.data(0).style:null,
mu=al.isShow();



al.uo.css("height",KG);

Km.width=KG;
Km.height=KG;
Km.overflow=bmz;

aeg.width=KG;
aeg.height=KG;

if(Oj)
{
Oj.height=KG;
Oj.width=KG;
}

if(!mu)
{
al.show({noEvent:true,noAni:true});
}

var	FI=CG.offsetHeight,
CP=FI,
aet=CG.offsetWidth,
Cx=aet,
Fk=al.atx.height,
Fl=al.atx.width,
auo=false,
auq=false;

if(Fk[1]>0&&CP>Fk[1])
{
CP=Fk[1];
auo=aJL.test(arV);
}
else if(Fk[0]>0&&CP<Fk[0])
{
CP=Fk[0];
}

if(Fl[1]>0&&Cx>Fl[1])
{
Cx=Fl[1];
auq=aJL.test(arK);
}
else if(Fl[0]>0&&Cx<Fl[0])
{
Cx=Fl[0];
}


Cx+=auo&&(Fl[1]<0||Fl[1]>=Cx+FH.width)?FH.width:0;

CP+=auq&&(Fk[1]<0||Fk[1]>=CP+FH.height)?FH.height:0;


if(arK==aHF)
{
aet=Cx-(auo?FH.width:0);
}
if(arV==aHF)
{
FI=CP-(auq?FH.height:0);
}


Km.width=Cx+"px";
Km.height=CP+"px";
aeg.width=aet+"px";
aeg.height=FI+"px";
Km.overflowX=arK;
Km.overflowY=arV;
if(Oj)
{
Oj.height=CP+"px";
Oj.width=Cx+"px";
}




if(!mu)
{
al.hide({noEvent:true,noAni:true});
}

return al;
},














setSize:function(at)
{
var al=this,
dw=al.VX;
for(var k in at)
{
dw[k]=at[k];
}
return al.aHq().resize();
},









setSelectItem:function(TI,aIo,WU)
{
var al=this,
ro=bo.isDom(TI)?parseInt(TI.getAttribute("selind")):TI,
aKU=al.Kl.length,
Wp=al.wZ;
if(bo.isNum(ro)&&(ro>=0||!aIo))
{
Wp=((aIo?0:Wp)+ro+aKU)%aKU;
if(Wp!=al.wZ)
{
al.ard(al.wZ,false,WU).ard(al.wZ=Wp,true,WU);
}
}
else
{
al.ard(Wp,false,WU);
al.wZ=-1;
}
return al;
},

ard:function(bsh,aCX,WU)
{
var al=this,
_oItem=al.Kl[bsh];
al.$.$(_oItem)[aCX?'addClass':'rmClass']("highlight");
return aCX&&WU?al.btb(_oItem):al;
},






btb:function(cE)
{
var al=this,
CG=al.aeu.data(0),
aKu=CG.clientHeight,
aHy=CG.scrollTop+CG.offsetTop,
fm=al.WA.data(0),
aqD=cE.offsetTop,
bpI=cE.offsetHeight;

if(aHy>=aqD||aHy+aKu<=aqD+bpI)
{
CG.scrollTop=aqD-aKu/2;
}
return al;
},





getSelectData:function()
{
var al=this,
_oItem=al.Kl[al.wZ];
return _oItem?al.Xy[al.$.$(_oItem).attr("selind")]:null;
},





getSelectDom:function()
{
var al=this;
return al.Kl[al.wZ];
},



rule:function()
{
var al=this;
return adF.merge(
{
click:{
sel:{}
},
mouseover:{
highlight:{}
}
},al.VX.oRule
);
},

events:function()
{
var al=this,
$=al.$;
return $.extend(
{
sel:function(_aoEvent,aA,aM)
{
al.setSelectItem(aA,true,false)
.fireEvent_("select",[al.getSelectData()]);
},

highlight:function(_aoEvent,aA,aM)
{
al.setSelectItem(aA,true,false);
}

},al.VX.oEvents
);
},

baj:function()
{
var al=this,
dw=al.VX,
$=al.$,
atY=dw.oContainer||$.$("#selectpanelwrap"),
mO=$.$("#"+dw.sId);

if(!atY.size())
{
$.$("body").insert(al.getTmpl_("wrapDiv"),"afterBegin");
atY=$.$("#selectpanelwrap");
}
if(!mO.size())
{
atY.insert(al.getTmpl_("outterDiv").replace(dw),"beforeEnd");
mO=$.$("#"+dw.sId);
}
al.uo=mO;
al.atB=mO.find('div[un="header"]');
al.WA=mO.find('div[un="body"]');
al.aeu=mO.find('div[un="outbody"]');
al.auC=mO.find('div[un="footer"]');
al.aKH=mO.find('iframe[un="shim"]');

$.ctrl("TagEventCatcher",{
oDom:mO,
oRule:al.rule(),
oEvents:al.events()
});

return al;
},

destroy_:function()
{
var al=this;
if(al.uo)
{
al.wZ=-1;
al.Kl=[];
al.Xy=null;
al.uo.remove();
al.uo=al.atB=al.WA=al.aeu=al.auC=al.aKH=null;
}
return al;
},





aLT:function()
{
var al=this;
al.uo&&al.uo.css("height","auto");
return al;
},


































init_:function(aI)
{
var al=this,
$=al.$;
aI.sId=aI.sId||$.unikey();
al.VX=aI;
al.baj().aHq();
al.wZ=-1;
al.Kl=[];
al.Xy=null;

aI.bAnimation!==false&&$.addEvent(al,
{
show:al.aLT,
hiding:function()
{
al.uo.css("height",al.uo.height());
},
hide:al.aLT
}
);

aI.oDom=al.uo;
al.superEx_(bm,"init_",[aI]);
}

};
}
);





}
);
$.package(
"comm/ui/dialog.js",
["comm/ui/panel.js"],
function(bu)
{
var bq=$.ctor_(),
ay=QMWin;
var LN=(
[
'<div dlg="mask" class="detail_mask"></div>',
'<div dlg="panel" class="opp_obj">',
'<div un="dlg" class="o_body rounded5">',
'<strong dlg="title" class="o_title" style="display:none;"></strong>',
'<a dlg="close" href="javascript:;" class="ico_close"></a>',
'<div dlg="content" class="o_con"></div>',
'<div class="t_mask"></div>',
'</div>',
'</div>'
]).join("");


function ayl(gh,at)
{
var al=this;
al.gq=gh;
this.hw(at=at||{});
}
ayl.prototype=
{
hw:function(at)
{
var al=this;
al.Mi(at);
al.oy(at);
},
Mi:function(at)
{
var al=this,
$=al.gq,
bc=$,
bj=$.inWin(),
jA=bj.document.documentElement,
GA=bj.document.body,
fB=at.nTop,
gP=at.nLeft,
fL=at.nWidth||parseInt(bc.css("width"))||450,
fW=at.nHeight,
JA=at.oTmpl||LN,

mO=al.uo=$.$("<div>").html(JA).panel($.extend({},at)),
jv=al.xS=mO.find("[dlg='panel']");
if(fL)
{
jv.css("width",fL);
}
if(fW)
{
jv.css("height",fW);
}
var rh=al.bjM=jv.find("[dlg='content']")
.append(al.gq),
bwt=al.cvj=jv.find("[dlg='title']")
.css("display",at.sTitle?"":"none")
.html(at.sTitle||""),
aEb=al.bLE=jv.find("[dlg='close']"),
mj=al.aKT=mO.find("[dlg='mask']");

var KT=mO.panel("z-index");
mj.css("z-index",KT-1);
jv.css("z-index",KT);
at.sMaskClass&&mj.addClass(at.sMaskClass);
fW=jv.height();






jv.css(
{
"top":fB=="auto"?(jA.clientHeight-fW)/2+(jA.scrollTop||GA.scrollTop):fB,
"left":gP=="auto"?(jA.clientWidth-fL)/2+(jA.scrollLeft||GA.scrollLeft):gP
}
);
mj.css(
{
"height":Math.max(
Math.max(GA.scrollHeight,jA.scrollHeight),
Math.max(GA.offsetHeight,jA.offsetHeight),
Math.max(GA.clientHeight,jA.clientHeight))+"px"

}
);
aEb.on("click",afe({sFrom:"button"}));
mj.on("click",afe({sFrom:"mask"}));
function afe(eg)
{
return function()
{
al.ajP(eg);
}
}
},
oy:function(at)
{
var al=this;
al.aab=at.onbeforeclose;
al.Vl=at.onclose;
},
qT:function()
{
var al=this;
al.uo.panel("close");
al.afl.apply(al,arguments);
},

ajP:function(eg)
{
var al=this,
Go=al.aab;
if(Go&&Go(eg)||!Go)
{
al.qT();
}
},
afl:function()
{
var al=this,
QZ=al.Vl;
QZ&&QZ.apply(al,arguments);
}
};
function aWU(at)
{
var al=this,
cM=Array.apply(null,arguments);
if($.isStr(at))
{
return aWL.apply(al,cM);
}
else
{
return aZo.call(al,at);
}
}

function aZo(at)
{
var al=this;
al.aWd=new ayl(al,at);
return al;
}

function aWL(vE)
{
var al=this,
cM=Array.apply(null,arguments);
hy=al.aWd;
switch(vE)
{
case"instance":
return hy;
case"close":
hy&&hy.qT.apply(hy,cM.slice(1));
break;
}
return al;
}

bq.extend("method",(
function()
{
return(
{
















dialog:aWU
}
);
}
)()
);
}
);
$.package(
"comm/ui/tree.js",
[],
function(bu)
{
var bq=$.ctor_(),
ay=QMWin;
function baq(gh,at)
{
var al=this;
al.gq=gh;
this.hw(at=at||{});
}
baq.prototype=
{
hw:function(at)
{
var al=this;
al.aGs(at);
al.xp(at.oData,at.sType);
al.aug(at);
},
aGs:function(at)
{
var al=this;
al.bJq=at.bClosed;
al.bHK=$.isFunc(at.ondata)?at.ondata:bFj;
al.bOx=$.isFunc(at.onselected)?at.onselected:function(){};
},

xp:function(aE,eDp)
{
var al=this;
al.pI=aE;
al.aqO={};
},
aug:function(at)
{
var al=this,
bc=al.gq
.html('<ul class="treeview"></ul>')
.find("ul"),
aO=al.pI,
blm=function(cE,Li,FE)
{
cE.id&&(al.aqO[cE.id]=cE);
cE.select=function()
{
bot(cE,Li,FE);
}
},
bot=function(cE,Li,FE)
{
bc.find(".selected").rmClass("selected");
FE.find(".item").addClass("selected");
},
bIU=function(cE,Li,FE)
{
al.bOx(cE,Li,FE);
},
bEr=function(cE,Li)
{
Li.hasClass("closed")
?Li.rmClass("closed").addClass("open")
:Li.rmClass("open").addClass("closed");
},
bH=al.ff=
{
ciw:al.bJq,
bFj:al.bHK,
blm:blm,
bot:bot,
bIU:bIU,
bEr:bEr
},
bEV={root:true,children:aO};
for(var i=0;i<aO.length;i++)
{
aO[i].parent=bEV;
var hP=cwi(i,aO,bH).appendTo(bc);
!i&&(aO.length==1?hP.rmClass("last").addClass("root"):hP.addClass("first"));
}
},
Sg:function()
{
return this.pI;
},
cWN:function(pA,doI)
{
var aO=pA.attr("data");
switch(doI)
{
case"prev":
return aO.parent.children[agy(aO)-1];
case"next":
return aO.parent.children[agy(aO)+1];
}
return aO;
},
anD:function(bXc)
{
return this.aqO[bXc];
},
aRc:function(pA)
{
return bdU(pA,this.ff);
},
aYo:function(pA)
{
var aO=pA.attr("data"),
bpC=pA.$(pA.data(0).previousSibling);
aO.parent.children.splice(agy(aO),1);
bdU(bpC,this.ff);
this.cmZ(pA).aWN(bpC);
pA.remove();
},
dmJ:function(pA,aE)
{
var al=this,
$=pA,
aO=pA.attr("data"),
aIj=bGV(pA.data(0),function(_aoDom){return _aoDom.tagName.toLowerCase()=="ul"}),
wA=$.$(aIj||"<ul>").appendTo(pA);

aE.parent=aO;
(aO.children=aO.children||[]).push(aE);
var hP=$.$("<li>").addClass("leaf").appendTo(wA),
bpC=$.$(hP.data(0).previousSibling);
ciF(hP,aE,al.ff);
al.cmZ(hP).aWN(hP).aWN(bpC);
},
daZ:function(pA)
{
var aO=pA.attr("data"),
VW=aO.parent.children[agy(aO)-1];
bFu(aO,VW);
return this.cfC(pA,VW);
},
cWw:function(pA)
{
var aO=pA.attr("data"),
wS=aO.parent.children[agy(aO)+1];
bFu(wS,aO);
return this.cfC(pA,wS);
},
aWN:function(pA)
{
if(pA.size())
{
var aO=pA.attr("data");
agy(aO)==aO.parent.children.length-1
?pA.addClass("last")
:pA.rmClass("last");
}
return this;
},
cmZ:function(pA)
{
if(pA.size())
{
var $=pA,
aO=pA.attr("data"),
yJ=$.$(pA.data(0).parentNode.parentNode),
ckq=$.$(yJ.data(0).firstChild.firstChild);
yJ.size()&&
(aO.parent.children.length
?ckq.addClass("icon")
&&yJ.hasClass("leaf")
&&yJ.rmClass("leaf").addClass(this.ff.ciw?"closed":"open")
:ckq.rmClass("icon")
&&yJ.rmClass("open").rmClass("closed").addClass("leaf")
)
}
return this;
},
cfC:function(pA,aA)
{
var al=this,
$=pA;
if(aA)
{

var de=al.gq.find("[nid='"+aA.id+"']");
if(de.size())
{
al.aWN(pA).aWN(de);

var pL=pA.data(0),
bv=de.data(0),
cDq=pL.nextSibling,
azZ=pL.parentNode,
crP=bv.nextSibling,
cgG=bv.parentNode;
cDq
?azZ.insertBefore(bv,cDq)
:azZ.appendChild(bv);
crP
?cgG.insertBefore(pL,crP)
:cgG.appendChild(pL);
bdU(pA,al.ff);
bdU(de,al.ff);
return true;
}

}
}
}










function bJR(at)
{
var al=this,
cM=Array.apply(null,arguments);
return $.isStr(at)
?bKV.apply(al,cM)
:bQM.call(al,at);
}
function bQM(at)
{
var al=this;
al.data(0).aGT=new baq(al,at);
return al;
}
function bKV(vE)
{
var al=this,
ku=al.data(0).aGT;
switch(vE)
{




case"instance":
return ku;




case"moveup":
ku=Pt(al.data(0));
return ku&&ku.daZ.apply(ku,[al].concat($.toArr(arguments).slice(1)));




case"movedown":
ku=Pt(al.data(0));
return ku&&ku.cWw.apply(ku,[al].concat($.toArr(arguments).slice(1)));




case"delete":
ku=Pt(al.data(0));
return ku&&ku.aYo.apply(ku,[al].concat($.toArr(arguments).slice(1)));




case"append":
ku=Pt(al.data(0));
return ku&&ku.dmJ.apply(ku,[al].concat($.toArr(arguments).slice(1)));




case"draw":
ku=Pt(al.data(0));
return ku&&ku.aRc.apply(ku,[al].concat($.toArr(arguments).slice(1)));




case"data":
return ku
?ku.Sg.apply(ku,$.toArr(arguments).slice(1))
:(ku=Pt(al.data(0)))&&ku.cWN.apply(ku,[al].concat($.toArr(arguments).slice(1)));




case"find":
return ku&&ku.anD.apply(ku,$.toArr(arguments).slice(1));
}
return al;
}


bq.extend("method",(
function()
{
return(
{
tree:bJR
}
);
}
)()
);
function Pt(_aoDom)
{
var _oDom=_aoDom||{};
do
{
if(_oDom.aGT)
{
return _oDom.aGT;
}
}
while(_oDom=_oDom.parentNode);
}
function bFu(adr,aA)
{
var azZ=adr.parent,
bID=agy(adr);
aA.parent.children[agy(aA)]=adr;
azZ.children[bID]=aA;
adr.parent=aA.parent;
aA.parent=azZ;
}
function agy(cE)
{
var wC=cE.parent.children;
for(var i=0;i<wC.length;i++)
{
if(cE==wC[i])
{
return i;
}
}
return-1;
}
function bFj(hS)
{
return['<ins un="item" class="folder"></ins><a class="item" un="item">',hS.name,'</a>'].join("");
}
function cwi(uK,aE,at)
{
var bH=at||{},
_oItem=aE[uK],
aFH=_oItem.children,
hP=$.$("<li>"),rh;

uK==aE.length-1&&hP.addClass("last");
ciF(hP,_oItem,bH);


if(aFH)
{
var wA=$.$("<ul>");
hP
.addClass(bH.ciw?"closed":"open")
.append(wA)
.find("[un='icon']")
.on("click",function()
{
bH.bEr(_oItem,hP)
});
for(var i=0;i<aFH.length;i++)
{
aFH[i].parent=_oItem;
wA.append(cwi(i,aFH,at));
}
}
else
{
hP.addClass("leaf");
}
return hP;
}
function ciF(pA,aE,at)
{
pA.size()&&bdU(pA.attr("un","node").attr("nid",aE.id).attr("data",aE)
.append(['<div un="line" class="line"><ins un="icon"',aE.children&&aE.children.length?' class="icon"':'','></ins>','<span un="content"></span></div>'].join("")),at);
}
function bdU(pA,at)
{
if(!pA.size())
{
return;
}
var bH=at||{},
_oItem=pA.attr("data"),
rh=pA.$(bGV(pA.data(0).firstChild,function(_aoDom)
{
return _aoDom.getAttribute("un")=="content";
}))
.html(bH.bFj(_oItem));
rh.find("[un='item']")
.on("click",function()
{
bH.bot(_oItem,pA,rh);
bH.bIU(_oItem,pA,rh);
});
bH.blm&&bH.blm(_oItem,pA,rh);
}
function bGV(_aoDom,ajp)
{
if(_aoDom)
{
_aoDom=_aoDom.firstChild;
do
{
if(ajp(_aoDom))
{
return _aoDom;
}
}
while(_aoDom=_aoDom.nextSibling);
}
}
}
);
$.package(
"comm/ui/calendar.js",
[
"comm/ui/panel.js",
"comm/ui/dock.js"
],
function(bu)
{
var bq=$.ctor_(),
ay=QMWin,
Rs;

function cvo(iP,kG,lx,nl)
{
var Bz=formatNum,
Vz=[nl.getFullYear(),Bz(nl.getMonth()+1,2),Bz(nl.getDate(),2)].join(""),
adE=[iP,Bz(kG,2),Bz(lx,2)].join("");
return adE<Vz?-1:(adE==Vz?0:1);
}





function isLeapYear(iP)
{
return(iP%400==0||(iP%4==0&&iP%100!=0));
}







function calDays(iP,kG)
{
return[null,31,null,31,30,31,30,31,31,30,31,30,31][kG]||(isLeapYear(iP)?29:28);
}







function Up(ee,um)
{
return typeof ee=="function"
&&ee.apply(this,um||[]);
}






function callBack(ee,um)
{
if(!window.Console)
{
try
{
return Up.call(this,ee,um);
}
catch(cg)
{
}
}
else
{
return Up.call(this,ee,um);
}
}








function formatNum(tW,aZG)
{
var GO=(isNaN(tW)?0:tW).toString(),
aBx=aZG-GO.length;
return aBx>0?[new Array(aBx+1).join("0"),GO].join(""):GO;
}



















function Bh(gh,at)
{
var al=this;
al.constructor=arguments.callee;
al.ctI=gh;
al.gq=gh.$("<div>").panel(at).css("width",200);
al.asj(at);
al.iq();
al.aug(gh,at);
}
Bh.prototype.aug=function(gh,at)
{
var al=this,
bc=al.gq,
awh=gh.$("body"),
eN="__clENdAR__";

var aiu=ay.lib("Dock")
.fix(gh.data(0),
bc.data(0),
$.extend({bVer:true,bRight:true},at.oDockConfig));
bc.css(
{
position:"absolute",
left:aiu[0],
top:aiu[1]+6
});









!awh.attr(eN)&&awh.attr(eN,true).on("click",al.cBb,al);
};
Bh.prototype.cBb=function(_aoEvent)
{
var al=Rs,
bc=al.ctI,
bv=ay.target(_aoEvent);
if(bc.data(0)!=bv&&bc.$("body").contain(bv)&&!al.gq.contain(bv))
{

al.qT();
}
};
Bh.prototype.asj=function(eG)
{
var al=this,
gH=eG.date||new Date;

al.Ba=gH.getMonth()+1;
al.Bc=gH.getFullYear();


al.$=al.gq;
al.eW=al.gq.data(0);
al.BI=al.eW.ownerDocument;

al.bhv=eG.rankYear&&eG.rankYear[0]||2001;
al.bgE=eG.rankYear&&eG.rankYear[1]||2050;

al.TB=ay.now();

var afH=Bh.bGk;

al.moCss=eG.css||afH.aNn;

al.bmN=eG.onspecaildate||afH.bIG;
al.YB=eG.onmouseover||afH.aDO;
al.bpW=eG.onclick||afH.aET;
al.blB=eG.onmouseout||afH.aGG;
};

Bh.bGk={
bIG:function(){return""},

aDO:function(iP,kG,lx,aA)
{
var fK=aA.className,
wN=new RegExp("("+this.moCss.EXPIREDDAY+")","ig");
if(!wN.test(fK))
{
aA.className+=" "+this.moCss.HOVERDAY;
}
this.bGS(iP,kG,lx,aA);
},

aGG:function(iP,kG,lx,aA)
{
aA.className=aA.getAttribute("orgclass");
this.aVj();
},

aET:function(){},

aNn:{
CALENDAR:"calendar",
NORMALDAY:"normalday",
TODAY:"today",
CURRENTDAY:"fn_list",
INVALIDATEDDAY:"invalidateday pointer",
EXPIREDDAY:"graytext",
WEEKTTITLE:"week_title graytext",
HOVERDAY:"hover attbg pointer",
REMIND:"remind pointer",
REMIND_EXPIRED:"remind_expired pointer",
REMIND_EVERYDAY:"remind pointer",
REMIND_EVERYWEEK:"remind pointer",
REMIND_EVERYMONTH:"remind pointer",
REMIND_EVERYYEAH:"remind pointer"
}
};


Bh.prototype.iq=function()
{
var al=this,
bcE=Bh.cX.bnw,
cW=[
bcE.replace({
type:"Year",
typename:"年",
id:al.TB,
value:al.Bc,
content:bcE.replace({
type:"Month",
typename:"月",
id:al.TB,
value:al.Ba
},"data")
}),
al.bmU()
];
al.eW.innerHTML=Bh.cX.aVE.replace({
content:cW.join(""),
"class":al.moCss.CALENDAR
});


var aFr=al.$.$("#table_"+al.TB).data(0);

function aGq(_aoEvent)
{
var bv=ay.target(_aoEvent),
yD;
while(bv&&bv!=aFr&&!bv.getAttribute("day"))
{
bv=bv.parentNode;
}
if(bv!=aFr)
{
al.aVj();
yD=parseInt(bv.getAttribute("day"));
if(yD>0)
{
callBack.call(al,
{
click:al.bpW,
mouseover:al.YB,
mouseout:al.blB
}[_aoEvent.type],[al.Bc,al.Ba,yD,bv]
);
}
else if(_aoEvent.type=='click')
{
al.aXh(yD==-1?-1:1,0);
}
}
}

al.$.$(aFr)
.on("click",aGq)
.on("mouseover",aGq)
.on("mouseout",aGq);

var iG=[[0,-1],"prevYear_",
[0,1],"nextYear_",
[-1,0],"prevMonth_",
[1,0],"nextMonth_"];
for(bn=iG.length-1;bn>0;bn-=2)
{
(function()
{
var _nIdx=bn;
al.$.$("#"+iG[_nIdx]+al.TB).on("click",function(){
al.aXh.apply(al,iG[_nIdx-1]);
});
})();
}
};

Bh.prototype.bmU=function()
{
var arH=this.Ba,
aLk=this.Bc;
if(--arH<=0)
{
arH=12;
aLk--;
}
var bmX=calDays(aLk,arH),
arS=(new Date(this.Bc,this.Ba-1,1)).getDay(),
fK="",
ari=[],
KE=[],
dK=Bh.cX,
sG=dK.bLm,
atN=this.moCss;


for(var bn=0,dZ=dK.aHp.length;bn<dZ;bn++)
{
KE.push(sG.replace({
"class":atN.WEEKTTITLE,
content:dK.aHp.charAt(bn)
}));
}
ari.push(dK.aHY.replace({
content:KE.join("")
}));


KE=[];
for(bn=1;bn<=arS;bn++)
{
KE.push(sG.replace({
"class":atN.INVALIDATEDDAY,
day:-1,
content:bmX+bn-arS
}));
}

var rg=0,
Nu=false,
yD=calDays(this.Bc,this.Ba),
fK=atN.NORMALDAY,
atc=fK;
bn=arS;
while(!Nu)
{
for(;bn<=6;bn++)
{
++rg;

atc=fK;
if(!Nu)
{
atc=this.bmN(this.Bc,this.Ba,rg);
}

KE.push(sG.replace({
"class":atc,
day:Nu?0:rg,
content:rg
}));
if(yD==rg)
{

rg=0;
Nu=true;
fK=atN.INVALIDATEDDAY;

}
}
bn=0;
ari.push(dK.aHY.replace({
content:KE.join("")
}));
KE=[];
}
return dK.boF.replace({
id:this.TB,
content:ari.join("")
});

};

Bh.prototype.aXh=function(bPI,bNU)
{
var Lf=this.Ba+bPI,
uy=this.Bc+bNU;
if(Lf<1)
{
Lf=12;
--uy;
}
else if(Lf>12)
{
Lf=1;
++uy;
}
if(uy>=this.bhv&&uy<=this.bgE)
{
this.Bc=uy;
this.Ba=Lf;
this.iq();
}
};


Bh.cX={
aHp:"日一二三四五六",

aVE:ay.T('<table class="$class$" cellpadding=0 cellspacing=0 border=0 width="100%" align=center valign=top>$content$</table>'),

bnw:ay.TE(['<tr>',
'<td class="title_year attbg bd">',
'$@$sec data$@$',
'<span class="selecter">',
'<img src="/zh_CN/htmledition/images/nextfd.gif" id="prev$type$_$id$" title="前一$typename$"/>',
'<span style="margin:0 4px;"><span>$value$</span>$typename$</span>',
'<img src="/zh_CN/htmledition/images/prefd.gif" id="next$type$_$id$"  title="下一$typename$"/>',
'</span>',
'$@$endsec$@$',
'$content$',
'</td>',
'</tr>']),

boF:ay.T(['<tr><td align=center width=100%>',
'<table id="table_$id$" class="datelist" cellpadding=0 cellspacing=0 border=0 width=100%>$content$</table></td></tr>']),

aHY:ay.T('<tr align=center>$content$</tr>'),



bLm:ay.T('<td class="day $class$" orgclass="day $class$" day="$day$">$content$</td>'),

cNG:ay.T(
"<div class='toolbg bd' style='height:auto;width:61px;padding:4px 6px 2px 6px;line-height:18px'>$sShow$<br><b>$term$ $lf$ $sf$</b></div>")
};





Bh.prototype.bGS=function(iP,kG,lx,aA)
{




































};




Bh.prototype.aVj=function()
{









};
















Bh.compareToday=function(iP,kG,lx)
{
return cvo(iP,kG,lx,new Date);
};

Bh.prototype.qT=function()
{
this.gq.remove();
};
function czL(at)
{
var al=this,
cM=Array.apply(null,arguments);
return $.isStr(at)
?clC.apply(al,cM)
:cBf.call(al,at);
}
function cBf(at)
{
var al=this;
Rs&&Rs.qT();
al.data(0).clw=Rs=new Bh(al,at||{});
return al;
}
function clC(vE)
{
var al=this,
Rs=al.data(0).clw;
switch(vE)
{
case"instance":
return Rs;
case"close":
Rs&&Rs.qT.apply(Rs,$.toArr(arguments).splice(1));
break;
}
return al;
}

bq.extend("method",(
function()
{
return(
{
calendar:czL,
formatNum:formatNum
}
);
}
)()
);
}
);

$.package(
"comm/ui/qmautocomplete.js",
[
"comm/ui/qmpanel.js"
],
function(bu)
{
var bo=QMWin,
bq=bo.ctor_();







bo.createCtrl(
"UI.QMAutoComplete",
{sSuper:"UI.QMSelectPanel"},
function(bm)
{
var adF=bo.lib("TagEventCatcher"),
aoo=bo.isBrowser("opera"),
aqe="beforedeactivate",
aNO=1000,
aMN=20;

return{







show:function(cO)
{
var al=this;
return al.adjustPos().superEx_(bm,"show",[cO]);
},







upBody_:function(aE)
{
var al=this,
aO=aE||al.Dh.oData||[],
cW=[];
al.Dh.oData=aO;

for(var i=0,_nLen=aO.length;i<_nLen;i++)
{
cW.push('<div class="ac_item"',aO.nSel?'>':' mor="highlight" ck="sel" un="sel">',aO[i].sHtml,'</div>');
}

return al.superEx_(bm,"upBody_",[cW.join(''),aO]).setSelectItem(0,true,false);
},






adjustPos:function()
{
var al=this,
aqk=al.Dh.aPp,
ej=aqk.offset();

return al.setPosition(ej.top+aqk.outerHeight(),ej.left);
},








showAC:function(aE)
{
return this.setBody(aE).show();
},

hide:function(){
var al=this;
al.ZH="";
return al.superEx_(bm,"hide");
},






hideAC:function()
{
return this.BT(false).hide();
},






oy:function()
{
var al=this;

al.Nc.addEvent(
{
keydown:al.aiR,
keypress:al.asJ,
keyup:al.arW,
focus:al.Bj,
blur:al.aeH
},
{
oContext:al
}
);
return al;
},






yi:function(EQ)
{
var al=this,
bZ=al.Dh.oInput.attr('value'),
aO;

if(!bZ)
{
al.hide();
}
else if(al.ZH!=bZ)
{

var $=al.$,
gI=al.Dh.vData;
aO=$.isArr(gI)?gI:$.call(al,al.Dh.vData,[al.ZH=bZ,EQ]);

if(aO&&aO.length)
{
al.upBody_(aO);
al.Ls&&
al.superEx_(bm,"show");
}
else
{
al.hide();
}
}
return al;
},






BT:function(aPe)
{
var al=this,
bj=al.$.inWin();

if(al.Os)
{
bj.clearInterval(al.Os);
al.Os=null;
}
if(aPe)
{
al.Os=bj.setInterval(function()
{

al.yi();
},aNO
);
}
return al;
},

aiR:function(_aoEvent)
{


var al=this,
$=al.$,
gA=_aoEvent.keyCode;



if(al.isShow())
{
switch(gA)
{
case 13:
$.preventDefault(_aoEvent);
case 9:

al.fireEvent_("select",[al.getSelectData()]).hide();
break;
case 38:
case 40:

!aoo&&al.setSelectItem(gA-39,false,true);
$.preventDefault(_aoEvent);
break;
case 27:


al.hide();
$.preventDefault(_aoEvent);
break;
}
}
return al.BT(true);
},

arW:function(_aoEvent)
{


var al=this,
bj=al.$.inWin(),
gA=_aoEvent.keyCode;

if(!(gA==38||gA==40||(gA==13)||gA==27))
{
al.alk&&bj.clearTimeout(al.alk);
al.alk=bj.setTimeout(function()
{
al.yi(gA);
},
aMN
);
}
return al;
},





asJ:function(_aoEvent)
{





var al=this;
if(aoo&&al.isShow())
{
var gA=_aoEvent.keyCode;
if(gA==38||gA==40)
{
al.setSelectItem(gA-39,false,true);
}




}
return al;
},





Bj:function(_aoEvent,azV)
{
var al=this;
al.Ls=true;
return al;

},





aeH:function(_aoEvent)
{
var al=this;
al.Ls=false;
return al.hideAC();
},





rule:function()
{
var al=this,
Ky=al.super_(bm,"rule");

return adF.merge(
{
mousedown:{
noblur:{}
}
},Ky
);
},

aaz:function(_aoEvent)
{
var al=this;
al.$.preventDefault(_aoEvent);
al.Nc.delEvent(aqe,al.aaz);
},





events:function()
{
var al=this,
$=al.$,
aec=al.super_(bm,"events"),
aEq=aec.sel,
gu={oContext:al};

return $.extend(aec,
{
sel:function(_aoEvent,aA,aM)
{
$.callEx(this,aEq,[_aoEvent,aA,aM]);
al.hideAC();
},
noblur:function(_aoEvent,aA,aM)
{


al.Nc.addEvent(aqe,al.aaz,gu);

$.setTimeout(al.aaz,200,gu);

$.preventDefault(_aoEvent);
}
}
);
},





























init_:function(aI)
{
var al=this,
$=al.$;
al.Dh=aI;
al.Nc=$.$(aI.oInput).attr("autocomplete","off");
aI.aPp=$.$(aI.oPosObj||aI.oInput);
aI.bAnimation=aI.bAnimation||false;

al.superEx_(bm,"init_",[aI]).adjustPos().oy();

al.Os=null;
al.ZH="";

}
};
}
);

bo.ctor_().extend("method",
{
autocomplete:function(aI)
{
var al=this,
$=al.$,
acL="_aUtOCoMpLeTe_";
al.each(function(_aoDom)
{
var bc=$(_aoDom);
if(!bc.attr(acL))
{
bc.attr(acL,"1").ctrl("UI.QMAutoComplete",
bc.extend({oInput:bc},aI),
{
select:function(aE)
{
al.call(aI.onselect,[aE]);
}
}
);
}
}
);
}
}
);

}
);
$.package(
"comm/ui/dragdrop.js",
[],
function(bu)
{
var $=bu,
ay=QMWin,
aMd={},
bq=ay.ctor_();

var LC={
bxN:0,
aCP:1,
Zt:2
},
cXK={
disable:false,
cancel:"input",

cursor:"move",

distance:5,

helper:"original",



getPos:function(gh)
{
var il=gh.offset(),
gP=il.left,
fB=il.top;

return[gP+gh.attr("offsetWidth")/2,fB+gh.attr("offsetHeight")/2];
}
},
cxH="__DrAg_DrOp__";

function aEe(_aoEvent)
{
if(_aoEvent.pageX)
{
return[_aoEvent.pageX,_aoEvent.pageY];
}
var eC=ay.target(_aoEvent),
bj=ay.inWin(eC),
bR=eC.ownerDocument,
fm=bR.body,
jA=bR.documentElement,
Np=jA.clientTop||fm.clientTop||0,
adA=jA.clientLeft||fm.clientLeft||0,
fB=_aoEvent.clientY
+(bj.pageYOffset||jA.scrollTop||fm.scrollTop||0)
-Np,
gP=_aoEvent.clientX
+(bj.pageXOffset||jA.scrollLeft||fm.scrollLeft||0)
-adA;
return[gP,fB];
}

function cgS(_aoDom)
{
var aer={top:0,left:0},
eK=_aoDom.offsetParent;

while(_aoDom&&_aoDom!=eK)
{
aer.top+=_aoDom.scrollTop;
aer.left+=_aoDom.scrollLeft;

_aoDom=_aoDom.parentNode;
}

return aer;
}

var bgH=function(gh,eg)
{
var al=this;

al.uO=gh;
al.sL=null;
al.xS=eg&&eg.container&&ay.$(eg.container);
al.qF=ay.extend({},cXK,eg);
al.km=LC.Zt;

al.hw();
};

bgH.prototype=
{
option:function(eb,hY)
{
var al=this,
cD=al.qF;

if(hY)
{
cD[eb]=hY;
return al;
}

return cD[eb];
},

hw:function()
{
var al=this,
cD=al.qF,
dtK=(cD.handle?al.uO.find(cD.handle):al.uO);

dtK.addEvent("mousedown",function(_aoEvent)
{

ay.preventDefault(_aoEvent);

if(cD.disable||(cD.lockx&&cD.locky))
{
return;
}
var il=al.uO.offset();
al.cxF={
avN:_aoEvent.clientX,
aqG:_aoEvent.clientY,
bKY:il.left-(parseInt(al.uO.css("margin-left"))||0),
bKe:il.top-(parseInt(al.uO.css("margin-top"))||0)
};

al.adg();
}
);

var hC=null,foe=false,
akt=cD.group;
akt&&
al.uO.addEvent("dragStart",function(_aoEvent)
{
aip(aEe(_aoEvent));
ay.$(ay.target(_aoEvent).ownerDocument.body).css("cursor",cD.cursor);
}).addEvent("drag",function(_aoEvent)
{
clearTimeout(hC);
var aNS=aEe(_aoEvent);
hC=setTimeout(function(){
aip(aNS);
});
}).addEvent("dragStop",function(_aoEvent)
{
aip(aEe(_aoEvent));
ay.$(ay.target(_aoEvent).ownerDocument.body).css("cursor","");
});

function aip(dmu)
{
var JL=[];
aMd.bbW&&(JL=aMd.bbW[akt]);
for(var i=0;i<JL.length;i++)
{
var bRX=JL[i];
bRX!=al.uO.data(0)&&
ay.fireEvent(bRX,cxH,
[{
state:al.km,
cursorPos:dmu,
pos:cD.getPos(al.sL)
}]);
}
}
},

adg:function()
{
var al=this,
cD=al.qF,
jB=al.uO.data(0),
bR=jB.ownerDocument,
bj=bR.parentWindow||bR.defaultView;

ay.addEvent(bR,"mousemove",awF);
ay.addEvent(bR,"mouseup",Po);


function awF(_aoEvent)
{


if(jB.setCapture)
{
jB.setCapture(true);
ay.addEvent(jB,"losecapture",Po);
}
else
{
bj.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
ay.addEvent(bj,'blur',Po);
}

ay.preventDefault(_aoEvent);

bj.getSelection?bj.getSelection().removeAllRanges():bR.selection.empty();


var aiW=al.cxF,
avN=aiW.avN,
aqG=aiW.aqG,
vY=Math.abs(avN-_aoEvent.clientX),
wc=Math.abs(aqG-_aoEvent.clientY);

if(al.km==LC.Zt)
{
if(vY>cD.distance||wc>cD.distance)
{
al.km=LC.bxN;
al.asq(_aoEvent);
al.uO.fireEvent("dragStart",[_aoEvent,{
helper:al.sL,
position:{left:0,right:0},
offset:{left:0,right:0}
}]);
}
return;
}

al.km=LC.aCP;
al.cSh(_aoEvent);
al.uO.fireEvent("drag",[_aoEvent,{
helper:al.sL,
position:{left:0,right:0},
offset:{left:0,right:0}
}]);

}

function Po(_aoEvent)
{


if(al.km==LC.Zt)
{
aJP();
return;
}

al.km=LC.Zt;
al.uO.fireEvent("dragStop",[_aoEvent,{
helper:al.sL,
position:{left:0,right:0},
offset:{left:0,right:0}
}]);
al.Sa(_aoEvent);
aJP();
}

function aJP()
{
ay.delEvent(bR,"mousemove",awF)
.delEvent(bR,"mouseup",Po);

if(jB.releaseCapture)
{
jB.releaseCapture();
ay.delEvent(jB,"losecapture",Po);
}
else
{
bj.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);
ay.delEvent(bj,'blur',Po);
}
}
},

asq:function(_aoEvent)
{
var al=this,
cD=al.qF;
al.sL=al.csx(_aoEvent);
al.HI=al.sL.data(0);
al.cma={
acA:al.sL.css("zIndex"),
daN:al.sL.css("opacity")
};
al.sL.css("zIndex","10001")
.css("opacity",cD.opacity);

al.sL.css("display","block");
},

cSh:function(_aoEvent)
{
var al=this,
cD=al.qF;
with(al.HI.style)
{
if(cD.cursorAt)
{
var aNS=aEe(_aoEvent);
left=aNS[0]+(cD.cursorAt.left||0)+"px";
top=aNS[1]+(cD.cursorAt.right||0)+"px";
}
else
{
var byt=al.sL.parent("*").offset()||{left:0,top:0},
aer=cgS(al.HI),
aiW=al.cxF;

if(!cD.lockx)
{
left=aiW.bKY+_aoEvent.clientX-aiW.avN-byt["left"]+aer["left"]+"px";
}
if(!cD.locky)
{
top=aiW.bKe+_aoEvent.clientY-aiW.aqG-byt["top"]+aer["top"]+"px";
}

if(al.xS)
{
var aaB=al.sL.offset(),
abg=al.xS.offset(),
bCu=al.HI.clientHeight,
bBn=al.HI.clientWidth,
buJ=al.xS.attr("offsetHeight"),
bBX=al.xS.attr("offsetWidth");


if(aaB["left"]<abg["left"])
{
left=al.HI.offsetLeft+(abg["left"]-aaB["left"])+"px";
}
else if((aaB["left"]+bBn)>(abg["left"]+bBX))
{
left=al.HI.offsetLeft+(abg["left"]+bBX)
-(aaB["left"]+bBn)+"px";
}

if(aaB["top"]<abg["top"])
{
top=al.HI.offsetTop+(abg["top"]-aaB["top"])+"px";
}
else if((aaB["top"]+bCu)>(abg["top"]+buJ))
{
top=al.HI.offsetTop+(abg["top"]+buJ)
-(aaB["top"]+bCu)+"px";
}
}
}
}
},

Sa:function(_aoEvent)
{
var al=this,
cD=al.qF,
ajY=cD.helper;
if(ajY==="original")
{
al.sL.css("zIndex",al.cma.acA)
.css("opacity",al.cma.daN);

}
else if(ajY==="clone")
{
al.uO.css("opacity",1);
al.sL.remove();
al.HI=null;
}
else
{
al.sL.css("left","-1000px").css("top","-1000px").hide();
}
},

csx:function(_aoEvent)
{
var al=this,
ug=al.uO,
cD=al.qF,
ajY=cD.helper,
azL;

if(ajY==="original")
{
azL=ug;
}
else if(ajY==="clone")
{
azL=ay.$(ug.data(0).cloneNode(true));
}
else
{
azL=ay.$(ajY);
}

var XC=cD.cursorAt?_aoEvent.clientY+(cD.cursorAt.right||0)+"px"
:ug.attr("offsetTop")-(parseInt(ug.css("margin-top"))||0)+"px",
VZ=cD.cursorAt?_aoEvent.clientX+(cD.cursorAt.left||0)+"px"
:ug.attr("offsetLeft")-(parseInt(ug.css("margin-left"))||0)+"px";

azL.css("top",XC).css("left",VZ).css("position","absolute");
ajY==="clone"&&ug.parent("*").append(azL);

return azL;
}
};

var	VH={
brF:0,
cjA:1,
afL:2
},
dxW={

getPos:function(gh)
{
var il=gh.offset(),
fL=gh.attr("offsetWidth"),
fW=gh.attr("offsetHeight");

return[il.top,il.left+fL,il.top+fW,il.left];
}
};

var	coX=function(gh,eg)
{
var al=this;

al.uO=gh;
al.qF=ay.extend({},dxW,eg);
al.km=VH.bow;

al.hw();
}

coX.prototype=
{
option:function(eb,hY)
{
var al=this,
cD=al.qF;

if(hY)
{
cD[eb]=hY;
}
return cD[eb];
},

hw:function()
{
var al=this,
cD=al.qF,
akt=cD.group;

if(akt)
{
al.uO.addEvent(cxH,function(aGO)
{
al.listen(aGO);
});
}

},

listen:function(aGO)
{
var al=this,
bJp=aGO.state,
csi=aGO.pos,
aNS=aGO.cursorPos,
bQl=al.km,
cXD=al.bma(al.qF.overByCursor?aNS:csi,
al.qF.getPos(al.uO));

if(cXD)
{
al.km=(bJp==LC.Zt)
?VH.afL
:VH.brF;
}
else
{
al.km=VH.cjA;
}


if(bQl!=al.km&&bQl!=VH.afL)
{
if(al.km==VH.brF)
{
al.cYw=setTimeout(function()
{
al.uO.fireEvent("dropOverLong",[aGO]);
},800);
}
else if(al.km==VH.cjA)
{
clearTimeout(al.cYw);
}
al.uO.fireEvent(["dropOver","dropOut","drop"][al.km],[aGO]);
}
},




bma:function(bDd,aJx)
{
var byP=bDd[0],
byS=bDd[1],
alp=aJx[3],
aHl=aJx[1],
alF=aJx[0],
aHj=aJx[2];

return(byP>alp&&byP<aHl&&byS>alF&&byS<aHj);
}
};

bq.extend("method",(
function()
{
return{
























draggable:function(eg)
{
var al=this;
al.each(function(_aoDom)
{
new bgH(al.$(_aoDom),eg)
}
);

return al;
},













droppable:function(eg)
{
var al=this,
JL,
akt=eg.group||"default-group";

aMd.bbW=aMd.bbW||{};
JL=aMd.bbW[akt]||[];

al.each(function(_aoDom)
{
var anM=false;
new coX(al.$(_aoDom),eg);
for(var i=0;i<JL.length;i++)
{
_aoDom==JL[i]&&(anM=true);
}
!anM&&JL.push(_aoDom);
}
);
aMd.bbW[akt]=JL;

return al;
}
};
}

)());
}


);
$.package(
"biz/ctrl/member/asyntree.js",
[],
function(bu)
{
var bq=$.ctor_(),
ay=QMWin;
function baq(gh,at)
{
var al=this;
al.gq=gh;
this.hw(at=at||{});
}
baq.prototype=
{
hw:function(at)
{
var al=this;
al.aGs(at);
al.xp(at);
al.aug(at);
},
aGs:function(at)
{
var al=this;
al.bJq=at.bClosed;
al.drM=at.bNoClone;
al.dkY=at.nMaxLevel||1;
al.bHK=$.isFunc(at.ondata)?at.ondata:al.ddr;
al.bOx=$.isFunc(at.onselected)?at.onselected:function(){};
},

xp:function(at)
{
var al=this;
al.aqO={};

if(al.drM)
{
al.pI=at.oData;
}
else
{
var Uk=[],
eF,
aiN,
axG=[];
Uk.push(at.oData);
while(eF=Uk.pop())
{
var Hv={
id:eF.id,
name:eF.name,
children:[]
};
var eK=axG.pop();
eK&&(Hv.parent=eK)&&eK.children.unshift(Hv);
var zS=eF.children||[];
for(var i=0;i<zS.length;i++)
{
var kB=zS[i];
Uk.push(kB);
axG.push(Hv);
}
!aiN&&(aiN=Hv);

al.aqO[eF.id]=Hv;
}
al.pI=[aiN];
al.ddY=aiN;
}
},
aug:function()
{
var al=this,
bc=al.gq
.html('<ul class="treeview"></ul>').find("ul"),
aO=al.pI,
iu=al.bsl(0,aO,al.bJq,true,0,al.dkY);
al.aUv=function(_aoEvent)
{
if($.target(_aoEvent)!=this)
{
return;
}
var hP=$.$($.$(this).parents("li").data(0)),
_oItem=al.aqO[hP.attr("nid")];
al.gq.find(".selected").rmClass("selected");
$.$(this).addClass("selected");
al.bOx(_oItem,hP,hP.find("span[un='content']"));
};

al.aZh=function()
{
var hP=$.$(this.parentNode.parentNode);
setTimeout(function()
{
$.statTime("reset");
var _oItem=al.aqO[hP.attr("nid")];

hP.hasClass("closed")
?hP.rmClass("closed").addClass("open")
:hP.rmClass("open").addClass("closed");

if(hP.attr("appended")!="1")
{
hP.attr("appended","1").append(al.bQO(_oItem));
hP.find("ul ins.icon").on("click",al.aZh);
hP.find("ul a[un='item']").on("click",al.aUv);
$.statTime("appended");
}
});
};

bc.html(iu).find("ins.icon").on("click",al.aZh);
bc.find("a[un='item']").on("click",al.aUv);
},
ddr:function(hS)
{
var al=this;
return['<ins un="item" class="folder"></ins><a class="item" un="item">',hS.name,'</a>'].join("");
},

bQO:function(hS)
{
var al=this,
zS=hS.children||[],
bMX,aME="";
for(var i=zS.length-1;i>=0;i--)
{
aME=[al.bsl(i,zS,true,false,0,0),aME].join("");
}
aME&&(aME=["<ul>",aME,"</ul>"].join(""));
return aME;
},
bsl:function(uK,bIX,cpo,dbT,avK,cnR)
{
var al=this,
_oItem=bIX[uK],
zS=_oItem.children,
nP=(cpo?"closed":"open"),
XL="",
Mm="icon",
bMX,bgb=[];
if(zS&&zS.length)
{
if(avK<cnR)
{
for(var i=zS.length-1;i>=0;i--)
{
bgb.unshift(al.bsl(i,zS,cpo,false,avK+1,cnR));
}
if(bgb.length)
{
bgb.unshift("<ul>");
bgb.push("</ul>");
}
XL=" appended='1' ";
}
else
{
nP="closed";
}
}
else
{
nP="leaf";
Mm="";
}
(uK==bIX.length-1)&&(nP+=" last");
dbT&&(nP=bIX.length==1?" root ":nP+" first");

bMX=["<li class='",nP,"' un='node' nid='",_oItem.id,"' ",XL,
"><div un='line' class='line'><ins class='",Mm,"'></ins><span un='content'>",
al.bHK(_oItem),"</span>",
"</div>",bgb.join(""),"</li>"].join("");
return bMX;
},
Sg:function()
{
return this.pI;
},
aZe:function(bFR)
{
var eF=typeof bFR=="string"?this.KR(bFR):bFR,
_oNodes=eF.parent.children||[];

for(var i=_oNodes.length-1;i>=0;i--)
{
if(_oNodes[i]==eF)
{
return i;
}
}
return-1;
},
KR:function(ba,csq)
{
var al=this,
pL=this.aqO[ba];
if(csq&&pL)
{
var wC=pL.parent.children||[];
switch(csq)
{
case"pre":
return wC[al.aZe(pL)-1];
case"next":
return wC[al.aZe(pL)+1];
}
}
else
{
return pL;
}
},
axj:function(ba)
{
var al=this,
bc=al.gq;
return bc.find(["li[nid='",ba,"']"].join("")).data(0);
},
cbI:function(bMj,bMZ)
{
if(bMj==bMZ)
{
return;
}
var al=this,
bc=al.gq,
bbE=al.KR(bMj),
bcB=al.KR(bMZ),
YW=al.axj(bMj),
agj=al.axj(bMZ);

if(bbE&&bcB)
{

var ceu=bbE.parent,cex=bcB.parent,
dpi=al.aZe(bbE),
dpj=al.aZe(bcB);
ceu.children[dpi]=bcB;
bcB.parent=ceu;
cex.children[dpj]=bbE;
bbE.parent=cex;


if(YW&&agj)
{
if(YW.swapNode){
YW.swapNode(agj);
}else{
var bKm=agj.parentNode;
var cfq=agj.nextSibling;

if(cfq==YW){
bKm.insertBefore(YW,agj);
}else if(agj==YW.nextSibling){
bKm.insertBefore(agj,YW);
}else{
YW.parentNode.replaceChild(agj,YW);
bKm.insertBefore(YW,cfq);
}
}

if($.$(YW).hasClass("last"))
{
$.$(YW).rmClass("last")&&$.$(agj).addClass("last");
}
else if($.$(agj).hasClass("last"))
{
$.$(agj).rmClass("last")&&$.$(YW).addClass("last");
}
}
}
},
fsf:function()
{
},
dEq:function(ba)
{
var al=this,
eF=al.KR(ba),
amH=al.KR(ba,"pre");
eF&&amH&&al.cbI(eF.id,amH.id);
},
dvk:function(ba)
{
var al=this,
eF=al.KR(ba),
wS=al.KR(ba,"next");
eF&&wS&&al.cbI(eF.id,wS.id);
},
bna:function(ba,bRM,bz)
{
var al=this,
bc=al.gq,
eK=al.KR(bRM),
_oDom=al.axj(bRM),
eF={id:ba,parent:eK,name:bz,children:[]},
gV=0;
this.aqO[ba]=eF;
eK.children=eK.children||[];
eK.children.push(eF);
gV=eK.children.length-1;
$.$(_oDom).rmClass("closed").rmClass("leaf").addClass("open");
$.$($.$(_oDom).find("ins").data(0)).addClass("icon");
var wA=$.$($.$(_oDom).find("ul").data(0));
if(wA.size()==0)
{
$.$(_oDom).attr("appended","1").append(al.bQO(eK));
$.$(_oDom).find("ul ins.icon").on("click",al.aZh);
$.$(_oDom).find("ul a[un='item']").on("click",al.aUv);
}
else
{
wA.append(al.bsl(gV,eK.children,false,false,0,0));
$.$(_oDom).find("li[nid='"+ba+"'] ins.icon").on("click",al.aZh);
$.$(_oDom).find("li[nid='"+ba+"'] a[un='item']").on("click",al.aUv);
}
var amH=al.KR(ba,"pre");
if(amH)
{
$.$(al.axj(amH.id)).rmClass("last");
}
},
dpp:function(ba,bz)
{
var al=this,
eF=al.KR(ba),
_oDom=al.axj(ba);
if(eF)
{
eF.name=bz;
$.$($.$(_oDom).find("a[un='item']").data(0)).html(bz);
}
},
dcP:function(ba)
{
var al=this,
eF=al.KR(ba),
gV=al.aZe(eF),
wC=eF.parent.children,
_oDom=al.axj(ba),
dEA=eF.parent;
if(eF)
{

if(1==wC.length)
{
var aQt=$.$($.$(_oDom).parents("li").data(0));
aQt.rmClass("open").addClass("leaf");
aQt.find("ins.icon").rmClass("icon");
aQt.find("ul").remove();
var cdG=eF.parent.parent;
if(cdG&&cdG.children.length==1)
{
aQt.addClass("last");
}
}

else if(gV==wC.length-1)
{
$.$(_oDom.previousSibling).addClass("last");
}

wC.splice(gV,1);
al.aqO[ba]=null;
$.$(_oDom).remove();
al.crf(dEA.id);
}
},
crf:function(ba)
{
var al=this,
eF=al.KR(ba),
hz=[eF];
if(!eF)
{
eF=al.ddY,
hz=[eF];
}
while(eF=eF.parent)
{
hz.push(eF);
}
var eK;
while(eF=hz.pop())
{
var _oDom=al.axj(eF.id);
if(_oDom)
{
var bc=$.$(_oDom);
bc.hasClass("closed")&&bc.find("ins.icon").fireEvent("click");
if(eF.id==ba)
{
al.gq.find(".selected").rmClass("selected");
$.$(bc.find("a[un='item']").data(0)).addClass("selected");
}
eK=eF;
}
else if(eK)
{
var hP=$.$(al.axj(eK.id));
hP.attr("appended","1").append(al.bQO(eK));
hP.find("ul ins.icon").on("click",al.aZh).fireEvent("click");
hP.find("ul a[un='item']").on("click",al.aUv);

hz.push(eF);
}
}
}
}










function bJR(at)
{
var al=this,
cM=Array.apply(null,arguments);
return $.isStr(at)
?bKV.apply(al,cM)
:bQM.call(al,at);
}
function bQM(at)
{
var al=this;
al.data(0).aGT=new baq(al,at);
return al;
}
function bKV(vE)
{
var al=this,
ku=al.data(0).aGT;
switch(vE)
{




case"instance":
return ku;




case"moveup":
ku=Pt(al.data(0));
return ku&&ku.dEq.apply(ku,$.toArr(arguments).slice(1));




case"movedown":
ku=Pt(al.data(0));
return ku&&ku.dvk.apply(ku,$.toArr(arguments).slice(1));




case"delete":
ku=Pt(al.data(0));
return ku&&ku.dcP.apply(ku,$.toArr(arguments).slice(1));




case"append":
ku=Pt(al.data(0));
return ku&&ku.bna.apply(ku,$.toArr(arguments).slice(1));




case"rename":
ku=Pt(al.data(0));
return ku&&ku.dpp.apply(ku,$.toArr(arguments).slice(1));




case"data":
ku=Pt(al.data(0));
return ku
?ku.Sg.apply(ku,$.toArr(arguments).slice(1))
:(ku=Pt(al.data(0)))&&ku.KR.apply(ku,[al].concat($.toArr(arguments).slice(1)));




case"find":
ku=Pt(al.data(0));
return ku&&ku.Sg.apply(ku,$.toArr(arguments).slice(1));




case"select":
ku=Pt(al.data(0));
return ku&&ku.crf.apply(ku,$.toArr(arguments).slice(1));
}
return al;
}


bq.extend("method",(
function()
{
return(
{
asyntree:bJR
}
);
}
)()
);
function Pt(_aoDom)
{
var _oDom=_aoDom||{};
do
{
if(_oDom.aGT)
{
return _oDom.aGT;
}
}
while(_oDom=_oDom.parentNode);
}
function bFu(adr,aA)
{
var azZ=adr.parent,
bID=agy(adr);
aA.parent.children[agy(aA)]=adr;
azZ.children[bID]=aA;
adr.parent=aA.parent;
aA.parent=azZ;
}
function agy(cE)
{
var wC=cE.parent.children;
for(var i=0;i<wC.length;i++)
{
if(cE==wC[i])
{
return i;
}
}
return-1;
}
function bGV(_aoDom,ajp)
{
if(_aoDom)
{
_aoDom=_aoDom.firstChild;
do
{
if(ajp(_aoDom))
{
return _aoDom;
}
}
while(_aoDom=_aoDom.nextSibling);
}
}
}
);
$.package(
"biz/ctrl/member/exautocomplete.js",
[
"comm/ui/qmpanel.js"
],
function(bu)
{
var bo=QMWin,
bq=bo.ctor_();







bo.createCtrl(
"UI.EXAutoComplete",
{sSuper:"UI.QMSelectPanel"},
function(bm)
{
var adF=bo.lib("TagEventCatcher"),
aoo=bo.isBrowser("opera"),
aqe="beforedeactivate",
aNO=1000,
aMN=20;

return{







show:function(cO)
{
var al=this;
return al.adjustPos().superEx_(bm,"show",[cO]);
},







upBody_:function(aE)
{
var al=this,
aO=aE||al.Dh.oData||[],
cW=[];
al.Dh.oData=aO;

for(var i=0,_nLen=aO.length;i<_nLen;i++)
{
cW.push('<div class="ac_item"',aO.nSel?'>':' mor="highlight" ck="sel" un="sel">',aO[i].sHtml,'</div>');
}

var bD=al.superEx_(bm,"upBody_",[cW.join(''),aO]);
al.bAutoSelect&&bD.setSelectItem(0,true,false);
return bD;
},






adjustPos:function()
{
var al=this,
aqk=al.Dh.aPp,
ej=aqk.offset();

return al.setPosition(ej.top+aqk.outerHeight(),ej.left);
},








showAC:function(aE)
{
return this.setBody(aE).show();
},

hide:function(){
var al=this;
al.ZH="";

return al.BT(false).superEx_(bm,"hide");
},






hideAC:function()
{
return this.BT(false).hide();
},






oy:function()
{
var al=this;

al.Nc.addEvent(
{
keydown:al.aiR,
keypress:al.asJ,
keyup:al.arW,
focus:al.Bj,
blur:al.aeH
},
{
oContext:al
}
);
return al;
},






yi:function(EQ)
{
var al=this,
bZ=al.Dh.oInput.attr('value'),
aO;

if(!bZ)
{
al.hide();
}
else if(al.ZH!=bZ)
{

var $=al.$,
gI=al.Dh.vData;
aO=$.isArr(gI)?gI:$.call(al,al.Dh.vData,[al.ZH=bZ,EQ]);

if(aO&&aO.length)
{
al.upBody_(aO);
al.Ls&&
al.superEx_(bm,"show");
}
else
{
al.hide();
}
}
return al;
},






BT:function(aPe)
{
var al=this,
bj=al.$.inWin();

if(al.Os)
{
bj.clearInterval(al.Os);
al.Os=null;
}
if(aPe)
{
al.Os=bj.setInterval(function()
{

al.yi();
},aNO
);
}
return al;
},

aiR:function(_aoEvent)
{


var al=this,
$=al.$,
aHM=false,
gA=_aoEvent.keyCode;



if(al.isShow())
{
switch(gA)
{
case 13:
$.preventDefault(_aoEvent);
aHM=true;
case 9:

al.fireEvent_("select",[al.getSelectData()]).hide();
break;
case 38:
case 40:

!aoo&&al.setSelectItem(gA-39,false,true);
$.preventDefault(_aoEvent);
break;
case 27:


al.hide();
$.preventDefault(_aoEvent);
break;
}
}

return al.BT(true&&!aHM);
},

arW:function(_aoEvent)
{


var al=this,
bj=al.$.inWin(),
gA=_aoEvent.keyCode;

if(!(gA==38||gA==40||(gA==13)||gA==27))
{
al.alk&&bj.clearTimeout(al.alk);
al.alk=bj.setTimeout(function()
{
al.yi(gA);
},
aMN
);
}
return al;
},





asJ:function(_aoEvent)
{





var al=this;
if(aoo&&al.isShow())
{
var gA=_aoEvent.keyCode;
if(gA==38||gA==40)
{
al.setSelectItem(gA-39,false,true);
}




}
return al;
},





Bj:function(_aoEvent,azV)
{
var al=this;
al.Ls=true;
return al;

},





aeH:function(_aoEvent)
{
var al=this;
al.Ls=false;
return al.hideAC();
},





rule:function()
{
var al=this,
Ky=al.super_(bm,"rule");

return adF.merge(
{
mousedown:{
noblur:{}
}
},Ky
);
},

aaz:function(_aoEvent)
{
var al=this;
al.$.preventDefault(_aoEvent);
al.Nc.delEvent(aqe,al.aaz);
},





events:function()
{
var al=this,
$=al.$,
aec=al.super_(bm,"events"),
aEq=aec.sel,
gu={oContext:al};

return $.extend(aec,
{
sel:function(_aoEvent,aA,aM)
{
$.callEx(this,aEq,[_aoEvent,aA,aM]);
al.hideAC();
},
noblur:function(_aoEvent,aA,aM)
{


al.Nc.addEvent(aqe,al.aaz,gu);

$.setTimeout(al.aaz,200,gu);

$.preventDefault(_aoEvent);
}
}
);
},





























init_:function(aI)
{
var al=this,
$=al.$;
al.Dh=aI;
al.Nc=$.$(aI.oInput).attr("autocomplete","off");
aI.aPp=$.$(aI.oPosObj||aI.oInput);
aI.bAnimation=aI.bAnimation||false;

al.superEx_(bm,"init_",[aI]).adjustPos().oy();

al.Os=null;
al.ZH="";
al.bAutoSelect=aI.bAutoSelect||false;

}
};
}
);

bo.ctor_().extend("method",
{
exautocomplete:function(aI)
{
var al=this,
kf=null,
$=al.$,
acL="_EXaUtOCoMpLeTe_";
al.each(function(_aoDom)
{
var bc=$(_aoDom);
if(!bc.attr(acL))
{
kf=bc.attr(acL,"1").ctrl("UI.EXAutoComplete",
bc.extend({oInput:bc},aI),
{
select:function(aE)
{
al.call(aI.onselect,[aE]);
}
}
);
}
}
);
return kf;
}
}
);

}
);
$.package(
"comm/ui/menu.js",
["comm/ui/panel.js","comm/ui/dock.js"],
function(bu)
{
var bq=$.ctor_(),
ay=QMWin;

function bvo(gh,at)
{
var al=this;
al.gq=gh;
this.hw(at=at||{});
}
bvo.prototype=
{
hw:function(at)
{
var al=this;
al.Mi(at);
al.oy(at);
},
Mi:function(at)
{
var al=this,
$=al.gq,
bc=$,
de=$.$(at.oTarget),
bj=$.inWin(),
jA=bj.document.documentElement,

xa=ay.$(":win").data(0),
FI=Math.max(xa.document.body.clientHeight,
xa.document.documentElement.clientHeight),

fL=at.nWidth||150,
mO=al.uo=$.$("<div>")
.html
([
'<div class="detail_mask_w"></div>',
'<div class="menu_obj">',
'<div class="m_body rounded3"></div>',
'</div>'
].join(""))
.panel($.extend({},at)),
jv=al.xS=mO.find(".menu_obj"),
rh=al.bjM=jv.find(".m_body")
.append(al.gq),
mj=al.aKT=mO.find(".detail_mask_w");


var KT=mO.panel("z-index");
mj.css("z-index",KT-1);
jv.css("z-index",KT);
at.sMaskClass&&mj.addClass(at.sMaskClass);

$.isBrowser("ie7")&&mj.hide()
.setTimeout(function(){this.show()},0,mj);

var aiu=$.lib("Dock")
.fix(de.data(0),
jv.data(0),
$.extend({bVer:true,bRight:false},at.oDockConfig));

jv.css(
{
position:"absolute",
left:aiu[0],
top:aiu[1]
});
aiu[4]&&rh.css(
{
"overflow-x":"hidden",
"overflow-y":"auto",
"wdith":aiu[2]
});
aiu[5]&&rh.css(
{
"overflow-x":"hidden",
"overflow-y":"auto",
height:aiu[3]
});


mj.on("click",(function()
{
return function()
{
al.ajP();
}
})());
rh.find("li").on("click",(function()
{
return function()
{
al.No(this);
}
})());
},
oy:function(at)
{
var al=this;
al.aab=at.onbeforeclose;
al.Vl=at.onclose;
al.cyr=at.onselect;
},
No:function(cE)
{
var bvl=this.cyr;
bvl&&bvl(cE);
},
qT:function()
{
var al=this;
al.uo.panel("close");
al.afl();
},
ajP:function()
{
var al=this,
Go=al.aab;
if(Go&&Go()||!Go)
{
al.qT();
}
},
afl:function()
{
var al=this,
QZ=al.Vl;
QZ&&QZ();
}
}






function czk(at)
{
var al=this,
cM=Array.apply(null,arguments);
if($.isStr(at))
{
return cvY.apply(al,cM);
}
else
{
return cnk.call(al,at);
}
}
function cnk(at)
{
var al=this;
al.Wk=new bvo(al,at);
return al;
}
function cvY(vE)
{
var al=this,
lK=al.Wk;
switch(vE)
{
case"instance":
return lK;
case"close":
lK&&lK.qT.apply(lK,$.toArr(arguments).splice(1));
break;
}
return al;
}

bq.extend("method",(
function()
{
return(
{
















menu:czk
}
);
}
)()
);
}
);


$.package(


"comm/extend/qmcgi.js",


[],






function(bu)
{
var 
ow="QMCGI/11.08.30",

bq=$.ctor_(),

agX=bq.prototype.ajax;





bq.extend("version",ow);





bq.extend("method",(
function()
{
var
bey="\u7CFB\u7EDF\u5F02\u5E38",
beT="\u8BF7\u6C42\u8D85\u65F6",
aZr="\u4F1A\u8BDD\u8FC7\u671F",
aUK="\u94FE\u63A5\u5F02\u5E38",

azI="cgi exception",
ayw="<!--"+azI+"-->",
aXN="cgiexception",
aXo="verifycode",
aVX="folderpwd",
agw={errcode:"-2",errmsg:bey};

function aeY(eA,KU,mJ,VN)
{
var aO=[],ayo,aAi,aza;
for(var i=0;i<eA.length;i++)
{
switch(eA[i].name)
{
case"verifykey":
KU&&(eA[i].value=KU)&&(ayo=true);
break;
case"verifycode":
mJ&&(eA[i].value=mJ)&&(aAi=true);
break;
case"verifycode_cn":
VN&&(eA[i].value=VN)&&(aza=true);
break;
}
aO.push(eA[i]);
}
!ayo&&KU&&(aO.push({name:"verifykey",value:KU}));
!aAi&&mJ&&(aO.push({name:"verifycode",value:mJ}));
!aza&&VN&&(aO.push({name:"verifycode_cn",value:VN}));
return aO;
}
return(
{
ajaxVerifyCode_:function(cG,fC,eA,aS)
{
var al=this,
cA=cG||{},
cg=fC,
bD=cg.script.match(/verifyCode\(.*?,\s*(.*?)\s*\)/),
afv=(bD&&bD[1]||"").slice(1,-1);
cg.type=aXo;
cg.verify=function(mJ)
{
var gI=cA.vData;

if(al.isArr(gI))
{
cA.vData=aeY(gI.slice(0),afv,mJ,mJ);
}
else if(al.isObj(gI))
{
cA.vData=al.extend({},gI,
{
verifykey:afv,
verifycode:mJ,
verifycode_cn:mJ
});
}
else
{
var aO=[],
jp=gI.split("&"),ahk,ma,nZ;
for(var i=0;i<jp.length;i++)
{
ahk=jp[i].split("=");
aO.push({name:ahk[0],value:ahk[1]});
}
aO=aeY(aO,afv,mJ,mJ);
al.each(aO,function(aE)
{
nZ=[aE.name,"=",aE.value].join("");
ma=ma?[ma,"&",nZ].join(""):nZ;
});
cA.vData=ma;
}

return agX.call(al,cA);
};
},
ajaxFolderPwd_:function(cG,fC,eA,aS)
{
var al=this,
cA=cG||{},
cg=fC;
cg.type=aVX;
cg.folderpwd=function()
{
return agX.call(al,cA);
};
},
ajaxSessionTimeout_:function(cG,fC,eA,aS)
{
var al=this,
cA=cG||{},
cg=fC,
aTl=function()
{
var fY=window;
while(fY.parent&&fY!=fY.parent&&(fY.parent.QMWin||fY.parent.getTop))
{
fY=fY.parent;
}
return fY;
};
al.eval("var getTop ="+aTl.toString());
al.eval(cg.script);
cg.message=aZr;
},















ajax:function(cG)
{
var al=this,
cA=al.extend({},cG),
bbo=cA.onerror,
axi=cA.ondatafilter;

cA.onerror=function(hk,iE,fC)
{
var lA=fC||{};
switch(iE)
{
case"timeout":
lA.message=beT;
break;
case"error":
lA.message=aUK;
break;
default:
!fC&&(lA.message=iE||"unknow err");
}
$.call(bbo,[hk,iE,lA]);

};
cA.ondatafilter=function(eA,aS)
{
var gI=eA;



if(al.isStr(gI)&&gI.indexOf(azI)!=-1&&(gI.indexOf(ayw)<0&&typeof al.evalVal(gI).errmsg!=='undefined'))
{
var cg={type:aXN},
ajk=[],
Cf;


if(gI.indexOf(ayw)!=-1)
{
var VT=al.$("<div>").html(gI).find("div#msg_txt"),
aBp=VT.size()>0;
cg.errcode=aBp?VT.attr("code"):agw.errcode;
cg.message=aBp?al.filteScript(VT.html()):agw.errmsg;
Cf=VT.find("script");
}

else
{
cg.json=al.evalVal(gI)||agw;
cg.message=al.filteScript(cg.json.errmsg);
Cf=al.$("<div>").html("#ie bug#"
+cg.json.errmsg).find("script");
}


Cf.each(function(aQo)
{
ajk.push(aQo.innerHTML);
}
);
cg.script=ajk.join(";");


if(cg.script.indexOf("verifyCode")>-1)
{
al.ajaxVerifyCode_(cA,cg,gI,aS);
}
else if(cg.script.indexOf("folderpwd")>-1)
{
al.ajaxFolderPwd_(cA,cg,gI,aS);
}
else if(cg.script.indexOf("s=session_timeout")>=0&&$.sid())
{
al.ajaxSessionTimeout_(cA,cg,gI,aS);
}


al.error(cg);
}


al.isFunc(axi)&&(gI=axi(gI,aS));

return gI;
};

return agX.call(al,cA);
}
}
);
}
)()
);
}


);
$.package(
"biz/lib/valid.js",
["comm/ctrl/formvalid.js"],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
FQ=/^[\.a-zA-Z0-9_=-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
Vw=/^[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
bnY=/^[0-9a-zA-Z]([\-._]?[0-9a-zA-Z])*$/,
bkS=/^(www\.)?[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)*$/,
boC=/(\.tk|\.co\.cc|\.cn\.mu|\.gv\.vg)$/;
function bkO(bme)
{

var aJZ=["000000","111111","11111111","112233","121212","123123","123456","1234567","12345678","123456789","131313","232323","654321","666666","696969","777777","7777777","8675309","987654","aaaaaa","abc123","abc123","abcdef","abgrtyu","access","access14","action","albert","alberto","alexis","alejandra","alejandro","amanda","amateur","america","andrea","andrew","angela","angels","animal","anthony","apollo","apples","arsenal","arthur","asdfgh","asdfgh","ashley","asshole","august","austin","badboy","bailey","banana","barney","baseball","batman","beatriz","beaver","beavis","bigcock","bigdaddy","bigdick","bigdog","bigtits","birdie","bitches","biteme","blazer","blonde","blondes","blowjob","blowme","bond007","bonita","bonnie","booboo","booger","boomer","boston","brandon","brandy","braves","brazil","bronco","broncos","bulldog","buster","butter","butthead","calvin","camaro","cameron","canada","captain","carlos","carter","casper","charles","charlie","cheese","chelsea","chester","chicago","chicken","cocacola","coffee","college","compaq","computer","cookie","cooper","corvette","cowboy","cowboys","crystal","cumming","cumshot","dakota","dallas","daniel","danielle","debbie","dennis","diablo","diamond","doctor","doggie","dolphin","dolphins","donald","dragon","dreams","driver","eagle1","eagles","edward","einstein","erotic","estrella","extreme","falcon","fender","ferrari","firebird","fishing","florida","flower","flyers","football","forever","freddy","freedom","fucked","fucker","fucking","fuckme","fuckyou","gandalf","gateway","gators","gemini","george","giants","ginger","golden","golfer","gordon","gregory","guitar","gunner","hammer","hannah","hardcore","harley","heather","helpme","hentai","hockey","hooters","horney","hotdog","hunter","hunting","iceman","iloveyou","internet","iwantu","jackie","jackson","jaguar","jasmine","jasper","jennifer","jeremy","jessica","johnny","johnson","jordan","joseph","joshua","junior","justin","killer","knight","ladies","lakers","lauren","leather","legend","letmein","letmein","little","london","lovers","maddog","madison","maggie","magnum","marine","mariposa","marlboro","martin","marvin","master","matrix","matthew","maverick","maxwell","melissa","member","mercedes","merlin","michael","michelle","mickey","midnight","miller","mistress","monica","monkey","monkey","monster","morgan","mother","mountain","muffin","murphy","mustang","naked","nascar","nathan","naughty","ncc1701","newyork","nicholas","nicole","nipple","nipples","oliver","orange","packers","panther","panties","parker","password","password","password1","password12","password123","patrick","peaches","peanut","pepper","phantom","phoenix","player","please","pookie","porsche","prince","princess","private","purple","pussies","qazwsx","qwerty","qwertyui","rabbit","rachel","racing","raiders","rainbow","ranger","rangers","rebecca","redskins","redsox","redwings","richard","robert","roberto","rocket","rosebud","runner","rush2112","russia","samantha","sammy","samson","sandra","saturn","scooby","scooter","scorpio","scorpion","sebastian","secret","sexsex","shadow","shannon","shaved","sierra","silver","skippy","slayer","smokey","snoopy","soccer","sophie","spanky","sparky","spider","squirt","srinivas","startrek","starwars","steelers","steven","sticky","stupid","success","suckit","summer","sunshine","superman","surfer","swimming","sydney","tequiero","taylor","tennis","teresa","tester","testing","theman","thomas","thunder","thx1138","tiffany","tigers","tigger","tomcat","topgun","toyota","travis","trouble","trustno1","tucker","turtle","twitter","united","vagina","victor","victoria","viking","voodoo","voyager","walter","warrior","welcome","whatever","william","willie","wilson","winner","winston","winter","wizard","xavier","xxxxxx","xxxxxxxx","yamaha","yankee","yankees","yellow","zxcvbn","zxcvbnm","zzzzzz"];

for(i=0;i!=aJZ.length;i++)
{
if(bme==aJZ[i])
{
return true;
}
}

return false;
};
ay.createLib(
"B.Valid",
{bStatic:true},
function()
{
return(
{
valid:function(gh)
{
var ng=[{name:"FormValid.Default"},{name:"B.Valid"}],
Nh=$.ctrl("FormValid");
if(ng.length)
{
$.each(ng,function(wx)
{
var wI=$.lib(wx.name);
wI&&Nh.add(wI.valids());
});
}
return Nh.valid(gh.find("[valid]"));
},
valids:function()
{
return(
{
func:
{
aliaslen:function(eo,cf,EH)
{
var qp=parseInt(EH)||63,
hi=ay.trim(eo.find("input").attr("value")),
lU=ay.trim(eo.find("select").attr("value"));
return hi.length+lU.length+1>qp
?[-1,{msg:cf}]:[0];
},
aliassame:function(eo,cf,bnB)
{
var bZ=eo.find("input").attr("value");
if(bZ!=bnB)
{
return[0];
}
return[-1,{msg:cf}];
},
alias:function(eo,cf)
{
var bZ=eo.find("input").attr("value");
return!bZ.length||
(
bnY.test(bZ)
)
?[0]:[-1,{msg:cf}];
},
delimiter:function(eo,cf,aLD)
{
var bZ=eo.find("input,textarea").attr("value");
var aKN=false;
for(var i=aLD.length-1;i>=0;i--)
{
var bkh=aLD.slice(i,i+1);
bZ.indexOf(bkh)!=-1&&(aKN=true);
}
return aKN?[-1,{msg:cf}]:[0];
},
email:function(eo,cf)
{
var bZ=eo.find("input").attr("value");
return FQ.test(bZ)
?[0]:[-1,{msg:cf}];
},
emailopt:function(eo,cf)
{
var bZ=eo.find("input").attr("value");
return(0==bZ.length||FQ.test(bZ))
?[0]:[-1,{msg:cf}];
},
emaildomain:function(eo,cf)
{
var bZ=eo.find("input").attr("value");
return(FQ.test(bZ)||Vw.test(bZ))
?[0]:[-1,{msg:cf}];
},
domain:function(eo,cf)
{
var bZ=eo.find("input").attr("value");
return Vw.test(bZ)
?[0]:[-1,{msg:cf}];
},
structsel:function(eo,cf)
{
return eo.find("input[name='partyid']").size()
?[0]:[-1,{msg:cf}];
},
mbrsel:function(eo,cf)
{
return eo.find("select[vl='mbrList']").data(0).options.length
?[0]:[-1,{msg:cf}];
},
domainstrict:function(eo,cf,bkX)
{
var Xv=bkX.split("@"),
bZ=eo.find("input").attr("value").split("@")[1];
Xv.pop();
for(var i=0;i<Xv.length;i++)
{
if(bZ==Xv[i])
{
return[0];
}
}
return[-1,{msg:cf}];
},
domainquery:function(eo,cf)
{
var bZ=eo.find("input").attr("value");
return(bkS.test(bZ))
?[0]:[-1,{msg:cf}];

},
dlgselect:function(eo,cf)
{
return eo.find("input[type='hidden']").size()
?[0]:[-1,{msg:cf}];
},
domainblock:function(eo,cf)
{
var bZ=eo.find("input").attr("value");
return(!boC.test(bZ))
?[0]:[-1,{msg:cf}];

},
lentextarea:function(eo,cf,EH,RF,lC)
{
if(EH||RF)
{
var bZ=ay.trim(eo.find("textarea").attr("value")),
qp=parseInt(EH),
Gt=parseInt(RF);
if(qp&&bZ.length>qp)
{
return[-1,{msg:lC?cf:[cf,"不能超过",qp,"个字符"].join("")}];
}
if(Gt&&bZ.length<Gt)
{
return[-1,{msg:lC?cf:[cf,"不能少于",Gt,"个字符"].join("")}];
}
}
return[0];
},
passwd:function(eo,cf,hX)
{
var bZ=eo.find("input").attr("value"),
hi=(hX||$.$("input[name='alias']").attr("value")).split("@")[0],
bsj=/[a-zA-Z]/,
boZ=/[0-9]/,
GT=true,
hB=cf;

if(bkO(bZ))
{
GT=false;
hB="密码过于简单";
}
else if(hi==bZ)
{
GT=false;
hB="密码不能和帐号相同";
}

return(6<=bZ.length&&bZ.length<=32)
&&bsj.test(bZ)&&boZ.test(bZ)
&&GT
?[0]:[-1,{msg:hB}];
},
mobile:function(eo,cf)
{
var sv=/^\d{11}$/,
bZ=eo.find("input").attr("value");
return(sv.test(bZ))?[0]:[-1,{msg:cf}];
},
select:function(eo,cf,bnf)
{
return(eo.find("select").attr("value")!=bnf)?[0]:[-1,{msg:cf}];
},
mailtag:function(eo,cf)
{
var GT=true;
bZ=eo.find("input").attr("value"),
bpz="~!#$%^&*()=+|\\[]{};':\",?/<>";

for(i=0,l=bZ.length;i!=l;i++)
{
if(-1!=bpz.indexOf(bZ.charAt(i)))
{
GT=false;
break;
}
}

return GT?[0]:[-1,{msg:cf}];
},
test:function(eo,cf)
{
debug(cf||"test valid");
return[0];
}
}
});
}
});
}
);
}
);
$.package(
"biz/lib/utils.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
dw;





var JT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
arn=[
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,
52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,
-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,
15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,
-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,
41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];

function aZV(str)
{
var out,i,len;
var c1,c2,c3;
len=str.length;
i=0;
out="";
while(i<len)
{
c1=str.charCodeAt(i++)&0xff;
if(i==len)
{
out+=JT.charAt(c1>>2);
out+=JT.charAt((c1&0x3)<<4);
out+="==";
break;
}
c2=str.charCodeAt(i++);
if(i==len)
{
out+=JT.charAt(c1>>2);
out+=JT.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));
out+=JT.charAt((c2&0xF)<<2);
out+="=";
break;
}
c3=str.charCodeAt(i++);
out+=JT.charAt(c1>>2);
out+=JT.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));
out+=JT.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));
out+=JT.charAt(c3&0x3F);
}
return out;
}

function aYR(str)
{
var c1,c2,c3,c4;
var i,len,out;
len=str.length;
i=0;
out="";
while(i<len)
{

do
{
c1=arn[str.charCodeAt(i++)&0xff];
}while(i<len&&c1==-1);
if(c1==-1)
break;


do
{
c2=arn[str.charCodeAt(i++)&0xff];
}while(i<len&&c2==-1);
if(c2==-1)
break;
out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));


do
{
c3=str.charCodeAt(i++)&0xff;
if(c3==61)
return out;
c3=arn[c3];
}while(i<len&&c3==-1);
if(c3==-1)
break;
out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));


do
{
c4=str.charCodeAt(i++)&0xff;
if(c4==61)
return out;
c4=arn[c4];
}while(i<len&&c4==-1);
if(c4==-1)
break;
out+=String.fromCharCode(((c3&0x03)<<6)|c4);
}
return out;
}

function aYn(str)
{
var out,i,len,c;
out="";
len=str.length;
for(i=0;i<len;i++)
{
c=str.charCodeAt(i);
if((c>=0x0001)&&(c<=0x007F))
{
out+=str.charAt(i);
}
else if(c>0x07FF)
{
out+=String.fromCharCode(0xE0|((c>>12)&0x0F));
out+=String.fromCharCode(0x80|((c>>6)&0x3F));
out+=String.fromCharCode(0x80|((c>>0)&0x3F));
}
else
{
out+=String.fromCharCode(0xC0|((c>>6)&0x1F));
out+=String.fromCharCode(0x80|((c>>0)&0x3F));
}
}
return out;
}

function bfR(str)
{
var out,i,len,c;
var char2,char3;
out="";
len=str.length;
i=0;
while(i<len)
{
c=str.charCodeAt(i++);
switch(c>>4)
{
case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:

out+=str.charAt(i-1);
break;
case 12:case 13:

char2=str.charCodeAt(i++);
out+=String.fromCharCode(((c&0x1F)<<6)|(char2&0x3F));
break;
case 14:

char2=str.charCodeAt(i++);
char3=str.charCodeAt(i++);
out+=String.fromCharCode(((c&0x0F)<<12)|
((char2&0x3F)<<6)|
((char3&0x3F)<<0));
break;
}
}
return out;
}

ay.createLib(
"B.Utils",
{bStatic:true},
function(bm)
{
return(
{
config:function(aI)
{
if(aI)
{
dw=aI;
}
else
{
return dw||{};
}
},
pagination:function(bfs,GS)
{
var gj="";

if(GS.total>0&&(-1!=GS.prev||-1!=GS.next))
{
if(-1==GS.prev)
{
gj+='上一页';
}
else
{
gj+=ay.T(['<a ck="$ck$" page="$page$">上一页</a>']).replace(
{
ck:bfs,
page:GS.prev
});
}

gj+=ay.T(['&nbsp;$curr$/$page$&nbsp;']).replace(
{
curr:GS.curr+1,
page:GS.page
});

if(-1==GS.next)
{
gj+='下一页';
}
else
{
gj+=ay.T(['<a ck="$ck$" page="$page$">下一页</a>']).replace(
{
ck:bfs,
page:GS.next
});
}
}

return gj;
},
encodeBase64:function(oe)
{
return aZV(aYn(oe));
},
decodeBase64:function(oe)
{
return bfR(aYR(oe));
},
encodeBase64URI:function(oe)
{
var wr=aZV(aYn(oe));
wr=wr.replace(/\+/g,"-");
wr=wr.replace(/\//g,"_");
wr=wr.replace(/\=/g,".");
return wr;
},
decodeBase64URI:function(oe)
{
var wr=oe;
wr=wr.replace(/-/g,"+");
wr=wr.replace(/_/g,"/");
wr=wr.replace(/\./g,"=");
return bfR(aYR(wr));
}
}
);
}
);
}
);
$.package(
"biz/lib/auth.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
aO;
ay.createLib(
"B.Data.Auth",
{bStatic:true},
function(bm)
{
return(
{
set:function(aE)
{
aO=aE;
},
get:function()
{
return aO;
},
isOwner:function()
{
return this.getOwnerUin()==this.getUin();
},
getOwnerUin:function()
{
return aO[0][0];
},
getUin:function()
{
return aO[0][1];
},
getAlias:function()
{
return aO[0][2];
}
}
);
}
);
}
);
$.package(
"biz/lib/datepicker.js",
["comm/ui/calendar.js"],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_();
function aDW(nl,ccF)
{
if("-"==ccF)
{
return[nl[0],"-",nl[1],"-",nl[2]].join("");
}
else
{
return[nl[0],"年",nl[1],"月",nl[2],"日"].join("");
}
}
function bEK(zb)
{
zb=zb.split("-");
return zb.length>=3&&new Date(parseInt(zb[0]),parseInt(zb[1])-1,parseInt(zb[2]));
}
var Bz=ay.formatNum,
gH=new Date,
azx=[gH.getFullYear(),Bz(gH.getMonth()+1,2),Bz(gH.getDate(),2)].join("");
function bba(iP,kG,lx,zb,bIi)
{
var Vz=[iP,Bz(kG,2),Bz(lx,2)].join("");
if((zb=zb.split("-")).length==3)
{
var Gu=[zb[0],Bz(parseInt(zb[1]),2),Bz(parseInt(zb[2]),2)].join("");
return(bIi?Vz<=Gu:Vz>=Gu)&&Vz<=azx;
}
return Vz<=azx;
}
ay.createLib(
"B.Event.DatePicker",
{bStatic:true},
function(bm)
{
return(
{
eventLibs:function()
{
return[];
},
rule:function()
{
return(
{
click:
{
showCalendar:{sContext:"datepick"}
}
});
},
events:function()
{
return(
{
showCalendar:function(_aoEvent,aA,aM)
{
var al=this,
$=al.$,
kt=$.$(aA).parent("*").find("input[date]"),
CW=(kt.attr("un")=="begin"||kt.attr("un")=="end"),
cxx=kt.attr("format"),
aEV=kt.attr("un")=="begin",
Gu=$.$(aM).find("input[un='"+(aEV?"end":"begin")+"']").attr("date");
kt.calendar(
{
sClass:"bubble_calendar menu_bd",
oDom:al.mask$(),
date:bEK(kt.attr("date")),
onclick:function(iP,kG,lx)
{
if(!CW||bba(iP,kG,lx,Gu,aEV))
{
var gH=[iP,kG,lx];
kt.attr("date",gH.join("-"))
.attr("value",aDW(gH,cxx)).calendar("close");
}
},
onspecaildate:function(iP,kG,lx)
{
return(!CW||bba(iP,kG,lx,Gu,aEV))
?"":"forbid";
}
});
$.stopPropagation(_aoEvent);
}
});
}
});
}
);
}
);
$.package(
"biz/lib/commdata.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
aO={};
ay.createLib(
"B.Data.commdata",
{bStatic:true},
function(bm)
{
function dQz(kj,ba)
{
var _oList=kj||[];
for(var i=_oList.length-1;i>=0;i--)
{
if(_oList[i].id==ba)
{
return _oList[i];
}
}
}
function dNg(kj,ba)
{
var _oList=kj||[];
for(var i=_oList.length-1;i>=0;i--)
{
if(_oList[i].id==ba)
{
return i;
}
}
}
function Wo(kj,ba,cme)
{
var _oList=kj||[],
aWh=cme||"id";
for(var i=_oList.length-1;i>=0;i--)
{
if(_oList[i][aWh]==ba)
{
_oList.splice(i,1);
break;
}
}
}
return(
{
updatePartyData:function(fl)
{
var al=this;
ay.ajax(
{
sUrl:"/cgi-bin/bizmail_account?action=show_party_fast&limit=50000&ef=js&t=biz_rf_mgr&partyid="+bAd+"&sid="+ay.sid(),
onsuccess:function(ma)
{
var aO=ay.evalVal(ma).data;
al.initPartyData(aO);
fl&&fl(true);
},
onclienterror:function()
{
fl&&fl(false);
}
});
},
initPartyData:function(awK)
{
this.azi=awK||[];

if(!this.azi.length)
{
return;
}


for(var i=0;i<awK.length;i++)
{
var fX=awK[i];

this.Cc[fX.id]=fX;
}


var agh=null;
for(var i=0;i<awK.length;i++)
{
var fX=awK[i],pid=fX.pid;
if(pid!="0")
{
fX.parent=this.Cc[fX.pid];
if(fX.parent)
{

}
else
{
continue;
}
fX.parent.children=fX.parent.children||[];
fX.parent.children.push(fX);
}
else
{
agh=fX;
}
}

var fX,Uk=[agh];

while(fX=Uk.pop())
{
var zS=fX.children;
if(zS)
{
zS.sort(function(a,b)
{






return(parseInt(a.order)-parseInt(b.order));
});

for(var i=0;i<zS.length;i++)
{
Uk.push(zS[i]);
}
}
}

this.aJE=agh;
this.byi=agh.id;


},
updateUserData:function(fl)
{

var al=this,
bAd=this.aJE.id;
ay.ajax(
{
nTimeout:120000,
sUrl:"/cgi-bin/bizmail_account?action=show_party_fast&limit=50000&ef=js&t=biz_rf_mgr&partyid="+bAd+"&sid="+ay.sid(),
onsuccess:function(ma)
{
var aO=ay.evalVal(ma).data;

al.initUserData(aO);
fl&&fl(true);
aO=null;
},
onclienterror:function()
{
fl&&fl(false);
}
});
},
initUserData:function(bdw)
{




this.WB=[];



var axY={};

for(var i=0;i<bdw.length;i++)
{
var azX=bdw[i],
fA={alias:azX[0],name:azX[1],pinyin:azX[2],partyid:azX[3]};
this.WB.push(fA);
this.Qp[fA.alias]=fA;
axY[fA.partyid]=axY[fA.partyid]||[];
axY[fA.partyid].push(fA);
azX=null;
fA=null;
}
bdw=null;




var Uk=[],eF,aiN,axG=[];
Uk.push(this.aJE);
while(eF=Uk.pop())
{
var Hv={
id:eF.id,
type:0,
pid:eF.pid,
name:eF.name,
priv:eF.priv,
children:[]
},
eK=axG.pop();
eK&&(Hv.parent=eK)&&eK.children.unshift(Hv);

this.IH[Hv.id]=Hv;
var zS=eF.children||[];
for(var i=0;i<zS.length;i++)
{
var kB=zS[i];
Uk.push(kB);
axG.push(Hv);

}


var sF=axY[Hv.id]||[];
for(var j=0;j<sF.length;j++)
{
var fA=sF[j];
fA.id=fA.alias;
fA.type=1;
fA.parent=Hv;
Hv.children.push(fA);
}

!aiN&&(aiN=Hv);
}
Uk=null;
axG=null;
axY=null;


this.aLt=aiN;

if(this.aVs&&!(this.WB.length>this.ccW&&$.isBrowser("ie6")))
{

this.Hi=[];
for(var i=0;i<this.WB.length;i++)
{
var fA=this.WB[i];
fA.alias&&this.Hi.push(
{
index:fA.alias,
user:fA
});
fA.pinyin&&this.Hi.push(
{
index:fA.pinyin,
user:fA
});
fA.name&&this.Hi.push(
{
index:fA.name,
user:fA
});
fA=null;
}

this.Hi.sort(function(a,b)
{
return a.index.localeCompare(b.index);
});

}
else
{
debug("don't init index user");
}
},
updateGroupData:function(fl)
{
var al=this;
ay.ajax(
{
sUrl:"bizmail_group?action=list_group&sync=group&t=biz_rf_mgr&ef=js&sid="+ay.sid(),
onsuccess:function(eA)
{
al.initGroupData(ay.evalVal(eA).data.group);
fl&&fl(true);
},
onclienterror:function()
{
fl&&fl(false);
}
});
},
initGroupData:function(avy)
{



this.acU=avy||[];

if(!this.acU.length)
{
return;
}


this.aoW={};
for(var i=0;i<avy.length;i++)
{
this.aoW[avy[i].alias]=avy[i];
}
},
getUser:function(hX)
{
return this.Qp[hX];
},
getFirstGroupAlias:function()
{
return(this.acU[0]&&this.acU[0].alias)||"";
},
hasGroups:function()
{
return(this.acU||[]).length>0;
},
getGroup:function(hX)
{
return this.aoW[hX];
},
getGroupList:function()
{
return this.acU;
},



fussyFindGroups:function(ov)
{
if(!ov||ov.length==0)
{
return[];
}
var bD=[],
rJ=ay.trim(ov).toLowerCase(),
BJ={},
bxS=this.acU;
for(var i=0;i<bxS.length;i++)
{
var hQ=bxS[i];
(hQ.alias.toLowerCase().indexOf(rJ)!=-1
||hQ.name.toLowerCase().indexOf(rJ)!=-1)
&&!BJ[hQ.alias]
&&bD.push({alias:hQ.alias,name:hQ.name,usercnt:hQ.usercnt,id:hQ.id})
&&(BJ[hQ.alias]==true);
}
BJ=null;
return bD;
},




disableFindUsers:function()
{
this.aVs=false;
},
findUsers:function(ov)
{
if(!ov||ov.length==0||!this.WB)
{
return[];
}
if(this.aVs)
{
if(this.WB.length<this.cvA)
{
return this.fussyFindUsers(ov);
}else
{
return this.findUsersInPrefix(ov);
}
}
else
{
return[];
}
},
findUsersInPrefix:function(ov)
{
if(!ov||ov.length==0)
{
return[];
}
var rJ=ay.trim(ov).toLowerCase(),
agi=this.Hi,
bD=[],
BJ={},
gP=0,
AU=agi.length-1,
CB=0;
while(gP<AU)
{
var vq=gP+Math.floor((AU-gP)/2),
aKL=rJ.localeCompare(agi[vq].index);
if(aKL<0)
{
AU=vq-1;
CB=vq;
}else if(aKL>=0)
{
gP=vq+1;
}
if(agi[vq].index.indexOf(rJ)==0)
{
CB=vq;
}
}

var adS=CB;
while(adS>0&&agi[adS-1].index.indexOf(rJ)==0)
{
CB=adS;
adS--;
}
while(CB<agi.length&&agi[CB].index.indexOf(rJ)==0)
{
var fA=agi[CB].user;
!BJ[fA.alias]
&&bD.push({alias:fA.alias,name:fA.name,pinyin:fA.pinyin,partyid:fA.partyid})
&&(BJ[fA.alias]=true);
CB++;
if(bD.length>=this.aBZ)
{
break;
}
}
BJ=null;
return bD;
},
fussyFindUsers:function(ov)
{
if(!ov||ov.length==0)
{
return[];
}
var bD=[],
rJ=ay.trim(ov).toLowerCase(),
BJ={},
aWC=this.Hi;
for(var i=0;i<aWC.length;i++)
{
var fA=aWC[i].user;

(aWC[i].index.indexOf(rJ)!=-1)
&&!BJ[fA.alias]
&&bD.push({alias:fA.alias,name:fA.name,pinyin:fA.pinyin,partyid:fA.partyid})
&&(BJ[fA.alias]=true);


if(bD.length>=this.aBZ)
{
break;
}
}
BJ=null;
return bD;
},
updateGroupUserCount:function(hX,abM)
{
var hQ=getGroup(hX);
hQ&&(hQ.usercnt=abM);
},
getPartyTree:function()
{
return this.aJE;
},
getMemberTree:function()
{
return this.aLt;
},
asynGetMemberTree:function(fl)
{
var al=this,hF=0,
bwg=setInterval(function(){
hF++>1000&&clearInterval(bwg);
if(al.aLt&&al.aLt.id)
{
clearInterval(bwg);
fl.call(this,al.getMemberTree());
}
},100);
},
isLeafParty:function(ba)
{
return((this.getParty(ba)||{}).children||[]).length==0;
},
hasParty:function(ba)
{
return this.Cc[ba]?true:false;
},
hasPrivelege:function(ba)
{
return(this.Cc[ba]||{}).priv!="1";
},
getPartyRootId:function(ba)
{
return this.byi;
},
addParty2:function(ba,agQ,bz)
{


var eK=this.getParty(agQ),
Mx=this.getMember(agQ),
fX=
{
id:ba,
pid:agQ,
order:"",
name:bz,
priv:"0",
parent:eK
},
aJH=
{
id:ba,
type:"0",
name:bz,
priv:"0",
parent:Mx
};
var aaN=false;
eK.children=eK.children||[];
for(var i=eK.children.length-1;i>=0;i--)
{
if(eK.children[i].id==ba)
{
aaN=true;
fX=eK.children[i];
break;
}
}
this.Cc[ba]=fX;
this.azi.push(fX);
!aaN&&eK.children.push(fX);

Mx.children=Mx.children||[];
Mx.children.push(aJH);
},
addParty:function(ba,agQ,bz)
{


var eK=this.getParty(agQ),
Mx=this.getMember(agQ),
fX=
{
id:ba,
pid:agQ,
order:"",
name:bz,
priv:"0",
parent:eK
},
aJH=
{
id:ba,
type:"0",
name:bz,
priv:"0",
parent:Mx
};
this.Cc[ba]=fX;
this.IH[ba]=aJH;
this.azi.push(fX);
eK.children=eK.children||[];
eK.children.push(fX);

Mx.children=Mx.children||[];
Mx.children.push(aJH);
},
delParty:function(ba)
{
var fX=this.Cc[ba],
eK=fX.parent||{},
Mx=this.IH[ba].parent||{};
this.Cc[ba]=null;
this.IH[ba]=null;
Wo(this.azi,ba);
Wo(eK.children,ba);
Wo(Mx.children,ba);
return eK.id;
},
moveDownParty:function(ba)
{
var fX=this.Cc[ba],
vN=(fX.parent||{}).children||[],
VG=(this.IH[ba].parent||{}).children||[];

for(var i=vN.length-2;i>=0;i--)
{
if(vN[i].id==ba)
{
var lr=vN[i+1];
vN[i+1]=vN[i];
vN[i]=lr;

lr=VG[i+1];
VG[i+1]=VG[i];
VG[i]=lr;
break;
}
}
},
moveUpParty:function(ba)
{
var fX=this.Cc[ba],
vN=(fX.parent||{}).children||[],
VG=(this.IH[ba].parent||{}).children||[];

for(var i=vN.length-1;i>=1;i--)
{
if(vN[i].id==ba)
{
var lr=vN[i-1];
vN[i-1]=vN[i];
vN[i]=lr;

lr=VG[i-1];
VG[i-1]=VG[i];
VG[i]=lr;
break;
}
}
},
getSuccPartyId:function(ba)
{
var fX=this.Cc[ba]||{},
eK=fX.parent||{},
Mh,
vN=eK.children||[];
for(var i=vN.length-2;i>=0;i--)
{
if(vN[i].id==ba)
{
Mh=vN[i+1].id;
break;
}
}
return Mh;
},
getPrePartyId:function(ba)
{
var fX=this.Cc[ba]||{},
eK=fX.parent||{},
Mh,
vN=eK.children||[];
for(var i=vN.length-1;i>=0;i--)
{
if(vN[i].id==ba)
{
i>=1&&(Mh=vN[i-1].id);
break;
}
}
return Mh;
},
moveUser:function(hX,NK)
{
var fA=this.Qp[hX],
ayC=this.IH[NK],
fX=this.IH[fA.partyid];
Wo(fX.children,fA.id);
ayC.children=ayC.children||[];
ayC.children.push(fA);
},
updateUser:function(hX,bz,NK)
{
var fA=this.Qp[hX],
ayC=this.IH[NK],
dRS=this.IH[fA.partyid];
fA.id=fA.alias=hX;
fA.name=bz;
if(fA.partyid!=NK)
{
this.delUser(hX);
this.addUser(hX,bz,NK);
}
},
delUser:function(hX)
{
var fA=this.Qp[hX];
var fX=this.IH[fA.partyid];
this.Qp[fA.alias]=null;
Wo(fX.children,fA.id);
Wo(this.WB,fA.id);
Wo(this.Hi,fA.alias,"index");
Wo(this.Hi,fA.name,"index");
Wo(this.Hi,fA.pinyin,"index");
},
addUser:function(hX,bz,NK)
{


var fA={id:hX,alias:hX,name:bz,partyid:NK},
fX=this.IH[NK];
if(!fX){return;}
this.WB.push(fA);
this.Qp[fA.alias]=fA;
fA.parent=fX;
fX.children=fX.children||[];
fX.children.push(fA);
if(this.Hi&&this.Hi.length>0)
{
var bM=fA.name,
hi=fA.alias;
for(var acI=this.Hi,i=acI.length-1;i>=0;i--)
{
if(bM&&acI[i].index.localeCompare(fA.name)<=0)
{
bM=null;
acI.splice(i,0,{index:fA.name,user:fA});
}
if(hi&&acI[i].index.localeCompare(fA.alias)<=0)
{
hi=null;
acI.splice(i,0,{index:fA.alias,user:fA});
}
if(!hi&&!bM)
{
break;
}
}
}

},
renameParty:function(ba,bz)
{
(this.getParty(ba)||{}).name=bz;
(this.getMember(ba)||{}).name=bz
},
getPartyParentId:function(ba)
{
return((this.Cc[ba]||{}).parent||{}).id;
},
getPartyParent:function(ba)
{
return(this.Cc[ba]||{}).parent;
},
getParty:function(ba)
{
return this.Cc[ba];
},
getGroupName:function(hX)
{
return(this.aoW[hX]||{}).name||"";
},
checkAlias:function(hX)
{
return!!(this.Qp[hX]||this.aoW[hX]);
},
getUserName:function(hX)
{
return(this.Qp[hX]||{}).name||"";
},
getMember:function(ba)
{
return this.IH[ba]||this.Qp[ba]||this.aoW[ba];
},
getMemberName:function(ba)
{
return(this.getMember(ba)||{}).name||"";
},
getPartyName:function(ba)
{
var eF,rM,bcH,kg;
eF=this.getParty(ba);
if(!eF)
{
return null;
}
rM=[eF.name];
while(eF=eF.parent)
{
eF.name&&rM.push(eF.name);
}
bcH=rM.pop();
kg=rM.reverse().join("/")||bcH;
return kg;
},
getPartyShortName:function(ba)
{
return(this.Cc[ba]||{}).name;
},
setAuthData:function(aE)
{
this.ami=aE||[];
},
getAuthParam:function()
{
var aJc=this.ami;
return["sid=",this.$.sid(),"&isowner=",aJc[0],"&eam=",aJc[1],"&ff_disk=",aJc[2],"&alias=",aJc[3]].join("");
},
isOffMbr:function()
{
this.ami[4]&&this.ami[4][0]==0;
},
isOffGrp:function()
{
this.ami[4]&&this.ami[4][1]==0;
},
init_:function()
{










this.azi=[];
this.aJE={};
this.byi="";
this.aLt={};

this.Cc={};
this.IH={};
this.WB=[];
this.Hi=[];

this.Qp={};
this.acU={};

this.aoW={};
this.aBZ=20;
this.cvA=10000;
this.ccW=5000;
this.aVs=true;
this.ami={};
}
});
});
});
$.package(
"biz/lib/commevent.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_();
ay.createLib(
"B.Event.Comm",
{bStatic:true},
function(bm)
{
return(
{
eventLibs:function()
{
return[];
},
rule:function()
{
return(
{
click:
{
changeVCImage:{sContext:"verifycode"}
}
});
},
events:function()
{
return(
{
changeVCImage:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM);
dU.find("img[un='verifyimage']").attr("src",dU.attr("v")+"&"+$.random());
}
});
}
});
}
);
}
);
$.package(
"biz/lib/mbrtmpl.js",
[],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_();
window.maxStringLength=20;
window.limitString=function(ec,aMg){
var iu=ec||"",
lT=aMg||window.maxStringLength,
_nLen=iu.length;
if(_nLen>lT)
{
var aQr=Math.floor((lT-3)/2);
iu=iu.substring(0,aQr)+"..."+iu.slice(-aQr,_nLen);

}
return iu;
};

ay.createLib(
"B.Data.member.tmpl",
{bStatic:true},
function(bm)
{
var dK=
{
oOrgMenu:ay.T([
'<div un="dlg">',
'<div class="mainColumn">',
'<div class="labelText left">部门名称：</div>',
'<input un="struct" type="text" class="txt" style="width:240px;" value="$name$" maxlength="16"/>',
'</div>',
'<div class="submitColumn btnColumn">',
'<a ck="cancel" class="btn btnNormal btnCancel right">取消</a><a ck="submit" class="btn btnComfirm right">确认</a>',
'</div>',
'</div>'
]),
oFrame:ay.TE([
'<div class="paste_body">',
'<div id="leftNav" class="structManage left">',
'<div class="c_nav" >',
'$@$if(!$offmbr$)$@$<a href="#mbr/list" class="$mbr$ bd_r" un="mbr_list">组织架构</a>$@$endif$@$',
'$@$if(!$offgroup$)$@$<a href="#mbr/group" class="$group$" un="mbr_group">邮件群组</a>$@$endif$@$',
'</div>',
'<div class="partytree" >',
'$@$if($mbr$)$@$<div id="mbrListTree" class="mbrList_tree"></div>$@$endif$@$',
'$@$if($group$)$@$',
'<div class="mailGroup_box" >',
'<div class="searchcon">',
'<input type="text" class="txt bold t_search" name="dy_content" value="搜索邮件群组" id="navSearchGroup" ku="navsearchgroup">',
'<input type="submit" class="btnSearch" value="">',
'<a style="display:none" class="search_del" id="delsearch" ck="cleargroupsearch"></a>',
'</div><div id="mailGroupBox"></div></div>',
'$@$endif$@$',
'</div>',
'</div>',
'<div id="rightMain" class="accountListPanel" >',
'<div class="content" style="font-size:16px; text-align:center;margin-top:225px;">',

'</div></div>',
'</div>']),
oUser:ay.T(
[
'<div un="dlg" >',
'<div class="mainColumn">',
'<div style="overflow:hidden;margin-bottom:5px;"><span>所有部门与成员</span>',
'<span style="margin-left:245px;">要添加的成员</span></div>',
'<div class="structSelectList bd_gray" id="structList"></div>',
'<div class="structPanel bd_gray" id="structContent"></div>',
'<div class="left ico_arrow_left"></div>',
'</div>',
'<div class="submitColumn">',
'<div class="cancelLink right"><a ck="cancel">取消</a></div>',
'<div class="right"><a ck="submit" class="btnSubmit">确认</a></div>',
'</div>',
'</div>'
]),
oGroupNav:ay.TE(
[








'<div class="mg_box" id="mailGroupNav">',
' <ul>  $@$for($groups$)$@$ ',
' <li alias="$alias$" un="groupline" mor="showGroupActionMenu" mot="hideGroupActionMenu" $@$if($alias$==$_parent_.selalias$)$@$ class="on" $@$endif$@$><a ck="changegroup" href="#mbr/group/list/$alias$" class="item" title="$name$">$@$eval limitString($name$)$@$</a>',
'   <div class="btn_mg" style="display:none" alias="$alias$" groupalias="$alias$" ck="editGroup" title="相关操作"><span class="arrow"></span></div></li>',
'   $@$endfor$@$',
' </ul>',
'</div>',

]),
oGroupEditMenu:ay.T(
[
'<div class="m_list">',
' <ul>',
' <li opt="edit"><a >编辑</a></li>',
' <li opt="delete"><a >删除</a></li>',
' </ul>',
'</div>'
]),
oCheckPasswdDlg:ay.T(
[
'<div un="dlg">',
' <div class="mainColumn" style="padding-left:20px;zoom:1;">',
'  <div style="padding-bottom:5px; font-size:12px; color:#999;">为保护账号安全，请先输入当前管理员密码。</div>',
'  <div style="overflow:hidden;_zoom:1;">',
'   <div class="labelText left" style="width:90px; line-height:26px;">管理员密码：</div>',
'   <input class="txt" style="width:268px;_width:260px;" type="password" />',
'  </div>',
'  <div class="txt_red f_size" un="errmsg" style="padding-left:90px;padding-top:5px;display:none"><span class="icon_caution_m left"></span>&nbsp;密码不能为空</div>',
' </div>',
' <div class="submitColumn btnColumn" style="text-align:right;"><a class="btn btnComfirm" ck="submit">确认</a></div>',
'</div>'
]),
oBatchMemErrTips:ay.TE(
[
'$@$if($errdomain$ & $erremail$)$@$',
'有$errdomain$帐号不存在，$erremail$个帐号格式不正确',
'$@$else$@$',
' $@$if($errdomain$)$@$',
'有$errdomain$帐号不存在',
' $@$endif$@$',
' $@$if($erremail$)$@$',
'有$erremail$个帐号格式不正确',
' $@$endif$@$',
'$@$endif$@$'
]),
oBatchMemberHtml:ay.TE(
[
'<html><head><style>.error,.error pre{color:red}body{margin:0;padding:8px;}body,span,pre,a{font-family:"lucida Grande",Verdana; font-size:14px;line-height:20px;color:#494949;}a{text-decoration:none;}pre{display:inline;}div,p,pre{padding:0;margin:0;}</style></head><body style="word-break:break-all;word-wrap:break-word;">',
'$@$for($items$)$@$',
'<span $@$if($error$)$@$class="error"$@$endif$@$><pre>$alias$</pre></span><span>;</span><br/>',
'$@$endfor$@$',
'</body></html>'
]),
oBatchMembers:ay.TE(
[
'$@$for($items$)$@$',
'<span $@$if($error$)$@$class="error"$@$endif$@$><pre>$alias$</pre></span><span>;</span><br/>',
'$@$endfor$@$'
]),
oBatchMemberDlg:ay.T(
[
'<div un="dlg">',
' <div class="edit_group_mainColumn">',
'  <div class="graytext f_size">每个成员的邮箱名请用空格、英文逗号或者英文分号分隔</div>',
'  <div class="edit_group_wrap"><iframe marginwidth="0" framespacing="0" marginheight="0" frameborder="0" ></iframe></div>',
'  <div class="error_tips" style="display:none;"></div>',
' </div>',
' <div class="submitColumn"><div class="right"><a class="btn btnComfirm right" ck="submit">确定</a></div></div>',
'</div>'
]),
oAddGroupDlg:ay.T(
[
'<div un="dlg" >',
'<div class="mainColumn">',
'<div style="overflow:hidden;margin-bottom:5px;"><span>所有部门与成员</span>',
'<span style="margin-left:150px;">要添加的成员</span></div>',
'<div class="structSelectList bd_gray" id="structList"></div>',
'<div class="structPanel bd_gray"><input value="请输入成员或从下面选择成员..."  class="auto_tipbox"/><div  id="structContent" class="aoto_tipon"></div></div>',
'<div class="left ico_arrow_left"></div>',
'</div>',
'<div class="submitColumn">',
'<div class="cancelLink right"><a ck="cancel">取消</a></div>',
'<div class="right"><a ck="submit" class="btnSubmit">确认</a></div>',
'</div>',
'</div>'
]),
oDelItems:ay.TE(
[
'$@$for($items$)$@$ ',
'<div title="$addr$" class="addr_base addr_normal ">',
' <b addr="$addr$" nid="$nid$">$alias$</b>',
' <a href="javascript:;" class="addr_del" ck="delSelectedItem"></a>',
' <input type="hidden" name="$iname$" value="$ivalue$" />',
'</div>$@$endfor$@$'
]),
oDelItem:ay.TE(
[
'<div title="$addr$" class="addr_base addr_normal ">',
' <b addr="$addr$" nid="$nid$">$alias$</b>',
' <a href="javascript:;" class="addr_del" ck="delSelectedItem"></a>',
' <input type="hidden" name="$iname$" value="$ivalue$" />',
'</div>'
]),
oHiddenMember:ay.TE(
[
'$@$for($items$)$@$ ',
'<input type="hidden" name="member" value="$nid$" alias="$alias$">',
'$@$endfor$@$'
]),
oAllowListContent:ay.T(
[
'<textarea class="txt" type="text" rows="4" cols="30" name="allowlist" style="margin-top:10px; height:69px;"></textarea>',
'<div class="graytext f_size tr">请输入帐号邮箱地址，地址之间以英文逗号分隔</div>',
'<span un="validMsg"></span>'
]),
oAddDept:ay.TE(
[
'<div class="lbb">',
'<div un="tree">',
'</div>',
'</div>'
]),
oAddGroupInMbr:ay.TE(
[
'<div class="lbbt"><input type="text" value="$tips$"  class="auto_tipbox"/>',
'<div un="listgroup" class="group_body checkbox_body">',
'<ul>',
'$@$for($items$)$@$ ',
'<li><input nid="$alias$" pname="$@$eval limitString($name$)$@$" $@$if($checked$)$@$checked="true"$@$endif$@$ ck="select" type="checkbox">',
' <label>$@$eval limitString($name$)$@$</label>',
'</li>',
'$@$endfor$@$',
'</ul></div></div>'
]),
oAddGroupItems:ay.TE(
[
'<div class="lbbx"><input type="text" value="$tips$"  class="auto_tipbox"/>',
'<div un="listgroup" class="group_body checkbox_body">',
'<ul>',
'$@$for($items$)$@$ ',
'<li><input nid="$alias$" pname="$@$eval limitString($name$)$@$" $@$if($checked$)$@$checked="true"$@$endif$@$ ck="select" type="checkbox">',
' <label>$@$eval limitString($name$)$@$</label>',
'</li>',
'$@$endfor$@$',
'</ul></div></div>'
]),
oAddSearchGroupItems:ay.TE(
[
'<ul>',
'$@$for($items$)$@$ ',
'<li><input nid="$alias$" pname="$@$eval limitString($name$)$@$" $@$if($checked$)$@$checked="true"$@$endif$@$ ck="select" type="checkbox">',
' <label>$@$eval limitString($name$)$@$</label>',
'</li>',
'$@$endfor$@$',
'</ul>'
]),
oLoading:ay.TE(
[
'正在加载<span class="ico_loading_dotted"></span>'
]),
oBreadCrumb:ay.TE(
[
'<div class="path b_size"><ul>',
' <li class="home" style="z-index:100;">',
'  <a href="#toolbox">工具箱</a>',
' </li>',
' <li style="z-index:2;" class="">',
'  <a href="$hash$">$subname$</a>',
' </li>',
'</ul></div>'
]),
oAddGroupMenu:ay.TE(
[
'<div class="m_list m_stru">',
'<h4>添加到邮件群组</h4>',
'<div class="searchcon">',
' <input type="text" class="txt bold t_search" name="dy_content" value="搜索邮件群组"><input type="submit" class="btnSearch" value="">',
'</div>',
'<div class="mg_l_box">',
'<ul id="grouplistDiv">',
'$@$for($oGroup$)$@$',
'<li ><input id="$alias$" name="$alias$" type="checkbox" title="选中/取消选中" value="$alias$" /><label for="$alias$">$@$eval limitString($name$)$@$<span>$usercnt$</span></label></li>',
'$@$endfor$@$',
'</ul>',
'</div>',
'<div class="submitColumn_nobg"><a un="cancel" class="btn btnNormal btnCancel right">取消</a><a un="submit" class="btn btnComfirm right">确定</a></div>',
'</div>',
]),
oSearchGroup:ay.TE([
'$@$for($oGroup$)$@$',
'<li><input type="checkbox" title="选中/取消选中" value="$alias$" /><label>$@$eval limitString($name$)$@$</label><span>$usercnt$</span></li>',
'$@$endfor$@$',
]),
oImportStatus:ay.T(
"<div>成员总数：$total$ </div><div>导入成功：$succ$ <div>导入失败：$fail$ </div>"
),
oAliasAdd:ay.T(
[
'<div class="aliasColumn" un="alias">'

,'<input style="width:260px;" name="slavealias" type="text" value="$alias$" class="txt" /> @ '
,'<select class="txt" name="slavedomain" style="width:220px; position:relative; position:static\9; top:-4px;">$opt$</select>'
,'<span style="margin-right:5px;">'
,'<a class="txt_red deleteAlias" style="text-decoration:none;" ck="delAlias" title="删除别名">'
,'<img class="icon_caution_m" src="',ay.path("img"),'spacer.gif" />'
,'</a>'
,'</span>'
,'<span un="validErr" style="display:none;">'
,'<img align="absmiddle" class="icon_error_m" src="',ay.path("img"),'spacer.gif">'
,'<span class="txt_red f_size"></span>'
,'</span>'
,'<span un="validOK" style="display:none;">'
,'<img align="absmiddle" class="icon_finish_m" src="',ay.path("img"),'spacer.gif">'
,'</span>'
,'</div>'
]
),
oDomainOpt:ay.T(['<option value="$domain$" $selected$>$domain$</option>']),
oAddMbrTab:ay.TE(
[
'<div class="m_tab" un="tab"><a un="mbrtree" class="on bd_r">组织架构</a><a un="group" class="">邮件群组</a></div>',
'<div class="m_tree_wrap" un="mbrtree"></div>',
'<div class="g" un="group"></div>',
]),
oLimitIP:ay.T(
[
'<p><label for="IP_zone" class="showIP">$ip1$</label>',
'<input type="hidden" name="ip" value="$ip1$" />',
'<a href="javascript:;" ck="delIP">删除</a></p>'
]),
oLimitIPRange:ay.T(
[
'<p><label for="IP_zone" class="showIP">$ip1$  ~  $ip2$</label>',
'<input type="hidden" name="ip" value="$ip1$-$ip2$" />',
'<a href="javascript:;" ck="delIP">删除</a></p>'
]),
oLimitIPDlg:ay.TE(
[
'<div un="dlg">',
'<div class="mainColumn" valid="empty|ip" validMsg="IP|IP">',
'<div class="labelText left">请输入IP：</div>',
'<input name="ip1" type="text" class="txt" style="width:240px;" value="$ip$" maxlength="16"/>',
'<p un="validMsg" style="padding-left:80px;"></p>',
'</div>',
'<div class="submitColumn btnColumn">',
'<a ck="cancel" class="btn btnNormal btnCancel right">取消</a><a ck="submit" class="btn btnComfirm right">确定</a>',
'</div>',
'</div>'
]),
oLimitIPRangeDlg:ay.TE(
[
'<div un="dlg">',
'<div class="mainColumn">',
'<div style="margin:0 0 5px 0;">请输入IP段：</div>',
'<div>',
'<div un="con">',
'<div valid="empty|ip" validMsg="IP|IP">',
'<input name="ip1" type="text" class="txt left" value="$ip1$" maxlength="16" style="width:175px;"/>',
'</div>',
'</div>',
'<span style="margin:4px 5px 0 5px;" class="left">到</span>',
'<div un="con">',
'<div valid="empty|ip" validMsg="IP|IP">',
'<input name="ip2" type="text" class="txt left" value="$ip2$" maxlength="16" style="width:175px;"/>',
'</div>',
'</div>',
'</div>',
'<p un="validMsg"></p>',
'</div>',
'<div class="submitColumn btnColumn">',
'<a ck="cancel" class="btn btnNormal btnCancel right">取消</a><a ck="submit" class="btn btnComfirm right">确定</a>',
'</div>',
'</div>'
]),
oLimitMbrLi:ay.TE(
[
'$@$for($items$)$@$',
'<li>',
'<a ck="delWhiteName" href="javascript:;" class="right">删除</a>',
'<span class="left">$alias$</span>',
'<input type="hidden" name="$name$" value="$value$">',
'</li>',
'$@$endfor$@$'
]),
oWhiteNameLi:ay.TE(
[
'$@$for($items$)$@$',
'<li>',
'<a ck="delWhiteName" href="javascript:;" class="right">删除</a>',
'<span class="left">$alias$</span>',
'<input type="hidden" name="$name$" value="$value$">',
'</li>',
'$@$endfor$@$'
]),
oStructMbrTab:ay.TE(
[
'<div class="m_tab" un="tab"><a un="tree" class="on bd_r">组织架构</a><a un="member" class="">成员</a></div>',
'<div class="m_tree_wrap" un="tree"></div>',
'<div class="g" un="member">',
'<div class="searchcon"><div class="searchcon_input_wrap"><input type="text" class="txt bold t_search" name="dy_content" title="搜索成员" ku="mbrsearch"><input type="submit" class="btnSearch" value=""><a style="display: none; " class="search_del" ck="clearmbrsearch"></a></div></div>',
'<div un="result" class="s_result"></div>',
'</div>',
]),
oMbrSearchLi:ay.TE(
[
'<ul>$@$for($users$)$@$<li><input nid="$alias$" pname="$name$" ck="select" type="checkbox" id="_mbr_$alias$" $@$if($checked$)$@$checked="true"$@$endif$@$ ><label for="_mbr_$alias$">$name$&lt;$alias$&gt;</label></li>$@$endfor$@$',
'$@$if($users.length$==0)$@$<li>没有找到对应的成员</li>$@$endif$@$</ul>'
]),
oFilterMenu:ay.T(
[
'<div class="m_list m_sel"><p class="g_info">用户别名</p>',
'<ul><li class="on"><a>显示</a></li>',
' <li><a>不显示</a></li>',
' <li class="g_info line">子部门别名</li>',
' <li><a>显示子部门成员</a></li>',
' <li><a>不显示子部门成员</a></li>',
'</ul><div>'
])
};
return(
{
getTmpl:function()
{
return dK;
}
});
});
});
$.package(
"biz/lib/structselector.js",
[
"biz/ctrl/member/asyntree.js",
"biz/lib/commdata.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
bIm;
function aTG(LF,ba,bz,bsw)
{
bsw?LF.append(['<div nid="',ba,'">',bz,'<input type="hidden" name="partyid" value="',ba,'"/></div>'].join(""))
:LF.find("[nid='"+ba+"']").remove();
}
ay.createLib(
"B.ExMod.StructSelector",
{bStatic:true},
function(bm)
{
return(
{
rule:function()
{
return(
{
click:
{
structSelect:{}
}
});
},
events:function()
{
return(
{
structSelect:function(_aoEvent,aA,aM)
{
var al=this,
de=$.$(aA);
aTG(al.$.$("#structList"),de.attr("nid"),de.attr("name"),aA.checked);
}
});
},
pages:function()
{
return(
{
structSelect:function()
{
var al=this.initPage?this.initPage():this,
Ln=al.$.$("#structList"),
aPj=al.page&&al.page().structmap||{},
bc=al.dom$().find("#structContent")
.asyntree({
bClosed:false,
nMaxLevel:100000,
oData:bIm.getPartyTree(),
ondata:function(hS)
{
var bK=hS.id,
BE=bIm.getPartyName(bK);

aPj[bK]&&aTG(Ln,bK,BE,true);
return[
'<ins class="folder">',

'<input id="ckStruct_',bK,'" nid="',bK,'" name="',ay.htmlEncode(BE),'"',
aPj[bK]?' checked':'',' ck="structSelect" type="checkbox"/>',
'<label for="ckStruct_',bK,'">',hS.name,'</label></ins>'
].join("");
}
});
}
});
},

init_:function()
{
bIm=$.lib("B.Data.commdata");
}
});
}
);
}
);
$.package(
"comm/ui/hintinput.js",
[],
function(bu)
{
var bq=$.ctor_(),
ay=QMWin;

var cqs=function(aI)
{
var al=this,
dw=aI||{},
aHV=dw.sHintClass||"hint";
al.each(function(_aoDom)
{
if(_aoDom.tagName.toLowerCase()==="input")
{
var kt=QMWin.$(_aoDom),
lb=kt.attr("title");
if(!lb)
{
return;
}
kt.attr("value",lb);
kt.addClass(aHV);
var cuZ=function()
{
if(kt.attr("value")===lb&&kt.hasClass(aHV))
{
kt.attr("value","");
kt.rmClass(aHV);
}
};
var bkW=function()
{
if(kt.attr("value")==="")
{
kt.attr("value",lb);
kt.addClass(aHV);
}
};
if(lb)
{
kt.on("focus",cuZ).on("blur",bkW);
}
}
});
return al;
};
bq.extend("method",(
function()
{
return(
{
hint:cqs
}
);
}
)()
);
});
$.package(
"comm/ui/resize.js",
[],
function(bu)
{
var $=bu,
ay=QMWin,
bq=ay.ctor_();

var drT={
direction:["right","bottom","right-bottom"]
},
djL={
"top":"rTop",
"right":"rRight",
"bottom":"rBottom",
"left":"rLeft",
"left-top":"rLeftTop",
"right-top":"rRightTop",
"left-bottom":"rLeftBottom",
"right-bottom":"rRightBottom"
},
aws="position:absolute;background:#FFF;border: 1px solid #333;width: 6px;height: 6px;z-index:$zIndex$;font-size:0;opacity: 0.5;filter:alpha(opacity=50);",
dkj=ay.TE([
'<div handle="rRightBottom" style="'+aws+'$@$if(!$right-bottom$)$@$display:none;$@$endif$@$right:-4px;bottom:-4px;cursor:nw-resize;background-color:#00F;"></div>',
'<div handle="rLeftBottom" style="'+aws+'$@$if(!$left-bottom$)$@$display:none;$@$endif$@$left:-4px;bottom:-4px;cursor:ne-resize;"></div>',
'<div handle="rRightTop" style="'+aws+'$@$if(!$right-top$)$@$display:none;$@$endif$@$right:-4px;top:-4px;cursor:ne-resize;"> </div>',
'<div handle="rLeftTop" style="'+aws+'$@$if(!$left-top$)$@$display:none;$@$endif$@$left:-4px;top:-4px;cursor:nw-resize;"> </div>',
'<div handle="rRight" style="'+aws+'$@$if(!$right$)$@$display:none;$@$endif$@$right:-4px;top:50%;margin-top:-4px;cursor:e-resize;"> </div>',
'<div handle="rLeft" style="'+aws+'$@$if(!$left$)$@$display:none;$@$endif$@$left:-4px;top:50%;margin-top:-4px;cursor:e-resize;"> </div>',
'<div handle="rTop" style="'+aws+'$@$if(!$top$)$@$display:none;$@$endif$@$top:-4px;left:50%;margin-left:-4px;cursor:n-resize;"> </div>',
'<div handle="rBottom" style="'+aws+'$@$if(!$bottom$)$@$display:none;$@$endif$@$bottom:-4px;left:50%;margin-left:-4px;cursor:n-resize;"> </div>'

]);

function crz(gh)
{
var il=gh.offset(),
fW=gh.outerHeight(),
fL=gh.outerWidth();

return[il.top,il.left+fL,il.top+fW,il.left,fL,fW];
}

function cuv(gh,eg)
{
var al=this;

al.uO=gh;
al.qF=ay.extend({},drT,eg||{});

al.hw();
}

cuv.prototype={
option:function()
{
},

hw:function()
{
var al=this;
al.dxl();
ay.each(djL,function(jj,Wn)
{
al.uO.find("[handle="+jj+"]").addEvent("mousedown",
function(_aoEvent)
{
al.asq(_aoEvent,al.aVw(Wn));
}
);
}
);


al.uO.addEvent("mousewheel",function(_aoEvent)
{
_aoEvent.wheelDelta&&
byN(_aoEvent,_aoEvent.wheelDelta>0?6:-6);
}
);
ay.isBrowser("firefox")&&al.uO.data(0).addEventListener("DOMMouseScroll",function(_aoEvent)
{
_aoEvent.detail&&
byN(_aoEvent,_aoEvent.detail<0?6:-6);
},false
);

function byN(_aoEvent,aJg)
{
al.baa(_aoEvent);
al.aVw('left-top')(-aJg,-aJg);
al.baa(_aoEvent);
al.aVw('right-bottom')(aJg,aJg);
ay.preventDefault(_aoEvent);
al.uO.fireEvent("resize");
}
},

dxl:function()
{
var al=this,
ug=al.uO,
cev=ug.css("position"),
cSo=ug.css("zIndex");

if(cev!="relative"&&cev!="absolute")
{
ug.css("position","relative");
}
ug.append(dkj.replace(ay.extend(
{zIndex:+(cSo||0)+1},
ay.toMap(al.qF.direction,1)
)));
},

asq:function(_aoEvent,baB)
{
var al=this,
ug=al.uO,
bJC=ug.$(":doc"),
bsP=ug.$(":win");

al.baa(_aoEvent);


ay.stopPropagation(_aoEvent);


bJC.addEvent("mousemove",al.der=function(_aoEvent){
al.Er(_aoEvent,baB);
})
.addEvent("mouseup",al.bdr=function(_aoEvent){
al.Sa(_aoEvent,baB);
});


if(ug.attr("setCapture"))
{
ug.addEvent("losecapture",al.bdr)
.data(0).setCapture();
}
else 
{
bsP.addEvent("blur",al.bdr)
.preventDefault(_aoEvent);
}

al.uO.fireEvent("resizeStart");

return al;
},

Er:function(_aoEvent,baB)
{
var al=this,
bR=document,
bj=window;

bj.getSelection?bj.getSelection().removeAllRanges()
:bR.selection.empty();

var cqH=_aoEvent.clientX+ay.scrollLeft(),
cqG=_aoEvent.clientY+ay.scrollTop(),
aZm=cqH-al.aDx,
aZn=cqG-al.aDy;
baB.call(al,aZm,aZn);

al.uO.fireEvent("resize");

return al;
},

Sa:function(_aoEvent,baB)
{
var al=this,
ug=al.uO,
bJC=ug.$(":doc"),
bsP=ug.$(":win");

bJC.delEvent("mousemove",al.der)
.delEvent("mouseup",al.bdr);

if(ug.attr("releaseCapture"))
{
ug.delEvent("losecapture",al.bdr)
.data(0).releaseCapture();
}
else
{
bsP.delEvent("blur",al.bdr);
}

ug.fireEvent("resizeStop");
return al;
},

baa:function(_aoEvent)
{
var al=this,
ug=al.uO,
jB=ug.data(0),
cJ=al.qF.container;

al.aDx=_aoEvent.clientX+ay.scrollLeft();
al.aDy=_aoEvent.clientY+ay.scrollTop();
al.XJ=crz(ug);
al.blr=jB.offsetTop;
al.blw=jB.offsetLeft;
al.Pw=jB.clientHeight;
al.PN=jB.clientWidth;
if(cJ)
{
al.abm=crz(ug.$(cJ));
al.cvI=al.abm[0]-al.XJ[0];
al.cfI=al.abm[3]-al.XJ[3];
al.cst=al.abm[2]-al.XJ[2];
al.chr=al.abm[1]-al.XJ[1];
}

return al;
},















Lj:function(sx,sw,aqr,aqu,Xm,Wc,Ro,QY)
{
var al=this,
dz=al.qF,
vY=sx,wc=sw;

if(dz.ratio){
if(aqr&&!aqu){
wc=vY/dz.ratio*((Wc&&Ro||Xm&&QY)?-1:1);
}else if(!aqr&&aqu){
vY=wc*dz.ratio*((Wc&&Ro||Xm&&QY)?-1:1);
}else if(aqr&&aqu){
if(Math.abs(vY)>Math.abs(dz.ratio*wc)){
wc=vY/dz.ratio*((Wc&&Ro||Xm&&QY)?-1:1);
}else if(Math.abs(vY)<Math.abs(dz.ratio*wc)){
vY=wc*dz.ratio*((Wc&&Ro||Xm&&QY)?-1:1);
}
}
}else{
vY=aqr?vY:0;
wc=aqu?wc:0;
}

if(dz.container)
{
var cqT=Xm&&((al.XJ[0]+wc)<al.abm[0]),
cmc=Wc&&((al.XJ[3]+vY)<al.abm[3]),
ckJ=Ro&&((al.XJ[2]+wc)>al.abm[2]),
clS=QY&&((al.XJ[1]+vY)>al.abm[1]);
if(cqT){
return al.Lj(dz.ratio?0:vY,al.cvI,aqr,true,Xm,Wc,Ro,QY);
}
if(cmc){
return al.Lj(al.cfI,dz.ratio?0:wc,true,aqu,Xm,Wc,Ro,QY);
}
if(ckJ){
return al.Lj(dz.ratio?0:vY,al.cst,aqr,true,Xm,Wc,Ro,QY);
}
if(clS){
return al.Lj(al.chr,dz.ratio?0:wc,true,aqu,Xm,Wc,Ro,QY);
}
}

var ciO=(al.PN+(QY?vY:-vY))<dz.minWidth,
cCZ=(al.Pw+(Ro?wc:-wc))<dz.minHeight;
if(ciO||cCZ){
return null;
};

return[vY,wc];
},

aVw:function(chY)
{
var al=this,
ug=al.uO;

switch(chY.toLowerCase())
{
case'top':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,false,true,true,true);
jb&&fY(jb[0],jb[1]);
jb&&YE(jb[0],jb[1]);
};
case'left':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,true,false,true,true);
jb&&fY(jb[0],jb[1]);
jb&&YE(jb[0],jb[1]);
};
case'bottom':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,false,true,false,false,true,true);
jb&&aKc(jb[0],jb[1]);
jb&&adY(jb[0],jb[1]);
};
case'right':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,true,false,false,false,true,true);
jb&&aKc(jb[0],jb[1]);
jb&&adY(jb[0],jb[1]);
};
case'left-top':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,true,true,true,true);
jb&&fY(jb[0],jb[1]);
jb&&YE(jb[0],jb[1]);
};
case'right-top':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,true,true,true,false,false,true);
jb&&fY(jb[0],jb[1]);
jb&&adY(jb[0],jb[1]);
};
case'left-bottom':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,true,true,false,true,true,false);
jb&&aKc(jb[0],jb[1]);
jb&&YE(jb[0],jb[1]);
};
case'right-bottom':
return function(sx,sw)
{
var jb=al.Lj(sx,sw,true,true,false,false,true,true);
jb&&aKc(jb[0],jb[1]);
jb&&adY(jb[0],jb[1]);
};
default:
return function(){debug('undifined direction')};
}


function fY(sx,sw)
{
ug.css("top",Math.max(0,al.blr+sw)+'px');
ug.css("height",Math.max(0,al.Pw-sw)+'px');
}

function YE(sx,sw)
{
ug.css("left",Math.max(0,al.blw+sx)+'px');
ug.css("width",Math.max(0,al.PN-sx)+'px');
}

function aKc(sx,sw)
{
ug.css("height",Math.max(0,al.Pw+sw)+'px');
}

function adY(sx,sw)
{
ug.css("width",Math.max(0,al.PN+sx)+'px');
}
}
};

bq.extend("method",(
function()
{
return{


















resizable:function(eg)
{
var al=this;
al.each(function(_aoDom)
{
new cuv(ay.$(_aoDom),eg);
}
);
return al;
}
};
}

)());
}


);

$.package(
"comm/ctrl/imgcropper.js",
["comm/ui/resize.js","comm/ui/dragdrop.js"],
function(bu)
{

var $=bu,
ay=QMWin;




ay.createCtrl(


"QMImgCropper",

{},

function(bm)
{
var dyg='<div style="filter: alpha(opacity:0); opacity:0;BACKGROUND-COLOR: #fff; width: 100%; height: 100%; font-size: 0px;"/>',
dwG='<div style=" margin:130px 0 0; text-align:center; color:808080;"> 图片有误 </div>',
dK=ay.TE(
[
'<div un="wrap" style="display:none;position:relative">',
' <img un="base" src="$imgpath$"/>',
' <img un="crop" src="$imgpath$"/>',
'</div>'
]);
return(
{





setImg:function(gc,dbD)
{
var al=this;
al.aCK=gc+(dbD?("?"+ay.random()):"");
al.bmF();

return al;
},




getPos:function()
{
var al=this,
xv=al.baQ(),
aTx=Math.round,
csK=al.bXO/al.Lk,
ccx=al.bUV/al.KP;

return[
Math.max(0,aTx(xv[0]*csK)),
Math.max(0,aTx(xv[3]*ccx)),
Math.max(0,aTx(xv[4]*csK)),
Math.max(0,aTx(xv[5]*ccx))
];
},












init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);

al.xS=ay.$(aI.container);
al.dcA=aI.ratio||1;
al.dzF=!!aI.free;
al.dxZ=aI.maxPreWidth||99999;
al.bjS=[];
al.dwm=aI.direction;
al.bOq=aI.beforeload||function(){};
al.bMh=aI.afterload||function(){};
al.boH=aI.loaderror||function(){};

for(var i=0,len=(aI.previews||[]).length;i<len;i++)
{
al.bjS.push(ay.$(aI.previews[i]));
}
},

bmF:function()
{
var al=this,
jv=al.xS;
jv.html(dK.replace({imgpath:al.aCK}));

var aYC=jv.find("img[un='base']"),
cnI=al.cYP=jv.find("img[un='crop']"),
ciB=al.brc=jv.find("div[un='wrap']");

dym();
al.bOq();

aYC.addEvent("error",function()
{
jv.html(dwG);
al.boH();
});

aYC.addEvent("load",function()
{
ciB.show();
al.bMh();
dax();
al.YC(ciB,aYC,cnI);
al.cAC();
aYC.delEvent("load",arguments.callee);
});

aYC.addEvent("mousedown",function(_aoEvent)
{
ay.preventDefault(_aoEvent);
});

cnI.addEvent("mousedown",function(_aoEvent)
{
ay.preventDefault(_aoEvent);
});

function dym()
{
for(var aVJ=al.bjS,i=aVJ.length-1;i>=0;i--)
{
aVJ[i].html("");
}
}
function dax()
{
al.cvi=[];
for(var aVJ=al.bjS,i=aVJ.length-1;i>=0;i--)
{
var yL=ay.$("<img>"),
bQP=aVJ[i];
yL.attr("src",al.aCK)
.css("position","absolute");
bQP.css("overflow","hidden")
.css("position","relative")
.html("").append(yL);

al.cvi.push(yL);
}
}

return al;
},

YC:function(cwd,brh,dgs)
{
cwd.show();

var	al=this,
jv=al.xS,
awU=jv.height(),
axc=jv.width(),
ajt=brh.attr("height"),
ajo=brh.attr("width");

al.bXO=ajt||1;
al.bUV=ajo||1;

if(awU>ajt&&axc>ajo)
{
al.Lk=ajt;
al.KP=ajo;
}else if(ajt*axc>awU*ajo)
{

al.Lk=awU;
al.KP=awU*ajo/ajt;
}else{

al.Lk=axc*ajt/ajo;
al.KP=axc;
}

cwd.css("height",al.Lk+"px")
.css("width",al.KP+"px")
.css("top",(awU-al.Lk)/2+"px")
.css("left",(axc-al.KP)/2+"px");

brh.css("height",al.Lk+"px")
.css("width",al.KP+"px")
.css("position","absolute")
.css("opacity",0.6);

dgs.css("height",al.Lk+"px")
.css("width",al.KP+"px")
.css("position","absolute")
.css("zIndex",parseInt(brh.css("zIndex"))||0+1);

},

cAC:function()
{
var al=this,
Mv=al.dcA,
bfU,bak,aqQ,atf,
bfZ=0;

if(!ay.isBrowser("ie"))
{
bfZ=2;
}

if(al.KP/al.Lk>Mv)
{
aqQ=(al.Lk-bfZ)*0.8;
atf=aqQ*Mv;
bfU=(al.Lk-aqQ)/2;
bak=(al.KP-atf)/2;
}else
{

atf=(al.KP-bfZ)*0.8;
aqQ=atf/Mv;
bfU=(al.Lk-aqQ)/2;
bak=(al.KP-atf)/2;
}

al.dtL=ay.$("<div>")
.css("border","1px dashed #ccc")
.css("position","absolute")
.css("cursor","move")
.css("top",bfU+"px")
.css("left",bak+"px")
.css("height",aqQ+"px")
.css("width",atf+"px")
.css("zIndex",parseInt(al.brc.css("zIndex"))||0+1)
.append(dyg)
.appendTo(al.brc)
.resizable(
{
ratio:al.dzF?0:Mv,
container:al.brc,
direction:al.dwm})
.draggable({container:al.brc})
.addEvent({
"resize":function()
{
aYF();
},
"startDrag":function()
{



},
"drag":function()
{
aYF();
},
"dragStop":function()
{




}
});

function aYF()
{
var xv=al.baQ();

al.cYP.css("clip","rect("+(xv[0]+1)+'px,'+(xv[1]+1)+'px,'+
(xv[2]+1)+'px,'+(xv[3]+1)+"px)");













al.ckb();
}

aYF();
return al;
},

ckb:function()
{
var al=this,
bPk=al.bjS,
dfB=al.cvi,
xv=al.baQ();

for(var i=0,len=bPk.length;i<len;i++)
{

if(xv[4]&&xv[5])
{
var bgG=bPk[i].height(),
bjt=bgG*xv[5]/xv[4],
fW=al.Lk*bgG/xv[4],
fL=al.KP*bjt/xv[5];
bPk[i].css("width",Math.min(bjt,al.dxZ)+"px");
dfB[i].css("height",fW+"px")
.css("width",fL+"px")
.css("top",-(xv[0]*bgG/xv[4])+"px")
.css("left",-(xv[3]*bjt/xv[5])+"px");
}
}

return al;
},


baQ:function()
{
var aaC=this.dtL.data(0);
return[
aaC.offsetTop,
aaC.offsetLeft+aaC.clientWidth,
aaC.offsetTop+aaC.clientHeight,
aaC.offsetLeft,
aaC.clientHeight,
aaC.clientWidth];
}
}
);
}

);


}


);
$.package(
"biz/ctrl/mod.js",
[
"comm/framework/Page/controller/base.js",
"comm/ctrl/formvalid.js",
"comm/ctrl/ajaxform.js",
"biz/lib/valid.js"
],
function(bu)
{
var ay=QMWin,
aES=ay.lib("AjaxForm"),
bZg={};

ay.createCtrl(
"B.Mod",
{sSuper:"Page.Mod"},
function(bm)
{
return(
{

share:function()
{
return this.aMw=this.aMw||{};
},

initPage:function()
{
var al=this,
avc=al.$.$("#pageData");
al.aef=avc.size()
?ay.evalVal(avc.attr("value")):{};
return al;
},
page:function()
{
return this.aef;
},
logOut:function()
{
ay.loc("href","/cgi-bin/loginpage?t=dm_loginpage&dmtype=bizmail&s=session_timeout");
},

onpage:function(xC,lq,eZ)
{

var al=this,
$=al.$;

if(eZ&&(eZ.indexOf("session_timeout")!=-1||eZ.indexOf("sessionTimeout")!=-1))
{
return al.logOut();
}

if(xC.oPages)
{
$.each(xC.oPages,function(zU)
{
var apJ=al.aia[zU];
if(apJ)
{
apJ.call(al);
}
});
}

al.aQH=[];
al.validLibs().length&&al.XO(function(_aoEvent)
{

return al.valid($.$(this))
?al.onsubmit_()||true
:$.preventDefault(_aoEvent)&&false;
});
al.onpage_.apply(al,arguments);
},
ajaxForm:function(cG)
{
var al=this;

al.XO(function(_aoEvent)
{
var so=true;
if(cG.onbeforesubmit)
{
var so=cG.onbeforesubmit();
!so&&$.preventDefault(_aoEvent);
}
return so;
});

al.XO(function(_aoEvent)
{
var pv=al.$.$("#tipsTop"),
uG=al.fGetAjaxSetting(cG,al),
pu=cG.onsuccess,
HV=cG.onclienterror,
IZ=cG.onerror;
cG.onsuccess=null;
cG.onclienterror=null;
cG.onerror=null;
pv.html('正在提交<span class="ico_loading_dotted"></span>').show();
uG.onsuccess=function(){
pv.hide();
pu&&pu.apply(this,arguments);
}
uG.onclienterror=function(){
pv.hide();
HV&&HV.apply(this,arguments);
}
uG.onerror=function(){
pv.hide();
IZ&&IZ.apply(this,arguments);
}
aES.ajax(_aoEvent,this,al.fGetAjaxSetting(uG,al));
return true;
});
return al;
},
ajax:function(cG)
{
var al=this,
pv=al.$.$("#tipsTop"),
uG=al.fGetAjaxSetting(cG,al),
pu=cG.onsuccess,
HV=cG.onclienterror,
IZ=cG.onerror;
cG.onsuccess=null;
cG.onclienterror=null;
cG.onerror=null;
pv.html('正在加载<span class="ico_loading_dotted"></span>').show();
uG.onsuccess=function(){
pv.hide();
pu&&pu.apply(this,arguments);
}
uG.onclienterror=function(){
pv.hide();
HV&&HV.apply(this,arguments);
}
uG.onerror=function(){
pv.hide();
IZ&&IZ.apply(this,arguments);
}

ay.ajax(uG);
return al;
},
valid:function(gh)
{
return this.valid_(gh);
},
valid_:function(gh)
{
return this.Nh.valid(gh.find("[valid]"));
},
initUserData:function()
{
},
onpage_:function()
{
this.aFC();
try{
this.dom$().find("input[_autofocus_='1']").data(0).focus();
}catch(ex){}
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
},
onNavBar:function(cRK)
{
},
initMod_:function()
{
this.aLz()
.aRE()
.aIy()
.initUserData();
},
aLz:function()
{

var al=this;
al.akm=function(gs)
{
var bgm=gs.retcode,
kr=gs.errmsg,
AR=gs.action;
gs.retcode!="0"
?al.postError(gs)
:al.postSuccess(gs);
};
al.akJ=function(ba)
{
al.iframeLoad(ba);
};
return al;
},

aRE:function()
{
var al=this,
$=al.$,
ng=al.validLibs();
if(ng.length)
{
al.Nh=$.ctrl("FormValid");
$.each(ng,function(wx)
{
var wI=$.lib(wx.name);
wI&&al.Nh.add(wI.valids());
});
}
return al;
},
aIy:function()
{
var al=this,
$=al.$,
ng=al.pageLibs();
al.aia={};
if(ng.length)
{
$.each(ng,function(wx)
{
var wI=$.lib(wx.name);
$.extend(al.aia,wI.pages());
});
}
return al;
},


XO:function(aOu)
{
var al=this,
ZL=al.aQH;
ZL.push(aOu);
al.dom$().find("form").on("submit",function()
{
for(var i=0;i<ZL.length;i++)
{
if(!ZL[i].apply(this,arguments))
{
break;
}
}
});
},
aFC:function()
{
var	al=this,
bc=al.dom$(),

GH=[
["#mbr","mbr",""],
["#company","company","company"],
["#setting/ownerInfo","company","company"],
["#setting/addr","company","setting_addr"],
["#setting/owner","company","setting_owner"],
["#admin/passwd","company","admin_passwd"],
["#admin","company","admin_privilege"],
["#domain","company","domain_manage"],
["#setting/applyupgrade","company","company"],
["#setting/bind2phone","company","setting_owner"],
["#syslog/date","syslog","syslog_date"],
["#syslog/mail","syslog","syslog_mail"],
["#syslog/login","syslog","syslog_login"],
["#syslog/operlog","syslog","syslog_operlog"],
["#syslog/batchjob","syslog","syslog_batchjob"],
["#setting/more","more","setting_more"],
["#spam/black","more","blacklist"],
["#spam/white","more","whitelist"],
["#toolbox","toolbox",""],
["#viptool","viptool",""],
["#synrtx","toolbox",""],
["#mailBackup","viptool",""],
["#compose/mail/list","toolbox",""],
["#compose/mail/compose","toolbox",""],
["#compose/mail","toolbox",""],
["#compose/notice","toolbox",""],
["#compose/send","toolbox",""],
["#entdisk","toolbox",""],
["#mailboxTrans","toolbox",""],
["#setting/outerLogin","toolbox",""],
["#qqlist","toolbox",""],
["#loginpage","toolbox",""],
["#crm/addr","company","crm_addr"],
["#","today",""],
["","today",""]
],
oY=$.loc("hash"),
XC="",
VZ="";

for(var i=0;i<GH.length;i++)
{
if(-1!=oY.indexOf(GH[i][0]))
{
XC=GH[i][1];
VZ=GH[i][2];
break;
}
}

this.$.$("[un='topNavBar']").find("a").rmClass("on");
this.$.$("[un='topNavBar']").find("a[un='"+XC+"']").addClass("on");

bc.find("[un='leftNavBar']").find("a").rmClass("selected");
bc.find("[un='leftNavBar']").find("a[un='"+VZ+"']").addClass("selected");

}
}
);
}
);
}
);
$.package(
"biz/ctrl/index.js",
["biz/ctrl/mod.js"],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
aCO=true;
ay.createCtrl(
"B.Index",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"}];
},
rule:function()
{
return(
{
click:
{
delInfo:{sContext:"info"}
}
});
},
route:function()
{
var ds=$.sid(),
by;


switch(ay.lib("B.Utils").config().hash)
{
case"domain/add":
by="/cgi-bin/bizmail?sid="+ds+"&t=biz_rf_domain_add&tt=adddomain"
break;
case"domain/manage":
by="/cgi-bin/bizmail?sid="+ds+"&t=biz_rf_domain_manage&tt=domainmanage"
break;
default:
by="/cgi-bin/bizmail?sid="+ds+"&init=1&t=biz_rf_home&tt=content";
}

return(
[null,
[
["setting",{sMod:"B.Setting",sPkg:"biz/ctrl/setting.js"}],
["mbr",{sMod:"B.Member",sPkg:"biz/ctrl/member/member.js"}],
["admin",{sMod:"B.Admin",sPkg:"biz/ctrl/admin.js"}],
["compose",{sMod:"B.Compose",sPkg:"biz/ctrl/compose/compose.js"}],
["domain",{sMod:"B.Domain",sPkg:"biz/ctrl/domain.js"}],
["entdisk",{sMod:"B.EntDisk",sPkg:"biz/ctrl/entdisk.js"}],
["drive",{sMod:"B.Drive",sPkg:"biz/ctrl/drive.js"}],
["toolbox",{sMod:"B.ToolBox",sPkg:"biz/ctrl/toolbox.js"}],
["spam",{sMod:"B.Spam",sPkg:"biz/ctrl/spam.js"}],
["syslog",{sMod:"B.Syslog",sPkg:"biz/ctrl/syslog.js"}],
["mailboxTrans",{sMod:"B.mailboxTrans",sPkg:"biz/ctrl/mailboxTrans.js"}],
["sp",{sMod:"B.SP",sPkg:"biz/ctrl/sp.js"}],
["loginpage",{sMod:"B.Loginpage",sPkg:"biz/ctrl/loginpage.js"}],
["customize",{sMod:"B.Customize",sPkg:"biz/ctrl/customize.js"}],
["synrtx",{sMod:"B.SynRtx",sPkg:"biz/ctrl/synrtx.js"}],
["mailBackup",{sMod:"B.MailBackup",sPkg:"biz/ctrl/mailBackup.js"}],
["viptool",{sMod:"B.VipTool",sPkg:"biz/ctrl/viptool.js"}],
["crm",{sMod:"B.CRM",sPkg:"biz/ctrl/crm/crm.js"}],
["company",
{

sUrl:"/cgi-bin/bizmail?sid="+ds+"&t=biz_rf_company",
sAction:"company"
}],
["qqlist",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?sid="+ds+"&t=biz_rf_qqlist"
}],
["",
{
bCache:true,
sUrl:by,
sAction:"index"
}]
]
]
);
},
actions:function()
{
return(
{
index:function()
{
var al=this,
oY=al.$.lib("B.Utils").config().hash;
if(aCO)
{
al.dom$().find("#mainContent").show();
aCO=false;
}

oY&&al.hash(oY);
this.onNavBar("today");
},
company:function()
{
this.onNavBar("company");
}
});
},
events:function()
{
return(
{
delInfo:function(_aoEvent,aA,aM)
{
var al=this,
$=al.$,
dU=$.$(aM),
bK=dU.attr("infoid"),
cj=dU.attr("infotype"),
cZj=dU.attr("taskid");
al.ajax(
{
sUrl:"/cgi-bin/bizmail?sid="+ay.sid()
+"&t=biz_rf_mgr&ef=js&action=del_info&id="+bK+"&type="+cj+"&taskid="+cZj,
onsuccess:function()
{
dU.hide();
al.clearCache("");
var cAz=$.$("#todo_count"),
hF=parseInt(cAz.html())-1;
hF<0&&(hF=0);
cAz.html(hF);
}
});

return true;
}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
});
}
);
}
);
$.package(
"biz/app/biz.js",
[
"comm/ctrl/cachemgr.js",
"comm/ctrl/tagevent.js",
"comm/ctrl/history.js",
"comm/extend/qmcgi.js",
"comm/framework/Page/app/base.js",

"biz/lib/commdata.js",
"biz/lib/utils.js",
"biz/lib/auth.js",

"biz/ctrl/mod.js",
"biz/ctrl/index.js"
],
function(bu)
{
var $=bu;




QMWin
.createApp(
"B.Biz",
{sSuper:"Page.Base"},
function(bm)
{
return(
{
app_:function()
{
return"B";
},
init_:function(aI)
{
this.superEx_(bm,"init_",[aI]);
},
initData_:function(aI)
{
var al=this,
$=al.$;
$.lib("B.Data.commdata").initGroupData(aI.group);
$.lib("B.Data.commdata").initPartyData(aI.partylist);
!aI.enableAutoComplete&&$.lib("B.Data.commdata").disableFindUsers();
$.lib("B.Data.commdata").setAuthData(aI.auth);
$.lib("B.Data.Auth").set(aI.auth);
$.lib("B.Utils").config(aI);

setTimeout(function()
{
$.lib("B.Data.commdata").updateUserData();
},1000);

return al;
},
initRoute_:function(adf)
{
var al=this,
$=al.$,
DB="#tipsTop",
Hc="#tipsError";

adf
.addEvent("loading",function()
{
$.$(Hc).hide();
$.$(DB).html('正在加载<span class="ico_loading_dotted"></span>').show();
}
)
.addEvent("loaded",function()
{
$.$(DB).hide();
$.$(Hc).hide();
}
)



.addEvent("error",function(fC)
{
var hB=(fC||{}).message||"unknow error";

$.$(DB).hide()
.$(Hc).html(hB).show();

setTimeout(function(){$.$(Hc).hide();},5000);
});



}
}
);
}
);
}
);
$.package(
"biz/ctrl/setting.js",
["comm/ctrl/inputkit.js",
"biz/ctrl/member/exautocomplete.js",
"biz/lib/commdata.js",
"comm/ctrl/imgcropper.js",
"biz/lib/mbrtmpl.js",
"biz/ctrl/mod.js"],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
dK=ay.lib("B.Data.member.tmpl").getTmpl(),
gX=ay.lib("B.Data.commdata");

function bql(io)
{

if(!io)
{
return false;
}
var tA=io.split("."),
bRA="jpg?jpeg?png?gif?bmp",
bCF;
if(tA.length<2||bRA.indexOf((tA[tA.length-1]+"").toLowerCase())==-1)
{
return false;
}
return true;
}
ay.createCtrl(
"B.Setting",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
rule:function()
{
return(
{
click:
{
quitImgCropper:{},
saveLogo:{},
delLogo:{},
switchInput:{sContext:"switchInput"},
formStyle:{sContext:"formStyle",bPropagable:true},
copyToClipboard:{sContext:"copyToClipboard"},
pswShow:{sContext:"pswChange"},
pswHide:{sContext:"pswChange"},
showCheckPasswd:{sContext:"protectMail"},
editAdminMail:{sContext:"adminMail"},
setAddr:{sContext:"addr"}
},
dblclick:
{
saveLogo:{}
},
mouseover:
{
logoFocus:{}
},
mouseout:
{
logoBlur:{}
}
});
},
route:function()
{
var ds=$.sid();
return(
[
"setting",
[

["ownerInfo",
{
bCache:false,
sUrl:"/cgi-bin/bizmail?sid="+ds+"&t=biz_rf_company&tt=ownerInfo",
sAction:"ownerInfo"
}],

["addrexport",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds+"&t=biz_rf_company&tt=AddrExport"
}],

["addr",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds+"&action=set_addr&setaddr=sync&t=biz_rf_company&tt=addr"
}],

["applyupgrade",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?sid="+ds
+"&t=biz_rf_applyupgrade&tt=applyupgrade&s=applyupgrade",
sAction:"applyupgrade"
}],
["applysucc",
{bCache:true,
sUrl:"/cgi-bin/bizmail?sid="+ds
+"&t=biz_rf_applyupgrade&tt=applysucc"
}],

["outerLogin",
{
bCache:true,sUrl:"/cgi-bin/bizmail_setting?sid="+ds
+"&t=biz_rf_more&tt=outerLogin"
}],

["exchangeNotice",
{
bCache:true,sUrl:"/cgi-bin/bizmail?sid="+ds
+"&t=biz_rf_notice_exchange&step=1"
}],
["exchangeInvite",
{
bCache:true,sUrl:"/cgi-bin/bizmail?sid="+ds
+"&t=biz_rf_notice_exchange&step=2&s=exchangeInvite",
sAction:"exchangeInvite"
}],
["exchangeSucc",
{
bCache:true,sUrl:"/cgi-bin/bizmail?sid="+ds
+"&t=biz_rf_notice_exchange&step=3"
}],
["bind2phone/viewsms",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds+"&t=biz_rf_bind2phone.html&action=viewsms&s=view"
}],
["bind2phone/closesms",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds+"&t=biz_rf_bind2phone.html&action=closesms&s=close",
sAction:"closesms"
}],
["bind2phone/opensms",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds+"&t=biz_rf_bind2phone.html&action=opensms&s=open",
sAction:"opensms"
}],
["owner",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds+"&t=biz_rf_company&tt=ownerSetting",
sAction:"owner"
}],
["more",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds+"&t=biz_rf_more&tt=setting",
sAction:"more"
}]
]
]);
},
postError:function(gs)
{
var al=this,
$=al.$;
if(gs.action=="add_img")
{
al.$.$("#tipsTop").hide();
al.showErr("图片上传失败");
$.$("input[type='file']").each(function(qG){
var qw=0;
((qw=parseInt($.$(qG).attr("timeout")))>0)&&clearTimeout(qw);
});
}
},
postSuccess:function(gs)
{
var al=this,
$=al.$;
if(gs.action=="add_img")
{
var by=gs.data.url+"&sid="+$.sid()+"&r="+$.random();
al.$.$("#tipsTop").hide();

$.$("input[type='file']").each(function(qG){
var qw=0;
((qw=parseInt($.$(qG).attr("timeout")))>0)&&clearTimeout(qw);
});
al.dom$().find("#logo_cropper").show();
al.dom$().find("#owner_info_form").hide();
!al.aOo&&
(al.aOo=al.$.ctrl("QMImgCropper",
{
free:true,
ratio:5,
container:"#logoContainer",
previews:["#logoPreview"],
maxPreWidth:215,
direction:["right","bottom","right-bottom"],
loaderror:function()
{
al.$.$("input[un='logo_file']").show();
al.$.$("#tipsTop").hide();
al.showErr("图片有误，请重新上传");
},
beforeload:function()
{
al.$.$("input[un='logo_file']").hide();
al.$.$("#logoContainer").attr("ready","false");
al.$.$("#tipsTop").html('加载图片<span class="ico_loading_dotted"></span>').show();
},
afterload:function()
{
al.$.$("input[un='logo_file']").show();
al.$.$("#logoContainer").attr("ready","true");
al.$.$("#tipsTop").hide();
}
}));
al.aOo.setImg(by);
al.dwp=gs.data.key;
}
return al;
},
actions:function()
{
return(
{

ownerInfo:function()
{
var al=this;
al.ajaxForm(
{
onsuccess:function()
{
al.showMsg("编辑信息成功");
setTimeout(function(){
al.hash("company",true);
},1500);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"编辑信息失败");
}
});

var csN=function(){
var hB="请选择图片文件",
cTJ=al.$.$(this),
yJ=al.$.$(this).parent("div"),
nH=al.$.$(this).parents("form");

if(bql(this.value))
{
nH.data(0).submit();
var qw=setTimeout(function(){
alert("现在上传图片已经超过5分钟，继续等待或者刷新重试");
},1000*60*5);
cTJ.attr("timeout",qw)
al.$.$("#tipsTop").html('正在上传<span class="ico_loading_dotted"></span>').show();
}
else
{
alert(hB);
}
yJ.html(yJ.html());
yJ.find("input[un='logo_file']").on("change",csN);
};
al.$.$("input[un='logo_file']").on("change",csN);
},
opensms:function()
{
var al=this;
al.clearCache("setting/owner",true);
},
closesms:function()
{
var al=this;
al.showMsg("取消绑定成功").clearCache("setting/owner",true).hash("setting/owner",true);
},
owner:function()
{
var al=this,
bc=al.dom$();
al.ajaxForm(
{
onsuccess:function(aE)
{
al.clearCache("setting/owner",true).hash("setting/owner",true).showMsg("保存成功");
},
onclienterror:function(qY,kr)
{
al.showErr(kr);
}

});

var aMU=bc.find("input[name='alias_ln']");
aMU.exautocomplete(
{
vMaxHeight:170,
bAutoSelect:true,
vData:function(gy)
{
var sF=gX.findUsers(gy),aO=[];
for(var i=0;i<sF.length;i++)
{
var fA=sF[i];
aO.push(
{
sHtml:['<a class="line" title="',fA.alias,'">"',fA.name,'" &lt;',fA.alias,'&gt;</a>'].join(""),
oUser:fA
});
}
return aO;
},
onselect:function(aE)
{
if(aE&&aE.oUser)
{
al.$.$("input[name='alias_ln']").attr("value",aE.oUser.alias);
}
}
});
},
more:function()
{
var al=this;
al.ajaxForm(
{
onsuccess:function()
{
al.clearCache("setting/more",true).showMsg("保存成功");
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"保存失败");
}
});
al.$.$("input[name='alias_ef']").autocomplete(
{
vMaxHeight:170,
vData:function(gy)
{
if(!(al.filterUser(gy).length==1
&&al.filterUser(gy)[0].oUser.email==gy))
return al.filterUser(gy);
},
onselect:function(aE)
{
if(aE.oUser)
{
al.$.$("input[name='alias_ef']").attr("value",aE.oUser.email);
}
}
});
al.$.$("input[name='alias_bk']").autocomplete(
{
vMaxHeight:170,
vData:function(gy)
{
if(!(al.filterUser(gy).length==1
&&al.filterUser(gy)[0].oUser.email==gy))
return al.filterUser(gy);
},
onselect:function(aE)
{
if(aE.oUser)
{
al.$.$("input[name='alias_bk']").attr("value",aE.oUser.email);
}
}
});
},

applyupgrade:function()
{
var al=this;
al.ajaxForm({
onsuccess:function()
{
al.showMsg("升级邮箱申请成功，请等待管理员审核").clearCache("company",true).clearCache("setting/applyupgrade",true).hash("company",true);
},
onclienterror:function(cCG,vR)
{
al.showErr(vR||"升级邮箱申请失败");
}
});
},


exchangeInvite:function()
{
var al=this;
al.ajaxForm(
{
onsuccess:function()
{
al.showMsg("邮件发送成功").clearCache("",true).hash("setting/exchangeSucc",true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"邮件发送失败");
}
});
}

});
},
events:function()
{
return(
{
quitImgCropper:function(_aoEvent,aA,aM)
{
var al=this;
al.dom$().find("#logo_cropper").hide();
al.dom$().find("#owner_info_form").show();
},
saveLogo:function(_aoEvent,aA,aM)
{
var al=this;

if(al.aOo&&al.$.$("#logoContainer").attr("ready")=="true")
{
var ej=al.aOo.getPos(),
fB=ej[0],
gP=ej[1],
ckr=ej[2],
cmr=Math.min(ej[3],ej[2]*7),
fL=Math.round(35*cmr/ckr),
dFj=al.dwp,
by=["/cgi-bin/bizmail_ui?t=biz_rf_mgr&action=set_img&sid=",$.sid(),"&key=",dFj
,"&crop=on&xoff=",gP,"&yoff=",fB,"&cropwidth=",cmr
,"&cropheight=",ckr
,"&resize=on&height=35&width=",fL].join("");
al.ajax({
sUrl:by,
onclienterror:function()
{
al.showErr("上传LOGO失败");
},
onerror:function()
{
al.showErr("上传LOGO失败");
},
onsuccess:function(gs)
{
var by=gs.data.url+"&sid="+$.sid()+"&r="+$.random();
al.showMsg("上传LOGO成功");
al.dom$().find("#logo_cropper").hide();
al.dom$().find("#owner_info_form").show();
al.dom$().find("#owner_info_form input[name='logo']")
.attr("value",gs.data.key);
al.dom$().find("#logo").attr("src",by).show();
al.$.$("input[ck='delLogo']").rmAttr("disabled").rmClass("disabled");
}
});
}else{
al.showMsg("请重新上传LOGO");
}

},
delLogo:function(_aoEvent,aA,aM)
{
var al=this;

al.dom$().find("#logo").hide();
al.dom$().find("#owner_info_form input[name='logo']").attr("value","0");
al.$.$(aA).attr("disabled","disabled").addClass("disabled");
},
switchInput:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
kt=dU.find("#"+$.$(aA).attr("targetid")),
ys=dU.find("[valid]");
if(al.$.$(aA).data(0).checked)
{
kt.rmAttr("disabled")
ys.attr("valid",ys.attr("valid").replace("off#",""));
}
else
{
kt.attr("disabled","disabled");
ys.attr("valid","off#"+ys.attr("valid"));
}
},
copyToClipboard:function(_aoEvent,aA,aM)
{
var $=this.$;
$.copyToClipboard($.$(aM).find("#getmycode").data(0).value);
},
editAdminMail:function(_aoEvent,aA,aM)
{
var aEL=this.$.$(aM),
bc=this.dom$();
aEL.find("div[un='text']").hide();
aEL.find("div[un='edit']").attr("valid","empty|mail").show();
aEL.find("div[un='edit'] input").focus();
bc.find("div[un='disable_btn']").hide()
bc.find("div[un='enable_btn']").show()
},
showCheckPasswd:function(_aoEvent,aA,aM)
{
var al=this,
fS=al.$.$("<div>").html(dK.oCheckPasswdDlg).dialog(
{
sTitle:"请输入管理员密码",
oRule:
{
click:
{
submit:{sContext:"dlg"}
}
},
oEvents:
{
submit:function(_aoEvent,aA,aM)
{
var dU=al.$.$(aM),
bJX=dU.find("input").attr("value");
if(bJX)
{
var by="/cgi-bin/bizmail_setting?sid="+al.$.sid()+"&action=check_passwd&t=biz_rf_mgr&ef=js&resp_charset=UTF8&oldpasswd="+escape(bJX);
ay.ajax(
{
sUrl:by,
onsuccess:function(oe)
{
var aO=al.$.evalVal(oe);
if(aO.retcode!="0")
{
al.showErr("密码错误");
}else{
var aEL=al.dom$().find("div[un='protectMail']");
aEL.find("div[un='text']").hide();
aEL.find("div[un='edit']").attr("valid","empty|mail").show().append(['<input type="hidden" name="oldpasswd" value="',bJX,'">'].join(""));
aEL.find("div[un='edit'] input").focus();
al.dom$().find("div[un='disable_btn']").hide()
al.dom$().find("div[un='enable_btn']").show()
}
},
onclienterror:function()
{
al.showErr("验证失败");
}
});
fS.dialog("close");
}else{
dU.find("div[un='errmsg']").show();
dU.css("zoom","1");
}
}
}
},"instance");
fS.find("input").on("keyup",function(_aoEvent){
fS.find("div[un='errmsg']").hide();
_aoEvent.keyCode==13&&fS.find("a[ck='submit']").fireEvent("click");
});
try{
fS.find("input").data(0).focus();
}catch(ex){}
},
pswShow:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
axL=dU.find("[valid]");
al.$.$(aA).attr("ck","pswHide");
al.dom$().find("input[name='setpasswd']").attr("value","on");
axL.attr("valid",axL.attr("valid").replace("off#",""));
dU.attr("valid",dU.attr("valid").replace("off#",""));
dU.find("[un='psw']").show();
},
pswHide:function(_aoEvent,aA,aM)
{
var al=this,
$=al.$,
dU=$.$(aM),
axL=dU.find("[valid]");
al.$.$(aA).attr("ck","pswShow");
al.dom$().find("input[name='setpasswd']").attr("value","off");
axL.attr("valid","off#"+axL.attr("valid"));
dU.attr("valid","off#"+dU.attr("valid"));
dU.find("[un='psw']").hide();
},
setAddr:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA),
dU=al.$.$(aM),
bZ=("on"==de.attr("setaddr"))?"off":"on";

al.ajax(
{
sType:"GET",
sUrl:"/cgi-bin/bizmail_setting?action=set_addr&t=biz_rf_mgr&sid="+$.sid()+"&setaddr="+bZ,
onsuccess:function()
{
al.clearCache("setting/addr",true).showMsg("保存成功");
dU.find("[un='addrStatus']").html(("on"==bZ)?"企业地址本已共享":"企业地址本还没共享");
de.attr("setaddr",bZ).data(0).value=("on"==bZ)?"取消共享":"共  享";
}
});

}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
});
}
);
}
);
$.package(
"biz/ctrl/domain.js",
[
"comm/ctrl/inputkit.js",
"comm/ui/menu.js",
"comm/ui/dialog.js",
"biz/ctrl/mod.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
baZ,
dhp=
[
'<div class="mainColumn">',
'<p>现在您将前往域名提供商的注册支付页面，请在该页面中按照提示完成支付流程。</p>',
'</div>',
'<div class="btnColumn" style="padding:0 0 10px 30px">',
'<input class="btn btnNormal" ck="finish" type="button" value="完成支付"/>',
'<input class="btn fourwd" ck="finish" type="button" value="支付遇到问题"/>',
'</div>'
].join(""),
cVw=ay.T(
[
'<div>',
'<input id="domain_$idx$" type="radio" $selected$ value="$domain$" name="domainname">',
'<label for="domain_$idx$">$domain$</label>',
'<span class="greentext bold" style="vertical-align: middle;">&nbsp;($price$元)</span>',
'</div>'
]),
cbs=ay.T(
[
'<div style="overflow:hidden:zoom:1;">',
'<a class="right" style="margin-right: 80px;" ck="domainQuery" domainname="$domain$">查询</a>',
'$rp$<span class="txt_red">$rd$</span>$rs$$is$',
'</div>'
]),
diU=ay.T(
[
'<div class="m_list">',
'<ul>',
'<li><a href="/cgi-bin/exmailapi?sid=$sid$&cmd=i_getkey&agent=qqmail&checksum=efedccd6ba32ad69a6462deffeee626c&type=login&domain=$domainname$" target="_blank">管理域名</a></li>',
'<li><a href="http://my.ename.cn/getpassword.do" target="_blank">找回密码</a></li>',
'<li><a href="/cgi-bin/exmailapi?sid=$sid$&cmd=i_getkey&agent=qqmail&checksum=efedccd6ba32ad69a6462deffeee626c&type=login&domain=$domainname$" target="_blank">域名续费</a></li>',
'</ul>',
'</div>',
]),
daF=ay.T(
[
'<div class="m_list">',
'<ul>',
'<li><a href="/cgi-bin/exmailapi?sid=$sid$&cmd=i_getkey&agent=qqmail&checksum=efedccd6ba32ad69a6462deffeee626c&type=login&domain=$domainname$" target="_blank">管理域名</a></li>',
'<li><a href="http://my.ename.cn/getpassword.do" target="_blank">找回密码</a></li>',
'<li><a href="#domain/paycn/$domainname$">域名续费</a></li>',
'</ul>',
'</div>',
])
;
ay.createCtrl(
"B.Domain",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
rule:function()
{
return(
{
click:
{
optShow:{sContext:"domain"},
statusSwitch:{sContext:"status"},
copyToClipboard:{sContext:"copyToClipboard"},
finish:{},

domainAdd:{sContext:"domainAdd"},
domainVerify:{},

domainQuery:{sContext:"domainQuery"},
domainQueryStop:{sContext:"domainQueryProgress"},
domainReg:{},

domainRefresh:{sContext:"domain"},
pendingAdd:{},
pendingRefresh:{sContext:"domain"},
pendingDel:{},
purchaseDel:{},

pay:{},
addFreeDomain:{}
},
keyup:
{
domainAddKU:{},
domainQueryKU:{}
}
});
},
route:function()
{
var ds=$.sid();
return(
["domain",
[

["config/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds
+"&t=biz_rf_domain_add&tt=&s=step2&action=get_key&domainname={domainname}",
sAction:"setHelp"
}],
["redirect",
{
sAction:"redirect"
}],

["manage",
{

sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_manage&tt=domainmanage",
sAction:"manage"
}],

["del/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds
+"&t=biz_rf_domain_unregist&tt=deldomain&domainname={domainname}",
sAction:"domainDel"
}],

["applycn",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_apply&tt=adddomain&step=2&suffix=cn,com.cn"
}],

["freeExperience",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_manage&tt=freeExperience&action=show_freeexp",
sAction:"manage"
}],

["addFreeDomain",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_manage&tt=addFreeDomain&action=add_freedomain",
sAction:"manage"
}],
["apply",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_apply&tt=adddomain&step=2",
sAction:"osslogApply"
}],

["copyMember/finish",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_copy_member&action=get_copyhistory&copyMenber=finish"
}],
["copyMember",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_copy_member&action=get_copyhistory",
sAction:"copymember"
}],

["default",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_manage&tt=adddomain"
}],

["add",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_add&tt=adddomain"
}],
["preemption/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_preemption&s=showpreemption"
+"&action=show_preemption&domainname={domainname}"
}],
["preemptionprotect/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_preemption&s=protectInfo"
+"&action=show_preemption&target=active&domainname={domainname}"
}],
["reg/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_apply&step=3"
+"&action=show_purchase&domainname={domainname}",
sAction:"reg"
}],
["regcn/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_apply&step=cn"
+"&action=show_purchase&domainname={domainname}"
}],
["paycn/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_apply&tt=paycn&step=paycn&domainname={domainname}"
}],
["purchase/{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_domain_apply&step=4"
+"&action=show_purchase&domainname={domainname}"
}]
]
]
);
},
actions:function()
{
return(
{
manage:function()
{
var al=this.initPage(),
ds=ay.sid();
ay.each(al.page().domains,function(aeo)
{
al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_mgr&action=add&domainname="+aeo,
onclienterror:function(){}
});
});
if(al.page().hash&&al.$.lib("B.Utils").config().hash!=al.page().hash)
{
al.clearCache("",false)
.clearCache(al.$.lib("B.Utils").config().hash,false);
al.$.lib("B.Utils").config().hash=al.page().hash;
}
},
redirect:function()
{
this.hash("domain/manage","domain/manage");
},
setHelp:function()
{
var al=this;
this.dom$().find("#domainprovider").on("change",function(){
al.dom$().find("#domainsethelp").attr("href",this.value);
});
setTimeout(function(){
al.$.inWin().document.title="腾讯企业邮箱";
},100);
},
reg:function(aeo)
{
var al=this;
cij=al.dom$().find("#province"),
cTP=cij.attr("province");
cij.find("option").each(function(ckS)
{
ckS.value==cTP&&(ckS.selected=true);
});

(-1!=aeo.indexOf(".cn"))&&al.ajax(
{
sUrl:"/cgi-bin/bizmail?sid="+ay.sid()+"&t=biz_rf_mgr&action=osslog&type=regcn&domainname="+aeo
});


al.ajaxForm(
{
onsuccess:function()
{
al.hash("domain/purchase/"+aeo,"domain");
}
});
},
domainDel:function()
{
var al=this;
al.ajaxForm(
{
onsuccess:function()
{
al.clearCache("domain",true).hash("domain/manage","domain");
}
});
},
copymember:function()
{
var al=this,
Ot=al.$.$("#fromdomain").data(0),
wJ=al.$.$("#todomain").data(0),
brY=wJ.options,
bPx=[];

for(var i=0;i<brY.length;i++)
{
var dz=brY.item(i);
bPx.push(new Option(dz.text,dz.value));
}

var cno=function(){
brY.length=0;
for(var i=0;i<bPx.length;i++)
{
var dz=bPx[i],
dFn=Ot.options.item(Ot.selectedIndex).text;
dz.text!=dFn&&brY.add(new Option(dz.text,dz.value));
}
}
Ot.onchange=cno;
cno();
al.ajaxForm(
{
onsuccess:function()
{
al.clearCache("domain",true).hash("domain/copyMember/finish",true);
}
});
},
osslogApply:function()
{
var al=this;
al.ajax(
{
sUrl:"/cgi-bin/bizmail?sid="+ay.sid()+"&t=biz_rf_mgr&action=osslog&type=apply"
});
}
});
},
events:function()
{
return(
{
optShow:function(_aoEvent,aA,aM)
{
var al=this,
ut=al.$.$(aA).attr("domainname"),
arF="";

if(-1==ut.indexOf(".cn"))
{
arF=diU.replace({domainname:ut,sid:ay.sid()});
}
else
{
arF=daF.replace({domainname:ut,sid:ay.sid()});
}

lK=this.$.$("<div>").html(arF)
.menu(
{
oTarget:aA,
oDockConfig:
{
bButtom:true,
bRight:true
}
},"instance");
var EK=lK.parents(".menu_obj");
EK.css("top",parseInt(EK.css("top").replace("px",""))+30+"px");



},
statusSwitch:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
ir=dU.attr("status"),
Gu=ir=="up"?"down":"up",
yL=dU.attr("status",Gu).find("[un='statusImg']"),
jv=dU.find("[un='statusCnt']");
yL.rmClass("ico_quick"+ir).addClass("ico_quick"+Gu);
Gu=="up"?jv.show():jv.hide();
},
copyToClipboard:function(_aoEvent,aA,aM)
{
var al=this,
$=al.$,
bZ=$.$(aM).find("[un='copy']").html();
$.copyToClipboard(bZ);
},
finish:function(_aoEvent,aA,aM)
{
var al=this,
ut=al.$.$(aA).attr("domainname");
ut&&al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()
+"&t=biz_rf_mgr&action=add&domainname="+ut,
onsuccess:function()
{
al.clearCache("domain",true).hash("domain/manage","domain");
},
onclienterror:function(aKf,cf)
{
al.clearCache("domain",true).hash("domain/manage","domain");
}
});
},
domainAdd:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
ut=dU.find("input").attr("value");
al.valid_(dU)
&&al.hash("domain/config/"+ut);
},
domainAddKU:function(_aoEvent)
{
_aoEvent.keyCode==13&&this.dom$().find("[ck='domainAdd']").fireEvent("click");
},
domainVerify:function(_aoEvent,aA,aM)
{
var al=this,
ut=aA.getAttribute("domainname");
al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()
+"&t=biz_rf_mgr&action=add&domainname="+ut,
onsuccess:function()
{
al.hash("domain/redirect","domain");
},
onclienterror:function(aKf,cf)
{
al.hash("domain/manage","domain");
}
});
},
addFreeDomain:function(_aoEvent,aA,aM)
{
var al=this;
al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()
+"&t=biz_rf_mgr&action=add_freedomain",
onsuccess:function()
{
al.showMsg("开通免费域名成功").clearCache("domain",true).clearCache("domain/manage",true).hash("domain/manage","domain");
},
onclienterror:function(aKf,cf)
{
al.showErr(cf||"开通免费域名失败");
}
});
},
domainQuery:function(_aoEvent,aA,aM)
{
var al=this,
$=al.$,
bc=al.dom$(),
ds=$.sid(),
dU=al.$.$(aM),
bIf=bc.find("#domainQueryProgress"),
Fb=bc.find("#domainQueryResult"),
bQZ=bc.find("#domainQueryError"),
ccO=bc.find("#domainReg"),
arb=dU.find("input").attr("value").replace(/^www\./i,""),
dpC=dU.find("input").attr("suffix").split(","),
ut=aA.getAttribute("domainname")||arb,
aaY=function()
{
return bIf.hide()&&Fb.hide()&&bQZ.hide();
},
clo=function()
{
var RR="";
$.each(dpC,function(cqy,uK)
{
RR+="&suffix="+cqy;
});

al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ds+"&t=biz_rf_mgr&action=query_domain"
+"&manual=1&provid=102&domainname="+ut+RR,
onsuccess:function(gs)
{
var aO=gs.data,
gj="";
if(aO.code=="0")
{
$.each(aO.domain,function(Lw,uK)
{
gj+=cVw.replace($.extend(Lw,
{
idx:uK,
selected:!uK?"checked":"",
price:(-1==Lw.suffix.indexOf("cn"))?65:5
}));
});





if(""==gj)
{
var bBG=["im","my","iam","cn","china"],
bBJ=["2010","cn","china"],
bqe=arb.indexOf(".")==-1
?arb
:arb.substr(0,arb.indexOf(".")),
cvy=arb.indexOf(".")==-1
?""
:arb.substr(arb.indexOf("."));

gj="<div>没有查询到可注册的域名,您可以尝试下列域名</div>";
$.each(bBG,function(cqk,uK)
{
var lU=cqk+bqe;
if(lU!=ut)
{
gj+=cbs.replace(
{
rp:cqk,
rd:bqe,
rs:"",
is:cvy,
domain:lU
});
}
});

$.each(bBJ,function(cxS,uK)
{
var lU=bqe+cxS;
if(lU!=ut)
{
gj+=cbs.replace(
{
rp:"",
rd:bqe,
rs:cxS,
is:cvy,
domain:lU
});
}
});
}
else
{
ccO.show();
}

aaY()&&Fb.show()
.find("#domainList")
.html(gj);
}
else if(aO.code=="1")
{
aaY()&&bIf.show();
baZ&&clearTimeout(baZ);
baZ=setTimeout(clo,3000);
}
else
{
aaY()&&bQZ.show();
}
},
onclienterror:function()
{
aaY()&&bQZ.show();
}
});
};

dU.find("input").attr("value",ut);
arb=dU.find("input").attr("value");

al.valid_(dU)
&&aaY()&&bIf.show()&&ccO.hide()&&clo();
},
domainQueryKU:function(_aoEvent)
{
_aoEvent.keyCode==13&&this.dom$().find("[ck='domainQuery']").fireEvent("click");
},

domainQueryStop:function(_aoEvent,aA,aM)
{
this.$.$(aM).hide();
baZ&&clearTimeout(baZ);
},

domainReg:function()
{
var al=this,
fmI=al.dom$().find("#domainQuery"),
Ln=al.dom$().find("#domainList input");
Ln.each(function(cp)
{
if(cp.checked)
{
al.ajax(
{
sUrl:"/cgi-bin/bizmail?sid="+ay.sid()+"&t=biz_rf_mgr&action=osslog&type=reg&domainname="+cp.value
});

al.hash(
(-1==cp.value.indexOf(".cn"))
?"domain/reg/"+cp.value
:"domain/regcn/"+cp.value
);
}
});
},
domainRefresh:function(_aoEvent,aA,aM)
{
var al=this,
ut=aA.getAttribute("domainname"),
yL=al.$.$(aM).find("img[un='loading']").show();
cdu=al.$.$(aM).find("#mx").hide();
al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()+"&t=biz_rf_mgr&action=check_mx&domainname="+ut,
onsuccess:function(gs)
{
var aO=gs.data;
if("1"==aO.right)
{
al.clearCache("domain",true).hash("domain/manage","domain");
}
else
{
yL.hide();
if(0<aO.mx.length)
{
cdu.html("错误的MX记录："+aO.mx.join(",")).show();
}
else
{
cdu.html("没有MX记录").show();
}
}
},
onclienterror:function(qY,kr)
{
yL.hide();
}
});
},
pendingAdd:function(_aoEvent,aA,aM)
{
var al=this,
ut=aA.getAttribute("domainname");
al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()
+"&t=biz_rf_mgr&action=add_pending&domainname="+ut,
onsuccess:function()
{
al.hash("domain/manage",true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"添加域名失败");
}
});
},
pendingRefresh:function(_aoEvent,aA,aM)
{
var al=this,
ut=aA.getAttribute("domainname"),
yL=al.$.$(aM).find("img[un='loading']").show();
al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()+"&t=biz_rf_mgr&action=add&domainname="+ut,
onsuccess:function()
{
al.clearCache("domain",true).hash("domain/manage","domain");
},
onclienterror:function(qY,kr)
{
yL.hide();
}
});
},
pendingDel:function(_aoEvent,aA,aM)
{
var al=this,
ut=aA.getAttribute("domainname");
confirm("确定取消该域名的验证请求？")
&&al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()
+"&t=biz_rf_mgr&action=del_pending&domainname="+ut,
onsuccess:function()
{
al.hash("domain/redirect","domain");
}
});
},
purchaseDel:function(_aoEvent,aA,aM)
{
var al=this,
ut=aA.getAttribute("domainname");
confirm("确定取消该域名的注册请求？")
&&al.ajax(
{
sUrl:"/cgi-bin/bizmail_domain?sid="+ay.sid()
+"&t=biz_rf_mgr&action=del_purchase&domainname="+ut,
onsuccess:function()
{
al.clearCache("",true).clearCache("domain",true)
.hash("domain/manage","domain");
}
});
},

pay:function(_aoEvent,aA,aM)
{
var al=this,
bc=al.dom$(),
ut=aA.getAttribute("domainname");
bc.find("#osslog").data(0).src="/cgi-bin/bizmail?sid="
+ay.sid()+"&action=osslog&type=pay&t=biz_rf_mgr&domainname="+ut;
bc.find("#purchase").data(0).contentWindow.submit();
al.$.$("<div>")
.html(dhp)
.dialog({oDom:al.mask$(),sTitle:"请在新打开的浏览器窗口中完成支付流程"})
.find("input[ck='finish']").on("click",function()
{
al.hash("domain/manage");
});
}
});
},
iframeLoad:function(ba)
{
if(ba=="purchase")
{
this.dom$().find("#pay").show();
}
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
);
$.package(
"biz/ctrl/entdisk.js",
[
"biz/lib/mbrtmpl.js",
"biz/lib/commdata.js",
"biz/ctrl/mod.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
dK=ay.lib("B.Data.member.tmpl").getTmpl(),
gX=ay.lib("B.Data.commdata");
ay.createCtrl(
"B.EntDisk",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
route:function()
{
var ds=$.sid();
return(
["entdisk",
[
["",{bCache:true,sAction:"entdisk"}]
]
]
);
},
actions:function()
{
var aNt=gX.getAuthParam();
return(
{
entdisk:function()
{
var pv=this.$.$("#tipsTop"),
eVg=this.dom$().html(
[
dK.oBreadCrumb.replace({hash:"#entdisk",subname:"企业网盘"}),

'<div style="width:100%;height:100%;">',
'<iframe name="entdiskIfr" id="entdiskIfr" onload="',
'(this.document||this.ownerDocument).getElementById(\'tipsTop\').style.display=\'none\';',
'this.height= Math.max(this.contentWindow.document.body.clientHeight,420);',
'" scrolling="no" frameborder="no" style="width:100%" ',
'src="/cgi-bin/ftnExs_files?',aNt,'&t=biz_rf_entdisk&listtype=biz">',
'</iframe>',
'</div>'
].join("")
).find("iframe");
pv.html('正在加载<span class="ico_loading_dotted"></span>').show();
}
}
);
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
});
}
);
}
);
$.package(
"biz/ctrl/toolbox.js",
[
"comm/ui/hintinput.js",
"biz/ctrl/mod.js",
"biz/lib/commdata.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
gX=ay.lib("B.Data.commdata");
ay.createCtrl(
"B.ToolBox",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
route:function()
{
var ds=$.sid();
return(
["toolbox",
[
["",{bCache:true,
sUrl:"/cgi-bin/bizmail?t=biz_rf_toolbox&sid="+ds,
sAction:"toolbox"}]
]
]
);
},
actions:function()
{
var aNt=gX.getAuthParam();
return(
{
toolbox:function()
{
this.onNavBar("toolbox");
}
}
);
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
});
}
);
}
);
$.package(
"biz/ctrl/member/addDlg.js",
[
"biz/ctrl/mod.js",
"comm/ui/menu.js",
"comm/ui/panel.js",
"comm/ui/dialog.js"
],
function(bu)
{
var ay=QMWin,
_oItem=ay.TE(
[
'$@$for($items$)$@$ ',
'<a href="javascript:;" icon="$icon$" nid="$nid$">$name$<span class="addr_del" ck="del"></span></a>',
'$@$endfor$@$'
]
),
dAF=ay.T(
[
'<div un="dlg" class="$sClass$" >',
'<div validmsg="" valid="empty" class="mainColumn">',
'<div style="overflow:hidden;margin-bottom:5px;font-size:12px;"><span>$leftLabel$</span>',
'<span class="add_dlg_r_label">$rightLabel$</span></div>',
'<div class="structSelectList bd_gray" id="structList"></div>',
'<div class="structPanel bd_gray">',
' <div  id="structContent" class="aoto_tipon"></div>',
'</div>',
'<div class="left ico_arrow_left"></div>',
'</div>',
'<div class="submitColumn">',
'<a class="btn btnNormal btnCancel right" ck="cancel">取消</a>',
'<a class="btn btnComfirm right" ck="submit" class="btnSubmit">确定</a>',
'</div>',
'</div>'
]);

ay.createCtrl(
"B.member.addDialog",
{sSuper:"Page.Mod",bStatic:true},
function(bm)
{
return(
{
bSi:function(LF,ba,bz,bqW)
{
var anM=false;
$.each(LF.data(0).childNodes,function(cE)
{
if(cE&&cE.getAttribute&&cE.getAttribute("nid")&&cE.getAttribute("nid")==ba)
{
anM=true;
}
});
if(!anM)
{
var bpF="icon_group";
bqW=="girl"&&(bpF="icon_diff icon_girl");
bqW=="boy"&&(bpF="icon_diff icon_man");
bqW=="none"&&(bpF="icon_diff icon_none");
LF.append(['<a href="javascript:;" icon="',bqW,'" nid="',ba,'"><span class="',bpF,'"></span>',bz,'<span  class="addr_del" ck="del"></span></a>'].join(""));
}
},
bLP:function(LF,ba)
{
$.each(LF.data(0).childNodes,function(cE)
{
if(cE&&cE.getAttribute&&cE.getAttribute("nid"))
{
(cE.getAttribute("nid")==ba)&&(LF.data(0).removeChild(cE));
}
});
},
show:function()
{
var al=this,
fS=al.$.$("<div>")
.html(dAF.replace({leftLabel:this.cSD,rightLabel:this.cYr,sClass:this.dpl}))
.dialog(
{
nWidth:al.oCfg.nWidth||650,
nHeight:al.oCfg.nHeight||450,
sClass:al.oCfg.sClass||"",
nTop:al.oCfg.nTop||"20%",
nLeft:al.oCfg.nLeft||"40%",
sTitle:this.lb,
oContext:al,
oRule:
{
click:
{
submit:{sContext:"dlg"},
cancel:{sContext:"dlg"},
del:{sContext:"dlg"},
select:{sContext:"dlg"}
}
},
oEvents:
{
submit:function(_aoEvent,aA,aM)
{
var qO=[];
Ow.find("a[nid]").each(function(Kd)
{
qO.push(al.$.$(Kd).attr("nid"))
});
this.dEf(qO);
fS.dialog("close");
},
cancel:function(_aoEvent,aA,aM)
{
var al=this;
fS.dialog("close");
},
del:function(_aoEvent,aA,aM)
{
var al=this,
Ow=this.$.$("#structList"),
OT=fS.find("#structContent"),
de=this.$.$(aA).parent("a"),
bK=de.attr("nid");
this.bLP(Ow,bK);
OT.find(['input[type="checkbox"]'].join("")).each(function(deb)
{
var cng=al.$.$(deb);
(cng.attr("nid")==bK)&&cng.rmAttr("checked");
});
$.each(OT.find("li[nid='"+bK+"']").find("input"),function(cp)
{
var kt=al.$.$(cp);
kt.rmAttr("disabled");
kt.rmAttr("checked");
});
},
select:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA),
OT=al.$.$("#structContent"),
Ow=al.$.$("#structList");

OT.find("li").each(function(OD)
{
var hP=al.$.$(OD);
if(hP.attr("nid")==de.attr("nid"))
{
hP.find("input").each(function(cp)
{
var kt=al.$.$(cp);
if(aA!=cp)
{
cp.disabled=aA.checked;
if(aA.checked)
{
al.bLP(Ow,kt.attr("nid"));
}
}
if(kt.attr("nid")==de.attr("nid"))
{
kt.rmAttr("disabled");
cp.checked=aA.checked;
}
});
}
});

aA.checked&&al.bSi(Ow,de.attr("nid"),de.attr("pname"),de.attr("icon"));
if(!aA.checked)
{
al.bLP(Ow,de.attr("nid"));
OT.find("li").each(function(OD)
{
var hP=al.$.$(OD);
if(hP.attr("nid")==de.attr("nid"))
{
hP.find("input").each(function(cp)
{
var kt=al.$.$(cp);
kt.rmAttr("checked");
});
}
});
}
}
}
}),
OT=fS.find("#structContent"),
Ow=al.$.$("#structList");
fS.show();
setTimeout(function()
{
al.ddB(OT,Ow);
Ow.html(_oItem.replace({items:al.qO}));
},50);
},
init_:function(aI)
{
var al=this;
al.ddB=aI.fSetLeftContent;
al.dEf=aI.fDoSubmit;
al.qO=aI.oSelected;
al.cSD=aI.sLeftLabel;
al.cYr=aI.sRightLabel;
al.lb=aI.sTitle;
al.dpl=aI.sDlgClass;
al.oCfg=aI||{}
}
});
});
});

$.package(
"biz/ctrl/viptool.js",
[
"biz/ctrl/mod.js",
"comm/ui/dialog.js",
"biz/ctrl/member/addDlg.js",
"biz/lib/commdata.js",
"biz/lib/mbrtmpl.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
gX=ay.lib("B.Data.commdata"),
dK=ay.lib("B.Data.member.tmpl").getTmpl();
ay.createCtrl(
"B.VipTool",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
rule:function()
{
return(
{
click:
{
addWhiteName:{},
delWhiteName:{},
addLimitMbr:{},
delLimitMbr:{},
removeIPLimit:{},
delIP:{},
addIP:{},
addIPRange:{}
}
});
},
route:function()
{
var ds=$.sid();
return(
["viptool",
[
["businesscard",
{
sUrl:"/cgi-bin/bizmail?sid="+ds
+"&t=biz_rf_businesscard"
}],
["limitIP/setting",
{
sUrl:"/cgi-bin/bizmail_setting?sid="+ds
+"&t=biz_rf_limitIP&tt=setting&action=get_loginlimit",
sAction:"initLimitIpSetting"
}],
["limitIP",
{
sUrl:"/cgi-bin/bizmail_setting?sid="+ds
+"&t=biz_rf_limitIP&action=get_loginlimit",
sAction:"initLimitIp"
}],
["limitmail",
{
sUrl:"/cgi-bin/bizmail_setting?sid="+ds
+"&t=biz_rf_limitmail&action=get_sendlimit",
sAction:"initLimitMail"
}],
["",
{
sUrl:"/cgi-bin/bizmail?sid="+ds
+"&t=biz_rf_viptool"
}]
]
]
);
},
actions:function()
{
return(
{
initLimitIp:function()
{
var al=this,
$=this.$;
$.$("#white_name span[party]").each(function(_aoDom)
{
var bK=$.$(_aoDom).attr("party");
$.$(_aoDom).html(gX.getPartyShortName(bK));
});
$.$("#white_name span[alias]").each(function(_aoDom)
{
var hi=$.$(_aoDom).attr("alias");
$.$(_aoDom).html(gX.getUserName(hi)+" &lt;"+hi+"&gt;");
});
},
initLimitMail:function()
{
var al=this,
$=this.$;
$.$("#limit_mbr span[party]").each(function(_aoDom)
{
var bK=$.$(_aoDom).attr("party");
$.$(_aoDom).html(gX.getPartyShortName(bK));
});
$.$("#limit_mbr span[alias]").each(function(_aoDom)
{
var hi=$.$(_aoDom).attr("alias");
$.$(_aoDom).html(gX.getUserName(hi)+" &lt;"+hi+"&gt;");
});

al.ajaxForm(
{
onsuccess:function(oe)
{
al.hash("viptool/limitmail","viptool");
al.showMsg("设置成员外发限制成功");
},
onclienterror:function(XN,KD,aE)
{
al.showErr(KD||"设置失败");
}
}
);
},
initLimitIpSetting:function()
{
var al=this,
$=this.$;
al.ajaxForm(
{
onbeforesubmit:function()
{
var hF=$.$("#ip_box input").size();
if(hF==0)
{
al.showErr("你还没添加限制的ip或者ip段");
return false;
}
else
{
return true;
}
},
onsuccess:function(oe)
{
al.hash("viptool/limitIP","viptool");
al.showMsg("设置IP登录权限成功");
},
onclienterror:function(XN,KD,aE)
{
al.showErr(KD||"设置失败");
}
}
);
$.$("#white_name span[party]").each(function(_aoDom)
{
var bK=$.$(_aoDom).attr("party")
$.$(_aoDom).html(gX.getPartyShortName(bK));
});
$.$("#white_name span[alias]").each(function(_aoDom)
{
var hi=$.$(_aoDom).attr("alias")
$.$(_aoDom).html(gX.getUserName(hi)+" &lt;"+hi+"&gt;");
});
}
}
);
},
events:function()
{
return(
{
addWhiteName:function()
{
var al=this,
$=this.$;
var qO=[],SC={};
al.dom$().find("#white_name input").each(function(cE){
var rb=$.$(cE),
Mm=rb.attr("icon"),
JR=rb.attr("value");
bM=rb.attr("alias")||gX.getMemberName(JR);
qO.push({nid:JR,name:bM,icon:Mm});
SC[JR]=bM;
});
$.ctrl("B.member.addDialog",
{
oSelected:qO,
sDlgClass:"opp_addpower",
nLeft:"48%",
nWidth:510,
nHeight:386,
sLeftLabel:"从下面选择要添加的部门/人：",
sRightLabel:"不受IP登录限制的部门/人：",
sTitle:"添加白名单",
fSetLeftContent:function(pK,bJL)
{
pK.html(dK.oStructMbrTab).find("div[un='tree']").asyntree(
{
oData:gX.getPartyTree(),
bClosed:false,
ondata:function(hS)
{
var bK=hS.id,
hi=hS.alias||"",
cj=hS.type||"",
BE=gX.getPartyShortName(bK);

return[
'<ins class="',(cj=="")?"folder":"member",'">',

'<input id="ckStruct_',bK,'" nid="',bK,'" alias="',hi,'" pname="',$.htmlEncode(BE),'"',
SC[bK]?' checked=true':'',' icon="party" ck="select" type="checkbox"/>',
'<label for="ckStruct_',bK,'">',hS.name,'</label></ins>'
].join("");
}
});
pK.find("li").each(function(OD)
{
var aGP=$.$(OD.firstChild);
aGP.find("input").data(0).checked&&$.$(OD.firstChild.nextSibling).find("input").each(function(cp)
{
$.$(cp).attr("disabled","true");
});

});
pK.find("a[un='tree']").on("click",function(){
pK.find("div[un='tree']").show();
pK.find("div[un='member']").hide();
pK.find("a[un='tree']").addClass("on");
pK.find("a[un='member']").rmClass("on");
});
pK.find("a[un='member']").on("click",function(){
pK.find("div[un='tree']").hide();
pK.find("div[un='member']").show();
pK.find("a[un='tree']").rmClass("on");
pK.find("a[un='member']").addClass("on");
});
var bau=pK.find("div[un='member']");
bau.find("input[type='text']").hint({sHintClass:"t_search"}).on("keyup",function()
{
var rJ=$.$(this).attr("value");
var sF=gX.findUsers(rJ);
bJL.find("a[nid]").each(function(Kd)
{
for(var i=sF.length-1;i>=0;i--)
{
sF[i].alias==al.$.$(Kd).attr("nid")&&(sF[i].checked=true);
}
});
bau.find("div[un='result']").html(dK.oMbrSearchLi.replace({users:sF}));
});
},
fDoSubmit:function(afj)
{
var al=this,cB=[];
$.each(afj,function(ba){
var bcF=ba.indexOf("@")==-1,
hi,bM;
hi=bcF?gX.getPartyShortName(ba)
:(gX.getUserName(ba)+" &lt;"+ba+"&gt;");
bM=bcF?"partyid":"alias";
cB.push(
{
alias:hi,
name:bM,
value:ba
});
});
$.$("#white_name").show().find("ul")
.html(dK.oWhiteNameLi.replace({items:cB}));
}
}).show();
},
addLimitMbr:function()
{
var al=this,
$=this.$;
var qO=[],SC={};
al.dom$().find("#limit_mbr input").each(function(cE){
var rb=$.$(cE),
Mm=rb.attr("icon"),
JR=rb.attr("value");
bM=rb.attr("alias")||gX.getMemberName(JR);
qO.push({nid:JR,name:bM,icon:Mm});
SC[JR]=bM;
});
$.ctrl("B.member.addDialog",
{
oSelected:qO,
sDlgClass:"opp_addpower",
nLeft:"48%",
nWidth:510,
nHeight:386,
sLeftLabel:"从下面选择要添加的部门/人：",
sRightLabel:"不能外发邮件的部门/人：",
sTitle:"限制成员外发",
fSetLeftContent:function(pK,bJL)
{
pK.html(dK.oStructMbrTab).find("div[un='tree']").asyntree(
{
oData:gX.getPartyTree(),
bClosed:false,
ondata:function(hS)
{
var bK=hS.id,
hi=hS.alias||"",
cj=hS.type||"",
BE=gX.getPartyShortName(bK);

return[
'<ins class="',(cj=="")?"folder":"member",'">',

'<input id="ckStruct_',bK,'" nid="',bK,'" alias="',hi,'" pname="',$.htmlEncode(BE),'"',
SC[bK]?' checked=true':'',' icon="party" ck="select" type="checkbox"/>',
'<label for="ckStruct_',bK,'">',hS.name,'</label></ins>'
].join("");
}
});
pK.find("li").each(function(OD)
{
var aGP=$.$(OD.firstChild);
aGP.find("input").data(0).checked&&$.$(OD.firstChild.nextSibling).find("input").each(function(cp)
{
$.$(cp).attr("disabled","true");
});

});
pK.find("a[un='tree']").on("click",function(){
pK.find("div[un='tree']").show();
pK.find("div[un='member']").hide();
pK.find("a[un='tree']").addClass("on");
pK.find("a[un='member']").rmClass("on");
});
pK.find("a[un='member']").on("click",function(){
pK.find("div[un='tree']").hide();
pK.find("div[un='member']").show();
pK.find("a[un='tree']").rmClass("on");
pK.find("a[un='member']").addClass("on");
});
var bau=pK.find("div[un='member']");
bau.find("input[type='text']").hint({sHintClass:"t_search"}).on("keyup",function()
{
var rJ=$.$(this).attr("value");
var sF=gX.findUsers(rJ);
bJL.find("a[nid]").each(function(Kd)
{
for(var i=sF.length-1;i>=0;i--)
{
sF[i].alias==al.$.$(Kd).attr("nid")&&(sF[i].checked=true);
}
});
bau.find("div[un='result']").html(dK.oMbrSearchLi.replace({users:sF}));
});
},
fDoSubmit:function(afj)
{
var cB=[],jp=[];
$.each(afj,function(ba){
var bcF=ba.indexOf("@")==-1,
hi,bM;
hi=bcF?gX.getPartyShortName(ba)
:(gX.getUserName(ba)+" &lt;"+ba+"&gt;");
bM=bcF?"partyid":"alias";
cB.push(
{
alias:hi,
name:bM,
value:ba
});
jp.push("&"+bM+"="+ba);
});
al.ajax(
{
sUrl:"/cgi-bin/bizmail_setting?action=set_sendlimit&t=biz_rf_mgr&sid="+$.sid()
+jp.join(""),
onsuccess:function(oe)
{
al.showMsg("设置成功");
afj.length&&$.$("#limit_mbr").show()
.find("ul").html(dK.oLimitMbrLi.replace({items:cB}));
},
onclienterror:function(XN,KD,aE)
{
al.showErr(KD||"系统错误，请稍候重试。");
}
});
}
}).show();
},
delLimitMbr:function(_aoEvent,aA,aM)
{
var al=this,
$=this.$,
hP=$.$(aA).parents("li"),
bZ=hP.find("input").attr("value"),
bM=hP.find("input").attr("name"),
wA=$.$(aA).parents("ul");
al.ajax(
{
sUrl:"/cgi-bin/bizmail_setting?t=biz_rf_mgr&action=del_sendlimit&"
+bM+"="+bZ
+"&sid="+$.sid(),
onsuccess:function(oe)
{
hP.remove();
wA.find("li").size()==0&&
wA.html("<li class='nodata'>还没有添加任何数据。</li>");
al.showMsg("删除成功");
},
onclienterror:function(XN,KD,aE)
{
al.showErr(KD||"系统错误，请稍候重试。");
}
});
},
delWhiteName:function(_aoEvent,aA,aM)
{
var al=this,
$=this.$,
wA=$.$(aA).parents("ul");
$.$(aA).parents("li").remove();
wA.find("li").size()==0&&
wA.html("<li class='nodata'>还没有添加任何数据。</li>");
},
removeIPLimit:function(_aoEvent,aA,aM)
{
var al=this,
$=this.$;
if(confirm("确定删除此IP条件限制吗？白名单也会随着IP条件删除而失效。"))
{
al.ajax(
{
sUrl:"/cgi-bin/bizmail_setting?t=biz_rf_mgr&action=del_loginlimit&ef=js&sid="+$.sid(),
onsuccess:function(oe)
{
al.hash("viptool/limitIP","viptool");
},
onclienterror:function(XN,KD,aE)
{
al.showErr(KD||"系统错误，请稍候重试。");
}
});
}

},
delIP:function(_aoEvent,aA,aM)
{
var al=this,
$=this.$,
chw=$.$(aA).parents("p"),
GX=chw.parents("div.s_con");
chw.remove();
GX.find("p").size()==0&&
GX.html("<p empty='true'>&nbsp;</p>");
},
addIP:function()
{
var al=this,
$=this.$,
bOj=$.$("div[defaultIp]").attr("defaultIp");
var fS=$.$("<div>")
.html(dK.oLimitIPDlg.replace({}))
.dialog(
{
nTop:"auto",
sTitle:"添加限定IP",
oRule:
{
click:
{
cancel:{sContext:"dlg"},
submit:{sContext:"dlg"}
}
},
oEvents:
{
cancel:function(_aoEvent,aA,aM)
{
fS.dialog("close");
},
submit:function(_aoEvent,aA,aM)
{
if($.lib("B.Valid").valid(fS))
{
var ceP=fS.find("input[name='ip1']").attr("value"),
beI=al.dom$().find("#ip_con");
beI.find("p[empty]").remove();
beI.append(dK.oLimitIP.replace({ip1:ceP}));

fS.dialog("close");
}
}
}
},"instance");
fS.show();
fS.find("input[name='ip1']").focus();
fS.find("input").attr("value",bOj)
.on("focus",function(_aoEvent)
{
fS.find("input").css("border","1px solid #BFBFBF");
fS.find("[un='validMsg']").html("");
});
},
addIPRange:function()
{
var al=this,
$=this.$,
bOj=$.$("div[defaultIp]").attr("defaultIp");
var fS=$.$("<div>")
.html(dK.oLimitIPRangeDlg.replace({}))
.dialog(
{
nTop:"auto",
sTitle:"添加限定IP段",
oRule:
{
click:
{
cancel:{sContext:"dlg"},
submit:{sContext:"dlg"}
}
},
oEvents:
{
cancel:function(_aoEvent,aA,aM)
{
fS.dialog("close");
},
submit:function(_aoEvent,aA,aM)
{
var bQV=true;
fS.find("[un='con']").each(function(_aoDom)
{
var bc=$.$(_aoDom);
!$.lib("B.Valid").valid(bc)&&bc.find("input").css("border-color","red")
&&(bQV=false);
});
if(bQV)
{
var bLs=fS.find("input[name='ip1']").attr("value"),
bLt=fS.find("input[name='ip2']").attr("value"),
dtj=bLs.split("."),
dtk=bLt.split("."),
cfv=(bLs===bLt);
for(var i=0;i<4;i++)
{
if(Number(dtj[i])<Number(dtk[i]))
{
cfv=true;
break;
}
}
if(cfv)
{
var ceP=fS.find("input[name='ip1']").attr("value"),
beI=al.dom$().find("#ip_con_r");
beI.find("p[empty]").remove();
beI.append(dK.oLimitIPRange.replace({ip1:bLs,ip2:bLt}));

fS.dialog("close");
}
else
{
fS.find("[un='validMsg']").html('<span un="validErr"><img align="absmiddle" class="icon_error_m" src="/zh_CN/htmledition/images/spacer.gif"><span class="txt_red f_size">&nbsp;IP段范围不正确</span></span>');
}
}
else
{
fS.find("[un='validMsg']").html('<span un="validErr"><img align="absmiddle" class="icon_error_m" src="/zh_CN/htmledition/images/spacer.gif"><span class="txt_red f_size">&nbsp;请输入正确的IP</span></span>');
}
}
}
},"instance");
fS.show();
fS.find("input[name='ip1']").focus();
fS.find("input").attr("value",bOj)
.on("focus",function(_aoEvent)
{
fS.find("input").css("border","1px solid #BFBFBF");
fS.find("[un='validMsg']").html("");
});
}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
);
$.package(
"biz/ctrl/spam.js",
[
"biz/ctrl/mod.js",
"biz/lib/commdata.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
gX=ay.lib("B.Data.commdata"),

aBu={blacklist:"黑名单",blackdomain:"域黑名单",whitelist:"白名单",whitedomain:"域名白名单"},
dqy={blacklist:"白名单",blackdomain:"白名单",whitelist:"黑名单",whitedomain:"黑名单"},
cen={blacklist:"blacklist",blackdomain:"blacklist",whitelist:"whitelist",whitedomain:"addwhitedomain"},
aZQ={blacklist:"delblacklist",blackdomain:"delblackaddr&domain=1",whitelist:"delwhiteaddr",whitedomain:"delwhiteaddr&domain=1"},
cdA={blacklist:"group=",blackdomain:"group=*%40",whitelist:"group=",whitedomain:"user="};

function cTW(dM)
{
var Vw=/^[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
return Vw.test(dM);
};

function cat(aS,VU)
{
return cTW(VU)
?("whitelist"==aS)?"whitedomain":"blackdomain"
:aS;
};

ay.createCtrl(
"B.Spam",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
rule:function()
{
return(
{
click:
{
add:{sContext:"item"},
del:{sContext:"item"},
delAll:{sContext:"item"}
},
keyup:
{
addKU:{}
}
});
},
route:function()
{
var ds=$.sid(),
aNt=gX.getAuthParam();
return(
["spam",
[

["blacklist",{bCache:false,
sUrl:"/cgi-bin/config_blackwhitelist?"+aNt
+"&Fun=blacklist&t=biz_rf_spam&tt=blacklist"}
],

["whitelist",{bCache:true,
sUrl:"/cgi-bin/config_blackwhitelist?"+aNt
+"&Fun=whitelist&t=biz_rf_spam&tt=whitelist"}
]
]
]
);
},
events:function()
{
return(
{
add:function(_aoEvent,aA,aM)
{

var al=this,
$=al.$,
dU=al.$.$(aM);
if(al.valid_(dU))
{
var bZ=$.trim(dU.find("input").attr("value")),
aAQ=dU.attr("type"),
cj=cat(aAQ,bZ);
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/config_blackwhitelist",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&Fun=submit&act="+cen[cj]
+"&"+cdA[cj]+bZ,

onerrorhandle:function(aE){
if(aE.retcode=="0")
{

al.showMsg("添加"+aBu[cj]+"成功").hash("spam/"+aAQ,true);
}
else if(aE.retcode=="-123")
{
al.showMsg("该地址或域名已经存在");
}
else if(aE.retcode=="-111"){

if(confirm(dqy[cj]+"中有该地址或者域名的记录，是否需要清除？"))
{
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/config_blackwhitelist",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&Fun=submit&confirm=1&act="
+cen[cj]+"&"+cdA[cj]+bZ,
onsuccess:function()
{
al.showMsg("添加"+aBu[cj]
+"成功").hash("spam/"+aAQ,true);
}
});
}
}
else{
al.showMsg("操作不成功，请重试").hash("spam/"+aAQ,true);
}
},

onsuccess:function()
{
al.showMsg("添加"+aBu[cj]+"成功").hash("spam/"+aAQ,true);
}
});
}
},
addKU:function(_aoEvent)
{
_aoEvent.keyCode==13&&this.dom$().find("[ck='add']").fireEvent("click");
},
del:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
ma=al.$.$(aA).attr("data"),
aAQ=dU.attr("type"),
cj=cat(aAQ,ma);
if(confirm("您确定要删除此"+aBu[cj]+"？"))
{
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/config_blackwhitelist",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&Fun=submit&act="
+aZQ[cj]+"&user="+ma,
onsuccess:function()
{
al.showMsg("删除"+aBu[cj]+"成功").hash("spam/"+aAQ,true);
}
});
}
},
delAll:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
cj=dU.attr("type");
if(confirm("您确定要删除全部"+aBu[cj]+"？"))
{
if("whitelist"==cj)
{
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/config_blackwhitelist",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&Fun=submit&da=1&act="+aZQ["whitelist"],
onsuccess:function()
{
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/config_blackwhitelist",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&Fun=submit&da=1&act="+aZQ["whitedomain"],
onsuccess:function()
{
al.showMsg("删除"+aBu[cj]+"成功").hash("spam/"+cj,true);
}
});
}
});
}
else
{
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/config_blackwhitelist",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&Fun=submit&da=1&act="+aZQ["blacklist"],
onsuccess:function()
{
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/config_blackwhitelist",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&Fun=submit&da=1&act="+aZQ["blackdomain"],
onsuccess:function()
{
al.showMsg("删除"+aBu[cj]+"成功").hash("spam/"+cj,true);
}
});
}
});
}
}

}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
);
$.package(
"biz/ctrl/admin.js",
[
"biz/ctrl/member/exautocomplete.js",
"comm/ui/panel.js",
"comm/ui/menu.js",
"biz/ctrl/mod.js",
"biz/lib/commdata.js",
"biz/lib/structselector.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
gX=ay.lib("B.Data.commdata");
ay.createCtrl(
"B.Admin",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
pageLibs:function()
{
return[{name:"B.ExMod.StructSelector"}];
},
eventLibs:function()
{
return[{name:"B.ExMod.StructSelector"}];
},
rule:function()
{
return(
{
click:
{
privilegeDel:{}
}
});
},
route:function()
{
var ds=$.sid();
return(
["admin",
[


["privilegeAdd",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_admin?sid="+ds
+"&t=biz_rf_admin&tt=privilegeAdd",
oPages:["structSelect"],
sAction:"privilegeAdd"
}],

["privilegeEdit/{alias}",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_admin?sid="+ds
+"&t=biz_rf_admin&tt=privilegeEdit&action=show_privilege&alias={alias}",
oPages:["structSelect"],
sAction:"privilegeEdit"
}],

["privilege",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_admin?sid="+ds
+"&t=biz_rf_admin&tt=privilege&action=list_privilege",
sAction:"privilege"
}],
["passwd",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_admin?sid="+ds
+"&t=biz_rf_company&tt=resetPassword",
sAction:"changePasswd"
}]
]
]
);
},
actions:function()
{
return(
{
changePasswd:function()
{
var al=this;
al.ajaxForm({
onsuccess:function()
{
al.showMsg("修改密码成功");
},
onclienterror:function(cCG,vR)
{
al.showErr(vR||"修改密码失败");
}
});
},
privilege:function()
{
var al=this;
al.dom$().find("td[structList]").each(function(aHW)
{
var afx=al.$.$(aHW),
ajg=[];
ay.each(afx.attr("structList").split(","),function(aEZ)
{
aEZ!=""&&ajg.push(gX.getPartyShortName(aEZ));
});
afx.html(ajg.join(","));
});
},
privilegeAdd:function()
{
var al=this;

al.$.$("#alias").exautocomplete(
{
vMaxHeight:170,
vData:function(gy)
{
var sF=gX.findUsers(gy),aO=[];
for(var i=0;i<sF.length;i++)
{
var fA=sF[i];
aO.push(
{
sHtml:['<a class="line" title="',fA.alias,'">"',fA.name,'" &lt;',fA.alias,'&gt;</a>'].join(""),
oUser:fA
});
}
return aO;
},
onselect:function(aE)
{
if(aE&&aE.oUser)
{
al.$.$("#alias").attr("value",aE.oUser.alias);
}
}
});
al.ajaxForm(
{
onsuccess:function()
{
al.showMsg("添加分级管理员成功").hash("admin/privilege",true);
al.hash("admin/privilege",true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||("添加分级管理员失败"));
}
});
},
privilegeEdit:function()
{
var al=this;
al.ajaxForm(
{
onsuccess:function()
{
al.showMsg("编辑分级管理员成功").hash("admin/privilege",true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||("编辑分级管理员失败"));
}
});
}
}
);
},
events:function()
{
return(
{
privilegeDel:function(_aoEvent,aA,aM)
{
if(confirm('确定要删除该管理员帐号吗？'))
{
var al=this,
hi=al.$.$(aA).attr("alias");
al.ajax(
{
sUrl:"/cgi-bin/bizmail_admin?sid="+ay.sid()
+"&t=biz_rf_mgr&tt=privilege&action=del_privilege&alias="+hi,
onsuccess:function()
{
al.showMsg("删除管理员成功").hash("admin/privilege",true);
}
});
}
}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
);
$.package(
"biz/ctrl/compose/compose.js",
[
"comm/ui/tree.js",
"biz/lib/mbrtmpl.js",
"biz/lib/commdata.js",
"biz/ctrl/mod.js",
"biz/lib/auth.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
dK=ay.lib("B.Data.member.tmpl").getTmpl(),
bso=ay.lib("B.Data.Auth"),
hj=0;

function getQuery()
{
return bso.isOwner()?"":"&owneruin="+bso.getOwnerUin();
};

ay.createCtrl(
"B.Compose",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"}];
},
rule:function()
{
return(
{
click:
{
viewMail:{sContext:"viewmail"},
delMail:{sContext:"delmail"}
}
});
},
route:function()
{
var ds=$.sid();
return(
["compose",
[

["mail/compose[,{mailid},{page}]",
{
sAction:"compose"
}],
["mail/sent",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_msg?sid="+ds+"&t=biz_rf_compose&tt=sent"
}],
["mail/list[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_msg?sid="+ds+"&action=list_mail&t=biz_rf_compose&tt=list&page={page}",
sAction:"page"
}],
["mail/{mailid},{page}",
{
bCache:true,
sUrl:"/cgi-bin/readmail?sid="+ds+"&folderid=3&pn=off&mailid={mailid}&t=biz_rf_compose&tt=view&page={page}"
+getQuery()
}]

]
]
);
},
actions:function()
{
var ds=$.sid();
return(
{
compose:function(bX,zU)
{
var asR=bX
?"/cgi-bin/readmail?sid="+ds+"&t=biz_rf_compose_send&folderid=4&pn=off&s=draft&mailid="+bX+"&page="+zU+getQuery()
:"/cgi-bin/bizmail_msg?sid="+ds+"&t=biz_rf_compose_send";

this.$.$("#tipsTop").html('正在加载<span class="ico_loading_dotted"></span>').show();
this.dom$().html(
[
dK.oBreadCrumb.replace({hash:"#compose/mail/list",subname:"内部公告"}),
'<div style="overflow:hidden; _zoom:1;">',
'<iframe onload="window.parent.document.getElementById(\'tipsTop\').style.display=\'none\'" id="composeIframe" name="composeIframe" scrolling="no" frameborder="no" style="width:100%;float:left;height:532px"',
'src="',asR,'"',
'</iframe>',
'</div>'
].join("")
);
},
page:function(zU)
{
hj=zU||0
}
}
);
},
events:function()
{
return(
{
viewMail:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
oY=dU.attr("hash");

al.hash(oY,true);
return false;
},
delMail:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
dB=dU.attr("mailid"),
crY=dU.attr("dirid"),
hB=("3"==crY)
?"您确定撤回此公告吗？\n(如果对方已通过客户端软件收取到本地，则无法撤回)"
:"您确定删除此公告吗？"

if(confirm(hB))
{
al.ajax(
{
sUrl:"/cgi-bin/bizmail_msg?sid="+ay.sid()
+"&t=biz_rf_mgr&action=del_mail&mailid="+dB,
onsuccess:function()
{
al.showMsg(("3"==crY?"撤回":"删除")+"公告成功").hash("compose/mail/list,"+hj,true);
}
});
al.$.stopPropagation(_aoEvent);
}
return false;
}
});
},
postSuccess:function(gs)
{
if("send_mail"==gs.action)
{
this.clearCache("compose/mail/list").hash("compose/mail/sent");
}
else if("save_mail"==gs.action)
{
debug([gs.data.attachlist,gs.data.mailid]);
this.duq(gs.data.attachlist,gs.data.mailid);
}
},
duq:function(eAp,bX)
{
debug("begin");
var al=this,
bj=al.dEL();
debug(bj.location.href);

debug("mailid");
bj.S("mailid").value=bX;
debug("btn");
bj.S("sendbtn").disabled=false;
bj.S("savebtn").disabled=false;

debug("load_process");
bj.S("load_process").style.display="none";

al.showMsg("保存成功");


al.clearCache("compose/mail");
debug("end");






























































},
dEL:function()
{
var bj=null;
this.$.$("iframe").each(function(cE){
("composeIframe"==cE.id)&&(bj=cE.contentWindow);
});
return bj;
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
});
}
);
}
);
$.package(
"biz/ctrl/mailboxTrans.js",
[
"biz/ctrl/mod.js",
"biz/lib/mbrtmpl.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
dK=ay.lib("B.Data.member.tmpl").getTmpl();
ay.createCtrl(
"B.mailboxTrans",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
rule:function()
{
return(
{
click:
{
showOperator:{},
doSaveFirstStep:{},
doSaveSecondSetp:{},
doSaveThirdSetp:{},
changePort:{}
}
});
},
route:function()
{
var ds=$.sid();
return(
["mailboxTrans",
[
["firststep/[{domain}]",
{
sUrl:"/cgi-bin/bizmail_trans?sid="+ds
+"&step=show_domain&t=biz_rf_transfer&domain={domain}",
sAction:"onNavBar"
}],
["secondstep/[{domain}]",
{
sUrl:"/cgi-bin/bizmail_trans?sid="+ds
+"&step=select_domain&t=biz_rf_transfer&tt=chooseVNO&domain={domain}",
sAction:"bindSelect"
}],
["thirdstep/[{mailbox}[,{mailtype},{mailaddr},{mailport},{mailssl}]]",
{
sUrl:"/cgi-bin/bizmail_trans?sid="+ds
+"&step=select_mailbox&t=biz_rf_transfer&tt=transferImport&mailbox={mailbox}&mailtype={mailtype}&mailaddr={mailaddr}&mailport={mailport}&mailssl={mailssl}",
sAction:"onNavBar"
}],
["fourstep/[{newuser_time},{if_olduser}]",
{
sUrl:"/cgi-bin/bizmail_trans?sid="+ds
+"&step=set_useropt&t=biz_rf_transfer&tt=transferVerify&newuser_time={newuser_time}&if_olduser={if_olduser}",
sAction:"onNavBar"
}],
["fifthstep",
{
sUrl:"/cgi-bin/bizmail_trans?sid="+ds
+"&step=start_trans&t=biz_rf_transfer&tt=transferResult",
sAction:"onNavBar"
}],
["showresult[/{domain},{page}]",
{
sUrl:"/cgi-bin/bizmail_trans?sid="+ds
+"&step=show_result&t=biz_rf_transfer&domain={domain}&page={page}",
sAction:"onNavBar"
}]
]
]
);
},
actions:function()
{
return(
{
onNavBar:function()
{
this.onNavBar("toolbox");
},
bindSelect:function()
{
this.onNavBar("toolbox");
var port={
normal:{
1:"143",
0:"110"
},
ssl:{
1:"993",
0:"995"
}},
al=this,
adb=al.$.$("#mailtype").data(0),
bKK=al.$.$("#mailport").data(0),
crw=al.$.$("#mailssl").data(0);
adb.onchange=function()
{
debug(crw.checked);
debug(adb.options[adb.selectedIndex].value)
bKK.value=port[crw.checked?"ssl":"normal"][adb.options[adb.selectedIndex].value];
}
}
}
);
},
events:function()
{
return(
{
showOperator:function(_aoEvent,aA,aM)
{
var al=this,fu=al.$.$("#otherOperatorDetail"),bZ=aA.value;
bZ=="other"?fu.show():fu.hide();
},
changePort:function(_aoEvent,aA,aM)
{
var al=this,
port={
normal:{
1:"143",
0:"110"
},
ssl:{
1:"993",
0:"995"
}},
adb=al.$.$("#mailtype").data(0),
bKK=al.$.$("#mailport").data(0),
aNv=adb.options[adb.selectedIndex].value;
bKK.value=port[al.$.$("#mailssl").data(0).checked?"ssl":"normal"][aNv];
},
doSaveFirstStep:function(_aoEvent,aA,aM)
{
var al=this,lU="";
$.each(al.$.$("input[type='radio']"),function(_aoDom)
{
_aoDom.checked&&(lU=_aoDom.value);
})
al.hash("#mailboxTrans/secondstep/"+encodeURIComponent(lU),true);
},
doSaveSecondSetp:function(_aoEvent,aA,aM)
{
var al=this,cki=false,ajW="",adb,aNv="",UD="",bcR="",bnp="";
$.each(al.$.$("input[type='radio']"),function(_aoDom)
{
_aoDom.checked&&(ajW=_aoDom.value);
})
if(ajW=="other")
{
adb=al.$.$("#mailtype").data(0),
aNv=adb.options[adb.selectedIndex].value,
UD=al.$.$("#mailaddr").data(0).value,
bcR=al.$.$("#mailport").data(0).value,
bnp=al.$.$("#mailssl").data(0).checked;
if($.trim(UD)==""||$.trim(bcR)=="")
{
al.showErr("请正确填写收件服务器地址和端口");
cki=true;
}


}
if((ajW=="other")||(ajW=="1")||(ajW=="2")||(ajW=="5"))
{
if(!cki)
{
al.ajax(
{
sUrl:["/cgi-bin/bizmail_trans?sid=",$.sid()
,"&t=biz_rf_mgr&ef=js&step=check_mailbox&mailbox=",ajW,"&mailtype=",aNv,"&mailaddr=",UD,"&mailport=",bcR,"&mailssl=",bnp].join(""),
onerror:function()
{
al.showErr("验证旧的服务器地址超时");
},
onclienterror:function()
{
al.showErr("验证旧的服务器地址超时");
},
onsuccess:function(aE)
{
if(aE.data.msg=="error")
{
if(ajW=="other")
{
al.showErr("您填写的服务器地址不存在");
}
else
{
al.showErr("您旧的服务器地址设置有误");
}
}
else
{
al.hash("#mailboxTrans/thirdstep/"+ajW+","+aNv+","+UD+","+bcR+","+bnp,true);
}
}
});
}
}
else
{
al.hash("#mailboxTrans/thirdstep/"+ajW+","+aNv+","+UD+","+bcR+","+bnp,true);
}
},
doSaveThirdSetp:function(_aoEvent,aA,aM)
{
var al=this,
dhV=al.$.$("#newuser_time").data(0),
ctt=dhV.checked,
cvL=al.$.$("#if_olduser").data(0).checked;
if(!ctt&&!cvL)
{
alert("请至少选择一类型的用户")
}
else
{
al.hash("#mailboxTrans/fourstep/"+ctt+","+cvL,false);
}
}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
);
$.package(
"biz/ctrl/loginpage.js",
[
"biz/ctrl/mod.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
acp="vertical";
ay.createCtrl(
"B.Loginpage",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
rule:function()
{
return(
{
click:
{
formstyle:{},
getCode:{},
copyToClipboard:{sContext:"copyToClipboard"}
}
});
},
route:function()
{
var ds=$.sid();
return(
["loginpage",
[
["code/{align}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?t=biz_rf_outerLogin&tt=code&align={align}&sid="+$.sid()
}],
["",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?t=biz_rf_outerLogin&sid="+ds
}]
]
]
);
},
events:function()
{
return(
{
formstyle:function(_aoEvent,aA,aM)
{
acp=this.$.$(aA).attr("formstyle");
this.dom$().find("#demoFrame")
.attr("src",["/cgi-bin/bizmail?sid=",$.sid(),"&t=biz_rf_outerLogin&tt=demo&align=",acp].join(""));
},
getCode:function(_aoEvent,aA,aM)
{
this.hash("loginpage/code/"+acp);
},
copyToClipboard:function(_aoEvent,aA,aM)
{
var $=this.$;
$.copyToClipboard($.$(aM).find("textarea").data(0).value);
}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
);
$.package(
"biz/ctrl/syslog.js",
[
"biz/ctrl/mod.js",
"biz/lib/commdata.js",
"biz/ctrl/member/exautocomplete.js",
"biz/lib/datepicker.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
gX=ay.lib("B.Data.commdata"),
aCa=ay.lib("B.Utils");

function aDW(nl)
{
return[nl[0],"年",nl[1],"月",nl[2],"日"].join("");
}
ay.createCtrl(
"B.Syslog",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
eventLibs:function()
{
return[{name:"B.Event.DatePicker"}];
},
rule:function()
{
return(
{
click:
{
domainQuery:{sContext:"domainQuery"},
userQuery:{sContext:"userQuery"},
mailQuery:{sContext:"mailQuery"},
mailQuery:{sContext:"mailQuery"},
loginQuery:{sContext:"loginQuery"}
},
keyup:
{
goQuery:{}
}
});
},
route:function()
{
var ds=$.sid();
return(
["syslog",
[

["date/{begin},{end},{domainname}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=date&action=query_domainstatus"
+"&begin={begin}&end={end}&domainname={domainname}",
sAction:"date"
}],
["date",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?sid="+ds+"&t=biz_rf_syslog&tt=date",
sAction:"date"
}],
["user",{bCache:true,sUrl:"/cgi-bin/bizmail?sid="+ds+"&t=biz_rf_syslog&tt=user"}],

["mail/{mailtype},{alias},{subject},{begin},{end}[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=mail&action=query_mail&mailtype={mailtype}"
+"&alias={alias}"
+"&subject={subject}"
+"&begin={begin}&end={end}&page={page}",
sAction:"dateMail"
}],
["mail",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds+"&t=biz_rf_syslog&tt=mail",
sAction:"dateMail"
}],

["login/{alias},{begin},{end}[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=login&action=query_login"
+"&alias={alias}"
+"&begin={begin}&end={end}&page={page}",
sAction:"dateLogin"
}],
["login",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds+"&t=biz_rf_syslog&tt=login",
sAction:"dateLogin"
}],

["operlog/{sort},{order}[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=operlog&action=list_operlog"
+"&sort={sort}&order={order}&page={page}"
}],
["operlog",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=operlog&action=list_operlog&sort=time&order=desc"
}],

["batchjob/importreport/{fileId},{sort},{order}[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_account?sid="+ds
+"&t=biz_rf_syslog&tt=importreport&action=import_partyuser&step=report&fileid={fileId}"
+"&sort={sort}&order={order}&page={page}"
}],
["batchjob/copyuserreport/{fileId},{sort},{order}[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=copyuserreport&action=copyuserreport&fileid={fileId}"
+"&sort={sort}&order={order}&page={page}"
}],
["batchjob/applinkreport/{fileId},{sort},{order}[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_account?sid="+ds
+"&t=biz_rf_syslog&tt=applinkreport&action=import_synrtx&step=report&fileid={fileId}"
+"&sort={sort}&order={order}&page={page}"
}],
["batchjob/{sort},{order}[,{page}]",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=batchjob&action=list_batchjob"
+"&sort={sort}&order={order}&page={page}"
}],
["batchjob",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=batchjob&action=list_batchjob"
+"&sort=time&order=desc&page={page}"
}],
["",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_log?sid="+ds
+"&t=biz_rf_syslog&tt=syslog"
}]
]
]
);
},
actions:function()
{
return(
{
dateMail:function()
{
var al=this,
$=al.$,bc,gH;
al.dom$().find("#mailQuery input[date]").each(function(_aoDom)
{
(gH=(bc=$.$(_aoDom)).attr("date").split("-")).length
&&bc.attr("value",aDW(gH));
});

al.aAh&&al.aAh.hide();

al.aAh=al.$.$("#alias").exautocomplete(
{
vMaxHeight:170,
bAutoSelect:true,
vData:function(gy)
{
var sF=gX.findUsers(gy),aO=[];
for(var i=0;i<sF.length;i++)
{
var fA=sF[i];
aO.push(
{
sHtml:['<a class="line" title="',fA.alias,'">"',fA.name,'" &lt;',fA.alias,'&gt;</a>'].join(""),
oUser:fA
});
}
return aO;
},
onselect:function(aE)
{
if(aE&&aE.oUser)
{
al.dom$().$("#alias").attr("value",aE.oUser.alias);
setTimeout(function(){
al.dom$().$("#alias").attr("enter","query");
},100);
}
}
});
},
dateLogin:function()
{
var al=this,
$=al.$,bc,gH;
al.dom$().find("#loginQuery input[date]").each(function(_aoDom)
{
(gH=(bc=$.$(_aoDom)).attr("date").split("-")).length
&&bc.attr("value",aDW(gH));
});
al.aAh&&al.aAh.hide();

al.aAh=al.$.$("#alias").exautocomplete(
{
vMaxHeight:170,
bAutoSelect:true,
vData:function(gy)
{
var sF=gX.findUsers(gy),aO=[];
for(var i=0;i<sF.length;i++)
{
var fA=sF[i];
aO.push(
{
sHtml:['<a class="line" title="',fA.alias,'">"',fA.name,'" &lt;',fA.alias,'&gt;</a>'].join(""),
oUser:fA
});
}
return aO;
},
onselect:function(aE)
{
if(aE&&aE.oUser)
{
al.dom$().$("#alias").attr("value",aE.oUser.alias);
setTimeout(function(){
al.dom$().$("#alias").attr("enter","query");
},100);
}
}
});
},
date:function()
{
var al=this,
$=al.$,bc,gH;
al.dom$().find("#domainQuery input[date]").each(function(_aoDom)
{
(gH=(bc=$.$(_aoDom)).attr("date").split("-")).length
&&bc.attr("value",aDW(gH));
});
},
initMail:function()
{
var al=this;

al.$.$("#alias").exautocomplete(
{
vMaxHeight:170,
bAutoSelect:true,
vData:function(gy)
{
var sF=gX.findUsers(gy),aO=[];
for(var i=0;i<sF.length;i++)
{
var fA=sF[i];
aO.push(
{
sHtml:['<a class="line" title="',fA.alias,'">"',fA.name,'" &lt;',fA.alias,'&gt;</a>'].join(""),
oUser:fA
});
}
return aO;
},
onselect:function(aE)
{
if(aE&&aE.oUser)
{
al.dom$().$("#alias").attr("value",aE.oUser.alias);
}
}
});
}
});
},
events:function()
{
return(
{
goQuery:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA);
if(_aoEvent.keyCode==13&&de.attr("enter")=="query")
{
de.attr("enter","auto");
al.$.$("a[un='btn_query']").fireEvent("click");
}
},
domainQuery:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
eED=dU.find("[un='begin']"),
eSB=dU.find("[un='end']");
al.hash(
[
"syslog/date/",dU.find("[un='begin']").attr("date"),","
,dU.find("[un='end']").attr("date"),","
,dU.find("select").attr("value")
].join(""));
},
userQuery:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM);
if(al.valid_(dU))
{
al.hash(
[
"syslog/user/",dU.find("select[name='info']").attr("value"),
",",dU.find("input[name='alias']").attr("value")
].join(""));
}
},
mailQuery:function(_aoEvent,aA,aM)
{
var al=this,
bc=al.dom$(),
dU=al.$.$(aM);

{
var hi=$.trim(dU.find("input[name='alias']").attr("value")),
DY=aCa.encodeBase64URI(
$.trim(dU.find("input[name='subject']").attr("value")));
var bSt=
[
dU.find("select").attr("value"),
hi||"-",
DY||"-",
dU.find("[un='begin']").attr("date"),
dU.find("[un='end']").attr("date")
].join(",");

al.hash(
[
"syslog/mail/",bSt
].join(""));
}
},

loginQuery:function(_aoEvent,aA,aM)
{
var al=this,
bc=al.dom$(),
dU=al.$.$(aM);

{
var hi=$.trim(dU.find("input[name='alias']").attr("value"));
var bSt=
[
hi||"-",
dU.find("[un='begin']").attr("date"),
dU.find("[un='end']").attr("date")
].join(",");

al.hash(
[
"syslog/login/",bSt
].join(""));
}
}
























































































});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
);
$.package(
"biz/ctrl/member/control.js",
[
"biz/ctrl/mod.js",
"biz/ctrl/member/addDlg.js",
"biz/ctrl/member/exautocomplete.js",
"biz/lib/commdata.js",
"biz/lib/mbrtmpl.js",
"comm/ui/menu.js",
"comm/ui/panel.js",
"comm/ui/dialog.js",
"biz/ctrl/member/asyntree.js",
"comm/ui/tree.js"
],
function(bu)
{
var ay=QMWin,
aCa=ay.lib("B.Utils"),
dK=ay.lib("B.Data.member.tmpl").getTmpl(),
gX=ay.lib("B.Data.commdata"),
Om;

ay.createCtrl(
"B.Control",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{

return(
{
showGroupMenu:function(_aoEvent,aA)
{

var al=this,
$=al.$,
cB=al.bqz();
if(!cB.length)
{
al.showErr("您没有选择任何成员");
}
else
{
var xB=$.$("<div>").html(
dK.oAddGroupMenu.replace({oGroup:gX.getGroupList()})).menu(
{
oTarget:aA,
oDockConfig:
{
bButtom:true
}
},"instance");
xB.find("a[un='submit']").on("click",function()
{

var cBn="",aHu="",bJT=[];
xB.find("input[type='checkbox']").each(function(cp)
{
if(cp.checked)
{
cBn+="&groupalias="+cp.value;
bJT.push(cp.value);
}
});
$.each(cB,function(cE)
{
aHu+="&member="+cE.getAttribute("alias");
});

al.ajax(
{
sUrl:['/cgi-bin/bizmail_group?sid=',$.sid(),
'&t=biz_rf_mgr&action=add_groupmember',cBn,aHu].join(""),
onsuccess:function()
{
al.showMsg("添加成员到邮件群组成功").hash($.loc("hash"),"mbr");
for(var i=0;i<bJT.length;i++)
{
gX.updateGroupUserCount(bJT[i],cB.length)
}

},
onclienterror:function(qY,kr)
{

}
}
);

xB.menu("close");
});
xB.find("a[un='cancel']").on("click",function()
{
xB.menu("close");
});
xB.find("input[type='text']").on("focus",function()
{
if(this.value==="搜索邮件群组")
{
this.value="";
}
}).on("blur",function()
{
if(this.value==="")
{
this.value="搜索邮件群组";
}
}).on("keyup",function()
{
var bui={};
bui.oGroup=gX.fussyFindGroups(this.value);

xB.find("#grouplistDiv").html(dK.oSearchGroup.replace(bui));
});











}
},
showAddGroupDlg:function()
{
var qO=[],SC={},
bc=this.dom$();
cEe=bc.find("#selectedGroupFill");
cEe.find("b[nid]").each(function(cE){
var rb=$.$(cE),
JR=rb.attr("nid");
bM=rb.html();
qO.push({nid:JR,name:bM,icon:"group"});
SC[JR]=bM;
});
$.ctrl("B.member.addDialog",$.extend(this.aI,
{
oSelected:qO,
sLeftLabel:"从下面选择要添加的群组：",
sRightLabel:"已经选择的群组：",
sTitle:"群组",
fSetLeftContent:function(pK)
{

var bZ="请输入群组名...";

pK.html(dK.oAddGroupItems.replace({
tips:bZ,
items:gX.getGroupList()
})).find("input[type='text']")
.on("blur",function()
{
var de=$.$(this);
if(de.attr("value")=="")
{
de.attr("value",bZ);
this.style.color="#A0A0A0";
}
})
.on("focus",function()
{
var de=$.$(this);
if(de.attr("value")==bZ)
{
de.attr("value","");
this.style.color="#000";
}
})
.on("keyup",function()
{
var bZ=$.$(this).attr("value"),
Bq=gX.fussyFindGroups(bZ);

!bZ&&(Bq=gX.getGroupList());

Bq&&al.$.$("#structList a").each(function(Kd)
{
for(var i=Bq.length-1;i>=0;i--)
{
Bq[i].alias==al.$.$(Kd).attr("nid")&&(Bq[i].checked=true);
}
});

pK.find("div[un='listgroup']").html(
dK.oAddSearchGroupItems.replace({items:Bq}));
});
pK.find("input[type='checkbox']")
.each(function(cp)
{
var de=$.$(cp);
if(SC[de.attr("nid")])
{
de.attr("checked","true");
}
})
},
fDoSubmit:function(afj)
{
var cB=[];
$.each(afj,function(bK){
cB.push(
{
alias:gX.getGroupName(bK),
nid:bK,
iname:"groupalias",
ivalue:bK,
ckName:"delSelectedItem"
});
});
cEe.html(dK.oDelItems.replace({items:cB}));
}
})).show();
},
showAddDeptDlg:function()
{
var al=this,qO=[],SC={},
aPW=this.dom$().find("#selectedDeptFill");
aPW.find("b[nid]").each(function(cE){
var rb=$.$(cE),
JR=rb.attr("nid");
bM=rb.html();
qO.push({nid:JR,name:bM,icon:"party"});
SC[JR]=bM;
});

$.ctrl("B.member.addDialog",$.extend(this.aI,
{
oSelected:qO,
sLeftLabel:"从下面选择要添加的部门：",
sRightLabel:"已经选择的部门：",
sTitle:"所属部门",
fSetLeftContent:function(pK)
{
pK.html(dK.oAddDept).find("div[un='tree']").asyntree(
{
oData:gX.getPartyTree(),
bClosed:false,
ondata:function(hS)
{
var bK=hS.id,
hi=hS.alias||"",
cj=hS.type||"",
BE=gX.getPartyShortName(bK);

return[
'<ins class="',(cj=="")?"folder":"member",'">',

'<input id="ckStruct_',bK,'" nid="',bK,'" alias="',hi,'" pname="',ay.htmlEncode(BE),'"',
SC[bK]?' checked=true':'',' icon="party" ck="select" type="checkbox"/>',
'<label for="ckStruct_',bK,'">',hS.name,'</label></ins>'
].join("");
}
});
pK.find("li").each(function(OD)
{
var aGP=al.$.$(OD.firstChild);
aGP.find("input").data(0).checked&&al.$.$(OD.firstChild.nextSibling).find("input").each(function(cp)
{
al.$.$(cp).attr("disabled","true");
});

});
},
fDoSubmit:function(afj)
{
var cB=[];
$.each(afj,function(bK){
cB.push(
{
alias:gX.getPartyName(bK),
nid:bK,
iname:"partyid",
ivalue:bK
});
});
aPW.html(dK.oDelItems.replace({items:cB}));
}
})).show();
},
showAddMemberDlg:function()
{
var qO=[],SC={},
bap=this.dom$().find("#selectedMemberFill");
bap.find("input").each(function(cE){
var rb=$.$(cE),
Mm=rb.attr("icon"),
JR=rb.attr("value");
bM=rb.attr("alias")||gX.getMemberName(JR);
qO.push({nid:JR,name:bM,icon:Mm});
SC[JR]=bM;
});
$.ctrl("B.member.addDialog",$.extend(this.aI,
{
oSelected:qO,
sLeftLabel:"从下面选择要添加的成员：",
sRightLabel:"已经选择的成员：",
sTitle:"添加成员",
fSetLeftContent:function(pK)
{
pK.append(dK.oAddMbrTab);
gX.asynGetMemberTree(function(dhq){
pK.find("div[un='mbrtree']").asyntree(
{
oData:dhq,
bClosed:true,
ondata:function(hS)
{
var bK=hS.id,
hi=hS.alias||"",
cj=hS.type||"",
Mm=gX.hasParty(bK)?"party":"boy",
BE=gX.getMemberName(bK);

return[
'<ins class="',(cj=="")?"folder":"member",'">',

'<input id="ckStruct_',bK,'" nid="',bK,'" alias="',hi,'" pname="',ay.htmlEncode(BE),'"',
SC[bK]?' checked=true':'" icon="',Mm,'" ck="select" type="checkbox"/>',
'<label for="ckStruct_',bK,'">',hS.name,'</label></ins>'
].join("");
}
});
pK.find("li").each(function(OD)
{
var aGP=al.$.$(OD.firstChild),
cyx=aGP.find("input").data(0);
cyx&&cyx.checked&&al.$.$(OD.firstChild.nextSibling).find("input").each(function(cp)
{
al.$.$(cp).attr("disabled","true");
});
});
pK.find("ins[un='icon']").fireEvent("click");
});

var bou=pK.find("div[un='tab']");
bou.find("a[un='group']").on("click",function(_aoEvent){
var aqR=al.$.$(this);
bou.find("a[un='mbrtree']").rmClass("on");
aqR.addClass("on");
pK.find("div[un='group']").show();
pK.find("div[un='mbrtree']").hide();
});
bou.find("a[un='mbrtree']").on("click",function(_aoEvent){
var aqR=al.$.$(this);
bou.find("a[un='group']").rmClass("on");
aqR.addClass("on");
pK.find("div[un='group']").hide();
pK.find("div[un='mbrtree']").show();
});

var bhT=pK.find("div[un='group']");
var bZ="请输入群组名...";

bhT.html(dK.oAddGroupInMbr.replace({
tips:bZ,
items:gX.getGroupList()
})).find("input[type='text']")
.on("blur",function()
{
var de=$.$(this);
if(de.attr("value")=="")
{
de.attr("value",bZ);
this.style.color="#A0A0A0";
}
})
.on("focus",function()
{
var de=$.$(this);
if(de.attr("value")==bZ)
{
de.attr("value","");
this.style.color="#000";
}
})
.on("keyup",function()
{
var bZ=$.$(this).attr("value"),
Bq=gX.fussyFindGroups(bZ);

!bZ&&(Bq=gX.getGroupList());

Bq&&al.$.$("#structList a").each(function(Kd)
{
for(var i=Bq.length-1;i>=0;i--)
{
Bq[i].alias==al.$.$(Kd).attr("nid")&&(Bq[i].checked=true);
}
});

bhT.find("div[un='listgroup']").html(
dK.oAddSearchGroupItems.replace({items:Bq}));
});
bhT.find("input[type='checkbox']")
.each(function(cp)
{
var de=$.$(cp);
if(SC[de.attr("nid")])
{
de.attr("checked","true");
}
})
},
fDoSubmit:function(afj)
{
var al=this,cB=[],cjM=false;
$.each(afj,function(bK){
var hi=gX.getPartyShortName(bK)||gX.getUserName(bK);

if(gX.hasParty(bK))
{
cjM=true;
}
cB.push(
{
alias:hi,
nid:bK
});
});
cjM?
$.$("#btnBatchMemberDlg").rmAttr("ck").addClass("disabled")
:$.$("#btnBatchMemberDlg").attr("ck","batchMemberDlg").rmClass("disabled");
bap.html(dK.oHiddenMember.replace({items:cB}));
$.$("#selectedMemberCount").html(afj.length);
}
})).show();
},
showGroupEditMenu:function(aA)
{
var al=this,
hP=al.$.$(aA).parents("li"),
bc=this.dom$(),
xB=this.$.$("<div>").html(dK.oGroupEditMenu)
.menu(
{
oTarget:aA,
onclose:function()
{
hP.attr("showmenu","0").addClass("on1").find(".btn_mg").show();
hP.rmClass("on1").find(".btn_mg").hide();
},
onselect:function(cE)
{
if(cE.getAttribute("opt")=="delete")
{
if(confirm("确认要删除该群组吗？"))
{
var ds=ay.sid(),
de=al.$.$(aA);
al.ajax(
{
sUrl:"/cgi-bin/bizmail_group?sid="+ds+"&t=biz_rf_mgr&action=del_group&groupalias="
+al.$.$(aA).attr("groupalias"),
onsuccess:function()
{
al.akM(gX.getFirstGroupAlias(),true);
al.showMsg("删除群组成功").hash("mbr/group",true);
}
});
}
}
else if(cE.getAttribute("opt")=="edit")
{
var de=al.$.$(aA);
al.$.$("#mailGroupNav").find("li").rmClass("on");
de.parent("li").addClass("on");
var hi=de.attr("groupalias");
hi&&al.hash("#mbr/group/edit/"+hi,true);
}
xB.menu("close");
},
oDockConfig:
{
bButtom:true,
bRight:true
}
},"instance");
hP.attr("showmenu","1").addClass("on1").find(".btn_mg").show();
},
showGroupNav:function(hX,bdu)
{
var al=this;
if(bdu)
{
gX.updateGroupData(function(aTD)
{
al.bHq(hX);
});
}
else
{
al.bHq(hX);
}
},
showGroupNavBySearch:function(aCH,hX)
{
this.bHq(hX,aCH);
},
bHq:function(hX,aCH)
{

var al=this,
bTf=aCH||gX.getGroupList(),
bIK=this.dom$().find("#mailGroupBox").html(dK.oGroupNav.replace({
groups:bTf,
selalias:hX||""
}));
this.dom$().find("#navSearchGroup").on("focus",function()
{
if(this.value==="搜索邮件群组")
{
this.value="";
}
}).on("blur",function()
{
if(this.value==="")
{
this.value="搜索邮件群组";
}
});
},

initStruct:function(ba)
{
var al=this,
bK=ba||Om,
$=al.$,
bc=al.dom$(),
bsk=bc.find("#mbrListTree");
bsk.asyntree(
{
oData:gX.getPartyTree(),
bClosed:true,
ondata:function(hS)
{
var bM=hS.name,
Bl=hS.id,
djM=Bl==bK,
nP="item",
by="#mbr/list";

djM&&bc.find("#structPath").html(gX.getPartyShortName(Bl)).attr("nodeid",Bl).attr("nodename",bM);
Bl!=Om&&(by+="/"+Bl);
var ccM=gX.getParty(Bl);
(ccM&&ccM.priv==1)&&(by="javascript:;",nP="item disabled");
return['<ins class="folder" ><div  un="structline" mot="hideMenuTip" mor="showMenuTip" ',
'style="float:left;"><a  title="',bM,'" nid="',Bl,'" href="',by,'" class="',nP,'" un="item" dr="1">',bM,'<span ck="showUpDownMenu" nid="',Bl,'" class="arrow" style="display:none"></span></a></div></ins>'].join("");
}
});
bsk.find("ins[un='icon']").fireEvent("click");
bsk.asyntree("select",bK);
al.bbc=bsk;
},
initStructPath:function(ba)
{
var al=this,
bK=ba||Om,
$=al.$,
bc=al.dom$();
bM=gX.getPartyShortName(bK);
if(!gX.hasPrivelege(bK))
{
bc.find("#structNode").hide();
}
bc.find("#structPath").html(bM).attr("nodeid",bK).attr("nodename",bM);
},
initUserLine:function()
{
var al=this;
this.dom$().find("tr[un='userline']").each(function(bPi)
{
var FW=al.$.$(bPi),
rA=FW.find("div[un='setuserline']");
FW.on("mouseover",function()
{
rA.show();
}).on("mouseout",function()
{
rA.hide();
});

});
},
bXx:function(_aoEvent,aA,aM)
{
var al=this,
$=al.$,
Mg=$.trim($.$("input[un='query']").attr("value")),
aOm=aCa.encodeBase64URI(Mg),
cfc=aCa.decodeBase64URI(aOm);

Mg!=""&&al.hash("mbr/search/"+aOm);
al.aAh&&al.aAh.hide();
},
bAE:function(ba,aaR,fl)
{
var al=this,
$=al.$,
cB=aaR||al.bqz();

{
var cba=[],Fw=[];
$.each(cB,function(cE)
{
cba.push(cE.getAttribute("partyuserid"));
Fw.push(cE.getAttribute("alias"));
});
al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",$.sid()
,"&t=biz_rf_mgr&action=move_partyuser&partyid=",ba
,"&partyuserid=",cba.join("&partyuserid=")].join(""),
onsuccess:function()
{
$.each(Fw,function(hX)
{
gX.moveUser(hX,ba);
});
al.showMsg("移动部门成员成功").hash($.loc("hash"),"mbr");
fl();
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"移动部门成员失败");
}
});
}
},
bTO:function()
{
var al=this,
$=al.$,
iS=al.bBH();
if(!iS.length)
{
return al.showErr("您没有选择任何成员");
}
else if(confirm("您确定要删除这 "+iS.length+" 个成员吗？\n删除成员将会清空帐号下的所有邮件。"))
{
al.bUB(iS,true);
}
},
bUB:function(MV,bdu)
{
var al=this,$=al.$;
var hi=(typeof MV=="string")?MV:MV.join("&alias=");
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/bizmail_account",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&action=del_user&alias="+hi,
nTimeout:60*1000,
onsuccess:function(aE)
{
$.each(MV,function(hX)
{
gX.delUser(hX);
});
if(aE.retcode=="0")
{
if(bdu)
{
al.showMsg("删除成员成功").hash($.loc("hash"),"mbr");
}
else
{
al.showMsg("删除成员成功").hash("mbr/list",true);
}
}
else
{
al.showErr(aE.errmsg||"删除成员失败");

}
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"删除成员失败");
}
});

},
cfa:function(ajB)
{
var al=this,
$=al.$,
iS=al.bBH();
if(!iS.length)
{
al.showErr("您没有选择任何成员");
}
else if(confirm("您确定要"+(ajB?"启用":"禁用")+"这 "+iS.length+" 个成员吗？"))
{
al.dvI(iS.join("&alias="),ajB);
}
},
dvI:function(hX,ajB)
{
var al=this,$=al.$;
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/bizmail_account",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&action=act_user&setactive="+(ajB?"on":"off")
+"&alias="+hX,
nTimeout:30*1000,
onsuccess:function(eA)
{
if(eA.retcode=="0")
{
if(!eA.data.error)
{
al.showMsg((ajB?"启用":"禁用")+"成员成功").hash($.loc("hash"),true);
}
else
{
var bkA=eA.data.erralias.split(",").length;
al.showErr(bkA+"个成员"+(ajB?"启用":"禁用")+"失败").hash($.loc("hash"),true);
}
}
},
onclienterror:function(qY,kr)
{
al.showErr((ajB?"启用":"禁用")+"成员失败").hash($.loc("hash"),true);
}
});

},

bBH:function()
{
var iS=[];
this.dom$().find("input[un='mbrCheck']").each(function(cp)
{
cp.checked&&iS.push(cp.getAttribute("alias"))
});
return iS;
},
bqz:function()
{
var cB=[];
this.dom$().find("input[un='mbrCheck']").each(function(cp)
{
cp.checked&&cB.push(cp);
});
return cB;
},
fzX:function()
{
var al=this;
this.dom$().find("tr[un='userline']").each(function(bPi)
{
var FW=al.$.$(bPi),
rA=FW.find("div[un='setuserline']");
FW.on("mouseover",function()
{
rA.show();
}).on("mouseout",function()
{
rA.hide();
});

});
},
cwN:function()
{



this.dom$().find("input[un='query']").on("focus",function()
{
if(this.value==="搜索成员")
{
this.style.color="#000";
this.value="";
}
}).on("blur",function()
{
if(this.value==="")
{
this.style.color="";
this.value="搜索成员";
}
});

},
bDq:function()
{
var al=this;
al.aAh=al.$.$("[un='query']").exautocomplete(
{
vMaxHeight:170,
vData:function(gy)
{
var sF=gX.findUsers(gy),aO=[];
for(var i=0;i<sF.length;i++)
{
var fA=sF[i];
aO.push(
{
sHtml:['<a class="line" title="',fA.alias,'">"',fA.name,'" &lt;',fA.alias,'&gt;</a>'].join(""),
oUser:fA
});
}
return aO;
},
onselect:function(aE)
{
if(aE.oUser)
{
al.$.$("[un='query']").attr("value",aE.oUser.alias);
}
}
});
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
this.aI=aI;
Om=gX.getPartyRootId();
}
});
});
});
$.package(
"biz/ctrl/member/member.js",
[
"comm/ui/panel.js",
"comm/ui/menu.js",
"comm/ui/dialog.js",
"comm/ui/dragdrop.js",
"biz/ctrl/mod.js",
"biz/ctrl/member/control.js",
"biz/lib/mbrtmpl.js",
"biz/lib/commevent.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
gX=ay.lib("B.Data.commdata"),
djX=gX.isOffMbr(),
dEY=gX.isOffGrp(),
dK=ay.lib("B.Data.member.tmpl").getTmpl(),
Om,
bhe="";

function bhl(bog,bpt)
{
return(
{
oRule:
{
click:
{
submit:{sContext:"dlg"},
cancel:{}
}
},
oEvents:
{
submit:function(_aoEvent,aA,aM)
{
bog(ay.$(aM).find("[un='struct']").attr("value"));
},
cancel:bpt
}
});
}

ay.createCtrl(
"B.Member",
{sSuper:"B.Control",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
eventLibs:function()
{
return[{name:"B.Event.Comm"}];
},
rule:function()
{
return(
{
click:
{
showUpDownMenu:{},
showAlias:{},
checkAll:{},
mbrDel:{},
selCondition:{},
importPost:{sContext:"import"},
editOrgStruct:{},
setDepartment:{},
setGroup:{},
addAlias:{},
delAlias:{},
editGroup:{},
removeGroup:{},
checkMe:{},
checkThis:{},
delMember:{},
viewAccountLog:{},
enableAccounts:{},
disableAccounts:{},
disableAccount:{sContext:"opt"},
delAccount:{sContext:"opt"},
addDeptDlg:{},
addGroupDlg:{},
addMemberDlg:{},
batchMemberDlg:{},
groupDel:{},
cleargroupsearch:{},
delSelectedItem:{},
moredetail:{},
pswShow:{},
changegroup:{sContext:"groupline"},
mbrSearch:{sContext:"mbrSearch"},
delFolderLock:{}
},
mouseover:
{
showMenuTip:{},
showmore:{sContext:"structline"},
showGroupActionMenu:{sContext:"groupline"}
},
mouseout:
{
hideMenuTip:{},
showmorehide:{sContext:"structline"},
hideGroupActionMenu:{sContext:"groupline"}
},
keyup:
{
navsearchgroup:{},
searchaddgroup:{},
mbrSearchKU:{}
},
keydown:
{
searchaddgroupdown:{}
}

}
);
},
Xi:function(at)
{
var right$=this.dom$().find("#rightMain")
al=this;

$.$("#tipsTop").html(dK.oLoading).show();

right$&&right$.load(at.sUrl+"&r="+Math.random(),
{
onsuccess:function(oe)
{
if(oe&&(oe.indexOf("sessionTimeout")!=-1||oe.indexOf("session_timeout")!=-1))
{
al.logOut();
}
else
{
at.onsuccess&&at.onsuccess.apply(this,arguments);
$.$("#tipsTop").hide();
}
}
});
},
afw:function(ba,agB)
{
if(agB)
{
this.initStruct(ba||Om);
}
else if(!$.$("#mbrListTree ul.treeview").data(0))
{
this.initStruct(ba||Om);
}
},
akM:function(hX,agB)
{
if(agB)
{
this.showGroupNav(hX,true);
}
else if(!$.$("#mailGroupNav").data(0))
{
this.showGroupNav(hX);
}
},
akN:function()
{
this.onNavBar("member");
$.$("#mbrListTree").data(0)
||this.dom$().html(dK.oFrame.replace({mbr:"on",offgroup:this.dEY}));
},
aAN:function()
{
this.onNavBar("member");
$.$("#mailGroupBox").data(0)
||this.dom$().html(dK.oFrame.replace({group:"on",offmbr:this.djX}));
},
route:function()
{
var ds=$.sid();
return(
["mbr",
[
["import/query/{fileId}",
{
sAction:"importQuery"
}
],

["import/report/{fileId}",
{
sAction:"importReport"
}
],

["import/{partyid}",
{
sAction:"importMbr"
}],



["group/add[/{alias}]",
{
sAction:"gadd"
}
],

["group/edit/{alias}",
{
sAction:"gedit"
}],
["group/import",
{
sAction:"gimport"
}
],
["group/search/{query}",
{


sAction:"gsearch"
}
],
["group/list/{alias}[,{page}]",
{
sAction:"glist"
}
],
["group",
{
sAction:"glist"
}
],



["account/add/{partyid}",
{
sAction:"acadd"
}],

["account/edit/{alias},{nav}",
{
sAction:"acedit"
}],
["account/alias/{alias},{nav}",
{
sAction:"acalias"
}],

["account/detail/{alias},{nav}",
{
sAction:"acdetail"
}],
["account/static/{alias},{nav},{type}[,{page}]",
{
sAction:"acStatic"
}],

["search/{query}[,{recure}][,{page}]",
{
sAction:"msearch"
}],

["list/{partyid}[,{recure}][,{page}]",
{
sAction:"mlist"
}],
["list",
{
sAction:"mlist"
}],
["",
{
bCache:true,
sUrl:"/cgi-bin/bizmail_account?sid="+ds
+"&t=biz_rf_mbr&tt=account"
}]
]
]
);
},
actions:function()
{
return(
{
importMbr:function(NK)
{
var al=this,
bc=al.dom$(),
ds=ay.sid(),
by=["/cgi-bin/bizmail_account?sid=",ds,
"&t=biz_rf_mbr_import&tt=import&partyid=",
NK].join("");
this.akN();
this.Xi(
{
sUrl:by,
onsuccess:function()
{
$.$("#partyname").html(gX.getPartyName(NK));
}
});
this.afw(NK);
},
importQuery:function(KS)
{
var al=this,
bc=al.dom$(),
ds=ay.sid(),
by=["/cgi-bin/bizmail_account?sid=",ds,
"&t=biz_rf_mbr_import&tt=post&action=import_partyuser&step=query&fileid=",
KS].join("");
this.akN();
this.Xi(
{
sUrl:by,
onsuccess:function(gs)
{
al.dzR();
}
});
this.afw();
},
importReport:function(KS)
{
var al=this,
bc=al.dom$(),
ds=ay.sid(),
by=["/cgi-bin/bizmail_account?sid=",ds,"&t=biz_rf_mbr_import&tt=report&action=import_partyuser&step=report&fileid=",KS].join("");
this.akN();
this.Xi(
{
sUrl:by
});
this.afw();
},
mlist:function(ba,bcT,eO)
{

this.diG(ba,bcT,eO);

},
glist:function(hX,eO)
{
var al=this,
bpO=gX.getFirstGroupAlias(),
by;
if(gX.hasGroups())
{
by=[
"/cgi-bin/bizmail_group?sid=",
$.sid(),
"&t=biz_rf_mbr_group_right&tt=group&action=edit_group&groupalias=",
hX||bpO,
"&page=",
eO||0
].join("");
}
else
{
by=[
"/cgi-bin/bizmail_group?sid=",
$.sid(),
"&t=biz_rf_mbr_group_right&tt=nogroup"
].join("");
}
this.aAN();
this.Xi({
sUrl:by,
onsuccess:function()
{
al.dom$().find("td[structList]").each(function(aHW)
{
var afx=al.$.$(aHW),
ajg=[];
ay.each(afx.attr("structList").split(","),function(aEZ)
{
var cwX=gX.getPartyShortName(aEZ);
aEZ!=""&&ajg.push(cwX);
});
ajg.length>0&&afx.html(afx.html()+ajg.join(","));
});
}
});
this.akM(hX||bpO);
},
gadd:function(hX)
{
var al=this,
bpO=gX.getFirstGroupAlias(),
by=
[
"/cgi-bin/bizmail_group?sid=",
$.sid(),
"&t=biz_rf_mbr_group_right&tt=addgroup&groupalias=",
hX||bpO,
].join("");
this.aAN();
this.Xi({
sUrl:by,
onsuccess:function()
{
al.ajaxForm(
{
onsuccess:function()
{
al.showMsg("添加新群组成功");
var aIR=al.$.$("input[name='groupalias']").attr("value")+"@"+al.$.$("select[name='domainname']").attr("value");
gX.updateGroupData(function(){
al.hash("#mbr/group/list/"+aIR,true);
al.akM(aIR);
});
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"添加新群组失败");
}
});
al.$.$("#seldomainname").data(0).onchange=function()
{
if(this.selectedIndex==3)
{
al.$.$("#allowListCnt").html(dK.oAllowListContent);
}
else
{
al.$.$("#allowListCnt").html("");
}
}
}
});

},
gimport:function(hX)
{
var al=this,
by=
[
"/cgi-bin/bizmail_group?sid=",
$.sid(),
"&t=biz_rf_mbr_import_group&tt=import&action=import_group"
].join("");
this.aAN();
this.Xi({
sUrl:by,
onsuccess:function()
{
}
});
this.akM(hX);
},
gedit:function(hX)
{
var al=this,
by=
[
"/cgi-bin/bizmail_group?sid=",
$.sid(),
"&t=biz_rf_mbr_group_right&tt=editgroup&action=edit_group&page=-1&groupalias=",
hX||""
].join("");
this.aAN();
this.Xi({
sUrl:by,
onsuccess:function()
{
var bvD=al.dom$().find("#selectedMemberFill").find("input");
al.dom$().find("#selectedMemberCount").html(bvD.size());
al.ajaxForm(
{

onsuccess:function()
{
al.showMsg("编辑群组成功");
al.akM(gX.getFirstGroupAlias(),true);
al.hash("#mbr/group",true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"编辑群组失败");
}
});
al.$.$("#seldomainname").data(0).onchange=function()
{
if(this.selectedIndex==3)
{
al.$.$("#allowListCnt").html(dK.oAllowListContent);
}
else
{
al.$.$("#allowListCnt").html("");
}
}
}
});
this.akM(hX);
},
acadd:function(ba)
{
var al=this,
by=
[
"/cgi-bin/bizmail_account?sid=",
$.sid(),
"&t=biz_rf_mbr_account&tt=addaccount&partyid=",
ba||""
].join("");
this.akN();
this.Xi({
sUrl:by,
onsuccess:function()
{
var BE=gX.getPartyName(ba);
al.dom$().find("#addtostruct").html(['添加成员到“',BE,'”'].join(""));
al.dom$().find("#selectedDeptFill").html(
dK.oDelItem.replace({nid:ba,alias:BE,iname:"partyid",ivalue:ba}));

al.ajaxForm(
{
onsuccess:function()
{
var azl=al.dom$().find("#rightMain"),
bkM=azl.find("input[name='alias']").attr("value")+"@"+azl.find("select[name='domainname']").attr("value"),
bRo=azl.find("input[name='name']").attr("value"),
Yj=azl.find("#selectedDeptFill b").attr("nid");
gX.addUser(bkM,bRo,Yj);
al.showMsg("添加新成员成功");
al.hash("#mbr/list/"+ba,true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"添加新成员失败");
if(-201==qY)
{
dU=al.dom$().find("[un='verifycode']");
dU.attr("valid",dU.attr("valid").replace("off#","")).show();
dU.find("[ck='changeVCImage']").fireEvent("click");
dU.find("input").data(0).focus();
}
else if(-202==qY)
{
dU=al.dom$().find("[un='verifycode']");
dU.find("[ck='changeVCImage']").fireEvent("click");
dU.find("input").data(0).value="";
dU.find("input").data(0).focus();
}
}
});
}
});
this.afw(ba);

},
acedit:function(hX,aiQ)
{
var Rn=aiQ.split("="),
VV=Rn[0],
nZ=Rn[1],
by=
[
"/cgi-bin/bizmail_account?sid=",
$.sid(),
"&t=biz_rf_mbr_account&tt=editaccount&action=show_user&alias=",
hX||"",
(VV=="m")?"&partyid=":"&groupalias=",
nZ
].join("");
(VV=="m")?this.akN():this.aAN();
(VV=="m")?this.afw(nZ):this.akM(nZ);
this.Xi({
sUrl:by,
onsuccess:function()
{
var iS=al.dom$().find("#selectedDeptFill").attr("ids").split("||"),
cB=[];
al.$.each(iS,function(ba)
{

ba=$.trim(ba);
cB.push(
{
nid:ba,
alias:gX.getPartyName(ba),
iname:"partyid",
ivalue:ba
});
});
al.dom$().find("#selectedDeptFill").html(dK.oDelItems.replace({items:cB}));
al.ajaxForm(
{
onsuccess:function()
{
var azl=al.dom$().find("#rightMain"),
bkM=azl.find("input[name='alias']").attr("value"),
bRo=azl.find("input[name='name']").attr("value"),
Yj=azl.find("#selectedDeptFill b").attr("nid");
gX.updateUser(bkM,bRo,Yj);
al.showMsg("编辑成员成功");
al.hash(["#mbr/account/detail/",bkM,",m=",Yj].join(""),"mbr");
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"编辑成员失败");
}
});
al.dom$().find("#selectedDeptFill").find("b").each(function(daq)
{
var cgm=al.$.$(daq);
cgm.html(gX.getPartyName(cgm.attr("nid")));
});
}
});
},
acdetail:function(hX,aiQ)
{
var Rn=aiQ.split("="),
VV=Rn[0],
nZ=Rn[1];

bhe=aiQ;

(VV=="m")?this.akN():this.aAN();
(VV=="m")?this.afw(nZ):this.akM(nZ);
var by=
[
"/cgi-bin/bizmail_account?sid=",
$.sid(),
"&t=biz_rf_mbr_detail&tt=detail&action=show_user&alias=",
hX,
(VV=="m")?"&partyid=":"&groupalias=",
nZ
].join("");
this.Xi(
{
sUrl:by,
onsuccess:function()
{

var aPW=al.dom$().find("#belongToDept");
if(aPW.size()==0)
{
return;
}
var iS=aPW.attr("ids").split("||"),
cB=[];
al.$.each(iS,function(ba)
{
cB.push("<span>");
cB.push(gX.getPartyName(ba)+";");
cB.push("</span>");
});
aPW.html(cB.join(""));
}
});
},
acStatic:function(hX,aiQ,aFR,zU)
{
var Rn=aiQ.split("="),
VV=Rn[0],
nZ=Rn[1];
(VV=="m")?this.akN():this.aAN();
(VV=="m")?this.afw(nZ):this.akM(nZ);
var by=
[
"/cgi-bin/bizmail_account?sid=",
$.sid(),
"&t=biz_rf_mbr_static&action=query_userstatus&alias=",
hX,
"&info=",
aFR,
"&page=",
zU?zU:"0",
"&nav=",
encodeURIComponent(aiQ)
].join("");
debug([hX,aFR,zU]);
debug(by);
this.Xi(
{
sUrl:by,
onsuccess:function()
{
}
});
},
acalias:function(hX,aiQ)
{
var Rn=aiQ.split("="),
VV=Rn[0],
nZ=Rn[1];
bhe=aiQ;

(VV=="m")?this.akN():this.aAN();
(VV=="m")?this.afw(nZ):this.akM(nZ);


var al=this,$=al.$,
by=
[
"/cgi-bin/bizmail_account?sid=",
$.sid(),
"&t=biz_rf_mbr_alias&tt=alias&action=show_user&alias=",
hX,
(VV=="m")?"&partyid=":"&groupalias=",
nZ
].join("");
this.Xi({
sUrl:by,
onsuccess:function()
{

bc=al.dom$(),
bFI=bc.find("#aliasList"),
buW=al.initPage().page(),
aEr=buW.domains,
_oList=buW.list,
bCP="";



$.each(_oList,function(cjq)
{
var bzy=cjq.split("@");
bCP+=dK.oAliasAdd.replace(
{
alias:bzy[0],
opt:al.bXR(aEr,bzy[1])
});
});
bFI.html(bCP);

!_oList.length&&al.boI();

bc.find("input[name='slavealias']")
.attr("bind","1")
.on("blur",function()
{
al.cXt(this.parentNode,_oList);
});


al.ajaxForm(
{
onsuccess:function()
{
al.showMsg("设置别名成功");
al.hash("#mbr/account/detail/"+hX+","+bhe,true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"设置别名失败");
}
});
}
});
this.afw();
},
msearch:function(adh,bcT,eO)
{

var aNb="";
if(!adh)
{
aNb="on";
}
else
{
aNb=(bcT=="true")?"off":"on";
}
this.akN();
var al=this,
by=
[
"/cgi-bin/bizmail_account?sid=",
$.sid(),
"&t=biz_rf_mbr_new_list&tt=accountList&action=search_user&query=",
adh,
"&page=",
eO||0,
"&recursive=",
aNb
].join("");
al.Xi(
{
sUrl:by,
onsuccess:function()
{
al.bDq();
al.cwN();
al.dom$().find("td[partyid]").each(function(bNs)
{
var bbR=$.$(bNs),
maxlen=15,
auz=gX.getPartyName(bbR.attr("partyid")),
aWv=auz;
auz.length>maxlen&&(aWv=auz.slice(0,maxlen)+" ...");
bbR.html(aWv).attr("title",auz);
});
al.dom$().find("#btnImportMbr").attr("href","#mbr/import/"+Om);
al.dom$().find("#btnAddMbr").attr("href","#mbr/account/add/"+Om);
al.cnX();
}
});
al.afw(Om,true);


}
}
);
},
events:function()
{
return(
{

showAlias:function(_aoEvent,aA,aM)
{
var auB=this.$.$("[un='slave']"),
atM=this.$.$("[un='slaveTitle']");
aA.checked?auB.show()&&atM.hide()
:auB.hide()&&atM.show();
},
showUpDownMenu:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA);
al.$.stopPropagation(_aoEvent);
al.$.preventDefault(_aoEvent);
var xB=this.$.$("<div>").html($.TE([
'<div class="m_list " style="width:120px;font-size:12px;">',
'<ul><li un="up" ><a>上移</a></li>',
'<li un="down" ><a>下移</a></li>',
'</ul><div>'
]).replace({})).menu(
{
oTarget:aA,
onclose:function()
{
de.hide();
al.$.$("#mbrListTree a.selected2").rmClass("selected2");
},
onselect:function(cE)
{
var Zl="",
Yj=de.attr("nid"),
bkt="",
rb=al.$.$(cE);
if("up"==rb.attr("un"))
{
Zl="up";
bkt=gX.getPrePartyId(Yj);
}
else if("down"==rb.attr("un"))
{
Zl="down";
bkt=gX.getSuccPartyId(Yj);
}
bkt&&al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",al.$.sid(),
"&t=biz_rf_mgr&action=move_party&direction=",Zl,
"&partyid=",Yj,"&partyid2=",bkt].join(""),
onsuccess:function()
{
Zl=="up"&&gX.moveUpParty(Yj);
Zl=="down"&&gX.moveDownParty(Yj);
al.bbc.asyntree("move"+Zl,Yj);
al.showMsg("移动成功");
},
onclienterror:function()
{
al.showErr("移动失败");
}
});
xB.menu("close");
}
});
setTimeout(function()
{
de.show();
var adK=de.parent("a");
adK.addClass("selected2");
},50);
},
showMenuTip:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA),
adK=de.find("a");
if(adK.attr("nid")==gX.getPartyRootId())
{
return;
}
de.find("a span").show();
adK.addClass("selected2");
},
hideMenuTip:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA),
adK=de.find("a");
if(adK.attr("nid")==gX.getPartyRootId())
{
return;
}
de.find("a span").hide();
adK.rmClass("selected2");
},
importPost:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA),
dU=al.$.$(aM),
dBx=de.attr("partyid"),
dpo=dU.find("#cpwdlogin").data(0).checked?1:0,
dio=dU.find("#coverwrite").data(0).checked?1:0,
axA=dU.find("input[name='verifycode']").attr("value");
al.valid_(dU.find("[un='verifycode']"))&&al.dvZ(dBx,dpo,dio,axA);
},
changegroup:function(_aoEvent,aA,aM)
{
var bIK=this.dom$().find("#mailGroupBox"),
Bw=bIK.find("li");
hP=this.$.$(aM),
Bw.rmClass("on");
hP.addClass("on");
},
showGroupActionMenu:function(_aoEvent,aA,aM)
{
var hP=this.$.$(aM);
hP.addClass("on1").find(".btn_mg").show();
},
hideGroupActionMenu:function(_aoEvent,aA,aM)
{
var hP=this.$.$(aM);
hP.attr("showmenu")!="1"&&hP.rmClass("on1").find(".btn_mg").hide();
},
navsearchgroup:function(_aoEvent,aA,aM)
{
var bZ=$.$(aA).attr("value"),Bq=gX.fussyFindGroups(bZ);

!bZ&&(Bq=gX.getGroupList());
this.showGroupNavBySearch(Bq,"");
if(bZ!="")
{
this.$.$("#delsearch").show();
}
else
{
this.$.$("#delsearch").hide();
}
},
searchaddgroup:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA),
bZ=de.attr("value"),
Bq=gX.fussyFindGroups(bZ),
Fb=al.dom$().find("#addgroupsearch");

if(Bq.length<=0)
{
Fb.hide();
return;
}

if(bZ!="")
{
Fb.html(dK.oAddSearchGroupItems.replace({items:Bq})).show();
if((Bq||[]).length>=9)
{
Fb.css("heigth","260px");
}
}else
{
Fb.hide();
}

var Ow=this.$.$("#structList"),
Bw=Fb.find("li"),
ux=parseInt(Fb.attr("num"))||0;
(ux>Bw.size()-1)&&(ux=0);
var aLM=function(bCf)
{
Bw.rmClass("on");
Fb.attr("num",bCf);
al.$.$(Bw.data(bCf)).addClass("on");
},
bgS=function()
{
var anM=false,
hi=Bq[ux].alias,
bM=Bq[ux].name;
Ow.find("a").each(function(cgQ)
{
(al.$.$(cgQ).attr("nid")==hi)&&(anM=true);
});
al.$.$("#structContent").find("input[type='checkbox']").each(function(cgE)
{
var aTW=al.$.$(cgE);
(aTW.attr("nid")==hi)&&(aTW.attr("checked","true"));
});
!anM&&Ow.append(['<a href="javascript:;" nid="',hi,'">',bM,'<span class="addr_del" ck="del"></span></a>'].join(""));
Fb.hide();
de.attr("value","");
};

aLM(ux);

if(_aoEvent.keyCode==13)
{
bgS();
}
Bw.on("mouseover",function()
{
for(var n=0;n<Bw.size();n++)
{
if(Bw.data(n)==this)
{
ux=n;
break;
}
}
aLM(ux);
}).on("click",function()
{
bgS();
});
},
searchaddgroupdown:function(_aoEvent,aA,aM)
{
var al=this,
de=this.$.$(aA),
Fb=this.$.$("#addgroupsearch"),
Bw=Fb.find("li");
if(Bw.size()<=0)
return;

var ux=parseInt(Fb.attr("num"))||0;
(ux>Bw.size()-1)&&(ux=0);

if(_aoEvent.keyCode==40||_aoEvent.keyCode==38)
{

_aoEvent.keyCode==40&&(ux<Bw.size()-1)&&(++ux);

_aoEvent.keyCode==38&&(ux>0)&&(--ux);

Bw.rmClass("on");
Fb.attr("num",ux);
al.$.$(Bw.data(ux)).addClass("on");
al.$.preventDefault(_aoEvent);
}
},
editGroup:function(_aoEvent,aA,aM)
{
this.showGroupEditMenu(aA);
},
groupDel:function(_aoEvent,aA,aM)
{
this.cIy(aA);
},
cleargroupsearch:function()
{
this.$.$("#navSearchGroup").attr("value","");
this.$.$("#delsearch").hide();
this.showGroupNav();
},

checkAll:function(_aoEvent,aA,aM)
{
this.dom$().find("input[un='mbrCheck']").attr("checked",aA.checked);
aA.checked&&this.dom$().find("thead").find("a[sh='dis']").rmClass("btn_disabled");
!aA.checked&&this.dom$().find("thead").find("a[sh='dis']").addClass("btn_disabled");
},
checkMe:function(_aoEvent,aA,aM)
{
var vK=$.$(aA).parents("td").find("input").data(0);
vK.checked=!vK.checked;
},
checkThis:function(_aoEvent,aA,aM)
{
var al=this;
!aA.checked&&al.dom$().find("thead").find("a[sh='dis']").addClass("btn_disabled");
var aTL=false;
al.$.$("input[ck='checkThis']").each(function(cE){
aTL=aTL||cE.checked
});
aTL&&al.dom$().find("thead").find("a[sh='dis']").rmClass("btn_disabled");
!aTL&&al.dom$().find("input[ck='checkAll']").rmAttr("checked",false);
},
delMember:function()
{
debug("del member");
},
viewAccountLog:function(_aoEvent,aA,aM)
{
var al=this,hi=this.$.$(aA).attr("alias");
var btU=this.$.$("<div>").html($.TE([
'<div class="m_list " style="width:120px;font-size:12px;">',
'<ul><li log="send" ><a>7天内发信情况</a></li>',
'<li log="recv" ><a>7天内收信情况</a></li>',
'<li log="login" ><a>7天内登录情况</a></li>',
'</ul><div>'
]).replace({alias:hi})).menu(
{
oTarget:aA,
onselect:function(cE)
{
var csf=cE.getAttribute("log");
al.hash("#mbr/account/static/"+hi+","+bhe+","+csf);
btU.menu("close");
}

}
);
btU.parents(".menu_obj").css("left",$.$(aA).offset().left);

},
enableAccounts:function(_aoEvent,aA)
{
if(this.$.$(aA).hasClass("btn_disabled"))
{
return;
}
var bJZ=true;
this.cfa(bJZ);
},
disableAccounts:function(_aoEvent,aA)
{
if(this.$.$(aA).hasClass("btn_disabled"))
{
return;
}
var bJZ=false;
this.cfa(bJZ);
},
disableAccount:function(_aoEvent,aA,aM)
{
var al=this,$=al.$,hi=$.$(aM).attr("alias"),opt=$.$(aA).attr("opt");
if(confirm(["您确定要",opt=="on"?"启用":"禁用","此用户?"].join("")))
{
al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",$.sid(),"&t=biz_rf_mgr&action=act_user&alias=",hi,"&setactive="+opt].join(""),
onsuccess:function()
{
var AR=opt=="on"?"启用":"禁用";
al.showMsg("用户"+hi+"已被"+AR);
$.$(aA).html(opt=="on"?"禁用":"启用");
$.$(aA).attr("opt",opt=="on"?"off":"on");
},
onclienterror:function(qY,kr)
{
al.showErr(kr);
}
}
);
}
},
delAccount:function(_aoEvent,aA,aM)
{
var al=this,$=al.$,hi=$.$(aM).attr("alias");
if(confirm("您确定要删除此用户？"))
{
al.bUB([hi]);
}
},

selCondition:function(_aoEvent,aA)
{
var al=this,bc=al.dom$(),
bvq=al.$.$(aA).attr("partyid"),
cpS=bc.attr("listShowAlias")||"off",
cpb=bc.attr("listShowSubDept")||"on",
cff=$.$("<div>").html(
$.TE([
'<div class="m_list m_sel">',
'<ul><li un="showalias" $@$if($showalias$=="on")$@$ class="on"$@$endif$@$><a>显示用户别名</a></li>',
'<li un="showsub" $@$if($subdept$=="on")$@$class="on" $@$endif$@$><a>显示子部门成员</a></li>',
'</ul><div>'
]).replace({showalias:cpS,subdept:cpb}))
.menu(
{
oTarget:aA,
sMaskClass:"m_list",
onselect:function(cE)
{
var rb=al.$.$(cE);
if(rb.attr("un")=="showalias")
{
if(rb.hasClass("on"))
{
al.bXa();
}
else
{
al.bVC();
}
}
else if(rb.attr("un")=="showsub")
{
if(rb.hasClass("on"))
{
bc.attr("listShowSubDept","off");
al.hash("mbr/list/"+bvq+",true");
}
else
{
bc.attr("listShowSubDept","on");
al.hash("mbr/list/"+bvq,true);
}
}
cff.menu("close");
},
oDockConfig:
{
bButtom:true,
bRight:true
}
},"instance");
},
showmore:function(_aoEvent,aA,aM)
{

var dU=this.$.$(aM),
cE=dU.find("a[un='moreaction']");
cE.css("display")=="none"&&cE.show();
},
showmorehide:function(_aoEvent,aA,aM)
{

var dU=this.$.$(aM),
cE=dU.find("a[un='moreaction']");
cE.css("display")=="none"||cE.hide();
},

editOrgStruct:function(_aoEvent,aA,aM)
{

var al=this,bv=al.$.$(aA);
if(bv.attr("un")=="moreaction")
{
var dU=al.$.$(aM)
}
else
{
var Rv=al.dom$().find("#structPath").attr("nodeid"),
dU=al.dom$().find("li[nid='"+Rv+"']");
}
var bLJ=al.dom$().find("#structPath"),
Bl=bLJ.attr("nodeid"),
le=bLJ.attr("nodename"),
xB=$.$("<div>").html(
[
'<div class="m_list" ><ul>',
Bl==gX.getPartyRootId()?'':'<li opt="rename"><a>重命名</a></li><li opt="del"><a>删除</a></li><p class="line"></p>',
'<li opt="new"><a>新建部门</a></li>',
'</ul><div>'
].join("")).menu(
{
oTarget:aA,
onselect:function(cE)
{
if(cE.getAttribute("opt")=="rename")
{
var fS=$.$("<div>")
.html(dK.oOrgMenu.replace({name:le}))
.dialog($.extend({sTitle:"编辑部门",nWidth:400},bhl(
function(adv)
{
aTe.valid(fS.find("[un='dlg']").find("[valid]"))&&al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",ay.sid(),
"&t=biz_rf_mgr&action=add_party&partyid=",Bl,
"&name=",encodeURIComponent(adv),"&resp_charset=UTF8"
].join(""),
onsuccess:function()
{
al.bbc.asyntree("rename",Bl,adv);
bLJ.html(adv).attr("nodename",adv);
gX.renameParty(Bl,adv);
fS.dialog("close");
al.showMsg("编辑部门成功");
}
});
},
function()
{
fS.dialog("close");
})));


}
else if(cE.getAttribute("opt")=="del")
{
if(!gX.isLeafParty(Bl))
{
alert("包含子部门的部门不能删除");
}
else if(confirm("确定要删除"+le+"吗？"))
{
al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",$.sid(),
"&t=biz_rf_mgr&action=del_party&partyid=",Bl].join(""),
onsuccess:function()
{
al.bbc.asyntree("delete",Bl);
al.hash("mbr/list/"+gX.delParty(Bl),true);
al.showMsg("删除部门成功");
}
});
}
}
else if(cE.getAttribute("opt")=="new")
{

var fS=$.$("<div>")
.html(dK.oOrgMenu.replace({}))
.dialog($.extend({sTitle:"新建部门",nWidth:400},bhl(
function(adv)
{
if(aTe.valid(fS.find("[un='dlg']").find("[valid]")))
{
fS.dialog("close");
al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",ay.sid(),
"&t=biz_rf_mgr&action=add_party&parentid=",Bl,
"&name=",encodeURIComponent(adv),"&resp_charset=UTF8"
].join(""),
onsuccess:function(gs)
{
var aO=gs.data;
gX.addParty(aO.id,aO.parentid,aO.name);
al.hash("mbr/list/"+aO.id,true);
al.bbc.asyntree("append",aO.id,aO.parentid,aO.name);
al.bbc.asyntree("select",aO.id);
al.showMsg("添加部门成功");
}
});
}
},
function()
{
fS.dialog("close");
})));
try
{
fS.find("input[un='struct']").focus();
}catch(ex){}
}
xB.menu("close");
},
oDockConfig:
{
bButtom:true
}
},"instance");
},

setDepartment:function(_aoEvent,aA)
{
if(this.$.$(aA).hasClass("btn_disabled"))
{
return;
}
var al=this,
bvE=0,bwL="",xB=$.$("<div>").html(
[
'<div class="m_list m_stru">',
' <h4>设置所在部门</h4>',
' <div  class="partytree" id="menuListTree"></div>',
' <p class="g_info">当前所在部门：<span id="currentParty"></span></p>',
' <div class="submitColumn_nobg"><a un="cancel" class="btn btnNormal btnCancel right">取消</a><a un="submit" class="btn btnComfirm right">确定</a></div>',
'</div></div>'
].join("")).menu(
{
oTarget:aA,
oDockConfig:
{
bButtom:true
}
},"instance");
xB.find("#menuListTree").asyntree(
{
oData:gX.getPartyTree(),
bClosed:true,
ondata:function(hS)
{
var bM=hS.name,
Bl=hS.id,
by="#mbr/list";

Bl!=Om&&(by+="/"+Bl);
return['<ins class="folder"><a class="item" un="item">',bM,'</a></ins>'].join("");
},
onselected:function(cE,Li,FE)
{
var clg=xB.find("#currentParty");

bwL=cE.name;
bvE=cE.id;

clg.html(bwL);
}
});
xB.find("a[un='submit']").on("click",function()
{
al.bAE(bvE);
xB.menu("close");
});
xB.find("a[un='cancel']").on("click",function()
{
xB.menu("close");
});
},
setGroup:function(_aoEvent,aA)
{
if(this.$.$(aA).hasClass("btn_disabled"))
{
return;
}
this.showGroupMenu.apply(this,arguments);
},
addAlias:function()
{
this.boI();
},
delAlias:function(_aoEvent,aA)
{
this.$.$(aA).parent("span").parent("div").remove();
},
removeGroup:function(_aoEvent,aA)
{
if(this.$.$(aA).hasClass("btn_disabled"))
{
return;
}
var al=this,$=al.$,
cB=al.bqz(),aHu="";


var	aIR=$.$(aA).attr("alias");

if(!cB.length)
{
al.showErr("您没有选择任何成员");
}
else
{
$.each(cB,function(cE)
{
aHu+="&member="+cE.getAttribute("alias");
});

al.ajax(
{
sUrl:"/cgi-bin/bizmail_group?sid="+$.sid()+"&t=biz_rf_mgr&action=del_groupmember&groupalias="+aIR+aHu,
onsuccess:function()
{
al.showMsg("移除成员成功").hash($.loc("hash"),"mbr");
}
});
}
},

mbrDel:function(_aoEvent,aA)
{
if(this.$.$(aA).hasClass("btn_disabled"))
{
return;
}
this.bTO.apply(this,arguments);
},

mbrSearch:function()
{
this.bXx.apply(this,arguments);
},
mbrSearchKU:function(_aoEvent)
{
_aoEvent.keyCode==13&&this.dom$().find("[ck='mbrSearch']").fireEvent("click");
},
addDeptDlg:function()
{
this.showAddDeptDlg();
},
addGroupDlg:function()
{
this.showAddGroupDlg();
},
addMemberDlg:function()
{
this.showAddMemberDlg();
},
batchMemberDlg:function()
{
var al=this,
aUk=al.$.isBrowser("ie"),
cBB=aUk&&window.document.selection.createRange(),
fS=al.$.$("<div>").html(dK.oBatchMemberDlg).dialog(
{
sTitle:"批量添加成员",
onbeforeclose:function()
{
aUk&&cBB&&cBB.select();
return true;
},
oRule:
{
click:
{
submit:{sContext:"dlg"},
cancel:{sContext:"dlg"}
}
},
oEvents:
{
submit:function(_aoEvent,aA,aM)
{
var bj=al.$.$(aM).find("iframe").data(0).contentWindow;
if(aTA(bj))
{
var bap=al.dom$().find("#selectedMemberFill"),
cB=[],
aO=ceW(bj);

al.$.each(aO,function(hX)
{
var hi=al.$.trim(hX);
hi&&cB.push(
{
alias:gX.getUserName(hi),
nid:hi
});
});
bap.html(dK.oHiddenMember.replace({items:cB}));
al.dom$().find("#selectedMemberCount").html(cB.length);
fS.dialog("close");
}else{
clL(bj);
}
},
cancel:function(_aoEvent,aA,aM)
{
var al=this;
fS.dialog("close");
}
}
},"instance");

setTimeout(function()
{
var ceK=fS.find("iframe").data(0).contentWindow,
aRS=ceK.document,
cSy,
cB=[];
al.$.$("#selectedMemberFill").find("input").each(function(aaX)
{
cB.push({alias:al.$.$(aaX).attr("value"),error:false});
});
aRS.designMode='On';
aRS.contentEditable=true;
aRS.open();
aRS.writeln(dK.oBatchMemberHtml.replace({items:cB}));
aRS.close();
cSy=aRS.body;
clL(ceK);
},100);

function aIi(aF){
var fm=aF.document.body;
return fm.textContent==undefined?fm.innerText:fm.textContent;
}
function ceW(aF){
return aIi(aF).replace(/[, ;]/g,"\t").replace(/</g,"&lt;").replace(/>/g,"&gt;").split("\t");
}
function aTA(aF){
var bhF=ceW(aF),
cbr=[],vl={},
bOS=0,bRi=0;
for(var i=0;i<bhF.length;i++)
{
var ahi=al.$.trim(bhF[i]),
FQ=/^[\.a-zA-Z0-9_=-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
if(ahi&&!vl[ahi])
{
var CW=gX.checkAlias(ahi);
vl[ahi]=true;
cbr.push({alias:ahi,error:!CW});
if(!CW)
{
FQ.test(ahi)?(bOS++):(bRi++)
}
}
}
aF.document.body.innerHTML=dK.oBatchMembers.replace({items:cbr});
if(bOS||bRi)
{
fS.find(".error_tips").html(dK.oBatchMemErrTips.replace(
{
errdomain:bOS,
erremail:bRi
})).show();
fS.find("a[ck='submit']").css("zoom","1");
return false;
}else{
fS.find(".error_tips").hide();
return true;
}
}


function clL(aF)
{
setTimeout(function(){
try{
var bj=aF,
bR=bj.document,
fm=bR.body;
if(bR.getSelection||bj.getSelection)
{
bj.focus();
var bnl=fm.children[fm.childElementCount-1]||fm.firstChild,
sH=(bj.getSelection&&bj.getSelection())||
(bR.getSelection&&bR.getSelection()),
hV=bR.createRange();

sH.rangeCount>0&&sH.removeAllRanges();
hV.selectNode(bnl);
hV.collapse(true);
sH.addRange(hV);
}else{
var hV=fm.createTextRange();
fm.focus();
hV.move('character',fm.innerText.length);

hV.select();
}
}catch(ex){}
},100);
}
},
moredetail:function(_aoEvent,aA)
{
this.dom$().find("#moredetail").show();
this.$.$(aA).hide();
},
pswShow:function(_aoEvent,aA)
{
var jv=this.dom$().find("#pswcontainer");
this.$.trim(jv.html())==""?
jv.html(this.dom$().find("#pswhide").html())
:jv.html("");
},
delSelectedItem:function(_aoEvent,aA)
{
$.$(aA).parent("div").remove();
},
delFolderLock:function(_aoEvent,aA)
{
var al=this,
hi=al.dom$().find("input[name='alias']").attr("value");
al.ajax(
{
sUrl:"/cgi-bin/bizmail_account?sid="+$.sid()+"&t=biz_rf_mgr&action=del_folderlock&alias="+hi,
onsuccess:function()
{
al.showMsg("解除“文件夹区域”的加锁保成功护");
al.$.$(aA).hide();
al.dom$().find("[un='unlockMsg']").show();
},
onclienterror:function(qY,kr)
{
al.showErr(kr);
}
});
}
}
);
},
cIy:function(aA)
{

if(confirm("确认要删除该群组吗？"))
{
var al=this,
ds=ay.sid(),
de=al.$.$(aA);
al.ajax(
{
sUrl:"/cgi-bin/bizmail_group?sid="+ds+"&t=biz_rf_mgr&action=del_group&groupalias="
+al.$.$(aA).attr("alias"),
onsuccess:function()
{
al.showMsg("删除群组成功").hash("mbr/group",true);
}
});
}
},
diG:function(ba,bcT,eO)
{

var aNb="",
al=this,
bK=ba||Om;
aNb=(bcT=="true"||al.dom$().attr("listShowSubDept")=="off")?"off":"on";

var al=this,by=
[
"/cgi-bin/bizmail_account?sid=",
$.sid(),
"&t=biz_rf_mbr_new_list&action=show_party&partyid=",
bK,
"&page=",
eO||0,
"&recursive=",
aNb
].join("");
this.akN();
this.Xi({
sUrl:by,
onsuccess:function()
{
al.cwN();
al.initStructPath(ba);
al.bDq();
al.dom$().find("td[partyid]").each(function(bNs)
{
var bbR=$.$(bNs),
maxlen=20,
auz=gX.getPartyName(bbR.attr("partyid")),
aWv=auz;
auz.length>maxlen&&(aWv=auz.slice(0,maxlen)+" ...");
bbR.html(aWv).attr("title",auz);
});

"on"==al.dom$().attr("listShowAlias")?al.bVC():al.bXa()

al.cnX();

}
});
this.afw(ba);

},
cnX:function()
{
var al=this;
al.dom$().find("#rightMain tr[drag='1']").draggable(
{
container:$.$("#main"),
helper:"#dragHelper",
cursorAt:{left:5,right:0},
group:"movembr"
}).addEvent("dragStart",function(){
var FW=$.$(this),
aee=$.$(this).find("a[un='name']");
$.$("#dragHelper").html('移动 "'+aee.html()+'"').show();
$.$("#rightMain tr[drag='1']").rmAttr("dragOn");
FW.attr("dragOn","true");

cBg();
}).addEvent("dragStop",function()
{
$.$("#rightMain tr[dragOn='true']").rmAttr("dragOn");
});
function cBg(){
$.$("#mbrListTree a[dr='1']")
.droppable(
{
overByCursor:true,
group:"movembr"
}).each(function(Kd)
{
$.$(Kd).attr("dr","0");
}).addEvent("dropOverLong",function()
{
var hP=$.$(this).parents("li");
if(hP.hasClass("closed"))
{
$.$(hP.data(0).firstChild.firstChild).fireEvent("click");

setTimeout(function()
{
cBg();
},50);
}
}).addEvent("dropOver",function()
{
$.$(this).addClass("move_in").addClass("cursor_change");
$.$("#mbrListTree a.selected2").rmClass("selected2");
}).addEvent("dropOut",function()
{
$.$("#mbrListTree a").rmClass("move_in").rmClass("cursor_change").rmClass("selected2");
}).addEvent("drop",function()
{
var adK=$.$(this),
JR=adK.attr("nid"),
FW=$.$("#rightMain tr[dragOn='true']"),
Yj=FW.attr("partyid");
$.$("#mbrListTree a").rmClass("move_in").rmClass("cursor_change").rmClass("selected2");

setTimeout(function(){
FW.rmAttr("dragOn");
JR!==Yj&&
al.bAE(adK.attr("nid"),[FW.find("input").data(0)],function(){FW.remove()});
});
});
}
},
cpz:function(cSK)
{
var al=this,
$=al.$;
$.$("#import").hide();
$.$("#preview").html(cSK).show();
},
dvZ:function(ciZ,cpL,cfX,mJ)
{
debug([ciZ,cpL,cfX,mJ]);
var al=this;
al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",$.sid(),
"&t=biz_rf_mgr&action=import_partyuser&step=post",
"&partyid=",ciZ,"&cpwdlogin=",cpL,"&overwrite=",cfX,
"&verifycode=",mJ].join(""),
onsuccess:function(aE)
{
al.hash("mbr/import/query/"+aE.data.fileid);
},
onclienterror:function(qY,kr)
{
al.showErr(kr);
if(-202==qY)
{
var dU=al.dom$().find("[un='verifycode']");
dU.find("[ck='changeVCImage']").fireEvent("click");
dU.find("input").data(0).value="";
dU.find("input").data(0).focus();
}
}
}
);
},
dzR:function()
{
var al=this,
bc=al.dom$(),
ds=ay.sid(),
avr,gl,
cmi=function()
{
var bIo=bc.find("#queryMessage"),
dmK=bc.find("#status");
avr&&clearTimeout(avr);
if(bIo.size())
{
return(
{
Df:bIo,
asu:dmK,
PK:bIo.attr("fid")
});
}
},
cCj=function()
{
(gl=cmi())&&al.ajax(
{
sUrl:["/cgi-bin/bizmail_account?sid=",ds,"&t=biz_rf_mgr&action=import_partyuser"
,"&fileid=",gl.PK,"&step=query&r="+ay.unikey()].join(""),
onsuccess:function(gs)
{
(gl=cmi())&&cVa(gl.Df,gl.asu,gs.data);
al.clearCache("");
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"导入成员监视失败");
}
});
},
cVa=function(bjZ,crH,bKM)
{
switch(bKM.status)
{
case"0":
bjZ.html("导入完成");
crH.html(dK.oImportStatus.replace(bKM));
bc.find("#statusmore").show();
break;
case"1":
bc.find("#statusmore").hide();
bjZ.html("正在分析数据文件...");
cyG();
break;
case"2":
bjZ.html("正在导入成员...");
crH.html(dK.oImportStatus.replace(bKM));
cyG();
break;
default:
bjZ.html("导入失败");
break;
}
},
cyG=function()
{
avr&&clearTimeout(avr);
fcO=setTimeout(cCj,2000);
};
cCj();
},
postSuccess:function(gs)
{
var al=this;
gs.action=="import_partyuser"&&al.cpz(gs.data);
gs.action=="import_group"&&al.cpz(gs.data);
return al;
},
eZk:function(aA)
{

var hi=this.$.$(aA).attr("alias");
hi&&this.hash("#mbr/group/edit/"+hi,true);
},
bVC:function()
{
var auB=this.$.$("[un='slave']"),
atM=this.$.$("[un='slaveTitle']");
this.dom$().attr("listShowAlias","on");
auB.show()&&atM.hide()
},
bXa:function()
{
var auB=this.$.$("[un='slave']"),
atM=this.$.$("[un='slaveTitle']");
this.dom$().attr("listShowAlias","off");
auB.hide()&&atM.show();
},
boI:function()
{
var Ln=this.dom$().find("#aliasList"),
lT=parseInt(Ln.attr("max"));
if(Ln.find("input").size()<lT)
{
Ln.append(
al.dom$().find("div[un='aliasexample']").html());
}
else
{
al.showErr(["最多允许设置",lT,"个别名"].join(""));
}
},
bXR:function(bnG,cAV)
{
var bwy="";
$.each(bnG,function(lU)
{
bwy+=dK.oDomainOpt.replace(
{
domain:lU,
selected:cAV==lU?"selected":""
});
});
return bwy;
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
aTe=$.ctrl("FormValid");
Om=gX.getPartyRootId();
}
}
);
}
);
}
);
$.package(
"biz/ctrl/crm/crm.js",
[
"biz/ctrl/mod.js",
"biz/lib/auth.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
bso=ay.lib("B.Data.Auth");

function getQuery()
{
return bso.isOwner()?"&isowner=1":"";
};

ay.createCtrl(
"B.CRM",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
rule:function()
{
return(
{
click:
{
addrDel:{},
checkAll:{},
checkThis:{}
}
});
},
route:function()
{
var ds=$.sid();
return(
["crm",
[
["addr/new",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?t=biz_rf_crm_addr&sid="+ds+"&action=&tt=edit",
sAction:"addrEdit"
}],
["addr/view/{addrid}",
{
bCache:false,
sUrl:"/cgi-bin/addr_detail?category=crmaddr&AddrID={addrid}&t=biz_rf_crm_addr&sid="+ds+"&action=addr_view&tt=view"+getQuery()
}],
["addr/edit/{addrid}",
{
bCache:false,
sUrl:"/cgi-bin/addr_detail?category=crmaddr&AddrID={addrid}&t=biz_rf_crm_addr&sid="+ds+"&action=addr_save&tt=edit"+getQuery(),
sAction:"addrEdit"
}],
["addr/import,{limit}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?t=biz_rf_crm_addr&sid="+ds+"&action=&tt=import0&l={limit}"
}],
["addr/import/{count}",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?t=biz_rf_crm_addr&sid="+ds+"&action=&tt=import1&count={count}"
}],
["addr/export",
{
bCache:true,
sUrl:"/cgi-bin/bizmail?t=biz_rf_crm_addr&sid="+ds+"&action=&tt=export"
}],
["addr",
{
bCache:false,
sUrl:"/cgi-bin/addr_listall?category=crmaddr&t=biz_rf_crm_addr&sid="+ds+"&tt=list"+getQuery()
}]
]
]
);
},
actions:function()
{
return(
{
addrEdit:function()
{
var al=this;
al.ajaxForm(
{
onsuccess:function(aE)
{
al.showMsg("保存成功").hash("crm/addr",true);
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"保存失败");
}
});
}
}
);
},
events:function()
{
return(
{
addrDel:function(_aoEvent,aA,aM)
{
var al=this,
de=al.$.$(aA),
aVr=[];

if(""!=de.attr("addrid"))
{
aVr.push(de.attr("addrid"));
}
else
{
al.ddh("addrid",aVr);
}

if(0==aVr.length)
{
al.showErr("未选中任何联系人");
return;
}
else if(confirm("您确定要删除这"+aVr.length+"个联系人吗？"))
{
al.dcX(aVr);
}
},
checkAll:function(_aoEvent,aA,aM)
{
var al=this;
al.dom$().find("input[ck='checkThis']").attr("checked",aA.checked);


},
checkThis:function(_aoEvent,aA,aM)
{
var al=this,
dzI=false;
cyO=true;
al.$.$("input[ck='checkThis']").each(function(cE){
cE.checked&&(dzI=true)||(cyO=false);
});

al.dom$().find("input[ck='checkAll']").attr("checked",cyO);


}
}
);
},
dcX:function(dwN)
{
var al=this;
al.ajax(
{
sType:"POST",
sUrl:"/cgi-bin/addr_del",
vData:"sid="+$.sid()+"&t=biz_rf_mgr&AddrID="+dwN.join("&AddrID="),
nTimeout:10*1000,
onsuccess:function()
{
al.showMsg("删除成功").hash("crm/addr",true);
},
onerrorhandle:function(aE)
{
if("0"==aE.retcode)
{
al.showMsg("删除成功").hash("crm/addr",true);
}
else
{
al.showErr(aE.errmsg||"删除失败");
}
}
});
},
ddh:function(jj,kj)
{
this.dom$().find("input[ck='checkThis']").each(function(cE)
{
cE.checked&&kj.push(cE.getAttribute(jj));
});
},
postSuccess:function(aE)
{
var al=this;
al.hash("crm/addr/import/"+aE.data.count);
},
postError:function(aE)
{
var al=this;
if(-101==aE.retcode)
{
al.showErr("导入联系人超出限制");
}
else
{
al.showErr("导入失败，请检查文件格式");
}
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
});
}
);
}
);
$.package(
"biz/ctrl/mailBackup.js",
[
"comm/ui/dialog.js",
"biz/ctrl/member/exautocomplete.js",
"biz/ctrl/mod.js",
"biz/lib/commdata.js"
],
function(bu)
{
var ay=QMWin,
bq=ay.ctor_(),
gX=ay.lib("B.Data.commdata"),
cAO=ay.T([
'<div un="dlg">',
'<div class="mainColumn" valid="$valid$" validMsg="$msg$" >',
'<div class="labelText left">$label$：</div>',
'<input type="text" class="txt" style="width:240px;" value="$value$" _autocomplete_="1" autocomplete="off"/>',
'<div class="errimgnone" style="padding-left:77px">',
'<span un="validMsg"></span>',
'</div>',
'</div>',
'<div class="submitColumn btnColumn">',
'<a ck="cancel" class="btn btnNormal btnCancel right">取消</a><a ck="submit" class="btn btnComfirm right">确认</a>',
'</div>',
'</div>'
]);

function cqO(bog,bpt)
{
return(
{
oRule:
{
click:
{
submit:{sContext:"dlg"},
cancel:{}
}
},
oEvents:
{
submit:function(_aoEvent,aA,aM)
{
bog(ay.$(aM).find("input").attr("value"));
},
cancel:bpt
}
});
}
function bOy(Lo)
{
var al=Lo;
al.$("[_autocomplete_='1']").exautocomplete(
{
vMaxHeight:170,
sClass:"exautocmp",
vData:function(gy)
{
var sF=gX.findUsers(gy),aO=[];
for(var i=0;i<sF.length;i++)
{
var fA=sF[i];
aO.push(
{
sHtml:['<a class="line" title="',fA.alias,'">"',fA.name,'" &lt;',fA.alias,'&gt;</a>'].join(""),
oUser:fA
});
}
return aO;
},
onselect:function(aE)
{
if(aE&&aE.oUser)
{
al.$("[_autocomplete_='1']").attr("value",aE.oUser.alias);
}
}
});
}
ay.createCtrl(
"B.MailBackup",
{sSuper:"B.Mod",bStatic:true},
function(bm)
{
return(
{
validLibs:function()
{
return[{name:"FormValid.Default"},{name:"B.Valid"}];
},
eventLibs:function()
{
return[];
},
pageLibs:function()
{
return[];
},
rule:function()
{
return(
{
click:
{
setBakup:{sContext:"bakup"},
setBakupDlg:{sContext:"bakup"},
delBakup:{sContext:"bakup"},
addFilter:{sContext:"filter"},
delFilter:{sContext:"filter"}
}
});
},
route:function()
{
var ds=$.sid();
return(
["mailBackup",
[
["filter/{ruletype}[,{filterid}]",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds
+"&action=lst_filter&t=biz_rf_mailBackup&tt=filter&ruletype={ruletype}&filterid={filterid}",
sAction:"add"
}],
["redirect",
{
sAction:"redirect"
}],
["",
{
bCache:false,
sUrl:"/cgi-bin/bizmail_setting?sid="+ds
+"&action=lst_filter&t=biz_rf_mailBackup&tt=",
sAction:"list"
}]
]
]
);
},
actions:function()
{
return(
{
add:function()
{
var al=this;

al.$.$("select[name='tagid']").on("click",function()
{
debug(al.$.$("select[name='tagid']").data(0).options.length);
(1==al.$.$("select[name='tagid']").data(0).options.length)&&al.cxa();
})
.on("change",function()
{
debug(al.$.$("select[name='tagid']").data(0).options.length);
var Rk=al.$.$("select[name='tagid']");
if(-1==Rk.data(0).value)
{
Rk.data(0).selectedIndex=0;
al.cxa();
}
});

bOy(al.$);
},
list:function()
{
var al=this;
bOy(al.$);
},
redirect:function()
{
this.hash("mailBackup","mailBackup");
}
}
);
},
events:function()
{
return(
{
setBakup:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
hi=$.trim(dU.find("input[name='alias']").attr("value"));

al.valid_(dU)&&al.ajax(
{
sUrl:"/cgi-bin/bizmail_setting?sid="+ay.sid()
+"&t=biz_rf_mgr&action=set_bakup&alias="+hi
+"&ef=js&resp_charset=UTF8",
onsuccess:function()
{
al.showMsg("保存成功").hash("mailBackup/redirect");
}
});
},
setBakupDlg:function(_aoEvent,aA,aM)
{
var al=this;
dU=al.$.$(aM),
fS=$.$("<div>")
.html(cAO.replace({label:"备份邮箱",value:"",valid:"email",msg:"请输入成员帐号"}))
.dialog($.extend({sTitle:"设置备份邮箱",nWidth:400},cqO(
function(VU)
{
if(al.valid_(fS.find("[un='dlg']")))
{
fS.dialog("close");
al.ajax(
{
sUrl:["/cgi-bin/bizmail_setting?sid=",ay.sid(),
"&t=biz_rf_mgr&action=set_bakup&alias=",encodeURIComponent(VU),
"&ef=js&resp_charset=UTF8"
].join(""),
onsuccess:function(gs)
{
al.showMsg("保存成功").hash("mailBackup/redirect");
}
});
}
},
function()
{
fS.dialog("close");
})));
try
{
bOy(fS);
fS.find("input").focus();
}catch(ex){}
},
delBakup:function(_aoEvent,aA,aM)
{
var al=this;

confirm("确定撤销备份邮箱吗？\n撤销后，已有的备份规则会被全部清空。")&&al.ajax(
{
sUrl:"/cgi-bin/bizmail_setting?sid="+ay.sid()
+"&t=biz_rf_mgr&action=set_bakup&alias="
+"&ef=js&resp_charset=UTF8",
onsuccess:function()
{
al.showMsg("保存成功").hash("mailBackup/redirect");
}
});
},
addFilter:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
bJs=dU.find("input[name='filterid']").attr("value"),
cj=4,
dwn=dU.find("input[name='ruletype']").attr("value"),
Vk=dU.find("select[name='tagid']").attr("value"),
cP=dU.find("input[name='content']").attr("value");

$.each(dU.find("input[name='type']"),function(cE)
{
cE.checked&&(cj=cE.value);
});

al.valid_(dU)&&al.ajax(
{
sUrl:
[
"/cgi-bin/bizmail_setting?action=add_filter&t=biz_rf_mgr&sid=",ay.sid(),
"&filterid=",bJs,
"&type=",cj,
"&ruletype=",dwn,
"&tagid=",Vk,
"&content=",encodeURIComponent(cP),
"&ef=js&resp_charset=UTF8"
].join(""),

onsuccess:function()
{
al.showMsg("保存成功").hash("mailBackup/redirect");
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"保存失败");
}
});
},
delFilter:function(_aoEvent,aA,aM)
{
var al=this,
dU=al.$.$(aM),
bJs=dU.attr("filterid");

al.ajax(
{
sUrl:"/cgi-bin/bizmail_setting?sid="+ay.sid()
+"&t=biz_rf_mgr&action=del_filter&filterid="+bJs
+"&ef=js&resp_charset=UTF8",
onsuccess:function()
{
al.showMsg("删除成功").hash("mailBackup/redirect");
},
onclienterror:function(qY,kr)
{
al.showErr(kr||"删除失败");
}
});
}
});
},
cxa:function()
{
var al=this;
rz=al.$.$("select[name='tagid']").data(0),
fS=$.$("<div>")
.html(cAO.replace({label:"标签名称",value:"",valid:"empty|mailtag",msg:"标签名称|标签名称不能包含符号或特殊字符"}))
.dialog($.extend({sTitle:"新建标签",nWidth:400},cqO(
function(VU)
{
if(al.valid_(fS.find("[un='dlg']")))
{
fS.dialog("close");
al.ajax(
{
sUrl:["/cgi-bin/bizmail_setting?sid=",ay.sid(),
"&t=biz_rf_mgr&action=add_tag&tagname=",encodeURIComponent(VU)+"&ef=js&resp_charset=UTF8"
].join(""),
onsuccess:function(gs)
{
var aO=gs.data,
TX=rz.options.length;
rz.options.add(new Option(aO.name,aO.id),TX-1);
rz.selectedIndex=TX-1;
al.showMsg("保存成功");
}
});
}
},
function()
{
fS.dialog("close");
})));
try
{
fS.find("input").focus();
}catch(ex){}
},
postSuccess:function(aE)
{
var al=this;
al.hash("synrtx/result/"+aE.data.fileid);
},
postError:function(aE)
{
var al=this;
al.showErr(aE.errmsg);
},
init_:function(aI)
{
var al=this.superEx_(bm,"init_",[aI]);
}
}
);
}
);
}
)
