
// Copyright (C) 2005-2009 Zimbra Inc. http://www.zimbra.com/
if(AjxPackage.define("Ajax")){if(AjxPackage.define("ajax.core.AjxCore")){AjxCore=function(){};
AjxCore._objectIds=[null];
AjxCore.assignId=function(A){var B=AjxCore._objectIds.length;
AjxCore._objectIds[B]=A;
return B
};
AjxCore.unassignId=function(A){AjxCore._objectIds[A]=null
};
AjxCore.objectWithId=function(A){return AjxCore._objectIds[A]
};
AjxCore.addListener=function(C,A,B){C=AjxCore._getEventSource(C);
var D=AjxCore._getListenerStruct(C,A,true);
D.list[D.list.length]=B
};
AjxCore.setEventHandler=function(C,A,B){C=AjxCore._getEventSource(C);
var D=AjxCore._getListenerStruct(C,A,true);
D.single=B
};
AjxCore.removeListener=function(E,B,D){E=AjxCore._getEventSource(E);
var F=AjxCore._getListenerStruct(E,B);
if(F){var G=F.list;
var A=G.length;
for(var C=0;
C<A;
C++){if(G[C]==D){G[C]=null
}}}};
AjxCore.removeAllListeners=function(D,B){D=AjxCore._getEventSource(D);
var E=AjxCore._getListenerStruct(D,B);
if(E){var F=E.list;
var A=F.length;
for(var C=0;
C<A;
C++){F[C]=null
}}AjxCore.unassignId(E.id)
};
AjxCore.notifyListeners=function(C,A,B){C=AjxCore._getEventSource(C);
var D=AjxCore._getListenerStruct(C,A);
if(D){C[A](B)
}};
AjxCore._getEventSource=function(A){if(typeof (A)=="string"){A=document.getElementById(A)
}return A
};
AjxCore.getListenerStruct=function(B,A){return AjxCore._getListenerStruct(B,A)
};
AjxCore._getListenerStruct=function(C,A,B){var D=null;
if(C[A]){var E=C[A]._lsListenerStructId;
D=AjxCore.objectWithId(E)
}else{if(B){D=AjxCore._setupListener(C,A)
}}return D
};
AjxCore._setupListener=function(C,A,E){var D=new Object();
D.list=new Array();
D.single=null;
var E=D.id=AjxCore.assignId(D);
var B=AjxCore._createListenerClosure(E);
C[A]=B;
C[A]._lsListenerStructId=E;
return D
};
AjxCore._createListenerClosure=function(id){var closure=function(arg1){var listenerStruct=AjxCore.objectWithId(id);
var listenerList=listenerStruct.list;
var len=listenerList.length;
for(var i=0;
i<len;
i++){var callback=listenerList[i];
if(callback){if(typeof (callback)=="string"){eval(callback)
}else{if(callback.handleEvent){callback.handleEvent(arg1,this)
}else{callback(arg1,this)
}}}}if(listenerStruct.single){var callback=listenerStruct.single;
if(typeof (callback)=="string"){eval(callback)
}else{return callback.handleEvent?callback.handleEvent(arg1,this):callback(arg1,this)
}}};
return closure
};
AjxCore.addOnloadListener=function(A){if(window.onload&&(!window.onload._lsListenerStructId)){var B=window.onload;
window.onload=null;
AjxCore.addListener(window,"onload",B)
}AjxCore.addListener(window,"onload",A)
};
AjxCore.addOnunloadListener=function(A){if(window.onunload&&(!window.onunload._lsListenerStructId)){var B=window.onunload;
window.onunload=null;
AjxCore.addListener(window,"onunload",B)
}AjxCore.addListener(window,"onunload",A)
}
}if(AjxPackage.define("ajax.util.AjxUtil")){AjxUtil=function(){};
AjxUtil.FLOAT_RE=/^[+\-]?((\d+(\.\d*)?)|((\d*\.)?\d+))([eE][+\-]?\d+)?$/;
AjxUtil.NOTFLOAT_RE=/[^\d\.]/;
AjxUtil.NOTINT_RE=/[^0-9]+/;
AjxUtil.LIFETIME_FIELD=/^([0-9])+([dhms])?$/;
AjxUtil.isSpecified=function(A){return((A!==void 0)&&(A!==null))
};
AjxUtil.isUndefined=function(A){return(A===void 0)
};
AjxUtil.isNull=function(A){return(A===null)
};
AjxUtil.isBoolean=function(A){return(typeof (A)=="boolean")
};
AjxUtil.isString=function(A){return(typeof (A)=="string")
};
AjxUtil.isNumber=function(A){return(typeof (A)=="number")
};
AjxUtil.isObject=function(A){return((typeof (A)=="object")&&(A!==null))
};
AjxUtil.isArray=function(A){return AjxUtil.isInstance(A,Array)
};
AjxUtil.isFunction=function(A){return(typeof (A)=="function")
};
AjxUtil.isDate=function(A){return AjxUtil.isInstance(A,Date)
};
AjxUtil.isLifeTime=function(A){return AjxUtil.LIFETIME_FIELD.test(A)
};
AjxUtil.isNumeric=function(A){return(!isNaN(parseFloat(A))&&AjxUtil.FLOAT_RE.test(A)&&!AjxUtil.NOTFLOAT_RE.test(A))
};
AjxUtil.isLong=function(A){return(AjxUtil.isNumeric(A)&&!AjxUtil.NOTINT_RE.test(A))
};
AjxUtil.isNonNegativeLong=function(A){return(AjxUtil.isNumeric(A)&&AjxUtil.isLong(A)&&(parseFloat(A)>=0))
};
AjxUtil.isInt=function(A){return(AjxUtil.isNumeric(A)&&!AjxUtil.NOTINT_RE.test(A))
};
AjxUtil.isPositiveInt=function(A){return(AjxUtil.isNumeric(A)&&AjxUtil.isInt(A)&&(parseInt(A)>0))
};
AjxUtil.isEmpty=function(A){return(AjxUtil.isNull(A)||AjxUtil.isUndefined(A)||(A==="")||(AjxUtil.isArray(A)&&(A.length==0)))
};
AjxUtil.IP_ADDRESS_RE=/^\d{1,3}(\.\d{1,3}){3}(\.\d{1,3}\.\d{1,3})?$/;
AjxUtil.IP_ADDRESS_WITH_PORT_RE=/^\d{1,3}(\.\d{1,3}){3}(\.\d{1,3}\.\d{1,3})?:\d{1,5}$/;
AjxUtil.SUBNET_RE=/^\d{1,3}(\.\d{1,3}){3}(\.\d{1,3}\.\d{1,3})?\/\d{1,2}$/;
AjxUtil.DOMAIN_NAME_SHORT_RE=/^[A-Za-z0-9\-]{2,}$/;
AjxUtil.DOMAIN_NAME_FULL_RE=/^[A-Za-z0-9\-]{1,}(\.[A-Za-z0-9\-]{2,}){1,}$/;
AjxUtil.HOST_NAME_RE=/^[A-Za-z0-9\-]{2,}(\.[A-Za-z0-9\-]{1,})*(\.[A-Za-z0-9\-]{2,})*$/;
AjxUtil.HOST_NAME_WITH_PORT_RE=/^[A-Za-z0-9\-]{2,}(\.[A-Za-z0-9\-]{2,})*:([0-9])+$/;
AjxUtil.EMAIL_SHORT_RE=/^[^@\s]+$/;
AjxUtil.EMAIL_FULL_RE=/^[^@\s]+@[A-Za-z0-9\-]{2,}(\.[A-Za-z0-9\-]{2,})+$/;
AjxUtil.SHORT_URL_RE=/^[A-Za-z0-9]{2,}:\/\/[A-Za-z]+[A-Za-z0-9\-]+(\.[A-Za-z]+[A-Za-z0-9\-]+)*(:([0-9])+)*$/;
AjxUtil.IP_SHORT_URL_RE=/^[A-Za-z0-9]{2,}:\/\/\d{1,3}(\.\d{1,3}){3}(\.\d{1,3}\.\d{1,3})?(:([0-9])+)*$/;
AjxUtil.isIpAddress=function(A){return AjxUtil.IP_ADDR_RE.test(A)
};
AjxUtil.isDomain=function(A){return AjxUtil.DOMAIN_RE.test(A)
};
AjxUtil.isHostName=function(A){return AjxUtil.HOST_NAME_RE.test(A)
};
AjxUtil.isDomainName=function(B,A){return A?AjxUtil.DOMAIN_NAME_SHORT_RE.test(B):AjxUtil.DOMAIN_NAME_FULL_RE.test(B)
};
AjxUtil.isEmailAddress=function(B,A){return A?AjxUtil.EMAIL_SHORT_RE.test(B):AjxUtil.EMAIL_FULL_RE.test(B)
};
AjxUtil.SIZE_GIGABYTES="GB";
AjxUtil.SIZE_MEGABYTES="MB";
AjxUtil.SIZE_KILOBYTES="KB";
AjxUtil.SIZE_BYTES="B";
AjxUtil.formatSize=function(E,D,F){if(D==null){D=true
}if(F==null){F=20
}var B=AjxMsg.sizeBytes;
var C=AjxMsg.SIZE_BYTES;
if(E>=1073741824){B=AjxMsg.sizeGigaBytes;
C=AjxUtil.SIZE_GIGABYTES
}else{if(E>=1048576){B=AjxMsg.sizeMegaBytes;
C=AjxUtil.SIZE_MEGABYTES
}else{if(E>1023){B=AjxMsg.sizeKiloBytes;
C=AjxUtil.SIZE_KILOBYTES
}}}var A=AjxUtil.formatSizeForUnits(E,C,D,F);
return AjxMessageFormat.format(AjxMsg.formatSizeAndUnits,[A,B])
};
AjxUtil.formatSizeForUnits=function(D,B,A,F){if(B==null){B=AjxUtil.SIZE_BYTES
}if(A==null){A=true
}if(F==null){F=20
}switch(B){case AjxUtil.SIZE_GIGABYTES:D/=1073741824;
break;
case AjxUtil.SIZE_MEGABYTES:D/=1048576;
break;
case AjxUtil.SIZE_KILOBYTES:D/=1024;
break
}var E=I18nMsg.formatNumber.replace(/\..*$/,"");
E=E.replace(/,/,"");
if(!A&&F){E=E+=".";
for(var C=0;
C<F;
C++){E+="#"
}}return AjxNumberFormat.format(E,D)
};
AjxUtil.parseSize=function(B,D){if(typeof B!=_STRING_){B=B.toString()
}var E=parseFloat(B.replace(/^\s*/,""));
var C=/[GMK]?B$/i;
var A=C.exec(B);
if(A){D=A[0].toUpperCase()
}switch(D){case AjxUtil.SIZE_GIGABYTES:E*=1073741824;
break;
case AjxUtil.SIZE_MEGABYTES:E*=1048576;
break;
case AjxUtil.SIZE_KILOBYTES:E*=1024;
break
}return E
};
AjxUtil.isInstance=function(A,B){return !!(A&&A.constructor&&(A.constructor===B))
};
AjxUtil.assert=function(A,B){if(!A&&AjxUtil.onassert){AjxUtil.onassert(B)
}};
AjxUtil.onassert=function(A){var H=new Object();
H.message=A;
var I=new Array();
if(AjxEnv.isIE5_5up){var C=arguments.caller;
while(C){I[I.length]=C.callee;
C=C.caller
}}else{try{var C=arguments.callee.caller;
while(C){I[I.length]=C;
if(I.length>2){break
}C=C.caller
}}catch(G){}}H.stack=I;
var F="";
var B=170;
for(var D=1;
D<I.length;
D++){if(D>1){F+="\n"
}if(D<11){var E=I[D].toString();
if(E.length>B){E=E.substr(0,B)+"...";
E=E.replace(/\n/g,"")
}F+=D+": "+E
}else{F+="("+(I.length-11)+" frames follow)";
break
}}alert("assertion:\n\n"+A+"\n\n---- Call Stack ---\n"+F);
throw H
};
AjxUtil.ELEMENT_NODE=1;
AjxUtil.TEXT_NODE=3;
AjxUtil.DOCUMENT_NODE=9;
AjxUtil.getInnerText=function(A){if(AjxEnv.isIE){return A.innerText
}function B(E){if(E){if(E.nodeType==3){return E.data
}if(E.nodeType==1){if(/^br$/i.test(E.tagName)){return"\r\n"
}var D="";
for(var C=E.firstChild;
C;
C=C.nextSibling){D+=B(C)
}return D
}}return""
}return B(A)
};
AjxUtil.createProxy=function(C,G){var E;
var B=function(){};
B.prototype=C;
if(C instanceof Array){E=new Array();
var D=C.length;
for(var A=0;
A<D;
A++){E[A]=C[A]
}}else{E=new B
}if(G){for(var F in C){if(typeof C[F]=="object"&&C[F]!==null){E[F]=AjxUtil.createProxy(C[F],G-1)
}}}E._object_=C;
return E
};
AjxUtil.collapseList=function(C){var B=[];
for(var A=0;
A<C.length;
A++){if(C[A]){B.push(C[A])
}}return B
};
AjxUtil.arrayAsHash=function(D){var C={};
for(var B=0;
B<D.length;
B++){var A=D[B];
C[A]=true
}return C
};
AjxUtil.indexOf=function(E,B,A){if(E){for(var C=0;
C<E.length;
C++){var D=E[C];
if((A&&D===B)||(!A&&D==B)){return C
}}}return -1
};
AjxUtil.keys=function(A){var B=[];
for(var C in A){B.push(C)
}return B
};
AjxUtil.values=function(B){var A=[];
for(var C in B){A.push(B[C])
}return A
};
AjxUtil.getFirstElement=function(E,D,C,B){for(var F=E.firstChild;
F;
F=F.nextSibling){if(F.nodeType!=AjxUtil.ELEMENT_NODE){continue
}if(D&&F.nodeName!=D){continue
}if(C){var A=F.getAttributeNode(C);
if(A.nodeName!=C){continue
}if(B&&A.nodeValue!=B){continue
}}return F
}return null
};
AjxUtil.formatUrl=function(F){F=F||{};
var C=[];
var D=0;
if(!F.relative){var E=F.protocol||location.protocol;
C[D++]=E;
C[D++]="//";
C[D++]=F.host||location.hostname;
var B=Number(F.port||location.port);
if(B&&((E==ZmSetting.PROTO_HTTP&&B!=ZmSetting.HTTP_DEFAULT_PORT)||(E==ZmSetting.PROTO_HTTPS&&B!=ZmSetting.HTTPS_DEFAULT_PORT))){C[D++]=":";
C[D++]=B
}}C[D++]=F.path||location.pathname;
var A="";
if(F.qsArgs){A=AjxStringUtil.queryStringSet(F.qsArgs,F.qsReset)
}else{A=F.qsReset?"":location.search
}C[D++]=A;
return C.join("")
};
AjxUtil.byNumber=function(B,A){return Number(B)-Number(A)
};
AjxUtil.LOG={};
AjxUtil.enableLogType=function(B,A){if(A){AjxUtil.LOG[B]=[];
AjxUtil.LOG[B].push("Log type: "+B)
}else{AjxUtil.LOG[B]=null
}};
AjxUtil.log=function(A,B){if(!AjxUtil.LOG[A]){return 
}AjxUtil.LOG[A].push(B)
}
}if(AjxPackage.define("ajax.core.AjxException")){AjxException=function(C,B,D,A){if(arguments.length==0){return 
}this.msg=C;
this.code=B;
this.method=D;
this.detail=A
};
AjxException.prototype.toString=function(){return"AjxException"
};
AjxException.prototype.dump=function(){return"AjxException: msg="+this.msg+" code="+this.code+" method="+this.method+" detail="+this.detail
};
AjxException.INVALIDPARENT="AjxException.INVALIDPARENT";
AjxException.INVALID_OP="AjxException.INVALID_OP";
AjxException.INTERNAL_ERROR="AjxException.INTERNAL_ERROR";
AjxException.INVALID_PARAM="AjxException.INVALID_PARAM";
AjxException.UNIMPLEMENTED_METHOD="AjxException.UNIMPLEMENTED_METHOD";
AjxException.NETWORK_ERROR="AjxException.NETWORK_ERROR";
AjxException.OUT_OF_RPC_CACHE="AjxException.OUT_OF_RPC_CACHE";
AjxException.UNSUPPORTED="AjxException.UNSUPPORTED";
AjxException.UNKNOWN_ERROR="AjxException.UNKNOWN_ERROR";
AjxException.CANCELED="AjxException.CANCELED"
}if(AjxPackage.define("ajax.util.AjxCookie")){AjxCookie=function(){};
AjxCookie.prototype.toString=function(){return"AjxCookie"
};
AjxCookie.getCookie=function(H,B){var I=B+"=";
var D=I.length;
var G=H.cookie.length;
var C=H.cookie;
var F=0;
while(F<G){var E=F+D;
if(C.substring(F,E)==I){var A=C.indexOf(";",E);
if(A==-1){A=C.length
}return unescape(C.substring(E,A))
}F=C.indexOf(" ",F)+1;
if(F==0){break
}}return null
};
AjxCookie.setCookie=function(G,B,D,A,F,C,E){G.cookie=B+"="+escape(D)+((A)?"; expires="+A.toGMTString():"")+((F)?"; path="+F:"")+((C)?"; domain="+C:"")+((E)?"; secure":"")
};
AjxCookie.deleteCookie=function(D,A,C,B){D.cookie=A+"="+((C)?"; path="+C:"")+((B)?"; domain="+B:"")+"; expires=Fri, 31 Dec 1999 23:59:59 GMT"
};
AjxCookie.areCookiesEnabled=function(D){var A="ZM_COOKIE_TEST";
var C="Zimbra";
AjxCookie.setCookie(D,A,C);
var B=AjxCookie.getCookie(D,A);
AjxCookie.deleteCookie(D,A);
return B==C
}
}if(AjxPackage.define("ajax.soap.AjxSoapException")){AjxSoapException=function(C,B,D,A){AjxException.call(this,C,B,D,A)
};
AjxSoapException.prototype.toString=function(){return"AjxSoapException"
};
AjxSoapException.prototype=new AjxException;
AjxSoapException.prototype.constructor=AjxSoapException;
AjxSoapException.INTERNAL_ERROR="INTERNAL_ERROR";
AjxSoapException.INVALID_PDU="INVALID_PDU";
AjxSoapException.ELEMENT_EXISTS="ELEMENT_EXISTS"
}if(AjxPackage.define("ajax.soap.AjxSoapFault")){AjxSoapFault=function(B){if(arguments.length==0){return 
}var G=B.prefix;
var F=G+":Code";
var E=G+":Reason";
var C=G+":Detail";
var H=B.childNodes.length;
for(var D=0;
D<H;
D++){var A=B.childNodes[D];
if(A.nodeName==F){var I=A.firstChild.firstChild.nodeValue;
if(I==(G+":VersionMismatch")){this.faultCode=AjxSoapFault.VERSION_MISMATCH
}else{if(I==(G+":MustUnderstand")){this.faultCode=AjxSoapFault.MUST_UNDERSTAND
}else{if(I==(G+":DataEncodingUnknown")){this.faultCode=AjxSoapFault.DATA_ENCODING_UNKNOWN
}else{if(I==(G+":Sender")){this.faultCode=AjxSoapFault.SENDER
}else{if(I==(G+":Receiver")){this.faultCode=AjxSoapFault.RECEIVER
}else{this.faultCode=AjxSoapFault.UNKNOWN
}}}}}}else{if(A.nodeName==E){this.reason=A.firstChild.firstChild.nodeValue
}else{if(A.nodeName==C){this.errorCode=A.firstChild.firstChild.firstChild.nodeValue
}}}}};
AjxSoapFault.prototype.toString=function(){return"AjxSoapFault"
};
AjxSoapFault.SENDER=-1;
AjxSoapFault.RECEIVER=-2;
AjxSoapFault.VERSION_MISMATCH=-3;
AjxSoapFault.MUST_UNDERSTAND=-4;
AjxSoapFault.DATA_ENCODING_UNKNOWN=-5;
AjxSoapFault.UNKNOWN=-6
}if(AjxPackage.define("ajax.soap.AjxSoapDoc")){AjxSoapDoc=function(){this._soapURI=AjxSoapDoc._SOAP_URI
};
AjxSoapDoc.prototype.toString=function(){return"AjxSoapDoc"
};
AjxSoapDoc._SOAP_URI="http://www.w3.org/2003/05/soap-envelope";
AjxSoapDoc._XMLNS_URI="http://www.w3.org/2000/xmlns";
AjxSoapDoc.create=function(A,C,H,G){var F=new AjxSoapDoc();
F._xmlDoc=AjxXmlDoc.create();
var E=F._xmlDoc.getDoc();
if(!G){G=AjxSoapDoc._SOAP_URI
}F._soapURI=G;
var B=E.createElementNS&&!AjxEnv.isSafari;
var D=B?E.createElementNS(G,"soap:Envelope"):E.createElement("soap:Envelope");
if(!B){D.setAttribute("xmlns:soap",G)
}E.appendChild(D);
var I=B?E.createElementNS(G,"soap:Body"):E.createElement("soap:Body");
D.appendChild(I);
F._methodEl=C&&B?E.createElementNS(C,A):E.createElement(A);
if(C!=null&&!B){if(H==null){F._methodEl.setAttribute("xmlns",C)
}else{F._methodEl.setAttribute("xmlns:"+H,C)
}}I.appendChild(F._methodEl);
return F
};
AjxSoapDoc.createFromDom=function(B){var A=new AjxSoapDoc();
A._xmlDoc=AjxXmlDoc.createFromDom(B);
A._methodEl=A._check(A._xmlDoc);
return A
};
AjxSoapDoc.createFromXml=function(A){var B=new AjxSoapDoc();
B._xmlDoc=AjxXmlDoc.createFromXml(A);
B._methodEl=B._check(B._xmlDoc);
return B
};
AjxSoapDoc.element2FaultObj=function(B){var A=B.firstChild;
if(!AjxEnv.isSafari){if(A!=null&&A.namespaceURI!=AjxSoapDoc._SOAP_URI||A.nodeName!=(B.prefix+":Fault")){return null
}}else{if(A!=null&&A.nodeName!=(B.prefix+":Fault")){return null
}}return new AjxSoapFault(A)
};
AjxSoapDoc.prototype.setMethodAttribute=function(A,B){this._methodEl.setAttribute(A,B)
};
AjxSoapDoc.prototype.set=function(B,I,J,E){var H=this.getDoc();
var A=H.createElementNS&&!AjxEnv.isSafari;
var C=B?(E&&A?H.createElementNS(E,B):H.createElement(B)):H.createDocumentFragment();
if(E&&!A){C.setAttribute("xmlns",E)
}if(I!=null){if(typeof I=="object"){for(var G in I){var D=I[G];
if(G.charAt(0)=="!"){C.setAttribute(G.substr(1),D)
}else{if(D instanceof Array){for(var F=0;
F<D.length;
++F){this.set(G,D[F],C)
}}else{this.set(G,D,C)
}}}}else{C.appendChild(H.createTextNode(I))
}}if(!J){J=this._methodEl
}return J.appendChild(C)
};
AjxSoapDoc.prototype.getMethod=function(){return this._methodEl
};
AjxSoapDoc.prototype.createHeaderElement=function(){var C=this._xmlDoc.getDoc();
var B=C.firstChild;
var D=this.getHeader();
if(D!=null){throw new AjxSoapException("SOAP header already exists",AjxSoapException.ELEMENT_EXISTS,"AjxSoapDoc.prototype.createHeaderElement")
}var A=C.createElementNS&&!AjxEnv.isSafari;
D=A?C.createElementNS(this._soapURI,"soap:Header"):C.createElement("soap:Header");
B.insertBefore(D,B.firstChild);
return D
};
AjxSoapDoc.prototype.getHeader=function(){var B=this._xmlDoc.getDoc();
var A=AjxEnv.isIE?(B.getElementsByTagName(B.firstChild.prefix+":Header")):(B.getElementsByTagNameNS(this._soapURI,"Header"));
return A?A[0]:null
};
AjxSoapDoc.prototype.getBody=function(){var B=this._xmlDoc.getDoc();
var A=AjxEnv.isIE?(B.getElementsByTagName(B.firstChild.prefix+":Body")):(B.getElementsByTagNameNS(this._soapURI,"Body"));
return A?A[0]:null
};
AjxSoapDoc.prototype.getByTagName=function(B){if(B.indexOf(":")==-1){B="soap:"+B
}var A=this.getDoc().getElementsByTagName(B);
if(A.length==1){return A[0]
}else{if(A.length>0){return A
}else{return null
}}};
AjxSoapDoc.prototype.ensureHeader=function(){return(this.getHeader()||this.createHeaderElement())
};
AjxSoapDoc.prototype.getDoc=function(){return this._xmlDoc.getDoc()
};
AjxSoapDoc.prototype.adoptNode=function(B){if(AjxEnv.isFirefox3up||!AjxEnv.isFirefox){try{var C=this.getDoc();
if(C.adoptNode){return C.adoptNode(B,true)
}}catch(A){}}return B.parentNode.removeChild(B)
};
AjxSoapDoc.prototype.getXml=function(){return AjxEnv.isSafari||AjxEnv.isOpera?(AjxXmlDoc.getXml(this._xmlDoc.getDoc())):AjxXmlDoc.replaceInvalidChars(this._xmlDoc.getDoc().xml)
};
AjxSoapDoc.prototype._check=function(B){var C=B.getDoc();
if(C.childNodes.length!=1){throw new AjxSoapException("Invalid SOAP PDU",AjxSoapException.INVALID_PDU,"AjxSoapDoc.createFromXml:1")
}var A=C.firstChild;
if(!AjxEnv.isSafari){if(A.namespaceURI!=AjxSoapDoc._SOAP_URI||A.nodeName!=(A.prefix+":Envelope")||(A.childNodes.length<1||A.childNodes.length>2)){throw new AjxSoapException("Invalid SOAP PDU",AjxSoapException.INVALID_PDU,"AjxSoapDoc.createFromXml:2")
}}else{if(A.nodeName!=(A.prefix+":Envelope")){throw new AjxSoapException("Invalid SOAP PDU",AjxSoapException.INVALID_PDU,"AjxSoapDoc.createFromXml:2")
}}}
}if(AjxPackage.define("ajax.net.AjxRpcRequest")){AjxRpcRequest=function(A){if(!AjxRpcRequest.__inited){AjxRpcRequest.__init()
}this.id=A;
this.__httpReq=AjxRpcRequest.__msxmlVers?(new ActiveXObject(AjxRpcRequest.__msxmlVers)):(new XMLHttpRequest())
};
AjxRpcRequest.TIMEDOUT=-1000;
AjxRpcRequest.__inited=false;
AjxRpcRequest.__msxmlVers=null;
AjxRpcRequest.prototype.toString=function(){return"AjxRpcRequest"
};
AjxRpcRequest.prototype.invoke=function(C,B,F,J,H,G){var A=(J!=null);
this.__httpReq.open((H)?"get":"post",B,A);
if(A){if(G){var D=new AjxTimedAction(this,this.__handleTimeout,[J]);
J._timedActionId=AjxTimedAction.scheduleAction(D,G)
}var I=this;
this.__httpReq.onreadystatechange=function(K){if(window.AjxRpcRequest){AjxRpcRequest.__handleResponse(I,J)
}}
}else{this.__httpReq.onreadystatechange=function(K){}
}if(F){for(var E in F){this.__httpReq.setRequestHeader(E,F[E])
}}this.__httpReq.send(C);
if(A){return this.id
}else{if(this.__httpReq.status==200||this.__httpReq.status==201){return{text:this.__httpReq.responseText,xml:this.__httpReq.responseXML,success:true}
}else{return{text:this.__httpReq.responseText,xml:this.__httpReq.responseXML,success:false,status:this.__httpReq.status}
}}};
AjxRpcRequest.prototype.cancel=function(){AjxRpc.freeRpcCtxt(this);
this.__httpReq.abort()
};
AjxRpcRequest.prototype.__handleTimeout=function(A){this.cancel();
A.run({text:null,xml:null,success:false,status:AjxRpcRequest.TIMEDOUT})
};
AjxRpcRequest.__handleResponse=function(C,D){if(!C||!C.__httpReq){C.cancel();
D.run({text:null,xml:null,success:false,status:500});
return 
}if(C.__httpReq.readyState==4){if(D._timedActionId!==null){AjxTimedAction.cancelAction(D._timedActionId)
}var A=500;
try{A=C.__httpReq.status
}catch(B){}if(A==200||A==201){D.run({text:C.__httpReq.responseText,xml:C.__httpReq.responseXML,success:true,reqId:C.id})
}else{D.run({text:C.__httpReq.responseText,xml:C.__httpReq.responseXML,success:false,status:A,reqId:C.id})
}C.cancel()
}};
AjxRpcRequest.__init=function(){if(!window.XMLHttpRequest&&window.ActiveXObject){var B=["MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
for(var D=0;
D<B.length;
D++){try{var A=new ActiveXObject(B[D]);
AjxRpcRequest.__msxmlVers=B[D];
break
}catch(C){}}if(!AjxRpcRequest.__msxmlVers){throw new AjxException("MSXML not installed",AjxException.INTERNAL_ERROR,"AjxRpc._init")
}}AjxRpcRequest.__inited=true
}
}if(AjxPackage.define("ajax.net.AjxRpc")){AjxRpc=function(){};
AjxRpc.__rpcCache=[];
AjxRpc.__rpcOutstanding={};
AjxRpc.__RPC_CACHE_MAX=50;
AjxRpc.__RPC_COUNT=0;
AjxRpc.__RPC_REAP_AGE=300000;
AjxRpc.invoke=function(C,B,F,K,J,I){var A=(K!=null);
var E=AjxRpc.__getFreeRpcCtxt();
try{var D=E.invoke(C,B,F,K,J,I)
}catch(G){var H=new AjxException();
H.method="AjxRpc.prototype._invoke";
if(G instanceof Error){H.detail=G.message;
H.code=AjxException.NETWORK_ERROR;
H.msg="Network error"
}else{H.detail=G.toString();
H.code=AjxException.UNKNOWN_ERROR;
H.msg="Unknown Error"
}if(!A){AjxRpc.freeRpcCtxt(E)
}throw H
}if(!A){AjxRpc.freeRpcCtxt(E)
}return D
};
AjxRpc.freeRpcCtxt=function(A){if(AjxRpc.__rpcOutstanding[A.id]){AjxRpc.__rpcCache.push(A);
delete AjxRpc.__rpcOutstanding[A.id]
}};
AjxRpc.getRpcRequestById=function(A){return(AjxRpc.__rpcOutstanding[A])
};
AjxRpc.__getFreeRpcCtxt=function(){var A;
if(AjxRpc.__rpcCache.length>0){A=AjxRpc.__rpcCache.pop()
}else{if(AjxRpc.__RPC_COUNT<AjxRpc.__RPC_CACHE_MAX){var B="__RpcCtxt_"+AjxRpc.__RPC_COUNT;
A=new AjxRpcRequest(B);
AjxRpc.__RPC_COUNT++
}else{A=AjxRpc.__reap();
if(!A){throw new AjxException("Out of RPC cache",AjxException.OUT_OF_RPC_CACHE,"AjxRpc.__getFreeRpcCtxt")
}}}AjxRpc.__rpcOutstanding[A.id]=A;
A.timestamp=(new Date()).getTime();
return A
};
AjxRpc.__reap=function(){var A;
var C=(new Date()).getTime();
for(var B in AjxRpc.__rpcOutstanding){A=AjxRpc.__rpcOutstanding[B];
if(A.timestamp+AjxRpc.__RPC_REAP_AGE<C){A.cancel();
delete AjxRpc.__rpcOutstanding[B];
return A
}}return null
}
}if(AjxPackage.define("ajax.util.AjxWindowOpener")){AjxWindowOpener=function(){};
AjxWindowOpener.HELPER_URL="";
AjxWindowOpener.PARAM_INSTANCE_ID="id";
AjxWindowOpener.PARAM_ASYNC="async";
AjxWindowOpener.openBlank=function(B,A,D,C){return AjxWindowOpener.open(AjxWindowOpener.HELPER_URL,B,A,D,C)
};
AjxWindowOpener.open=function(B,C,I,J,E){var G;
if(B&&B!=""){var E=E===true;
var A={callback:J};
var D=AjxCore.assignId(A);
var H=B&&B!=""?(B+"?id="+D+"&async="+E):"";
G=A.window=window.open(H,C,I)
}else{G=window.open("",C,I);
if(J){var F=new AjxTimedAction(J.obj,J.func,J.args);
AjxTimedAction.scheduleAction(F,0)
}}return G
};
AjxWindowOpener.onWindowOpened=function(A){var B=AjxCore.objectWithId(A);
AjxCore.unassignId(A);
if(!B.window.closed&&B.callback){B.callback.run()
}}
}if(AjxPackage.define("ajax.util.AjxVector")){AjxVector=function(){this._array=new Array()
};
AjxVector.prototype.toString=function(D,B){if(B!==true){return this._array.join(D)
}var C=new Array();
for(var E=0;
E<this._array.length;
E++){var A=this._array[E];
if(A!=undefined&&A!=null&&A!=""){C.push(A)
}}return C.join(D)
};
AjxVector.fromArray=function(B){var A=new AjxVector();
A._array.length=0;
if(B instanceof Array){A._array=B
}return A
};
AjxVector.prototype.size=function(){return this._array.length
};
AjxVector.prototype.add=function(C,A,B){if(B&&this.contains(C)){return 
}if(A==null||A<0||A>=this._array.length){this._array.push(C)
}else{this._array.splice(A,0,C)
}};
AjxVector.prototype.addList=function(A){if(!A){return 
}if(A.length){this._array=this._array.concat(A)
}else{if(A.size&&A.size()){this._array=this._array.concat(A._array)
}}};
AjxVector.prototype.remove=function(B){for(var A=0;
A<this._array.length;
A++){if(this._array[A]==B){this._array.splice(A,1);
return true
}}return false
};
AjxVector.prototype.removeAt=function(B){if(B>=this._array.length||B<0){return null
}var C=this._array.splice(B,1);
var A=null;
if(C){A=C[0]
}return A
};
AjxVector.prototype.removeAll=function(){for(var A=0;
A<this._array.length;
A++){this._array[A]=null
}this._array.length=0
};
AjxVector.prototype.removeLast=function(){return this._array.length>0?this._array.pop():null
};
AjxVector.prototype.replace=function(C,B){var A=this._array[C];
this._array[C]=B;
return A
};
AjxVector.prototype.replaceObject=function(C,A){for(var B=0;
B<this._array.length;
B++){if(this._array[B]==C){this._array[B]=A;
return C
}}return null
};
AjxVector.prototype.indexOf=function(B){if(B==null){return -1
}for(var A=0;
A<this._array.length;
A++){if(this._array[A]==B){return A
}}return -1
};
AjxVector.prototype.indexOfLike=function(D,C){var B=C.call(D);
for(var A=0;
A<this._array.length;
A++){var E=C.call(this._array[A]);
if(E==B){return A
}}return -1
};
AjxVector.prototype.clone=function(){var A=new AjxVector();
A.addList(this);
return A
};
AjxVector.prototype.contains=function(B){for(var A=0;
A<this._array.length;
A++){if(this._array[A]==B){return true
}}return false
};
AjxVector.prototype.containsLike=function(D,C){var B=C.call(D);
for(var A=0;
A<this._array.length;
A++){var E=C.call(this._array[A]);
if(E==B){return true
}}return false
};
AjxVector.prototype.get=function(A){return A>=this._array.length||A<0?null:this._array[A]
};
AjxVector.prototype.getArray=function(){return this._array
};
AjxVector.prototype.getLast=function(){return this._array.length==0?null:this._array[this._array.length-1]
};
AjxVector.prototype.getNext=function(B){var A=this.indexOf(B);
if(A==-1){return null
}return this.get(++A)
};
AjxVector.prototype.getPrev=function(B){var A=this.indexOf(B);
if(A==-1){return null
}return this.get(--A)
};
AjxVector.prototype.sort=function(A){if(!A){A=AjxVector._defaultArrayComparator
}this._array.sort(A)
};
AjxVector.prototype.binarySearch=function(F,G){if(!G){G=AjxVector._defaultArrayComparator
}var C=0;
var A=this._array;
var D=A.length-1;
while(true){if(D<C){return -1
}var E=Math.floor((C+D)/2);
var B=G(F,A[E]);
if(B<0){D=E-1
}else{if(B>0){C=E+1
}else{return E
}}}};
AjxVector.prototype.merge=function(E,D){if(E<0){return 
}var F=D instanceof AjxVector?D.getArray():D;
var A=this._array.length<(E+F.length)?this._array.length:E+F.length;
if(E<this._array.length){var C=0;
for(var B=E;
B<A;
B++){this._array[B]=F[C++]
}if(C<F.length){this._array=this._array.concat(F.slice(C))
}}else{this._array=this._array.concat(F)
}};
AjxVector._defaultArrayComparator=function(B,A){return B<A?-1:(B>A?1:0)
};
AjxVector.prototype.foreach=function(D,E){var A=this.size(),B=0,C;
if(typeof D=="function"){while(--A>=0){D.call(E,this.get(B),B++)
}}else{while(--A>=0){C=this.get(B++);
if(C!=null){C[D].call(C)
}}}};
AjxVector.prototype.map=function(D,E){var A=[],B=this.size(),C;
if(typeof D=="function"){while(--B>=0){A[B]=D.call(E,this.get(B),B)
}}else{if(D instanceof AjxCallback){while(--B>=0){A[B]=D.run(this.get(B),B)
}}else{while(--B>=0){C=this.get(B);
if(C!=null){if(typeof C[D]=="function"){A.unshift(C[D].call(C))
}else{A.unshift(C[D])
}}}}}return AjxVector.fromArray(A)
};
AjxVector.prototype.join=function(A){return this._array.join(A)
};
AjxVector.prototype.sub=function(E,F){var B=[],A=this.size(),C=0,D;
while(--A>=0){D=this.get(C++);
if(!E.call(F,D,C)){B.push(D)
}}return AjxVector.fromArray(B)
}
}if(AjxPackage.define("ajax.util.AjxStringUtil")){AjxStringUtil=function(){};
AjxStringUtil.TRIM_RE=/^\s+|\s+$/g;
AjxStringUtil.COMPRESS_RE=/\s+/g;
AjxStringUtil.ELLIPSIS=" ... ";
AjxStringUtil.makeString=function(A){return A?String(A):""
};
AjxStringUtil.capitalize=function(A){return A.charAt(0).toUpperCase()+A.substr(1).toLowerCase()
};
AjxStringUtil.toMixed=function(F,A,D){if(!F||(typeof F!="string")){return""
}A=A||/\s+/;
var C=F.split(A);
var E=[];
E.push(D?C[0].toLowerCase():C[0].substring(0,1).toUpperCase()+C[0].substring(1).toLowerCase());
for(var B=1;
B<C.length;
B++){E.push(C[B].substring(0,1).toUpperCase()+C[B].substring(1).toLowerCase())
}return E.join("")
};
AjxStringUtil.trim=function(E,A,D){if(!E){return""
}var C=AjxStringUtil.TRIM_RE;
var B=AjxStringUtil.COMPRESS_RE;
if(D){C=new RegExp("^"+D+"+|"+D+"+$","g");
B=new RegExp(D+"+","g")
}else{D=" "
}E=E.replace(C,"");
if(A){E=E.replace(B,D)
}return E
};
AjxStringUtil.repeat=function(D,A){var C="";
for(var B=0;
B<A;
B++){C+=D
}return C
};
AjxStringUtil.getUnitsFromSizeString=function(B){var C="px";
if(typeof (B)=="string"){var A=Number(parseInt(B,10)).toString();
if(B.length>A.length){C=B.substr(A.length,(B.length-A.length));
if(!(C=="em"||C=="ex"||C=="px"||C=="in"||C=="cm"==C=="mm"||C=="pt"||C=="pc"||C=="%")){C="px"
}}}return C
};
AjxStringUtil.split=function(I,D){if(!I){return[]
}var F=0;
D=D?D:",";
var K=new Object();
if(typeof D=="string"){K[D]=1
}else{for(F=0;
F<D.length;
F++){K[D[F]]=1
}}var A=false;
var C=0;
var B=0;
var J;
var G=[];
var E=0;
for(F=0;
F<I.length;
F++){var H=I.charAt(F);
if(H=='"'){A=!A
}else{if(H=="("){C++
}else{if(H==")"){C--
}else{if(K[H]){if(!A&&!C){J=I.substring(B,F);
G[E++]=J;
B=F+1
}}}}}}J=I.substring(B,I.length);
G[E++]=J;
return G
};
AjxStringUtil.wordWrap=function(F){if(!(F&&F.text)){return""
}var M=F.text;
var I=F.len||80;
var E=F.pre||"";
I-=E.length;
var J=F.eol||(F.htmlMode?"<br>":"\n");
if(F.htmlMode){var N=M.split(AjxStringUtil.HTML_BR_RE);
var C=[];
if(N.length>0){for(var G=0;
G<N.length;
G++){C.push(N[G].replace(/(<div\s+[^>]*>)/gi,"$1"+E))
}M=E+C.join(J+E)
}return M
}var H=[];
var K=0;
M=AjxStringUtil.trim(M,false);
M=M.replace(/[ \t]+\n/g,"\n");
if(F.compress){M=M.replace(/\b\n\b/g," ")
}var L=M.length;
for(var G=0,D=0,B=-1;
G<L;
G++){var A=M.charAt(G);
if(A.match(/[ \t]/)){B=G
}if(A=="\n"){H[K++]=E+M.substring(D,G);
D=G+1;
B=-1
}if(G-D>=I){if(B==-1){if(F.breakOkay){H[K++]=E+M.substring(D,G);
D=G;
B=-1
}}else{H[K++]=E+M.substring(D,B);
D=B+1;
B=-1
}}}if(G>D){H[K++]=E+M.substring(D,G)
}return H.join(J)+J
};
AjxStringUtil.IS_PRINT_CODE={};
var print_codes=[32,48,49,50,51,52,53,54,55,56,57,59,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,96,97,98,99,100,101,102,103,104,105,106,107,109,110,111,186,187,188,189,190,191,192,219,220,221,222];
var l=print_codes.length;
for(var i=0;
i<l;
i++){AjxStringUtil.IS_PRINT_CODE[print_codes[i]]=true
}AjxStringUtil.isPrintKey=function(A){return AjxStringUtil.IS_PRINT_CODE[A]
};
AjxStringUtil.SHIFT_CHAR={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'};
AjxStringUtil.shiftChar=function(A,B){return B?AjxStringUtil.SHIFT_CHAR[A]||String.fromCharCode(A):String.fromCharCode(A)
};
AjxStringUtil.diffPoint=function(D,C){if(!(D&&C)){return 0
}var A=Math.min(D.length,C.length);
var B=0;
while(B<A&&(D.charAt(B)==C.charAt(B))){B++
}return B
};
AjxStringUtil.resolve=function(B,A){return AjxMessageFormat.format(B,A)
};
AjxStringUtil.urlEncode=function(B){if(!B){return""
}var A=window.encodeURL||window.encodeURI;
return A(B)
};
AjxStringUtil.urlComponentEncode=function(B){if(!B){return""
}var A=window.encodeURLComponent||window.encodeURIComponent;
return A(B)
};
AjxStringUtil.ENCODE_MAP={">":"&gt;","<":"&lt;","&":"&amp;"};
AjxStringUtil.htmlEncode=function(D,C,A){if(!D){return""
}if(A){var B=/&(lt|gt|amp"+(includeSpaces ? ("|nbsp") : "")+");/;
if(D.match(B)){return D
}}if(!AjxEnv.isSafari||AjxEnv.isSafariNightly){if(C){return D.replace(/[<>&]/g,function(E){return AjxStringUtil.ENCODE_MAP[E]
}).replace(/  /g," &nbsp;")
}else{return D.replace(/[<>&]/g,function(E){return AjxStringUtil.ENCODE_MAP[E]
})
}}else{if(C){return D.replace(/[&]/g,"&amp;").replace(/  /g," &nbsp;").replace(/[<]/g,"&lt;").replace(/[>]/g,"&gt;")
}else{return D.replace(/[&]/g,"&amp;").replace(/[<]/g,"&lt;").replace(/[>]/g,"&gt;")
}}};
AjxStringUtil.htmlDecode=function(B,A){if(A){B=B.replace(/&nbsp;/g," ")
}return B.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")
};
AjxStringUtil.stripTags=function(B,A){if(!B){return""
}if(A){B=B.replace(/(<(\w+)[^>]*>).*(<\/\2[^>]*>)/,"$1$3")
}return B.replace(/<\/?[^>]+>/gi,"")
};
AjxStringUtil.convertToHtml=function(A){if(!A){return""
}A=A.replace(/&/mg,"&amp;").replace(/  /mg," &nbsp;").replace(/^ /mg,"&nbsp;").replace(/\t/mg,"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;").replace(/</mg,"&lt;").replace(/>/mg,"&gt;").replace(/\r?\n/mg,"<br>");
return A
};
AjxStringUtil.SPACE_ENCODE_MAP={" ":"&nbsp;",">":"&gt;","<":"&lt;","&":"&amp;","\n":"<br>"};
AjxStringUtil.htmlEncodeSpace=function(A){if(!A){return""
}return A.replace(/[&]/g,"&amp;").replace(/ /g,"&nbsp;").replace(/[<]/g,"&lt;").replace(/[>]/g,"&gt;")
};
AjxStringUtil.nl2br=function(A){if(!A){return""
}return A.replace(/^ /mg,"&nbsp;").replace(/\t/mg,"<span style='white-space:pre'>\t</span>").replace(/\n/g,"<br>")
};
AjxStringUtil.xmlEncode=function(A){if(A){A=""+A;
return A.replace(/&/g,"&amp;").replace(/</g,"&lt;")
}return""
};
AjxStringUtil.xmlDecode=function(A){return A?A.replace(/&amp;/g,"&").replace(/&lt;/g,"<"):""
};
AjxStringUtil.xmlAttrEncode=function(A){return A?A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\x22/g,"&quot;").replace(/\x27/g,"&apos;"):""
};
AjxStringUtil.xmlAttrDecode=function(A){return A?A.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&apos;/g,"'"):""
};
AjxStringUtil.__RE_META={" ":" ","\n":"\\n","\r":"\\r","\t":"\\t"};
AjxStringUtil.__reMetaEscape=function(B,A){return AjxStringUtil.__RE_META[A]||"\\"+A
};
AjxStringUtil.regExEscape=function(A){return A.replace(/(\W)/g,AjxStringUtil.__reMetaEscape)
};
AjxStringUtil._calcDIV=null;
AjxStringUtil.calcDIV=function(){if(AjxStringUtil._calcDIV==null){AjxStringUtil._calcDIV=document.createElement("div");
AjxStringUtil._calcDIV.style.zIndex=0;
AjxStringUtil._calcDIV.style.position=DwtControl.ABSOLUTE_STYLE;
AjxStringUtil._calcDIV.style.visibility="hidden";
document.body.appendChild(AjxStringUtil._calcDIV)
}return AjxStringUtil._calcDIV
};
AjxStringUtil.clip=function(A,F,E){var D=AjxStringUtil.calcDIV();
if(arguments.length==3){D.className=E
}D.innerHTML=A;
if(D.offsetWidth<=F){return A
}for(var C=A.length-1;
C>0;
C--){var B=A.substr(0,C);
D.innerHTML=B+AjxStringUtil.ELLIPSIS;
if(D.offsetWidth<=F){return B+AjxStringUtil.ELLIPSIS
}}return A
};
AjxStringUtil.clipByLength=function(C,B){var A=C.length;
return(A<=B)?C:[C.substr(0,B/2),"...",C.substring(A-((B/2)-3),A)].join("")
};
AjxStringUtil.wrap=function(F,G,H){var M=AjxStringUtil.calcDIV();
if(arguments.length==3){M.className=H
}var I="";
var E="";
var A=F.split("/n");
for(var D=0;
D<A.length;
D++){if(D!=0){I+=E+"<br>";
E=""
}htmlRows=A[D].split("<br>");
for(var K=0;
K<htmlRows.length;
K++){if(K!=0){I+=E+"<br>";
E=""
}words=htmlRows[K].split(" ");
var L=0;
while(L<words.length){M.innerHTML=E+" "+words[L];
var C=M.offsetWidth;
if(C>G){M.innerHTML=words[L];
C=C-M.offsetWidth;
if((C>=G)||(M.offsetWidth<=G)){I+=E+"<br>";
E=""
}else{var J=true;
var B=0;
while(J){B++;
M.innerHTML=E+" "+words[L].substring(0,B);
J=(M.offsetWidth<=G)
}B--;
I+=E+words[L].substring(0,B)+"<br>";
words[L]=words[L].substr(B);
E=""
}}else{E+=" "+words[L];
L++
}}}}I+=E;
return I
};
AjxStringUtil.MSG_SEP_RE=new RegExp("^\\s*--+\\s*(Original Message|Forwarded Message)\\s*--+","i");
AjxStringUtil.SIG_RE=/^(- ?-+)|(__+)\r?$/;
AjxStringUtil.COLON_RE=/\S+:$/;
AjxStringUtil.PREFIX_RE=/^\s*(>|\|)/;
AjxStringUtil.BRACKET_RE=/^\s*\[.+\]\s*$/;
AjxStringUtil.LINE_RE=/^\s*_{30,}\s*$/;
AjxStringUtil.BLANK_RE=/^\s*$/;
AjxStringUtil.SPLIT_RE=/\r|\n|\r\n/;
AjxStringUtil.HTML_BLANK_RE=/^\s*<br>\s*$/i;
AjxStringUtil.HDR_RE=/^\s*\w+:/;
AjxStringUtil.HTML_BR_RE=/<br\s*\/?>/gi;
AjxStringUtil.HTML_BODY_RE=/<body(\s|>)/i;
AjxStringUtil.getTopLevel=function(L,H,B){var A=/<br|<div/i.test(L);
var I=A?AjxStringUtil.HTML_BR_RE:AjxStringUtil.SPLIT_RE;
var H=A?"<br>":"\n";
L=AjxStringUtil._trimBlankLines(L,I,H,A);
var M=L.split(I);
var F=M.length;
var D=0,C=0;
var E=[];
var G=false;
while(D<F){var K=G;
var J=AjxStringUtil._linesToSkip(M,D,B);
G=(J>0);
if(K&&!G){C=D
}else{if(!K&&G&&D>C){E.push(AjxStringUtil._trimBlankLines(M.slice(C,D).join(H),I,H,B)+H)
}}D+=G?J:1
}if(!G&&D>C){E.push(AjxStringUtil._trimBlankLines(M.slice(C,D).join(H),I,H,B)+H)
}return E
};
AjxStringUtil._linesToSkip=function(I,C,A){var D=I.length;
var H=0;
var B=C;
var J=A?AjxStringUtil.stripTags(I[C]):I[C];
if(AjxStringUtil.MSG_SEP_RE.test(J)){H=D-C
}else{if(AjxStringUtil.PREFIX_RE.test(J)){while(C<I.length&&(AjxStringUtil.PREFIX_RE.test(J)||AjxStringUtil.BLANK_RE.test(J))){C++;
J=A?AjxStringUtil.stripTags(I[C]):I[C]
}H=C-B
}else{if(AjxStringUtil.COLON_RE.test(J)){var F=AjxStringUtil._nextNonBlankLineIndex(I,C+1,A);
var G=(F==-1)?null:A?AjxStringUtil.stripTags(I[F]):I[F];
if(G&&AjxStringUtil.PREFIX_RE.test(G)){H=F-C
}else{if(F!=-1){F=AjxStringUtil._nextNonBlankLineIndex(I,F+1,A)
}var E=(F==-1)?null:A?AjxStringUtil.stripTags(I[F]):I[F];
if(E&&AjxStringUtil.BRACKET_RE.test(G)&&AjxStringUtil.PREFIX_RE.test(E)){H=F-C
}}}else{if(AjxStringUtil.LINE_RE.test(J)){var F=AjxStringUtil._nextNonBlankLineIndex(I,C+1,A);
var G=(F==-1)?null:A?AjxStringUtil.stripTags(I[F]):I[F];
if(G&&AjxStringUtil.HDR_RE.test(G)){H=D-C
}}else{if(AjxStringUtil.SIG_RE.test(J)){H=D-C
}}}}}return H
};
AjxStringUtil._nextNonBlankLineIndex=function(A,B,C){while(B<A.length&&AjxStringUtil.BLANK_RE.test(C?AjxStringUtil.stripTags(A[B]):A[B])){B++
}return((B<A.length)?B:-1)
};
AjxStringUtil._trimBlankLines=function(G,F,E,A){var I=G.split(F);
var D=I.length;
var H=A?AjxStringUtil.HTML_BLANK_RE:AjxStringUtil.BLANK_RE;
var C=0;
while(C<D&&H.test(I[C])){C++
}var B=D;
while(B>0&&H.test(I[B-1])){B--
}if(C!=0||B!=D){G=I.slice(C,B).join(E)+E
}if(A&&AjxStringUtil.HTML_BODY_RE.test(G)){G=G.replace(/<body\s*[^>]*>(<br\s*\/?>)+/i,"<body>");
G=G.replace(/(<br\s*\/?>)+<\/body>/i,"</body>")
}return G
};
AjxStringUtil._NO_LIST=0;
AjxStringUtil._ORDERED_LIST=1;
AjxStringUtil._UNORDERED_LIST=2;
AjxStringUtil._INDENT="    ";
AjxStringUtil._NON_WHITESPACE=/\S+/;
AjxStringUtil._LF=/\n/;
AjxStringUtil.convertHtml2Text=function(C){if(!C){return null
}if(typeof C=="string"){var D=document.createElement("SPAN");
D.innerHTML=C;
C=D
}var E=[];
var B=0;
var A={};
this._traverse(C,E,B,AjxStringUtil._NO_LIST,0,0,A);
return E.join("")
};
AjxStringUtil._traverse=function(A,L,J,I,G,E,F){var H=A.nodeName.toLowerCase();
if(H=="#text"){if(A.nodeValue.search(AjxStringUtil._NON_WHITESPACE)!=-1){if(F.lastNode=="ol"||F.lastNode=="ul"){L[J++]="\n"
}if(F.isPreformatted){L[J++]=AjxStringUtil.trim(A.nodeValue)+" "
}else{L[J++]=AjxStringUtil.trim(A.nodeValue.replace(AjxStringUtil._LF," "),true)+" "
}}}else{if(H=="p"){L[J++]="\n\n"
}else{if(I==AjxStringUtil._NO_LIST&&(H=="br"||H=="hr")){L[J++]="\n"
}else{if(H=="ol"||H=="ul"){L[J++]="\n";
if(A.parentNode.nodeName.toLowerCase()!="li"&&F.lastNode!="br"&&F.lastNode!="hr"){L[J++]="\n"
}I=(H=="ol")?AjxStringUtil._ORDERED_LIST:AjxStringUtil._UNORDERED_LIST;
G++;
E=0
}else{if(H=="li"){for(var C=0;
C<G;
C++){L[J++]=AjxStringUtil._INDENT
}if(I==AjxStringUtil._ORDERED_LIST){L[J++]=E+". "
}else{L[J++]="\u2022 "
}}else{if(H=="img"){if(A.alt&&A.alt!=""){L[J++]=A.alt
}}else{if(H=="tr"&&A.parentNode.firstChild!=A){L[J++]="\n"
}else{if(H=="td"&&A.parentNode.firstChild!=A){L[J++]="\t"
}else{if(H=="div"){L[J++]="\n"
}else{if(H=="blockquote"){L[J++]="\n\n"
}else{if(H=="pre"){F.isPreformatted=true
}else{if(H=="#comment"||H=="script"||H=="select"||H=="style"){return J
}}}}}}}}}}}}var K=A.childNodes;
var D=K.length;
for(var C=0;
C<D;
C++){var B=K[C];
if(B.nodeType==1&&B.tagName.toLowerCase()=="li"){E++
}J=this._traverse(B,L,J,I,G,E,F)
}if(H=="h1"||H=="h2"||H=="h3"||H=="h4"||H=="h5"||H=="h6"){L[J++]="\n";
F.list=false
}else{if(H=="pre"){F.isPreformatted=false
}else{if(H=="li"){if(!F.list){L[J++]="\n"
}F.list=false
}else{if(H=="ol"||H=="ul"){F.list=true
}else{if(H!="#text"){F.list=false
}}}}}F.lastNode=H;
return J
};
AjxStringUtil.queryStringSet=function(G,I){var H=I?"":location.search;
if(H.indexOf("?")==0){H=H.substr(1)
}var F=H.split("&");
var C={};
for(var D=0;
D<F.length;
D++){var E=F[D].split("=");
C[E[0]]=E[1]
}for(var A in G){C[A]=G[A]
}var B=[];
var D=0;
for(var A in C){if(A){B[D++]=[A,C[A]].join("=")
}}return"?"+B.join("&")
};
AjxStringUtil.queryStringRemove=function(A,C){A=A?A:"";
if(A.indexOf("?")==0){A=A.substr(1)
}var E=A.split("&");
var B=[];
for(var D=0;
D<E.length;
D++){if(E[D].indexOf(C)!=0){B.push(E[D])
}}return"?"+B.join("&")
};
AjxStringUtil.getAsString=function(A){return !A?"":(typeof (A)=="object")?A.toString():A
};
AjxStringUtil.isWhitespace=function(A){return(A.charCodeAt(0)<=32)
};
AjxStringUtil.isDigit=function(B){var A=B.charCodeAt(0);
return(A>=48&&A<=57)
};
AjxStringUtil.compareRight=function(D,B){var E=0;
var G=0;
var F=0;
var C;
var A;
for(;
(G<D.length||F<B.length);
G++,F++){C=D.charAt(G);
A=B.charAt(F);
if(!AjxStringUtil.isDigit(C)&&!AjxStringUtil.isDigit(A)){return E
}else{if(!AjxStringUtil.isDigit(C)){return -1
}else{if(!AjxStringUtil.isDigit(A)){return +1
}else{if(C<A){if(E==0){E=-1
}}else{if(C>A){if(E==0){E=+1
}}}}}}}};
AjxStringUtil.natCompare=function(H,G){var F=0,D=0;
var B=0,A=0;
var E,C;
while(F<H.length||D<G.length){B=A=0;
E=H.charAt(F);
C=G.charAt(D);
while(AjxStringUtil.isWhitespace(E)||E=="0"){B=(E=="0")?(B+1):0;
E=H.charAt(++F)
}while(AjxStringUtil.isWhitespace(C)||C=="0"){A=(C=="0")?(A+1):0;
C=G.charAt(++D)
}if(AjxStringUtil.isDigit(E)&&AjxStringUtil.isDigit(C)){var I=AjxStringUtil.compareRight(H.substring(F),G.substring(D));
if(I&&I!=0){return I
}}if(E==0&&C==0){return B-A
}if(E<C){return -1
}else{if(E>C){return +1
}}++F;
++D
}};
AjxStringUtil.clipFile=function(F,B){var C=F.lastIndexOf(".");
var A=C?(C+1):F.length;
if(A<=B){return F
}else{var E=F.substr(0,C);
var D=F.substr(C+1,F.length-1);
return[E.substr(0,B/2),"...",E.substring(A-((B/2)-3),A),".",(D?D:"")].join("")
}};
AjxStringUtil.URL_PARSE_RE=new RegExp("^(?:([^:/?#.]+):)?(?://)?(([^:/?#]*)(?::(\\d*))?)?((/(?:[^?#](?![^?#/]*\\.[^?#/.]+(?:[\\?#]|$)))*/?)?([^?#/]*))?(?:\\?([^#]*))?(?:#(.*))?");
AjxStringUtil.parseURL=function(C){var E=["source","protocol","authority","domain","port","path","directoryPath","fileName","query","anchor"];
var D=AjxStringUtil.URL_PARSE_RE.exec(C);
var B={};
for(var A=0;
A<E.length;
A++){B[E[A]]=(D[A]?D[A]:"")
}if(B.directoryPath.length>0){B.directoryPath=B.directoryPath.replace(/\/?$/,"/")
}return B
};
AjxStringUtil.parseQueryString=function(){var C=""+window.location;
var B=C.indexOf("?");
if(B==-1){return null
}var A=C.substring(B+1).replace(/#.*$/,"");
var E=A.split("&");
var G={};
for(var D=0;
D<E.length;
D++){var F=E[D].split("=");
G[F[0]]=F[1]
}return G
};
AjxStringUtil._SPECIAL_CHARS=/["\\\x00-\x1f]/g;
AjxStringUtil._CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
AjxStringUtil.objToString=function(B){var K=typeof B,E,F,D,C,I,J,G,A=[];
var H=function(N){if(!AjxStringUtil._CHARS[N]){var M=N.charCodeAt();
AjxStringUtil._CHARS[N]="\\u00"+Math.floor(M/16).toString(16)+(M%16).toString(16)
}return AjxStringUtil._CHARS[N]
};
var L=function(M){return'"'+M.replace(AjxStringUtil._SPECIAL_CHARS,H)+'"'
};
if(K==="string"){return L(B)
}if(K==="boolean"||B instanceof Boolean){return String(B)
}if(K==="number"||B instanceof Number){return isFinite(B)?String(B):"null"
}if(AjxUtil.isArray(B)||(K==="object"&&B.length)){for(E=A.length-1;
E>=0;
--E){if(A[E]===B){return"null"
}}A[A.length]=B;
G=[];
for(E=B.length-1;
E>=0;
--E){G[E]=AjxStringUtil.objToString(B[E])
}A.pop();
return"["+G.join(",")+"]"
}if(K==="object"&&B){for(E=A.length-1;
E>=0;
--E){if(A[E]===B){return"null"
}}A[A.length]=B;
G=[];
D=0;
for(C in B){if(typeof C==="string"&&B.hasOwnProperty(C)){I=B[C];
J=typeof I;
if(J!=="undefined"&&J!=="function"){G[D++]=L(C)+":"+AjxStringUtil.objToString(I)
}}}A.pop();
return"{"+G.join(",")+"}"
}return"null"
};
AjxStringUtil.prettyPrint=function(D,C,A,B){AjxStringUtil._visited=new AjxVector();
var E=AjxStringUtil._prettyPrint(D,C,A,B);
AjxStringUtil._visited=null;
return E
};
AjxStringUtil._visited=null;
AjxStringUtil._prettyPrint=function(G,A,K,B){var N=0;
var E=false;
var Q=false;
if(arguments.length>4){N=arguments[4];
E=arguments[5];
Q=arguments[6]
}if(AjxUtil.isObject(G)){var J=G.toString();
if(B&&B[J]){return"["+J+"]"
}if(AjxStringUtil._visited.contains(G)){return"[visited object]"
}else{AjxStringUtil._visited.add(G)
}}var C=AjxStringUtil.repeat(" ",N);
var O="";
if(G===undefined){O+="[undefined]"
}else{if(G===null){O+="[null]"
}else{if(AjxUtil.isBoolean(G)){O+=G?"true":"false"
}else{if(AjxUtil.isString(G)){O+='"'+AjxStringUtil._escapeForHTML(G)+'"'
}else{if(AjxUtil.isNumber(G)){O+=G
}else{if(AjxUtil.isObject(G)){var H=AjxUtil.isArray(G);
if(Q){O+=H?"[Array]":G.toString()
}else{Q=!A;
var P=new Array();
for(var F in G){P.push(F)
}if(H){P.sort(function(S,R){return S-R
})
}else{P.sort()
}if(E){O+=H?"[":"{"
}var I=P.length;
for(var F=0;
F<I;
F++){var M=P[F];
var D=G[M];
var L=null;
if(D==window||D==document||(!AjxEnv.isIE&&D instanceof Node)){L=D.toString()
}if((typeof (D)=="function")){if(K){L="[function]"
}else{continue
}}if(F>0){O+=","
}O+="\n"+C;
if(L!=null){O+=M+": "+L
}else{O+=M+": "+this._prettyPrint(D,A,K,B,N+2,true,Q)
}}if(F>0){O+="\n"+AjxStringUtil.repeat(" ",N-1)
}if(E){O+=H?"]":"}"
}}}}}}}}return O
};
AjxStringUtil._escapeForHTML=function(B){if(typeof (B)!="string"){return B
}var A=B;
A=A.replace(/\&/g,"&amp;");
A=A.replace(/\</g,"&lt;");
A=A.replace(/\>/g,"&gt;");
A=A.replace(/\"/g,"&quot;");
A=A.replace(/\xA0/g,"&nbsp;");
return A
}
}if(AjxPackage.define("ajax.debug.AjxDebug")){AjxDebug=function(C,B,A){this._dbgName="AjxDebugWin_"+location.hostname.replace(/\./g,"_");
this._level=Number(C);
this._showTime=A;
this._showTiming=false;
this._startTimePt=this._lastTimePt=0;
this._dbgWindowInited=false;
this._msgQueue=[];
this._isPrevWinOpen=false;
this._enable(this._level!=AjxDebug.NONE)
};
AjxDebug.NONE=0;
AjxDebug.DBG1=1;
AjxDebug.DBG2=2;
AjxDebug.DBG3=3;
AjxDebug.MAX_OUT=25000;
AjxDebug._CONTENT_FRAME_ID="AjxDebug_CF";
AjxDebug._LINK_FRAME_ID="AjxDebug_LF";
AjxDebug._BOTTOM_FRAME_ID="AjxDebug_BFI";
AjxDebug._BOTTOM_FRAME_NAME="AjxDebug_BFN";
AjxDebug.prototype.toString=function(){return"AjxDebug"
};
AjxDebug.prototype.setTitle=function(A){if(this._document&&!AjxEnv.isIE){this._document.title=A
}};
AjxDebug.prototype.setDebugLevel=function(B,A){this._level=/^[\d]+$/.test(B)?Number(B):B;
if(!A){this._enable(B!=AjxDebug.NONE)
}};
AjxDebug.prototype.getDebugLevel=function(){return this._level
};
AjxDebug.prototype.println=function(E,D,C){if(!this._isWriteable()){return 
}try{var A=this._handleArgs(arguments,C);
if(!A){return 
}D=A.join("");
this._add(this._timestamp()+D+"<br>",null,null,null,C)
}catch(B){}};
AjxDebug.prototype.isDisabled=function(){return !this._enabled
};
AjxDebug.prototype.dumpObj=function(E,C,A,D){if(!this._isWriteable()){return 
}var B=this._handleArgs(arguments,D);
if(!B){return 
}C=B[0];
if(!C){return 
}A=B[1];
this._add(null,C,false,false,null,A)
};
AjxDebug.prototype.printRaw=function(D,C,B){if(!this._isWriteable()){return 
}var A=this._handleArgs(arguments,B);
if(!A){return 
}this._add(null,A[0],false,true)
};
AjxDebug.prototype.printXML=function(D,C,B){if(!this._isWriteable()){return 
}var A=this._handleArgs(arguments,B);
if(!A){return 
}C=A[0];
if(!C){return 
}if(C.length>AjxDebug.MAX_OUT){this.printRaw(C);
return 
}this._add(null,C,true,false)
};
AjxDebug.prototype.display=function(C,B){if(!this._isWriteable()){return 
}var A=this._handleArgs(arguments);
if(!A){return 
}B=A[0];
B=B.replace(/\r?\n/g,"[crlf]");
B=B.replace(/ /g,"[space]");
B=B.replace(/\t/g,"[tab]");
this.printRaw(C,B)
};
AjxDebug.prototype.showTiming=function(B,E){this._showTiming=B;
if(B){this._enable(true)
}var C=B?"on":"off";
var D="Turning timing info "+C;
if(E){D=D+": "+E
}var A=new DebugMessage(D);
this._addMessage(A);
this._startTimePt=this._lastTimePt=new Date().getTime()
};
AjxDebug.prototype.timePt=function(H,C){if(!this._showTiming||!this._isWriteable()){return 
}if(C){this._startTimePt=this._lastTimePt=new Date().getTime()
}var E=new Date().getTime();
var A=E-this._startTimePt;
var B=E-this._lastTimePt;
this._lastTimePt=E;
var D=C?"<br/>":"";
H=H?" "+H:"";
var G=[D,"[",A," / ",B,"]",H].join("");
var F="<div>"+G+"</div>";
this._addMessage(new DebugMessage(F));
return B
};
AjxDebug.prototype.getContentFrame=function(){if(this._contentFrame){return this._contentFrame
}if(this._debugWindow&&this._debugWindow.document){return this._debugWindow.document.getElementById(AjxDebug._CONTENT_FRAME_ID)
}return null
};
AjxDebug.prototype.getLinkFrame=function(A){if(this._linkFrame){return this._linkFrame
}if(this._debugWindow&&this._debugWindow.document){return this._debugWindow.document.getElementById(AjxDebug._LINK_FRAME_ID)
}if(!A){this._openDebugWindow();
return this.getLinkFrame(true)
}return null
};
AjxDebug.prototype._enable=function(A){this._enabled=A;
if(A){if(this._debugWindow==null||this._debugWindow.closed){this._openDebugWindow()
}}else{if(this._debugWindow){this._debugWindow.close();
this._debugWindow=null
}}};
AjxDebug.prototype._isWriteable=function(){return(!this._isPaused&&!this.isDisabled()&&this._debugWindow&&!this._debugWindow.closed)
};
AjxDebug.prototype._getHtmlForObject=function(A,B,E,D,F){var C=[];
var H=0;
if(A===undefined){C[H++]="<span>Undefined</span>"
}else{if(A===null){C[H++]="<span>NULL</span>"
}else{if(AjxUtil.isBoolean(A)){C[H++]="<span>"+A+"</span>"
}else{if(AjxUtil.isNumber(A)){C[H++]="<span>"+A+"</span>"
}else{if(E){C[H++]=this._timestamp();
C[H++]="<textarea rows='25' style='width:100%' readonly='true'>";
C[H++]=A;
C[H++]="</textarea><p></p>"
}else{if(B){var I=new AjxDebugXmlDocument;
var G=I.create();
G.loadXML(A);
C[H++]="<div style='border-width:2px; border-style:inset; width:100%; height:300px; overflow:auto'>";
C[H++]=this._createXmlTree(G,0);
C[H++]="</div>"
}else{C[H++]="<div style='border-width:2px; border-style:inset; width:100%; height:300px; overflow:auto'><pre>";
C[H++]=this._dump(A,true,F);
C[H++]="</div></pre>"
}}}}}}return C.join("")
};
AjxDebug.prototype._dump=function(C,B,A){return AjxStringUtil.prettyPrint(C,B,A,{ZmAppCtxt:true})
};
AjxDebug.prototype._handleArgs=function(D,C){if(this._level==AjxDebug.NONE||this._showTiming){return 
}var B=AjxDebug.DBG1;
if(D.length>1){if(typeof D[0]=="number"&&typeof this._level=="number"){B=D[0];
if(B>this._level){return 
}}else{if(D[0]&&D[0]!=this._level){return 
}}}var F=new Array(D.length);
var A=(C)?D.length-1:D.length;
for(var E=0;
E<A;
E++){F[E]=D[E]
}if(A>1){F.shift()
}return F
};
AjxDebug.prototype._openDebugWindow=function(D){var B=AjxEnv.isIE?"_blank":this._dbgName;
this._debugWindow=window.open("",B,"width=600,height=400,resizable=yes,scrollbars=yes");
if(this._debugWindow==null){this._enabled=false;
return 
}this._enabled=true;
this._isPrevWinOpen=this._debugWindow.debug;
this._debugWindow.debug=true;
try{this._document=this._debugWindow.document;
this.setTitle("Debug");
if(!this._isPrevWinOpen){this._document.write("<html>","<head>","<script>","function blank() {return [","'<html><head><style type=\"text/css\">',","'P, TD, DIV, SPAN, SELECT, INPUT, TEXTAREA, BUTTON {',","'font-family: Tahoma, Arial, Helvetica, sans-serif;',","'font-size:11px;}',","'.Content {display:block;margin:0.25em 0em;}',","'.Link {cursor: pointer;color:blue;text-decoration:underline;white-space:nowrap;width:100%;}',","'.Run {color:black; background-color:red;width:100%;font-size:18px;font-weight:bold;}',","'.RunLink {display:block;color:black;background-color:red;font-weight:bold;white-space:nowrap;width:100%;}',","'</style></head><body></body></html>'].join(\"\");}","<\/script>","</head>","<frameset cols='125, *'>","<frameset rows='*,40'>","<frame name='",AjxDebug._LINK_FRAME_ID,"' id='",AjxDebug._LINK_FRAME_ID,"' src='javascript:parent.parent.blank();'>","<frame name='",AjxDebug._BOTTOM_FRAME_NAME,"' id='",AjxDebug._BOTTOM_FRAME_ID,"' src='javascript:parent.parent.blank();' scrolling=no frameborder=0>","</frameset>","<frame name='",AjxDebug._CONTENT_FRAME_ID,"' id='",AjxDebug._CONTENT_FRAME_ID,"' src='javascript:parent.blank();'>","</frameset>","</html>");
this._document.close();
var A=new AjxTimedAction(this,AjxDebug.prototype._finishInitWindow);
AjxTimedAction.scheduleAction(A,1500)
}else{this._finishInitWindow();
this._contentFrame=this._document.getElementById(AjxDebug._CONTENT_FRAME_ID);
this._linkFrame=this._document.getElementById(AjxDebug._LINK_FRAME_ID);
this._createLinkNContent("RunLink","NEW RUN","Run","NEW RUN");
this._attachHandlers();
this._dbgWindowInited=true;
this._showMessages()
}}catch(C){if(this._debugWindow){this._debugWindow.close()
}this._openDebugWindow(true)
}};
AjxDebug.prototype._finishInitWindow=function(){try{this._contentFrame=this._debugWindow.document.getElementById(AjxDebug._CONTENT_FRAME_ID);
this._linkFrame=this._debugWindow.document.getElementById(AjxDebug._LINK_FRAME_ID);
var E=this._debugWindow.document.getElementById(AjxDebug._BOTTOM_FRAME_ID);
var D=E.contentWindow.document;
var C=[];
var B=0;
C[B++]="<table><tr><td><button id='";
C[B++]=AjxDebug._BOTTOM_FRAME_ID;
C[B++]="_clear'>Clear</button></td><td><button id='";
C[B++]=AjxDebug._BOTTOM_FRAME_ID;
C[B++]="_pause'>Pause</button></td></tr></table>";
D.body.innerHTML=C.join("")
}catch(A){}this._clearBtn=D.getElementById(AjxDebug._BOTTOM_FRAME_ID+"_clear");
this._pauseBtn=D.getElementById(AjxDebug._BOTTOM_FRAME_ID+"_pause");
this._attachHandlers();
this._dbgWindowInited=true;
this._showMessages()
};
AjxDebug.prototype._attachHandlers=function(){var A=AjxCallback.simpleClosure(this._unloadHandler,this);
if(AjxEnv.isIE){this._unloadHandler=A;
this._debugWindow.attachEvent("onunload",A)
}else{this._debugWindow.onunload=A
}if(this._clearBtn){this._clearBtn.onclick=AjxCallback.simpleClosure(this._clear,this)
}if(this._pauseBtn){this._pauseBtn.onclick=AjxCallback.simpleClosure(this._pause,this)
}};
AjxDebug.prototype._scrollToBottom=function(){var B=this.getContentFrame();
var A=B?B.contentWindow.document.body:null;
var D=this.getLinkFrame();
var C=D?D.contentWindow.document.body:null;
if(A&&C){A.scrollTop=A.scrollHeight;
C.scrollTop=C.scrollHeight
}};
AjxDebug.prototype._timestamp=function(){return this._showTime?this._getTimeStamp()+": ":""
};
AjxDebug.prototype.setShowTimestamps=function(A){this._showTime=A
};
AjxDebug.prototype._createXmlTree=function(F,B){if(F==null){return""
}var H="";
var A;
switch(F.nodeType){case 1:H+="<div style='color: blue; padding-left: 16px;'>&lt;<span style='color: DarkRed;'>"+F.nodeName+"</span>";
var C=F.attributes;
A=C.length;
for(var D=0;
D<A;
D++){H+=this._createXmlAttribute(C[D])
}if(!F.hasChildNodes()){return H+"/&gt;</div>"
}H+="&gt;<br />";
var E=F.childNodes;
A=E.length;
for(var D=0;
D<A;
D++){H+=this._createXmlTree(E[D],B+3)
}H+="&lt;/<span style='color: DarkRed;'>"+F.nodeName+"</span>&gt;</div>";
break;
case 9:var E=F.childNodes;
A=E.length;
for(var D=0;
D<A;
D++){H+=this._createXmlTree(E[D],B)
}break;
case 3:if(!/^\s*$/.test(F.nodeValue)){var G=F.nodeValue.replace(/</g,"&lt;").replace(/>/g,"&gt;");
H+="<span style='color: WindowText; padding-left: 16px;'>"+G+"</span><br />"
}break;
case 7:H+="&lt;?"+F.nodeName;
var C=F.attributes;
A=C.length;
for(var D=0;
D<A;
D++){H+=this._createXmlAttribute(C[D])
}H+="?&gt;<br />";
break;
case 4:H="<div style=''>&lt;![CDATA[<span style='color: WindowText; font-family: \"Courier New\"; white-space: pre; display: block; border-left: 1px solid Gray; padding-left: 16px;'>"+F.nodeValue+"</span>]]></div>";
break;
case 8:H="<div style='color: blue; padding-left: 16px;'>&lt;!--<span style='white-space: pre; font-family: \"Courier New\"; color: Gray; display: block;'>"+F.nodeValue+"</span>--></div>";
break;
case 10:H="<div style='color: blue; padding-left: 16px'>&lt;!DOCTYPE "+F.name;
if(F.publicId){H+=' PUBLIC "'+F.publicId+'"';
if(F.systemId){H+=' "'+F.systemId+'"'
}}else{if(F.systemId){H+=' SYSTEM "'+F.systemId+'"'
}}H+="&gt;</div>";
break;
default:this._inspect(F)
}return H
};
AjxDebug.prototype._createXmlAttribute=function(A){return[" <span style='color: red'>",A.nodeName,"</span><span style='color: blue'>=\"",A.nodeValue,'"</span>'].join("")
};
AjxDebug.prototype._inspect=function(B){var C="";
for(var A in B){C+="obj."+A+" = "+B[A]+"\n"
}window.alert(C)
};
AjxDebug.prototype._add=function(B,C,G,F,E,A){var D=new Date();
if(C){C=this._getHtmlForObject(C,G,F,D,A)
}this._addMessage(new DebugMessage(B,null,null,D,C,E))
};
AjxDebug.prototype._addMessage=function(A){this._msgQueue[this._msgQueue.length]=A;
this._showMessages()
};
AjxDebug.prototype._showMessages=function(){if(!this._dbgWindowInited){return 
}try{if(this._msgQueue.length>0){var A=this.getContentFrame();
var D=this.getLinkFrame();
if(!A||!D){return 
}var C;
var J=A.contentWindow.document;
var G=D.contentWindow.document;
var F=this._msgQueue.length;
for(var E=0;
E<F;
++E){var B=new Date();
C=this._msgQueue[E];
var K=C.linkName;
var I=[C.message,C.eHtml].join("");
this._createLinkNContent("Link",K,"Content",I)
}}this._msgQueue.length=0;
this._scrollToBottom()
}catch(H){}};
AjxDebug.prototype._getTimeStamp=function(A){if(!AjxDebug._timestampFormatter){AjxDebug._timestampFormatter=new AjxDateFormat("HH:mm:ss.SSS")
}A=A||new Date();
return AjxStringUtil.htmlEncode(AjxDebug._timestampFormatter.format(A),true)
};
AjxDebug.prototype._createLinkNContent=function(G,M,D,I){var E=this.getLinkFrame();
if(!E){return 
}var C=new Date();
var F=["[",this._getTimeStamp(C),"]"].join("");
var B="Lnk_"+C.getTime();
if(M){var H=E.contentWindow.document;
var L=H.createElement("DIV");
L.className=G;
L.innerHTML=[M,F].join(" - ");
L._targetId=B;
L._dbg=this;
L.onclick=AjxDebug._linkClicked;
var K=H.body;
K.appendChild(L)
}var J=this.getContentFrame().contentWindow.document;
var A=J.createElement("DIV");
A.className=D;
A.id=B;
A.innerHTML=I;
J.body.appendChild(A);
this._scrollToBottom()
};
AjxDebug._linkClicked=function(){var B=this._dbg.getContentFrame();
var A=B.contentWindow.document.getElementById(this._targetId);
var C=0;
while(A){C+=A.offsetTop;
A=A.offsetParent
}B.contentWindow.scrollTo(0,C)
};
AjxDebug.prototype._clear=function(){this.getContentFrame().contentWindow.document.body.innerHTML="";
this.getLinkFrame().contentWindow.document.body.innerHTML=""
};
AjxDebug.prototype._pause=function(){this._isPaused=!this._isPaused;
this._pauseBtn.innerHTML=this._isPaused?"Resume":"Pause"
};
AjxDebug.prototype._unloadHandler=function(){if(!this._debugWindow){return 
}if(AjxEnv.isIE){this._debugWindow.detachEvent("onunload",this._unloadHandler)
}else{this._debugWindow.onunload=null
}};
DebugMessage=function(A,B,E,D,C,F){this.message=A||"";
this.type=B||null;
this.category=E||"";
this.time=D||(new Date().getTime());
this.eHtml=C||"";
this.linkName=F
}
}if(AjxPackage.define("ajax.debug.AjxDebugXmlDocument")){AjxDebugXmlDocument=function(){};
getDomDocumentPrefix=function(){if(getDomDocumentPrefix.prefix){return getDomDocumentPrefix.prefix
}var D=["MSXML2","Microsoft","MSXML","MSXML3"];
var E;
var A=D.length;
for(var C=0;
C<A;
C++){try{E=new ActiveXObject(D[C]+".DomDocument");
return getDomDocumentPrefix.prefix=D[C]
}catch(B){}}throw new Error("Could not find an installed XML parser")
};
AjxDebugXmlDocument.prototype.create=function(){try{if(document.implementation&&document.implementation.createDocument){var B=document.implementation.createDocument("","",null);
if(B.readyState==null){B.readyState=1;
B.addEventListener("load",function(){B.readyState=4;
if(typeof B.onreadystatechange=="function"){B.onreadystatechange()
}},false)
}return B
}if(window.ActiveXObject){return new ActiveXObject(getDomDocumentPrefix()+".DomDocument")
}}catch(A){}throw new Error("Your browser does not support XmlDocument objects")
};
if(window.DOMParser&&window.XMLSerializer&&window.Node&&Node.prototype&&Node.prototype.__defineGetter__){if(AjxEnv.isSafari){Document.prototype.loadXML=function(C){var D=(new DOMParser()).parseFromString(C,"text/xml");
while(this.hasChildNodes()){this.removeChild(this.lastChild)
}var A=D.childNodes.length;
for(var B=0;
B<A;
B++){this.appendChild(this.importNode(D.childNodes[B],true))
}};
Document.prototype.__defineGetter__("xml",function(){return(new XMLSerializer()).serializeToString(this)
})
}else{AjxDebugXmlDocument.prototype.loadXML=function(C){var D=(new DOMParser()).parseFromString(C,"text/xml");
while(this.hasChildNodes()){this.removeChild(this.lastChild)
}var A=D.childNodes.length;
for(var B=0;
B<A;
B++){this.appendChild(this.importNode(D.childNodes[B],true))
}};
AjxDebugXmlDocument.prototype.__defineGetter__("xml",function(){return(new XMLSerializer()).serializeToString(this)
})
}}}if(AjxPackage.define("ajax.xml.AjxXmlDoc")){AjxXmlDoc=function(){if(!AjxXmlDoc._inited){AjxXmlDoc._init()
}};
AjxXmlDoc.prototype.toString=function(){return"AjxXmlDoc"
};
AjxXmlDoc.INVALID_CHARS_RE=/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/g;
AjxXmlDoc.REC_AVOID_CHARS_RE=/[\u007F-\u0084\u0086-\u009F\uFDD0-\uFDDF]/g;
AjxXmlDoc._inited=false;
AjxXmlDoc._msxmlVers=null;
AjxXmlDoc.create=function(){var B=new AjxXmlDoc();
var A=null;
if(AjxEnv.isIE){A=new ActiveXObject(AjxXmlDoc._msxmlVers);
A.async=true;
if(AjxXmlDoc._msxmlVers=="MSXML2.DOMDocument.4.0"){A.setProperty("SelectionLanguage","XPath");
A.setProperty("SelectionNamespaces","xmlns:zimbra='urn:zimbra' xmlns:mail='urn:zimbraMail' xmlns:account='urn:zimbraAccount'")
}}else{if(document.implementation&&document.implementation.createDocument){A=document.implementation.createDocument("","",null)
}else{throw new AjxException("Unable to create new Doc",AjxException.INTERNAL_ERROR,"AjxXmlDoc.create")
}}B._doc=A;
return B
};
AjxXmlDoc.createFromDom=function(B){var A=new AjxXmlDoc();
A._doc=B;
return A
};
AjxXmlDoc.createFromXml=function(A){var B=AjxXmlDoc.create();
B.loadFromString(A);
return B
};
AjxXmlDoc.replaceInvalidChars=function(A){AjxXmlDoc.INVALID_CHARS_RE.lastIndex=0;
return A.replace(AjxXmlDoc.INVALID_CHARS_RE,"?")
};
AjxXmlDoc.getXml=function(B){var A=new XMLSerializer();
return AjxXmlDoc.replaceInvalidChars(A.serializeToString(B))
};
AjxXmlDoc.prototype.getDoc=function(){return this._doc
};
AjxXmlDoc.prototype.loadFromString=function(B){var A=this._doc;
A.loadXML(B);
if(AjxEnv.isIE){if(A.parseError.errorCode!=0){throw new AjxException(A.parseError.reason,AjxException.INVALID_PARAM,"AjxXmlDoc.loadFromString")
}}};
AjxXmlDoc.prototype.loadFromUrl=function(A){this._doc.load(A)
};
AjxXmlDoc.prototype.toJSObject=function(C,B,A){_node=function(){this.__msh_content=""
};
_node.prototype.toString=function(){return this.__msh_content
};
rec=function(H,I){var F={},G,J;
for(H=H.firstChild;
H;
H=H.nextSibling){if(H.nodeType==1){G=H.tagName;
if(C){G=G.replace(/^.*?:/,"")
}if(B){G=G.toLowerCase()
}J=new _node();
if(F[G]){if(F[G]==1){I[G]=[I[G]];
F[G]=2
}I[G].push(J)
}else{I[G]=J;
F[G]=1
}if(A){if(H.attributes&&H.attributes.length){for(var E=0;
E<H.attributes.length;
E++){attr=H.attributes[E];
J[attr.name]=AjxUtil.isNumeric(attr.value)?attr.value:String(attr.value)
}}}rec(H,J)
}else{if(H.nodeType==3){I.__msh_content+=H.nodeValue
}}}};
var D=new _node();
rec(this._doc.documentElement,D);
return D
};
AjxXmlDoc.prototype.getElementsByTagNameNS=function(B,A){var C=this.getDoc();
return AjxEnv.isIE?C.getElementsByTagName(B+":"+A):C.getElementsByTagNameNS(B,A)
};
AjxXmlDoc.prototype.getFirstElementByTagNameNS=function(B,A){return this.getElementsByTagNameNS(B,A)[0]
};
AjxXmlDoc.prototype.getElementsByTagName=function(A){var B=this.getDoc();
return B.getElementsByTagName(A)
};
AjxXmlDoc._init=function(){if(AjxEnv.isIE){var A=["MSXML4.DOMDocument","MSXML3.DOMDocument","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XmlDom"];
for(var C=0;
C<A.length;
C++){try{new ActiveXObject(A[C]);
AjxXmlDoc._msxmlVers=A[C];
break
}catch(B){}}if(!AjxXmlDoc._msxmlVers){throw new AjxException("MSXML not installed",AjxException.INTERNAL_ERROR,"AjxXmlDoc._init")
}}else{if(AjxEnv.isNav||AjxEnv.isOpera||AjxEnv.isSafari){Document.prototype.loadXML=function(I){var H=new DOMParser();
var E=H.parseFromString(I,"text/xml");
while(this.hasChildNodes()){this.removeChild(this.lastChild)
}var D=E.childNodes.length;
for(var F=0;
F<D;
F++){var G=this.importNode(E.childNodes[F],true);
this.appendChild(G)
}};
if(AjxEnv.isNav){_NodeGetXml=function(){var D=new XMLSerializer();
return D.serializeToString(this)
};
Node.prototype.__defineGetter__("xml",_NodeGetXml)
}}}AjxXmlDoc._inited=true
};
AjxXmlDoc.prototype.set=function(A,D,B){var E=this._doc.createElement(A);
if(D!=null){var C=this._doc.createTextNode("");
E.appendChild(C);
C.nodeValue=D
}if(B==null){this.root.appendChild(E)
}else{B.appendChild(E)
}return E
};
AjxXmlDoc.prototype.getDocXml=function(){if(AjxEnv.isSafari){return AjxXmlDoc.getXml(this.getDoc())
}else{return AjxXmlDoc.replaceInvalidChars(this.getDoc().xml)
}};
AjxXmlDoc.createRoot=function(C){var A=AjxXmlDoc.create();
var B=A.getDoc();
A.root=B.createElement(C);
B.appendChild(A.root);
return A
};
AjxXmlDoc.createElement=function(B,D){var A=AjxXmlDoc.create();
var E=A.getDoc();
A.root=E.createElement(B);
if(D!=null){var C=E.createTextNode("");
A.root.appendChild(C);
C.nodeValue=D
}E.appendChild(A.root);
return A
};
AjxXmlDoc.prototype.appendChild=function(A){this.root.appendChild(A.root)
}
}if(AjxPackage.define("ajax.xml.AjxSerializer")){AjxSerializer=function(){if(arguments.length==0){return 
}};
AjxSerializer.prototype.serialize=function(A){throw"NOT IMPLEMENTED"
};
AjxJsonSerializer=function(A){AjxSerializer.call(this,null);
this._minimize=Boolean(A)
};
AjxJsonSerializer.prototype=new AjxSerializer;
AjxJsonSerializer.prototype.constructor=AjxJsonSerializer;
AjxJsonSerializer.E_ATTRS="_attrs";
AjxJsonSerializer.A_CONTENT="_content";
AjxJsonSerializer.A_NAMESPACE="_jsns";
AjxJsonSerializer.prototype.serialize=function(F){var B={};
var M=0;
var J=null;
for(var C=F.firstChild;
C;
C=C.nextSibling){var K=C.nodeType;
if(K==1){var A=C.nodeName;
if(!B[A]){B[A]=[];
M++
}B[A].push(C);
continue
}if(K==3||K==4){if(!J){J=[]
}J.push(C.nodeValue);
continue
}}var O={};
var E=0;
if(F.attributes){for(var H=0;
H<F.attributes.length;
H++){var I=F.attributes[H];
var A=I.nodeName;
var N=this.quote(I.nodeValue);
if(B[A]){O[A]=N;
E++
}else{B[A]=N;
M++
}}}J=J&&J.join("");
if(J&&J.match(/^\s*$/)){J=null
}if(J){J=this.quote(J);
if(E==0&&M==0){return J
}}if(J==null&&M==0&&E==0){return"{}"
}var L=["{"];
if(J){L.push(this.quote(AjxJsonSerializer.A_CONTENT),":",J);
if(E>0||M>0){L.push(",")
}}if(E>0){L.push(this.quote(AjxJsonSerializer.E_ATTRS),": { ");
var H=0;
for(var A in O){if(H>0){L.push(",")
}L.push(this.quote(A),":",O[A]);
H++
}L.push("}");
if(M>0){L.push(", ")
}}var G=0;
for(var A in B){if(G>0){L.push(",")
}var D=B[A];
if(typeof D=="string"){L.push(this.quote(A),":",D);
G++;
continue
}L.push(this.quote(A),":");
if(!this._minimize||D.length>1){L.push("[")
}for(var H=0;
H<D.length;
H++){if(H>0){L.push(",")
}L.push(this.serialize(D[H]))
}if(!this._minimize||D.length>1){L.push("]")
}G++
}L.push("}");
return L.join("")
};
AjxJsonSerializer.prototype.quote=function(A){return['"',this.escape(A),'"'].join("")
};
AjxJsonSerializer.prototype.escape=function(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n")
}
}if(AjxPackage.define("ajax.core.AjxImg")){AjxImg=function(){};
AjxImg.prototype=new Object;
AjxImg.prototype.constructor=null;
AjxImg._VIEWPORT_ID="AjxImg_VP";
AjxImg.DISABLED=true;
AjxImg.setImage=function(C,E,A,D){var B=AjxImg.getClassForImage(E,D);
if(A){C.className=B
}else{if(C.firstChild==null){C.innerHTML=B?"<div class='"+B+"'></div>":"<div></div>"
}else{C.firstChild.className=B
}}};
AjxImg.setDisabledImage=function(B,C,A){return AjxImg.setImage(B,C,A,true)
};
AjxImg.getClassForImage=function(C,B){var A="Img"+C;
if(B){A+=" ZDisabledImage"
}return A
};
AjxImg.getImageClass=function(A){return A.firstChild?A.firstChild.className:A.className
};
AjxImg.getImageElement=function(A){return A.firstChild?A.firstChild:A
};
AjxImg.getParentElement=function(A){return A.parentNode
};
AjxImg.getImageHtml=function(D,F,A,C){A=A||"";
F=F?(["style='",F,"' "].join("")):"";
var E=C?"<table style='display:inline' cellpadding=0 cellspacing=0 border=0><tr><td align=center valign=bottom>":"";
var B=C?"</td></tr></table>":"";
if(D){return[E,"<div class='","Img",D,"' ",F," ",A,"></div>",B].join("")
}return[E,"<div ",F," ",A,"></div>",B].join("")
};
AjxImg.getImageSpanHtml=function(F,G,A,B){var E=AjxImg.getClassForImage(F);
var D=[];
var C=0;
D[C++]="<span style='white-space:nowrap'>";
D[C++]="<span class='";
D[C++]=E;
D[C++]=" inlineIcon'";
D[C++]=G?([" style='",G,"' "].join("")):"";
D[C++]=A?([" ",A].join("")):"";
D[C++]=">&nbsp;&nbsp;&nbsp;</span>";
D[C++]=(B||"");
D[C++]="</span>";
return D.join("")
}
}if(AjxPackage.define("ajax.events.AjxEvent")){AjxEvent=function(){this.data=null
};
AjxEvent.HISTORY="HISTORY";
AjxEvent.prototype.toString=function(){return"AjxEvent"
}
}if(AjxPackage.define("ajax.events.AjxEventMgr")){AjxEventMgr=function(){this._listeners=new Object()
};
AjxEventMgr.prototype.toString=function(){return"AjxEventMgr"
};
AjxEventMgr.prototype.addListener=function(B,C,A){var D=this._listeners[B];
if(D==null){D=this._listeners[B]=new AjxVector()
}if(!D.contains(C)){if(this._notifyingListeners){D=this._listeners[B]=D.clone()
}D.add(C,A);
return true
}return false
};
AjxEventMgr.prototype.notifyListeners=function(C,E){this._notifyingListeners=true;
var G=this._listeners[C];
if(G!=null){var A=G.getArray();
var D=G.size();
var F=null;
var H=null;
for(var B=0;
B<D;
B++){H=A[B];
if(!(H&&((H instanceof AjxListener)||(typeof H=="function")))){continue
}F=H.handleEvent?H.handleEvent(E):H(E);
if(F===false){break
}}}this._notifyingListeners=false;
return F
};
AjxEventMgr.prototype.isListenerRegistered=function(A){var B=this._listeners[A];
return(B!=null&&B.size()>0)
};
AjxEventMgr.prototype.removeListener=function(A,B){var C=this._listeners[A];
if(C!=null){if(this._notifyingListeners){C=this._listeners[A]=C.clone()
}C.remove(B);
return true
}return false
};
AjxEventMgr.prototype.removeAll=function(A){var B=this._listeners[A];
if(B!=null){if(this._notifyingListeners){B=this._listeners[A]=B.clone()
}B.removeAll();
return true
}return false
}
}if(AjxPackage.define("ajax.util.AjxTimedAction")){AjxTimedAction=function(C,B,A){AjxCallback.call(this,C,B,A);
this._tid=-1;
this._id=-1;
this._runResult=null
};
AjxTimedAction.prototype=new AjxCallback();
AjxTimedAction.prototype.constructor=AjxTimedAction;
AjxTimedAction.MAX_TIMEOUT=20*24*60*60*1000;
AjxTimedAction.prototype.toString=function(){return"AjxTimedAction"
};
AjxTimedAction.prototype.getRunResult=function(){return this._runResult
};
AjxTimedAction._pendingActions={};
AjxTimedAction._nextActionId=1;
AjxTimedAction.scheduleAction=function(C,B){if(!C){return 
}if(C._tid&&C._tid!=-1){AjxTimedAction.cancelAction(C._id)
}B=B||0;
if(B>AjxTimedAction.MAX_TIMEOUT){if(window.DBG){}B=AjxTimedAction.MAX_TIMEOUT
}var D=C._id=AjxTimedAction._nextActionId++;
AjxTimedAction._pendingActions[D]=C;
var A="AjxTimedAction._exec("+D+")";
C._tid=window.setTimeout(A,B);
return C._id
};
AjxTimedAction.cancelAction=function(B){var A=AjxTimedAction._pendingActions[B];
if(A){window.clearTimeout(A._tid);
delete AjxTimedAction._pendingActions[B];
delete A._tid
}};
AjxTimedAction._exec=function(B){var A=AjxTimedAction._pendingActions[B];
if(A){delete AjxTimedAction._pendingActions[B];
delete A._tid;
A._runResult=A.run()
}}
}if(AjxPackage.define("ajax.net.AjxInclude")){AjxInclude=function(D,F,E,C){var B=document.getElementsByTagName("head")[0];
function A(H){if(AjxEnv.isIE&&H&&!/loaded|complete/.test(H.readyState)){return 
}if(H){H[AjxInclude.eventName]=null
}var G=AjxInclude.dwhack_scripts.length>0?AjxInclude.dwhack_scripts:D;
window.status="";
if(G.length>0){var J=G.shift();
var K=J;
if(!/^((https?|ftps?):\x2f\x2f|\x2f)/.test(J)){if(F){J=F+J
}if(cacheKillerVersion){J+="?v="+cacheKillerVersion
}}else{if(C&&J.indexOf("/")!=0){J=C+AjxStringUtil.urlEncode(J)
}}var H=document.createElement("script");
var I=AjxCallback.simpleClosure(A,null,H);
if(AjxEnv.isIE){H.attachEvent("onreadystatechange",I);
H.attachEvent("onerror",I)
}else{H.addEventListener("load",I,true);
H.addEventListener("error",I,true)
}H.type="text/javascript";
H.src=J;
window.status="Loading script: "+K;
B.appendChild(H)
}else{if(D.length==0){H=null;
B=null;
if(E){E.run()
}}}}A(null)
};
AjxInclude.dwhack_scripts=[];
document.write=document.writeln=function(){var A=[];
for(var B=0;
B<arguments.length;
++B){A[B]=arguments[B]
}var C=A.join("");
if(/<script[^>]+src=([\x22\x27])(.*?)\1/i.test(C)){AjxInclude.dwhack_scripts.push(RegExp.$2)
}};
if(AjxEnv.isIE){AjxInclude._removeWriteln=function(){document.write=document.writeln=null;
window.detachEvent("onunload",AjxInclude._removeWriteln)
};
window.attachEvent("onunload",AjxInclude._removeWriteln)
}}if(AjxPackage.define("ajax.events.AjxListener")){AjxListener=function(B,C,A){AjxCallback.call(this,B,C,A)
};
AjxListener.prototype=new AjxCallback();
AjxListener.prototype.constructor=AjxListener;
AjxListener.prototype.toString=function(){return"AjxListener"
};
AjxListener.prototype.handleEvent=function(A){return this.run(A)
}
}if(AjxPackage.define("ajax.util.AjxText")){AjxFormat=function(A){this._pattern=A;
this._segments=[]
};
AjxFormat.prototype.toString=function(){var B=[];
B.push('pattern="',this._pattern,'"');
if(this._segments.length>0){B.push(", segments={ ");
for(var A=0;
A<this._segments.length;
A++){if(A>0){B.push(", ")
}B.push(String(this._segments[A]))
}B.push(" }")
}return B.join("")
};
AjxFormat.prototype._pattern;
AjxFormat.prototype._segments;
AjxFormat.prototype.format=function(A){var C=[];
for(var B=0;
B<this._segments.length;
B++){C.push(this._segments[B].format(A))
}return C.join("")
};
AjxFormat.prototype.parse=function(D){var B=this._createParseObject();
var A=0;
for(var C=0;
C<this._segments.length;
C++){var E=this._segments[C];
A=E.parse(B,D,A)
}if(A<D.length){throw new AjxFormat.ParsingException(this,null,"input too long")
}return B
};
AjxFormat.prototype.getSegments=function(){return this._segments
};
AjxFormat.prototype.toPattern=function(){return this._pattern
};
AjxFormat.prototype.clone=function(){return new this.constructor(this._pattern)
};
AjxFormat.prototype._createParseObject=function(A){throw new AjxFormat.ParsingException(this,null,"not implemented")
};
AjxFormat._zeroPad=function(D,E,B,F){D=typeof D=="string"?D:String(D);
if(D.length>=E){return D
}B=B||"0";
var A=[];
for(var C=D.length;
C<E;
C++){A.push(B)
}A[F?"unshift":"push"](D);
return A.join("")
};
AjxFormat.FormatException=function(B,A){this._format=B;
this._message=A
};
AjxFormat.FormatException.prototype.toString=function(){return this._message
};
AjxFormat.FormatException.prototype._format;
AjxFormat.FormatException.prototype._message;
AjxFormat.FormattingException=function(C,B,A){AjxFormat.FormatException.call(this,C,A);
this._segment=B
};
AjxFormat.FormattingException.prototype=new AjxFormat.FormatException;
AjxFormat.FormattingException.prototype.constructor=AjxFormat.FormattingException;
AjxFormat.FormattingException.prototype._segment;
AjxFormat.ParsingException=function(C,B,A){AjxFormat.FormatException.call(this,C,A);
this._segment=B
};
AjxFormat.ParsingException.prototype=new AjxFormat.FormatException;
AjxFormat.ParsingException.prototype.constructor=AjxFormat.ParsingException;
AjxFormat.ParsingException.prototype._segment;
AjxFormat.Segment=function(B,A){this._parent=B;
this._s=A
};
AjxFormat.Segment.prototype.toString=function(){return'segment: "'+this._s+'"'
};
AjxFormat.Segment.prototype._parent;
AjxFormat.Segment.prototype._s;
AjxFormat.Segment.prototype.format=function(A){return this._s
};
AjxFormat.Segment.prototype.parse=function(C,B,A){throw new AjxFormat.ParsingException(this._parent,this,"not implemented")
};
AjxFormat.Segment.prototype.getFormat=function(){return this._parent
};
AjxFormat.Segment.prototype.toSubPattern=function(){return this._s
};
AjxFormat.Segment.prototype._getFixedLength=function(){var A;
if(this._index+1<this._parent._segments.length){var B=this._parent._segments[this._index+1];
if(!(B instanceof AjxFormat.TextSegment)){A=this._s.length
}}return A
};
AjxFormat.Segment._parseLiteral=function(D,C,A){if(C.length-A<D.length){throw new AjxFormat.ParsingException(this._parent,this,"input too short")
}for(var B=0;
B<D.length;
B++){if(D.charAt(B)!=C.charAt(A+B)){throw new AjxFormat.ParsingException(this._parent,this,"input doesn't match")
}}return A+D.length
};
AjxFormat.Segment._parseLiterals=function(B,E,I,A,K,F){for(var D=0;
D<A.length;
D++){try{var J=A[D];
var C=AjxFormat.Segment._parseLiteral(J,K,F);
if(E){var H=B||window;
if(typeof E=="function"){E.call(H,D+I)
}else{H[E]=D+I
}}return C
}catch(G){}}return -1
};
AjxFormat.Segment._parseInt=function(B,D,L,M,E,A,J){var F=A||M.length-E;
var I=E;
for(var C=0;
C<F;
C++){if(!M.charAt(E++).match(/\d/)){E--;
break
}}var H=E;
if(I==H){throw new AjxFormat.ParsingException(this._parent,this,"number not present")
}if(A&&H-I!=A){throw new AjxFormat.ParsingException(this._parent,this,"number too short")
}var K=parseInt(M.substring(I,H),J||10);
if(D){var G=B||window;
if(typeof D=="function"){D.call(G,K+L)
}else{G[D]=K+L
}}return H
};
AjxDateFormat=function(F){AjxFormat.call(this,F);
if(typeof F=="number"){switch(F){case AjxDateFormat.SHORT:F=I18nMsg.formatDateShort;
break;
case AjxDateFormat.MEDIUM:F=I18nMsg.formatDateMedium;
break;
case AjxDateFormat.LONG:F=I18nMsg.formatDateLong;
break;
case AjxDateFormat.FULL:F=I18nMsg.formatDateFull;
break
}}for(var C=0;
C<F.length;
C++){var H=F.charAt(C);
if(H=="'"){var B=C+1;
for(C++;
C<F.length;
C++){var H=F.charAt(C);
if(H=="'"){if(C+1<F.length&&F.charAt(C+1)=="'"){F=F.substr(0,C)+F.substr(C+1)
}else{break
}}}if(C==F.length){}var A=C;
var E=new AjxFormat.TextSegment(this,F.substring(B,A));
this._segments.push(E);
continue
}var B=C;
while(C<F.length){H=F.charAt(C);
if(AjxDateFormat._META_CHARS.indexOf(H)!=-1||H=="'"){break
}C++
}var A=C;
if(B!=A){var E=new AjxFormat.TextSegment(this,F.substring(B,A));
this._segments.push(E);
C--;
continue
}var B=C;
while(++C<F.length){if(F.charAt(C)!=H){break
}}var A=C--;
var D=A-B;
var G=F.substr(B,D);
var E=null;
switch(H){case"G":E=new AjxDateFormat.EraSegment(this,G);
break;
case"y":E=new AjxDateFormat.YearSegment(this,G);
break;
case"M":E=new AjxDateFormat.MonthSegment(this,G);
break;
case"w":E=new AjxDateFormat.WeekSegment(this,G);
break;
case"W":E=new AjxDateFormat.WeekSegment(this,G);
break;
case"D":E=new AjxDateFormat.DaySegment(this,G);
break;
case"d":E=new AjxDateFormat.DaySegment(this,G);
break;
case"F":E=new AjxDateFormat.WeekdaySegment(this,G);
break;
case"E":E=new AjxDateFormat.WeekdaySegment(this,G);
break;
case"a":E=new AjxDateFormat.AmPmSegment(this,G);
break;
case"H":E=new AjxDateFormat.HourSegment(this,G);
break;
case"k":E=new AjxDateFormat.HourSegment(this,G);
break;
case"K":E=new AjxDateFormat.HourSegment(this,G);
break;
case"h":E=new AjxDateFormat.HourSegment(this,G);
break;
case"m":E=new AjxDateFormat.MinuteSegment(this,G);
break;
case"s":E=new AjxDateFormat.SecondSegment(this,G);
break;
case"S":E=new AjxDateFormat.SecondSegment(this,G);
break;
case"z":E=new AjxDateFormat.TimezoneSegment(this,G);
break;
case"Z":E=new AjxDateFormat.TimezoneSegment(this,G);
break
}if(E!=null){E._index=this._segments.length;
this._segments.push(E)
}}};
AjxDateFormat.prototype=new AjxFormat;
AjxDateFormat.prototype.constructor=AjxDateFormat;
AjxDateFormat.prototype.toString=function(){return"[AjxDateFormat: "+AjxFormat.prototype.toString.call(this)+"]"
};
AjxDateFormat.SHORT=0;
AjxDateFormat.MEDIUM=1;
AjxDateFormat.LONG=2;
AjxDateFormat.FULL=3;
AjxDateFormat.DEFAULT=AjxDateFormat.MEDIUM;
AjxDateFormat._META_CHARS="GyMwWDdFEaHkKhmsSzZ";
AjxDateFormat._dateFormats=[I18nMsg.formatDateShort,I18nMsg.formatDateMedium,I18nMsg.formatDateLong,I18nMsg.formatDateFull];
AjxDateFormat._timeFormats=[I18nMsg.formatTimeShort,I18nMsg.formatTimeMedium,I18nMsg.formatTimeLong,I18nMsg.formatTimeFull];
AjxDateFormat._DATE_FORMATTERS={};
AjxDateFormat._TIME_FORMATTERS={};
AjxDateFormat._DATETIME_FORMATTERS={};
AjxDateFormat.getDateInstance=function(A){A=A!=null?A:AjxDateFormat.DEFAULT;
if(!AjxDateFormat._DATE_FORMATTERS[A]){AjxDateFormat._DATE_FORMATTERS[A]=new AjxDateFormat(AjxDateFormat._dateFormats[A])
}return AjxDateFormat._DATE_FORMATTERS[A]
};
AjxDateFormat.getTimeInstance=function(A){A=A!=null?A:AjxDateFormat.DEFAULT;
if(!AjxDateFormat._TIME_FORMATTERS[A]){AjxDateFormat._TIME_FORMATTERS[A]=new AjxDateFormat(AjxDateFormat._timeFormats[A])
}return AjxDateFormat._TIME_FORMATTERS[A]
};
AjxDateFormat.getDateTimeInstance=function(A,B){A=A!=null?A:AjxDateFormat.DEFAULT;
B=B!=null?B:AjxDateFormat.DEFAULT;
var D=A*10+B;
if(!AjxDateFormat._DATETIME_FORMATTERS[D]){var E=I18nMsg.formatDateTime;
var F=[AjxDateFormat._dateFormats[A],AjxDateFormat._timeFormats[B]];
var C=AjxMessageFormat.format(E,F);
AjxDateFormat._DATETIME_FORMATTERS[D]=new AjxDateFormat(C)
}return AjxDateFormat._DATETIME_FORMATTERS[D]
};
AjxDateFormat.format=function(B,A){return new AjxDateFormat(B).format(A)
};
AjxDateFormat.parse=function(B,A){return new AjxDateFormat(B).parse(A)
};
AjxDateFormat.prototype.parse=function(D){var C=null;
try{C=AjxFormat.prototype.parse.call(this,D);
var B=new Date(0,0,1,0,0,0,0);
if(C.year!=null){B.setFullYear(C.year)
}if(C.month!=null){B.setMonth(C.month)
}if(C.dayofmonth!=null){B.setDate(C.dayofmonth)
}else{if(C.dayofyear!=null){B.setMonth(0,C.dayofyear)
}}if(C.hours!=null){B.setHours(C.hours)
}if(C.minutes!=null){B.setMinutes(C.minutes)
}if(C.seconds!=null){B.setSeconds(C.seconds)
}if(C.milliseconds!=null){B.setMilliseconds(C.milliseconds)
}if(C.ampm!=null){var A=B.getHours();
if(A==12&&C.ampm==0){A=0
}else{if(A!=12&&C.ampm==1){A+=12
}}B.setHours(A)
}C=B
}catch(E){}return C
};
AjxDateFormat.prototype._createParseObject=function(){return{year:null,month:null,dayofmonth:null,dayofyear:null,hours:null,minutes:null,seconds:null,milliseconds:null,ampm:null,era:null,timezone:null}
};
AjxFormat.TextSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxFormat.TextSegment.prototype=new AjxFormat.Segment;
AjxFormat.TextSegment.prototype.constructor=AjxFormat.TextSegment;
AjxFormat.TextSegment.prototype.toString=function(){return'text: "'+this._s+'"'
};
AjxFormat.TextSegment.prototype.parse=function(C,B,A){return AjxFormat.Segment._parseLiteral(this._s,B,A)
};
AjxDateFormat.DateSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxDateFormat.DateSegment.prototype=new AjxFormat.Segment;
AjxDateFormat.DateSegment.prototype.constructor=AjxDateFormat.DateSegment;
AjxDateFormat.EraSegment=function(B,A){AjxDateFormat.DateSegment.call(this,B,A)
};
AjxDateFormat.EraSegment.prototype=new AjxDateFormat.DateSegment;
AjxDateFormat.EraSegment.prototype.constructor=AjxDateFormat.EraSegment;
AjxDateFormat.EraSegment.prototype.toString=function(){return'dateEra: "'+this._s+'"'
};
AjxDateFormat.EraSegment.prototype.format=function(A){return I18nMsg.eraAD
};
AjxDateFormat.YearSegment=function(B,A){AjxDateFormat.DateSegment.call(this,B,A)
};
AjxDateFormat.YearSegment.prototype=new AjxDateFormat.DateSegment;
AjxDateFormat.YearSegment.prototype.constructor=AjxDateFormat.YearSegment;
AjxDateFormat.YearSegment.prototype.toString=function(){return'dateYear: "'+this._s+'"'
};
AjxDateFormat.YearSegment.prototype.format=function(A){var B=String(A.getFullYear());
return this._s.length<4?B.substr(B.length-2):AjxFormat._zeroPad(B,this._s.length)
};
AjxDateFormat.YearSegment.prototype.parse=function(C,I,E){var A=this._getFixedLength();
var B=AjxFormat.Segment._parseInt(C,"year",0,I,E,A);
if(B-E==2){if(!AjxDateFormat._2digitStartYear){AjxDateFormat._2digitStartYear=parseInt(AjxMsg.dateParsing2DigitStartYear)
}var G=AjxDateFormat._2digitStartYear;
var H=parseInt(I.substr(E,2),10);
var D=(Math.floor(G/100)+(H<(G%100)?1:0))*100;
var F=D+H;
C.year=F
}return B
};
AjxDateFormat.MonthSegment=function(B,A){AjxDateFormat.DateSegment.call(this,B,A)
};
AjxDateFormat.MonthSegment.prototype=new AjxDateFormat.DateSegment;
AjxDateFormat.MonthSegment.prototype.constructor=AjxDateFormat.MonthSegment;
AjxDateFormat.MonthSegment.prototype.toString=function(){return'dateMonth: "'+this._s+'"'
};
AjxDateFormat.MonthSegment.MONTHS={};
AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT]=[AjxMsg.monthJanShort,AjxMsg.monthFebShort,AjxMsg.monthMarShort,AjxMsg.monthAprShort,AjxMsg.monthMayShort,AjxMsg.monthJunShort,AjxMsg.monthJulShort,AjxMsg.monthAugShort,AjxMsg.monthSepShort,AjxMsg.monthOctShort,AjxMsg.monthNovShort,AjxMsg.monthDecShort];
AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM]=[I18nMsg.monthJanMedium,I18nMsg.monthFebMedium,I18nMsg.monthMarMedium,I18nMsg.monthAprMedium,I18nMsg.monthMayMedium,I18nMsg.monthJunMedium,I18nMsg.monthJulMedium,I18nMsg.monthAugMedium,I18nMsg.monthSepMedium,I18nMsg.monthOctMedium,I18nMsg.monthNovMedium,I18nMsg.monthDecMedium];
AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG]=[I18nMsg.monthJanLong,I18nMsg.monthFebLong,I18nMsg.monthMarLong,I18nMsg.monthAprLong,I18nMsg.monthMayLong,I18nMsg.monthJunLong,I18nMsg.monthJulLong,I18nMsg.monthAugLong,I18nMsg.monthSepLong,I18nMsg.monthOctLong,I18nMsg.monthNovLong,I18nMsg.monthDecLong];
AjxDateFormat.MonthSegment.prototype.format=function(A){var B=A.getMonth();
switch(this._s.length){case 1:return String(B+1);
case 2:return AjxFormat._zeroPad(B+1,2);
case 3:return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM][B];
case 5:return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT][B]
}return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG][B]
};
AjxDateFormat.MonthSegment.prototype.parse=function(C,E,B){var A;
switch(this._s.length){case 3:A=AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM];
case 4:A=A||AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG];
case 5:A=A||AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT];
var D=AjxFormat.Segment._parseLiterals(C,"month",0,A,E,B);
if(D==-1){throw new AjxFormat.ParsingException(this._parent,this,"no match")
}return D
}var F=this._getFixedLength();
return AjxFormat.Segment._parseInt(C,"month",-1,E,B,F)
};
AjxDateFormat.WeekSegment=function(B,A){AjxDateFormat.DateSegment.call(this,B,A)
};
AjxDateFormat.WeekSegment.prototype=new AjxDateFormat.DateSegment;
AjxDateFormat.WeekSegment.prototype.constructor=AjxDateFormat.WeekSegment;
AjxDateFormat.WeekSegment.prototype.toString=function(){return'weekMonth: "'+this._s+'"'
};
AjxDateFormat.WeekSegment.prototype.format=function(B){var D=B.getYear();
var F=B.getMonth();
var A=B.getDate();
var G=/w/.test(this._s);
var E=new Date(D,G?0:F,1);
var C=0;
while(true){C++;
if(E.getMonth()>F||(E.getMonth()==F&&E.getDate()>=A)){break
}E.setDate(E.getDate()+7)
}return AjxFormat._zeroPad(C,this._s.length)
};
AjxDateFormat.WeekSegment.prototype.parse=function(B,C,A){var D=this._getFixedLength();
return AjxFormat.Segment._parseInt(null,null,0,C,A,D)
};
AjxDateFormat.DaySegment=function(B,A){AjxDateFormat.DateSegment.call(this,B,A)
};
AjxDateFormat.DaySegment.prototype=new AjxDateFormat.DateSegment;
AjxDateFormat.DaySegment.prototype.constructor=AjxDateFormat.DaySegment;
AjxDateFormat.DaySegment.prototype.toString=function(){return'dateDay: "'+this._s+'"'
};
AjxDateFormat.DaySegment.prototype.format=function(B){var E=B.getMonth();
var A=B.getDate();
if(/D/.test(this._s)&&E>0){var C=B.getYear();
do{var D=new Date(C,E,1);
D.setDate(0);
A+=D.getDate();
E--
}while(E>0)
}return AjxFormat._zeroPad(A,this._s.length)
};
AjxDateFormat.DaySegment.prototype.parse=function(B,D,A){var E=this._getFixedLength();
var C=/D/.test(this._s)?"dayofyear":"dayofmonth";
return AjxFormat.Segment._parseInt(B,C,0,D,A,E)
};
AjxDateFormat.WeekdaySegment=function(B,A){AjxDateFormat.DateSegment.call(this,B,A)
};
AjxDateFormat.WeekdaySegment.prototype=new AjxDateFormat.DateSegment;
AjxDateFormat.WeekdaySegment.prototype.constructor=AjxDateFormat.WeekdaySegment;
AjxDateFormat.DaySegment.prototype.toString=function(){return'dateDay: "'+this._s+'"'
};
AjxDateFormat.WeekdaySegment.WEEKDAYS={};
AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.SHORT]=[AjxMsg.weekdaySunShort,AjxMsg.weekdayMonShort,AjxMsg.weekdayTueShort,AjxMsg.weekdayWedShort,AjxMsg.weekdayThuShort,AjxMsg.weekdayFriShort,AjxMsg.weekdaySatShort];
AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.MEDIUM]=[I18nMsg.weekdaySunMedium,I18nMsg.weekdayMonMedium,I18nMsg.weekdayTueMedium,I18nMsg.weekdayWedMedium,I18nMsg.weekdayThuMedium,I18nMsg.weekdayFriMedium,I18nMsg.weekdaySatMedium];
AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.LONG]=[I18nMsg.weekdaySunLong,I18nMsg.weekdayMonLong,I18nMsg.weekdayTueLong,I18nMsg.weekdayWedLong,I18nMsg.weekdayThuLong,I18nMsg.weekdayFriLong,I18nMsg.weekdaySatLong];
AjxDateFormat.WeekdaySegment.prototype.format=function(A){var C=A.getDay();
if(/E/.test(this._s)){var B;
switch(this._s.length){case 4:B=AjxDateFormat.LONG;
break;
case 5:B=AjxDateFormat.SHORT;
break;
default:B=AjxDateFormat.MEDIUM
}return AjxDateFormat.WeekdaySegment.WEEKDAYS[B][C]
}return AjxFormat._zeroPad(C,this._s.length)
};
AjxDateFormat.WeekdaySegment.prototype.parse=function(C,E,B){var A;
switch(this._s.length){case 3:A=AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.MEDIUM];
case 4:A=A||AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.LONG];
case 5:A=A||AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.SHORT];
var D=AjxFormat.Segment._parseLiterals(null,null,0,A,E,B);
if(D==-1){throw new AjxFormat.ParsingException(this._parent,this,"no match")
}return D
}var F=this._getFixedLength();
return AjxFormat.Segment._parseInt(null,null,0,E,B,F)
};
AjxDateFormat.TimeSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxDateFormat.TimeSegment.prototype=new AjxFormat.Segment;
AjxDateFormat.TimeSegment.prototype.constructor=AjxDateFormat.TimeSegment;
AjxDateFormat.HourSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxDateFormat.HourSegment.prototype=new AjxDateFormat.TimeSegment;
AjxDateFormat.HourSegment.prototype.constructor=AjxDateFormat.HourSegment;
AjxDateFormat.HourSegment.prototype.toString=function(){return'timeHour: "'+this._s+'"'
};
AjxDateFormat.HourSegment.prototype.format=function(B){var A=B.getHours();
if(A>12&&/[hK]/.test(this._s)){A-=12
}else{if(A==0&&/[h]/.test(this._s)){A=12
}}return AjxFormat._zeroPad(A,this._s.length)
};
AjxDateFormat.HourSegment.prototype.parse=function(B,C,A){var D=this._getFixedLength();
return AjxFormat.Segment._parseInt(B,"hours",0,C,A,D)
};
AjxDateFormat.MinuteSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxDateFormat.MinuteSegment.prototype=new AjxDateFormat.TimeSegment;
AjxDateFormat.MinuteSegment.prototype.constructor=AjxDateFormat.MinuteSegment;
AjxDateFormat.MinuteSegment.prototype.toString=function(){return'timeMinute: "'+this._s+'"'
};
AjxDateFormat.MinuteSegment.prototype.format=function(A){var B=A.getMinutes();
return AjxFormat._zeroPad(B,this._s.length)
};
AjxDateFormat.MinuteSegment.prototype.parse=function(B,C,A){var D=this._getFixedLength();
return AjxFormat.Segment._parseInt(B,"minutes",0,C,A,D)
};
AjxDateFormat.SecondSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxDateFormat.SecondSegment.prototype=new AjxDateFormat.TimeSegment;
AjxDateFormat.SecondSegment.prototype.constructor=AjxDateFormat.SecondSegment;
AjxDateFormat.SecondSegment.prototype.toString=function(){return'timeSecond: "'+this._s+'"'
};
AjxDateFormat.SecondSegment.prototype.format=function(A){var B=/s/.test(this._s)?A.getSeconds():A.getMilliseconds();
return AjxFormat._zeroPad(B,this._s.length)
};
AjxDateFormat.SecondSegment.prototype.parse=function(B,D,A){var E=this._getFixedLength();
var C=/s/.test(this._s)?"seconds":"milliseconds";
return AjxFormat.Segment._parseInt(B,C,0,D,A,E)
};
AjxDateFormat.AmPmSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxDateFormat.AmPmSegment.prototype=new AjxDateFormat.TimeSegment;
AjxDateFormat.AmPmSegment.prototype.constructor=AjxDateFormat.AmPmSegment;
AjxDateFormat.AmPmSegment.prototype.toString=function(){return'timeAmPm: "'+this._s+'"'
};
AjxDateFormat.AmPmSegment.prototype.format=function(B){var A=B.getHours();
return A<12?I18nMsg.periodAm:I18nMsg.periodPm
};
AjxDateFormat.AmPmSegment.prototype.parse=function(B,D,A){var E=[I18nMsg.periodAm.toLowerCase(),I18nMsg.periodPm.toLowerCase(),I18nMsg.periodAm.toUpperCase(),I18nMsg.periodPm.toUpperCase()];
var C=AjxFormat.Segment._parseLiterals(B,"ampm",0,E,D,A);
if(C==-1){throw new AjxFormat.ParsingException(this._parent,this,"no match")
}B.ampm=B.ampm%2;
return C
};
AjxDateFormat.TimezoneSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxDateFormat.TimezoneSegment.prototype=new AjxDateFormat.TimeSegment;
AjxDateFormat.TimezoneSegment.prototype.constructor=AjxDateFormat.TimezoneSegment;
AjxDateFormat.TimezoneSegment.prototype.toString=function(){return'timeTimezone: "'+this._s+'"'
};
AjxDateFormat.TimezoneSegment.prototype.format=function(B){var A=B.timezone||AjxTimezone.DEFAULT;
if(/Z/.test(this._s)){return AjxTimezone.getShortName(A)
}return this._s.length<4?AjxTimezone.getMediumName(A):AjxTimezone.getLongName(A)
};
AjxMessageFormat=function(F){if(!F){return""
}AjxFormat.call(this,F);
for(var B=0;
B<F.length;
B++){var G=F.charAt(B);
if(G=="'"){if(B+1<F.length&&F.charAt(B+1)=="'"){var C=new AjxFormat.TextSegment(this,"'");
this._segments.push(C);
B++;
continue
}var H=B+1;
for(B++;
B<F.length;
B++){var G=F.charAt(B);
if(G=="'"){if(B+1<F.length&&F.charAt(B+1)=="'"){F=F.substr(0,B)+F.substr(B+1)
}else{break
}}}if(B==F.length){}var E=B;
var C=new AjxFormat.TextSegment(this,F.substring(H,E));
this._segments.push(C);
continue
}var H=B;
while(B<F.length){G=F.charAt(B);
if(G=="{"||G=="'"){break
}B++
}var E=B;
if(H!=E){var C=new AjxFormat.TextSegment(this,F.substring(H,E));
this._segments.push(C);
B--;
continue
}var H=B+1;
var A=0;
while(++B<F.length){var G=F.charAt(B);
if(G=="{"){A++
}else{if(G=="}"){if(A==0){break
}A--
}}}var E=B;
var D=E-H;
var I=F.substr(H,D);
var C=new AjxMessageFormat.MessageSegment(this,I);
if(C!=null){this._segments.push(C)
}}};
AjxMessageFormat.prototype=new AjxFormat;
AjxMessageFormat.prototype.constructor=AjxMessageFormat;
AjxMessageFormat.prototype.toString=function(){return"[AjxMessageFormat: "+AjxFormat.prototype.toString.call(this)+"]"
};
AjxMessageFormat.format=function(A,B){return new AjxMessageFormat(A).format(B)
};
AjxMessageFormat.prototype.format=function(A){if(!(A instanceof Array)){A=[A]
}return AjxFormat.prototype.format.call(this,A)
};
AjxMessageFormat.prototype.getFormats=function(){var A=[];
for(var B=0;
B<this._segments.length;
B++){var C=this._segments[B];
if(C instanceof AjxMessageFormat.MessageSegment){A.push(C.getSegmentFormat())
}}return A
};
AjxMessageFormat.prototype.getFormatsByArgumentIndex=function(){var A=[];
for(var B=0;
B<this._segments.length;
B++){var C=this._segments[B];
if(C instanceof AjxMessageFormat.MessageSegment){A[C.getIndex()]=C.getSegmentFormat()
}}return A
};
AjxMessageFormat.MessageSegment=function(D,A){AjxFormat.Segment.call(this,D,A);
var C=AjxMessageFormat.MessageSegment._split(A,",");
this._index=Number(C[0]);
this._type=C[1]||"string";
this._style=C[2];
if(this._type=="list"){this._isList=true;
this._type=C[2]||"string";
this._style=C[3]
}switch(this._type){case"number":switch(this._style){case"integer":this._formatter=AjxNumberFormat.getIntegerInstance();
break;
case"currency":this._formatter=AjxNumberFormat.getCurrencyInstance();
break;
case"percent":this._formatter=AjxNumberFormat.getPercentInstance();
break;
default:this._formatter=this._style==null?AjxNumberFormat.getInstance():new AjxNumberFormat(this._style)
}break;
case"date":case"time":var B=this._type=="date"?AjxDateFormat.getDateInstance:AjxDateFormat.getTimeInstance;
switch(this._style){case"short":this._formatter=B(AjxDateFormat.SHORT);
break;
case"medium":this._formatter=B(AjxDateFormat.MEDIUM);
break;
case"long":this._formatter=B(AjxDateFormat.LONG);
break;
case"full":this._formatter=B(AjxDateFormat.FULL);
break;
default:this._formatter=this._style==null?B(AjxDateFormat.DEFAULT):new AjxDateFormat(this._style)
}break;
case"choice":this._formatter=new AjxChoiceFormat(this._style);
break
}if(this._isList){this._formatter=new AjxListFormat(this._formatter)
}};
AjxMessageFormat.MessageSegment.prototype=new AjxFormat.Segment;
AjxMessageFormat.MessageSegment.prototype.constructor=AjxMessageFormat.MessageSegment;
AjxMessageFormat.MessageSegment.prototype.toString=function(){var A=['message: "',this._s,'", index: ',this._index];
if(this._isList){A.push(", list: ",this._isList)
}if(this._type){A.push(", type: ",this._type)
}if(this._style){A.push(", style: ",this._style)
}if(this._formatter){A.push(", formatter: ",this._formatter.toString())
}return A.join("")
};
AjxMessageFormat.MessageSegment.prototype._index;
AjxMessageFormat.MessageSegment.prototype._type;
AjxMessageFormat.MessageSegment.prototype._style;
AjxMessageFormat.MessageSegment.prototype._isList=false;
AjxMessageFormat.MessageSegment.prototype._formatter;
AjxMessageFormat.MessageSegment.prototype.format=function(B){var A=B[this._index];
if(this._formatter instanceof AjxChoiceFormat){return this._formatter.format(B,this._index)
}return this._formatter?this._formatter.format(A):String(A)
};
AjxMessageFormat.MessageSegment.prototype.getIndex=function(){return this._index
};
AjxMessageFormat.MessageSegment.prototype.getType=function(){return this._type
};
AjxMessageFormat.MessageSegment.prototype.getStyle=function(){return this._style
};
AjxMessageFormat.MessageSegment.prototype.getSegmentFormat=function(){return this._formatter
};
AjxMessageFormat.MessageSegment._split=function(D,A){var E=[];
var C=0;
var B;
var F=0;
for(B=0;
B<D.length;
B++){var G=D.charAt(B);
if(G=="{"){F++
}else{if(G=="}"){F--
}else{if(G==A&&F==0){E.push(D.substring(C,B));
C=B+1
}}}}if(B>C){E.push(D.substring(C,B))
}return E
};
AjxNumberFormat=function(O,P){AjxFormat.call(this,O);
if(O==""){return 
}var B=O.split(/;/);
var O=B[0];
var M=0;
var K=this.__parseStatic(O,M);
M=K.offset;
var E=K.text!="";
if(E){this._segments.push(new AjxFormat.TextSegment(this,K.text))
}var F=M;
while(M<O.length&&AjxNumberFormat._META_CHARS.indexOf(O.charAt(M))!=-1){M++
}var D=M;
var A=O.substring(F,D);
var Q=A.indexOf("E");
var I=Q!=-1?A.substring(Q+1):null;
if(I){A=A.substring(0,Q);
this._showExponent=true
}var J=A.indexOf(".");
var R=J!=-1?A.substring(0,J):A;
if(R){var S=R.lastIndexOf(",");
if(S!=-1){this._groupingOffset=R.length-S-1
}R=R.replace(/[^#0]/g,"");
var H=R.indexOf("0");
if(H!=-1){this._minIntDigits=R.length-H
}this._maxIntDigits=R.length
}var N=J!=-1?A.substring(J+1):null;
if(N){var H=N.lastIndexOf("0");
if(H!=-1){this._minFracDigits=H+1
}this._maxFracDigits=N.replace(/[^#0]/g,"").length
}this._segments.push(new AjxNumberFormat.NumberSegment(this,A));
var K=this.__parseStatic(O,M);
M=K.offset;
if(K.text!=""){this._segments.push(new AjxFormat.TextSegment(this,K.text))
}if(P){return 
}if(B.length>1){var O=B[1];
this._negativeFormatter=new AjxNumberFormat(O,true)
}else{var L=new AjxNumberFormat("");
L._segments=L._segments.concat(this._segments);
var G=E?1:0;
var C=new AjxFormat.TextSegment(L,I18nMsg.numberSignMinus);
L._segments.splice(G,0,C);
this._negativeFormatter=L
}};
AjxNumberFormat.prototype=new AjxFormat;
AjxNumberFormat.prototype.constructor=AjxNumberFormat;
AjxNumberFormat.prototype.toString=function(){var A=["[AjxNumberFormat: ","formatter=",AjxFormat.prototype.toString.call(this)];
if(this._negativeFormatter){A.push(", negativeFormatter=",this._negativeFormatter.toString())
}A.push("]");
return A.join("")
};
AjxNumberFormat._NUMBER="number";
AjxNumberFormat._INTEGER="integer";
AjxNumberFormat._CURRENCY="currency";
AjxNumberFormat._PERCENT="percent";
AjxNumberFormat._META_CHARS="0#.,E";
AjxNumberFormat._FORMATTERS={};
AjxNumberFormat.prototype._groupingOffset=Number.MAX_VALUE;
AjxNumberFormat.prototype._maxIntDigits;
AjxNumberFormat.prototype._minIntDigits=1;
AjxNumberFormat.prototype._maxFracDigits;
AjxNumberFormat.prototype._minFracDigits;
AjxNumberFormat.prototype._isCurrency=false;
AjxNumberFormat.prototype._isPercent=false;
AjxNumberFormat.prototype._isPerMille=false;
AjxNumberFormat.prototype._showExponent=false;
AjxNumberFormat.prototype._negativeFormatter;
AjxNumberFormat.getInstance=function(){if(!AjxNumberFormat._FORMATTERS[AjxNumberFormat._NUMBER]){AjxNumberFormat._FORMATTERS[AjxNumberFormat._NUMBER]=new AjxNumberFormat(I18nMsg.formatNumber)
}return AjxNumberFormat._FORMATTERS[AjxNumberFormat._NUMBER]
};
AjxNumberFormat.getNumberInstance=AjxNumberFormat.getInstance;
AjxNumberFormat.getCurrencyInstance=function(){if(!AjxNumberFormat._FORMATTERS[AjxNumberFormat._CURRENCY]){AjxNumberFormat._FORMATTERS[AjxNumberFormat._CURRENCY]=new AjxNumberFormat(I18nMsg.formatNumberCurrency)
}return AjxNumberFormat._FORMATTERS[AjxNumberFormat._CURRENCY]
};
AjxNumberFormat.getIntegerInstance=function(){if(!AjxNumberFormat._FORMATTERS[AjxNumberFormat._INTEGER]){AjxNumberFormat._FORMATTERS[AjxNumberFormat._INTEGER]=new AjxNumberFormat(I18nMsg.formatNumberInteger)
}return AjxNumberFormat._FORMATTERS[AjxNumberFormat._INTEGER]
};
AjxNumberFormat.getPercentInstance=function(){if(!AjxNumberFormat._FORMATTERS[AjxNumberFormat._PERCENT]){AjxNumberFormat._FORMATTERS[AjxNumberFormat._PERCENT]=new AjxNumberFormat(I18nMsg.formatNumberPercent)
}return AjxNumberFormat._FORMATTERS[AjxNumberFormat._PERCENT]
};
AjxNumberFormat.format=function(B,A){return new AjxNumberFormat(B).format(A)
};
AjxNumberFormat.prototype.format=function(A){if(A<0&&this._negativeFormatter){return this._negativeFormatter.format(A)
}return AjxFormat.prototype.format.call(this,A)
};
AjxNumberFormat.prototype.__parseStatic=function(C,B){var D=[];
while(B<C.length){var F=C.charAt(B++);
if(AjxNumberFormat._META_CHARS.indexOf(F)!=-1){B--;
break
}switch(F){case"'":var E=B;
while(B<C.length&&C.charAt(B++)!="'"){}var A=B;
F=A-E==0?"'":C.substring(E,A);
break;
case"%":F=I18nMsg.numberSignPercent;
this._isPercent=true;
break;
case"\u2030":F=I18nMsg.numberSignPerMill;
this._isPerMille=true;
break;
case"\u00a4":F=C.charAt(B)=="\u00a4"?I18nMsg.currencyCode:I18nMsg.currencySymbol;
this._isCurrency=true;
break
}D.push(F)
}return{text:D.join(""),offset:B}
};
AjxNumberFormat.NumberSegment=function(B,A){AjxFormat.Segment.call(this,B,A)
};
AjxNumberFormat.NumberSegment.prototype=new AjxFormat.Segment;
AjxNumberFormat.NumberSegment.prototype.constructor=AjxNumberFormat.NumberSegment;
AjxNumberFormat.NumberSegment.prototype.toString=function(){return'number: "'+this._s+'"'
};
AjxNumberFormat.NumberSegment.prototype.format=function(B){if(isNaN(B)){return I18nMsg.numberNaN
}if(B===Number.NEGATIVE_INFINITY||B===Number.POSITIVE_INFINITY){return I18nMsg.numberInfinity
}if(typeof B!="number"){B=Number(B)
}B=Math.abs(B);
if(this._parent._isPercent){B*=100
}else{if(this._parent._isPerMille){B*=1000
}}var A=this._parent._showExponent?B.toExponential(this._parent._maxFracDigits).toUpperCase().replace(/E\+/,"E"):B.toFixed(this._parent._maxFracDigits||0);
A=this._normalize(A);
return A
};
AjxNumberFormat.NumberSegment.prototype._normalize=function(E){var C=E.split(/([\.Ee])/);
var F=C.shift();
if(F.length<this._parent._minIntDigits){F=AjxFormat._zeroPad(F,this._parent._minIntDigits,I18nMsg.numberZero)
}if(F.length>this._parent._groupingOffset){var B=[];
var D=F.length-this._parent._groupingOffset;
while(D>0){B.unshift(F.substr(D,this._parent._groupingOffset));
B.unshift(I18nMsg.numberSeparatorGrouping);
D-=this._parent._groupingOffset
}B.unshift(F.substring(0,D+this._parent._groupingOffset));
F=B.join("")
}var G="0";
var H;
while(C.length>0){switch(C.shift()){case".":G=C.shift();
break;
case"E":case"e":H=C.shift();
break;
default:}}G=G.replace(/0+$/,"");
if(G.length<this._parent._minFracDigits){G=AjxFormat._zeroPad(G,this._parent._minFracDigits,I18nMsg.numberZero,true)
}var B=[F];
if(G.length>0){var A=this._parent._isCurrency?I18nMsg.numberSeparatorMoneyDecimal:I18nMsg.numberSeparatorDecimal;
B.push(A,G)
}if(H){B.push("E",H.replace(/^\+/,""))
}return B.join("")
};
AjxChoiceFormat=function(F){AjxFormat.call(this,F);
var I=F.split("|");
if(arguments.length==1){this._limits=new Array(I.length);
this._lessThan=new Array(I.length);
this._formats=new Array(I.length);
var G=new RegExp("^([^#<\u2264]+)([#<\u2264])(.*)$");
for(var C=0;
C<I.length;
C++){var B=I[C];
var D=G.exec(B);
var A=D[1];
var E=D[2];
var H=D[3];
if(A=="\u221E"){this._limits[C]=Number.POSITIVE_INFINITY
}else{if(A=="-\u221E"){this._limits[C]=Number.NEGATIVE_INFINITY
}else{this._limits[C]=parseFloat(A)
}}this._lessThan[C]=E=="#"||E=="\u2264";
this._formats[C]=new AjxMessageFormat(H)
}}else{this._limits=arguments[0];
this._lessThan=new Array(arguments[0].length);
this._formats=arguments[1];
this._pattern=[];
for(var C=0;
C<this._formats.length;
C++){if(C>0){this._pattern.push("|")
}this._pattern.push(this._limits[C],"#",this._formats[C]);
this._lessThan[C]=false;
this._formats[C]=new AjxMessageFormat(this._formats[C])
}this._pattern=this._pattern.join("")
}};
AjxChoiceFormat.prototype=new AjxFormat;
AjxChoiceFormat.prototype.constructor=AjxChoiceFormat;
AjxChoiceFormat.prototype.toString=function(){return["[AjxChoiceFormat: ","limits={ ",this._limits.join(", ")," }, ","formats={ ",this._formats.join(", ")," }, ","lessThan={ ",this._lessThan.join(", ")," }]"].join("")
};
AjxChoiceFormat.prototype._limits;
AjxChoiceFormat.prototype._lessThan;
AjxChoiceFormat.prototype._formats;
AjxChoiceFormat.prototype.getLimits=function(){return this._limits
};
AjxChoiceFormat.prototype.getFormats=function(){return this._formats
};
AjxChoiceFormat.prototype.format=function(A,D){var C=A instanceof Array?A[D]:A;
var H;
if(isNaN(C)||C<this._limits[0]){H=this._formats[0]
}else{for(var B=0;
B<this._limits.length-1;
B++){var G=this._limits[B];
var F=this._limits[B+1];
var I=C>=G;
var E=this._lessThan[B+1]?C<F:C<=F;
if(I&&E){H=this._formats[B];
break
}}if(!H){H=this._formats[this._formats.length-1]
}}return H.format(A)
};
AjxListFormat=function(A,C,B){AjxFormat.call(this,A?A.toPattern():"");
this._formatter=A;
this._separator=C||AjxMsg.listSeparator;
this._lastSeparator=B||AjxMsg.listSeparatorLast
};
AjxListFormat.prototype=new AjxFormat;
AjxListFormat.prototype.constructor=AjxListFormat;
AjxListFormat.prototype._formatter;
AjxListFormat.prototype._separator;
AjxListFormat.prototype._lastSeparator;
AjxListFormat.prototype.format=function(D){D=D instanceof Array?D:[D];
var C=[];
for(var A=0;
A<D.length;
A++){if(A>0){C.push(A<D.length-1?this._separator:this._lastSeparator)
}var B=D[A];
C.push(this._formatter?this._formatter.format(B):String(B))
}return C.join("")
}
}if(AjxPackage.define("ajax.util.AjxDateUtil")){AjxDateUtil=function(){};
AjxDateUtil.YEAR=1;
AjxDateUtil.MONTH=2;
AjxDateUtil.WEEK=3;
AjxDateUtil.DAY=4;
AjxDateUtil.MSEC_PER_FIFTEEN_MINUTES=900000;
AjxDateUtil.MSEC_PER_HALF_HOUR=1800000;
AjxDateUtil.MSEC_PER_HOUR=3600000;
AjxDateUtil.MSEC_PER_DAY=24*AjxDateUtil.MSEC_PER_HOUR;
AjxDateUtil.WEEKDAY_SHORT=AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.SHORT];
AjxDateUtil.WEEKDAY_MEDIUM=AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.MEDIUM];
AjxDateUtil.WEEKDAY_LONG=AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.LONG];
AjxDateUtil.MONTH_SHORT=AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT];
AjxDateUtil.MONTH_MEDIUM=AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM];
AjxDateUtil.MONTH_LONG=AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG];
AjxDateUtil._daysPerMonth={0:31,1:29,2:31,3:30,4:31,5:30,6:31,7:31,8:30,9:31,10:30,11:31};
AjxDateUtil._init=function(){AjxDateUtil._dateFormat=AjxDateFormat.getDateInstance(AjxDateFormat.SHORT).clone();
var A=AjxDateUtil._dateFormat.getSegments();
for(var B=0;
B<A.length;
B++){if(A[B] instanceof AjxDateFormat.YearSegment){A[B]=new AjxDateFormat.YearSegment(AjxDateUtil._dateFormat,"yyyy")
}}AjxDateUtil._dateTimeFormat=new AjxDateFormat(AjxDateUtil._dateFormat.toPattern()+" "+AjxDateFormat.getTimeInstance(AjxDateFormat.SHORT));
AjxDateUtil._dateFormatNoYear=new AjxDateFormat(AjxMsg.formatDateMediumNoYear)
};
AjxDateUtil._init();
AjxDateUtil.validDate=function(E,A,D){var B=new Date(E,A,D);
var C=E>999?B.getFullYear():B.getYear();
return B.getMonth()==A&&B.getDate()==D&&C==E
};
AjxDateUtil.daysInMonth=function(C,A){var B=new Date(C,A,1,12);
B.setMonth(B.getMonth()+1);
B.setDate(B.getDate()-1);
return B.getDate()
};
AjxDateUtil.isLeapYear=function(A){return(new Date(A,1,29)).getMonth()==1
};
AjxDateUtil.isLocale24Hour=function(){var B=AjxDateFormat.getTimeInstance(AjxDateFormat.SHORT);
var A=B._segments.length;
for(var C=0;
C<A;
C++){if(B._segments[C]._s=="a"){return false
}}return true
};
AjxDateUtil.roll=function(B,C,E){var D=B.getDate();
if(C==AjxDateUtil.MONTH){B.setDate(1);
B.setMonth(B.getMonth()+E);
var A=AjxDateUtil.daysInMonth(B.getFullYear(),B.getMonth());
B.setDate(Math.min(D,A))
}else{if(C==AjxDateUtil.YEAR){B.setDate(1);
B.setFullYear(B.getFullYear()+E);
var A=AjxDateUtil.daysInMonth(B.getFullYear(),B.getMonth());
B.setDate(Math.min(D,A))
}else{if(C==AjxDateUtil.WEEK){B.setDate(B.getDate()+7*E)
}else{if(C==AjxDateUtil.DAY){B.setDate(B.getDate()+E)
}else{return B
}}}}return B
};
AjxDateUtil.computeDateDelta=function(A){var B=(new Date()).getTime()-A;
var C=AjxDateUtil.computeDuration(B);
return C?(C+" "+AjxMsg.ago):null
};
AjxDateUtil.computeDuration=function(C,I){if(C<0){return null
}var E=Math.floor(C/(AjxDateUtil.MSEC_PER_DAY*365));
if(E!=0){C-=E*AjxDateUtil.MSEC_PER_DAY*365
}var B=Math.floor(C/(AjxDateUtil.MSEC_PER_DAY*30.42));
if(B>0){C-=Math.floor(B*AjxDateUtil.MSEC_PER_DAY*30.42)
}var H=Math.floor(C/AjxDateUtil.MSEC_PER_DAY);
if(H>0){C-=H*AjxDateUtil.MSEC_PER_DAY
}var F=Math.floor(C/AjxDateUtil.MSEC_PER_HOUR);
if(F>0){C-=F*AjxDateUtil.MSEC_PER_HOUR
}var A=Math.floor(C/60000);
if(A>0){C-=A*60000
}var D=Math.floor(C/1000);
var G=I?AjxDurationFormatConcise:AjxDurationFormatVerbose;
if(E>0){return G.formatYears(E,B)
}else{if(B>0){return G.formatMonths(B,H)
}else{if(H>0){return G.formatDays(H,F)
}else{if(F>0){return G.formatHours(F,A)
}else{if(A>0){return G.formatMinutes(A,D)
}else{return G.formatSeconds(D)
}}}}}};
AjxDateUtil.simpleComputeDateStr=function(B,C){var A=AjxDateUtil._dateFormat.format(B);
return C?C+A:A
};
AjxDateUtil.simpleParseDateStr=function(A){return AjxDateUtil._dateFormat.parse(A)
};
AjxDateUtil.simpleComputeDateTimeStr=function(B,C){var A=AjxDateUtil._dateTimeFormat.format(B);
return C?C+A:A
};
AjxDateUtil.simpleParseDateTimeStr=function(A){return AjxDateUtil._dateTimeFormat.parse(A)
};
AjxDateUtil.longComputeDateStr=function(A){var B=AjxDateFormat.getDateInstance(AjxDateFormat.FULL);
return B.format(A)
};
AjxDateUtil.computeDateStr=function(C,B){if(B==null){return""
}var A=new Date(B);
if(C.getTime()-B<AjxDateUtil.MSEC_PER_DAY&&C.getDay()==A.getDay()){return AjxDateUtil.computeTimeString(A)
}if(C.getFullYear()==A.getFullYear()){return AjxDateUtil._dateFormatNoYear.format(A)
}return AjxDateUtil.simpleComputeDateStr(A)
};
AjxDateUtil.computeWordyDateStr=function(C,B){if(B==null){return""
}var A=new Date(B);
if(C.getTime()-B<AjxDateUtil.MSEC_PER_DAY&&C.getDay()==A.getDay()){if(!AjxDateUtil._wordyDateToday){AjxDateUtil._wordyDateToday=new AjxDateFormat(AjxMsg.formatWordyDateToday)
}return AjxDateUtil._wordyDateToday.format(A)
}else{if((C.getTime()-B)<(2*AjxDateUtil.MSEC_PER_DAY)&&(C.getDay()-1)==A.getDay()){if(!AjxDateUtil._wordyDateYesterday){AjxDateUtil._wordyDateYesterday=new AjxDateFormat(AjxMsg.formatWordyDateYesterday)
}return AjxDateUtil._wordyDateYesterday.format(A)
}else{if(!AjxDateUtil._wordyDate){AjxDateUtil._wordyDate=new AjxDateFormat(AjxMsg.formatWordyDate)
}return AjxDateUtil._wordyDate.format(A)
}}};
AjxDateUtil.computeTimeString=function(A){var B=AjxDateFormat.getTimeInstance(AjxDateFormat.SHORT);
return B.format(A)
};
AjxDateUtil.computeDateTimeString=function(A){var B=AjxDateFormat.getDateTimeInstance(AjxDateFormat.LONG);
return B.format(A)
};
AjxDateUtil._getHoursStr=function(B,C,A){var D=B.getHours();
if(!A){D%=12;
if(D==0){D=12
}}return C?AjxDateUtil._pad(D):D
};
AjxDateUtil._getMinutesStr=function(A){return AjxDateUtil._pad(A.getMinutes())
};
AjxDateUtil._getSecondsStr=function(A){return AjxDateUtil._pad(A.getSeconds())
};
AjxDateUtil._getAMPM=function(B,C){var A=B.getHours();
return(A<12)?(C?"AM":"am"):(C?"PM":"pm")
};
AjxDateUtil._getMonthName=function(A,B){return B?AjxDateUtil.MONTH_MEDIUM[A.getMonth()]:AjxDateUtil.MONTH_LONG[A.getMonth()]
};
AjxDateUtil._getMonth=function(A,C){var B=A.getMonth()+1;
if(C){return AjxDateUtil._pad(B)
}else{return B
}};
AjxDateUtil._getDate=function(A,B){var C=A.getDate();
return B?AjxDateUtil._pad(C):C
};
AjxDateUtil._getWeekday=function(A){var B=A.getDay();
return AjxDateUtil.WEEKDAY_LONG[B]
};
AjxDateUtil._getWeekdayMedium=function(A){var B=A.getDay();
return AjxDateUtil.WEEKDAY_MEDIUM[B]
};
AjxDateUtil._getFullYear=function(A){return A.getFullYear()
};
AjxDateUtil.getTimeStr=function(A,C){var B=C;
B=B.replace(/%d/g,AjxDateUtil._getDate(A,true));
B=B.replace(/%D/g,AjxDateUtil._getDate(A,false));
B=B.replace(/%w/g,AjxDateUtil._getWeekday(A));
B=B.replace(/%M/g,AjxDateUtil._getMonthName(A));
B=B.replace(/%t/g,AjxDateUtil._getMonthName(A,true));
B=B.replace(/%n/g,AjxDateUtil._getMonth(A,true));
B=B.replace(/%Y/g,AjxDateUtil._getFullYear(A));
B=B.replace(/%h/g,AjxDateUtil._getHoursStr(A,false,false));
B=B.replace(/%H/g,AjxDateUtil._getHoursStr(A,true,false));
B=B.replace(/%m/g,AjxDateUtil._getMinutesStr(A));
B=B.replace(/%s/g,AjxDateUtil._getSecondsStr(A));
B=B.replace(/%P/g,AjxDateUtil._getAMPM(A,true));
B=B.replace(/%p/g,AjxDateUtil._getAMPM(A,false));
return B
};
AjxDateUtil.getRoundedMins=function(A,C){var B=A.getMinutes();
if(B!=0&&C){B=(Math.ceil((B/C)))*C
}return B
};
AjxDateUtil.roundTimeMins=function(B,D){var C=B.getMinutes();
var A=B.getHours();
if(C!=0&&D){C=(Math.ceil((C/D)))*D;
if(C==60){C=0;
A++
}B.setMinutes(C);
B.setHours(A)
}return B
};
AjxDateUtil.isInRange=function(D,B,C,A){return(D<A&&B>C)
};
AjxDateUtil.getSimpleDateFormat=function(){return AjxDateUtil._dateFormat
};
AjxDateUtil.getServerDate=function(A){if(!AjxDateUtil._serverDateFormatter){AjxDateUtil._serverDateFormatter=new AjxDateFormat("yyyyMMdd")
}return AjxDateUtil._serverDateFormatter.format(A)
};
AjxDateUtil.getServerDateTime=function(B,D){var A=B;
var C=null;
if(D){if(!AjxDateUtil._serverDateTimeFormatterUTC){AjxDateUtil._serverDateTimeFormatterUTC=new AjxDateFormat("yyyyMMdd'T'HHmmss'Z'")
}C=AjxDateUtil._serverDateTimeFormatterUTC;
A=new Date(B.getTime());
A.setMinutes(A.getMinutes()+A.getTimezoneOffset())
}else{if(!AjxDateUtil._serverDateTimeFormatter){AjxDateUtil._serverDateTimeFormatter=new AjxDateFormat("yyyyMMdd'T'HHmmss")
}C=AjxDateUtil._serverDateTimeFormatter
}return C.format(A)
};
AjxDateUtil.parseServerTime=function(D,A){if(D.charAt(8)=="T"){var C=parseInt(D.substr(9,2),10);
var E=parseInt(D.substr(11,2),10);
var B=parseInt(D.substr(13,2),10);
if(D.charAt(15)=="Z"){E+=AjxTimezone.getOffset(AjxTimezone.DEFAULT,A)
}A.setHours(C,E,B,0)
}return A
};
AjxDateUtil.parseServerDateTime=function(B){if(B==null){return null
}var C=new Date();
var E=parseInt(B.substr(0,4),10);
var D=parseInt(B.substr(4,2),10);
var A=parseInt(B.substr(6,2),10);
C.setFullYear(E);
C.setMonth(D-1);
C.setMonth(D-1);
C.setDate(A);
AjxDateUtil.parseServerTime(B,C);
return C
};
AjxDateUtil._pad=function(A){return A<10?("0"+A):A
};
AjxDurationFormatVerbose=function(){};
AjxDurationFormatVerbose.formatYears=function(C,A){var B=C+" ";
B+=(C>1)?AjxMsg.years:AjxMsg.year;
if(C<=3&&A>0){B+=" "+A;
B+=" "+((A>1)?AjxMsg.months:AjxMsg.months)
}return B
};
AjxDurationFormatVerbose.formatMonths=function(A,C){var B=A+" ";
B+=(A>1)?AjxMsg.months:AjxMsg.month;
if(A<=3&&C>0){B+=" "+C;
B+=" "+((C>1)?AjxMsg.days:AjxMsg.day)
}return B
};
AjxDurationFormatVerbose.formatDays=function(C,A){var B=C+" ";
B+=(C>1)?AjxMsg.days:AjxMsg.day;
if(C<=2&&A>0){B+=" "+A;
B+=" "+((A>1)?AjxMsg.hours:AjxMsg.hour)
}return B
};
AjxDurationFormatVerbose.formatHours=function(A,C){var B=A+" ";
B+=(A>1)?AjxMsg.hours:AjxMsg.hour;
if(A<5&&C>0){B+=" "+C;
B+=" "+((C>1)?AjxMsg.minutes:AjxMsg.minute)
}return B
};
AjxDurationFormatVerbose.formatMinutes=function(C,B){var A=C+" ";
A+=((C>1)?AjxMsg.minutes:AjxMsg.minute);
if(C<5&&B>0){A+=" "+B;
A+=" "+((B>1)?AjxMsg.seconds:AjxMsg.second)
}return A
};
AjxDurationFormatVerbose.formatSeconds=function(B){var A=B+" "+((B>1)?AjxMsg.seconds:AjxMsg.second);
return A
};
AjxDurationFormatConcise=function(){};
AjxDurationFormatConcise.formatYears=function(B,A){return this._format(B,A)
};
AjxDurationFormatConcise.formatMonths=function(A,B){return this._format(A,B)
};
AjxDurationFormatConcise.formatDays=function(B,A){return this._format(B,A)
};
AjxDurationFormatConcise.formatHours=function(A,B){return this._format(A,B)
};
AjxDurationFormatConcise.formatMinutes=function(B,A){return this._format(B,A)
};
AjxDurationFormatConcise.formatSeconds=function(A){return this._format(0,A)
};
AjxDurationFormatConcise._format=function(C,B){var D=0;
var A=[];
A[D++]=C;
A[D++]=":";
if(B<10){A[D++]="0"
}A[D++]=B;
return A.join("")
};
AjxDateUtil.SUNDAY=0;
AjxDateUtil.MONDAY=1;
AjxDateUtil.TUESDAY=2;
AjxDateUtil.WEDNESDAY=3;
AjxDateUtil.THURSDAY=4;
AjxDateUtil.FRIDAY=5;
AjxDateUtil.SATURDAY=6;
AjxDateUtil.getDateForNextDay=function(B,E,D){D=D?D:1;
var C=new Date(B);
for(var A=0;
A<D;
A++){C=AjxDateUtil._getDateForNextWeekday(C,E);
if(A<D-1){C.setDate(C.getDate()+1)
}}return C
};
AjxDateUtil.getDateForNextWorkWeekDay=function(B,D){D=D?D:1;
var C=new Date(B);
for(var A=0;
A<D;
A++){C=AjxDateUtil._getDateForNextWorkWeekday(C);
if(A<D-1){C.setDate(C.getDate()+1)
}}return C
};
AjxDateUtil.getDateForThisDay=function(A,C,B){if(B<0){return AjxDateUtil.getDateForPrevDay(A,C,-B)
}else{return AjxDateUtil.getDateForNextDay(A,C,B)
}};
AjxDateUtil.getDateForThisWorkWeekDay=function(A,B){if(B<0){return AjxDateUtil.getDateForPrevWorkWeekDay(A,-B)
}else{return AjxDateUtil.getDateForNextWorkWeekDay(A,B)
}};
AjxDateUtil.getDateForPrevDay=function(B,E,D){D=D?D:1;
var C=new Date(B);
for(var A=0;
A<D;
A++){C=AjxDateUtil._getDateForPrevWeekday(C,E);
if(A<D-1){C.setDate(C.getDate()-1)
}}return C
};
AjxDateUtil.getDateForPrevWorkWeekDay=function(B,D){D=D?D:1;
var C=new Date(B);
for(var A=0;
A<D;
A++){C=AjxDateUtil._getDateForPrevWorkWeekday(C);
if(A<D-1){C.setDate(C.getDate()-1)
}}return C
};
AjxDateUtil._getDateForNextWeekday=function(C,E){var A=new Date(C);
var B=C.getDay();
if(B==E){return A
}var D=(E-B);
if(D>0){A.setDate(C.getDate()+D)
}else{A.setDate(C.getDate()+(7+D))
}return A
};
AjxDateUtil._getDateForNextWorkWeekday=function(C){var A=new Date(C);
var B=C.getDay();
if(B==AjxDateUtil.SUNDAY){A.setDate(C.getDate()+1)
}else{if(B==AjxDateUtil.SATURDAY){A.setDate(C.getDate()+2)
}}return A
};
AjxDateUtil._getDateForPrevWeekday=function(C,E){var A=new Date(C);
var B=C.getDay();
if(B==E){return A
}var D=(B-E);
if(D>0){A.setDate(C.getDate()-D)
}else{A.setDate(C.getDate()-(7+D))
}return A
};
AjxDateUtil._getDateForPrevWorkWeekday=function(C){var A=new Date(C);
var B=C.getDay();
if(B==AjxDateUtil.SUNDAY){A.setDate(C.getDate()-2)
}else{if(B==AjxDateUtil.SATURDAY){A.setDate(C.getDate()-1)
}}return A
};
AjxDateUtil.calculate=function(J,D){if(!AjxDateUtil.__calculate_initialized){AjxDateUtil.__calculate_initialized=true;
AjxDateUtil.__calculate_init()
}var A=D||new Date;
J=J.replace(/^\s*|\s*$/,"").replace(/\s*=\s*/g,"=").replace(/\s*,\s*/g,",");
var K=J.split(/\s+/g);
var M,E,C,F,I,H,L,B;
for(var G=0;
G<K.length;
G++){M=K[G];
if(M.match(AjxDateUtil.RE_COMMENT)){break
}if(M.match(AjxDateUtil.RE_NOW)){D=new Date(A.getTime());
continue
}if(E=M.match(AjxDateUtil.RE_ADD_NUMBER)){C=E[1];
F=AjxDateUtil.__calculate_parseInt(E[2]);
I=K[++G];
H=C=="+"?F:F*-1;
AjxDateUtil.__calculate_add(D,I,H);
continue
}if(E=M.match(AjxDateUtil.RE_ADD_WEEKORD)){C=E[1];
L=E[2];
B=K[++G];
H=C=="+"?F:F*-1;
AjxDateUtil.__calculate_add_ordinal(D,I,H);
continue
}if(E=M.match(AjxDateUtil.RE_SET)){AjxDateUtil.__calculate_set(D,E[1],E[2]);
continue
}D=AjxDateFormat.parse("yyyyy-MM-dd",M);
if(!D&&(D=AjxDateFormat.parse("yyyy-MM-dd'T'hh:mm:ss'Z'",M))){D.setMinutes(D.getMinutes()+D.getTimezoneOffset())
}if(!D){D=AjxDateFormat.parse("yyyy-MM-dd'T'HH:mm:ss",M)
}if(!D){throw'invalid date pattern: "'+M+'"'
}}return D
};
AjxDateUtil.S_DAYNAME=[AjxMsg["calc.dayname.sunday"],AjxMsg["calc.dayname.monday"],AjxMsg["calc.dayname.tuesday"],AjxMsg["calc.dayname.wednesday"],AjxMsg["calc.dayname.thursday"],AjxMsg["calc.dayname.friday"],AjxMsg["calc.dayname.saturday"]].join("|");
AjxDateUtil.S_MONTHNAME=[AjxMsg["calc.monthname.january"],AjxMsg["calc.monthname.february"],AjxMsg["calc.monthname.march"],AjxMsg["calc.monthname.april"],AjxMsg["calc.monthname.may"],AjxMsg["calc.monthname.june"],AjxMsg["calc.monthname.july"],AjxMsg["calc.monthname.august"],AjxMsg["calc.monthname.september"],AjxMsg["calc.monthname.october"],AjxMsg["calc.monthname.november"],AjxMsg["calc.monthname.december"]].join("|");
AjxDateUtil.S_WEEKORD=[AjxMsg["calc.ordinal.first"],AjxMsg["calc.ordinal.second"],AjxMsg["calc.ordinal.third"],AjxMsg["calc.ordinal.fourth"],AjxMsg["calc.ordinal.fifth"],AjxMsg["calc.ordinal.last"]].join("|");
AjxMsg["calc.now"]="now";
AjxMsg["calc.date"]="date";
AjxMsg["calc.duration.year"]="year|years";
AjxMsg["calc.duration.month"]="month|months";
AjxMsg["calc.duration.day"]="day|days";
AjxMsg["calc.duration.hour"]="hour|hours";
AjxMsg["calc.duration.minute"]="min|mins|minute|minutes";
AjxMsg["calc.duration.second"]="sec|secs|second|seconds";
AjxMsg["calc.duration.millisecond"]="milli|millis|millisecond|milliseconds";
AjxDateUtil.S_DURATION=[AjxMsg["calc.duration.year"],AjxMsg["calc.duration.month"],AjxMsg["calc.duration.day"],AjxMsg["calc.duration.hour"],AjxMsg["calc.duration.minute"],AjxMsg["calc.duration.second"],AjxMsg["calc.duration.millisecond"]].join("|");
AjxDateUtil.__calculate_init=function(){AjxDateUtil.WEEKDAYS={};
var B=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];
for(var D=0;
D<B.length;
D++){var E=AjxMsg["calc.dayname."+B[D]].split("|");
for(var C=0;
C<E.length;
C++){AjxDateUtil.WEEKDAYS[E[C].toLowerCase()]=D
}}AjxDateUtil.MONTHNAME2MONTHNUM={};
var A=["january","february","march","april","may","june","july","august","september","october","november","december"];
for(var D=0;
D<A.length;
D++){var F=AjxMsg["calc.monthname."+A[D]].split("|");
for(var C=0;
C<F.length;
C++){AjxDateUtil.MONTHNAME2MONTHNUM[F[C].toLowerCase()]=D
}}AjxDateUtil.RE_YEAR=new RegExp("^("+AjxMsg["calc.duration.year"]+")$","i");
AjxDateUtil.RE_MONTH=new RegExp("^("+AjxMsg["calc.duration.month"]+")$","i");
AjxDateUtil.RE_WEEK=new RegExp("^("+AjxMsg["calc.duration.week"]+")$","i");
AjxDateUtil.RE_DAY=new RegExp("^("+AjxMsg["calc.duration.day"]+")$","i");
AjxDateUtil.RE_HOUR=new RegExp("^("+AjxMsg["calc.duration.hour"]+")$","i");
AjxDateUtil.RE_MINUTE=new RegExp("^("+AjxMsg["calc.duration.minute"]+")$","i");
AjxDateUtil.RE_SECOND=new RegExp("^("+AjxMsg["calc.duration.second"]+")$","i");
AjxDateUtil.RE_MILLISECOND=new RegExp("^("+AjxMsg["calc.duration.millisecond"]+")$","i");
AjxDateUtil.RE_DATE=new RegExp("^("+AjxMsg["calc.date"]+")$","i");
AjxDateUtil.RE_DAYNAME=new RegExp("^("+AjxDateUtil.S_DAYNAME+")$","i");
AjxDateUtil.RE_MONTHNAME=new RegExp("^("+AjxDateUtil.S_MONTHNAME+")$","i");
AjxDateUtil.RE_WEEKORD=new RegExp("^("+AjxDateUtil.S_WEEKORD+")$","i");
AjxDateUtil.RE_COMMENT=/^#/;
AjxDateUtil.RE_NOW=new RegExp("^("+AjxMsg["calc.now"]+")$","i");
AjxDateUtil.RE_ADD_NUMBER=new RegExp("^([+\\-])(\\d+)$","i");
AjxDateUtil.RE_ADD_WEEKORD=new RegExp("^([+\\-])("+AjxDateUtil.S_WEEKORD+")$","i");
AjxDateUtil.RE_SET=new RegExp("^("+AjxDateUtil.S_DURATION+"|"+AjxMsg["calc.date"]+")=(.*)$","i")
};
AjxDateUtil.__calculate_normalizeFullWidthDigit=function(B){var A="0".charCodeAt(0)+B.charCodeAt(0)-"\uff10".charCodeAt(0);
return String.fromCharCode(A)
};
AjxDateUtil.__calculate_replaceFullWidthDigit=function(A,B){return AjxDateUtil.__calculate_normalizeFullWidthDigit(B)
};
AjxDateUtil.__calculate_parseInt=function(A){A=A.replace(/([\uFF10-\uFF19])/g,AjxDateUtil.__calculate_normalizeFullWidthDigit);
return parseInt(A,10)
};
AjxDateUtil.__calculate_add=function(C,E,D){if(E.match(AjxDateUtil.RE_YEAR)){C.setFullYear(C.getFullYear()+D);
return 
}if(E.match(AjxDateUtil.RE_MONTH)){var F=C.getMonth();
C.setMonth(F+D);
if(Math.abs(F+D)%12!=C.getMonth()){C.setDate(0)
}return 
}if(E.match(AjxDateUtil.RE_WEEK)){C.setDate(C.getDate()+D*7);
return 
}if(E.match(AjxDateUtil.RE_DAY)){C.setDate(C.getDate()+D);
return 
}if(E.match(AjxDateUtil.RE_HOUR)){C.setHours(C.getHours()+D);
return 
}if(E.match(AjxDateUtil.RE_MINUTE)){C.setMinutes(C.getMinutes()+D);
return 
}if(E.match(AjxDateUtil.RE_SECOND)){C.setSeconds(C.getSeconds()+D);
return 
}if(E.match(AjxDateUtil.RE_MILLISECOND)){C.setMilliseconds(C.getMilliseconds()+D);
return 
}if(E.match(AjxDateUtil.RE_MONTHNAME)){var A=AjxDateUtil.MONTHNAME2MONTHNUM[E.toLowerCase()];
if(A<C.getMonth()){D+=D>0?0:1
}else{if(A>C.getMonth()){D+=D>0?-1:0
}}C.setFullYear(C.getFullYear()+D,A,1);
return 
}if(E.match(AjxDateUtil.RE_DAYNAME)){var B=AjxDateUtil.WEEKDAYS[E.toLowerCase()];
if(B<C.getDay()){D+=D>0?0:1
}else{if(B>C.getDay()){D+=D>0?-1:0
}}C.setDate(C.getDate()+(B-C.getDay())+7*D);
return 
}throw"unknown type: "+E
};
AjxDateUtil.__calculate_add_ordinal=function(){throw"TODO: not implemented"
};
AjxDateUtil.__calculate_set=function(B,C,D){var A=D.split(/,/);
if(C.match(AjxDateUtil.RE_YEAR)){A[0]=AjxDateUtil.__calculate_fullYear(A[0]);
if(A[1]!=null){A[1]=AjxDateUtil.__calculate_month(A[1])
}if(A[2]!=null){A[2]=parseInt(A[2],10)
}B.setFullYear.apply(B,A);
return 
}if(C.match(AjxDateUtil.RE_MONTH)){A[0]=AjxDateUtil.__calculate_month(A[0]);
if(A[1]!=null){A[1]=parseInt(A[1],10)
}B.setMonth.apply(B,A);
return 
}if(C.match(AjxDateUtil.RE_DATE)){A[0]=parseInt(A[0],10);
B.setDate.apply(B,A);
return 
}if(C.match(AjxDateUtil.RE_HOUR)){A[0]=parseInt(A[0],10);
if(A[1]!=null){A[1]=parseInt(A[1],10)
}if(A[2]!=null){A[2]=parseInt(A[2],10)
}if(A[3]!=null){A[3]=parseInt(A[3],10)
}B.setHours.apply(B,A);
return 
}if(C.match(AjxDateUtil.RE_MINUTE)){A[0]=parseInt(A[0],10);
if(A[1]!=null){A[1]=parseInt(A[1],10)
}if(A[2]!=null){A[2]=parseInt(A[2],10)
}B.setMinutes.apply(B,A);
return 
}if(C.match(AjxDateUtil.RE_SECOND)){A[0]=parseInt(A[0],10);
if(A[1]!=null){A[1]=parseInt(A[1],10)
}B.setSeconds.apply(B,A);
return 
}if(C.match(AjxDateUtil.RE_MILLISECOND)){B.setMilliseconds.apply(B,A);
return 
}throw"unknown type: "+C
};
AjxDateUtil.__calculate_fullYear=function(A){if(A.length==2){var B=new Date;
B.setYear(parseInt(A,10));
A=String(B.getFullYear()).substr(0,2)+A
}return parseInt(A,10)
};
AjxDateUtil.__calculate_month=function(B){var A=AjxDateUtil.MONTHNAME2MONTHNUM[B.toLowerCase()];
return A!=null?A:parseInt(B,10)-1
};
AjxDateUtil.__calculate_day=function(B){var A=AjxDateUtil.WEEKDAYS[B.toLowerCase()];
return A!=null?A:parseInt(B,10)
}
}if(AjxPackage.define("ajax.util.AjxSelectionManager")){AjxSelectionManager=function(A){this._owner=A
};
AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS=0;
AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS=1;
AjxSelectionManager.SELECT_TO_ANCHOR=2;
AjxSelectionManager.DESELECT_ALL=3;
AjxSelectionManager.SELECT_ALL=4;
AjxSelectionManager.prototype.getItems=function(){if(this._selectedItems==null){this._selectedItems=this._createItemsCollection()
}return this._selectedItems
};
AjxSelectionManager.prototype.getLength=function(){return this.getItems().length
};
AjxSelectionManager.prototype.getAnchor=function(){if(this._anchor==null){var A=this.getItems();
if(A.length>0){this._anchor=A[0]
}}return this._anchor
};
AjxSelectionManager.prototype.getCursor=function(){if(this._cursor==null){this._cursor=this.getAnchor()
}return this._cursor
};
AjxSelectionManager.prototype.isSelected=function(A){return this.getItems().binarySearch(A)!=-1
};
AjxSelectionManager.prototype.selectOneItem=function(A){this.select(A,AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS)
};
AjxSelectionManager.prototype.toggleItem=function(A){this.select(A,AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS)
};
AjxSelectionManager.prototype.selectFromAnchorToItem=function(A){this.select(A,AjxSelectionManager.SELECT_TO_ANCHOR)
};
AjxSelectionManager.prototype.deselectAll=function(){this.select(null,AjxSelectionManager.DESELECT_ALL)
};
AjxSelectionManager.prototype.selectAll=function(){this.select(null,AjxSelectionManager.SELECT_ALL)
};
AjxSelectionManager.prototype.select=function(N,F){this._setAnchorAndCursor(N,F);
var M=this._selectedItems;
var E=(M==null)?0:M.length;
this._selectedItems=null;
this._selectedItems=this._createItemsCollection();
var A=this._owner.getItemCount();
var L=false;
var D=false;
var J=false;
for(var H=0;
H<A;
++H){var I=this._owner.getItem(H);
var K=this._isItemOldSelection(I,M);
var B=K;
switch(F){case AjxSelectionManager.SELECT_TO_ANCHOR:if(this._anchor==null){this._anchor=I
}var C=(I==this._anchor||I==N);
var G=false;
if(!J&&C){J=true;
G=true
}B=J;
if((!G||this._anchor==N)&&J&&C){J=false
}break;
case AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS:B=(I==N);
break;
case AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS:if(I==N){B=!K
}break;
case AjxSelectionManager.DESELECT_ALL:B=false;
break;
case AjxSelectionManager.SELECT_ALL:B=true;
break
}if(B){this._selectedItems.add(I);
L=(this._selectedItems.length>1)
}if(B!=K){if(this._owner.itemSelectionChanged!=null){this._owner.itemSelectionChanged(I,H,B)
}D=true
}}D=D||(E!=this._selectedItems.length);
if(L){this._selectedItems.sort()
}if(D&&this._owner.selectionChanged!=null){this._owner.selectionChanged(N)
}};
AjxSelectionManager.prototype.removeItem=function(B){if(this._selectedItems){var A=this._selectedItems.binarySearch(B);
if(A>-1){this._selectedItems.removeAt(A)
}}};
AjxSelectionManager.prototype._createItemsCollection=function(){return new AjxVector()
};
AjxSelectionManager.prototype._isItemOldSelection=function(B,D){var A=false;
if(D){var C=D.binarySearch(B);
if(C>-1){D.removeAt(C)
}A=(C!=-1)
}return A
};
AjxSelectionManager.prototype._setAnchorAndCursor=function(A,B){switch(B){case AjxSelectionManager.SELECT_TO_ANCHOR:this._cursor=A;
break;
case AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS:this._anchor=A;
this._cursor=A;
break;
case AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS:this._anchor=A;
this._cursor=A;
break;
case AjxSelectionManager.DESELECT_ALL:this._anchor=null;
this._cursor=null;
break;
case AjxSelectionManager.SELECT_ALL:return 
}}
}if(AjxPackage.define("ajax.net.AjxPost")){AjxPost=function(A){this._callback=null;
this._iframeId=A
};
AjxPost._reqIds=0;
AjxPost._outStandingRequests=new Object();
AjxPost.SC_CONTINUE=100;
AjxPost.SC_OK=200;
AjxPost.SC_ACCEPTED=202;
AjxPost.SC_NO_CONTENT=204;
AjxPost.SC_BAD_REQUEST=400;
AjxPost.SC_UNAUTHORIZED=401;
AjxPost.SC_REQUEST_TIMEOUT=408;
AjxPost.SC_CONFLICT=409;
AjxPost.SC_REQUEST_ENTITY_TOO_LARGE=413;
AjxPost.SC_INTERNAL_SERVER_ERROR=500;
AjxPost.SC_BAD_GATEWAY=502;
AjxPost.SC_SERVICE_UNAVAILABLE=503;
AjxPost.prototype.execute=function(J,A,I){var K=A.getElementsByTagName("input");
var E=new Array();
for(var C=0;
C<K.length;
C++){var L=K[C];
if(L.type=="file"){E.push(L);
continue
}if(L.name&&L.name.match(/^filename\d+$/)){L.parentNode.removeChild(L);
C--;
continue
}}for(var C=0;
C<E.length;
C++){var D=document.createElement("input");
D.type="hidden";
D.name="filename"+(C+1);
D.value=E[C].value;
E[C].parentNode.insertBefore(D,E[C])
}A.target=this._iframeId;
this._callback=J;
var H=new AjxPostRequest(A);
var B=new AjxTimedAction(this,this._onFailure,[H.id]);
var G=I?I:5000;
AjxPost._outStandingRequests[H.id]=H;
try{H.send(B,G)
}catch(F){if(AjxEnv.isIE){if(F.number==-2147024891){throw new AjxException(ZmMsg.uploadErrorAccessDenied,F.number)
}}throw F
}};
AjxPost.prototype._onFailure=function(B){var A=AjxPost._outStandingRequests[B];
A.cancel();
delete AjxPost._outStandingRequests[B];
if(this._callback){this._callback.run([404]);
this._callback=null
}};
AjxPost.prototype.loaded=function(A,C,D){var B=AjxPost._outStandingRequests[C];
if(B&&!B.hasBeenCancelled()){B.cancelTimeout()
}delete AjxPost._outStandingRequests[C];
if(this._callback){this._callback.run(A,D);
this._callback=null
}};
AjxPostRequest=function(B){this.id=AjxPost._reqIds++;
this._cancelled=false;
this._form=B;
var A=B.elements.namedItem("requestId");
if(!A){A=B.ownerDocument.createElement("input");
A.type="hidden";
A.name="requestId"
}A.value=this.id;
B.appendChild(A)
};
AjxPostRequest.prototype.send=function(B,A){this._form.submit()
};
AjxPostRequest.prototype.hasBeenCancelled=function(){return this._cancelled
};
AjxPostRequest.prototype.cancelTimeout=function(){AjxTimedAction.cancelAction(this._timeoutId)
};
AjxPostRequest.prototype.cancel=function(){this._cancelled=true
}
}if(AjxPackage.define("ajax.util.AjxBuffer")){AjxBuffer=function(){this.clear();
if(arguments.length>0){arguments.join=this.buffer.join;
this.buffer[this.buffer.length]=arguments.join("")
}};
AjxBuffer.prototype.toString=function(){return this.buffer.join("")
};
AjxBuffer.prototype.join=function(A){if(A==null){A=""
}return this.buffer.join(A)
};
AjxBuffer.prototype.append=function(){arguments.join=this.buffer.join;
this.buffer[this.buffer.length]=arguments.join("")
};
AjxBuffer.prototype.join=function(A){return this.buffer.join(A)
};
AjxBuffer.prototype.set=function(A){this.buffer=[A]
};
AjxBuffer.prototype.clear=function(){this.buffer=[]
};
AjxBuffer.concat=function(){arguments.join=Array.prototype.join;
return arguments.join("")
};
AjxBuffer.append=AjxBuffer.concat
}if(AjxPackage.define("ajax.util.AjxCache")){AjxCache=function(){this._cache=new Object()
};
AjxCache.prototype.set=function(A,B){this._cache[A]=B
};
AjxCache.prototype.get=function(A){return this._cache[A]
};
AjxCache.prototype.getByProperty=function(E,C){var B=new Array();
for(var A in this._cache){var D=this._cache[A];
if(D instanceof Object&&D[E]==C){B.push(D)
}}return B
};
AjxCache.prototype.clearAll=function(){for(var A in this._cache){this._cache[A]=null
}this._cache=new Object()
};
AjxCache.prototype.clear=function(A){this._cache[A]=null;
delete this._cache[A]
};
AjxCache.prototype.clearByProperty=function(D,B){for(var A in this._cache){var C=this._cache[A];
if(C[D]==B){this._cache[A]=null
}}}
}if(AjxPackage.define("ajax.util.AjxTimezone")){AjxTimezone=function(){};
AjxTimezone.getTransition=function(D,C){var B=[C||new Date().getFullYear(),D.mon,1];
if(D.mday){B[2]=D.mday
}else{if(D.wkday){var A=new Date(C,D.mon-1,1,D.hour,D.min,D.sec);
if(D.week==-1){var F=new Date(new Date(A.getTime()).setMonth(D.mon,0));
var E=F.getDate();
var H=F.getDay()+1;
var G=H>=D.wkday?H-D.wkday:7-D.wkday-H;
B[2]=E-G
}else{var H=A.getDay()+1;
var G=D.wkday==H?1:0;
B[2]=D.wkday+7*(D.week-G)-H+1
}}}return B
};
AjxTimezone.createMDayTransition=function(A,C){if(A instanceof Date){C=C!=null?C:A.getTimezoneOffset();
A=[A.getFullYear(),A.getMonth()+1,A.getDate(),A.getHours(),A.getMinutes(),A.getSeconds()]
}var B={offset:C,trans:A};
return AjxTimezone.addMDayTransition(B)
};
AjxTimezone.addMDayTransition=function(B){var A=B.trans;
B.mon=A[1];
B.mday=A[2];
B.hour=A[3];
B.min=A[4];
B.sec=A[5];
return B
};
AjxTimezone.createWkDayTransition=function(A,C){if(A instanceof Date){C=C!=null?C:A.getTimezoneOffset();
A=[A.getFullYear(),A.getMonth()+1,A.getDate(),A.getHours(),A.getMinutes(),A.getSeconds()]
}var B={offset:C,trans:A};
return AjxTimezone.addWkDayTransition(B)
};
AjxTimezone.addWkDayTransition=function(E){var C=E.trans;
var D=C[1];
var H=C[2];
var B=Math.floor((H-1)/7);
var A=new Date(C[0],C[1]-1,C[2],12,0,0);
var G=new Date(new Date(A.getTime()).setMonth(D-1,0)).getDate();
var F=G-H<7;
E.mon=D;
E.week=F?-1:B+1;
E.wkday=A.getDay()+1;
E.hour=C[3];
E.min=C[4];
E.sec=C[5];
return E
};
AjxTimezone.createTransitionDate=function(D){var A=new Date(AjxTimezoneData.TRANSITION_YEAR,D.mon-1,1,12,0,0);
if(D.mday){A.setDate(D.mday)
}else{if(D.week==-1){A.setMonth(A.getMonth()+1,0);
for(var C=0;
C<7;
C++){if(A.getDay()+1==D.wkday){break
}A.setDate(A.getDate()-1)
}}else{for(var C=0;
C<7;
C++){if(A.getDay()+1==D.wkday){break
}A.setDate(A.getDate()+1)
}A.setDate(A.getDate()+7*(D.week-1))
}}var B=[A.getFullYear(),A.getMonth()+1,A.getDate()];
return B
};
AjxTimezone.getZonePreferences=function(){if(AjxTimezone._PREF_ZONE_DISPLAY){var C=AjxTimezone._PREF_ZONE_DISPLAY.length;
var B=AjxTimezone.STANDARD_RULES.length+AjxTimezone.DAYLIGHT_RULES.length;
if(C!=B){AjxTimezone._PREF_ZONE_DISPLAY=null
}}if(!AjxTimezone._PREF_ZONE_DISPLAY){AjxTimezone._PREF_ZONE_DISPLAY=[];
AjxTimezone.getAbbreviatedZoneChoices();
for(var A=0;
A<AjxTimezone._ABBR_ZONE_OPTIONS.length;
A++){AjxTimezone._PREF_ZONE_DISPLAY.push(AjxTimezone._ABBR_ZONE_OPTIONS[A].displayValue)
}}return AjxTimezone._PREF_ZONE_DISPLAY
};
AjxTimezone.getZonePreferencesOptions=function(){if(AjxTimezone._PREF_ZONE_OPTIONS){var C=AjxTimezone._PREF_ZONE_OPTIONS.length;
var B=AjxTimezone.STANDARD_RULES.length+AjxTimezone.DAYLIGHT_RULES.length;
if(C!=B){AjxTimezone._PREF_ZONE_OPTIONS=null
}}if(!AjxTimezone._PREF_ZONE_OPTIONS){AjxTimezone._PREF_ZONE_OPTIONS=[];
AjxTimezone.getAbbreviatedZoneChoices();
for(var A=0;
A<AjxTimezone._ABBR_ZONE_OPTIONS.length;
A++){AjxTimezone._PREF_ZONE_OPTIONS.push(AjxTimezone._ABBR_ZONE_OPTIONS[A].serverid)
}}return AjxTimezone._PREF_ZONE_OPTIONS
};
AjxTimezone.getServerId=function(A){return AjxTimezone._CLIENT2SERVER[A]||A
};
AjxTimezone.getClientId=function(A){return AjxTimezone._SERVER2CLIENT[A]||A
};
AjxTimezone.getShortName=function(A){var B=AjxTimezone.getRule(A);
if(!B.shortName){B.shortName=["GMT",AjxTimezone._SHORT_NAMES[A]].join("")
}return B.shortName
};
AjxTimezone.getMediumName=function(A,B){var C=AjxTimezone.getRule(A,null,B);
if(!C.mediumName){var D=[A,B||"1"].join("_");
C.mediumName=AjxMsg[D]||AjxMsg[A]||["(",AjxTimezone.getShortName(A),") ",A].join("")
}return C.mediumName
};
AjxTimezone.getLongName=AjxTimezone.getMediumName;
AjxTimezone.addRule=function(C){var B=C.serverId;
var A=C.clientId;
if(AjxTimezone._CLIENT2SERVER[A]!==undefined&&AjxTimezone._CLIENT2RULE[A].standard.offset!=C.standard.offset){AjxTimezone._CLIENT2SERVER_DUPS[A]=B
}else{AjxTimezone._CLIENT2SERVER[A]=B
}AjxTimezone._SERVER2CLIENT[B]=A;
if(AjxTimezone._SHORT_NAMES[A]!==undefined&&AjxTimezone._CLIENT2RULE[A].standard.offset!=C.standard.offset){AjxTimezone._SHORT_NAMES_DUPS[A]=AjxTimezone._generateShortName(C.standard.offset)
}else{AjxTimezone._SHORT_NAMES[A]=AjxTimezone._generateShortName(C.standard.offset)
}if(AjxTimezone._CLIENT2RULE[A]!==undefined&&AjxTimezone._CLIENT2RULE[A].standard.offset!=C.standard.offset){AjxTimezone._CLIENT2RULE_DUPS[A]=C
}else{AjxTimezone._CLIENT2RULE[A]=C
}var D=C.daylight?AjxTimezone.DAYLIGHT_RULES:AjxTimezone.STANDARD_RULES;
D.push(C)
};
AjxTimezone.getRule=function(A,D,H){var K=AjxTimezone._CLIENT2RULE[A];
if(H){K=AjxTimezone._CLIENT2RULE_DUPS[A]
}if(!K){A=AjxTimezone._SERVER2CLIENT[A];
K=AjxTimezone._CLIENT2RULE[A]
}if(!K&&D){var J=["standard","daylight"];
var L=D.daylight?AjxTimezone.DAYLIGHT_RULES:AjxTimezone.STANDARD_RULES;
for(var F=0;
F<L.length;
F++){K=L[F];
var M=true;
for(var E=0;
E<J.length;
E++){var B=J[E];
var G=K[B];
if(!G){continue
}var I=false;
for(var C in D[B]){if(D[B][C]!=G[C]){M=false;
I=true;
break
}}if(I){break
}}if(M){return K
}}return null
}return K
};
AjxTimezone.getOffset=function(A,E){var M=AjxTimezone.getRule(A||AjxTimezone.DEFAULT);
if(M&&M.daylight){var K=E.getFullYear();
var G=M.standard,B=M.daylight;
var J=AjxTimezone.getTransition(G,K);
var O=AjxTimezone.getTransition(B,K);
var I=E.getMonth()+1,L=E.getDate();
var F=J[1],N=J[2];
var H=O[1],D=O[2];
var C=false;
if(H<F){C=I>H&&I<F;
C=C||(I==H&&L>=D);
C=C||(I==F&&L<N)
}else{C=I<H||I>F;
C=C||(I==H&&L<D);
C=C||(I==F&&L>=N)
}return C?B.offset:G.offset
}return M?M.standard.offset:-(new Date().getTimezoneOffset())
};
AjxTimezone.guessMachineTimezone=function(){return AjxTimezone._guessMachineTimezone().clientId
};
AjxTimezone.getAbbreviatedZoneChoices=function(){if(AjxTimezone._ABBR_ZONE_OPTIONS){var E=AjxTimezone._ABBR_ZONE_OPTIONS.length;
var D=AjxTimezone.STANDARD_RULES.length+AjxTimezone.DAYLIGHT_RULES.length;
if(E!=D){AjxTimezone._ABBR_ZONE_OPTIONS=null
}}if(!AjxTimezone._ABBR_ZONE_OPTIONS){AjxTimezone._ABBR_ZONE_OPTIONS=[];
for(var A in AjxTimezone._CLIENT2SERVER){var F=AjxTimezone._CLIENT2RULE[A];
var B=F.serverId;
var C={displayValue:AjxTimezone.getMediumName(A),value:B,standard:F.standard,serverid:B};
AjxTimezone._ABBR_ZONE_OPTIONS.push(C);
if(AjxTimezone._CLIENT2SERVER_DUPS[A]){var F=AjxTimezone._CLIENT2RULE_DUPS[A];
var B=F.serverId;
var C={displayValue:AjxTimezone.getMediumName(A,"2"),value:B,standard:F.standard,serverid:B};
AjxTimezone._ABBR_ZONE_OPTIONS.push(C)
}}AjxTimezone._ABBR_ZONE_OPTIONS.sort(AjxTimezone._BY_OFFSET)
}return AjxTimezone._ABBR_ZONE_OPTIONS
};
AjxTimezone._BY_OFFSET=function(C,B){var E=C.standard.offset-B.standard.offset;
if(E==0){var A=C.serverId;
var D=B.serverId;
if(A<D){E=-1
}else{if(A>D){E=1
}}}return E
};
AjxTimezone.GMT="Europe/London";
AjxTimezone.GMT_NO_DST="Africa/Casablanca";
AjxTimezone.AUTO_DETECTED="Auto-Detected";
AjxTimezone.DEFAULT;
AjxTimezone.DEFAULT_RULE;
AjxTimezone._CLIENT2SERVER={};
AjxTimezone._CLIENT2SERVER_DUPS={};
AjxTimezone._SERVER2CLIENT={};
AjxTimezone._SHORT_NAMES={};
AjxTimezone._SHORT_NAMES_DUPS={};
AjxTimezone._CLIENT2RULE={};
AjxTimezone._CLIENT2RULE_DUPS={};
AjxTimezone.STANDARD_RULES=[];
AjxTimezone.DAYLIGHT_RULES=[];
(function(){for(var A=0;
A<AjxTimezoneData.TIMEZONE_RULES.length;
A++){var B=AjxTimezoneData.TIMEZONE_RULES[A];
var C=B.daylight?AjxTimezone.DAYLIGHT_RULES:AjxTimezone.STANDARD_RULES;
C.push(B)
}})();
AjxTimezone._guessMachineTimezone=function(){var E=new Date(AjxTimezoneData.TRANSITION_YEAR,11,1,0,0,0);
var G=new Date(AjxTimezoneData.TRANSITION_YEAR,5,1,0,0,0);
var M=-E.getTimezoneOffset();
var F=-G.getTimezoneOffset();
if(F==M){var O=AjxTimezone.STANDARD_RULES;
for(var H=0;
H<O.length;
++H){var K=O[H];
if(K.standard.offset==F){return K
}}}else{var O=AjxTimezone.DAYLIGHT_RULES;
var J=Math.max(M,F);
var D=Math.min(M,F);
for(var H=0;
H<O.length;
++H){var K=O[H];
if(K.standard.offset==D&&K.daylight.offset==J){var C=K.standard.trans;
var I=K.daylight.trans;
var N=new Date(C[0],C[1]-1,C[2]-1);
var L=new Date(C[0],C[1]-1,C[2]+2);
var B=new Date(I[0],I[1]-1,I[2]-1);
var A=new Date(I[0],I[1]-1,I[2]+2);
if(-L.getTimezoneOffset()==D&&-A.getTimezoneOffset()==J&&-N.getTimezoneOffset()==J&&-B.getTimezoneOffset()==D){return K
}}}}return AjxTimezone._generateDefaultRule()
};
AjxTimezone._generateDefaultRule=function(){var J=0;
var C=1;
var D=2;
var G=3;
var E=4;
function L(N,M,T,U){var P=M.getTime();
var S=new Date();
S.setTime(N.getTime());
var R=new Date();
R.setTime(S.getTime());
var V=N.getTimezoneOffset()*-1;
if(!U){U={clientId:AjxTimezone.AUTO_DETECTED,autoDetected:true}
}while(S.getTime()<=P){if(T==J){S.setUTCMonth(S.getUTCMonth()+1)
}else{if(T==C){S.setUTCDate(S.getUTCDate()+1)
}else{if(T==D){S.setUTCHours(S.getUTCHours()+1)
}else{if(T==G){S.setUTCMinutes(S.getUTCMinutes()+1)
}else{if(T==E){S.setUTCSeconds(S.getUTCSeconds()+1)
}else{return U
}}}}}var O=S.getTimezoneOffset()*-1;
if(O!=V){if(T<E){U=L(R,S,T+1,U)
}else{var W=new Date();
W.setUTCFullYear(R.getFullYear(),R.getMonth(),R.getDate());
W.setUTCHours(R.getHours(),R.getMinutes(),R.getSeconds()+1);
var Q=U[V<O?"daylight":"standard"]={offset:O,trans:[W.getUTCFullYear(),W.getUTCMonth()+1,W.getUTCDate(),W.getUTCHours(),W.getUTCMinutes(),W.getUTCSeconds()]};
AjxTimezone.addWkDayTransition(Q);
return U
}}R.setTime(S.getTime());
V=O
}return U
}var B=new Date();
var A=new Date();
var H=B.getFullYear();
B.setUTCFullYear(H,B.getMonth(),B.getDate()-1);
B.setUTCHours(0,0,0,0);
A.setTime(B.getTime());
A.setUTCFullYear(H+1,B.getMonth(),B.getDate()+1);
var I=L(B,A,J);
if(!I.daylight||!I.standard){I.standard={offset:B.getTimezoneOffset()*-1};
delete I.daylight
}I.serverId=["(GMT",AjxTimezone._generateShortName(I.standard.offset,true),") ",AjxTimezone.AUTO_DETECTED].join("");
if(I.daylight&&I.daylight.offset<I.standard.offset){var F=I.daylight;
I.daylight=I.standard;
I.standard=F
}AjxTimezoneData.TIMEZONE_RULES.unshift(I);
var K=I.daylight?AjxTimezone.DAYLIGHT_RULES:AjxTimezone.STANDARD_RULES;
K.unshift(I);
return I
};
AjxTimezone._generateShortName=function(F,E){if(F==0){return""
}var B=F<0?"-":"+";
var C=Math.abs(F);
var A=Math.floor(C/60);
var D=C%60;
A=A<10?"0"+A:A;
D=D<10?"0"+D:D;
return[B,A,E?".":"",D].join("")
};
AjxTimezone.DEFAULT_RULE=AjxTimezone._guessMachineTimezone();
(function(){AjxTimezoneData.TIMEZONE_RULES.sort(AjxTimezone._BY_OFFSET);
for(var A=0;
A<AjxTimezoneData.TIMEZONE_RULES.length;
A++){var B=AjxTimezoneData.TIMEZONE_RULES[A];
AjxTimezone.addRule(B)
}})();
AjxTimezone.DEFAULT=AjxTimezone.getClientId(AjxTimezone.DEFAULT_RULE.serverId)
}if(AjxPackage.define("ajax.xslt.AjxXslt")){AjxXslt=function(){var D=AjxXmlDoc.create();
if(AjxEnv.isIE){var E=null;
var A=["MSXML2.FreeThreadedDOMDocument.5.0","MSXML2.FreeThreadedDOMDocument.3.0"];
for(var C=0;
C<A.length;
C++){try{E=new ActiveXObject(A[C]);
break
}catch(B){}}if(!E){throw new AjxException("FreeThreadedDOMDocument",AjxException.UNSUPPORTED,"AjxXslt")
}E.async=false;
D._doc=E
}this._doc=D
};
AjxXslt.prototype.toString=function(){return"AjxXslt"
};
AjxXslt.createFromUrl=function(A){var B=new AjxXslt();
B.loadUrl(A);
return B
};
AjxXslt.createFromString=function(B){var A=new AjxXslt();
A._doc.loadFromString(B);
A.createProcessor();
return A
};
AjxXslt.prototype.createProcessor=function(){var F=this._doc.getDoc();
if(AjxEnv.isNav){this._processor=new XSLTProcessor();
this._processor.importStylesheet(F)
}else{if(AjxEnv.isIE){var E=F.parseError;
if(E.errorCode!=0){throw new AjxException(E.reason,AjxException.INVALID_PARAM,"AjxXslt.createProcessor")
}var A=null;
var B=["MSXML2.XSLTemplate.5.0","MSXML2.XSLTemplate.3.0"];
for(var D=0;
D<B.length;
D++){try{A=new ActiveXObject(B[D]);
break
}catch(C){}}if(!A){throw new AjxException("XSLTemplate",AjxException.UNSUPPORTED,"AjxXslt.createProcessor")
}this._processor=A;
this._processor.stylesheet=F
}}};
AjxXslt._finishedLoading=function(){var A=this._xslt;
A.createProcessor()
};
AjxXslt.prototype.loadUrl=function(A){var C=this._doc;
if(AjxEnv.isNav){var B=C.getDoc();
B._xslt=this;
B.addEventListener("load",AjxXslt._finishedLoading,false)
}C.loadFromUrl(A);
if(AjxEnv.isIE){this.createProcessor()
}};
AjxXslt.prototype.transformToDom=function(C){var A;
if(AjxEnv.isIE){A=this.transformIE(C)
}else{if(AjxEnv.isNav){return this.transformNav(C)
}else{return C
}}var B=AjxXmlDoc.createFromXml(A);
return B.getDoc()
};
AjxXslt.prototype.transformToString=function(C){var A;
if(AjxEnv.isIE){return this.transformIE(C)
}else{if(AjxEnv.isNav){A=this.transformNav(C)
}else{return C.documentElement.innerHTML
}}if(!A||!A.documentElement){throw new AjxException("XSL transformation failed.",AjxException.INVALID_PARAM,"AjxXslt.transformToString")
}var B=A.documentElement;
if((B instanceof HTMLElement)||(B instanceof HTMLHtmlElement)){return B.innerHTML
}else{if(B instanceof Element){return AjxXmlDoc.replaceInvalidChars(B.xml)
}}return C.documentElement.innerHTML
};
AjxXslt.prototype.transformIE=function(B){try{var C=this._processor.createProcessor();
C.input=B;
C.transform();
return C.output
}catch(A){throw new AjxException(A.description,AjxException.INVALID_PARAM,"AjxXslt.transformIE")
}};
AjxXslt.prototype.transformNav=function(A){return this._processor.transformToDocument(A)
};
AjxXslt.prototype.transformNav2=function(A){this._fragment=document.implementation.createDocument("","",null);
return this._processor.transformToFragment(A,this._fragment)
}
}if(AjxPackage.define("ajax.util.AjxSHA1")){var AjxSHA1=function(){var O=0;
var T="";
var C=8;
function J(U){return I(E(S(U),U.length*C))
}function H(U){return M(E(S(U),U.length*C))
}function D(U){return Q(E(S(U),U.length*C))
}function B(U,V){return I(F(U,V))
}function G(U,V){return M(F(U,V))
}function L(U,V){return Q(F(U,V))
}function A(){return J("abc")=="a9993e364706816aba3e25717850c26c9cd0d89d"
}function E(p,g){p[g>>5]|=128<<(24-g%32);
p[((g+64>>9)<<4)+15]=g;
var q=Array(80);
var o=1732584193;
var n=-271733879;
var m=-1732584194;
var k=271733878;
var h=-1009589776;
for(var Y=0;
Y<p.length;
Y+=16){var f=o;
var Z=n;
var X=m;
var W=k;
var U=h;
for(var V=0;
V<80;
V++){if(V<16){q[V]=p[Y+V]
}else{q[V]=N(q[V-3]^q[V-8]^q[V-14]^q[V-16],1)
}var r=P(P(N(o,5),R(V,n,m,k)),P(P(h,q[V]),K(V)));
h=k;
k=m;
m=N(n,30);
n=o;
o=r
}o=P(o,f);
n=P(n,Z);
m=P(m,X);
k=P(k,W);
h=P(h,U)
}return Array(o,n,m,k,h)
}function R(V,U,X,W){if(V<20){return(U&X)|((~U)&W)
}if(V<40){return U^X^W
}if(V<60){return(U&X)|(U&W)|(X&W)
}return U^X^W
}function K(U){return(U<20)?1518500249:(U<40)?1859775393:(U<60)?-1894007588:-899497514
}function F(W,Z){var Y=S(W);
if(Y.length>16){Y=E(Y,W.length*C)
}var U=Array(16),X=Array(16);
for(var V=0;
V<16;
V++){U[V]=Y[V]^909522486;
X[V]=Y[V]^1549556828
}var a=E(U.concat(S(Z)),512+Z.length*C);
return E(X.concat(a),512+160)
}function P(U,X){var W=(U&65535)+(X&65535);
var V=(U>>16)+(X>>16)+(W>>16);
return(V<<16)|(W&65535)
}function N(U,V){return(U<<V)|(U>>>(32-V))
}function S(X){var W=Array();
var U=(1<<C)-1;
for(var V=0;
V<X.length*C;
V+=C){W[V>>5]|=(X.charCodeAt(V/C)&U)<<(32-C-V%32)
}return W
}function Q(W){var X="";
var U=(1<<C)-1;
for(var V=0;
V<W.length*32;
V+=C){X+=String.fromCharCode((W[V>>5]>>>(32-C-V%32))&U)
}return X
}function I(W){var V=O?"0123456789ABCDEF":"0123456789abcdef";
var X="";
for(var U=0;
U<W.length*4;
U++){X+=V.charAt((W[U>>2]>>((3-U%4)*8+4))&15)+V.charAt((W[U>>2]>>((3-U%4)*8))&15)
}return X
}function M(X){var W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var Z="";
for(var V=0;
V<X.length*4;
V+=3){var Y=(((X[V>>2]>>8*(3-V%4))&255)<<16)|(((X[V+1>>2]>>8*(3-(V+1)%4))&255)<<8)|((X[V+2>>2]>>8*(3-(V+2)%4))&255);
for(var U=0;
U<4;
U++){if(V*8+U*6>X.length*32){Z+=T
}else{Z+=W.charAt((Y>>6*(3-U))&63)
}}}return Z
}this.hex_sha1=J;
this.b64_sha1=H;
this.str_sha1=D;
this.hex_hmac_sha1=B;
this.b64_hmac_sha1=G;
this.str_hmac_sha1=L;
this.sha1_vm_test=A
};
AjxSHA1=new AjxSHA1()
}if(AjxPackage.define("ajax.util.AjxEmailAddress")){AjxEmailAddress=function(A,D,B,C,E){this.address=A;
this.name=this._setName(B);
this.dispName=C;
this.type=D||AjxEmailAddress.TO;
this.isGroup=E
};
AjxEmailAddress.FROM="FROM";
AjxEmailAddress.TO="TO";
AjxEmailAddress.CC="CC";
AjxEmailAddress.BCC="BCC";
AjxEmailAddress.REPLY_TO="REPLY_TO";
AjxEmailAddress.SENDER="SENDER";
AjxEmailAddress.TYPE_STRING={};
AjxEmailAddress.TYPE_STRING[AjxEmailAddress.FROM]="from";
AjxEmailAddress.TYPE_STRING[AjxEmailAddress.TO]="to";
AjxEmailAddress.TYPE_STRING[AjxEmailAddress.CC]="cc";
AjxEmailAddress.TYPE_STRING[AjxEmailAddress.BCC]="bcc";
AjxEmailAddress.TYPE_STRING[AjxEmailAddress.REPLY_TO]="replyTo";
AjxEmailAddress.TYPE_STRING[AjxEmailAddress.SENDER]="sender";
AjxEmailAddress.fromSoapType={};
AjxEmailAddress.fromSoapType.f=AjxEmailAddress.FROM;
AjxEmailAddress.fromSoapType.t=AjxEmailAddress.TO;
AjxEmailAddress.fromSoapType.c=AjxEmailAddress.CC;
AjxEmailAddress.fromSoapType.b=AjxEmailAddress.BCC;
AjxEmailAddress.fromSoapType.r=AjxEmailAddress.REPLY_TO;
AjxEmailAddress.fromSoapType.s=AjxEmailAddress.SENDER;
AjxEmailAddress.toSoapType={};
AjxEmailAddress.toSoapType[AjxEmailAddress.FROM]="f";
AjxEmailAddress.toSoapType[AjxEmailAddress.TO]="t";
AjxEmailAddress.toSoapType[AjxEmailAddress.CC]="c";
AjxEmailAddress.toSoapType[AjxEmailAddress.BCC]="b";
AjxEmailAddress.toSoapType[AjxEmailAddress.REPLY_TO]="r";
AjxEmailAddress.toSoapType[AjxEmailAddress.SENDER]="s";
AjxEmailAddress.SEPARATOR="; ";
AjxEmailAddress.DELIMS=[";",",","\n"," "];
AjxEmailAddress.IS_DELIM={};
for(var i=0;
i<AjxEmailAddress.DELIMS.length;
i++){AjxEmailAddress.IS_DELIM[AjxEmailAddress.DELIMS[i]]=true
}AjxEmailAddress.addrAnglePat=/(\s*<(((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))\@((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*\[(\s*(([^\[\]\\])|(\\([^\x0A\x0D])))+)*\s*\]\s*)))>\s*)/;
AjxEmailAddress.addrAngleQuotePat=/(\s*<'(((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))\@((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*\[(\s*(([^\[\]\\])|(\\([^\x0A\x0D])))+)*\s*\]\s*)))'>\s*)/;
AjxEmailAddress.addrPat=/(((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))\@((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*\[(\s*(([^\[\]\\])|(\\([^\x0A\x0D])))+)*\s*\]\s*)))/;
AjxEmailAddress.addrPat1=/(^|"|\s)(((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))\@((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*\[(\s*(([^\[\]\\])|(\\([^\x0A\x0D])))+)*\s*\]\s*)))/;
AjxEmailAddress.accountPat=/((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))/;
AjxEmailAddress.commentPat=/\((.*)\)/g;
AjxEmailAddress.phrasePat=/(((\s*[^\x00-\x1F\x7F()<>\[\]:;@\"\s]+\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))+)/;
AjxEmailAddress.boundAddrPat=/(\s*<?(((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))\@((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*\[(\s*(([^\[\]\\])|(\\([^\x0A\x0D])))+)*\s*\]\s*)))>?\s*)$/;
AjxEmailAddress.parse=function(D){var E,A;
var D=AjxStringUtil.trim(D);
var B=AjxEmailAddress._prelimCheck(D);
if(!(B&&D.match(AjxEmailAddress.addrPat))){return null
}var C=D.match(AjxEmailAddress.addrAngleQuotePat)||D.match(AjxEmailAddress.addrAnglePat);
if(C&&C.length){E=C[2];
D=D.replace(AjxEmailAddress.addrAnglePat,"")
}else{C=D.match(AjxEmailAddress.addrPat1);
if(C&&C.length){E=D.match(AjxEmailAddress.addrPat);
E=(E&&E.length&&E[0]!="")?AjxStringUtil.trim(E[0]):C[0];
D=D.replace(AjxEmailAddress.addrPat,"")
}}C=D.match(AjxEmailAddress.phrasePat);
if(C){A=AjxStringUtil.trim(AjxStringUtil.trim(C[0]),false,'"')
}return new AjxEmailAddress(E,null,A)
};
AjxEmailAddress.parseEmailString=function(C,K,L){var E=new AjxVector();
var B=new AjxVector();
var M=new AjxVector();
var H=AjxEmailAddress.split(C);
for(var G=0;
G<H.length;
G++){var I=AjxStringUtil.trim(H[G]);
if(I){var J=AjxEmailAddress.parse(I);
if(!J&&!L){var N=I;
var F=N.match(AjxEmailAddress.addrAnglePat);
if(F&&F.length){var A=N.replace(AjxEmailAddress.addrAnglePat,"");
var D=['"',A,'" ',F[0]].join("");
J=AjxEmailAddress.parse(D);
if(J){J.name=A
}}}if(J){J.type=K;
E.add(J);
M.add(J)
}else{B.add(I);
M.add(new AjxEmailAddress(I))
}}}return{good:E,bad:B,all:M}
};
AjxEmailAddress.isValid=function(B){B=AjxStringUtil.trim(B);
var A=AjxEmailAddress._prelimCheck(B);
return(A&&(B.match(AjxEmailAddress.addrPat)!=null))
};
AjxEmailAddress._prelimCheck=function(C){var A=C.indexOf("@");
var B=C.lastIndexOf(".");
return((A!=-1)&&(B!=-1)&&(B>A))
};
AjxEmailAddress.split=function(O){O=AjxStringUtil.trim(O);
var N=[];
var P=0,L=0;
var Q="",F="";
var G=false;
while(P<O.length){var C=O.charAt(P);
if((C=='"'||C=="(")&&Q!="\\"){G=true;
F=C;
L=P;
P++;
while(G&&P<O.length){var C=O.charAt(P);
if(((F=='"'&&C=='"')||(F=="("&&C==")"))&&(Q!="\\")){N.push({start:L,end:P});
G=false
}P++;
Q=C
}}else{P++
}Q=C
}if(N.length){AjxEmailAddress.IS_DELIM[" "]=false
}L=0;
var K=[];
while(L<O.length){var B=O.substring(L,O.length);
P=0;
var E=B.length;
while((E==B.length)&&(P<B.length)){var C=B.charAt(P);
if(AjxEmailAddress.IS_DELIM[C]){var D=false;
if(C!="\n"){for(var I=0;
I<N.length;
I++){var J=N[I];
var A=L+P;
D=(A>=J.start&&A<=J.end);
if(D){break
}}}if(!D){var H=true;
var M=B.substring(0,P);
if(C==","||C==" "){H=M.match(AjxEmailAddress.boundAddrPat)
}if(H){K.push(M);
E=P;
L+=M.length+1
}}C=O.charAt(L);
while((L<O.length)&&AjxEmailAddress.IS_DELIM[C]){L++;
C=O.charAt(L)
}P++
}else{P++
}}if(E==B.length){K.push(B);
L+=B.length+1
}}AjxEmailAddress.IS_DELIM[" "]=true;
return K
};
AjxEmailAddress.prototype.toString=function(){if(this.name&&!this.isGroup){var A=this.name.replace(/\\+"/g,'"');
A=A.replace(/"/g,'\\"');
return['"',A,'" <',this.address,">"].join("")
}else{return this.address
}};
AjxEmailAddress.prototype.getAddress=function(){return this.address
};
AjxEmailAddress.prototype.setAddress=function(A){this.address=A
};
AjxEmailAddress.prototype.getType=function(){return this.type
};
AjxEmailAddress.prototype.setType=function(A){this.type=A
};
AjxEmailAddress.prototype.getTypeAsString=function(){return AjxEmailAddress.TYPE_STRING[this.type]
};
AjxEmailAddress.prototype.getName=function(){return this.name
};
AjxEmailAddress.prototype.getDispName=function(){return this.dispName
};
AjxEmailAddress.prototype.clone=function(){var A=new AjxEmailAddress(this.address,this.type,this.name,this.dispName);
A.icon=this.icon;
return A
};
AjxEmailAddress.prototype._setName=function(A){if(!A){return""
}if(A&&A.charAt(0)=="'"&&A.charAt(A.length-1)=="'"){A=A.substring(1,A.length-1)
}return A
}
}if(AjxPackage.define("ajax.util.AjxHistoryMgr")){AjxHistoryMgr=function(){this.currentLocation=null;
this.listener=null;
this.iframe=null;
this.ignoreLocationChange=null;
this.WAIT_TIME=AjxEnv.isIE?400:200;
this.currentWaitTime=0;
this.ieAtomicLocationChange=null;
this._eventMgr=new AjxEventMgr();
this._evt=new AjxEvent();
this._initialize()
};
AjxHistoryMgr.BLANK_FILE="blankHistory.html";
AjxHistoryMgr.IFRAME_ID="DhtmlHistoryFrame";
AjxHistoryMgr.LOCATION_CHECK_INTERVAL=100;
AjxHistoryMgr.prototype.addListener=function(A){return this._eventMgr.addListener(AjxEvent.HISTORY,A)
};
AjxHistoryMgr.prototype.removeListener=function(A){return this._eventMgr.removeListener(AjxEvent.HISTORY,A)
};
AjxHistoryMgr.prototype.add=function(C){var A=this;
var B=function(){if(A.currentWaitTime>0){A.currentWaitTime=A.currentWaitTime-A.WAIT_TIME
}C=A._removeHash(C);
if(AjxEnv.isIE){if(document.getElementById(C)){throw new DwtException("AjxHistoryMgr: location has same ID as DOM element")
}}A.ignoreLocationChange=true;
this.ieAtomicLocationChange=true;
A.currentLocation=C;
window.location.hash=C;
if(AjxEnv.isIE){A.iframe.src=AjxHistoryMgr.BLANK_FILE+"?"+C
}this.ieAtomicLocationChange=false
};
window.setTimeout(B,this.currentWaitTime);
this.currentWaitTime=this.currentWaitTime+A.WAIT_TIME
};
AjxHistoryMgr.prototype.getCurrentLocation=function(){return this._removeHash(window.location.hash)
};
AjxHistoryMgr.prototype._initialize=function(){var A=this.getCurrentLocation();
this.currentLocation=A;
if(AjxEnv.isIE){var E=[];
var D=0;
E[D++]="<iframe style='border: 0px; width: 1px; ";
E[D++]="height: 1px; position: absolute; bottom: 0px; ";
E[D++]="right: 0px; visibility: visible;' ";
E[D++]="id='"+AjxHistoryMgr.IFRAME_ID+"' ";
E[D++]="src='"+AjxHistoryMgr.BLANK_FILE+"?"+A+"'>";
E[D++]="</iframe>";
var F=document.createElement("div");
document.body.appendChild(F);
F.innerHTML=E.join("")
}if(AjxEnv.isIE){this.iframe=document.getElementById(AjxHistoryMgr.IFRAME_ID)
}var B=this;
var C=function(){B._checkLocation()
};
setInterval(C,AjxHistoryMgr.LOCATION_CHECK_INTERVAL)
};
AjxHistoryMgr.prototype._checkLocation=function(){if(!AjxEnv.isIE&&this.ignoreLocationChange){this.ignoreLocationChange=false;
return 
}if(!AjxEnv.isIE&&this.ieAtomicLocationChange){return 
}var A=this.getCurrentLocation();
if(A==this.currentLocation){return 
}this.ieAtomicLocationChange=true;
if(AjxEnv.isIE&&this._getIFrameHash()!=A){this.iframe.src=AjxHistoryMgr.BLANK_FILE+"?"+A
}else{if(AjxEnv.isIE){return 
}}this.currentLocation=A;
this.ieAtomicLocationChange=false;
this._evt.data=A;
this._eventMgr.notifyListeners(AjxEvent.HISTORY,this._evt)
};
AjxHistoryMgr.prototype._getIFrameHash=function(){var A=document.getElementById(AjxHistoryMgr.IFRAME_ID);
var C=A.contentWindow.document;
var B=new String(C.location.search);
if(B.length==1&&B.charAt(0)=="?"){B=""
}else{if(B.length>=2&&B.charAt(0)=="?"){B=B.substring(1)
}}return B
};
AjxHistoryMgr.prototype._removeHash=function(A){if(A==null||A==undefined){return null
}else{if(A==""){return""
}else{if(A.length==1&&A.charAt(0)=="#"){return""
}else{if(A.length>1&&A.charAt(0)=="#"){return A.substring(1)
}else{return A
}}}}};
AjxHistoryMgr.prototype.iframeLoaded=function(A){if(this.ignoreLocationChange){this.ignoreLocationChange=false;
return 
}var B=new String(A.search);
if(B.length==1&&B.charAt(0)=="?"){B=""
}else{if(B.length>=2&&B.charAt(0)=="?"){B=B.substring(1)
}}window.location.hash=B;
this._evt.data=B;
this._eventMgr.notifyListeners(AjxEvent.HISTORY,this._evt)
}
}if(AjxPackage.define("ajax.dwt.core.Dwt")){Dwt=function(){};
Dwt.STATIC_STYLE="static";
Dwt.ABSOLUTE_STYLE="absolute";
Dwt.RELATIVE_STYLE="relative";
Dwt.FIXED_STYLE="fixed";
Dwt.NO_REPEAT="no-repeat";
Dwt.REPEAT="repeat";
Dwt.REPEAT_X="repeat-x";
Dwt.REPEAT_Y="repeat-y";
Dwt.DISPLAY_INLINE="inline";
Dwt.DISPLAY_BLOCK="block";
Dwt.DISPLAY_NONE="none";
Dwt.DISPLAY_TABLE_ROW=AjxEnv.isIE?Dwt.DISPLAY_BLOCK:"table-row";
Dwt.DISPLAY_TABLE_CELL=AjxEnv.isIE?Dwt.DISPLAY_BLOCK:"table-cell";
Dwt.CLIP=1;
Dwt.VISIBLE=2;
Dwt.SCROLL=3;
Dwt.FIXED_SCROLL=4;
Dwt.Z_HIDDEN=100;
Dwt.Z_CURTAIN=200;
Dwt.Z_VIEW_WINDOW_MANAGER=290;
Dwt.Z_VIEW=300;
Dwt.Z_WINDOW_MANAGER=490;
Dwt.Z_MENU=500;
Dwt.Z_VEIL=600;
Dwt.Z_DIALOG=700;
Dwt.Z_DIALOG_MENU=750;
Dwt.Z_TOOLTIP=775;
Dwt.Z_DND=800;
Dwt.Z_BUSY=900;
Dwt.Z_TOAST=950;
Dwt.Z_SPLASH=1000;
Dwt.DEFAULT=-123456789;
Dwt.CLEAR=-20000;
Dwt.LOC_NOWHERE=-10000;
Dwt.DND_DROP_NONE=0;
Dwt.DND_DROP_COPY=1;
Dwt.DND_DROP_MOVE=2;
Dwt.KEY_OBJECT="_object_";
Dwt.KEY_ID="_id_";
Dwt.CARET_HACK_ENABLED=AjxEnv.isFirefox&&!AjxEnv.isFirefox3up;
if(Dwt.CARET_HACK_ENABLED){Dwt.CARET_HACK_BEGIN="<div style='overflow:auto;'>";
Dwt.CARET_HACK_END="</div>"
}else{Dwt.CARET_HACK_BEGIN="";
Dwt.CARET_HACK_END=""
}Dwt._Z_INC=1;
Dwt.__nextId={};
Dwt.getNextId=function(A){if(arguments.length==0){A="DWT"
}if(!Dwt.__nextId[A]){Dwt.__nextId[A]=1
}return A+Dwt.__nextId[A]++
};
Dwt.associateElementWithObject=function(C,A,B){C[B||"dwtObj"]=A.__internalId=AjxCore.assignId(A)
};
Dwt.disassociateElementFromObject=function(C,A,B){if(C){C.removeAttribute(B||"dwtObj")
}if(A.__internalId){AjxCore.unassignId(A.__internalId)
}};
Dwt.getObjectFromElement=function(B,A){return AjxCore.objectWithId(B[A||"dwtObj"])
};
Dwt.findAncestor=function(B,A){while(B&&(Dwt.getAttr(B,A)==null)){B=B.parentNode
}return B
};
Dwt.setHandler=function(C,B,A){if(B==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){Dwt.clearHandler(C,B)
}C[B]=A;
if(B==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){C.addEventListener("DOMMouseScroll",A,true)
}};
Dwt.clearHandler=function(C,B){if(B==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){if(C[B]){var A=C[B];
C.removeEventListener("DOMMouseScroll",A,true)
}}C[B]=null
};
Dwt.getBackgroundRepeat=function(A){return DwtCssStyle.getProperty(A,"background-repeat")
};
Dwt.setBackgroundRepeat=function(B,A){B.style.backgroundRepeat=A
};
Dwt.getBounds=function(E,C){if(!Dwt.__tmpPoint){Dwt.__tmpPoint=new DwtPoint(0,0)
}var D=Dwt.__tmpPoint;
Dwt.getLocation(E,D);
var B=D.x;
var A=D.y;
Dwt.getSize(E,D);
if(!C){return new DwtRectangle(B,A,D.x,D.y)
}else{C.set(B,A,D.x,D.y);
return C
}};
Dwt.setBounds=function(D,B,E,C,A){Dwt.setLocation(D,B,E);
Dwt.setSize(D,C,A)
};
Dwt.getCursor=function(A){return DwtCssStyle.getProperty(A,"cursor")
};
Dwt.setCursor=function(B,A){B.style.cursor=A
};
Dwt.getLocation=function(B,A){var A=(A)?A:new DwtPoint(0,0);
if(B.style.position==Dwt.ABSOLUTE_STYLE){A.set(parseInt(DwtCssStyle.getProperty(B,"left")),parseInt(DwtCssStyle.getProperty(B,"top")));
return A
}else{return Dwt.toWindow(B,0,0,null,null,A)
}};
Dwt.setLocation=function(C,B,D){var A=C.style.position;
if(A!=Dwt.ABSOLUTE_STYLE&&A!=Dwt.RELATIVE_STYLE&&A!=Dwt.FIXED_STYLE){throw new DwtException("Static widgets may not be positioned",DwtException.INVALID_OP,"Dwt.setLocation")
}if(B=Dwt.__checkPxVal(B)){C.style.left=B
}if(D=Dwt.__checkPxVal(D)){C.style.top=D
}};
Dwt.getPosition=function(A){return A.style.position
};
Dwt.setPosition=function(B,A){B.style.position=A
};
Dwt.getScrollStyle=function(A){var B=DwtCssStyle.getProperty(A,"overflow");
if(B=="hidden"){return Dwt.CLIP
}else{if(B=="auto"){return Dwt.SCROLL
}else{if(B=="scroll"){return Dwt.FIXED_SCROLL
}else{return Dwt.VISIBLE
}}}};
Dwt.setScrollStyle=function(B,A){if(A==Dwt.CLIP){B.style.overflow="hidden"
}else{if(A==Dwt.SCROLL){B.style.overflow="auto"
}else{if(A==Dwt.FIXED_SCROLL){B.style.overflow="scroll"
}else{B.style.overflow="visible"
}}}};
Dwt.getSize=function(C,A){var B;
if(!A){B=new DwtPoint(0,0)
}else{B=A;
B.set(0,0)
}if(!C){return B
}B.x=C.offsetWidth;
if(B.x!=null){B.y=C.offsetHeight
}else{if(C.clip&&C.clip.width!=null){B.x=C.clip.width;
B.y=C.clip.height;
B.x=parseInt(B.x);
B.y=parseInt(B.y)
}else{if(C.style&&C.style.pixelWidth!=null){B.x=C.style.pixelWidth;
B.y=C.style.pixelHeight;
B.x=parseInt(B.x);
B.y=parseInt(B.y)
}}}return B
};
Dwt.setSize=function(C,B,A){if(!C.style){return 
}if(B==Dwt.CLEAR){C.style.width=null
}else{if(B=Dwt.__checkPxVal(B,true)){C.style.width=B
}}if(A==Dwt.CLEAR){C.style.height=null
}else{if(A=Dwt.__checkPxVal(A,true)){C.style.height=A
}}};
Dwt.getHtmlExtent=function(A){var B=AjxStringUtil.calcDIV();
B.innerHTML=A;
return Dwt.getSize(B)
};
Dwt.toDocumentFragment=function(C,F){var E=AjxStringUtil.calcDIV();
E.innerHTML=C;
var B=document.createDocumentFragment();
var A=F&&document.getElementById(F);
if(A){B.appendChild(A)
}else{for(var D=E.firstChild;
D;
D=E.firstChild){B.appendChild(D)
}}return B
};
Dwt.getAttr=function(C,A,B){if(!B){return C&&C.tagName?(C.getAttribute(A)||C[A]):null
}else{while(C){if(Dwt.getAttr(C,A)!=null){return C
}C=C.parentNode
}return null
}};
Dwt.getVisible=function(B){var A=DwtCssStyle.getProperty(B,"display");
return(A!=Dwt.DISPLAY_NONE)
};
Dwt.setVisible=function(D,E){if(E){var B=D.nodeName.match(/tr/i);
var A=D.nodeName.match(/td|th/i);
var C=B?Dwt.DISPLAY_TABLE_ROW:(A?Dwt.DISPLAY_TABLE_CELL:Dwt.DISPLAY_BLOCK);
D.style.display=C
}else{D.style.display=Dwt.DISPLAY_NONE
}};
Dwt.getVisibility=function(B){var A=DwtCssStyle.getProperty(B,"visibility");
return(A=="visible")
};
Dwt.setVisibility=function(A,B){A.style.visibility=B?"visible":"hidden"
};
Dwt.__MSIE_OPACITY_RE=/alpha\(opacity=(\d+)\)/;
Dwt.getOpacity=function(C){if(AjxEnv.isIE){var B=C.style.filter;
var A=Dwt.__MSIE_OPACITY_RE.exec(B)||[B,"100"];
return Number(A[1])
}return Number(C.style.opacity||1)*100
};
Dwt.setOpacity=function(B,A){if(AjxEnv.isIE){B.style.filter="alpha(opacity="+A+")"
}else{B.style.opacity=A/100
}};
Dwt.getZIndex=function(A){return DwtCssStyle.getProperty(A,"z-index")
};
Dwt.setZIndex=function(B,A){B.style.zIndex=A
};
Dwt.getDisplay=function(A){DwtCssStyle.getProperty(A,"display")
};
Dwt.setDisplay=function(B,A){B.style.display=A
};
Dwt.getWindowSize=function(A){var B=(!A)?new DwtPoint(0,0):A;
if(window.innerWidth){B.x=window.innerWidth;
B.y=window.innerHeight
}else{if(AjxEnv.isIE6CSS){B.x=document.body.parentElement.clientWidth;
B.y=document.body.parentElement.clientHeight
}else{if(document.body&&document.body.clientWidth){B.x=document.body.clientWidth;
B.y=document.body.clientHeight
}}}return B
};
Dwt.toWindow=function(D,G,F,J,H,I){var B;
if(!I){B=new DwtPoint(G,F)
}else{B=I;
B.set(G,F)
}var A=D;
while(A&&A!=J){B.x+=A.offsetLeft-A.scrollLeft;
B.y+=A.offsetTop;
if(!H){var C=AjxEnv.isOpera?A.pageYOffset:A.scrollTop;
if(C){B.y-=C
}var E=A.parentNode;
while(E!=A.offsetParent&&E!=J){C=AjxEnv.isOpera?E.pageYOffset:E.scrollTop;
if(C){B.y-=C
}E=E.parentNode
}}A=A.offsetParent
}return B
};
Dwt.getInsets=function(D){var B=DwtCssStyle.getComputedStyleObject(D);
var C=parseInt(B.borderLeftWidth)||0;
var H=parseInt(B.borderTopWidth)||0;
var I=parseInt(B.borderRightWidth)||0;
var F=parseInt(B.borderBottomWidth)||0;
var E=parseInt(B.paddingLeft)||0;
var J=parseInt(B.paddingTop)||0;
var A=parseInt(B.paddingRight)||0;
var G=parseInt(B.paddingBottom)||0;
return{left:C+E,top:H+J,right:I+A,bottom:F+G}
};
Dwt.insetBounds=function(B,A){if(isNaN(B.x)||isNaN(A.left)){return B
}B.x+=A.left;
B.y+=A.top;
B.width-=A.left+A.right;
B.height-=A.top+A.bottom;
return B
};
Dwt.setStatus=function(A){window.status=A
};
Dwt.getTitle=function(){return window.document.title
};
Dwt.setTitle=function(A){window.document.title=A
};
Dwt.getIframeDoc=function(A){if(A){return AjxEnv.isIE?A.contentWindow.document:A.contentDocument
}return null
};
Dwt.getIframeWindow=function(A){return A.contentWindow
};
Dwt.parseHtmlFragment=function(D,C){if(!Dwt._div){Dwt._div=document.createElement("div")
}if(C){D="<table style='table-layout:fixed'>"+D+"</table>"
}Dwt._div.innerHTML=D;
if(C){var A=document.createDocumentFragment();
var E=Dwt._div.firstChild.rows;
for(var B=E.length-1;
B>=0;
B--){A.appendChild(E[0])
}return A.childNodes.length>1?A:A.firstChild
}return Dwt._div.firstChild
};
Dwt.contains=function(C,B){var D=false;
if(C.compareDocumentPosition){var A=C.compareDocumentPosition(B);
if((A==(document.DOCUMENT_POSITION_CONTAINED_BY|document.DOCUMENT_POSITION_FOLLOWING))){D=true
}}else{if(C.contains){D=C.contains(B)
}}return D
};
Dwt.removeChildren=function(A){while(A.hasChildNodes()){A.removeChild(A.firstChild)
}};
Dwt.getCellIndex=function(B){if(AjxEnv.isOpera){if(B.tagName&&B.tagName.toLowerCase()=="td"){var C=B.parentNode.cells;
var A=C.length;
for(var D=0;
D<A;
D++){if(C[D]==B){return D
}}}}else{return B.cellIndex
}return -1
};
Dwt.delClass=function(C,A,D){if(C==null){return 
}if(typeof A=="string"){A=Dwt._DELCLASS_CACHE[A]||(Dwt._DELCLASS_CACHE[A]=new RegExp("\\b"+A+"\\b","ig"))
}var B=C.className||"";
B=B.replace(A," ");
C.className=D?B+" "+D:B
};
Dwt._DELCLASS_CACHE={};
Dwt.addClass=function(A,B){Dwt.delClass(A,B,B)
};
Dwt.condClass=function(C,D,B,A){if(!!D){if(A){Dwt.delClass(C,A)
}Dwt.addClass(C,B)
}else{Dwt.delClass(C,B);
if(A){Dwt.addClass(C,A)
}}};
Dwt.setSelectionRange=function(C,D,A){if(AjxEnv.isGeckoBased||AjxEnv.isSafari){C.setSelectionRange(D,A)
}else{if(AjxEnv.isIE){var B=C.createTextRange();
B.collapse(true);
B.moveStart("character",D);
B.moveEnd("character",A-D);
B.select()
}else{C.select()
}}};
Dwt.getSelectionStart=function(D){if(AjxEnv.isGeckoBased){return D.selectionStart
}else{if(AjxEnv.isIE){var C=document.selection.createRange();
var B=C.compareEndPoints("StartToEnd",C)==0;
if(!B){C.collapse(true)
}var A=C.getBookmark();
return A.charCodeAt(2)-2
}}return D.value.length
};
Dwt.getSelectionEnd=function(D){if(AjxEnv.isGeckoBased){return D.selectionEnd
}else{if(AjxEnv.isIE){var C=document.selection.createRange();
var B=C.compareEndPoints("StartToEnd",C)==0;
if(!B){C.collapse(false)
}var A=C.getBookmark();
return A.charCodeAt(2)-2
}}return D.value.length
};
Dwt.setSelectionText=function(B,E){var F=Dwt.getSelectionStart(B);
var A=Dwt.getSelectionEnd(B);
var D=B.value;
var C=[D.substr(0,F),E,D.substr(A)].join("");
if(typeof B.setValue=="function"){B.setValue(C)
}else{B.value=C
}Dwt.setSelectionRange(B,F,F+E.length)
};
Dwt.instanceOf=function(B,A){return(window[A]&&B instanceof window[A])
};
Dwt.getParams=function(A,D){if(!(A&&A.length)){return 
}if(A.length>1||A[0]._eventMgr){var C={};
for(var B=0;
B<A.length;
B++){C[D[B]]=A[B]
}return C
}else{if(A.length==1){return A[0]
}else{return{}
}}};
Dwt.__checkPxVal=function(B,A){if(B==Dwt.DEFAULT){return false
}if(A&&B<0&&B!=Dwt.LOC_NOWHERE){B=0
}if(typeof (B)=="number"){B=B+"px"
}return B
};
Dwt.byId=function(A){return(typeof A=="string"?document.getElementById(A):A)
};
Dwt.byTag=function(A){return document.getElementsByTagName(A)
};
Dwt.show=function(A){Dwt.setVisible(Dwt.byId(A),true)
};
Dwt.hide=function(A){Dwt.setVisible(Dwt.byId(A),false)
};
Dwt.toggle=function(B,A){B=Dwt.byId(B);
if(A==null){A=(Dwt.getVisible(B)!=true)
}Dwt.setVisible(B,A)
};
Dwt.setText=function(A,B){A.appendChild(document.createTextNode(B))
};
Dwt.populateText=function(){if(arguments.length==0){return 
}var C,A=0,B=arguments.length;
while(A<B){C=document.getElementById(arguments[A]);
if(C){Dwt.setText(C,arguments[A+1])
}A+=2
}};
Dwt.setInnerHtml=function(B,A){B.innerHTML=A
};
Dwt.setFavIcon=function(G){if(AjxEnv.isIE){return 
}var A=null;
if(Dwt._favIconId){A=document.getElementById(Dwt._favIconId)
}else{var H=document.getElementsByTagName("head")[0];
var B=H.getElementsByTagName("link");
for(var D=0;
D<B.length;
D++){var F=B[D];
if(F.rel.toUpperCase()=="SHORTCUT ICON"){if(!F.id){F.id=Dwt._favIconId=Dwt.getNextId()
}A=F;
break
}}}if(A){A.href=G;
var E=A.parentNode;
E.removeChild(A);
E.appendChild(A)
}else{var C=document.createElement("link");
C.id=Dwt._favIconId=Dwt.getNextId();
C.rel="SHORTCUT ICON";
C.href=G;
H=H||document.getElementsByTagName("head")[0];
H.appendChild(C)
}}
}if(AjxPackage.define("ajax.dwt.core.DwtId")){DwtId=function(){};
DwtId.SEP="__";
DwtId.WIDGET_LIST_VIEW="zl";
DwtId.WIDGET_HDR="zlh";
DwtId.WIDGET_HDR_TABLE="zlht";
DwtId.WIDGET_HDR_ICON="zlhi";
DwtId.WIDGET_HDR_LABEL="zlhl";
DwtId.WIDGET_HDR_ARROW="zlha";
DwtId.WIDGET_HDR_SASH="zlhs";
DwtId.WIDGET_ITEM="zli";
DwtId.WIDGET_ITEM_ROW="zlir";
DwtId.WIDGET_ITEM_CELL="zlic";
DwtId.WIDGET_ITEM_FIELD="zlif";
DwtId.LIST_VIEW_HEADERS="headers";
DwtId.LIST_VIEW_ROWS="rows";
DwtId.IFRAME="iframe";
DwtId.DND_PLUS_ID="z__roundPlus";
DwtId._makeId=function(){var C=[];
for(var B=0;
B<arguments.length;
B++){var A=arguments[B];
if(A!=null&&A!=""){C.push(A)
}}return C.join(DwtId.SEP)
};
DwtId.getListViewId=function(B,A){return DwtId._makeId(DwtId.WIDGET_LIST_VIEW,B,A)
};
DwtId.getListViewHdrId=function(B,A,C){return DwtId._makeId(B,A,C)
};
DwtId.getListViewItemId=function(B,A,D,C){return DwtId._makeId(B,A,D,C)
};
DwtId.getIframeId=function(A){return DwtId._makeId(A,DwtId.IFRAME)
}
}if(AjxPackage.define("ajax.dwt.core.DwtException")){DwtException=function(C,B,D,A){if(arguments.length===0){return 
}AjxException.call(this,C,B,D,A)
};
DwtException.prototype=new AjxException();
DwtException.prototype.constructor=DwtException;
DwtException.prototype.toString=function(){return"DwtException"
};
DwtException.INVALIDPARENT=-1;
DwtException.INVALID_OP=-2;
DwtException.INTERNAL_ERROR=-3;
DwtException.INVALID_PARAM=-4
}if(AjxPackage.define("ajax.dwt.core.DwtDraggable")){DwtDraggable=function(){};
DwtDraggable.dragEl=null;
DwtDraggable.init=function(D,M,F,B,E,A,H,K,L,I,G,J,C){D.onmousedown=DwtDraggable.__start;
D.__hMode=I?false:true;
D.__vMode=G?false:true;
D.__root=(M&&M!=null)?M:D;
if(D.__hMode&&isNaN(parseInt(D.__root.style.left))){D.__root.style.left="0px"
}if(D.__vMode&&isNaN(parseInt(D.__root.style.top))){D.__root.style.top="0px"
}if(!D.__hMode&&isNaN(parseInt(D.__root.style.right))){D.__root.style.right="0px"
}if(!D.__vMode&&isNaN(parseInt(D.__root.style.bottom))){D.__root.style.bottom="0px"
}D.__minX=(typeof F!="undefined")?F:null;
D.__minY=(typeof E!="undefined")?E:null;
D.__maxX=(typeof B!="undefined")?B:null;
D.__maxY=(typeof A!="undefined")?A:null;
D.__xMapper=J?J:null;
D.__yMapper=C?C:null;
D.__root.onDragStart=H;
D.__root.onDragEnd=L;
D.__root.onDrag=K
};
DwtDraggable.setDragBoundaries=function(B,A,D,E,C){if(B!=null){if(A!=null){B.__minX=A
}if(D!=null){B.__maxX=D
}if(E!=null){B.__minY=E
}if(C!=null){B.__maxY=C
}}};
DwtDraggable.__start=function(C){var B=DwtDraggable.dragEl=this;
C=DwtDraggable.__fixE(C);
var A=parseInt(B.__hMode?B.__root.style.left:B.__root.style.right);
var D=parseInt(B.__vMode?B.__root.style.top:B.__root.style.bottom);
if(B.__root.onDragStart){B.__root.onDragStart.run([A,D])
}B.__lastMouseX=C.clientX;
B.__lastMouseY=C.clientY;
if(B.__hMode){if(B.__minX!=null){B.__minMouseX=C.clientX-A+B.__minX
}if(B.__maxX!=null){B.__maxMouseX=B.__minMouseX+B.__maxX-B.__minX
}}else{if(B.__minX!=null){B.__maxMouseX=-B.__minX+C.clientX+A
}if(B.__maxX!=null){B.__minMouseX=-B.__maxX+C.clientX+A
}}if(B.__vMode){if(B.__minY!=null){B.__minMouseY=C.clientY-D+B.__minY
}if(B.__maxY!=null){B.__maxMouseY=B.__minMouseY+B.__maxY-B.__minY
}}else{if(B.__minY!=null){B.__maxMouseY=-B.__minY+C.clientY+D
}if(B.__maxY!=null){B.__minMouseY=-B.__maxY+C.clientY+D
}}document.onmousemove=DwtDraggable.__drag;
document.onmouseup=DwtDraggable.__end;
return false
};
DwtDraggable.__drag=function(F){F=DwtDraggable.__fixE(F);
var C=DwtDraggable.dragEl;
var D=F.clientY;
var E=F.clientX;
var B=parseInt(C.__hMode?C.__root.style.left:C.__root.style.right);
var H=parseInt(C.__vMode?C.__root.style.top:C.__root.style.bottom);
var A,G;
if(!C.__xMapper){if(C.__minX!=null){E=C.__hMode?Math.max(E,C.__minMouseX):Math.min(E,C.__maxMouseX)
}if(C.__maxX!=null){E=C.__hMode?Math.min(E,C.__maxMouseX):Math.max(E,C.__minMouseX)
}A=B+((E-C.__lastMouseX)*(C.__hMode?1:-1))
}else{A=C.__xMapper(B,E)
}if(!C.__yMapper){if(C.__minY!=null){D=C.__vMode?Math.max(D,C.__minMouseY):Math.min(D,C.__maxMouseY)
}if(C.__maxY!=null){D=C.__vMode?Math.min(D,C.__maxMouseY):Math.max(D,C.__minMouseY)
}G=H+((D-C.__lastMouseY)*(C.__vMode?1:-1))
}else{G=C.__yMapper(H,D)
}DwtDraggable.dragEl.__root.style[C.__hMode?"left":"right"]=A+"px";
DwtDraggable.dragEl.__root.style[C.__vMode?"top":"bottom"]=G+"px";
DwtDraggable.dragEl.__lastMouseX=E;
DwtDraggable.dragEl.__lastMouseY=D;
if(DwtDraggable.dragEl.__root.onDrag){DwtDraggable.dragEl.__root.onDrag.run([A,G])
}return false
};
DwtDraggable.__end=function(){document.onmousemove=null;
document.onmouseup=null;
if(DwtDraggable.dragEl.__root.onDragEnd){DwtDraggable.dragEl.__root.onDragEnd.run([parseInt(DwtDraggable.dragEl.__root.style[DwtDraggable.dragEl.__hMode?"left":"right"]),parseInt(DwtDraggable.dragEl.__root.style[DwtDraggable.dragEl.__vMode?"top":"bottom"])])
}DwtDraggable.dragEl=null
};
DwtDraggable.__fixE=function(A){if(typeof A=="undefined"){A=window.event
}if(typeof A.layerX=="undefined"){A.layerX=A.offsetX
}if(typeof A.layerY=="undefined"){A.layerY=A.offsetY
}return A
}
}if(AjxPackage.define("ajax.dwt.core.DwtDragTracker")){DwtDragTracker=function(){};
DwtDragTracker.init=function(E,B,G,F,I,A,C){var H=E._dragTrackerContext={};
var D=E.getHtmlElement();
if(B){D.style.cursor=B
}H.style=B;
H.threshX=(G>0)?G:1;
H.threshY=(F>0)?F:1;
H.data={delta:{},userData:C};
H.captureObj=new DwtMouseEventCapture({targetObj:E,mouseOverHdlr:DwtDragTracker._mouseOverHdlr,mouseDownHdlr:DwtDragTracker._mouseDownHdlr,mouseMoveHdlr:DwtDragTracker._mouseMoveHdlr,mouseUpHdlr:DwtDragTracker._mouseUpHdlr,mouseOutHdlr:DwtDragTracker._mouseOutHdlr});
E.setHandler(DwtEvent.ONMOUSEDOWN,DwtDragTracker._mouseDownHdlr);
E.setHandler(DwtEvent.ONMOUSEOVER,DwtDragTracker._mouseOverHdlr);
E.setHandler(DwtEvent.ONMOUSEOUT,DwtDragTracker._mouseOutHdlr);
H.callbackFunc=I;
H.callbackObj=A
};
DwtDragTracker.STYLE_NONE="auto";
DwtDragTracker.STYLE_MOVE="move";
DwtDragTracker.STYLE_RESIZE_NORTHWEST="nw-resize";
DwtDragTracker.STYLE_RESIZE_NORTH="n-resize";
DwtDragTracker.STYLE_RESIZE_NORTHEAST="ne-resize";
DwtDragTracker.STYLE_RESIZE_WEST="w-resize";
DwtDragTracker.STYLE_RESIZE_EAST="e-resize";
DwtDragTracker.STYLE_RESIZE_SOUTHWEST="sw-resize";
DwtDragTracker.STYLE_RESIZE_SOUTH="s-resize";
DwtDragTracker.STYLE_RESIZE_SOUTHEAST="se-resize";
DwtDragTracker.STATE_START=1;
DwtDragTracker.STATE_DRAGGING=2;
DwtDragTracker.STATE_END=3;
DwtDragTracker._mouseOverHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtDragTracker._mouseDownHdlr=function(C){var B=DwtShell.mouseEvent;
B.setFromDhtmlEvent(C,true);
if(B.button!=DwtMouseEvent.LEFT){DwtUiEvent.setBehaviour(C,true,false);
return false
}var D=B.dwtObj;
if(D&&D._dragTrackerContext){var A=D._dragTrackerContext;
if(A.callbackFunc!=null){A.oldCapture=DwtMouseEventCapture.getCaptureObj();
if(A.oldCapture){A.oldCapture.release()
}A.captureObj.capture();
A.data.startDoc={x:B.docX,y:B.docY};
A.data.state=DwtDragTracker.STATE_START;
DwtDragTracker._doCallback(A,B)
}}B._stopPropagation=true;
B._returnValue=false;
B.setToDhtmlEvent(C);
return false
};
DwtDragTracker._doCallback=function(A,B){A.data.mouseEv=B;
if(A.callbackObj!=null){A.callbackFunc.call(A.callbackObj,A.data)
}else{A.callbackFunc(A.data)
}A.data.mouseEv=null
};
DwtDragTracker._mouseMoveHdlr=function(C){var B=DwtShell.mouseEvent;
B.setFromDhtmlEvent(C);
var E=DwtMouseEventCapture.getTargetObj();
var A=E._dragTrackerContext;
var D=A.data;
D.delta.x=B.docX-D.startDoc.x;
D.delta.y=B.docY-D.startDoc.y;
if(Math.abs(D.delta.x)>=A.threshX||Math.abs(D.delta.y)>=A.threshY){D.prevState=D.state;
D.state=DwtDragTracker.STATE_DRAGGING;
DwtDragTracker._doCallback(A,B)
}B._stopPropagation=true;
B._returnValue=false;
B.setToDhtmlEvent(C);
return false
};
DwtDragTracker._mouseUpHdlr=function(C){var B=DwtShell.mouseEvent;
B.setFromDhtmlEvent(C);
if(B.button!=DwtMouseEvent.LEFT){DwtUiEvent.setBehaviour(C,true,false);
return false
}var A=DwtMouseEventCapture.getTargetObj()._dragTrackerContext;
if(A){if(A.callbackFunc!=null){DwtMouseEventCapture.getCaptureObj().release()
}if(A.oldCapture){A.oldCapture.capture();
A.oldCapture=null
}A.data.state=DwtDragTracker.STATE_END;
DwtDragTracker._doCallback(A,B)
}B._stopPropagation=true;
B._returnValue=false;
B.setToDhtmlEvent(C);
return false
};
DwtDragTracker._mouseOutHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
}
}if(AjxPackage.define("ajax.dwt.graphics.DwtCssStyle")){DwtCssStyle=function(){};
DwtCssStyle.HOVER="hover";
DwtCssStyle.ACTIVE="active";
DwtCssStyle.SELECTED="selected";
DwtCssStyle.DISABLED="disabled";
DwtCssStyle.FOCUSED="focused";
DwtCssStyle.ACTIONED="actioned";
DwtCssStyle.MATCHED="matched";
DwtCssStyle.DRAG_OVER="dragOver";
DwtCssStyle.DROPPABLE="droppable";
DwtCssStyle.NOT_DROPPABLE="notDroppable";
DwtCssStyle.DRAG_PROXY="dragProxy";
DwtCssStyle.LINUX="linux";
DwtCssStyle.getProperty=function(B,C){var J;
if(B.ownerDocument==null){for(var I=B.parentNode;
I.parentNode!=null;
I=I.parentNode){}var H=I
}else{var H=B.ownerDocument
}if(H.defaultView&&!AjxEnv.isSafari){var A=H.defaultView.getComputedStyle(B,"");
J=A.getPropertyValue(C)
}else{var G=C.split("-");
var E="";
var D;
var F=G.length;
for(D=0;
D<F;
D++){if(D!=0){E+=G[D].substring(0,1).toUpperCase()
}else{E+=G[D].substring(0,1)
}E+=G[D].substring(1)
}if(B.currentStyle){J=B.currentStyle[E]
}else{if(B.style){J=B.style[E]
}}}return J
};
DwtCssStyle.getComputedStyleObject=function(D){if(D.ownerDocument==null){for(var B=D.parentNode;
B.parentNode!=null;
B=B.parentNode){}var C=B
}else{var C=D.ownerDocument
}if(C.defaultView){var A=C.defaultView.getComputedStyle(D,null);
if(!A&&D.style){D.style.display="";
A=C.defaultView.getComputedStyle(D,null)
}return A||{}
}else{if(D.currentStyle){return D.currentStyle
}else{if(D.style){return D.style
}}}};
DwtCssStyle.removeProperty=function(B,C){if(C instanceof Array){for(var A=C.length;
--A>=0;
){DwtCssStyle.removeProperty(B,C[A])
}}else{if(AjxEnv.isIE){B.style.removeAttribute(C,true)
}else{C=C.replace(/([A-Z])/g,"-$1");
B.style.removeProperty(C)
}}}
}if(AjxPackage.define("ajax.dwt.graphics.DwtPoint")){DwtPoint=function(A,B){this.x=A;
this.y=B
};
DwtPoint.prototype.toString=function(){return"DwtPoint"
};
DwtPoint.prototype.set=function(A,B){this.x=A;
this.y=B
}
}if(AjxPackage.define("ajax.dwt.graphics.DwtRectangle")){DwtRectangle=function(B,D,C,A){this.x=B;
this.y=D;
this.width=C;
this.height=A
};
DwtRectangle.prototype.toString=function(){return"DwtRectangle"
};
DwtRectangle.prototype.set=function(B,D,C,A){this.x=B;
this.y=D
}
}if(AjxPackage.define("ajax.dwt.graphics.DwtUnits")){DwtUnits=function(){};
DwtUnits.PIXEL_UNIT="px";
DwtUnits.CM_UNIT="cm";
DwtUnits.MM_UNIT="mm";
DwtUnits.INCH_UNIT="in";
DwtUnits.PCT_UNIT="%";
DwtUnits.POINT="pt";
DwtUnits.WIDTH_EM=AjxEnv.isIE?9:11;
DwtUnits.WIDTH_SEP=AjxEnv.isIE?6:8;
DwtUnits.WIDTH_ELLIPSIS=15
}if(AjxPackage.define("ajax.dwt.events.DwtEvent")){DwtEvent=function(A){if(arguments.length==0){return 
}this.dwtObj=null
};
DwtEvent.prototype.toString=function(){return"DwtEvent"
};
DwtEvent.ONCHANGE="onchange";
DwtEvent.ONCLICK="onclick";
DwtEvent.ONCONTEXTMENU="oncontextmenu";
DwtEvent.ONDBLCLICK="ondblclick";
DwtEvent.ONFOCUS="onfocus";
DwtEvent.ONBLUR="onblur";
DwtEvent.ONKEYDOWN="onkeydown";
DwtEvent.ONKEYPRESS="onkeypress";
DwtEvent.ONKEYUP="onkeyup";
DwtEvent.ONMOUSEDOWN="onmousedown";
DwtEvent.ONMOUSEENTER="onmouseenter";
DwtEvent.ONMOUSELEAVE="onmouseleave";
DwtEvent.ONMOUSEMOVE="onmousemove";
DwtEvent.ONMOUSEOUT="onmouseout";
DwtEvent.ONMOUSEOVER="onmouseover";
DwtEvent.ONMOUSEUP="onmouseup";
DwtEvent.ONMOUSEWHEEL="onmousewheel";
DwtEvent.ONSELECTSTART="onselectstart";
DwtEvent.ACTION="ACTION";
DwtEvent.CONTROL="CONTROL";
DwtEvent.DATE_RANGE="DATE_RANGE";
DwtEvent.DISPOSE="DISPOSE";
DwtEvent.ENTER="ENTER";
DwtEvent.HOVEROVER="HOVEROVER";
DwtEvent.HOVEROUT="HOVEROUT";
DwtEvent.POPDOWN="POPDOWN";
DwtEvent.POPUP="POPUP";
DwtEvent.SELECTION="SELECTION";
DwtEvent.TREE="TREE";
DwtEvent.STATE_CHANGE="STATE_CHANGE";
DwtEvent.TAB="TAB";
DwtEvent.XFORMS_READY="xforms-ready";
DwtEvent.XFORMS_DISPLAY_UPDATED="xforms-display-updated";
DwtEvent.XFORMS_VALUE_CHANGED="xforms-value-changed";
DwtEvent.XFORMS_FORM_DIRTY_CHANGE="xforms-form-dirty-change";
DwtEvent.XFORMS_CHOICES_CHANGED="xforms-choices-changed";
DwtEvent.XFORMS_VALUE_ERROR="xforms-value-error";
DwtEvent.KEY_EVENTS=[DwtEvent.ONKEYDOWN,DwtEvent.ONKEYPRESS,DwtEvent.ONKEYUP];
DwtEvent.MOUSE_EVENTS=[DwtEvent.ONCONTEXTMENU,DwtEvent.ONDBLCLICK,DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEMOVE,DwtEvent.ONMOUSEUP,DwtEvent.ONSELECTSTART,DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT]
}if(AjxPackage.define("ajax.dwt.events.DwtEventManager")){DwtEventManager=function(){};
DwtEventManager._instance=new AjxEventMgr();
DwtEventManager._domEventToDwtMap={ondblclick:DwtEvent.ONDBLCLICK,onmousedown:DwtEvent.ONMOUSEDOWN,onmouseup:DwtEvent.ONMOUSEUP,onmousemove:DwtEvent.ONMOUSEMOVE,onmouseout:DwtEvent.ONMOUSEOUT,onmouseover:DwtEvent.ONMOUSEOVER,onselectstart:DwtEvent.ONSELECTSTART,onchange:DwtEvent.ONCHANGE};
DwtEventManager.addListener=function(A,B){DwtEventManager._instance.addListener(A,B)
};
DwtEventManager.notifyListeners=function(A,B){DwtEventManager._instance.notifyListeners(A,B)
};
DwtEventManager.removeListener=function(A,B){DwtEventManager._instance.removeListener(A,B)
};
DwtEventManager.addGlobalListener=function(C,B,D){AjxCore.addListener(C,B,D);
var A=DwtEventManager._domEventToDwtMap[B];
if(A){DwtEventManager.addListener(A,D)
}}
}if(AjxPackage.define("ajax.dwt.events.DwtDateRangeEvent")){DwtDateRangeEvent=function(A){if(arguments.length==0){return 
}DwtEvent.call(this,true);
this.reset()
};
DwtDateRangeEvent.prototype=new DwtEvent;
DwtDateRangeEvent.prototype.constructor=DwtDateRangeEvent;
DwtDateRangeEvent.prototype.toString=function(){return"DwtDateRangeEvent"
};
DwtDateRangeEvent.prototype.reset=function(){this.start=null;
this.end=null
}
}if(AjxPackage.define("ajax.dwt.events.DwtDisposeEvent")){DwtDisposeEvent=function(A){if(arguments.length==0){return 
}DwtEvent.call(this,true)
};
DwtDisposeEvent.prototype=new DwtEvent;
DwtDisposeEvent.prototype.constructor=DwtDisposeEvent;
DwtDisposeEvent.prototype.toString=function(){return"DwtDisposeEvent"
}
}if(AjxPackage.define("ajax.dwt.events.DwtUiEvent")){DwtUiEvent=function(A){if(arguments.length==0){return 
}DwtEvent.call(this,true);
this.reset()
};
DwtUiEvent.prototype=new DwtEvent;
DwtUiEvent.prototype.constructor=DwtUiEvent;
DwtUiEvent.prototype.toString=function(){return"DwtUiEvent"
};
DwtUiEvent.prototype.reset=function(){this.dwtObj=null;
this.altKey=false;
this.ctrlKey=false;
this.metaKey=false;
this.shiftKey=false;
this.target=null;
this.type=null;
this.docX=-1;
this.docY=-1;
this.elementX=-1;
this.elementY=-1;
this.ersatz=false;
this._stopPropagation=false;
this._returnValue=true;
this._dontCallPreventDefault=false
};
DwtUiEvent.getEvent=function(B,C){B=B||window.event;
if(B){return B
}if(C){var A=(C.ownerDocument||C.document||C).parentWindow;
return A?A.event:null
}};
DwtUiEvent.getTarget=function(A,B){A=DwtUiEvent.getEvent(A);
if(!A){return null
}if(!B){if(A.target){return(A.target.nodeType==3)?A.target.parentNode:A.target
}else{if(A.srcElement){return A.srcElement
}}}else{if(A.relatedTarget){return A.relatedTarget
}else{if(A.toElement){return A.toElement
}else{if(A.fromElement){return A.fromElement
}}}}return null
};
DwtUiEvent.getTargetWithProp=function(A,D,C){var B=DwtUiEvent.getTarget(A,C);
while(B){if(Dwt.getAttr(B,D)!=null){return B
}B=B.parentNode
}return null
};
DwtUiEvent.getTargetWithProps=function(D,C){var E=DwtUiEvent.getTarget(D);
while(E){var B=true;
for(var A in C){var F=Dwt.getAttr(E,C[A]);
if(F==null){E=E.parentNode;
B=false;
break
}}if(B){return E
}}return null
};
DwtUiEvent.copy=function(A,B){A.altKey=B.altKey;
A.ctrlKey=B.ctrlKey;
A.metaKey=B.metaKey;
A.shiftKey=B.shiftKey;
A.target=B.target;
A.type=B.type;
A.dwtObj=B.dwtObj;
A.docX=B.docX;
A.docY=B.docY;
A.elementX=B.elementX;
A.elementY=B.elementY;
A.ersatz=B.ersatz;
A._stopPropagation=B._stopPropagation;
A._returnValue=B._returnValue
};
DwtUiEvent.prototype.setFromDhtmlEvent=function(B,C){B=DwtUiEvent.getEvent(B);
if(!B){return 
}this.altKey=B.altKey;
this.ctrlKey=B.ctrlKey;
this.metaKey=B.metaKey;
this.shiftKey=B.shiftKey;
this.type=B.type;
this.target=DwtUiEvent.getTarget(B);
this.dwtObj=(C===true)?DwtControl.getTargetControl(B):C;
if(B.pageX!=null){this.docX=B.pageX;
this.docY=B.pageY
}else{if(B.clientX!=null){this.docX=B.clientX+document.body.scrollLeft-document.body.clientLeft;
this.docY=B.clientY+document.body.scrollTop-document.body.clientTop;
if(document.body.parentElement){var A=document.body.parentElement;
this.docX+=A.scrollLeft-A.clientLeft;
this.docY+=A.scrollTop-A.clientTop
}}}if(B.offsetX!=null){this.elementX=B.offsetX;
this.elementY=B.offsetY
}else{if(B.layerX!=null){this.elementX=B.layerX;
this.elementY=B.layerY
}else{this.elementX=Dwt.DEFAULT;
this.elementY=Dwt.DEFAULT
}}this.ersatz=false;
return B
};
DwtUiEvent.prototype.setToDhtmlEvent=function(A){DwtUiEvent.setBehaviour(A,this._stopPropagation,this._returnValue,this._dontCallPreventDefault)
};
DwtUiEvent.setBehaviour=function(E,A,B,C){var D=DwtUiEvent.getEvent(E);
DwtUiEvent.setDhtmlBehaviour(D,A,B,C)
};
DwtUiEvent.setDhtmlBehaviour=function(D,A,B,C){D=D||window.event;
if(D.stopPropagation!=null){if(A){D.stopPropagation()
}if(!B&&!C){D.preventDefault()
}}else{D.returnValue=B;
D.cancelBubble=A
}};
DwtUiEvent.getDwtObjFromEvent=function(A,C){var B=DwtUiEvent.getTargetWithProp(A,"dwtObj",C);
return B?Dwt.getObjectFromElement(B):null
};
DwtUiEvent.getDwtObjWithProp=function(A,C){var B=DwtUiEvent.getTargetWithProps(A,["dwtObj",C]);
return B?Dwt.getObjectFromElement(B):null
}
}if(AjxPackage.define("ajax.dwt.events.DwtControlEvent")){DwtControlEvent=function(){this.reset()
};
DwtControlEvent.prototype=new DwtEvent;
DwtControlEvent.prototype.constructor=DwtControlEvent;
DwtControlEvent.RESIZE=1;
DwtControlEvent.MOVE=2;
DwtControlEvent.prototype.toString=function(){return"DwtControlEvent"
};
DwtControlEvent.prototype.reset=function(A){this.oldX=Dwt.DEFAULT;
this.oldY=Dwt.DEFAULT;
this.oldWidth=Dwt.DEFAULT;
this.oldHeight=Dwt.DEFAULT;
this.newX=Dwt.DEFAULT;
this.newY=Dwt.DEFAULT;
this.newWidth=Dwt.DEFAULT;
this.newHeight=Dwt.DEFAULT;
this.type=A||null
}
}if(AjxPackage.define("ajax.dwt.events.DwtFocusEvent")){DwtFocusEvent=function(A){if(arguments.length==0){return 
}DwtEvent.call(this,true);
this.reset()
};
DwtFocusEvent.prototype=new DwtEvent;
DwtFocusEvent.prototype.constructor=DwtFocusEvent;
DwtFocusEvent.FOCUS=1;
DwtFocusEvent.BLUR=2;
DwtFocusEvent.prototype.toString=function(){return"DwtFocusEvent"
};
DwtFocusEvent.prototype.reset=function(){this.dwtObj=null;
this.state=DwtFocusEvent.FOCUS
}
}if(AjxPackage.define("ajax.dwt.events.DwtKeyEvent")){DwtKeyEvent=function(){DwtUiEvent.call(this,true);
this.reset(true)
};
DwtKeyEvent.KEY_END_OF_TEXT=3;
DwtKeyEvent.KEY_TAB=9;
DwtKeyEvent.KEY_RETURN=13;
DwtKeyEvent.KEY_ENTER=13;
DwtKeyEvent.KEY_ESCAPE=27;
DwtKeyEvent.prototype=new DwtUiEvent;
DwtKeyEvent.prototype.constructor=DwtKeyEvent;
DwtKeyEvent.prototype.toString=function(){return"DwtKeyEvent"
};
DwtKeyEvent.isKeyEvent=function(A){return(A.type.search(/^key/i)!=-1)
};
DwtKeyEvent.isKeyPressEvent=function(A){return(AjxEnv.isIE&&A.type=="keydown")||(A.type=="keypress")
};
DwtKeyEvent.prototype.reset=function(A){if(!A){DwtUiEvent.prototype.reset.call(this)
}this.keyCode=0;
this.charCode=0
};
DwtKeyEvent.prototype.isCommand=function(A){return AjxEnv.isMac&&this.metaKey||this.ctrlKey
};
DwtKeyEvent.prototype.setFromDhtmlEvent=function(A,B){A=DwtUiEvent.prototype.setFromDhtmlEvent.apply(this,arguments);
this.charCode=A.charCode||A.keyCode;
this.keyCode=A.keyCode
};
DwtKeyEvent.getCharCode=function(A){A=DwtUiEvent.getEvent(A);
return AjxEnv.isSafari?A.keyCode:(A.charCode||A.keyCode)
};
DwtKeyEvent.copy=function(A,B){DwtUiEvent.copy(A,B);
A.charCode=B.charCode;
A.keyCode=B.keyCode
}
}if(AjxPackage.define("ajax.dwt.events.DwtMouseEvent")){DwtMouseEvent=function(){DwtUiEvent.call(this,true);
this.reset(true)
};
DwtMouseEvent.prototype=new DwtUiEvent;
DwtMouseEvent.prototype.constructor=DwtMouseEvent;
DwtMouseEvent.prototype.toString=function(){return"DwtMouseEvent"
};
DwtMouseEvent.NONE=0;
DwtMouseEvent.LEFT=1;
DwtMouseEvent.MIDDLE=2;
DwtMouseEvent.RIGHT=3;
DwtMouseEvent.prototype.reset=function(A){if(!A){DwtUiEvent.prototype.reset.call(this)
}this.button=0;
this._populated=false
};
DwtMouseEvent.prototype.setFromDhtmlEvent=function(A,B){A=DwtUiEvent.prototype.setFromDhtmlEvent.apply(this,arguments);
if(A.layerX!=null){switch(A.which){case 1:this.button=DwtMouseEvent.LEFT;
break;
case 2:this.button=DwtMouseEvent.MIDDLE;
break;
case 3:this.button=DwtMouseEvent.RIGHT;
break;
default:this.button=DwtMouseEvent.NONE
}}else{if(A.offsetX!=null){if((A.button&1)!=0){this.button=DwtMouseEvent.LEFT
}else{if((A.button&2)!=0){this.button=DwtMouseEvent.RIGHT
}else{if((A.button&4)!=0){this.button=DwtMouseEvent.MIDDLE
}else{this.button=DwtMouseEvent.NONE
}}}}}if(AjxEnv.isMac){if(this.ctrlKey&&this.button==DwtMouseEvent.LEFT){this.button=DwtMouseEvent.RIGHT;
this.ctrlKey=false
}if(this.altKey){this.ctrlKey=true;
this.altKey=false
}}}
}if(AjxPackage.define("ajax.dwt.events.DwtMouseEventCapture")){DwtMouseEventCapture=function(A){A=Dwt.getParams(arguments,DwtMouseEventCapture.PARAMS);
this.targetObj=A.targetObj;
this._id=A.id;
this._mouseOverHdlr=A.mouseOverHdlr||DwtMouseEventCapture.emptyHdlr;
this._mouseDownHdlr=A.mouseDownHdlr||DwtMouseEventCapture.emptyHdlr;
this._mouseMoveHdlr=A.mouseMoveHdlr||DwtMouseEventCapture.emptyHdlr;
this._mouseUpHdlr=A.mouseUpHdlr||DwtMouseEventCapture.emptyHdlr;
this._mouseOutHdlr=A.mouseOutHdlr||DwtMouseEventCapture.emptyHdlr;
this._mouseWheelHdlr=A.mouseWheelHdlr||DwtMouseEventCapture.emptyHdlr;
this._hardCapture=(A.hardCapture!==false)
};
DwtMouseEventCapture.PARAMS=["targetObj","id","mouseOverHdlr","mouseDownHdlr","mouseMoveHdlr","mouseUpHdlr","mouseOutHdlr","mouseWheelHdlr","hardCapture"];
DwtMouseEventCapture._capturing=false;
DwtMouseEventCapture.getCaptureObj=function(){return window._mouseEventCaptureObj
};
DwtMouseEventCapture.getTargetObj=function(){return window._mouseEventCaptureObj?window._mouseEventCaptureObj.targetObj:null
};
DwtMouseEventCapture.getId=function(){return window._mouseEventCaptureObj?window._mouseEventCaptureObj._id:null
};
DwtMouseEventCapture.prototype.toString=function(){return"DwtMouseEventCapture"
};
DwtMouseEventCapture.prototype.capturing=function(){return DwtMouseEventCapture._capturing
};
DwtMouseEventCapture.prototype.capture=function(){if(window._mouseEventCaptureObj){window._mouseEventCaptureObj.release()
}if(document.body!=null&&document.body.addEventListener!=null){document.body.addEventListener("mouseover",this._mouseOverHdlr,true);
document.body.addEventListener("mousedown",this._mouseDownHdlr,true);
document.body.addEventListener("mousemove",this._mouseMoveHdlr,true);
document.body.addEventListener("mouseup",this._mouseUpHdlr,true);
document.body.addEventListener("mouseout",this._mouseOutHdlr,true);
document.body.addEventListener("DOMMouseScroll",this._mouseWheelHdlr,true)
}else{this._savedMouseOverHdlr=document.onmouseover;
this._savedMouseDownHdlr=document.onmousedown;
this._savedMouseMoveHdlr=document.onmousemove;
this._savedMouseUpHdlr=document.onmouseup;
this._savedMouseOutHdlr=document.onmouseout;
this._savedMouseWheelHdlr=document.onmousewheel;
document.onmouseover=this._mouseOverHdlr;
document.onmousedown=this._mouseDownHdlr;
document.onmousemove=this._mouseMoveHdlr;
document.onmouseup=this._mouseUpHdlr;
document.onmouseout=this._mouseOutHdlr;
document.onmousewheel=this._mouseWheelHdlr
}if(this._hardCapture&&document.body&&document.body.setCapture){document.body.setCapture()
}window._mouseEventCaptureObj=this;
DwtMouseEventCapture._capturing=true
};
DwtMouseEventCapture.prototype.release=function(){if(window._mouseEventCaptureObj==null){return 
}var A=window._shellCaptureObj;
if(document.body&&document.body.addEventListener){document.body.removeEventListener("mouseover",this._mouseOverHdlr,true);
document.body.removeEventListener("mousedown",this._mouseDownHdlr,true);
document.body.removeEventListener("mousemove",this._mouseMoveHdlr,true);
document.body.removeEventListener("mouseup",this._mouseUpHdlr,true);
document.body.removeEventListener("mouseout",this._mouseOutHdlr,true);
document.body.removeEventListener("DOMMouseScroll",this._mouseWheelHdlr,true)
}else{document.onmouseover=this._savedMouseOverHdlr;
document.onmousedown=this._savedMouseDownHdlr;
document.onmousemove=this._savedMouseMoveHdlr;
document.onmouseup=this._savedMouseUpHdlr;
document.onmouseout=this._savedMouseOutHdlr;
document.onmousewheel=this._savedMouseWheelHdlr
}if(this._hardCapture&&document.body&&document.body.releaseCapture){document.body.releaseCapture()
}window._mouseEventCaptureObj=null;
DwtMouseEventCapture._capturing=false
};
DwtMouseEventCapture.emptyHdlr=function(B){var C=DwtMouseEventCapture.getCaptureObj();
var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
if(C._hardCapture){A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
}else{A._stopPropagation=false;
A._returnValue=true;
A.setToDhtmlEvent(B);
return true
}}
}if(AjxPackage.define("ajax.dwt.events.DwtListViewActionEvent")){DwtListViewActionEvent=function(){DwtMouseEvent.call(this);
this.reset(true)
};
DwtListViewActionEvent.prototype=new DwtMouseEvent;
DwtListViewActionEvent.prototype.constructor=DwtListViewActionEvent;
DwtListViewActionEvent.prototype.toString=function(){return"DwtListViewActionEvent"
};
DwtListViewActionEvent.prototype.reset=function(A){if(!A){DwtMouseEvent.prototype.reset.call(this)
}this.field=null;
this.item=null;
this.detail=null
}
}if(AjxPackage.define("ajax.dwt.events.DwtSelectionEvent")){DwtSelectionEvent=function(A){if(arguments.length==0){return 
}DwtUiEvent.call(this,true);
this.reset(true)
};
DwtSelectionEvent.prototype=new DwtUiEvent;
DwtSelectionEvent.prototype.constructor=DwtSelectionEvent;
DwtSelectionEvent.prototype.toString=function(){return"DwtSelectionEvent"
};
DwtSelectionEvent.prototype.reset=function(A){if(!A){DwtUiEvent.prototype.reset.call(this)
}this.button=0;
this.detail=null;
this.item=null
}
}if(AjxPackage.define("ajax.dwt.events.DwtHtmlEditorStateEvent")){DwtHtmlEditorStateEvent=function(A){if(arguments.length==0){return 
}DwtEvent.call(this,true);
this.reset()
};
DwtHtmlEditorStateEvent.prototype=new DwtEvent;
DwtHtmlEditorStateEvent.prototype.constructor=DwtHtmlEditorStateEvent;
DwtHtmlEditorStateEvent.prototype.toString=function(){return"DwtHtmlEditorStateEvent"
};
DwtHtmlEditorStateEvent.prototype.reset=function(){this.isBold=null;
this.isItalic=null;
this.isUnderline=null;
this.isStrikeThru=null;
this.isSuperscript=null;
this.isSubscript=null;
this.isOrderedList=null;
this.isNumberedList=null;
this.fontName=null;
this.fontSize=null;
this.style=null;
this.backgroundColor=null;
this.color=null;
this.justification=null;
this.direction=null
}
}if(AjxPackage.define("ajax.dwt.events.DwtTreeEvent")){DwtTreeEvent=function(){DwtSelectionEvent.call(this,true)
};
DwtTreeEvent.prototype=new DwtSelectionEvent;
DwtTreeEvent.prototype.constructor=DwtTreeEvent;
DwtTreeEvent.prototype.toString=function(){return"DwtTreeEvent"
};
DwtTreeEvent.prototype.setFromDhtmlEvent=function(A,B){A=DwtSelectionEvent.prototype.setFromDhtmlEvent.apply(this,arguments)
}
}if(AjxPackage.define("ajax.dwt.events.DwtHoverEvent")){DwtHoverEvent=function(D,C,B,A,E){if(arguments.length==0){return 
}DwtEvent.call(this,true);
this.type=D;
this.delay=C;
this.object=B;
this.x=A||-1;
this.y=E||-1
};
DwtHoverEvent.prototype=new DwtEvent;
DwtHoverEvent.prototype.constructor=DwtHoverEvent;
DwtHoverEvent.prototype.reset=function(){this.type=0;
this.delay=0;
this.object=null;
this.x=-1;
this.y=-1
}
}if(AjxPackage.define("ajax.dwt.keyboard.DwtTabGroupEvent")){DwtTabGroupEvent=function(){this.tabGroup=null;
this.newFocusMember=null
};
DwtTabGroupEvent.prototype.toString=function(){return"DwtTabGroupEvent"
};
DwtTabGroupEvent.prototype.reset=function(){this.tabGroup=null;
this.newFocusMember=null
}
}if(AjxPackage.define("ajax.dwt.keyboard.DwtKeyMap")){DwtKeyMap=function(A){if(A){return 
}this._map={};
this._args={};
this._checkedMap={};
this._load(this._map,AjxKeys,DwtKeyMap.MAP_NAME);
DwtKeyMap.MOD_ORDER[DwtKeyMap.ALT]=1;
DwtKeyMap.MOD_ORDER[DwtKeyMap.CTRL]=2;
DwtKeyMap.MOD_ORDER[DwtKeyMap.META]=3;
DwtKeyMap.MOD_ORDER[DwtKeyMap.SHIFT]=4
};
DwtKeyMap.deserialize=function(A){alert("DwtKeyMap.deserialize: NOT IMPLEMENTED")
};
DwtKeyMap.serialize=function(A){alert("DwtKeyMap.serialize: NOT IMPLEMENTED")
};
DwtKeyMap.MAP_NAME={};
DwtKeyMap.MAP_NAME.dialog="DwtDialog";
DwtKeyMap.MAP_NAME.button="DwtButton";
DwtKeyMap.MAP_NAME.list="DwtListView";
DwtKeyMap.MAP_NAME.menu="DwtMenu";
DwtKeyMap.MAP_NAME.editor="DwtHtmlEditor";
DwtKeyMap.MAP_NAME.toolbar="DwtToolBar";
DwtKeyMap.MAP_NAME.toolbarHorizontal="DwtToolBar-horiz";
DwtKeyMap.MAP_NAME.toolbarVertical="DwtToolBar-vert";
DwtKeyMap.MAP_NAME.tabView="DwtTabView";
DwtKeyMap.IS_MODIFIER={};
DwtKeyMap.MOD_ORDER={};
DwtKeyMap.ARROW_DOWN="ArrowDown";
DwtKeyMap.ARROW_LEFT="ArrowLeft";
DwtKeyMap.ARROW_RIGHT="ArrowRight";
DwtKeyMap.ARROW_UP="ArrowUp";
DwtKeyMap.BACKSLASH="Backslash";
DwtKeyMap.BACKSPACE="Backspace";
DwtKeyMap.COMMA="Comma";
DwtKeyMap.SEMICOLON="Semicolon";
DwtKeyMap.DELETE="Del";
DwtKeyMap.END="End";
DwtKeyMap.ENTER="Enter";
DwtKeyMap.ESC="Esc";
DwtKeyMap.HOME="Home";
DwtKeyMap.PAGE_DOWN="PgDown";
DwtKeyMap.PAGE_UP="PgUp";
DwtKeyMap.SPACE="Space";
DwtKeyMap.TAB="Tab";
DwtKeyMap.ACTION="ContextMenu";
DwtKeyMap.SELECT_CURRENT="SelectCurrent";
DwtKeyMap.ADD_SELECT_NEXT="AddNext";
DwtKeyMap.ADD_SELECT_PREV="AddPrevious";
DwtKeyMap.CANCEL="Cancel";
DwtKeyMap.DBLCLICK="DoubleClick";
DwtKeyMap.GOTO_TAB="GoToTab";
DwtKeyMap.HEADER1="Header1";
DwtKeyMap.HEADER2="Header2";
DwtKeyMap.HEADER3="Header3";
DwtKeyMap.HEADER4="Header4";
DwtKeyMap.HEADER5="Header5";
DwtKeyMap.HEADER6="Header6";
DwtKeyMap.JUSTIFY_CENTER="CenterJustify";
DwtKeyMap.JUSTIFY_FULL="FullJustify";
DwtKeyMap.JUSTIFY_LEFT="LeftJustify";
DwtKeyMap.JUSTIFY_RIGHT="RightJustify";
DwtKeyMap.NEXT="Next";
DwtKeyMap.NEXT_TAB="NextTab";
DwtKeyMap.PARENTMENU="ParentMenu";
DwtKeyMap.PREV="Previous";
DwtKeyMap.PREV_TAB="PreviousTab";
DwtKeyMap.SELECT_ALL="SelectAll";
DwtKeyMap.SELECT="Select";
DwtKeyMap.SELECT_FIRST="SelectFirst";
DwtKeyMap.SELECT_LAST="SelectLast";
DwtKeyMap.SELECT_NEXT="SelectNext";
DwtKeyMap.SELECT_PREV="SelectPrevious";
DwtKeyMap.SUBMENU="SubMenu";
DwtKeyMap.SWITCH_MODE="SwitchMode";
DwtKeyMap.TEXT_BOLD="Bold";
DwtKeyMap.TEXT_ITALIC="Italic";
DwtKeyMap.TEXT_UNDERLINE="Underline";
DwtKeyMap.TEXT_STRIKETHRU="Strikethru";
DwtKeyMap.GOTO_TAB_RE=new RegExp(DwtKeyMap.GOTO_TAB+"(\\d+)");
DwtKeyMap.JOIN="+";
DwtKeyMap.SEP=",";
DwtKeyMap.INHERIT="INHERIT";
DwtKeyMap.prototype.getMap=function(){return this._map
};
DwtKeyMap.prototype._load=function(R,H,L){var N=AjxEnv.platform.toLowerCase();
for(var G in H){var K=G.split(".");
var F=K[K.length-1];
if(F=="win"||F=="mac"||F=="linux"){if(F==N){var P=K.slice(0,K.length-1).join(".");
H[P]=H[G]
}H[G]=null
}}for(var G in H){var E=AjxStringUtil.trim(H[G]);
if(!E||(typeof H[G]!="string")){continue
}var K=G.split(".");
var A=K[K.length-1];
var C=(K.length==2);
var M=C?null:K[1];
if(K[0]=="keys"){this._processKeyDef(M,A,E);
continue
}if(A!=DwtKeyMap.INHERIT&&A!="keycode"){continue
}var J=L[K[0]];
if((this._checkedMap[J]===false)||(!this._checkedMap[J]&&!this._checkMap(J))){continue
}if(!R[J]){R[J]={}
}if(!this._checkAction(J,M)){continue
}var D=E.split(/\s*;\s*/);
for(var O=0;
O<D.length;
O++){var S=this._canonicalize(D[O]);
if(A==DwtKeyMap.INHERIT){var Q=S.toLowerCase().split(/\s*,\s*/);
var B=[];
for(var I=0;
I<Q.length;
I++){B[I]=L[Q[I]]
}R[J][K[1]]=B.join(",")
}else{if(A=="keycode"){R[J][S]=M
}}}}};
DwtKeyMap.prototype._checkMap=function(B){var A=true;
this._checkedMap[B]=A;
return A
};
DwtKeyMap.prototype._checkAction=function(A,B){return true
};
DwtKeyMap.prototype._processKeyDef=function(A,C,B){if(!A||!C||!B){return 
}if(C=="display"){DwtKeyMap[A.toUpperCase()]=B
}else{if(C=="keycode"){DwtKeyMap.IS_MODIFIER[B]=true
}}};
DwtKeyMap.prototype._canonicalize=function(G){var E=G.split(DwtKeyMap.SEP);
var A=[];
for(var C=0;
C<E.length;
C++){var B=E[C];
var F=B.split(DwtKeyMap.JOIN);
if(F.length>2){var D=F.slice(0,F.length-1);
D.sort(function(K,I){var J=DwtKeyMap.MOD_ORDER[K]||0;
var H=DwtKeyMap.MOD_ORDER[I]||0;
return Number(J-H)
});
D.push(F[F.length-1]);
A.push(D.join(DwtKeyMap.JOIN))
}else{A.push(B)
}}return A.join(",")
}
}if(AjxPackage.define("ajax.dwt.keyboard.DwtKeyMapMgr")){DwtKeyMapMgr=function(C){var B=this._map=C.getMap();
this._args=C._args;
this._fsas={};
for(var A in B){this._fsas[A]=DwtKeyMapMgr.__buildFSA({},B[A],A)
}};
DwtKeyMapMgr.NOT_A_TERMINAL=-999;
DwtKeyMapMgr.TAB_KEYCODE=9;
DwtKeyMapMgr.prototype.toString=function(){return"DwtKeyMapMgr"
};
DwtKeyMapMgr.prototype.getActionCode=function(C,G,H){var A=this._fsas[G];
if(!A){return null
}var F=C.length;
var J=A;
var I;
for(var B=0;
B<F&&J;
B++){I=C[B];
if(!J||!J[I]){break
}if(B<F-1){J=J[I].subMap
}}if(J&&J[I]){var E=J[I];
if(!E.subMap||H){var D=this.__getInheritedActionCode(C,A,H);
return D==DwtKeyMapMgr.NOT_A_TERMINAL?DwtKeyMapMgr.NOT_A_TERMINAL:(E.actionCode||D)
}else{return DwtKeyMapMgr.NOT_A_TERMINAL
}}else{return this.__getInheritedActionCode(C,A,H)
}};
DwtKeyMapMgr.prototype.getAction=function(B,A){return this._map[B][A]
};
DwtKeyMapMgr.prototype.getKeySequences=function(B,C){var A=[];
for(var D in this._map[B]){if(this._map[B][D]==C){A.push(D)
}}return A
};
DwtKeyMapMgr.prototype.setMapping=function(B,A,C){this._map[B][A]=C
};
DwtKeyMapMgr.prototype.removeMapping=function(B,A){delete this._map[B][A]
};
DwtKeyMapMgr.prototype.replaceMapping=function(C,A,B){var D=this._map[C][A];
if(!D){return 
}this.removeMapping(C,A);
this.setMapping(C,B,D)
};
DwtKeyMapMgr.prototype.setArg=function(B,C,A){if(!this._args[B]){this._args[B]={}
}this._args[B][C]=A
};
DwtKeyMapMgr.prototype.removeArg=function(A,B){delete this._args[A][B]
};
DwtKeyMapMgr.prototype.getArg=function(A,B){return this._args[A]?this._args[A][B]:null
};
DwtKeyMapMgr.prototype.reloadMap=function(A){this._fsas[A]=DwtKeyMapMgr.__buildFSA({},this._map[A],A)
};
DwtKeyMapMgr.isInputElement=function(C){if(!C){return false
}var B=C.ownerDocument?C.ownerDocument.designMode:null;
if(B&&(B.toLowerCase()=="on")){return true
}var A=C.tagName.toUpperCase();
return(A=="INPUT"||A=="TEXTAREA")
};
DwtKeyMapMgr.__buildFSA=function(I,A,E){for(var C in A){if(C==DwtKeyMap.INHERIT){I.inherit=A[C].split(/\s*,\s*/);
continue
}var D=C.split(DwtKeyMap.SEP);
var F=D.length;
var H=I;
for(var B=0;
B<F;
B++){var G=D[B];
if(!H[G]){H[G]={}
}if(B==F-1){H[G].actionCode=A[C]
}else{if(!H[G].subMap){H[G].subMap={}
}H=H[G].subMap
}}}return I
};
DwtKeyMapMgr.prototype.__getInheritedActionCode=function(F,B,E){if(B.inherit&&B.inherit.length){var D=null;
var A=B.inherit.length;
for(var C=0;
C<A;
C++){D=this.getActionCode(F,B.inherit[C],E);
if(D!=null){return D
}}}return null
};
DwtKeyMapMgr.hasModifier=function(A){return(A.altKey||A.ctrlKey||A.metaKey)
}
}if(AjxPackage.define("ajax.dwt.keyboard.DwtKeyboardMgr")){DwtKeyboardMgr=function(A){DwtKeyboardMgr.__shell=A;
this.__tabGrpStack=[];
this.__defaultHandlerStack=[];
this.__tabGroupChangeListenerObj=new AjxListener(this,this.__tabGrpChangeListener);
this.__kbEventStatus=DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED;
this.__keyTimeout=750;
this.__currTabGroup=null;
this.__currDefaultHandler=null
};
DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED=1;
DwtKeyboardMgr.__KEYSEQ_HANDLED=2;
DwtKeyboardMgr.__KEYSEQ_PENDING=3;
DwtKeyboardMgr.FOCUS_FIELD_ID="kbff";
DwtKeyboardMgr.isPossibleInputShortcut=function(A){var B=DwtUiEvent.getTarget(A);
return(!DwtKeyMap.IS_MODIFIER[A.keyCode]&&(A.keyCode==27||DwtKeyMapMgr.hasModifier(A))||(B&&B.nodeName.toUpperCase()=="INPUT"&&(A.keyCode==13||A.keyCode==3)))
};
DwtKeyboardMgr.prototype.toString=function(){return"DwtKeyboardMgr"
};
DwtKeyboardMgr.prototype.pushTabGroup=function(B){if(!this.__keyboardHandlingInited||!B){return 
}this.__tabGrpStack.push(B);
this.__currTabGroup=B;
var A=B.getFocusMember();
if(!A){A=B.resetFocusMember(true)
}if(!A){return 
}B.addFocusChangeListener(this.__tabGroupChangeListenerObj);
this.grabFocus(A)
};
DwtKeyboardMgr.prototype.popTabGroup=function(F){if(!this.__keyboardHandlingInited){return 
}if(!F){return 
}if(this.__tabGrpStack.length<=1){return null
}if(F&&this.__tabGrpStack[this.__tabGrpStack.length-1]!=F){var B=this.__tabGrpStack;
var A=B.length;
for(var E=A-1;
E>=0;
E--){if(F==B[E]){B[E].dump();
break
}}if(E<0){return null
}else{if(E!=A-1){B.splice(E,1);
return F
}}}var F=this.__tabGrpStack.pop();
F.removeFocusChangeListener(this.__tabGroupChangeListenerObj);
var D=null;
if(this.__tabGrpStack.length>0){D=this.__tabGrpStack[this.__tabGrpStack.length-1];
var C=D.getFocusMember();
if(!C){C=D.resetFocusMember(true)
}if(C){this.grabFocus(C)
}}this.__currTabGroup=D;
return F
};
DwtKeyboardMgr.prototype.setTabGroup=function(B){if(!this.__enabled||!this.__keyboardHandlingInited){return 
}var A=this.popTabGroup();
this.pushTabGroup(B);
return A
};
DwtKeyboardMgr.prototype.pushDefaultHandler=function(A){if(!this.__enabled||!this.__keyboardHandlingInited||!A){return 
}this.__defaultHandlerStack.push(A);
this.__currDefaultHandler=A
};
DwtKeyboardMgr.prototype.popDefaultHandler=function(){if(!this.__keyboardHandlingInited||(this.__defaultHandlerStack.length<=1)){return 
}var A=this.__defaultHandlerStack.pop();
this.__currDefaultHandler=this.__defaultHandlerStack[this.__defaultHandlerStack.length-1];
return A
};
DwtKeyboardMgr.prototype.grabFocus=function(A){if(!this.__enabled){return 
}if(!this.__keyboardHandlingInited){return 
}if(!A){return 
}if(this.__currTabGroup){this.__currTabGroup.setFocusMember(A,false,true)
}this.__doGrabFocus(A)
};
DwtKeyboardMgr.prototype.getFocusObj=function(A){return this.__focusObj
};
DwtKeyboardMgr.prototype.dwtControlHasFocus=function(A){if(!this.__enabled){return false
}if(!this.__keyboardHandlingInited){return false
}return(this.__dwtCtrlHasFocus&&this.__focusObj==A)
};
DwtKeyboardMgr.prototype.registerDefaultKeyActionHandler=function(A){if(!this.__enabled){return 
}this.__defaultKeyActionHdlr=A
};
DwtKeyboardMgr.prototype.registerKeyMap=function(A){if(!this.__checkStatus()){return 
}this.__keyMapMgr=new DwtKeyMapMgr(A)
};
DwtKeyboardMgr.prototype.setKeyTimeout=function(A){this.__keyTimeout=A
};
DwtKeyboardMgr.prototype.enable=function(A){this.__enabled=A;
if(A){this.__checkStatus();
Dwt.setHandler(document,DwtEvent.ONKEYDOWN,DwtKeyboardMgr.__keyDownHdlr);
Dwt.setHandler(document,DwtEvent.ONKEYUP,DwtKeyboardMgr.__keyUpHdlr);
Dwt.setHandler(document,DwtEvent.ONKEYPRESS,DwtKeyboardMgr.__keyPressHdlr)
}else{Dwt.clearHandler(document,DwtEvent.ONKEYDOWN);
Dwt.clearHandler(document,DwtEvent.ONKEYUP);
Dwt.clearHandler(document,DwtEvent.ONKEYPRESS)
}};
DwtKeyboardMgr.prototype.isEnabled=function(){return this.__enabled
};
DwtKeyboardMgr.prototype.__initKeyboardHandling=function(){var A=this._kbFocusField=document.createElement("input");
A.id=DwtKeyboardMgr.FOCUS_FIELD_ID;
A.type="text";
A.tabIndex=0;
A.style.position=Dwt.ABSOLUTE_STYLE;
A.style.top=A.style.left=Dwt.LOC_NOWHERE;
A.onblur=DwtKeyboardMgr.__onBlurHdlr;
A.onfocus=DwtKeyboardMgr.__onFocusHdlr;
document.body.appendChild(A);
this.__killKeySeqTimedAction=new AjxTimedAction(this,this.__killKeySequenceAction);
this.__killKeySeqTimedActionId=-1;
this.__keySequence=[];
this.__keyboardHandlingInited=true
};
DwtKeyboardMgr.prototype.__checkStatus=function(){if(!this.__enabled){return false
}if(!this.__keyboardHandlingInited){this.__initKeyboardHandling()
}return true
};
DwtKeyboardMgr.prototype.__doGrabFocus=function(A){if(!A){return 
}var D=(Dwt.instanceOf(A,"DwtInputField")||Dwt.instanceOf(A,"DwtHtmlEditor")||Dwt.instanceOf(A,"DwtCheckbox")||Dwt.instanceOf(A,"DwtRadioButton"));
if(D||!(A instanceof DwtControl)){if(this.__focusObj instanceof DwtControl&&!this.__dwtInputCtrl){this.__oldFocusObj=this.__focusObj
}this.__focusObj=A;
this.__dwtInputCtrl=D;
var C=D?A.getInputElement():A;
if((!AjxEnv.isIE&&A.focus)||(AjxEnv.isIE&&A.focus&&!C.disabled&&Dwt.getVisible(C))){try{A.focus()
}catch(B){}}}else{if(this.__dwtCtrlHasFocus&&(this.__focusObj instanceof DwtControl)){DwtKeyboardMgr.__onBlurHdlr();
this.__dwtCtrlHasFocus=true
}this.__focusObj=A;
this.__dwtInputCtrl=false;
if(this.__dwtCtrlHasFocus){DwtKeyboardMgr.__onFocusHdlr()
}else{this._kbFocusField.focus()
}}};
DwtKeyboardMgr.__onFocusHdlr=function(B){var C=DwtKeyboardMgr.__shell.getKeyboardMgr();
C.__dwtCtrlHasFocus=true;
var A=C.__focusObj;
if(A&&A.__doFocus&&(typeof A.__doFocus=="function")){A.__doFocus()
}};
DwtKeyboardMgr.__onBlurHdlr=function(B){var C=DwtKeyboardMgr.__shell.getKeyboardMgr();
var A=C.__oldFocusObj?C.__oldFocusObj:C.__focusObj;
if(A&&A.__doBlur&&(typeof A.__doBlur=="function")){A.__doBlur()
}C.__oldFocusObj=null;
C.__dwtCtrlHasFocus=false
};
DwtKeyboardMgr.__keyUpHdlr=function(A){if(DwtKeyboardMgr.__shell._blockInput){return false
}A=DwtUiEvent.getEvent(A,this);
var C=DwtKeyboardMgr.__shell.getKeyboardMgr();
var B=DwtShell.keyEvent;
B.setFromDhtmlEvent(A);
if(C.__kbEventStatus!=DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED){return C.__processKeyEvent(A,B,false)
}};
DwtKeyboardMgr.__keyPressHdlr=function(A){if(DwtKeyboardMgr.__shell._blockInput){return false
}A=DwtUiEvent.getEvent(A,this);
return DwtKeyboardMgr.__keyUpHdlr(A)
};
DwtKeyboardMgr.__syncFocus=function(B,A){if((A!=B._kbFocusField)&&B.__dwtCtrlHasFocus){DwtKeyboardMgr.__onBlurHdlr()
}if(!B.__dwtCtrlHasFocus){if((A!=B.__focusObj)&&!B.__dwtInputCtrl){if(B.__currTabGroup&&B.__currTabGroup.setFocusMember(A)){B.__focusObj=A;
B.__oldFocusObj=null
}else{return false
}}}return true
};
DwtKeyboardMgr.__keyDownHdlr=function(A){if(DwtKeyboardMgr.__shell._blockInput){return false
}A=DwtUiEvent.getEvent(A,this);
var H=DwtKeyboardMgr.__shell.getKeyboardMgr();
if(!H||!H.__checkStatus()){return false
}var B=DwtShell.keyEvent;
B.setFromDhtmlEvent(A);
var F=B.keyCode;
DwtKeyboardMgr.__shell.getToolTip().popdown();
var G=DwtKeyboardMgr.__syncFocus(H,B.target);
if(!G){}if(F==DwtKeyMapMgr.TAB_KEYCODE){if(H.__currTabGroup&&!DwtKeyMapMgr.hasModifier(B)){if(!DwtMenu.menuShowing()){if(G||H.__currTabGroup.getFocusMember()){if(!B.shiftKey){H.__currTabGroup.getNextFocusMember(true)
}else{H.__currTabGroup.getPrevFocusMember(true)
}}else{H.__currTabGroup.resetFocusMember(true)
}}return H.__processKeyEvent(A,B,false,DwtKeyboardMgr.__KEYSEQ_HANDLED)
}else{return H.__processKeyEvent(A,B,true,DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED)
}}else{if(H.__currTabGroup&&!G&&AjxEnv.isGecko&&B.target instanceof HTMLHtmlElement){H.__currTabGroup.resetFocusMember(true)
}}if(H.__dwtCtrlHasFocus){H._kbFocusField.value=""
}if(DwtKeyMap.IS_MODIFIER[F]||(!H.__dwtCtrlHasFocus&&(H.__killKeySeqTimedActionId==-1)&&DwtKeyMapMgr.isInputElement(B.target)&&!DwtKeyboardMgr.isPossibleInputShortcut(B))){return H.__processKeyEvent(A,B,true,DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED)
}if(H.__killKeySeqTimedActionId!=-1){AjxTimedAction.cancelAction(H.__killKeySeqTimedActionId);
H.__killKeySeqTimedActionId=-1
}var E=[];
if(B.altKey){E.push(DwtKeyMap.ALT)
}if(B.ctrlKey){E.push(DwtKeyMap.CTRL)
}if(B.metaKey){E.push(DwtKeyMap.META)
}if(B.shiftKey){E.push(DwtKeyMap.SHIFT)
}E.push(F);
H.__keySequence[H.__keySequence.length]=E.join(DwtKeyMap.JOIN);
var D=DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED;
var C=H.__focusObj;
if(C&&(C.handleKeyAction)&&(H.__dwtCtrlHasFocus||H.__dwtInputCtrl||(C.hasFocus&&C.hasFocus()))){D=H.__dispatchKeyEvent(C,B);
while((D==DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED)&&C.parent&&C.parent.getKeyMapName){C=C.parent;
D=H.__dispatchKeyEvent(C,B)
}}if((D==DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED)&&H.__currDefaultHandler&&!(H.__currTabGroup&&H.__currTabGroup.isDefaultHandlingBlocked())){D=H.__dispatchKeyEvent(H.__currDefaultHandler,B)
}H.__kbEventStatus=D;
switch(D){case DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED:H.__keySequence.length=0;
return H.__processKeyEvent(A,B,true);
case DwtKeyboardMgr.__KEYSEQ_HANDLED:H.__keySequence.length=0;
case DwtKeyboardMgr.__KEYSEQ_PENDING:return H.__processKeyEvent(A,B,false)
}};
DwtKeyboardMgr.prototype.__dispatchKeyEvent=function(D,E,B){var C=(D&&D.getKeyMapName)?D.getKeyMapName():null;
if(!C){return DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED
}var A=this.__keyMapMgr.getActionCode(this.__keySequence,C,B);
if(A==DwtKeyMapMgr.NOT_A_TERMINAL){this.__hdlr=D;
this.__mapName=C;
this.__ev=E;
this.__killKeySeqTimedActionId=AjxTimedAction.scheduleAction(this.__killKeySeqTimedAction,this.__keyTimeout);
return DwtKeyboardMgr.__KEYSEQ_PENDING
}else{if(A!=null){if(!D.handleKeyAction){return DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED
}return(D.handleKeyAction(A,E))?DwtKeyboardMgr.__KEYSEQ_HANDLED:DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED
}else{return DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED
}}};
DwtKeyboardMgr.prototype.__killKeySequenceAction=function(){this.__dispatchKeyEvent(this.__hdlr,this.__ev,true);
this.__killKeySeqTimedActionId=-1;
this.__keySequence.length=0
};
DwtKeyboardMgr.prototype.__tabGrpChangeListener=function(A){this.__doGrabFocus(A.newFocusMember)
};
DwtKeyboardMgr.prototype.__processKeyEvent=function(C,D,A,B){if(B){this.__kbEventStatus=B
}D._stopPropagation=!A;
D._returnValue=A;
D.setToDhtmlEvent(C);
return A
}
}if(AjxPackage.define("ajax.dwt.keyboard.DwtTabGroup")){DwtTabGroup=function(B,A){this.__members=new AjxVector();
this.__parent=null;
this.__name=B;
this.__blockApplicationHandling=A;
this.__currFocusMember=null;
this.__evtMgr=new AjxEventMgr()
};
DwtTabGroup.NOT_ROOT_TABGROUP="NOT ROOT TAB GROUP";
DwtTabGroup.__changeEvt=new DwtTabGroupEvent();
DwtTabGroup.prototype.toString=function(){return"DwtTabGroup"
};
DwtTabGroup.prototype.getName=function(){return this.__name
};
DwtTabGroup.prototype.addFocusChangeListener=function(A){this.__checkRoot();
this.__evtMgr.addListener(DwtEvent.STATE_CHANGE,A)
};
DwtTabGroup.prototype.removeFocusChangeListener=function(A){this.__checkRoot();
this.__evtMgr.removeListener(DwtEvent.STATE_CHANGE,A)
};
DwtTabGroup.prototype.addMember=function(B,A){if(!B){return 
}this.__members.add(B,A);
if(B instanceof DwtTabGroup){B.newParent(this)
}};
DwtTabGroup.prototype.addMemberAfter=function(A,B){this.addMember(A,this.__members.indexOf(B)+1)
};
DwtTabGroup.prototype.addMemberBefore=function(A,B){this.addMember(A,this.__members.indexOf(B))
};
DwtTabGroup.prototype.removeMember=function(C,A,B){return this.replaceMember(C,null,A,B)
};
DwtTabGroup.prototype.removeAllMembers=function(){this.__members.removeAll()
};
DwtTabGroup.prototype.replaceMember=function(E,F,I,G,A,D){var B=this.__getTabGroupForMember(E);
if(!B){this.addMember(F);
return null
}var H=this.__getRootTabGroup();
var C;
if(A){C=A
}else{if(H.__currFocusMember==E||((E instanceof DwtTabGroup)&&E.contains(H.__currFocusMember))){if(F){C=(F instanceof DwtTabGroup)?F.getFirstMember():F
}else{C=this.__getPrevMember(E,I);
if(!C){C=this.__getNextMember(E,I)
}}}}if(C&&!D){H.__currFocusMember=C;
if(!G){this.__notifyListeners(C)
}}return F?this.__members.replaceObject(E,F):this.__members.remove(E)
};
DwtTabGroup.prototype.contains=function(A){return(this.__getTabGroupForMember(A))
};
DwtTabGroup.prototype.newParent=function(A){this.__parent=A
};
DwtTabGroup.prototype.getFirstMember=function(A){return this.__getLeftMostMember(A)
};
DwtTabGroup.prototype.getTabGroupMemberByName=function(B){var A=this.__members.getArray();
for(var C=0;
C<A.length;
C++){var D=A[C];
if(D instanceof DwtTabGroup&&D.getName()==B){return D
}}};
DwtTabGroup.prototype.getLastMember=function(A){return this.__getRightMostMember(A)
};
DwtTabGroup.prototype.getFocusMember=function(){this.__checkRoot();
return this.__currFocusMember
};
DwtTabGroup.prototype.setFocusMember=function(D,A,B){this.__checkRoot();
if(!this.__checkEnabled(D,A)){return false
}var C=this.__getTabGroupForMember(D);
if(C){this.__currFocusMember=D;
if(!B){this.__notifyListeners(this.__currFocusMember)
}return true
}return false
};
DwtTabGroup.prototype.getNextFocusMember=function(A,B){this.__checkRoot();
return this.__setFocusMember(true,A,B)
};
DwtTabGroup.prototype.getPrevFocusMember=function(A,B){this.__checkRoot();
return this.__setFocusMember(false,A,B)
};
DwtTabGroup.prototype.resetFocusMember=function(B,C){this.__checkRoot();
var A=this.__getLeftMostMember(B);
if((A!=this.__currFocusMember)&&!C){this.__notifyListeners(this.__currFocusMember)
}this.__currFocusMember=A;
return this.__currFocusMember
};
DwtTabGroup.prototype.blockDefaultHandling=function(A){this.__blockDefaultHandling=blockDefaultHandling
};
DwtTabGroup.prototype.isDefaultHandlingBlocked=function(A){return this.__blockDefaultHandling
};
DwtTabGroup.prototype.dump=function(A){if(!window.AjxDebug&&window.DBG){return 
}this.__dump(this,A)
};
DwtTabGroup.prototype.__getPrevMember=function(E,B){var A=this.__members.getArray();
for(var C=this.__members.indexOf(E)-1;
C>-1;
C--){var D=A[C];
if(!(D instanceof DwtTabGroup)){if(this.__checkEnabled(D,B)){return D
}}else{D=D.__getRightMostMember(B);
if(D&&this.__checkEnabled(D,B)){return D
}}}return this.__parent?this.__parent.__getPrevMember(this,B):null
};
DwtTabGroup.prototype.__checkEnabled=function(B,A){if(!A){return true
}if(!B||B.noTab){return false
}if(B instanceof DwtControl){return(B.getEnabled()&&B.getVisible())
}else{return !B.disabled
}};
DwtTabGroup.prototype.__getNextMember=function(F,B){var A=this.__members.getArray();
var E=this.__members.size();
for(var D=this.__members.indexOf(F)+1;
D<E;
D++){var C=A[D];
if(!(C instanceof DwtTabGroup)){if(this.__checkEnabled(C,B)){return C
}}else{C=C.__getLeftMostMember(B);
if(C&&this.__checkEnabled(C,B)){return C
}}}return this.__parent?this.__parent.__getNextMember(this,B):null
};
DwtTabGroup.prototype.__getRightMostMember=function(B){var A=this.__members.getArray();
var D=null;
for(var C=this.__members.size()-1;
C>=0;
C--){D=A[C];
if(!(D instanceof DwtTabGroup)){if(this.__checkEnabled(D,B)){break
}}else{D=D.__getRightMostMember(B);
if(D&&this.__checkEnabled(D,B)){break
}}}return(D&&this.__checkEnabled(D,B))?D:null
};
DwtTabGroup.prototype.__getLeftMostMember=function(B){var D=this.__members.size();
var A=this.__members.getArray();
var E=null;
for(var C=0;
C<D;
C++){E=A[C];
if(!(E instanceof DwtTabGroup)){if(this.__checkEnabled(E,B)){break
}}else{E=E.__getLeftMostMember(B);
if(E&&this.__checkEnabled(E,B)){break
}}}return(E&&this.__checkEnabled(E,B))?E:null
};
DwtTabGroup.prototype.__notifyListeners=function(B){var C=this.__getRootTabGroup();
if(C.__evtMgr){var A=DwtTabGroup.__changeEvt;
A.reset();
A.tabGroup=this;
A.newFocusMember=B;
C.__evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,A)
}};
DwtTabGroup.prototype.__getRootTabGroup=function(){var A=this;
while(A.__parent){A=A.__parent
}return A
};
DwtTabGroup.prototype.__dump=function(D,B,G){G=G||0;
var F="";
for(var C=0;
C<G;
C++){F+="&nbsp;&nbsp;&nbsp;&nbsp;"
}B=B||AjxDebug.DBG1;
F+="&nbsp;&nbsp;&nbsp;&nbsp;";
var E=D.__members.size();
var A=D.__members.getArray();
for(var C=0;
C<E;
C++){if(A[C] instanceof DwtTabGroup){D.__dump(A[C],B,G+1)
}else{if(A[C] instanceof DwtControl){}else{}}}};
DwtTabGroup.prototype.__setFocusMember=function(E,B,C){if(!this.__currFocusMember){return this.resetFocusMember(B,C)
}var D=this.__getTabGroupForMember(this.__currFocusMember);
if(!D){return null
}var A=(E)?D.__getNextMember(this.__currFocusMember,B):D.__getPrevMember(this.__currFocusMember,B);
if(!A){A=(E)?this.__getLeftMostMember(B):this.__getRightMostMember(B);
if(A==this.__currFocusMember){return null
}}this.__currFocusMember=A;
if(!C){this.__notifyListeners(this.__currFocusMember)
}return this.__currFocusMember
};
DwtTabGroup.prototype.__getTabGroupForMember=function(E){if(!E){return null
}var D=this.__members.size();
var B=this.__members.getArray();
var A;
for(var C=0;
C<D;
C++){A=B[C];
if(A==E){return this
}else{if(A instanceof DwtTabGroup&&(A=A.__getTabGroupForMember(E))){return A
}}}return null
};
DwtTabGroup.prototype.__checkRoot=function(){if(this.__parent){throw DwtTabGroup.NOT_ROOT_TABGROUP
}}
}if(AjxPackage.define("ajax.dwt.dnd.DwtDragEvent")){DwtDragEvent=function(){this.operation=null;
this.srcControl=null;
this.action=null;
this.doIt=false;
this.srcData=null
};
DwtDragEvent.DRAG_START=1;
DwtDragEvent.SET_DATA=2;
DwtDragEvent.DRAG_END=3;
DwtDragEvent.DRAG_CANCEL=4
}if(AjxPackage.define("ajax.dwt.dnd.DwtDragSource")){DwtDragSource=function(A){this.__supportedOps=A;
this.__evtMgr=new AjxEventMgr()
};
DwtDragSource.__DRAG_LISTENER="DwtDragSource.__DRAG_LISTENER";
DwtDragSource.__dragEvent=new DwtDragEvent();
DwtDragSource.prototype.toString=function(){return"DwtDragSource"
};
DwtDragSource.prototype.addDragListener=function(A){this.__evtMgr.addListener(DwtDragSource.__DRAG_LISTENER,A)
};
DwtDragSource.prototype.removeDragListener=function(A){this.__evtMgr.removeListener(DwtDragSource.__DRAG_LISTENER,A)
};
DwtDragSource.prototype._beginDrag=function(A,B){if(!(this.__supportedOps&A)){return Dwt.DND_DROP_NONE
}DwtDragSource.__dragEvent.operation=A;
DwtDragSource.__dragEvent.srcControl=B;
DwtDragSource.__dragEvent.action=DwtDragEvent.DRAG_START;
DwtDragSource.__dragEvent.srcData=null;
DwtDragSource.__dragEvent.doit=true;
this.__evtMgr.notifyListeners(DwtDragSource.__DRAG_LISTENER,DwtDragSource.__dragEvent);
return DwtDragSource.__dragEvent.operation
};
DwtDragSource.prototype._getData=function(){DwtDragSource.__dragEvent.action=DwtDragEvent.SET_DATA;
this.__evtMgr.notifyListeners(DwtDragSource.__DRAG_LISTENER,DwtDragSource.__dragEvent);
return DwtDragSource.__dragEvent.srcData
};
DwtDragSource.prototype._endDrag=function(){DwtDragSource.__dragEvent.action=DwtDragEvent.DRAG_END;
DwtDragSource.__dragEvent.doit=false;
this.__evtMgr.notifyListeners(DwtDragSource.__DRAG_LISTENER,DwtDragSource.__dragEvent);
return DwtDragSource.__dragEvent.doit
};
DwtDragSource.prototype._cancelDrag=function(){DwtDragSource.__dragEvent.action=DwtDragEvent.DRAG_CANCEL;
DwtDragSource.__dragEvent.doit=false;
this.__evtMgr.notifyListeners(DwtDragSource.__DRAG_LISTENER,DwtDragSource.__dragEvent);
return DwtDragSource.__dragEvent.doit
}
}if(AjxPackage.define("ajax.dwt.dnd.DwtDropEvent")){DwtDropEvent=function(){this.operation=null;
this.targetControl=null;
this.action=null;
this.srcData=null;
this.doIt=false
};
DwtDropEvent.DRAG_ENTER=1;
DwtDropEvent.DRAG_LEAVE=2;
DwtDropEvent.DRAG_OP_CHANGED=3;
DwtDropEvent.DRAG_DROP=4
}if(AjxPackage.define("ajax.dwt.dnd.DwtDropTarget")){DwtDropTarget=function(B){this._evtMgr=new AjxEventMgr();
this.__hasMultiple=false;
this._types={};
if(typeof B=="string"){B=[B]
}if(B&&B.length){for(var A=0;
A<B.length;
A++){this.addTransferType(B[A])
}}};
DwtDropTarget.__DROP_LISTENER="DwtDropTarget.__DROP_LISTENER";
DwtDropTarget.__dropEvent=new DwtDropEvent();
DwtDropTarget.prototype.toString=function(){return"DwtDropTarget"
};
DwtDropTarget.prototype.addDropListener=function(A){this._evtMgr.addListener(DwtDropTarget.__DROP_LISTENER,A)
};
DwtDropTarget.prototype.removeDropListener=function(A){this._evtMgr.removeListener(DwtDropTarget.__DROP_LISTENER,A)
};
DwtDropTarget.prototype.isValidTarget=function(B){if(B instanceof Array){var A=B.length;
for(var C=0;
C<A;
C++){if(!this.__checkTarget(B[C])){return false
}}return true
}else{return this.__checkTarget(B)
}};
DwtDropTarget.prototype.markAsMultiple=function(){this.__hasMultiple=true
};
DwtDropTarget.prototype.hasMultipleTargets=function(){return this.__hasMultiple
};
DwtDropTarget.prototype.getTransferTypes=function(){return this._types
};
DwtDropTarget.prototype.addTransferType=function(A){this._types[A]=null
};
DwtDropTarget.prototype._dragEnter=function(A,C,E,B,D){DwtDropTarget.__dropEvent.operation=A;
DwtDropTarget.__dropEvent.targetControl=C;
DwtDropTarget.__dropEvent.action=DwtDropEvent.DRAG_ENTER;
DwtDropTarget.__dropEvent.srcData=E;
DwtDropTarget.__dropEvent.uiEvent=B;
DwtDropTarget.__dropEvent.doIt=true;
DwtDropTarget.__dropEvent.dndProxy=D;
this._evtMgr.notifyListeners(DwtDropTarget.__DROP_LISTENER,DwtDropTarget.__dropEvent);
return DwtDropTarget.__dropEvent.doIt
};
DwtDropTarget.prototype._dragLeave=function(){DwtDropTarget.__dropEvent.action=DwtDropEvent.DRAG_LEAVE;
this._evtMgr.notifyListeners(DwtDropTarget.__DROP_LISTENER,DwtDropTarget.__dropEvent)
};
DwtDropTarget.prototype._dragOpChanged=function(A){DwtDropTarget.__dropEvent.operation=A;
DwtDropTarget.__dropEvent.action=DwtDropEvent.DRAG_OP_CHANGED;
this._evtMgr.notifyListeners(DwtDropTarget.__DROP_LISTENER,DwtDropTarget.__dropEvent);
return DwtDropTarget.__dropEvent.doIt
};
DwtDropTarget.prototype._drop=function(B,A){DwtDropTarget.__dropEvent.action=DwtDropEvent.DRAG_DROP;
DwtDropTarget.__dropEvent.srcData=B;
DwtDropTarget.__dropEvent.uiEvent=A;
this._evtMgr.notifyListeners(DwtDropTarget.__DROP_LISTENER,DwtDropTarget.__dropEvent);
return DwtDropTarget.__dropEvent.doIt
};
DwtDropTarget.prototype.__checkTarget=function(item){if(this._types){for(var i in this._types){var ctor;
if(this._types[i]){ctor=this._types[i]
}else{ctor=this._types[i]=eval(i)
}if(ctor&&(typeof ctor=="function")&&(item instanceof ctor)){return true
}}return false
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtHoverMgr")){DwtHoverMgr=function(){this._hoverOverAction=new AjxTimedAction(this,this._notifyHoverOver);
this._hoverOutAction=new AjxTimedAction(this,this._notifyHoverOut)
};
DwtHoverMgr.prototype._hoverObject;
DwtHoverMgr.prototype._hoverOverDelay=750;
DwtHoverMgr.prototype._hoverOverData;
DwtHoverMgr.prototype._hoverOverAction;
DwtHoverMgr.prototype._hoverOverActionId=-1;
DwtHoverMgr.prototype._hoverOverListener;
DwtHoverMgr.prototype._hoverOutDelay=50;
DwtHoverMgr.prototype._hoverOutData;
DwtHoverMgr.prototype._hoverOutAction;
DwtHoverMgr.prototype._hoverOutActionId=-1;
DwtHoverMgr.prototype._hoverOutListener;
DwtHoverMgr.prototype._isHovering=false;
DwtHoverMgr.prototype.setHoverObject=function(A){this._hoverObject=A
};
DwtHoverMgr.prototype.getHoverObject=function(){return this._hoverObject
};
DwtHoverMgr.prototype.reset=function(){this._hoverObject=null;
this._hoverOverDelay=DwtHoverMgr.prototype._hoverOverDelay;
this._hoverOverData=null;
if(this._hoverOverActionId!=-1){AjxTimedAction.cancelAction(this._hoverOverActionId)
}this._hoverOverActionId=-1;
this._hoverOverListener=null;
this._hoverOutDelay=DwtHoverMgr.prototype._hoverOutDelay;
this._hoverOutData=null;
if(this._hoverOutActionId!=-1){AjxTimedAction.cancelAction(this._hoverOutActionId);
this._notifyHoverOut()
}this._hoverOutActionId=-1;
this._hoverOutListener=null
};
DwtHoverMgr.prototype.isHovering=function(){return this._isHovering
};
DwtHoverMgr.prototype.setHoverOverDelay=function(A){this._hoverOverDelay=A
};
DwtHoverMgr.prototype.setHoverOverData=function(A){this._hoverOverData=A
};
DwtHoverMgr.prototype.setHoverOverListener=function(A){this._hoverOverListener=A
};
DwtHoverMgr.prototype.setHoverOutDelay=function(A){this._hoverOutDelay=A
};
DwtHoverMgr.prototype.setHoverOutData=function(A){this._hoverOutData=A
};
DwtHoverMgr.prototype.setHoverOutListener=function(A){this._hoverOutListener=A
};
DwtHoverMgr.prototype.hoverOver=function(A,B){this._isHovering=true;
if(this._hoverOverActionId!=-1){AjxTimedAction.cancelAction(this._hoverOverActionId)
}this._hoverOverAction.args=[A,B];
this._hoverOverActionId=AjxTimedAction.scheduleAction(this._hoverOverAction,this._hoverOverDelay)
};
DwtHoverMgr.prototype.hoverOut=function(){this._isHovering=false;
if(this._hoverOverActionId!=-1){AjxTimedAction.cancelAction(this._hoverOverActionId)
}if(this._hoverOutActionId==-1){if(this._hoverOutDelay>0){this._hoverOutActionId=AjxTimedAction.scheduleAction(this._hoverOutAction,this._hoverOutDelay)
}else{this._notifyHoverOut()
}}};
DwtHoverMgr.prototype._notifyHoverOver=function(){this._hoverOverActionId=-1;
if(this._hoverOverListener!=null){var A=this._hoverOverAction.args[0];
var C=this._hoverOverAction.args[1];
var B=new DwtHoverEvent(DwtEvent.HOVEROVER,this._hoverOverDelay,this._hoverOverData,A,C);
this._hoverOverListener.handleEvent(B)
}};
DwtHoverMgr.prototype._notifyHoverOut=function(){this._hoverOutActionId=-1;
if(this._hoverOutListener!=null){var A=new DwtHoverEvent(DwtEvent.HOVEROUT,this._hoverOutDelay,this._hoverOutData);
this._hoverOutListener.handleEvent(A)
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtControl")){DwtControl=function(B){if(arguments.length==0){return 
}B=Dwt.getParams(arguments,DwtControl.PARAMS);
var A=this.parent=B.parent;
if(A&&!(A instanceof DwtComposite)){throw new DwtException("Parent must be a subclass of Composite",DwtException.INVALIDPARENT,"DwtControl")
}this.shell=null;
this._data={};
this._eventMgr=new AjxEventMgr();
this._disposed=false;
if(!A){return 
}this._className=B.className||"DwtControl";
this.__posStyle=B.posStyle;
if(B.id){this._htmlElId=B.id
}this.__index=B.index;
this.__parentElement=B.parentElement;
this._enabled=false;
this._dragging=null;
this._dndProxy=null;
this._hasFocus=false;
if(!B.deferred){this.__initCtrl()
}this._hoverOverListener=new AjxListener(this,this.__handleHoverOver);
this._hoverOutListener=new AjxListener(this,this.__handleHoverOut);
this._dblClickIsolation=false;
this._ignoreInternalOverOut=false
};
DwtControl.PARAMS=["parent","className","posStyle","deferred","id","index"];
DwtControl.ALL_BY_ID={};
DwtControl.prototype.toString=function(){return"DwtControl"
};
DwtControl.NORMAL="";
DwtControl.ACTIVE="ZActive";
DwtControl.FOCUSED="ZFocused";
DwtControl.DISABLED="ZDisabled";
DwtControl.HOVER="ZHover";
DwtControl.SELECTED="ZSelected";
DwtControl.DEFAULT="ZDefault";
DwtControl.ERROR="ZError";
DwtControl._RE_STATES=new RegExp("\\b("+[DwtControl.ACTIVE,DwtControl.FOCUSED,DwtControl.DISABLED,DwtControl.HOVER,DwtControl.SELECTED,DwtControl.DEFAULT,DwtControl.ERROR].join("|")+")\\b","g");
DwtControl.STATIC_STYLE=Dwt.STATIC_STYLE;
DwtControl.ABSOLUTE_STYLE=Dwt.ABSOLUTE_STYLE;
DwtControl.RELATIVE_STYLE=Dwt.RELATIVE_STYLE;
DwtControl.FIXED_STYLE=Dwt.FIXED_STYLE;
DwtControl.CLIP=Dwt.CLIP;
DwtControl.VISIBLE=Dwt.VISIBLE;
DwtControl.SCROLL=Dwt.SCROLL;
DwtControl.FIXED_SCROLL=Dwt.FIXED_SCROLL;
DwtControl.DEFAULT=Dwt.DEFAULT;
DwtControl._NO_DRAG=1;
DwtControl._DRAGGING=2;
DwtControl._DRAG_REJECTED=3;
DwtControl.__DRAG_THRESHOLD=3;
DwtControl.__TOOLTIP_THRESHOLD=5;
DwtControl.__DND_HOVER_DELAY=750;
DwtControl.__controlEvent=new DwtControlEvent();
DwtControl.__DBL_CLICK_TIMEOUT=300;
DwtControl.prototype._displayState="";
DwtControl.prototype.addControlListener=function(A){this.addListener(DwtEvent.CONTROL,A)
};
DwtControl.prototype.removeControlListener=function(A){this.removeListener(DwtEvent.CONTROL,A)
};
DwtControl.prototype.addDisposeListener=function(A){this.addListener(DwtEvent.DISPOSE,A)
};
DwtControl.prototype.removeDisposeListener=function(A){this.removeListener(DwtEvent.DISPOSE,A)
};
DwtControl.prototype.addListener=function(B,C,A){return this._eventMgr.addListener(B,C,A)
};
DwtControl.prototype.removeListener=function(A,B){return this._eventMgr.removeListener(A,B)
};
DwtControl.prototype.removeAllListeners=function(A){return this._eventMgr.removeAll(A)
};
DwtControl.prototype.isListenerRegistered=function(A){return this._eventMgr.isListenerRegistered(A)
};
DwtControl.prototype.notifyListeners=function(A,B){return this._eventMgr.notifyListeners(A,B)
};
DwtControl.prototype.dispose=function(){if(this._disposed){return 
}if(this.parent!=null&&this.parent instanceof DwtComposite){this.parent.removeChild(this)
}this._elRef=null;
if(DwtControl.ALL_BY_ID){DwtControl.ALL_BY_ID[this._htmlElId]=null;
delete DwtControl.ALL_BY_ID[this._htmlElId]
}this._disposed=true;
var A=new DwtDisposeEvent();
A.dwtObj=this;
this.notifyListeners(DwtEvent.DISPOSE,A)
};
DwtControl.prototype.getDocument=function(){return document
};
DwtControl.prototype.getTabGroupMember=function(){return this
};
DwtControl.prototype.getData=function(A){return this._data[A]
};
DwtControl.prototype.setData=function(A,B){this._data[A]=B
};
DwtControl.prototype.isDisposed=function(){return this._isDisposed
};
DwtControl.prototype.isInitialized=function(){return this.__ctrlInited
};
DwtControl.prototype.focus=function(){DwtShell.getShell(window).getKeyboardMgr().grabFocus(this)
};
DwtControl.prototype.hasFocus=function(){return this._hasFocus
};
DwtControl.prototype.handleKeyAction=function(A,B){return false
};
DwtControl.prototype.reparent=function(B,A){if(!this._checkState()){return 
}var C=this.getHtmlElement();
this.parent.removeChild(this,true);
DwtComposite._pendingElements[this._htmlElId]=C;
B.addChild(this,A);
this.parent=B
};
DwtControl.prototype.reparentHtmlElement=function(C,A){if(typeof C=="string"){C=document.getElementById(C)
}if(!C){return 
}var B=this.getHtmlElement();
if(A==null){C.appendChild(B)
}else{if(typeof A=="object"){C.insertBefore(B,A)
}else{if(C.childNodes[A]){C.insertBefore(B,C.childNodes[A])
}else{C.appendChild(B)
}}}};
DwtControl.prototype.setHandler=function(B,A){if(!this._checkState()){return 
}var C=this.getHtmlElement();
Dwt.setHandler(C,B,A)
};
DwtControl.prototype.clearHandler=function(A){if(!this._checkState()){return 
}var B=this.getHtmlElement();
Dwt.clearHandler(B,A)
};
DwtControl.prototype.getBounds=function(){if(!this._checkState()){return 
}return Dwt.getBounds(this.getHtmlElement())
};
DwtControl.prototype.setBounds=function(C,F,D,B){if(!this._checkState()){return 
}var E=this.getHtmlElement();
if(this.isListenerRegistered(DwtEvent.CONTROL)){this.__controlEvent.reset(DwtControlEvent.RESIZE|DwtControlEvent.MOVE);
var A=Dwt.getBounds(E);
this.__controlEvent.oldX=A.x;
this.__controlEvent.oldY=A.y;
this.__controlEvent.oldWidth=A.width;
this.__controlEvent.oldHeight=A.height;
Dwt.setBounds(E,C,F,D,B);
A=Dwt.getBounds(E);
this.__controlEvent.newX=A.x;
this.__controlEvent.newY=A.y;
this.__controlEvent.newWidth=A.width;
this.__controlEvent.newHeight=A.height;
this.__controlEvent.requestedWidth=D;
this.__controlEvent.requestedHeight=B;
this.notifyListeners(DwtEvent.CONTROL,this.__controlEvent)
}else{Dwt.setBounds(E,C,F,D,B)
}return this
};
DwtControl.prototype.getClassName=function(){return this._className
};
DwtControl.prototype.setClassName=function(B){if(!this._checkState()){return 
}this._className=B;
var A=this.getHtmlElement();
A.className=B;
Dwt.addClass(A,this._displayState)
};
DwtControl.prototype.addClassName=function(A){Dwt.addClass(this.getHtmlElement(),A)
};
DwtControl.prototype.delClassName=function(A,B){Dwt.delClass(this.getHtmlElement(),A,B)
};
DwtControl.prototype.condClassName=function(C,A,B){Dwt.condClass(this.getHtmlElement(),C,A,B)
};
DwtControl.prototype.setDisplayState=function(C){if(!this._enabled){C=DwtControl.DISABLED
}if(arguments.length>1){var A=[];
for(var B=0;
B<arguments.length;
B++){A.push(arguments[B])
}C=A.join(" ")
}if(this._displayState!=C){this._displayState=C;
Dwt.delClass(this.getHtmlElement(),DwtControl._RE_STATES,C)
}};
DwtControl.prototype._createHtmlFromTemplate=function(A,C){this.getHtmlElement().innerHTML=AjxTemplate.expand(A,C);
var D=AjxTemplate.getParams(A);
var B=D&&D["class"];
if(B){B=[this._className,B].join(" ");
this.setClassName(B)
}};
DwtControl.prototype.getCursor=function(){if(!this._checkState()){return 
}return Dwt.getCursor(this.getHtmlElement())
};
DwtControl.prototype.setCursor=function(A){if(!this._checkState()){return 
}Dwt.setCursor(this.getHtmlElement(),A)
};
DwtControl.prototype.getDragSource=function(){return this._dragSource
};
DwtControl.prototype.setDragSource=function(A){this._dragSource=A;
if(A!=null&&this._ctrlCaptureObj==null){this._ctrlCaptureObj=new DwtMouseEventCapture({targetObj:this,id:"DwtControl",mouseOverHdlr:DwtControl.__mouseOverHdlr,mouseDownHdlr:DwtControl.__mouseDownHdlr,mouseMoveHdlr:DwtControl.__mouseMoveHdlr,mouseUpHdlr:DwtControl.__mouseUpHdlr,mouseOutHdlr:DwtControl.__mouseOutHdlr});
this._dndHoverAction=new AjxTimedAction(null,this.__dndDoHover)
}};
DwtControl.prototype.getDropTarget=function(){return this._dropTarget
};
DwtControl.prototype.setDropTarget=function(A){this._dropTarget=A
};
DwtControl.prototype.getEnabled=function(){if(!this._checkState()){return 
}return this._enabled
};
DwtControl.prototype.setEnabled=function(A,B){if(!this._checkState()){return 
}if(A!=this._enabled){this._enabled=A;
this.setDisplayState(A?DwtControl.NORMAL:DwtControl.DISABLED);
if(B){this.getHtmlElement().disabled=!A
}}};
DwtControl.prototype.getHTMLElId=function(){return this._htmlElId
};
DwtControl.prototype.getHtmlElement=function(){if(!this._checkState()){return 
}var A=this._elRef||document.getElementById(this._htmlElId);
if(A==null){A=DwtComposite._pendingElements[this._htmlElId]
}else{if(!A._rendered){delete DwtComposite._pendingElements[this._htmlElId];
A._rendered=true
}}return this._elRef=A
};
DwtControl.fromElement=function(A){return DwtControl.ALL_BY_ID&&DwtControl.ALL_BY_ID[A.id]
};
DwtControl.fromElementId=function(A){return DwtControl.ALL_BY_ID&&DwtControl.ALL_BY_ID[A]
};
DwtControl.findControl=function(B){while(B){try{if(B.id&&DwtControl.ALL_BY_ID&&DwtControl.ALL_BY_ID[B.id]){return DwtControl.ALL_BY_ID[B.id]
}}catch(A){return null
}B=B.parentNode
}return null
};
DwtControl.getTargetControl=function(A,C){var B=DwtUiEvent.getTarget(A,C);
return B?DwtControl.findControl(B):null
};
DwtControl.prototype.setHtmlElementId=function(B){if(this._disposed){return 
}if(this.__ctrlInited){var A=this.getHtmlElement();
if(!A._rendered){delete DwtComposite._pendingElements[this._htmlElId];
DwtComposite._pendingElements[B]=A
}A.id=B
}this._htmlElId=B
};
DwtControl.prototype.getX=function(){if(!this._checkState()){return 
}return Dwt.getLocation(this.getHtmlElement()).x
};
DwtControl.prototype.getXW=function(){if(!this._checkState()){return 
}var A=this.getBounds();
return A.x+A.width
};
DwtControl.prototype.getY=function(){if(!this._checkState()){return 
}return Dwt.getLocation(this.getHtmlElement()).y
};
DwtControl.prototype.getYH=function(){if(!this._checkState()){return 
}var A=this.getBounds();
return A.y+A.height
};
DwtControl.prototype.getLocation=function(){if(!this._checkState()){return 
}return Dwt.getLocation(this.getHtmlElement())
};
DwtControl.prototype.setLocation=function(A,D){if(!this._checkState()){return 
}if(this.isListenerRegistered(DwtEvent.CONTROL)){var B=this.getHtmlElement();
this.__controlEvent.reset(DwtControlEvent.MOVE);
var C=Dwt.getLocation(B);
this.__controlEvent.oldX=C.x;
this.__controlEvent.oldY=C.y;
Dwt.setLocation(B,A,D);
C=Dwt.getLocation(B);
this.__controlEvent.newX=C.x;
this.__controlEvent.newY=C.y;
this.notifyListeners(DwtEvent.CONTROL,this.__controlEvent)
}else{Dwt.setLocation(this.getHtmlElement(),A,D)
}return this
};
DwtControl.prototype.getScrollStyle=function(){if(!this._checkState()){return 
}return Dwt.getScrollStyle(this.getHtmlElement())
};
DwtControl.prototype.setScrollStyle=function(A){if(!this._checkState()){return 
}Dwt.setScrollStyle(this.getHtmlElement(),A)
};
DwtControl.prototype.setPosition=function(A){if(!this._checkState()){return 
}if(A==DwtControl.STATIC_STYLE||A==DwtControl.ABSOLUTE_STYLE||A==DwtControl.RELATIVE_STYLE){this.__posStyle=A;
Dwt.setPosition(this.getHtmlElement(),A)
}};
DwtControl.prototype.getW=function(){if(!this._checkState()){return 
}return Dwt.getSize(this.getHtmlElement()).x
};
DwtControl.prototype.getH=function(){if(!this._checkState()){return 
}return Dwt.getSize(this.getHtmlElement()).y
};
DwtControl.prototype.getSize=function(){if(!this._checkState()){return 
}return Dwt.getSize(this.getHtmlElement())
};
DwtControl.prototype.setSize=function(B,A){if(!this._checkState()){return 
}if(this.isListenerRegistered(DwtEvent.CONTROL)){var D=this.getHtmlElement();
this.__controlEvent.reset(DwtControlEvent.RESIZE);
var C=Dwt.getSize(D);
this.__controlEvent.oldWidth=C.x;
this.__controlEvent.oldHeight=C.y;
Dwt.setSize(D,B,A);
C=Dwt.getSize(D);
this.__controlEvent.newWidth=C.x;
this.__controlEvent.newHeight=C.y;
this.notifyListeners(DwtEvent.CONTROL,this.__controlEvent)
}else{Dwt.setSize(this.getHtmlElement(),B,A)
}return this
};
DwtControl.prototype.getToolTipContent=function(){if(this._disposed){return 
}return this.__toolTipCallback?this.__toolTipCallback.run():this.__toolTipContent
};
DwtControl.prototype.setToolTipContent=function(A){if(this._disposed){return 
}this.__toolTipContent=A
};
DwtControl.prototype.setToolTipCallback=function(A){if(this._disposed){return 
}this.__toolTipCallback=A
};
DwtControl.prototype.getVisible=function(){if(!this._checkState()){return 
}return Dwt.getVisible(this.getHtmlElement())
};
DwtControl.prototype.setVisible=function(A){if(!this._checkState()){return 
}Dwt.setVisible(this.getHtmlElement(),A)
};
DwtControl.prototype.setVisibility=function(A){if(!this._checkState()){return 
}Dwt.setVisibility(this.getHtmlElement(),A)
};
DwtControl.prototype.getVisibility=function(){if(!this._checkState()){return 
}return Dwt.getVisiblility(this.getHtmlElement())
};
DwtControl.prototype.getZIndex=function(){if(!this._checkState()){return 
}return Dwt.getZIndex(this.getHtmlElement())
};
DwtControl.prototype.setZIndex=function(A){if(!this._checkState()){return 
}Dwt.setZIndex(this.getHtmlElement(),A)
};
DwtControl.prototype.zShow=function(A){this.setZIndex(A?Dwt.Z_VIEW:Dwt.Z_HIDDEN)
};
DwtControl.prototype.setDisplay=function(A){if(!this._checkState()){return 
}Dwt.setDisplay(this.getHtmlElement(),A)
};
DwtControl.prototype.preventSelection=function(A){return !this.__isInputEl(A)
};
DwtControl.prototype.preventContextMenu=function(A){return A?(!this.__isInputEl(A)):true
};
DwtControl.prototype.setContent=function(A){if(A){this.getHtmlElement().innerHTML=A
}};
DwtControl.prototype.clearContent=function(){this.getHtmlElement().innerHTML=""
};
DwtControl.prototype.appendElement=function(B){var A=AjxUtil.isString(B)?document.getElementById(B):B;
if(A){A.appendChild(this.getHtmlElement(),A)
}};
DwtControl.prototype.replaceElement=function(D,A,E){var B=AjxUtil.isString(D)?document.getElementById(D):D;
if(B){var C=this.getHtmlElement();
B.parentNode.replaceChild(C,B);
this._replaceElementHook(B,C,A,E)
}};
DwtControl.prototype._replaceElementHook=function(B,D,A,E){if((A==null||A)&&B.className){Dwt.addClass(D,B.className)
}if(E==null||E){var C=B.getAttribute("style");
if(C){D.setAttribute("style",[D.getAttribute("style"),C].join(";"))
}}};
DwtControl.prototype.applyCaretHack=function(){if(Dwt.CARET_HACK_ENABLED){var D=this.shell.getHtmlElement();
var A=this.getHtmlElement();
var B=A;
while(B.parentNode&&(B.parentNode!=D)){B=B.parentNode
}if(B){var C=B.nextSibling;
D.removeChild(B);
D.insertBefore(B,C)
}}};
DwtControl.prototype._blur=function(){};
DwtControl.prototype._focus=function(){};
DwtControl.prototype._focusByMouseUpEvent=function(){if(this.getEnabled()){this.focus()
}};
DwtControl.prototype._focusByMouseDownEvent=function(){this._focusByMouseUpEvent()
};
DwtControl.prototype._getDragProxy=function(A){return null
};
DwtControl.prototype._setDragProxyState=function(A){Dwt.condClass(this._dndProxy,A,DwtCssStyle.DROPPABLE,DwtCssStyle.NOT_DROPPABLE)
};
DwtControl.__junkIconId=0;
DwtControl.prototype._destroyDragProxy=function(A){if(A){if(A.parentNode){A.parentNode.removeChild(A)
}else{A.style.zIndex=-100;
A.id="DwtJunkIcon"+DwtControl.__junkIconId++;
A=null
}}};
DwtControl.prototype._isValidDragObject=function(A){return true
};
DwtControl.prototype._dragEnter=function(A){};
DwtControl.prototype._dragOver=function(A){};
DwtControl.prototype._dragHover=function(A){};
DwtControl.prototype._dragLeave=function(A){};
DwtControl.prototype._drop=function(A){};
DwtControl.prototype._setKeyPressEventHdlr=function(A){this._setEventHdlrs([DwtEvent.ONKEYPRESS],A)
};
DwtControl.prototype._setMouseEventHdlrs=function(A){this._setEventHdlrs(DwtEvent.MOUSE_EVENTS,A)
};
DwtControl.prototype._setEventHdlrs=function(C,A){if(!this._checkState()){return 
}var D=this.getHtmlElement();
for(var B=0;
B<C.length;
B++){if(A!==true){Dwt.setHandler(D,C[B],DwtControl.__HANDLER[C[B]])
}else{Dwt.clearHandler(D,C[B])
}}};
DwtControl.prototype._setMouseEvents=function(){var A=[DwtEvent.ONCONTEXTMENU,DwtEvent.ONDBLCLICK,DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEMOVE,DwtEvent.ONMOUSEUP,DwtEvent.ONSELECTSTART];
if(AjxEnv.isIE){A.push(DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE)
}else{A.push(DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT)
}this._setEventHdlrs(A)
};
DwtControl.prototype._setMouseEvent=function(B,A){B.reset();
A.ersatz=true;
DwtUiEvent.copy(B,A);
B.button=A.button
};
DwtControl.prototype._getStopPropagationValForMouseEv=function(A){return true
};
DwtControl.prototype._getEventReturnValForMouseEv=function(A){return false
};
DwtControl.prototype._checkState=function(){if(this._disposed){return false
}if(!this.__ctrlInited){this.__initCtrl()
}return true
};
DwtControl.__keyPressHdlr=function(C){var D=D?D:DwtControl.getTargetControl(C);
if(!D){return false
}if(D.__hasToolTipContent()){var B=DwtShell.getShell(window);
var A=B.getHoverMgr();
A.setHoverOutListener(D._hoverOutListener);
A.hoverOut();
D.__tooltipClosed=false
}};
DwtControl.prototype.__hasToolTipContent=function(){if(this._disposed){return false
}return Boolean(this.__toolTipCallback||this.__toolTipContent)
};
DwtControl.prototype.__doBlur=function(){this._hasFocus=false;
if(this.isListenerRegistered(DwtEvent.ONBLUR)){var A=DwtShell.focusEvent;
A.dwtObj=this;
A.state=DwtFocusEvent.BLUR;
obj.notifyListeners(DwtEvent.ONBLUR,mouseEv)
}this._blur()
};
DwtControl.prototype.__doFocus=function(){this._hasFocus=true;
if(this.isListenerRegistered(DwtEvent.ONFOCUS)){var A=DwtShell.focusEvent;
A.dwtObj=this;
A.state=DwtFocusEvent.FOCUS;
obj.notifyListeners(DwtEvent.ONFOCUS,mouseEv)
}this._focus()
};
DwtControl.__dblClickHdlr=function(A){var B=DwtControl.getTargetControl(A);
if(B&&B._dblClickIsolation){B._clickPending=false;
AjxTimedAction.cancelAction(B._dblClickActionId)
}return DwtControl.__mouseEvent(A,DwtEvent.ONDBLCLICK)
};
DwtControl.__mouseOverHdlr=function(F,E){var H=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
if(H!=null){F=DwtUiEvent.getEvent(F);
F._stopPropagation=true;
return false
}var G=DwtControl.getTargetControl(F);
if(!G){return false
}E=E||DwtEvent.ONMOUSEOVER;
if((E==DwtEvent.ONMOUSEOVER)&&G._ignoreInternalOverOut){var A=DwtControl.getTargetControl(F,true);
if(G==A){return false
}}var D=DwtShell.mouseEvent;
if(G._dragging==DwtControl._NO_DRAG){D.setFromDhtmlEvent(F,G);
if(G.isListenerRegistered(E)){G.notifyListeners(E,D)
}if(G.__hasToolTipContent()){var C=DwtShell.getShell(window);
var B=C.getHoverMgr();
if((!B.isHovering()||B.getHoverObject()!=G)&&!DwtMenu.menuShowing()){B.reset();
B.setHoverObject(G);
B.setHoverOverData(G);
B.setHoverOverDelay(DwtToolTip.TOOLTIP_DELAY);
B.setHoverOverListener(G._hoverOverListener);
B.hoverOver(D.docX,D.docY)
}}}D._stopPropagation=true;
D._returnValue=false;
D.setToDhtmlEvent(F);
return false
};
DwtControl.__mouseEnterHdlr=function(A){return DwtControl.__mouseOverHdlr(A,DwtEvent.ONMOUSEENTER)
};
DwtControl.__mouseDownHdlr=function(E){var F=DwtControl.getTargetControl(E);
if(!F){return false
}F._focusByMouseDownEvent();
if(F.__hasToolTipContent()){var C=DwtShell.getShell(window);
var B=C.getHoverMgr();
B.setHoverOutListener(F._hoverOutListener);
B.hoverOut()
}var D=DwtShell.mouseEvent;
D.setFromDhtmlEvent(E,F);
if(F._dragSource&&(D.button==DwtMouseEvent.LEFT)&&F._isValidDragObject(D)){try{F._ctrlCaptureObj.capture()
}catch(A){}F._dragOp=(D.ctrlKey)?Dwt.DND_DROP_COPY:Dwt.DND_DROP_MOVE;
F.__dragStartX=D.docX;
F.__dragStartY=D.docY
}return DwtControl.__mouseEvent(E,DwtEvent.ONMOUSEDOWN,F,D)
};
DwtControl.__mouseMoveHdlr=function(G){var E=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
var D=E?E.targetObj:DwtControl.getTargetControl(G);
if(!D){return false
}if(D.__dndHoverActionId!=-1){AjxTimedAction.cancelAction(D.__dndHoverActionId);
D.__dndHoverActionId=-1
}var H=DwtShell.mouseEvent;
H.setFromDhtmlEvent(G,E?true:D);
if(H.docX<0||H.docY<0){H._stopPropagation=true;
H._returnValue=false;
H.setToDhtmlEvent(G);
return false
}if(D._dragSource==null||E==null||(D!=null&&D._dragging==DwtControl._NO_DRAG&&Math.abs(D.__dragStartX-H.docX)<DwtControl.__DRAG_THRESHOLD&&Math.abs(D.__dragStartY-H.docY)<DwtControl.__DRAG_THRESHOLD)){if(D.__hasToolTipContent()){var F=DwtShell.getShell(window);
var A=F.getHoverMgr();
if(!A.isHovering()&&!D.__tooltipClosed&&!DwtMenu.menuShowing()){A.hoverOver(H.docX,H.docY)
}else{var C=D.__lastTooltipX?Math.abs(H.docX-D.__lastTooltipX):null;
var B=D.__lastTooltipY?Math.abs(H.docY-D.__lastTooltipY):null;
if((C!=null&&C>DwtControl.__TOOLTIP_THRESHOLD)||(B!=null&&B>DwtControl.__TOOLTIP_THRESHOLD)){A.setHoverOutListener(D._hoverOutListener);
A.hoverOut();
D.__tooltipClosed=true
}}}return DwtControl.__mouseEvent(G,DwtEvent.ONMOUSEMOVE,D,H)
}else{if(D._dragging==DwtControl._NO_DRAG){D._dragOp=D._dragSource._beginDrag(D._dragOp,D);
if(D._dragOp!=Dwt.DND_DROP_NONE){D._dragging=DwtControl._DRAGGING;
D._dndProxy=D._getDragProxy(D._dragOp);
Dwt.addClass(D._dndProxy,"DwtDragProxy");
if(D._dndProxy==null){D._dragging=DwtControl._DRAG_REJECTED
}}else{D._dragging=DwtControl._DRAG_REJECTED
}}if(D._dragging!=DwtControl._DRAG_REJECTED){var I=H.dwtObj;
if(I){D._dndHoverAction.args=[I];
D.__dndHoverActionId=AjxTimedAction.scheduleAction(D._dndHoverAction,DwtControl.__DND_HOVER_DELAY)
}if(I&&I._dropTarget&&I!=D){if(I!=D.__lastDestDwtObj||I._dropTarget.hasMultipleTargets()){if(I._dropTarget._dragEnter(D._dragOp,I,D._dragSource._getData(),H,D._dndProxy)){D._setDragProxyState(true);
D.__dropAllowed=true;
I._dragEnter(H)
}else{D._setDragProxyState(false);
D.__dropAllowed=false
}}else{if(D.__dropAllowed){I._dragOver(H)
}}}else{D._setDragProxyState(false)
}if(D.__lastDestDwtObj&&D.__lastDestDwtObj!=I&&D.__lastDestDwtObj._dropTarget&&D.__lastDestDwtObj!=D){D.__lastDestDwtObj._dragLeave(H);
D.__lastDestDwtObj._dropTarget._dragLeave()
}D.__lastDestDwtObj=I;
Dwt.setLocation(D._dndProxy,H.docX+2,H.docY+2)
}else{DwtControl.__mouseEvent(G,DwtEvent.ONMOUSEMOVE,D,H)
}H._stopPropagation=true;
H._returnValue=false;
H.setToDhtmlEvent(G);
return false
}};
DwtControl.__mouseUpHdlr=function(C){var F=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
var E=F?F.targetObj:DwtControl.getTargetControl(C);
if(!E){return false
}if(E.__dndHoverActionId!=-1){AjxTimedAction.cancelAction(E.__dndHoverActionId);
E.__dndHoverActionId=-1
}var B=DwtShell.mouseEvent;
B.setFromDhtmlEvent(C,F?true:E);
if(!E._dragSource||!F){return DwtControl.__processMouseUpEvent(C,E,B)
}else{F.release();
if(E._dragging!=DwtControl._DRAGGING){E._dragging=DwtControl._NO_DRAG;
return DwtControl.__processMouseUpEvent(C,E,B)
}else{E.__lastDestDwtObj=null;
var D=B.dwtObj;
if(D!=null&&D._dropTarget!=null&&E.__dropAllowed&&D!=E){D._drop(B);
D._dropTarget._drop(E._dragSource._getData(),B);
E._dragSource._endDrag();
E._destroyDragProxy(E._dndProxy);
E._dragging=DwtControl._NO_DRAG
}else{E._dragSource._cancelDrag();
E.__dragEndX=B.docX;
E.__dragEndY=B.docY;
if(E.__badDropAction==null){E.__badDropAction=new AjxTimedAction(E,E.__badDropEffect)
}var A=(E.__dragEndY-E.__dragStartY)/(E.__dragEndX-E.__dragStartX);
E.__badDropAction.args=[A,E.__dragStartY-(A*E.__dragStartX),(E.__dragStartX-E.__dragEndX<0)?-1:1];
AjxTimedAction.scheduleAction(E.__badDropAction,0)
}B._stopPropagation=true;
B._returnValue=false;
B.setToDhtmlEvent(C);
return false
}}};
DwtControl.__processMouseUpEvent=function(C,D,B){if(D._dblClickIsolation&&B&&(B.button==DwtMouseEvent.LEFT)){if(D._clickPending){return false
}else{D._clickPending=true;
var A=new AjxTimedAction(null,DwtControl.__timedClick,[C,D,B]);
D._dblClickActionId=AjxTimedAction.scheduleAction(A,DwtControl.__DBL_CLICK_TIMEOUT);
DwtUiEvent.setBehaviour(C,true,false);
D._st=new Date();
return false
}}else{D._clickPending=false;
return DwtControl.__mouseEvent(C,DwtEvent.ONMOUSEUP,D,B)
}};
DwtControl.__timedClick=function(B,C,A){C._clickPending=false;
DwtControl.__mouseEvent(B,DwtEvent.ONMOUSEUP,C,A)
};
DwtControl.__mouseOutHdlr=function(E,D){var F=DwtControl.getTargetControl(E);
if(!F){return false
}D=D||DwtEvent.ONMOUSEOUT;
if((D==DwtEvent.ONMOUSEOUT)&&F._ignoreInternalOverOut){var A=DwtControl.getTargetControl(E,true);
if(F==A){return false
}}if(F.__hasToolTipContent()){var C=DwtShell.getShell(window);
var B=C.getHoverMgr();
B.setHoverOutListener(F._hoverOutListener);
B.hoverOut();
F.__tooltipClosed=false
}return DwtControl.__mouseEvent(E,D||DwtEvent.ONMOUSEOUT,F)
};
DwtControl.__mouseLeaveHdlr=function(A){return DwtControl.__mouseOutHdlr(A,DwtEvent.ONMOUSELEAVE)
};
DwtControl.__mouseWheelHdlr=function(A){var B=DwtControl.getTargetControl(A);
if(!B){return false
}return DwtControl.__mouseEvent(A,DwtEvent.ONMOUSEWHEEL,B)
};
DwtControl.__selectStartHdlr=function(A){return DwtControl.__mouseEvent(A,DwtEvent.ONSELECTSTART)
};
DwtControl.__contextMenuHdlr=function(B){if(AjxEnv.isSafari){var C=DwtControl.getTargetControl(B);
var A=C?C.preventContextMenu():true;
if(A){DwtControl.__mouseEvent(B,DwtEvent.ONMOUSEDOWN);
return DwtControl.__mouseEvent(B,DwtEvent.ONMOUSEUP)
}}return DwtControl.__mouseEvent(B,DwtEvent.ONCONTEXTMENU)
};
DwtControl.__mouseEvent=function(D,B,E,C){var E=E?E:DwtControl.getTargetControl(D);
if(!E){return false
}if(!C){C=DwtShell.mouseEvent;
C.setFromDhtmlEvent(D,E)
}var A=C.target.tagName.toLowerCase();
if(A!="input"&&A!="textarea"&&A!="a"){C._stopPropagation=true;
C._returnValue=false
}else{C._stopPropagation=false;
C._returnValue=true
}DwtEventManager.notifyListeners(B,C);
if(E.isListenerRegistered&&E.isListenerRegistered(B)){E.notifyListeners(B,C)
}C.setToDhtmlEvent(D);
return C._returnValue
};
DwtControl.__HANDLER={};
DwtControl.__HANDLER[DwtEvent.ONCONTEXTMENU]=DwtControl.__contextMenuHdlr;
DwtControl.__HANDLER[DwtEvent.ONDBLCLICK]=DwtControl.__dblClickHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEDOWN]=DwtControl.__mouseDownHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEENTER]=DwtControl.__mouseEnterHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSELEAVE]=DwtControl.__mouseLeaveHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEMOVE]=DwtControl.__mouseMoveHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEOUT]=DwtControl.__mouseOutHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEOVER]=DwtControl.__mouseOverHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEUP]=DwtControl.__mouseUpHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEWHEEL]=DwtControl.__mouseWheelHdlr;
DwtControl.__HANDLER[DwtEvent.ONSELECTSTART]=DwtControl.__selectStartHdlr;
DwtControl.__HANDLER[DwtEvent.ONKEYPRESS]=DwtControl.__keyPressHdlr;
DwtControl.prototype.__initCtrl=function(){this.shell=this.parent.shell||this.parent;
var A=this._elRef=document.createElement("div");
this._htmlElId=A.id=this.__internalId=this._htmlElId||Dwt.getNextId();
if(DwtControl.ALL_BY_ID){if(DwtControl.ALL_BY_ID[this._htmlElId]){this._htmlElId=A.id=this.__internalId=DwtId._makeId(this._htmlElId,Dwt.getNextId())
}DwtControl.ALL_BY_ID[this._htmlElId]=this
}DwtComposite._pendingElements[this._htmlElId]=A;
if(this.__posStyle==null||this.__posStyle==DwtControl.STATIC_STYLE){A.style.position=DwtControl.STATIC_STYLE
}else{A.style.position=this.__posStyle
}A.className=this._className;
A.style.overflow="visible";
this._enabled=true;
this.__controlEvent=DwtControl.__controlEvent;
this._dragging=DwtControl._NO_DRAG;
this.__ctrlInited=true;
this.parent.addChild(this,this.__index)
};
DwtControl.prototype.__dndDoHover=function(A){A._dragHover()
};
DwtControl.prototype.__badDropEffect=function(A,E,C){var B=(Math.abs(A)<=1);
var D=B?this.__dragStartX-this.__dragEndX:this.__dragStartY-this.__dragEndY;
if(D*C>0&&!(this.__dragEndY==this.__dragStartY||this.__dragEndX==this.__dragStartX)){if(B){this.__dragEndX+=(30*C);
this._dndProxy.style.top=A*this.__dragEndX+E;
this._dndProxy.style.left=this.__dragEndX
}else{this.__dragEndY+=(30*C);
this._dndProxy.style.top=this.__dragEndY;
this._dndProxy.style.left=(this.__dragEndY-E)/A
}AjxTimedAction.scheduleAction(this.__badDropAction,0)
}else{this._destroyDragProxy(this._dndProxy);
this._dragging=DwtControl._NO_DRAG
}};
DwtControl.prototype.__handleHoverOver=function(B){if(this._eventMgr.isListenerRegistered(DwtEvent.HOVEROVER)){this._eventMgr.notifyListeners(DwtEvent.HOVEROVER,B)
}if(this.__hasToolTipContent()){var A=DwtShell.getShell(window);
var C=A.getToolTip();
C.setContent(this.getToolTipContent());
C.popup(B.x,B.y);
this.__lastTooltipX=B.x;
this.__lastTooltipY=B.y;
this.__tooltipClosed=false
}};
DwtControl.prototype.__handleHoverOut=function(B){if(this._eventMgr.isListenerRegistered(DwtEvent.HOVEROUT)){this._eventMgr.notifyListeners(DwtEvent.HOVEROUT,B)
}var A=DwtShell.getShell(window);
var C=A.getToolTip();
C.popdown();
this.__lastTooltipX=null;
this.__lastTooltipY=null
};
DwtControl.prototype.__isInputEl=function(C){var D=false;
if(!C||!C.tagName){return D
}var A=C.tagName.toLowerCase();
var B=A=="input"?C.type.toLowerCase():null;
if(A=="textarea"||(B&&(B=="text"||B=="password"))){D=true
}return D
};
DwtControl.ON_UNLOAD=function(){var B=DwtControl.ALL_BY_ID,A;
for(A in B){B[A]._elRef=null
}DwtControl.ALL_BY_ID=null
};
if(AjxEnv.isIE){window.attachEvent("onunload",DwtControl.ON_UNLOAD)
}else{window.addEventListener("unload",DwtControl.ON_UNLOAD,false)
}}if(AjxPackage.define("ajax.dwt.widgets.DwtComposite")){DwtComposite=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtComposite.PARAMS);
A.className=A.className||"DwtComposite";
DwtControl.call(this,A);
this._children=new AjxVector()
};
DwtComposite.PARAMS=["parent","className","posStyle","deferred","id","index"];
DwtComposite.prototype=new DwtControl;
DwtComposite.prototype.constructor=DwtComposite;
DwtComposite._pendingElements=new Object();
DwtComposite.prototype.toString=function(){return"DwtComposite"
};
DwtComposite.prototype.dispose=function(){if(this._disposed){return 
}var A=this._children.getArray();
while(A.length>0){A[0].dispose()
}DwtControl.prototype.dispose.call(this)
};
DwtComposite.prototype.getChildren=function(){return this._children.getArray().slice(0)
};
DwtComposite.prototype.getNumChildren=function(){return this._children.size()
};
DwtComposite.prototype.removeChildren=function(){var A=this._children.getArray();
while(A.length>0){A[0].dispose()
}};
DwtComposite.prototype.clear=function(){this.removeChildren();
this.getHtmlElement().innerHTML=""
};
DwtComposite.prototype.addChild=function(C,A){this._children.add(C,A);
var B=C.getHtmlElement();
B.setAttribute("parentId",this._htmlElId);
if(this instanceof DwtShell&&this.isVirtual()){document.body.appendChild(B)
}else{C.reparentHtmlElement(C.__parentElement||this.getHtmlElement(),A);
C.__parentElement=null
}};
DwtComposite.prototype.removeChild=function(C){if(C.isInitialized()){this._children.remove(C);
var B=C.getHtmlElement();
if(B){B.removeAttribute("parentId");
if(B.parentNode){var A=B.parentNode.removeChild(B)
}}}};
DwtComposite.prototype._setAllowSelection=function(){if(!this._allowSelection){this._allowSelection=true;
this.addListener(DwtEvent.ONMOUSEDOWN,new AjxListener(this,this._mouseDownListener));
this.addListener(DwtEvent.ONCONTEXTMENU,new AjxListener(this,this._contextMenuListener))
}};
DwtComposite.prototype.preventSelection=function(A){return this._allowSelection?false:DwtControl.prototype.preventSelection.call(this,A)
};
DwtComposite.prototype.preventContextMenu=function(C){if(!this._allowSelection){return DwtControl.prototype.preventContextMenu.apply(this,arguments)
}var A=C?(C.id.indexOf("OBJ_")==0):false;
var B=false;
if(document.selection){B=document.selection.type=="Text"
}else{if(getSelection()){B=getSelection().toString().length>0
}}return(B&&!A)?false:true
};
DwtComposite.prototype._focusByMouseUpEvent=function(){if(!this._allowSelection){DwtControl.prototype._focusByMouseUpEvent.apply(this,arguments)
}};
DwtComposite.prototype._mouseDownListener=function(A){if(A.button==DwtMouseEvent.LEFT){A._stopPropagation=true;
A._returnValue=true
}};
DwtComposite.prototype._contextMenuListener=function(A){A._stopPropagation=false;
A._returnValue=true
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtShell")){DwtShell=function(E){if(window._dwtShellId){throw new DwtException("DwtShell already exists for window",DwtException.INVALID_OP,"DwtShell")
}var C=E.className||"DwtShell";
DwtComposite.call(this,{className:C});
this.__ctrlInited=true;
document.body.style.margin=0;
if(!E.docBodyScrollable){if(AjxEnv.isIE){document.body.onscroll=DwtShell.__onBodyScroll
}document.body.style.overflow="hidden"
}document.body.onselect=DwtShell._preventDefaultSelectPrt;
document.body.onselectstart=DwtShell._preventDefaultSelectPrt;
document.body.oncontextmenu=DwtShell._preventDefaultPrt;
window.onresize=DwtShell._resizeHdlr;
var D=document.createElement("div");
this._htmlElId=window._dwtShellId=D.id=E.id||Dwt.getNextId();
DwtControl.ALL_BY_ID[this._htmlElId]=this;
D.className=C;
D.style.width=D.style.height="100%";
if(D.style.overflow){D.style.overflow=null
}try{if(E.userShell){document.body.removeChild(E.userShell)
}}catch(B){}document.body.appendChild(D);
if(E.userShell){var A=new DwtControl({parent:this,posStyle:Dwt.ABSOLUTE_STYLE});
A.getHtmlElement().appendChild(E.userShell);
A.setSize("100%","100%");
A.zShow(true)
}this.shell=this;
this._createBusyOverlay(D);
this._veilOverlay=document.createElement("div");
this._veilOverlay.className=(!AjxEnv.isLinux)?"VeilOverlay":"VeilOverlay-linux";
this._veilOverlay.style.position="absolute";
this._veilOverlay.style.cursor=AjxEnv.isIE6up?"not-allowed":"wait";
Dwt.setBounds(this._veilOverlay,0,0,"100%","100%");
Dwt.setZIndex(this._veilOverlay,Dwt.Z_HIDDEN);
this._veilOverlay.veilZ=new Array();
this._veilOverlay.veilZ.push(Dwt.Z_HIDDEN);
this._veilOverlay.dialogZ=new Array();
this._veilOverlay.activeDialogs=new Array();
this._veilOverlay.innerHTML="<table cellspacing=0 cellpadding=0 style='width:100%; height:100%'><tr><td>&nbsp;</td></tr></table>";
D.appendChild(this._veilOverlay);
if(E.useCurtain){this._curtainOverlay=document.createElement("div");
this._curtainOverlay.className="CurtainOverlay";
this._curtainOverlay.style.position="absolute";
Dwt.setBounds(this._curtainOverlay,0,0,"100%","100%");
Dwt.setZIndex(this._curtainOverlay,Dwt.Z_CURTAIN);
this._curtainOverlay.innerHTML="<table cellspacing=0 cellpadding=0 style='width:100%; height:100%'><tr><td>&nbsp;</td></tr></table>";
D.appendChild(this._curtainOverlay)
}this._uiEvent=new DwtUiEvent(true);
this._currWinSize=Dwt.getWindowSize();
this._toolTip=new DwtToolTip(this);
this._hoverMgr=new DwtHoverMgr();
this._keyboardMgr=new DwtKeyboardMgr(this)
};
DwtShell.prototype=new DwtComposite;
DwtShell.prototype.constructor=DwtShell;
DwtShell.CANCEL_BUTTON=-1;
DwtShell.controlEvent=new DwtControlEvent();
DwtShell.focusEvent=new DwtFocusEvent();
DwtShell.keyEvent=new DwtKeyEvent();
DwtShell.mouseEvent=new DwtMouseEvent();
DwtShell.selectionEvent=new DwtSelectionEvent(true);
DwtShell.treeEvent=new DwtTreeEvent();
DwtShell.prototype.toString=function(){return"DwtShell"
};
DwtShell.getShell=function(A){return DwtControl.fromElementId(A._dwtShellId)
};
DwtShell.prototype.getKeyboardMgr=function(){return this._keyboardMgr
};
DwtShell.prototype.setBusy=function(D,E,B,C,A){if(D){this._setBusyCount++
}else{if(this._setBusyCount>0){this._setBusyCount--
}}if(!this._setBusy&&(this._setBusyCount>0)){Dwt.setCursor(this._busyOverlay,"wait");
Dwt.setVisible(this._busyOverlay,true);
this._setBusy=this._blockInput=true
}else{if(this._setBusy&&(this._setBusyCount<=0)){Dwt.setCursor(this._busyOverlay,"default");
Dwt.setVisible(this._busyOverlay,false);
this._setBusy=this._blockInput=false
}}if(D&&B){if(C&&C>0){this._busyActionId[E]=AjxTimedAction.scheduleAction(this._busyTimedAction,C)
}else{this._showBusyDialogAction(E)
}this._cancelBusyCallback=A;
if(this._busyDialog){this._busyDialog.setButtonEnabled(DwtShell.CANCEL_BUTTON,(A!=null))
}}else{if(this._busyActionId[E]&&(this._busyActionId[E]!=-1)){AjxTimedAction.cancelAction(this._busyActionId[E]);
this._busyActionId[E]=-1
}if(this._busyDialog&&this._busyDialog.isPoppedUp){this._busyDialog.popdown()
}}};
DwtShell.prototype.getBusy=function(){return this._setBusy
};
DwtShell.prototype.setBusyDialogText=function(A){this._busyDialogText=A;
if(this._busyDialogTxt){this._busyDialogTxt.innerHTML=(A)?A:""
}};
DwtShell.prototype.setBusyDialogTitle=function(A){this._busyDialogTitle=A;
if(this._busyDialog){this._busyDialog.setTitle((A)?A:AjxMsg.workInProgress)
}};
DwtShell.prototype.getHoverMgr=function(){return this._hoverMgr
};
DwtShell.prototype.getToolTip=function(){return this._toolTip
};
DwtShell.prototype.getH=function(A){return(!this._virtual)?Dwt.getSize(this.getHtmlElement(),A).y:Dwt.getSize(document.body,A).y
};
DwtShell.prototype.getW=function(A){return(!this._virtual)?Dwt.getSize(this.getHtmlElement(),A).x:Dwt.getSize(document.body,A).x
};
DwtShell.prototype.getSize=function(A){return(!this._virtual)?Dwt.getSize(this.getHtmlElement(),A):Dwt.getSize(document.body,A)
};
DwtShell.prototype.getLocation=function(){return(!this._virtual)?Dwt.getLocation(this.getHtmlElement()):Dwt.getLocation(document.body)
};
DwtShell.prototype.getX=function(){return(!this._virtual)?Dwt.getLocation(this.getHtmlElement()).x:Dwt.getLocation(document.body).x
};
DwtShell.prototype.getY=function(){return(!this._virtual)?Dwt.getLocation(this.getHtmlElement()).y:Dwt.getLocation(document.body).y
};
DwtShell.prototype.getBounds=function(A){return(!this._virtual)?Dwt.getBounds(this.getHtmlElement(),A):Dwt.getBounds(document.body,A)
};
DwtShell.prototype.setVirtual=function(){this._virtual=true;
this.setVisible(false)
};
DwtShell.prototype.addFocusListener=function(A){if(!this._hasFocusHandler){var B=document;
if(typeof B.onfocusin!="undefined"){B.attachEvent("onfocusin",DwtShell.__focusHdlr)
}else{window.addEventListener("focus",DwtShell.__focusHdlr,false)
}this._hasFocusHandler=true
}this.addListener(DwtEvent.ONFOCUS,A)
};
DwtShell.prototype.addBlurListener=function(A){if(!this._hasBlurHandler){var B=document;
if(typeof B.onfocusout!="undefined"){B.attachEvent("onfocusout",DwtShell.__blurHdlr)
}else{window.addEventListener("blur",DwtShell.__blurHdlr,false)
}this._hasBlurHandler=true
}this.addListener(DwtEvent.ONBLUR,A)
};
DwtShell.prototype.isVirtual=function(){return this._virtual
};
DwtShell.prototype._showBusyDialogAction=function(B){var A=this._getBusyDialog();
A.popup();
this._busyActionId[B]=-1
};
DwtShell.prototype._createBusyOverlay=function(A){this._busyOverlay=document.createElement("div");
this._busyOverlay.className=(!AjxEnv.isLinux)?"BusyOverlay":"BusyOverlay-linux";
this._busyOverlay.style.position="absolute";
Dwt.setBounds(this._busyOverlay,0,0,"100%","100%");
Dwt.setZIndex(this._busyOverlay,Dwt.Z_VEIL);
this._busyOverlay.innerHTML="<table cellspacing=0 cellpadding=0 style='width:100%; height:100%'><tr><td>&nbsp;</td></tr></table>";
A.appendChild(this._busyOverlay);
Dwt.setVisible(this._busyOverlay,false);
this._busyTimedAction=new AjxTimedAction(this,this._showBusyDialogAction);
this._busyActionId={};
this._setBusyCount=0;
this._setBusy=false
};
DwtShell.prototype._getBusyDialog=function(C){if(!this._busyDialog){var D=new DwtDialog_ButtonDescriptor(DwtShell.CANCEL_BUTTON,AjxMsg.cancelRequest,DwtDialog.ALIGN_CENTER);
this._busyDialog=new DwtDialog({parent:this,className:"DwtShellBusyDialog",title:AjxMsg.workInProgress,standardButtons:DwtDialog.NO_BUTTONS,extraButtons:[D],zIndex:Dwt.BUSY+10});
this._busyDialog.registerCallback(DwtShell.CANCEL_BUTTON,this._busyCancelButtonListener,this);
var B=Dwt.getNextId();
var A=["<table class='DialogContent'><tr>","<td><div class='WaitIcon'></div></td><td class='MsgText' id='",B,"'>&nbsp;</td>","</tr></table>"].join("");
this._busyDialog.setContent(A);
this._busyDialogTxt=document.getElementById(B);
if(this._busyDialogText){this._busyDialogTxt.innerHTML=this._busyDialogText
}if(this._busyDialogTitle){this._busyDialog.setTitle(this._busyDialogTitle)
}this._busyDialog.setButtonEnabled(DwtShell.CANCEL_BUTTON,(this._cancelBusyCallback!=null))
}return this._busyDialog
};
DwtShell.prototype._busyCancelButtonListener=function(A){this._cancelBusyCallback.run();
if(this._busyDialog){this._busyDialog.popdown()
}};
DwtShell._preventDefaultSelectPrt=function(B){var A=DwtControl.fromElementId(window._dwtShellId)._uiEvent;
A.setFromDhtmlEvent(B,true);
if(A.dwtObj&&A.dwtObj instanceof DwtControl&&!A.dwtObj.preventSelection(A.target)){A._stopPropagation=false;
A._returnValue=true
}else{A._stopPropagation=true;
A._returnValue=false
}A.setToDhtmlEvent(B);
return !A._stopPropagation
};
DwtShell._preventDefaultPrt=function(B){B=DwtUiEvent.getEvent(B);
var C=B.target?B.target:B.srcElement;
var A=DwtControl.fromElementId(window._dwtShellId)._uiEvent;
A.setFromDhtmlEvent(B,true);
A._stopPropagation=true;
A._returnValue=false;
if(A.dwtObj&&A.dwtObj instanceof DwtControl&&!A.dwtObj.preventContextMenu(A.target)){A._stopPropagation=false;
A._returnValue=true
}else{if(C!=null&&typeof (C)=="object"){if((C.tagName=="A"||C.tagName=="a")&&C.href){A._stopPropagation=false;
A._returnValue=true
}}}A.setToDhtmlEvent(B);
return A._returnValue
};
DwtShell._resizeHdlr=function(C){var B=DwtControl.fromElementId(window._dwtShellId);
if(B.isListenerRegistered(DwtEvent.CONTROL)){var A=DwtShell.controlEvent;
A.reset();
A.oldWidth=B._currWinSize.x;
A.oldHeight=B._currWinSize.y;
B._currWinSize=Dwt.getWindowSize();
A.newWidth=B._currWinSize.x;
A.newHeight=B._currWinSize.y;
B.notifyListeners(DwtEvent.CONTROL,A)
}else{B._currWinSize=Dwt.getWindowSize()
}};
DwtShell.__onBodyScroll=function(){document.body.scrollTop=0;
document.body.scrollLeft=0
};
DwtShell.__focusHdlr=function(){var B=DwtShell.focusEvent;
var A=DwtShell.getShell(window);
B.dwtObj=A;
B.state=DwtFocusEvent.FOCUS;
A.notifyListeners(DwtEvent.ONFOCUS,B)
};
DwtShell.__blurHdlr=function(){var B=DwtShell.focusEvent;
var A=DwtShell.getShell(window);
B.dwtObj=A;
B.state=DwtFocusEvent.BLUR;
A.notifyListeners(DwtEvent.ONBLUR,B)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtColorPicker")){DwtColorPicker=function(C,B,A,D,E){if(arguments.length==0){return 
}B=B||"DwtColorPicker";
DwtControl.call(this,{parent:C,className:B,posStyle:A});
this._noFillLabel=D;
this._allowColorInput=E;
this._createColorTable();
this._registerEventHdlrs()
};
DwtColorPicker.prototype=new DwtControl;
DwtColorPicker.prototype.constructor=DwtColorPicker;
DwtColorPicker._RGB_RE=/rgb\(([0-9]{1,3}), ([0-9]{1,3}), ([0-9]{1,3})\)/;
DwtColorPicker._HEX_RE=/\#([0-9FCfc]{2})([0-9FCfc]{2})([0-9FCfc]{2})/;
DwtColorPicker._HEX_COMPLETE_RE=/\#([0-9ABCDEFabcdef]{2})([0-9ABCDEFabcdef]{2})([0-9ABCDEFabcdef]{2})/;
DwtColorPicker.prototype.toString=function(){return"DwtColorPicker"
};
DwtColorPicker.prototype.addSelectionListener=function(A){this.addListener(DwtEvent.SELECTION,A)
};
DwtColorPicker.prototype.removeSelectionListener=function(A){this.removeListener(DwtEvent.SELECTION,A)
};
DwtColorPicker.prototype.dispose=function(){if(this._disposed){return 
}DwtControl.prototype.dispose.call(this)
};
DwtColorPicker.prototype._registerEventHdlrs=function(){var F=this.getHtmlElement().firstChild;
var G=F.rows;
var H=G.length;
for(var D=0;
D<H;
D++){var C=G[D].cells;
var E=C.length;
for(var B=0;
B<E;
B++){var A=C[B];
if(G[D].className=="ColorInput"){if(A.className=="ColorInputField"){}else{if(A.className=="SetInputColor"){Dwt.setHandler(A,DwtEvent.ONMOUSEDOWN,DwtColorPicker._mouseDownHdlr);
Dwt.setHandler(A,DwtEvent.ONMOUSEUP,DwtColorPicker._mouseUpHdlr)
}}}else{Dwt.setHandler(A,DwtEvent.ONMOUSEDOWN,DwtColorPicker._mouseDownHdlr);
Dwt.setHandler(A,DwtEvent.ONMOUSEUP,DwtColorPicker._mouseUpHdlr);
if(!AjxEnv.isIE){Dwt.setHandler(A,DwtEvent.ONMOUSEOVER,DwtColorPicker._mouseOverHdlr);
Dwt.setHandler(A,DwtEvent.ONMOUSEOUT,DwtColorPicker._mouseOutHdlr)
}else{Dwt.setHandler(A,DwtEvent.ONMOUSEENTER,DwtColorPicker._mouseOverHdlr);
Dwt.setHandler(A,DwtEvent.ONMOUSELEAVE,DwtColorPicker._mouseOutHdlr)
}if(A.className!="NoFill"){A.style.border="2px outset "+A.style.backgroundColor
}}}}};
DwtColorPicker.prototype._createColorTable=function(){this._tdId=Dwt.getNextId();
var B=new Array(150);
var A=0;
B[A++]="<table cellpadding='0' cellspacing='0' border='0' align='center'>";
if(this._noFillLabel){B[A++]="<tr><td colspan='10' class='NoFill'>"+this._noFillLabel+"</td></tr>"
}B[A++]="<tr>";
B[A++]="<td id='"+this._tdId+"#FFFFFF' style='background-color:#FFFFFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFCCCC' style='background-color:#FFCCCC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFCC99' style='background-color:#FFCC99' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFFF99' style='background-color:#FFFF99' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFFFCC' style='background-color:#FFFFCC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#99FF99' style='background-color:#99FF99' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#99FFFF' style='background-color:#99FFFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#CCFFFF' style='background-color:#CCFFFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#CCCCFF' style='background-color:#CCCCFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFCCFF' style='background-color:#FFCCFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="</tr><tr>";
B[A++]="<td id='"+this._tdId+"#CCCCCC' style='background-color:#CCCCCC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FF6666' style='background-color:#FF6666' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FF9966' style='background-color:#FF9966' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFFF66' style='background-color:#FFFF66' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFFF33' style='background-color:#FFFF33' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#66FF99' style='background-color:#66FF99' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#33FFFF' style='background-color:#33FFFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#66FFFF' style='background-color:#66FFFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#9999FF' style='background-color:#9999FF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FF99FF' style='background-color:#FF99FF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="</tr><tr>";
B[A++]="<td id='"+this._tdId+"#C0C0C0' style='background-color:#C0C0C0' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FF0000' style='background-color:#FF0000' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FF9900' style='background-color:#FF9900' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFCC66' style='background-color:#FFCC66' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFFF00' style='background-color:#FFFF00' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#33FF33' style='background-color:#33FF33' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#66CCCC' style='background-color:#66CCCC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#33CCFF' style='background-color:#33CCFF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#6666CC' style='background-color:#6666CC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#CC66CC' style='background-color:#CC66CC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="</tr><tr>";
B[A++]="<td id='"+this._tdId+"#999999' style='background-color:#999999' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#CC0000' style='background-color:#CC0000' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FF6600' style='background-color:#FF6600' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFCC33' style='background-color:#FFCC33' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#FFCC00' style='background-color:#FFCC00' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#33CC00' style='background-color:#33CC00' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#00CCCC' style='background-color:#00CCCC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#3366FF' style='background-color:#3366FF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#6633FF' style='background-color:#6633FF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#CC33CC' style='background-color:#CC33CC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="</tr><tr>";
B[A++]="<td id='"+this._tdId+"#666666' style='background-color:#666666' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#990000' style='background-color:#990000' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#CC6600' style='background-color:#CC6600' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#CC9933' style='background-color:#CC9933' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#999900' style='background-color:#999900' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#009900' style='background-color:#009900' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#339999' style='background-color:#339999' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#3333FF' style='background-color:#3333FF' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#6600CC' style='background-color:#6600CC' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#993399' style='background-color:#993399' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="</tr><tr>";
B[A++]="<td id='"+this._tdId+"#333333' style='background-color:#333333' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#660000' style='background-color:#660000' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#993300' style='background-color:#993300' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#996633' style='background-color:#996633' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#666600' style='background-color:#666600' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#006600' style='background-color:#006600' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#336666' style='background-color:#336666' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#000099' style='background-color:#000099' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#333399' style='background-color:#333399' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#663366' style='background-color:#663366' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="</tr><tr>";
B[A++]="<td id='"+this._tdId+"#000000' style='background-color:#000000' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#330000' style='background-color:#330000' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#663300' style='background-color:#663300' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#663333' style='background-color:#663333' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#333300' style='background-color:#333300' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#003300' style='background-color:#003300' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#003333' style='background-color:#003333' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#000066' style='background-color:#000066' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#330099' style='background-color:#330099' width='12' height='14'><img height='1' width='1'/></td>";
B[A++]="<td id='"+this._tdId+"#330033' style='background-color:#330033' width='12' height='14'><img height='1' width='1'/></td>";
if(this._allowColorInput){B[A++]="<tr><td></td></tr></tr><tr class='ColorInput'>";
B[A++]="<td colspan=6 id='"+this._tdId+".ColorInputField' class='ColorInputField'><input type=text size=15 maxlength=6 ></input></td><td colspan=4 id='"+this._tdId+".SetInputColor' class='SetInputColor'>"+AjxMsg.setColor+"</td>"
}B[A++]="</tr></table>";
this.getHtmlElement().innerHTML=B.join("")
};
DwtColorPicker._mouseOverHdlr=function(C){var B=DwtShell.mouseEvent;
B.setFromDhtmlEvent(C,true);
var D=B.target;
if(D.nodeName.toLowerCase()=="img"){D=D.parentNode
}if(B.dwtObj._downTdId==D.id){var A=D.style.backgroundColor;
D.style.backgroundColor=B.dwtObj._swappedColor;
B.dwtObj._swappedColor=A;
D.style.borderStyle="inset";
D.style.borderColor=A
}this._stopPropagation=true;
this._returnValue=false;
B.setToDhtmlEvent(C);
return false
};
DwtColorPicker._mouseOutHdlr=function(C){var B=DwtShell.mouseEvent;
B.setFromDhtmlEvent(C,true);
var D=B.target;
if(D.nodeName.toLowerCase()=="img"){D=D.parentNode
}if(B.dwtObj._downTdId==D.id){var A=D.style.backgroundColor;
D.style.backgroundColor=B.dwtObj._swappedColor;
B.dwtObj._swappedColor=A;
D.style.borderStyle="outset";
D.style.borderColor=A;
B.dwtObj._downTdId=null
}this._stopPropagation=true;
this._returnValue=false;
B.setToDhtmlEvent(C);
return false
};
DwtColorPicker._mouseDownHdlr=function(G){var F=DwtShell.mouseEvent;
F.setFromDhtmlEvent(G,true);
var H=F.target;
if(H.nodeName.toLowerCase()=="img"){H=H.parentNode
}var C=F.target.style.backgroundColor;
var B;
var E,D,A;
F.dwtObj._downTdId=H.id;
F.dwtObj._swappedColor=C;
H.style.borderStyle="inset";
if((H.className!="NoFill")&&(H.className!="SetInputColor")){if(C.substr(0,1)=="#"){B=C.match(DwtColorPicker._HEX_RE);
B[1]=DwtColorPicker._hexConv(B[1]);
B[2]=DwtColorPicker._hexConv(B[2]);
B[3]=DwtColorPicker._hexConv(B[3])
}else{B=C.match(DwtColorPicker._RGB_RE)
}E=Math.max(Math.floor(B[1]-(B[1]*0.25)),0);
D=Math.max(Math.floor(B[2]-(B[2]*0.25)),0);
A=Math.max(Math.floor(B[3]-(B[3]*0.25)),0);
C="rgb("+E+","+D+","+A+")";
H.style.backgroundColor=C
}F._stopPropagation=true;
F._returnValue=false;
F.setToDhtmlEvent(G);
return false
};
DwtColorPicker._hexConv=function(A){if(A=="00"){return 0
}else{if(A=="33"){return 51
}else{if(A=="66"){return 102
}else{if(A=="99"){return 153
}else{if(A.toUpperCase()=="CC"){return 204
}else{if(A.toUpperCase()=="FF"){return 255
}else{if(A.toUpperCase()=="C0"){return 192
}}}}}}}};
DwtColorPicker._mouseUpHdlr=function(C){var B=DwtShell.mouseEvent;
B.setFromDhtmlEvent(C,true);
var A=B.dwtObj;
var E=B.target;
if(E.nodeName.toLowerCase()=="img"){E=E.parentNode
}if(A._downTdId==E.id){E.style.borderStyle="outset";
E.style.borderColor=B.dwtObj._swappedColor;
E.style.backgroundColor=B.dwtObj._swappedColor
}if(A._downTdId==E.id){if(A.parent instanceof DwtMenu){DwtMenu.closeActiveMenu()
}if(A.isListenerRegistered(DwtEvent.SELECTION)){var D=DwtShell.selectionEvent;
DwtUiEvent.copy(D,B);
D.item=A;
if(E.id==(A._tdId+".SetInputColor")){D.detail=A.getInputColor()
}else{D.detail=B.target.id.substr(B.target.id.indexOf("#"))
}A.notifyListeners(DwtEvent.SELECTION,D)
}}A._downTdId=null;
B._stopPropagation=true;
B._returnValue=false;
B.setToDhtmlEvent(C);
return false
};
DwtColorPicker.prototype.getInputColor=function(){var A=document.getElementById(this._tdId+".ColorInputField").firstChild;
var B="#"+A.value;
if(B.match(DwtColorPicker._HEX_COMPLETE_RE)!=null){return B
}else{return""
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtBaseDialog")){DwtBaseDialog=function(B){if(arguments.length==0){return 
}B=Dwt.getParams(arguments,DwtBaseDialog.PARAMS);
var A=B.parent;
if(!(A instanceof DwtShell)){throw new DwtException("DwtBaseDialog parent must be a DwtShell",DwtException.INVALIDPARENT,"DwtDialog")
}B.className=B.className||"DwtBaseDialog";
B.posStyle=DwtControl.ABSOLUTE_STYLE;
this._title=B.title||"";
DwtComposite.call(this,B);
this._shell=A;
this._zIndex=B.zIndex||Dwt.Z_DIALOG;
this._mode=B.mode||DwtBaseDialog.MODAL;
this._loc=new DwtPoint();
if(B.loc){this._loc.x=B.loc.x;
this._loc.y=B.loc.y
}else{this._loc.x=this._loc.y=Dwt.LOC_NOWHERE
}this._tabGroup=new DwtTabGroup(this.toString(),true);
this._dragHandleId=B.dragHandleId||this._htmlElId+"_handle";
this._createHtml();
this._initializeDragging(this._dragHandleId);
if(B.view){this.setView(B.view)
}this.setZIndex(Dwt.Z_HIDDEN);
this._positionDialog(DwtBaseDialog.__nowhereLoc)
};
DwtBaseDialog.PARAMS=["parent","className","title","zIndex","mode","loc","view","dragHandleId"];
DwtBaseDialog.prototype=new DwtComposite;
DwtBaseDialog.prototype.constructor=DwtBaseDialog;
DwtBaseDialog.prototype.toString=function(){return"DwtBaseDialog"
};
DwtBaseDialog.MODELESS=1;
DwtBaseDialog.MODAL=2;
DwtBaseDialog.__nowhereLoc=new DwtPoint(Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
DwtBaseDialog.prototype.TEMPLATE="dwt.Widgets#DwtBaseDialog";
DwtBaseDialog.prototype.CONTROLS_TEMPLATE=null;
DwtBaseDialog.prototype.addPopupListener=function(A){this.addListener(DwtEvent.POPUP,A)
};
DwtBaseDialog.prototype.removePopupListener=function(A){this.removeListener(DwtEvent.POPUP,A)
};
DwtBaseDialog.prototype.addPopdownListener=function(A){this.addListener(DwtEvent.POPDOWN,A)
};
DwtBaseDialog.prototype.removePopdownListener=function(A){this.removeListener(DwtEvent.POPDOWN,A)
};
DwtBaseDialog.prototype.popup=function(B){if(this._poppedUp){return 
}this.applyCaretHack();
this.cleanup(true);
var A=this._zIndex;
if(this._mode==DwtBaseDialog.MODAL){A=this._setModalEffect(A)
}this._shell._veilOverlay.activeDialogs.push(this);
if(B){this._loc.x=B.x;
this._loc.y=B.y;
this._positionDialog(B)
}else{this._positionDialog()
}this.setZIndex(A);
this._poppedUp=true;
var C=this._shell.getKeyboardMgr();
C.pushTabGroup(this._tabGroup);
C.pushDefaultHandler(this);
this._tabGroup.resetFocusMember(true);
this.notifyListeners(DwtEvent.POPUP,this)
};
DwtBaseDialog.prototype.focus=function(){if(this.isListenerRegistered(DwtEvent.ONFOCUS)){this.notifyListeners(DwtEvent.ONFOCUS)
}else{if(this._focusElementId){var A=document.getElementById(this._focusElementId);
if(A){A.focus()
}}}};
DwtBaseDialog.prototype.isPoppedUp=function(){return this._poppedUp
};
DwtBaseDialog.prototype.popdown=function(){if(this._poppedUp){this._poppedUp=false;
this.cleanup(false);
var A=this._zIndex;
this.setZIndex(Dwt.Z_HIDDEN);
this._positionDialog(DwtBaseDialog.__nowhereLoc);
if(this._mode==DwtBaseDialog.MODAL){this._undoModality(A)
}else{this._shell._veilOverlay.activeDialogs.pop()
}var B=this._shell.getKeyboardMgr();
B.popTabGroup(this._tabGroup);
B.popDefaultHandler();
this.notifyListeners(DwtEvent.POPDOWN,this)
}};
DwtBaseDialog.prototype.setView=function(A){this.reset();
if(A){this._getContentDiv().appendChild(A.getHtmlElement())
}};
DwtBaseDialog.prototype.reset=function(){this._loc.x=this._loc.y=Dwt.LOC_NOWHERE
};
DwtBaseDialog.prototype.cleanup=function(B){var D=this._getInputFields();
if(D){var A=D.length;
for(var C=0;
C<A;
C++){D[C].disabled=!B;
if(B){D[C].value=""
}}}};
DwtBaseDialog.prototype.setTitle=function(A){if(this._titleEl){this._titleEl.innerHTML=A||""
}};
DwtBaseDialog.prototype.setContent=function(B){var A=this._getContentDiv();
if(A){A.innerHTML=B||""
}};
DwtBaseDialog.prototype._getContentDiv=function(){return this._contentEl
};
DwtBaseDialog.prototype.addEnterListener=function(A){this.addListener(DwtEvent.ENTER,A)
};
DwtBaseDialog.getActiveDialog=function(){var B=null;
var C=DwtShell.getShell(window);
if(C){var A=C._veilOverlay.activeDialogs.length;
if(A>0){B=C._veilOverlay.activeDialogs[A-1]
}}return B
};
DwtBaseDialog.prototype._initializeDragging=function(H){var B=document.getElementById(H);
if(B){var F=Dwt.getSize(DwtControl.fromElementId(window._dwtShellId).getHtmlElement());
var E=document.getElementById(this._htmlElId);
var C=this.getSize();
var A=new AjxCallback(this,this._dragEnd);
var D=new AjxCallback(this,this._duringDrag);
var G=new AjxCallback(this,this._dragStart);
DwtDraggable.init(B,E,0,document.body.offsetWidth-10,0,document.body.offsetHeight-10,G,D,A)
}};
DwtBaseDialog.prototype._getContentHtml=function(){return""
};
DwtBaseDialog.prototype._createHtml=function(A){var B={id:this._htmlElId};
this._createHtmlFromTemplate(A||this.TEMPLATE,B)
};
DwtBaseDialog.prototype._createHtmlFromTemplate=function(A,B){B.dragId=this._dragHandleId;
B.title=this._title;
B.icon="";
B.closeIcon1="";
B.closeIcon2="";
B.controlsTemplateId=this.CONTROLS_TEMPLATE;
DwtComposite.prototype._createHtmlFromTemplate.call(this,A,B);
this._titleBarEl=document.getElementById(B.id+"_titlebar");
this._titleEl=document.getElementById(B.id+"_title");
this._contentEl=document.getElementById(B.id+"_content");
this.setContent(this._getContentHtml())
};
DwtBaseDialog.prototype._setModalEffect=function(){var C=this._shell._veilOverlay.dialogZ;
var D=null;
var B,A;
if(C.length){D=C[C.length-1]
}if(D){B=D+2;
A=D+1
}else{B=this._zIndex;
A=Dwt.Z_VEIL
}this._shell._veilOverlay.veilZ.push(A);
this._shell._veilOverlay.dialogZ.push(B);
Dwt.setZIndex(this._shell._veilOverlay,A);
return B
};
DwtBaseDialog.prototype._undoModality=function(C){var A=this._shell._veilOverlay.veilZ;
A.pop();
var B=A[A.length-1];
Dwt.setZIndex(this._shell._veilOverlay,B);
this._shell._veilOverlay.dialogZ.pop();
this._shell._veilOverlay.activeDialogs.pop();
if(this._shell._veilOverlay.activeDialogs.length>0){this._shell._veilOverlay.activeDialogs[0].focus()
}};
DwtBaseDialog.prototype._positionDialog=function(D){var C=this._shell.getSize();
var B=this.getSize();
var A,E;
if(D==null){A=Math.round((C.x-B.x)/2);
E=Math.round((C.y-B.y)/2)
}else{A=D.x;
E=D.y
}if((A+B.x)>C.x){A=C.x-B.x
}if((E+B.y)>C.y){E=C.y-B.y
}this.setLocation(A,E)
};
DwtBaseDialog.prototype._getInputFields=function(){};
DwtBaseDialog.prototype._dragStart=function(A,B){if(AjxEnv.isNav){this._currSize=this.getSize();
DwtDraggable.setDragBoundaries(DwtDraggable.dragEl,0,document.body.offsetWidth-this._currSize.x,0,document.body.offsetHeight-this._currSize.y)
}};
DwtBaseDialog.prototype._dragEnd=function(A,B){this._loc.x=A;
this._loc.y=B
};
DwtBaseDialog.prototype._duringDrag=function(A,B){};
DwtBaseDialog.prototype._doesContainElement=function(A){return Dwt.contains(this.getHtmlElement(),A)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtDialog")){DwtDialog=function(B){if(arguments.length==0){return 
}B=Dwt.getParams(arguments,DwtDialog.PARAMS);
B.className=B.className||"DwtDialog";
this._title=B.title=B.title||"";
var C=B.standardButtons;
var I=B.extraButtons;
if(!C){C=[DwtDialog.OK_BUTTON,DwtDialog.CANCEL_BUTTON]
}else{if(C==DwtDialog.NO_BUTTONS){C=null
}}this._buttonList=[];
var K={};
K[DwtDialog.ALIGN_LEFT]=[];
K[DwtDialog.ALIGN_CENTER]=[];
K[DwtDialog.ALIGN_RIGHT]=[];
if(C||I){this._buttonDesc={};
if(C&&C.length){this._enterButtonId=C[0];
for(var D=0;
D<C.length;
D++){var H=C[D];
this._buttonList.push(H);
var G=DwtDialog.ALIGN[H];
if(G){K[G].push(H)
}this._buttonDesc[H]=new DwtDialog_ButtonDescriptor(H,AjxMsg[DwtDialog.MSG_KEY[H]],G)
}this._resetCallbacks()
}if(I&&I.length){if(!this._enterButtonId){this._enterButtonId=I[0]
}for(var D=0;
D<I.length;
D++){var H=I[D].id;
this._buttonList.push(H);
var G=I[D].align;
if(G){K[G].push(H)
}this._buttonDesc[H]=I[D]
}}}this._buttonElementId={};
for(var D=0;
D<this._buttonList.length;
D++){this._buttonElementId[this._buttonList[D]]=Dwt.getNextId()
}DwtBaseDialog.call(this,B);
this._button={};
for(var D=0;
D<this._buttonList.length;
D++){var H=this._buttonList[D];
var J=this._button[H]=new DwtButton({parent:this});
J.setText(this._buttonDesc[H].label);
J.buttonId=H;
J.addSelectionListener(new AjxListener(this,this._buttonListener));
var A=document.getElementById(this._buttonElementId[H]);
if(A){A.appendChild(J.getHtmlElement())
}}var F=K[DwtDialog.ALIGN_LEFT].concat(K[DwtDialog.ALIGN_CENTER],K[DwtDialog.ALIGN_RIGHT]);
for(var D=0;
D<F.length;
D++){var E=this._button[F[D]];
this._tabGroup.addMember(E)
}};
DwtDialog.PARAMS=["parent","className","title","standardButtons","extraButtons","zIndex","mode","loc"];
DwtDialog.prototype=new DwtBaseDialog;
DwtDialog.prototype.constructor=DwtDialog;
DwtDialog.prototype.toString=function(){return"DwtDialog"
};
DwtDialog.ALIGN_LEFT=1;
DwtDialog.ALIGN_RIGHT=2;
DwtDialog.ALIGN_CENTER=3;
DwtDialog.CANCEL_BUTTON=1;
DwtDialog.OK_BUTTON=2;
DwtDialog.DISMISS_BUTTON=3;
DwtDialog.NO_BUTTON=4;
DwtDialog.YES_BUTTON=5;
DwtDialog.LAST_BUTTON=5;
DwtDialog.NO_BUTTONS=256;
DwtDialog.ALL_BUTTONS=[DwtDialog.CANCEL_BUTTON,DwtDialog.OK_BUTTON,DwtDialog.DISMISS_BUTTON,DwtDialog.NO_BUTTON,DwtDialog.YES_BUTTON];
DwtDialog.MSG_KEY={};
DwtDialog.MSG_KEY[DwtDialog.CANCEL_BUTTON]="cancel";
DwtDialog.MSG_KEY[DwtDialog.OK_BUTTON]="ok";
DwtDialog.MSG_KEY[DwtDialog.DISMISS_BUTTON]="dismiss";
DwtDialog.MSG_KEY[DwtDialog.NO_BUTTON]="no";
DwtDialog.MSG_KEY[DwtDialog.YES_BUTTON]="yes";
DwtDialog.ALIGN={};
DwtDialog.ALIGN[DwtDialog.CANCEL_BUTTON]=DwtDialog.ALIGN_RIGHT;
DwtDialog.ALIGN[DwtDialog.OK_BUTTON]=DwtDialog.ALIGN_RIGHT;
DwtDialog.ALIGN[DwtDialog.DISMISS_BUTTON]=DwtDialog.ALIGN_RIGHT;
DwtDialog.ALIGN[DwtDialog.NO_BUTTON]=DwtDialog.ALIGN_RIGHT;
DwtDialog.ALIGN[DwtDialog.YES_BUTTON]=DwtDialog.ALIGN_RIGHT;
DwtDialog.MODELESS=DwtBaseDialog.MODELESS;
DwtDialog.MODAL=DwtBaseDialog.MODAL;
DwtDialog.prototype.CONTROLS_TEMPLATE="dwt.Widgets#DwtDialogControls";
DwtDialog.prototype.popdown=function(){DwtBaseDialog.prototype.popdown.call(this);
this.resetButtonStates()
};
DwtDialog.prototype.reset=function(){this._resetCallbacks();
this.resetButtonStates();
DwtBaseDialog.prototype.reset.call(this)
};
DwtDialog.prototype.resetButtonStates=function(){for(b in this._button){this._button[b].setEnabled(true);
this._button[b].setHovered(false)
}};
DwtDialog.prototype.getButton=function(A){return this._button[A]
};
DwtDialog.prototype.setButtonEnabled=function(B,A){this._button[B].setEnabled(A)
};
DwtDialog.prototype.setButtonVisible=function(A,B){this._button[A].setVisible(B)
};
DwtDialog.prototype.getButtonEnabled=function(A){return this._button[A].getEnabled()
};
DwtDialog.prototype.registerCallback=function(B,C,D,A){var E=(C instanceof AjxCallback)?C:new AjxCallback(D,C,A);
this._buttonDesc[B].callback=E
};
DwtDialog.prototype.unregisterCallback=function(A){this._buttonDesc[A].callback=null
};
DwtDialog.prototype.setButtonListener=function(A,B){this._button[A].removeSelectionListeners();
this._button[A].addSelectionListener(B)
};
DwtDialog.prototype.setEnterListener=function(A){this.removeAllListeners(DwtEvent.ENTER);
this.addEnterListener(A)
};
DwtDialog.prototype.associateEnterWithButton=function(A){this._enterButtonId=A
};
DwtDialog.prototype.getKeyMapName=function(){return"DwtDialog"
};
DwtDialog.prototype.handleKeyAction=function(A,B){switch(A){case DwtKeyMap.ENTER:this.notifyListeners(DwtEvent.ENTER,B);
break;
case DwtKeyMap.CANCEL:var C=false;
C=C||this._runCallbackForButtonId(DwtDialog.CANCEL_BUTTON);
C=C||this._runCallbackForButtonId(DwtDialog.NO_BUTTON);
C=C||this._runCallbackForButtonId(DwtDialog.DISMISS_BUTTON);
this.popdown();
return true;
default:return false
}return true
};
DwtDialog.prototype._createHtmlFromTemplate=function(C,E){DwtBaseDialog.prototype._createHtmlFromTemplate.call(this,C,E);
var D=E.id+"_focus";
if(document.getElementById(D)){this._focusElementId=D
}this._buttonsEl=document.getElementById(E.id+"_buttons");
if(this._buttonsEl){var B=[];
var A=0;
this._addButtonsHtml(B,A);
this._buttonsEl.innerHTML=B.join("")
}};
DwtDialog.prototype._getButtonsContainerStartTemplate=function(){return"<table cellspacing='0' cellpadding='0' border='0' width='100%'><tr>"
};
DwtDialog.prototype._getButtonsAlignStartTemplate=function(){return"<td align=\"{0}\"><table cellspacing='5' cellpadding='0' border='0'><tr>"
};
DwtDialog.prototype._getButtonsAlignEndTemplate=function(){return"</tr></table></td>"
};
DwtDialog.prototype._getButtonsCellTemplate=function(){return'<td id="{0}"></td>'
};
DwtDialog.prototype._getButtonsContainerEndTemplate=function(){return"</tr></table>"
};
DwtDialog.prototype._addButtonsHtml=function(F,B){if(this._buttonList&&this._buttonList.length){var C=new Array();
var A=new Array();
var E=new Array();
for(var D=0;
D<this._buttonList.length;
D++){var G=this._buttonList[D];
switch(this._buttonDesc[G].align){case DwtDialog.ALIGN_RIGHT:A.push(G);
break;
case DwtDialog.ALIGN_LEFT:C.push(G);
break;
case DwtDialog.ALIGN_CENTER:E.push(G);
break
}}F[B++]=this._getButtonsContainerStartTemplate();
if(C.length){F[B++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["left"]);
for(var D=0;
D<C.length;
D++){var G=C[D];
var H=this._buttonDesc[G].cellTemplate?this._buttonDesc[G].cellTemplate:this._getButtonsCellTemplate();
F[B++]=AjxMessageFormat.format(H,[this._buttonElementId[G]])
}F[B++]=this._getButtonsAlignEndTemplate()
}if(E.length){F[B++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["center"]);
for(var D=0;
D<E.length;
D++){var G=E[D];
var H=this._buttonDesc[G].cellTemplate?this._buttonDesc[G].cellTemplate:this._getButtonsCellTemplate();
F[B++]=AjxMessageFormat.format(H,[this._buttonElementId[G]])
}F[B++]=this._getButtonsAlignEndTemplate()
}if(A.length){F[B++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["right"]);
for(var D=0;
D<A.length;
D++){var G=A[D];
var H=this._buttonDesc[G].cellTemplate?this._buttonDesc[G].cellTemplate:this._getButtonsCellTemplate();
F[B++]=AjxMessageFormat.format(H,[this._buttonElementId[G]])
}F[B++]=this._getButtonsAlignEndTemplate()
}F[B++]=this._getButtonsContainerEndTemplate()
}return B
};
DwtDialog.prototype._buttonListener=function(C,A){var D=DwtControl.getTargetControl(C);
var B=D.buttonId;
this._runCallbackForButtonId(B,A)
};
DwtDialog.prototype._runCallbackForButtonId=function(D,A){var B=this._buttonDesc[D];
var C=B&&B.callback;
if(!C){return false
}A=(A instanceof Array)?A:[A];
C.run.apply(C,A);
return true
};
DwtDialog.prototype._runEnterCallback=function(A){if(this._enterButtonId&&this.getButtonEnabled(this._enterButtonId)){this._runCallbackForButtonId(this._enterButtonId,A)
}};
DwtDialog.prototype._resetCallbacks=function(){if(this._buttonDesc){for(var A=0;
A<DwtDialog.ALL_BUTTONS.length;
A++){var B=DwtDialog.ALL_BUTTONS[A];
if(this._buttonDesc[B]){this._buttonDesc[B].callback=new AjxCallback(this,this.popdown)
}}}};
DwtDialog_ButtonDescriptor=function(E,A,D,C,B){this.id=E;
this.label=A;
this.align=D;
this.callback=C;
this.cellTemplate=B
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtLabel")){DwtLabel=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtLabel.PARAMS);
A.className=A.className||"DwtLabel";
DwtControl.call(this,A);
this._style=A.style||(DwtLabel.IMAGE_LEFT|DwtLabel.ALIGN_CENTER);
this._textBackground=null;
this._textForeground=null;
this._createHtml()
};
DwtLabel.PARAMS=["parent","style","className","posStyle","id","index"];
DwtLabel.prototype=new DwtControl;
DwtLabel.prototype.constructor=DwtLabel;
DwtLabel.prototype.toString=function(){return"DwtLabel"
};
DwtLabel.IMAGE_LEFT=1;
DwtLabel.IMAGE_RIGHT=2;
DwtLabel.ALIGN_LEFT=4;
DwtLabel.ALIGN_RIGHT=8;
DwtLabel.ALIGN_CENTER=16;
DwtLabel._LAST_STYLE=16;
DwtLabel.prototype.TEMPLATE="dwt.Widgets#ZLabel";
DwtLabel.prototype.dispose=function(){delete this._dropDownEl;
delete this._iconEl;
delete this._textEl;
DwtControl.prototype.dispose.call(this)
};
DwtLabel.prototype.setEnabled=function(A){if(A!=this._enabled){DwtControl.prototype.setEnabled.call(this,A);
this.__setImage(this.__imageInfo)
}};
DwtLabel.prototype.getImage=function(){return this.__imageInfo
};
DwtLabel.prototype.setImage=function(A){this.__imageInfo=A;
this.__setImage(A)
};
DwtLabel.prototype.setDisabledImage=function(A){};
DwtLabel.prototype.getText=function(){return(this.__text!=null)?this.__text:null
};
DwtLabel.prototype.setText=function(A){if(!this._textEl){return 
}if(A==null||A==""){this.__text=null;
this._textEl.innerHTML=""
}else{this.__text=A;
this._textEl.innerHTML=A
}};
DwtLabel.prototype.setTextBackground=function(A){this._textBackground=A;
if(this._textEl){this._textEl.style.backgroundColor=A
}};
DwtLabel.prototype.setTextForeground=function(A){this._textForeground=A;
if(this._textEl){this._textEl.style.color=A
}};
DwtLabel.prototype.setAlign=function(A){this._style=A;
this.__setImage(this.__imageInfo)
};
DwtLabel.prototype.isStyle=function(A){return this._style&A
};
DwtLabel.prototype._createHtml=function(A){var B={id:this._htmlElId};
this._createHtmlFromTemplate(A||this.TEMPLATE,B)
};
DwtLabel.prototype._createHtmlFromTemplate=function(A,B){DwtControl.prototype._createHtmlFromTemplate.call(this,A,B);
this._textEl=document.getElementById(B.id+"_title")
};
DwtLabel.prototype._getIconEl=function(){var A=(this._style&DwtLabel.IMAGE_RIGHT?"right":"left");
return this._iconEl||(this._iconEl=document.getElementById(this._htmlElId+"_"+A+"_icon"))
};
DwtLabel.prototype.__setImage=function(B){var A=this._getIconEl();
if(A){AjxImg.setImage(A,B,null,!this._enabled);
var C=(this._style&DwtLabel.IMAGE_RIGHT?"ZHasRightIcon":"ZHasLeftIcon");
Dwt.addClass(this.getHtmlElement(),C)
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtCheckbox")){DwtCheckbox=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtCheckbox.PARAMS);
A.className=A.className||"DwtCheckbox";
DwtControl.call(this,A);
this._initName=A.name;
this._initChecked=A.checked;
this._createHtml()
};
DwtCheckbox.PARAMS=["parent","style","name","checked","className","posStyle","id","index"];
DwtCheckbox.prototype=new DwtControl;
DwtCheckbox.prototype.constructor=DwtCheckbox;
DwtCheckbox.prototype.toString=function(){return"DwtCheckbox"
};
DwtCheckbox.TEXT_LEFT="left";
DwtCheckbox.TEXT_RIGHT="right";
DwtCheckbox.DEFAULT_POSITION=DwtCheckbox.TEXT_RIGHT;
DwtCheckbox.prototype.TEMPLATE="dwt.Widgets#DwtCheckbox";
DwtCheckbox.prototype._textPosition=DwtCheckbox.DEFAULT_POSITION;
DwtCheckbox.prototype.getTabGroupMember=function(){return this._inputEl
};
DwtCheckbox.prototype.focus=function(){if(this._inputEl){this._inputEl.focus();
DwtShell.getShell(window).getKeyboardMgr().grabFocus(this.getTabGroupMember())
}};
DwtCheckbox.prototype.blur=function(){if(this._inputEl){this._inputEl.blur()
}};
DwtCheckbox.prototype.addSelectionListener=function(A){this.addListener(DwtEvent.SELECTION,A)
};
DwtCheckbox.prototype.removeSelectionListener=function(A){this.removeListener(DwtEvent.SELECTION,A)
};
DwtCheckbox.prototype.setEnabled=function(A){if(A!=this._enabled){DwtControl.prototype.setEnabled.call(this,A);
this._inputEl.disabled=!A;
var B=A?"Text":"DisabledText";
if(this._textElLeft){this._textElLeft.className=B
}if(this._textElRight){this._textElRight.className=B
}}};
DwtCheckbox.prototype.setSelected=function(A){if(this._inputEl&&this._inputEl.checked!=A){this._inputEl.checked=A
}};
DwtCheckbox.prototype.isSelected=function(){return this._inputEl&&this._inputEl.checked
};
DwtCheckbox.prototype.setText=function(A){if(this._textEl&&this._text!=A){this._text=A;
this._textEl.innerHTML=A||""
}};
DwtCheckbox.prototype.getText=function(){return this._text
};
DwtCheckbox.prototype.setTextPosition=function(A){this._textEl=A==DwtCheckbox.TEXT_LEFT?this._textElLeft:this._textElRight;
if(this._textPosition!=A){this._textPosition=A;
if(this._textElLeft){this._textElLeft.innerHTML=""
}if(this._textElRight){this._textElRight.innerHTML=""
}this.setText(this._text)
}};
DwtCheckbox.prototype.getTextPosition=function(){return this._textPosition
};
DwtCheckbox.prototype.setValue=function(A){if(this._value!=A){this._value=A;
if(this._inputEl){this._inputEl.value=A
}}};
DwtCheckbox.prototype.getValue=function(){return this._value!=null?this._value:this._text
};
DwtCheckbox.prototype.getInputElement=function(){return this._inputEl
};
DwtCheckbox.prototype._replaceElementHook=function(B,C,A,D){C=this.getInputElement();
DwtControl.prototype._replaceElementHook.call(this,B,C,A,D);
if(B.id){C.id=B.id;
if(this._textEl){this._textEl.setAttribute("for",B.id)
}}};
DwtCheckbox.prototype._createHtml=function(A){var B={id:this._htmlElId};
this._createHtmlFromTemplate(A||this.TEMPLATE,B)
};
DwtCheckbox.prototype._createHtmlFromTemplate=function(B,C){C.name=this._initName||this._htmlElId;
C.checked=Boolean(this._initChecked)?"checked":"";
DwtControl.prototype._createHtmlFromTemplate.call(this,B,C);
this._inputEl=document.getElementById(C.id+"_input");
if(this._inputEl){var A=DwtShell.getShell(window).getKeyboardMgr();
var D=AjxCallback.simpleClosure(A.grabFocus,A,this.getTabGroupMember());
Dwt.setHandler(this._inputEl,DwtEvent.ONFOCUS,D);
Dwt.setHandler(this._inputEl,DwtEvent.ONCLICK,DwtCheckbox.__handleClick)
}this._textElLeft=document.getElementById(C.id+"_text_left");
this._textElRight=document.getElementById(C.id+"_text_right");
this.setTextPosition(this._textPosition)
};
DwtCheckbox.__handleClick=function(A){var B=DwtUiEvent.getEvent(A);
var E=DwtUiEvent.getTarget(B);
var D=DwtShell.selectionEvent;
DwtUiEvent.copy(D,B);
D.item=this;
D.detail=E.checked;
var C=DwtControl.findControl(E);
C.setSelected(E.checked);
C.notifyListeners(DwtEvent.SELECTION,D)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtRadioButton")){DwtRadioButton=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtRadioButton.PARAMS);
A.className=A.className||"DwtRadioButton";
DwtCheckbox.call(this,A)
};
DwtRadioButton.PARAMS=["parent","style","name","checked","className","posStyle","id","index"];
DwtRadioButton.prototype=new DwtCheckbox;
DwtRadioButton.prototype.constructor=DwtRadioButton;
DwtRadioButton.prototype.toString=function(){return"DwtRadioButton"
};
DwtRadioButton.prototype.TEMPLATE="dwt.Widgets#DwtRadioButton"
}if(AjxPackage.define("ajax.dwt.widgets.DwtListView")){DwtListView=function(B){if(arguments.length==0){return 
}B=Dwt.getParams(arguments,DwtListView.PARAMS);
B.className=B.className||"DwtListView";
DwtComposite.call(this,B);
this._view=B.view||Dwt.getNextId();
if(B.headerList){var A=this.getHtmlElement();
this._listColDiv=document.createElement("div");
this._listColDiv.id=DwtId.getListViewId(this._view,DwtId.LIST_VIEW_HEADERS);
this._listColDiv.className="DwtListView-ColHeader";
A.appendChild(this._listColDiv);
this._listDiv=document.createElement("div");
this._listDiv.id=DwtId.getListViewId(this._view,DwtId.LIST_VIEW_ROWS);
this._listDiv.className="DwtListView-Rows";
A.appendChild(this._listDiv);
this._bSortAsc=false;
this._currentColId=null;
this.sortingEnabled=true
}else{this.setScrollStyle(DwtControl.SCROLL)
}this._setMouseEventHdlrs();
this._listenerMouseOver=new AjxListener(this,this._mouseOverListener);
this._listenerMouseOut=new AjxListener(this,this._mouseOutListener);
this._listenerMouseDown=new AjxListener(this,this._mouseDownListener);
this._listenerMouseUp=new AjxListener(this,this._mouseUpListener);
this._listenerMouseMove=new AjxListener(this,this._mouseMoveListener);
this._listenerDoubleClick=new AjxListener(this,this._doubleClickListener);
this.addListener(DwtEvent.ONMOUSEOVER,this._listenerMouseOver);
this.addListener(DwtEvent.ONMOUSEOUT,this._listenerMouseOut);
this.addListener(DwtEvent.ONMOUSEDOWN,this._listenerMouseDown);
this.addListener(DwtEvent.ONMOUSEUP,this._listenerMouseUp);
this.addListener(DwtEvent.ONMOUSEMOVE,this._listenerMouseMove);
this.addListener(DwtEvent.ONDBLCLICK,this._listenerDoubleClick);
this._evtMgr=new AjxEventMgr();
this._selectedItems=new AjxVector();
this._selAnchor=null;
this._kbAnchor=null;
this._selEv=new DwtSelectionEvent(true);
this._actionEv=new DwtListViewActionEvent(true);
this._stateChangeEv=new DwtEvent(true);
this._headerList=B.headerList;
this._noMaximize=B.noMaximize;
this._parentEl=this._headerList?this._listDiv:this.getHtmlElement();
this._list=null;
this.offset=0;
this.headerColCreated=false;
this.multiSelectEnabled=true;
this.firstSelIndex=-1;
this._tmpPoint=new DwtPoint(0,0);
this._data={};
this._rowClass=[this._className,DwtListView.ROW_CLASS].join("");
var C=this._normalClass=DwtListView.ROW_CLASS;
this._selectedClass=[C,DwtCssStyle.SELECTED].join("-");
this._disabledSelectedClass=[this._selectedClass,DwtCssStyle.DISABLED].join("-");
this._kbFocusClass=[C,DwtCssStyle.FOCUSED].join("-");
this._dndClass=[C,DwtCssStyle.DRAG_PROXY].join("-");
this._rightClickClass=[this._selectedClass,DwtCssStyle.ACTIONED].join("-");
this._styleRe=this._getStyleRegex()
};
DwtListView.prototype=new DwtComposite;
DwtListView.prototype.constructor=DwtListView;
DwtListView.PARAMS=["parent","className","posStyle","headerList","noMaximize"];
DwtListView.ITEM_SELECTED=1;
DwtListView.ITEM_DESELECTED=2;
DwtListView.ITEM_DBL_CLICKED=3;
DwtListView._LAST_REASON=3;
DwtListView._TOOLTIP_DELAY=250;
DwtListView.HEADERITEM_HEIGHT=24;
DwtListView.TYPE_HEADER_ITEM="1";
DwtListView.TYPE_LIST_ITEM="2";
DwtListView.TYPE_HEADER_SASH="3";
DwtListView.DEFAULT_LIMIT=25;
DwtListView.MAX_REPLENISH_THRESHOLD=10;
DwtListView.MIN_COLUMN_WIDTH=20;
DwtListView.COL_MOVE_THRESHOLD=3;
DwtListView.ROW_CLASS="Row";
DwtListView.ROW_CLASS_ODD="RowEven";
DwtListView.ROW_CLASS_EVEN="RowOdd";
DwtListView._STYLE_CLASS="_sc";
DwtListView._SELECTED_STYLE_CLASS="_ssc";
DwtListView._SELECTED_DIS_STYLE_CLASS="_sdsc";
DwtListView._KBFOCUS_CLASS="_kfc";
DwtListView.prototype.toString=function(){return"DwtListView"
};
DwtListView.prototype.dispose=function(){this._listColDiv=null;
this._listDiv=null;
this._parentEl=null;
this._clickDiv=null;
this._selectedItems=null;
DwtComposite.prototype.dispose.call(this)
};
DwtListView.prototype.setEnabled=function(A){DwtComposite.prototype.setEnabled.call(this,A);
this.removeListener(DwtEvent.ONMOUSEOVER,this._listenerMouseOver);
this.removeListener(DwtEvent.ONMOUSEOUT,this._listenerMouseOut);
this.removeListener(DwtEvent.ONMOUSEDOWN,this._listenerMouseDown);
this.removeListener(DwtEvent.ONMOUSEUP,this._listenerMouseUp);
this.removeListener(DwtEvent.ONMOUSEMOVE,this._listenerMouseMove);
this.removeListener(DwtEvent.ONDBLCLICK,this._listenerDoubleClick);
if(A){this.addListener(DwtEvent.ONMOUSEOVER,this._listenerMouseOver);
this.addListener(DwtEvent.ONMOUSEOUT,this._listenerMouseOut);
this.addListener(DwtEvent.ONMOUSEDOWN,this._listenerMouseDown);
this.addListener(DwtEvent.ONMOUSEUP,this._listenerMouseUp);
this.addListener(DwtEvent.ONMOUSEMOVE,this._listenerMouseMove);
this.addListener(DwtEvent.ONDBLCLICK,this._listenerDoubleClick)
}var C=this.getSelectedItems();
if(C){var D=C.getArray();
for(var B=0;
B<D.length;
B++){Dwt.delClass(D[B],this._styleRe,A?this._selectedClass:this._disabledSelectedClass)
}}};
DwtListView.prototype.createHeaderHtml=function(M){if(!this._headerList||this.headerColCreated){return 
}this._headerHash={};
this._headerIdHash={};
var N=0;
var P=[];
P[N++]="<table id='";
P[N++]=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_TABLE,this._view);
P[N++]="' cellpadding=0 cellspacing=0 border=0 height=100%";
P[N++]=this._noMaximize?">":" width=100%>";
P[N++]="<tr>";
var E=this._headerList.length;
for(var G=0;
G<E;
G++){var K=this._headerList[G];
var L=K._field;
K._index=G;
var B=K._id=DwtId.getListViewHdrId(DwtId.WIDGET_HDR,this._view,L);
this._headerHash[L]=K;
this._headerIdHash[B]=K;
if(K._variable){this._variableHeaderCol=K
}if(!K._visible){continue
}P[N++]="<td id='";
P[N++]=B;
P[N++]="' class='";
P[N++]=(B==this._currentColId)?"DwtListView-Column DwtListView-ColumnActive'":"DwtListView-Column'";
if(K._width){P[N++]=" width=";
P[N++]=K._width;
if(K._widthUnits){P[N++]=K._widthUnits
}}P[N++]=">";
P[N++]="<div";
var H=null;
if(K._width&&K._width!="auto"){H=K._width+2;
if(K._widthUnits){H+=K._widthUnits
}}if(!!H){P[N++]=" style='overflow: hidden; width: ";
P[N++]=H;
P[N++]="'>"
}else{P[N++]=">"
}P[N++]="<table border=0 cellpadding=0 cellspacing=0 width=100%><tr>";
if(K._iconInfo){var J=["id='",DwtId.getListViewHdrId(DwtId.WIDGET_HDR_ICON,this._view,L),"'"].join("");
P[N++]="<td><center>";
P[N++]=AjxImg.getImageHtml(K._iconInfo,null,J);
P[N++]="</center></td>"
}if(K._label){P[N++]="<td id='";
P[N++]=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_LABEL,this._view,L);
P[N++]="' class='DwtListHeaderItem-label'>";
P[N++]=K._label;
P[N++]="</td>"
}if(K._sortable){var A=this._bSortAsc?"ColumnUpArrow":"ColumnDownArrow";
P[N++]="<td align=right style='padding-right:2px' width=100% id='";
P[N++]=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_ARROW,this._view,L);
P[N++]="'>";
var D=(L==M);
P[N++]=AjxImg.getImageHtml(A,D?null:"visibility:hidden");
P[N++]="</td>";
if(D){this._currentColId=B
}}if(G<(E-1)){P[N++]="<td width=4>";
P[N++]="<table align=right border=0 cellpadding=0 cellspacing=0 width=2 height=100%><tr>";
P[N++]="<td class='DwtListView-Sash'><div style='width: 1px; height: ";
P[N++]=(DwtListView.HEADERITEM_HEIGHT-2);
P[N++]="px; background-color: #8A8A8A'></div></td><td id='";
P[N++]=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_SASH,this._view,L);
P[N++]="' class='DwtListView-Sash'><div style='width: 1px; height: ";
P[N++]=(DwtListView.HEADERITEM_HEIGHT-2);
P[N++]="px; background-color: #FFFFFF'></div></td></tr></table>";
P[N++]="</td>"
}P[N++]="</tr></table>";
P[N++]="</div></td>"
}P[N++]="</tr></table>";
this._listColDiv.innerHTML=P.join("");
for(var F=0;
F<this._headerList.length;
F++){var K=this._headerList[F];
var O=document.getElementById(K._id);
if(!O){continue
}if(K._sortable&&K._field==M){O.className="DwtListView-Column DwtListView-ColumnActive"
}if(K._resizeable){var I=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_SASH,this._view,K._field);
var C=document.getElementById(I);
if(C){this.associateItemWithElement(K,C,DwtListView.TYPE_HEADER_SASH,I,{index:F})
}}this.associateItemWithElement(K,O,DwtListView.TYPE_HEADER_ITEM,K._id,{index:F})
}this.headerColCreated=true
};
DwtListView.prototype.getItemIndex=function(C){var D=this._list;
var A=D.size();
for(var B=0;
B<A;
++B){if(D.get(B).id==C.id){return B
}}return null
};
DwtListView.prototype.setSize=function(B,A){DwtComposite.prototype.setSize.call(this,B,A);
this._sizeChildren(A)
};
DwtListView.prototype.setBounds=function(B,D,C,A){DwtComposite.prototype.setBounds.call(this,B,D,C,A);
this._sizeChildren(A)
};
DwtListView.prototype.size=function(){return this._list?this._list.size():0
};
DwtListView.prototype.set=function(B,A){if(this._selectedItems){this._selectedItems.removeAll()
}this.sortingEnabled=true;
this._resetList();
this._list=B;
this.setUI(A)
};
DwtListView.prototype.setUI=function(B,A){this.removeAll();
this.createHeaderHtml(B);
this._renderList(this._list,A)
};
DwtListView.prototype._renderList=function(F,E){if(F instanceof AjxVector&&F.size()){var B=new Date();
var I=F.size();
var G=[];
for(var D=0;
D<I;
D++){var H=F.get(D);
var A=this._createItemHtml(H,{now:B},true,D);
if(A){if(A instanceof Array){for(var C=0;
C<A.length;
C++){this._addRow(A[C])
}}else{if(A.tagName){this._addRow(A)
}else{G.push(A)
}}}}if(G.length){this._parentEl.innerHTML=G.join("")
}}else{if(!E){this._setNoResultsHtml()
}}};
DwtListView.prototype.addItems=function(A){if(AjxUtil.isArray(A)){if(!this._list){this._list=new AjxVector()
}if(this._list.size()==0){this._resetList()
}this._renderList(AjxVector.fromArray(A));
this._list.addList(A)
}};
DwtListView.prototype.addItem=function(D,B,C){if(!this._list){this._list=new AjxVector()
}if(this._list.size()==0){this._resetList()
}this._list.add(D,B);
var E=this._createItemHtml(D);
if(E){if(E instanceof Array){for(var A=0;
A<E.length;
A++){this._addRow(E[A])
}}else{this._addRow(E,B)
}}if(!C&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv)
}};
DwtListView.prototype.removeItem=function(D,B){var A=this._getElFromItem(D);
if(!A){return 
}var C=A.nextSibling;
if(C){var E=Boolean(A.className&&(A.className.indexOf(DwtListView.ROW_CLASS_ODD)!=-1));
while(C){E=!E;
var F=E?DwtListView.ROW_CLASS_ODD:DwtListView.ROW_CLASS_EVEN;
var G=E?DwtListView.ROW_CLASS_EVEN:DwtListView.ROW_CLASS_ODD;
Dwt.delClass(C,F,G);
C=C.nextSibling
}}this._selectedItems.remove(A);
this._parentEl.removeChild(A);
if(this._list){this._list.remove(D)
}if(!B&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv)
}};
DwtListView.prototype.removeLastItem=function(A){var B=this._list.get(this._list.size()-1);
this._list.remove(B);
this._parentEl.removeChild(this._getElFromItem(B));
if(!A&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv)
}};
DwtListView.prototype.redrawItem=function(D){var E=this._getElFromItem(D);
if(E){var F=this._createItemHtml(D);
E.parentNode.replaceChild(F,E);
var C=this.getSelectedItems().getArray();
for(var B=0;
B<C.length;
B++){var A=C[B];
if(A===D){this.setSelectedItems([].concat(C));
break
}}}};
DwtListView.prototype.addSelectionListener=function(A){this._evtMgr.addListener(DwtEvent.SELECTION,A)
};
DwtListView.prototype.removeSelectionListener=function(A){this._evtMgr.removeListener(DwtEvent.SELECTION,A)
};
DwtListView.prototype.addActionListener=function(A){this._evtMgr.addListener(DwtEvent.ACTION,A)
};
DwtListView.prototype.removeActionListener=function(A){this._evtMgr.removeListener(DwtEvent.ACTION,A)
};
DwtListView.prototype.addStateChangeListener=function(A){this._evtMgr.addListener(DwtEvent.STATE_CHANGE,A)
};
DwtListView.prototype.removeStateChangeListener=function(A){this._evtMgr.removeListener(DwtEvent.STATE_CHANGE,A)
};
DwtListView.prototype.removeAll=function(A){if(this._parentEl){this._parentEl.innerHTML=""
}if(this._selectedItems){this._selectedItems.removeAll()
}this._selAnchor=this._kbAnchor=null;
if(!A&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv)
}};
DwtListView.prototype.deselectAll=function(){var A=this._selectedItems.getArray();
var C=this._selectedItems.size();
for(var B=0;
B<C;
B++){Dwt.delClass(A[B],this._styleRe)
}this._selectedItems.removeAll();
this._selAnchor=null;
if(this._kbAnchor!=null&&this.hasFocus()){Dwt.addClass(this._kbAnchor,this._kbFocusClass)
}};
DwtListView.prototype.getDnDSelection=function(){if(this._dndSelection instanceof AjxVector){return this.getSelection()
}else{return this.getItemFromElement(this._dndSelection)
}};
DwtListView.prototype.getSelection=function(){var B=[];
if(this._rightSelItem){B.push(this.getItemFromElement(this._rightSelItem))
}else{if(this._selectedItems){var A=this._selectedItems.getArray();
var D=this._selectedItems.size();
for(var C=0;
C<D;
C++){B[C]=this.getItemFromElement(A[C])
}}}return B
};
DwtListView.prototype.getSelectedItems=function(){return this._selectedItems
};
DwtListView.prototype.setSelection=function(C,A){var B=this._getElFromItem(C);
if(B){this.deselectAll();
this._unmarkKbAnchorElement(true);
this._selectedItems.add(B);
this._selAnchor=this._kbAnchor=B;
Dwt.delClass(B,this._styleRe,this.getEnabled()?this._selectedClass:this._disabledSelectedClass);
if(this.hasFocus()){Dwt.addClass(B,this._kbFocusClass)
}this.firstSelIndex=(this._list&&this._list.size()>0)?this._list.indexOf(C):-1;
this._scrollList(B);
if(!A&&this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){var D=new DwtSelectionEvent(true);
D.button=DwtMouseEvent.LEFT;
D.target=B;
D.item=this.getItemFromElement(B);
D.detail=DwtListView.ITEM_SELECTED;
D.ersatz=true;
this._evtMgr.notifyListeners(DwtEvent.SELECTION,D)
}}};
DwtListView.prototype.setMultiSelection=function(A,E,C){if(E){this._selectedItems.remove(A);
Dwt.delClass(A,this._styleRe);
this._selEv.detail=DwtListView.ITEM_DESELECTED
}else{this._selectedItems.add(A,null,true);
Dwt.delClass(A,this._styleRe,this._selectedClass);
this._selEv.detail=DwtListView.ITEM_SELECTED
}if(this._kbAnchor&&this._kbAnchor!=A){var D=this._kbAnchor;
var B=this._selectedClass;
if(D.className.indexOf(B)!=-1){Dwt.delClass(D,this._styleRe,B)
}else{Dwt.delClass(D,this._styleRe)
}}this._selAnchor=this._kbAnchor=A;
Dwt.addClass(this._kbAnchor,this._kbFocusClass)
};
DwtListView.prototype.setSelectedItems=function(C){this.deselectAll();
var D=C.length;
for(var A=0;
A<D;
++A){var B=this._getElFromItem(C[A]);
if(B){Dwt.delClass(B,this._styleRe,this.getEnabled()?this._selectedClass:this._disabledSelectedClass);
if(this._kbAnchor==B&&this.hasFocus()){Dwt.addClass(B,this._kbFocusClass)
}this._selectedItems.add(B)
}}};
DwtListView.prototype.getSelectionCount=function(){return this._rightSelItem?1:this._selectedItems.size()
};
DwtListView.prototype.handleActionPopdown=function(){this._clearRightSel()
};
DwtListView.prototype.associateItemWithElement=function(D,B,C,F,E){F=F||this._getItemId(D);
if(B){B.id=F
}this._data[F]={item:D,id:F,type:C};
if(E){for(var A in E){this._data[F][A]=E[A]
}}return F
};
DwtListView.prototype.getItemFromElement=function(A){return this._getItemData(A,"item")
};
DwtListView.prototype.findItem=function(A){if(!A){return 
}var B=this.findItemDiv(A);
return this._getItemData(B,"item")
};
DwtListView.prototype.findItemDiv=function(A){if(!A){return 
}while(A&&(A.id!=this._htmlElId)){if(A.id&&this._data[A.id]){return A
}A=A.parentNode
}return null
};
DwtListView.prototype.getTargetItem=function(A){return this.findItem(DwtUiEvent.getTarget(A))
};
DwtListView.prototype.getTargetItemDiv=function(A){return this.findItemDiv(DwtUiEvent.getTarget(A))
};
DwtListView.prototype.dragSelect=function(B){if(this._dragHighlight){var A=document.getElementById(this._dragHighlight);
if(!B||B.id!=A.id){this._updateDragSelection(A,false)
}}if(!B){return 
}if(this._getItemData(B,"type")!=DwtListView.TYPE_LIST_ITEM){return 
}if(B.id!=this._dragHighlight){this._dragHighlight=B.id;
this._updateDragSelection(B,true)
}};
DwtListView.prototype.dragDeselect=function(B){if(this._dragHighlight){var A=document.getElementById(this._dragHighlight);
this._updateDragSelection(A,false);
this._dragHighlight=null
}};
DwtListView.prototype.scrollToTop=function(){this._listDiv.scrollTop=0
};
DwtListView.prototype.setSortByAsc=function(C,B){if(!this._headerList){return 
}this._bSortAsc=B;
var D=null;
for(var A=0;
A<this._headerList.length;
A++){if(this._headerList[A]._sortable&&this._headerList[A]._field==C){D=this._headerList[A]._id;
break
}}if(D){this._setSortedColStyle(D)
}};
DwtListView.prototype.getNewOffset=function(B){var A=this.getLimit();
var C=B?(this.offset+A):(this.offset-A);
return(C<0)?0:C
};
DwtListView.prototype.getLimit=function(){return DwtListView.DEFAULT_LIMIT
};
DwtListView.prototype.getReplenishThreshold=function(){return DwtListView.MAX_REPLENISH_THRESHOLD
};
DwtListView.prototype.getList=function(){return this._list
};
DwtListView.prototype.replenish=function(D){this._list.addList(D);
var B=D.size();
for(var A=0;
A<B;
A++){var C=D.get(A);
var E=this._createItemHtml(C);
if(E){this._addRow(E)
}}};
DwtListView.prototype.getKeyMapName=function(){return"DwtListView"
};
DwtListView.prototype.handleKeyAction=function(D,F){switch(D){case DwtKeyMap.SELECT:this._emulateSingleClick({target:this._kbAnchor,button:DwtMouseEvent.LEFT});
break;
case DwtKeyMap.SELECT_CURRENT:this._emulateSingleClick({target:this._kbAnchor,button:DwtMouseEvent.LEFT,ctrlKey:true});
break;
case DwtKeyMap.SELECT_NEXT:this._selectItem(true,false,true);
break;
case DwtKeyMap.SELECT_PREV:this._selectItem(false,false,true);
break;
case DwtKeyMap.ADD_SELECT_NEXT:this._selectItem(true,true,true);
break;
case DwtKeyMap.ADD_SELECT_PREV:this._selectItem(false,true,true);
break;
case DwtKeyMap.PREV:this._setKbFocusElement(false);
break;
case DwtKeyMap.NEXT:this._setKbFocusElement(true);
break;
case DwtKeyMap.DBLCLICK:this.emulateDblClick(this.getItemFromElement(this._kbAnchor));
break;
case DwtKeyMap.SELECT_ALL:if(this._list&&this._list.size()){this.setSelectedItems(this._list.getArray())
}break;
case DwtKeyMap.SELECT_FIRST:var A=this._list.getArray();
if(A&&A.length>1){this.setSelection(A[0])
}this._scrollList(this._kbAnchor);
break;
case DwtKeyMap.SELECT_LAST:var A=this._list.getArray();
if(A&&A.length>1){this.setSelection(A[A.length-1])
}this._scrollList(this._kbAnchor);
break;
case DwtKeyMap.ACTION:if(this._evtMgr.isListenerRegistered(DwtEvent.ACTION)){var G=Dwt.toWindow(this._kbAnchor,0,0);
var E=Dwt.getSize(this._kbAnchor);
var C=G.x+E.x/4;
var B=G.y+E.y/2;
this._emulateSingleClick({target:this._kbAnchor,button:DwtMouseEvent.RIGHT,docX:C,docY:B})
}break;
default:return false
}return true
};
DwtListView.prototype.setMultiSelect=function(A){this.multiSelectEnabled=A
};
DwtListView.prototype.isMultiSelectEnabled=function(){return this.multiSelectEnabled
};
DwtListView.prototype.setListDivHeight=function(C){if(this._listDiv&&this._listColDiv){var B=Dwt.getSize(this._listColDiv).y;
var A=C-B;
Dwt.setSize(this._listDiv,Dwt.DEFAULT,A)
}};
DwtListView.prototype._getStyleRegex=function(){return new RegExp("\\b("+[this._disabledSelectedClass,this._selectedClass,this._kbFocusClass,this._dndClass,this._rightClickClass].join("|")+")\\b","g")
};
DwtListView.prototype._addRow=function(H,B){if(!H||!this._parentEl){return 
}var A=this._parentEl.childNodes.length;
var D=Boolean((B!=null?B:A)%2);
var E=D?DwtListView.ROW_CLASS_ODD:DwtListView.ROW_CLASS_EVEN;
var G=D?DwtListView.ROW_CLASS_EVEN:DwtListView.ROW_CLASS_ODD;
Dwt.delClass(H,E,G);
if(B!=null&&A>0&&B!=A){var F=this._parentEl.childNodes;
this._parentEl.insertBefore(H,F[B]);
var C=H.nextSibling;
while(C){D=!D;
E=D?DwtListView.ROW_CLASS_ODD:DwtListView.ROW_CLASS_EVEN;
G=D?DwtListView.ROW_CLASS_EVEN:DwtListView.ROW_CLASS_ODD;
Dwt.delClass(C,E,G);
C=C.nextSibling
}}else{this._parentEl.appendChild(H)
}};
DwtListView.prototype._createItemHtml=function(J,C,F,E){C=C||{};
this._addParams(J,C,I,H);
var A;
var I=[];
var H=0;
if(F){H=this._getDivHtml(J,C,I,H,E)
}else{A=C.div||this._getDiv(J,C)
}H=this._getTable(I,H,C);
H=this._getRow(I,H,J,C);
var B=C.headerList||this._headerList;
if(B&&B.length){for(var D=0;
D<B.length;
D++){if(!B[D]._visible){continue
}var G=B[D]._field;
H=this._getCell(I,H,J,G,D,C)
}}else{H=this._getCell(I,H,J,null,null,C)
}I[H++]="</tr></table>";
if(F){I[H++]="</div>";
return I.join("")
}A.innerHTML=I.join("");
return A
};
DwtListView.prototype._addParams=function(A,B){};
DwtListView.prototype._getDiv=function(A,B){var D=document.createElement("div");
if(B.isDragProxy&&AjxEnv.isMozilla){D.style.overflow="visible"
}D.className=this._getDivClass(this._normalClass,A,B);
if(B.isDragProxy){Dwt.setPosition(D,Dwt.ABSOLUTE_STYLE)
}var C=B.isDragProxy?this._getItemId(A)+"_dnd":null;
this.associateItemWithElement(A,D,DwtListView.TYPE_LIST_ITEM,C);
return D
};
DwtListView.prototype._getDivHtml=function(E,F,B,A,D){B[A++]="<div class='";
B[A++]=this._getDivClass(this._normalClass,E,F);
B[A++]=" ";
B[A++]=(D%2)?DwtListView.ROW_CLASS_EVEN:DwtListView.ROW_CLASS_ODD;
B[A++]="'";
var C=[];
if(F.isDragProxy&&AjxEnv.isMozilla){C.push("overflow:visible")
}if(F.isDragProxy){C.push("position:absolute")
}if(C.length){B[A++]=" style='";
B[A++]=C.join(";");
B[A++]="'"
}var G=F.isDragProxy?this._getItemId(E)+"_dnd":null;
B[A++]=" id='";
B[A++]=this.associateItemWithElement(E,null,DwtListView.TYPE_LIST_ITEM,G);
B[A++]="'>";
return A
};
DwtListView.prototype._getDivClass=function(B,A,C){return C.isDragProxy?([B," ",B,"-",DwtCssStyle.DRAG_PROXY].join("")):B
};
DwtListView.prototype._getTable=function(B,A,C){B[A++]="<table cellpadding=0 cellspacing=0 border=0 width=";
B[A++]=!C.isDragProxy?"100%>":(this.getSize().x+">");
return A
};
DwtListView.prototype._getRow=function(B,A,D,F){var E=this._getRowId(D,F)||Dwt.getNextId();
var C=this._getRowClass(D,F);
B[A++]=E?["<tr id='",E,"'"].join(""):"<tr";
B[A++]=C?([" class='",C,"'>"].join("")):">";
return A
};
DwtListView.prototype._getRowClass=function(A,B){return null
};
DwtListView.prototype._getRowId=function(A,B){return null
};
DwtListView.prototype._getCell=function(N,M,P,K,E,D){var C=this._getCellId(P,K,D);
var L=C?[" id=","'",C,"'"].join(""):"";
var B=this._getCellWidth(E,D);
var H=B?([" width=",B].join("")):(" width='100%'");
var I=this._getCellClass(P,K,D);
var F=I?[" class=",I].join(""):"";
var O=this._getCellAlign(E,D);
var J=O?[" align=",O].join(""):"";
var A=(this._getCellAttrText(P,K,D))||"";
var G=[L,H,F,J,A].join(" ");
N[M++]="<td";
N[M++]=G?(" "+G):"";
N[M++]=">";
M=this._getCellContents(N,M,P,K,E,D);
N[M++]="</td>";
return M
};
DwtListView.prototype._getCellWidth=function(D,C){if(D==null){return null
}var A=C.headerList||this._headerList;
var B=A[D]._width;
if(B){if(AjxEnv.isIE){return(B+4)
}if(AjxEnv.isSafari){return(B+5)
}return B
}return null
};
DwtListView.prototype._getCellAlign=function(C,B){if(C==null){return null
}var A=B.headerList||this._headerList;
return A[C]._align
};
DwtListView.prototype._getCellId=function(A,B,C){return null
};
DwtListView.prototype._getCellClass=function(A,B,C){return null
};
DwtListView.prototype._getCellAttrText=function(A,B,C){return null
};
DwtListView.prototype._getCellContents=function(B,A,C,D,F,E){B[A++]=C.toString?C.toString():C;
return A
};
DwtListView.prototype._getFieldId=function(A,B){return DwtId.getListViewItemId(DwtId.WIDGET_ITEM_FIELD,this._view,A.id,B)
};
DwtListView.prototype._getElement=function(A,B){return document.getElementById(this._getFieldId(A,B))
};
DwtListView.prototype._getDragProxy=function(D){var C=this.getDnDSelection();
if(!C){return null
}var B;
var H;
var G;
this._dndImg=null;
if(!(C instanceof Array)||C.length==1){var E=(C instanceof Array)?C[0]:C;
B=this._createItemHtml(E,{now:new Date(),isDragProxy:true});
this._setItemData(B,"origClassName",B.className);
Dwt.setPosition(B,Dwt.ABSOLUTE_STYLE);
G="position:absolute;top:18;left:-11;visibility:hidden"
}else{B=document.createElement("div");
B.className="DragProxy";
Dwt.setPosition(B,Dwt.ABSOLUTE_STYLE);
AjxImg.setImage(B,"DndMultiYes_48");
this._dndImg=B;
H=document.createElement("div");
Dwt.setPosition(H,Dwt.ABSOLUTE_STYLE);
H.innerHTML="<table><tr><td class='DragProxyTextLabel'>"+C.length+"</td></tr></table>";
B.appendChild(H);
G="position:absolute;top:30;left:0;visibility:hidden";
Dwt.setBounds(B,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE,43+32-16,36+32-20)
}var A=AjxImg.getImageHtml("RoundPlus",G,"id="+DwtId.DND_PLUS_ID);
if(!this._noDndPlusImage){B.appendChild(Dwt.parseHtmlFragment(A))
}this.shell.getHtmlElement().appendChild(B);
if(H){var F=Dwt.getSize(H);
Dwt.setLocation(H,16+(32-F.x)/2,19+(32-F.y)/2)
}Dwt.setZIndex(B,Dwt.Z_DND);
return B
};
DwtListView.prototype._setDragProxyState=function(B){if(this._dndImg){AjxImg.setImage(this._dndImg,B?"DndMultiYes_48":"DndMultiNo_48")
}else{if(this._dndProxy){var C=B?DwtCssStyle.DROPPABLE:DwtCssStyle.NOT_DROPPABLE;
var A=this._getItemData(this._dndProxy,"origClassName");
this._dndProxy.className=[A,C].join(" ")
}}};
DwtListView.prototype._setNoResultsHtml=function(){var B=document.createElement("div");
var A={message:this._getNoResultsMessage(),type:this.type};
B.innerHTML=AjxTemplate.expand("dwt.Widgets#DwtListView-NoResults",A);
this._addRow(B)
};
DwtListView.prototype._getNoResultsMessage=function(){return AjxMsg.noResults
};
DwtListView.prototype._clearRightSel=function(){if(this._rightSelItem){Dwt.delClass(this._rightSelItem,this._styleRe);
this._rightSelItem=null
}};
DwtListView.prototype._getItemId=function(A){return DwtId.getListViewItemId(DwtId.WIDGET_ITEM,this._view,(A&&A.id)?A.id:Dwt.getNextId())
};
DwtListView.prototype._getElFromItem=function(A){return Dwt.byId(this._getItemId(A))
};
DwtListView.prototype._getRowIndex=function(B){var D=this._getItemId(B);
var C=this._parentEl.childNodes;
for(var A=0;
A<C.length;
A++){if(C[A].id==D){return A
}}return null
};
DwtListView.prototype._getItemData=function(A,C,D){D=D||(A?A.id:null);
var B=this._data[D];
return B?B[C]:null
};
DwtListView.prototype._setItemData=function(A,D,C,E){E=E||(A?A.id:null);
var B=this._data[E];
if(B){B[D]=C
}};
DwtListView.prototype._isValidDragObject=function(A){return(this.getTargetItemDiv(A)!=null)
};
DwtListView.prototype._updateDragSelection=function(B,A){if(!A){B.className=this._getItemData(B,"origClassName")
}else{this._setItemData(B,"origClassName",B.className);
Dwt.delClass(B,this._styleRe,this._dndClass)
}};
DwtListView.prototype._mouseOverAction=function(B,D){var A=this._getItemData(D,"type");
if(A==DwtListView.TYPE_HEADER_ITEM){var C=this.getItemFromElement(D);
if(C&&this.sortingEnabled&&C._sortable&&!this._headerClone){D.className="DwtListView-Column DwtListView-ColumnHover"
}}else{if(A==DwtListView.TYPE_HEADER_SASH){D.style.cursor=AjxEnv.isIE?"col-resize":"e-resize"
}}return true
};
DwtListView.prototype._mouseOutAction=function(B,C){var A=this._getItemData(C,"type");
if(A==DwtListView.TYPE_HEADER_ITEM&&!this._headerClone){C.className=(C.id!=this._currentColId)?"DwtListView-Column":"DwtListView-Column DwtListView-ColumnActive"
}else{if(A==DwtListView.TYPE_HEADER_SASH){C.style.cursor="auto"
}}return true
};
DwtListView.prototype._mouseOverListener=function(A){var B=this.getTargetItemDiv(A);
if(!B){return 
}this._mouseOverAction(A,B)
};
DwtListView.prototype._mouseOutListener=function(A){var B=this.getTargetItemDiv(A);
if(!B){return 
}this.setToolTipContent(null);
this._mouseOutAction(A,B)
};
DwtListView.prototype._mouseMoveListener=function(B){if(!this._clickDiv){return 
}var A=this._getItemData(this._clickDiv,"type");
if(A==DwtListView.TYPE_HEADER_ITEM){this._handleColHeaderMove(B)
}else{if(A==DwtListView.TYPE_HEADER_SASH){this._handleColHeaderResize(B)
}}};
DwtListView.prototype._mouseUpAction=function(A,B){return true
};
DwtListView.prototype._mouseDownListener=function(A){var B=this.getTargetItemDiv(A);
if(!B){this._dndSelection=null
}else{this._clickDiv=B;
if(this._getItemData(B,"type")!=DwtListView.TYPE_LIST_ITEM){this._dndSelection=null
}else{this._dndSelection=(this._selectedItems.contains(B))?this._selectedItems:B
}}this._mouseDownAction(A,B)
};
DwtListView.prototype._mouseDownAction=function(A,B){return true
};
DwtListView.prototype._mouseUpListener=function(C){var F=this.getTargetItemDiv(C);
var E=this._handleColHeaderDrop(C);
var A=this._handleColSashDrop(C);
if(!F||F!=this._clickDiv||E||A){delete this._clickDiv;
return 
}delete this._clickDiv;
var B=this._getItemData(F,"type");
if(this._headerList&&B==DwtListView.TYPE_HEADER_ITEM){if(C.button==DwtMouseEvent.LEFT){this._columnClicked(F,C)
}else{if(C.button==DwtMouseEvent.RIGHT){var D=this._getActionMenuForColHeader();
if(D&&D instanceof DwtMenu){D.popup(0,C.docX,C.docY)
}}}}else{if(B==DwtListView.TYPE_LIST_ITEM){if(C.button==DwtMouseEvent.LEFT||C.button==DwtMouseEvent.RIGHT){this._itemClicked(F,C)
}}}};
DwtListView.prototype._doubleClickAction=function(A,B){return true
};
DwtListView.prototype._doubleClickListener=function(B){var C=this.getTargetItemDiv(B);
if(!C){return 
}var A=this._getItemData(C,"type");
if(A==DwtListView.TYPE_LIST_ITEM){if(!this._doubleClickAction(B,C)){return 
}if(this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){DwtUiEvent.copy(this._selEv,B);
this._selEv.item=this.getItemFromElement(C);
this._selEv.detail=DwtListView.ITEM_DBL_CLICKED;
this._evtMgr.notifyListeners(DwtEvent.SELECTION,this._selEv)
}}};
DwtListView.prototype.emulateDblClick=function(A){var C=document.getElementById(this._getItemId(A));
if(C){var B=new DwtMouseEvent();
this._setMouseEvent(B,{target:C,button:DwtMouseEvent.LEFT});
this._itemClicked(C,B);
this._doubleClickListener(B)
}};
DwtListView.prototype._selectItem=function(C,A,D){if(!this.size()){return 
}var B=(this._kbAnchor)?this._getSiblingElement(this._kbAnchor,C):this._parentEl.firstChild;
this._scrollList(B);
this._emulateSingleClick({target:B,button:DwtMouseEvent.LEFT,shiftKey:A,kbNavEvent:D})
};
DwtListView.prototype._getSiblingElement=function(A,C){if(!A){return null
}var B=C?A.nextSibling:A.previousSibling;
while(this._hasHiddenRows&&B&&!Dwt.getVisible(B)){B=C?B.nextSibling:B.previousSibling
}return(!B||(this._hasHiddenRows&&!Dwt.getVisible(B)))?A:B
};
DwtListView.prototype._scrollList=function(D){var A=D.parentNode;
var C=Dwt.getLocation(D,this._tmpPoint).y;
var E=Dwt.getLocation(A,this._tmpPoint).y;
var G=C-(A.scrollTop+E);
if(G<0){A.scrollTop+=G
}else{var B=Dwt.getSize(A,this._tmpPoint).y;
var F=Dwt.getSize(D,this._tmpPoint).y;
G=(C+F)-(E+B+A.scrollTop);
if(G>0){A.scrollTop+=G
}}};
DwtListView.prototype._emulateSingleClick=function(A){this._clickDiv=this.findItemDiv(A.target);
var B=new DwtMouseEvent();
this._setMouseEvent(B,A);
B.kbNavEvent=A.kbNavEvent;
this.notifyListeners(DwtEvent.ONMOUSEUP,B)
};
DwtListView.prototype._setKbFocusElement=function(A){if(!this._list){return 
}var C=this._kbAnchor;
if(this._kbAnchor){this._kbAnchor=this._getSiblingElement(this._kbAnchor,A)
}else{this._kbAnchor=this._parentEl.firstChild
}if(this._kbAnchor!=C){var B=this._selectedClass;
if(C.className.indexOf(B)!=-1){Dwt.delClass(C,this._styleRe,B)
}else{Dwt.delClass(C,this._styleRe)
}Dwt.addClass(this._kbAnchor,this._kbFocusClass)
}this._scrollList(this._kbAnchor)
};
DwtListView.prototype._itemSelected=function(A,C){if(this._allowLeftSelection(A,C,(C)?C.button:null)){this._unmarkKbAnchorElement(true);
this.deselectAll();
this._selectedItems.add(A);
this._selAnchor=this._kbAnchor=A;
Dwt.delClass(A,this._styleRe,this._selectedClass);
if(this.hasFocus()){Dwt.addClass(A,this._kbFocusClass)
}var B=this.getItemFromElement(A);
this.firstSelIndex=(this._list&&B)?this._list.indexOf(B):-1
}};
DwtListView.prototype._itemClicked=function(F,K){if(this._rightSelItem){Dwt.delClass(this._rightSelItem,this._styleRe);
this._rightSelItem=null
}var E=this._selectedItems.size();
var C=this._selectedItems.contains(F);
if((!K.shiftKey&&!K.ctrlKey)||!this.multiSelectEnabled){if(K.button==DwtMouseEvent.LEFT||K.button==DwtMouseEvent.RIGHT){this._selEv.detail=DwtListView.ITEM_SELECTED
}if(K.button==DwtMouseEvent.LEFT){this._itemSelected(F,K)
}else{if(K.button==DwtMouseEvent.RIGHT&&!C){this._rightSelItem=F;
Dwt.delClass(F,this._styleRe,this._rightClickClass);
if(this._kbAnchor==F){Dwt.addClass(F,this._kbFocusClass)
}}}}else{if(K.ctrlKey){this.setMultiSelection(F,C,K)
}else{if(!this._selAnchor){return 
}var G=this._getChildren()||F.parentNode.childNodes;
var I=G.length;
var D;
var A=0;
for(var H=0;
H<I;
H++){D=G[H];
if(D==this._rightSelItem){this._rightSelItem=null
}if(D==F){A++
}var B=this._selectedClass;
if(D==this._selAnchor){A++;
if(D.className.indexOf(B)==-1){this._selectedItems.add(D)
}Dwt.delClass(D,this._styleRe,B);
continue
}if(A!=1&&D.className.indexOf(B)!=-1&&D!=F){Dwt.delClass(D,this._styleRe);
this._selectedItems.remove(D)
}else{if(A==1||D==F){if(D.className.indexOf(B)==-1){this._selectedItems.add(D)
}Dwt.delClass(D,this._styleRe,B)
}}}this._kbAnchor=F;
Dwt.addClass(this._kbAnchor,this._kbFocusClass);
var J=this._selectedItems.size();
if(E<J){this._selEv.detail=DwtListView.ITEM_SELECTED
}else{if(E>J){this._selEv.detail=DwtListView.ITEM_DESELECTED
}else{return 
}}}}if(K.button==DwtMouseEvent.LEFT&&this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){if(this._setListEvent(K,this._selEv,F)){this._evtMgr.notifyListeners(DwtEvent.SELECTION,this._selEv)
}}else{if(K.button==DwtMouseEvent.RIGHT&&this._evtMgr.isListenerRegistered(DwtEvent.ACTION)){if(this._setListEvent(K,this._actionEv,F)){this._evtMgr.notifyListeners(DwtEvent.ACTION,this._actionEv)
}}}};
DwtListView.prototype._setListEvent=function(B,C,A){DwtUiEvent.copy(C,B);
C.kbNavEvent=B.kbNavEvent;
C.item=this.findItem(A);
return true
};
DwtListView.prototype._columnClicked=function(D,B){var E=this.getItemFromElement(D);
if(!(E._sortable&&this.sortingEnabled)){return 
}var C=this.getList();
var A=C?C.size():null;
if(!A){return 
}this._bSortAsc=(E._id==this._currentColId)?!this._bSortAsc:this._getDefaultSortbyForCol(E);
this._setSortedColStyle(E._id);
if(A>=1){this._sortColumn(E,this._bSortAsc)
}};
DwtListView.prototype._sortColumn=function(A,B){};
DwtListView.prototype._getActionMenuForColHeader=function(){return null
};
DwtListView.prototype._getDefaultSortbyForCol=function(A){return true
};
DwtListView.prototype._allowLeftSelection=function(B,C,A){return true
};
DwtListView.prototype._setSortedColStyle=function(A){if(this._currentColId&&(A!=this._currentColId)){var F=this._headerIdHash[this._currentColId];
var G=F._field;
var H=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_ARROW,this._view,G);
var D=document.getElementById(H);
if(D&&D.firstChild){var B=(AjxImg._mode==AjxImg.SINGLE_IMG)?D.firstChild:D.firstChild.firstChild;
if(B){B.style.visibility="hidden"
}}var J=document.getElementById(this._currentColId);
if(J){J.className="DwtListView-Column"
}}this._currentColId=A;
var F=this._headerIdHash[this._currentColId];
var G=F._field;
var I=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_ARROW,this._view,G);
var C=document.getElementById(I);
if(C){AjxImg.setImage(C,this._bSortAsc?"ColumnUpArrow":"ColumnDownArrow");
var B=(AjxImg._mode==AjxImg.SINGLE_IMG)?C.firstChild:C.firstChild.firstChild;
if(B){B.style.visibility="visible"
}}var E=document.getElementById(A);
if(E){E.className="DwtListView-Column DwtListView-ColumnActive"
}};
DwtListView.prototype._resetList=function(){if(this._list&&this._list.size()){this._list.removeAll()
}this._resetListView()
};
DwtListView.prototype._resetListView=function(){var A;
while(this._parentEl&&this._parentEl.hasChildNodes()){var A=this._parentEl.removeChild(this._parentEl.firstChild);
this._data[A.id]=null
}if(this._selectedItems){this._selectedItems.removeAll()
}this._rightSelItem=null
};
DwtListView.prototype._destroyDragProxy=function(A){this._data[A.id]=null;
DwtControl.prototype._destroyDragProxy.call(this,A)
};
DwtListView.prototype._handleColHeaderMove=function(G){if(!this._headerClone){if(!this._headerColX){this._headerColX=G.docX;
return 
}else{var E=Math.abs(this._headerColX-G.docX);
if(E<DwtListView.COL_MOVE_THRESHOLD){return 
}}this._headerClone=document.createElement("div");
var K=Dwt.getSize(this._clickDiv);
var B=AjxEnv.isIE?K.x:K.x-3;
var J=AjxEnv.isIE?K.y:K.y-5;
Dwt.setSize(this._headerClone,B,J);
Dwt.setPosition(this._headerClone,Dwt.ABSOLUTE_STYLE);
Dwt.setZIndex(this._headerClone,Dwt.Z_DND);
Dwt.setLocation(this._headerClone,Dwt.DEFAULT,G.docY);
this._headerClone.className=this._clickDiv.className+" DragProxy";
this._headerClone.innerHTML=this._clickDiv.innerHTML;
this._clickDiv.className="DwtListView-Column DwtListView-ColumnEmpty";
this._headerClone.style.borderTop="1px solid #777777";
var H=this._headerIdHash[this._clickDiv.id];
var I=H._field;
var D=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_LABEL,this._view,I);
var C=document.getElementById(D);
if(C){C.style.color="#FFFFFF"
}this.shell.getHtmlElement().appendChild(this._headerClone)
}else{var A=this.getTargetItemDiv(G);
var F=this._getItemData(A,"type");
if(F==DwtListView.TYPE_HEADER_ITEM){if(this._headerCloneTarget&&(this._headerCloneTarget==this._clickDiv)){this._headerCloneTarget=null
}else{if(this._headerCloneTarget!=A){this._headerCloneTarget=A
}}}else{this._headerCloneTarget=null
}}if(this._headerClone){Dwt.setLocation(this._headerClone,G.docX+2)
}};
DwtListView.prototype._handleColHeaderResize=function(B){if(!this._headerSash){this._headerSash=document.createElement("div");
Dwt.setSize(this._headerSash,Dwt.DEFAULT,this.getSize().y);
Dwt.setPosition(this._headerSash,Dwt.ABSOLUTE_STYLE);
Dwt.setZIndex(this._headerSash,Dwt.Z_DND);
var C=this._getHeaderSashLocation();
this._headerSashFudgeX=C.x;
Dwt.setLocation(this._headerSash,Dwt.DEFAULT,C.y);
this._headerSash.className="DwtListView-ColumnSash";
this.getHtmlElement().appendChild(this._headerSash);
this._headerSashX=B.docX
}var A=this._getParentForColResize();
var D=Dwt.toWindow(A.getHtmlElement(),0,0);
Dwt.setLocation(this._headerSash,(B.docX-D.x)+this._headerSashFudgeX)
};
DwtListView.prototype._getHeaderSashLocation=function(){this._tmpPoint.x=0;
this._tmpPoint.y=0;
return this._tmpPoint
};
DwtListView.prototype._handleColHeaderDrop=function(H){this._headerColX=null;
if(this._headerClone==null||H.button==DwtMouseEvent.RIGHT){return false
}if(this._headerCloneTarget){var A=this._getItemData(this._clickDiv,"index");
var C=this._getItemData(this._headerCloneTarget,"index");
this._reIndexColumn(A,C)
}this._clickDiv.className=(this._clickDiv.id!=this._currentColId)?"DwtListView-Column":"DwtListView-Column DwtListView-ColumnActive";
var J=this._headerClone.parentNode;
if(J){J.removeChild(this._headerClone)
}delete this._headerClone;
var F=this._data[this._clickDiv.id];
if(F.type!=DwtListView.TYPE_HEADER_ITEM){var I=this._headerIdHash[this._currentColId];
var G=I._sortable?I._field:null;
this.headerColCreated=false;
this.createHeaderHtml(G)
}else{var I=this._headerIdHash[this._clickDiv.id];
var D=DwtId.getListViewHdrId(DwtId.WIDGET_HDR_LABEL,this._view,I._field);
var B=document.getElementById(D);
if(B){B.style.color="#000000"
}}for(var E=0;
E<this._headerList.length;
E++){this._headerList[E]._width=this._calcRelativeWidth(E)
}this._resetColWidth();
return true
};
DwtListView.prototype._reIndexColumn=function(D,C){if(!this._headerList){return 
}var A=this._headerList.length;
if(D<0||C<0||D>=A||C>=A||D==C){return 
}var B=this._headerList.splice(D,1);
this._headerList.splice(C,0,B[0]);
this._relayout()
};
DwtListView.prototype._handleColSashDrop=function(D){if(this._headerSash==null||D.button==DwtMouseEvent.RIGHT){return false
}var C=this._headerSash.parentNode;
if(C){C.removeChild(this._headerSash)
}delete this._headerSash;
for(var B=0;
B<this._headerList.length;
B++){this._headerList[B]._width=this._calcRelativeWidth(B)
}var F=this._getItemData(this._clickDiv,"index");
if(F==null){return false
}var H=D.docX-this._headerSashX;
var G=this._headerList[F];
var E=this._variableHeaderCol;
if(G==E){var A=this._getNextResizeableColumnIndex(E._index);
if(A!=null){E=this._headerList[A]
}else{return false
}}else{if(!E){var A=this._getNextResizeableColumnIndex(G._index);
if(A!=null){E=this._headerList[A]
}else{return false
}}}G._width=Math.max(G._width+H,DwtListView.MIN_COLUMN_WIDTH);
E._width=Math.max(this._calcRelativeWidth(E._index)-H,DwtListView.MIN_COLUMN_WIDTH);
var A=this._getNextResizeableColumnIndex(-1,[G._index,E._index]);
if(A!=null){this._headerList[A]._width="auto"
}this._relayout();
this._resetColWidth();
return true
};
DwtListView.prototype._calcRelativeWidth=function(C){var B=this._headerList[C];
if(!B._width||(B._width&&B._width=="auto")){var A=document.getElementById(B._id);
return(A)?(A.clientWidth-(AjxEnv.isIE?4:5)):null
}return B._width
};
DwtListView.prototype._resetColWidth=function(){var F=this._getLastColumnIndex();
if(F){var C=this._headerList[F];
var B=document.getElementById(C._id);
var G=B.firstChild;
var A=16;
var E=this._listColDiv.clientWidth;
var D=this._listDiv.clientWidth;
if(E!=D){B.style.width=G.style.width=(C._width!=null&&C._width!="auto")?(C._width+A):(B.clientWidth+A)
}else{B.style.width=G.style.width=(C._width||"")
}}};
DwtListView.prototype._getLastColumnIndex=function(){var B=null;
if(this._headerList){var A=this._headerList.length-1;
while(B==null&&A>=0){if(this._headerList[A]._visible){B=A
}A--
}}return B
};
DwtListView.prototype._getNextResizeableColumnIndex=function(D,A){A=A?AjxUtil.arrayAsHash(A):{};
A[D]=true;
if(this._headerList){for(var C=D+1;
C<this._headerList.length;
C++){var B=this._headerList[C];
if(A[C]){continue
}if(B._visible&&B._resizeable){return C
}}for(var C=0;
C<D;
C++){if(A[C]){continue
}var B=this._headerList[C];
if(B._visible&&B._resizeable){return C
}}}return null
};
DwtListView.prototype._relayout=function(){this.headerColCreated=false;
var C=this._headerIdHash[this._currentColId];
var A=(C&&C._sortable)?C._field:null;
var B=this.getSelection()[0];
this.setUI(A);
this.setSelection(B,true)
};
DwtListView.prototype._getParentForColResize=function(){return this
};
DwtListView.prototype._sizeChildren=function(A){if(this.headerColCreated&&this._listDiv&&(A!=Dwt.DEFAULT)){Dwt.setSize(this._listDiv,Dwt.DEFAULT,A-DwtListView.HEADERITEM_HEIGHT)
}};
DwtListView.prototype._getChildren=function(){return null
};
DwtListView.prototype._focus=function(){if(this._kbAnchor){Dwt.addClass(this._kbAnchor,this._kbFocusClass)
}};
DwtListView.prototype._blur=function(){this._unmarkKbAnchorElement()
};
DwtListView.prototype._unmarkKbAnchorElement=function(A){if(this._kbAnchor){if(this._selectedItems.contains(this._kbAnchor)){Dwt.delClass(this._kbAnchor,this._styleRe,this._selectedClass)
}else{Dwt.delClass(this._kbAnchor,this._styleRe)
}}if(A){this._kbAnchor=null
}};
DwtListHeaderItem=function(B){if(arguments.length==0){return 
}B=Dwt.getParams(arguments,DwtListView.PARAMS);
this._field=B.field;
this._label=B.text;
this._iconInfo=B.icon;
this._sortable=B.sortable;
this._resizeable=B.resizeable;
this._visible=(B.visible!==false);
this._name=B.name||B.text;
this._align=B.align;
this._noRemove=B.noRemove;
var A=parseInt(B.width);
if(isNaN(A)||!A){this._width="auto";
this._variable=true;
this._resizeable=true
}else{if(String(A)==String(B.width)){this._width=A
}else{this._width=parseInt(String(B.width).substr(0,String(A).length));
this._widthUnits=AjxStringUtil.getUnitsFromSizeString(B.width)
}}};
DwtListHeaderItem.PARAMS=["id","text","icon","width","sortable","resizeable","visible","name","align","noRemove","view"];
DwtListHeaderItem.sortCompare=function(B,A){return B._index<A._index?-1:(B._index>A._index?1:0)
};
DwtListHeaderItem.prototype.toString=function(){return"DwtListHeaderItem"
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtButton")){DwtButton=function(C){if(arguments.length==0){return 
}C=Dwt.getParams(arguments,DwtButton.PARAMS);
C.className=C.className||"ZButton";
DwtLabel.call(this,C);
var B=C.parent;
if(!B._hasSetMouseEvents||AjxEnv.isIE){this._setMouseEvents()
}var A;
if(B._hasSetMouseEvents){A=AjxEnv.isIE?[DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE]:[]
}else{A=AjxEnv.isIE?[DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE]:[DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT];
A=A.concat([DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP])
}if(A&&A.length){this._setEventHdlrs(A)
}this._listeners=C.listeners||DwtButton._listeners;
this._addMouseListeners();
this._ignoreInternalOverOut=true;
this._dropDownEvtMgr=new AjxEventMgr();
this._selected=false;
this._actionTiming=C.actionTiming||DwtButton.ACTION_MOUSEUP;
this.__preventMenuFocus=null
};
DwtButton.PARAMS=["parent","style","className","posStyle","actionTiming","id","index","listeners"];
DwtButton.prototype=new DwtLabel;
DwtButton.prototype.constructor=DwtButton;
DwtButton.prototype.toString=function(){return"DwtButton"
};
DwtButton.TOGGLE_STYLE=DwtLabel._LAST_STYLE*2;
DwtButton.ALWAYS_FLAT=DwtLabel._LAST_STYLE*4;
DwtButton._LAST_STYLE=DwtButton.ALWAYS_FLAT;
DwtButton.ACTION_MOUSEUP=1;
DwtButton.ACTION_MOUSEDOWN=2;
DwtButton.NOTIFY_WINDOW=500;
DwtButton.prototype.TEMPLATE="dwt.Widgets#ZButton";
DwtButton.prototype.dispose=function(){if((this._menu instanceof DwtMenu)&&(this._menu.parent==this)){this._menu.dispose();
this._menu=null
}DwtLabel.prototype.dispose.call(this)
};
DwtButton.prototype.addSelectionListener=function(B,A){this.addListener(DwtEvent.SELECTION,B,A)
};
DwtButton.prototype.removeSelectionListener=function(A){this.removeListener(DwtEvent.SELECTION,A)
};
DwtButton.prototype.removeSelectionListeners=function(){this.removeAllListeners(DwtEvent.SELECTION)
};
DwtButton.prototype.addDropDownSelectionListener=function(A){return this._dropDownEvtMgr.addListener(DwtEvent.SELECTION,A)
};
DwtButton.prototype.removeDropDownSelectionListener=function(A){this._dropDownEvtMgr.removeListener(DwtEvent.SELECTION,A)
};
DwtButton.prototype._dropDownImg="SelectPullDownArrow";
DwtButton.prototype._dropDownDepImg="SelectPullDownArrow";
DwtButton.prototype._dropDownHovImg="SelectPullDownArrowHover";
DwtButton.prototype.setDropDownImages=function(B,C,D,A){this._dropDownImg=B;
this._dropDownHovImg=D;
this._dropDownDepImg=A
};
DwtButton.prototype._addEventListeners=function(C,B){for(var A=0;
A<B.length;
A++){this.addListener(event,C[event])
}};
DwtButton.prototype._removeEventListeners=function(C,B){for(var A=0;
A<B.length;
A++){this.removeListener(event,C[event])
}};
DwtButton.prototype._addMouseListeners=function(){var B=[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP];
B=B.concat(AjxEnv.isIE?[DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE]:[DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT]);
for(var A=0;
A<B.length;
A++){this.addListener(B[A],this._listeners[B[A]])
}};
DwtButton.prototype._removeMouseListeners=function(){var B=[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP];
B=B.concat(AjxEnv.isIE?[DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE]:[DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT]);
for(var A=0;
A<B.length;
A++){this.removeListener(B[A],this._listeners[B[A]])
}};
DwtButton.prototype.setDisplayState=function(B,A){if(this._selected&&B!=DwtControl.SELECTED&&!A){B=[DwtControl.SELECTED,B].join(" ")
}DwtLabel.prototype.setDisplayState.call(this,B)
};
DwtButton.prototype.setEnabled=function(A){if(A!=this._enabled){DwtLabel.prototype.setEnabled.call(this,A);
if(A){this._addMouseListeners();
if(this._menu){this._setupDropDownCellMouseHandlers();
if(this._dropDownEl){AjxImg.setImage(this._dropDownEl,this._dropDownImg)
}}}else{this._removeMouseListeners();
if(this._menu){this._removeDropDownCellMouseHandlers();
if(this._dropDownEl){AjxImg.setDisabledImage(this._dropDownEl,this._dropDownImg)
}}}}};
DwtButton.prototype.setImage=function(A){DwtLabel.prototype.setImage.call(this,A);
this._setMinWidth()
};
DwtButton.prototype.setText=function(A){DwtLabel.prototype.setText.call(this,A);
this._setMinWidth()
};
DwtButton.prototype._setMinWidth=function(){if(this.getText()!=null){Dwt.addClass(this.getHtmlElement(),"ZHasText")
}else{Dwt.delClass(this.getHtmlElement(),"ZHasText")
}};
DwtButton.prototype.setHoverImage=function(A){this._hoverImageInfo=A
};
DwtButton.prototype.setMenu=function(D,B,C){this._menu=D;
this._shouldToggleMenu=(B===true);
this._followIconStyle=C;
if(this._menu){if(this._dropDownEl){var A=(this._imageCell)?1:0;
if(this._textCell){A++
}Dwt.addClass(this.getHtmlElement(),"ZHasDropDown");
AjxImg.setImage(this._dropDownEl,this._dropDownImg);
if(this._enabled){this._setupDropDownCellMouseHandlers()
}if(!(this._menu instanceof AjxCallback)){this._menu.setAssociatedElementId(this._dropDownEl.id)
}}if((this.__preventMenuFocus!=null)&&(this._menu instanceof DwtMenu)){this._menu.dontStealFocus(this.__preventMenuFocus)
}}else{if(this._dropDownEl){Dwt.delClass(this.getHtmlElement(),"ZHasDropDown");
this._dropDownEl.innerHTML=""
}}};
DwtButton.prototype._setupDropDownCellMouseHandlers=function(){this._dropDownEventsEnabled=true
};
DwtButton.prototype._removeDropDownCellMouseHandlers=function(){this._dropDownEventsEnabled=false
};
DwtButton.prototype.getMenu=function(A){if(this._menu instanceof AjxCallback){if(A){return null
}var B=this._menu;
this.setMenu(B.run());
if((this.__preventMenuFocus!=null)&&(this._menu instanceof DwtMenu)){this._menu.dontStealFocus(this.__preventMenuFocus)
}}if(this._menu){this.getHtmlElement().setAttribute("menuId",this._menu._htmlElId)
}return this._menu
};
DwtButton.prototype.resetClassName=function(){this.setDisplayState(DwtControl.NORMAL)
};
DwtButton.prototype.setActionTiming=function(A){this._actionTiming=A
};
DwtButton.prototype.setHovered=function(A){this.setDisplayState(A?DwtControl.HOVER:DwtControl.NORMAL)
};
DwtButton.prototype.setEnabledImage=function(A){this._enabledImageInfo=A;
this.setImage(A)
};
DwtButton.prototype.setDepressedImage=function(A){this._depressedImageInfo=A
};
DwtButton.prototype.setSelected=function(A){if(this._selected!=A){this._selected=A;
this.setDisplayState(A?DwtControl.SELECTED:DwtControl.NORMAL)
}};
DwtButton.prototype.isToggled=function(){return this._selected
};
DwtButton.prototype.popup=function(C){C=C||this.getMenu();
if(!C){return 
}var I=C.parent;
var E=I.getBounds();
var H=C.shell.getSize();
var A=C.getSize();
var J=I.getHtmlElement();
var B=Dwt.toWindow(J,0,0);
var K=(J.style.borderLeftWidth=="")?0:parseInt(J.style.borderLeftWidth);
var G=B.x+K;
G=((G+A.x)>=H.x)?H.x-A.x:G;
var D=(J.style.borderTopWidth=="")?0:parseInt(J.style.borderTopWidth);
D+=(J.style.borderBottomWidth=="")?0:parseInt(J.style.borderBottomWidth);
var F=B.y+E.height+D;
C.popup(0,G,F)
};
DwtButton.prototype.getKeyMapName=function(){return"DwtButton"
};
DwtButton.prototype.handleKeyAction=function(A,B){switch(A){case DwtKeyMap.SELECT:this._emulateSingleClick();
break;
case DwtKeyMap.SUBMENU:var C=this.getMenu();
if(!C){return false
}this._emulateDropDownClick();
C.setSelectedItem(0);
break
}return true
};
DwtButton.prototype._emulateSingleClick=function(){this.trigger();
var A=this.getHtmlElement();
var B=Dwt.toWindow(A);
var C=new DwtMouseEvent();
this._setMouseEvent(C,{dwtObj:this,target:A,button:DwtMouseEvent.LEFT,docX:B.x,docY:B.y});
if(this._actionTiming==DwtButton.ACTION_MOUSEDOWN){this.notifyListeners(DwtEvent.ONMOUSEDOWN,C)
}else{this.notifyListeners(DwtEvent.ONMOUSEUP,C)
}};
DwtButton.prototype._emulateDropDownClick=function(){var A=this._dropDownEl;
if(!A){return 
}var B=Dwt.toWindow(A);
var C=new DwtMouseEvent();
this._setMouseEvent(C,{dwtObj:this,target:A,button:DwtMouseEvent.LEFT,docX:B.x,docY:B.y});
DwtButton._dropDownCellMouseDownHdlr(C)
};
DwtButton.prototype._focusByMouseUpEvent=function(){DwtShell.getShell(window).getKeyboardMgr().grabFocus(this.getTabGroupMember())
};
DwtButton.prototype._focus=function(){this.setDisplayState(DwtControl.FOCUSED)
};
DwtButton.prototype._blur=function(){this.setDisplayState(DwtControl.NORMAL)
};
DwtButton.prototype._toggleMenu=function(){if(this._shouldToggleMenu){var A=this.getMenu();
if(!A.isPoppedup()){this.popup();
this._menuUp=true
}else{A.popdown();
this._menuUp=false;
this.deactivate()
}}else{this.popup()
}};
DwtButton.prototype._isDropDownEvent=function(B){if(this._dropDownEventsEnabled&&this._dropDownEl){var A=B.docX;
var C=Dwt.toWindow(this._dropDownEl,0,0,window).x;
if(A>=C){return true
}}return false
};
DwtButton.prototype.trigger=function(){if(this._depressedImageInfo){this.setImage(this._depressedImageInfo)
}this.setDisplayState(DwtControl.ACTIVE,true);
this.isActive=true
};
DwtButton.prototype.deactivate=function(){if(this._hoverImageInfo){this.setImage(this._hoverImageInfo)
}if(this._style&DwtButton.TOGGLE_STYLE){this._selected=!this._selected
}this.setDisplayState(DwtControl.HOVER)
};
DwtButton.prototype.dontStealFocus=function(A){if(A==null){A=true
}if(this._menu instanceof DwtMenu){this._menu.dontStealFocus(A)
}this.__preventMenuFocus=A
};
DwtButton.prototype._handleClick=function(B){if(this.isListenerRegistered(DwtEvent.SELECTION)){var A=(new Date()).getTime();
if(!this._lastNotify||(A-this._lastNotify>DwtButton.NOTIFY_WINDOW)){var C=DwtShell.selectionEvent;
DwtUiEvent.copy(C,B);
C.item=this;
C.detail=(typeof this.__detail=="undefined")?0:this.__detail;
this.notifyListeners(DwtEvent.SELECTION,C);
this._lastNotify=A
}}else{if(this._menu){this._toggleMenu()
}}};
DwtButton.prototype._setMouseOutClassName=function(){this.setDisplayState(DwtControl.NORMAL)
};
DwtButton.prototype._createHtmlFromTemplate=function(A,B){DwtLabel.prototype._createHtmlFromTemplate.call(this,A,B);
this._dropDownEl=document.getElementById(B.id+"_dropdown")
};
DwtButton._dropDownCellMouseDownHdlr=function(B){var D=DwtControl.getTargetControl(B);
if(D&&D.getMenu()&&D.getMenu().isPoppedup()){D.getMenu().popdown()
}var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B,D);
if(A.button==DwtMouseEvent.LEFT){if(this._depImg){AjxImg.setImage(this,this._depImg)
}DwtEventManager.notifyListeners(DwtEvent.ONMOUSEDOWN,A);
if(D._menu instanceof AjxCallback){D.popup()
}if(D._dropDownEvtMgr.isListenerRegistered(DwtEvent.SELECTION)){var C=DwtShell.selectionEvent;
DwtUiEvent.copy(C,A);
C.item=D;
D._dropDownEvtMgr.notifyListeners(DwtEvent.SELECTION,C)
}else{D._toggleMenu()
}}A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtButton._dropDownCellMouseUpHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
if(A.button==DwtMouseEvent.LEFT){if(this._hovImg&&!this.noMenuBar){AjxImg.setImage(this,this._hovImg)
}}A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtButton._mouseOverListener=function(C){var B=C.dwtObj;
if(!B){return false
}if(B._hoverImageInfo){var A=B._getIconEl();
A.firstChild.className=AjxImg.getClassForImage(B._hoverImageInfo)
}B.setDisplayState(DwtControl.HOVER);
var D=B._dropDownEl;
if(B._menu&&D&&B._dropDownHovImg&&!B.noMenuBar&&B.isListenerRegistered(DwtEvent.SELECTION)){AjxImg.setImage(D,B._dropDownHovImg)
}C._stopPropagation=true
};
DwtButton._mouseOutListener=function(B){var A=B.dwtObj;
if(!A){return false
}if(A._hoverImageInfo){A.setImage(A._enabledImageInfo)
}A._setMouseOutClassName();
A.isActive=false;
var C=A._dropDownEl;
if(A._menu&&C){AjxImg.setImage(C,A._dropDownImg)
}};
DwtButton._mouseDownListener=function(B){var A=B.dwtObj;
if(!A){return false
}if(A._isDropDownEvent(B)){return DwtButton._dropDownCellMouseDownHdlr(B)
}if(B.button!=DwtMouseEvent.LEFT){return 
}var C=A._dropDownEl;
if(A._menu&&C&&A._dropDownDepImg){AjxImg.setImage(C,A._dropDownDepImg)
}switch(A._actionTiming){case DwtButton.ACTION_MOUSEDOWN:A.trigger();
A._handleClick(B);
break;
case DwtButton.ACTION_MOUSEUP:A.trigger();
break
}};
DwtButton._mouseUpListener=function(C){var A=C.dwtObj;
if(!A){return false
}if(A._isDropDownEvent(C)){return DwtButton._dropDownCellMouseUpHdlr(C)
}if(C.button!=DwtMouseEvent.LEFT){return 
}var D=A._dropDownEl;
if(A._menu&&D&&A._dropDownHovImg&&!A.noMenuBar){AjxImg.setImage(D,A._dropDownHovImg)
}switch(A._actionTiming){case DwtButton.ACTION_MOUSEDOWN:A.deactivate();
break;
case DwtButton.ACTION_MOUSEUP:var B=A.getHtmlElement();
if(A.isActive){A.deactivate();
A._handleClick(C)
}break
}};
DwtButton._listeners={};
DwtButton._listeners[DwtEvent.ONMOUSEOVER]=new AjxListener(null,DwtButton._mouseOverListener);
DwtButton._listeners[DwtEvent.ONMOUSEOUT]=new AjxListener(null,DwtButton._mouseOutListener);
DwtButton._listeners[DwtEvent.ONMOUSEDOWN]=new AjxListener(null,DwtButton._mouseDownListener);
DwtButton._listeners[DwtEvent.ONMOUSEUP]=new AjxListener(null,DwtButton._mouseUpListener);
DwtButton._listeners[DwtEvent.ONMOUSEENTER]=new AjxListener(null,DwtButton._mouseOverListener);
DwtButton._listeners[DwtEvent.ONMOUSELEAVE]=new AjxListener(null,DwtButton._mouseOutListener)
}if(AjxPackage.define("ajax.dwt.widgets.DwtMenuItem")){DwtMenuItem=function(C){if(arguments.length==0){return 
}C=Dwt.getParams(arguments,DwtMenuItem.PARAMS);
var B=C.parent;
if(!(B instanceof DwtMenu)){throw new DwtException("Parent must be a DwtMenu object",DwtException.INVALIDPARENT,"DwtMenuItem")
}var A=C.style=C.style||DwtMenuItem.NO_STYLE;
if(B._style==DwtMenu.BAR_STYLE&&A!=DwtMenuItem.PUSH_STYLE){throw new DwtException("DwtMenuItemInit: invalid style",DwtException.INVALID_PARAM,"DwtMenuItem")
}A&=~DwtLabel.IMAGE_RIGHT;
A|=DwtButton.ALWAYS_FLAT|DwtLabel.IMAGE_LEFT;
C.className=(A&DwtMenuItem.SEPARATOR_STYLE)?"ZMenuItemSeparator":(C.className||"ZMenuItem");
C.listeners=DwtMenuItem._listeners;
DwtButton.call(this,C);
this.setDropDownImages("Cascade","Cascade","Cascade","Cascade");
this._radioGroupId=C.radioGroupId;
if(B._addItem){B._addItem(this,C.index)
}if(!(A&DwtMenuItem.SEPARATOR_STYLE)){this._subMenuMouseOverListener=new AjxListener(this,this.__handleSubMenuMouseOver);
this.addSelectionListener(new AjxListener(this,this.__handleItemSelect))
}};
DwtMenuItem.PARAMS=["parent","style","radioGroupId","index","className","posStyle"];
DwtMenuItem.prototype=new DwtButton;
DwtMenuItem.prototype.constructor=DwtMenuItem;
DwtMenuItem.prototype.toString=function(){return"DwtMenuItem"
};
DwtMenuItem.CHECKED=1;
DwtMenuItem.UNCHECKED=2;
DwtMenuItem.NO_STYLE=0;
DwtMenuItem.CHECK_STYLE=DwtButton._LAST_STYLE*2;
DwtMenuItem.RADIO_STYLE=DwtButton._LAST_STYLE*4;
DwtMenuItem.SEPARATOR_STYLE=DwtButton._LAST_STYLE*8;
DwtMenuItem.CASCADE_STYLE=DwtButton._LAST_STYLE*16;
DwtMenuItem.PUSH_STYLE=DwtButton._LAST_STYLE*32;
DwtMenuItem.SELECT_STYLE=DwtButton._LAST_STYLE*64;
DwtMenuItem._LAST_STYLE=DwtMenuItem.SELECT_STYLE;
DwtMenuItem._MENU_POPUP_DELAY=250;
DwtMenuItem._MENU_POPDOWN_DELAY=250;
DwtMenuItem.prototype.TEMPLATE="dwt.Widgets#ZMenuItem";
DwtMenuItem.prototype.SEPARATOR_TEMPLATE="dwt.Widgets#ZMenuItemSeparator";
DwtMenuItem.prototype.BLANK_CHECK_TEMPLATE="dwt.Widgets#ZMenuItemBlankCheck";
DwtMenuItem.prototype.BLANK_ICON_TEMPLATE="dwt.Widgets#ZMenuItemBlankIcon";
DwtMenuItem.prototype.BLANK_CASCADE_TEMPLATE="dwt.Widgets#ZMenuItemBlankCascade";
DwtMenuItem.prototype.dispose=function(){delete this._checkEl;
DwtButton.prototype.dispose.call(this)
};
DwtMenuItem.create=function(B){var A=new DwtMenuItem(B);
if(B.imageInfo){A.setImage(B.imageInfo)
}if(B.text){A.setText(B.text)
}A.setEnabled(B.enabled!==false);
return A
};
DwtMenuItem.prototype.getChecked=function(){return this._itemChecked
};
DwtMenuItem.prototype.setChecked=function(B,A){this._setChecked(B,null,A);
this.parent._checkItemAdded(this)
};
DwtMenuItem.prototype.setImage=function(A){DwtButton.prototype.setImage.call(this,A);
this.parent._iconItemAdded(this)
};
DwtMenuItem.prototype.setMenu=function(C,A,B){DwtButton.prototype.setMenu.call(this,C,A,B);
this.parent._submenuItemAdded(this)
};
DwtMenuItem.prototype.setHoverDelay=function(A){this._hoverDelay=A
};
DwtMenuItem.prototype._createHtml=function(A){var B=this._style&DwtMenuItem.SEPARATOR_STYLE?this.SEPARATOR_TEMPLATE:this.TEMPLATE;
DwtButton.prototype._createHtml.call(this,A||B)
};
DwtMenuItem.prototype._createHtmlFromTemplate=function(A,B){DwtButton.prototype._createHtmlFromTemplate.call(this,A,B);
this._checkEl=document.getElementById(B.id+"_check")
};
DwtMenuItem.prototype._setChecked=function(G,F,B){var A=this._style&DwtMenuItem.CHECK_STYLE;
var E=this._style&DwtMenuItem.RADIO_STYLE;
if((A||E)&&this._itemChecked!=G){this._itemChecked=G;
if(this._checkEl){this._checkEl.innerHTML="";
var D=G?(A?"MenuCheck":"MenuRadio"):"Blank_9";
AjxImg.setImage(this._checkEl,D);
if(G){if(E){this.parent._radioItemSelected(this,B)
}var C=this.parent.parent?this.parent.parent:null;
if(C&&(C instanceof DwtButton)&&(C._followIconStyle==this._style)){C.setImage(this._imageInfo)
}}}}};
DwtMenuItem.prototype._addIconCell=function(){};
DwtMenuItem.prototype._checkItemAdded=function(A){};
DwtMenuItem.prototype._checkedItemsRemoved=function(){};
DwtMenuItem.prototype._submenuItemAdded=function(){if(this._style&DwtMenuItem.SEPARATOR_STYLE){return 
}if(this._cascCell==null){this._cascCell=this._row.insertCell(-1);
this._cascCell.noWrap=true;
this._cascCell.style.width=DwtMenuItem._CASCADE_DIM;
this._cascCell.style.height=(this._style!=DwtMenuItem.SEPARATOR_STYLE)?DwtMenuItem._CASCADE_DIM:DwtMenuItem._SEPAARATOR_DIM
}};
DwtMenuItem.prototype._submenuItemRemoved=function(){if(this._dropDownEl){this._dropDownEl.innerHTML=""
}};
DwtMenuItem.prototype._popupMenu=function(E,K){var A=this.getMenu();
var B=this.parent.parent;
var I=this.getBounds();
var F=A.shell.getSize();
var L=A.getSize();
var J;
var G;
var D;
var H;
var C=B.getHtmlElement();
if(B._style==DwtMenu.BAR_STYLE){D=(C.style.borderLeftWidth=="")?0:parseInt(C.style.borderLeftWidth);
J=I.x+D;
H=(C.style.borderTopWidth=="")?0:parseInt(C.style.borderTopWidth);
H+=(C.style.borderBottomWidth=="")?0:parseInt(C.style.borderBottonWidth);
G=I.y+I.height+H;
J=((J+L.x)>=F.x)?J-(J+L.x-F.x):J
}else{D=(C.style.borderLeftWidth=="")?0:parseInt(C.style.borderLeftWidth);
D+=(C.style.borderRightWidth=="")?0:parseInt(C.style.borderRightWidth);
J=I.x+I.width+D;
H=(C.style.borderTopWidth=="")?0:parseInt(C.style.borderTopWidth);
G=I.y+H;
J=((J+L.x)>=F.x)?I.x-L.x-D:J
}A.addListener(DwtEvent.ONMOUSEOVER,this._subMenuMouseOverListener);
A.popup(E,J,G,K)
};
DwtMenuItem.prototype._popdownMenu=function(){var A=this.getMenu();
if(A){A.popdown();
A.removeListener(DwtEvent.ONMOUSEOVER,this._subMenuMouseOverListener)
}};
DwtMenuItem.prototype._isMenuPoppedup=function(){var A=this.getMenu();
return(A&&A.isPoppedup())?true:false
};
DwtMenuItem.prototype.__handleItemSelect=function(A){this.setDisplayState(DwtControl.NORMAL);
if(this.isStyle(DwtMenuItem.CHECK_STYLE)){this._setChecked(!this._itemChecked,null,true);
A.detail=this.getChecked()?DwtMenuItem.CHECKED:DwtMenuItem.UNCHECKED
}else{if(this.isStyle(DwtMenuItem.RADIO_STYLE)){this._setChecked(true,true);
this.parent._radioItemSelected(this,true);
A.detail=this.getChecked()?DwtMenuItem.CHECKED:DwtMenuItem.UNCHECKED
}else{if(this.isStyle(DwtMenuItem.PUSH_STYLE)){if(this._menu){if(this._isMenuPoppedUp()){DwtMenu.closeActiveMenu()
}else{this._popupMenu()
}}return 
}}}if(!this.isStyle(DwtMenuItem.CASCADE_STYLE)){if(!this._menu||!this._menu.isPoppedup||!this._menu.isPoppedup()){DwtMenu.closeActiveMenu()
}}};
DwtMenuItem.prototype.__handleSubMenuMouseOver=function(A){this.setDisplayState(DwtControl.HOVER)
};
DwtMenuItem._mouseOverListener=function(B){var A=B.dwtObj;
if(!A){return false
}if(A._style&DwtMenuItem.SEPARATOR_STYLE){return false
}DwtButton._mouseOverListener(B,A);
A.parent._popdownSubmenus();
if(A._menu&&!B.ersatz){A._popupMenu(A._hoverDelay)
}};
DwtMenuItem._listeners={};
DwtMenuItem._listeners[DwtEvent.ONMOUSEOVER]=new AjxListener(null,DwtMenuItem._mouseOverListener);
DwtMenuItem._listeners[DwtEvent.ONMOUSEOUT]=new AjxListener(null,DwtButton._mouseOutListener);
DwtMenuItem._listeners[DwtEvent.ONMOUSEDOWN]=new AjxListener(null,DwtButton._mouseDownListener);
DwtMenuItem._listeners[DwtEvent.ONMOUSEUP]=new AjxListener(null,DwtButton._mouseUpListener);
DwtMenuItem._listeners[DwtEvent.ONMOUSEENTER]=new AjxListener(null,DwtMenuItem._mouseOverListener);
DwtMenuItem._listeners[DwtEvent.ONMOUSELEAVE]=new AjxListener(null,DwtButton._mouseOutListener)
}if(AjxPackage.define("ajax.dwt.widgets.DwtMenu")){DwtMenu=function(D){if(arguments.length==0){return 
}D=Dwt.getParams(arguments,DwtMenu.PARAMS);
this._origStyle=D.style;
var B=D.parent;
if(B){if(B instanceof DwtMenuItem||B instanceof DwtButton){if(D.style==DwtMenu.GENERIC_WIDGET_STYLE){this._style=D.style
}else{this._style=DwtMenu.DROPDOWN_STYLE
}}else{this._style=D.style||DwtMenu.POPUP_STYLE
}if(!D.posStyle){D.posStyle=(this._style==DwtMenu.BAR_STYLE)?DwtControl.STATIC_STYLE:DwtControl.ABSOLUTE_STYLE
}}D.className=D.className||"DwtMenu";
D.parent=(B instanceof DwtShell)?B:B.shell;
DwtComposite.call(this,D);
this.parent=B;
if(!B){return 
}var A=AjxEnv.isIE?[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP]:[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP,DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT];
this._setEventHdlrs(A);
this._hasSetMouseEvents=true;
var C=this.getHtmlElement();
Dwt.setLocation(C,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
if(this._style!=DwtMenu.COLOR_PICKER_STYLE&&this._style!=DwtMenu.CALENDAR_PICKER_STYLE&&this._style!=DwtMenu.GENERIC_WIDGET_STYLE){this._table=document.createElement("table");
this._table.border=this._table.cellPadding=this._table.cellSpacing=0;
this._table.className="DwtMenuTable";
C.appendChild(this._table);
this._table.backgroundColor=DwtCssStyle.getProperty(C,"background-color")
}if(D.style!=DwtMenu.BAR_STYLE){this.setZIndex(Dwt.Z_HIDDEN);
this._isPoppedup=false
}else{DwtMenu._activeMenuIds.add(C.id);
this._isPoppedup=true
}this._popdownAction=new AjxTimedAction(this,this._doPopdown);
this._popdownActionId=-1;
this._popupAction=new AjxTimedAction(this,this._doPopup);
this._popupActionId=-1;
if(AjxEnv.isIE){if((this.parent instanceof DwtMenuItem&&this.parent.parent._style==DwtMenu.BAR_STYLE)||!(this.parent instanceof DwtMenuItem)){this._outsideListener=new AjxListener(null,DwtMenu._outsideMouseDownListener)
}}this._menuItemsHaveChecks=false;
this._menuItemsHaveIcons=false;
this._menuItemsWithSubmenus=0;
this.__currentItem=null;
this.__preventMenuFocus=false;
this._menuCapObj=new DwtMouseEventCapture({targetObj:this,id:"DwtMenu",mouseDownHdlr:DwtMenu._capMouseDownHdlr,mouseWheelHdlr:DwtMenu._capMouseWheelHdlr,hardCapture:false});
this._tabGroup=new DwtTabGroup(this.toString(),true);
this._tabGroup.addMember(this)
};
DwtMenu.PARAMS=["parent","style","className","posStyle"];
DwtMenu.prototype=new DwtComposite;
DwtMenu.prototype.constructor=DwtMenu;
DwtMenu.prototype.toString=function(){return"DwtMenu"
};
DwtMenu.BAR_STYLE=1;
DwtMenu.POPUP_STYLE=2;
DwtMenu.DROPDOWN_STYLE=3;
DwtMenu.COLOR_PICKER_STYLE=4;
DwtMenu.CALENDAR_PICKER_STYLE=5;
DwtMenu.GENERIC_WIDGET_STYLE=6;
DwtMenu.HAS_ICON="ZHasIcon";
DwtMenu.HAS_CHECK="ZHasCheck";
DwtMenu.HAS_SUBMENU="ZHasSubMenu";
DwtMenu._activeMenuUp=false;
DwtMenu._activeMenuIds=new AjxVector();
DwtMenu._activeMenus=new AjxVector();
DwtMenu.prototype.dispose=function(){this._table=null;
DwtComposite.prototype.dispose.call(this);
if(!(this.parent instanceof DwtShell)){this.shell.removeChild(this)
}};
DwtMenu.prototype.addPopupListener=function(A){this.addListener(DwtEvent.POPUP,A)
};
DwtMenu.prototype.removePopupListener=function(A){this.removeListener(DwtEvent.POPUP,A)
};
DwtMenu.prototype.addPopdownListener=function(A){this.addListener(DwtEvent.POPDOWN,A)
};
DwtMenu.prototype.removePopdownListener=function(A){this.removeListener(DwtEvent.POPDOWN,A)
};
DwtMenu.prototype.getItem=function(A){return this._children.get(A)
};
DwtMenu.prototype.getItemById=function(C,E){var A=this.getItems();
for(var B=0;
B<A.length;
B++){var D=A[B].getData(C);
if(D==E){return A[B]
}}return null
};
DwtMenu.prototype.getItemCount=function(){return this._children.size()
};
DwtMenu.prototype.getItems=function(){return this._children.getArray()
};
DwtMenu.prototype.getSelectedItem=function(D){var A=this._children.getArray();
for(var C=0;
C<A.length;
C++){var B=A[C];
if((D==null||(B._style&&D!=0))&&B.getChecked()){return B
}}return null
};
DwtMenu.prototype.isPoppedup=function(){return this._isPoppedup
};
DwtMenu.prototype.popup=function(C,A,D,B){if(this._style==DwtMenu.BAR_STYLE){return 
}if(this._popdownActionId!=-1){AjxTimedAction.cancelAction(this._popdownActionId);
this._popdownActionId=-1
}else{if(this._isPoppedup||(this._popupActionId!=-1&&C&&C>0)){return 
}else{if(this._popupActionId!=-1){AjxTimedAction.cancelAction(this._popupActionId);
this._popupActionId=-1
}}if(!C){this._doPopup(A,D,B)
}else{this._popupAction.args=[A,D,B];
this._popupActionId=AjxTimedAction.scheduleAction(this._popupAction,C)
}}};
DwtMenu.prototype.popdown=function(A){if(this._style==DwtMenu.BAR_STYLE){return 
}if(this._popupActionId!=-1){AjxTimedAction.cancelAction(this._popupActionId);
this._popupActionId=-1
}else{if(!this._isPoppedup||this._popdownActionId!=-1){return 
}if(A==null||A==0){this._doPopdown()
}else{this._popdownActionId=AjxTimedAction.scheduleAction(this._popdownAction,A)
}}};
DwtMenu.prototype.getKeyMapName=function(){return"DwtMenu"
};
DwtMenu.prototype.handleKeyAction=function(A,B){switch(this._style){case DwtMenu.BAR_STYLE:case DwtMenu.POPUP_STYLE:case DwtMenu.DROPDOWN_STYLE:break;
default:return false
}switch(A){case DwtKeyMap.SELECT_NEXT:case DwtKeyMap.SELECT_PREV:this.setSelectedItem(A==DwtKeyMap.SELECT_NEXT);
break;
case DwtKeyMap.SELECT:if(this.__currentItem){this.__currentItem._emulateSingleClick()
}break;
case DwtKeyMap.SUBMENU:if(this.__currentItem&&this.__currentItem._menu){this.__currentItem._popupMenu(0,true)
}break;
case DwtKeyMap.PARENTMENU:if(this.parent instanceof DwtMenuItem){this.popdown(0)
}break;
case DwtKeyMap.CANCEL:if(this.__currentItem){var C=new DwtMouseEvent();
this._setMouseEvent(C,{dwtObj:this.__currentItem});
this.notifyListeners(DwtEvent.ONMOUSEOUT,C);
this.__currentItem=null
}this.popdown(0);
break;
default:return false
}return true
};
DwtMenu.prototype._focus=function(){};
DwtMenu.prototype._blur=function(){};
DwtMenu.prototype.setAssociatedObj=function(A){this._associatedObj=A
};
DwtMenu.prototype.setAssociatedElementId=function(A){this._associatedElId=A
};
DwtMenu.prototype.checkItem=function(F,E,C){var A=this._children.getArray();
for(var B=0;
B<A.length;
B++){var D=A[B];
if(!(D.isStyle(DwtMenuItem.CHECK_STYLE)||D.isStyle(DwtMenuItem.RADIO_STYLE))){continue
}var G=D.getData(F);
if(G==E){D.setChecked(true,C)
}}};
DwtMenu.prototype.setSelectedItem=function(B){var A=this.__currentItem;
if(typeof (B)=="boolean"){A=!A?this._children.get(0):B?this._children.getNext(A):this._children.getPrev(A)
}else{A=this._children.get(B)
}while(A&&(A.isStyle(DwtMenuItem.SEPARATOR_STYLE)||!A.getEnabled()||!A.getVisible())){A=(B===false)?this._children.getPrev(A):this._children.getNext(A)
}if(!A){return 
}var C=new DwtMouseEvent();
if(this.__currentItem){this._setMouseEvent(C,{dwtObj:this.__currentItem});
this.__currentItem.notifyListeners(DwtEvent.ONMOUSEOUT,C)
}this._setMouseEvent(C,{dwtObj:A});
A.notifyListeners(DwtEvent.ONMOUSEOVER,C);
this.__currentItem=A
};
DwtMenu.prototype.clearExternallySelectedItems=function(){if(this._externallySelected!=null){this._externallySelected._deselect();
this._externallySelected=null
}};
DwtMenu.prototype.removeChild=function(C){if(this._table){if(this._style==DwtMenu.BAR_STYLE){var A=C.getHtmlElement().parentNode;
this._table.rows[0].deleteCell(Dwt.getCellIndex(A))
}else{var B=C.getHtmlElement();
if(B){this._table.deleteRow(B.parentNode.parentNode.rowIndex)
}}}this._children.remove(C)
};
DwtMenu.prototype.addChild=function(A){DwtComposite.prototype.addChild.apply(this,arguments);
if(Dwt.instanceOf(A,"DwtColorPicker")||Dwt.instanceOf(A,"DwtCalendar")||(this._style==DwtMenu.GENERIC_WIDGET_STYLE)){this._addItem(A)
}};
DwtMenu.prototype._addItem=function(D,B){if(this._style==DwtMenu.COLOR_PICKER_STYLE||this._style==DwtMenu.CALENDAR_PICKER_STYLE||this._style==DwtMenu.GENERIC_WIDGET_STYLE){return 
}var F;
var A;
if(this._style==DwtMenu.BAR_STYLE){var E=this._table.rows;
F=(E.length!=0)?E[0]:this._table.insertRow(0);
if(B==null||B>F.cells.length){B=E.cells.length
}A=F.insertCell(B);
A.align="center";
A.vAlign="middle";
var C=F.insertCell(-1);
C.nowrap=true;
C.width="7px"
}else{if(D.isStyle&&(D.isStyle(DwtMenuItem.CHECK_STYLE)||D.isStyle(DwtMenuItem.RADIO_STYLE))){this._checkItemAdded()
}if(B==null||B>this._table.rows.length){B=-1
}F=this._table.insertRow(B);
A=F.insertCell(0)
}A.noWrap=true;
A.appendChild(D.getHtmlElement())
};
DwtMenu.prototype._radioItemSelected=function(F,D){var B=F._radioGroupId;
var E=this._children.size();
var A=this._children.getArray();
for(var C=0;
C<E;
C++){if(A[C]!=F&&A[C].isStyle(DwtMenuItem.RADIO_STYLE)&&A[C]._radioGroupId==B&&A[C]._itemChecked){A[C].setChecked(false,D);
break
}}};
DwtMenu.prototype._menuHasCheckedItems=function(){return this._menuItemsHaveChecks
};
DwtMenu.prototype._menuHasItemsWithIcons=function(){return this._menuItemsHaveIcons
};
DwtMenu.prototype._menuHasSubmenus=function(){return(this._menuItemsWithSubmenus>0)
};
DwtMenu.prototype._iconItemAdded=function(A){if(!this._menuItemsHaveIcons){Dwt.addClass(this.getHtmlElement(),DwtMenu.HAS_ICON)
}this._menuItemsHaveIcons=true
};
DwtMenu.prototype._checkItemAdded=function(A){if(!this._menuItemsHaveChecks){Dwt.addClass(this.getHtmlElement(),DwtMenu.HAS_CHECK)
}this._menuItemsHaveChecks=true
};
DwtMenu.prototype._submenuItemAdded=function(){Dwt.addClass(this.getHtmlElement(),DwtMenu.HAS_SUBMENU);
this._menuItemsWithSubmenus++
};
DwtMenu.prototype._submenuItemRemoved=function(){if(this._menuItemsWithSubmenus==1){var C=this._children.size();
var A=this._children.getArray();
for(var B=0;
B<C;
B++){A[B]._submenuItemRemoved()
}}this._menuItemsWithSubmenus--;
if(this._menuItemsWithSubmenus==0){Dwt.delClass(this.getHtmlElement(),DwtMenu.HAS_SUBMENU)
}};
DwtMenu.prototype._popdownSubmenus=function(){var C=this._children.size();
var A=this._children.getArray();
for(var B=0;
B<C;
B++){A[B]._popdownMenu()
}};
DwtMenu.prototype.dontStealFocus=function(A){if(A==null){A=true
}this.__preventMenuFocus=!!A
};
DwtMenu.prototype._doPopup=function(L,J,Q){var N=this.shell.getSize();
var T=this.getSize();
N.y-=10+(AjxEnv.isIE?20:0);
N.x-=20;
var B=(this._style==DwtMenu.POPUP_STYLE||this._style==DwtMenu.DROPDOWN_STYLE);
if(B){var U=N.y;
var V=null;
var K=this._table.rows;
var C=K.length;
var P=T.y;
var I=U-25;
for(var S=C-1;
S>=0;
S--){P-=Dwt.getSize(K[S]).y;
if(P<I){break
}}var H=S+1;
for(var R=H;
R<C;
R++){var G=K[(R-H)%H];
var A=G.insertCell(-1);
A.className="DwtMenuCascadeCell";
var F=K[R].cells[0].firstChild;
while(F!=null){A.appendChild(F);
F=F.nextSibling
}}for(R=K.length-1;
R>=H;
R--){this._table.deleteRow(H)
}var E=C%H;
if(E>0){for(var R=E;
R<H;
R++){var G=K[R];
var A=G.insertCell(-1);
A.className="DwtMenuCascadeCell";
A.empty=true;
A.innerHTML="&nbsp;"
}}T=this.getSize();
if(V){J=V-T.y
}}var W=((L+T.x)>=N.x)?(N.x-T.x):L;
var V=((J+T.y)>=N.y)?(N.y-T.y):J;
this.setLocation(W,B?V:J);
this.setSize("auto",B||J+T.y<N.y-5?"auto":N.y-J-5);
this.setScrollStyle(B?Dwt.CLIP:Dwt.SCROLL);
this.notifyListeners(DwtEvent.POPUP,this);
var D=this.shell.getToolTip();
if(D){D.popdown()
}var O=DwtBaseDialog.getActiveDialog()?Dwt.Z_DIALOG_MENU:Dwt.Z_MENU;
this.setZIndex(O);
this._popupActionId=-1;
this._isPoppedup=true;
if(AjxEnv.isIE&&this._outsideListener){this.shell._setEventHdlrs([DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEWHEEL]);
this.shell.addListener(DwtEvent.ONMOUSEDOWN,this._outsideListener);
this.shell.addListener(DwtEvent.ONMOUSEWHEEL,this._outsideListener)
}if(!DwtMenu._activeMenu){DwtMenu._activeMenu=this;
DwtMenu._activeMenuUp=true;
if(AjxEnv.isIE){DwtEventManager.addListener(DwtEvent.ONMOUSEDOWN,DwtMenu._outsideMouseDownListener);
DwtEventManager.addListener(DwtEvent.ONMOUSEWHEEL,DwtMenu._outsideMouseDownListener)
}}DwtMenu._activeMenuIds.add(this._htmlElId);
DwtMenu._activeMenuIds.sort();
DwtMenu._activeMenus.add(this);
if(!this._menuCapObj.capturing()){this._menuCapObj.capture();
this._capturing=true
}else{this._capturing=false
}if((AjxEnv.isGeckoBased||AjxEnv.isSafari||(this._origStyle==DwtMenu.CALENDAR_PICKER_STYLE))&&this._table){var M=this.getHtmlElement();
M.style.width=T.x+"px"
}if(!this.__preventMenuFocus){DwtShell.getShell(window).getKeyboardMgr().pushTabGroup(this._tabGroup)
}if(Q){this.handleKeyAction(DwtKeyMap.SELECT_NEXT)
}};
DwtMenu.prototype.getSize=function(A){if(this._table){return Dwt.getSize(this._table,A)
}return DwtComposite.prototype.getSize.call(this,A)
};
DwtMenu.prototype._doPopdown=function(){var F=this._children.getArray();
var I=this._children.size();
for(var D=0;
D<I;
D++){if((F[D] instanceof DwtMenuItem)&&!(F[D].isStyle(DwtMenuItem.SEPARATOR_STYLE))){F[D]._popdownMenu()
}}this.setZIndex(Dwt.Z_HIDDEN);
this.setLocation(Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
this.notifyListeners(DwtEvent.POPDOWN,this);
if(AjxEnv.isIE&&this._outsideListener){this.shell._setEventHdlrs([DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEWHEEL],true);
this.shell.removeListener(DwtEvent.ONMOUSEDOWN,this._outsideListener);
this.shell.removeListener(DwtEvent.ONMOUSEWHEEL,this._outsideListener)
}if(DwtMenu._activeMenu==this){DwtMenu._activeMenu=null;
DwtMenu._activeMenuUp=false;
if(AjxEnv.isIE){DwtEventManager.removeListener(DwtEvent.ONMOUSEDOWN,DwtMenu._outsideMouseDownListener);
DwtEventManager.removeListener(DwtEvent.ONMOUSEWHEEL,DwtMenu._outsideMouseDownListener)
}}DwtMenu._activeMenuIds.remove(this._htmlElId);
DwtMenu._activeMenus.remove(this);
this._popdownActionId=-1;
this._isPoppedup=false;
if(this._capturing&&(DwtMouseEventCapture.getId()=="DwtMenu")){this._menuCapObj.release();
this._capturing=false
}if((this._style==DwtMenu.POPUP_STYLE||this._style==DwtMenu.DROPDOWN_STYLE)&&this._table.rows.length&&this._table.rows[0].cells.length){var B=this._table.rows[0].cells.length;
var E=this._table.rows.length;
for(var D=1;
D<B;
D++){for(var C=0;
C<E;
C++){var G=this._table.rows[C].cells[D];
if(!G.empty){var A=G.firstChild;
var H=this._table.insertRow(this._table.rows.length);
var G=H.insertCell(0);
while(A!=null){G.appendChild(A);
A=A.nextSibling
}}}}for(var C=0;
C<E;
C++){var H=this._table.rows[C];
for(var D=H.cells.length-1;
D>0;
D--){H.deleteCell(D)
}}}this.__currentItem=null;
DwtShell.getShell(window).getKeyboardMgr().popTabGroup(this._tabGroup)
};
DwtMenu.prototype._getActiveItem=function(){var A=this._children.getArray();
var C=this._children.size();
for(var B=0;
B<C;
B++){if(A[B]._isMenuPoppedup()){return A[B]
}}return null
};
DwtMenu._outsideMouseDownListener=function(C){if(DwtMenu._activeMenuUp){var E=DwtMenu._activeMenu;
var A=DwtControl.getTargetControl(C);
if(E._associatedObj&&E._associatedObj==A){return false
}var F=E._htmlElId;
var D=DwtUiEvent.getTarget(C);
while(D!=null){if(D.id&&D.id!=""&&(D.id==F||D.id==E._associatedElId||DwtMenu._activeMenuIds.binarySearch(D.id)!=-1)){return false
}D=D.parentNode
}E.popdown();
var B=null;
do{B=DwtMenu._activeMenus.getLast();
if(B!=null&&B instanceof DwtMenu){B.popdown()
}}while(B!=null)
}C._stopPropagation=false;
C._returnValue=true;
return true
};
DwtMenu._capMouseDownHdlr=function(B){var C=DwtMouseEventCapture.getTargetObj();
var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
DwtMenu._outsideMouseDownListener(A);
DwtUiEvent.setBehaviour(B,false,true);
return true
};
DwtMenu._capMouseWheelHdlr=function(A){return DwtMenu._capMouseDownHdlr(A)
};
DwtMenu.menuShowing=function(){return DwtMenu._activeMenuUp
};
DwtMenu.closeActiveMenu=function(){if(DwtMenu._activeMenuUp){DwtMenu._activeMenu.popdown()
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtMessageDialog")){DwtMessageDialog=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtMessageDialog.PARAMS);
this._msgCellId=Dwt.getNextId();
A.standardButtons=A.buttons||[DwtDialog.OK_BUTTON];
DwtDialog.call(this,A);
this.setContent(this._contentHtml());
this._msgCell=document.getElementById(this._msgCellId);
this.addEnterListener(new AjxListener(this,this._enterListener))
};
DwtMessageDialog.PARAMS=["parent","className","buttons","extraButtons"];
DwtMessageDialog.prototype=new DwtDialog;
DwtMessageDialog.prototype.constructor=DwtMessageDialog;
DwtMessageDialog.CRITICAL_STYLE=1;
DwtMessageDialog.INFO_STYLE=2;
DwtMessageDialog.WARNING_STYLE=3;
DwtMessageDialog.TITLE={};
DwtMessageDialog.TITLE[DwtMessageDialog.CRITICAL_STYLE]=AjxMsg.criticalMsg;
DwtMessageDialog.TITLE[DwtMessageDialog.INFO_STYLE]=AjxMsg.infoMsg;
DwtMessageDialog.TITLE[DwtMessageDialog.WARNING_STYLE]=AjxMsg.warningMsg;
DwtMessageDialog.ICON={};
DwtMessageDialog.ICON[DwtMessageDialog.CRITICAL_STYLE]="Critical_32";
DwtMessageDialog.ICON[DwtMessageDialog.INFO_STYLE]="Information_32";
DwtMessageDialog.ICON[DwtMessageDialog.WARNING_STYLE]="Warning_32";
DwtMessageDialog.prototype.toString=function(){return"DwtMessageDialog"
};
DwtMessageDialog.prototype.setMessage=function(C,D,E){D=D||DwtMessageDialog.INFO_STYLE;
E=E||DwtMessageDialog.TITLE[D];
this.setTitle(E);
if(C){var B=[];
var A=0;
B[A++]="<table cellspacing=0 cellpadding=0 border=0 width='100%'><tr><td valign='top'>";
B[A++]=AjxImg.getImageHtml(DwtMessageDialog.ICON[D]);
B[A++]="</td><td class='DwtMsgArea'>";
B[A++]=C;
B[A++]="</td></tr></table>";
this._msgCell.innerHTML=B.join("")
}else{this._msgCell.innerHTML=""
}};
DwtMessageDialog.prototype.setSize=function(B,A){var C=document.getElementById(this._msgCellId);
if(C&&(B||A)){Dwt.setSize(C,B,A)
}};
DwtMessageDialog.prototype.reset=function(){this._msgCell.innerHTML="";
DwtDialog.prototype.reset.call(this)
};
DwtMessageDialog.prototype.handleKeyAction=function(A,B){if((A==DwtKeyMap.CANCEL)&&!this._button[DwtDialog.CANCEL_BUTTON]){A=DwtKeyMap.ENTER
}switch(A){case DwtKeyMap.CANCEL:this._runCallbackForButtonId(DwtDialog.CANCEL_BUTTON);
break;
default:DwtDialog.prototype.handleKeyAction.call(this,A,B);
break
}return true
};
DwtMessageDialog.prototype._contentHtml=function(){return"<div id='"+this._msgCellId+"' class='DwtMsgDialog'></div>"
};
DwtMessageDialog.prototype._enterListener=function(A){this._runEnterCallback()
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtHtmlEditor")){DwtHtmlEditor=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtHtmlEditor.PARAMS);
this.setBlankIframeSrc(A.blankIframeSrc);
A.className=A.className||"DwtHtmlEditor";
DwtComposite.call(this,A);
this._mode=(A.mode==DwtHtmlEditor.HTML&&this.isHtmlEditingSupported())?A.mode:DwtHtmlEditor.TEXT;
this.__eventClosure=AjxCallback.simpleClosure(this.__eventClosure,this);
this._pendingContent=A.content||"";
this._htmlModeInited=false;
this._initialize()
};
DwtHtmlEditor.PARAMS=["parent","className","posStyle","content","mode","blankIframeSrc"];
DwtHtmlEditor.prototype=new DwtComposite();
DwtHtmlEditor.prototype.constructor=DwtHtmlEditor;
DwtHtmlEditor.HTML="text/html";
DwtHtmlEditor.TEXT="text/plain";
DwtHtmlEditor.H1=1;
DwtHtmlEditor.H2=2;
DwtHtmlEditor.H3=3;
DwtHtmlEditor.H4=4;
DwtHtmlEditor.H5=5;
DwtHtmlEditor.H6=6;
DwtHtmlEditor.PARAGRAPH=7;
DwtHtmlEditor.ADDRESS=8;
DwtHtmlEditor.PREFORMATTED=9;
DwtHtmlEditor._STYLES=["","<h1>","<h2>","<h3>","<h4>","<h5>","<h6>","<p>","<address>","<pre>"];
DwtHtmlEditor.BOLD_STYLE="bold";
DwtHtmlEditor.ITALIC_STYLE="italic";
DwtHtmlEditor.UNDERLINE_STYLE="underline";
DwtHtmlEditor.STRIKETHRU_STYLE="strikethrough";
DwtHtmlEditor.SUBSCRIPT_STYLE="subscript";
DwtHtmlEditor.SUPERSCRIPT_STYLE="superscript";
DwtHtmlEditor.JUSTIFY_LEFT="justifyleft";
DwtHtmlEditor.JUSTIFY_CENTER="justifycenter";
DwtHtmlEditor.JUSTIFY_RIGHT="justifyright";
DwtHtmlEditor.JUSTIFY_FULL="justifyfull";
DwtHtmlEditor.OUTDENT="outdent";
DwtHtmlEditor.INDENT="indent";
DwtHtmlEditor.HORIZ_RULE="inserthorizontalrule";
DwtHtmlEditor.ORDERED_LIST="insertorderedlist";
DwtHtmlEditor.UNORDERED_LIST="insertunorderedlist";
DwtHtmlEditor.IMAGE="insertimage";
DwtHtmlEditor.BORDER_TOP=0;
DwtHtmlEditor.BORDER_MIDDLE=1;
DwtHtmlEditor.BORDER_BOTTOM=2;
DwtHtmlEditor.BORDER_LEFT=3;
DwtHtmlEditor.BORDER_CENTER=4;
DwtHtmlEditor.BORDER_RIGHT=5;
DwtHtmlEditor._H1_RE=/Heading 1|h1/;
DwtHtmlEditor._H2_RE=/Heading 2|h2/;
DwtHtmlEditor._H3_RE=/Heading 2|h3/;
DwtHtmlEditor._H4_RE=/Heading 2|h4/;
DwtHtmlEditor._H5_RE=/Heading 2|h5/;
DwtHtmlEditor._H6_RE=/Heading 2|h6/;
DwtHtmlEditor._PARAGRAPH_RE=/Normal|p/;
DwtHtmlEditor._ADDRESS_RE=/Address|address/;
DwtHtmlEditor._PREFORMATTED_RE=/Formatted|pre/;
DwtHtmlEditor._FONT_NAME="fontname";
DwtHtmlEditor._FONT_SIZE="fontsize";
DwtHtmlEditor._FONT_COLOR="forecolor";
DwtHtmlEditor._FONT_HILITE="hilitecolor";
DwtHtmlEditor._FONT_HILITE_IE="backcolor";
DwtHtmlEditor._FORMAT_BLOCK="formatblock";
DwtHtmlEditor._INITDELAY=50;
DwtHtmlEditor._BLOCK_ELEMENTS={address:1,body:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,iframe:1,li:1,ol:1,p:1,pre:1,quote:1,table:1,tbody:1,td:1,textarea:1,tfoot:1,thead:1,tr:1,ul:1};
DwtHtmlEditor._ACTION_CODE_TO_CMD={};
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.TEXT_BOLD]=DwtHtmlEditor.BOLD_STYLE;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.TEXT_ITALIC]=DwtHtmlEditor.ITALIC_STYLE;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.TEXT_UNDERLINE]=DwtHtmlEditor.UNDERLINE_STYLE;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.TEXT_STRIKETHRU]=DwtHtmlEditor.STRIKETHRU_STYLE;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.JUSTIFY_LEFT]=DwtHtmlEditor.JUSTIFY_LEFT;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.JUSTIFY_CENTER]=DwtHtmlEditor.JUSTIFY_CENTER;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.JUSTIFY_RIGHT]=DwtHtmlEditor.JUSTIFY_RIGHT;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.JUSTIFY_FULL]=DwtHtmlEditor.JUSTIFY_FULL;
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.HEADER1]=DwtHtmlEditor._STYLES[1];
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.HEADER2]=DwtHtmlEditor._STYLES[2];
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.HEADER3]=DwtHtmlEditor._STYLES[3];
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.HEADER4]=DwtHtmlEditor._STYLES[4];
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.HEADER5]=DwtHtmlEditor._STYLES[5];
DwtHtmlEditor._ACTION_CODE_TO_CMD[DwtKeyMap.HEADER6]=DwtHtmlEditor._STYLES[6];
DwtHtmlEditor.INIT_HTML=["<html><head><title>ZWC</title></head><body><p>",AjxEnv.isGeckoBased?"<br type='_moz' />":"","</p></body></html>"].join("");
DwtHtmlEditor.prototype.focus=function(){if(!AjxEnv.isIE&&this._mode==DwtHtmlEditor.TEXT){document.getElementById(this._textAreaId).focus()
}else{try{if(!this._htmlModeInited){setTimeout(AjxCallback.simpleClosure(this.focus,this),DwtHtmlEditor._INITDELAY);
return 
}this._getIframeWin().focus();
if(AjxEnv.isIE){if(this._currInsPt){if(this._currInsPt.text.length<=1){this._currInsPt.collapse(false)
}this._currInsPt.select()
}}}catch(A){}}};
DwtHtmlEditor.prototype.moveCaretToTop=function(){if(this._mode==DwtHtmlEditor.TEXT){var B=document.getElementById(this._textAreaId);
if(B.createTextRange){var A=B.createTextRange();
A.collapse(true);
A.select()
}else{if(B.setSelectionRange){B.setSelectionRange(0,0)
}}}else{this._moveCaretToTopHtml(true)
}};
DwtHtmlEditor.prototype._moveCaretToTopHtml=function(B){var A=this._getIframeDoc().body;
var E=false;
if(AjxEnv.isIE){if(A){A.createTextRange().collapse(true);
E=true
}}else{var C=this._getSelection();
if(C){C.collapse(A,0);
E=true
}}if(!E&&B){var D=new AjxTimedAction(this,this._moveCaretToTopHtml);
AjxTimedAction.scheduleAction(D,DwtHtmlEditor._INITDELAY+1)
}};
DwtHtmlEditor.prototype.addStateChangeListener=function(A){this.addListener(DwtEvent.STATE_CHANGE,A)
};
DwtHtmlEditor.prototype.removeStateChangeListener=function(A){this.removeListener(DwtEvent.STATE_CHANGE,A)
};
DwtHtmlEditor.prototype.clear=function(){this.setContent("")
};
DwtHtmlEditor.prototype.enable=function(A){if(this._textAreaId!=null){document.getElementById(this._textAreaId).disabled=!A
}if(this._iFrameId!=null){document.getElementById(this._iFrameId).disabled=!A
}};
DwtHtmlEditor.prototype.setBlankIframeSrc=function(A){this._blankIframeSrc=A
};
DwtHtmlEditor.prototype.isHtmlEditingSupported=function(){return(!!(AjxEnv.isGeckoBased||AjxEnv.isIE||AjxEnv.isSafari3))
};
DwtHtmlEditor.prototype.getContent=function(){if(this._mode==DwtHtmlEditor.HTML){var C=this._getIframeDoc();
var A=C&&C.body?(this._getIframeDoc().body.innerHTML):"";
return this._embedHtmlContent(A)
}else{var B=document.getElementById(this._textAreaId);
return B&&B.value
}};
DwtHtmlEditor.prototype._embedHtmlContent=function(A){return["<html><body>",A,"</body></html>"].join("")
};
DwtHtmlEditor.prototype.setContent=function(A){if(AjxEnv.isIE){this._currInsPt=null
}if(this._mode==DwtHtmlEditor.HTML){this._pendingContent=A?((A instanceof AjxVector)?A[0]:A):"";
if(this._htmlModeInited){this._setContentOnTimer()
}}else{document.getElementById(this._textAreaId).value=(A||"")
}};
DwtHtmlEditor.prototype.insertElement=function(A){this._execCommand(A)
};
DwtHtmlEditor.prototype.insertText=function(C,A){var B=this._getIframeDoc().createTextNode(C);
this._insertNodeAtSelection(B,A)
};
DwtHtmlEditor.prototype.insertImage=function(F,G,C,A){if(G){var D=this._getIframeDoc();
var B=D.createElement("img");
B.src=F;
if(C){B.width=C
}else{B.removeAttribute("width")
}if(A){B.height=A
}else{B.removeAttribute("height")
}var E=D.createDocumentFragment();
E.appendChild(B);
this._insertNodeAtSelection(E)
}else{this._execCommand(DwtHtmlEditor.IMAGE,F)
}};
DwtHtmlEditor.prototype.insertTable=function(P,L,C,B,H,K){if(this._mode!=DwtHtmlEditor.HTML){return 
}var N=this._getIframeDoc();
var O=N.createElement("table");
O.style.borderRight="1px solid #000";
O.style.borderLeft="1px solid #000";
O.style.borderTop="1px solid #000";
O.style.borderBottom="1px solid #000";
if(C!=null){O.style.width=C
}else{O.style.width="100%"
}O.style.textAlign="left";
O.style.verticalAlign="middle";
if(K!=null){O.align=K.toLowerCase()
}if(B!=null){O.cellSpacing=B
}else{O.cellSpacing=0
}if(H!=null){O.cellPadding=H
}else{O.cellPadding=0
}if(!AjxEnv.isIE){O.style.border="1px solid #000"
}O.style.borderCollapse="collapse";
var I;
I=Math.floor(100/L)+"%";
var G=N.createElement("tbody");
O.appendChild(G);
for(var F=0;
F<P;
F++){var J=N.createElement("tr");
G.appendChild(J);
for(var E=0;
E<L;
E++){var D=N.createElement("td");
if(F==0&&I){D.style.width=I
}if(AjxEnv.isGeckoBased){D.appendChild(N.createElement("br"))
}else{if(AjxEnv.isIE){D.innerHTML="&nbsp;"
}}if(AjxEnv.isIE){D.style.border="1px solid #000"
}else{D.style.borderTop=D.style.borderLeft="1px solid #000"
}J.appendChild(D)
}}var A=N.createElement("br");
var M=N.createDocumentFragment();
M.appendChild(A);
M.appendChild(O);
M.appendChild(A.cloneNode(true));
this._insertNodeAtSelection(M);
this.selectNodeContents(O.rows[0].cells[0],true);
return O
};
DwtHtmlEditor.prototype.applyTableProperties=function(J,H){var I=this._getIframeDoc();
var G=[];
for(var F in H){var A=AjxStringUtil.trim(H[F].toString());
var B=A!="";
switch(F){case"caption":var K=J.getElementsByTagName("caption");
K=K.length>0?K[0]:null;
if(B&&!K){K=I.createElement("caption");
J.insertBefore(K,J.firstChild)
}if(!B&&K){K.parentNode.removeChild(K)
}if(K){K.innerHTML=A
}break;
case"summary":case"align":case"cellSpacing":case"cellPadding":if(!B){J.removeAttribute(F,0)
}else{J[F]=A
}break;
case"borderWidth":case"borderStyle":case"borderColor":J.style[F]=A;
G.push([F,A]);
break;
default:J.style[F]=A;
break
}}if(G.length>0){var E=J.getElementsByTagName("td");
for(var F=E.length;
--F>=0;
){var C=E[F];
for(var D=G.length;
--D>=0;
){C.style[G[D][0]]=G[D][1]
}}}if(AjxEnv.isGeckoBased){this._forceRedraw()
}};
DwtHtmlEditor.prototype.applyCellProperties=function(K,L,F){var G=true;
for(var C=L.length;
--C>=0;
){var M=L[C];
var E=(C==0);
var J=true;
for(var B=M.length;
--B>=0;
){var I=(B==0);
var A=M[B];
if(F.backgroundColor!=null){A.style.backgroundColor=F.backgroundColor
}if(F.color!=null){A.style.color=F.color
}if(F.textAlign!=null){A.style.textAlign=F.textAlign
}if(F.verticalAlign!=null){A.style.verticalAlign=F.verticalAlign
}if(F.width!=null){if(F.width){A.style.width=F.width+"px"
}else{A.style.width=""
}}if(F.height!=null){if(F.height){A.style.height=F.height+"px"
}else{A.style.height=""
}}if(F.vertPadding!=null){if(F.vertPadding){A.style.paddingTop=A.style.paddingBottom=F.vertPadding+"px"
}else{A.style.paddingTop=A.style.paddingBottom=""
}}if(F.horizPadding!=null){if(F.horizPadding){A.style.paddingLeft=A.style.paddingRight=F.horizPadding+"px"
}else{A.style.paddingLeft=A.style.paddingRight=""
}}var D=F.borders,H;
H=D[DwtHtmlEditor.BORDER_TOP];
if(H!=null&&E){A.style.borderTop=H.width+" "+H.style+" "+H.color
}H=D[DwtHtmlEditor.BORDER_MIDDLE];
if(H!=null){H=H.width+" "+H.style+" "+H.color;
if(!G){A.style.borderBottom=H
}if(!E){A.style.borderTop=H
}}H=D[DwtHtmlEditor.BORDER_BOTTOM];
if(H!=null&&G){A.style.borderBottom=H.width+" "+H.style+" "+H.color
}H=D[DwtHtmlEditor.BORDER_LEFT];
if(H!=null&&I){A.style.borderLeft=H.width+" "+H.style+" "+H.color
}H=D[DwtHtmlEditor.BORDER_CENTER];
if(H!=null){H=H.width+" "+H.style+" "+H.color;
if(!J){A.style.borderRight=H
}if(!I){A.style.borderLeft=H
}}H=D[DwtHtmlEditor.BORDER_RIGHT];
if(H!=null&&J){A.style.borderRight=H.width+" "+H.style+" "+H.color
}J=false
}G=false
}if(AjxEnv.isGeckoBased){this._forceRedraw()
}};
DwtHtmlEditor.prototype._insertHTML=function(C){var D=this._getSelection();
var A=this._createRange(D);
if(AjxEnv.isIE){if(this.insertRange){this.insertRange.pasteHTML(C)
}else{A.pasteHTML(C)
}}else{var F=this._getIframeDoc();
var B=F.createDocumentFragment();
var E=F.createElement("div");
E.innerHTML=C;
while(E.firstChild){B.appendChild(E.firstChild)
}this._insertNodeAtSelection(B)
}};
DwtHtmlEditor.prototype._insertNodeAtSelection=function(E,A){this.focus();
if(!AjxEnv.isIE){var B=this._getRange();
var F=this._getIframeWin().getSelection();
F.removeAllRanges();
try{B.deleteContents();
B.insertNode(E);
B.selectNode(E);
if(A){F.addRange(B)
}}catch(G){}}else{var F=this._getRange();
var B=F.createRange();
var H="FOO-"+Dwt.getNextId();
try{B.pasteHTML("<span id='"+H+"'></span>")
}catch(C){B.collapse(false);
B.pasteHTML("<span id='"+H+"'></span>")
}var D=this._getIframeDoc().getElementById(H);
D.parentNode.insertBefore(E,D);
D.parentNode.removeChild(D)
}};
DwtHtmlEditor.prototype.isHtmlModeInited=function(){return this._htmlModeInited
};
DwtHtmlEditor.prototype.setMode=function(F,D){if(F==this._mode||(F!=DwtHtmlEditor.HTML&&F!=DwtHtmlEditor.TEXT)){return 
}var B=this._getIframeDoc();
this._mode=F;
if(F==DwtHtmlEditor.HTML){var E=document.getElementById(this._textAreaId);
var A;
if(this._iFrameId!=null){B.body.innerHTML=(D)?AjxStringUtil.convertToHtml(E.value):E.value;
A=document.getElementById(this._iFrameId)
}else{var C=(D)?AjxStringUtil.convertToHtml(E.value):E.value;
A=this._initHtmlMode(C)
}Dwt.setVisible(E,false);
Dwt.setVisible(A,true);
if(AjxEnv.isGeckoBased||AjxEnv.isSafari){this._enableDesignMode(B)
}}else{var E=this._textAreaId!=null?document.getElementById(this._textAreaId):this._initTextMode(true);
var C=(!this._pendingContent)?(B.body?B.body.innerHTML:""):(this._pendingContent||"");
E.value=D?this._convertHtml2Text():B.innerHTML;
Dwt.setVisible(document.getElementById(this._iFrameId),false);
Dwt.setVisible(E,true)
}};
DwtHtmlEditor.prototype.getMode=function(){return this._mode
};
DwtHtmlEditor.prototype.setFont=function(E,D,C,A,B){if(E){this._execCommand(DwtHtmlEditor._FONT_NAME,E)
}if(D){this._execCommand(D)
}if(C){this._execCommand(DwtHtmlEditor._FONT_SIZE,C)
}if(A){this._execCommand(DwtHtmlEditor._FONT_COLOR,A)
}if(B){this._execCommand((AjxEnv.isIE)?DwtHtmlEditor._FONT_HILITE_IE:DwtHtmlEditor._FONT_HILITE,B)
}};
DwtHtmlEditor.prototype.setJustification=function(A){this._execCommand(A)
};
DwtHtmlEditor.prototype.setIndent=function(A){this._execCommand(A)
};
DwtHtmlEditor.prototype.setStyle=function(A){this._execCommand(DwtHtmlEditor._FORMAT_BLOCK,DwtHtmlEditor._STYLES[A])
};
DwtHtmlEditor.prototype.setSize=function(C,B){DwtComposite.prototype.setSize.call(this,C,B);
var D=this.getHtmlElement();
if(this._iFrameId!=null){var A=document.getElementById(this._iFrameId);
A.width=D.style.width;
A.height=D.style.height
}else{var E=document.getElementById(this._textAreaId);
E.style.width=D.style.width;
E.style.height=D.style.height
}};
DwtHtmlEditor.prototype.getIframe=function(){return document.getElementById(this._iFrameId)
};
DwtHtmlEditor.prototype.getInputElement=function(){var A=(this._mode==DwtHtmlEditor.HTML)?this._iFrameId:this._textAreaId;
return document.getElementById(A)
};
DwtHtmlEditor.prototype._initialize=function(){if(this._mode==DwtHtmlEditor.HTML){this._initHtmlMode(this._pendingContent)
}else{this._initTextMode()
}};
DwtHtmlEditor.prototype._initTextMode=function(B){var A=this.getHtmlElement();
this._textAreaId="textarea_"+Dwt.getNextId();
var C=document.createElement("textarea");
C.className="DwtHtmlEditorTextArea";
C.id=this._textAreaId;
A.appendChild(C);
if(!B){C.value=this._pendingContent;
this._pendingContent=null
}return C
};
DwtHtmlEditor.prototype._initHtmlMode=function(A){this._pendingContent=A||"";
this._keyEvent=new DwtKeyEvent();
this._stateEvent=new DwtHtmlEditorStateEvent();
this._stateEvent.dwtObj=this;
this._updateStateAction=new AjxTimedAction(this,this._updateState);
return this._createIFrameEl()
};
DwtHtmlEditor.prototype._createIFrameEl=function(){var C=this.getHtmlElement();
this._iFrameId="iframe_"+Dwt.getNextId();
var B=document.createElement("iframe");
B.id=this._iFrameId;
B.className="DwtHtmlEditorIFrame";
B.setAttribute("border","0",false);
B.setAttribute("frameborder","0",false);
B.setAttribute("vspace","0",false);
B.setAttribute("autocomplete","off",false);
var A=AjxCallback.simpleClosure(this._finishHtmlModeInit,this);
setTimeout(A,DwtHtmlEditor._INITDELAY);
B.src=this._blankIframeSrc||"";
C.appendChild(B);
return B
};
DwtHtmlEditor.prototype._finishHtmlModeInit=function(){var C=this._getIframeDoc();
try{if(AjxEnv.isSafari&&C.body==null){C.open();
C.write("<html><head></head><body></body></html>");
C.close()
}}catch(B){return 
}if(AjxEnv.isGeckoBased){C.open();
C.write(DwtHtmlEditor.INIT_HTML);
C.close()
}function A(D){this._enableDesignMode(D);
this._setContentOnTimer();
this._updateState();
this._htmlModeInited=true;
this._registerEditorEventHandlers(document.getElementById(this._iFrameId),D)
}if(AjxEnv.isIE){setTimeout(AjxCallback.simpleClosure(A,this,C),DwtHtmlEditor._INITDELAY)
}else{A.call(this,C)
}};
DwtHtmlEditor.prototype._focus=function(){this.focus()
};
DwtHtmlEditor.prototype._getIframeDoc=function(){return this._iFrameId?Dwt.getIframeDoc(document.getElementById(this._iFrameId)):null
};
DwtHtmlEditor.prototype._getIframeWin=function(){return Dwt.getIframeWindow(document.getElementById(this._iFrameId))
};
DwtHtmlEditor.prototype._getParentElement=function(){if(AjxEnv.isIE){var E=this._getIframeDoc();
var B=E.selection;
var A=B.createRange();
if(B.type=="None"||B.type=="Text"){return B.createRange().parentElement()
}else{if(B.type=="Control"){return B.createRange().item(0)
}else{return E.body
}}}else{try{var A=this._getRange();
var D=A.commonAncestorContainer;
if(!A.collapsed&&A.startContainer==A.endContainer&&A.startOffset-A.endOffset<=1&&A.startContainer.hasChildNodes()){D=A.startContainer.childNodes[A.startOffset]
}while(D.nodeType==3){D=D.parentNode
}return D
}catch(C){return null
}}};
DwtHtmlEditor.prototype.getNearestElement=function(B){try{var C=this._getParentElement();
B=B.toLowerCase();
while(C&&C.nodeName.toLowerCase()!=B){C=C.parentNode
}return C
}catch(A){return null
}};
DwtHtmlEditor.prototype.selectNodeContents=function(C,F,A){var B;
var E=(typeof F=="boolean");
if(AjxEnv.isIE){B=this._getIframeDoc().body.createTextRange();
B.moveToElementText(C);
(E)&&B.collapse(F);
B.select()
}else{var D=this._getSelection();
B=this._getIframeDoc().createRange();
if(A){B.selectNode(C)
}else{B.selectNodeContents(C)
}(E)&&B.collapse(F);
D.removeAllRanges();
D.addRange(B)
}};
DwtHtmlEditor.prototype._forceRedraw=function(){var A=this._getIframeDoc().body;
A.style.display="none";
var B=this;
setTimeout(function(){A.style.display="";
B.focus();
B=null
},10)
};
DwtHtmlEditor.prototype.getSelectedCells=function(){var G=null;
var A=this._getSelection();
var E,D=0;
var I=[];
var H=null;
if(!AjxEnv.isIE){try{while(E=A.getRangeAt(D++)){var B=E.startContainer.childNodes[E.startOffset];
if(B){if(B.parentNode!=H){H=B.parentNode;
G&&I.push(G);
G=[]
}if(B.tagName&&/^td$/i.test(B.tagName)){G.push(B)
}}}}catch(F){}I.push(G)
}else{E=A.createRange();
var C=E.duplicate();
E.collapse(true);
while(C.compareEndPoints("EndToStart",E)>=0){var B=E.parentElement();
while(B&&B.nodeName.toLowerCase()!="td"){B=B.parentNode
}if(B){if(B.parentNode!=H){H=B.parentNode;
G&&I.push(G);
G=[]
}G.push(B);
E.moveToElementText(B);
E.collapse(false)
}if(E.move("character",1)==0){break
}}C.select();
I.push(G)
}if(I.length==0||!I[0]||I[0].length==0){G=this.getNearestElement("td");
if(G){I=[[G]]
}}return I
};
DwtHtmlEditor.prototype._splitCells=function(F){var D=F;
while(D&&D.nodeName.toLowerCase()!="table"){D=D.parentNode
}var A=AjxEnv.isGeckoBased?"<br />":"";
function B(M){var L=M.rowSpan;
var K=M.colSpan;
M.rowSpan=1;
tr=M.parentNode;
var I=tr.rowIndex;
var G=tr.parentNode.rows;
var H=M.cellIndex;
while(--L>0){tr=G[++I];
var J=M.cloneNode(false);
J.removeAttribute("rowspan");
J.colSpan=M.colSpan;
J.innerHTML=A;
tr.insertBefore(J,tr.cells[H])
}}function E(J){var I=J.colSpan;
J.colSpan=1;
tr=J.parentNode;
var H=J.nextSibling;
while(--I>0){var G=J.cloneNode(false);
G.removeAttribute("colspan");
G.rowSpan=J.rowSpan;
G.innerHTML=A;
tr.insertBefore(G,H)
}}function C(J){var I=J.colSpan;
E(J);
var G=J.parentNode.cells;
var H=J.cellIndex;
while(I-->0){B(G[H++])
}}C(F)
};
DwtHtmlEditor.prototype.doTableOperation=function(A,C){var J=C.table||this.getNearestElement("table");
var B=C.td||this.getNearestElement("td");
var H,I,G;
if(B){H=B.cellIndex;
G=B.parentNode;
I=G.rowIndex
}else{H=0;
G=this.getNearestElement("tr");
if(G){I=G.rowIndex
}}var K=C.cells;
while(true){switch(A){case"insertRowAbove":DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertRow(B));
break;
case"insertRowUnder":DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertRow(B,true));
break;
case"insertColumnBefore":DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertCol(B));
break;
case"insertColumnAfter":DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertCol(B,true));
break;
case"deleteRow":for(var E=0;
E<K.length;
++E){var B=DwtHtmlEditor.table_deleteRow(K[E][0]);
if(B){this.selectNodeContents(B,true);
this.focus()
}}break;
case"deleteColumn":for(var E=0;
E<K[0].length;
++E){var B=DwtHtmlEditor.table_deleteCol(K[0][E]);
if(B){this.selectNodeContents(B,true);
this.focus()
}}break;
case"mergeCells":B=K[0][0];
var F=[B.innerHTML.replace(/<br>$/i,"")];
for(var E=0;
E<K.length;
++E){var L=K[E];
for(var D=0;
D<L.length;
++D){if(E||D){F.push(L[D].innerHTML.replace(/<br>$/i,""));
L[D].parentNode.removeChild(L[D])
}}}B.colSpan=K[0].length;
B.rowSpan=K.length;
F=F.join(" ");
if(AjxEnv.isGeckoBased){F+="<br/>"
}B.innerHTML=F;
this.selectNodeContents(B,true);
break;
case"splitCells":this._splitCells(B);
break;
case"deleteTable":if(!AjxEnv.isIE){this.selectNodeContents(J,null,true);
this.deleteSelectedNodes()
}else{J.parentNode.removeChild(J)
}break
}break
}if(AjxEnv.isGeckoBased){this._forceRedraw()
}this._updateState()
};
DwtHtmlEditor.prototype._getRange=function(){var C=this._getIframeDoc();
if(AjxEnv.isIE){return C.selection
}else{this.focus();
var A=this._getIframeWin().getSelection();
if(A!=null){try{return A.getRangeAt(0)
}catch(B){return C.createRange()
}}else{return C.createRange()
}}};
DwtHtmlEditor.prototype._createRange=function(A){var C=this._getIframeDoc();
if(AjxEnv.isIE){return A.createRange()
}else{this.focus();
if(A!=null){try{return A.getRangeAt(0)
}catch(B){return C.createRange()
}}else{return C.createRange()
}}};
DwtHtmlEditor.prototype.deleteSelectedNodes=function(){var A=this._getSelection();
if(AjxEnv.isGeckoBased){A.deleteFromDocument()
}else{A.clear()
}};
DwtHtmlEditor.prototype._getSelection=function(){if(AjxEnv.isIE){return this._getIframeDoc().selection
}else{return this._getIframeWin().getSelection()
}};
DwtHtmlEditor.prototype.__eventClosure=function(A){return this._handleEditorEvent(AjxEnv.isIE?this._getIframeWin().event:A)
};
DwtHtmlEditor.prototype._registerEditorEventHandlers=function(A,D){var C=["mouseup","drag","mousedown","keydown"];
if(!AjxEnv.isIE7up){C.push("keypress")
}for(var B=0;
B<C.length;
++B){this._registerEditorEventHandler(D,C[B])
}};
DwtHtmlEditor.prototype._registerEditorEventHandler=function(B,A){if(AjxEnv.isIE){B.attachEvent("on"+A,this.__eventClosure)
}else{B.addEventListener(A,this.__eventClosure,true)
}};
DwtHtmlEditor.prototype._unregisterEditorEventHandler=function(B,A){if(AjxEnv.isIE){B.detachEvent("on"+A,this.__eventClosure)
}else{B.removeEventListener(A,this.__eventClosure,true)
}};
DwtHtmlEditor.prototype._handleEditorEvent=function(K){var D=true;
if(K.type=="mousedown"){DwtMenu._outsideMouseDownListener(K)
}if(K.type=="mouseup"){var B=DwtShell.getShell(window).getKeyboardMgr();
if(AjxEnv.isIE){B.__focusObj=this;
B.__dwtCtrlHasFocus=true
}else{B.grabFocus(this)
}}if(K.type=="contextmenu"){var M=DwtShell.mouseEvent;
M.setFromDhtmlEvent(K);
var J=Dwt.getLocation(document.getElementById(this._iFrameId));
if(!AjxEnv.isIE){var L=this._getIframeDoc();
var F=L.documentElement.scrollLeft||L.body.scrollLeft;
var O=L.documentElement.scrollTop||L.body.scrollTop;
J.x-=F;
J.y-=O
}M.docX+=J.x;
M.docY+=J.y;
DwtControl.__mouseEvent(K,DwtEvent.ONCONTEXTMENU,this,M);
D=M._returnValue
}var E=null;
if(DwtKeyEvent.isKeyPressEvent(K)){var H=this._keyEvent;
H.setFromDhtmlEvent(K);
if(AjxEnv.isGeckoBased&&K.keyCode==13){this._stateEvent._ignoreCommandState=true;
var A=this._getRange(),C=A.startContainer,I=/^h[1-6]$/i;
if((C.nodeType==3&&I.test(C.parentNode.tagName))||I.test(C.tagName)){var N=this;
setTimeout(function(){var Q=N._getIframeDoc();
Q.body.style.display="none";
Q.body.style.display="";
var P=N._getSelection();
P.removeAllRanges();
P.addRange(A)
},5)
}}}if(K.type=="keydown"){if(K.keyCode==9){if(AjxEnv.isIE){this._handleIETabKey(!K.shiftKey);
H._stopPropagation=true;
H._returnValue=false;
H.setToDhtmlEvent(K);
D=false
}}else{if(DwtKeyboardMgr.isPossibleInputShortcut(K)){D=DwtKeyboardMgr.__keyDownHdlr(K)
}}}if(AjxEnv.isIE){var G=this._getIframeDoc();
this._currInsPt=G.selection.createRange();
if(G.selection.type=="None"){this._currInsPt.collapse(false)
}}if(this._stateUpdateActionId!=null){AjxTimedAction.cancelAction(this._stateUpdateActionId)
}this._stateUpdateActionId=AjxTimedAction.scheduleAction(this._updateStateAction,100);
if(window.DwtIdleTimer){DwtIdleTimer.resetIdle()
}return D
};
DwtHtmlEditor.prototype.getKeyMapName=function(){return"DwtHtmlEditor"
};
DwtHtmlEditor.prototype.handleKeyAction=function(A,B){var D="",C="";
if(A==DwtKeyMap.SWITCH_MODE){try{this.setMode((this._mode==DwtHtmlEditor.HTML)?DwtHtmlEditor.TEXT:DwtHtmlEditor.HTML,true)
}catch(E){}}else{if(A.indexOf("Header")==0){D=DwtHtmlEditor._FORMAT_BLOCK;
C=DwtHtmlEditor._ACTION_CODE_TO_CMD[A]
}else{D=DwtHtmlEditor._ACTION_CODE_TO_CMD[A]
}}if(D){this._execCommand(D,C);
return true
}return false
};
DwtHtmlEditor.prototype._handleIETabKey=function(F){var I=this._getIframeDoc();
var D=this._getParentElement();
var J=D.parentNode;
var K=D.tagName.toLowerCase();
if(K=="p"||K=="body"){if(F){this._insertHTML("&nbsp;&nbsp;&nbsp;")
}}else{if(K=="li"){this._execCommand((F)?"Indent":"Outdent","")
}else{try{var B=this._getAllAncestors();
var G=this._locateNode(B,"td");
if(G!=null){D=G;
J=D.parentNode;
K=D.tagName.toLowerCase();
if(K=="td"){var A=(F?D.nextSibling:D.previousSibling);
if(A!=null){this._setCursor(A)
}else{A=(F)?J.nextSibling:J.previousSibling;
if(A==null){if(!F){return 
}DwtHtmlEditor.table_insertRow(D,F);
A=J.nextSibling
}if(A!=null){var E=A.childNodes;
if(E!=null&&E.length>0){var C=(F)?(0):(E.length-1);
this._setCursor(E[C])
}}}}}}catch(H){}}}};
DwtHtmlEditor.prototype._setCursor=function(C){var F=this._getIframeDoc();
var A=F.body;
var B;
if(AjxEnv.isIE){B=A.createTextRange();
B.moveToElementText(C);
B.collapse(0);
B.select()
}else{B=F.createRange();
B.selectNodeContents(C);
B.collapse(false);
var E=this._getIframeWin().contentWindow;
var D=E.getSelection();
D.addRange(B);
D.collapseToEnd()
}};
DwtHtmlEditor.prototype._locateNode=function(B,A){if(B&&A){for(var C=0;
C<B.length;
C++){if(B[C].tagName.toLowerCase()==A.toLowerCase()){return B[C]
}}}return null
};
DwtHtmlEditor.prototype._getAllAncestors=function(){var C=this._getParentElement();
var A=[];
while(C&&(C.nodeType==1)&&(C.tagName.toLowerCase()!="body")){A.push(C);
C=C.parentNode
}var B=this._getIframeDoc();
if(B.body!=null){A.push(B.body)
}return A
};
DwtHtmlEditor.prototype._updateState=function(){if(this._mode!=DwtHtmlEditor.HTML){return 
}this._stateUpdateActionId=null;
var C=this._stateEvent;
if(!C._ignoreCommandState){C.reset()
}var D=this._getIframeDoc();
try{if(!C._ignoreCommandState){C.isBold=D.queryCommandState(DwtHtmlEditor.BOLD_STYLE);
C.isItalic=D.queryCommandState(DwtHtmlEditor.ITALIC_STYLE);
C.isUnderline=D.queryCommandState(DwtHtmlEditor.UNDERLINE_STYLE);
C.isStrikeThru=D.queryCommandState(DwtHtmlEditor.STRIKETHRU_STYLE);
C.isSuperscript=D.queryCommandState(DwtHtmlEditor.SUPERSCRIPT_STYLE);
C.isSubscript=D.queryCommandState(DwtHtmlEditor.SUBSCRIPT_STYLE);
C.isOrderedList=D.queryCommandState(DwtHtmlEditor.ORDERED_LIST);
C.isUnorderedList=D.queryCommandState(DwtHtmlEditor.UNORDERED_LIST)
}else{C._ignoreCommandState=null
}C.fontFamily=D.queryCommandValue(DwtHtmlEditor._FONT_NAME);
C.fontSize=D.queryCommandValue(DwtHtmlEditor._FONT_SIZE);
C.backgroundColor=D.queryCommandValue((AjxEnv.isIE)?"backcolor":"hilitecolor");
C.color=D.queryCommandValue("forecolor");
if(AjxEnv.isIE){C.backgroundColor="#"+DwtButtonColorPicker.toHex(C.backgroundColor,6).replace(/(..)(..)(..)/,"$3$2$1");
C.color="#"+DwtButtonColorPicker.toHex(C.color,6).replace(/(..)(..)(..)/,"$3$2$1")
}C.justification=null;
C.direction=null;
var B=D.queryCommandValue(DwtHtmlEditor._FORMAT_BLOCK);
if(B){if(B.search(DwtHtmlEditor._H1_RE)!=-1){C.style=DwtHtmlEditor.H1
}else{if(B.search(DwtHtmlEditor._H2_RE)!=-1){C.style=DwtHtmlEditor.H2
}else{if(B.search(DwtHtmlEditor._H3_RE)!=-1){C.style=DwtHtmlEditor.H3
}else{if(B.search(DwtHtmlEditor._H4_RE)!=-1){C.style=DwtHtmlEditor.H4
}else{if(B.search(DwtHtmlEditor._H5_RE)!=-1){C.style=DwtHtmlEditor.H5
}else{if(B.search(DwtHtmlEditor._H6_RE)!=-1){C.style=DwtHtmlEditor.H6
}else{if(B.search(DwtHtmlEditor._PARAGRAPH_RE)!=-1){C.style=DwtHtmlEditor.PARAGRAPH
}else{if(B.search(DwtHtmlEditor._ADDRESS_RE)!=-1){C.style=DwtHtmlEditor.ADDRESS
}else{if(B.search(DwtHtmlEditor._PREFORMATTED_RE)!=-1){C.style=DwtHtmlEditor.PREFORMATTED
}}}}}}}}}}if(D.queryCommandState(DwtHtmlEditor.JUSTIFY_LEFT)){C.justification=DwtHtmlEditor.JUSTIFY_LEFT
}else{if(D.queryCommandState(DwtHtmlEditor.JUSTIFY_CENTER)){C.justification=DwtHtmlEditor.JUSTIFY_CENTER
}else{if(D.queryCommandState(DwtHtmlEditor.JUSTIFY_RIGHT)){C.justification=DwtHtmlEditor.JUSTIFY_RIGHT
}else{if(D.queryCommandState(DwtHtmlEditor.JUSTIFY_FULL)){C.justification=DwtHtmlEditor.JUSTIFY_FULL
}}}}if(this.isListenerRegistered(DwtEvent.STATE_CHANGE)){this.notifyListeners(DwtEvent.STATE_CHANGE,C)
}}catch(A){if(AjxEnv.isGeckoBased){this._enableDesignMode(D)
}}};
DwtHtmlEditor.prototype._enableDesignMode=function(C){if(!C){return 
}try{C.designMode="on";
if(AjxEnv.isGeckoBased&&(AjxEnv.isLinux||AjxEnv.isMac)){this._registerEditorEventHandlers(document.getElementById(this._iFrameId),C)
}}catch(B){if(AjxEnv.isGeckoBased||AjxEnv.isSafari){var A=new AjxTimedAction(this,this._enableDesignMode,[C]);
AjxTimedAction.scheduleAction(A,10);
return true
}else{return false
}}};
DwtHtmlEditor.prototype._onContentInitialized=function(){};
DwtHtmlEditor.prototype._setContentOnTimer=function(){var C=this._getIframeDoc();
try{C.body.innerHTML=this._pendingContent;
if(AjxEnv.isGeckoBased||AjxEnv.isSafari){this._enableDesignMode(C)
}this._onContentInitialized()
}catch(B){var A=new AjxTimedAction(this,this._setContentOnTimer);
AjxTimedAction.scheduleAction(A,10);
return true
}};
DwtHtmlEditor.prototype._execCommand=function(C,A){if(this._mode!=DwtHtmlEditor.HTML){return 
}try{this.focus();
this._getIframeDoc().execCommand(C,false,A)
}catch(B){this._enableDesignMode(this._getIframeDoc())
}this._updateState()
};
DwtHtmlEditor.prototype._convertHtml2Text=function(){var A=this._getIframeDoc();
return(A&&A.body)?AjxStringUtil.convertHtml2Text(A.body):""
};
DwtHtmlEditor.prototype.insertLink=function(H){var G=this._getIframeDoc();
var F=(AjxEnv.isIE&&G&&G.body)?(G.body.innerHTML):"";
if(AjxEnv.isIE&&F==""){var A=G.createElement("a");
A.href=H.url;
if(H.title){A.title=H.title
}var E=G.createTextNode(H.text);
A.appendChild(E);
G.body.appendChild(A);
return A
}else{if(H.text){this.insertText(H.text,true)
}var B="javascript:"+Dwt.getNextId();
this._execCommand("createlink",B);
var A=G.getElementsByTagName("a");
var D;
for(var C=A.length;
--C>=0;
){if(A[C].href==B){D=A[C];
break
}}D.href=H.url;
if(H.title){D.title=H.title
}return D
}};
DwtHtmlEditor.prototype.getLinkProps=function(){var A=this.getNearestElement("a");
if(A){this.selectNodeContents(A)
}var B=this._getRange();
var C={text:AjxEnv.isIE?B.text:B.toString()};
if(A){C.url=A.href;
C.title=A.title
}return C
};
DwtHtmlEditor.table_analyzeCells=function(I){var J=I.parentNode.parentNode;
while(J&&!/table/i.test(J.tagName)){J=J.parentNode
}var H={};
var L=J.rows;
for(var E=0;
E<L.length;
++E){var K=L[E].cells;
var G=0;
for(var C=0;
C<K.length;
){var A=K[C];
var F=A.colSpan||1;
var B=(A.rowSpan||1)-1;
var D=H[G];
if(D){if(--D.rs==0){H[G]=null
}G+=D.cs
}A.ZmIndex=G;
if(++C<K.length){if(B){H[G]={cs:F,rs:B}
}G+=F
}}}return J
};
DwtHtmlEditor.table_getCellAt=function(G,F){var I=G.cells;
var H=null,D=null;
for(var C=0;
C<I.length;
++C){var A=I[C];
var E=(A.colSpan||1)-1;
if(A.ZmIndex<=F&&A.ZmIndex+E>=F){var B=(A.rowSpan||1)-1;
return{td:A,cs:E,rs:B}
}else{if(A.ZmIndex<F){H=A
}else{if(A.ZmIndex+E>F&&!D){D=A
}}}}return{last:H,next:D}
};
DwtHtmlEditor.table_getPrevCellAt=function(E,A){var C=E.parentNode;
while(C&&!/table/i.test(C.tagName)){C=C.parentNode
}var D=C.rows;
for(var B=E.rowIndex;
--B>=0;
){var F=DwtHtmlEditor.table_getCellAt(D[B],A);
if(F.td){F.dist=E.rowIndex-B;
return F
}}return null
};
DwtHtmlEditor.table_fixCells=function(A){for(var B=0;
B<A.length;
++B){var C=A[B];
if(AjxEnv.isIE){C.innerHTML="&nbsp;"
}else{if(AjxEnv.isGeckoBased){C.innerHTML="<br/>"
}}}};
DwtHtmlEditor.table_insertCol=function(E,B){var K=DwtHtmlEditor.table_analyzeCells(E);
var L=K.rows;
var I=E.ZmIndex;
if(B){I+=E.colSpan-1
}var H=[];
var F=0;
for(var G=0;
G<L.length;
++G){var J=L[G];
var C=DwtHtmlEditor.table_getCellAt(J,I);
var D=C.td;
var A=null;
if(D){if(D.ZmIndex==I&&!B){A=J.insertCell(D.cellIndex)
}else{if(D.ZmIndex+C.cs==I&&B){A=J.insertCell(D.cellIndex+1)
}}if(A){F=C.rs
}else{D.colSpan=C.cs+2
}}else{if(F>0){if(C.last){A=J.insertCell(C.last.cellIndex+1)
}else{if(C.next){A=J.insertCell(C.next.cellIndex)
}}--F
}}if(A){H.push(A)
}}return H
};
DwtHtmlEditor.table_insertRow=function(D,B){var I=D.parentNode;
var M=DwtHtmlEditor.table_analyzeCells(D);
var H=I.rowIndex;
if(B){H+=D.rowSpan;
I=M.rows[H-1]
}D=M.rows[0].cells[M.rows[0].cells.length-1];
var J=D.ZmIndex+D.colSpan;
var K=M.insertRow(H);
var G=[];
var L=I.cells;
var A;
for(var F=0;
F<J;
++F){var C=DwtHtmlEditor.table_getCellAt(I,F);
if(C.td){if(!B||!C.rs){for(var E=0;
E<=C.cs;
++E){G.push(K.insertCell(-1))
}}else{if(C.rs){C.td.rowSpan=C.rs+2
}}}else{C=DwtHtmlEditor.table_getPrevCellAt(I,F);
if(B&&C.rs==C.dist){for(var E=0;
E<=C.cs;
++E){G.push(K.insertCell(-1))
}}else{C.td.rowSpan=C.rs+2
}}F+=C.cs
}return G
};
DwtHtmlEditor.table_deleteCol=function(C){var I=DwtHtmlEditor.table_analyzeCells(C);
var J=I.rows;
var E=C.ZmIndex;
var H=C.parentNode;
var F;
try{F=H.cells[C.cellIndex+1];
if(!F){F=H.cells[C.cellIndex-1]
}}catch(G){F=null
}var A=[];
for(var D=0;
D<J.length;
++D){var H=J[D];
var B=DwtHtmlEditor.table_getCellAt(H,E);
if(B.td){if(B.cs){B.td.colSpan=B.cs
}else{H.removeChild(B.td);
if(H.cells.length==0){A.push(H)
}}D+=B.rs
}}for(var D=A.length;
--D>=0;
){H=A[D];
H.parentNode.removeChild(H)
}if(I.rows.length==0){I.parentNode.removeChild(I)
}return F
};
DwtHtmlEditor.table_deleteRow=function(B){var F=B.parentNode;
var I=DwtHtmlEditor.table_analyzeCells(B);
B=I.rows[0].cells[I.rows[0].cells.length-1];
var G=B.ZmIndex+B.colSpan;
var H;
for(var C=G;
--C>=0;
){var A=DwtHtmlEditor.table_getCellAt(F,C);
if(A.td){if(A.rs){H=I.rows[F.rowIndex+1];
var D=DwtHtmlEditor.table_getCellAt(H,C);
B=null;
if(D.last){B=H.insertCell(D.last.cellIndex+1)
}else{if(D.next){B=H.insertCell(D.next.cellIndex)
}}if(B){if(A.cs>0){B.colSpan=A.cs+1
}if(A.rs>1){B.rowSpan=A.rs
}}}F.removeChild(A.td)
}else{A=DwtHtmlEditor.table_getPrevCellAt(F,C);
if(A){if(A.rs){A.td.rowSpan=A.rs;
C-=A.cs
}}}}try{H=I.rows[F.rowIndex+1];
if(!H){H=I.rows[F.rowIndex-1]
}}catch(E){H=null
}F.parentNode.removeChild(F);
if(I.rows.length==0){I.parentNode.removeChild(I)
}if(H){return H.cells[0]
}};
DwtHtmlEditor.prototype.searchnReplace=function(C){var E=this._getIframeWin();
E.focus();
var H=this._getIframeDoc();
var D=H.body;
var F=this._getSelectedText();
if(D.innerHTML==""){return true
}str1=C.searchstring;
str2=F;
if(C.replacemode=="current"){str1=str1.toString();
str2=str2.toString();
if(!C.casesensitive){str1=str1.toLowerCase();
str2=str2.toLowerCase()
}if(str1==str2){this.replaceSel(C.searchstring,C.replacestring);
C.replacemode="none"
}}if(AjxEnv.isIE){var A=this.lastSearchRng?this.lastSearchRng:this.range_findnreplace;
var B=0;
if(C.wholeword){B=B|2
}if(C.casesensitive){B=B|4
}if(!A.findText){alert("This operation is currently not supported by this browser.");
return true
}if(C.replacemode=="all"){if(AjxEnv.isIE){this.focus()
}var G=new RegExp(C.searchstring,((C.casesensitive)?"":"i")+"g");
var I=this.replaceNodeContent(D,G,C.replacestring,"all",0);
return true
}if(A.findText(C.searchstring,C.backwards?-1:1,B)){A.scrollIntoView();
A.select();
A.collapse(C.backwards);
this.lastSearchRng=A;
if(AjxEnv.isIE&&(C.replacemode=="current")){this.replaceSel(C.searchstring,C.replacestring)
}}else{rng1=D.createTextRange();
rng1.findText(C.searchstring,C.backwards?-1:1,B);
rng1.scrollIntoView();
if(rng1.text.toLowerCase()==C.searchstring.toLowerCase()){rng1.select()
}rng1.collapse(false);
this.lastSearchRng=rng1;
if(AjxEnv.isIE&&(C.replacemode=="current")){this.replaceSel(C.searchstring,C.replacestring)
}}}else{if(C.replacemode=="all"){var G=new RegExp(C.searchstring,(C.casesensitive?"":"i")+"g");
var I=this.replaceNodeContent(D,G,C.replacestring,"all",0);
return true
}if(!E.find(C.searchstring,C.casesensitive,C.backwards,C.wrap,C.wholeword,false,false)){while(E.find(C.searchstring,C.casesensitive,true,C.wrap,C.wholeword,false,false)){}}}};
DwtHtmlEditor.prototype.replaceSel=function(A,F){if(F==null){return 
}var E=this._getIframeWin();
var D=E.document;
var B;
if(!AjxEnv.isIE){var C=E.getSelection();
B=C.getRangeAt(0)
}else{B=E.document.selection.createRange()
}if(!AjxEnv.isIE){if(F.indexOf(A)==-1){B.deleteContents();
B.insertNode(B.createContextualFragment(F));
B.collapse(false)
}}else{if(B.item){B.item(0).outerHTML=F
}else{B.pasteHTML(F)
}}};
DwtHtmlEditor.prototype._getSelectedText=function(){var C=this._getIframeWin();
var B=this._getIframeDoc();
var A="";
if(C.getSelection){A=C.getSelection()
}else{if(B.getSelection){A=B.getSelection()
}else{if(B.selection){A=B.selection.createRange().text
}}}return A
};
DwtHtmlEditor.prototype.replaceNodeContent=function(C,G,D,H,B){for(var E=0;
E<C.childNodes.length;
E++){var F=C.childNodes[E];
if(F.nodeType==3){var A=F.nodeValue.replace(G,D);
if(F.nodeValue!=A){F.nodeValue=A;
B++;
if(H!="all"){return B
}}}this.replaceNodeContent(F,G,D,H,B);
if((H!="all")&&(B>0)){return B
}}return B
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtInputField")){DwtInputField=function(E){if(arguments.length==0){return 
}this._origClassName=E.className?E.className:"DwtInputField";
this._errorClassName=this._origClassName+"-Error";
this._hintClassName=this._origClassName+"-hint";
this._disabledClassName=this._origClassName+"-disabled";
this._errorHintClassName=this._origClassName+"-errorhint";
DwtComposite.call(this,E);
this._inputEventHandlers={};
this._type=E.type?E.type:DwtInputField.STRING;
this._rows=E.rows?E.rows:1;
this._size=E.size;
this._errorIconStyle=E.errorIconStyle?E.errorIconStyle:E.validator?DwtInputField.ERROR_ICON_RIGHT:DwtInputField.ERROR_ICON_NONE;
this._validationStyle=E.validationStyle?E.validationStyle:DwtInputField.ONEXIT_VALIDATION;
this._hasError=false;
this._hintIsVisible=false;
this._hint=E.hint;
var D=E.inputID||Dwt.getNextId();
var H=Dwt.getNextId();
var C=this.getHtmlElement();
var K=E.skipCaretHack;
var B=K?"":Dwt.CARET_HACK_BEGIN;
var A=K?"":Dwt.CARET_HACK_END;
if(this._errorIconStyle==DwtInputField.ERROR_ICON_NONE){if(E.rows&&E.rows>1){var J=[B,"<textarea id='",D,"' rows=",E.rows];
var F=J.length;
if(E.size){J[F++]=" cols=";
J[F++]=E.size
}if(E.wrap){J[F++]=" wrap=";
J[F++]=E.wrap
}J[F++]="></textarea>";
J[F++]=A;
C.innerHTML=J.join("")
}else{C.innerHTML=[B,"<input id='",D,"'>",A].join("")
}}else{var J=["<table cellspacing='0' cellpadding='0'><tr>"];
var F=1;
if(this._errorIconStyle==DwtInputField.ERROR_ICON_LEFT){J[F++]=["<td style='padding-right:2px;'id='",H,"'></td>"].join("")
}J[F++]=["<td>",B,"<input id='",D,"'>",A,"</td>"].join("");
if(this._errorIconStyle==DwtInputField.ERROR_ICON_RIGHT){J[F++]=["<td style='padding-left:2px;' id='",H,"'></td>"].join("")
}J[F++]="</tr></table>";
C.innerHTML=J.join("");
if(this._errorIconStyle!=DwtInputField.ERROR_ICON_NONE){this._errorIconTd=document.getElementById(H);
this._errorIconTd.vAlign="middle";
this._errorIconTd.innerHTML=DwtInputField._NOERROR_ICON_HTML
}}this._tabGroup=new DwtTabGroup(this._htmlElId);
if(this._rows>1){this._inputField=document.getElementById(D);
this._inputField.onkeyup=DwtInputField._keyUpHdlr;
this._inputField.onblur=DwtInputField._blurHdlr;
this._inputField.onfocus=DwtInputField._focusHdlr;
if(E.size){this._inputField.size=E.size
}if(E.maxLen){this._inputField.maxLength=this._maxLen=E.maxLen
}this._inputField.value=E.initialValue||"";
this._tabGroup.addMember(this._inputField)
}else{var I=document.getElementById(D);
var G=this.__createInputEl(E);
if(AjxEnv.isCamino){I.parentNode.style.overflow="hidden"
}I.parentNode.replaceChild(G,I)
}this.setValidatorFunction(E.validatorCtxtObj,E.validator);
this._setMouseEventHdlrs(false);
this._setKeyPressEventHdlr(false);
if(E.required!=null){this.setRequired(E.required)
}};
DwtInputField.prototype=new DwtComposite;
DwtInputField.prototype.constructor=DwtInputField;
DwtInputField.prototype.toString=function(){return"DwtInputField"
};
DwtInputField.ERROR_ICON_LEFT=1;
DwtInputField.ERROR_ICON_RIGHT=2;
DwtInputField.ERROR_ICON_NONE=3;
DwtInputField.CONTINUAL_VALIDATION=1;
DwtInputField.ONEXIT_VALIDATION=2;
DwtInputField.MANUAL_VALIDATION=3;
DwtInputField.NUMBER=1;
DwtInputField.INTEGER=2;
DwtInputField.FLOAT=3;
DwtInputField.STRING=4;
DwtInputField.PASSWORD=5;
DwtInputField.DATE=6;
DwtInputField._ERROR_ICON_HTML=AjxImg.getImageHtml("ClearSearch");
DwtInputField._NOERROR_ICON_HTML=AjxImg.getImageHtml("Blank_9");
DwtInputField.prototype.dispose=function(){this._errorIconTd=null;
this._inputField=null;
DwtComposite.prototype.dispose.call(this)
};
DwtInputField.prototype.getTabGroupMember=function(){return this._tabGroup
};
DwtInputField.prototype.setHandler=function(B,A){if(!this._checkState()){return 
}this._inputEventHandlers[B]=A;
Dwt.setHandler(this.getInputElement(),B,A)
};
DwtInputField.prototype.setInputType=function(C){if(C!=this._type&&this._rows==1){this._type=C;
if(AjxEnv.isIE){var A=this._inputField;
var B=this.__createInputEl();
A.parentNode.replaceChild(B,A)
}else{this._inputField.type=this._type!=DwtInputField.PASSWORD?"text":"password"
}}};
DwtInputField.prototype.setValidatorFunction=function(B,A){if(A){this._validator=A;
this._validatorObj=B
}else{switch(this._type){case DwtInputField.NUMBER:this._validator=DwtInputField.validateNumber;
break;
case DwtInputField.INTEGER:this._validator=DwtInputField.validateInteger;
break;
case DwtInputField.FLOAT:this._validator=DwtInputField.validateFloat;
break;
case DwtInputField.STRING:case DwtInputField.PASSWORD:this._validator=DwtInputField.validateString;
break;
case DwtInputField.DATE:this._validator=DwtInputField.validateDate;
break;
default:this._validator=DwtInputField.validateAny
}}};
DwtInputField.prototype.setValidatorRegExp=function(A,B){this._validator=A;
this._validatorObj=null;
this._errorString=B||""
};
DwtInputField.prototype.setValidationCallback=function(A){this._validationCallback=A
};
DwtInputField.prototype.getInputElement=function(){return this._inputField
};
DwtInputField.prototype.getValue=function(){return this._hintIsVisible?"":this._inputField.value
};
DwtInputField.prototype.setValue=function(B,A){B=B||"";
this._inputField.value=B;
if(!A){B=this._validateInput(B);
if(B!=null){this._inputField.value=B
}}if(this._hintIsVisible&&B){this._hideHint(B)
}else{if(!B){this._showHint()
}}};
DwtInputField.prototype.setHint=function(B){var A=this._hint;
this._hint=B;
if(this._hintIsVisible){this.getInputElement().value=B;
if(!B){this._hintIsVisible=false;
this._updateClassName()
}}else{if(this._inputField.value==""){this._showHint()
}}};
DwtInputField.prototype.setValidNumberRange=function(B,A){this._minNumVal=B;
this._maxNumVal=A;
var C=this._validateInput(this.getValue());
if(C!=null){this.setValue(C)
}};
DwtInputField.prototype.setValidStringLengths=function(B,A){this._minLen=B||0;
if(A!=null){this._inputField.maxLength=A;
this._maxLen=A
}};
DwtInputField.prototype.setNumberPrecision=function(A){this._decimals=A
};
DwtInputField.prototype.setReadOnly=function(A){this._inputField.setAttribute("readonly",(A==null?true:A))
};
DwtInputField.prototype.setRequired=function(B){var A=B==null?true:B;
if(this._required!=A){this._required=A;
this.validate()
}};
DwtInputField.prototype.getEnabled=function(){return !this.getInputElement().disabled
};
DwtInputField.prototype.setEnabled=function(A){DwtControl.prototype.setEnabled.call(this,A);
this.getInputElement().disabled=!A;
this._validateInput(this.getValue())
};
DwtInputField.prototype.focus=function(){if(this.getEnabled()){this._hasFocus=true;
this.getInputElement().focus()
}};
DwtInputField.prototype.blur=function(){this.getInputElement().blur()
};
DwtInputField.prototype.setVisible=function(A){Dwt.setVisible(this.getInputElement(),A)
};
DwtInputField.prototype.isValid=function(){if(!this.getEnabled()){return this.getValue()
}try{if(typeof this._validator=="function"){return this._validatorObj?this._validator.call(this._validatorObj,this.getValue(),this):this._validator(this.getValue())
}else{return this._validator.test(this._inputField.value)
}}catch(A){if(typeof A=="string"){return null
}else{throw A
}}};
DwtInputField.prototype.validate=function(){var A=this._validateInput(this.getValue());
if(A!=null){this.setValue(A);
return true
}else{return false
}};
DwtInputField.validateNumber=function(A){var B=new Number(A);
if(isNaN(B)||(Math.round(B)!=B)){throw AjxMsg.notAnInteger
}return DwtInputField.validateFloat.call(this,A)
};
DwtInputField.validateInteger=function(A){var B=new Number(A);
if(isNaN(B)||(Math.round(B)!=B)||(B.toString()!=A)){throw AjxMsg.notAnInteger
}if(this._minNumVal&&A<this._minNumVal){throw AjxMessageFormat.format(AjxMsg.numberLessThanMin,this._minNumVal)
}if(this._maxNumVal&&A>this._maxNumVal){throw AjxMessageFormat.format(AjxMsg.numberMoreThanMax,this._maxNumVal)
}return A
};
DwtInputField.validateFloat=function(A){if(this._required&&A==""){throw AjxMsg.valueIsRequired
}var D=new Number(A);
if(isNaN(D)){throw AjxMsg.notANumber
}if(this._minNumVal&&A<this._minNumVal){throw AjxMessageFormat.format(AjxMsg.numberLessThanMin,this._minNumVal)
}if(this._maxNumVal&&A>this._maxNumVal){throw AjxMessageFormat.format(AjxMsg.numberMoreThanMax,this._maxNumVal)
}if(this._decimals!=null){var B=D.toString();
var C=B.indexOf(".");
if(C==-1){C=B.length
}A=D.toPrecision(C+this._decimals)
}else{A=D.toString()
}return A
};
DwtInputField.validateString=function(A){if(this._required&&A==""){throw AjxMsg.valueIsRequired
}if(this._minLen!=null&&A.length<this._minLen){throw AjxMessageFormat.format(AjxMsg.stringTooShort,this._minLen)
}if(this._maxLen!=null&&A.length>this._maxLen){throw AjxMessageFormat.format(AjxMsg.stringTooLong,this._maxLen)
}return A
};
DwtInputField.validateDate=function(A){if(this._required&&A==""){throw AjxMsg.valueIsRequired
}if(AjxDateUtil.simpleParseDateStr(A)==null){throw AjxMsg.invalidDatetimeString
}return A
};
DwtInputField.validateEmail=function(A){if(this._required&&A==""){throw AjxMsg.valueIsRequired
}if(!AjxEmailAddress.isValid(A)){throw AjxMsg.invalidEmailAddr
}return A
};
DwtInputField.validateAny=function(A){if(this._required&&A==""){throw AjxMsg.valueIsRequired
}return A
};
DwtInputField.prototype._validateRegExp=function(A){if(this._required&&A==""){throw AjxMsg.valueIsRequired
}if(this._regExp&&!this._regExp.test(A)){throw this._errorString
}return A
};
DwtInputField._keyUpHdlr=function(B){var A=DwtShell.keyEvent;
A.setFromDhtmlEvent(B,true);
var D=A.dwtObj;
var C=A.keyCode;
if(D.notifyListeners(DwtEvent.ONKEYUP,A)){return true
}var E=null;
if((C==13||C==9)&&D._validationStyle==DwtInputField.ONEXIT_VALIDATION){E=D._validateInput(D.getValue())
}else{if(D._validationStyle==DwtInputField.CONTINUAL_VALIDATION){E=D._validateInput(D.getValue())
}}if(E!=null&&E!=D.getValue()){D.setValue(E)
}return true
};
DwtInputField._blurHdlr=function(A){var B=DwtControl.getTargetControl(A);
if(B){B._hasFocus=false;
if(B._validationStyle==DwtInputField.ONEXIT_VALIDATION){var C=B._validateInput(B.getValue());
if(C!=null){B.setValue(C)
}}if(!B._hintIsVisible&&B._hint){B._showHint()
}}};
DwtInputField._focusHdlr=function(A){var B=DwtControl.getTargetControl(A);
if(B){DwtShell.getShell(window).getKeyboardMgr().grabFocus(B.getTabGroupMember());
if(B._hintIsVisible){B._hideHint("")
}}};
DwtInputField.prototype._hideHint=function(A){this.getInputElement().value=A;
this._hintIsVisible=false;
this._updateClassName()
};
DwtInputField.prototype._showHint=function(){if(this._hint){var A=this.getInputElement();
if(!A.value){A.value=this._hint;
this._hintIsVisible=true;
this._updateClassName()
}}};
DwtInputField.prototype._updateClassName=function(){var A;
if(!this.getEnabled()){A=this._disabledClassName
}else{if(this._hasError){if(this._hintIsVisible&&!this._hasFocus){A=this._errorHintClassName
}else{A=this._errorClassName
}}else{if(this._hintIsVisible&&!this._hasFocus){A=this._hintClassName
}else{A=this._origClassName
}}}this.getHtmlElement().className=A
};
DwtInputField.prototype._validateInput=function(C){var E=true;
var D;
var B;
if(!this.getEnabled()){D=this.getValue()
}else{try{if(typeof this._validator=="function"){D=C=this._validatorObj?this._validator.call(this._validatorObj,C,this):this._validator(C)
}else{if(!this._validator.test(C)){B=this._errorString
}}}catch(A){if(typeof A=="string"){B=A
}else{throw A
}}}if(B){this._hasError=true;
if(this._errorIconTd){this._errorIconTd.innerHTML=DwtInputField._ERROR_ICON_HTML
}this.setToolTipContent(B);
E=false;
D=null
}else{this._hasError=false;
if(this._errorIconTd){this._errorIconTd.innerHTML=DwtInputField._NOERROR_ICON_HTML
}this.setToolTipContent(null);
E=true
}this._updateClassName();
if(this._validationCallback){this._validationCallback.run(this,E,C)
}return D
};
DwtInputField.prototype._focusByMouseUpEvent=function(){if(this.getEnabled()){this._hasFocus=true
}};
DwtInputField.prototype._replaceElementHook=function(B,C,A,D){C=this.getInputElement();
DwtControl.prototype._replaceElementHook.call(this,B,C,A,D);
if(B.id){C.id=B.id
}if(B.size){C.size=B.size
}if(B.title){this.setHint(B.title)
}};
DwtInputField.prototype.__createInputEl=function(G){var B=this._inputField;
if(B){for(var E in this._inputEventHandlers){B.removeAttribute(E)
}}var F=this._type!=DwtInputField.PASSWORD?"text":"password";
var D=document.createElement(AjxEnv.isIE?["<INPUT type='",F,"'>"].join(""):"INPUT");
if(!AjxEnv.isIE){D.type=F
}this._inputField=D;
var C=G?G.size:B.size;
var A=G?G.maxLen:B.maxLength;
D.autocomplete="off";
if(C){D.size=C
}if(A){D.maxLength=A
}D.value=(G?G.initialValue:B.value)||"";
D.readonly=B?B.readonly:false;
D.onkeyup=DwtInputField._keyUpHdlr;
D.onblur=DwtInputField._blurHdlr;
D.onfocus=DwtInputField._focusHdlr;
for(var E in this._inputEventHandlers){D[E]=this._inputEventHandlers[E]
}this._tabGroup.removeAllMembers();
this._tabGroup.addMember(D);
return D
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtPasswordField")){DwtPasswordField=function(A){if(arguments.length==0){return 
}A=A||{parent:DwtShell.getShell(window)};
A.type=DwtInputField.PASSWORD;
DwtInputField.call(this,A);
this._tabGroup=new DwtTabGroup(this._htmlElId);
this._createHtml()
};
DwtPasswordField.prototype=new DwtInputField;
DwtPasswordField.prototype.constructor=DwtPasswordField;
DwtPasswordField.prototype.TEMPLATE="dwt.Widgets#DwtPasswordField";
DwtPasswordField.prototype.getTabGroupMember=function(){return this._tabGroup
};
DwtPasswordField.prototype.setShowPassword=function(A){this._showCheckbox.setSelected(A);
this.setInputType(A?DwtInputField.STRING:DwtInputField.PASSWORD)
};
DwtPasswordField.prototype._createHtml=function(A){var B={id:this._htmlElId};
this._createHtmlFromTemplate(A||this.TEMPLATE,B)
};
DwtPasswordField.prototype._createHtmlFromTemplate=function(C,E){this._tabGroup.removeAllMembers();
var A=document.createDocumentFragment();
var G=this.getHtmlElement().firstChild;
while(G){var D=G.nextSibling;
A.appendChild(G);
G=D
}DwtInputField.prototype._createHtmlFromTemplate.apply(this,arguments);
var F=document.getElementById(E.id+"_input");
F.appendChild(A);
this._tabGroup.addMember(this.getInputElement());
var B=document.getElementById(E.id+"_show_password");
if(B){this._showCheckbox=new DwtCheckbox({parent:this});
this._showCheckbox.setText(AjxMsg.showPassword);
this._showCheckbox.addSelectionListener(new AjxListener(this,this._handleShowCheckbox));
this._showCheckbox.replaceElement(B);
this._tabGroup.addMember(this._showCheckbox)
}};
DwtPasswordField.prototype._handleShowCheckbox=function(A){this.setShowPassword(A.detail)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtSash")){DwtSash=function(C){C=Dwt.getParams(arguments,DwtSash.PARAMS);
C.className=C.className||"DwtSash";
C.posStyle=C.posStyle||DwtControl.ABSOLUTE_STYLE;
DwtControl.call(this,C);
var B=this.getHtmlElement();
var A="dwt.Widgets#";
if(!C.style||C.style!=DwtSash.HORIZONTAL_STYLE){this._style=DwtSash.VERTICAL_STYLE;
B.style.cursor=AjxEnv.isIE?"row-resize":"s-resize";
B.innerHTML=AjxTemplate.expand(A+"DwtVerticalSash")
}else{this._style=DwtSash.HORIZONTAL_STYLE;
B.style.cursor=AjxEnv.isIE?"col-resize":"w-resize";
B.innerHTML=AjxTemplate.expand(A+"DwtHorizontalSash")
}this._threshold=(C.threshold>0)?C.threshold:1;
this._captureObj=new DwtMouseEventCapture({targetObj:this,id:"DwtSash",mouseOverHdlr:DwtSash._mouseOverHdlr,mouseDownHdlr:DwtSash._mouseDownHdlr,mouseMoveHdlr:DwtSash._mouseMoveHdlr,mouseUpHdlr:DwtSash._mouseUpHdlr,mouseOutHdlr:DwtSash._mouseOutHdlr});
this.setHandler(DwtEvent.ONMOUSEDOWN,DwtSash._mouseDownHdlr);
this.setHandler(DwtEvent.ONMOUSEOVER,DwtSash._mouseOverHdlr);
this.setHandler(DwtEvent.ONMOUSEOUT,DwtSash._mouseOutHdlr);
this.setZIndex(Dwt.Z_VIEW)
};
DwtSash.PARAMS=["parent","style","className","threshold","posStyle"];
DwtSash.prototype=new DwtControl;
DwtSash.prototype.constructor=DwtSash;
DwtSash.prototype.toString=function(){return"DwtSash"
};
DwtSash.HORIZONTAL_STYLE=1;
DwtSash.VERTICAL_STYLE=2;
DwtSash.prototype.registerCallback=function(A,B){this._callbackFunc=A;
this._callbackObj=B
};
DwtSash._mouseOverHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtSash._mouseDownHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B,true);
if(A.button!=DwtMouseEvent.LEFT){DwtUiEvent.setBehaviour(B,true,false);
return false
}DwtEventManager.notifyListeners(DwtEvent.ONMOUSEDOWN,A);
var C=A.dwtObj;
if(C._callbackFunc!=null){C._captureObj.capture();
C._startCoord=(C._style==DwtSash.HORIZONTAL_STYLE)?A.docX:A.docY
}A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtSash._mouseMoveHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
var D=0;
var C=DwtMouseEventCapture.getTargetObj();
if(C._style==DwtSash.HORIZONTAL_STYLE){if(A.docX>0&&A.docX!=C._startCoord){D=A.docX-C._startCoord
}}else{if(A.docY>0&&A.docY!=C._startCoord){D=A.docY-C._startCoord
}}if(Math.abs(D)>=C._threshold){if(C._callbackObj!=null){D=C._callbackFunc.call(C._callbackObj,D)
}else{D=C._callbackFunc(D)
}C._startCoord+=D;
if(D!=0&&C.getHtmlElement().style.position==Dwt.ABSOLUTE_STYLE){if(C._style==DwtSash.HORIZONTAL_STYLE){C.setLocation(C.getLocation().x+D,Dwt.DEFAULT)
}else{C.setLocation(Dwt.DEFAULT,C.getLocation().y+D)
}}}A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtSash._mouseUpHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
if(A.button!=DwtMouseEvent.LEFT){DwtUiEvent.setBehaviour(B,true,false);
return false
}if(DwtMouseEventCapture.getTargetObj()._callbackFunc!=null){DwtMouseEventCapture.getCaptureObj().release()
}A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtSash._mouseOutHdlr=function(B){var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtToolBar")){DwtToolBar=function(C){if(arguments.length==0){return 
}C=Dwt.getParams(arguments,DwtToolBar.PARAMS);
C.className=C.className||"ZToolbar";
DwtComposite.call(this,C);
if(C.parent instanceof DwtToolBar){this._hasSetMouseEvents=C.parent._hasSetMouseEvents
}if(C.handleMouse!==false&&!this._hasSetMouseEvents){var A=AjxEnv.isIE?[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP]:[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP,DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT];
this._setEventHdlrs(A);
this._hasSetMouseEvents=true
}this._style=C.style||DwtToolBar.HORIZ_STYLE;
this._items=[];
this._createHtml();
this._numFillers=0;
this._curFocusIndex=0;
var B=(this._style==DwtToolBar.HORIZ_STYLE)?"horiz":"vert";
this._keyMapName=["DwtToolBar",B].join("-")
};
DwtToolBar.PARAMS=["parent","className","posStyle","style","index"];
DwtToolBar.prototype=new DwtComposite;
DwtToolBar.prototype.constructor=DwtToolBar;
DwtToolBar.prototype.toString=function(){return"DwtToolBar"
};
DwtToolBar.HORIZ_STYLE=1;
DwtToolBar.VERT_STYLE=2;
DwtToolBar.ELEMENT=1;
DwtToolBar.SPACER=2;
DwtToolBar.SEPARATOR=3;
DwtToolBar.FILLER=4;
DwtToolBar.FIRST_ITEM="ZFirstItem";
DwtToolBar.LAST_ITEM="ZLastItem";
DwtToolBar.SELECTED_NEXT=DwtControl.SELECTED+"Next";
DwtToolBar.SELECTED_PREV=DwtControl.SELECTED+"Prev";
DwtToolBar._NEXT_PREV_RE=new RegExp("\\b"+[DwtToolBar.SELECTED_NEXT,DwtToolBar.SELECTED_PREV].join("|")+"\\b","g");
DwtToolBar.prototype.TEMPLATE="dwt.Widgets#ZToolbar";
DwtToolBar.prototype.ITEM_TEMPLATE="dwt.Widgets#ZToolbarItem";
DwtToolBar.prototype.SEPARATOR_TEMPLATE="dwt.Widgets#ZToolbarSeparator";
DwtToolBar.prototype.SPACER_TEMPLATE="dwt.Widgets#ZToolbarSpacer";
DwtToolBar.prototype.FILLER_TEMPLATE="dwt.Widgets#ZToolbarFiller";
DwtToolBar.__itemCount=0;
DwtToolBar.prototype.dispose=function(){this._itemsEl=null;
this._prefixEl=null;
this._suffixEl=null;
DwtComposite.prototype.dispose.call(this)
};
DwtToolBar.prototype.getItem=function(A){return this._children.get(A)
};
DwtToolBar.prototype.getItemCount=function(){return this._children.size()
};
DwtToolBar.prototype.getItems=function(){return this._children.getArray()
};
DwtToolBar.prototype.addSpacer=function(B,A){var C=this._createSpacerElement();
C.rel="spacer";
this._addItem(DwtToolBar.SPACER,C,A);
return C
};
DwtToolBar.prototype.addSeparator=function(C,A){var B=this._createSeparatorElement();
B.rel="separator";
this._addItem(DwtToolBar.SEPARATOR,B,A);
return B
};
DwtToolBar.prototype.addFiller=function(C,A){var B=this._createFillerElement();
B.rel="filler";
this._addItem(DwtToolBar.FILLER,B,A);
return B
};
DwtToolBar.prototype.addChild=function(C,A){DwtComposite.prototype.addChild.apply(this,arguments);
var B=this._createItemElement();
B.appendChild(C.getHtmlElement());
this._addItem(DwtToolBar.ELEMENT,B,A)
};
DwtToolBar.prototype.getKeyMapName=function(){return this._keyMapName
};
DwtToolBar.prototype.handleKeyAction=function(B,D){var C=this.getItem(this._curFocusIndex);
var A=this.getItemCount();
if(A<2){return true
}switch(B){case DwtKeyMap.PREV:if(this._curFocusIndex>0){this._moveFocus(true)
}break;
case DwtKeyMap.NEXT:if(this._curFocusIndex<(A-1)){this._moveFocus()
}break;
default:if(C){return C.handleKeyAction(B,D)
}}return true
};
DwtToolBar.prototype._createItemId=function(B){B=B||this._htmlElId;
var A=[B,"item",++DwtToolBar.__itemCount].join("_");
return A
};
DwtToolBar.prototype._createHtml=function(){var A={id:this._htmlElId};
this._createHtmlFromTemplate(this.TEMPLATE,A);
this._itemsEl=document.getElementById(A.id+"_items");
this._prefixEl=document.getElementById(A.id+"_prefix");
this._suffixEl=document.getElementById(A.id+"_suffix")
};
DwtToolBar.prototype._createItemElement=function(C){C=C||this.ITEM_TEMPLATE;
var D={id:this._htmlElId,itemId:this._createItemId()};
var B=AjxTemplate.expand(C,D);
var A=AjxStringUtil.calcDIV();
A.innerHTML=B;
return A.firstChild.rows[0].cells[0]
};
DwtToolBar.prototype._createSpacerElement=function(A){return this._createItemElement(A||this.SPACER_TEMPLATE)
};
DwtToolBar.prototype._createSeparatorElement=function(A){return this._createItemElement(A||this.SEPARATOR_TEMPLATE)
};
DwtToolBar.prototype._createFillerElement=function(A){return this._createItemElement(A||this.FILLER_TEMPLATE)
};
DwtToolBar.prototype._addItem=function(D,C,B){var E=this._items[B]||this._suffixEl;
var A=B||(typeof B=="number")?B:this._items.length;
this._items.splice(A,0,C);
this._itemsEl.insertBefore(C,E)
};
DwtToolBar.prototype._focus=function(A){var C=this.shell.getKeyboardMgr();
if(C.isEnabled()){var B=C.__keyMapMgr;
if(B){if(this._style==DwtToolBar.HORIZ_STYLE){B.removeMapping("DwtButton","ArrowRight");
B.setMapping("DwtButton","ArrowDown",DwtKeyMap.SUBMENU)
}else{B.removeMapping("DwtButton","ArrowDown");
B.setMapping("DwtButton","ArrowRight",DwtKeyMap.SUBMENU)
}B.reloadMap("DwtButton")
}}A=A?A:this._getFocusItem(this._curFocusIndex);
if(A){A._hasFocus=true;
A._focus()
}else{this._moveFocus()
}};
DwtToolBar.prototype._blur=function(A){A=A?A:this._getFocusItem(this._curFocusIndex);
if(A){A._hasFocus=false;
A._blur()
}};
DwtToolBar.prototype._getFocusItem=function(A){var B=this.getItem(A);
if(!B||(B instanceof DwtToolBar)){return null
}if(B._noFocus){return null
}if(B.getEnabled&&!B.getEnabled()){return null
}if(B.getVisible&&!B.getVisible()){return null
}return B
};
DwtToolBar.prototype._moveFocus=function(A){var B=this._curFocusIndex;
var C=this.getItemCount()-1;
var D=null;
while(!D&&B>=0&&B<=C){B=A?B-1:B+1;
D=this._getFocusItem(B)
}if(D){this._blur();
this._curFocusIndex=B;
this._focus(D)
}};
DwtToolBar.prototype.__markPrevNext=function(G,F){var A=this.__getButtonIndex(G);
var D=this.__getButtonAt(A-1);
var B=this.__getButtonAt(A+1);
if(F){if(D){Dwt.delClass(D.getHtmlElement(),DwtToolBar._NEXT_PREV_RE,DwtToolBar.SELECTED_PREV)
}if(B){Dwt.delClass(B.getHtmlElement(),DwtToolBar._NEXT_PREV_RE,DwtToolBar.SELECTED_NEXT)
}}else{if(D){Dwt.delClass(D.getHtmlElement(),DwtToolBar._NEXT_PREV_RE)
}if(B){Dwt.delClass(B.getHtmlElement(),DwtToolBar._NEXT_PREV_RE)
}}var E=this.__getButtonAt(0);
if(E){Dwt.addClass(E.getHtmlElement(),DwtToolBar.FIRST_ITEM)
}var C=this.__getButtonAt(this.getItemCount()-1);
if(C){Dwt.addClass(C.getHtmlElement(),DwtToolBar.LAST_ITEM)
}};
DwtToolBar.prototype.__getButtonIndex=function(C){var B=0;
for(var A in this._buttons){if(A==C){return B
}B++
}return -1
};
DwtToolBar.prototype.__getButtonAt=function(B){var C=0;
for(var A in this._buttons){if(C==B){return this._buttons[A]
}C++
}return null
};
DwtToolBarButton=function(A){if(arguments.length==0){return 
}var A=Dwt.getParams(arguments,DwtToolBarButton.PARAMS);
A.className=A.className||"ZToolbarButton";
DwtButton.call(this,A)
};
DwtToolBarButton.PARAMS=["parent","style","className","posStyle","actionTiming","id","index"];
DwtToolBarButton.prototype=new DwtButton;
DwtToolBarButton.prototype.constructor=DwtToolBarButton;
DwtToolBarButton.prototype.TEMPLATE="dwt.Widgets#ZToolbarButton"
}if(AjxPackage.define("ajax.dwt.widgets.DwtToolTip")){DwtToolTip=function(C,D,B){if(arguments.length==0){return 
}this.shell=C;
this._dialog=B;
this._poppedUp=false;
this._div=document.createElement("div");
this._div.className=D||"DwtToolTip";
this._div.style.position=DwtControl.ABSOLUTE_STYLE;
this.shell.getHtmlElement().appendChild(this._div);
Dwt.setZIndex(this._div,Dwt.Z_HIDDEN);
Dwt.setLocation(this._div,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
var A="dwt.Widgets#"+this._borderStyle;
this._div.innerHTML=AjxTemplate.expand(A,"tooltip");
var E=AjxTemplate.getParams(A);
this._borderWidth=Number(E.width);
this._borderHeight=Number(E.height);
this._contentDiv=document.getElementById("tooltipContents")
};
DwtToolTip.prototype.toString=function(){return"DwtToolTip"
};
DwtToolTip.TOOLTIP_DELAY=750;
DwtToolTip.prototype._borderStyle="DwtToolTip";
DwtToolTip.prototype.getContent=function(){return this._div.innerHTML
};
DwtToolTip.prototype.setContent=function(B,A){this._content=B;
if(A){this._contentDiv.innerHTML=this._content
}};
DwtToolTip.prototype.popup=function(A,C,B){if(this._popupAction){AjxTimedAction.cancelAction(this._popupAction);
this._popupAction=null
}if(this._content!=null){if(!B){this._contentDiv.innerHTML=this._content
}this._popupAction=new AjxTimedAction(this,this._positionElement,[A,C]);
AjxTimedAction.scheduleAction(this._popupAction,5)
}};
DwtToolTip.prototype.popdown=function(){if(this._popupAction){AjxTimedAction.cancelAction(this._popupAction);
this._popupAction=null
}if(this._content!=null&&this._poppedUp){Dwt.setLocation(this._div,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
this._poppedUp=false
}};
DwtToolTip.prototype._positionElement=function(Z,Y){this._popupAction=null;
var E=this._div;
var M="tooltip";
var X=this._dialog;
var W=5;
var J=8;
var H=8;
var A=document.getElementById(M+"TopPointer");
A.style.display="block";
var Q=Dwt.getSize(A),T=Q.x,C=Q.y;
var F=document.getElementById(M+"BottomPointer");
F.style.display="block";
Q=Dwt.getSize(F),bottomPointerWidth=Q.x,bottomPointerHeight=Q.y;
var U=A;
var G=DwtShell.getShell(window).getSize(),e=G.x,N=G.y;
var d=Dwt.getSize(E),V=d.x,K=d.y;
var L=this._borderHeight,f=this._borderHeight,P=this._borderWidth,S=this._borderWidth;
var c=Z-V/2-J,a;
var B,D,R;
if(Y+H+C-L+K<N-W){F.style.display="none";
a=Y+H+C-L;
B=L-C;
R=T;
U=A
}else{A.style.display="none";
a=Y-H-bottomPointerHeight+f-K;
B=K-f;
R=bottomPointerWidth;
U=F
}var I=document.getElementById(M+"Contents");
if(V-P-S<R){I.width=R;
I.style.width=String(R)+"px"
}else{I.width="auto";
I.style.width="auto"
}if(c<W){c=W
}else{if(c+V>e-W){c=e-W-V
}}D=Z-c-R/2;
if(D+R>V-S){D=V-S-R
}if(D<P){D=P
}U.style.left=D;
U.style.top=B;
Dwt.setLocation(E,c,a);
var O=X?X.getZIndex()+Dwt._Z_INC:Dwt.Z_TOOLTIP;
Dwt.setZIndex(E,O);
this._poppedUp=true
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtTreeItem")){DwtTreeItem=function(B){if(arguments.length==0){return 
}B=Dwt.getParams(arguments,DwtTreeItem.PARAMS);
var A=B.parent;
if(A instanceof DwtTree){this._tree=A
}else{if(A instanceof DwtTreeItem){this._tree=A._tree
}else{throw new DwtException("DwtTreeItem parent must be a DwtTree or DwtTreeItem",DwtException.INVALIDPARENT,"DwtTreeItem")
}}this._origClassName=B.className||"DwtTreeItem";
this._textClassName=this._origClassName+"-Text";
this._selectedClassName=this._origClassName+"-"+DwtCssStyle.SELECTED;
this._actionedClassName=this._origClassName+"-"+DwtCssStyle.ACTIONED;
this._dragOverClassName=this._origClassName+"-"+DwtCssStyle.DRAG_OVER;
B.deferred=(B.deferred!==false);
B.className=null;
DwtComposite.call(this,B);
this._imageInfoParam=B.imageInfo;
this._extraInfo=B.extraInfo;
this._textParam=B.text;
this._deferred=B.deferred;
this._itemChecked=false;
this._initialized=false;
this._selectionEnabled=true;
this._forceNotifySelection=Boolean(B.forceNotifySelection);
this._actionEnabled=true;
this._forceNotifyAction=Boolean(B.forceNotifyAction);
if(this._tree._isCheckedStyle()){this.enableSelection(false);
this._selectedClassName=this._origClassName
}if(A instanceof DwtTree||(A._initialized&&(!A._deferred||A._expanded))){this._initialize(B.index)
}else{A._addDeferredChild(this,B.index);
this._index=B.index
}};
DwtTreeItem.PARAMS=["parent","index","text","imageInfo","deferred","className","posStyle"];
DwtTreeItem.prototype=new DwtComposite;
DwtTreeItem.prototype.constructor=DwtTreeItem;
DwtTreeItem.prototype.TEMPLATE="dwt.Widgets#ZTreeItem";
DwtTreeItem.prototype._checkBoxVisible=true;
DwtTreeItem._NODECELL_DIM="16px";
DwtTreeItem._processedMouseDown=false;
DwtTreeItem.prototype.dispose=function(){this._itemDiv=null;
this._nodeCell=null;
this._checkBoxCell=null;
this._checkBox=null;
this._imageCell=null;
this._textCell=null;
this._childDiv=null;
DwtComposite.prototype.dispose.call(this)
};
DwtTreeItem.prototype.toString=function(){return"DwtTreeItem"
};
DwtTreeItem.prototype.getChecked=function(){return this._itemChecked
};
DwtTreeItem.prototype.setChecked=function(A,C){if((this._itemChecked!=A)||C){this._itemChecked=A;
if(this._checkBox!=null&&(this._checkBoxCell&&Dwt.getVisible(this._checkBoxCell))){this._checkBox.checked=A;
if(this._checkBox._ieHack){if(A){var B=document.createElement("<INPUT type='checkbox' checked>");
Dwt.setHandler(B,DwtEvent.ONMOUSEDOWN,DwtTreeItem._checkBoxMouseDownHdlr);
Dwt.setHandler(B,DwtEvent.ONMOUSEUP,DwtTreeItem._checkBoxMouseUpHdlr);
this._checkBox.parentNode.replaceChild(B,this._checkBox);
this._checkBox=B
}else{this._checkBox._ieHack=false
}}}}};
DwtTreeItem.prototype.getExpanded=function(){return this._expanded
};
DwtTreeItem.prototype.setExpanded=function(B,E,D){if(B){var F=this.parent;
while(F instanceof DwtTreeItem&&!F._expanded){F.setExpanded(true);
F=F.parent
}this._realizeDeferredChildren()
}if(this.getNumChildren()){if(B&&E){if(!this._expanded){this._expand(B,null,D)
}var A=this.getChildren();
for(var C=0;
C<A.length;
C++){if(A[C] instanceof DwtTreeItem){A[C].setExpanded(B,E,D)
}}}else{if(this._expanded!=B){this._expand(B,null,D)
}}}};
DwtTreeItem.prototype.getItemCount=function(){return this._children.size()
};
DwtTreeItem.prototype.getItems=function(){return this._children.getArray()
};
DwtTreeItem.prototype.getImage=function(){return this._imageInfo
};
DwtTreeItem.prototype.setImage=function(A){if(this._initialized){if(this._imageCell){AjxImg.setImage(this._imageCell,A)
}this._imageInfo=A
}else{this._imageInfoParam=A
}};
DwtTreeItem.prototype.setDndImage=function(A){this._dndImageInfo=A
};
DwtTreeItem.prototype.getSelected=function(){return this._selected
};
DwtTreeItem.prototype.getActioned=function(){return this._actioned
};
DwtTreeItem.prototype.getText=function(){return this._text
};
DwtTreeItem.prototype.setText=function(A){if(this._initialized){if(!A){A=""
}this._text=this._textCell.innerHTML=A
}else{this._textParam=A
}};
DwtTreeItem.prototype.setDndText=function(A){this._dndText=A
};
DwtTreeItem.prototype.showCheckBox=function(A){this._checkBoxVisible=A;
if(this._checkBoxCell){Dwt.setVisible(this._checkBoxCell,A)
}};
DwtTreeItem.prototype.showExpansionIcon=function(A){if(this._nodeCell){Dwt.setVisible(this._nodeCell,A)
}};
DwtTreeItem.prototype.enableSelection=function(A){this._selectionEnabled=A;
this._selectedClassName=A?this._origClassName+"-"+DwtCssStyle.SELECTED:this._origClassName
};
DwtTreeItem.prototype.enableAction=function(A){this._actionEnabled=A
};
DwtTreeItem.prototype.addSeparator=function(A){this._children.add((new DwtTreeItemSeparator(this)),A)
};
DwtTreeItem.prototype.setVisible=function(C,B,A){if(B&&!A){Dwt.setVisible(this._itemDiv,C)
}else{if(A&&!B){Dwt.setVisible(this._childDiv,C)
}else{DwtComposite.prototype.setVisible.call(this,C)
}}};
DwtTreeItem.prototype.removeChild=function(B){if(B._initialized){this._tree._deselect(B);
if(this._childDiv){this._childDiv.removeChild(B.getHtmlElement())
}}this._children.remove(B);
if(this._children.size()==0){if(this._expanded){this._expanded=false
}if(this._initialized&&this._nodeCell){AjxImg.setImage(this._nodeCell,"Blank_16");
var A=AjxImg.getImageElement(this._nodeCell);
if(A){Dwt.clearHandler(A,DwtEvent.ONMOUSEDOWN)
}}}};
DwtTreeItem.prototype._initialize=function(A,D){this._checkState();
if(AjxEnv.isIE){this._setEventHdlrs([DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE])
}if(AjxEnv.isSafari){this._setEventHdlrs([DwtEvent.ONCONTEXTMENU])
}var B={id:this._htmlElId,divClassName:this._origClassName,isCheckedStyle:this._tree._isCheckedStyle(),textClassName:this._textClassName};
this._createHtmlFromTemplate(this.TEMPLATE,B);
this.parent._addItem(this,A,D);
this._itemDiv=document.getElementById(B.id+"_div");
this._nodeCell=document.getElementById(B.id+"_nodeCell");
this._checkBoxCell=document.getElementById(B.id+"_checkboxCell");
this._checkBox=document.getElementById(B.id+"_checkbox");
this._imageCell=document.getElementById(B.id+"_imageCell");
this._textCell=document.getElementById(B.id+"_textCell");
this._extraCell=document.getElementById(B.id+"_extraCell");
if(this._nodeCell){this._nodeCell.style.width=this._nodeCell.style.height=DwtTreeItem._NODECELL_DIM;
if(this._children.size()>0){AjxImg.setImage(this._nodeCell,"NodeCollapsed");
var C=AjxImg.getImageElement(this._nodeCell);
if(C){Dwt.setHandler(C,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
Dwt.setHandler(C,DwtEvent.ONMOUSEUP,DwtTreeItem._nodeIconMouseUpHdlr)
}}}if(this._extraCell){AjxImg.setImage(this._extraCell,(this._extraInfo||"Blank_16"))
}if(this._tree._isCheckedStyle()&&this._checkBox){this.showCheckBox(this._checkBoxVisible);
if(AjxEnv.isIE){this._checkBox._ieHack=true
}Dwt.setHandler(this._checkBox,DwtEvent.ONMOUSEDOWN,DwtTreeItem._checkBoxMouseDownHdlr);
Dwt.setHandler(this._checkBox,DwtEvent.ONMOUSEUP,DwtTreeItem._checkBoxMouseUpHdlr);
this._checkBox.checked=this._itemChecked
}if(this._imageCell&&this._imageInfoParam){AjxImg.setImage(this._imageCell,this._imageInfoParam);
this._imageInfo=this._imageInfoParam
}if(this._textCell&&this._textParam){this._textCell.innerHTML=this._text=this._textParam
}this._expanded=this._selected=this._actioned=false;
this._gotMouseDownLeft=this._gotMouseDownRight=false;
this._addMouseListeners();
this._initialized=true
};
DwtTreeItem.prototype.setTreeItemColor=function(D){var F=this._htmlElId+"_table";
var C=document.getElementById(F);
var E=document.getElementById(this._htmlElId+"_div");
var B=this.getHtmlElement();
var A=this._origClassName+" "+D;
if(C){C.className=A;
if(E){E.className=A
}}else{if(B){B.className=D
}}};
DwtTreeItem.prototype._addMouseListeners=function(){var B=[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP,DwtEvent.ONDBLCLICK];
B.push(AjxEnv.isIE?DwtEvent.ONMOUSELEAVE:DwtEvent.ONMOUSEOUT);
if(AjxEnv.isSafari){B.push(DwtEvent.ONCONTEXTMENU)
}for(var A=0;
A<B.length;
A++){this.addListener(B[A],DwtTreeItem._listeners[B[A]])
}};
DwtTreeItem.prototype._addDeferredChild=function(C,A){if(this._initialized&&this._children.size()==0){AjxImg.setImage(this._nodeCell,"NodeCollapsed");
var B=AjxImg.getImageElement(this._nodeCell);
if(B){Dwt.setHandler(B,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
Dwt.setHandler(B,DwtEvent.ONMOUSEUP,DwtTreeItem._nodeIconMouseUpHdlr)
}}this._children.add(C,A)
};
DwtTreeItem.prototype.addChild=function(A){};
DwtTreeItem.prototype._addItem=function(C,B,F){if(!this._children.contains(C)){this._children.add(C,B)
}if(this._childDiv==null){this._childDiv=document.createElement("div");
if(this.parent!=this._tree){this._childDiv.className="DwtTreeItemChildDiv"
}else{this._childDiv.className="DwtTreeItemLevel1ChildDiv"
}this.getHtmlElement().appendChild(this._childDiv);
if(!this._expanded){this._childDiv.style.display="none"
}}if(F){if(AjxImg.getImageClass(this._nodeCell)==AjxImg.getClassForImage("Blank_16")){if(this._expanded){AjxImg.setImage(this._nodeCell,"NodeExpanded")
}else{AjxImg.setImage(this._nodeCell,"NodeCollapsed")
}var E=AjxImg.getImageElement(this._nodeCell);
if(E){Dwt.setHandler(E,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr)
}}}var A=this._childDiv;
var D=A.childNodes.length;
if(B==null||B>=D||D==0){A.appendChild(C.getHtmlElement())
}else{A.insertBefore(C.getHtmlElement(),A.childNodes[B])
}};
DwtTreeItem.prototype.sort=function(A){if(this._childDiv){this._children.sort(A);
var B=document.createDocumentFragment();
this._children.foreach(function(D,C){B.appendChild(D.getHtmlElement());
D._index=C
});
this._childDiv.appendChild(B)
}};
DwtTreeItem.prototype._getDragProxy=function(){var B=document.createElement("div");
Dwt.setPosition(B,Dwt.ABSOLUTE_STYLE);
var C=document.createElement("table");
B.appendChild(C);
C.cellSpacing=C.cellPadding=0;
var D=C.insertRow(0);
var A=0;
var E=D.insertCell(A++);
E.noWrap=true;
if(this._dndImageInfo){AjxImg.setImage(E,this._dndImageInfo)
}else{if(this._imageInfo){AjxImg.setImage(E,this._imageInfo)
}}E=D.insertCell(A);
E.noWrap=true;
E.className=this._origClassName;
if(this._dndText){E.innerHTML=this._dndText
}else{if(this._text){E.innerHTML=this._text
}}this.shell.getHtmlElement().appendChild(B);
Dwt.setZIndex(B,Dwt.Z_DND);
return B
};
DwtTreeItem.prototype._dragEnter=function(){this._preDragClassName=this._textCell.className;
this._textCell.className=this._dragOverClassName
};
DwtTreeItem.prototype._dragHover=function(){if(this.getNumChildren()>0&&!this.getExpanded()){this.setExpanded(true)
}};
DwtTreeItem.prototype._dragLeave=function(){if(this._preDragClassName){this._textCell.className=this._preDragClassName
}};
DwtTreeItem.prototype._drop=function(){if(this._preDragClassName){this._textCell.className=this._preDragClassName
}};
DwtTreeItem._nodeIconMouseDownHdlr=function(B){var C=DwtControl.getTargetControl(B);
var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B,C);
if(A.button==DwtMouseEvent.LEFT){C._expand(!C._expanded,A)
}else{if(A.button==DwtMouseEvent.RIGHT){A.dwtObj._tree._itemActioned(A.dwtObj,A)
}}A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtTreeItem._nodeIconMouseUpHdlr=function(B){var C=DwtControl.getTargetControl(B);
var A=DwtShell.mouseEvent;
A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtTreeItem.prototype._expand=function(B,C,A){if(!B){this._expanded=false;
this._childDiv.style.display="none";
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
this._tree._itemCollapsed(this,C,A)
}else{this._realizeDeferredChildren();
this._expanded=true;
this._childDiv.style.display="block";
AjxImg.setImage(this._nodeCell,"NodeExpanded");
this._tree._itemExpanded(this,C,A)
}};
DwtTreeItem.prototype._realizeDeferredChildren=function(){var A=this._children.getArray();
for(var B=0;
B<A.length;
B++){var C=A[B];
if(!C._initialized){C._initialize(C._index,true)
}else{if(C._isSeparator&&!C.div){var D=C.div=document.createElement("div");
D.className="vSpace";
this._childDiv.appendChild(D);
C._initialized=true
}}}};
DwtTreeItem.prototype._isChildOf=function(A){var B=this.parent;
while(B&&B!=this._tree){if(B==A){return true
}B=B.parent
}return false
};
DwtTreeItem.prototype._setSelected=function(A){if(this._selected!=A){this._selected=A;
if(!this._initialized){this._initialize()
}if(A&&(this._selectionEnabled||this._forceNotifySelection)){if(this._textCell){this._textCell.className=this._selectedClassName
}return true
}else{if(this._textCell){this._textCell.className=this._textClassName
}return false
}}};
DwtTreeItem.prototype._setActioned=function(A){if(this._actioned!=A){this._actioned=A;
if(!this._initialized){this._initialize()
}if(A&&(this._actionEnabled||this._forceNotifyAction)&&!this._selected){this._textCell.className=this._actionedClassName;
return true
}else{if(!A){if(this._textCell&&!this._selected){this._textCell.className=this._textClassName
}return false
}}}};
DwtTreeItem._checkBoxMouseDownHdlr=function(B){var C=DwtControl.getTargetControl(B);
var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B,C);
A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
DwtTreeItem._processedMouseDown=true;
return false
};
DwtTreeItem._checkBoxMouseUpHdlr=function(B){if(!DwtTreeItem._processedMouseDown){return 
}DwtTreeItem._processedMouseDown=false;
var C=DwtControl.getTargetControl(B);
var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B,C);
if(A.button==DwtMouseEvent.LEFT){A.dwtObj._itemChecked=!A.dwtObj._itemChecked;
A.dwtObj._tree._itemChecked(A.dwtObj,A)
}else{if(A.button==DwtMouseEvent.RIGHT){A.dwtObj._tree._itemActioned(A.dwtObj,A)
}}};
DwtTreeItem._mouseDownListener=function(A){var B=A.dwtObj;
if(!B){return false
}if(A.target==B._childDiv){return 
}if(A.button==DwtMouseEvent.LEFT&&(B._selectionEnabled||B._forceNotifySelection)){B._gotMouseDownLeft=true
}else{if(A.button==DwtMouseEvent.RIGHT&&(B._actionEnabled||B._forceNotifyAction)){B._gotMouseDownRight=true
}}};
DwtTreeItem._mouseOutListener=function(A){var B=A.dwtObj;
if(!B){return false
}if(A.target==B._childDiv){return 
}B._gotMouseDownLeft=false;
B._gotMouseDownRight=false
};
DwtTreeItem._mouseUpListener=function(A){var B=A.dwtObj;
if(!B){return false
}if(A.target==B._childDiv){return 
}if(A.button==DwtMouseEvent.LEFT&&B._gotMouseDownLeft){B._tree._itemClicked(B,A)
}else{if(A.button==DwtMouseEvent.RIGHT&&B._gotMouseDownRight){B._tree._itemActioned(B,A)
}}};
DwtTreeItem._doubleClickListener=function(B){var C=B.dwtObj;
if(!C){return false
}if(B.target==C._childDiv){return 
}var D=DwtControl.getTargetControl(B);
var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B,D);
if(A.button==DwtMouseEvent.LEFT||A.button==DwtMouseEvent.NONE){A.dwtObj._tree._itemDblClicked(A.dwtObj,A)
}};
DwtTreeItem._contextListener=function(B){if(AjxEnv.isSafari){var C=DwtControl.getTargetControl(B);
var A=C?C.preventContextMenu():true;
if(A){C.notifyListeners(DwtEvent.ONMOUSEDOWN,B);
return C.notifyListeners(DwtEvent.ONMOUSEUP,B)
}}};
DwtTreeItem._listeners={};
DwtTreeItem._listeners[DwtEvent.ONMOUSEDOWN]=new AjxListener(null,DwtTreeItem._mouseDownListener);
DwtTreeItem._listeners[DwtEvent.ONMOUSEOUT]=new AjxListener(null,DwtTreeItem._mouseOutListener);
DwtTreeItem._listeners[DwtEvent.ONMOUSEUP]=new AjxListener(null,DwtTreeItem._mouseUpListener);
DwtTreeItem._listeners[DwtEvent.ONDBLCLICK]=new AjxListener(null,DwtTreeItem._doubleClickListener);
DwtTreeItem._listeners[DwtEvent.ONCONTEXTMENU]=new AjxListener(null,DwtTreeItem._contextListener);
DwtTreeItemSeparator=function(A){this.parent=A;
this._isSeparator=true;
this._initialized=true
};
DwtTreeItemSeparator.prototype.dispose=function(){DwtComposite.prototype.removeChild.call(this.parent,this)
};
DwtTreeItemSeparator.prototype.isInitialized=function(){return this._initialized
};
DwtTreeItemSeparator.prototype.getHtmlElement=function(){return this.div
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtTree")){DwtTree=function(C){if(arguments.length==0){return 
}C=Dwt.getParams(arguments,DwtTree.PARAMS);
C.className=C.className||"DwtTree";
DwtComposite.call(this,C);
var A=[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP,DwtEvent.ONDBLCLICK];
if(!AjxEnv.isIE){A=A.concat([DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT])
}this._setEventHdlrs(A);
var B=C.style;
if(!B){this._style=DwtTree.SINGLE_STYLE
}else{if(B==DwtTree.CHECKEDITEM_STYLE){B|=DwtTree.SINGLE_STYLE
}this._style=B
}this._selectedItems=new AjxVector();
this._selEv=new DwtSelectionEvent(true)
};
DwtTree.PARAMS=["parent","style","className","posStyle"];
DwtTree.prototype=new DwtComposite;
DwtTree.prototype.constructor=DwtTree;
DwtTree.prototype.toString=function(){return"DwtTree"
};
DwtTree.SINGLE_STYLE=1;
DwtTree.MULTI_STYLE=2;
DwtTree.CHECKEDITEM_STYLE=4;
DwtTree.ITEM_SELECTED=0;
DwtTree.ITEM_DESELECTED=1;
DwtTree.ITEM_CHECKED=2;
DwtTree.ITEM_ACTIONED=3;
DwtTree.ITEM_DBL_CLICKED=4;
DwtTree.ITEM_EXPANDED=1;
DwtTree.ITEM_COLLAPSED=2;
DwtTree.prototype.getStyle=function(){return this._style
};
DwtTree.prototype.addSelectionListener=function(A){this.addListener(DwtEvent.SELECTION,A)
};
DwtTree.prototype.removeSelectionListener=function(A){this.removeListener(DwtEvent.SELECTION,A)
};
DwtTree.prototype.addTreeListener=function(A){this.addListener(DwtEvent.TREE,A)
};
DwtTree.prototype.removeTreeListener=function(A){this.removeListener(DwtEvent.TREE,A)
};
DwtTree.prototype.getItemCount=function(){return this._children.size()
};
DwtTree.prototype.getItems=function(){return this._children.getArray()
};
DwtTree.prototype.deselectAll=function(){var A=this._selectedItems.getArray();
var C=this._selectedItems.size();
for(var B=0;
B<C;
B++){A[B]._setSelected(false)
}if(C>0){this._notifyListeners(DwtEvent.SELECTION,this._selectedItems.getArray(),DwtTree.ITEM_DESELECTED,null,this._selEv)
}this._selectedItems.removeAll()
};
DwtTree.prototype.getSelection=function(){return this._selectedItems.getArray()
};
DwtTree.prototype.setSelection=function(C,E){var G=this._selectedItems.getArray();
var F=this._selectedItems.size();
var I;
var A=0;
var D=false;
for(var B=0;
B<F;
B++){if(G[B]==C){D=true
}else{G[B]._setSelected(false);
this._selectedItems.remove(G[B]);
if(I==null){I=new Array()
}I[A++]=G[B]
}}if(I&&!E){this._notifyListeners(DwtEvent.SELECTION,I,DwtTree.ITEM_DESELECTED,null,this._selEv)
}if(D){return 
}this._selectedItems.add(C);
var H=C.parent;
while(H instanceof DwtTreeItem){H.setExpanded(true);
H=H.parent
}if(C._setSelected(true)&&!E){this._notifyListeners(DwtEvent.SELECTION,[C],DwtTree.ITEM_SELECTED,null,this._selEv)
}};
DwtTree.prototype.getSelectionCount=function(){return this._selectedItems.size()
};
DwtTree.prototype.addChild=function(A){};
DwtTree.prototype.addSeparator=function(){var A=document.createElement("div");
A.className="vSpace";
this.getHtmlElement().appendChild(A)
};
DwtTree.prototype._addItem=function(B,A){this._children.add(B,A);
var D=this.getHtmlElement();
var C=D.childNodes.length;
if(A==null||A>C){D.appendChild(B.getHtmlElement())
}else{D.insertBefore(B.getHtmlElement(),D.childNodes[A])
}};
DwtTree.prototype.sort=function(A){this._children.sort(A);
var B=document.createDocumentFragment();
this._children.foreach(function(D,C){B.appendChild(D.getHtmlElement());
D._index=C
});
this.getHtmlElement().appendChild(B)
};
DwtTree.prototype.removeChild=function(A){this._children.remove(A);
this._selectedItems.remove(A);
this.getHtmlElement().removeChild(A.getHtmlElement())
};
DwtTree.prototype.setCheckboxes=function(C){if(!this._isCheckedStyle()||!AjxEnv.isIE){return 
}if(C&&C._isSeparator){return 
}var A;
if(C){C.setChecked(C.getChecked(),true);
A=C.getItems()
}else{A=this.getItems()
}for(var B=0;
B<A.length;
B++){this.setCheckboxes(A[B])
}};
DwtTree.prototype._deselect=function(A){if(this._selectedItems.contains(A)){this._selectedItems.remove(A);
A._setSelected(false);
this._notifyListeners(DwtEvent.SELECTION,[A],DwtTree.ITEM_DESELECTED,null,this._selEv)
}};
DwtTree.prototype._isCheckedStyle=function(){return((this._style&DwtTree.CHECKEDITEM_STYLE)!=0)
};
DwtTree.prototype._itemActioned=function(B,A){if(this._actionedItem){this._actionedItem._setActioned(false);
this._notifyListeners(DwtEvent.SELECTION,[this._actionedItem],DwtTree.ITEM_DESELECTED,A,this._selEv)
}this._actionedItem=B;
B._setActioned(true);
this._notifyListeners(DwtEvent.SELECTION,[B],DwtTree.ITEM_ACTIONED,A,this._selEv)
};
DwtTree.prototype._itemChecked=function(B,A){this._notifyListeners(DwtEvent.SELECTION,[B],DwtTree.ITEM_CHECKED,A,this._selEv)
};
DwtTree.prototype._itemClicked=function(D,C){var B;
var A=this._selectedItems.getArray();
var E=this._selectedItems.size();
if(this._style&DwtTree.SINGLE_STYLE||(!C.shiftKey&&!C.ctrlKey)){if(E>0){for(B=0;
B<E;
B++){A[B]._setSelected(false)
}this._notifyListeners(DwtEvent.SELECTION,this._selectedItems.getArray(),DwtTree.ITEM_DESELECTED,C,this._selEv);
this._selectedItems.removeAll()
}this._selectedItems.add(D);
if(D._setSelected(true)){this._notifyListeners(DwtEvent.SELECTION,[D],DwtTree.ITEM_SELECTED,C,this._selEv)
}}else{if(C.ctrlKey){if(this._selectedItems.contains(D)){this._selectedItems.remove(D);
D._setSelected(false);
this._notifyListeners(DwtEvent.SELECTION,[D],DwtTree.ITEM_DESELECTED,C,this._selEv)
}else{this._selectedItems.add(D);
if(D._setSelected(true)){this._notifyListeners(DwtEvent.SELECTION,[D],DwtTree.ITEM_SELECTED,C,this._selEv)
}}}else{}}};
DwtTree.prototype._itemDblClicked=function(B,A){this._notifyListeners(DwtEvent.SELECTION,[B],DwtTree.ITEM_DBL_CLICKED,A,this._selEv)
};
DwtTree.prototype._itemExpanded=function(C,B,A){if(B&&!A){this._notifyListeners(DwtEvent.TREE,[C],DwtTree.ITEM_EXPANDED,B,DwtShell.treeEvent)
}};
DwtTree.prototype._itemCollapsed=function(H,E,D){var C;
if(E&&!D){this._notifyListeners(DwtEvent.TREE,[H],DwtTree.ITEM_COLLAPSED,E,DwtShell.treeEvent)
}var G=false;
var F=this._selectedItems.getArray();
var A=this._selectedItems.size();
var I;
var B=0;
for(C=0;
C<A;
C++){if(F[C]._isChildOf(H)){G=true;
if(I==null){I=new Array()
}I[B++]=F[C];
F[C]._setSelected(false);
this._selectedItems.remove(F[C])
}}if(I){this._notifyListeners(DwtEvent.SELECTION,I,DwtTree.ITEM_DESELECTED,E,this._selEv)
}if(G&&!this._selectedItems.contains(H)){this._selectedItems.add(H);
if(H._setSelected(true)){this._notifyListeners(DwtEvent.SELECTION,[H],DwtTree.ITEM_SELECTED,E,this._selEv)
}}};
DwtTree.prototype._notifyListeners=function(E,A,D,C,B){if(this.isListenerRegistered(E)){if(C){DwtUiEvent.copy(B,C)
}B.items=A;
if(A.length==1){B.item=A[0]
}B.detail=D;
this.notifyListeners(E,B)
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtAccordion")){DwtAccordion=function(C,B,A){if(arguments.length==0){return 
}DwtComposite.call(this,{parent:C,className:B,posStyle:(A||Dwt.ABSOLUTE_STYLE)});
this._initialize(B)
};
DwtAccordion.prototype=new DwtComposite;
DwtAccordion.prototype.constructor=DwtAccordion;
DwtAccordion.prototype.toString=function(){return"DwtAccordion"
};
DwtAccordion.prototype.addAccordionItem=function(G){if(!this.isListenerRegistered(DwtEvent.CONTROL)){this.addControlListener(new AjxListener(this,this._controlListener))
}var F=this.__ITEMCOUNT++;
var D=new DwtAccordionItem(F,G.title,G.data,this);
var B={id:this._htmlElId,itemNum:F,title:G.title,icon:G.icon};
var E=this._table.insertRow(-1);
var A=E.insertCell(-1);
A.id=this._htmlElId+"_cell_"+F;
A.className="ZAccordionCell";
A.innerHTML=AjxTemplate.expand("dwt.Widgets#ZAccordionItem",B);
var C=document.getElementById(this._htmlElId+"_header_"+F);
if(G.hideHeader){Dwt.setVisible(C,false)
}else{C.onclick=AjxCallback.simpleClosure(this._handleOnClickHeader,this,D);
C.oncontextmenu=AjxCallback.simpleClosure(this._handleOnRightClickHeader,this,D);
C.onmouseover=AjxCallback.simpleClosure(this._handleOnMouseoverHeader,this,D);
C.onmouseout=AjxCallback.simpleClosure(this._handleOnMouseoutHeader,this,D)
}this._items.push(D);
return D
};
DwtAccordion.prototype.getItems=function(){return this._items
};
DwtAccordion.prototype.getItem=function(B){for(var A=0;
A<this._items.length;
A++){if(this._items[A].id==B){return this._items[A]
}}return null
};
DwtAccordion.prototype.hideAccordionItems=function(){for(var A=0;
A<this._items.length;
A++){var B=document.getElementById(this._htmlElId+"_header_"+this._items[A].id);
if(B){Dwt.setVisible(B,false)
}}};
DwtAccordion.prototype.showAccordionItem=function(B){var A=document.getElementById(this._htmlElId+"_header_"+B);
if(A){Dwt.setVisible(A,true)
}};
DwtAccordion.prototype.setEnabled=function(A){if(A==this._enabled){return 
}this._enabled=A;
for(var B in this._items){var C=this._items[B];
if(this._currentItemId!=C.id){C._setEnabled(A)
}}};
DwtAccordion.prototype.resize=function(D,K){if(D){for(var E=0;
E<this._items.length;
E++){var B=this._items[E].id;
var I=document.getElementById(this._htmlElId+"_title_"+B);
var C=30;
var G=document.getElementById(this._htmlElId+"_icon_"+B);
if(G&&G.className&&G.className!=""){C+=16
}Dwt.setSize(I,D-C)
}}var A;
if(K){var J=document.getElementById(this._htmlElId+"_header_"+this._currentItemId);
if(J){var H=Dwt.getSize(J).y*this._getVisibleHeaderCount();
A=(K-H)
}}var F=document.getElementById(this._htmlElId+"_body_"+this._currentItemId);
if(F){Dwt.setSize(F,D,A);
Dwt.setSize(F.firstChild,D,A)
}};
DwtAccordion.prototype.setBounds=function(B,D,C,A){DwtComposite.prototype.setBounds.call(this,B,D,C,A);
this.resize(C,A)
};
DwtAccordion.prototype.getExpandedItem=function(){return this._items[this._currentItemId||0]
};
DwtAccordion.prototype.expandItem=function(A,I){var B;
for(var D=0;
D<this._items.length;
D++){var G=this._items[D].id;
var E=document.getElementById(this._htmlElId+"_header_"+G);
var F=document.getElementById(this._htmlElId+"_body_"+G);
var H=document.getElementById(this._htmlElId+"_cell_"+G);
var C=document.getElementById(this._htmlElId+"_status_"+G);
if(A==G){Dwt.setVisible(F,true);
E.className="ZAccordionHeader ZWidget ZSelected";
C.className="ImgAccordionOpened";
H.style.height="100%";
this._currentItemId=A;
B=this._items[D]
}else{Dwt.setVisible(F,false);
E.className="ZAccordionHeader ZWidget";
C.className="ImgAccordionClosed";
H.style.height="0px"
}}if(B&&I&&this.isListenerRegistered(DwtEvent.SELECTION)){var J=DwtShell.selectionEvent;
J.item=this;
J.detail=B;
this.notifyListeners(DwtEvent.SELECTION,J)
}};
DwtAccordion.prototype.setItemContent=function(D,C){var B=this.getBody(D);
if(B){this._items[D].control=C;
C.reparentHtmlElement(B);
var A=C.getSize();
this.resize(A.x,A.y)
}};
DwtAccordion.prototype.getBody=function(A){return document.getElementById(this._htmlElId+"_body_"+A)
};
DwtAccordion.prototype.getHeader=function(A){return document.getElementById(this._htmlElId+"_header_"+A)
};
DwtAccordion.prototype.show=function(A){var B=document.getElementById(this._htmlElId+"_div");
if(B){Dwt.setVisible(B,A)
}};
DwtAccordion.prototype.addSelectionListener=function(A){this.addListener(DwtEvent.SELECTION,A)
};
DwtAccordion.prototype.showAlert=function(C,A){var B=document.getElementById(this._htmlElId+"_header_"+C);
if(A){Dwt.delClass(B,null,"ZAlert")
}else{Dwt.delClass(B,"ZAlert",null)
}};
DwtAccordion.prototype._initialize=function(){this._items=[];
this.__ITEMCOUNT=0;
this.getHtmlElement().innerHTML=AjxTemplate.expand("dwt.Widgets#ZAccordion",{id:this._htmlElId});
this._table=document.getElementById(this._htmlElId+"_accordion_table");
this._setMouseEventHdlrs()
};
DwtAccordion.prototype._getVisibleHeaderCount=function(){var B=0;
for(var A=0;
A<this._items.length;
A++){var C=document.getElementById(this._htmlElId+"_header_"+this._items[A].id);
if(C&&Dwt.getVisible(C)){B++
}}return B
};
DwtAccordion.prototype._handleOnClickHeader=function(B,A){if(!this._enabled){return 
}this.expandItem(B.id,true)
};
DwtAccordion.prototype._handleOnRightClickHeader=function(B,A){A=A||window.event;
if(this.isListenerRegistered(DwtEvent.ONCONTEXTMENU)){var C=DwtShell.selectionEvent;
DwtUiEvent.copy(C,A);
C.item=this;
C.detail=B;
this.notifyListeners(DwtEvent.ONCONTEXTMENU,C)
}};
DwtAccordion.prototype._handleOnMouseoverHeader=function(B,A){A=A||window.event;
if(this.isListenerRegistered(DwtEvent.ONMOUSEOVER)){var C=DwtShell.selectionEvent;
DwtUiEvent.copy(C,A);
C.item=this;
C.detail=B;
this.notifyListeners(DwtEvent.ONMOUSEOVER,C)
}};
DwtAccordion.prototype._handleOnMouseoutHeader=function(A){this.setToolTipContent(null)
};
DwtAccordion.prototype._controlListener=function(C){if(this.getScrollStyle()!=Dwt.CLIP){return 
}var B=(C.oldWidth!=C.newWidth)?C.newWidth:null;
var A=(C.oldHeight!=C.newHeight)?C.newHeight:null;
if((!B&&!A)||C.newWidth<0||C.newHeight<0){return 
}this.resize(B,A)
};
DwtAccordionItem=function(D,C,B,A){this.id=D;
this.title=C;
this.data=B;
this.accordion=A
};
DwtAccordionItem.prototype.toString=function(){return"DwtAccordionItem"
};
DwtAccordionItem.prototype.setIcon=function(A){var B=document.getElementById(this.accordion._htmlElId+"_icon_"+this.id);
if(B){B.className=A
}};
DwtAccordionItem.prototype.getIconCell=function(){return document.getElementById(this.accordion._htmlElId+"_icon_"+this.id)
};
DwtAccordionItem.prototype.setTitle=function(B){var A=document.getElementById(this.accordion._htmlElId+"_title_"+this.id);
if(A){A.innerHTML=B
}};
DwtAccordionItem.prototype._setEnabled=function(C){var B=document.getElementById(this.accordion._htmlElId+"_title_"+this.id);
if(B){if(C){Dwt.delClass(B,"ZDisabled")
}else{Dwt.addClass(B,"ZDisabled")
}}var A=document.getElementById(this.accordion._htmlElId+"_status_"+this.id);
if(A){if(C){Dwt.delClass(A,"ZDisabledImage ZDisabled")
}else{Dwt.addClass(A,"ZDisabledImage ZDisabled")
}}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtCalendar")){DwtCalendar=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtCalendar.PARAMS);
A.className=A.className||"DwtCalendar";
DwtComposite.call(this,A);
this._skipNotifyOnPage=false;
this._hidePrevNextMo=A.hidePrevNextMo;
this._readOnly=A.readOnly;
this._uuid=Dwt.getNextId();
var B=this._origDayClassName=A.className+"Day";
this._todayClassName=" "+A.className+"Day-today";
this._selectedDayClassName=" "+B+"-"+DwtCssStyle.SELECTED;
this._hoveredDayClassName=" "+B+"-"+DwtCssStyle.HOVER;
this._activeDayClassName=" "+B+"-"+DwtCssStyle.ACTIVE;
this._hiliteClassName=" "+B+"-hilited";
this._greyClassName=" "+B+"-grey";
if(!this._readOnly){this._installListeners()
}this._selectionMode=DwtCalendar.DAY;
this._init();
this._weekDays=new Array(7);
this._workingDays=A.workingDays||DwtCalendar._DEF_WORKING_DAYS;
this.setFirstDayOfWeek(A.firstDayOfWeek||DwtCalendar.SUN);
this._forceRollOver=(A.forceRollOver!==false)
};
DwtCalendar.PARAMS=["parent","className","posStyle","firstDayOfWeek","forceRollOver","workingDaysArray","hidePrevNextMo","readOnly"];
DwtCalendar.prototype=new DwtComposite;
DwtCalendar.prototype.constructor=DwtCalendar;
DwtCalendar.SUN=0;
DwtCalendar.MON=1;
DwtCalendar.TUE=2;
DwtCalendar.WED=3;
DwtCalendar.THU=4;
DwtCalendar.FRI=5;
DwtCalendar.SAT=6;
DwtCalendar.DAY=1;
DwtCalendar.WEEK=2;
DwtCalendar.WORK_WEEK=3;
DwtCalendar.MONTH=4;
DwtCalendar.RANGE_CHANGE="DwtCalendar.RANGE_CHANGE";
DwtCalendar._FULL_WEEK=[1,1,1,1,1,1,1];
DwtCalendar._DEF_WORKING_DAYS=[0,1,1,1,1,1,0];
DwtCalendar._DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31];
DwtCalendar._NO_MONTH=-2;
DwtCalendar._PREV_MONTH=-1;
DwtCalendar._THIS_MONTH=0;
DwtCalendar._NEXT_MONTH=1;
DwtCalendar._NORMAL=1;
DwtCalendar._HOVERED=2;
DwtCalendar._ACTIVE=3;
DwtCalendar._SELECTED=4;
DwtCalendar._DESELECTED=5;
DwtCalendar.DATE_SELECTED=1;
DwtCalendar.DATE_DESELECTED=2;
DwtCalendar.DATE_DBL_CLICKED=3;
DwtCalendar._LAST_DAY_CELL_IDX=41;
DwtCalendar._BUTTON_CLASS="DwtCalendarButton";
DwtCalendar._BUTTON_HOVERED_CLASS=DwtCalendar._BUTTON_CLASS+"-"+DwtCssStyle.HOVER;
DwtCalendar._BUTTON_ACTIVE_CLASS=DwtCalendar._BUTTON_CLASS+"-"+DwtCssStyle.ACTIVE;
DwtCalendar._TITLE_CLASS="DwtCalendarTitle";
DwtCalendar._TITLE_HOVERED_CLASS=DwtCalendar._TITLE_CLASS+"-"+DwtCssStyle.HOVER;
DwtCalendar._TITLE_ACTIVE_CLASS=DwtCalendar._TITLE_CLASS+"-"+DwtCssStyle.ACTIVE;
DwtCalendar.prototype.toString=function(){return"DwtCalendar"
};
DwtCalendar.prototype.addSelectionListener=function(A){this.addListener(DwtEvent.SELECTION,A)
};
DwtCalendar.prototype.removeSelectionListener=function(A){this.removeListener(DwtEvent.SELECTION,A)
};
DwtCalendar.prototype.addActionListener=function(A){this.addListener(DwtEvent.ACTION,A)
};
DwtCalendar.prototype.removeActionListener=function(A){this.removeListener(DwtEvent.ACTION,A)
};
DwtCalendar.prototype.addDateRangeListener=function(A){this.addListener(DwtEvent.DATE_RANGE,A)
};
DwtCalendar.prototype.removeDateRangeListener=function(A){this.removeListener(DwtEvent.DATE_RANGE,A)
};
DwtCalendar.prototype.setSkipNotifyOnPage=function(A){this._skipNotifyOnPage=A
};
DwtCalendar.prototype.getSkipNotifyOnPage=function(){return this._skipNotifyOnPage
};
DwtCalendar.prototype.setDate=function(D,G,C,B){C=(C==null)?this._forceRollOver:C;
var J=new Date(D.getTime());
var E=this._date;
var F=false;
var L=false;
var A;
if(this._date2CellId!=null){var I=(J.getFullYear()*10000)+(J.getMonth()*100)+J.getDate();
var A=this._date2CellId[I];
if(A){if(A==this._selectedCellId){L=true
}var K=document.getElementById(A);
if(K._dayType==DwtCalendar._THIS_MONTH){L=true
}else{if(C){L=F=true
}else{L=true
}}}else{L=F=true
}}else{L=F=true
}if(L){if(this._date){J.setHours(this._date.getHours(),this._date.getMinutes(),this._date.getSeconds(),0)
}this._date=J;
if(!F&&!this._readOnly){this._setSelectedDate();
this._setToday()
}}if(F){this._layout()
}if(L&&!G){var H=B?DwtCalendar.DATE_DBL_CLICKED:DwtCalendar.DATE_SELECTED;
this._notifyListeners(DwtEvent.SELECTION,H,this._date)
}return true
};
DwtCalendar.prototype.isSelected=function(B){if(B==this._selectedDayElId){return true
}else{if(this._selectionMode!=DwtCalendar.DAY){var A=this._getDayCellIndex(B);
if(Math.floor(A/7)==Math.floor(this._getDayCellIndex(this._selectedDayElId)/7)&&this._currWorkingDays[A%7]){return true
}}}return false
};
DwtCalendar.prototype.getForceRollOver=function(){return this._forceRollOver
};
DwtCalendar.prototype.setForceRollOver=function(A){if(A==null){return 
}if(this._forceRollOver!=A){this._forceRollOver=A;
this._layout()
}};
DwtCalendar.prototype.getSelectionMode=function(){return this._selectionMode
};
DwtCalendar.prototype.setSelectionMode=function(A){if(this._selectionMode==A){return 
}this._selectionMode=A;
if(A==DwtCalendar.WEEK){this._currWorkingDays=DwtCalendar._FULL_WEEK
}else{if(A==DwtCalendar.WORK_WEEK){this._currWorkingDays=this._workingDays
}}this._layout()
};
DwtCalendar.prototype.setWorkingWeek=function(A){this._workingDays=this._currWorkingDays=A;
if(this._selectionMode==DwtCalendar.WORK_WEEK){this._layout()
}};
DwtCalendar.prototype.setHilite=function(F,C,B){if(this._date2CellId==null){return 
}var A;
var G;
if(B){for(G in this._date2CellId){A=document.getElementById(this._date2CellId[G]);
if(A._isHilited){A._isHilited=false;
this._setClassName(A,DwtCalendar._NORMAL)
}}}var E;
for(var D in F){G=F[D];
E=this._date2CellId[G.getFullYear()*10000+G.getMonth()*100+G.getDate()];
if(E){A=document.getElementById(E);
if(A._isHilited!=C){A._isHilited=C;
this._setClassName(A,DwtCalendar._NORMAL)
}}}};
DwtCalendar.prototype.getDate=function(){return this._date
};
DwtCalendar.prototype.setFirstDayOfWeek=function(A){for(var C=0;
C<7;
C++){if(C<A){this._weekDays[C]=6-(A-C-1)
}else{this._weekDays[C]=C-A
}var B=document.getElementById(this._getDOWCellId(C));
B.innerHTML=AjxDateUtil.WEEKDAY_SHORT[(A+C)%7]
}this._layout()
};
DwtCalendar.prototype.getDateRange=function(){return this._range
};
DwtCalendar.prototype._getDayCellId=function(A){return"c:"+A+":"+this._uuid
};
DwtCalendar.prototype._getDayCellIndex=function(A){return A.substring(2,A.indexOf(":",3))
};
DwtCalendar.prototype._getDOWCellId=function(A){return"w:"+A+":"+this._uuid
};
DwtCalendar.prototype._getDaysInMonth=function(B,A){if(B!=1){return DwtCalendar._DAYS_IN_MONTH[B]
}else{if(A%4!=0||(A%100==0&&A%400!=0)){return 28
}else{return 29
}}};
DwtCalendar.prototype._installListeners=function(){this._setMouseEventHdlrs();
this.addListener(DwtEvent.ONMOUSEOVER,new AjxListener(this,this._mouseOverListener));
this.addListener(DwtEvent.ONMOUSEOUT,new AjxListener(this,this._mouseOutListener));
this.addListener(DwtEvent.ONMOUSEDOWN,new AjxListener(this,this._mouseDownListener));
this.addListener(DwtEvent.ONMOUSEUP,new AjxListener(this,this._mouseUpListener));
this.addListener(DwtEvent.ONDBLCLICK,new AjxListener(this,this._doubleClickListener))
};
DwtCalendar.prototype._notifyListeners=function(A,C,B,D){if(!this.isListenerRegistered(A)){return 
}var E=DwtShell.selectionEvent;
if(D){DwtUiEvent.copy(E,D)
}else{E.reset()
}E.item=this;
E.detail=B;
E.type=C;
this.notifyListeners(A,E)
};
DwtCalendar.prototype._layout=function(){if(this._date==null){return false
}if(!this._calWidgetInited){this._init()
}var E=new Date(this._date.getTime());
E.setDate(1);
var M=E.getFullYear();
var K=E.getMonth();
var B=E.getDay();
var C=this._getDaysInMonth(K,M);
var O=1;
var D=1;
this._date2CellId=new Object();
this._selectedDayElId=null;
if(!this._hidePrevNextMo){if(K!=0){var G=this._getDaysInMonth(K-1,M)-this._weekDays[B]+1;
var J=M;
var N=K-1;
if(K!=11){var A=K+1;
var F=M
}else{var A=0;
var F=M+1
}}else{var G=this._getDaysInMonth(11,M-1)-this._weekDays[B]+1;
var J=M-1;
var N=11;
var A=1;
var F=M
}}for(var I=0;
I<6;
I++){for(var H=0;
H<7;
H++){var L=document.getElementById(this._getDayCellId(I*7+H));
if(L._isHilited==null){L._isHilited=false
}if(O<=C){if(I!=0||H>=this._weekDays[B]){this._date2CellId[(M*10000)+(K*100)+O]=L.id;
L._day=O;
L._month=K;
L._year=M;
L.innerHTML=O++;
L._dayType=DwtCalendar._THIS_MONTH;
if(this._readOnly){L.style.fontFamily="Arial";
L.style.fontSize="10px"
}}else{if(this._hidePrevNextMo){L.innerHTML=""
}else{this._date2CellId[(J*10000)+(N*100)+G]=L.id;
L._day=G;
L._month=N;
L._year=J;
L.innerHTML=G++;
L._dayType=DwtCalendar._PREV_MONTH
}}}else{if(!this._hidePrevNextMo){this._date2CellId[(F*10000)+(A*100)+D]=L.id;
L._day=D;
L._month=A;
L._year=F;
L.innerHTML=D++;
L._dayType=DwtCalendar._NEXT_MONTH
}}this._setClassName(L,DwtCalendar._NORMAL)
}}this._setTitle(K,M);
if(!this._readOnly){this._setSelectedDate();
this._setToday()
}this._setRange()
};
DwtCalendar.prototype._setRange=function(){var A=document.getElementById(this._getDayCellId(0));
var D=new Date(A._year,A._month,A._day,0,0,0,0);
A=document.getElementById(this._getDayCellId(DwtCalendar._LAST_DAY_CELL_IDX));
var C=this._getDaysInMonth(A._month,A._year);
var B;
if(A._day<C){B=new Date(A._year,A._month,A._day+1,0,0,0,0)
}else{if(A._month<11){B=new Date(A._year,A._month+1,1,0,0,0,0)
}else{B=new Date(A._year+1,0,1,0,0,0,0)
}}if(this._range==null){this._range=new Object()
}else{if(this._range.start.getTime()==D.getTime()&&this._range.end.getTime()==B.getTime()){return false
}}this._range.start=D;
this._range.end=B;
if(!this.isListenerRegistered(DwtEvent.DATE_RANGE)){return 
}if(!this._dateRangeEvent){this._dateRangeEvent=new DwtDateRangeEvent(true)
}this._dateRangeEvent.item=this;
this._dateRangeEvent.start=D;
this._dateRangeEvent.end=B;
this.notifyListeners(DwtEvent.DATE_RANGE,this._dateRangeEvent)
};
DwtCalendar.prototype._setToday=function(){var A;
var B=new Date();
var C=B.getDate();
if(!this._todayDay||this._todayDay!=C){if(this._todayCellId!=null){A=document.getElementById(this._todayCellId);
A._isToday=false;
this._setClassName(A,DwtCalendar._NORMAL)
}this._todayCellId=this._date2CellId[(B.getFullYear()*10000)+(B.getMonth()*100)+C];
if(this._todayCellId!=null){A=document.getElementById(this._todayCellId);
A._isToday=true;
this._setClassName(A,DwtCalendar._NORMAL)
}}};
DwtCalendar.prototype._setSelectedDate=function(){var B=this._date.getDate();
var E=this._date.getMonth();
var C=this._date.getFullYear();
var A;
if(this._selectedDayElId){A=document.getElementById(this._selectedDayElId);
this._setClassName(A,DwtCalendar._DESELECTED)
}var D=this._date2CellId[(C*10000)+(E*100)+B];
A=document.getElementById(D);
this._selectedDayElId=D;
this._setClassName(A,DwtCalendar._SELECTED)
};
DwtCalendar.prototype._setCellClassName=function(B,C,D){if(B._dayType!=DwtCalendar._THIS_MONTH){C+=this._greyClassName
}if(this._selectionMode==DwtCalendar.DAY&&B.id==this._selectedDayElId&&D!=DwtCalendar._DESELECTED){C+=this._selectedDayClassName
}else{if(this._selectionMode!=DwtCalendar.DAY&&D!=DwtCalendar._DESELECTED&&this._selectedDayElId!=null){var A=this._getDayCellIndex(B.id);
if(Math.floor(this._getDayCellIndex(this._selectedDayElId)/7)==Math.floor(A/7)&&this._currWorkingDays[A%7]){C+=this._selectedDayClassName
}}}if(B._isHilited){C+=this._hiliteClassName
}if(B._isToday){C+=this._todayClassName
}return C
};
DwtCalendar.prototype._setClassName=function(A,F){var C="";
if(F==DwtCalendar._NORMAL){C=this._origDayClassName
}else{if(F==DwtCalendar._HOVERED){C=this._hoveredDayClassName
}else{if(F==DwtCalendar._ACTIVE){C=this._activeDayClassName
}else{if(F==DwtCalendar._DESELECTED&&this._selectionMode==DwtCalendar.DAY){C=this._origDayClassName
}else{if(this._selectionMode!=DwtCalendar.DAY&&(F==DwtCalendar._SELECTED||F==DwtCalendar._DESELECTED)){var E=Math.floor(this._getDayCellIndex(this._selectedDayElId)/7)*7;
for(var B=0;
B<7;
B++){C=this._origDayClassName;
var D=document.getElementById(this._getDayCellId(E++));
D.className=this._setCellClassName(D,C,F)
}return 
}}}}}A.className=this._setCellClassName(A,C,F)
};
DwtCalendar.prototype._setTitle=function(E,D){var A=document.getElementById(this._monthCell);
var C=DwtCalendar.getMonthFormatter();
var B=new Date(D,E);
A.innerHTML=C.format(B)
};
DwtCalendar.prototype._init=function(){var D=new Array(100);
var A=0;
this._monthCell="t:"+this._uuid;
D[A++]="<table width=100% cellspacing='0' cellpadding='0' style='border-collapse:collapse;'>";
D[A++]="<tr><td class=DwtCalendarTitlebar>";
D[A++]="<table width='100%' cellspacing='0' cellpadding='0'>";
D[A++]="<tr>";
D[A++]="<td class='";
D[A++]=DwtCalendar._BUTTON_CLASS;
D[A++]="' id='b:py:";
D[A++]=this._uuid;
D[A++]="'>";
D[A++]=AjxImg.getImageHtml("FastRevArrowSmall",null,["id='b:py:img:",this._uuid,"'"].join(""));
D[A++]="</td>";
D[A++]="<td class='";
D[A++]=DwtCalendar._BUTTON_CLASS;
D[A++]="' id='b:pm:";
D[A++]=this._uuid;
D[A++]="'>";
D[A++]=AjxImg.getImageHtml("RevArrowSmall",null,["id='b:pm:img:",this._uuid,"'"].join(""));
D[A++]="</td>";
D[A++]="<td align='center' class='DwtCalendarTitleCell' nowrap'><span class='";
D[A++]=DwtCalendar._TITLE_CLASS;
D[A++]="' id='";
D[A++]=this._monthCell;
D[A++]="'>&nbsp;</span></td>";
D[A++]="<td class='";
D[A++]=DwtCalendar._BUTTON_CLASS;
D[A++]="' id='b:nm:";
D[A++]=this._uuid;
D[A++]="'>";
D[A++]=AjxImg.getImageHtml("FwdArrowSmall",null,["id='b:nm:img:",this._uuid,"'"].join(""));
D[A++]="</td>";
D[A++]="<td class='";
D[A++]=DwtCalendar._BUTTON_CLASS;
D[A++]="' id='b:ny:";
D[A++]=this._uuid;
D[A++]="'>";
D[A++]=AjxImg.getImageHtml("FastFwdArrowSmall",null,["id='b:ny:img:",this._uuid,"'"].join(""));
D[A++]="</td>";
D[A++]="</tr>";
D[A++]="</table>";
D[A++]="</td></tr>";
D[A++]="<tr><td>";
D[A++]="<table cellspacing='0' cellpadding='1' width='100%'>";
D[A++]="<tr>";
for(var C=0;
C<7;
C++){D[A++]="<td class='DwtCalendarDow' width='";
D[A++]=(C<5?"14%":"15%");
D[A++]="' id='";
D[A++]=this._getDOWCellId(C);
D[A++]="'>&nbsp;</td>"
}D[A++]="</tr>";
for(var C=0;
C<6;
C++){D[A++]=(AjxEnv.isLinux||AjxEnv.isMac)?"<tr style='line-height:12px'>":"<tr>";
for(var B=0;
B<7;
B++){D[A++]="<td id='";
D[A++]=this._getDayCellId(C*7+B);
D[A++]="'>&nbsp;</td>"
}D[A++]="</tr>"
}D[A++]="</td></tr></table></table>";
this.getHtmlElement().innerHTML=D.join("");
if(!this._readOnly){document.getElementById("b:py:img:"+this._uuid)._origClassName=AjxImg.getClassForImage("FastRevArrowSmall");
document.getElementById("b:pm:img:"+this._uuid)._origClassName=AjxImg.getClassForImage("RevArrowSmall");
document.getElementById("b:nm:img:"+this._uuid)._origClassName=AjxImg.getClassForImage("FwdArrowSmall");
document.getElementById("b:ny:img:"+this._uuid)._origClassName=AjxImg.getClassForImage("FastFwdArrowSmall")
}this._calWidgetInited=true
};
DwtCalendar.prototype.setMouseOverDayCallback=function(A){this._mouseOverDayCB=A
};
DwtCalendar.prototype.setMouseOutDayCallback=function(A){this._mouseOutDayCB=A
};
DwtCalendar.prototype.getDndDate=function(){var A=this._lastDndCell;
if(A){return new Date(A._year,A._month,A._day)
}else{return null
}};
DwtCalendar._tmpDate=new Date();
DwtCalendar._tmpDate.setHours(0,0,0,0);
DwtCalendar.prototype._mouseOverListener=function(B){var C=B.target;
if(C.id.charAt(0)=="c"){this._setClassName(C,DwtCalendar._HOVERED);
if(this._mouseOverDayCB){DwtCalendar._tmpDate.setFullYear(C._year,C._month,C._day);
this._mouseOverDayCB.run(this,DwtCalendar._tmpDate)
}}else{if(C.id.charAt(0)=="t"){return ;
C.className=DwtCssStyle.HOVER
}else{if(C.id.charAt(0)=="b"){var A;
if(C.firstChild==null){A=C;
AjxImg.getParentElement(C).className=DwtCalendar._BUTTON_HOVERED_CLASS
}else{C.className=DwtCalendar._BUTTON_HOVERED_CLASS;
A=AjxImg.getImageElement(C)
}A.className=A._origClassName
}else{if(C.id.charAt(0)=="w"){}}}}B._stopPropagation=true
};
DwtCalendar.prototype._mouseOutListener=function(B){this.setToolTipContent(null);
var C=B.target;
if(C.id.charAt(0)=="c"){this._setClassName(C,DwtCalendar._NORMAL);
if(this._mouseOutDayCB){this._mouseOutDayCB.run(this)
}}else{if(C.id.charAt(0)=="t"){return ;
C.className=DwtCalendar._TITLE_CLASS
}else{if(C.id.charAt(0)=="b"){var A;
C.className=DwtCalendar._BUTTON_CLASS;
if(C.firstChild==null){A=C;
AjxImg.getParentElement(C).className=DwtCalendar._BUTTON_CLASS
}else{C.className=DwtCalendar._BUTTON_CLASS;
A=AjxImg.getImageElement(C)
}A.className=A._origClassName
}else{if(C.id.charAt(0)=="w"){}}}}};
DwtCalendar.prototype._mouseDownListener=function(B){if(B.button==DwtMouseEvent.LEFT){var C=B.target;
if(C.id.charAt(0)=="c"){this._setClassName(C,DwtCalendar._ACTIVE)
}else{if(C.id.charAt(0)=="t"){C.className=DwtCalendar._TITLE_ACTIVE_CLASS
}else{if(C.id.charAt(0)=="b"){var A;
if(C.firstChild==null){A=C;
AjxImg.getParentElement(C).className=DwtCalendar._BUTTON_ACTIVE_CLASS
}else{C.className=DwtCalendar._BUTTON_ACTIVE_CLASS;
A=AjxImg.getImageElement(C)
}A.className=A._origClassName
}else{if(C.id.charAt(0)=="w"){}}}}}};
DwtCalendar.prototype._mouseUpListener=function(B){var C=B.target;
if(B.button==DwtMouseEvent.LEFT){if(C.id.charAt(0)=="c"){if(this.parent instanceof DwtMenu){DwtMenu.closeActiveMenu()
}if(this.setDate(new Date(C._year,C._month,C._day))){return 
}this._setClassName(C,DwtCalendar._HOVERED)
}else{if(C.id.charAt(0)=="b"){var A;
if(C.firstChild==null){A=C;
AjxImg.getParentElement(C).className=DwtCalendar._BUTTON_HOVERED_CLASS
}else{C.className=DwtCalendar._BUTTON_HOVERED_CLASS;
A=AjxImg.getImageElement(C)
}A.className=A._origClassName;
if(A.id.indexOf("py")!=-1){this._prevYear()
}else{if(A.id.indexOf("pm")!=-1){this._prevMonth()
}else{if(A.id.indexOf("nm")!=-1){this._nextMonth()
}else{this._nextYear()
}}}}else{if(C.id.charAt(0)=="t"){C.className=DwtCalendar._TITLE_HOVERED_CLASS;
this.setDate(new Date(),this._skipNotifyOnPage);
if(this.parent instanceof DwtMenu){DwtMenu.closeActiveMenu()
}}}}}else{if(B.button==DwtMouseEvent.RIGHT&&C.id.charAt(0)=="c"){this._notifyListeners(DwtEvent.ACTION,0,new Date(C._year,C._month,C._day),B)
}}};
DwtCalendar.prototype._doubleClickListener=function(A){var B=A.target;
if(this._selectionEvent){this._selectionEvent.type=DwtCalendar.DATE_DBL_CLICKED
}if(B.id.charAt(0)=="c"){if(this.parent instanceof DwtMenu){DwtMenu.closeActiveMenu()
}this.setDate(new Date(B._year,B._month,B._day),false,false,true)
}};
DwtCalendar.prototype._prevMonth=function(A){var B=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(B,AjxDateUtil.MONTH,-1),this._skipNotifyOnPage)
};
DwtCalendar.prototype._nextMonth=function(A){var B=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(B,AjxDateUtil.MONTH,1),this._skipNotifyOnPage)
};
DwtCalendar.prototype._prevYear=function(A){var B=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(B,AjxDateUtil.YEAR,-1),this._skipNotifyOnPage)
};
DwtCalendar.prototype._nextYear=function(A){var B=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(B,AjxDateUtil.YEAR,1),this._skipNotifyOnPage)
};
DwtCalendar.getDateFormatter=function(){if(!DwtCalendar._dateFormatter){DwtCalendar._dateFormatter=new AjxDateFormat(AjxMsg.formatCalDate)
}return DwtCalendar._dateFormatter
};
DwtCalendar.getDateLongFormatter=function(){if(!DwtCalendar._dateLongFormatter){DwtCalendar._dateLongFormatter=new AjxDateFormat(AjxMsg.formatCalDateLong)
}return DwtCalendar._dateLongFormatter
};
DwtCalendar.getDateFullFormatter=function(){if(!DwtCalendar._dateFullFormatter){DwtCalendar._dateFullFormatter=new AjxDateFormat(AjxMsg.formatCalDateFull)
}return DwtCalendar._dateFullFormatter
};
DwtCalendar.getHourFormatter=function(){if(!DwtCalendar._hourFormatter){DwtCalendar._hourFormatter=new AjxMessageFormat(AjxMsg.formatCalHour)
}return DwtCalendar._hourFormatter
};
DwtCalendar.getDayFormatter=function(){if(!DwtCalendar._dayFormatter){DwtCalendar._dayFormatter=new AjxDateFormat(AjxMsg.formatCalDay)
}return DwtCalendar._dayFormatter
};
DwtCalendar.getMonthFormatter=function(){if(!DwtCalendar._monthFormatter){DwtCalendar._monthFormatter=new AjxDateFormat(AjxMsg.formatCalMonth)
}return DwtCalendar._monthFormatter
};
DwtCalendar.getShortMonthFormatter=function(){if(!DwtCalendar._shortMonthFormatter){DwtCalendar._shortMonthFormatter=new AjxDateFormat(AjxMsg.formatShortCalMonth)
}return DwtCalendar._shortMonthFormatter
};
DwtCalendar.prototype._dragEnter=function(A){};
DwtCalendar.prototype._dragHover=function(A){};
DwtCalendar.prototype._dragOver=function(A){var B=A.target;
if(B.id.charAt(0)=="c"){this._setClassName(B,DwtCalendar._HOVERED);
this._lastDndCell=B
}else{this._lastDndCell=null
}};
DwtCalendar.prototype._dragLeave=function(A){}
}if(AjxPackage.define("ajax.dwt.widgets.DwtPropertyPage")){DwtPropertyPage=function(C,B,A){if(arguments.length==0){return 
}var D=B||"DwtPropertyPage";
DwtComposite.call(this,{parent:C,className:B,posStyle:A});
this._fieldIds=new Object();
this._fildDivIds=new Object();
this._isDirty=false
};
DwtPropertyPage.prototype=new DwtComposite;
DwtPropertyPage.prototype.constructor=DwtPropertyPage;
DwtPropertyPage.prototype.toString=function(){return"DwtPropertyPage"
};
DwtPropertyPage.prototype.setDirty=function(A){this._isDirty=A
};
DwtPropertyPage.prototype.isDirty=function(){return this._isDirty
};
DwtPropertyPage.prototype._installOnKeyUpHandler=function(C,A){if(!C){return 
}var B=null;
B=document.getElementById(this._fieldIds[C]);
if(B){Dwt.setHandler(B,DwtEvent.ONKEYUP,A?A:this._onKeyUp);
B._view=this;
B._field=C
}};
DwtPropertyPage.prototype._installOnClickHandler=function(C,A){if(!C){return 
}var B=document.getElementById(this._fieldIds[C]);
if(B){Dwt.setHandler(B,DwtEvent.ONCLICK,A?A:this._onClick);
B._view=this;
B._field=C
}};
DwtPropertyPage.prototype._onClick=function(A){this._view.setDirty(true);
return true
};
DwtPropertyPage.prototype._onKeyUp=function(A){this._view.setDirty(true);
return true
};
DwtPropertyPage.prototype._installOnChangeHandler=function(C,A){if(!C){return 
}var B=null;
B=document.getElementById(this._fieldIds[C]);
if(B){Dwt.setHandler(B,DwtEvent.ONCHANGE,A?A:this._onChange);
B._view=this;
B._field=C
}};
DwtPropertyPage._onChange=function(A){this._view.setDirty(true);
return true
};
DwtPropertyPage.prototype._onChange2=function(A){this.setDirty(true);
return true
};
DwtPropertyPage.prototype._addDwtSelectEntryRow=function(E,F,C,A,D){var B="30ex";
if(D){B=D
}C[A++]="<tr valign='center'>";
A=this._addDwtSelectEntryCell(E,F,C,A,B);
C[A++]="</tr>";
return A
};
DwtPropertyPage.prototype._addDwtSelectEntryCell=function(C,D,B,A,F){var E=Dwt.getNextId();
this._fieldIds[C]=E;
if(D){B[A++]="<td align='left' style='width:"+F+"'>";
B[A++]=AjxStringUtil.htmlEncode(D)+":";
B[A++]="</td>"
}B[A++]="<td align='left'>";
B[A++]="<div id='"+E+"'></div></td>";
return A
};
DwtPropertyPage.prototype._addBoolEntryRow=function(C,D,B,A,E){B[A++]="<tr valign='center'>";
A=this._addBoolEntryCell(C,D,B,A,E);
B[A++]="</tr>";
return A
};
DwtPropertyPage.prototype._addBoolEntryCell=function(D,E,B,A,G){var F=Dwt.getNextId();
this._fieldIds[D]=F;
var C="20ex";
if(G){C=G
}if(E){B[A++]="<td style='width:"+C+";' align='left'>";
B[A++]=AjxStringUtil.htmlEncode(E)+":";
B[A++]="</td>"
}B[A++]="<td align='left'>";
B[A++]="<input type='checkbox' id='"+F+"'>";
B[A++]="</td>";
return A
};
DwtPropertyPage.prototype._addTextAreaEntryRow=function(D,E,B,A,G){var C="on";
if(G){C="off"
}var F=Dwt.getNextId();
this._fieldIds[D]=F;
B[A++]="<tr valign='center'>";
B[A++]="<td align='left' style='width:60ex;'>";
B[A++]=AjxStringUtil.htmlEncode(E)+":";
B[A++]="</td></tr>";
B[A++]="<tr valign='center'><td align='left' style='width:60ex;'><textarea wrap='"+C+"' rows='8' cols ='60' id='";
B[A++]=F;
B[A++]="'/></textarea></td></tr>";
return A
};
DwtPropertyPage.prototype._addEntryRow=function(G,F,B,I,D,E,A,H,C){B[I++]="<tr valign='center'>";
I=this._addEntryCell(G,F,B,I,D,E,A,H,C);
B[I++]="</tr>";
return I
};
DwtPropertyPage.prototype._addEntryCell=function(I,H,D,K,F,G,B,J,E){if(F==null){F="text"
}if(G==null){G=35
}var C="20ex";
if(J){C=J
}var A=Dwt.getNextId();
this._fieldIds[I]=A;
if(H){D[K++]="<td align='left' style='width:"+C+";'>";
D[K++]=AjxStringUtil.htmlEncode(H)+":";
D[K++]="</td>"
}D[K++]="<td ";
if(E){D[K++]="class='redAsteric' "
}D[K++]="	align='left'><input autocomplete='off' size='"+G+"' type='"+F+"' id='";
D[K++]=A;
D[K++]="'";
if(E){D[K++]="/>*"
}else{D[K++]="/>&nbsp;"
}if(B!=null){D[K++]=B
}D[K++]="</td>";
return K
};
DwtPropertyPage.prototype._createHTML=function(){}
}if(AjxPackage.define("ajax.dwt.widgets.DwtTabView")){DwtTabView=function(B){if(arguments.length==0){return 
}B=Dwt.getParams(arguments,DwtListView.PARAMS);
B.className=B.className||"ZTabView";
B.posStyle=B.posStyle||DwtControl.ABSOLUTE_STYLE;
DwtComposite.call(this,B);
this._stateChangeEv=new DwtEvent(true);
this._tabs=[];
this._tabIx=1;
this._createHtml();
var A=[this.toString(),this._htmlElId].join("-");
this._tabGroup=new DwtTabGroup(A);
this._tabGroup.addMember(this._tabBar)
};
DwtTabView.PARAMS=["parent","className","posStyle"];
DwtTabView.prototype=new DwtComposite;
DwtTabView.prototype.constructor=DwtTabView;
DwtTabView.Z_ACTIVE_TAB=Dwt.Z_VIEW+10;
DwtTabView.Z_HIDDEN_TAB=Dwt.Z_HIDDEN;
DwtTabView.Z_TAB_PANEL=Dwt.Z_VIEW+20;
DwtTabView.Z_CURTAIN=Dwt.Z_CURTAIN;
DwtTabView.prototype.TEMPLATE="dwt.Widgets#ZTabView";
DwtTabView.prototype.toString=function(){return"DwtTabView"
};
DwtTabView.prototype.addStateChangeListener=function(A){this._eventMgr.addListener(DwtEvent.STATE_CHANGE,A)
};
DwtTabView.prototype.removeStateChangeListener=function(A){this._eventMgr.removeListener(DwtEvent.STATE_CHANGE,A)
};
DwtTabView.prototype.getTabGroupMember=function(){return this._tabGroup
};
DwtTabView.prototype.addTab=function(D,C,A){var B=this._tabIx++;
this._tabs[B]={title:D,button:this._tabBar.addButton(B,D,A)};
this.setTabView(B,C);
if(B==1){if(C instanceof AjxCallback){C=C.run(B)
}if(C){C.showMe()
}this._currentTabKey=B;
this.switchToTab(B)
}else{if(C&&!(C instanceof AjxCallback)){C.hideMe();
Dwt.setVisible(C.getHtmlElement(),false)
}}this._tabBar.addSelectionListener(B,new AjxListener(this,DwtTabView.prototype._tabButtonListener));
return B
};
DwtTabView.prototype.enable=function(A){for(var C in this._tabs){var B=this._tabs[C].button;
if(B){B.setEnabled(A)
}}};
DwtTabView.prototype.getCurrentTab=function(){return this._currentTabKey
};
DwtTabView.prototype.getNumTabs=function(){return(this._tabs.length-1)
};
DwtTabView.prototype.getTab=function(A){return(this._tabs&&this._tabs[A])?this._tabs[A]:null
};
DwtTabView.prototype.getTabTitle=function(A){return(this._tabs&&this._tabs[A])?this._tabs[A]["title"]:null
};
DwtTabView.prototype.getTabButton=function(A){return(this._tabs&&this._tabs[A])?this._tabs[A]["button"]:null
};
DwtTabView.prototype.setTabView=function(D,C){var B=this.getTab(D);
B.view=C;
if(C&&!(C instanceof AjxCallback)){this._pageEl.appendChild(C.getHtmlElement());
C._tabKey=D;
if(D==this._currentTabKey){var A=C.getTabGroupMember();
this._tabGroup.replaceMember(B.tabGroup,A);
B.tabGroup=A
}}};
DwtTabView.prototype.getTabView=function(D){var C=this.getTab(D);
var B=C&&C.view;
if(B instanceof AjxCallback){var E=B;
B=E.run(D);
this.setTabView(D,B);
var A=this._getTabSize();
B.setSize(A.x,A.y)
}return B
};
DwtTabView.prototype.switchToTab=function(C){var B=this.getTab(C);
if(B){var A=this.getTab(this._currentTabKey);
if(A){this._tabGroup.removeMember(A.tabGroup)
}this._showTab(C);
this._tabBar.openTab(C);
if(!B.tabGroup&&B.view){B.tabGroup=B.view.getTabGroupMember()
}this._tabGroup.addMember(B.tabGroup);
if(this._eventMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){this._eventMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv)
}}};
DwtTabView.prototype.setBounds=function(B,D,C,A){DwtComposite.prototype.setBounds.call(this,B,D,C,A);
this._resetTabSizes(C,A)
};
DwtTabView.prototype.getActiveView=function(){return this._tabs[this._currentTabKey].view
};
DwtTabView.prototype.getKeyMapName=function(){return"DwtTabView"
};
DwtTabView.prototype.resetKeyBindings=function(){var B=this.shell.getKeyboardMgr();
if(B.isEnabled()){var E=B.__keyMapMgr;
if(!E){return 
}var D=this.getNumTabs();
var G=E.getKeySequences("DwtTabView","GoToTab");
for(var A=0;
A<G.length;
A++){var H=G[A];
for(var C=1;
C<=D;
C++){var F=48+C;
var I=H.replace(/NNN/,F);
E.setMapping("DwtTabView",I,"GoToTab"+C)
}}E.reloadMap("DwtTabView")
}};
DwtTabView.prototype.handleKeyAction=function(D){switch(D){case DwtKeyMap.NEXT_TAB:var C=this.getCurrentTab();
if(C<this.getNumTabs()){this.switchToTab(C+1)
}break;
case DwtKeyMap.PREV_TAB:var C=this.getCurrentTab();
if(C>1){this.switchToTab(C-1)
}break;
default:var B=D.match(DwtKeyMap.GOTO_TAB_RE);
if(B&&B.length){var A=B[1];
if((A<=this.getNumTabs())&&(A!=this.getCurrentTab())){this.switchToTab(A)
}}else{return false
}}return true
};
DwtTabView.prototype._resetTabSizes=function(C,A){if(this._tabs&&this._tabs.length){for(var D in this._tabs){var B=this._tabs[D].view;
if(B&&!(B instanceof AjxCallback)){B.resetSize(C,A)
}}}};
DwtTabView.prototype._getTabSize=function(){var B=this.getSize();
var C=B.x||this.getHtmlElement().clientWidth;
var A=B.y||this.getHtmlElement().clientHeight;
var D=this._tabBar.getSize();
var E=D.y||this._tabBar.getHtmlElement().clientHeight;
return new DwtPoint(C,(A-E))
};
DwtTabView.prototype._createHtml=function(A){this._createHtmlFromTemplate(A||this.TEMPLATE,{id:this._htmlElId})
};
DwtTabView.prototype._createHtmlFromTemplate=function(A,B){DwtComposite.prototype._createHtmlFromTemplate.call(this,A,B);
this._tabBarEl=document.getElementById(B.id+"_tabbar");
this._tabBar=new DwtTabBar(this);
this._tabBar.reparentHtmlElement(this._tabBarEl);
this._pageEl=document.getElementById(B.id+"_page")
};
DwtTabView.prototype._showTab=function(B){if(this._tabs&&this._tabs[B]){this._currentTabKey=B;
this._hideAllTabs();
var A=this.getTabView(B);
if(A){this.applyCaretHack();
A.setVisible(true);
A.showMe()
}}};
DwtTabView.prototype._hideAllTabs=function(){if(this._tabs&&this._tabs.length){for(var B in this._tabs){var A=this._tabs[B].view;
if(A&&!(A instanceof AjxCallback)){A.hideMe();
Dwt.setVisible(A.getHtmlElement(),false)
}}}};
DwtTabView.prototype._tabButtonListener=function(A){this.switchToTab(A.item.getData("tabKey"))
};
DwtTabViewPage=function(C,B,A){if(arguments.length==0){return 
}var D=B||"ZTabPage";
var E=A||DwtControl.ABSOLUTE_STYLE;
this._rendered=true;
DwtPropertyPage.call(this,C,D,E);
this._createHtml()
};
DwtTabViewPage.prototype=new DwtPropertyPage;
DwtTabViewPage.prototype.constructor=DwtTabViewPage;
DwtTabViewPage.prototype.TEMPLATE="dwt.Widgets#ZTabPage";
DwtTabViewPage.prototype.toString=function(){return"DwtTabViewPage"
};
DwtTabViewPage.prototype.getContentHtmlElement=function(){return this._contentEl||this.getHtmlElement()
};
DwtTabViewPage.prototype.showMe=function(){this.setZIndex(DwtTabView.Z_ACTIVE_TAB);
if(this.parent.getHtmlElement().offsetHeight>80){this._contentEl.style.height=this.parent.getHtmlElement().offsetHeight-80
}else{var B=parseInt(this.parent.getHtmlElement().style.height);
var A=AjxStringUtil.getUnitsFromSizeString(this.parent.getHtmlElement().style.height);
if(B>80){this._contentEl.style.height=(Number(B-80).toString()+A)
}}if(this.parent.getHtmlElement().offsetWidth>0){this._contentEl.style.width=this.parent.getHtmlElement().offsetWidth
}else{this._contentEl.style.width=this.parent.getHtmlElement().style.width
}};
DwtTabViewPage.prototype.hideMe=function(){this.setZIndex(DwtTabView.Z_HIDDEN_TAB)
};
DwtTabViewPage.prototype.resetSize=function(B,A){if(this._rendered){this.setSize(B,A)
}};
DwtTabViewPage.prototype._createHtml=function(A){this._createHtmlFromTemplate(A||this.TEMPLATE,{id:this._htmlElId})
};
DwtTabViewPage.prototype._createHtmlFromTemplate=function(A,B){DwtPropertyPage.prototype._createHtmlFromTemplate.call(this,A,B);
this._contentEl=document.getElementById(B.id+"_content")||this.getHtmlElement()
};
DwtTabBar=function(C,B,D){if(arguments.length==0){return 
}this._buttons=[];
this._btnStyle=D||"ZTab";
this._btnImage=null;
this._currentTabKey=1;
var A=B||"ZTabBar";
DwtToolBar.call(this,{parent:C,className:A,posStyle:DwtControl.STATIC_STYLE})
};
DwtTabBar.prototype=new DwtToolBar;
DwtTabBar.prototype.constructor=DwtTabBar;
DwtTabBar.prototype.TEMPLATE="dwt.Widgets#ZTabBar";
DwtTabBar.prototype.toString=function(){return"DwtTabBar"
};
DwtTabBar.prototype.getCurrentTab=function(){return this._currentTabKey
};
DwtTabBar.prototype.addStateChangeListener=function(A){this._eventMgr.addListener(DwtEvent.STATE_CHANGE,A)
};
DwtTabBar.prototype.removeStateChangeListener=function(A){this._eventMgr.removeListener(DwtEvent.STATE_CHANGE,A)
};
DwtTabBar.prototype.addSelectionListener=function(B,A){this._buttons[B].addSelectionListener(A)
};
DwtTabBar.prototype.removeSelectionListener=function(B,A){this._buttons[B].removeSelectionListener(A)
};
DwtTabBar.prototype.addButton=function(E,D,F){var B=this._buttons[E]=new DwtTabButton(this,F);
this._buttons[E].addSelectionListener(new AjxListener(this,DwtTabBar._setActiveTab));
if(this._btnImage!=null){B.setImage(this._btnImage)
}if(D!=null){B.setText(D)
}B.setEnabled(true);
B.setData("tabKey",E);
if(parseInt(E)==1){this.openTab(E,true)
}var A=this.__getButtonIndex(this._currentTabKey);
if(A!=-1){var C=this.__getButtonIndex(E);
if(C==A+1){Dwt.addClass(B.getHtmlElement(),DwtTabBar.SELECTED_NEXT)
}}return B
};
DwtTabBar.prototype.getButton=function(A){return(this._buttons[A])?this._buttons[A]:null
};
DwtTabBar.prototype.openTab=function(A,E){this._currentTabKey=A;
var D=this._buttons.length;
for(var B=0;
B<D;
B++){if(B==A){continue
}var C=this._buttons[B];
if(C){this.__markPrevNext(B,false);
C.setClosed()
}}var C=this._buttons[A];
if(C){C.setOpen();
this.__markPrevNext(A,true)
}if(!E&&this._eventMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){this._eventMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv)
}};
DwtTabBar._setActiveTab=function(C){var A;
if(C&&C.item){A=C.item.getData("tabKey")
}else{if(C&&C.target){var B=C.target;
while(B.tagName!="TABLE"&&B.offsetParent){B=B.offsetParent
}A=B.getAttribute("tabKey");
if(A==null){return false
}}else{return false
}}this.openTab(A)
};
DwtTabButton=function(A,B){DwtButton.call(this,{parent:A,className:"ZTab",id:B})
};
DwtTabButton.prototype=new DwtButton;
DwtTabButton.prototype.constructor=DwtTabButton;
DwtTabButton.prototype.TEMPLATE="dwt.Widgets#ZTab";
DwtTabButton.prototype.toString=function(){return"DwtTabButton"
};
DwtTabButton.prototype.setOpen=function(){this._isSelected=true;
this.setDisplayState(DwtControl.SELECTED)
};
DwtTabButton.prototype.setClosed=function(){this._isSelected=false;
this.setDisplayState(DwtControl.NORMAL)
};
DwtTabButton.prototype.setDisplayState=function(A){if(this._isSelected&&A!=DwtControl.SELECTED){A=[DwtControl.SELECTED,A].join(" ")
}DwtButton.prototype.setDisplayState.call(this,A)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtWizardDialog")){DwtWizardDialog=function(E,D,H,A,C){if(arguments.length==0){return 
}D=D||"DwtDialog";
var G=new DwtDialog_ButtonDescriptor(DwtWizardDialog.NEXT_BUTTON,AjxMsg._next,DwtDialog.ALIGN_RIGHT,new AjxCallback(this,this.goNext));
var B=new DwtDialog_ButtonDescriptor(DwtWizardDialog.PREV_BUTTON,AjxMsg._prev,DwtDialog.ALIGN_RIGHT,new AjxCallback(this,this.goPrev));
var F=new DwtDialog_ButtonDescriptor(DwtWizardDialog.FINISH_BUTTON,AjxMsg._finish,DwtDialog.ALIGN_RIGHT,new AjxCallback(this,this.finishWizard));
DwtDialog.call(this,{parent:E,className:D,standardButtons:[DwtDialog.CANCEL_BUTTON],extraButtons:[B,G,F]});
if(!A){this._contentW="80ex"
}else{this._contentW=A
}if(!C){this._contentH="100ex"
}else{this._contentH=C
}this._pages=new Array();
this._pageIx=1;
this._currentPage=1;
this._progressDiv=document.createElement("div");
this._progressDiv.style.position=DwtControl.STATIC_STYLE;
this._pageDiv=document.createElement("div");
this._pageDiv.className="DwtWizardDialogPageDiv";
this._pageDiv.style.width=this._contentW;
this._pageDiv.style.height=this._contentH;
this._progressBar=new DwtWizProgressBar(this);
this._createContentHtml();
this.setTitle(H)
};
DwtWizardDialog.prototype=new DwtDialog;
DwtWizardDialog.prototype.constructor=DwtWizardDialog;
DwtWizardDialog.Z_ACTIVE_PAGE=Dwt.Z_VIEW+10;
DwtWizardDialog.Z_HIDDEN_PAGE=Dwt.Z_HIDDEN;
DwtWizardDialog.Z_TAB_PANEL=Dwt.Z_VIEW+20;
DwtWizardDialog.Z_CURTAIN=Dwt.Z_CURTAIN;
DwtWizardDialog.NEXT_BUTTON=12;
DwtWizardDialog.PREV_BUTTON=11;
DwtWizardDialog.FINISH_BUTTON=13;
DwtWizardDialog.prototype.toString=function(){return"DwtWizardDialog"
};
DwtWizardDialog.prototype.popdown=function(){DwtDialog.prototype.popdown.call(this);
this._hideAllPages()
};
DwtWizardDialog.prototype.goPage=function(A){if(this._pages&&this._pages[A]){this._currentPage=A;
this._showPage(A);
this._progressBar.showStep(A);
this._pages[A].setActive()
}};
DwtWizardDialog.prototype.goNext=function(){var A=this._currentPage+1;
if(this._pages&&this._pages[this._currentPage]){this._pages[this._currentPage].switchToNextPage(A)
}};
DwtWizardDialog.prototype.goPrev=function(){var A=this._currentPage-1;
if(this._pages&&this._pages[this._currentPage]){this._pages[this._currentPage].switchToPrevPage(A)
}};
DwtWizardDialog.prototype.finishWizard=function(){this.popdown()
};
DwtWizardDialog.prototype.getPage=function(A){if(this._pages&&this._pages[A]){return this._pages[A]
}else{return null
}};
DwtWizardDialog.prototype.addPage=function(A,B){var C=this._pageIx++;
this._pages[C]=A;
this._progressBar.addStep(C,B);
this._pageDiv.appendChild(this._pages[C].getHtmlElement());
if(C==1){this._pages[C].setZIndex(DwtWizardDialog.Z_ACTIVE_PAGE)
}else{this._pages[C].setZIndex(DwtWizardDialog.Z_HIDDEN_PAGE);
Dwt.setVisible(this._pages[C].getHtmlElement(),false)
}return C
};
DwtWizardDialog.prototype._createContentHtml=function(){this._table=document.createElement("table");
this._table.border=0;
this._table.width=this._contentW;
this._table.cellPadding=this._table.cellSpacing=0;
this._table.backgroundColor=DwtCssStyle.getProperty(this.parent.getHtmlElement(),"background-color");
var D;
var E;
D=this._table.insertRow(0);
D.align="left";
D.vAlign="middle";
E=D.insertCell(D.cells.length);
E.align="left";
E.vAlign="middle";
E.noWrap=true;
E.width="100%";
E.className="DwtTabTable";
E.appendChild(this._progressBar.getHtmlElement());
var G;
var A;
G=this._table.insertRow(1);
G.align="center";
G.vAlign="middle";
A=G.insertCell(G.cells.length);
A.align="left";
A.vAlign="middle";
A.noWrap=true;
A.style.width=this._contentW;
var F=document.createElement("div");
F.className="horizSep";
F.style.width=this._contentW;
F.style.height="5px";
A.appendChild(F);
var B;
var C;
B=this._table.insertRow(2);
B.align="left";
B.vAlign="middle";
C=B.insertCell(B.cells.length);
C.align="left";
C.vAlign="middle";
C.noWrap=true;
C.width=this._contentW;
C.appendChild(this._pageDiv);
this._getContentDiv().appendChild(this._table)
};
DwtWizardDialog.prototype.addChild=function(A){this._children.add(A)
};
DwtWizardDialog.prototype._showPage=function(A){if(this._pages&&this._pages[A]){this._hideAllPages();
this._pages[A].showMe();
Dwt.setVisible(this._pages[A].getHtmlElement(),true)
}};
DwtWizardDialog.prototype._hideAllPages=function(){if(this._pages&&this._pages.length){for(var A in this._pages){if(this._pages[A]){this._pages[A].hideMe();
Dwt.setVisible(this._pages[A].getHtmlElement(),false)
}}}};
DwtWizardPage=function(B,A){if(arguments.length==0){return 
}var C=A||"DwtDialog";
DwtPropertyPage.call(this,B,A,DwtControl.ABSOLUTE_STYLE)
};
DwtWizardPage.prototype=new DwtTabViewPage;
DwtWizardPage.prototype.constructor=DwtWizardPage;
DwtWizardPage.prototype.toString=function(){return"DwtWizardPage"
};
DwtWizardPage.prototype.setActive=function(){};
DwtWizardPage.prototype.switchToNextPage=function(A){this.parent.goPage(A)
};
DwtWizardPage.prototype.switchToPrevPage=function(A){this.parent.goPage(A)
};
DwtWizardPage.prototype.showMe=function(){this.setZIndex(DwtTabView.Z_ACTIVE_TAB);
this.getHtmlElement().style.height=this.parent._contentH;
this.getHtmlElement().style.width=this.parent._contentW
};
DwtWizProgressBar=function(A){if(arguments.length==0){return 
}DwtComposite.call(this,{parent:A,className:"DwtWizProgressBar",posStyle:DwtControl.STATIC_STYLE});
this._table=document.createElement("table");
this._table.border=0;
this._table.cellPadding=0;
this._table.cellSpacing=0;
this.getHtmlElement().appendChild(this._table);
this._table.backgroundColor=DwtCssStyle.getProperty(this.parent.getHtmlElement(),"background-color");
this._stepsNumber=0;
this._steps=new Array();
this._lblHeader=new DwtStepLabel(this);
this._lblHeader.setText("Step 0 of 0");
this._lblHeader.setActive(true)
};
DwtWizProgressBar.prototype=new DwtComposite;
DwtWizProgressBar.prototype.constructor=DwtWizProgressBar;
DwtWizProgressBar.prototype.toString=function(){return"DwtWizProgressBar"
};
DwtWizProgressBar.prototype.showStep=function(B){var A="Step "+B+" of "+this._stepsNumber;
if(this._steps[B]){A=A+": "+this._steps[B]
}this._lblHeader.setText(A)
};
DwtWizProgressBar.prototype.addStep=function(B,A){this._steps[B]=A;
return(++this._stepsNumber)
};
DwtWizProgressBar.prototype.addChild=function(C){this._children.add(C);
var B;
var A;
this._table.width="100%";
B=(this._table.rows.length!=0)?this._table.rows[0]:this._table.insertRow(0);
B.align="center";
B.vAlign="middle";
A=B.insertCell(B.cells.length);
A.align="center";
A.vAlign="middle";
A.noWrap=true;
A.appendChild(C.getHtmlElement())
};
DwtStepLabel=function(A){DwtLabel.call(this,{parent:A,style:DwtLabel.ALIGN_CENTER,className:"DwtStepLabel"})
};
DwtStepLabel.prototype=new DwtLabel;
DwtStepLabel.prototype.constructor=DwtStepLabel;
DwtStepLabel.prototype.toString=function(){return"DwtStepLabel"
};
DwtStepLabel.prototype.setActive=function(A){if(A){this._textCell.className="DwtStepLabelActive"
}else{this._textCell.className="DwtStepLabelInactive"
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtSelect")){DwtSelect=function(D){if(arguments.length==0){return 
}D=Dwt.getParams(arguments,DwtSelect.PARAMS);
D.className=D.className||"ZSelect";
D.posStyle=D.posStyle||Dwt.STATIC_STYLE;
DwtButton.call(this,D);
var C=AjxEnv.isIE?[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP]:[DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEUP,DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT];
this._setEventHdlrs(C);
this._hasSetMouseEvents=true;
this._currentSelectionId=-1;
this._options=new AjxVector();
this._optionValuesToIndices={};
this._selectedValue=this._selectedOption=null;
var A=D.options;
if(A){for(var B=0;
B<A.length;
++B){this.addOption(A[B])
}}this.setDropDownImages("SelectPullDownArrow","SelectPullDownArrowDis","SelectPullDownArrow","SelectPullDownArrow");
this._menuCallback=new AjxListener(this,this._createMenu);
this.setMenu(this._menuCallback,true)
};
DwtSelect.PARAMS=["parent","options","style","className"];
DwtSelect.prototype=new DwtButton;
DwtSelect.prototype.constructor=DwtSelect;
DwtSelect.prototype.toString=function(){return"DwtSelect"
};
DwtSelect._CONTAINER_TEMPLATE="dwt.Widgets#ZSelectAutoSizingContainer";
DwtSelect._objectIds=[null];
DwtSelect.prototype.TEMPLATE="dwt.Widgets#ZSelect";
DwtSelect.getObjectFromElement=function(A){return A&&A.dwtObj?AjxCore.objectWithId(A.dwtObj):null
};
DwtSelect.prototype.addOption=function(D,C,F){var B=null;
var H=null;
if(typeof (D)=="string"){H=F!=null?F:D;
B=new DwtSelectOption(H,C,D,this,null,null)
}else{if(D instanceof DwtSelectOption){B=D;
if(F){B.setValue(F)
}C=B.isSelected()
}else{if(D instanceof DwtSelectOptionData||D.value!=null){H=F!=null?F:D.value;
B=new DwtSelectOption(H,D.isSelected,D.displayValue,this,null,D.image,D.selectedValue);
C=Boolean(D.isSelected)
}else{return -1
}}}this._options.add(B);
if(this._options.size()==1||C){this._setSelectedOption(B)
}var E=this._pseudoItemsEl;
var G=E.insertRow(-1);
var A=G.insertCell(-1);
A.className="ZSelectPseudoItem";
A.innerHTML=["<div class='ZWidgetTitle'>",AjxStringUtil.htmlEncode(B.getDisplayValue()),"</div>"].join("");
this.setMenu(this._menuCallback,true);
this._optionValuesToIndices[B.getValue()]=this._options.size()-1;
return(this._options.size()-1)
};
DwtSelect.prototype.popup=function(){var F=this.getMenu();
if(!F){return 
}var D=this._selectEl;
var B=Dwt.getBounds(D);
var E=(D.style.borderLeftWidth=="")?0:parseInt(D.style.borderLeftWidth);
var H=(D.style.borderTopWidth=="")?0:parseInt(D.style.borderTopWidth);
H+=(D.style.borderBottomWidth=="")?0:parseInt(D.style.borderBottomWidth);
var C=Dwt.toWindow(D,0,0);
var A=C.x+E;
var G=C.y+B.height+H;
F.popup(0,A,G)
};
DwtSelect.prototype.rename=function(B,C){var A=this.getOptionWithValue(B);
A._displayValue=C;
if(this.__selectedOption&&(this.__selectedOption._value==B)){this.setText(AjxStringUtil.htmlEncode(C))
}this.setMenu(this._menuCallback,true)
};
DwtSelect.prototype.clearOptions=function(){var B=this._options.getArray();
for(var A=0;
A<B.length;
++A){B[A]=null
}this._options.removeAll();
this._optionValuesToIndices=null;
this._optionValuesToIndices=new Array();
this._selectedValue=null;
this._selectedOption=null;
this._currentSelectionId=-1
};
DwtSelect.prototype.setName=function(A){this._name=A
};
DwtSelect.prototype.getName=function(){return this._name
};
DwtSelect.prototype.setSelectedValue=function(B){var A=this._optionValuesToIndices[B];
if(A!=null){this.setSelected(A)
}};
DwtSelect.prototype.setSelected=function(A){var B=this.getOptionWithHandle(A);
this.setSelectedOption(B)
};
DwtSelect.prototype.getOptionCount=function(){return this._options.size()
};
DwtSelect.prototype.getOptionWithHandle=function(A){return this._options.get(A)
};
DwtSelect.prototype.getOptionAtIndex=DwtSelect.prototype.getOptionWithHandle;
DwtSelect.prototype.getIndexForValue=function(A){return this._optionValuesToIndices[A]
};
DwtSelect.prototype.getOptionWithValue=function(C){var A=this._optionValuesToIndices[C];
var B=null;
if(A!=null){B=this.getOptionWithHandle(A)
}return B
};
DwtSelect.prototype.setSelectedOption=function(A){if(A){this._setSelectedOption(A)
}};
DwtSelect.prototype.getValue=function(){return this._selectedValue
};
DwtSelect.prototype.getSelectedOption=function(){return this._selectedOption
};
DwtSelect.prototype.getSelectedIndex=function(){return this.getIndexForValue(this.getValue())
};
DwtSelect.prototype.addChangeListener=function(A){this.addListener(DwtEvent.ONCHANGE,A)
};
DwtSelect.prototype.size=function(){return this._options.size()
};
DwtSelect.prototype.disable=function(){this.setEnabled(false)
};
DwtSelect.prototype.enable=function(){this.setEnabled(true)
};
DwtSelect.prototype.setImage=function(A){DwtLabel.prototype.setImage.call(this,A)
};
DwtSelect.prototype.setText=function(A){DwtLabel.prototype.setText.call(this,A)
};
DwtSelect.prototype.dispose=function(){this._selectEl=null;
this._pseudoItemsEl=null;
this._containerEl=null;
DwtButton.prototype.dispose.call(this);
if(this._internalObjectId){DwtSelect._unassignId(this._internalObjectId)
}};
DwtSelect._assignId=function(A){var B=DwtSelect._objectIds.length;
DwtSelect._objectIds[B]=A;
return B
};
DwtSelect._getObjectWithId=function(A){return DwtSelect._objectIds[A]
};
DwtSelect._unassignId=function(A){DwtSelect._objectIds[A]=null
};
DwtSelect.prototype._createHtmlFromTemplate=function(C,E){var B=DwtSelect._CONTAINER_TEMPLATE;
var A={id:E.id,selectTemplateId:C||this.TEMPLATE,selectData:E};
DwtButton.prototype._createHtmlFromTemplate.call(this,B,A);
this._selectEl=document.getElementById(E.id+"_select_container");
this._pseudoItemsEl=document.getElementById(E.id+"_pseudoitems_container");
this._pseudoItemsEl.style.display="none";
var D=this.getHtmlElement();
this._containerEl=D;
this._selectEl.className=D.className;
D.className="ZSelectAutoSizingContainer";
D.setAttribute("style","");
if(AjxEnv.isIE){D.style.overflow="hidden"
}};
DwtSelect.prototype._createMenu=function(){var G=new DwtSelectMenu(this);
for(var C=0,A=this._options.size();
C<A;
++C){var B=new DwtSelectMenuItem(G);
var D=this._options.get(C);
var E=D.getImage();
if(E){B.setImage(E)
}var F=D.getDisplayValue();
if(F){B.setText(AjxStringUtil.htmlEncode(F))
}B.addSelectionListener(new AjxListener(this,this._handleOptionSelection));
B._optionIndex=C;
D.setItem(B)
}return G
};
DwtSelect.prototype._handleOptionSelection=function(G){var D=G.item;
var F=D._optionIndex;
var C=this._options.get(F);
var B=this.getValue();
this._setSelectedOption(C);
var A=new Object();
A.selectObj=this;
A.newValue=C.getValue();
A.oldValue=B;
var E=DwtUiEvent.getEvent(G);
E._args=A;
this.notifyListeners(DwtEvent.ONCHANGE,E)
};
DwtSelect.prototype._clearOptionSelection=function(){if(this._currentSelectionId!=-1){var A=DwtSelect._getObjectWithId(this._currentSelectionId);
A.deSelect()
}};
DwtSelect.prototype._setSelectedOption=function(B){var A=B.getSelectedValue()||B.getDisplayValue();
var C=B.getImage();
if(this._selectedOption!=B){if(A){this.setText(AjxStringUtil.htmlEncode(A))
}if(C){this.setImage(C)
}this._selectedValue=B._value;
this._selectedOption=B
}this._updateSelection(B)
};
DwtSelect.prototype._updateSelection=function(A){var B=null;
if(this._currentSelectionId!=-1){B=DwtSelect._getObjectWithId(this._currentSelectionId)
}if(B){B.deSelect()
}if(A){A.select();
this._currentSelectionId=A.getIdentifier()
}};
DwtSelectOptionData=function(D,C,A,B,E){if(D==null||C==null){return null
}this.value=D;
this.displayValue=C;
this.isSelected=A;
this.selectedValue=B;
this.image=E
};
DwtSelectOption=function(F,E,D,B,A,G,C){this._value=F;
this._selected=E;
this._displayValue=D;
this._image=G;
this._selectedValue=C;
this._internalObjectId=DwtSelect._assignId(this)
};
DwtSelectOption.prototype.setItem=function(A){this._menuItem=A
};
DwtSelectOption.prototype.getItem=function(A){return this._menuItem
};
DwtSelectOption.prototype.getDisplayValue=function(){return this._displayValue
};
DwtSelectOption.prototype.getImage=function(){return this._image
};
DwtSelectOption.prototype.getSelectedValue=function(){return this._selectedValue
};
DwtSelectOption.prototype.getValue=function(){return this._value
};
DwtSelectOption.prototype.setValue=function(A){this._value=A
};
DwtSelectOption.prototype.select=function(){this._selected=true
};
DwtSelectOption.prototype.deSelect=function(){this._selected=false
};
DwtSelectOption.prototype.isSelected=function(){return this._selected
};
DwtSelectOption.prototype.getIdentifier=function(){return this._internalObjectId
};
DwtSelectMenu=function(A){DwtMenu.call(this,{parent:A,style:DwtMenu.DROPDOWN_STYLE,className:"DwtMenu"})
};
DwtSelectMenu.prototype=new DwtMenu;
DwtSelectMenu.prototype.constructor=DwtSelectMenu;
DwtSelectMenu.prototype.TEMPLATE="dwt.Widgets#ZSelectMenu";
DwtSelectMenuItem=function(A){DwtMenuItem.call(this,{parent:A,style:DwtMenuItem.SELECT_STYLE,className:"ZSelectMenuItem"})
};
DwtSelectMenuItem.prototype=new DwtMenuItem;
DwtSelectMenuItem.prototype.constructor=DwtSelectMenuItem;
DwtSelectMenuItem.prototype.TEMPLATE="dwt.Widgets#ZSelectMenuItem"
}if(AjxPackage.define("ajax.dwt.widgets.DwtAlert")){DwtAlert=function(C,B,A){if(arguments.length==0){return 
}B=B||"DwtAlert";
A=A||DwtControl.STATIC_STYLE;
DwtControl.call(this,{parent:C,className:B,posStyle:A});
this._alertStyle=DwtAlert.INFORMATION;
this._createHtml()
};
DwtAlert.prototype=new DwtControl;
DwtAlert.prototype.constructor=DwtAlert;
DwtAlert.INFORMATION=0;
DwtAlert.WARNING=1;
DwtAlert.CRITICAL=2;
DwtAlert._ICONS=[AjxImg.getClassForImage("Information_32"),AjxImg.getClassForImage("Warning_32"),AjxImg.getClassForImage("Critical_32")];
DwtAlert._CLASSES=["DwtAlertInfo","DwtAlertWarn","DwtAlertCrit"];
DwtAlert._RE_ICONS=new RegExp(DwtAlert._ICONS.join("|"));
DwtAlert._RE_CLASSES=new RegExp(DwtAlert._CLASSES.join("|"));
DwtAlert.prototype.TEMPLATE="dwt.Widgets#DwtAlert";
DwtAlert.prototype.setStyle=function(A){this._alertStyle=A||DwtAlert.INFORMATION;
if(this._iconDiv){Dwt.delClass(this._iconDiv,DwtAlert._RE_ICONS,DwtAlert._ICONS[this._alertStyle])
}Dwt.delClass(this.getHtmlElement(),DwtAlert._RE_CLASSES,DwtAlert._CLASSES[this._alertStyle])
};
DwtAlert.prototype.getStyle=function(){return this._alertStyle
};
DwtAlert.prototype.setIconVisible=function(A){if(this._iconDiv){Dwt.setVisible(this._iconDiv,A)
}};
DwtAlert.prototype.getIconVisible=function(){return this._iconDiv?Dwt.getVisible(this._iconDiv):false
};
DwtAlert.prototype.setTitle=function(A){this._alertTitle=A;
if(this._titleDiv){this._titleDiv.innerHTML=A||""
}};
DwtAlert.prototype.getTitle=function(){return this._alertTitle
};
DwtAlert.prototype.setContent=function(A){this._alertContent=A;
if(this._contentDiv){this._contentDiv.innerHTML=A||""
}};
DwtAlert.prototype.getContent=function(){return this._alertContent
};
DwtAlert.prototype.setDismissContent=function(A){if(this._dismissDiv){A.reparentHtmlElement(this._dismissDiv.id)
}};
DwtAlert.prototype.getTabGroupMember=function(){return null
};
DwtAlert.prototype._createHtml=function(A){var B={id:this._htmlElId};
this._createHtmlFromTemplate(A||this.TEMPLATE,B)
};
DwtAlert.prototype._createHtmlFromTemplate=function(A,B){DwtControl.prototype._createHtmlFromTemplate.apply(this,arguments);
this._iconDiv=document.getElementById(B.id+"_icon");
this._titleDiv=document.getElementById(B.id+"_title");
this._contentDiv=document.getElementById(B.id+"_content");
this._dismissDiv=document.getElementById(B.id+"_dismiss")
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtText")){DwtText=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtText.PARAMS);
A.className=A.className||"DwtText";
DwtControl.call(this,A)
};
DwtText.PARAMS=["parent","className","posStyle"];
DwtText.prototype=new DwtControl;
DwtText.prototype.constructor=DwtText;
DwtText.prototype.toString=function(){return"DwtText"
};
DwtText.prototype.getTabGroupMember=function(){return null
};
DwtText.prototype.setText=function(A){if(!this._textNode){this._textNode=document.createTextNode(A);
this.getHtmlElement().appendChild(this._textNode)
}else{this._textNode.data=A
}};
DwtText.prototype.getText=function(){return this._textNode.data
};
DwtText.prototype.getTextNode=function(){return this._textNode
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtIframe")){DwtIframe=function(D){D.posStyle=D.posStyle||DwtControl.STATIC_STYLE;
D.className=D.className||"DwtIframe";
DwtControl.call(this,D);
this._styles=D.styles;
this._noscroll=D.noscroll;
this._iframeID=D.id?DwtId.getIframeId(D.id):Dwt.getNextId();
this._onLoadHandler=D.onload;
this._processHtmlCallback=D.processHtmlCallback;
this._hidden=D.hidden;
this._createFrame(D.html);
if(D.useKbMgmt){var B=this.getIframe();
var A=Dwt.getIframeDoc(B);
var C=AjxEnv.isIE?A:B.contentWindow;
Dwt.setHandler(C,DwtEvent.ONKEYDOWN,DwtKeyboardMgr.__keyDownHdlr);
Dwt.setHandler(C,DwtEvent.ONKEYUP,DwtKeyboardMgr.__keyUpHdlr);
Dwt.setHandler(C,DwtEvent.ONKEYPRESS,DwtKeyboardMgr.__keyPressHdlr)
}};
DwtIframe.prototype=new DwtControl;
DwtIframe.prototype.constructor=DwtIframe;
DwtIframe.prototype.toString=function(){return"DwtIframe"
};
DwtIframe.prototype.getIframe=function(){return document.getElementById(this._iframeID)
};
DwtIframe.prototype.getDocument=function(){return this.getIframe().contentWindow.document
};
DwtIframe.prototype._rawEventHandler=function(G){var C=this.getIframe();
var D=C.contentWindow;
if(AjxEnv.isIE){G=D.event
}var A;
if(/mouse|context|click|select/i.test(G.type)){A=new DwtMouseEvent(true)
}else{A=new DwtUiEvent(true)
}A.setFromDhtmlEvent(G);
if(G.type=="mousedown"&&DwtMenu&&DwtMenu._outsideMouseDownListener){DwtMenu._outsideMouseDownListener(G)
}var E=A.type.toLowerCase();
if(!/^on/.test(E)){E="on"+E
}var F=this.getLocation();
if(!AjxEnv.isIE){var H=D.document;
var B=H.documentElement.scrollLeft||(H.body?H.body.scrollLeft:0);
var K=H.documentElement.scrollTop||(H.body?H.body.scrollTop:0);
F.x-=B;
F.y-=K
}A.docX+=F.x;
A.docY+=F.y;
A.elementX+=F.x;
A.elementY+=F.y;
var J=DwtMouseEventCapture.getCaptureObj();
if(AjxEnv.isIE||AjxEnv.isSafari||!J){DwtEventManager.notifyListeners(E,A);
this.parent.notifyListeners(E,A)
}else{var I=document.createEvent("MouseEvents");
I.initMouseEvent(G.type,true,true,document.defaultView,0,G.screenX,G.screenY,A.docX,A.docY,G.ctrlKey,G.altKey,G.shiftKey,G.metaKey,G.button,G.relatedTarget);
document.body.dispatchEvent(I)
}A.setToDhtmlEvent(G);
return A._returnValue
};
DwtIframe._forwardEvents=[DwtEvent.ONCHANGE,DwtEvent.ONCLICK,DwtEvent.ONDBLCLICK,DwtEvent.ONFOCUS,DwtEvent.ONKEYDOWN,DwtEvent.ONKEYPRESS,DwtEvent.ONKEYUP,DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE,DwtEvent.ONMOUSEMOVE,DwtEvent.ONMOUSEOUT,DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEUP,DwtEvent.ONSELECTSTART];
DwtIframe.prototype._createFrame=function(B){var A=this.getHTMLElId();
function C(F){var E=document.getElementById(A);
var D=DwtControl.findControl(E);
return D._rawEventHandler(F)
}(function(){var I,H=[],G=0,D;
var F=document.getElementById(A);
var E=DwtControl.findControl(F);
H[G++]="<iframe";
if(E._noscroll){H[G++]=" scrolling='no'"
}if(E._hidden){H[G++]=" style='visibility:hidden'"
}H[G++]=" frameborder='0' width='100%' id='";
H[G++]=E._iframeID;
H[G++]="' name='"+E._iframeID+"'";
if(E._onLoadHandler){H[G++]=" onload='"+E._onLoadHandler+"'"
}H[G++]=" src='javascript:\"\";' ></iframe>";
E.setContent(H.join(""));
B=B.replace(/(<style[^>]*>)[\s\t\u00A0]*((.|\n)*?)[\s\t\u00A0]*<\x2fstyle>/mgi,function(J,L,K){return L+K.replace(/@import.*?(;|[\s\t\u00A0]*$)/gi,"")+"</style>"
});
I=E.getIframe();
D=Dwt.getIframeDoc(I);
D.open();
if(E._styles){D.write(["<style type='text/css'>",E._styles,"</style>"].join(""))
}D.write(B);
D.close();
if(E._processHtmlCallback){E._processHtmlCallback.run(D)
}H=D.documentElement.style;
H.margin=H.padding="0";
if(D.body){D.body.style.margin="0"
}H=DwtIframe._forwardEvents;
if(!AjxEnv.isIE){D=I.contentWindow
}for(G=H.length;
--G>=0;
){D[H[G]]=C
}})()
};
DwtIframe.prototype._resetEventHandlers=function(){var A=this;
function B(C){return A._rawEventHandler(C)
}(function(){var F,E=[],D=0,C;
F=A.getIframe();
C=Dwt.getIframeDoc(F);
E=DwtIframe._forwardEvents;
if(!AjxEnv.isIE){C=F.contentWindow
}for(D=E.length;
--D>=0;
){C[E[D]]=B
}})()
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtPropertySheet")){DwtPropertySheet=function(E,D,C,A){if(arguments.length==0){return 
}D=D||"DwtPropertySheet";
DwtComposite.call(this,{parent:E,className:D,posStyle:C});
this._labelSide=A||DwtPropertySheet.DEFAULT;
this._propertyIdCount=0;
this._propertyList=[];
this._propertyMap={};
this._tableEl=document.createElement("TABLE");
this._tableEl.border=0;
this._tableEl.cellSpacing=3;
this._tableEl.cellPadding=0;
var B=this.getHtmlElement();
B.appendChild(this._tableEl)
};
DwtPropertySheet.prototype=new DwtComposite;
DwtPropertySheet.prototype.constructor=DwtPropertySheet;
DwtPropertySheet.prototype.toString=function(){return"DwtPropertySheet"
};
DwtPropertySheet.RIGHT="right";
DwtPropertySheet.LEFT="left";
DwtPropertySheet.DEFAULT=DwtPropertySheet.LEFT;
DwtPropertySheet.prototype._labelSide;
DwtPropertySheet.prototype._labelCssClass="Label";
DwtPropertySheet.prototype._valueCssClass="Field";
DwtPropertySheet.prototype._tableEl;
DwtPropertySheet.prototype._propertyIdCount;
DwtPropertySheet.prototype._propertyList;
DwtPropertySheet.prototype._propertyMap;
DwtPropertySheet.prototype.addProperty=function(B,D,F){var A=this._tableEl.rows.length;
var E=this._tableEl.insertRow(A);
E.vAlign=this._vAlign?this._vAlign:"top";
if(this._labelSide==DwtPropertySheet.LEFT){this._insertLabel(E,B,F);
this._insertValue(E,D,F)
}else{this._insertValue(E,D,F);
this._insertLabel(E,B,F)
}var G=this._propertyIdCount++;
var C={id:G,index:A,row:E,visible:true};
this._propertyList.push(C);
this._propertyMap[G]=C;
return G
};
DwtPropertySheet.prototype._insertLabel=function(E,A,D){var C=E.insertCell(-1);
C.className=this._labelCssClass;
if(this._labelSide!=DwtPropertySheet.LEFT){C.width="100%";
C.style.textAlign="left"
}C.innerHTML=A;
if(D){var B=this._tableEl.ownerDocument.createElement("SUP");
B.innerHTML="*";
C.insertBefore(B,C.firstChild)
}};
DwtPropertySheet.prototype._insertValue=function(D,B,C){var A=D.insertCell(-1);
A.className=this._valueCssClass;
if(!B){A.innerHTML="&nbsp;"
}else{if(B instanceof DwtControl){A.appendChild(B.getHtmlElement())
}else{if(B.nodeType==AjxUtil.ELEMENT_NODE){A.appendChild(B)
}else{A.innerHTML=String(B)
}}}};
DwtPropertySheet.prototype.removeProperty=function(F){var E=this._propertyMap[F];
if(E.visible){var B=E.index;
var D=this.__getTableIndex(B);
var C=this._tableEl.rows[D];
C.parentNode.removeChild(C)
}E.row=null;
for(var A=index+1;
A<this._propertyList.length;
A++){var E=this._propertyList[A];
E.index--
}this._propertyList.splice(index,1);
delete this._propertyMap[F]
};
DwtPropertySheet.prototype.setPropertyVisible=function(F,D){var E=this._propertyMap[F];
if(E.visible!=D){E.visible=D;
var A=E.index;
if(D){var C=this.__getTableIndex(A);
var B=this._tableEl.insertRow(C);
DwtPropertySheet.__moveChildNodes(E.row,B);
E.row=B
}else{var B=E.row;
B.parentNode.removeChild(B)
}}};
DwtPropertySheet.prototype.__getTableIndex=function(B){var C=0;
for(var A=0;
A<B;
A++){var D=this._propertyList[A];
if(D.visible){C++
}}return C
};
DwtPropertySheet.__moveChildNodes=function(B,A){if(B===A){return 
}var C=B.firstChild;
while(C!=null){A.appendChild(C);
C=B.firstChild
}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtGrouper")){DwtGrouper=function(D,C,B){if(arguments.length==0){return 
}C=C||"DwtGrouper";
B=B||DwtControl.STATIC_STYLE;
DwtComposite.call(this,{parent:D,posStyle:B});
this._labelEl=document.createElement("LEGEND");
this._insetEl=document.createElement("DIV");
this._borderEl=document.createElement("FIELDSET");
this._borderEl.appendChild(this._labelEl);
this._borderEl.appendChild(this._insetEl);
var A=this.getHtmlElement();
A.appendChild(this._borderEl)
};
DwtGrouper.prototype=new DwtComposite;
DwtGrouper.prototype.constructor=DwtGrouper;
DwtGrouper.prototype._borderEl;
DwtGrouper.prototype._labelEl;
DwtGrouper.prototype._insetEl;
DwtGrouper.prototype.setLabel=function(A){Dwt.setVisible(this._labelEl,Boolean(A));
this._labelEl.style.display="";
this._labelEl.innerHTML=A?A:""
};
DwtGrouper.prototype.setContent=function(B){var A=this._insetEl;
A.innerHTML=B
};
DwtGrouper.prototype.setElement=function(B){var A=this._insetEl;
Dwt.removeChildren(A);
A.appendChild(B)
};
DwtGrouper.prototype.setView=function(A){this.setElement(A.getHtmlElement())
};
DwtGrouper.prototype.getInsetHtmlElement=function(){return this._insetEl
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtProgressBar")){DwtProgressBar=function(C,B,A){if(arguments.length==0){return 
}A=A||DwtControl.STATIC_STYLE;
DwtComposite.call(this,{parent:C,posStyle:A});
this._maxValue=100;
this._value=0;
this._quotabarDiv=null;
this._quotausedDiv=null;
this._progressBgColor=null;
this._progressCssClass="quotaused";
this._wholeBgColor=null;
this._wholeCssClass="quotabar";
this._createHTML()
};
DwtProgressBar.prototype=new DwtComposite;
DwtProgressBar.prototype.constructor=DwtProgressBar;
DwtProgressBar.prototype.setProgressBgColor=function(A){this._progressBgColor=A
};
DwtProgressBar.prototype.setWholeBgColor=function(A){this._wholeBgColor=A
};
DwtProgressBar.prototype.setProgressCssClass=function(A){this._progressCssClass=A
};
DwtProgressBar.prototype.setWholeCssClass=function(A){this._wholeCssClass=A
};
DwtProgressBar.prototype.setProgressCssStyle=function(A){this._progressCssStyle=A
};
DwtProgressBar.prototype.setWholeCssStyle=function(A){this._wholeCssStyle=A
};
DwtProgressBar.prototype.setValue=function(B){this._value=parseInt(B);
var A;
if(this._value==this._maxValue){A=100
}else{A=Math.min(Math.round((this._value/this._maxValue)*100),100)
}if(isNaN(A)){A="0"
}if(!this._quotabarDiv){this._quotabarDiv=document.createElement("div");
if(this._wholeCssClass){this._quotabarDiv.className=this._wholeCssClass
}if(this._wholeBgColor){this._quotabarDiv.backgroundColor=this._wholeBgColor
}this._cell.appendChild(this._quotabarDiv)
}if(!this._quotausedDiv){this._quotausedDiv=document.createElement("div");
if(this._progressCssClass){this._quotausedDiv.className=this._progressCssClass
}if(this._progressBgColor){this._quotausedDiv.style.backgroundColor=this._progressBgColor
}this._quotabarDiv.appendChild(this._quotausedDiv)
}this._quotausedDiv.style.width=A+"%"
};
DwtProgressBar.prototype.setValueByPercent=function(A){this.setMaxValue(100);
this.setValue(A.replace(/\%/gi,""))
};
DwtProgressBar.prototype.getValue=function(){return this._value
};
DwtProgressBar.prototype.getMaxValue=function(){return this._maxValue
};
DwtProgressBar.prototype.setMaxValue=function(A){this._maxValue=parseInt(A)
};
DwtProgressBar.prototype.setLabel=function(E,B){var C=document.createTextNode(E);
var A=B?-1:0;
var D=this._row.insertCell(A);
D.appendChild(C)
};
DwtProgressBar.prototype._createHTML=function(){this._table=document.createElement("table");
this._table.border=this._table.cellpadding=this._table.cellspacing=0;
this._row=this._table.insertRow(-1);
this._cell=this._row.insertCell(-1);
this.getHtmlElement().appendChild(this._table)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtPropertyEditor")){DwtPropertyEditor=function(E,B,D,C,A){if(arguments.length>0){if(!D){D="DwtPropertyEditor"
}DwtComposite.call(this,{parent:E,className:D,posStyle:C,deferred:A});
this._useDwtInputField=B!=null?B:true;
this._schema=null;
this._init()
}};
DwtPropertyEditor.MSG_TIMEOUT=4000;
DwtPropertyEditor.MSG={mustMatch:"This field does not match validators: REGEXP",mustNotMatch:"This field matches anti-validators: REGEXP"};
DwtPropertyEditor.prototype=new DwtComposite;
DwtPropertyEditor.prototype.constructor=DwtPropertyEditor;
DwtPropertyEditor.prototype.toString=function(){return"DwtPropertyEditor"
};
DwtPropertyEditor.prototype._init=function(){var B=document.createElement("div");
B.id=this._relDivId=Dwt.getNextId();
B.style.position="relative";
var A=document.createElement("table");
A.id=this._tableId=Dwt.getNextId();
A.cellSpacing=A.cellPadding=0;
A.appendChild(document.createElement("tbody"));
B.appendChild(A);
this.getHtmlElement().appendChild(B);
this.maxLabelWidth=0;
this.maxFieldWidth=0;
this._setMouseEventHdlrs();
this._onMouseDown=new AjxListener(this,this._onMouseDown);
this.addListener(DwtEvent.ONMOUSEDOWN,this._onMouseDown)
};
DwtPropertyEditor.prototype.getRelDiv=function(){return document.getElementById(this._relDivId)
};
DwtPropertyEditor.prototype.getTable=function(){return document.getElementById(this._tableId)
};
DwtPropertyEditor.prototype._onMouseDown=function(C){var D=C.target;
var A=D.tagName.toLowerCase();
if(A=="input"){C._stopPropagation=false;
C._returnValue=true;
return true
}if(this._currentInputField&&!this._currentInputField.onblur()){C._stopPropagation=true;
C._returnValue=false;
return false
}try{while(D&&A!="tr"){D=D.parentNode;
A=D.tagName.toLowerCase()
}if(D&&D.__msh_doMouseDown){D.__msh_doMouseDown(C)
}}catch(B){}};
DwtPropertyEditor.prototype.getProperties=function(){if(this._currentInputField){this._currentInputField.onblur()
}function A(D){var F={},C,E=D.length;
for(var B=0;
B<E;
++B){C=D[B];
if(C.type=="struct"){F[C.name]=A(C.children)
}else{F[C.name]=C.value
}}return F
}return A(this._schema)
};
DwtPropertyEditor.prototype.validateData=function(){var A=true;
function B(E){var D,F=E.length;
for(var C=0;
C<F;
++C){D=E[C];
if(D.type=="struct"){B(D.children)
}else{if(!D._validate()){A=false
}}}}B(this._schema);
return A
};
DwtPropertyEditor.prototype.initProperties=function(C,B){if(B==null){this._schema=C;
B=null
}for(var A=0;
A<C.length;
++A){this._createProperty(C[A],B)
}};
DwtPropertyEditor.prototype._createProperty=function(A,I){var B=I?I._level+1:0;
var H=this.getTable().firstChild.appendChild(document.createElement("tr"));
A._parent=I;
A._level=B;
A._rowElId=H.id=Dwt.getNextId();
A._propertyEditor=this;
for(var F in DwtPropertyEditor._prop_functions){A[F]=DwtPropertyEditor._prop_functions[F]
}A._init();
H.className="level-"+B;
if(A.visible===false){H.className+=" invisible"
}if(A.readonly){H.className+=" readonly"
}if(A.type!="struct"){H.className+=" "+A.type;
var C=document.createElement("td");
C.className="label";
if(A.type=="checkboxgroup"){C.className+=" grouplabel"
}H.appendChild(C);
var G=AjxStringUtil.htmlEncode(A.label||A.name);
if(A.required){G+="<span class='DwtPropertyEditor-required'>*</span>"
}C.innerHTML=G;
var D=document.createElement("td");
D.className="field";
H.appendChild(D);
switch(A.type){case"boolean":this._createCheckbox(A,D);
break;
case"enum":this._createDropDown(A,D);
break;
case"date":this._createCalendar(A,D);
break;
case"checkboxgroup":this._createCheckBoxGroup(A,D);
break;
default:if(this._useDwtInputField){this._createInputField(A,D)
}else{D.innerHTML=A._makeDisplayValue();
H.__msh_doMouseDown=DwtPropertyEditor.simpleClosure(A._edit,A)
}break
}A._fieldCellId=D.id=Dwt.getNextId();
if(C.offsetWidth>this.maxLabelWidth){this.maxLabelWidth=C.offsetWidth
}if(D.offsetWidth>this.maxFieldWidth){this.maxFieldWidth=D.offsetWidth
}}else{var E=document.createElement("td");
E.colSpan=2;
H.appendChild(E);
E.className="label";
H.className+=" expander-collapsed";
E.innerHTML=["<div>",AjxStringUtil.htmlEncode(A.label),"</div>"].join("");
this.initProperties(A.children,A);
H.__msh_doMouseDown=DwtPropertyEditor.simpleClosure(A._toggle,A)
}if(B>0){H.style.display="none";
I._hidden=true
}};
DwtPropertyEditor.prototype.setFixedLabelWidth=function(A){try{this.getTable().rows[0].cells[0].style.width=(A||this.maxLabelWidth)+"px"
}catch(B){}};
DwtPropertyEditor.prototype.setFixedFieldWidth=function(A){try{this.getTable().rows[0].cells[1].style.width=(A||this.maxFieldWidth)+"px"
}catch(B){}};
DwtPropertyEditor.prototype._setCurrentMsgDiv=function(A){this._currentMsgDiv=A;
this._currentMsgDivTimer=setTimeout(DwtPropertyEditor.simpleClosure(this._clearMsgDiv,this),DwtPropertyEditor.MSG_TIMEOUT)
};
DwtPropertyEditor.prototype._clearMsgDiv=function(){try{this._stopMsgDivTimer()
}catch(A){}var B=this._currentMsgDiv;
if(B){B.parentNode.removeChild(B);
this._currentMsgDiv=B=null;
this._currentMsgDivTimer=null
}};
DwtPropertyEditor.prototype._stopMsgDivTimer=function(){if(this._currentMsgDivTimer){clearTimeout(this._currentMsgDivTimer);
this._currentMsgDivTimer=null
}};
DwtPropertyEditor.prototype.addChild=function(A){if(!this._currentFieldCell){DwtComposite.prototype.addChild.call(this,A)
}else{this._children.add(A);
this._currentFieldCell.appendChild(A.getHtmlElement())
}};
DwtPropertyEditor.prototype._createCheckbox=function(C,B){var A=document.createElement("input");
A._prop=C;
A.id=C.name;
A.type="checkbox";
if(AjxEnv.isIE){A.attachEvent("onclick",C._onCheckboxChange)
}else{A.addEventListener("click",C._onCheckboxChange,false)
}this._children.add(A);
B.appendChild(A);
if(C.value=="true"){A.checked=C.value
}};
DwtPropertyEditor.prototype._createCheckBoxGroup=function(A,E){var B=document.createElement("div");
B._prop=A;
B.id=A.name;
A._checkBox=[];
B.appendChild(document.createTextNode(A.value));
var H=document.createElement("table");
H.id=Dwt.getNextId();
H.border=0;
H.cellSpacing=H.cellPadding=0;
H.appendChild(document.createElement("tbody"));
for(var C=0;
C<A.checkBox.length;
C++){var F=document.createElement("tr");
var I=document.createElement("td");
I.className="field";
var D=this._createCheckboxForGroup(A,A.checkBox[C],I);
F.appendChild(I);
D._label=A.checkBox[C].label;
var G=document.createElement("td");
G.className="field";
G.appendChild(document.createTextNode(A.checkBox[C].label));
F.appendChild(G);
H.firstChild.appendChild(F);
A._checkBox[C]=D
}B.appendChild(H);
this._children.add(B);
E.appendChild(B);
return B
};
DwtPropertyEditor.prototype._createCheckboxForGroup=function(A,D,C){var B=document.createElement("input");
B._prop=A;
B.id=D.name;
B.type="checkbox";
if(D.value=="true"){B.checked=D.value
}if(AjxEnv.isIE){B.attachEvent("onclick",A._onCheckboxGroupChange)
}else{B.addEventListener("click",A._onCheckboxGroupChange,false)
}this._children.add(B);
C.appendChild(B);
return B
};
DwtPropertyEditor.prototype._createDropDown=function(G,F){this._currentFieldCell=F;
var D,E,C=0,B=[],A=G.item;
while(D=A[C]){B[C++]=new DwtSelectOption(D.value,D.value==G.value,D.label)
}G._select=E=new DwtSelect({parent:this,options:B});
E.addChangeListener(new AjxListener(G,G._onSelectChange));
E.addListener(DwtEvent.ONMOUSEDOWN,this._onMouseDown);
this._currentFieldCell=null
};
DwtPropertyEditor.prototype._createCalendar=function(F,D){this._currentFieldCell=D;
var B=new DwtButton({parent:this});
this._currentFieldCell=null;
B.setText(F._makeDisplayValue());
var E=new DwtMenu({parent:B,style:DwtMenu.CALENDAR_PICKER_STYLE});
E.setAssociatedObj(B);
var C=new DwtCalendar({parent:E});
var A=new Date();
A.setTime(F.value);
C.setDate(A);
C.setSize(150,"auto");
C.addSelectionListener(new AjxListener(F,F._onCalendarSelect));
B.setMenu(E);
F._dateButton=B;
F._dateCalendar=C
};
DwtPropertyEditor.DWT_INPUT_FIELD_TYPES={string:DwtInputField.STRING,password:DwtInputField.PASSWORD,integer:DwtInputField.INTEGER,number:DwtInputField.FLOAT};
DwtPropertyEditor.prototype._createInputField=function(D,C){this._currentFieldCell=C;
var A=DwtPropertyEditor.DWT_INPUT_FIELD_TYPES[D.type]||DwtInputField.STRING;
var B=new DwtInputField({parent:this,type:A,initialValue:D.value,maxLen:D.maxLength});
if(A==DwtInputField.INTEGER||A==DwtInputField.FLOAT){B.setValidNumberRange(D.minValue||null,D.maxValue||null);
if(D.decimals!=null){B.setNumberPrecision(D.decimals)
}}if(A==DwtInputField.STRING||A==DwtInputField.PASSWORD){B.setValidStringLengths(D.minLength,D.maxLength)
}if(D.required){B.setRequired()
}this._currentFieldCell=null;
D._inputField=B;
B.setValue(D.value);
if(D.readonly){B.setReadOnly(true)
}B.setValidationCallback(new AjxCallback(D,D._onDwtInputFieldValidated))
};
DwtPropertyEditor._prop_functions={_init:function(){this.type!=null||(this.type="string");
this.value!=null||(this.value="");
this._initialVal=this.value;
if(this.type=="date"){if(!this.value){this.value=new Date().getTime()
}if(!this.format){this.format=AjxDateUtil.getSimpleDateFormat().toPattern()
}}},_modified:function(){return this._initialVal!=this.value
},_getRowEl:function(){return document.getElementById(this._rowElId)
},_makeDisplayValue:function(){var B=this._getValue();
switch(this.type){case"password":B=B.replace(/./g,"*");
break;
case"date":var A=new Date();
A.setTime(B);
B=AjxDateFormat.format(this.format,A);
break
}if(B==""){B="<br />"
}else{B=AjxStringUtil.htmlEncode(String(B))
}return B
},_display:function(D){var E=this.children,C=D?"":"none";
if(E){var A=E.length;
while(--A>=0){E[A]._getRowEl().style.display=C;
if(!D){E[A]._display(false)
}}this._hidden=!D;
var B=this._getRowEl();
B.className=B.className.replace(/expander-[^\s]+/,D?"expander-expanded":"expander-collapsed")
}},_toggle:function(){this._display(this._hidden)
},_edit:function(){if(this.readonly){return 
}switch(this.type){case"string":case"number":case"integer":case"password":setTimeout(DwtPropertyEditor.simpleClosure(this._createInputField,this),50);
break
}},_createInputField:function(){var A=this._propertyEditor;
var F=document.getElementById(this._fieldCellId);
var C=A.getRelDiv();
var B=document.createElement("input");
B.className="DwtPropertyEditor-input "+this.type;
B.setAttribute("autocomplete","off");
B.type=this.type=="password"?"password":"text";
var E=F.offsetLeft,D=F.offsetTop;
if(AjxEnv.isGeckoBased){--E;
--D
}B.style.left=E+"px";
B.style.top=D+"px";
B.style.width=F.offsetWidth+1+"px";
B.style.height=F.offsetHeight+1+"px";
B.value=this._getValue();
C.appendChild(B);
B.focus();
B.onblur=DwtPropertyEditor.simpleClosure(this._saveInput,this);
B.onkeydown=DwtPropertyEditor.simpleClosure(this._inputKeyPress,this);
this._propertyEditor._currentInputField=this._inputField=B;
if(!AjxEnv.isGeckoBased){B.select()
}else{B.setSelectionRange(0,B.value.length)
}},_getValue:function(){return this.value||""
},_checkValue:function(C){var A=C=="";
if(A){if(!this.required){return C
}this._displayMsg(AjxMsg.valueIsRequired);
return null
}if(this.maxLength!=null&&C.length>this.maxLength){this._displayMsg(AjxMessageFormat.format(AjxMsg.stringTooLong,this.maxLength));
return null
}if(this.minLength!=null&&C.length<this.minLength){this._displayMsg(AjxMessageFormat.format(AjxMsg.stringTooShort,this.minLength));
return null
}if(this.mustMatch&&!this.mustMatch.test(C)){this._displayMsg(this.msg_mustMatch||DwtPropertyEditor.MSG.mustMatch.replace(/REGEXP/,this.mustMatch.toString()));
return null
}if(this.mustNotMatch&&this.mustNotMatch.test(C)){this._displayMsg(this.msg_mustNotMatch||DwtPropertyEditor.MSG.mustNotMatch.replace(/REGEXP/,this.mustNotMatch.toString()));
return null
}switch(this.type){case"integer":case"number":var E=new Number(C);
if(isNaN(E)){this._displayMsg(AjxMsg.notANumber);
return null
}if(this.type=="integer"&&Math.round(E)!=E){this._displayMsg(AjxMsg.notAnInteger);
return null
}if(this.minValue!=null&&E<this.minValue){this._displayMsg(AjxMessageFormat.format(AjxMsg.numberLessThanMin,this.minValue));
return null
}if(this.maxValue!=null&&E>this.maxValue){this._displayMsg(AjxMessageFormat.format(AjxMsg.numberMoreThanMax,this.maxValue));
return null
}C=E;
if(this.type=="number"&&this.decimals!=null){var B=C.toString();
var D=B.indexOf(".");
if(D==-1){D=B.length
}C=C.toPrecision(D+this.decimals)
}break
}return C
},_displayMsg:function(B){var G,F,H,D;
var E=this._propertyEditor;
var A=E._currentMsgDiv;
if(!A){A=document.createElement("div");
A.className="DwtPropertyEditor-ErrorMsg";
E.getRelDiv().appendChild(A)
}else{E._stopMsgDivTimer()
}A.style.visibility="hidden";
A.innerHTML=AjxStringUtil.htmlEncode(B);
var I=E.getTable();
H=I.offsetWidth;
if(!AjxEnv.isIE){H-=12
}G=I.offsetLeft;
A.style.left=G+"px";
A.style.width=H+"px";
D=A.offsetHeight;
var C=document.getElementById(this._fieldCellId);
F=C.offsetTop+C.offsetHeight;
if(F+D>I.offsetTop+I.offsetHeight){F=C.offsetTop-D
}A.style.top=F+"px";
A.style.visibility="";
E._setCurrentMsgDiv(A)
},_saveInput:function(){var A=this._inputField;
var B=this._checkValue(A.value);
if(B!=null){this._setValue(B);
A.onblur=A.onkeyup=A.onkeydown=A.onkeypress=null;
var C=document.getElementById(this._fieldCellId);
C.innerHTML=this._makeDisplayValue();
this._inputField=null;
this._propertyEditor._currentInputField=null;
this._propertyEditor._clearMsgDiv();
A.parentNode.removeChild(A);
return true
}else{if(A.className.indexOf(" DwtPropertyEditor-input-error")==-1){A.className+=" DwtPropertyEditor-input-error"
}A.focus();
return false
}},_inputKeyPress:function(B){B||(B=window.event);
var A=this._inputField;
if(B.keyCode==13){this._saveInput()
}else{if(B.keyCode==27){A.value=this._getValue();
this._saveInput()
}else{this._propertyEditor._clearMsgDiv();
A.className=A.className.replace(/ DwtPropertyEditor-input-error/,"")
}}},_onCheckboxChange:function(B){B||(B=window.event);
var A=AjxEnv.isIE?B.srcElement:B.target;
A._prop._setValue(A.checked?"true":"false")
},_onSelectChange:function(){this._setValue(this._select.getValue())
},_onCheckboxGroupChange:function(D){D||(D=window.event);
var C=AjxEnv.isIE?D.srcElement:D.target;
var A=C._prop._checkBox;
var E=[];
for(var B=0;
B<A.length;
B++){if(A[B].checked){E.push(A[B]._label)
}}C._prop._setValue(E)
},_onCalendarSelect:function(){this._setValue(this._dateCalendar.getDate().getTime());
this._dateButton.setText(this._makeDisplayValue())
},_onDwtInputFieldValidated:function(A,C,B){if(C){this._setValue(B)
}},_setValue:function(B){this.value=B;
var A=this._getRowEl();
A.className=A.className.replace(/ dirty/,"");
if(this._modified()){A.className+=" dirty"
}},_validate:function(){if(this._inputField){if(this._inputField instanceof DwtInputField){return this._inputField.validate()
}else{return this._inputField.onblur()
}}else{return true
}}};
DwtPropertyEditor.simpleClosure=function(A,B){return function(){return A.call(B,arguments[0])
}
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtConfirmDialog")){DwtConfirmDialog=function(B,A){if(arguments.length==0){return 
}var C=[DwtDialog.YES_BUTTON,DwtDialog.NO_BUTTON,DwtDialog.CANCEL_BUTTON];
DwtDialog.call(this,{parent:B,className:A,title:AjxMsg.confirmTitle,standardButtons:C});
this._questionDiv=document.createElement("DIV");
this._questionDiv.className="DwtConfirmDialogQuestion";
this._getContentDiv().appendChild(this._questionDiv);
this.registerCallback(DwtDialog.YES_BUTTON,this._handleYesButton,this);
this.registerCallback(DwtDialog.NO_BUTTON,this._handleNoButton,this);
this.registerCallback(DwtDialog.CANCEL_BUTTON,this._handleCancelButton,this)
};
DwtConfirmDialog.prototype=new DwtDialog;
DwtConfirmDialog.prototype.constructor=DwtConfirmDialog;
DwtConfirmDialog.prototype.toString=function(){return"DwtConfirmDialog"
};
DwtConfirmDialog.prototype._questionDiv;
DwtConfirmDialog.prototype._yesCallback;
DwtConfirmDialog.prototype._noCallback;
DwtConfirmDialog.prototype._cancelCallback;
DwtConfirmDialog.prototype.popup=function(C,A,D,B,E){this._questionDiv.innerHTML=C||"";
this._yesCallback=A;
this._noCallback=D;
this._cancelCallback=B;
this.setButtonVisible(DwtDialog.CANCEL_BUTTON,Boolean(D));
DwtDialog.prototype.popup.call(this,E)
};
DwtConfirmDialog.prototype.popdown=function(){this._yesCallback=this._noCallback=this._cancelCallback=null;
DwtDialog.prototype.popdown.call(this)
};
DwtConfirmDialog.prototype._handleYesButton=function(A){if(this._yesCallback){this._yesCallback.run(A)
}this.popdown()
};
DwtConfirmDialog.prototype._handleNoButton=function(A){if(this._noCallback){this._noCallback.run(A)
}this.popdown()
};
DwtConfirmDialog.prototype._handleCancelButton=function(A){if(this._cancelCallback){this._cancelCallback.run(A)
}this.popdown()
};
DwtConfirmDialog.prototype._getSeparatorTemplate=function(){return""
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtChooser")){DwtChooser=function(C){if(arguments.length==0){return 
}DwtComposite.call(this,C.parent,C.className);
this._slvClassName=C.slvClassName;
this._tlvClassName=C.tlvClassName;
this._layoutStyle=C.layoutStyle?C.layoutStyle:DwtChooser.HORIZ_STYLE;
this._selectStyle=C.selectStyle?C.selectStyle:DwtChooser.MULTI_SELECT;
this._mode=C.listStyle?C.listStyle:DwtChooser.MODE_MOVE;
this._noDuplicates=(C.noDuplicates!==false);
this._singleHeight=C.singleHeight?C.singleHeight:45;
this._listSize=C.listSize;
this._sourceEmptyOk=C.sourceEmptyOk;
this._allButtons=C.allButtons;
this._hasTextField=C.hasTextField;
this._handleButtonInfo(C.buttonInfo);
this._mode=C.mode?C.mode:this._hasMultiButtons?DwtChooser.MODE_COPY:DwtChooser.MODE_MOVE;
this._createHtml();
this._initialize();
var B=C.parent.getSize();
var D=C.listWidth||B.x;
var A=C.listHeight||B.y;
if(D&&A){this.resize(D,A)
}};
DwtChooser.prototype=new DwtComposite;
DwtChooser.prototype.constructor=DwtChooser;
DwtChooser.HORIZ_STYLE=1;
DwtChooser.VERT_STYLE=2;
DwtChooser.SINGLE_SELECT=1;
DwtChooser.MULTI_SELECT=2;
DwtChooser.MODE_COPY=1;
DwtChooser.MODE_MOVE=2;
DwtChooser.REMOVE_BTN_ID="__remove__";
DwtChooser.ADD_ALL_BTN_ID="__addAll__";
DwtChooser.REMOVE_ALL_BTN_ID="__removeAll__";
DwtChooser.prototype.toString=function(){return"DwtChooser"
};
DwtChooser.prototype.setItems=function(B,A,C){A=A?A:DwtChooserListView.SOURCE;
this._reset(A);
this.addItems(B,A,true);
this._selectFirst(A);
if(C){this._reset((A==DwtChooserListView.SOURCE)?DwtChooserListView.TARGET:DwtChooserListView.SOURCE)
}};
DwtChooser.prototype.getItems=function(A){A=A?A:DwtChooserListView.TARGET;
if(A==DwtChooserListView.SOURCE){return this.sourceListView.getList().clone()
}else{if(this._hasMultiButtons){var C={};
for(var B in this._data){C[B]=this._data[B].clone()
}return C
}else{return this._data[this._buttonInfo[0].id].clone()
}}};
DwtChooser.prototype.addItems=function(B,A,D,G){A=A?A:DwtChooserListView.SOURCE;
var F=(B instanceof AjxVector)?B.getArray():(B instanceof Array)?B:[B];
if(A==DwtChooserListView.SOURCE){for(var C=0;
C<F.length;
C++){this._addToSource(F[C],null,D)
}}else{var E;
if(this._selectStyle==DwtChooser.SINGLE_SELECT){this.targetListView._resetList();
F=(F.length>0)?[F[0]]:F
}for(var C=0;
C<F.length;
C++){this._addToTarget(F[C],G,D)
}}if(A==DwtChooserListView.SOURCE){var F=this.sourceListView.getList();
this._sourceSize=F?F.size():0
}};
DwtChooser.prototype.removeItems=function(D,A,C){D=(D instanceof AjxVector)?D.getArray():(D instanceof Array)?D:[D];
for(var B=0;
B<D.length;
B++){(A==DwtChooserListView.SOURCE)?this._removeFromSource(D[B],C):this._removeFromTarget(D[B],C)
}};
DwtChooser.prototype.transfer=function(B,D,A){D=D?D:this._activeButtonId;
this._setActiveButton(D);
if(this._mode==DwtChooser.MODE_MOVE){if(this._selectStyle==DwtChooser.SINGLE_SELECT){var C=this.targetListView.getList();
if(C&&C.size()){this.remove(C,true)
}}this.removeItems(B,DwtChooserListView.SOURCE,true)
}this.addItems(B,DwtChooserListView.TARGET,A);
this.sourceListView.deselectAll()
};
DwtChooser.prototype.remove=function(D,C){D=(D instanceof AjxVector)?D.getArray():(D instanceof Array)?D:[D];
if(this._mode==DwtChooser.MODE_MOVE){for(var B=0;
B<D.length;
B++){var A=this._getInsertionIndex(this.sourceListView,D[B]);
this.sourceListView.addItem(D[B],A,true)
}this._sourceSize=D?D.length:0
}this.removeItems(D,DwtChooserListView.TARGET)
};
DwtChooser.prototype.setSelectStyle=function(C,F){if(C==this._selectStyle){return 
}this._selectStyle=C;
if(this._defLabel){var B=this._button[this._buttonInfo[0].id];
B.setText((C==DwtChooser.SINGLE_SELECT)?AjxMsg.select:AjxMsg.add)
}if(!F){var D=this.getSize();
this.resize(D.x,D.y)
}if(this._allButtons){this._addAllButton.setVisible(C==DwtChooser.MULTI_SELECT);
this._removeAllButton.setVisible(C==DwtChooser.MULTI_SELECT);
this._enableButtons()
}if(C==DwtChooser.SINGLE_SELECT){var E=this.targetListView.getList();
var A=E?E.clone().getArray():null;
if(A&&A.length){this._reset(DwtChooserListView.TARGET);
this.addItems(A[0],DwtChooserListView.TARGET,true);
this.targetListView.deselectAll();
if(A.length>1&&this._mode==DwtChooser.MODE_MOVE){this.addItems(A.slice(1),DwtChooserListView.SOURCE,true)
}this._enableButtons()
}}this.sourceListView.multiSelectEnabled=(C==DwtChooser.MULTI_SELECT);
this.targetListView.multiSelectEnabled=(C==DwtChooser.MULTI_SELECT)
};
DwtChooser.prototype.reset=function(A){this._reset(A);
this._setActiveButton(this._buttonInfo[0].id);
this._enableButtons();
if(this._hasTextField){this._textField.setValue("")
}};
DwtChooser.prototype._reset=function(A){if(!A||A==DwtChooserListView.SOURCE){this.sourceListView._resetList()
}if(!A||A==DwtChooserListView.TARGET){this.targetListView._resetList();
for(var B in this._data){this._data[B].removeAll()
}}};
DwtChooser.prototype.addStateChangeListener=function(A){this.targetListView.addStateChangeListener(A)
};
DwtChooser.prototype.removeStateChangeListener=function(A){this.targetListView.removeStateChangeListener(A)
};
DwtChooser.prototype.getSourceListView=function(){return document.getElementById(this._sourceListViewDivId)
};
DwtChooser.prototype.getButtons=function(){return document.getElementById(this._buttonsDivId)
};
DwtChooser.prototype.getTargetListView=function(){return document.getElementById(this._targetListViewDivId)
};
DwtChooser.prototype.getTextField=function(){return this._textField
};
DwtChooser.prototype._createHtml=function(){this._sourceListViewDivId=Dwt.getNextId();
this._targetListViewDivId=Dwt.getNextId();
this._buttonsDivId=Dwt.getNextId();
this._removeButtonDivId=Dwt.getNextId();
if(this._allButtons){this._addAllButtonDivId=Dwt.getNextId();
this._removeAllButtonDivId=Dwt.getNextId()
}if(this._hasTextField){this._textFieldTdId=Dwt.getNextId()
}var C=[];
var A=0;
if(this._layoutStyle==DwtChooser.HORIZ_STYLE){C[A++]="<table cellspacing=0 cellpadding=0 border=0>";
C[A++]="<tr>";
C[A++]="<td id='";
C[A++]=this._sourceListViewDivId;
C[A++]="'></td>";
C[A++]="<td valign='middle' id='";
C[A++]=this._buttonsDivId;
C[A++]="'>";
if(this._allButtons){C[A++]="<div id='";
C[A++]=this._addAllButtonDivId;
C[A++]="'></div><br>"
}for(var B=0;
B<this._buttonInfo.length;
B++){var D=this._buttonInfo[B].id;
C[A++]="<div id='";
C[A++]=this._buttonDivId[D];
C[A++]="'></div><br>"
}C[A++]="<br><div id='";
C[A++]=this._removeButtonDivId;
C[A++]="'></div>";
if(this._allButtons){C[A++]="<br><div id='";
C[A++]=this._removeAllButtonDivId;
C[A++]="'></div><br>"
}C[A++]="</td>";
C[A++]="<td id='";
C[A++]=this._targetListViewDivId;
C[A++]="'></td>";
C[A++]="</tr>";
if(this._hasTextField){C[A++]="<tr><td>";
C[A++]="<table border=0 width=100%><tr><td style='white-space:nowrap; width:1%'>";
C[A++]=AjxMsg.add;
C[A++]=":</td><td id='";
C[A++]=this._textFieldTdId;
C[A++]="'></td></tr></table>";
C[A++]="</td><td>&nbsp;</td><td>&nbsp;</td></tr>"
}C[A++]="</table>"
}else{C[A++]="<div id='";
C[A++]=this._sourceListViewDivId;
C[A++]="'></div>";
C[A++]="<div align='center' id='";
C[A++]=this._buttonsDivId;
C[A++]="'>";
C[A++]="<table><tr>";
if(this._allButtons){C[A++]="<td id='";
C[A++]=this._addAllButtonDivId;
C[A++]="'></td>"
}for(var B=0;
B<this._buttonInfo.length;
B++){var D=this._buttonInfo[B].id;
C[A++]="<td id='";
C[A++]=this._buttonDivId[D];
C[A++]="'></td>"
}C[A++]="<td id='";
C[A++]=this._removeButtonDivId;
C[A++]="'></td>";
if(this._allButtons){C[A++]="<td id='";
C[A++]=this._removeAllButtonDivId;
C[A++]="'></td>"
}C[A++]="</tr></table></div>";
C[A++]="<div id='";
C[A++]=this._targetListViewDivId;
C[A++]="'></div>"
}this.getHtmlElement().innerHTML=C.join("")
};
DwtChooser.prototype._handleButtonInfo=function(B){if(!B){this._defLabel=(this._selectStyle==DwtChooser.SINGLE_SELECT)?AjxMsg.select:AjxMsg.add;
B=[{label:this._defLabel}]
}this._buttonInfo=B;
this._buttonDivId={};
this._buttonId={};
if(this._buttonInfo.length==1){if(!this._buttonInfo[0].id){this._buttonInfo[0].id=Dwt.getNextId()
}this._activeButtonId=this._buttonInfo[0].id
}for(var A=0;
A<this._buttonInfo.length;
A++){var C=this._buttonInfo[A].id;
this._buttonDivId[C]=Dwt.getNextId();
this._buttonId[C]=Dwt.getNextId()
}this._hasMultiButtons=(this._buttonInfo.length>1)
};
DwtChooser.prototype._initialize=function(){var A=new AjxListener(this,this._transferButtonListener);
this._button={};
this._buttonIndex={};
this._data={};
for(var B=0;
B<this._buttonInfo.length;
B++){var D=this._buttonInfo[B].id;
this._button[D]=this._setupButton(D,this._buttonId[D],this._buttonDivId[D],this._buttonInfo[B].label);
this._button[D].addSelectionListener(A);
this._buttonIndex[D]=B;
this._data[D]=new AjxVector()
}this.sourceListView=this._createSourceListView();
this._addListView(this.sourceListView,this._sourceListViewDivId);
this.sourceListView.addSelectionListener(new AjxListener(this,this._sourceListener));
this.targetListView=this._createTargetListView();
this._addListView(this.targetListView,this._targetListViewDivId);
this.targetListView.addSelectionListener(new AjxListener(this,this._targetListener));
this._removeButtonId=Dwt.getNextId();
this._removeButton=this._setupButton(DwtChooser.REMOVE_BTN_ID,this._removeButtonId,this._removeButtonDivId,AjxMsg.remove);
this._removeButton.addSelectionListener(new AjxListener(this,this._removeButtonListener));
if(this._allButtons){this._addAllButtonId=Dwt.getNextId();
this._addAllButton=this._setupButton(DwtChooser.ADD_ALL_BTN_ID,this._addAllButtonId,this._addAllButtonDivId,AjxMsg.addAll);
this._addAllButton.addSelectionListener(new AjxListener(this,this._addAllButtonListener));
this._removeAllButtonId=Dwt.getNextId();
this._removeAllButton=this._setupButton(DwtChooser.REMOVE_ALL_BTN_ID,this._removeAllButtonId,this._removeAllButtonDivId,AjxMsg.removeAll);
this._removeAllButton.addSelectionListener(new AjxListener(this,this._removeAllButtonListener));
if(this._selectStyle==DwtChooser.SINGLE_SELECT){this._addAllButton.setVisible(false);
this._removeAllButton.setVisible(false)
}}if(this._hasTextField){var C={parent:this,type:DwtInputField.STRING};
this._textField=new DwtInputField(C);
this._textField.reparentHtmlElement(this._textFieldTdId);
this._textField._chooser=this;
this._textField.setHandler(DwtEvent.ONKEYUP,DwtChooser._onKeyUp);
Dwt.setSize(this._textField.getInputElement(),"100%",Dwt.DEFAULT)
}if(this._selectStyle==DwtChooser.SINGLE_SELECT){this.sourceListView.multiSelectEnabled=false;
this.targetListView.multiSelectEnabled=false
}};
DwtChooser.prototype._createSourceListView=function(){return new DwtChooserListView(this,DwtChooserListView.SOURCE,this._slvClassName)
};
DwtChooser.prototype._createTargetListView=function(){return new DwtChooserListView(this,DwtChooserListView.TARGET,this._tlvClassName)
};
DwtChooser.prototype._addListView=function(B,C){var A=document.getElementById(C);
A.appendChild(B.getHtmlElement());
B.setUI(null,true);
B._initialized=true
};
DwtChooser.prototype.resize=function(E,A){if(!E||!A){return 
}if(E==Dwt.DEFAULT&&A==Dwt.DEFAULT){return 
}var C=document.getElementById(this._buttonsDivId);
var G=Dwt.getSize(C);
var B,D,F;
if(this._layoutStyle==DwtChooser.HORIZ_STYLE){B=this._listSize?this._listSize:(E==Dwt.DEFAULT)?E:Math.floor(((E-G.x)/2)-12);
D=F=A
}else{B=E;
if(this._selectStyle==DwtChooser.SINGLE_SELECT){D=this._listSize?this._listSize:(A==Dwt.DEFAULT)?A:A-G.y-this._singleHeight-30;
F=(A==Dwt.DEFAULT)?A:A-G.y-D-30
}else{D=F=this._listSize?this._listSize:(A==Dwt.DEFAULT)?A:Math.floor(((A-G.y)/2)-12)
}}this.sourceListView.setSize(B,D);
this.targetListView.setSize(B,F)
};
DwtChooser.prototype._setupButton=function(F,C,E,A){var B=new DwtButton({parent:this,id:C});
B.setText(A);
B.id=C;
B._buttonId=F;
var D=document.getElementById(E);
D.appendChild(B.getHtmlElement());
return B
};
DwtChooser.prototype._sourceListener=function(A){if(A.detail==DwtListView.ITEM_DBL_CLICKED){this.transfer(this.sourceListView.getSelection(),this._activeButtonId);
this.sourceListView.deselectAll()
}else{if(this._activeButtonId==DwtChooser.REMOVE_BTN_ID){var B=this._lastActiveTransferButtonId?this._lastActiveTransferButtonId:this._buttonInfo[0].id;
this._setActiveButton(B)
}}this.targetListView.deselectAll();
this._enableButtons()
};
DwtChooser.prototype._targetListener=function(A){if(A.detail==DwtListView.ITEM_DBL_CLICKED){this.remove(this.targetListView.getSelection())
}else{this._setActiveButton(DwtChooser.REMOVE_BTN_ID);
this.sourceListView.deselectAll();
this._enableButtons()
}};
DwtChooser.prototype._transferButtonListener=function(C){var B=DwtControl.getTargetControl(C);
var F=B._buttonId;
var E=this.sourceListView.getSelection();
if(E&&E.length){this.transfer(E,F);
var D=this.sourceListView.getList();
if(D&&D.size()){this._selectFirst(DwtChooserListView.SOURCE)
}else{this._enableButtons()
}}else{var A=this._getEmailFromText();
if(A){this.transfer([A],F)
}else{this._setActiveButton(F)
}}};
DwtChooser.prototype._removeButtonListener=function(A){this.remove(this.targetListView.getSelection());
var B=this.targetListView.getList();
if(B&&B.size()){this._selectFirst(DwtChooserListView.TARGET)
}else{this._enableButtons()
}};
DwtChooser.prototype._addAllButtonListener=function(A){this.transfer(this.sourceListView.getList().clone());
this._selectFirst(DwtChooserListView.TARGET)
};
DwtChooser.prototype._removeAllButtonListener=function(A){this.remove(this.targetListView.getList().clone());
this._selectFirst(DwtChooserListView.SOURCE)
};
DwtChooser.prototype._enableButtons=function(C,G){var H=this.sourceListView.getList();
var J=this.targetListView.getList();
var D=(C||(this.sourceListView.getSelectionCount()>0));
for(var F=0;
F<this._buttonInfo.length;
F++){var B=this._buttonInfo[F].id;
this._button[B].setEnabled(D)
}var I=(G||(this.targetListView.getSelectionCount()>0));
this._removeButton.setEnabled(I);
if(this._allButtons&&(this._selectStyle==DwtChooser.MULTI_SELECT)){var A=H?H.size():0;
var E=J?J.size():0;
this._addAllButton.setEnabled(A>0);
this._removeAllButton.setEnabled(E>0)
}};
DwtChooser.prototype._selectFirst=function(B,C){var A=(B==DwtChooserListView.SOURCE)?this.sourceListView:this.targetListView;
var D=A.getList();
if(D&&D.size()>0){A.setSelection(D.get(0))
}};
DwtChooser.prototype._setActiveButton=function(D){if(!this._hasMultiButtons){return 
}if(D!=this._activeButtonId){var C=(this._activeButtonId==DwtChooser.REMOVE_BTN_ID)?this._removeButtonId:this._buttonId[this._activeButtonId];
if(C){var A=DwtControl.findControl(document.getElementById(C));
if(A){A.setDisplayState(DwtControl.NORMAL)
}}C=(D==DwtChooser.REMOVE_BTN_ID)?this._removeButtonId:this._buttonId[D];
var B=DwtControl.findControl(document.getElementById(C));
if(B){B.setDisplayState(DwtControl.DEFAULT)
}this._activeButtonId=D;
if(D!=DwtChooser.REMOVE_BTN_ID){this._lastActiveTransferButtonId=D
}}};
DwtChooser.prototype._isDuplicate=function(A,B){return B.contains(A)
};
DwtChooser.prototype._addToSource=function(C,A,B){if(!C){return 
}if(!C._chooserIndex){var D=this.sourceListView.getList();
C._chooserIndex=D?D.size()+1:1
}this.sourceListView.addItem(C,A,B)
};
DwtChooser.prototype._addToTarget=function(I,A,F){if(!I){return 
}A=A?A:this._activeButtonId;
if(this._noDuplicates&&this._data[A]&&this._isDuplicate(I,this._data[A])){return 
}var E=this.targetListView.getList();
if(E&&E.contains(I)&&I.clone){var C=I.clone();
C.id=Dwt.getNextId();
I=C
}var G=null;
if(this._hasMultiButtons){E=[];
for(var B=0;
B<this._buttonInfo.length;
B++){E=E.concat(this._data[this._buttonInfo[B].id].getArray())
}var D=this._buttonIndex[A];
for(G=0;
G<E.length;
G++){var H=this._buttonIndex[E[G]._buttonId];
if(H>D){break
}}}I._buttonId=A;
I.id=I.id||Dwt.getNextId();
this._data[A].add(I);
this.targetListView.addItem(I,G,F)
};
DwtChooser.prototype._removeFromSource=function(B,A){if(!B){return 
}var C=this.sourceListView.getList();
if(!C){return 
}if(!C.contains(B)){return 
}this.sourceListView.removeItem(B,A)
};
DwtChooser.prototype._removeFromTarget=function(B,A){if(!B){return 
}var C=this.targetListView.getList();
if(!C){return 
}if(!C.contains(B)){return 
}this._data[B._buttonId].remove(B);
this.targetListView.removeItem(B,A)
};
DwtChooser.prototype._getInsertionIndex=function(B,D){var E=B.getList();
if(!E){return null
}var A=E.getArray();
for(var C=0;
C<A.length;
C++){if(D._chooserIndex&&A[C]._chooserIndex&&(A[C]._chooserIndex>=D._chooserIndex)){return C
}}return null
};
DwtChooser.prototype._getEmailFromText=function(){var B=this._textField.getValue();
var A=AjxEmailAddress.parse(B);
if(A){A.id=Dwt.getNextId();
return A
}};
DwtChooser._onKeyUp=function(E){var C=DwtUiEvent.getTarget(E);
var F=DwtControl.findControl(C);
var D=F._chooser;
var B=DwtKeyEvent.getCharCode(E);
if(B==3||B==13){var A=D._getEmailFromText();
if(A){D.transfer([A],D._activeButtonId);
C.value=""
}}D._enableButtons(C.value.length)
};
DwtChooserListView=function(A){if(arguments.length==0){return 
}A=Dwt.getParams(arguments,DwtChooserListView.PARAMS);
A.className=A.className||"DwtChooserListView";
A.headerList=this._getHeaderList(parent);
DwtListView.call(this,A);
this.type=A.type;
this._chooserParent=A.parent.parent
};
DwtChooserListView.PARAMS=["parent","type","className","view"];
DwtChooserListView.SOURCE=1;
DwtChooserListView.TARGET=2;
DwtChooserListView.prototype=new DwtListView;
DwtChooserListView.prototype.constructor=DwtChooserListView;
DwtChooserListView.prototype._getHeaderList=function(){};
DwtChooserListView.prototype.toString=function(){return"DwtChooserListView"
};
DwtChooserListView.prototype.setUI=function(B,A){A=A?A:((this.type==DwtChooserListView.TARGET)||this.parent._sourceEmptyOk);
DwtListView.prototype.setUI.call(this,B,A)
};
DwtChooserListView.prototype._itemClicked=function(A,B){if(!B.shiftKey&&!B.ctrlKey&&B.button==DwtMouseEvent.RIGHT){return 
}else{DwtListView.prototype._itemClicked.call(this,A,B)
}};
DwtChooserListView.prototype._sortColumn=function(B,A){this._chooserParent.search(B,A)
};
DwtChooserListView.prototype._getHeaderSashLocation=function(){var B=this.getHtmlElement();
if(Dwt.getPosition(B)==Dwt.ABSOLUTE_STYLE){return DwtListView.prototype._getHeaderSashLocation.call(this)
}var C=Dwt.toWindow(B,0,0);
var A=Dwt.toWindow(this._chooserParent.getHtmlElement(),0,0);
this._tmpPoint.x=C.x-A.x;
this._tmpPoint.y=C.y-A.y;
return this._tmpPoint
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtGridSizePicker")){DwtGridSizePicker=function(A,B){if(arguments.length==0){return 
}DwtControl.call(this,{parent:A,className:"DwtGridSizePicker"});
this._title=B;
if(A instanceof DwtMenu){A.addPopdownListener(new AjxListener(this,this._reset))
}this._reset()
};
DwtGridSizePicker.prototype=new DwtControl;
DwtGridSizePicker.prototype.constructor=DwtGridSizePicker;
DwtGridSizePicker.prototype.addSelectionListener=function(A){this.addListener(DwtEvent.SELECTION,A)
};
DwtGridSizePicker.prototype.removeSelectionListener=function(A){this.removeListener(DwtEvent.SELECTION,A)
};
DwtGridSizePicker.prototype._createGrid=function(){var C=this.getHtmlElement();
var B=["<table cellpadding='0' border='0' cellspacing='0'>","<tr class='info'><td colspan='",this.maxCols,"'>",this._title,"</td></tr>"];
var D=["<tr class='grid'>"];
for(var A=0;
A<this.maxCols;
++A){D.push("<td unselectable='unselectable'></td>")
}D.push("</tr>");
D=D.join("");
for(var A=0;
A<this.maxRows;
++A){B.push(D)
}B.push("</table>");
B=B.join("");
C.innerHTML=B;
C.onmouseover=DwtGridSizePicker._onMouseOver;
C.onmouseup=DwtGridSizePicker._onSelect
};
DwtGridSizePicker.prototype._reset=function(){this._endRow=-1;
this._endCol=-1;
this.maxRows=7;
this.maxCols=7;
this._createGrid()
};
DwtGridSizePicker._onSelect=function(A){if(AjxEnv.isIE){A=window.event
}DwtControl.getTargetControl(A)._onSelect(A)
};
DwtGridSizePicker.prototype._onSelect=function(D){if(AjxEnv.isIE){D=window.event
}var C=new DwtUiEvent();
C.setFromDhtmlEvent(D);
var E=C.target;
if(E.tagName.toLowerCase()=="td"){var F=E.parentNode.rowIndex;
if(F>0){var A=E.cellIndex;
var B=DwtShell.selectionEvent;
B.item=this;
B.detail={rows:F,cols:A+1};
if(this.parent instanceof DwtMenu){DwtMenu.closeActiveMenu()
}this.notifyListeners(DwtEvent.SELECTION,B)
}}};
DwtGridSizePicker.prototype._onMouseOut=function(D){if(AjxEnv.isIE){D=window.event
}var B=new DwtUiEvent();
B.setFromDhtmlEvent(D);
var E=B.target;
var C=this.getHtmlElement().firstChild;
try{while(E&&E!==C){E=E.parentNode
}}catch(A){E=null
}if(!E){this._endRow=this._endCol=-1;
this._update()
}};
DwtGridSizePicker._onMouseOver=function(A){if(AjxEnv.isIE){A=window.event
}DwtControl.getTargetControl(A)._onMouseOver(A)
};
DwtGridSizePicker.prototype._onMouseOver=function(B){var A=new DwtUiEvent(true);
A.setFromDhtmlEvent(B);
var C=A.target;
if(this._updateTimeout){clearTimeout(this._updateTimeout)
}this._updateTimeout=setTimeout(AjxCallback.simpleClosure(this._updateOnTimeout,this,C),10);
A.setToDhtmlEvent(B)
};
DwtGridSizePicker.prototype._addRow=function(){var B=this.getHtmlElement().firstChild;
var C=B.insertRow(-1);
C.className="grid";
for(var A=0;
A<this.maxCols;
++A){var D=C.insertCell(-1);
D.unselectable=true
}++this.maxRows
};
DwtGridSizePicker.prototype._addCol=function(){var B=this.getHtmlElement().firstChild;
var D=B.rows;
for(var A=1;
A<=this.maxRows;
++A){var C=D[A];
var E=C.insertCell(-1);
E.unselectable=true
}++B.rows[0].cells[0].colSpan;
++this.maxCols
};
DwtGridSizePicker.prototype._updateOnTimeout=function(C){var A=true,D,B;
if(C.tagName.toLowerCase()=="td"){D=C.parentNode.rowIndex;
if(D>0){B=this._endCol=C.cellIndex;
this._endRow=C.parentNode.rowIndex-1;
A=false
}}if(A){this._endRow=this._endCol=-1
}this._update();
if(!A){if(D==this.maxRows){this._addRow()
}if(B==this.maxCols-1){this._addCol()
}}};
DwtGridSizePicker.prototype._update=function(){var B=this._endRow;
var F=this._endCol;
var H=this.getHtmlElement().firstChild;
var E=H.rows[0].cells[0];
this._rows=B+1;
this._cols=F+1;
if(this._rows>0&&this._cols>0){E.innerHTML=this._rows+" x "+this._cols
}else{E.innerHTML=this._title
}for(var C=0;
C<this.maxRows;
++C){var I=H.rows[C+1];
for(var A=0;
A<this.maxCols;
++A){var G=I.cells[A];
var D=(C>this._endRow)||(A>this._endCol);
if(D){Dwt.delClass(G,"Hovered")
}else{Dwt.addClass(G,"Hovered")
}}}}
}if(AjxPackage.define("ajax.dwt.widgets.DwtSpinner")){DwtSpinner=function(A){if(arguments.length==0){return 
}DwtControl.call(this,{parent:A.parent,className:A.className,posStyle:A.posStyle,parentElement:A.parentElement});
this._maxValue=A.max!=null?A.max:null;
this._minValue=A.min!=null?A.min:null;
this._fieldSize=A.size!=null?A.size:3;
this._origValue=A.value||0;
this._maxLen=A.maxLen||null;
this._step=A.step||1;
this._decimals="decimals" in A?A.decimals:0;
this._align=A.align||null;
this._skipCaretHack=A.skipCaretHack;
this._timerFunc=AjxCallback.simpleClosure(this._timerFunc,this);
this._btnPressCapture=new DwtMouseEventCapture({targetObj:this,id:"DwtSpinner",mouseUpHdlr:AjxCallback.simpleClosure(this._stopCapture,this)});
this._createElements()
};
DwtSpinner.prototype=new DwtControl;
DwtSpinner.prototype.constructor=DwtSpinner;
DwtSpinner.INIT_TIMER=250;
DwtSpinner.SLOW_TIMER=125;
DwtSpinner.FAST_TIMER=33;
DwtSpinner.prototype._createElements=function(){var H=this.getHtmlElement();
var G=Dwt.getNextId();
this._idField=G;
this._idUpButton=G+"-up";
this._idDownButton=G+"-down";
var A=this._skipCaretHack?"":Dwt.CARET_HACK_BEGIN;
var F=this._skipCaretHack?"":Dwt.CARET_HACK_END;
var E=["<table class='DwtSpinner' cellspacing='0' cellpadding='0'>","<tr><td rowspan='2' class='DwtSpinner-inputCell'>",A,"<input id='",G,"' autocomplete='off' />",F,"</td>","<td unselectable id='",this._idUpButton,"' class='DwtSpinner-upBtn'><div class='ImgUpArrowSmall'>&nbsp;</div></td>","</tr><tr>","<td unselectable id='",this._idDownButton,"' class='DwtSpinner-downBtn'><div class='ImgDownArrowSmall'>&nbsp;</div></td>","</tr></table>"];
H.innerHTML=E.join("");
var D=this._getUpButton();
D.onmousedown=AjxCallback.simpleClosure(this._btnPressed,this,"Up");
var C=this._getDownButton();
C.onmousedown=AjxCallback.simpleClosure(this._btnPressed,this,"Down");
var B=this.getInputElement();
if(this._maxLen){B.maxLength=this._maxLen
}if(this._fieldSize){B.size=this._fieldSize
}if(this._align){B.style.textAlign=this._align
}if(this._origValue!=null){this.setValue(this._origValue)
}B.onblur=AjxCallback.simpleClosure(this.setValue,this,null);
B[(AjxEnv.isIE||AjxEnv.isOpera)?"onkeydown":"onkeypress"]=AjxCallback.simpleClosure(this.__onKeyPress,this)
};
DwtSpinner.prototype._getValidValue=function(A){var B=parseFloat(A);
if(isNaN(B)||B==null){B=this._lastValidValue
}if(B==null){B=this._minValue||0
}if(this._minValue!=null&&B<this._minValue){B=this._minValue
}if(this._maxValue!=null&&B>this._maxValue){B=this._maxValue
}B=parseFloat(B);
if(this._decimals!=null){B=B.toFixed(this._decimals)
}this._lastValidValue=B;
return B
};
DwtSpinner.prototype.getInputElement=function(){return document.getElementById(this._idField)
};
DwtSpinner.prototype._getUpButton=function(){return document.getElementById(this._idUpButton)
};
DwtSpinner.prototype._getDownButton=function(){return document.getElementById(this._idDownButton)
};
DwtSpinner.prototype._getButton=function(A){switch(A){case"Up":return this._getUpButton();
case"Down":return this._getDownButton()
}};
DwtSpinner.prototype._setBtnState=function(A,C){var B=this._getButton(A);
if(C){Dwt.addClass(B,"DwtSpinner-"+A+"-disabled");
B.firstChild.className="Img"+A+"ArrowSmallDis"
}else{Dwt.delClass(B,"DwtSpinner-"+A+"-disabled");
B.firstChild.className="Img"+A+"ArrowSmall"
}};
DwtSpinner.prototype.getValue=function(){return parseFloat(this._getValidValue(this.getInputElement().value))
};
DwtSpinner.prototype.setValue=function(A){if(A==null){A=this.getInputElement().value
}A=this._getValidValue(A);
this.getInputElement().value=A;
A=parseFloat(A);
this._setBtnState("Down",this._minValue!=null&&this._minValue==A);
this._setBtnState("Up",this._maxValue!=null&&this._maxValue==A)
};
DwtSpinner.prototype.setEnabled=function(A){DwtControl.prototype.setEnabled.call(this,A);
this.getInputElement().disabled=!A;
var B=this.getHtmlElement().firstChild;
if(!A){Dwt.addClass(B,"DwtSpinner-disabled")
}else{Dwt.delClass(B,"DwtSpinner-disabled")
}};
DwtSpinner.prototype._rotateVal=function(A){var B=this.getValue();
switch(A){case"Up":B+=this._step;
break;
case"Down":B-=this._step;
break
}this.setValue(B)
};
DwtSpinner.prototype._btnPressed=function(A){if(!this.getEnabled()){return 
}Dwt.addClass(this._getButton(A),"DwtSpinner-"+A+"-pressed");
this._direction=A;
this._rotateVal(A);
this._btnPressCapture.capture();
this._timerSteps=0;
this._timer=setTimeout(this._timerFunc,DwtSpinner.INIT_TIMER)
};
DwtSpinner.prototype._timerFunc=function(){var C=this.getValue();
this._rotateVal(this._direction);
var B=this.getValue();
this._timerSteps++;
var A=this._timerSteps>4?DwtSpinner.FAST_TIMER:DwtSpinner.SLOW_TIMER;
if(C!=B){this._timer=setTimeout(this._timerFunc,A)
}else{this._stopCapture()
}};
DwtSpinner.prototype._stopCapture=function(){if(this._timer){clearTimeout(this._timer)
}this._timer=null;
this._timerSteps=null;
var B=this._direction;
Dwt.delClass(this._getButton(B),"DwtSpinner-"+B+"-pressed");
this._direction=null;
this._btnPressCapture.release();
var A=this.getInputElement();
A.focus();
Dwt.setSelectionRange(A,0,A.value.length)
};
DwtSpinner.prototype.__onKeyPress=function(C){if(AjxEnv.isIE){C=window.event
}var B=null;
switch(C.keyCode){case 38:B="Up";
break;
case 40:B="Down";
break
}if(B){this._rotateVal(B);
var A=this.getInputElement();
Dwt.setSelectionRange(A,0,A.value.length)
}};
DwtSpinner.prototype.focus=function(){this.getInputElement().focus()
};
DwtSpinner.prototype.select=function(){var A=this.getInputElement();
A.focus();
Dwt.setSelectionRange(A,0,A.value.length)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtButtonColorPicker")){DwtButtonColorPicker=function(C){if(arguments.length==0){return 
}C=Dwt.getParams(arguments,DwtButtonColorPicker.PARAMS);
C.actionTiming=DwtButton.ACTION_MOUSEUP;
DwtButton.call(this,C);
var A=new DwtMenu({parent:this,style:DwtMenu.COLOR_PICKER_STYLE});
this.setMenu(A);
var B=new DwtColorPicker(A,null,null,C.noFillLabel,C.allowColorInput);
B.addSelectionListener(new AjxListener(this,this._colorPicked));
this.__colorPicker=B;
this.__color=""
};
DwtButtonColorPicker.PARAMS=["parent","style","className","posStyle","id","index","noFillLabel","allowColorInput"];
DwtButtonColorPicker.prototype=new DwtButton;
DwtButtonColorPicker.prototype.constructor=DwtButtonColorPicker;
DwtButtonColorPicker._RGB_RE=/rgb\(([0-9]{1,3}),\s*([0-9]{1,3}),\s*([0-9]{1,3})\)/;
DwtButtonColorPicker._hexdigits=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];
DwtButtonColorPicker.toHex=function(D,B){var A=[];
while(D){var C=DwtButtonColorPicker._hexdigits[D&15];
A.push(C);
D=D>>4
}if(B!=null){B-=A.length;
while(B-->0){A.push("0")
}}A.reverse();
return A.join("")
};
DwtButtonColorPicker.prototype.showColorDisplay=function(A){if(!this._colorEl){return 
}if(!A){this._colorEl.onmouseover=DwtButtonColorPicker.__colorDisplay_onMouseOver;
this._colorEl.onmouseout=DwtButtonColorPicker.__colorDisplay_onMouseOut;
this._colorEl.onmousedown=DwtButtonColorPicker.__colorDisplay_onMouseDown
}};
DwtButtonColorPicker.prototype.getColor=function(){return this.__color
};
DwtButtonColorPicker.prototype.setColor=function(A){var B=A.match(DwtButtonColorPicker._RGB_RE);
if(B){A="#"+DwtButtonColorPicker.toHex(parseInt(B[1]),2)+DwtButtonColorPicker.toHex(parseInt(B[2]),2)+DwtButtonColorPicker.toHex(parseInt(B[3]),2)
}this.__color=A;
var C=this._colorEl;
if(C){C.style.backgroundColor=A
}};
DwtButtonColorPicker.prototype._createHtmlFromTemplate=function(B,C){DwtButton.prototype._createHtmlFromTemplate.call(this,B,C);
var A=AjxTemplate.expand("dwt.Widgets#ZButtonColorDisplay",C);
this.setText(A);
this._colorEl=document.getElementById(C.id+"_color")
};
DwtButtonColorPicker.prototype._setMinWidth=function(){};
DwtButtonColorPicker.prototype._colorPicked=function(C){var A=C.detail;
this.__color=this.__detail=A;
var B=this._colorEl;
if(B){B.style.backgroundColor=A
}if(this.isListenerRegistered(DwtEvent.SELECTION)){var D=DwtShell.selectionEvent;
D.item=this;
D.detail=A;
this.notifyListeners(DwtEvent.SELECTION,D)
}};
DwtButtonColorPicker.prototype.__colorDisplay_onMouseOver=function(A,B){if(!this.getEnabled()){return 
}Dwt.addClass(B,"ImgDisable")
};
DwtButtonColorPicker.prototype.__colorDisplay_onMouseOut=function(A,B){if(!this.getEnabled()){return 
}Dwt.delClass(B,"ImgDisable")
};
DwtButtonColorPicker.prototype.__colorDisplay_onMouseDown=function(B,D){if(!this.getEnabled()){return 
}var A=DwtShell.mouseEvent;
A.setFromDhtmlEvent(B);
this.__color=this.__detail=D.style.backgroundColor="";
if(this.isListenerRegistered(DwtEvent.SELECTION)){var C=DwtShell.selectionEvent;
C.item=this;
C.detail="";
this.notifyListeners(DwtEvent.SELECTION,C)
}A._stopPropagation=true;
A._returnValue=false;
A.setToDhtmlEvent(B);
return false
};
DwtButtonColorPicker.__colorDisplay_onMouseOver=function(A){var B=DwtControl.getTargetControl(A);
B.__colorDisplay_onMouseOver(A,this)
};
DwtButtonColorPicker.__colorDisplay_onMouseOut=function(A){var B=DwtControl.getTargetControl(A);
B.__colorDisplay_onMouseOut(A,this)
};
DwtButtonColorPicker.__colorDisplay_onMouseDown=function(A){var B=DwtControl.getTargetControl(A);
B.__colorDisplay_onMouseDown(A,this)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtMessageComposite")){DwtMessageComposite=function(C,B,A){if(arguments.length==0){return 
}B=B||"DwtMessageComposite";
DwtComposite.call(this,{parent:C,className:B,posStyle:A})
};
DwtMessageComposite.prototype=new DwtComposite;
DwtMessageComposite.prototype.constructor=DwtMessageComposite;
DwtMessageComposite.prototype.toString=function(){return"DwtMessageComposite"
};
DwtMessageComposite.prototype._formatter;
DwtMessageComposite.prototype._controls;
DwtMessageComposite.prototype.setFormat=function(L,G,D){this._formatter=new AjxMessageFormat(L);
this._controls={};
var N=this._htmlElId;
var S=["<table class='DwtCompositeTable' border='0' cellspacing='0' cellpadding='0'><tr valign='center'>"];
var O=this._formatter.getSegments();
var E={};
var P={};
for(var Q=0;
Q<O.length;
Q++){var B=O[Q];
var R=B instanceof AjxMessageFormat.MessageSegment;
var I=[N,Q].join("_");
S.push("<td id='",I,"' class='",(R?"MessageControl"+B.getIndex():"")," DwtCompositeCell'>");
if(R){var J=G?G.run(this,B,Q):null;
if(!J){J=new DwtInputField({parent:this})
}E[I]=J.getHtmlElement();
P[I]=D&&D.run(this,B,Q);
var K=B.getIndex();
this._controls[K]=this._controls[K]||J
}else{S.push(B.toSubPattern())
}S.push("</td>")
}S.push("</tr></table>");
var C=this.getHtmlElement();
var H=C.childNodes.length;
var T=document.createElement("DIV");
T.className=N+"_container";
C.appendChild(T);
T.innerHTML=S.join("");
for(var I in E){var A=E[I];
var F=document.getElementById(I);
F.appendChild(A);
for(var M in P[I]){F[M]=P[I][M]
}}};
DwtMessageComposite.prototype.format=function(){var B=[];
for(var A in this._controls){B[A]=this._controls[A].getValue()
}return this._formatter.format(B)
}
}if(AjxPackage.define("ajax.dwt.widgets.DwtRadioButtonGroup")){DwtRadioButtonGroup=function(C,A){this._radios={};
this._radioButtons={};
this._values={};
this._value2id={};
this._eventMgr=new AjxEventMgr();
for(var B in C){this.addRadio(B,C[B],(B==A))
}};
DwtRadioButtonGroup.prototype.toString=function(){return"DwtRadioButtonGroup"
};
DwtRadioButtonGroup.prototype._enabled=true;
DwtRadioButtonGroup.prototype._visible=true;
DwtRadioButtonGroup.prototype.addSelectionListener=function(A){return this._eventMgr.addListener(DwtEvent.SELECTION,A)
};
DwtRadioButtonGroup.prototype.removeSelectionListener=function(A){return this._eventMgr.removeListener(DwtEvent.SELECTION,A)
};
DwtRadioButtonGroup.prototype.setEnabled=function(A){this._enabled=A;
for(var B in this._radios){this._radios[B].disabled=!A
}};
DwtRadioButtonGroup.prototype.isEnabled=function(){return this._enabled
};
DwtRadioButtonGroup.prototype.setVisible=function(A){this._visible=A;
for(var B in this._radioButtons){this._radioButtons[B].setVisible(A)
}for(var B in this._radios){Dwt.setVisible(this._radios[B],A)
}};
DwtRadioButtonGroup.prototype.isVisible=function(){return this._visible
};
DwtRadioButtonGroup.prototype.addRadio=function(H,G,D){var A=G instanceof DwtRadioButton;
var E=A?G:null;
var F=E?E.getValue():G;
this._values[H]=F;
this._value2id[F]=H;
var B=document.getElementById(H);
this._radios[H]=B;
this._radioButtons[H]=E;
var C=AjxCallback.simpleClosure(this._handleClick,this);
Dwt.setHandler(B,DwtEvent.ONCLICK,C);
B.checked=D;
if(D){this._selectedId=H
}};
DwtRadioButtonGroup.prototype.getRadioByValue=function(A){var B=this._value2id[A];
return this._radios[B]
};
DwtRadioButtonGroup.prototype.getRadioButtonByValue=function(A){var B=this._value2id[A];
return this._radioButtons[B]
};
DwtRadioButtonGroup.prototype.setSelectedId=function(D,A){if(D!=this._selectedId){var B=document.getElementById(D);
if(!B){return 
}B.checked=true;
this._selectedId=D;
if(!A){var C=DwtShell.selectionEvent;
C.reset();
this._notifySelection(C)
}}};
DwtRadioButtonGroup.prototype.setSelectedValue=function(B,A){var C=this._valueToId(B);
this.setSelectedId(C,A)
};
DwtRadioButtonGroup.prototype.getSelectedId=function(){return this._selectedId
};
DwtRadioButtonGroup.prototype.getSelectedValue=function(){return this._values[this._selectedId]
};
DwtRadioButtonGroup.prototype.getValue=function(){return this.getSelectedValue()
};
DwtRadioButtonGroup.prototype._valueToId=function(A){for(var B in this._values){if(this._values[B]==A){return B
}}return null
};
DwtRadioButtonGroup.prototype._notifySelection=function(A){A.item=this;
A.detail={id:this._selectedId,value:this._values[this._selectedId]};
this._eventMgr.notifyListeners(DwtEvent.SELECTION,A)
};
DwtRadioButtonGroup.prototype._handleClick=function(A){A=DwtUiEvent.getEvent(A);
var C=DwtUiEvent.getTarget(A);
if(C&&C.nodeName.match(/label/i)){C=document.getElementById(C.getAttribute(AjxEnv.isIE?"htmlFor":"for"))
}var D=C.id;
if(!C.checked){for(D in this._radios){if(this._radios[D].checked){break
}}}if(D!=this._selectedId){this._selectedId=D;
var B=DwtShell.selectionEvent;
DwtUiEvent.copy(B,A);
this._notifySelection(B)
}}
}}if(AjxPackage.define("dwt.Widgets")){AjxTemplate.register("dwt.Widgets#DwtAlert",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td width=1%><div id='";
A[C++]=E.id;
A[C++]="_icon' style='margin-right:5px;'></div></td><td width=99%><table border=0 cellpadding=0 cellspacing=0><tr><td id='";
A[C++]=E.id;
A[C++]="_title' class='DwtAlertTitle'></td></tr><tr><td id='";
A[C++]=E.id;
A[C++]="_content' class='DwtAlertContent'></td></tr></table></td><td width=1%><div id='";
A[C++]=E.id;
A[C++]="_dismiss' style='margin-left:5px;'></div></td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtAlert"},false);
AjxTemplate.register("dwt.Widgets",AjxTemplate.getTemplate("dwt.Widgets#DwtAlert"),AjxTemplate.getParams("dwt.Widgets#DwtAlert"));
AjxTemplate.register("dwt.Widgets#DwtCheckbox",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table cellpadding='2' cellspacing='0' border='0'><tr><td><label id='";
A[C++]=E.id;
A[C++]="_text_left' for='";
A[C++]=E.id;
A[C++]="_input' class='Text' style='text-align:right'></label></td><td> <input id='";
A[C++]=E.id;
A[C++]="_input' name='";
A[C++]=E.name;
A[C++]="' value='";
A[C++]=E.value;
A[C++]="' type='checkbox' ";
A[C++]=E.checked;
A[C++]="> </td><td><label id='";
A[C++]=E.id;
A[C++]="_text_right' for='";
A[C++]=E.id;
A[C++]="_input' class='Text' style='text-align:left'></label></td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtCheckbox"},false);
AjxTemplate.register("dwt.Widgets#DwtRadioButton",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table cellpadding='2' cellspacing='0' border='0'><tr><td><label id='";
A[C++]=E.id;
A[C++]="_text_left' for='";
A[C++]=E.id;
A[C++]="_input' class='Text' style='text-align:right'></label></td><td> <input id='";
A[C++]=E.id;
A[C++]="_input' name='";
A[C++]=E.name;
A[C++]="' value='";
A[C++]=E.value;
A[C++]="' type='radio' ";
A[C++]=E.checked;
A[C++]="> </td><td><label id='";
A[C++]=E.id;
A[C++]="_text_right' for='";
A[C++]=E.id;
A[C++]="_input' class='Text' style='text-align:left'></label></td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtRadioButton"},false);
AjxTemplate.register("dwt.Widgets#DwtBaseDialog",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='DwtDialog WindowOuterContainer'><table cellspacing=0 cellpadding=0><tr id='";
A[C++]=E.dragId;
A[C++]="'><td class='minWidth'>";
A[C++]=E.icon;
A[C++]="</td><td id='";
A[C++]=E.id;
A[C++]="_title' class='DwtDialogTitle'>";
A[C++]=E.title;
A[C++]="</td><td class='minWidth'><div class='";
A[C++]=E.closeIcon2;
A[C++]="'></div></td><td class='minWidth'><div class='";
A[C++]=E.closeIcon1;
A[C++]="'></div></td></tr><tr><td class='WindowInnerContainer' colspan='4'><div id='";
A[C++]=E.id;
A[C++]="_content' class='DwtDialogBody'></div>";
if(E.controlsTemplateId){A[C++]=AjxTemplate.expand(E.controlsTemplateId,E)
}A[C++]="</td></tr></table></div>";
return D?A.length:A.join("")
},{width:"20",height:"32",id:"dwt.Widgets#DwtBaseDialog"},false);
AjxTemplate.register("dwt.Widgets#DwtDialogControls",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='horizSep'></div><div id='";
A[C++]=E.id;
A[C++]="_buttons' class='DwtDialogButtonBar'>";
if(AjxEnv.isNav){A[C++]="<input type='button' id='";
A[C++]=E.id;
A[C++]="_focus' style='height:0px;width:0px;display:none;'>"
}A[C++]="</div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtDialogControls"},false);
AjxTemplate.register("dwt.Widgets#DwtSemiModalDialog",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='DwtDialog LightWindowOuterContainer'><table cellspacing=0 cellpadding=0 style='cursor:move;'><tr id='";
A[C++]=E.dragId;
A[C++]="'><td class='minWidth'>";
A[C++]=E.icon;
A[C++]="</td><td id='";
A[C++]=E.id;
A[C++]="_title' class='DwtDialogTitle'>";
A[C++]=E.title;
A[C++]="</td><td class='minWidth'><div class='";
A[C++]=E.closeIcon2;
A[C++]="'></div></td><td class='minWidth'><div class='";
A[C++]=E.closeIcon1;
A[C++]="'></div></td></tr><tr><td class='LightWindowInnerContainer full_size' colspan='4'><div id='";
A[C++]=E.id;
A[C++]="_content' class='DwtDialogBody'></div><div class='horizSep'></div><div id='";
A[C++]=E.id;
A[C++]="_buttons' class='DwtDialogButtonBar'>";
if(AjxEnv.isNav){A[C++]="<input type='button' id='";
A[C++]=E.id;
A[C++]="_focus' style='height:0px;width:0px;display:none;'>"
}A[C++]="</div></td></tr></table></div>";
return D?A.length:A.join("")
},{width:"20",height:"32",id:"dwt.Widgets#DwtSemiModalDialog"},false);
AjxTemplate.register("dwt.Widgets#DwtToolTip",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="TopPointer' class='DwtToolTipTopPointer'><center><div class='DwtToolTipPointerRow' style='width:1px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:3px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:5px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:7px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:9px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:11px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:13px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:15px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:17px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:19px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:21px;'>&nbsp;</div></center></div><div id='";
A[C++]=E.id;
A[C++]="Contents' class='DwtToolTipBody'></div><div id='";
A[C++]=E.id;
A[C++]="BottomPointer' class='DwtToolTipBottomPointer'><center><div class='DwtToolTipPointerRow' style='width:21px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:19px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:17px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:15px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:13px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:11px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:9px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:7px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:5px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:3px;'>&nbsp;</div><div class='DwtToolTipPointerRow' style='width:1px;'>&nbsp;</div></center></div>";
return D?A.length:A.join("")
},{width:"5",height:"5",id:"dwt.Widgets#DwtToolTip"},false);
AjxTemplate.register("dwt.Widgets#DwtVerticalSash",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='DwtVerticalSash'><center><div class='ImgVSash_thumb'></div></center></div>";
return D?A.length:A.join("")
},{width:"0",height:"0",id:"dwt.Widgets#DwtVerticalSash"},false);
AjxTemplate.register("dwt.Widgets#DwtHorizontalSash",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='DwtHorizontalSash'><table cellspacing=0 cellpadding=0 height='100%'><tr><td height='100%' valign='middle'><div class='ImgHSash_thumb'></div></td></tr></table></div>";
return D?A.length:A.join("")
},{width:"0",height:"0",id:"dwt.Widgets#DwtHorizontalSash"},false);
AjxTemplate.register("dwt.Widgets#DwtMissingSoundPlayer",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table class='DwtMissingSoundPlayer'><tr><td nowrap class='ImgCritical'>&nbsp;</td><td nowrap>";
A[C++]=ZmMsg.missingPlugin;
A[C++]="</td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtMissingSoundPlayer"},false);
AjxTemplate.register("dwt.Widgets#DwtVerticalSlider",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="_button' class='DwtThumb DwtSliderThumb'><div class='DwtSliderThumbBorder'><div class='ImgVerticalSliderThumb'></div></div></div>";
return D?A.length:A.join("")
},{"class":"DwtSlider DwtVerticalSlider",id:"dwt.Widgets#DwtVerticalSlider"},false);
AjxTemplate.register("dwt.Widgets#DwtHorizontalSlider",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="_button' class='DwtThumb DwtSliderThumb'><div class='DwtSliderThumbBorder'><div class='ImgHorizontalSliderThumb'></div></div></div>";
return D?A.length:A.join("")
},{"class":"DwtSlider DwtHorizontalSlider",id:"dwt.Widgets#DwtHorizontalSlider"},false);
AjxTemplate.register("dwt.Widgets#ZLabel",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table class='ZWidgetTable ZLabelBorder' cellspacing=0 cellpadding=0><tr><td id='";
A[C++]=E.id;
A[C++]="_left_icon'  \tclass='ZLeftIcon ZWidgetIcon'></td><td id='";
A[C++]=E.id;
A[C++]="_title'\t\tclass='ZWidgetTitle'></td><td id='";
A[C++]=E.id;
A[C++]="_right_icon' \tclass='ZRightIcon ZWidgetIcon'></td></tr></table>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZLabel"},false);
AjxTemplate.register("dwt.Widgets#ZButton",function(C,G,F,B){var E=Boolean(B);
F=(typeof F=="string"?{id:F}:F)||{};
B=B||[];
var D=B.length;
var A=F.buttonClass||"Button";
B[D++]="<table class='ZWidgetTable Z";
B[D++]=A;
B[D++]="Table Z";
B[D++]=A;
B[D++]="Border' cellspacing=0 cellpadding=0 style='table-layout:auto;'><tr><td id='";
B[D++]=F.id;
B[D++]="_left_icon'  \tclass='ZLeftIcon ZWidgetIcon'></td><td id='";
B[D++]=F.id;
B[D++]="_title'\t\tclass='ZWidgetTitle'></td><td id='";
B[D++]=F.id;
B[D++]="_right_icon' \tclass='ZRightIcon ZWidgetIcon'></td><td id='";
B[D++]=F.id;
B[D++]="_dropdown' \tclass='ZDropDown'></td></tr></table>";
return E?B.length:B.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZButton"},false);
AjxTemplate.register("dwt.Widgets#ZToolbarButton",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
E.buttonClass=E.buttonClass||"ToolbarButton";
A[C++]=AjxTemplate.expand("#ZButton",E);
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZToolbarButton"},false);
AjxTemplate.register("dwt.Widgets#ZBorderlessButton",function(C,G,F,B){var E=Boolean(B);
F=(typeof F=="string"?{id:F}:F)||{};
B=B||[];
var D=B.length;
var A=F.buttonClass||"Button";
B[D++]="<table class='ZWidgetTable Z";
B[D++]=A;
B[D++]="Table' cellspacing=0 cellpadding=0 style='table-layout:auto;'><tr><td id='";
B[D++]=F.id;
B[D++]="_left_icon'  \tclass='ZLeftIcon ZWidgetIcon'></td><td id='";
B[D++]=F.id;
B[D++]="_title'\t\tclass='ZWidgetTitle'></td><td id='";
B[D++]=F.id;
B[D++]="_right_icon' \tclass='ZRightIcon ZWidgetIcon'></td><td id='";
B[D++]=F.id;
B[D++]="_dropdown' \tclass='ZDropDown'></td></tr></table>";
return E?B.length:B.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZBorderlessButton"},false);
AjxTemplate.register("dwt.Widgets#ZButtonColorDisplay",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="_color' class='DwtButtonColorPicker-display' unselectable></div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZButtonColorDisplay"},false);
AjxTemplate.register("dwt.Widgets#DwtComboBox",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table border=0 cellpadding=0 cellspacing=0><tr><td width=*><div id='";
A[C++]=E.id;
A[C++]="_input'></div></td><td><div id='";
A[C++]=E.id;
A[C++]="_button'></div></td></tr></table>";
return D?A.length:A.join("")
},{"class":"DwtComboBox",id:"dwt.Widgets#DwtComboBox"},false);
AjxTemplate.register("dwt.Widgets#DwtComboBoxButton",function(C,G,F,B){var E=Boolean(B);
F=(typeof F=="string"?{id:F}:F)||{};
B=B||[];
var D=B.length;
var A=F.buttonClass||"Button";
B[D++]="<table class='Z";
B[D++]=A;
B[D++]="Border' cellspacing=0 cellpadding=0><tr><td id='";
B[D++]=F.id;
B[D++]="_dropdown' \tclass='ZDropDown'></td></tr></table>";
return E?B.length:B.join("")
},{"class":"ZWidget",id:"dwt.Widgets#DwtComboBoxButton"},false);
AjxTemplate.register("dwt.Widgets#ZTabView",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="_tabbar'></div><div id='";
A[C++]=E.id;
A[C++]="_page'></div>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZTabView"},false);
AjxTemplate.register("dwt.Widgets#ZTabBar",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table border=0 cellpadding=0 cellspacing=0><tr valign='bottom' id='";
A[C++]=E.id;
A[C++]="_items'>";
A[C++]=AjxTemplate.expand("#ZTabBarPrefix",E);
A[C++]=AjxTemplate.expand("#ZTabBarSuffix",E);
A[C++]="</tr></table>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZTabBar"},false);
AjxTemplate.register("dwt.Widgets#ZTabBarPrefix",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<td id='";
A[C++]=E.id;
A[C++]="_prefix' class='ZTabBarPrefix'>&nbsp;</td>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZTabBarPrefix"},false);
AjxTemplate.register("dwt.Widgets#ZTabBarSuffix",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<td id='";
A[C++]=E.id;
A[C++]="_suffix' class='ZTabBarSuffix'>&nbsp;</td>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZTabBarSuffix"},false);
AjxTemplate.register("dwt.Widgets#ZTab",function(C,G,F,B){var E=Boolean(B);
F=(typeof F=="string"?{id:F}:F)||{};
B=B||[];
var D=B.length;
var A=F.buttonClass||"Tab";
B[D++]="<table id='";
B[D++]=F.id;
B[D++]="_select' class='Z";
B[D++]=A;
B[D++]="Table Z";
B[D++]=A;
B[D++]="Border ZWidgetTable ZWidgetBorder' cellspacing=0 cellpadding=0><tr><td id='";
B[D++]=F.id;
B[D++]="_left_icon'  class='ZLeftIcon ZWidgetIcon'></td><td id='";
B[D++]=F.id;
B[D++]="_title'\t\t class='ZWidgetTitle'></td><td id='";
B[D++]=F.id;
B[D++]="_right_icon' class='ZRightIcon ZWidgetIcon'></td></tr></table>";
return E?B.length:B.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZTab"},false);
AjxTemplate.register("dwt.Widgets#ZTabPage",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZTabPage"},false);
AjxTemplate.register("dwt.Widgets#ZSelectAutoSizingContainer",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]='<table border=0 cellpadding=0 cellspacing=0><tr><td id="';
A[C++]=E.id;
A[C++]='_select_container">';
A[C++]=AjxTemplate.expand(E.selectTemplateId,E.selectData);
A[C++]='</td></tr><tr><td><table id="';
A[C++]=E.id;
A[C++]='_pseudoitems_container" border=0 cellpadding=0 cellspacing=0></table></td></tr></table>';
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZSelectAutoSizingContainer"},false);
AjxTemplate.register("dwt.Widgets#ZSelect",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]=AjxTemplate.expand("#ZButton",E);
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZSelect"},false);
AjxTemplate.register("dwt.Widgets#ZSelectMenu",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]=AjxTemplate.expand("#ZMenu",E);
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZSelectMenu"},false);
AjxTemplate.register("dwt.Widgets#ZSelectMenuItem",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]=AjxTemplate.expand("#ZMenuItem",E);
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZSelectMenuItem"},false);
AjxTemplate.register("dwt.Widgets#ZToolbar",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table class='ZToolbarTable' border=0 cellpadding=0 cellspacing=0><tr id='";
A[C++]=E.id;
A[C++]="_items'>";
A[C++]=AjxTemplate.expand("#ZToolbarPrefix",E);
A[C++]=AjxTemplate.expand("#ZToolbarSuffix",E);
A[C++]="</tr></table>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZToolbar"},false);
AjxTemplate.register("dwt.Widgets#ZToolbarPrefix",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZToolbarPrefix"},false);
AjxTemplate.register("dwt.Widgets#ZToolbarSuffix",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZToolbarSuffix"},false);
AjxTemplate.register("dwt.Widgets#ZToolbarItem",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table><tr><td id='";
A[C++]=E.itemId;
A[C++]="'></td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZToolbarItem"},false);
AjxTemplate.register("dwt.Widgets#ZToolbarSeparator",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table><tr><td id='";
A[C++]=E.itemId;
A[C++]="' class='ZToolbarSeparator'>&nbsp;</td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZToolbarSeparator"},false);
AjxTemplate.register("dwt.Widgets#ZToolbarSpacer",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table><tr><td id='";
A[C++]=E.itemId;
A[C++]="' class='ZToolbarSpacer'>&nbsp;</td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZToolbarSpacer"},false);
AjxTemplate.register("dwt.Widgets#ZToolbarFiller",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table><tr><td id='";
A[C++]=E.itemId;
A[C++]="' class='ZToolbarFiller' width='100%'>&nbsp;</td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZToolbarFiller"},false);
AjxTemplate.register("dwt.Widgets#ZField",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<input id='";
A[C++]=E.id;
A[C++]="_field' class='ZFieldInput'>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZField"},false);
AjxTemplate.register("dwt.Widgets#ZTreeItem",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='";
A[C++]=E.divClassName;
A[C++]="' id='";
A[C++]=E.id;
A[C++]="_div'><table id='";
A[C++]=E.id;
A[C++]="_table' border=0 cellpadding=0 cellspacing=0><tr><td align=center nowrap id='";
A[C++]=E.id;
A[C++]="_nodeCell'></td>";
if(E.isCheckedStyle){A[C++]="<td nowrap id='";
A[C++]=E.id;
A[C++]="_checkboxCell'><input type='checkbox' id='";
A[C++]=E.id;
A[C++]="_checkbox'></td>"
}A[C++]="<td nowrap class='imageCell' id='";
A[C++]=E.id;
A[C++]="_imageCell'></td><td nowrap class='";
A[C++]=E.textClassName;
A[C++]="' id='";
A[C++]=E.id;
A[C++]="_textCell'></td><td nowrap class='imageCell' id='";
A[C++]=E.id;
A[C++]="_extraCell'></td></tr></table></div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZTreeItem"},false);
AjxTemplate.register("dwt.Widgets#ZAccordion",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="_div'><table class='ZAccordionTable ZWidget' border=0 cellspacing=0 cellpadding=0 id='";
A[C++]=E.id;
A[C++]="_accordion_table'></table></div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZAccordion"},false);
AjxTemplate.register("dwt.Widgets#ZAccordionItem",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="_header_";
A[C++]=E.itemNum;
A[C++]="' class='ZAccordionHeader'><table class='ZAccordionHeaderBorder ZWidgetTable' cellspacing=0 cellpadding=0><tr><td><div class='";
A[C++]=E.icon;
A[C++]="' id='";
A[C++]=E.id;
A[C++]="_icon_";
A[C++]=E.itemNum;
A[C++]="'></div></td><td><div class='ZAccordionTitle' id='";
A[C++]=E.id;
A[C++]="_title_";
A[C++]=E.itemNum;
A[C++]="'>";
A[C++]=E.title;
A[C++]="</div></td><td><div class='ImgAccordionClosed' id='";
A[C++]=E.id;
A[C++]="_status_";
A[C++]=E.itemNum;
A[C++]="'></div></td></tr></table></div><div class='ZAccordionBody' id='";
A[C++]=E.id;
A[C++]="_body_";
A[C++]=E.itemNum;
A[C++]="'></div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZAccordionItem"},false);
AjxTemplate.register("dwt.Widgets#DwtTabView",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table width='100%' border='0' cellspacing='0' cellpadding='0' backgroundColor='";
A[C++]=E.bgcolor;
A[C++]="'><tr align='left' valign='middle'><td id='";
A[C++]=E.id;
A[C++]="_tabs' class='DwtTabTable' nowrap align='left' valign='middle' width='100%'></td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtTabView"},false);
AjxTemplate.register("dwt.Widgets#DwtTabBar",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<!-- TODO -->";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtTabBar"},false);
AjxTemplate.register("dwt.Widgets#DwtTabSpacer",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table width='100%' cellspacing='0' cellpadding='0'><tr></tr><tr></tr><tr><td><div class='ImgTabSpacer'></div></td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtTabSpacer"},false);
AjxTemplate.register("dwt.Widgets#ZMenu",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div id='";
A[C++]=E.id;
A[C++]="_container' class='ZMenuBorder'></div>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZMenu"},false);
AjxTemplate.register("dwt.Widgets#ZMenuItem",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table class='ZWidgetTable ZMenuItemTable ZMenuItemBorder' cellspacing=0 cellpadding=0><tr><td id='";
A[C++]=E.id;
A[C++]="_check'\t \tclass='ZCheckIcon'><div></div></td><td id='";
A[C++]=E.id;
A[C++]="_left_icon'\tclass='ZLeftIcon ZWidgetIcon'><div></div></td><td id='";
A[C++]=E.id;
A[C++]="_title'\t\tclass='ZWidgetTitle'></td><td id='";
A[C++]=E.id;
A[C++]="_dropdown'\t\tclass='ZDropDown'><div></div></td></tr></table>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZMenuItem"},false);
AjxTemplate.register("dwt.Widgets#ZMenuItemSeparator",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table class='ZWidgetTable ZMenuItemTable ZMenuItemBorder ZMenuItemSeparatorBorder' cellspacing=0 cellpadding=0><tr><td id='";
A[C++]=E.id;
A[C++]="_title'\t\tclass='ZWidgetTitle'><div class='ZMenuItem-Separator'></div></td></tr></table>";
return D?A.length:A.join("")
},{"class":"ZWidget",id:"dwt.Widgets#ZMenuItemSeparator"},false);
AjxTemplate.register("dwt.Widgets#ZMenuItemBlankCheck",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='ZMenuItem-BlankCheck'></div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZMenuItemBlankCheck"},false);
AjxTemplate.register("dwt.Widgets#ZMenuItemBlankIcon",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='ZMenuItem-BlankIcon'></div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZMenuItemBlankIcon"},false);
AjxTemplate.register("dwt.Widgets#ZMenuItemBlankCascade",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<div class='ZMenuItem-BlankCascade'></div>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#ZMenuItemBlankCascade"},false);
AjxTemplate.register("dwt.Widgets#DwtListView-NoResults",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table width='100%' cellspacing=0 cellpadding=1><tr><td class='NoResults' valign='top'><br><br>";
A[C++]=E.message;
A[C++]="\n";
A[C++]="\t\t\t</td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtListView-NoResults"},false);
AjxTemplate.register("dwt.Widgets#DwtPasswordField",function(B,F,E,A){var D=Boolean(A);
E=(typeof E=="string"?{id:E}:E)||{};
A=A||[];
var C=A.length;
A[C++]="<table cellpadding='0' cellspacing='0' border='0'><tr><td><div id='";
A[C++]=E.id;
A[C++]="_input'></div></td><td><div id='";
A[C++]=E.id;
A[C++]="_show_password'></div></td></tr></table>";
return D?A.length:A.join("")
},{id:"dwt.Widgets#DwtPasswordField"},false)
};
