/*
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   =========================================================================
   ==  NOTICE file corresponding to section 4(d) of the Apache License,   ==
   ==  Version 2.0, in this case for the Zimbra Kabuki distribution.      ==
   =========================================================================

   This software was originally developed by:
     - Software Copyright (C) 2005-2006, Zimbra, Inc. (http://www.zimbra.com/)
*/function AjxEnv(){
}
AjxEnv._inited=false;
AjxEnv.DEFAULT_LOCALE=window.navigator.userLanguage||window.navigator.language||window.navigator.systemLanguage;
AjxEnv.reset=function(){
AjxEnv.browserVersion=-1;
AjxEnv.geckoDate=0;
AjxEnv.mozVersion=-1;
AjxEnv.isMac=false;
AjxEnv.isWindows=false;
AjxEnv.isLinux=false;
AjxEnv.isNav=false;
AjxEnv.isIE=false;
AjxEnv.isNav4=false;
AjxEnv.trueNs=true;
AjxEnv.isNav6=false;
AjxEnv.isNav6up=false;
AjxEnv.isNav7=false;
AjxEnv.isIE3=false;
AjxEnv.isIE4=false;
AjxEnv.isIE4up=false;
AjxEnv.isIE5=false;
AjxEnv.isIE5_5=false;
AjxEnv.isIE5up=false;
AjxEnv.isIE5_5up=false;
AjxEnv.isIE6=false;
AjxEnv.isIE6up=false;
AjxEnv.isNormalResolution=false;
AjxEnv.ieScaleFactor=1;
AjxEnv.isFirefox=false;
AjxEnv.isFirefox1up=false;
AjxEnv.isFirefox1_5up=false;
AjxEnv.isFirefox3up=false;
AjxEnv.isMozilla=false;
AjxEnv.isMozilla1_4up=false;
AjxEnv.isSafari=false;
AjxEnv.isCamino=false;
AjxEnv.isGeckoBased=false;
AjxEnv.isOpera=false;
AjxEnv.useTransparentPNGs=false;
AjxEnv.is800x600orLower=screen.width<=800&&screen.height<=600;
};
AjxEnv.parseUA=function(_1){
var _2=_1.toLowerCase();
var _3=_2.split(" ");
var i=0;
var _5=-1;
var _6=null;
var _7=false;
var _8=false;
var _9=false;
var _a=false;
var _b=false;
if(_3!=null){
if((_5=_3[0].search(/^\s*mozilla\//))!=-1){
_a=true;
AjxEnv.browserVersion=parseFloat(_3[0].substring(_5+8));
AjxEnv.isNav=true;
}
for(;i<_3.length;++i){
_6=_3[i];
if(_6.indexOf("compatible")!=-1){
_b=true;
AjxEnv.isNav=false;
}else{
if((_6.indexOf("opera"))!=-1){
AjxEnv.isOpera=true;
AjxEnv.isNav=false;
AjxEnv.browserVersion=parseFloat(_3[i+1]);
}else{
if((_6.indexOf("spoofer"))!=-1){
_7=true;
AjxEnv.isNav=false;
}else{
if((_6.indexOf("webtv"))!=-1){
_8=true;
AjxEnv.isNav=false;
}else{
if((_6.indexOf("hotjava"))!=-1){
_9=true;
AjxEnv.isNav=false;
}else{
if((_5=_6.indexOf("msie"))!=-1){
AjxEnv.isIE=true;
AjxEnv.browserVersion=parseFloat(_3[i+1]);
}else{
if((_5=_6.indexOf("gecko/"))!=-1){
AjxEnv.isGeckoBased=true;
AjxEnv.geckoDate=parseFloat(_6.substr(_5+6));
}else{
if((_5=_6.indexOf("rv:"))!=-1){
AjxEnv.mozVersion=parseFloat(_6.substr(_5+3));
AjxEnv.browserVersion=AjxEnv.mozVersion;
}else{
if((_5=_6.indexOf("firefox/"))!=-1){
AjxEnv.isFirefox=true;
AjxEnv.browserVersion=parseFloat(_6.substr(_5+8));
}else{
if((_5=_6.indexOf("camino/"))!=-1){
AjxEnv.isCamino=true;
AjxEnv.browserVersion=parseFloat(_6.substr(_5+7));
}else{
if((_5=_6.indexOf("netscape6/"))!=-1){
AjxEnv.trueNs=true;
AjxEnv.browserVersion=parseFloat(_6.substr(_5+10));
}else{
if((_5=_6.indexOf("netscape/"))!=-1){
AjxEnv.trueNs=true;
AjxEnv.browserVersion=parseFloat(_6.substr(_5+9));
}else{
if((_5=_6.indexOf("safari/"))!=-1){
AjxEnv.isSafari=true;
AjxEnv.browserVersion=parseFloat(_6.substr(_5+7));
}else{
if(_6.indexOf("windows")!=-1){
AjxEnv.isWindows=true;
}else{
if((_6.indexOf("macintosh")!=-1)||(_6.indexOf("mac_")!=-1)){
AjxEnv.isMac=true;
}else{
if(_6.indexOf("linux")!=-1){
AjxEnv.isLinux=true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
AjxEnv.isNav=(_a&&!_7&&!_b&&!AjxEnv.isOpera&&!_8&&!_9&&!AjxEnv.isSafari);
AjxEnv.isIE=(AjxEnv.isIE&&!AjxEnv.isOpera);
AjxEnv.isNav4=(AjxEnv.isNav&&(AjxEnv.browserVersion==4)&&(!AjxEnv.isIE));
AjxEnv.isNav6=(AjxEnv.isNav&&AjxEnv.trueNs&&(AjxEnv.browserVersion>=6)&&(AjxEnv.browserVersion<7));
AjxEnv.isNav6up=(AjxEnv.isNav&&AjxEnv.trueNs&&(AjxEnv.browserVersion>=6));
AjxEnv.isNav7=(AjxEnv.isNav&&AjxEnv.trueNs&&(AjxEnv.browserVersion==7));
AjxEnv.isIE3=(AjxEnv.isIE&&(AjxEnv.browserVersion<4));
AjxEnv.isIE4=(AjxEnv.isIE&&(AjxEnv.browserVersion==4)&&(AjxEnv.browserVersion==4));
AjxEnv.isIE4up=(AjxEnv.isIE&&(AjxEnv.browserVersion>=4));
AjxEnv.isIE5=(AjxEnv.isIE&&(AjxEnv.browserVersion==4)&&(AjxEnv.browserVersion==5));
AjxEnv.isIE5_5=(AjxEnv.isIE&&(AjxEnv.browserVersion==4)&&(AjxEnv.browserVersion==5.5));
AjxEnv.isIE5up=(AjxEnv.isIE&&(AjxEnv.browserVersion>=5));
AjxEnv.isIE5_5up=(AjxEnv.isIE&&(AjxEnv.browserVersion>=5.5));
AjxEnv.isIE6=(AjxEnv.isIE&&(AjxEnv.browserVersion==6));
AjxEnv.isIE6up=(AjxEnv.isIE&&(AjxEnv.browserVersion>=6));
AjxEnv.isIE7=(AjxEnv.isIE&&(AjxEnv.browserVersion==7));
AjxEnv.isIE7up=(AjxEnv.isIE&&(AjxEnv.browserVersion>=7));
AjxEnv.isMozilla=((AjxEnv.isNav&&AjxEnv.mozVersion&&AjxEnv.isGeckoBased&&(AjxEnv.geckoDate!=0)));
AjxEnv.isMozilla1_4up=(AjxEnv.isMozilla&&(AjxEnv.mozVersion>=1.4));
AjxEnv.isFirefox=((AjxEnv.isMozilla&&AjxEnv.isFirefox));
AjxEnv.isFirefox1up=(AjxEnv.isFirefox&&AjxEnv.browserVersion>=1);
AjxEnv.isFirefox1_5up=(AjxEnv.isFirefox&&AjxEnv.browserVersion>=1.5);
AjxEnv.isFirefox2_0up=(AjxEnv.isFirefox&&AjxEnv.browserVersion>=2);
AjxEnv.isFirefox3up=(AjxEnv.isFirefox&&AjxEnv.browserVersion>=3);
AjxEnv.browser="";
if(AjxEnv.isOpera){
AjxEnv.browser="OPERA";
}else{
if(AjxEnv.isSafari){
AjxEnv.browser="SAF";
}else{
if(AjxEnv.isCamino){
AjxEnv.browser="CAM";
}else{
if(_8){
AjxEnv.browser="WEBTV";
}else{
if(_9){
AjxEnv.browser="HOTJAVA";
}else{
if(AjxEnv.isFirefox3up){
AjxEnv.browser="FF3.0";
}else{
if(AjxEnv.isFirefox2_0up){
AjxEnv.browser="FF2.0";
}else{
if(AjxEnv.isFirefox1_5up){
AjxEnv.browser="FF1.5";
}else{
if(AjxEnv.isFirefox1up){
AjxEnv.browser="FF1.0";
}else{
if(AjxEnv.isFirefox){
AjxEnv.browser="FF";
}else{
if(AjxEnv.isNav7){
AjxEnv.browser="NAV7";
}else{
if(AjxEnv.isNav6){
AjxEnv.browser="NAV6";
}else{
if(AjxEnv.isNav4){
AjxEnv.browser="NAV4";
}else{
if(AjxEnv.isIE7){
AjxEnv.browser="IE7";
}else{
if(AjxEnv.isIE6){
AjxEnv.browser="IE6";
}else{
if(AjxEnv.isIE5){
AjxEnv.browser="IE5";
}else{
if(AjxEnv.isIE4){
AjxEnv.browser="IE4";
}else{
if(AjxEnv.isIE3){
AjxEnv.browser="IE";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
AjxEnv.platform="";
if(AjxEnv.isWindows){
AjxEnv.platform="Win";
}else{
if(AjxEnv.isMac){
AjxEnv.platform="Mac";
}else{
if(AjxEnv.isLinux){
AjxEnv.platform="Linux";
}
}
}
}
if(AjxEnv.isIE){
AjxEnv.isNormalResolution=true;
AjxEnv.ieScaleFactor=screen.deviceXDPI/screen.logicalXDPI;
if(AjxEnv.ieScaleFactor>1){
AjxEnv.isNormalResolution=false;
}
}
AjxEnv.useTransparentPNGs=!AjxEnv.isIE&&!AjxEnv.isLinux&&!AjxEnv.isSafari;
AjxEnv._inited=!AjxEnv.isIE;
var _c=AjxEnv.isSafari?AjxEnv.getWebkitVersion():null;
AjxEnv.isSafariNightly=_c&&_c["is_nightly"];
};
AjxEnv.getWebkitVersion=function(){
var _d;
var _e=new RegExp("\\(.*\\) AppleWebKit/(.*) \\((.*)");
var _f=_e.exec(navigator.userAgent);
if(_f){
var _10=_f[1];
var _11=_10.split(".");
var _12=(_10[_10.length-1]=="+");
var _13=_12?"+":parseInt(_11[1]);
if(isNaN(_13)){
_13="";
}
_d={major:parseInt(_11[0]),minor:_13,is_nightly:_12};
}
return {major:_d["major"],minor:_d["minor"],is_nightly:_d["is_nightly"]};
};
AjxEnv.reset();
AjxEnv.parseUA(navigator.userAgent);
if(AjxEnv.isSafari){
if(!String.prototype._AjxOldReplace){
String.prototype._AjxOldReplace=String.prototype.replace;
String.prototype.replace=function(re,val){
if(typeof val!="function"){
return this._AjxOldReplace(re,val);
}else{
var str=this.slice(0),v,l,a;
while(a=re.exec(str)){
v=val.apply(null,a);
l=a[0].length;
re.lastIndex-=l-v.length;
str=str.substr(0,a.index)+v+str.substr(a.index+l);
if(!re.global){
break;
}
}
return str;
}
};
}
}
function AjxCallback(obj,_18,_19){
if(arguments.length==0){
return;
}
this.obj=obj;
this.func=_18;
this.args=_19;
}
AjxCallback.prototype.toString=function(){
return "AjxCallback";
};
AjxCallback.prototype.run=function(){
var _1a=[];
if(typeof this.args!="undefined"){
if(this.args instanceof Array){
_1a=arguments.length>0?_1a.concat(this.args):this.args;
}else{
_1a.push(this.args);
}
}
for(var i=0;i<arguments.length;++i){
_1a.push(arguments[i]);
}
return this.func.apply(this.obj||window,_1a);
};
AjxCallback.simpleClosure=function(_1c,obj){
var _1e=[];
for(var i=2;i<arguments.length;++i){
_1e.push(arguments[i]);
}
return function(){
var _20=[];
for(var i=0;i<arguments.length;++i){
_20.push(arguments[i]);
}
return _1c.apply(obj||this,_1e.concat(_20));
};
};
AjxCallback.returnFalse=function(){
return false;
};
function AjxLoader(){
}
AjxLoader.__createXHR;
if(window.XMLHttpRequest){
AjxLoader.__createXHR=function(){
return new XMLHttpRequest();
};
}else{
if(ActiveXObject){
(function(){
var _22=["MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
for(var i=0;i<_22.length;i++){
try{
new ActiveXObject(_22[i]);
AjxLoader.__createXHR=function(){
return new ActiveXObject(_22[i]);
};
break;
}
catch(e){
}
}
})();
}
}
AjxLoader.syncLoad=function(url,_25,_26,_27){
return AjxLoader.load(null,url,_25,_26,_27);
};
AjxLoader.asyncLoad=function(_28,url,_2a,_2b,_2c){
return AjxLoader.load(_28,url,_2a,_2b,_2c);
};
AjxLoader.load=function(_2d,url,_2f,_30,_31){
var req=AjxLoader.__createXHR();
var _33=Boolean(_2d)?function(){
AjxLoader._response(req,_2d);
}:null;
var _34=_2f?"POST":"GET";
if(_33){
req.onreadystatechange=_33;
}
req.open(_34,url,Boolean(_33),_30,_31);
req.send(_2f);
return req;
};
AjxLoader._response=function(req,_36){
if(req.readyState==4){
_36.run(req);
}
};
function AjxPackage(){
}
AjxPackage._packages={};
AjxPackage._extension=".js";
AjxPackage.__depth=0;
AjxPackage.setBasePath=function(_37){
AjxPackage._basePath=_37;
};
AjxPackage.setExtension=function(_38){
AjxPackage._extension=_38;
};
AjxPackage.setQueryString=function(_39){
AjxPackage._queryString=_39;
};
AjxPackage.define=function(_3a){
AjxPackage.__log("define "+_3a,"font-weight:bold");
_3a=AjxPackage.__package2path(_3a);
if(!AjxPackage._packages[_3a]){
AjxPackage._packages[_3a]=true;
return true;
}
return false;
};
AjxPackage.undefine=function(_3b){
AjxPackage.__log("undefine "+_3b,"font-weight:bold;font-style:italic");
_3b=AjxPackage.__package2path(_3b);
if(AjxPackage._packages[_3b]){
delete AjxPackage._packages[_3b];
}
};
AjxPackage.require=function(_3c,_3d,_3e,_3f,_40){
var _41=_3c;
AjxPackage.__log("require "+_3c,"font-style:italic");
_3c=AjxPackage.__package2path(_3c);
if(AjxPackage._packages[_3c]){
return;
}
AjxPackage.define(_41);
_3d=_3d||AjxPackage._basePath||window.contextPath;
_3e=_3e||AjxPackage._extension;
var _42=[_3d,"/",_3c,_3e];
if(AjxPackage._queryString){
_42.push("?",AjxPackage._queryString);
}
var _43=_42.join("");
AjxPackage.__log("loading "+_43);
var req=AjxLoader.syncLoad(_43,null,_3f,_40);
if(req.status==200){
var _45=req.responseText||"";
AjxPackage.__requireEval(_45);
}else{
AjxPackage.__log("error: "+req.status,"background-color:red");
}
};
AjxPackage.__package2path=function(_46){
return _46.replace(/\./g,"/").replace(/\*$/,"__all__");
};
AjxPackage.__requireEval=function(_47){
AjxPackage.__depth++;
if(window.execScript){
window.execScript(_47);
}else{
if(AjxEnv.isGeckoBased){
window.eval(_47);
}else{
var e=document.createElement("SCRIPT");
var t=document.createTextNode(_47);
e.appendChild(t);
var _4a=document.getElementsByTagName("HEAD");
if(_4a.length==0){
var h=document.createElement("HEAD");
document.documentElement.appendChild(h);
_4a=[h];
}
_4a[0].appendChild(e);
}
}
AjxPackage.__depth--;
};
AjxPackage.__log=function(s,_4d){
};
function AjxTemplate(){
}
AjxTemplate._templates={};
AjxTemplate.register=function(_4e,_4f,_50){
AjxPackage.define(_4e.replace(/#.*$/,""));
AjxTemplate._templates[_4e]={name:_4e,func:_4f,params:_50||{}};
};
AjxTemplate.getTemplate=function(_51){
var _52=AjxTemplate._templates[_51];
return _52&&_52.func;
};
AjxTemplate.getParams=function(_53){
var _54=AjxTemplate._templates[_53];
return _54&&_54.params;
};
AjxTemplate.expand=function(_55,_56,_57){
var pkg=_55.replace(/#.*$/,"");
var id=_55.replace(/^[^#]*#?/,"");
if(id){
_55=[pkg,id].join("#");
}
AjxPackage.require(pkg);
var _5a=Boolean(_57);
_57=_57||[];
var _5b=AjxTemplate.getTemplate(_55);
if(_5b){
try{
var _5c=AjxTemplate.getParams(_55);
_5b(_55,_5c,_56,_57);
}
catch(e){
_57.push(this.__formatError(_55,e));
}
}else{
_57.push(this.__formatError(_55,"template not found"));
}
return _5a?_57.length:_57.join("");
};
AjxTemplate.setContent=function(_5d,_5e,_5f){
if(typeof _5d=="string"){
_5d=document.getElementById(_5d);
}
if(_5d==null){
return;
}
var _60=AjxTemplate.expand(_5e,_5f);
_5d.innerHTML=_60;
};
AjxTemplate.__formatError=function(_61,_62){
return "Error in template '"+_61+"': "+_62;
};
function AjxCore(){
}
AjxCore._objectIds=[null];
AjxCore.assignId=function(_63){
var _64=AjxCore._objectIds.length;
AjxCore._objectIds[_64]=_63;
return _64;
};
AjxCore.unassignId=function(_65){
AjxCore._objectIds[_65]=null;
};
AjxCore.objectWithId=function(_66){
return AjxCore._objectIds[_66];
};
AjxCore.addListener=function(_67,_68,_69){
_67=AjxCore._getEventSource(_67);
var _6a=AjxCore._getListenerStruct(_67,_68,true);
_6a.list[_6a.list.length]=_69;
};
AjxCore.setEventHandler=function(_6b,_6c,_6d){
_6b=AjxCore._getEventSource(_6b);
var _6e=AjxCore._getListenerStruct(_6b,_6c,true);
_6e.single=_6d;
};
AjxCore.removeListener=function(_6f,_70,_71){
_6f=AjxCore._getEventSource(_6f);
var _72=AjxCore._getListenerStruct(_6f,_70);
if(_72){
var _73=_72.list;
var len=_73.length;
for(var i=0;i<len;i++){
if(_73[i]==_71){
_73[i]=null;
}
}
}
};
AjxCore.removeAllListeners=function(_76,_77){
_76=AjxCore._getEventSource(_76);
var _78=AjxCore._getListenerStruct(_76,_77);
if(_78){
var _79=_78.list;
var len=_79.length;
for(var i=0;i<len;i++){
_79[i]=null;
}
}
AjxCore.unassignId(_78.id);
};
AjxCore.notifyListeners=function(_7c,_7d,_7e){
_7c=AjxCore._getEventSource(_7c);
var _7f=AjxCore._getListenerStruct(_7c,_7d);
if(_7f){
_7c[_7d](_7e);
}
};
AjxCore._getEventSource=function(_80){
if(typeof (_80)=="string"){
_80=document.getElementById(_80);
}
return _80;
};
AjxCore.getListenerStruct=function(_81,_82){
return AjxCore._getListenerStruct(_81,_82);
};
AjxCore._getListenerStruct=function(_83,_84,_85){
var _86=null;
if(_83[_84]){
var id=_83[_84]._lsListenerStructId;
_86=AjxCore.objectWithId(id);
}else{
if(_85){
_86=AjxCore._setupListener(_83,_84);
}
}
return _86;
};
AjxCore._setupListener=function(_88,_89,id){
var _8b=new Object();
_8b.list=new Array();
_8b.single=null;
var id=_8b.id=AjxCore.assignId(_8b);
var _8c=AjxCore._createListenerClosure(id);
_88[_89]=_8c;
_88[_89]._lsListenerStructId=id;
return _8b;
};
AjxCore._createListenerClosure=function(id){
var _8e=function(_8f){
var _90=AjxCore.objectWithId(id);
var _91=_90.list;
var len=_91.length;
for(var i=0;i<len;i++){
var _94=_91[i];
if(_94){
if(typeof (_94)=="string"){
eval(_94);
}else{
if(_94.handleEvent){
_94.handleEvent(_8f,this);
}else{
_94(_8f,this);
}
}
}
}
if(_90.single){
var _94=_90.single;
if(typeof (_94)=="string"){
eval(_94);
}else{
return _94.handleEvent?_94.handleEvent(_8f,this):_94(_8f,this);
}
}
};
return _8e;
};
AjxCore.addOnloadListener=function(_95){
if(window.onload&&(!window.onload._lsListenerStructId)){
var _96=window.onload;
window.onload=null;
AjxCore.addListener(window,"onload",_96);
}
AjxCore.addListener(window,"onload",_95);
};
AjxCore.addOnunloadListener=function(_97){
if(window.onunload&&(!window.onunload._lsListenerStructId)){
var _98=window.onunload;
window.onunload=null;
AjxCore.addListener(window,"onunload",_98);
}
AjxCore.addListener(window,"onunload",_97);
};
function AjxUtil(){
}
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(_99){
return ((_99!==void 0)&&(_99!==null));
};
AjxUtil.isUndefined=function(_9a){
return (_9a===void 0);
};
AjxUtil.isNull=function(_9b){
return (_9b===null);
};
AjxUtil.isBoolean=function(_9c){
return (typeof (_9c)=="boolean");
};
AjxUtil.isString=function(_9d){
return (typeof (_9d)=="string");
};
AjxUtil.isNumber=function(_9e){
return (typeof (_9e)=="number");
};
AjxUtil.isObject=function(_9f){
return ((typeof (_9f)=="object")&&(_9f!==null));
};
AjxUtil.isArray=function(_a0){
return AjxUtil.isInstance(_a0,Array);
};
AjxUtil.isFunction=function(_a1){
return (typeof (_a1)=="function");
};
AjxUtil.isDate=function(_a2){
return AjxUtil.isInstance(_a2,Date);
};
AjxUtil.isLifeTime=function(_a3){
return AjxUtil.LIFETIME_FIELD.test(_a3);
};
AjxUtil.isNumeric=function(_a4){
return (!isNaN(parseFloat(_a4))&&AjxUtil.FLOAT_RE.test(_a4)&&!AjxUtil.NOTFLOAT_RE.test(_a4));
};
AjxUtil.isLong=function(_a5){
return (AjxUtil.isNumeric(_a5)&&!AjxUtil.NOTINT_RE.test(_a5));
};
AjxUtil.isNonNegativeLong=function(_a6){
return (AjxUtil.isNumeric(_a6)&&AjxUtil.isLong(_a6)&&(parseFloat(_a6)>=0));
};
AjxUtil.IP_ADDRESS_RE=/^\d{1,3}(\.\d{1,3}){3}(\.\d{1,3}\.\d{1,3})?$/;
AjxUtil.DOMAIN_NAME_SHORT_RE=/^[A-Za-z0-9\-]{2,}$/;
AjxUtil.DOMAIN_NAME_FULL_RE=/^[A-Za-z0-9\-]{2,}(\.[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.EMAIL_RE=/^([a-zA-Z0-9_\-\'])+((\.)?([a-zA-Z0-9_\-\'])+)*@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
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(s){
return AjxUtil.IP_ADDR_RE.test(s);
};
AjxUtil.isDomain=function(s){
return AjxUtil.DOMAIN_RE.test(s);
};
AjxUtil.isHostName=function(s){
return AjxUtil.HOST_NAME_RE.test(s);
};
AjxUtil.isDomainName=function(s,_ab){
return _ab?AjxUtil.DOMAIN_NAME_SHORT_RE.test(s):AjxUtil.DOMAIN_NAME_FULL_RE.test(s);
};
AjxUtil.isEmailAddress=function(s,_ad){
return _ad?AjxUtil.EMAIL_SHORT_RE.test(s):AjxUtil.EMAIL_FULL_RE.test(s);
};
AjxUtil.SIZE_GIGABYTES="GB";
AjxUtil.SIZE_MEGABYTES="MB";
AjxUtil.SIZE_KILOBYTES="KB";
AjxUtil.SIZE_BYTES="B";
AjxUtil.formatSize=function(_ae,_af,_b0){
if(_af==null){
_af=true;
}
if(_b0==null){
_b0=20;
}
var _b1=AjxUtil.SIZE_BYTES;
if(_ae>=1073741824){
_ae/=1073741824;
_b1=AjxUtil.SIZE_GIGABYTES;
}else{
if(_ae>=1048576){
_ae/=1048576;
_b1=AjxUtil.SIZE_MEGABYTES;
}else{
if(_ae>1023){
_ae/=1024;
_b1=AjxUtil.SIZE_KILOBYTES;
}
}
}
var _b2=_af?Math.round(_ae):_ae.toFixed(_b0).replace(/\.?0+$/,"");
var _b3=" "+_b1;
return _b2+_b3;
};
AjxUtil.formatSizeForUnits=function(_b4,_b5,_b6,_b7){
if(_b5==null){
_b5=AjxUtil.SIZE_BYTES;
}
if(_b6==null){
_b6=true;
}
if(_b7==null){
_b7=20;
}
switch(_b5){
case AjxUtil.SIZE_GIGABYTES:
_b4/=1073741824;
break;
case AjxUtil.SIZE_MEGABYTES:
_b4/=1048576;
break;
case AjxUtil.SIZE_KILOBYTES:
_b4/=1024;
break;
}
var _b8=_b6?Math.round(_b4):_b4.toFixed(_b7).replace(/\.?0+$/,"");
return _b8;
};
AjxUtil.parseSize=function(_b9,_ba){
if(typeof _b9!=_STRING_){
_b9=_b9.toString();
}
var _bb=parseFloat(_b9.replace(/^\s*/,""));
var _bc=/[GMK]?B$/i;
var _bd=_bc.exec(_b9);
if(_bd){
_ba=_bd[0].toUpperCase();
}
switch(_ba){
case AjxUtil.SIZE_GIGABYTES:
_bb*=1073741824;
break;
case AjxUtil.SIZE_MEGABYTES:
_bb*=1048576;
break;
case AjxUtil.SIZE_KILOBYTES:
_bb*=1024;
break;
}
return _bb;
};
AjxUtil.isInstance=function(_be,_bf){
return !!(_be&&_be.constructor&&(_be.constructor===_bf));
};
AjxUtil.assert=function(_c0,_c1){
if(!_c0&&AjxUtil.onassert){
AjxUtil.onassert(_c1);
}
};
AjxUtil.onassert=function(_c2){
var _c3=new Object();
_c3.message=_c2;
var _c4=new Array();
if(AjxEnv.isIE5_5up){
var _c5=arguments.caller;
while(_c5){
_c4[_c4.length]=_c5.callee;
_c5=_c5.caller;
}
}else{
try{
var _c5=arguments.callee.caller;
while(_c5){
_c4[_c4.length]=_c5;
if(_c4.length>2){
break;
}
_c5=_c5.caller;
}
}
catch(e){
}
}
_c3.stack=_c4;
var _c6="";
var _c7=170;
for(var i=1;i<_c4.length;i++){
if(i>1){
_c6+="\n";
}
if(i<11){
var fs=_c4[i].toString();
if(fs.length>_c7){
fs=fs.substr(0,_c7)+"...";
fs=fs.replace(/\n/g,"");
}
_c6+=i+": "+fs;
}else{
_c6+="("+(_c4.length-11)+" frames follow)";
break;
}
}
alert("assertion:\n\n"+_c2+"\n\n---- Call Stack ---\n"+_c6);
throw _c3;
};
AjxUtil.NODE_REPEATS=new Object();
AjxUtil.NODE_REPEATS["folder"]=true;
AjxUtil.NODE_REPEATS["search"]=true;
AjxUtil.NODE_REPEATS["tag"]=true;
AjxUtil.NODE_REPEATS["pref"]=true;
AjxUtil.NODE_REPEATS["attr"]=true;
AjxUtil.NODE_REPEATS["c"]=true;
AjxUtil.NODE_REPEATS["m"]=true;
AjxUtil.NODE_REPEATS["cn"]=true;
AjxUtil.NODE_REPEATS["e"]=true;
AjxUtil.NODE_REPEATS["a"]=true;
AjxUtil.NODE_REPEATS["mbx"]=true;
AjxUtil.NODE_REPEATS["prefs"]=true;
AjxUtil.NODE_REPEATS["attrs"]=true;
AjxUtil.NODE_REPEATS["tags"]=true;
AjxUtil.NODE_IS_ATTR=new Object();
AjxUtil.NODE_IS_ATTR["authToken"]=true;
AjxUtil.NODE_IS_ATTR["lifetime"]=true;
AjxUtil.NODE_IS_ATTR["sessionId"]=true;
AjxUtil.NODE_IS_ATTR["name"]=true;
AjxUtil.NODE_IS_ATTR["quotaUsed"]=true;
AjxUtil.NODE_IS_ATTR["su"]=true;
AjxUtil.NODE_IS_ATTR["fr"]=true;
AjxUtil.NODE_IS_ATTR["mid"]=true;
AjxUtil.NODE_CONTENT=new Object();
AjxUtil.NODE_CONTENT["pref"]=true;
AjxUtil.NODE_CONTENT["attr"]=true;
AjxUtil.NODE_CONTENT["a"]=true;
AjxUtil.ELEMENT_NODE=1;
AjxUtil.TEXT_NODE=3;
AjxUtil.xmlToJs=function(_ca,_cb){
if(_ca.nodeType==AjxUtil.TEXT_NODE){
return ["\"",_ca.data,"\""].join("");
}
var _cc=_ca.name?_ca.name:_ca.localName;
if(_ca.nodeType==AjxUtil.ELEMENT_NODE){
var _cd=(_ca.childNodes&&_ca.childNodes.length==1&&(_ca.childNodes[0].nodeType==AjxUtil.TEXT_NODE));
var _ce;
if(_cb){
_ce="{";
}else{
if(_cd){
_ce=[_cc,":"].join("");
}else{
_ce=[_cc,":{"].join("");
}
}
var _cf=false;
if(_ca.attributes){
for(var i=0;i<_ca.attributes.length;i++){
var _d1=_ca.attributes[i];
if(_d1.name=="xmlns"){
continue;
}
if(_cf){
_ce+=",";
}
var _d2=AjxUtil.isNumeric(_d1.value)?_d1.value:AjxUtil.jsEncode(_d1.value);
_ce=[_ce,_d1.name,":",_d2].join("");
_cf=true;
}
}
if(_ca.hasChildNodes()){
var _d3=new Object();
var _d4=false;
var len=_ca.childNodes.length;
for(var i=0;i<len;i++){
var _d6=_ca.childNodes[i];
var _d7=_d6.name?_d6.name:_d6.localName;
var _d8=AjxUtil.NODE_IS_ATTR[_d7]||(_cc=="content"&&parent.name=="note");
if(_d8){
if(_cf){
_ce+=",";
}
_ce=[_ce,_d7,":",AjxUtil.jsEncode(_d6.textContent)].join("");
_cf=true;
}else{
if(!_d3[_d7]){
_d3[_d7]=new Array();
}
_d3[_d7].push(_d6);
_d4=true;
}
}
if(_d4&&_cf){
_ce+=",";
_cf=false;
}
for(var _d7 in _d3){
if(_cf){
_ce+=",";
_cf=false;
}
var _d9=AjxUtil.NODE_REPEATS[_d7]||(_d7=="mp"&&_cc=="mp");
if(_d9){
_ce+=_d7+":[";
}
var _da=_d3[_d7];
for(var i=0;i<_da.length;i++){
if(_cf){
_ce+=",";
}
_ce+=AjxUtil.xmlToJs(_da[i],_d9);
_cf=true;
}
if(_d9){
_ce+="]";
}
}
}
if(!_cd){
_ce+="}";
}
}
return _ce;
};
AjxUtil.JS_CHAR_ENCODINGS=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];
AjxUtil.jsEncode=function(_db){
if(!_db){
return "\"\"";
}
var _dc="\"";
for(var i=0;i<_db.length;i++){
var c=_db.charAt(i);
switch(c){
case "\\":
case "\"":
case "/":
_dc+="\\"+c;
break;
default:
var _df=_db.charCodeAt(i);
_dc+=(_df<32)?AjxUtil.JS_CHAR_ENCODINGS[_df]:c;
}
}
_dc+="\"";
return _dc;
};
AjxUtil.getInnerText=function(_e0){
if(AjxEnv.isIE){
return _e0.innerText;
}
function f(n){
if(n){
if(n.nodeType==3){
return n.data;
}
if(n.nodeType==1){
if(/^br$/i.test(n.tagName)){
return "\r\n";
}
var str="";
for(var i=n.firstChild;i;i=i.nextSibling){
str+=f(i);
}
return str;
}
}
return "";
}
return f(_e0);
};
AjxUtil.createProxy=function(_e4,_e5){
var _e6;
var _e7=function(){
};
_e7.prototype=_e4;
if(_e4 instanceof Array){
_e6=new Array();
var cnt=_e4.length;
for(var ix=0;ix<cnt;ix++){
_e6[ix]=_e4[ix];
}
}else{
_e6=new _e7;
}
if(_e5){
for(var _ea in _e4){
if(typeof _e4[_ea]=="object"){
_e6[_ea]=AjxUtil.createProxy(_e4[_ea],_e5-1);
}
}
}
_e6._object_=_e4;
return _e6;
};
AjxUtil.collapseList=function(_eb){
var _ec=[];
for(var i=0;i<_eb.length;i++){
if(_eb[i]){
_ec.push(_eb[i]);
}
}
return _ec;
};
AjxUtil.indexOf=function(_ee,_ef,_f0){
if(_ee){
for(var i=0;i<_ee.length;i++){
var _f2=_ee[i];
if((_f0&&_f2===_ef)||(!_f0&&_f2==_ef)){
return i;
}
}
}
return -1;
};
AjxUtil.keys=function(_f3){
var _f4=[];
for(var p in _f3){
_f4.push(p);
}
return _f4;
};
AjxUtil.values=function(_f6){
var _f7=[];
for(var p in _f6){
_f7.push(_f6[p]);
}
return _f7;
};
AjxUtil.parseQueryString=function(){
var _f9=""+window.location;
var _fa=_f9.indexOf("?");
if(_fa==-1){
return {};
}
var _fb=_f9.substring(_fa+1).split("&");
var _fc={};
for(var i=0;i<_fb.length;i++){
var _fe=_fb[i].split("=");
_fc[_fe[0]]=_fe[1];
}
return _fc;
};
function AjxException(msg,code,_101,_102){
if(arguments.length==0){
return;
}
this.msg=msg;
this.code=code;
this.method=_101;
this.detail=_102;
}
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";
function AjxCookie(){
}
AjxCookie.prototype.toString=function(){
return "AjxCookie";
};
AjxCookie.getCookie=function(doc,name){
var arg=name+"=";
var alen=arg.length;
var clen=doc.cookie.length;
var _108=doc.cookie;
var i=0;
while(i<clen){
var j=i+alen;
if(_108.substring(i,j)==arg){
var _10b=_108.indexOf(";",j);
if(_10b==-1){
_10b=_108.length;
}
return unescape(_108.substring(j,_10b));
}
i=_108.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
};
AjxCookie.setCookie=function(doc,name,_10e,_10f,path,_111,_112){
doc.cookie=name+"="+escape(_10e)+((_10f)?"; expires="+_10f.toGMTString():"")+((path)?"; path="+path:"")+((_111)?"; domain="+_111:"")+((_112)?"; secure":"");
};
AjxCookie.deleteCookie=function(doc,name,path,_116){
doc.cookie=name+"="+((path)?"; path="+path:"")+((_116)?"; domain="+_116:"")+"; expires=Fri, 31 Dec 1999 23:59:59 GMT";
};
AjxCookie.areCookiesEnabled=function(doc){
var name="ZM_COOKIE_TEST";
var _119="Zimbra";
AjxCookie.setCookie(doc,name,_119);
var _11a=AjxCookie.getCookie(doc,name);
AjxCookie.deleteCookie(doc,name);
return _11a==_119;
};
function AjxSoapException(msg,code,_11d,_11e){
AjxException.call(this,msg,code,_11d,_11e);
}
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";
function AjxSoapFault(_11f){
if(arguments.length==0){
return;
}
var _120=_11f.prefix;
var _121=_120+":Code";
var _122=_120+":Reason";
var _123=_120+":Detail";
var len=_11f.childNodes.length;
for(var i=0;i<len;i++){
var _126=_11f.childNodes[i];
if(_126.nodeName==_121){
var _127=_126.firstChild.firstChild.nodeValue;
if(_127==(_120+":VersionMismatch")){
this.faultCode=AjxSoapFault.VERSION_MISMATCH;
}else{
if(_127==(_120+":MustUnderstand")){
this.faultCode=AjxSoapFault.MUST_UNDERSTAND;
}else{
if(_127==(_120+":DataEncodingUnknown")){
this.faultCode=AjxSoapFault.DATA_ENCODING_UNKNOWN;
}else{
if(_127==(_120+":Sender")){
this.faultCode=AjxSoapFault.SENDER;
}else{
if(_127==(_120+":Receiver")){
this.faultCode=AjxSoapFault.RECEIVER;
}else{
this.faultCode=AjxSoapFault.UNKNOWN;
}
}
}
}
}
}else{
if(_126.nodeName==_122){
this.reason=_126.firstChild.firstChild.nodeValue;
}else{
if(_126.nodeName==_123){
this.errorCode=_126.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;
function AjxSoapDoc(){
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(_128,_129,_12a,_12b){
var sd=new AjxSoapDoc();
sd._xmlDoc=AjxXmlDoc.create();
var d=sd._xmlDoc.getDoc();
if(!_12b){
_12b=AjxSoapDoc._SOAP_URI;
}
sd._soapURI=_12b;
var _12e=d.createElementNS&&!AjxEnv.isSafari;
var _12f=_12e?d.createElementNS(_12b,"soap:Envelope"):d.createElement("soap:Envelope");
if(!_12e){
_12f.setAttribute("xmlns:soap",_12b);
}
d.appendChild(_12f);
var _130=_12e?d.createElementNS(_12b,"soap:Body"):d.createElement("soap:Body");
_12f.appendChild(_130);
sd._methodEl=_129&&_12e?d.createElementNS(_129,_128):d.createElement(_128);
if(_129!=null&&!_12e){
if(_12a==null){
sd._methodEl.setAttribute("xmlns",_129);
}else{
sd._methodEl.setAttribute("xmlns:"+_12a,_129);
}
}
_130.appendChild(sd._methodEl);
return sd;
};
AjxSoapDoc.createFromDom=function(doc){
var sd=new AjxSoapDoc();
sd._xmlDoc=AjxXmlDoc.createFromDom(doc);
sd._methodEl=sd._check(sd._xmlDoc);
return sd;
};
AjxSoapDoc.createFromXml=function(xml){
var sd=new AjxSoapDoc();
sd._xmlDoc=AjxXmlDoc.createFromXml(xml);
sd._methodEl=sd._check(sd._xmlDoc);
return sd;
};
AjxSoapDoc.element2FaultObj=function(el){
var _136=el.firstChild;
if(!AjxEnv.isSafari){
if(_136!=null&&_136.namespaceURI!=AjxSoapDoc._SOAP_URI||_136.nodeName!=(el.prefix+":Fault")){
return null;
}
}else{
if(_136!=null&&_136.nodeName!=(el.prefix+":Fault")){
return null;
}
}
return new AjxSoapFault(_136);
};
AjxSoapDoc.prototype.setMethodAttribute=function(name,_138){
this._methodEl.setAttribute(name,_138);
};
AjxSoapDoc.prototype.set=function(name,_13a,_13b,_13c){
var doc=this.getDoc();
var _13e=doc.createElementNS&&!AjxEnv.isSafari;
var p=name?(_13c&&_13e?doc.createElementNS(_13c,name):doc.createElement(name)):doc.createDocumentFragment();
if(_13c&&!_13e){
p.setAttribute("xmlns",_13c);
}
if(_13a!=null){
if(typeof _13a=="object"){
for(i in _13a){
this.set(i,_13a[i],p);
}
}else{
if(AjxEnv.isSafari){
_13a=AjxStringUtil.xmlEncode(_13a);
}
p.appendChild(doc.createTextNode(_13a));
}
}
if(!_13b){
_13b=this._methodEl;
}
return _13b.appendChild(p);
};
AjxSoapDoc.prototype.getMethod=function(){
return this._methodEl;
};
AjxSoapDoc.prototype.createHeaderElement=function(){
var d=this._xmlDoc.getDoc();
var _141=d.firstChild;
var _142=this.getHeader();
if(_142!=null){
throw new AjxSoapException("SOAP header already exists",AjxSoapException.ELEMENT_EXISTS,"AjxSoapDoc.prototype.createHeaderElement");
}
var _143=d.createElementNS&&!AjxEnv.isSafari;
_142=_143?d.createElementNS(this._soapURI,"soap:Header"):d.createElement("soap:Header");
_141.insertBefore(_142,_141.firstChild);
return _142;
};
AjxSoapDoc.prototype.getHeader=function(){
var d=this._xmlDoc.getDoc();
var _145=AjxEnv.isIE?(d.getElementsByTagName(d.firstChild.prefix+":Header")):(d.getElementsByTagNameNS(this._soapURI,"Header"));
return _145?_145[0]:null;
};
AjxSoapDoc.prototype.getBody=function(){
var d=this._xmlDoc.getDoc();
var _147=AjxEnv.isIE?(d.getElementsByTagName(d.firstChild.prefix+":Body")):(d.getElementsByTagNameNS(this._soapURI,"Body"));
return _147?_147[0]:null;
};
AjxSoapDoc.prototype.getByTagName=function(type){
if(type.indexOf(":")==-1){
type="soap:"+type;
}
var a=this.getDoc().getElementsByTagName(type);
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(node){
if(AjxEnv.isFirefox3up||!AjxEnv.isFirefox){
try{
var doc=this.getDoc();
if(doc.adoptNode){
return doc.adoptNode(node,true);
}
}
catch(ex){
}
}
return node.parentNode.removeChild(node);
};
AjxSoapDoc.prototype.getXml=function(){
return AjxEnv.isSafari||AjxEnv.isOpera?(AjxXmlDoc.getXml(this._xmlDoc.getDoc())):this._xmlDoc.getDoc().xml;
};
AjxSoapDoc.prototype._check=function(_14c){
var doc=_14c.getDoc();
if(doc.childNodes.length!=1){
throw new AjxSoapException("Invalid SOAP PDU",AjxSoapException.INVALID_PDU,"AjxSoapDoc.createFromXml:1");
}
var el=doc.firstChild;
if(!AjxEnv.isSafari){
if(el.namespaceURI!=AjxSoapDoc._SOAP_URI||el.nodeName!=(el.prefix+":Envelope")||(el.childNodes.length<1||el.childNodes.length>2)){
throw new AjxSoapException("Invalid SOAP PDU",AjxSoapException.INVALID_PDU,"AjxSoapDoc.createFromXml:2");
}
}else{
if(el.nodeName!=(el.prefix+":Envelope")){
throw new AjxSoapException("Invalid SOAP PDU",AjxSoapException.INVALID_PDU,"AjxSoapDoc.createFromXml:2");
}
}
};
function AjxRpcRequest(id){
if(!AjxRpcRequest.__inited){
AjxRpcRequest.__init();
}
this.id=id;
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(_150,_151,_152,_153,_154,_155){
var _156=(_153!=null);
this.__httpReq.open((_154)?"get":"post",_151,_156);
if(_156){
this.__callback=_153;
if(_155){
var _157=new AjxTimedAction(this,AjxRpcRequest.__handleTimeout,{callback:_153,req:this});
_153._timedActionId=AjxTimedAction.scheduleAction(_157,_155);
}
var _158=this;
this.__httpReq.onreadystatechange=function(ev){
AjxRpcRequest.__handleResponse(_158,_153);
};
}else{
this.__httpReq.onreadystatechange=function(ev){
};
}
if(_152){
for(var i in _152){
this.__httpReq.setRequestHeader(i,_152[i]);
}
}
this.__httpReq.send(_150);
if(_156){
return this.id;
}else{
if(this.__httpReq.status==200){
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(){
this.__httpReq.abort();
};
AjxRpcRequest.__handleTimeout=function(args){
args.req.cancel();
args.callback.run({text:null,xml:null,success:false,status:AjxRpcRequest.TIMEDOUT});
};
AjxRpcRequest.__handleResponse=function(req,_15e){
if(!req||!req.__httpReq){
_15e.run({text:null,xml:null,success:false,status:500});
return;
}
if(req.__httpReq.readyState==4){
if(_15e._timedActionId!==null){
AjxTimedAction.cancelAction(_15e._timedActionId);
}
var _15f=500;
try{
_15f=req.__httpReq.status;
}
catch(ex){
}
if(_15f==200){
_15e.run({text:req.__httpReq.responseText,xml:req.__httpReq.responseXML,success:true});
}else{
_15e.run({text:req.__httpReq.responseText,xml:req.__httpReq.responseXML,success:false,status:_15f});
}
if(req.__ctxt){
req.__ctxt.busy=false;
}
}
};
AjxRpcRequest.prototype.__setCtxt=function(ctxt){
this.__ctxt=ctxt;
};
AjxRpcRequest.__init=function(){
if(!window.XMLHttpRequest&&window.ActiveXObject){
var _161=["MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
for(var i=0;i<_161.length;i++){
try{
var x=new ActiveXObject(_161[i]);
AjxRpcRequest.__msxmlVers=_161[i];
break;
}
catch(ex){
}
}
if(!AjxRpcRequest.__msxmlVers){
throw new AjxException("MSXML not installed",AjxException.INTERNAL_ERROR,"AjxRpc._init");
}
}
AjxRpcRequest.__inited=true;
};
function AjxRpc(){
}
AjxRpc.__rpcCache=[];
AjxRpc.__RPC_CACHE_MAX=100;
AjxRpc.__RPC_REAP_COUNT=5;
AjxRpc.__RPC_REAP_AGE=300000;
AjxRpc.invoke=function(_164,_165,_166,_167,_168,_169){
var _16a=(_167!=null);
var _16b=AjxRpc.__getFreeRpcCtxt();
try{
var _16c=_16b.req.invoke(_164,_165,_166,_167,_168,_169);
}
catch(ex){
var _16d=new AjxException();
_16d.method="AjxRpc.prototype._invoke";
if(ex instanceof Error){
_16d.detail=ex.message;
_16d.code=AjxException.NETWORK_ERROR;
_16d.msg="Network error";
}else{
_16d.detail=ex.toString();
_16d.code=AjxException.UNKNOWN_ERROR;
_16d.msg="Unknown Error";
}
if(!_16a){
_16b.busy=false;
}
throw _16d;
}
if(!_16a){
_16b.busy=false;
}
return _16c;
};
AjxRpc.getRpcRequest=function(id){
for(var i=0;i<AjxRpc.__rpcCache.length;i++){
var _170=AjxRpc.__rpcCache[i];
if(_170.id==id){
return _170.req;
}
}
return null;
};
AjxRpc.__getFreeRpcCtxt=function(){
var _171=null;
for(var i=0;i<AjxRpc.__rpcCache.length;i++){
_171=AjxRpc.__rpcCache[i];
if(!_171.busy){
break;
}
}
if(i==AjxRpc.__rpcCache.length){
if(AjxRpc.__rpcCache.length==AjxRpc.__RPC_CACHE_MAX){
throw new AjxException("Out of RPC cache",AjxException.OUT_OF_RPC_CACHE,"AjxRpc.__getFreeRpcCtxt");
}else{
if(i>0&&(i%AjxRpc.__RPC_REAP_COUNT==0)){
AjxRpc.__reap();
}
}
var id="__RpcCtxt_"+i;
_171=new __RpcCtxt(id);
AjxRpc.__rpcCache.push(_171);
}
_171.busy=true;
_171.timestamp=(new Date()).getTime();
return _171;
};
AjxRpc.__reap=function(){
var time=(new Date()).getTime();
for(var i=0;i<AjxRpc.__rpcCache.length;i++){
var _176=AjxRpc.__rpcCache[i];
if(_176.timestamp+AjxRpc.__RPC_REAP_AGE<time){
_176.req.cancel();
_176.busy=false;
}
}
};
function __RpcCtxt(id){
this.id=id;
this.req=new AjxRpcRequest(id);
this.req.__setCtxt(this);
this.busy=false;
}
function AjxWindowOpener(){
}
AjxWindowOpener.HELPER_URL="";
AjxWindowOpener.PARAM_INSTANCE_ID="id";
AjxWindowOpener.PARAM_ASYNC="async";
AjxWindowOpener.openBlank=function(name,args,_17a,_17b){
return AjxWindowOpener.open(AjxWindowOpener.HELPER_URL,name,args,_17a,_17b);
};
AjxWindowOpener.open=function(url,name,args,_17f,_180){
var _181;
if(url&&url!=""){
var _180=_180===true;
var _182={callback:_17f};
var id=AjxCore.assignId(_182);
var _184=url&&url!=""?(url+"?id="+id+"&async="+_180):"";
_181=_182.window=window.open(_184,name,args);
}else{
_181=window.open("",name,args);
if(_17f){
var ta=new AjxTimedAction(_17f.obj,_17f);
AjxTimedAction.scheduleAction(ta,0);
}
}
return _181;
};
AjxWindowOpener.onWindowOpened=function(_186){
var _187=AjxCore.objectWithId(_186);
AjxCore.unassignId(_186);
if(!_187.window.closed&&_187.callback){
_187.callback.run();
}
};
function AjxVector(){
this._array=new Array();
}
AjxVector.prototype.toString=function(sep,_189){
if(_189!==true){
return this._array.join(sep);
}
var a=new Array();
for(var i=0;i<this._array.length;i++){
var x=this._array[i];
if(x!=undefined&&x!=null&&x!=""){
a.push(x);
}
}
return a.join(sep);
};
AjxVector.fromArray=function(list){
var vec=new AjxVector();
vec._array.length=0;
if(list instanceof Array){
vec._array=list;
}
return vec;
};
AjxVector.prototype.size=function(){
return this._array.length;
};
AjxVector.prototype.add=function(obj,_190){
if(_190==null||_190<0||_190>=this._array.length){
this._array.push(obj);
}else{
this._array.splice(_190,0,obj);
}
};
AjxVector.prototype.addList=function(list){
if(!list){
return;
}
if(list.length){
this._array=this._array.concat(list);
}else{
if(list.size&&list.size()){
this._array=this._array.concat(list._array);
}
}
};
AjxVector.prototype.remove=function(obj){
for(var i=0;i<this._array.length;i++){
if(this._array[i]==obj){
this._array.splice(i,1);
return true;
}
}
return false;
};
AjxVector.prototype.removeAt=function(_194){
if(_194>=this._array.length||_194<0){
return null;
}
var _195=this._array.splice(_194,1);
var ret=null;
if(_195){
ret=_195[0];
}
return ret;
};
AjxVector.prototype.removeAll=function(){
for(var i=0;i<this._array.length;i++){
this._array[i]=null;
}
this._array.length=0;
};
AjxVector.prototype.removeLast=function(){
return this._array.length>0?this._array.pop():null;
};
AjxVector.prototype.replace=function(_198,_199){
var _19a=this._array[_198];
this._array[_198]=_199;
return _19a;
};
AjxVector.prototype.replaceObject=function(obj,_19c){
for(var i=0;i<this._array.length;i++){
if(this._array[i]==obj){
this._array[i]=_19c;
return obj;
}
}
return null;
};
AjxVector.prototype.indexOf=function(obj){
if(obj==null){
return -1;
}
for(var i=0;i<this._array.length;i++){
if(this._array[i]==obj){
return i;
}
}
return -1;
};
AjxVector.prototype.indexOfLike=function(obj,_1a1){
var _1a2=_1a1.call(obj);
for(var i=0;i<this._array.length;i++){
var test=_1a1.call(this._array[i]);
if(test==_1a2){
return i;
}
}
return -1;
};
AjxVector.prototype.clone=function(){
var vec=new AjxVector();
vec.addList(this);
return vec;
};
AjxVector.prototype.contains=function(obj){
for(var i=0;i<this._array.length;i++){
if(this._array[i]==obj){
return true;
}
}
return false;
};
AjxVector.prototype.containsLike=function(obj,_1a9){
var _1aa=_1a9.call(obj);
for(var i=0;i<this._array.length;i++){
var test=_1a9.call(this._array[i]);
if(test==_1aa){
return true;
}
}
return false;
};
AjxVector.prototype.get=function(_1ad){
return _1ad>=this._array.length||_1ad<0?null:this._array[_1ad];
};
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(obj){
var idx=this.indexOf(obj);
if(idx==-1){
return null;
}
return this.get(++idx);
};
AjxVector.prototype.getPrev=function(obj){
var idx=this.indexOf(obj);
if(idx==-1){
return null;
}
return this.get(--idx);
};
AjxVector.prototype.sort=function(_1b2){
if(!_1b2){
_1b2=AjxVector._defaultArrayComparator;
}
this._array.sort(_1b2);
};
AjxVector.prototype.binarySearch=function(_1b3,_1b4){
if(!_1b4){
_1b4=AjxVector._defaultArrayComparator;
}
var l=0;
var arr=this._array;
var u=arr.length-1;
while(true){
if(u<l){
return -1;
}
var i=Math.floor((l+u)/2);
var _1b9=_1b4(_1b3,arr[i]);
if(_1b9<0){
u=i-1;
}else{
if(_1b9>0){
l=i+1;
}else{
return i;
}
}
}
};
AjxVector.prototype.merge=function(_1ba,list){
if(_1ba<0){
return;
}
var _1bc=list instanceof AjxVector?list.getArray():list;
var _1bd=this._array.length<(_1ba+_1bc.length)?this._array.length:_1ba+_1bc.length;
if(_1ba<this._array.length){
var _1be=0;
for(var i=_1ba;i<_1bd;i++){
this._array[i]=_1bc[_1be++];
}
if(_1be<_1bc.length){
this._array=this._array.concat(_1bc.slice(_1be));
}
}else{
this._array=this._array.concat(_1bc);
}
};
AjxVector._defaultArrayComparator=function(a,b){
return a<b?-1:(a>b?1:0);
};
function AjxStringUtil(){
}
AjxStringUtil.TRIM_RE=/^\s+|\s+$/g;
AjxStringUtil.COMPRESS_RE=/\s+/g;
AjxStringUtil.ELLIPSIS=" ... ";
AjxStringUtil.makeString=function(val){
return val?String(val):"";
};
AjxStringUtil.trim=function(str,_1c4,_1c5){
if(!str){
return "";
}
var _1c6=AjxStringUtil.TRIM_RE;
var _1c7=AjxStringUtil.COMPRESS_RE;
if(_1c5){
_1c6=new RegExp("^"+_1c5+"+|"+_1c5+"+$","g");
_1c7=new RegExp(_1c5+"+","g");
}else{
_1c5=" ";
}
str=str.replace(_1c6,"");
if(_1c4){
str=str.replace(_1c7,_1c5);
}
return str;
};
AjxStringUtil.repeat=function(str,num){
var text="";
for(var i=0;i<num;i++){
text+=str;
}
return text;
};
AjxStringUtil.getUnitsFromSizeString=function(_1cc){
var _1cd="px";
if(typeof (_1cc)=="string"){
var _1ce=Number(parseInt(_1cc,10)).toString();
if(_1cc.length>_1ce.length){
_1cd=_1cc.substr(_1ce.length,(_1cc.length-_1ce.length));
if(!(_1cd=="em"||_1cd=="ex"||_1cd=="px"||_1cd=="in"||_1cd=="cm"==_1cd=="mm"||_1cd=="pt"||_1cd=="pc"||_1cd=="%")){
_1cd="px";
}
}
}
return _1cd;
};
AjxStringUtil.split=function(str,dels){
if(!str){
return new Array();
}
var i=0;
dels=dels?dels:",";
var _1d2=new Object();
if(typeof dels=="string"){
_1d2[dels]=1;
}else{
for(i=0;i<dels.length;i++){
_1d2[dels[i]]=1;
}
}
var q=false;
var p=0;
var _1d5=0;
var _1d6;
var _1d7=new Array();
var j=0;
for(i=0;i<str.length;i++){
var c=str.charAt(i);
if(c=="\""){
q=!q;
}else{
if(c=="("){
p++;
}else{
if(c==")"){
p--;
}else{
if(_1d2[c]){
if(!q&&!p){
_1d6=str.substring(_1d5,i);
_1d7[j++]=_1d6;
_1d5=i+1;
}
}
}
}
}
}
_1d6=str.substring(_1d5,str.length);
_1d7[j++]=_1d6;
return _1d7;
};
AjxStringUtil.wordWrap=function(text,len,pre,eol,_1de,_1df){
if(!text){
return "";
}
len=len?len:80;
eol=eol?eol:"\n";
pre=pre?pre:"";
len-=pre.length;
var _1e0=new Array();
var c=0;
text=AjxStringUtil.trim(text,false);
text=text.replace(/[ \t]+\n/g,"\n");
if(_1df){
text=text.replace(/\b\n\b/g," ");
}
var _1e2=text.length;
for(var i=0,bk=0,sp=-1;i<_1e2;i++){
var ch=text.charAt(i);
if(ch.match(/[ \t]/)){
sp=i;
}
if(ch=="\n"){
_1e0[c++]=pre+text.substring(bk,i);
bk=i+1;
sp=-1;
}
if(i-bk>=len){
if(sp==-1){
if(_1de){
_1e0[c++]=pre+text.substring(bk,i);
bk=i;
sp=-1;
}
}else{
_1e0[c++]=pre+text.substring(bk,sp);
bk=sp+1;
sp=-1;
}
}
}
if(i>bk){
_1e0[c++]=pre+text.substring(bk,i);
}
return _1e0.join(eol)+eol;
};
AjxStringUtil.IS_PRINT_CODE=new Object();
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(_1e5){
return AjxStringUtil.IS_PRINT_CODE[_1e5];
};
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(_1e6,_1e7){
return _1e7?AjxStringUtil.SHIFT_CHAR[_1e6]||String.fromCharCode(_1e6):String.fromCharCode(_1e6);
};
AjxStringUtil.diffPoint=function(str1,str2){
if(!(str1&&str2)){
return 0;
}
var len=Math.min(str1.length,str2.length);
var i=0;
while(i<len&&(str1.charAt(i)==str2.charAt(i))){
i++;
}
return i;
};
AjxStringUtil.resolve=function(str,_1ed){
return AjxMessageFormat.format(str,_1ed);
};
AjxStringUtil.urlEncode=function(str){
if(!str){
return "";
}
var func=window.encodeURL||window.encodeURI;
return func(str);
};
AjxStringUtil.urlComponentEncode=function(str){
if(!str){
return "";
}
var func=window.encodeURLComponent||window.encodeURIComponent;
return func(str);
};
AjxStringUtil.ENCODE_MAP={">":"&gt;","<":"&lt;","&":"&amp;"};
AjxStringUtil.htmlEncode=function(str,_1f3){
if(!str){
return "";
}
if(!AjxEnv.isSafari){
if(_1f3){
return str.replace(/[<>&]/g,function(_1f4){
return AjxStringUtil.ENCODE_MAP[_1f4];
}).replace(/  /g," &nbsp;");
}else{
return str.replace(/[<>&]/g,function(_1f5){
return AjxStringUtil.ENCODE_MAP[_1f5];
});
}
}else{
if(_1f3){
return str.replace(/[&]/g,"&amp;").replace(/  /g," &nbsp;").replace(/[<]/g,"&lt;").replace(/[>]/g,"&gt;");
}else{
return str.replace(/[&]/g,"&amp;").replace(/[<]/g,"&lt;").replace(/[>]/g,"&gt;");
}
}
};
AjxStringUtil.convertToHtml=function(str){
if(!str){
return "";
}
str=str.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 str;
};
AjxStringUtil.SPACE_ENCODE_MAP={" ":"&nbsp;",">":"&gt;","<":"&lt;","&":"&amp;","\n":"<br>"};
AjxStringUtil.htmlEncodeSpace=function(str){
if(!str){
return "";
}
if(!AjxEnv.isSafari){
return str.replace(/[ <>&\n]/g,function(_1f8){
return AjxStringUtil.SPACE_ENCODE_MAP[_1f8];
});
}else{
return str.replace(/[&]/g,"&amp;").replace(/ /g,"&nbsp;").replace(/[<]/g,"&lt;").replace(/[>]/g,"&gt;");
}
};
AjxStringUtil.nl2br=function(str){
if(!str){
return "";
}
return str.replace(/^ /mg,"&nbsp;").replace(/\t/mg,"<span style='white-space:pre'>\t</span>").replace(/\n/g,"<br>");
};
AjxStringUtil.xmlEncode=function(str){
if(str){
str=""+str;
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;");
}
return "";
};
AjxStringUtil.xmlDecode=function(str){
return str?str.replace(/&amp;/g,"&").replace(/&lt;/g,"<"):"";
};
AjxStringUtil.xmlAttrEncode=function(str){
return str?str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\x22/g,"&quot;").replace(/\x27/g,"&apos;"):"";
};
AjxStringUtil.xmlAttrDecode=function(str){
return str?str.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&quot;/g,"\"").replace(/&apos;/g,"'"):"";
};
AjxStringUtil.regExEscape=function(str){
return str.replace(/(\W)/g,"\\$1");
};
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(_1ff,_200,_201){
var _202=AjxStringUtil.calcDIV();
if(arguments.length==3){
_202.className=_201;
}
_202.innerHTML=_1ff;
if(_202.offsetWidth<=_200){
return _1ff;
}
for(var i=_1ff.length-1;i>0;i--){
var _204=_1ff.substr(0,i);
_202.innerHTML=_204+AjxStringUtil.ELLIPSIS;
if(_202.offsetWidth<=_200){
return _204+AjxStringUtil.ELLIPSIS;
}
}
return _1ff;
};
AjxStringUtil.wrap=function(_205,_206,_207){
var _208=AjxStringUtil.calcDIV();
if(arguments.length==3){
_208.className=_207;
}
var _209="";
var _20a="";
textRows=_205.split("/n");
for(var _20b=0;_20b<textRows.length;_20b++){
if(_20b!=0){
_209+=_20a+"<br>";
_20a="";
}
htmlRows=textRows[_20b].split("<br>");
for(var _20c=0;_20c<htmlRows.length;_20c++){
if(_20c!=0){
_209+=_20a+"<br>";
_20a="";
}
words=htmlRows[_20c].split(" ");
var _20d=0;
while(_20d<words.length){
_208.innerHTML=_20a+" "+words[_20d];
var _20e=_208.offsetWidth;
if(_20e>_206){
_208.innerHTML=words[_20d];
_20e=_20e-_208.offsetWidth;
if((_20e>=_206)||(_208.offsetWidth<=_206)){
_209+=_20a+"<br>";
_20a="";
}else{
var _20f=true;
var _210=0;
while(_20f){
_210++;
_208.innerHTML=_20a+" "+words[_20d].substring(0,_210);
_20f=(_208.offsetWidth<=_206);
}
_210--;
_209+=_20a+words[_20d].substring(0,_210)+"<br>";
words[_20d]=words[_20d].substr(_210);
_20a="";
}
}else{
_20a+=" "+words[_20d];
_20d++;
}
}
}
}
_209+=_20a;
return _209;
};
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.HDR_RE=/^\s*\w+:/;
AjxStringUtil.getTopLevel=function(text,eol){
eol=eol?eol:"\n";
text=AjxStringUtil._trimBlankLines(text,eol);
var _213=text.split(eol);
var len=_213.length;
var i=0,start=0;
var _216=new Array();
var _217=false;
while(i<len){
var _218=_217;
var skip=AjxStringUtil._linesToSkip(_213,i);
_217=(skip>0);
if(_218&&!_217){
start=i;
}else{
if(!_218&&_217&&i>start){
_216.push(AjxStringUtil._trimBlankLines(_213.slice(start,i).join(eol),eol)+eol);
}
}
i+=_217?skip:1;
}
if(!_217&&i>start){
_216.push(AjxStringUtil._trimBlankLines(_213.slice(start,i).join(eol),eol)+eol);
}
return _216;
};
AjxStringUtil._linesToSkip=function(_21a,i){
var len=_21a.length;
var skip=0;
var _21e=i;
if(AjxStringUtil.MSG_SEP_RE.test(_21a[i])){
skip=len-i;
}else{
if(AjxStringUtil.SIG_RE.test(_21a[i])){
skip=len-i;
}else{
if(AjxStringUtil.PREFIX_RE.test(_21a[i])){
while(i<_21a.length&&(AjxStringUtil.PREFIX_RE.test(_21a[i])||AjxStringUtil.BLANK_RE.test(_21a[i]))){
i++;
}
skip=i-_21e;
}else{
if(AjxStringUtil.COLON_RE.test(_21a[i])){
var idx=AjxStringUtil._nextNonBlankLineIndex(_21a,i+1);
var _220=(idx!=-1)?_21a[idx]:null;
if(_220&&AjxStringUtil.PREFIX_RE.test(_220)){
skip=idx-i;
}else{
if(idx!=-1){
idx=AjxStringUtil._nextNonBlankLineIndex(_21a,idx+1);
}
var _221=(idx!=-1)?_21a[idx]:null;
if(_221&&AjxStringUtil.BRACKET_RE.test(_220)&&AjxStringUtil.PREFIX_RE.test(_221)){
skip=idx-i;
}
}
}else{
if(AjxStringUtil.LINE_RE.test(_21a[i])){
var idx=AjxStringUtil._nextNonBlankLineIndex(_21a,i+1);
var _220=(idx!=-1)?_21a[idx]:null;
if(_220&&AjxStringUtil.HDR_RE.test(_220)){
skip=len-i;
}
}
}
}
}
}
return skip;
};
AjxStringUtil._nextNonBlankLineIndex=function(_222,i){
while(i<_222.length&&AjxStringUtil.BLANK_RE.test(_222[i])){
i++;
}
return ((i<_222.length)?i:-1);
};
AjxStringUtil._trimBlankLines=function(text,eol){
eol=eol?eol:"\n";
var _226=text.split(eol);
var len=_226.length;
var i=0;
while(i<len&&AjxStringUtil.BLANK_RE.test(_226[i])){
i++;
}
var j=len;
while(j>0&&AjxStringUtil.BLANK_RE.test(_226[j-1])){
j--;
}
if(i!=0||j!=len){
text=_226.slice(i,j).join(eol)+eol;
}
return text;
};
AjxStringUtil._NO_LIST=0;
AjxStringUtil._ORDERED_LIST=1;
AjxStringUtil._UNORDERED_LIST=2;
AjxStringUtil._INDENT="    ";
AjxStringUtil._NON_WHITESPACE=/\S+/;
AjxStringUtil._LF=/\n/;
AjxStringUtil.convertHtml2Text=function(_22a){
if(!_22a){
return null;
}
if(typeof _22a=="string"){
var _22b=document.createElement("SPAN");
_22b.innerHTML=_22a;
_22a=_22b;
}
var text=new Array();
var idx=0;
var ctxt=new Object();
this._traverse(_22a,text,idx,AjxStringUtil._NO_LIST,0,0,ctxt);
var _22f=text.join("");
return _22f;
};
AjxStringUtil._traverse=function(el,text,idx,_233,_234,_235,ctxt){
var _237=el.nodeName.toLowerCase();
if(_237=="#text"){
if(el.nodeValue.search(AjxStringUtil._NON_WHITESPACE)!=-1){
if(ctxt.lastNode=="ol"||ctxt.lastNode=="ul"){
text[idx++]="\n";
}
if(ctxt.isPreformatted){
text[idx++]=AjxStringUtil.trim(el.nodeValue)+" ";
}else{
text[idx++]=AjxStringUtil.trim(el.nodeValue.replace(AjxStringUtil._LF," "),true)+" ";
}
}
}else{
if(_237=="p"){
text[idx++]="\n\n";
}else{
if(_233==AjxStringUtil._NO_LIST&&(_237=="br"||_237=="hr")){
text[idx++]="\n";
}else{
if(_237=="ol"||_237=="ul"){
text[idx++]="\n";
if(el.parentNode.nodeName.toLowerCase()!="li"&&ctxt.lastNode!="br"&&ctxt.lastNode!="hr"){
text[idx++]="\n";
}
_233=(_237=="ol")?AjxStringUtil._ORDERED_LIST:AjxStringUtil._UNORDERED_LIST;
_234++;
_235=0;
}else{
if(_237=="li"){
for(var i=0;i<_234;i++){
text[idx++]=AjxStringUtil._INDENT;
}
if(_233==AjxStringUtil._ORDERED_LIST){
text[idx++]=_235+". ";
}else{
text[idx++]="\u2022 ";
}
}else{
if(_237=="img"){
if(el.alt&&el.alt!=""){
text[idx++]=el.alt;
}
}else{
if(_237=="tr"&&el.parentNode.firstChild!=el){
text[idx++]="\n";
}else{
if(_237=="td"&&el.parentNode.firstChild!=el){
text[idx++]="\t";
}else{
if(_237=="div"){
text[idx++]="\n";
}else{
if(_237=="blockquote"){
text[idx++]="\n\n";
}else{
if(_237=="pre"){
ctxt.isPreformatted=true;
}else{
if(_237=="#comment"||_237=="script"||_237=="select"||_237=="style"){
return idx;
}
}
}
}
}
}
}
}
}
}
}
}
var _239=el.childNodes;
var len=_239.length;
for(var i=0;i<len;i++){
var tmp=_239[i];
if(_237=="ol"&&tmp.nodeType==1&&tmp.tagName.toLowerCase()=="li"){
_235++;
}
idx=this._traverse(tmp,text,idx,_233,_234,_235,ctxt);
}
if(_237=="h1"||_237=="h2"||_237=="h3"||_237=="h4"||_237=="h5"||_237=="h6"){
text[idx++]="\n";
ctxt.list=false;
}else{
if(_237=="pre"){
ctxt.isPreformatted=false;
}else{
if(_237=="li"){
if(!ctxt.list){
text[idx++]="\n";
}
ctxt.list=false;
}else{
if(_237=="ol"||_237=="ul"){
ctxt.list=true;
}else{
if(_237!="#text"){
ctxt.list=false;
}
}
}
}
}
ctxt.lastNode=_237;
return idx;
};
AjxStringUtil.queryStringSet=function(qs,name,_23e){
qs=qs?qs:"";
if(qs.indexOf("?")==0){
qs=qs.substr(1);
}
var _23f=qs.split("&");
var _240=[];
var _241=false;
for(var i=0;i<_23f.length;i++){
if(_23f[i].indexOf(name)==0){
_241=true;
_240.push([name,_23e].join("="));
}else{
_240.push(_23f[i]);
}
}
if(!_241){
_240.push([name,_23e].join("="));
}
return "?"+_240.join("&");
};
AjxStringUtil.queryStringRemove=function(qs,name){
qs=qs?qs:"";
if(qs.indexOf("?")==0){
qs=qs.substr(1);
}
var _245=qs.split("&");
var _246=[];
for(var i=0;i<_245.length;i++){
if(_245[i].indexOf(name)!=0){
_246.push(_245[i]);
}
}
return "?"+_246.join("&");
};
AjxStringUtil.getAsString=function(o){
return !o?"":(typeof (o)=="object")?o.toString():o;
};
function AjxDebug(_249,name,_24b){
this._dbgName="AjxDebugWin_"+location.hostname.replace(/\./g,"_");
this._level=Number(_249);
this._showTime=_24b;
this._showTiming=false;
this._startTimePt=this._lastTimePt=0;
this._dbgWindowInited=false;
this._msgQueue=new Array();
AjxDebug._CONTENT_FRAME_ID=AjxDebug._CONTENT_FRAME_ID;
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._LINK_FRAME_ID="AjxDebug_LF";
AjxDebug._CONTENT_FRAME_ID="AjxDebug_CF";
AjxDebug._BUTTON_FRAME_ID="AjxDebug_BF";
AjxDebug._id=0;
AjxDebug._openErrors=0;
AjxDebug.prototype.toString=function(){
return "AjxDebug";
};
AjxDebug.prototype.setDebugLevel=function(_24c,_24d){
this._level=Number(_24c);
if(!_24d){
this._enable(_24c!=AjxDebug.NONE);
}
};
AjxDebug.prototype.getDebugLevel=function(){
return this._level;
};
AjxDebug.prototype.println=function(_24e,msg,_250){
try{
if(!this._isWriteable()){
return;
}
var args=this._handleArgs(arguments,_250);
if(!args){
return;
}
msg=args.join("");
this._add(this._timestamp()+msg+"<br>",null,null,null,_250);
}
catch(ex){
}
return;
};
AjxDebug.prototype.isDisabled=function(){
return !this._enabled;
};
AjxDebug.prototype.dumpObj=function(_252,obj,_254,_255){
if(!this._isWriteable()){
return;
}
var args=this._handleArgs(arguments,_255);
if(!args){
return;
}
obj=args[0];
if(!obj){
return;
}
this._showFuncs=args[1];
AjxDebug._visited=new AjxVector();
this._add(null,obj);
this._showFuncs=null;
};
AjxDebug.prototype.printRaw=function(_257,text,_259){
if(!this._isWriteable()){
return;
}
var args=this._handleArgs(arguments,_259);
if(!args){
return;
}
text=args[0];
this._add(null,text,false,true);
};
AjxDebug.prototype.printXML=function(_25b,text,_25d){
if(!this._isWriteable()){
return;
}
var args=this._handleArgs(arguments,_25d);
if(!args){
return;
}
text=args[0];
if(!text){
return;
}
if(AjxEnv.isSafari||text.length>AjxDebug.MAX_OUT){
this.printRaw(text);
return;
}
this._add(null,text,true,false);
};
AjxDebug.prototype.display=function(_25f,text){
if(!this._isWriteable()){
return;
}
var args=this._handleArgs(arguments);
if(!args){
return;
}
text=args[0];
text=text.replace(/\r?\n/g,"[crlf]");
text=text.replace(/ /g,"[space]");
text=text.replace(/\t/g,"[tab]");
this.printRaw(_25f,text);
};
AjxDebug.prototype.showTiming=function(on,msg){
this._showTiming=on;
if(on){
this._enable(true);
}
var _264=on?"on":"off";
var text="Turning timing info "+_264;
if(msg){
text=text+": "+msg;
}
var _266=new DebugMessage(text);
this._addMessage(_266);
this._startTimePt=this._lastTimePt=new Date().getTime();
};
AjxDebug.prototype.timePt=function(msg,_268){
if(!this._showTiming||!this._isWriteable()){
return;
}
if(_268){
this._startTimePt=this._lastTimePt=new Date().getTime();
}
var now=new Date().getTime();
var _26a=now-this._startTimePt;
var _26b=now-this._lastTimePt;
this._lastTimePt=now;
var _26c=_268?"<br/>":"";
msg=msg?" "+msg:"";
var text=[_26c,"[",_26a," / ",_26b,"]",msg].join("");
html="<div>"+text+"</div>";
extraType=typeof (text);
var _26e=new DebugMessage(html);
this._addMessage(_26e);
return _26b;
};
AjxDebug.prototype.getContentFrame=function(){
if(this._contentFrame){
return this._contentFrame;
}else{
if(this._debugWindow&&this._debugWindow.document){
return this._debugWindow.document.getElementById(AjxDebug._CONTENT_FRAME_ID);
}else{
return null;
}
}
};
AjxDebug.prototype.getLinkFrame=function(){
if(this._linkFrame){
return this._linkFrame;
}else{
if(this._debugWindow&&this._debugWindow.document){
return this._debugWindow.document.getElementById(AjxDebug._LINK_FRAME_ID);
}else{
return null;
}
}
};
AjxDebug.prototype._enable=function(_26f){
this._enabled=_26f;
if(_26f){
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.isDisabled()&&this._debugWindow&&!this._debugWindow.closed);
};
AjxDebug.prototype._getHtmlForObject=function(_270,_271,_272){
var html=new Array();
var idx=0;
if(AjxUtil.isUndefined(_270)){
html[idx++]="<span>Undefined</span>";
}else{
if(AjxUtil.isNull(_270)){
html[idx++]="<span>NULL</span>";
}else{
if(AjxUtil.isBoolean(_270)){
html[idx++]="<span>"+_270+"</span>";
}else{
if(AjxUtil.isNumber(_270)){
html[idx++]="<span>"+_270+"</span>";
}else{
if(_272){
html[idx++]=this._timestamp();
html[idx++]="<textarea rows='25' style='width:100%' readonly='true'>";
html[idx++]=_270;
html[idx++]="</textarea>";
html[idx++]="<p></p>";
}else{
if(_271){
var _275=new AjxDebugXmlDocument;
var doc=_275.create();
doc.loadXML(_270);
html[idx++]="<div style='border-width:2px; border-style:inset; width:100%; height:300px; overflow:auto'>";
html[idx++]=this._createXmlTree(doc,0);
html[idx++]="</div>";
}else{
html[idx++]="<div style='border-width:2px; border-style:inset; width:100%; height:300px; overflow:auto'>";
html[idx++]="<pre>";
html[idx++]=this._dump(_270,true);
html[idx++]="</div>";
html[idx++]="</pre>";
}
}
}
}
}
}
return html.join("");
};
AjxDebug.prototype._dump=function(obj,_278){
var _279=0;
var _27a=false;
var _27b=false;
if(arguments.length>2){
_279=arguments[2];
_27a=arguments[3];
_27b=arguments[4];
}
if(AjxUtil.isObject(obj)){
if(obj.toString()=="ZmAppCtxt"){
return "[ZmAppCtxt]";
}
if(AjxDebug._visited.contains(obj)){
return "[visited object]";
}else{
AjxDebug._visited.add(obj);
}
}
var _27c=AjxStringUtil.repeat(" ",_279);
var text="";
if(AjxUtil.isUndefined(obj)){
text+="[undefined]";
}else{
if(AjxUtil.isNull(obj)){
text+="[null]";
}else{
if(AjxUtil.isBoolean(obj)){
text+=obj?"true":"false";
}else{
if(AjxUtil.isString(obj)){
text+="\""+AjxDebug._escapeForHTML(obj)+"\"";
}else{
if(AjxUtil.isNumber(obj)){
text+=obj;
}else{
if(AjxUtil.isObject(obj)){
var _27e=AjxUtil.isArray(obj);
if(_27b){
text+=_27e?"[Array]":obj.toString();
}else{
_27b=!_278;
var keys=new Array();
for(var i in obj){
keys.push(i);
}
_27e?keys.sort(function(a,b){
return a-b;
}):keys.sort();
if(_27a){
text+=_27e?"[":"{";
}
var len=keys.length;
for(var i=0;i<len;i++){
var key=keys[i];
var _285=obj[key];
var _286=null;
if(_285==window||_285==document||(!AjxEnv.isIE&&_285 instanceof Node)){
_286=_285.toString();
}
if((typeof (_285)=="function")){
if(this._showFuncs){
_286="[function]";
}else{
continue;
}
}
if(i>0){
text+=",";
}
text+="\n"+_27c;
if(_286!=null){
text+=key+": "+_286;
}else{
text+=key+": "+this._dump(_285,_278,_279+2,true,_27b);
}
}
if(i>0){
text+="\n"+AjxStringUtil.repeat(" ",_279-1);
}
if(_27a){
text+=_27e?"]":"}";
}
}
}
}
}
}
}
}
return text;
};
AjxDebug.prototype._handleArgs=function(args,_288){
if(this._level==AjxDebug.NONE||this._showTiming){
return;
}
var _289=AjxDebug.DBG1;
if(args.length>1){
if(typeof args[0]=="number"&&typeof this._level=="number"){
_289=args[0];
if(_289>this._level){
return;
}
}else{
if(args[0]&&args[0]!=this._level){
return;
}
}
}
var _28a=new Array(args.length);
var len=(_288)?args.length-1:args.length;
for(var i=0;i<len;i++){
_28a[i]=args[i];
}
if(len>1){
_28a.shift();
}
return _28a;
};
AjxDebug.prototype._getCookieVal=function(_28d){
var myRE=_28d+"=([^;]+)";
var _28f=document.cookie.match(new RegExp(myRE));
var val=null;
if(_28f&&(_28f.length>0)){
var _291=_28f[_28f.length-1];
if(_291=="true"){
val=true;
}else{
if(_291=="false"){
val=false;
}else{
val=_291;
}
}
}
return val;
};
AjxDebug.prototype._openDebugWindow=function(){
this._enabled=true;
this._isPrevWinOpen=this._getCookieVal("AjxDebugWinOpen");
var args="width=600,height=400,resizable=yes,scrollbars=yes";
if(!this._isPrevWinOpen){
var _293=new AjxCallback(this,this._initWindow);
this._debugWindow=AjxWindowOpener.openBlank(this._dbgName,args,_293,true);
}else{
this._debugWindow=window.open("",this._dbgName,args);
this._initWindow();
}
};
AjxDebug.prototype._initWindow=function(){
if(this._debugWindow==null){
this._enabled=false;
return;
}
try{
this._document=this._debugWindow.document;
this._document.title="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;}',","'.Link {cursor: pointer;color:blue;text-decoration:underline;white-space:nowrap;width:100%;}',","'.Mark {color:white; background-color:black; width:100%;font-size:14px;font-weight:bold;}',","'.MarkLink {cursor: pointer;color:white;background-color:black;text-decoration:underline;font-weight:bold;white-space:nowrap;width:100%;}',","'.Run {color:black; background-color:red;width:100%;font-size:18px;font-weight:bold;}',","'.RunLink {cursor: pointer;color:black;background-color:red;text-decoration:underline;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._BUTTON_FRAME_ID,"' id='",AjxDebug._BUTTON_FRAME_ID,"' src='javascript:parent.parent.blank();'>","</frameset>","<frame name='",AjxDebug._CONTENT_FRAME_ID,"' id='",AjxDebug._CONTENT_FRAME_ID,"' src='javascript:parent.blank();'>","</frameset>","</html>"].join(""));
var ta=new AjxTimedAction(this,AjxDebug.prototype._finishInitWindow);
AjxTimedAction.scheduleAction(ta,250);
}else{
this._contentFrame=this._document.getElementById(AjxDebug._CONTENT_FRAME_ID);
this._linkFrame=this._document.getElementById(AjxDebug._LINK_FRAME_ID);
this._createLinkNContent(this,"RunLink","NEW RUN","Run","NEW RUN");
if(AjxEnv.isIE){
this._debugWindow.attachEvent("onunload",AjxDebug.unloadHandler);
this._markBtn.onclick=AjxDebug._mark;
this._clearBtn.onclick=AjxDebug._clear;
}
this._dbgWindowInited=true;
this._showMessages();
}
}
catch(ex){
AjxDebug.deleteWindowCookie();
if(this._debugWindow){
this._debugWindow.close();
}
if(AjxDebug._openErrors<5){
AjxDebug._openErrors++;
this._openDebugWindow();
}
}
};
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 _295=this._debugWindow.document.getElementById(AjxDebug._BUTTON_FRAME_ID);
var _296=_295.contentWindow.document;
var _297=_296.body;
var _298=this._markBtn=_296.createElement("button");
_298.innerHTML="Mark";
_298._dbg=this;
_298.onclick=AjxDebug._mark;
var _299=this._clearBtn=_296.createElement("button");
_299._contentFrameId=AjxDebug._CONTENT_FRAME_ID;
_299._linkFrameId=AjxDebug._LINK_FRAME_ID;
_299.innerHTML="Clear";
_299._dbg=this;
_299.onclick=AjxDebug._clear;
_297.appendChild(_298);
_297.appendChild(_296.createTextNode(" "));
_297.appendChild(_299);
}
catch(ex){
}
document.cookie="AjxDebugWinOpen=true";
if(!AjxEnv.isIE){
this._debugWindow.onunload=AjxDebug.unloadHandler;
window.addEventListener("unload",AjxDebug.myWindowUnloadHandler,true);
}else{
this._debugWindow.attachEvent("onunload",AjxDebug.unloadHandler);
window.attachEvent=AjxDebug.myWindowUnloadHandler;
}
this._dbgWindowInited=true;
this._showMessages();
};
AjxDebug.prototype._scrollToBottom=function(){
var _29a=this.getContentFrame().contentWindow.document.body;
var _29b=this.getLinkFrame().contentWindow.document.body;
_29a.scrollTop=_29a.scrollHeight;
_29b.scrollTop=_29b.scrollHeight;
};
AjxDebug.prototype._timestamp=function(){
return this._showTime?this._getTimeStamp()+": ":"";
};
AjxDebug.prototype.setShowTimestamps=function(show){
this._showTime=show;
};
AjxDebug.prototype._createXmlTree=function(node,_29e){
if(node==null){
return "";
}
var str="";
var len;
switch(node.nodeType){
case 1:
str+="<div style='color: blue; padding-left: 16px;'>&lt;<span style='color: DarkRed;'>"+node.nodeName+"</span>";
var _2a1=node.attributes;
len=_2a1.length;
for(var i=0;i<len;i++){
str+=this._createXmlAttribute(_2a1[i]);
}
if(!node.hasChildNodes()){
return str+"/&gt;</div>";
}
str+="&gt;<br />";
var cs=node.childNodes;
len=cs.length;
for(var i=0;i<len;i++){
str+=this._createXmlTree(cs[i],_29e+3);
}
str+="&lt;/<span style='color: DarkRed;'>"+node.nodeName+"</span>&gt;</div>";
break;
case 9:
var cs=node.childNodes;
len=cs.length;
for(var i=0;i<len;i++){
str+=this._createXmlTree(cs[i],_29e);
}
break;
case 3:
if(!/^\s*$/.test(node.nodeValue)){
var val=node.nodeValue.replace(/</g,"&lt;").replace(/>/g,"&gt;");
str+="<span style='color: WindowText; padding-left: 16px;'>"+val+"</span><br />";
}
break;
case 7:
str+="&lt;?"+node.nodeName;
var _2a1=node.attributes;
len=_2a1.length;
for(var i=0;i<len;i++){
str+=this._createXmlAttribute(_2a1[i]);
}
str+="?&gt;<br />";
break;
case 4:
str="<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;'>"+node.nodeValue+"</span>]"+"]></div>";
break;
case 8:
str="<div style='color: blue; padding-left: 16px;'>&lt;!--<span style='white-space: pre; font-family: \"Courier New\"; color: Gray; display: block;'>"+node.nodeValue+"</span>--></div>";
break;
case 10:
str="<div style='color: blue; padding-left: 16px'>&lt;!DOCTYPE "+node.name;
if(node.publicId){
str+=" PUBLIC \""+node.publicId+"\"";
if(node.systemId){
str+=" \""+node.systemId+"\"";
}
}else{
if(node.systemId){
str+=" SYSTEM \""+node.systemId+"\"";
}
}
str+="&gt;</div>";
break;
default:
this._inspect(node);
}
return str;
};
AjxDebug.prototype._createXmlAttribute=function(a){
return " <span style='color: red'>"+a.nodeName+"</span><span style='color: blue'>=\""+a.nodeValue+"\"</span>";
};
AjxDebug.prototype._inspect=function(obj){
var str="";
for(var k in obj){
str+="obj."+k+" = "+obj[k]+"\n";
}
window.alert(str);
};
AjxDebug.prototype._add=function(aMsg,_2aa,_2ab,_2ac,_2ad){
var _2ae=typeof (_2aa);
if(AjxUtil.isSpecified(_2aa)){
_2aa=this._getHtmlForObject(_2aa,_2ab,_2ac);
}
this._addMessage(new DebugMessage(aMsg,null,null,null,_2aa,_2ad));
};
AjxDebug.prototype._addMessage=function(aMsg){
this._msgQueue[this._msgQueue.length]=aMsg;
this._showMessages();
};
AjxDebug.prototype._showMessages=function(){
if(!this._dbgWindowInited){
return;
}
try{
if(this._msgQueue.length>0){
var msg;
var _2b1;
var _2b2;
var _2b3=this.getContentFrame().contentWindow.document;
var _2b4=this.getLinkFrame().contentWindow.document;
var len=this._msgQueue.length;
for(var i=0;i<len;++i){
var now=new Date();
msg=this._msgQueue[i];
_2b1=_2b3.createElement("div");
_2b1.innerHTML=[msg.message,msg.eHtml].join("");
if(msg.linkName){
_2b2=_2b4.createElement("div");
_2b2._targetId=_2b1.id=[AjxDebug._getNextId(),now.getMilliseconds()].join("");
_2b2._dbg=this;
_2b2.className="Link";
_2b2.onclick=AjxDebug._linkClicked;
_2b2.innerHTML=msg.linkName+" - ["+this._getTimeStamp(now)+"]";
_2b4.body.appendChild(_2b2);
}
_2b3.body.appendChild(_2b1);
}
}
this._msgQueue.length=0;
this._scrollToBottom();
}
catch(ex){
}
};
AjxDebug._linkClicked=function(){
var el=this._dbg._contentFrame.contentWindow.document.getElementById(this._targetId);
var y=0;
while(el){
y+=el.offsetTop;
el=el.offsetParent;
}
this._dbg._contentFrame.contentWindow.scrollTo(0,y);
};
AjxDebug._getNextId=function(){
return "AjxDebug_"+AjxDebug._id++;
};
AjxDebug.prototype._parseHtmlFragment=function(_2ba){
var div=this.getContentFrame().contentWindow.document.createElement("div");
div.innerHTML=_2ba;
return div;
};
AjxDebug.prototype._getTimeStamp=function(date){
if(!AjxDebug._timestampFormatter){
AjxDebug._timestampFormatter=new AjxDateFormat("HH:mm:ss.SSS");
}
date=date||new Date();
return AjxStringUtil.htmlEncode(AjxDebug._timestampFormatter.format(date),true);
};
AjxDebug._mark=function(){
this._dbg._createLinkNContent(this._dbg,"MarkLink","MARK","Mark","MARK");
};
AjxDebug.prototype._createLinkNContent=function(_2bd,_2be,_2bf,_2c0,_2c1){
var now=new Date();
var _2c3=[" - [",_2bd._getTimeStamp(now),"]"].join("");
var _2c4=_2bd._linkFrame.contentWindow.document;
var div=_2c4.createElement("div");
div.className=_2be;
div.innerHTML=_2bf+_2c3;
var id="Lnk_"+now.getMilliseconds();
div._targetId=id;
div._dbg=_2bd;
div.onclick=AjxDebug._linkClicked;
_2c4.body.appendChild(div);
var _2c7=_2bd._contentFrame.contentWindow.document;
div=_2c7.createElement("div");
div.className=_2c0;
div.id=id;
div.innerHTML=_2c1+_2c3;
div._dbg=_2bd;
_2c7.body.appendChild(_2c7.createElement("p"));
_2c7.body.appendChild(div);
_2c7.body.appendChild(_2c7.createElement("p"));
_2bd._scrollToBottom();
};
AjxDebug._clear=function(){
this._dbg._contentFrame.contentWindow.document.body.innerHTML="";
this._dbg._linkFrame.contentWindow.document.body.innerHTML="";
};
AjxDebug.myWindowUnloadHandler=function(){
if(!DBG._debugWindow){
return;
}
if(AjxEnv.isNav||AjxEnv.isSafari){
DBG._debugWindow.onunload=null;
}else{
DBG._debugWindow.detachEvent("onunload",AjxDebug.unloadHandler);
}
};
AjxDebug.unloadHandler=function(){
try{
window.AjxDebug.deleteWindowCookie();
}
catch(ex){
}
};
AjxDebug.deleteWindowCookie=function(){
var _2c8=new Date("Fri, 31 Dec 1999 23:59:59 GMT");
document.cookie="AjxDebugWinOpen=false;expires="+_2c8.toGMTString();
};
AjxDebug._escapeForHTML=function(str){
if(typeof (str)!="string"){
return str;
}
var s=str;
s=s.replace(/\&/g,"&amp;");
s=s.replace(/\</g,"&lt;");
s=s.replace(/\>/g,"&gt;");
s=s.replace(/\"/g,"&quot;");
s=s.replace(/\xA0/g,"&nbsp;");
return s;
};
DebugMessage=function(aMsg,_2cc,_2cd,_2ce,_2cf,_2d0){
this.message=(AjxUtil.isSpecified(aMsg))?aMsg:"";
this.type=_2cc?_2cc:null;
this.category=_2cd?_2cd:"";
this.time=_2ce?_2ce:(new Date().getTime());
this.eHtml=_2cf?_2cf:"";
this.linkName=_2d0;
};
function AjxDebugXmlDocument(){
}
function getDomDocumentPrefix(){
if(getDomDocumentPrefix.prefix){
return getDomDocumentPrefix.prefix;
}
var _2d1=["MSXML2","Microsoft","MSXML","MSXML3"];
var o;
var len=_2d1.length;
for(var i=0;i<len;i++){
try{
o=new ActiveXObject(_2d1[i]+".DomDocument");
return getDomDocumentPrefix.prefix=_2d1[i];
}
catch(ex){
}
}
throw new Error("Could not find an installed XML parser");
}
AjxDebugXmlDocument.prototype.create=function(){
try{
if(document.implementation&&document.implementation.createDocument){
var doc=document.implementation.createDocument("","",null);
if(doc.readyState==null){
doc.readyState=1;
doc.addEventListener("load",function(){
doc.readyState=4;
if(typeof doc.onreadystatechange=="function"){
doc.onreadystatechange();
}
},false);
}
return doc;
}
if(window.ActiveXObject){
return new ActiveXObject(getDomDocumentPrefix()+".DomDocument");
}
}
catch(ex){
}
throw new Error("Your browser does not support XmlDocument objects");
};
if(window.DOMParser&&window.XMLSerializer&&window.Node&&Node.prototype&&Node.prototype.__defineGetter__){
AjxDebugXmlDocument.prototype.loadXML=function(s){
var doc2=(new DOMParser()).parseFromString(s,"text/xml");
while(this.hasChildNodes()){
this.removeChild(this.lastChild);
}
var len=doc2.childNodes.length;
for(var i=0;i<len;i++){
this.appendChild(this.importNode(doc2.childNodes[i],true));
}
};
AjxDebugXmlDocument.prototype.__defineGetter__("xml",function(){
return (new XMLSerializer()).serializeToString(this);
});
}
function AjxXmlDoc(){
if(!AjxXmlDoc._inited){
AjxXmlDoc._init();
}
}
AjxXmlDoc.prototype.toString=function(){
return "AjxXmlDoc";
};
AjxXmlDoc._inited=false;
AjxXmlDoc._msxmlVers=null;
AjxXmlDoc.create=function(){
var _2da=new AjxXmlDoc();
var _2db=null;
if(AjxEnv.isIE){
_2db=new ActiveXObject(AjxXmlDoc._msxmlVers);
_2db.async=true;
if(AjxXmlDoc._msxmlVers=="MSXML2.DOMDocument.4.0"){
_2db.setProperty("SelectionLanguage","XPath");
_2db.setProperty("SelectionNamespaces","xmlns:zimbra='urn:zimbra' xmlns:mail='urn:zimbraMail' xmlns:account='urn:zimbraAccount'");
}
}else{
if(document.implementation&&document.implementation.createDocument){
_2db=document.implementation.createDocument("","",null);
}else{
throw new AjxException("Unable to create new Doc",AjxException.INTERNAL_ERROR,"AjxXmlDoc.create");
}
}
_2da._doc=_2db;
return _2da;
};
AjxXmlDoc.createFromDom=function(doc){
var _2dd=new AjxXmlDoc();
_2dd._doc=doc;
return _2dd;
};
AjxXmlDoc.createFromXml=function(xml){
var _2df=AjxXmlDoc.create();
_2df.loadFromString(xml);
return _2df;
};
AjxXmlDoc.getXml=function(node){
var ser=new XMLSerializer();
return ser.serializeToString(node);
};
AjxXmlDoc.prototype.getDoc=function(){
return this._doc;
};
AjxXmlDoc.prototype.loadFromString=function(str){
var doc=this._doc;
doc.loadXML(str);
if(AjxEnv.isIE){
if(doc.parseError.errorCode!=0){
throw new AjxException(doc.parseError.reason,AjxException.INVALID_PARAM,"AjxXmlDoc.loadFromString");
}
}
};
AjxXmlDoc.prototype.loadFromUrl=function(url){
this._doc.load(url);
};
AjxXmlDoc.prototype.toJSObject=function(_2e5,_2e6,_2e7){
function _node(){
this.__msh_content="";
}
_node.prototype.toString=function(){
return this.__msh_content;
};
function rec(i,o){
var tags={},t,n;
for(i=i.firstChild;i;i=i.nextSibling){
if(i.nodeType==1){
t=i.tagName;
if(_2e5){
t=t.replace(/^.*?:/,"");
}
if(_2e6){
t=t.toLowerCase();
}
n=new _node();
if(tags[t]){
if(tags[t]==1){
o[t]=[o[t]];
tags[t]=2;
}
o[t].push(n);
}else{
o[t]=n;
tags[t]=1;
}
if(_2e7){
if(i.attributes&&i.attributes.length){
for(var ix=0;ix<i.attributes.length;ix++){
attr=i.attributes[ix];
n[attr.name]=AjxUtil.isNumeric(attr.value)?attr.value:String(attr.value);
}
}
}
rec(i,n);
}else{
if(i.nodeType==3){
o.__msh_content+=i.nodeValue;
}
}
}
}
var o=new _node();
rec(this._doc.documentElement,o);
return o;
};
AjxXmlDoc.prototype.getElementsByTagNameNS=function(ns,tag){
var doc=this.getDoc();
return AjxEnv.isIE?doc.getElementsByTagName(ns+":"+tag):doc.getElementsByTagNameNS(ns,tag);
};
AjxXmlDoc.prototype.getFirstElementByTagNameNS=function(ns,tag){
return this.getElementsByTagNameNS(ns,tag)[0];
};
AjxXmlDoc._init=function(){
if(AjxEnv.isIE){
var _2f2=["MSXML4.DOMDocument","MSXML3.DOMDocument","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XmlDom"];
for(var i=0;i<_2f2.length;i++){
try{
new ActiveXObject(_2f2[i]);
AjxXmlDoc._msxmlVers=_2f2[i];
break;
}
catch(ex){
}
}
if(!AjxXmlDoc._msxmlVers){
throw new AjxException("MSXML not installed",AjxException.INTERNAL_ERROR,"AjxXmlDoc._init");
}
}else{
if(AjxEnv.isNav||AjxEnv.isOpera){
Document.prototype.loadXML=function(str){
var _2f5=new DOMParser();
var _2f6=_2f5.parseFromString(str,"text/xml");
while(this.hasChildNodes()){
this.removeChild(this.lastChild);
}
var len=_2f6.childNodes.length;
for(var i=0;i<len;i++){
var _2f9=this.importNode(_2f6.childNodes[i],true);
this.appendChild(_2f9);
}
};
if(AjxEnv.isNav){
_NodeGetXml=function(){
var ser=new XMLSerializer();
return ser.serializeToString(this);
};
Node.prototype.__defineGetter__("xml",_NodeGetXml);
}
}else{
if(AjxEnv.isSafari){
document.__proto__.loadXML=function(str){
var _2fc=new DOMParser();
var _2fd=_2fc.parseFromString(str,"text/xml");
while(this.hasChildNodes()){
this.removeChild(this.lastChild);
}
var len=_2fd.childNodes.length;
for(var i=0;i<len;i++){
var _300=this.importNode(_2fd.childNodes[i],true);
this.appendChild(_300);
}
};
}
}
}
AjxXmlDoc._inited=true;
};
function AjxImg(){
}
AjxImg.prototype=new Object;
AjxImg.prototype.constructor=null;
AjxImg._VIEWPORT_ID="AjxImg_VP";
AjxImg.setImage=function(_301,_302,_303){
var _304=AjxImg.getClassForImage(_302);
if(_303){
_301.className=_304;
}else{
if(_301.firstChild==null){
_301.innerHTML=_304?["<div class='",_304,"'></div>"].join(""):"<div></div>";
}else{
_301.firstChild.className=_304;
}
}
};
AjxImg.getClassForImage=function(_305){
return ["Img",_305].join("");
};
AjxImg.getImageClass=function(_306){
return _306.firstChild?_306.firstChild.className:_306.className;
};
AjxImg.getImageElement=function(_307){
return _307.firstChild?_307.firstChild:_307;
};
AjxImg.getParentElement=function(_308){
return _308.parentNode;
};
AjxImg.getImageHtml=function(_309,_30a,_30b,_30c){
_30b=_30b||"";
_30a=_30a?(["style='",_30a,"' "].join("")):"";
var pre=_30c?"<table style='display:inline' cellpadding=0 cellspacing=0 border=0><tr><td align=center valign=bottom>":"";
var post=_30c?"</td></tr></table>":"";
if(_309){
return [pre,"<div class='","Img",_309,"' ",_30a," ",_30b,"></div>",post].join("");
}
return [pre,"<div ",_30a," ",_30b,"></div>",post].join("");
};
AjxImg.getImageSpanHtml=function(_30f,_310,_311,_312){
var _313=AjxImg.getClassForImage(_30f);
var html=[];
var i=0;
html[i++]="<span style='white-space:nowrap'>";
html[i++]="<span class='";
html[i++]=_313;
html[i++]=" inlineIcon'";
html[i++]=_310?([" style='",_310,"' "].join("")):"";
html[i++]=_311?([" ",_311].join("")):"";
html[i++]=">&nbsp;&nbsp;&nbsp;</span>";
html[i++]=(_312||"");
html[i++]="</span>";
return html.join("");
};
function AjxEvent(){
}
AjxEvent.prototype.toString=function(){
return "AjxEvent";
};
function AjxEventMgr(){
this._listeners=new Object();
}
AjxEventMgr.prototype.toString=function(){
return "AjxEventMgr";
};
AjxEventMgr.prototype.addListener=function(_316,_317){
var lv=this._listeners[_316];
if(lv==null){
lv=this._listeners[_316]=new AjxVector();
}
if(!lv.contains(_317)){
if(this._notifyingListeners){
lv=this._listeners[_316]=lv.clone();
}
lv.add(_317);
return true;
}
return false;
};
AjxEventMgr.prototype.notifyListeners=function(_319,_31a){
this._notifyingListeners=true;
var lv=this._listeners[_319];
if(lv!=null){
var a=lv.getArray();
var s=lv.size();
var _31e=null;
var c=null;
for(var i=0;i<s;i++){
c=a[i];
if(!(c&&(c.handleEvent||(typeof c=="function")))){
continue;
}
_31e=c.handleEvent?c.handleEvent(_31a):c(_31a);
if(_31e===false){
break;
}
}
}
this._notifyingListeners=false;
return _31e;
};
AjxEventMgr.prototype.isListenerRegistered=function(_321){
var lv=this._listeners[_321];
return (lv!=null&&lv.size()>0);
};
AjxEventMgr.prototype.removeListener=function(_323,_324){
var lv=this._listeners[_323];
if(lv!=null){
if(this._notifyingListeners){
lv=this._listeners[_323]=lv.clone();
}
lv.remove(_324);
return true;
}
return false;
};
AjxEventMgr.prototype.removeAll=function(_326){
var lv=this._listeners[_326];
if(lv!=null){
if(this._notifyingListeners){
lv=this._listeners[_326]=lv.clone();
}
lv.removeAll();
return true;
}
return false;
};
function AjxTimedAction(obj,func,args){
AjxCallback.call(this,obj,func,args);
this._tid=-1;
this._id=-1;
}
AjxTimedAction.prototype=new AjxCallback();
AjxTimedAction.prototype.constructor=AjxTimedAction;
AjxTimedAction.prototype.toString=function(){
return "AjxTimedAction";
};
AjxTimedAction._pendingActions={};
AjxTimedAction._nextActionId=0;
AjxTimedAction.scheduleAction=function(_32b,_32c){
if(_32b._tid){
AjxTimedAction.cancelAction(_32b._id);
}
var id=_32b._id=AjxTimedAction._nextActionId++;
AjxTimedAction._pendingActions[id]=_32b;
var _32e="AjxTimedAction._exec("+id+")";
_32b._tid=window.setTimeout(_32e,_32c?_32c:0);
return _32b._id;
};
AjxTimedAction.cancelAction=function(_32f){
var _330=AjxTimedAction._pendingActions[_32f];
if(_330){
window.clearTimeout(_330._tid);
delete AjxTimedAction._pendingActions[_32f];
delete _330._tid;
}
};
AjxTimedAction._exec=function(_331){
var _332=AjxTimedAction._pendingActions[_331];
delete AjxTimedAction._pendingActions[_331];
delete _332._tid;
_332.run();
};
function AjxInclude(_333,_334,_335,_336){
var head=document.getElementsByTagName("head")[0];
function loadNextScript(_338){
if(AjxEnv.isIE&&_338&&!/loaded|complete/.test(_338.readyState)){
return;
}
if(_338){
_338[AjxInclude.eventName]=null;
}
var _339=AjxInclude.dwhack_scripts.length>0?AjxInclude.dwhack_scripts:_333;
window.status="";
if(_339.length>0){
var _33a=_339.shift();
var orig=_33a;
if(!/^((https?|ftps?):\x2f\x2f|\x2f)/.test(_33a)){
if(_334){
_33a=_334+_33a;
}
if(cacheKillerVersion){
_33a+="?v="+cacheKillerVersion;
}
}else{
if(_336&&_33a.indexOf("/")!=0){
_33a=_336+AjxStringUtil.urlEncode(_33a);
}
}
var _338=document.createElement("script");
var _33c=AjxCallback.simpleClosure(loadNextScript,null,_338);
if(AjxEnv.isIE){
_338.attachEvent("onreadystatechange",_33c);
}else{
_338.addEventListener("load",_33c,true);
}
_338.type="text/javascript";
_338.src=_33a;
window.status="Loading script: "+orig;
head.appendChild(_338);
}else{
if(_333.length==0){
_338=null;
head=null;
if(_335){
_335.run();
}
}
}
}
loadNextScript(null);
}
AjxInclude.dwhack_scripts=[];
document.write=document.writeln=function(){
var a=[];
for(var i=0;i<arguments.length;++i){
a[i]=arguments[i];
}
var str=a.join("");
if(/<script[^>]+src=([\x22\x27])(.*?)\1/i.test(str)){
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);
}
function AjxListener(obj,_341,args){
AjxCallback.call(this,obj,_341,args);
}
AjxListener.prototype=new AjxCallback();
AjxListener.prototype.constructor=AjxListener;
AjxListener.prototype.toString=function(){
return "AjxListener";
};
AjxListener.prototype.handleEvent=function(ev){
return this.run(ev);
};
function AjxFormat(_344){
this._pattern=_344;
this._segments=[];
}
AjxFormat.prototype.toString=function(){
var s=[];
s.push("pattern=\"",this._pattern,"\"");
if(this._segments.length>0){
s.push(", segments={ ");
for(var i=0;i<this._segments.length;i++){
if(i>0){
s.push(", ");
}
s.push(String(this._segments[i]));
}
s.push(" }");
}
return s.join("");
};
AjxFormat.prototype._pattern;
AjxFormat.prototype._segments;
AjxFormat.prototype.format=function(_347){
var s=[];
for(var i=0;i<this._segments.length;i++){
s.push(this._segments[i].format(_347));
}
return s.join("");
};
AjxFormat.prototype.parse=function(s){
var _34b=this._createParseObject();
var _34c=0;
for(var i=0;i<this._segments.length;i++){
var _34e=this._segments[i];
_34c=_34e.parse(_34b,s,_34c);
}
if(_34c<s.length){
throw new AjxFormat.ParsingException(this,null,"input too long");
}
return _34b;
};
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(s){
throw new AjxFormat.ParsingException(this,null,"not implemented");
};
AjxFormat._zeroPad=function(s,_351,_352,_353){
s=typeof s=="string"?s:String(s);
if(s.length>=_351){
return s;
}
_352=_352||"0";
var a=[];
for(var i=s.length;i<_351;i++){
a.push(_352);
}
a[_353?"unshift":"push"](s);
return a.join("");
};
AjxFormat.FormatException=function(_356,_357){
this._format=_356;
this._message=_357;
};
AjxFormat.FormatException.prototype.toString=function(){
return this._message;
};
AjxFormat.FormatException.prototype._format;
AjxFormat.FormatException.prototype._message;
AjxFormat.FormattingException=function(_358,_359,_35a){
AjxFormat.FormatException.call(this,_358,_35a);
this._segment=_359;
};
AjxFormat.FormattingException.prototype=new AjxFormat.FormatException;
AjxFormat.FormattingException.prototype.constructor=AjxFormat.FormattingException;
AjxFormat.FormattingException.prototype._segment;
AjxFormat.ParsingException=function(_35b,_35c,_35d){
AjxFormat.FormatException.call(this,_35b,_35d);
this._segment=_35c;
};
AjxFormat.ParsingException.prototype=new AjxFormat.FormatException;
AjxFormat.ParsingException.prototype.constructor=AjxFormat.ParsingException;
AjxFormat.ParsingException.prototype._segment;
AjxFormat.Segment=function(_35e,s){
this._parent=_35e;
this._s=s;
};
AjxFormat.Segment.prototype.toString=function(){
return "segment: \""+this._s+"\"";
};
AjxFormat.Segment.prototype._parent;
AjxFormat.Segment.prototype._s;
AjxFormat.Segment.prototype.format=function(o){
return this._s;
};
AjxFormat.Segment.prototype.parse=function(o,s,i){
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 _364;
if(this._index+1<this._parent._segments.length){
var _365=this._parent._segments[this._index+1];
if(!(_365 instanceof AjxFormat.TextSegment)){
_364=this._s.length;
}
}
return _364;
};
AjxFormat.Segment._parseLiteral=function(_366,s,_368){
if(s.length-_368<_366.length){
throw new AjxFormat.ParsingException(this._parent,this,"input too short");
}
for(var i=0;i<_366.length;i++){
if(_366.charAt(i)!=s.charAt(_368+i)){
throw new AjxFormat.ParsingException(this._parent,this,"input doesn't match");
}
}
return _368+_366.length;
};
AjxFormat.Segment._parseLiterals=function(o,f,_36c,_36d,s,_36f){
for(var i=0;i<_36d.length;i++){
try{
var _371=_36d[i];
var _372=AjxFormat.Segment._parseLiteral(_371,s,_36f);
if(f){
var _373=o||window;
if(typeof f=="function"){
f.call(_373,i+_36c);
}else{
_373[f]=i+_36c;
}
}
return _372;
}
catch(e){
}
}
return -1;
};
AjxFormat.Segment._parseInt=function(o,f,_376,s,_378,_379,_37a){
var len=_379||s.length-_378;
var head=_378;
for(var i=0;i<len;i++){
if(!s.charAt(_378++).match(/\d/)){
_378--;
break;
}
}
var tail=_378;
if(head==tail){
throw new AjxFormat.ParsingException(this._parent,this,"number not present");
}
if(_379&&tail-head!=_379){
throw new AjxFormat.ParsingException(this._parent,this,"number too short");
}
var _37f=parseInt(s.substring(head,tail),_37a||10);
if(f){
var _380=o||window;
if(typeof f=="function"){
f.call(_380,_37f+_376);
}else{
_380[f]=_37f+_376;
}
}
return tail;
};
function AjxDateFormat(_381){
AjxFormat.call(this,_381);
if(typeof _381=="number"){
switch(_381){
case AjxDateFormat.SHORT:
_381=I18nMsg.formatDateShort;
break;
case AjxDateFormat.MEDIUM:
_381=I18nMsg.formatDateMedium;
break;
case AjxDateFormat.LONG:
_381=I18nMsg.formatDateLong;
break;
case AjxDateFormat.FULL:
_381=I18nMsg.formatDateFull;
break;
}
}
for(var i=0;i<_381.length;i++){
var c=_381.charAt(i);
if(c=="'"){
var head=i+1;
for(i++;i<_381.length;i++){
var c=_381.charAt(i);
if(c=="'"){
if(i+1<_381.length&&_381.charAt(i+1)=="'"){
_381=_381.substr(0,i)+_381.substr(i+1);
}else{
break;
}
}
}
if(i==_381.length){
throw new FormatException(this,"unterminated string literal");
}
var tail=i;
var _386=new AjxFormat.TextSegment(this,_381.substring(head,tail));
this._segments.push(_386);
continue;
}
var head=i;
while(i<_381.length){
c=_381.charAt(i);
if(AjxDateFormat._META_CHARS.indexOf(c)!=-1||c=="'"){
break;
}
i++;
}
var tail=i;
if(head!=tail){
var _386=new AjxFormat.TextSegment(this,_381.substring(head,tail));
this._segments.push(_386);
i--;
continue;
}
var head=i;
while(++i<_381.length){
if(_381.charAt(i)!=c){
break;
}
}
var tail=i--;
var _387=tail-head;
var _388=_381.substr(head,_387);
var _386=null;
switch(c){
case "G":
_386=new AjxDateFormat.EraSegment(this,_388);
break;
case "y":
_386=new AjxDateFormat.YearSegment(this,_388);
break;
case "M":
_386=new AjxDateFormat.MonthSegment(this,_388);
break;
case "w":
_386=new AjxDateFormat.WeekSegment(this,_388);
break;
case "W":
_386=new AjxDateFormat.WeekSegment(this,_388);
break;
case "D":
_386=new AjxDateFormat.DaySegment(this,_388);
break;
case "d":
_386=new AjxDateFormat.DaySegment(this,_388);
break;
case "F":
_386=new AjxDateFormat.WeekdaySegment(this,_388);
break;
case "E":
_386=new AjxDateFormat.WeekdaySegment(this,_388);
break;
case "a":
_386=new AjxDateFormat.AmPmSegment(this,_388);
break;
case "H":
_386=new AjxDateFormat.HourSegment(this,_388);
break;
case "k":
_386=new AjxDateFormat.HourSegment(this,_388);
break;
case "K":
_386=new AjxDateFormat.HourSegment(this,_388);
break;
case "h":
_386=new AjxDateFormat.HourSegment(this,_388);
break;
case "m":
_386=new AjxDateFormat.MinuteSegment(this,_388);
break;
case "s":
_386=new AjxDateFormat.SecondSegment(this,_388);
break;
case "S":
_386=new AjxDateFormat.SecondSegment(this,_388);
break;
case "z":
_386=new AjxDateFormat.TimezoneSegment(this,_388);
break;
case "Z":
_386=new AjxDateFormat.TimezoneSegment(this,_388);
break;
}
if(_386!=null){
_386._index=this._segments.length;
this._segments.push(_386);
}
}
}
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(_389){
_389=_389!=null?_389:AjxDateFormat.DEFAULT;
if(!AjxDateFormat._DATE_FORMATTERS[_389]){
AjxDateFormat._DATE_FORMATTERS[_389]=new AjxDateFormat(AjxDateFormat._dateFormats[_389]);
}
return AjxDateFormat._DATE_FORMATTERS[_389];
};
AjxDateFormat.getTimeInstance=function(_38a){
_38a=_38a!=null?_38a:AjxDateFormat.DEFAULT;
if(!AjxDateFormat._TIME_FORMATTERS[_38a]){
AjxDateFormat._TIME_FORMATTERS[_38a]=new AjxDateFormat(AjxDateFormat._timeFormats[_38a]);
}
return AjxDateFormat._TIME_FORMATTERS[_38a];
};
AjxDateFormat.getDateTimeInstance=function(_38b,_38c){
_38b=_38b!=null?_38b:AjxDateFormat.DEFAULT;
_38c=_38c!=null?_38c:AjxDateFormat.DEFAULT;
var _38d=_38b*10+_38c;
if(!AjxDateFormat._DATETIME_FORMATTERS[_38d]){
var _38e=I18nMsg.formatDateTime;
var _38f=[AjxDateFormat._dateFormats[_38b],AjxDateFormat._timeFormats[_38c]];
var _390=AjxMessageFormat.format(_38e,_38f);
AjxDateFormat._DATETIME_FORMATTERS[_38d]=new AjxDateFormat(_390);
}
return AjxDateFormat._DATETIME_FORMATTERS[_38d];
};
AjxDateFormat.format=function(_391,date){
return new AjxDateFormat(_391).format(date);
};
AjxDateFormat.parse=function(_393,_394){
return new AjxDateFormat(_393).parse(_394);
};
AjxDateFormat.prototype.parse=function(s){
var _396=null;
try{
_396=AjxFormat.prototype.parse.call(this,s);
var date=new Date(0,0,1,0,0,0,0);
if(_396.year!=null){
date.setFullYear(_396.year);
}
if(_396.month!=null){
date.setMonth(_396.month);
}
if(_396.dayofmonth!=null){
date.setDate(_396.dayofmonth);
}else{
if(_396.dayofyear!=null){
date.setMonth(0,_396.dayofyear);
}
}
if(_396.hours!=null){
date.setHours(_396.hours);
}
if(_396.minutes!=null){
date.setMinutes(_396.minutes);
}
if(_396.seconds!=null){
date.setSeconds(_396.seconds);
}
if(_396.milliseconds!=null){
date.setMilliseconds(_396.milliseconds);
}
if(_396.ampm!=null){
var _398=date.getHours();
if(_398==12&&_396.ampm==0){
_398=0;
}else{
if(_398!=12&&_396.ampm==1){
_398+=12;
}
}
date.setHours(_398);
}
_396=date;
}
catch(e){
}
return _396;
};
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(_399,s){
AjxFormat.Segment.call(this,_399,s);
};
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(o,s,_39d){
return AjxFormat.Segment._parseLiteral(this._s,s,_39d);
};
AjxDateFormat.DateSegment=function(_39e,s){
AjxFormat.Segment.call(this,_39e,s);
};
AjxDateFormat.DateSegment.prototype=new AjxFormat.Segment;
AjxDateFormat.DateSegment.prototype.constructor=AjxDateFormat.DateSegment;
AjxDateFormat.EraSegment=function(_3a0,s){
AjxDateFormat.DateSegment.call(this,_3a0,s);
};
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(date){
return I18nMsg.eraAD;
};
AjxDateFormat.YearSegment=function(_3a3,s){
AjxDateFormat.DateSegment.call(this,_3a3,s);
};
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(date){
var year=String(date.getFullYear());
return this._s.length<4?year.substr(year.length-2):AjxFormat._zeroPad(year,this._s.length);
};
AjxDateFormat.YearSegment.prototype.parse=function(_3a7,s,_3a9){
var _3aa=this._getFixedLength();
var _3ab=AjxFormat.Segment._parseInt(_3a7,"year",0,s,_3a9,_3aa);
if(_3ab-_3a9==2){
if(!AjxDateFormat._2digitStartYear){
AjxDateFormat._2digitStartYear=parseInt(AjxMsg.dateParsing2DigitStartYear);
}
var _3ac=AjxDateFormat._2digitStartYear;
var _3ad=parseInt(s.substr(_3a9,2));
var _3ae=(Math.floor(_3ac/100)+(_3ad<(_3ac%100)?1:0))*100;
var year=_3ae+_3ad;
_3a7.year=year;
}
return _3ab;
};
AjxDateFormat.MonthSegment=function(_3b0,s){
AjxDateFormat.DateSegment.call(this,_3b0,s);
};
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(date){
var _3b3=date.getMonth();
switch(this._s.length){
case 1:
return String(_3b3+1);
case 2:
return AjxFormat._zeroPad(_3b3+1,2);
case 3:
return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM][_3b3];
case 5:
return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT][_3b3];
}
return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG][_3b3];
};
AjxDateFormat.MonthSegment.prototype.parse=function(_3b4,s,_3b6){
var _3b7;
switch(this._s.length){
case 3:
_3b7=AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM];
case 4:
_3b7=_3b7||AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG];
case 5:
_3b7=_3b7||AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT];
var _3b8=AjxFormat.Segment._parseLiterals(_3b4,"month",0,_3b7,s,_3b6);
if(_3b8==-1){
throw new AjxFormat.ParsingException(this._parent,this,"no match");
}
return _3b8;
}
var _3b9=this._getFixedLength();
return AjxFormat.Segment._parseInt(_3b4,"month",-1,s,_3b6,_3b9);
};
AjxDateFormat.WeekSegment=function(_3ba,s){
AjxDateFormat.DateSegment.call(this,_3ba,s);
};
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(date){
var year=date.getYear();
var _3be=date.getMonth();
var day=date.getDate();
var _3c0=/w/.test(this._s);
var _3c1=new Date(year,_3c0?0:_3be,1);
var week=0;
while(true){
week++;
if(_3c1.getMonth()>_3be||(_3c1.getMonth()==_3be&&_3c1.getDate()>=day)){
break;
}
_3c1.setDate(_3c1.getDate()+7);
}
return AjxFormat._zeroPad(week,this._s.length);
};
AjxDateFormat.WeekSegment.prototype.parse=function(_3c3,s,_3c5){
var _3c6=this._getFixedLength();
return AjxFormat.Segment._parseInt(null,null,0,s,_3c5,_3c6);
};
AjxDateFormat.DaySegment=function(_3c7,s){
AjxDateFormat.DateSegment.call(this,_3c7,s);
};
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(date){
var _3ca=date.getMonth();
var day=date.getDate();
if(/D/.test(this._s)&&_3ca>0){
var year=date.getYear();
do{
var _3cd=new Date(year,_3ca,1);
_3cd.setDate(0);
day+=_3cd.getDate();
_3ca--;
}while(_3ca>0);
}
return AjxFormat._zeroPad(day,this._s.length);
};
AjxDateFormat.DaySegment.prototype.parse=function(_3ce,s,_3d0){
var _3d1=this._getFixedLength();
var _3d2=/D/.test(this._s)?"dayofyear":"dayofmonth";
return AjxFormat.Segment._parseInt(_3ce,_3d2,0,s,_3d0,_3d1);
};
AjxDateFormat.WeekdaySegment=function(_3d3,s){
AjxDateFormat.DateSegment.call(this,_3d3,s);
};
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(date){
var _3d6=date.getDay();
if(/E/.test(this._s)){
var _3d7;
switch(this._s.length){
case 4:
_3d7=AjxDateFormat.LONG;
break;
case 5:
_3d7=AjxDateFormat.SHORT;
break;
default:
_3d7=AjxDateFormat.MEDIUM;
}
return AjxDateFormat.WeekdaySegment.WEEKDAYS[_3d7][_3d6];
}
return AjxFormat._zeroPad(_3d6,this._s.length);
};
AjxDateFormat.WeekdaySegment.prototype.parse=function(_3d8,s,_3da){
var _3db;
switch(this._s.length){
case 3:
_3db=AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.MEDIUM];
case 4:
_3db=_3db||AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.LONG];
case 5:
_3db=_3db||AjxDateFormat.WeekdaySegment.WEEKDAYS[AjxDateFormat.SHORT];
var _3dc=AjxFormat.Segment._parseLiterals(null,null,0,_3db,s,_3da);
if(_3dc==-1){
throw new AjxFormat.ParsingException(this._parent,this,"no match");
}
return _3dc;
}
var _3dd=this._getFixedLength();
return AjxFormat.Segment._parseInt(null,null,0,s,_3da,_3dd);
};
AjxDateFormat.TimeSegment=function(_3de,s){
AjxFormat.Segment.call(this,_3de,s);
};
AjxDateFormat.TimeSegment.prototype=new AjxFormat.Segment;
AjxDateFormat.TimeSegment.prototype.constructor=AjxDateFormat.TimeSegment;
AjxDateFormat.HourSegment=function(_3e0,s){
AjxFormat.Segment.call(this,_3e0,s);
};
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(date){
var _3e3=date.getHours();
if(_3e3>12&&/[hK]/.test(this._s)){
_3e3-=12;
}else{
if(_3e3==0&&/[h]/.test(this._s)){
_3e3=12;
}
}
return AjxFormat._zeroPad(_3e3,this._s.length);
};
AjxDateFormat.HourSegment.prototype.parse=function(_3e4,s,_3e6){
var _3e7=this._getFixedLength();
return AjxFormat.Segment._parseInt(_3e4,"hours",0,s,_3e6,_3e7);
};
AjxDateFormat.MinuteSegment=function(_3e8,s){
AjxFormat.Segment.call(this,_3e8,s);
};
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(date){
var _3eb=date.getMinutes();
return AjxFormat._zeroPad(_3eb,this._s.length);
};
AjxDateFormat.MinuteSegment.prototype.parse=function(_3ec,s,_3ee){
var _3ef=this._getFixedLength();
return AjxFormat.Segment._parseInt(_3ec,"minutes",0,s,_3ee,_3ef);
};
AjxDateFormat.SecondSegment=function(_3f0,s){
AjxFormat.Segment.call(this,_3f0,s);
};
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(date){
var _3f3=/s/.test(this._s)?date.getSeconds():date.getMilliseconds();
return AjxFormat._zeroPad(_3f3,this._s.length);
};
AjxDateFormat.SecondSegment.prototype.parse=function(_3f4,s,_3f6){
var _3f7=this._getFixedLength();
var _3f8=/s/.test(this._s)?"seconds":"milliseconds";
return AjxFormat.Segment._parseInt(_3f4,_3f8,0,s,_3f6,_3f7);
};
AjxDateFormat.AmPmSegment=function(_3f9,s){
AjxFormat.Segment.call(this,_3f9,s);
};
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(date){
var _3fc=date.getHours();
return _3fc<12?I18nMsg.periodAm:I18nMsg.periodPm;
};
AjxDateFormat.AmPmSegment.prototype.parse=function(_3fd,s,_3ff){
var _400=[I18nMsg.periodAm.toLowerCase(),I18nMsg.periodPm.toLowerCase(),I18nMsg.periodAm.toUpperCase(),I18nMsg.periodPm.toUpperCase()];
var _401=AjxFormat.Segment._parseLiterals(_3fd,"ampm",0,_400,s,_3ff);
if(_401==-1){
throw new AjxFormat.ParsingException(this._parent,this,"no match");
}
_3fd.ampm=_3fd.ampm%2;
return _401;
};
AjxDateFormat.TimezoneSegment=function(_402,s){
AjxFormat.Segment.call(this,_402,s);
};
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(date){
var _405=date.timezone||AjxTimezone.DEFAULT;
if(/Z/.test(this._s)){
return AjxTimezone.getShortName(_405);
}
return this._s.length<4?AjxTimezone.getMediumName(_405):AjxTimezone.getLongName(_405);
};
function AjxMessageFormat(_406){
AjxFormat.call(this,_406);
for(var i=0;i<_406.length;i++){
var c=_406.charAt(i);
if(c=="'"){
if(i+1<_406.length&&_406.charAt(i+1)=="'"){
var _409=new AjxFormat.TextSegment(this,"'");
this._segments.push(_409);
i++;
continue;
}
var head=i+1;
for(i++;i<_406.length;i++){
var c=_406.charAt(i);
if(c=="'"){
if(i+1<_406.length&&_406.charAt(i+1)=="'"){
_406=_406.substr(0,i)+_406.substr(i+1);
}else{
break;
}
}
}
if(i==_406.length){
throw new AjxFormat.FormatException(this,"unterminated string literal");
}
var tail=i;
var _409=new AjxFormat.TextSegment(this,_406.substring(head,tail));
this._segments.push(_409);
continue;
}
var head=i;
while(i<_406.length){
c=_406.charAt(i);
if(c=="{"||c=="'"){
break;
}
i++;
}
var tail=i;
if(head!=tail){
var _409=new AjxFormat.TextSegment(this,_406.substring(head,tail));
this._segments.push(_409);
i--;
continue;
}
var head=i+1;
var _40c=0;
while(++i<_406.length){
var c=_406.charAt(i);
if(c=="{"){
_40c++;
}else{
if(c=="}"){
if(_40c==0){
break;
}
_40c--;
}
}
}
var tail=i;
var _40d=tail-head;
var _40e=_406.substr(head,_40d);
var _409=new AjxMessageFormat.MessageSegment(this,_40e);
if(_409!=null){
this._segments.push(_409);
}
}
}
AjxMessageFormat.prototype=new AjxFormat;
AjxMessageFormat.prototype.constructor=AjxMessageFormat;
AjxMessageFormat.prototype.toString=function(){
return "[AjxMessageFormat: "+AjxFormat.prototype.toString.call(this)+"]";
};
AjxMessageFormat.format=function(_40f,_410){
return new AjxMessageFormat(_40f).format(_410);
};
AjxMessageFormat.prototype.format=function(_411){
if(!(_411 instanceof Array)){
_411=[_411];
}
return AjxFormat.prototype.format.call(this,_411);
};
AjxMessageFormat.prototype.getFormats=function(){
var _412=[];
for(var i=0;i<this._segments.length;i++){
var _414=this._segments[i];
if(_414 instanceof AjxMessageFormat.MessageSegment){
_412.push(_414.getSegmentFormat());
}
}
return _412;
};
AjxMessageFormat.prototype.getFormatsByArgumentIndex=function(){
var _415=[];
for(var i=0;i<this._segments.length;i++){
var _417=this._segments[i];
if(_417 instanceof AjxMessageFormat.MessageSegment){
_415[_417.getIndex()]=_417.getSegmentFormat();
}
}
return _415;
};
AjxMessageFormat.MessageSegment=function(_418,s){
AjxFormat.Segment.call(this,_418,s);
var _41a=AjxMessageFormat.MessageSegment._split(s,",");
this._index=Number(_41a[0]);
this._type=_41a[1]||"string";
this._style=_41a[2];
if(this._type=="list"){
this._isList=true;
this._type=_41a[2]||"string";
this._style=_41a[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 func=this._type=="date"?AjxDateFormat.getDateInstance:AjxDateFormat.getTimeInstance;
switch(this._style){
case "short":
this._formatter=func(AjxDateFormat.SHORT);
break;
case "medium":
this._formatter=func(AjxDateFormat.MEDIUM);
break;
case "long":
this._formatter=func(AjxDateFormat.LONG);
break;
case "full":
this._formatter=func(AjxDateFormat.FULL);
break;
default:
this._formatter=this._style==null?func(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(args){
var _41e=args[this._index];
if(this._formatter instanceof AjxChoiceFormat){
return this._formatter.format(args,this._index);
}
return this._formatter?this._formatter.format(_41e):String(_41e);
};
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(s,_420){
var _421=[];
var head=0;
var tail;
var _424=0;
for(tail=0;tail<s.length;tail++){
var c=s.charAt(tail);
if(c=="{"){
_424++;
}else{
if(c=="}"){
_424--;
}else{
if(c==_420&&_424==0){
_421.push(s.substring(head,tail));
head=tail+1;
}
}
}
}
if(tail>head){
_421.push(s.substring(head,tail));
}
return _421;
};
function AjxNumberFormat(_426,_427){
AjxFormat.call(this,_426);
if(_426==""){
return;
}
var _428=_426.split(/;/);
var _426=_428[0];
var i=0;
var _42a=this.__parseStatic(_426,i);
i=_42a.offset;
var _42b=_42a.text!="";
if(_42b){
this._segments.push(new AjxFormat.TextSegment(this,_42a.text));
}
var _42c=i;
while(i<_426.length&&AjxNumberFormat._META_CHARS.indexOf(_426.charAt(i))!=-1){
i++;
}
var end=i;
var _42e=_426.substring(_42c,end);
var e=_42e.indexOf("E");
var _430=e!=-1?_42e.substring(e+1):null;
if(_430){
_42e=_42e.substring(0,e);
this._showExponent=true;
}
var dot=_42e.indexOf(".");
var _432=dot!=-1?_42e.substring(0,dot):_42e;
if(_432){
var _433=_432.lastIndexOf(",");
if(_433!=-1){
this._groupingOffset=_432.length-_433-1;
}
_432=_432.replace(/[^#0]/g,"");
var zero=_432.indexOf("0");
if(zero!=-1){
this._minIntDigits=_432.length-zero;
}
this._maxIntDigits=_432.length;
}
var _435=dot!=-1?_42e.substring(dot+1):null;
if(_435){
var zero=_435.lastIndexOf("0");
if(zero!=-1){
this._minFracDigits=zero+1;
}
this._maxFracDigits=_435.replace(/[^#0]/g,"").length;
}
this._segments.push(new AjxNumberFormat.NumberSegment(this,_42e));
var _42a=this.__parseStatic(_426,i);
i=_42a.offset;
if(_42a.text!=""){
this._segments.push(new AjxFormat.TextSegment(this,_42a.text));
}
if(_427){
return;
}
if(_428.length>1){
var _426=_428[1];
this._negativeFormatter=new AjxNumberFormat(_426,true);
}else{
var _436=new AjxNumberFormat("");
_436._segments=_436._segments.concat(this._segments);
var _437=_42b?1:0;
var _438=new AjxFormat.TextSegment(_436,I18nMsg.numberSignMinus);
_436._segments.splice(_437,0,_438);
this._negativeFormatter=_436;
}
}
AjxNumberFormat.prototype=new AjxFormat;
AjxNumberFormat.prototype.constructor=AjxNumberFormat;
AjxNumberFormat.prototype.toString=function(){
var _439=["[AjxNumberFormat: ","formatter=",AjxFormat.prototype.toString.call(this)];
if(this._negativeFormatter){
_439.push(", negativeFormatter=",this._negativeFormatter.toString());
}
_439.push("]");
return _439.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(_43a,_43b){
return new AjxNumberFormat(_43a).format(_43b);
};
AjxNumberFormat.prototype.format=function(_43c){
if(_43c<0&&this._negativeFormatter){
return this._negativeFormatter.format(_43c);
}
return AjxFormat.prototype.format.call(this,_43c);
};
AjxNumberFormat.prototype.__parseStatic=function(s,i){
var data=[];
while(i<s.length){
var c=s.charAt(i++);
if(AjxNumberFormat._META_CHARS.indexOf(c)!=-1){
i--;
break;
}
switch(c){
case "'":
var _441=i;
while(i<s.length&&s.charAt(i++)!="'"){
}
var end=i;
c=end-_441==0?"'":s.substring(_441,end);
break;
case "%":
c=I18nMsg.numberSignPercent;
this._isPercent=true;
break;
case "\u2030":
c=I18nMsg.numberSignPerMill;
this._isPerMille=true;
break;
case "\xa4":
c=s.charAt(i)=="\xa4"?I18nMsg.currencyCode:I18nMsg.currencySymbol;
this._isCurrency=true;
break;
}
data.push(c);
}
return {text:data.join(""),offset:i};
};
AjxNumberFormat.NumberSegment=function(_443,s){
AjxFormat.Segment.call(this,_443,s);
};
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(_445){
if(isNaN(_445)){
return I18nMsg.numberNaN;
}
if(_445===Number.NEGATIVE_INFINITY||_445===Number.POSITIVE_INFINITY){
return I18nMsg.numberInfinity;
}
if(typeof _445!="number"){
_445=Number(_445);
}
_445=Math.abs(_445);
if(this._parent._isPercent){
_445*=100;
}else{
if(this._parent._isPerMille){
_445*=1000;
}
}
var s=this._parent._showExponent?_445.toExponential(this._parent._maxFracDigits).toUpperCase().replace(/E\+/,"E"):_445.toFixed(this._parent._maxFracDigits||0);
s=this._normalize(s);
return s;
};
AjxNumberFormat.NumberSegment.prototype._normalize=function(s){
var _448=s.split(/([\.Ee])/);
var _449=_448.shift();
if(_449.length<this._parent._minIntDigits){
_449=AjxFormat._zeroPad(_449,this._parent._minIntDigits,I18nMsg.numberZero);
}
if(_449.length>this._parent._groupingOffset){
var a=[];
var i=_449.length-this._parent._groupingOffset;
while(i>0){
a.unshift(_449.substr(i,this._parent._groupingOffset));
a.unshift(I18nMsg.numberSeparatorGrouping);
i-=this._parent._groupingOffset;
}
a.unshift(_449.substring(0,i+this._parent._groupingOffset));
_449=a.join("");
}
var _44c="0";
var _44d;
while(_448.length>0){
switch(_448.shift()){
case ".":
_44c=_448.shift();
break;
case "E":
case "e":
_44d=_448.shift();
break;
default:
}
}
_44c=_44c.replace(/0+$/,"");
if(_44c.length<this._parent._minFracDigits){
_44c=AjxFormat._zeroPad(_44c,this._parent._minFracDigits,I18nMsg.numberZero,true);
}
var a=[_449];
if(_44c.length>0){
var _44e=this._parent._isCurrency?I18nMsg.numberSeparatorMoneyDecimal:I18nMsg.numberSeparatorDecimal;
a.push(_44e,_44c);
}
if(_44d){
a.push("E",_44d.replace(/^\+/,""));
}
return a.join("");
};
function AjxChoiceFormat(_44f){
AjxFormat.call(this,_44f);
var _450=_44f.split("|");
if(arguments.length==1){
this._limits=new Array(_450.length);
this._lessThan=new Array(_450.length);
this._formats=new Array(_450.length);
var _451=new RegExp("^([^#<\u2264]+)([#<\u2264])(.*)$");
for(var i=0;i<_450.length;i++){
var _453=_450[i];
var _454=_451.exec(_453);
var _455=_454[1];
var _456=_454[2];
var _457=_454[3];
if(_455=="\u221e"){
this._limits[i]=Number.POSITIVE_INFINITY;
}else{
if(_455=="-\u221e"){
this._limits[i]=Number.NEGATIVE_INFINITY;
}else{
this._limits[i]=parseFloat(_455);
}
}
this._lessThan[i]=_456=="#"||_456=="\u2264";
this._formats[i]=new AjxMessageFormat(_457);
}
}else{
this._limits=arguments[0];
this._lessThan=new Array(arguments[0].length);
this._formats=arguments[1];
this._pattern=[];
for(var i=0;i<this._formats.length;i++){
if(i>0){
this._pattern.push("|");
}
this._pattern.push(this._limits[i],"#",this._formats[i]);
this._lessThan[i]=false;
this._formats[i]=new AjxMessageFormat(this._formats[i]);
}
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(_458,_459){
var num=_458 instanceof Array?_458[_459]:_458;
var _45b;
if(isNaN(num)||num<this._limits[0]){
_45b=this._formats[0];
}else{
for(var i=0;i<this._limits.length-1;i++){
var a=this._limits[i];
var b=this._limits[i+1];
var aGEb=num>=a;
var aLTb=this._lessThan[i+1]?num<b:num<=b;
if(aGEb&&aLTb){
_45b=this._formats[i];
break;
}
}
if(!_45b){
_45b=this._formats[this._formats.length-1];
}
}
return _45b.format(_458);
};
function AjxListFormat(_461,_462,_463){
AjxFormat.call(this,_461?_461.toPattern():"");
this._formatter=_461;
this._separator=_462||AjxMsg.listSeparator;
this._lastSeparator=_463||AjxMsg.listSeparatorLast;
}
AjxListFormat.prototype=new AjxFormat;
AjxListFormat.prototype.constructor=AjxListFormat;
AjxListFormat.prototype._formatter;
AjxListFormat.prototype._separator;
AjxListFormat.prototype._lastSeparator;
AjxListFormat.prototype.format=function(_464){
_464=_464 instanceof Array?_464:[_464];
var list=[];
for(var i=0;i<_464.length;i++){
if(i>0){
list.push(i<_464.length-1?this._separator:this._lastSeparator);
}
var item=_464[i];
list.push(this._formatter?this._formatter.format(item):String(item));
}
return list.join("");
};
function AjxDateUtil(){
}
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.FREQ_TO_DISPLAY={SEC:[AjxMsg.second,AjxMsg.seconds],MIN:[AjxMsg.minute,AjxMsg.minutes],HOU:[AjxMsg.hour,AjxMsg.hours],DAI:[AjxMsg.day,AjxMsg.days],WEE:[AjxMsg.week,AjxMsg.weeks],MON:[AjxMsg.month,AjxMsg.months],YEA:[AjxMsg.year,AjxMsg.years]};
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 _468=AjxDateUtil._dateFormat.getSegments();
for(var i=0;i<_468.length;i++){
if(_468[i] instanceof AjxDateFormat.YearSegment){
_468[i]=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(y,m,d){
var date=new Date(y,m,d);
var year=y>999?date.getFullYear():date.getYear();
return date.getMonth()==m&&date.getDate()==d&&year==y;
};
AjxDateUtil.daysInMonth=function(y,m){
var date=new Date(y,m,1,12);
date.setMonth(date.getMonth()+1);
date.setDate(date.getDate()-1);
return date.getDate();
};
AjxDateUtil.isLeapYear=function(y){
return (new Date(y,1,29)).getMonth()==1;
};
AjxDateUtil.isLocale24Hour=function(){
var _473=AjxDateFormat.getTimeInstance(AjxDateFormat.SHORT);
var len=_473._segments.length;
for(var j=0;j<len;j++){
if(_473._segments[j]._s=="a"){
return false;
}
}
return true;
};
AjxDateUtil.roll=function(date,_477,_478){
var d=date.getDate();
if(_477==AjxDateUtil.MONTH){
date.setDate(1);
date.setMonth(date.getMonth()+_478);
var max=AjxDateUtil.daysInMonth(date.getFullYear(),date.getMonth());
date.setDate(Math.min(d,max));
}else{
if(_477==AjxDateUtil.YEAR){
date.setDate(1);
date.setFullYear(date.getFullYear()+_478);
var max=AjxDateUtil.daysInMonth(date.getFullYear(),date.getMonth());
date.setDate(Math.min(d,max));
}else{
if(_477==AjxDateUtil.WEEK){
date.setDate(date.getDate()+7*_478);
}else{
if(_477==AjxDateUtil.DAY){
date.setDate(date.getDate()+_478);
}else{
return date;
}
}
}
}
return date;
};
AjxDateUtil.computeDateDelta=function(_47b){
var _47c=(new Date()).getTime()-_47b;
if(_47c<0){
return null;
}
var _47d=Math.floor(_47c/(AjxDateUtil.MSEC_PER_DAY*365));
if(_47d!=0){
_47c-=_47d*AjxDateUtil.MSEC_PER_DAY*365;
}
var _47e=Math.floor(_47c/(AjxDateUtil.MSEC_PER_DAY*30.42));
if(_47e>0){
_47c-=Math.floor(_47e*AjxDateUtil.MSEC_PER_DAY*30.42);
}
var days=Math.floor(_47c/AjxDateUtil.MSEC_PER_DAY);
if(days>0){
_47c-=days*AjxDateUtil.MSEC_PER_DAY;
}
var _480=Math.floor(_47c/AjxDateUtil.MSEC_PER_HOUR);
if(_480>0){
_47c-=_480*AjxDateUtil.MSEC_PER_HOUR;
}
var mins=Math.floor(_47c/60000);
if(mins>0){
_47c-=mins*60000;
}
var secs=Math.floor(_47c/1000);
var _483="";
if(_47d>0){
_483=_47d+" ";
_483+=(_47d>1)?AjxMsg.years:AjxMsg.year;
if(_47d<=3&&_47e>0){
_483+=" "+_47e;
_483+=" "+((_47e>1)?AjxMsg.months:AjxMsg.months);
}
}else{
if(_47e>0){
_483=_47e+" ";
_483+=(_47e>1)?AjxMsg.months:AjxMsg.month;
if(_47e<=3&&days>0){
_483+=" "+days;
_483+=" "+((days>1)?AjxMsg.days:AjxMsg.day);
}
}else{
if(days>0){
_483=days+" ";
_483+=(days>1)?AjxMsg.days:AjxMsg.day;
if(days<=2&&_480>0){
_483+=" "+_480;
_483+=" "+((_480>1)?AjxMsg.hours:AjxMsg.hour);
}
}else{
if(_480>0){
_483=_480+" ";
_483+=(_480>1)?AjxMsg.hours:AjxMsg.hour;
if(_480<5&&mins>0){
_483+=" "+mins;
_483+=" "+((mins>1)?AjxMsg.minutes:AjxMsg.minute);
}
}else{
if(mins>0){
_483=mins+" ";
_483+=((mins>1)?AjxMsg.minutes:AjxMsg.minute);
if(mins<5&&secs>0){
_483+=" "+secs;
_483+=" "+((secs>1)?AjxMsg.seconds:AjxMsg.second);
}
}else{
_483=secs;
_483+=" "+((secs>1)?AjxMsg.seconds:AjxMsg.second);
}
}
}
}
}
_483+=" "+AjxMsg.ago;
return _483;
};
AjxDateUtil.simpleComputeDateStr=function(date,_485){
var _486=AjxDateUtil._dateFormat.format(date);
return _485?_485+_486:_486;
};
AjxDateUtil.simpleParseDateStr=function(_487){
return AjxDateUtil._dateFormat.parse(_487);
};
AjxDateUtil.simpleComputeDateTimeStr=function(date,_489){
var _48a=AjxDateUtil._dateTimeFormat.format(date);
return _489?_489+_48a:_48a;
};
AjxDateUtil.simpleParseDateTimeStr=function(_48b){
return AjxDateUtil._dateTimeFormat.parse(_48b);
};
AjxDateUtil.longComputeDateStr=function(date){
var _48d=AjxDateFormat.getDateInstance(AjxDateFormat.FULL);
return _48d.format(date);
};
AjxDateUtil.computeDateStr=function(now,_48f){
if(_48f==null){
return "";
}
var date=new Date(_48f);
if(now.getTime()-_48f<AjxDateUtil.MSEC_PER_DAY&&now.getDay()==date.getDay()){
return AjxDateUtil.computeTimeString(date);
}
if(now.getFullYear()==date.getFullYear()){
return AjxDateUtil._dateFormatNoYear.format(date);
}
return AjxDateUtil.simpleComputeDateStr(date);
};
AjxDateUtil.computeTimeString=function(date){
var _492=AjxDateFormat.getTimeInstance(AjxDateFormat.SHORT);
return _492.format(date);
};
AjxDateUtil.computeDateTimeString=function(date){
var _494=AjxDateFormat.getDateTimeInstance(AjxDateFormat.LONG);
return _494.format(date);
};
AjxDateUtil._getHoursStr=function(date,pad,_497){
var _498=date.getHours();
if(!_497){
_498%=12;
if(_498==0){
_498=12;
}
}
return pad?AjxDateUtil._pad(_498):_498;
};
AjxDateUtil._getMinutesStr=function(date){
return AjxDateUtil._pad(date.getMinutes());
};
AjxDateUtil._getSecondsStr=function(date){
return AjxDateUtil._pad(date.getSeconds());
};
AjxDateUtil._getAMPM=function(date,_49c){
var _49d=date.getHours();
return (_49d<12)?(_49c?"AM":"am"):(_49c?"PM":"pm");
};
AjxDateUtil._getMonthName=function(date,_49f){
return _49f?AjxDateUtil.MONTH_MEDIUM[date.getMonth()]:AjxDateUtil.MONTH_LONG[date.getMonth()];
};
AjxDateUtil._getMonth=function(date,pad){
var _4a2=date.getMonth()+1;
if(pad){
return AjxDateUtil._pad(_4a2);
}else{
return _4a2;
}
};
AjxDateUtil._getDate=function(date,pad){
var _4a5=date.getDate();
return pad?AjxDateUtil._pad(_4a5):_4a5;
};
AjxDateUtil._getWeekday=function(date){
var _4a7=date.getDay();
return AjxDateUtil.WEEKDAY_LONG[_4a7];
};
AjxDateUtil._getFullYear=function(date){
return date.getFullYear();
};
AjxDateUtil.getTimeStr=function(date,_4aa){
var s=_4aa;
s=s.replace(/%d/g,AjxDateUtil._getDate(date,true));
s=s.replace(/%D/g,AjxDateUtil._getDate(date,false));
s=s.replace(/%w/g,AjxDateUtil._getWeekday(date));
s=s.replace(/%M/g,AjxDateUtil._getMonthName(date));
s=s.replace(/%t/g,AjxDateUtil._getMonthName(date,true));
s=s.replace(/%n/g,AjxDateUtil._getMonth(date,true));
s=s.replace(/%Y/g,AjxDateUtil._getFullYear(date));
s=s.replace(/%h/g,AjxDateUtil._getHoursStr(date,false,false));
s=s.replace(/%H/g,AjxDateUtil._getHoursStr(date,true,false));
s=s.replace(/%m/g,AjxDateUtil._getMinutesStr(date));
s=s.replace(/%s/g,AjxDateUtil._getSecondsStr(date));
s=s.replace(/%P/g,AjxDateUtil._getAMPM(date,true));
s=s.replace(/%p/g,AjxDateUtil._getAMPM(date,false));
return s;
};
AjxDateUtil.getRoundedMins=function(date,_4ad){
var mins=date.getMinutes();
if(mins!=0&&_4ad){
mins=(Math.ceil((mins/_4ad)))*_4ad;
}
return mins;
};
AjxDateUtil.roundTimeMins=function(date,_4b0){
var mins=date.getMinutes();
var _4b2=date.getHours();
if(mins!=0&&_4b0){
mins=(Math.ceil((mins/_4b0)))*_4b0;
if(mins==60){
mins=0;
_4b2++;
}
date.setMinutes(mins);
date.setHours(_4b2);
}
return date;
};
AjxDateUtil.isInRange=function(_4b3,_4b4,_4b5,_4b6){
return (_4b3<_4b6&&_4b4>_4b5);
};
AjxDateUtil.getSimpleDateFormat=function(){
return AjxDateUtil._dateFormat;
};
AjxDateUtil.getServerDate=function(date){
if(!AjxDateUtil._serverDateFormatter){
AjxDateUtil._serverDateFormatter=new AjxDateFormat("yyyyMMdd");
}
return AjxDateUtil._serverDateFormatter.format(date);
};
AjxDateUtil.getServerDateTime=function(date,_4b9){
var _4ba=date;
var _4bb=null;
if(_4b9){
if(!AjxDateUtil._serverDateTimeFormatterUTC){
AjxDateUtil._serverDateTimeFormatterUTC=new AjxDateFormat("yyyyMMdd'T'HHmmss'Z'");
}
_4bb=AjxDateUtil._serverDateTimeFormatterUTC;
_4ba=new Date(date.getTime());
_4ba.setMinutes(_4ba.getMinutes()+_4ba.getTimezoneOffset());
}else{
if(!AjxDateUtil._serverDateTimeFormatter){
AjxDateUtil._serverDateTimeFormatter=new AjxDateFormat("yyyyMMdd'T'HHmmss");
}
_4bb=AjxDateUtil._serverDateTimeFormatter;
}
return _4bb.format(_4ba);
};
AjxDateUtil.parseServerTime=function(_4bc,date){
if(_4bc.charAt(8)=="T"){
var hh=parseInt(_4bc.substr(9,2),10);
var mm=parseInt(_4bc.substr(11,2),10);
var ss=parseInt(_4bc.substr(13,2),10);
if(_4bc.charAt(15)=="Z"){
mm+=AjxTimezone.getOffset(AjxTimezone.DEFAULT,date);
}
date.setHours(hh,mm,ss,0);
}
return date;
};
AjxDateUtil.parseServerDateTime=function(_4c1){
if(_4c1==null){
return null;
}
var d=new Date();
var yyyy=parseInt(_4c1.substr(0,4),10);
var MM=parseInt(_4c1.substr(4,2),10);
var dd=parseInt(_4c1.substr(6,2),10);
d.setFullYear(yyyy);
d.setMonth(MM-1);
d.setMonth(MM-1);
d.setDate(dd);
AjxDateUtil.parseServerTime(_4c1,d);
return d;
};
AjxDateUtil._pad=function(n){
return n<10?("0"+n):n;
};
AjxSelectionManager=function(_4c7){
this._owner=_4c7;
};
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 _4c8=this.getItems();
if(_4c8.length>0){
this._anchor=_4c8[0];
}
}
return this._anchor;
};
AjxSelectionManager.prototype.getCursor=function(){
if(this._cursor==null){
this._cursor=this.getAnchor();
}
return this._cursor;
};
AjxSelectionManager.prototype.isSelected=function(item){
return this.getItems().binarySearch(item)!=-1;
};
AjxSelectionManager.prototype.selectOneItem=function(item){
this.select(item,AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS);
};
AjxSelectionManager.prototype.toggleItem=function(item){
this.select(item,AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS);
};
AjxSelectionManager.prototype.selectFromAnchorToItem=function(item){
this.select(item,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(item,_4ce){
this._setAnchorAndCursor(item,_4ce);
var _4cf=this._selectedItems;
var _4d0=(_4cf==null)?0:_4cf.length;
this._selectedItems=null;
this._selectedItems=this._createItemsCollection();
var _4d1=this._owner.getItemCount();
var _4d2=false;
var _4d3=false;
var _4d4=false;
for(var i=0;i<_4d1;++i){
var _4d6=this._owner.getItem(i);
var _4d7=this._isItemOldSelection(_4d6,_4cf);
var _4d8=_4d7;
switch(_4ce){
case AjxSelectionManager.SELECT_TO_ANCHOR:
if(this._anchor==null){
this._anchor=_4d6;
}
var _4d9=(_4d6==this._anchor||_4d6==item);
var _4da=false;
if(!_4d4&&_4d9){
_4d4=true;
_4da=true;
}
_4d8=_4d4;
if((!_4da||this._anchor==item)&&_4d4&&_4d9){
_4d4=false;
}
break;
case AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS:
_4d8=(_4d6==item);
break;
case AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS:
if(_4d6==item){
_4d8=!_4d7;
}
break;
case AjxSelectionManager.DESELECT_ALL:
_4d8=false;
break;
case AjxSelectionManager.SELECT_ALL:
_4d8=true;
break;
}
if(_4d8){
this._selectedItems.add(_4d6);
_4d2=(this._selectedItems.length>1);
}
if(_4d8!=_4d7){
if(this._owner.itemSelectionChanged!=null){
this._owner.itemSelectionChanged(_4d6,i,_4d8);
}
_4d3=true;
}
}
_4d3=_4d3||(_4d0!=this._selectedItems.length);
if(_4d2){
this._selectedItems.sort();
}
if(_4d3&&this._owner.selectionChanged!=null){
this._owner.selectionChanged(item);
}
};
AjxSelectionManager.prototype.removeItem=function(item){
if(this._selectedItems){
var _4dc=this._selectedItems.binarySearch(item);
if(_4dc>-1){
this._selectedItems.removeAt(_4dc);
}
}
};
AjxSelectionManager.prototype._createItemsCollection=function(){
return new AjxVector();
};
AjxSelectionManager.prototype._isItemOldSelection=function(_4dd,_4de){
var ret=false;
if(_4de){
var _4e0=_4de.binarySearch(_4dd);
if(_4e0>-1){
_4de.removeAt(_4e0);
}
ret=(_4e0!=-1);
}
return ret;
};
AjxSelectionManager.prototype._setAnchorAndCursor=function(item,_4e2){
switch(_4e2){
case AjxSelectionManager.SELECT_TO_ANCHOR:
this._cursor=item;
break;
case AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS:
this._anchor=item;
this._cursor=item;
break;
case AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS:
this._anchor=item;
this._cursor=item;
break;
case AjxSelectionManager.DESELECT_ALL:
this._anchor=null;
this._cursor=null;
break;
case AjxSelectionManager.SELECT_ALL:
return;
}
};
function AjxPost(_4e3){
this._callback=null;
this._iframeId=_4e3;
}
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(_4e4,form,_4e6){
var tags=form.getElementsByTagName("input");
var _4e8=new Array();
for(var i=0;i<tags.length;i++){
if(tags[i].type=="file"){
_4e8.push(tags[i]);
}
}
for(var i=0;i<_4e8.length;i++){
var _4ea=document.createElement("input");
_4ea.type="hidden";
_4ea.name="filename"+(i+1);
_4ea.value=_4e8[i].value;
_4e8[i].parentNode.insertBefore(_4ea,_4e8[i]);
}
form.target=this._iframeId;
this._callback=_4e4;
var req=new AjxPostRequest(form);
var _4ec=new AjxTimedAction(this,this._onFailure,[req.id]);
var _4ed=_4e6?_4e6:5000;
AjxPost._outStandingRequests[req.id]=req;
try{
req.send(_4ec,_4ed);
}
catch(ex){
if(AjxEnv.isIE){
if(ex.number==-2147024891){
throw new AjxException(ZmMsg.uploadErrorAccessDenied,ex.number);
}
}
throw ex;
}
};
AjxPost.prototype._onFailure=function(_4ee){
var req=AjxPost._outStandingRequests[_4ee];
req.cancel();
delete AjxPost._outStandingRequests[_4ee];
if(this._callback){
this._callback.run([404]);
this._callback=null;
}
};
AjxPost.prototype.loaded=function(_4f0,_4f1,id){
var req=AjxPost._outStandingRequests[_4f1];
if(req&&!req.hasBeenCancelled()){
req.cancelTimeout();
}
delete AjxPost._outStandingRequests[_4f1];
if(this._callback){
this._callback.run(_4f0,id);
this._callback=null;
}
};
function AjxPostRequest(form){
this.id=AjxPost._reqIds++;
this._cancelled=false;
this._form=form;
var inp=form.elements.namedItem("requestId");
if(!inp){
inp=form.ownerDocument.createElement("input");
inp.type="hidden";
inp.name="requestId";
}
inp.value=this.id;
form.appendChild(inp);
}
AjxPostRequest.prototype.send=function(_4f6,_4f7){
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;
};
function AjxBuffer(){
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(_4f8){
if(_4f8==null){
_4f8="";
}
return this.buffer.join(_4f8);
};
AjxBuffer.prototype.append=function(){
arguments.join=this.buffer.join;
this.buffer[this.buffer.length]=arguments.join("");
};
AjxBuffer.prototype.join=function(str){
return this.buffer.join(str);
};
AjxBuffer.prototype.set=function(str){
this.buffer=[str];
};
AjxBuffer.prototype.clear=function(){
this.buffer=[];
};
AjxBuffer.concat=function(){
arguments.join=Array.prototype.join;
return arguments.join("");
};
AjxBuffer.append=AjxBuffer.concat;
function AjxCache(){
this._cache=new Object();
}
AjxCache.prototype.set=function(key,_4fc){
this._cache[key]=_4fc;
};
AjxCache.prototype.get=function(key){
return this._cache[key];
};
AjxCache.prototype.getByProperty=function(prop,_4ff){
var list=new Array();
for(var key in this._cache){
var obj=this._cache[key];
if(obj instanceof Object&&obj[prop]==_4ff){
list.push(obj);
}
}
return list;
};
AjxCache.prototype.clearAll=function(){
for(var key in this._cache){
this._cache[key]=null;
}
this._cache=new Object();
};
AjxCache.prototype.clear=function(key){
this._cache[key]=null;
};
AjxCache.prototype.clearByProperty=function(prop,_506){
for(var key in this._cache){
var obj=this._cache[key];
if(obj[prop]==_506){
this._cache[key]=null;
}
}
};
function AjxTimezoneData(){
}
AjxTimezoneData.TRANSITION_YEAR=2007;
AjxTimezoneData.TIMEZONE_RULES=[{serverId:"(GMT-12.00) International Date Line West",clientId:"Etc/GMT+12",standard:{offset:-720}},{serverId:"(GMT-11.00) Midway Island / Samoa",clientId:"Pacific/Midway",standard:{offset:-660}},{serverId:"(GMT-10.00) Hawaii",clientId:"Pacific/Honolulu",standard:{offset:-600}},{serverId:"(GMT-09.00) Alaska",clientId:"America/Anchorage",standard:{offset:-540,mon:11,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,11,4]},daylight:{offset:-480,mon:3,week:2,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,11]}},{serverId:"(GMT-08.00) Pacific Time (US & Canada)",clientId:"America/Los_Angeles",standard:{offset:-480,mon:11,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,11,4]},daylight:{offset:-420,mon:3,week:2,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,11]}},{serverId:"(GMT-08.00) Tijuana / Baja California",clientId:"America/Tijuana",standard:{offset:-480,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:-420,mon:4,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT-07.00) Arizona",clientId:"America/Phoenix",standard:{offset:-420}},{serverId:"(GMT-07.00) Chihuahua / La Paz / Mazatlan - New",clientId:"America/Chihuahua",standard:{offset:-420,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:-360,mon:4,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT-07.00) Chihuahua / La Paz / Mazatlan - Old",clientId:"America/Chihuahua",standard:{offset:-420,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:-360,mon:4,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT-07.00) Mountain Time (US & Canada)",clientId:"America/Denver",standard:{offset:-420,mon:11,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,11,4]},daylight:{offset:-360,mon:3,week:2,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,11]}},{serverId:"(GMT-06.00) Central America",clientId:"America/Guatemala",standard:{offset:-360}},{serverId:"(GMT-06.00) Central Time (US & Canada)",clientId:"America/Chicago",standard:{offset:-360,mon:11,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,11,4]},daylight:{offset:-300,mon:3,week:2,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,11]}},{serverId:"(GMT-06.00) Guadalajara / Mexico City / Monterrey - New",clientId:"America/Mexico_City",standard:{offset:-360,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:-300,mon:4,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT-06.00) Guadalajara / Mexico City / Monterrey - Old",clientId:"America/Mexico_City",standard:{offset:-360,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:-300,mon:4,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT-06.00) Saskatchewan",clientId:"America/Guatemala",standard:{offset:-360}},{serverId:"(GMT-05.00) Bogota / Lima / Quito / Rio Branco",clientId:"America/Bogota",standard:{offset:-300}},{serverId:"(GMT-05.00) Eastern Time (US & Canada)",clientId:"America/New_York",standard:{offset:-300,mon:11,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,11,4]},daylight:{offset:-240,mon:3,week:2,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,11]}},{serverId:"(GMT-05.00) Indiana (East)",clientId:"America/Jamaica",standard:{offset:-300}},{serverId:"(GMT-04.00) Atlantic Time (Canada)",clientId:"America/Glace_Bay",standard:{offset:-240,mon:11,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,11,4]},daylight:{offset:-180,mon:3,week:2,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,11]}},{serverId:"(GMT-04.00) Caracas / La Paz",clientId:"America/Caracas",standard:{offset:-240}},{serverId:"(GMT-04.00) Manaus",clientId:"America/Manaus",standard:{offset:-240,mon:2,week:-1,wkday:1,hour:0,min:0,sec:0,trans:[2007,2,25]},daylight:{offset:-180,mon:11,week:1,wkday:1,hour:0,min:0,sec:0,trans:[2007,11,4]}},{serverId:"(GMT-04.00) Santiago",clientId:"America/Santiago",standard:{offset:-240,mon:3,week:2,wkday:7,hour:23,min:59,sec:59,trans:[2007,3,10]},daylight:{offset:-180,mon:10,week:2,wkday:7,hour:23,min:59,sec:59,trans:[2007,10,13]}},{serverId:"(GMT-03.30) Newfoundland",clientId:"America/St_Johns",standard:{offset:-210,mon:11,week:1,wkday:1,hour:0,min:1,sec:0,trans:[2007,11,4]},daylight:{offset:-150,mon:3,week:2,wkday:1,hour:0,min:1,sec:0,trans:[2007,3,11]}},{serverId:"(GMT-03.00) Brasilia",clientId:"America/Sao_Paulo",standard:{offset:-180,mon:2,week:-1,wkday:1,hour:0,min:0,sec:0,trans:[2007,2,25]},daylight:{offset:-120,mon:11,week:1,wkday:1,hour:0,min:0,sec:0,trans:[2007,11,4]}},{serverId:"(GMT-03.00) Buenos Aires / Georgetown",clientId:"America/Argentina/Buenos_Aires",standard:{offset:-180}},{serverId:"(GMT-03.00) Greenland",clientId:"America/Godthab",standard:{offset:-180,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:-120,mon:4,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT-03.00) Montevideo",clientId:"America/Montevideo",standard:{offset:-180,mon:3,week:2,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,11]},daylight:{offset:-120,mon:10,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,7]}},{serverId:"(GMT-02.00) Mid-Atlantic",clientId:"Atlantic/South_Georgia",standard:{offset:-120,mon:9,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,9,30]},daylight:{offset:-60,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT-01.00) Azores",clientId:"Atlantic/Azores",standard:{offset:-60,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:0,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT-01.00) Cape Verde Is.",clientId:"Atlantic/Cape_Verde",standard:{offset:-60}},{serverId:"(GMT) Casablanca / Monrovia / Reykjavik",clientId:"Africa/Casablanca",standard:{offset:0}},{serverId:"(GMT) Greenwich Mean Time - Dublin / Edinburgh / Lisbon / London",clientId:"Europe/London",standard:{offset:0,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:60,mon:3,week:-1,wkday:1,hour:1,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna",clientId:"Europe/Berlin",standard:{offset:60,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:120,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+01.00) Belgrade / Bratislava / Budapest / Ljubljana / Prague",clientId:"Europe/Belgrade",standard:{offset:60,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:120,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+01.00) Brussels / Copenhagen / Madrid / Paris",clientId:"Europe/Brussels",standard:{offset:60,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:120,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+01.00) Sarajevo / Skopje / Warsaw / Zagreb",clientId:"Europe/Warsaw",standard:{offset:60,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:120,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+01.00) West Central Africa",clientId:"Africa/Algiers",standard:{offset:60}},{serverId:"(GMT+02.00) Amman",clientId:"Asia/Amman",standard:{offset:120,mon:9,week:-1,wkday:6,hour:1,min:0,sec:0,trans:[2007,9,28]},daylight:{offset:180,mon:3,week:-1,wkday:5,hour:0,min:0,sec:0,trans:[2007,3,29]}},{serverId:"(GMT+02.00) Athens / Bucharest / Istanbul",clientId:"Europe/Athens",standard:{offset:120,mon:10,week:-1,wkday:1,hour:4,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:180,mon:3,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+02.00) Beirut",clientId:"Asia/Beirut",standard:{offset:120,mon:10,week:-1,wkday:7,hour:23,min:59,sec:59,trans:[2007,10,27]},daylight:{offset:180,mon:3,week:-1,wkday:1,hour:0,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+02.00) Cairo",clientId:"Africa/Cairo",standard:{offset:120,mon:9,week:-1,wkday:5,hour:23,min:59,sec:59,trans:[2007,9,27]},daylight:{offset:180,mon:4,week:-1,wkday:5,hour:23,min:59,sec:59,trans:[2007,4,26]}},{serverId:"(GMT+02.00) Harare / Pretoria",clientId:"Africa/Harare",standard:{offset:120}},{serverId:"(GMT+02.00) Helsinki / Kyiv / Riga / Sofia / Tallinn / Vilnius",clientId:"Europe/Helsinki",standard:{offset:120,mon:10,week:-1,wkday:1,hour:4,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:180,mon:3,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+02.00) Jerusalem",clientId:"Asia/Jerusalem",standard:{offset:120,mon:9,week:3,wkday:1,hour:2,min:0,sec:0,trans:[2007,9,16]},daylight:{offset:180,mon:3,week:-1,wkday:6,hour:2,min:0,sec:0,trans:[2007,3,30]}},{serverId:"(GMT+02.00) Minsk",clientId:"Europe/Minsk",standard:{offset:120,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:180,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+02.00) Windhoek",clientId:"Africa/Windhoek",standard:{offset:120,mon:9,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,9,2]},daylight:{offset:60,mon:4,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT+03.00) Baghdad",clientId:"Asia/Baghdad",standard:{offset:180,mon:10,week:1,wkday:1,hour:4,min:0,sec:0,trans:[2007,10,7]},daylight:{offset:240,mon:4,week:1,wkday:1,hour:3,min:0,sec:0,trans:[2007,4,1]}},{serverId:"(GMT+03.00) Kuwait / Riyadh",clientId:"Asia/Kuwait",standard:{offset:180}},{serverId:"(GMT+03.00) Moscow / St. Petersburg / Volgograd",clientId:"Europe/Moscow",standard:{offset:180,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:240,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+03.00) Nairobi",clientId:"Africa/Nairobi",standard:{offset:180}},{serverId:"(GMT+03.00) Tbilisi",clientId:"Asia/Tbilisi",standard:{offset:180}},{serverId:"(GMT+03.30) Tehran",clientId:"Asia/Tehran",standard:{offset:210}},{serverId:"(GMT+04.00) Abu Dhabi / Muscat",clientId:"Asia/Muscat",standard:{offset:240}},{serverId:"(GMT+04.00) Baku",clientId:"Asia/Baku",standard:{offset:240,mon:10,week:-1,wkday:1,hour:5,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:300,mon:3,week:-1,wkday:1,hour:4,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+04.00) Yerevan",clientId:"Asia/Yerevan",standard:{offset:240,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:300,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+04.30) Kabul",clientId:"Asia/Kabul",standard:{offset:270}},{serverId:"(GMT+05.00) Ekaterinburg",clientId:"Asia/Yekaterinburg",standard:{offset:300,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:360,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+05.00) Islamabad / Karachi / Tashkent",clientId:"Asia/Karachi",standard:{offset:300}},{serverId:"(GMT+05.30) Chennai / Kolkata / Mumbai / New Delhi",clientId:"Asia/Calcutta",standard:{offset:330}},{serverId:"(GMT+05.30) Sri Jayawardenepura",clientId:"Asia/Colombo",standard:{offset:330}},{serverId:"(GMT+05.45) Kathmandu",clientId:"Asia/Katmandu",standard:{offset:345}},{serverId:"(GMT+06.00) Almaty / Novosibirsk",clientId:"Asia/Novosibirsk",standard:{offset:360,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:420,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+06.00) Astana / Dhaka",clientId:"Asia/Dhaka",standard:{offset:360}},{serverId:"(GMT+06.30) Yangon (Rangoon)",clientId:"Asia/Rangoon",standard:{offset:390}},{serverId:"(GMT+07.00) Bangkok / Hanoi / Jakarta",clientId:"Asia/Bangkok",standard:{offset:420}},{serverId:"(GMT+07.00) Krasnoyarsk",clientId:"Asia/Krasnoyarsk",standard:{offset:420,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:480,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+08.00) Beijing / Chongqing / Hong Kong / Urumqi",clientId:"Asia/Hong_Kong",standard:{offset:480}},{serverId:"(GMT+08.00) Irkutsk / Ulaan Bataar",clientId:"Asia/Irkutsk",standard:{offset:480,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:540,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+08.00) Kuala Lumpur / Singapore",clientId:"Asia/Kuala_Lumpur",standard:{offset:480}},{serverId:"(GMT+08.00) Perth",clientId:"Australia/Perth",standard:{offset:480,mon:3,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,3,25]},daylight:{offset:540,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]}},{serverId:"(GMT+08.00) Taipei",clientId:"Asia/Taipei",standard:{offset:480}},{serverId:"(GMT+09.00) Osaka / Sapporo / Tokyo",clientId:"Asia/Tokyo",standard:{offset:540}},{serverId:"(GMT+09.00) Seoul",clientId:"Asia/Seoul",standard:{offset:540}},{serverId:"(GMT+09.00) Yakutsk",clientId:"Asia/Yakutsk",standard:{offset:540,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:600,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+09.30) Adelaide",clientId:"Australia/Adelaide",standard:{offset:570,mon:3,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,3,25]},daylight:{offset:630,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]}},{serverId:"(GMT+09.30) Darwin",clientId:"Australia/Darwin",standard:{offset:570}},{serverId:"(GMT+10.00) Brisbane",clientId:"Australia/Brisbane",standard:{offset:600}},{serverId:"(GMT+10.00) Canberra / Melbourne / Sydney",clientId:"Australia/Sydney",standard:{offset:600,mon:3,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,3,25]},daylight:{offset:660,mon:10,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,28]}},{serverId:"(GMT+10.00) Guam / Port Moresby",clientId:"Pacific/Guam",standard:{offset:600}},{serverId:"(GMT+10.00) Hobart",clientId:"Australia/Hobart",standard:{offset:600,mon:3,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,3,25]},daylight:{offset:660,mon:10,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,7]}},{serverId:"(GMT+10.00) Vladivostok",clientId:"Asia/Vladivostok",standard:{offset:600,mon:10,week:-1,wkday:1,hour:3,min:0,sec:0,trans:[2007,10,28]},daylight:{offset:660,mon:3,week:-1,wkday:1,hour:2,min:0,sec:0,trans:[2007,3,25]}},{serverId:"(GMT+11.00) Magadan / Solomon Is. / New Caledonia",clientId:"Asia/Magadan",standard:{offset:660}},{serverId:"(GMT+12.00) Auckland / Wellington",clientId:"Pacific/Auckland",standard:{offset:720,mon:3,week:3,wkday:1,hour:3,min:0,sec:0,trans:[2007,3,18]},daylight:{offset:780,mon:10,week:1,wkday:1,hour:2,min:0,sec:0,trans:[2007,10,7]}},{serverId:"(GMT+12.00) Fiji / Kamchatka / Marshall Is.",clientId:"Pacific/Fiji",standard:{offset:720}},{serverId:"(GMT+13.00) Nuku'alofa",clientId:"Pacific/Tongatapu",standard:{offset:780}}];
function AjxTimezone(){
}
AjxTimezone.createMDayTransition=function(date,_50a){
return {offset:_50a!=null?_50a:date.getTimezoneOffset(),mon:date.getMonth()+1,mday:date.getDate(),hour:date.getHours(),min:date.getMinutes(),sec:date.getSeconds()};
};
AjxTimezone.createWkDayTransition=function(date,_50c){
var mon=date.getMonth()+1;
var _50e=date.getDate();
var week=Math.floor((_50e-1)/7);
var _510=new Date(new Date(date.getTime()).setMonth(mon,0)).getDate();
var last=_510-_50e<7;
return {offset:_50c!=null?_50c:date.getTimezoneOffset(),mon:mon,week:last?-1:week+1,wkday:date.getDay()+1,hour:date.getHours(),min:date.getMinutes(),sec:date.getSeconds()};
};
AjxTimezone.createTransitionDate=function(_512){
var date=new Date(AjxTimezoneData.TRANSITION_YEAR,_512.mon-1,1,12,0,0);
if(_512.mday){
date.setDate(_512.mday);
}else{
if(_512.week==-1){
date.setMonth(date.getMonth()+1,0);
for(var i=0;i<7;i++){
if(date.getDay()+1==_512.wkday){
break;
}
date.setDate(date.getDate()-1);
}
}else{
for(var i=0;i<7;i++){
if(date.getDay()+1==_512.wkday){
break;
}
date.setDate(date.getDate()+1);
}
date.setDate(date.getDate()+7*(_512.week-1));
}
}
var _515=[date.getFullYear(),date.getMonth()+1,date.getDate()];
return _515;
};
AjxTimezone.getServerId=function(_516){
return AjxTimezone._CLIENT2SERVER[_516]||_516;
};
AjxTimezone.getClientId=function(_517){
return AjxTimezone._SERVER2CLIENT[_517]||_517;
};
AjxTimezone.getShortName=function(_518){
var rule=AjxTimezone.getRule(_518);
if(!rule.shortName){
rule.shortName=["GMT",AjxTimezone._SHORT_NAMES[_518]].join("");
}
return rule.shortName;
};
AjxTimezone.getMediumName=function(_51a){
var rule=AjxTimezone.getRule(_51a);
if(!rule.mediumName){
rule.mediumName=["(",AjxTimezone.getShortName(_51a),") ",_51a].join("");
}
return rule.mediumName;
};
AjxTimezone.getLongName=AjxTimezone.getMediumName;
AjxTimezone.addRule=function(rule){
var _51d=rule.serverId;
var _51e=rule.clientId;
AjxTimezone._CLIENT2SERVER[_51e]=_51d;
AjxTimezone._SERVER2CLIENT[_51d]=_51e;
AjxTimezone._SHORT_NAMES[_51e]=AjxTimezone._generateShortName(rule.standard.offset);
AjxTimezone._CLIENT2RULE[_51e]=rule;
var _51f=rule.daylight?AjxTimezone.DAYLIGHT_RULES:AjxTimezone.STANDARD_RULES;
_51f.push(rule);
};
AjxTimezone.getRule=function(_520,tz){
var rule=AjxTimezone._CLIENT2RULE[_520];
if(!rule){
_520=AjxTimezone._SERVER2CLIENT[_520];
rule=AjxTimezone._CLIENT2RULE[_520];
}
if(!rule&&tz){
var _523=["standard","daylight"];
var _524=tz.daylight?AjxTimezone.DAYLIGHT_RULES:AjxTimezone.STANDARD_RULES;
for(var i=0;i<_524.length;i++){
rule=_524[i];
var _526=true;
outer:
for(var j=0;j<_523.length;j++){
var name=_523[j];
var _529=rule[name];
if(!_529){
continue;
}
for(var p in tz[name]){
if(tz[name][p]!=_529[p]){
_526=false;
break outer;
}
}
}
if(_526){
return rule;
}
}
return null;
}
return rule;
};
AjxTimezone.getOffset=function(_52b,date){
var rule=AjxTimezone.getRule(_52b);
var _52e=rule?rule.standard.offset:0;
if(rule&&rule.daylight){
var _52f=date.getMonth()+1;
var day=date.getDate();
var _531=rule.standard.trans;
var _532=rule.daylight.trans;
if((_52f==_532[1]&&day>=_532[2])||(_52f==_531[1]&&day<_531[2])||(_52f>_532[1]&&_52f<_531[1])){
_52e=rule.daylight.offset;
}
}
return _52e;
};
AjxTimezone.guessMachineTimezone=function(){
return AjxTimezone._guessMachineTimezone().clientId;
};
AjxTimezone.getAbbreviatedZoneChoices=function(){
if(AjxTimezone._ABBR_ZONE_OPTIONS){
var _533=AjxTimezone._ABBR_ZONE_OPTIONS.length;
var _534=AjxTimezone.STANDARD_RULES.length+AjxTimezone.DAYLIGHT_RULES.length;
if(_533!=_534){
AjxTimezone._ABBR_ZONE_OPTIONS=null;
}
}
if(!AjxTimezone._ABBR_ZONE_OPTIONS){
AjxTimezone._ABBR_ZONE_OPTIONS=[];
for(var _535 in AjxTimezone._CLIENT2SERVER){
var rule=AjxTimezone._CLIENT2RULE[_535];
var _537=rule.serverId;
var _538={displayValue:AjxTimezone.getMediumName(_535),selectedValue:_535,value:_537,standard:rule.standard,serverid:_537};
AjxTimezone._ABBR_ZONE_OPTIONS.push(_538);
}
AjxTimezone._ABBR_ZONE_OPTIONS.sort(AjxTimezone._BY_OFFSET);
}
return AjxTimezone._ABBR_ZONE_OPTIONS;
};
AjxTimezone._BY_OFFSET=function(_539,_53a){
var _53b=_539.standard.offset-_53a.standard.offset;
if(_53b==0){
var _53c=_539.serverId;
var _53d=_53a.serverId;
if(_53c<_53d){
_53b=-1;
}else{
if(_53c>_53d){
_53b=1;
}
}
}
return _53b;
};
AjxTimezone.GMT="Europe/London";
AjxTimezone.GMT_NO_DST="Africa/Casablanca";
AjxTimezone.AUTO_DETECTED="Auto-Detected";
AjxTimezone.DEFAULT;
AjxTimezone.DEFAULT_RULE;
AjxTimezone._CLIENT2SERVER={};
AjxTimezone._SERVER2CLIENT={};
AjxTimezone._SHORT_NAMES={};
AjxTimezone._CLIENT2RULE={};
AjxTimezone.STANDARD_RULES=[];
AjxTimezone.DAYLIGHT_RULES=[];
(function(){
for(var i=0;i<AjxTimezoneData.TIMEZONE_RULES.length;i++){
var rule=AjxTimezoneData.TIMEZONE_RULES[i];
var _540=rule.daylight?AjxTimezone.DAYLIGHT_RULES:AjxTimezone.STANDARD_RULES;
_540.push(rule);
}
})();
AjxTimezone._guessMachineTimezone=function(){
var dec1=new Date(AjxTimezoneData.TRANSITION_YEAR,11,1,0,0,0);
var jun1=new Date(AjxTimezoneData.TRANSITION_YEAR,5,1,0,0,0);
var _543=-dec1.getTimezoneOffset();
var _544=-jun1.getTimezoneOffset();
var _545=_543>_544;
if(_544==_543){
var _546=AjxTimezone.STANDARD_RULES;
for(var i=0;i<_546.length;++i){
var rule=_546[i];
if(rule.standard.offset==_544){
return rule;
}
}
}else{
var _546=AjxTimezone.DAYLIGHT_RULES;
var dst=Math.max(_543,_544);
var std=Math.min(_543,_544);
for(var i=0;i<_546.length;++i){
var rule=_546[i];
if(rule.standard.offset==std&&rule.daylight.offset==dst){
var _54b=rule.standard.trans;
var _54c=rule.daylight.trans;
var s0=new Date(_54b[0],_54b[1]-1,_54b[2]-1);
var s1=new Date(_54b[0],_54b[1]-1,_54b[2]+2);
var d0=new Date(_54c[0],_54c[1]-1,_54c[2]-1);
var d1=new Date(_54c[0],_54c[1]-1,_54c[2]+2);
if(-s1.getTimezoneOffset()==std&&-d1.getTimezoneOffset()==dst&&-s0.getTimezoneOffset()==dst&&-d0.getTimezoneOffset()==std){
return rule;
}
}
}
}
return AjxTimezone._generateDefaultRule(_545);
};
AjxTimezone._generateDefaultRule=function(_551){
if(_551==null){
var dec1=new Date(AjxTimezoneData.TRANSITION_YEAR,11,1,0,0,0);
var jun1=new Date(AjxTimezoneData.TRANSITION_YEAR,5,1,0,0,0);
var _554=-dec1.getTimezoneOffset();
var _555=-jun1.getTimezoneOffset();
_551=_554>_555;
}
var d=new Date();
d.setMonth(0,1);
d.setHours(0,0,0,0);
var d2=new Date();
d2.setHours(0,0,0,0);
var _558=-d.getTimezoneOffset();
var _559=_558;
var _55a=[];
for(var m=0;m<12;m++){
d2.setMonth(m+1,0);
var ld=d2.getDate();
for(var md=1;md<=ld;md++){
d.setMonth(m,md);
var _55e=-d.getTimezoneOffset();
if(_55e!=_559){
var td=new Date(d.getTime());
td.setDate(md-1);
for(var h=0;h<24;h++){
td.setHours(h,0,0,0);
var _561=-td.getTimezoneOffset();
if(_561==_55e){
break;
}
}
_55a.push({date:td,hour:h});
_559=_55e;
break;
}
}
}
var _562=_558;
var rule={clientId:AjxTimezone.AUTO_DETECTED,serverId:["(GMT",AjxTimezone._generateShortName(_562,true),") ",AjxTimezone.AUTO_DETECTED].join(""),autoDetected:true};
AjxTimezoneData.TIMEZONE_RULES.unshift(rule);
if(_55a.length==0){
rule.standard={offset:_562};
AjxTimezone.STANDARD_RULES.unshift(rule);
}else{
var s2d=_55a[_551?1:0].date;
var d2s=_55a[_551?0:1].date;
rule.standard=AjxTimezone.createWkDayTransition(d2s);
rule.standard.hour=_55a[_551?0:1].hour+1;
if(rule.standard.hour>23){
rule.standard.hour=23;
}
rule.standard.trans=[d2s.getFullYear(),d2s.getMonth()+1,d2s.getDate()];
d2s.setDate(d2s.getDate()+1);
rule.standard.offset=-d2s.getTimezoneOffset();
rule.daylight=AjxTimezone.createWkDayTransition(s2d);
rule.daylight.hour=_55a[_551?1:0].hour-1;
if(rule.daylight.hour>23){
rule.daylight.hour=23;
}
rule.daylight.trans=[s2d.getFullYear(),s2d.getMonth()+1,s2d.getDate()];
s2d.setDate(s2d.getDate()+1);
rule.daylight.offset=-s2d.getTimezoneOffset();
AjxTimezone.DAYLIGHT_RULES.unshift(rule);
}
return rule;
};
AjxTimezone._generateShortName=function(_566,_567){
if(_566==0){
return "";
}
var sign=_566<0?"-":"+";
var _569=Math.abs(_566);
var _56a=Math.floor(_569/60);
var _56b=_569%60;
_56a=_56a<10?"0"+_56a:_56a;
_56b=_56b<10?"0"+_56b:_56b;
return [sign,_56a,_567?".":"",_56b].join("");
};
AjxTimezone.DEFAULT_RULE=AjxTimezone._guessMachineTimezone();
(function(){
AjxTimezoneData.TIMEZONE_RULES.sort(AjxTimezone._BY_OFFSET);
for(var j=0;j<AjxTimezoneData.TIMEZONE_RULES.length;j++){
var rule=AjxTimezoneData.TIMEZONE_RULES[j];
AjxTimezone.addRule(rule);
}
})();
AjxTimezone.DEFAULT=AjxTimezone.getClientId(AjxTimezone.DEFAULT_RULE.serverId);
function AjxXslt(){
var doc=AjxXmlDoc.create();
if(AjxEnv.isIE){
var _56f=null;
var vers=["MSXML2.FreeThreadedDOMDocument.5.0","MSXML2.FreeThreadedDOMDocument.3.0"];
for(var i=0;i<vers.length;i++){
try{
_56f=new ActiveXObject(vers[i]);
break;
}
catch(ex){
}
}
if(!_56f){
throw new AjxException("FreeThreadedDOMDocument",AjxException.UNSUPPORTED,"AjxXslt");
}
_56f.async=false;
doc._doc=_56f;
}
this._doc=doc;
}
AjxXslt.prototype.toString=function(){
return "AjxXslt";
};
AjxXslt.createFromUrl=function(url){
var xslt=new AjxXslt();
xslt.loadUrl(url);
return xslt;
};
AjxXslt.createFromString=function(str){
var xslt=new AjxXslt();
xslt._doc.loadFromString(str);
xslt.createProcessor();
return xslt;
};
AjxXslt.prototype.createProcessor=function(){
var doc=this._doc.getDoc();
if(AjxEnv.isNav){
this._processor=new XSLTProcessor();
this._processor.importStylesheet(doc);
}else{
if(AjxEnv.isIE){
var err=doc.parseError;
if(err.errorCode!=0){
throw new AjxException(err.reason,AjxException.INVALID_PARAM,"AjxXslt.createProcessor");
}
var proc=null;
var vers=["MSXML2.XSLTemplate.5.0","MSXML2.XSLTemplate.3.0"];
for(var i=0;i<vers.length;i++){
try{
proc=new ActiveXObject(vers[i]);
break;
}
catch(ex){
}
}
if(!proc){
throw new AjxException("XSLTemplate",AjxException.UNSUPPORTED,"AjxXslt.createProcessor");
}
this._processor=proc;
this._processor.stylesheet=doc;
}
}
};
AjxXslt._finishedLoading=function(){
var xslt=this._xslt;
xslt.createProcessor();
};
AjxXslt.prototype.loadUrl=function(url){
var doc=this._doc;
if(AjxEnv.isNav){
var _57e=doc.getDoc();
_57e._xslt=this;
_57e.addEventListener("load",AjxXslt._finishedLoading,false);
}
doc.loadFromUrl(url);
if(AjxEnv.isIE){
this.createProcessor();
}
};
AjxXslt.prototype.transformToDom=function(dom){
var ret;
if(AjxEnv.isIE){
ret=this.transformIE(dom);
}else{
if(AjxEnv.isNav){
return this.transformNav(dom);
}else{
return dom;
}
}
var doc=AjxXmlDoc.createFromXml(ret);
return doc.getDoc();
};
AjxXslt.prototype.transformToString=function(dom){
var ret;
if(AjxEnv.isIE){
return this.transformIE(dom);
}else{
if(AjxEnv.isNav){
ret=this.transformNav(dom);
}else{
return dom.documentElement.innerHTML;
}
}
if(!ret||!ret.documentElement){
throw new AjxException("XSL transformation failed.",AjxException.INVALID_PARAM,"AjxXslt.transformToString");
}
var elem=ret.documentElement;
if((elem instanceof HTMLElement)||(elem instanceof HTMLHtmlElement)){
return elem.innerHTML;
}else{
if(elem instanceof Element){
return elem.xml;
}
}
return dom.documentElement.innerHTML;
};
AjxXslt.prototype.transformIE=function(dom){
try{
var _586=this._processor.createProcessor();
_586.input=dom;
_586.transform();
return _586.output;
}
catch(exception){
throw new AjxException(exception.description,AjxException.INVALID_PARAM,"AjxXslt.transformIE");
}
};
AjxXslt.prototype.transformNav=function(dom){
return this._processor.transformToDocument(dom);
};
AjxXslt.prototype.transformNav2=function(dom){
this._fragment=document.implementation.createDocument("","",null);
return this._processor.transformToFragment(dom,this._fragment);
};
var AjxSHA1=function(){
var _589=0;
var _58a="";
var _58b=8;
function hex_sha1(s){
return binb2hex(core_sha1(str2binb(s),s.length*_58b));
}
function b64_sha1(s){
return binb2b64(core_sha1(str2binb(s),s.length*_58b));
}
function str_sha1(s){
return binb2str(core_sha1(str2binb(s),s.length*_58b));
}
function hex_hmac_sha1(key,data){
return binb2hex(core_hmac_sha1(key,data));
}
function b64_hmac_sha1(key,data){
return binb2b64(core_hmac_sha1(key,data));
}
function str_hmac_sha1(key,data){
return binb2str(core_hmac_sha1(key,data));
}
function sha1_vm_test(){
return hex_sha1("abc")=="a9993e364706816aba3e25717850c26c9cd0d89d";
}
function core_sha1(x,len){
x[len>>5]|=128<<(24-len%32);
x[((len+64>>9)<<4)+15]=len;
var w=Array(80);
var a=1732584193;
var b=-271733879;
var c=-1732584194;
var d=271733878;
var e=-1009589776;
for(var i=0;i<x.length;i+=16){
var olda=a;
var oldb=b;
var oldc=c;
var oldd=d;
var olde=e;
for(var j=0;j<80;j++){
if(j<16){
w[j]=x[i+j];
}else{
w[j]=rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);
}
var t=safe_add(safe_add(rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));
e=d;
d=c;
c=rol(b,30);
b=a;
a=t;
}
a=safe_add(a,olda);
b=safe_add(b,oldb);
c=safe_add(c,oldc);
d=safe_add(d,oldd);
e=safe_add(e,olde);
}
return Array(a,b,c,d,e);
}
function sha1_ft(t,b,c,d){
if(t<20){
return (b&c)|((~b)&d);
}
if(t<40){
return b^c^d;
}
if(t<60){
return (b&c)|(b&d)|(c&d);
}
return b^c^d;
}
function sha1_kt(t){
return (t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514;
}
function core_hmac_sha1(key,data){
var bkey=str2binb(key);
if(bkey.length>16){
bkey=core_sha1(bkey,key.length*_58b);
}
var ipad=Array(16),opad=Array(16);
for(var i=0;i<16;i++){
ipad[i]=bkey[i]^909522486;
opad[i]=bkey[i]^1549556828;
}
var hash=core_sha1(ipad.concat(str2binb(data)),512+data.length*_58b);
return core_sha1(opad.concat(hash),512+160);
}
function safe_add(x,y){
var lsw=(x&65535)+(y&65535);
var msw=(x>>16)+(y>>16)+(lsw>>16);
return (msw<<16)|(lsw&65535);
}
function rol(num,cnt){
return (num<<cnt)|(num>>>(32-cnt));
}
function str2binb(str){
var bin=Array();
var mask=(1<<_58b)-1;
for(var i=0;i<str.length*_58b;i+=_58b){
bin[i>>5]|=(str.charCodeAt(i/_58b)&mask)<<(32-_58b-i%32);
}
return bin;
}
function binb2str(bin){
var str="";
var mask=(1<<_58b)-1;
for(var i=0;i<bin.length*32;i+=_58b){
str+=String.fromCharCode((bin[i>>5]>>>(32-_58b-i%32))&mask);
}
return str;
}
function binb2hex(_5be){
var _5bf=_589?"0123456789ABCDEF":"0123456789abcdef";
var str="";
for(var i=0;i<_5be.length*4;i++){
str+=_5bf.charAt((_5be[i>>2]>>((3-i%4)*8+4))&15)+_5bf.charAt((_5be[i>>2]>>((3-i%4)*8))&15);
}
return str;
}
function binb2b64(_5c2){
var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var str="";
for(var i=0;i<_5c2.length*4;i+=3){
var _5c6=(((_5c2[i>>2]>>8*(3-i%4))&255)<<16)|(((_5c2[i+1>>2]>>8*(3-(i+1)%4))&255)<<8)|((_5c2[i+2>>2]>>8*(3-(i+2)%4))&255);
for(var j=0;j<4;j++){
if(i*8+j*6>_5c2.length*32){
str+=_58a;
}else{
str+=tab.charAt((_5c6>>6*(3-j))&63);
}
}
}
return str;
}
this.hex_sha1=hex_sha1;
this.b64_sha1=b64_sha1;
this.str_sha1=str_sha1;
this.hex_hmac_sha1=hex_hmac_sha1;
this.b64_hmac_sha1=b64_hmac_sha1;
this.str_hmac_sha1=str_hmac_sha1;
this.sha1_vm_test=sha1_vm_test;
};
AjxSHA1=new AjxSHA1();
function Dwt(){
}
Dwt.STATIC_STYLE="static";
Dwt.ABSOLUTE_STYLE="absolute";
Dwt.RELATIVE_STYLE="relative";
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=300;
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_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;
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=1;
Dwt.getDomObj=function(doc,id){
return doc.getElementById(id);
};
Dwt.getNextId=function(){
return "DWT"+Dwt.__nextId++;
};
Dwt.associateElementWithObject=function(_5ca,_5cb,_5cc){
_5ca[_5cc||"dwtObj"]=_5cb.__internalId=AjxCore.assignId(_5cb);
};
Dwt.disassociateElementFromObject=function(_5cd,_5ce,_5cf){
if(_5cd){
_5cd.removeAttribute(_5cf||"dwtObj");
}
if(_5ce.__internalId){
AjxCore.unassignId(_5ce.__internalId);
}
};
Dwt.getObjectFromElement=function(_5d0,_5d1){
return AjxCore.objectWithId(_5d0[_5d1||"dwtObj"]);
};
Dwt.findAncestor=function(_5d2,_5d3){
while(_5d2&&(Dwt.getAttr(_5d2,_5d3)==void 0)){
_5d2=_5d2.parentNode;
}
return _5d2;
};
Dwt.setHandler=function(_5d4,_5d5,func){
if(_5d5==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){
Dwt.clearHandler(_5d4,_5d5);
}
_5d4[_5d5]=func;
if(_5d5==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){
_5d4.addEventListener("DOMMouseScroll",func,true);
}
};
Dwt.clearHandler=function(_5d7,_5d8){
if(_5d8==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){
if(_5d7[_5d8]){
var func=_5d7[_5d8];
_5d7.removeEventListener("DOMMouseScroll",func,true);
}
}
_5d7[_5d8]=null;
};
Dwt.getBackgroundRepeat=function(_5da){
return DwtCssStyle.getProperty(_5da,"background-repeat");
};
Dwt.setBackgroundRepeat=function(_5db,_5dc){
_5db.style.backgroundRepeat=_5dc;
};
Dwt.getBounds=function(_5dd,rect){
if(!Dwt.__tmpPoint){
Dwt.__tmpPoint=new DwtPoint(0,0);
}
var _5df=Dwt.__tmpPoint;
Dwt.getLocation(_5dd,_5df);
var locX=_5df.x;
var locY=_5df.y;
Dwt.getSize(_5dd,_5df);
if(!rect){
return new DwtRectangle(locX,locY,_5df.x,_5df.y);
}else{
rect.set(locX,locY,_5df.x,_5df.y);
return rect;
}
};
Dwt.setBounds=function(_5e2,x,y,_5e5,_5e6){
Dwt.setLocation(_5e2,x,y);
Dwt.setSize(_5e2,_5e5,_5e6);
};
Dwt.getCursor=function(_5e7){
return DwtCssStyle.getProperty(_5e7,"cursor");
};
Dwt.setCursor=function(_5e8,_5e9){
_5e8.style.cursor=_5e9;
};
Dwt.getLocation=function(_5ea,_5eb){
var _5eb=(_5eb)?_5eb:new DwtPoint(0,0);
if(_5ea.style.position==Dwt.ABSOLUTE_STYLE){
_5eb.set(parseInt(DwtCssStyle.getProperty(_5ea,"left")),parseInt(DwtCssStyle.getProperty(_5ea,"top")));
return _5eb;
}else{
return Dwt.toWindow(_5ea,0,0,null,null,_5eb);
}
};
Dwt.setLocation=function(_5ec,x,y){
if(_5ec.style.position!=Dwt.ABSOLUTE_STYLE){
throw new DwtException("Static widgets may not be positioned",DwtException.INVALID_OP,"Dwt.setLocation");
}
if(x=Dwt.__checkPxVal(x)){
_5ec.style.left=x;
}
if(y=Dwt.__checkPxVal(y)){
_5ec.style.top=y;
}
};
Dwt.getPosition=function(_5ef){
return _5ef.style.position;
};
Dwt.setPosition=function(_5f0,_5f1){
_5f0.style.position=_5f1;
};
Dwt.getScrollStyle=function(_5f2){
var _5f3=DwtCssStyle.getProperty(_5f2,"overflow");
if(_5f3=="hidden"){
return Dwt.CLIP;
}else{
if(_5f3=="auto"){
return Dwt.SCROLL;
}else{
if(_5f3=="scroll"){
return Dwt.FIXED_SCROLL;
}else{
return Dwt.VISIBLE;
}
}
}
};
Dwt.setScrollStyle=function(_5f4,_5f5){
if(_5f5==Dwt.CLIP){
_5f4.style.overflow="hidden";
}else{
if(_5f5==Dwt.SCROLL){
_5f4.style.overflow="auto";
}else{
if(_5f5==Dwt.FIXED_SCROLL){
_5f4.style.overflow="scroll";
}else{
_5f4.style.overflow="visible";
}
}
}
};
Dwt.getSize=function(_5f6,_5f7){
var p;
if(!_5f7){
p=new DwtPoint(0,0);
}else{
p=_5f7;
p.set(0,0);
}
if(!_5f6){
return p;
}
if(_5f6.offsetWidth!=null){
p.x=_5f6.offsetWidth;
p.y=_5f6.offsetHeight;
}else{
if(_5f6.clip&&_5f6.clip.width!=null){
p.x=_5f6.clip.width;
p.y=_5f6.clip.height;
}else{
if(_5f6.style&&_5f6.style.pixelWidth!=null){
p.x=_5f6.style.pixelWidth;
p.y=_5f6.style.pixelHeight;
}
}
}
p.x=parseInt(p.x);
p.y=parseInt(p.y);
return p;
};
Dwt.setSize=function(_5f9,_5fa,_5fb){
if(!_5f9.style){
return;
}
if(_5fa==Dwt.CLEAR){
_5f9.style.width=null;
}else{
if(_5fa=Dwt.__checkPxVal(_5fa,true)){
_5f9.style.width=_5fa;
}
}
if(_5fb==Dwt.CLEAR){
_5f9.style.height=null;
}else{
if(_5fb=Dwt.__checkPxVal(_5fb,true)){
_5f9.style.height=_5fb;
}
}
};
Dwt.getHtmlExtent=function(html){
var div=AjxStringUtil.calcDIV();
div.innerHTML=html;
return Dwt.getSize(div);
};
Dwt.getAttr=function(_5fe,attr,_600){
if(!_600){
return _5fe&&_5fe.tagName?(_5fe.getAttribute(attr)||_5fe[attr]):null;
}else{
while(_5fe){
if(Dwt.getAttr(_5fe,attr)!=null){
return _5fe;
}
_5fe=_5fe.parentNode;
}
return null;
}
};
Dwt.getVisible=function(_601){
var disp=DwtCssStyle.getProperty(_601,"display");
return (disp!=Dwt.DISPLAY_NONE);
};
Dwt.setVisible=function(_603,_604){
var _605=_603.nodeName.match(/tr/i);
var _606=_603.nodeName.match(/td|th/i);
var _607=_605?Dwt.DISPLAY_TABLE_ROW:(_606?Dwt.DISPLAY_TABLE_CELL:Dwt.DISPLAY_BLOCK);
_603.style.display=_604?_607:Dwt.DISPLAY_NONE;
};
Dwt.getVisibility=function(_608){
var vis=DwtCssStyle.getProperty(_608,"visibility");
return (vis=="visible");
};
Dwt.setVisibility=function(_60a,_60b){
_60a.style.visibility=_60b?"visible":"hidden";
};
Dwt.setOpacity=function(_60c,_60d){
if(AjxEnv.isIE){
_60c.style.filter="alpha(opacity="+_60d+")";
}else{
_60c.style.opacity=_60d/100;
}
};
Dwt.getZIndex=function(_60e){
return DwtCssStyle.getProperty(_60e,"z-index");
};
Dwt.setZIndex=function(_60f,idx){
_60f.style.zIndex=idx;
};
Dwt.getDisplay=function(_611){
DwtCssStyle.getProperty(_611,"display");
};
Dwt.setDisplay=function(_612,_613){
_612.style.display=_613;
};
Dwt.getWindowSize=function(_614){
var p=(!_614)?new DwtPoint(0,0):_614;
if(window.innerWidth){
p.x=window.innerWidth;
p.y=window.innerHeight;
}else{
if(AjxEnv.isIE6CSS){
p.x=document.body.parentElement.clientWidth;
p.y=document.body.parentElement.clientHeight;
}else{
if(document.body&&document.body.clientWidth){
p.x=document.body.clientWidth;
p.y=document.body.clientHeight;
}
}
}
return p;
};
Dwt.toWindow=function(_616,x,y,_619,_61a,_61b){
var p;
if(!_61b){
p=new DwtPoint(x,y);
}else{
p=_61b;
p.set(x,y);
}
var _61d=_616;
while(_61d&&_61d!=_619){
p.x+=_61d.offsetLeft;
p.y+=_61d.offsetTop;
if(!_61a){
var _61e=AjxEnv.isOpera?_61d.pageYOffset:_61d.scrollTop;
if(_61e){
p.y-=_61e;
}
var _61f=_61d.parentNode;
while(_61f!=_61d.offsetParent&&_61f!=_619){
_61e=AjxEnv.isOpera?_61f.pageYOffset:_61f.scrollTop;
if(_61e){
p.y-=_61e;
}
_61f=_61f.parentNode;
}
}
_61d=_61d.offsetParent;
}
return p;
};
Dwt.setStatus=function(text){
window.status=text;
};
Dwt.getTitle=function(){
return window.document.title;
};
Dwt.setTitle=function(text){
window.document.title=text;
};
Dwt.getIframeDoc=function(_622){
if(_622){
return AjxEnv.isIE?_622.contentWindow.document:_622.contentDocument;
}
return null;
};
Dwt.getIframeWindow=function(_623){
return _623.contentWindow;
};
Dwt.parseHtmlFragment=function(html,_625){
if(!Dwt._div){
Dwt._div=document.createElement("div");
}
if(_625){
html="<table style='table-layout:fixed'>"+html+"</table>";
}
Dwt._div.innerHTML=html;
return _625?Dwt._div.firstChild.rows[0]:Dwt._div.firstChild;
};
Dwt.contains=function(_626,_627){
var _628=false;
if(AjxEnv.isSafari){
return false;
}else{
if(_626.compareDocumentPosition){
var _629=_626.compareDocumentPosition(_627);
if((_629==(document.DOCUMENT_POSITION_CONTAINED_BY|document.DOCUMENT_POSITION_FOLLOWING))){
_628=true;
}
}else{
if(_626.contains){
_628=_626.contains(_627);
}
}
}
return _628;
};
Dwt.removeChildren=function(_62a){
while(_62a.hasChildNodes()){
_62a.removeChild(_62a.firstChild);
}
};
Dwt.getCellIndex=function(cell){
if(AjxEnv.isSafari||AjxEnv.isOpera){
if(cell.tagName&&cell.tagName.toLowerCase()=="td"){
var _62c=cell.parentNode.cells;
var len=_62c.length;
for(var i=0;i<len;i++){
if(_62c[i]==cell){
return i;
}
}
}
}else{
return cell.cellIndex;
}
return -1;
};
Dwt.delClass=function(el,del,add){
var a=el.className.split(/\s+/);
for(var i=a.length;--i>=0;){
if(a[i]==del){
a.splice(i,1);
}
}
if(add){
a.push(add);
}
el.className=a.join(" ");
};
Dwt.addClass=function(el,c){
Dwt.delClass(el,c,c);
};
Dwt.setSelectionRange=function(_636,_637,end){
if(AjxEnv.isGeckoBased){
_636.setSelectionRange(_637,end);
}else{
if(AjxEnv.isIE){
var _639=_636.createTextRange();
_639.collapse(true);
_639.moveStart("character",_637);
_639.moveEnd("character",end-_637);
_639.select();
}else{
_636.select();
}
}
};
Dwt.getSelectionStart=function(_63a){
if(AjxEnv.isGeckoBased){
return _63a.selectionStart;
}else{
if(AjxEnv.isIE){
var _63b=document.selection.createRange();
var _63c=_63b.compareEndPoints("StartToEnd",_63b)==0;
if(!_63c){
_63b.collapse(true);
}
var b=_63b.getBookmark();
return b.charCodeAt(2)-2;
}
}
return _63a.value.length;
};
Dwt.getSelectionEnd=function(_63e){
if(AjxEnv.isGeckoBased){
return _63e.selectionEnd;
}else{
if(AjxEnv.isIE){
var _63f=document.selection.createRange();
var _640=_63f.compareEndPoints("StartToEnd",_63f)==0;
if(!_640){
_63f.collapse(false);
}
var b=_63f.getBookmark();
return b.charCodeAt(2)-2;
}
}
return _63e.value.length;
};
Dwt.setSelectionText=function(_642,text){
var _644=Dwt.getSelectionStart(_642);
var end=Dwt.getSelectionEnd(_642);
var str=_642.value;
var val=[str.substr(0,_644),text,str.substr(end)].join("");
if(typeof _642.setValue=="function"){
_642.setValue(val);
}else{
_642.value=val;
}
Dwt.setSelectionRange(_642,_644,_644+text.length);
};
Dwt.__checkPxVal=function(val,_649){
if(val==Dwt.DEFAULT){
return false;
}
if(_649&&val<0&&val!=Dwt.LOC_NOWHERE){
val=0;
}
if(typeof (val)=="number"){
val=val+"px";
}
return val;
};
Dwt.byId=function(id){
return (typeof id=="string"?document.getElementById(id):id);
};
Dwt.byTag=function(_64b){
return document.getElementsByTagName(_64b);
};
Dwt.show=function(it,_64d){
Dwt.setVisible(Dwt.byId(it),_64d!=false);
};
Dwt.hide=function(it){
Dwt.setVisible(Dwt.byId(it),false);
};
Dwt.toggle=function(it,show){
it=Dwt.byId(it);
if(show==null){
show=(Dwt.getVisible(it)!=true);
}
Dwt.setVisible(it,show);
};
function DwtException(msg,code,_653,_654){
if(arguments.length===0){
return;
}
AjxException.call(this,msg,code,_653,_654);
}
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;
function DwtDraggable(){
}
DwtDraggable.dragEl=null;
DwtDraggable.init=function(_655,_656,minX,maxX,minY,maxY,_65b,_65c,_65d,_65e,_65f,_660,_661){
_655.onmousedown=DwtDraggable.__start;
_655.__hMode=_65e?false:true;
_655.__vMode=_65f?false:true;
_655.__root=(_656&&_656!=null)?_656:_655;
if(_655.__hMode&&isNaN(parseInt(_655.__root.style.left))){
_655.__root.style.left="0px";
}
if(_655.__vMode&&isNaN(parseInt(_655.__root.style.top))){
_655.__root.style.top="0px";
}
if(!_655.__hMode&&isNaN(parseInt(_655.__root.style.right))){
_655.__root.style.right="0px";
}
if(!_655.__vMode&&isNaN(parseInt(_655.__root.style.bottom))){
_655.__root.style.bottom="0px";
}
_655.__minX=(typeof minX!="undefined")?minX:null;
_655.__minY=(typeof minY!="undefined")?minY:null;
_655.__maxX=(typeof maxX!="undefined")?maxX:null;
_655.__maxY=(typeof maxY!="undefined")?maxY:null;
_655.__xMapper=_660?_660:null;
_655.__yMapper=_661?_661:null;
_655.__root.onDragStart=_65b;
_655.__root.onDragEnd=_65d;
_655.__root.onDrag=_65c;
};
DwtDraggable.setDragBoundaries=function(_662,minX,maxX,minY,maxY){
if(_662!=null){
if(minX!=null){
_662.__minX=minX;
}
if(maxX!=null){
_662.__maxX=maxX;
}
if(minY!=null){
_662.__minY=minY;
}
if(maxY!=null){
_662.__maxY=maxY;
}
}
};
DwtDraggable.__start=function(e){
var _668=DwtDraggable.dragEl=this;
e=DwtDraggable.__fixE(e);
var x=parseInt(_668.__hMode?_668.__root.style.left:_668.__root.style.right);
var y=parseInt(_668.__vMode?_668.__root.style.top:_668.__root.style.bottom);
if(_668.__root.onDragStart){
_668.__root.onDragStart.run([x,y]);
}
_668.__lastMouseX=e.clientX;
_668.__lastMouseY=e.clientY;
if(_668.__hMode){
if(_668.__minX!=null){
_668.__minMouseX=e.clientX-x+_668.__minX;
}
if(_668.__maxX!=null){
_668.__maxMouseX=_668.__minMouseX+_668.__maxX-_668.__minX;
}
}else{
if(_668.__minX!=null){
_668.__maxMouseX=-_668.__minX+e.clientX+x;
}
if(_668.__maxX!=null){
_668.__minMouseX=-_668.__maxX+e.clientX+x;
}
}
if(_668.__vMode){
if(_668.__minY!=null){
_668.__minMouseY=e.clientY-y+_668.__minY;
}
if(_668.__maxY!=null){
_668.__maxMouseY=_668.__minMouseY+_668.__maxY-_668.__minY;
}
}else{
if(_668.__minY!=null){
_668.__maxMouseY=-_668.__minY+e.clientY+y;
}
if(_668.__maxY!=null){
_668.__minMouseY=-_668.__maxY+e.clientY+y;
}
}
document.onmousemove=DwtDraggable.__drag;
document.onmouseup=DwtDraggable.__end;
return false;
};
DwtDraggable.__drag=function(e){
e=DwtDraggable.__fixE(e);
var _66c=DwtDraggable.dragEl;
var ey=e.clientY;
var ex=e.clientX;
var x=parseInt(_66c.__hMode?_66c.__root.style.left:_66c.__root.style.right);
var y=parseInt(_66c.__vMode?_66c.__root.style.top:_66c.__root.style.bottom);
var nx,ny;
if(!_66c.__xMapper){
if(_66c.__minX!=null){
ex=_66c.__hMode?Math.max(ex,_66c.__minMouseX):Math.min(ex,_66c.__maxMouseX);
}
if(_66c.__maxX!=null){
ex=_66c.__hMode?Math.min(ex,_66c.__maxMouseX):Math.max(ex,_66c.__minMouseX);
}
nx=x+((ex-_66c.__lastMouseX)*(_66c.__hMode?1:-1));
}else{
nx=_66c.__xMapper(x,ex);
}
if(!_66c.__yMapper){
if(_66c.__minY!=null){
ey=_66c.__vMode?Math.max(ey,_66c.__minMouseY):Math.min(ey,_66c.__maxMouseY);
}
if(_66c.__maxY!=null){
ey=_66c.__vMode?Math.min(ey,_66c.__maxMouseY):Math.max(ey,_66c.__minMouseY);
}
ny=y+((ey-_66c.__lastMouseY)*(_66c.__vMode?1:-1));
}else{
ny=_66c.__yMapper(y,ey);
}
DwtDraggable.dragEl.__root.style[_66c.__hMode?"left":"right"]=nx+"px";
DwtDraggable.dragEl.__root.style[_66c.__vMode?"top":"bottom"]=ny+"px";
DwtDraggable.dragEl.__lastMouseX=ex;
DwtDraggable.dragEl.__lastMouseY=ey;
if(DwtDraggable.dragEl.__root.onDrag){
DwtDraggable.dragEl.__root.onDrag.run([nx,ny]);
}
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(e){
if(typeof e=="undefined"){
e=window.event;
}
if(typeof e.layerX=="undefined"){
e.layerX=e.offsetX;
}
if(typeof e.layerY=="undefined"){
e.layerY=e.offsetY;
}
return e;
};
function DwtDragTracker(){
}
DwtDragTracker.init=function(_673,_674,_675,_676,_677,_678,_679){
var ctxt=_673._dragTrackerContext={};
var _67b=_673.getHtmlElement();
if(_674){
_67b.style.cursor=_674;
}
ctxt.style=_674;
ctxt.threshX=(_675>0)?_675:1;
ctxt.threshY=(_676>0)?_676:1;
ctxt.data={delta:{},userData:_679};
ctxt.captureObj=new DwtMouseEventCapture(_673,null,DwtDragTracker._mouseOverHdlr,DwtDragTracker._mouseDownHdlr,DwtDragTracker._mouseMoveHdlr,DwtDragTracker._mouseUpHdlr,DwtDragTracker._mouseOutHdlr);
_673.setHandler(DwtEvent.ONMOUSEDOWN,DwtDragTracker._mouseDownHdlr);
_673.setHandler(DwtEvent.ONMOUSEOVER,DwtDragTracker._mouseOverHdlr);
_673.setHandler(DwtEvent.ONMOUSEOUT,DwtDragTracker._mouseOutHdlr);
ctxt.callbackFunc=_677;
ctxt.callbackObj=_678;
};
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(ev){
var _67d=DwtShell.mouseEvent;
_67d.setFromDhtmlEvent(ev);
_67d._stopPropagation=true;
_67d._returnValue=false;
_67d.setToDhtmlEvent(ev);
return false;
};
DwtDragTracker._mouseDownHdlr=function(ev){
var _67f=DwtShell.mouseEvent;
_67f.setFromDhtmlEvent(ev);
if(_67f.button!=DwtMouseEvent.LEFT){
DwtUiEvent.setBehaviour(ev,true,false);
return false;
}
var _680=_67f.dwtObj;
if(_680&&_680._dragTrackerContext){
var ctxt=_680._dragTrackerContext;
if(ctxt.callbackFunc!=null){
ctxt.captureObj.capture();
ctxt.data.startDoc={x:_67f.docX,y:_67f.docY};
ctxt.data.state=DwtDragTracker.STATE_START;
DwtDragTracker._doCallback(ctxt);
}
}
_67f._stopPropagation=true;
_67f._returnValue=false;
_67f.setToDhtmlEvent(ev);
return false;
};
DwtDragTracker._doCallback=function(ctxt){
if(ctxt.callbackObj!=null){
ctxt.callbackFunc.call(ctxt.callbackObj,ctxt.data);
}else{
ctxt.callbackFunc(ctxt.data);
}
};
DwtDragTracker._mouseMoveHdlr=function(ev){
var _684=DwtShell.mouseEvent;
_684.setFromDhtmlEvent(ev);
var _685=DwtMouseEventCapture.getTargetObj();
var ctxt=_685._dragTrackerContext;
var data=ctxt.data;
data.delta.x=_684.docX-data.startDoc.x;
data.delta.y=_684.docY-data.startDoc.y;
if(Math.abs(data.delta.x)>=ctxt.threshX||Math.abs(data.delta.y)>=ctxt.threshY){
data.prevState=data.state;
data.state=DwtDragTracker.STATE_DRAGGING;
DwtDragTracker._doCallback(ctxt);
}
_684._stopPropagation=true;
_684._returnValue=false;
_684.setToDhtmlEvent(ev);
return false;
};
DwtDragTracker._mouseUpHdlr=function(ev){
var _689=DwtShell.mouseEvent;
_689.setFromDhtmlEvent(ev);
if(_689.button!=DwtMouseEvent.LEFT){
DwtUiEvent.setBehaviour(ev,true,false);
return false;
}
var ctxt=DwtMouseEventCapture.getTargetObj()._dragTrackerContext;
if(ctxt){
if(ctxt.callbackFunc!=null){
DwtMouseEventCapture.getCaptureObj().release();
}
ctxt.data.state=DwtDragTracker.STATE_END;
DwtDragTracker._doCallback(ctxt);
}
_689._stopPropagation=true;
_689._returnValue=false;
_689.setToDhtmlEvent(ev);
return false;
};
DwtDragTracker._mouseOutHdlr=function(ev){
var _68c=DwtShell.mouseEvent;
_68c.setFromDhtmlEvent(ev);
_68c._stopPropagation=true;
_68c._returnValue=false;
_68c.setToDhtmlEvent(ev);
return false;
};
function DwtCssStyle(){
}
DwtCssStyle.SELECTED="selected";
DwtCssStyle.ACTIONED="actioned";
DwtCssStyle.MATCHED="matched";
DwtCssStyle.DND="dnd";
DwtCssStyle.ACTIVE="active";
DwtCssStyle.ACTIVATED="activated";
DwtCssStyle.TRIGGERED="triggered";
DwtCssStyle.TOGGLED="toggled";
DwtCssStyle.INACTIVE="inactive";
DwtCssStyle.DISABLED="disabled";
DwtCssStyle.FOCUSED="focused";
DwtCssStyle.getProperty=function(_68d,_68e){
var _68f;
if(_68d.ownerDocument==null){
for(var _690=_68d.parentNode;_690.parentNode!=null;_690=_690.parentNode){
}
var doc=_690;
}else{
var doc=_68d.ownerDocument;
}
if(doc.defaultView&&!AjxEnv.isSafari){
var _692=doc.defaultView.getComputedStyle(_68d,"");
_68f=_692.getPropertyValue(_68e);
}else{
var _693=_68e.split("-");
var _694="";
var i;
var len=_693.length;
for(i=0;i<len;i++){
if(i!=0){
_694+=_693[i].substring(0,1).toUpperCase();
}else{
_694+=_693[i].substring(0,1);
}
_694+=_693[i].substring(1);
}
if(_68d.currentStyle){
_68f=_68d.currentStyle[_694];
}else{
if(_68d.style){
_68f=_68d.style[_694];
}
}
}
return _68f;
};
DwtCssStyle.getComputedStyleObject=function(_697){
if(_697.ownerDocument==null){
for(var _698=_697.parentNode;_698.parentNode!=null;_698=_698.parentNode){
}
var doc=_698;
}else{
var doc=_697.ownerDocument;
}
if(doc.defaultView&&!AjxEnv.isSafari){
return doc.defaultView.getComputedStyle(_697,"");
}else{
if(_697.currentStyle){
return _697.currentStyle;
}else{
if(_697.style){
return _697.style;
}
}
}
};
DwtCssStyle.removeProperty=function(el,prop){
if(prop instanceof Array){
for(var i=prop.length;--i>=0;){
DwtCssStyle.removeProperty(el,prop[i]);
}
}else{
if(AjxEnv.isIE){
el.style.removeAttribute(prop,true);
}else{
prop=prop.replace(/([A-Z])/g,"-$1");
el.style.removeProperty(prop);
}
}
};
function DwtPoint(x,y){
this.x=x;
this.y=y;
}
DwtPoint.prototype.toString=function(){
return "DwtPoint";
};
DwtPoint.prototype.set=function(x,y){
this.x=x;
this.y=y;
};
function DwtRectangle(x,y,_6a3,_6a4){
this.x=x;
this.y=y;
this.width=_6a3;
this.height=_6a4;
}
DwtRectangle.prototype.toString=function(){
return "DwtRectangle";
};
DwtRectangle.prototype.set=function(x,y,_6a7,_6a8){
this.x=x;
this.y=y;
};
function DwtUnits(){
}
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;
function DwtEvent(_6a9){
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];
function DwtEventManager(){
}
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(_6aa,_6ab){
DwtEventManager._instance.addListener(_6aa,_6ab);
};
DwtEventManager.notifyListeners=function(_6ac,_6ad){
DwtEventManager._instance.notifyListeners(_6ac,_6ad);
};
DwtEventManager.removeListener=function(_6ae,_6af){
DwtEventManager._instance.removeListener(_6ae,_6af);
};
DwtEventManager.addGlobalListener=function(_6b0,_6b1,_6b2){
AjxCore.addListener(_6b0,_6b1,_6b2);
var _6b3=DwtEventManager._domEventToDwtMap[_6b1];
if(_6b3){
DwtEventManager.addListener(_6b3,_6b2);
}
};
function DwtDateRangeEvent(init){
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;
};
function DwtDisposeEvent(init){
if(arguments.length==0){
return;
}
DwtEvent.call(this,true);
}
DwtDisposeEvent.prototype=new DwtEvent;
DwtDisposeEvent.prototype.constructor=DwtDisposeEvent;
DwtDisposeEvent.prototype.toString=function(){
return "DwtDisposeEvent";
};
function DwtUiEvent(init){
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(ev,_6b8){
ev=ev||window.event;
if(ev){
return ev;
}
if(_6b8){
var pw=(_6b8.ownerDocument||_6b8.document||_6b8).parentWindow;
return pw?pw.event:null;
}
};
DwtUiEvent.getTarget=function(ev){
ev=DwtUiEvent.getEvent(ev);
if(ev&&ev.target){
return ev.target.nodeType==3?ev.target.parentNode:ev.target;
}else{
if(ev&&ev.srcElement){
return ev.srcElement;
}else{
return null;
}
}
};
DwtUiEvent.getTargetWithProp=function(ev,prop){
var _6bd=DwtUiEvent.getTarget(ev);
while(_6bd){
if(Dwt.getAttr(_6bd,prop)!=null){
return _6bd;
}
_6bd=_6bd.parentNode;
}
return null;
};
DwtUiEvent.getTargetWithProps=function(ev,_6bf){
var _6c0=DwtUiEvent.getTarget(ev);
while(_6c0){
var okay=true;
for(var i in _6bf){
var val=Dwt.getAttr(_6c0,_6bf[i]);
if(val==null){
_6c0=_6c0.parentNode;
okay=false;
break;
}
}
if(okay){
return _6c0;
}
}
return null;
};
DwtUiEvent.getDwtObjFromEvent=function(ev){
var _6c5=DwtUiEvent.getTargetWithProp(ev,"dwtObj");
return _6c5?Dwt.getObjectFromElement(_6c5):null;
};
DwtUiEvent.getDwtObjWithProp=function(ev,prop){
var _6c8=DwtUiEvent.getTargetWithProps(ev,["dwtObj",prop]);
return _6c8?Dwt.getObjectFromElement(_6c8):null;
};
DwtUiEvent.copy=function(dest,src){
dest.altKey=src.altKey;
dest.ctrlKey=src.ctrlKey;
dest.metaKey=src.metaKey;
dest.shiftKey=src.shiftKey;
dest.target=src.target;
dest.type=src.type;
dest.dwtObj=src.dwtObj;
dest.docX=src.docX;
dest.docY=src.docY;
dest.elementX=src.elementX;
dest.elementY=src.elementY;
dest.ersatz=src.ersatz;
dest._stopPropagation=src._stopPropagation;
dest._returnValue=src._returnValue;
};
DwtUiEvent.prototype.setFromDhtmlEvent=function(ev){
ev=DwtUiEvent.getEvent(ev);
if(!ev){
return;
}
this.altKey=ev.altKey;
this.ctrlKey=ev.ctrlKey;
this.metaKey=ev.metaKey;
this.shiftKey=ev.shiftKey;
this.type=ev.type;
this.target=DwtUiEvent.getTarget(ev);
var _6cc=this.target;
while(_6cc!=null){
if(_6cc.dwtObj!=null){
this.dwtObj=Dwt.getObjectFromElement(_6cc);
break;
}
_6cc=_6cc.parentNode;
}
if(ev.pageX!=null){
this.docX=ev.pageX;
this.docY=ev.pageY;
}else{
if(ev.clientX!=null){
this.docX=ev.clientX+document.body.scrollLeft-document.body.clientLeft;
this.docY=ev.clientY+document.body.scrollTop-document.body.clientTop;
if(document.body.parentElement){
var _6cd=document.body.parentElement;
this.docX+=_6cd.scrollLeft-_6cd.clientLeft;
this.docY+=_6cd.scrollTop-_6cd.clientTop;
}
}
}
if(ev.offsetX!=null){
this.elementX=ev.offsetX;
this.elementY=ev.offsetY;
}else{
if(ev.layerX!=null){
this.elementX=ev.layerX;
this.elementY=ev.layerY;
}else{
this.elementX=Dwt.DEFAULT;
this.elementY=Dwt.DEFAULT;
}
}
this.ersatz=false;
return ev;
};
DwtUiEvent.prototype.setToDhtmlEvent=function(ev){
DwtUiEvent.setBehaviour(ev,this._stopPropagation,this._returnValue,this._dontCallPreventDefault);
};
DwtUiEvent.setBehaviour=function(ev,_6d0,_6d1,_6d2){
var _6d3=DwtUiEvent.getEvent(ev);
DwtUiEvent.setDhtmlBehaviour(_6d3,_6d0,_6d1,_6d2);
};
DwtUiEvent.setDhtmlBehaviour=function(_6d4,_6d5,_6d6,_6d7){
_6d4=_6d4||window.event;
if(_6d4.stopPropagation!=null){
if(_6d5){
_6d4.stopPropagation();
}
if(!_6d6&&!_6d7){
_6d4.preventDefault();
}
}else{
_6d4.returnValue=_6d6;
_6d4.cancelBubble=_6d5;
}
};
function DwtControlEvent(){
this.reset();
}
DwtControlEvent.prototype=new DwtEvent;
DwtControlEvent.prototype.constructor=DwtControlEvent;
DwtControlEvent.prototype.toString=function(){
return "DwtControlEvent";
};
DwtControlEvent.prototype.reset=function(){
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;
};
function DwtFocusEvent(init){
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;
};
function DwtKeyEvent(){
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(ev){
return (ev.type.search(/^key/i)!=-1);
};
DwtKeyEvent.isKeyPressEvent=function(ev){
return (AjxEnv.isIE&&ev.type=="keydown")||(ev.type=="keypress");
};
DwtKeyEvent.prototype.reset=function(_6db){
if(!_6db){
DwtUiEvent.prototype.reset.call(this);
}
this.keyCode=0;
this.charCode=0;
};
DwtKeyEvent.prototype.setFromDhtmlEvent=function(ev){
ev=DwtUiEvent.prototype.setFromDhtmlEvent.call(this,ev);
this.charCode=(ev.charCode)?ev.charCode:ev.keyCode;
this.keyCode=ev.keyCode;
};
DwtKeyEvent.getCharCode=function(ev){
ev=DwtUiEvent.getEvent(ev);
return AjxEnv.isSafari?ev.keyCode:(ev.charCode||ev.keyCode);
};
DwtKeyEvent.copy=function(dest,src){
DwtUiEvent.copy(dest,src);
dest.charCode=src.charCode;
dest.keyCode=src.keyCode;
};
function DwtMouseEvent(){
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(_6e0){
if(!_6e0){
DwtUiEvent.prototype.reset.call(this);
}
this.button=0;
this._populated=false;
};
DwtMouseEvent.prototype.setFromDhtmlEvent=function(ev){
ev=DwtUiEvent.prototype.setFromDhtmlEvent.call(this,ev);
if(ev.offsetX!=null){
if((ev.button&1)!=0){
this.button=DwtMouseEvent.LEFT;
}else{
if((ev.button&2)!=0){
this.button=DwtMouseEvent.RIGHT;
}else{
if((ev.button&4)!=0){
this.button=DwtMouseEvent.MIDDLE;
}else{
this.button=DwtMouseEvent.NONE;
}
}
}
}else{
if(ev.layerX!=null){
if(ev.which==1){
this.button=DwtMouseEvent.LEFT;
}else{
if(ev.which==2){
this.button=DwtMouseEvent.MIDDLE;
}else{
if(ev.which==3){
this.button=DwtMouseEvent.RIGHT;
}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;
}
}
};
function DwtMouseEventCapture(_6e2,id,_6e4,_6e5,_6e6,_6e7,_6e8,_6e9){
this.targetObj=_6e2;
this._id=id;
this._mouseOverHdlr=(_6e4!=null)?_6e4:DwtMouseEventCapture.emptyHdlr;
this._mouseDownHdlr=(_6e5!=null)?_6e5:DwtMouseEventCapture.emptyHdlr;
this._mouseMoveHdlr=(_6e6!=null)?_6e6:DwtMouseEventCapture.emptyHdlr;
this._mouseUpHdlr=(_6e7!=null)?_6e7:DwtMouseEventCapture.emptyHdlr;
this._mouseOutHdlr=(_6e8!=null)?_6e8:DwtMouseEventCapture.emptyHdlr;
this._hardCapture=(_6e9==null||_6e9==true)?true:false;
}
DwtMouseEventCapture._capturing=false;
DwtMouseEventCapture.getCaptureObj=function(){
return window._mouseEventCaptureObj;
};
DwtMouseEventCapture.getTargetObj=function(){
if(window._mouseEventCaptureObj!=null){
return window._mouseEventCaptureObj.targetObj;
}
return null;
};
DwtMouseEventCapture.getId=function(){
if(window._mouseEventCaptureObj!=null){
return window._mouseEventCaptureObj._id;
}
return null;
};
DwtMouseEventCapture.prototype.toString=function(){
return "DwtMouseEventCapture";
};
DwtMouseEventCapture.prototype.capturing=function(){
return DwtMouseEventCapture._capturing;
};
DwtMouseEventCapture.prototype.capture=function(){
if(window._mouseEventCaptureObj){
throw new DwtException("Mouse events already being captured",DwtException.INTERNAL_ERROR,"DwtMouseEventCapture.prototype.capture");
}
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);
}else{
this._savedMouseOverHdlr=document.onmouseover;
this._savedMouseDownHdlr=document.onmousedown;
this._savedMouseMoveHdlr=document.onmousemove;
this._savedMouseUpHdlr=document.onmouseup;
this._savedMouseOutHdlr=document.onmouseout;
document.onmouseover=this._mouseOverHdlr;
document.onmousedown=this._mouseDownHdlr;
document.onmousemove=this._mouseMoveHdlr;
document.onmouseup=this._mouseUpHdlr;
document.onmouseout=this._mouseOutHdlr;
}
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 obj=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);
}else{
document.onmouseover=this._savedMouseOverHdlr;
document.onmousedown=this._savedMouseDownHdlr;
document.onmousemove=this._savedMouseMoveHdlr;
document.onmouseup=this._savedMouseUpHdlr;
document.onmouseout=this._savedMouseOutHdlr;
}
if(this._hardCapture&&document.body&&document.body.releaseCapture){
document.body.releaseCapture();
}
window._mouseEventCaptureObj=null;
DwtMouseEventCapture._capturing=false;
};
DwtMouseEventCapture.emptyHdlr=function(ev){
var _6ec=DwtMouseEventCapture.getCaptureObj();
var _6ed=DwtShell.mouseEvent;
_6ed.setFromDhtmlEvent(ev);
if(_6ec._hardCapture){
_6ed._stopPropagation=true;
_6ed._returnValue=false;
_6ed.setToDhtmlEvent(ev);
return false;
}else{
_6ed._stopPropagation=false;
_6ed._returnValue=true;
_6ed.setToDhtmlEvent(ev);
return true;
}
};
function DwtListViewActionEvent(){
DwtMouseEvent.call(this);
this.reset(true);
}
DwtListViewActionEvent.prototype=new DwtMouseEvent;
DwtListViewActionEvent.prototype.constructor=DwtListViewActionEvent;
DwtListViewActionEvent.prototype.toString=function(){
return "DwtListViewActionEvent";
};
DwtListViewActionEvent.prototype.reset=function(_6ee){
if(!_6ee){
DwtMouseEvent.prototype.reset.call(this);
}
this.field=null;
this.item=null;
this.detail=null;
};
function DwtSelectionEvent(init){
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(_6f0){
if(!_6f0){
DwtUiEvent.prototype.reset.call(this);
}
this.button=0;
this.detail=null;
this.item=null;
};
function DwtHtmlEditorStateEvent(init){
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;
};
function DwtTreeEvent(){
DwtSelectionEvent.call(this,true);
}
DwtTreeEvent.prototype=new DwtSelectionEvent;
DwtTreeEvent.prototype.constructor=DwtTreeEvent;
DwtTreeEvent.prototype.toString=function(){
return "DwtTreeEvent";
};
DwtTreeEvent.prototype.setFromDhtmlEvent=function(ev,win){
ev=DwtSelectionEvent.prototype.setFromDhtmlEvent.call(this,ev);
};
function DwtHoverEvent(type,_6f5,_6f6,x,y){
if(arguments.length==0){
return;
}
DwtEvent.call(this,true);
this.type=type;
this.delay=_6f5;
this.object=_6f6;
this.x=AjxUtil.isUndefined(x)?-1:x;
this.y=AjxUtil.isUndefined(y)?-1:y;
}
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;
};
function DwtTabGroupEvent(){
this.tabGroup=null;
this.newFocusMember=null;
}
DwtTabGroupEvent.prototype.toString=function(){
return "DwtTabGroupEvent";
};
DwtTabGroupEvent.prototype.reset=function(){
this.tabGroup=null;
this.newFocusMember=null;
};
function DwtKeyMap(_6f9){
if(_6f9){
return;
}
this._map={};
this._args={};
this._load(this._map,AjxKeys,DwtKeyMap.MAP_NAME);
}
DwtKeyMap.deserialize=function(_6fa){
alert("DwtKeyMap.deserialize: NOT IMPLEMENTED");
};
DwtKeyMap.serialize=function(_6fb){
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["toolbar"]="DwtToolBar";
DwtKeyMap.MAP_NAME["toolbarHorizontal"]="DwtToolBar-horiz";
DwtKeyMap.MAP_NAME["toolbarVertical"]="DwtToolBar-vert";
DwtKeyMap.MAP_NAME["tabView"]="DwtTabView";
DwtKeyMap.CTRL="Ctrl+";
DwtKeyMap.META="Meta+";
DwtKeyMap.ALT="Alt+";
DwtKeyMap.SHIFT="Shift+";
DwtKeyMap.ARROW_DOWN="ArrowDown";
DwtKeyMap.ARROW_LEFT="ArrowLeft";
DwtKeyMap.ARROW_RIGHT="ArrowRight";
DwtKeyMap.ARROW_UP="ArrowUp";
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.BACKSLASH="Backslash";
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.NEXT="Next";
DwtKeyMap.NEXT_TAB="NextTab";
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.PARENTMENU="ParentMenu";
DwtKeyMap.GOTO_TAB_RE=new RegExp(DwtKeyMap.GOTO_TAB+"(\\d+)");
DwtKeyMap.SEP=",";
DwtKeyMap.INHERIT="INHERIT";
DwtKeyMap.IS_DOC_KEY={};
DwtKeyMap.IS_DOC_KEY["description"]=true;
DwtKeyMap.IS_DOC_KEY["summary"]=true;
DwtKeyMap.IS_DOC_KEY["sort"]=true;
DwtKeyMap.IS_DOC_KEY["example"]=true;
DwtKeyMap.prototype.getMap=function(){
return this._map;
};
DwtKeyMap.prototype._load=function(map,keys,_6fe){
var _6ff=AjxEnv.platform.toLowerCase();
for(var _700 in keys){
var _701=_700.split(".");
var last=_701[_701.length-1];
if(last=="win"||last=="mac"||last=="linux"){
if(last==_6ff){
var _703=_701.slice(0,2).join(".");
keys[_703]=keys[_700];
}
keys[_700]=null;
}
}
for(var _700 in keys){
var _704=keys[_700];
if(typeof keys[_700]!="string"){
continue;
}
var _701=_700.split(".");
var last=_701[_701.length-1];
if(DwtKeyMap.IS_DOC_KEY[last]){
continue;
}
var _705=_6fe[_701[0]];
if(!this._checkMap(_705)){
continue;
}
if(!map[_705]){
map[_705]={};
}
var _706=_701[1];
if(!this._checkAction(_705,_706)){
continue;
}
var _707=_704.split(/\s*;\s*/);
for(var i=0;i<_707.length;i++){
var ks=_707[i];
if(_706==DwtKeyMap.INHERIT){
var _70a=ks.split(/\s*,\s*/);
var _70b=[];
for(var p=0;p<_70a.length;p++){
_70b[p]=_6fe[_70a[p]];
}
map[_705][_706]=_70b.join(",");
}else{
map[_705][ks]=_706;
}
}
}
};
DwtKeyMap.prototype._checkMap=function(_70d){
return true;
};
DwtKeyMap.prototype._checkAction=function(_70e,_70f){
return true;
};
function DwtKeyMapMgr(_710){
var map=this._map=_710.getMap();
this._args=_710._args;
this._fsas={};
for(var key in map){
this._fsas[key]=DwtKeyMapMgr.__buildFSA({},map[key],key);
}
}
DwtKeyMapMgr.NOT_A_TERMINAL=-999;
DwtKeyMapMgr.TAB_KEYCODE=9;
DwtKeyMapMgr._KEYCODES=[];
DwtKeyMapMgr.prototype.getActionCode=function(_713,_714,_715){
var _716=this._fsas[_714];
if(!_716){
return null;
}
var _717=_713.length;
var _718=_716;
var key;
for(var j=0;j<_717&&_718;j++){
key=_713[j];
if(!_718[key]){
break;
}
if(j<_717-1){
_718=_718[key].subMap;
}
}
if(!_718){
return null;
}else{
if(_718[key]){
var _71b=_718[key];
if(!_71b.subMap||_715){
return _71b.actionCode;
}else{
return DwtKeyMapMgr.NOT_A_TERMINAL;
}
}else{
if(_716.inherit&&_716.inherit.length){
var _71c=null;
var len=_716.inherit.length;
for(var i=0;i<len;i++){
_71c=this.getActionCode(_713,_716.inherit[i],_715);
if(_71c!=null){
return _71c;
}
}
return null;
}else{
return null;
}
}
}
};
DwtKeyMapMgr.prototype.keyCode2Char=function(_71f){
return DwtKeyMapMgr._KEYCODES[_71f];
};
DwtKeyMapMgr.prototype.getAction=function(_720,_721){
return this._map[_720][_721];
};
DwtKeyMapMgr.prototype.getKeySequences=function(_722,_723){
var _724=[];
for(var ks in this._map[_722]){
if(this._map[_722][ks]==_723){
_724.push(ks);
}
}
return _724;
};
DwtKeyMapMgr.prototype.setMapping=function(_726,_727,_728){
this._map[_726][_727]=_728;
};
DwtKeyMapMgr.prototype.removeMapping=function(_729,_72a){
delete this._map[_729][_72a];
};
DwtKeyMapMgr.prototype.replaceMapping=function(_72b,_72c,_72d){
var _72e=this._map[_72b][_72c];
if(!_72e){
return;
}
this.removeMapping(_72b,_72c);
this.setMapping(_72b,_72d,_72e);
};
DwtKeyMapMgr.prototype.setArg=function(_72f,_730,arg){
if(!this._args[_72f]){
this._args[_72f]={};
}
this._args[_72f][_730]=arg;
};
DwtKeyMapMgr.prototype.getArg=function(_732,_733){
return this._args[_732]?this._args[_732][_733]:null;
};
DwtKeyMapMgr.prototype.reloadMap=function(_734){
this._fsas[_734]=DwtKeyMapMgr.__buildFSA({},this._map[_734],_734);
};
DwtKeyMapMgr._isAlphaUs=function(_735){
return (_735>64&&_735<91);
};
DwtKeyMapMgr._isNumericUs=function(_736){
return (_736>47&&_736<58);
};
DwtKeyMapMgr._isAlphanumericUs=function(_737){
return (DwtKeyMapMgr._isNumericUs(_737)||DwtKeyMapMgr._isAlphaUs(_737));
};
DwtKeyMapMgr._isPunctuationUs=function(_738){
switch(_738){
case 186:
case 187:
case 188:
case 189:
case 190:
case 191:
case 192:
case 219:
case 220:
case 221:
case 222:
return true;
default:
return false;
}
};
DwtKeyMapMgr._isModifierUs=function(_739){
switch(_739){
case 16:
case 17:
case 18:
case 91:
return true;
default:
return false;
}
};
DwtKeyMapMgr.isUsableTextInputValueUs=function(_73a,_73b){
if(!DwtKeyMapMgr.__isInputElement(_73b)){
return false;
}
if(DwtKeyMapMgr._isAlphanumericUs(_73a)||DwtKeyMapMgr._isPunctuationUs(_73a)){
return true;
}
switch(_73a){
case 37:
case 39:
case 8:
case 45:
case 46:
case 35:
case 32:
return true;
case 13:
var tag=_73b.tagName.toUpperCase();
return (tag!="INPUT");
default:
return false;
}
};
DwtKeyMapMgr.__isInputElement=function(_73d){
var dm=_73d.ownerDocument?_73d.ownerDocument.designMode:null;
if(dm&&(dm.toLowerCase()=="on")){
return true;
}
var tag=_73d.tagName.toUpperCase();
return (tag=="INPUT"||tag=="TEXTAREA");
};
DwtKeyMapMgr.__buildFSA=function(fsa,_741,_742){
for(var i in _741){
if(i==DwtKeyMap.INHERIT){
fsa.inherit=_741[i].split(/\s*,\s*/);
continue;
}
var _744=i.split(DwtKeyMap.SEP);
var _745=_744.length;
var _746=fsa;
for(var j=0;j<_745;j++){
var key=_744[j];
if(!_746[key]){
_746[key]={};
}
if(j==_745-1){
_746[key].actionCode=_741[i];
}else{
if(!_746[key].subMap){
_746[key].subMap={};
}
_746=_746[key].subMap;
}
}
}
return fsa;
};
(function(){
DwtKeyMapMgr._KEYCODES[18]=DwtKeyMap.ALT;
DwtKeyMapMgr._KEYCODES[40]=DwtKeyMap.ARROW_DOWN;
DwtKeyMapMgr._KEYCODES[37]=DwtKeyMap.ARROW_LEFT;
DwtKeyMapMgr._KEYCODES[39]=DwtKeyMap.ARROW_RIGHT;
DwtKeyMapMgr._KEYCODES[38]=DwtKeyMap.ARROW_UP;
DwtKeyMapMgr._KEYCODES[8]=DwtKeyMap.BACKSPACE;
DwtKeyMapMgr._KEYCODES[188]=DwtKeyMap.COMMA;
DwtKeyMapMgr._KEYCODES[186]=DwtKeyMap.SEMICOLON;
DwtKeyMapMgr._KEYCODES[59]=DwtKeyMap.SEMICOLON;
DwtKeyMapMgr._KEYCODES[17]=DwtKeyMap.CTRL;
DwtKeyMapMgr._KEYCODES[46]=DwtKeyMap.DELETE;
DwtKeyMapMgr._KEYCODES[35]=DwtKeyMap.END;
DwtKeyMapMgr._KEYCODES[13]=DwtKeyMap.ENTER;
DwtKeyMapMgr._KEYCODES[27]=DwtKeyMap.ESC;
DwtKeyMapMgr._KEYCODES[36]=DwtKeyMap.HOME;
DwtKeyMapMgr._KEYCODES[91]=DwtKeyMap.META;
DwtKeyMapMgr._KEYCODES[34]=DwtKeyMap.PAGE_DOWN;
DwtKeyMapMgr._KEYCODES[33]=DwtKeyMap.PAGE_UP;
DwtKeyMapMgr._KEYCODES[16]=DwtKeyMap.SHIFT;
DwtKeyMapMgr._KEYCODES[32]=DwtKeyMap.SPACE;
DwtKeyMapMgr._KEYCODES[9]=DwtKeyMap.TAB;
DwtKeyMapMgr._KEYCODES[220]=DwtKeyMap.BACKSLASH;
for(var i=112;i<124;i++){
DwtKeyMapMgr._KEYCODES[i]="F"+(i-111);
}
for(var i=65;i<91;i++){
DwtKeyMapMgr._KEYCODES[i]=String.fromCharCode(i);
}
for(var i=48;i<58;i++){
DwtKeyMapMgr._KEYCODES[i]=String.fromCharCode(i);
}
DwtKeyMapMgr._KEYCODES[222]="'";
DwtKeyMapMgr._KEYCODES[189]="-";
DwtKeyMapMgr._KEYCODES[190]=".";
DwtKeyMapMgr._KEYCODES[191]="/";
DwtKeyMapMgr._KEYCODES[186]=";";
DwtKeyMapMgr._KEYCODES[219]="[";
DwtKeyMapMgr._KEYCODES[221]="]";
DwtKeyMapMgr._KEYCODES[192]="`";
DwtKeyMapMgr._KEYCODES[187]="=";
DwtKeyMapMgr.isAlpha=DwtKeyMapMgr._isAlphaUs;
DwtKeyMapMgr.isNumeric=DwtKeyMapMgr._isNumericUs;
DwtKeyMapMgr.isAlphanumeric=DwtKeyMapMgr._isAlphanumericUs;
DwtKeyMapMgr.isPunctuation=DwtKeyMapMgr._isPunctuationUs;
DwtKeyMapMgr.isUsableTextInputValue=DwtKeyMapMgr.isUsableTextInputValueUs;
DwtKeyMapMgr.isModifier=DwtKeyMapMgr._isModifierUs;
})();
function DwtKeyMapMgrException(msg,code,_74c,_74d){
DwtException.call(this,msg,code,_74c,detail);
this._keySeqStr=_74d;
}
DwtKeyMapMgrException.prototype=new DwtException;
DwtKeyMapMgrException.prototype.constructor=DwtKeyMapMgrException;
DwtKeyMapMgrException.NON_TERM_HAS_ACTION=1;
DwtKeyMapMgrException.TERM_HAS_SUBMAP=2;
DwtException.prototype.toString=function(){
return "DwtKeyMapMgrException";
};
function DwtKeyboardMgr(){
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.prototype.toString=function(){
return "DwtKeyboardMgr";
};
DwtKeyboardMgr.prototype.pushTabGroup=function(_74e){
if(!this.__keyboardHandlingInited||!_74e){
return;
}
this.__tabGrpStack.push(_74e);
this.__currTabGroup=_74e;
var _74f=_74e.getFocusMember();
if(!_74f){
_74f=_74e.resetFocusMember(true);
}
if(!_74f){
return;
}
_74e.addFocusChangeListener(this.__tabGroupChangeListenerObj);
this.grabFocus(_74f);
};
DwtKeyboardMgr.prototype.popTabGroup=function(_750){
if(!this.__keyboardHandlingInited){
return;
}
if(!_750){
return;
}
if(this.__tabGrpStack.length<=1){
return null;
}
if(_750&&this.__tabGrpStack[this.__tabGrpStack.length-1]!=_750){
var a=this.__tabGrpStack;
var len=a.length;
for(var i=len-1;i>=0;i--){
if(_750==a[i]){
a[i].dump();
break;
}
}
if(i<0){
return null;
}else{
if(i!=len-1){
a.splice(i,1);
return _750;
}
}
}
var _750=this.__tabGrpStack.pop();
_750.removeFocusChangeListener(this.__tabGroupChangeListenerObj);
var _754=null;
if(this.__tabGrpStack.length>0){
_754=this.__tabGrpStack[this.__tabGrpStack.length-1];
var _755=_754.getFocusMember();
if(!_755){
_755=_754.resetFocusMember(true);
}
if(_755){
this.grabFocus(_755);
}
}
this.__currTabGroup=_754;
return _750;
};
DwtKeyboardMgr.prototype.setTabGroup=function(_756){
if(!this.__enabled||!this.__keyboardHandlingInited){
return;
}
var otg=this.popTabGroup();
this.pushTabGroup(_756);
return otg;
};
DwtKeyboardMgr.prototype.pushDefaultHandler=function(_758){
if(!this.__enabled||!this.__keyboardHandlingInited||!_758){
return;
}
this.__defaultHandlerStack.push(_758);
this.__currDefaultHandler=_758;
};
DwtKeyboardMgr.prototype.popDefaultHandler=function(){
if(!this.__keyboardHandlingInited||(this.__defaultHandlerStack.length<=1)){
return;
}
var _759=this.__defaultHandlerStack.pop();
this.__currDefaultHandler=this.__defaultHandlerStack[this.__defaultHandlerStack.length-1];
return _759;
};
DwtKeyboardMgr.prototype.grabFocus=function(_75a){
if(!this.__enabled){
return;
}
if(!this.__keyboardHandlingInited){
return;
}
if(!_75a){
return;
}
if(this.__currTabGroup){
this.__currTabGroup.setFocusMember(_75a,false,true);
}
this.__doGrabFocus(_75a);
};
DwtKeyboardMgr.prototype.dwtControlHasFocus=function(_75b){
if(!this.__enabled){
return false;
}
if(!this.__keyboardHandlingInited){
return false;
}
return (this.__dwtCtrlHasFocus&&this.__focusObj==_75b);
};
DwtKeyboardMgr.prototype.registerDefaultKeyActionHandler=function(hdlr){
if(!this.__enabled){
return;
}
this.__defaultKeyActionHdlr=hdlr;
};
DwtKeyboardMgr.prototype.registerKeyMap=function(_75d){
if(!this.__checkStatus()){
return;
}
this.__keyMapMgr=new DwtKeyMapMgr(_75d);
};
DwtKeyboardMgr.prototype.setKeyTimeout=function(_75e){
this.__keyTimeout=_75e;
};
DwtKeyboardMgr.prototype.enable=function(_75f){
this.__enabled=_75f;
if(_75f){
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 kbff=this._kbFocusField=document.createElement("input");
kbff.type="text";
kbff.tabIndex=0;
kbff.style.position=Dwt.ABSOLUTE_STYLE;
kbff.style.top=kbff.style.left=Dwt.LOC_NOWHERE;
kbff.onblur=DwtKeyboardMgr.__onBlurHdlr;
kbff.onfocus=DwtKeyboardMgr.__onFocusHdlr;
document.body.appendChild(kbff);
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(_761){
if(!_761){
return;
}
var _762=(_761 instanceof DwtInputField||_761 instanceof DwtHtmlEditor);
if(_762||!(_761 instanceof DwtControl)){
if(this.__focusObj instanceof DwtControl&&!this.__dwtInputCtrl){
this.__oldFocusObj=this.__focusObj;
}
this.__focusObj=_761;
this.__dwtInputCtrl=_762;
var el=_762?_761.getInputElement():_761;
if((!AjxEnv.isIE&&_761.focus)||(AjxEnv.isIE&&_761.focus&&!el.disabled&&Dwt.getVisible(el))){
try{
_761.focus();
}
catch(ex){
}
}
}else{
if(this.__dwtCtrlHasFocus&&(this.__focusObj instanceof DwtControl)){
DwtKeyboardMgr.__onBlurHdlr();
this.__dwtCtrlHasFocus=true;
}
this.__focusObj=_761;
this.__dwtInputCtrl=false;
if(this.__dwtCtrlHasFocus){
DwtKeyboardMgr.__onFocusHdlr();
}else{
this._kbFocusField.focus();
}
}
};
DwtKeyboardMgr.__onFocusHdlr=function(ev){
var _765=DwtShell.getShell(window).getKeyboardMgr();
_765.__dwtCtrlHasFocus=true;
var _766=_765.__focusObj;
if(_766&&_766.__doFocus&&(typeof _766.__doFocus=="function")){
_766.__doFocus();
}
};
DwtKeyboardMgr.__onBlurHdlr=function(ev){
var _768=DwtShell.getShell(window).getKeyboardMgr();
var _769=_768.__oldFocusObj?_768.__oldFocusObj:_768.__focusObj;
if(_769&&_769.__doBlur&&(typeof _769.__doBlur=="function")){
_769.__doBlur();
}
_768.__oldFocusObj=null;
_768.__dwtCtrlHasFocus=false;
};
DwtKeyboardMgr.__keyUpHdlr=function(ev){
ev=DwtUiEvent.getEvent(ev,this);
var _76b=DwtShell.getShell(window).getKeyboardMgr();
var kev=DwtShell.keyEvent;
kev.setFromDhtmlEvent(ev);
if(_76b.__kbEventStatus!=DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED){
return _76b.__processKeyEvent(ev,kev,false);
}
};
DwtKeyboardMgr.__keyPressHdlr=function(ev){
ev=DwtUiEvent.getEvent(ev,this);
return DwtKeyboardMgr.__keyUpHdlr(ev);
};
DwtKeyboardMgr.__syncFocus=function(_76e,obj){
if((obj!=_76e._kbFocusField)&&_76e.__dwtCtrlHasFocus){
DwtKeyboardMgr.__onBlurHdlr();
}
if(!_76e.__dwtCtrlHasFocus){
if((obj!=_76e.__focusObj)&&!_76e.__dwtInputCtrl){
if(_76e.__currTabGroup&&_76e.__currTabGroup.setFocusMember(obj)){
_76e.__focusObj=obj;
_76e.__oldFocusObj=null;
}else{
return false;
}
}
}
return true;
};
DwtKeyboardMgr.__keyDownHdlr=function(ev){
ev=DwtUiEvent.getEvent(ev,this);
var _771=DwtShell.getShell(window);
var _772=_771.getKeyboardMgr();
var kev=DwtShell.keyEvent;
kev.setFromDhtmlEvent(ev);
var _774=kev.keyCode;
_771.getToolTip().popdown();
var _775=DwtKeyboardMgr.__syncFocus(_772,kev.target);
if(!_775){
}
if(_774==DwtKeyMapMgr.TAB_KEYCODE){
if(_772.__currTabGroup&&!kev.ctrlKey&&!kev.altKey){
if(!DwtMenu.menuShowing()){
if(_775||_772.__currTabGroup.getFocusMember()){
if(!kev.shiftKey){
_772.__currTabGroup.getNextFocusMember(true);
}else{
_772.__currTabGroup.getPrevFocusMember(true);
}
}else{
_772.__currTabGroup.resetFocusMember(true);
}
}
return _772.__processKeyEvent(ev,kev,false,DwtKeyboardMgr.__KEYSEQ_HANDLED);
}else{
return _772.__processKeyEvent(ev,kev,true,DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED);
}
}else{
if(_772.__currTabGroup&&!_775&&AjxEnv.isGecko&&kev.target instanceof HTMLHtmlElement){
_772.__currTabGroup.resetFocusMember(true);
}
}
if(_772.__dwtCtrlHasFocus){
_772._kbFocusField.value="";
}
if(DwtKeyMapMgr.isModifier(_774)||(!_772.__dwtCtrlHasFocus&&_772.__killKeySeqTimedActionId==-1&&!kev.ctrlKey&&!kev.altKey&&DwtKeyMapMgr.isUsableTextInputValue(_774,kev.target))){
return _772.__processKeyEvent(ev,kev,true,DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED);
}
if(_772.__killKeySeqTimedActionId!=-1){
AjxTimedAction.cancelAction(_772.__killKeySeqTimedActionId);
_772.__killKeySeqTimedActionId=-1;
}
var key="";
if(kev.metaKey){
key+=DwtKeyMap.META;
}
if(kev.ctrlKey){
key+=DwtKeyMap.CTRL;
}
if(kev.altKey){
key+=DwtKeyMap.ALT;
}
if(kev.shiftKey){
key+=DwtKeyMap.SHIFT;
}
_772.__keySequence[_772.__keySequence.length]=key+_772.__keyMapMgr.keyCode2Char(_774);
var _777=DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED;
var obj=(_772.__dwtCtrlHasFocus)?_772.__focusObj:null;
if(obj&&(obj instanceof DwtControl)){
_777=_772.__dispatchKeyEvent(obj,kev);
while((_777==DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED)&&obj.parent&&obj.parent.getKeyMapName){
obj=obj.parent;
_777=_772.__dispatchKeyEvent(obj,kev);
}
}
if((_777==DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED)&&_772.__currDefaultHandler&&!(_772.__currTabGroup&&_772.__currTabGroup.isDefaultHandlingBlocked())){
_777=_772.__dispatchKeyEvent(_772.__currDefaultHandler,kev);
}
_772.__kbEventStatus=_777;
switch(_777){
case DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED:
_772.__keySequence.length=0;
return _772.__processKeyEvent(ev,kev,true);
case DwtKeyboardMgr.__KEYSEQ_HANDLED:
_772.__keySequence.length=0;
case DwtKeyboardMgr.__KEYSEQ_PENDING:
return _772.__processKeyEvent(ev,kev,false);
}
};
DwtKeyboardMgr.prototype.__dispatchKeyEvent=function(hdlr,ev,_77b){
var _77c=hdlr.getKeyMapName?hdlr.getKeyMapName():null;
if(!_77c){
return DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED;
}
var _77d=this.__keyMapMgr.getActionCode(this.__keySequence,_77c,_77b);
if(_77d==DwtKeyMapMgr.NOT_A_TERMINAL){
this.__hdlr=hdlr;
this.__mapName=_77c;
this.__ev=ev;
this.__killKeySeqTimedActionId=AjxTimedAction.scheduleAction(this.__killKeySeqTimedAction,this.__keyTimeout);
return DwtKeyboardMgr.__KEYSEQ_PENDING;
}else{
if(_77d!=null){
if(!hdlr.handleKeyAction){
return DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED;
}
return (hdlr.handleKeyAction(_77d,ev))?DwtKeyboardMgr.__KEYSEQ_HANDLED:DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED;
}else{
return DwtKeyboardMgr.__KEYSEQ_NOT_HANDLED;
}
}
};
DwtKeyboardMgr.prototype.__killKeySequenceAction=function(){
this.__dispatchKeyEvent(this.__hdlr,this.__mapName,this.__ev,true);
this.__killKeySeqTimedActionId=-1;
this.__keySequence.length=0;
};
DwtKeyboardMgr.prototype.__tabGrpChangeListener=function(ev){
this.__doGrabFocus(ev.newFocusMember);
};
DwtKeyboardMgr.prototype.__processKeyEvent=function(ev,kev,_781,_782){
if(_782){
this.__kbEventStatus=_782;
}
kev._stopPropagation=!_781;
kev._returnValue=_781;
kev.setToDhtmlEvent(ev);
return _781;
};
function DwtTabGroup(name,_784){
this.__members=new AjxVector();
this.__parent=null;
this.__name=name;
this.__blockApplicationHandling=_784;
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.addFocusChangeListener=function(_785){
this.__checkRoot();
this.__evtMgr.addListener(DwtEvent.STATE_CHANGE,_785);
};
DwtTabGroup.prototype.removeFocusChangeListener=function(_786){
this.__checkRoot();
this.__evtMgr.removeListener(DwtEvent.STATE_CHANGE,_786);
};
DwtTabGroup.prototype.addMember=function(_787,_788){
if(!_787){
return;
}
this.__members.add(_787,_788);
if(_787 instanceof DwtTabGroup){
_787.newParent(this);
}
};
DwtTabGroup.prototype.addMemberAfter=function(_789,_78a){
this.addMember(_789,this.__members.indexOf(_78a)+1);
};
DwtTabGroup.prototype.addMemberBefore=function(_78b,_78c){
this.addMember(_78b,this.__members.indexOf(_78c));
};
DwtTabGroup.prototype.removeMember=function(_78d,_78e,_78f){
return this.replaceMember(_78d,null,_78e,_78f);
};
DwtTabGroup.prototype.replaceMember=function(_790,_791,_792,_793,_794,_795){
var tg=this.__getTabGroupForMember(_790);
if(!tg){
return null;
}
var root=this.__getRootTabGroup();
var _798;
if(_794){
_798=_794;
}else{
if(root.__currFocusMember==_790||((_790 instanceof DwtTabGroup)&&_790.contains(root.__currFocusMember))){
if(_791){
_798=(_791 instanceof DwtTabGroup)?_791.getFirstMember():_791;
}else{
_798=this.__getPrevMember(_790,_792);
if(!_798){
_798=this.__getNextMember(_790,_792);
}
}
}
}
if(_798&&!_795){
root.__currFocusMember=_798;
if(!_793){
this.__notifyListeners(_798);
}
}
return _791?this.__members.replaceObject(_790,_791):this.__members.remove(_790);
};
DwtTabGroup.prototype.contains=function(_799){
return (this.__getTabGroupForMember(_799));
};
DwtTabGroup.prototype.newParent=function(_79a){
this.__parent=_79a;
};
DwtTabGroup.prototype.getFirstMember=function(_79b){
return this.__getLeftMostMember(_79b);
};
DwtTabGroup.prototype.getLastMember=function(_79c){
return this.__getRightMostMember(_79c);
};
DwtTabGroup.prototype.getFocusMember=function(){
this.__checkRoot();
return this.__currFocusMember;
};
DwtTabGroup.prototype.setFocusMember=function(_79d,_79e,_79f){
this.__checkRoot();
if(!this.__checkEnabled(_79d,_79e)){
return false;
}
var tg=this.__getTabGroupForMember(_79d);
if(tg){
this.__currFocusMember=_79d;
if(!_79f){
this.__notifyListeners(this.__currFocusMember);
}
return true;
}
return false;
};
DwtTabGroup.prototype.getNextFocusMember=function(_7a1,_7a2){
this.__checkRoot();
return this.__setFocusMember(true,_7a1,_7a2);
};
DwtTabGroup.prototype.getPrevFocusMember=function(_7a3,_7a4){
this.__checkRoot();
return this.__setFocusMember(false,_7a3,_7a4);
};
DwtTabGroup.prototype.resetFocusMember=function(_7a5,_7a6){
this.__checkRoot();
var _7a7=this.__getLeftMostMember(_7a5);
if((_7a7!=this.__currFocusMember)&&!_7a6){
this.__notifyListeners(this.__currFocusMember);
}
this.__currFocusMember=_7a7;
return this.__currFocusMember;
};
DwtTabGroup.prototype.blockDefaultHandling=function(_7a8){
this.__blockDefaultHandling=blockDefaultHandling;
};
DwtTabGroup.prototype.isDefaultHandlingBlocked=function(_7a9){
return this.__blockDefaultHandling;
};
DwtTabGroup.prototype.dump=function(_7aa){
this.__dump(this,_7aa);
};
DwtTabGroup.prototype.__getPrevMember=function(_7ab,_7ac){
var a=this.__members.getArray();
for(var i=this.__members.indexOf(_7ab)-1;i>-1;i--){
var _7af=a[i];
if(!(_7af instanceof DwtTabGroup)){
if(this.__checkEnabled(_7af,_7ac)){
return _7af;
}
}else{
_7af=_7af.__getRightMostMember(_7ac);
if(_7af&&this.__checkEnabled(_7af,_7ac)){
return _7af;
}
}
}
return this.__parent?this.__parent.__getPrevMember(this,_7ac):null;
};
DwtTabGroup.prototype.__checkEnabled=function(_7b0,_7b1){
if(!_7b1){
return true;
}
if(!_7b0||_7b0.noTab){
return false;
}
if(_7b0 instanceof DwtControl){
return (_7b0.getEnabled()&&_7b0.getVisible());
}else{
return !_7b0.disabled;
}
};
DwtTabGroup.prototype.__getNextMember=function(_7b2,_7b3){
var a=this.__members.getArray();
var sz=this.__members.size();
for(var i=this.__members.indexOf(_7b2)+1;i<sz;i++){
var _7b7=a[i];
if(!(_7b7 instanceof DwtTabGroup)){
if(this.__checkEnabled(_7b7,_7b3)){
return _7b7;
}
}else{
_7b7=_7b7.__getLeftMostMember(_7b3);
if(_7b7&&this.__checkEnabled(_7b7,_7b3)){
return _7b7;
}
}
}
return this.__parent?this.__parent.__getNextMember(this,_7b3):null;
};
DwtTabGroup.prototype.__getRightMostMember=function(_7b8){
var a=this.__members.getArray();
var _7ba=null;
for(var i=this.__members.size()-1;i>=0;i--){
_7ba=a[i];
if(!(_7ba instanceof DwtTabGroup)){
if(this.__checkEnabled(_7ba,_7b8)){
break;
}
}else{
_7ba=_7ba.__getRightMostMember(_7b8);
if(_7ba&&this.__checkEnabled(_7ba,_7b8)){
break;
}
}
}
return (_7ba&&this.__checkEnabled(_7ba,_7b8))?_7ba:null;
};
DwtTabGroup.prototype.__getLeftMostMember=function(_7bc){
var sz=this.__members.size();
var a=this.__members.getArray();
var _7bf=null;
for(var i=0;i<sz;i++){
_7bf=a[i];
if(!(_7bf instanceof DwtTabGroup)){
if(this.__checkEnabled(_7bf,_7bc)){
break;
}
}else{
_7bf=_7bf.__getLeftMostMember(_7bc);
if(_7bf&&this.__checkEnabled(_7bf,_7bc)){
break;
}
}
}
return (_7bf&&this.__checkEnabled(_7bf,_7bc))?_7bf:null;
};
DwtTabGroup.prototype.__notifyListeners=function(_7c1){
var _7c2=this.__getRootTabGroup();
if(_7c2.__evtMgr){
var evt=DwtTabGroup.__changeEvt;
evt.reset();
evt.tabGroup=this;
evt.newFocusMember=_7c1;
_7c2.__evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,evt);
}
};
DwtTabGroup.prototype.__getRootTabGroup=function(){
var root=this;
while(root.__parent){
root=root.__parent;
}
return root;
};
DwtTabGroup.prototype.__dump=function(tg,_7c6,_7c7){
_7c7=_7c7||0;
var _7c8="";
for(var i=0;i<_7c7;i++){
_7c8+="&nbsp;&nbsp;&nbsp;&nbsp;";
}
_7c6=_7c6||AjxDebug.DBG1;
_7c8+="&nbsp;&nbsp;&nbsp;&nbsp;";
var sz=tg.__members.size();
var a=tg.__members.getArray();
for(var i=0;i<sz;i++){
if(a[i] instanceof DwtTabGroup){
tg.__dump(a[i],_7c6,_7c7+1);
}else{
if(a[i] instanceof DwtControl){
}else{
}
}
}
};
DwtTabGroup.prototype.__setFocusMember=function(next,_7cd,_7ce){
if(!this.__currFocusMember){
return this.resetFocusMember(_7cd,_7ce);
}
var _7cf=this.__getTabGroupForMember(this.__currFocusMember);
if(!_7cf){
return null;
}
var m=(next)?_7cf.__getNextMember(this.__currFocusMember,_7cd):_7cf.__getPrevMember(this.__currFocusMember,_7cd);
if(!m){
m=(next)?this.__getLeftMostMember(_7cd):this.__getRightMostMember(_7cd);
if(m==this.__currFocusMember){
return null;
}
}
this.__currFocusMember=m;
if(!_7ce){
this.__notifyListeners(this.__currFocusMember);
}
return this.__currFocusMember;
};
DwtTabGroup.prototype.__getTabGroupForMember=function(_7d1){
if(!_7d1){
return null;
}
var sz=this.__members.size();
var a=this.__members.getArray();
var m;
for(var i=0;i<sz;i++){
m=a[i];
if(m==_7d1){
return this;
}else{
if(m instanceof DwtTabGroup&&(m=m.__getTabGroupForMember(_7d1))){
return m;
}
}
}
return null;
};
DwtTabGroup.prototype.__checkRoot=function(){
if(this.__parent){
throw DwtTabGroup.NOT_ROOT_TABGROUP;
}
};
function DwtDragEvent(){
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;
function DwtDragSource(_7d6){
this.__supportedOps=_7d6;
this.__evtMgr=new AjxEventMgr();
}
DwtDragSource.__DRAG_LISTENER="DwtDragSource.__DRAG_LISTENER";
DwtDragSource.__dragEvent=new DwtDragEvent();
DwtDragSource.prototype.toString=function(){
return "DwtDragSource";
};
DwtDragSource.prototype.addDragListener=function(_7d7){
this.__evtMgr.addListener(DwtDragSource.__DRAG_LISTENER,_7d7);
};
DwtDragSource.prototype.removeDragListener=function(_7d8){
this.__evtMgr.removeListener(DwtDragSource.__DRAG_LISTENER,_7d8);
};
DwtDragSource.prototype._beginDrag=function(_7d9,_7da){
if(!(this.__supportedOps&_7d9)){
return Dwt.DND_DROP_NONE;
}
DwtDragSource.__dragEvent.operation=_7d9;
DwtDragSource.__dragEvent.srcControl=_7da;
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;
};
function DwtDropEvent(){
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;
function DwtDropTarget(_7db){
this._evtMgr=new AjxEventMgr();
this.__hasMultiple=false;
this.__transferTypes=new Array();
if(_7db){
if(_7db instanceof Array){
this.__transferTypes=_7db;
}else{
var len=arguments.length;
for(var i=0;i<len;i++){
this.__transferTypes[i]=arguments[i];
}
this.__transferTypes.length=i;
}
}
}
DwtDropTarget.__DROP_LISTENER="DwtDropTarget.__DROP_LISTENER";
DwtDropTarget.__dropEvent=new DwtDropEvent();
DwtDropTarget.prototype.toString=function(){
return "DwtDropTarget";
};
DwtDropTarget.prototype.addDropListener=function(_7de){
this._evtMgr.addListener(DwtDropTarget.__DROP_LISTENER,_7de);
};
DwtDropTarget.prototype.removeDropListener=function(_7df){
this._evtMgr.removeListener(DwtDropTarget.__DROP_LISTENER,_7df);
};
DwtDropTarget.prototype.isValidTarget=function(_7e0){
if(_7e0 instanceof Array){
var len=_7e0.length;
for(var i=0;i<len;i++){
if(!this.__checkTarget(_7e0[i])){
return false;
}
}
return true;
}else{
return this.__checkTarget(_7e0);
}
};
DwtDropTarget.prototype.markAsMultiple=function(){
this.__hasMultiple=true;
};
DwtDropTarget.prototype.hasMultipleTargets=function(){
return this.__hasMultiple;
};
DwtDropTarget.prototype.getTransferTypes=function(){
return this.__transferTypes;
};
DwtDropTarget.prototype.setTransferTypes=function(_7e3){
var len=arguments.length;
for(var i=0;i<len;i++){
this.__transferTypes[i]=arguments[i];
}
this.__transferTypes.length=i;
};
DwtDropTarget.prototype._dragEnter=function(_7e6,_7e7,_7e8,ev,_7ea){
DwtDropTarget.__dropEvent.operation=_7e6;
DwtDropTarget.__dropEvent.targetControl=_7e7;
DwtDropTarget.__dropEvent.action=DwtDropEvent.DRAG_ENTER;
DwtDropTarget.__dropEvent.srcData=_7e8;
DwtDropTarget.__dropEvent.uiEvent=ev;
DwtDropTarget.__dropEvent.doIt=true;
DwtDropTarget.__dropEvent.dndIcon=_7ea;
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(_7eb){
DwtDropTarget.__dropEvent.operation=_7eb;
DwtDropTarget.__dropEvent.action=DwtDropEvent.DRAG_OP_CHANGED;
this._evtMgr.notifyListeners(DwtDropTarget.__DROP_LISTENER,DwtDropTarget.__dropEvent);
return DwtDropTarget.__dropEvent.doIt;
};
DwtDropTarget.prototype._drop=function(_7ec,ev){
DwtDropTarget.__dropEvent.action=DwtDropEvent.DRAG_DROP;
DwtDropTarget.__dropEvent.srcData=_7ec;
DwtDropTarget.__dropEvent.uiEvent=ev;
this._evtMgr.notifyListeners(DwtDropTarget.__DROP_LISTENER,DwtDropTarget.__dropEvent);
return DwtDropTarget.__dropEvent.doIt;
};
DwtDropTarget.prototype.__checkTarget=function(item){
var len=this.__transferTypes.length;
for(var i=0;i<len;i++){
if(item instanceof this.__transferTypes[i]){
return true;
}
}
if(i==this.__transferTypes.length){
return false;
}
};
function DwtHoverMgr(){
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(_7f1){
this._hoverObject=_7f1;
};
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(_7f2){
this._hoverOverDelay=_7f2;
};
DwtHoverMgr.prototype.setHoverOverData=function(data){
this._hoverOverData=data;
};
DwtHoverMgr.prototype.setHoverOverListener=function(_7f4){
this._hoverOverListener=_7f4;
};
DwtHoverMgr.prototype.setHoverOutDelay=function(_7f5){
this._hoverOutDelay=_7f5;
};
DwtHoverMgr.prototype.setHoverOutData=function(data){
this._hoverOutData=data;
};
DwtHoverMgr.prototype.setHoverOutListener=function(_7f7){
this._hoverOutListener=_7f7;
};
DwtHoverMgr.prototype.hoverOver=function(x,y){
if(this._hoverOverActionId!=-1){
AjxTimedAction.cancelAction(this._hoverOverActionId);
}
this._hoverOverAction.args=[x,y];
this._hoverOverActionId=AjxTimedAction.scheduleAction(this._hoverOverAction,this._hoverOverDelay);
};
DwtHoverMgr.prototype.hoverOut=function(){
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;
this._isHovering=true;
if(this._hoverOverListener!=null){
var x=this._hoverOverAction.args[0];
var y=this._hoverOverAction.args[1];
var _7fc=new DwtHoverEvent(DwtEvent.HOVEROVER,this._hoverOverDelay,this._hoverOverData,x,y);
this._hoverOverListener.handleEvent(_7fc);
}
};
DwtHoverMgr.prototype._notifyHoverOut=function(){
this._hoverOutActionId=-1;
this._isHovering=false;
if(this._hoverOutListener!=null){
var _7fd=new DwtHoverEvent(DwtEvent.HOVEROUT,this._hoverOutDelay,this._hoverOutData);
this._hoverOutListener.handleEvent(_7fd);
}
};
function DwtControl(_7fe,_7ff,_800,_801,id,_803){
if(arguments.length==0){
return;
}
this.parent=_7fe;
if(_7fe!=null&&!(_7fe instanceof DwtComposite)){
throw new DwtException("Parent must be a subclass of Composite",DwtException.INVALIDPARENT,"DwtControl");
}
this.shell=null;
this._data=new Object();
this._eventMgr=new AjxEventMgr();
this._disposed=false;
if(_7fe==null){
return;
}
this._className=_7ff?_7ff:"DwtControl";
this.__posStyle=_800;
if(id!=null){
this._htmlElId=id;
}
this.__index=_803;
this._enabled=false;
this._dragging=null;
this._dndIcon;
this._hasFocus=false;
if(!_801){
this.__initCtrl();
}
this._hoverOverListener=new AjxListener(this,this.__handleHoverOver);
this._hoverOutListener=new AjxListener(this,this.__handleHoverOut);
}
DwtControl.STATIC_STYLE=Dwt.STATIC_STYLE;
DwtControl.ABSOLUTE_STYLE=Dwt.ABSOLUTE_STYLE;
DwtControl.RELATIVE_STYLE=Dwt.RELATIVE_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.prototype.toString=function(){
return "DwtControl";
};
DwtControl.prototype.addControlListener=function(_804){
this.addListener(DwtEvent.CONTROL,_804);
};
DwtControl.prototype.removeControlListener=function(_805){
this.removeListener(DwtEvent.CONTROL,_805);
};
DwtControl.prototype.addDisposeListener=function(_806){
this.addListener(DwtEvent.DISPOSE,_806);
};
DwtControl.prototype.removeDisposeListener=function(_807){
this.removeListener(DwtEvent.DISPOSE,_807);
};
DwtControl.prototype.addListener=function(_808,_809){
return this._eventMgr.addListener(_808,_809);
};
DwtControl.prototype.removeListener=function(_80a,_80b){
return this._eventMgr.removeListener(_80a,_80b);
};
DwtControl.prototype.removeAllListeners=function(_80c){
return this._eventMgr.removeAll(_80c);
};
DwtControl.prototype.isListenerRegistered=function(_80d){
return this._eventMgr.isListenerRegistered(_80d);
};
DwtControl.prototype.notifyListeners=function(_80e,_80f){
return this._eventMgr.notifyListeners(_80e,_80f);
};
DwtControl.prototype.dispose=function(){
if(this._disposed){
return;
}
if(this.parent!=null){
this.parent.removeChild(this);
}
Dwt.disassociateElementFromObject(null,this);
this._disposed=true;
var ev=new DwtDisposeEvent();
ev.dwtObj=this;
this.notifyListeners(DwtEvent.DISPOSE,ev);
};
DwtControl.prototype.getDocument=function(){
return document;
};
DwtControl.prototype.getData=function(key){
return this._data[key];
};
DwtControl.prototype.setData=function(key,_813){
this._data[key]=_813;
};
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(_814,ev){
return false;
};
DwtControl.prototype.reparent=function(_816){
if(!this._checkState()){
return;
}
var _817=this.getHtmlElement();
this.parent.removeChild(this);
DwtComposite._pendingElements[this._htmlElId]=_817;
_816.addChild(this);
this.parent=_816;
};
DwtControl.prototype.reparentHtmlElement=function(_818){
if(typeof _818=="string"){
_818=document.getElementById(_818);
}
_818.appendChild(this.getHtmlElement());
};
DwtControl.prototype.setHandler=function(_819,_81a){
if(!this._checkState()){
return;
}
var _81b=this.getHtmlElement();
Dwt.setHandler(_81b,_819,_81a);
};
DwtControl.prototype.clearHandler=function(_81c){
if(!this._checkState()){
return;
}
var _81d=this.getHtmlElement();
Dwt.clearHandler(_81d,_81c);
};
DwtControl.prototype.getBounds=function(){
if(!this._checkState()){
return;
}
return Dwt.getBounds(this.getHtmlElement());
};
DwtControl.prototype.setBounds=function(x,y,_820,_821){
if(!this._checkState()){
return;
}
var _822=this.getHtmlElement();
if(this.isListenerRegistered(DwtEvent.CONTROL)){
this.__controlEvent.reset();
var bds=Dwt.getBounds(_822);
this.__controlEvent.oldX=bds.x;
this.__controlEvent.oldY=bds.y;
this.__controlEvent.oldWidth=bds.width;
this.__controlEvent.oldHeight=bds.height;
Dwt.setBounds(_822,x,y,_820,_821);
bds=Dwt.getBounds(_822);
this.__controlEvent.newX=bds.x;
this.__controlEvent.newY=bds.y;
this.__controlEvent.newWidth=bds.width;
this.__controlEvent.newHeight=bds.height;
this.__controlEvent.requestedWidth=_820;
this.__controlEvent.requestedHeight=_821;
this.notifyListeners(DwtEvent.CONTROL,this.__controlEvent);
}else{
Dwt.setBounds(_822,x,y,_820,_821);
}
return this;
};
DwtControl.prototype.getClassName=function(){
return this._className;
};
DwtControl.prototype.setClassName=function(_824){
if(!this._checkState()){
return;
}
this._className=_824;
this.getHtmlElement().className=_824;
};
DwtControl.prototype.getCursor=function(){
if(!this._checkState()){
return;
}
return Dwt.getCursor(this.getHtmlElement());
};
DwtControl.prototype.setCursor=function(_825){
if(!this._checkState()){
return;
}
Dwt.setCursor(this.getHtmlElement(),_825);
};
DwtControl.prototype.getDragSource=function(){
return this._dragSource;
};
DwtControl.prototype.setDragSource=function(_826){
this._dragSource=_826;
if(_826!=null&&this._ctrlCaptureObj==null){
this._ctrlCaptureObj=new DwtMouseEventCapture(this,"DwtControl",DwtControl.__mouseOverHdlr,DwtControl.__mouseDownHdlr,DwtControl.__mouseMoveHdlr,DwtControl.__mouseUpHdlr,DwtControl.__mouseOutHdlr);
this._dndHoverAction=new AjxTimedAction(null,this.__dndDoHover);
}
};
DwtControl.prototype.getDropTarget=function(){
return this._dropTarget;
};
DwtControl.prototype.setDropTarget=function(_827){
this._dropTarget=_827;
};
DwtControl.prototype.getEnabled=function(){
if(!this._checkState()){
return;
}
return this._enabled;
};
DwtControl.prototype.setEnabled=function(_828,_829){
if(!this._checkState()){
return;
}
if(_828!=this._enabled){
this._enabled=_828;
if(_829){
this.getHtmlElement().disabled=!_828;
}
}
};
DwtControl.prototype.getHtmlElement=function(){
if(!this._checkState()){
return;
}
var _82a=document.getElementById(this._htmlElId);
if(_82a==null){
_82a=DwtComposite._pendingElements[this._htmlElId];
}else{
if(!_82a._rendered){
delete DwtComposite._pendingElements[this._htmlElId];
_82a._rendered=true;
}
}
return _82a;
};
DwtControl.prototype.setHtmlElementId=function(id){
if(this._disposed){
return;
}
if(this.__ctrlInited){
var _82c=this.getHtmlElement();
if(!_82c._rendered){
delete DwtComposite._pendingElements[this._htmlElId];
DwtComposite._pendingElements[id]=_82c;
}
_82c.id=id;
}
this._htmlElId=id;
};
DwtControl.prototype.getX=function(){
if(!this._checkState()){
return;
}
return Dwt.getLocation(this.getHtmlElement()).x;
};
DwtControl.prototype.getXW=function(){
if(!this._checkState()){
return;
}
var _82d=this.getBounds();
return _82d.x+_82d.width;
};
DwtControl.prototype.getY=function(){
if(!this._checkState()){
return;
}
return Dwt.getLocation(this.getHtmlElement()).y;
};
DwtControl.prototype.getYH=function(){
if(!this._checkState()){
return;
}
var _82e=this.getBounds();
return _82e.y+_82e.height;
};
DwtControl.prototype.getLocation=function(){
if(!this._checkState()){
return;
}
return Dwt.getLocation(this.getHtmlElement());
};
DwtControl.prototype.setLocation=function(x,y){
if(!this._checkState()){
return;
}
if(this.isListenerRegistered(DwtEvent.CONTROL)){
var _831=this.getHtmlElement();
this.__controlEvent.reset();
var loc=Dwt.getLocation(_831);
this.__controlEvent.oldX=loc.x;
this.__controlEvent.oldY=loc.y;
Dwt.setLocation(_831,x,y);
loc=Dwt.getLocation(_831);
this.__controlEvent.newX=loc.x;
this.__controlEvent.newY=loc.y;
this.notifyListeners(DwtEvent.CONTROL,this.__controlEvent);
}else{
Dwt.setLocation(this.getHtmlElement(),x,y);
}
return this;
};
DwtControl.prototype.getScrollStyle=function(){
if(!this._checkState()){
return;
}
return Dwt.getScrollStyle(this.getHtmlElement());
};
DwtControl.prototype.setScrollStyle=function(_833){
if(!this._checkState()){
return;
}
Dwt.setScrollStyle(this.getHtmlElement(),_833);
};
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(_834,_835){
if(!this._checkState()){
return;
}
if(this.isListenerRegistered(DwtEvent.CONTROL)){
var _836=this.getHtmlElement();
this.__controlEvent.reset();
var sz=Dwt.getSize(_836);
this.__controlEvent.oldWidth=sz.x;
this.__controlEvent.oldHeight=sz.y;
Dwt.setSize(_836,_834,_835);
sz=Dwt.getSize(_836);
this.__controlEvent.newWidth=sz.x;
this.__controlEvent.newHeight=sz.y;
this.notifyListeners(DwtEvent.CONTROL,this.__controlEvent);
}else{
Dwt.setSize(this.getHtmlElement(),_834,_835);
}
return this;
};
DwtControl.prototype.getToolTipContent=function(){
if(this._disposed){
return;
}
return this.__toolTipContent;
};
DwtControl.prototype.setToolTipContent=function(text){
if(this._disposed){
return;
}
this.__toolTipContent=text;
};
DwtControl.prototype.getVisible=function(){
if(!this._checkState()){
return;
}
return Dwt.getVisible(this.getHtmlElement());
};
DwtControl.prototype.setVisible=function(_839){
if(!this._checkState()){
return;
}
Dwt.setVisible(this.getHtmlElement(),_839);
};
DwtControl.prototype.setVisibility=function(_83a){
if(!this._checkState()){
return;
}
Dwt.setVisibility(this.getHtmlElement(),_83a);
};
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(idx){
if(!this._checkState()){
return;
}
Dwt.setZIndex(this.getHtmlElement(),idx);
};
DwtControl.prototype.zShow=function(show){
this.setZIndex(show?Dwt.Z_VIEW:Dwt.Z_HIDDEN);
};
DwtControl.prototype.setDisplay=function(_83d){
if(!this._checkState()){
return;
}
Dwt.setDisplay(this.getHtmlElement(),_83d);
};
DwtControl.prototype.preventSelection=function(_83e){
return !this.__isInputEl(_83e);
};
DwtControl.prototype.preventContextMenu=function(_83f){
return _83f?(!this.__isInputEl(_83f)):true;
};
DwtControl.prototype.setContent=function(_840){
if(_840){
this.getHtmlElement().innerHTML=_840;
}
};
DwtControl.prototype.clearContent=function(){
this.getHtmlElement().innerHTML="";
};
DwtControl.prototype.appendElement=function(_841){
var el=AjxUtil.isString(_841)?document.getElementById(_841):_841;
if(el){
el.appendChild(this.getHtmlElement(),el);
}
};
DwtControl.prototype.replaceElement=function(_843,_844,_845){
var oel=AjxUtil.isString(_843)?document.getElementById(_843):_843;
if(oel){
var nel=this.getHtmlElement();
oel.parentNode.replaceChild(nel,oel);
this._replaceElementHook(oel,nel,_844,_845);
}
};
DwtControl.prototype._replaceElementHook=function(oel,nel,_84a,_84b){
if((_84a==null||_84a)&&oel.className){
Dwt.addClass(nel,oel.className);
}
if(_84b==null||_84b){
var _84c=oel.getAttribute("style");
if(_84c){
nel.setAttribute("style",[nel.getAttribute("style"),_84c].join(";"));
}
}
};
DwtControl.prototype.applyCaretHack=function(){
if(Dwt.CARET_HACK_ENABLED){
var _84d=this.shell.getHtmlElement();
var _84e=this.getHtmlElement();
var _84f=_84e;
while(_84f.parentNode&&(_84f.parentNode!=_84d)){
_84f=_84f.parentNode;
}
if(_84f){
var _850=_84f.nextSibling;
_84d.removeChild(_84f);
_84d.insertBefore(_84f,_850);
}
}
};
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._getDnDIcon=function(_851){
return null;
};
DwtControl.prototype._setDnDIconState=function(_852){
this._dndIcon.className=(_852)?"DropAllowed":"DropNotAllowed";
};
DwtControl.__junkIconId=0;
DwtControl.prototype._destroyDnDIcon=function(icon){
if(icon!=null){
if(icon.parentNode){
icon.parentNode.removeChild(icon);
}else{
icon.style.zIndex=-100;
icon.id="DwtJunkIcon"+DwtControl.__junkIconId++;
icon=void 0;
}
}
};
DwtControl.prototype._isValidDragObject=function(ev){
return true;
};
DwtControl.prototype._dragEnter=function(ev){
};
DwtControl.prototype._dragOver=function(ev){
};
DwtControl.prototype._dragHover=function(ev){
};
DwtControl.prototype._dragLeave=function(ev){
};
DwtControl.prototype._drop=function(ev){
};
DwtControl.prototype._setKeyPressEventHdlr=function(_85a){
this._setEventHdlrs([DwtEvent.ONKEYPRESS],_85a);
};
DwtControl.prototype._setMouseEventHdlrs=function(_85b){
this._setEventHdlrs(DwtEvent.MOUSE_EVENTS,_85b);
};
DwtControl.prototype._setEventHdlrs=function(_85c,_85d){
if(!this._checkState()){
return;
}
var _85e=this.getHtmlElement();
for(var i=0;i<_85c.length;i++){
if(_85d!==true){
Dwt.setHandler(_85e,_85c[i],DwtControl.__HANDLER[_85c[i]]);
}else{
Dwt.clearHandler(_85e,_85c[i]);
}
}
};
DwtControl.prototype._getStopPropagationValForMouseEv=function(ev){
return true;
};
DwtControl.prototype._getEventReturnValForMouseEv=function(ev){
return false;
};
DwtControl.prototype._checkState=function(){
if(this._disposed){
return false;
}
if(!this.__ctrlInited){
this.__initCtrl();
}
return true;
};
DwtControl.__keyPressHdlr=function(ev){
var obj=obj?obj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj.__toolTipContent!=null){
var _864=DwtShell.getShell(window);
var _865=_864.getHoverMgr();
_865.setHoverOutListener(obj._hoverOutListener);
_865.hoverOut();
obj.__tooltipClosed=false;
}
};
DwtControl.prototype.__doBlur=function(){
this._hasFocus=false;
if(this.isListenerRegistered(DwtEvent.ONBLUR)){
var ev=DwtShell.focusEvent;
ev.dwtObj=this;
ev.state=DwtFocusEvent.BLUR;
obj.notifyListeners(DwtEvent.ONBLUR,mouseEv);
}
this._blur();
};
DwtControl.prototype.__doFocus=function(){
this._hasFocus=true;
if(this.isListenerRegistered(DwtEvent.ONFOCUS)){
var ev=DwtShell.focusEvent;
ev.dwtObj=this;
ev.state=DwtFocusEvent.FOCUS;
obj.notifyListeners(DwtEvent.ONFOCUS,mouseEv);
}
this._focus();
};
DwtControl.__dblClickHdlr=function(ev){
return DwtControl.__mouseEvent(ev,DwtEvent.ONDBLCLICK);
};
DwtControl.__mouseOverHdlr=function(ev){
var _86a=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
if(_86a!=null){
ev=DwtUiEvent.getEvent(ev);
ev._stopPropagation=true;
return false;
}
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
var _86c=DwtShell.mouseEvent;
if(obj._dragging==DwtControl._NO_DRAG){
_86c.setFromDhtmlEvent(ev);
if(obj.isListenerRegistered(DwtEvent.ONMOUSEOVER)){
obj.notifyListeners(DwtEvent.ONMOUSEOVER,_86c);
}
if(obj.__toolTipContent!=null){
var _86d=DwtShell.getShell(window);
var _86e=_86d.getHoverMgr();
if((_86e.getHoverObject()!=this||!_86e.isHovering())&&!DwtMenu.menuShowing()){
_86e.reset();
_86e.setHoverObject(this);
_86e.setHoverOverData(obj);
_86e.setHoverOverDelay(DwtToolTip.TOOLTIP_DELAY);
_86e.setHoverOverListener(obj._hoverOverListener);
_86e.hoverOver(_86c.docX,_86c.docY);
}
}
}
_86c._stopPropagation=true;
_86c._returnValue=false;
_86c.setToDhtmlEvent(ev);
return false;
};
DwtControl.__mouseDownHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
obj._focusByMouseDownEvent();
if(obj.__toolTipContent!=null){
var _871=DwtShell.getShell(window);
var _872=_871.getHoverMgr();
_872.setHoverOutListener(obj._hoverOutListener);
_872.hoverOut();
}
var _873=DwtShell.mouseEvent;
_873.setFromDhtmlEvent(ev);
if(obj._dragSource!=null&&_873.button==DwtMouseEvent.LEFT&&obj._isValidDragObject(_873)){
try{
obj._ctrlCaptureObj.capture();
}
catch(ex){
}
obj._dragOp=(_873.ctrlKey)?Dwt.DND_DROP_COPY:Dwt.DND_DROP_MOVE;
obj.__dragStartX=_873.docX;
obj.__dragStartY=_873.docY;
}
return DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEDOWN,obj,_873);
};
DwtControl.__mouseMoveHdlr=function(ev){
var _875=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
var obj=(_875)?_875.targetObj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj.__dndHoverActionId!=-1){
AjxTimedAction.cancelAction(obj.__dndHoverActionId);
obj.__dndHoverActionId=-1;
}
var _877=DwtShell.mouseEvent;
_877.setFromDhtmlEvent(ev);
if(_877.docX<0||_877.docY<0){
_877._stopPropagation=true;
_877._returnValue=false;
_877.setToDhtmlEvent(ev);
return false;
}
if(obj._dragSource==null||_875==null||(obj!=null&&obj._dragging==DwtControl._NO_DRAG&&Math.abs(obj.__dragStartX-_877.docX)<DwtControl.__DRAG_THRESHOLD&&Math.abs(obj.__dragStartY-_877.docY)<DwtControl.__DRAG_THRESHOLD)){
if(obj.__toolTipContent!=null){
var _878=DwtShell.getShell(window);
var _879=_878.getHoverMgr();
if(!_879.isHovering()&&!obj.__tooltipClosed&&!DwtMenu.menuShowing()){
_879.hoverOver(_877.docX,_877.docY);
}else{
var _87a=obj.__lastTooltipX?Math.abs(_877.docX-obj.__lastTooltipX):null;
var _87b=obj.__lastTooltipY?Math.abs(_877.docY-obj.__lastTooltipY):null;
if((_87a!=null&&_87a>DwtControl.__TOOLTIP_THRESHOLD)||(_87b!=null&&_87b>DwtControl.__TOOLTIP_THRESHOLD)){
_879.setHoverOutListener(obj._hoverOutListener);
_879.hoverOut();
obj.__tooltipClosed=true;
}
}
}
return DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEMOVE,obj,_877);
}else{
if(obj._dragging==DwtControl._NO_DRAG){
obj._dragOp=obj._dragSource._beginDrag(obj._dragOp,obj);
if(obj._dragOp!=Dwt.DND_DROP_NONE){
obj._dragging=DwtControl._DRAGGING;
obj._dndIcon=obj._getDnDIcon(obj._dragOp);
if(obj._dndIcon==null){
obj._dragging=DwtControl._DRAG_REJECTED;
}
}else{
obj._dragging=DwtControl._DRAG_REJECTED;
}
}
if(obj._dragging!=DwtControl._DRAG_REJECTED){
var _87c=_877.dwtObj;
if(_87c){
obj._dndHoverAction.args=[_87c];
obj.__dndHoverActionId=AjxTimedAction.scheduleAction(obj._dndHoverAction,DwtControl.__DND_HOVER_DELAY);
}
if(_87c&&_87c._dropTarget&&_87c!=obj){
if(_87c!=obj.__lastDestDwtObj||_87c._dropTarget.hasMultipleTargets()){
if(_87c._dropTarget._dragEnter(obj._dragOp,_87c,obj._dragSource._getData(),_877,obj._dndIcon)){
obj._setDnDIconState(true);
obj.__dropAllowed=true;
_87c._dragEnter(_877);
}else{
obj._setDnDIconState(false);
obj.__dropAllowed=false;
}
}else{
if(obj.__dropAllowed){
_87c._dragOver(_877);
}
}
}else{
obj._setDnDIconState(false);
}
if(obj.__lastDestDwtObj&&obj.__lastDestDwtObj!=_87c&&obj.__lastDestDwtObj._dropTarget&&obj.__lastDestDwtObj!=obj){
obj.__lastDestDwtObj._dragLeave(_877);
obj.__lastDestDwtObj._dropTarget._dragLeave();
}
obj.__lastDestDwtObj=_87c;
Dwt.setLocation(obj._dndIcon,_877.docX+2,_877.docY+2);
}else{
DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEMOVE,obj,_877);
}
_877._stopPropagation=true;
_877._returnValue=false;
_877.setToDhtmlEvent(ev);
return false;
}
};
DwtControl.__mouseUpHdlr=function(ev){
var _87e=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
var obj=(_87e)?_87e.targetObj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj.__dndHoverActionId!=-1){
AjxTimedAction.cancelAction(obj.__dndHoverActionId);
obj.__dndHoverActionId=-1;
}
if(!obj._dragSource||!_87e){
return DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEUP,obj);
}else{
_87e.release();
var _880=DwtShell.mouseEvent;
_880.setFromDhtmlEvent(ev);
if(obj._dragging!=DwtControl._DRAGGING){
obj._dragging=DwtControl._NO_DRAG;
return DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEUP,obj,_880);
}else{
obj.__lastDestDwtObj=null;
var _881=_880.dwtObj;
if(_881!=null&&_881._dropTarget!=null&&obj.__dropAllowed&&_881!=obj){
_881._drop(_880);
_881._dropTarget._drop(obj._dragSource._getData(),_880);
obj._dragSource._endDrag();
obj._destroyDnDIcon(obj._dndIcon);
obj._dragging=DwtControl._NO_DRAG;
}else{
obj.__dragEndX=_880.docX;
obj.__dragEndY=_880.docY;
if(obj.__badDropAction==null){
obj.__badDropAction=new AjxTimedAction(obj,obj.__badDropEffect);
}
var m=(obj.__dragEndY-obj.__dragStartY)/(obj.__dragEndX-obj.__dragStartX);
obj.__badDropAction.args=[m,obj.__dragStartY-(m*obj.__dragStartX),(obj.__dragStartX-obj.__dragEndX<0)?-1:1];
AjxTimedAction.scheduleAction(obj.__badDropAction,0);
}
_880._stopPropagation=true;
_880._returnValue=false;
_880.setToDhtmlEvent(ev);
return false;
}
}
};
DwtControl.__mouseOutHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj.__toolTipContent!=null){
var _885=DwtShell.getShell(window);
var _886=_885.getHoverMgr();
_886.setHoverOutListener(obj._hoverOutListener);
_886.hoverOut();
obj.__tooltipClosed=false;
}
return DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEOUT,obj);
};
DwtControl.__mouseWheelHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
return DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEWHEEL,obj);
};
DwtControl.__selectStartHdlr=function(ev){
return DwtControl.__mouseEvent(ev,DwtEvent.ONSELECTSTART);
};
DwtControl.__contextMenuHdlr=function(ev){
if(AjxEnv.isSafari){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _88c=obj?obj.preventContextMenu():true;
if(_88c){
DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEDOWN);
DwtControl.__mouseEvent(ev,DwtEvent.ONMOUSEUP);
return;
}
}
return DwtControl.__mouseEvent(ev,DwtEvent.ONCONTEXTMENU);
};
DwtControl.__mouseEvent=function(ev,_88e,obj,_890){
var obj=obj?obj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(!_890){
_890=DwtShell.mouseEvent;
_890.setFromDhtmlEvent(ev);
}
var tn=_890.target.tagName.toLowerCase();
if(tn!="input"&&tn!="textarea"){
_890._stopPropagation=obj._getStopPropagationValForMouseEv(_890);
_890._returnValue=obj._getEventReturnValForMouseEv(_890);
}else{
_890._stopPropagation=false;
_890._returnValue=true;
}
DwtEventManager.notifyListeners(_88e,_890);
if(obj.isListenerRegistered&&obj.isListenerRegistered(_88e)){
obj.notifyListeners(_88e,_890);
}
_890.setToDhtmlEvent(ev);
return _890._returnValue;
};
DwtControl.__HANDLER=new Object();
DwtControl.__HANDLER[DwtEvent.ONCONTEXTMENU]=DwtControl.__contextMenuHdlr;
DwtControl.__HANDLER[DwtEvent.ONDBLCLICK]=DwtControl.__dblClickHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEDOWN]=DwtControl.__mouseDownHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSEENTER]=DwtControl.__mouseOverHdlr;
DwtControl.__HANDLER[DwtEvent.ONMOUSELEAVE]=DwtControl.__mouseOutHdlr;
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 _892=document.createElement("div");
this._htmlElId=_892.id=(this._htmlElId==null)?Dwt.getNextId():this._htmlElId;
DwtComposite._pendingElements[this._htmlElId]=_892;
Dwt.associateElementWithObject(_892,this);
if(this.__posStyle==null||this.__posStyle==DwtControl.STATIC_STYLE){
_892.style.position=DwtControl.STATIC_STYLE;
}else{
_892.style.position=this.__posStyle;
}
_892.className=this._className;
_892.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(_893){
_893._dragHover();
};
DwtControl.prototype.__badDropEffect=function(m,c,d){
var _897=(Math.abs(m)<=1);
var _898=_897?this.__dragStartX-this.__dragEndX:this.__dragStartY-this.__dragEndY;
if(_898*d>0){
if(_897){
this.__dragEndX+=(30*d);
this._dndIcon.style.top=m*this.__dragEndX+c;
this._dndIcon.style.left=this.__dragEndX;
}else{
this.__dragEndY+=(30*d);
this._dndIcon.style.top=this.__dragEndY;
this._dndIcon.style.left=(this.__dragEndY-c)/m;
}
AjxTimedAction.scheduleAction(this.__badDropAction,0);
}else{
this._destroyDnDIcon(this._dndIcon);
this._dragging=DwtControl._NO_DRAG;
}
};
DwtControl.prototype.__handleHoverOver=function(_899){
if(this._eventMgr.isListenerRegistered(DwtEvent.HOVEROVER)){
this._eventMgr.notifyListeners(DwtEvent.HOVEROVER,_899);
}
if(this.__toolTipContent!=null){
var _89a=DwtShell.getShell(window);
var _89b=_89a.getToolTip();
_89b.setContent(this.__toolTipContent);
_89b.popup(_899.x,_899.y);
this.__lastTooltipX=_899.x;
this.__lastTooltipY=_899.y;
this.__tooltipClosed=false;
}
};
DwtControl.prototype.__handleHoverOut=function(_89c){
if(this._eventMgr.isListenerRegistered(DwtEvent.HOVEROUT)){
this._eventMgr.notifyListeners(DwtEvent.HOVEROUT,_89c);
}
var _89d=DwtShell.getShell(window);
var _89e=_89d.getToolTip();
_89e.popdown();
this.__lastTooltipX=null;
this.__lastTooltipY=null;
};
DwtControl.prototype.__isInputEl=function(_89f){
var _8a0=false;
if(!_89f||!_89f.tagName){
return _8a0;
}
var _8a1=_89f.tagName.toLowerCase();
var type=_8a1=="input"?_89f.type.toLowerCase():null;
if(_8a1=="textarea"||(type&&(type=="text"||type=="password"))){
_8a0=true;
}
return _8a0;
};
function DwtComposite(_8a3,_8a4,_8a5,_8a6,id,_8a8){
if(arguments.length==0){
return;
}
_8a4=_8a4||"DwtComposite";
DwtControl.call(this,_8a3,_8a4,_8a5,_8a6,id,_8a8);
this._children=new AjxVector();
}
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 _8a9=this._children.getArray();
while(_8a9.length>0){
_8a9[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(_8ab,_8ac){
this._children.add(_8ab,_8ac);
var _8ad=_8ab._removedEl?_8ab._removedEl:_8ab.getHtmlElement();
if(this instanceof DwtShell&&this.isVirtual()){
document.body.appendChild(_8ad);
}else{
var _8ae=this.getHtmlElement();
if(_8ac&&(_8ac<_8ae.childNodes.length)){
_8ae.insertBefore(_8ad,_8ae.childNodes[_8ac]);
}else{
_8ae.appendChild(_8ad);
}
}
if(_8ab._removedEl){
_8ab._removedEl=null;
}
};
DwtComposite.prototype.removeChild=function(_8af,_8b0){
if(_8af.isInitialized()){
this._children.remove(_8af);
var _8b1=_8af.getHtmlElement();
if(_8b1&&_8b1.parentNode){
var el=_8b1.parentNode.removeChild(_8b1);
if(_8b0){
_8af._removedEl=el;
}
}
}
};
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(_8b3){
return this._allowSelection?false:DwtControl.prototype.preventSelection.call(this,_8b3);
};
DwtComposite.prototype.preventContextMenu=function(_8b4){
if(!this._allowSelection){
return DwtControl.prototype.preventContextMenu.apply(this,arguments);
}
if(AjxEnv.isSafari){
return true;
}else{
var _8b5=_8b4.id.indexOf("OBJ_")==0;
var _8b6=false;
if(document.selection){
_8b6=document.selection.type=="Text";
}else{
if(getSelection()){
_8b6=getSelection().toString().length>0;
}
}
return _8b6&&!_8b5?false:true;
}
};
DwtComposite.prototype._focusByMouseUpEvent=function(){
if(!this._allowSelection){
DwtControl.prototype._focusByMouseUpEvent.apply(this,arguments);
}
};
DwtComposite.prototype._mouseDownListener=function(ev){
if(ev.button==DwtMouseEvent.LEFT){
ev._stopPropagation=false;
ev._returnValue=true;
}
};
DwtComposite.prototype._contextMenuListener=function(ev){
ev._stopPropagation=false;
ev._returnValue=true;
};
function DwtShell(_8b9,_8ba,_8bb,_8bc,_8bd){
if(window._dwtShell!=null){
throw new DwtException("DwtShell already exists for window",DwtException.INVALID_OP,"DwtShell");
}
_8b9=_8b9||"DwtShell";
DwtComposite.call(this,null,_8b9);
this.__ctrlInited=true;
window._dwtShell=AjxCore.assignId(this);
if((_8bb!=null)&&(document.domain!="localhost")){
window.onbeforeunload=_8bb;
}
document.body.style.margin=0;
if(_8ba!=null&&!_8ba){
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 _8be=document.createElement("div");
this._htmlElId=_8be.id=Dwt.getNextId();
_8be.className=_8b9;
_8be.style.width=_8be.style.height="100%";
if(_8be.style.overflow){
_8be.style.overflow=null;
}
try{
if(_8bc){
document.body.removeChild(_8bc);
}
}
catch(ex){
}
document.body.appendChild(_8be);
if(_8bc){
var _8bf=new DwtControl(this,null,Dwt.ABSOLUTE_STYLE);
_8bf.getHtmlElement().appendChild(_8bc);
_8bf.setSize("100%","100%");
_8bf.zShow(true);
}
Dwt.associateElementWithObject(_8be,this);
this.shell=this;
this._createBusyOverlay(_8be);
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>";
_8be.appendChild(this._veilOverlay);
if(_8bd){
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>";
_8be.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();
}
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(win){
return AjxCore.objectWithId(win._dwtShell);
};
DwtShell.prototype.getKeyboardMgr=function(){
return this._keyboardMgr;
};
DwtShell.prototype.setBusy=function(busy,id,_8c3,_8c4,_8c5){
if(busy){
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=true;
if(this._keyboardMgr.isEnabled()){
this._keyboardMgr.enable(false);
this._kbnavDisabled=true;
}
}else{
if(this._setBusy&&(this._setBusyCount<=0)){
Dwt.setCursor(this._busyOverlay,"default");
Dwt.setVisible(this._busyOverlay,false);
this._setBusy=false;
if(this._kbnavDisabled){
this._keyboardMgr.enable(true);
this._kbnavDisabled=false;
}
}
}
if(busy&&_8c3){
if(_8c4&&_8c4>0){
this._busyActionId[id]=AjxTimedAction.scheduleAction(this._busyTimedAction,_8c4);
}else{
this._showBusyDialogAction(id);
}
if(_8c5){
this._cancelBusyCallback=_8c5;
this._busyDialog.setButtonEnabled(DwtShell.CANCEL_BUTTON,true);
}else{
this._busyDialog.setButtonEnabled(DwtShell.CANCEL_BUTTON,false);
}
}else{
if(this._busyActionId[id]&&(this._busyActionId[id]!=-1)){
AjxTimedAction.cancelAction(this._busyActionId[id]);
this._busyActionId[id]=-1;
}
if(this._busyDialog.isPoppedUp){
this._busyDialog.popdown();
}
}
};
DwtShell.prototype.getBusy=function(){
return this._setBusy;
};
DwtShell.prototype.setBusyDialogText=function(text){
this._busyDialogTxt.innerHTML=(text)?text:"";
};
DwtShell.prototype.setBusyDialogTitle=function(_8c7){
this._busyDialog.setTitle((_8c7)?_8c7:AjxMsg.workInProgress);
};
DwtShell.prototype.getHoverMgr=function(){
return this._hoverMgr;
};
DwtShell.prototype.getToolTip=function(){
return this._toolTip;
};
DwtShell.prototype.getH=function(_8c8){
return (!this._virtual)?Dwt.getSize(this.getHtmlElement(),_8c8).y:Dwt.getSize(document.body,_8c8).y;
};
DwtShell.prototype.getW=function(_8c9){
return (!this._virtual)?Dwt.getSize(this.getHtmlElement(),_8c9).x:Dwt.getSize(document.body,_8c9).x;
};
DwtShell.prototype.getSize=function(_8ca){
return (!this._virtual)?Dwt.getSize(this.getHtmlElement(),_8ca):Dwt.getSize(document.body,_8ca);
};
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(_8cb){
return (!this._virtual)?Dwt.getBounds(this.getHtmlElement(),_8cb):Dwt.getBounds(document.body,_8cb);
};
DwtShell.prototype.setVirtual=function(){
this._virtual=true;
this.setVisible(false);
};
DwtShell.prototype.isVirtual=function(){
return this._virtual;
};
DwtShell.prototype._showBusyDialogAction=function(id){
this._busyDialog.popup();
this._busyActionId[id]=-1;
};
DwtShell.prototype._createBusyOverlay=function(_8cd){
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>";
_8cd.appendChild(this._busyOverlay);
Dwt.setVisible(this._busyOverlay,false);
var _8ce=new DwtDialog_ButtonDescriptor(DwtShell.CANCEL_BUTTON,AjxMsg.cancelRequest,DwtDialog.ALIGN_CENTER);
this._busyDialog=new DwtDialog(this,"DwtShellbusyDialog",AjxMsg.workInProgress,DwtDialog.NO_BUTTONS,[_8ce],Dwt.BUSY+10);
this._busyDialog.registerCallback(DwtShell.CANCEL_BUTTON,this._busyCancelButtonListener,this);
var _8cf=Dwt.getNextId();
var html=["<table class='DialogContent'><tr>","<td><div class='WaitIcon'></div></td><td class='MsgText' id='",_8cf,"'>&nbsp;</td>","</tr></table>"].join("");
this._busyDialog.setContent(html);
this._busyDialogTxt=document.getElementById(_8cf);
this._busyTimedAction=new AjxTimedAction(this,this._showBusyDialogAction);
this._busyActionId={};
this._setBusyCount=0;
this._setBusy=false;
};
DwtShell.prototype._busyCancelButtonListener=function(ev){
this._cancelBusyCallback.run();
this._busyDialog.popdown();
};
DwtShell._preventDefaultSelectPrt=function(ev){
var evt=AjxCore.objectWithId(window._dwtShell)._uiEvent;
evt.setFromDhtmlEvent(ev);
if(evt.dwtObj&&evt.dwtObj instanceof DwtControl&&!evt.dwtObj.preventSelection(evt.target)){
evt._stopPropagation=false;
evt._returnValue=true;
}else{
evt._stopPropagation=true;
evt._returnValue=false;
}
evt.setToDhtmlEvent(ev);
return !evt._stopPropagation;
};
DwtShell._preventDefaultPrt=function(ev){
ev=DwtUiEvent.getEvent(ev);
var _8d5=ev.target?ev.target:ev.srcElement;
var evt=AjxCore.objectWithId(window._dwtShell)._uiEvent;
evt.setFromDhtmlEvent(ev);
evt._stopPropagation=true;
evt._returnValue=false;
if(evt.dwtObj&&evt.dwtObj instanceof DwtControl&&!evt.dwtObj.preventContextMenu(evt.target)){
evt._stopPropagation=false;
evt._returnValue=true;
}else{
if(_8d5!=null&&typeof (_8d5)=="object"){
if((_8d5.tagName=="A"||_8d5.tagName=="a")&&_8d5.href){
evt._stopPropagation=false;
evt._returnValue=true;
}
}
}
evt.setToDhtmlEvent(ev);
return evt._returnValue;
};
DwtShell._resizeHdlr=function(ev){
var _8d8=AjxCore.objectWithId(window._dwtShell);
if(_8d8.isListenerRegistered(DwtEvent.CONTROL)){
var evt=DwtShell.controlEvent;
evt.reset();
evt.oldWidth=_8d8._currWinSize.x;
evt.oldHeight=_8d8._currWinSize.y;
_8d8._currWinSize=Dwt.getWindowSize();
evt.newWidth=_8d8._currWinSize.x;
evt.newHeight=_8d8._currWinSize.y;
_8d8.notifyListeners(DwtEvent.CONTROL,evt);
}else{
_8d8._currWinSize=Dwt.getWindowSize();
}
};
DwtShell.__onBodyScroll=function(){
document.body.scrollTop=0;
document.body.scrollLeft=0;
};
function DwtColorPicker(_8da,_8db,_8dc,_8dd){
if(arguments.length==0){
return;
}
_8db=_8db||"DwtColorPicker";
DwtControl.call(this,_8da,_8db,_8dc);
this._noFillLabel=_8dd;
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.prototype.toString=function(){
return "DwtColorPicker";
};
DwtColorPicker.prototype.addSelectionListener=function(_8de){
this.addListener(DwtEvent.SELECTION,_8de);
};
DwtColorPicker.prototype.removeSelectionListener=function(_8df){
this.removeListener(DwtEvent.SELECTION,_8df);
};
DwtColorPicker.prototype.dispose=function(){
if(this._disposed){
return;
}
Dwt.disassociateElementFromObject(this.getHtmlElement().firstChild,this);
DwtControl.prototype.dispose.call(this);
};
DwtColorPicker.prototype._registerEventHdlrs=function(){
var _8e0=this.getHtmlElement().firstChild;
Dwt.associateElementWithObject(_8e0,this);
var rows=_8e0.rows;
var _8e2=rows.length;
for(var i=0;i<_8e2;i++){
var _8e4=rows[i].cells;
var _8e5=_8e4.length;
for(var j=0;j<_8e5;j++){
var cell=_8e4[j];
Dwt.setHandler(cell,DwtEvent.ONMOUSEDOWN,DwtColorPicker._mouseDownHdlr);
Dwt.setHandler(cell,DwtEvent.ONMOUSEUP,DwtColorPicker._mouseUpHdlr);
if(AjxEnv.isIE){
Dwt.setHandler(cell,DwtEvent.ONMOUSEOVER,DwtColorPicker._mouseOverHdlr);
Dwt.setHandler(cell,DwtEvent.ONMOUSEOUT,DwtColorPicker._mouseOutHdlr);
}else{
Dwt.setHandler(cell,DwtEvent.ONMOUSEENTER,DwtColorPicker._mouseOverHdlr);
Dwt.setHandler(cell,DwtEvent.ONMOUSELEAVE,DwtColorPicker._mouseOutHdlr);
}
if(cell.className!="NoFill"){
cell.style.border="2px outset "+cell.style.backgroundColor;
}
}
}
};
DwtColorPicker.prototype._createColorTable=function(){
this._tdId=Dwt.getNextId();
var html=new Array(150);
var i=0;
html[i++]="<table cellpadding='0' cellspacing='0' border='0' align='center'>";
if(this._noFillLabel){
html[i++]="<tr><td colspan='10' class='NoFill'>"+this._noFillLabel+"</td></tr>";
}
html[i++]="<tr>";
html[i++]="<td id='"+this._tdId+"#FFFFFF' style='background-color:#FFFFFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFCCCC' style='background-color:#FFCCCC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFCC99' style='background-color:#FFCC99' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFFF99' style='background-color:#FFFF99' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFFFCC' style='background-color:#FFFFCC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#99FF99' style='background-color:#99FF99' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#99FFFF' style='background-color:#99FFFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#CCFFFF' style='background-color:#CCFFFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#CCCCFF' style='background-color:#CCCCFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFCCFF' style='background-color:#FFCCFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="</tr><tr>";
html[i++]="<td id='"+this._tdId+"#CCCCCC' style='background-color:#CCCCCC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FF6666' style='background-color:#FF6666' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FF9966' style='background-color:#FF9966' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFFF66' style='background-color:#FFFF66' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFFF33' style='background-color:#FFFF33' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#66FF99' style='background-color:#66FF99' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#33FFFF' style='background-color:#33FFFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#66FFFF' style='background-color:#66FFFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#9999FF' style='background-color:#9999FF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FF99FF' style='background-color:#FF99FF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="</tr><tr>";
html[i++]="<td id='"+this._tdId+"#C0C0C0' style='background-color:#C0C0C0' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FF0000' style='background-color:#FF0000' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FF9900' style='background-color:#FF9900' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFCC66' style='background-color:#FFCC66' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFFF00' style='background-color:#FFFF00' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#33FF33' style='background-color:#33FF33' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#66CCCC' style='background-color:#66CCCC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#33CCFF' style='background-color:#33CCFF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#6666CC' style='background-color:#6666CC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#CC66CC' style='background-color:#CC66CC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="</tr><tr>";
html[i++]="<td id='"+this._tdId+"#999999' style='background-color:#999999' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#CC0000' style='background-color:#CC0000' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FF6600' style='background-color:#FF6600' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFCC33' style='background-color:#FFCC33' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#FFCC00' style='background-color:#FFCC00' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#33CC00' style='background-color:#33CC00' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#00CCCC' style='background-color:#00CCCC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#3366FF' style='background-color:#3366FF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#6633FF' style='background-color:#6633FF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#CC33CC' style='background-color:#CC33CC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="</tr><tr>";
html[i++]="<td id='"+this._tdId+"#666666' style='background-color:#666666' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#990000' style='background-color:#990000' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#CC6600' style='background-color:#CC6600' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#CC9933' style='background-color:#CC9933' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#999900' style='background-color:#999900' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#009900' style='background-color:#009900' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#339999' style='background-color:#339999' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#3333FF' style='background-color:#3333FF' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#6600CC' style='background-color:#6600CC' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#993399' style='background-color:#993399' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="</tr><tr>";
html[i++]="<td id='"+this._tdId+"#333333' style='background-color:#333333' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#660000' style='background-color:#660000' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#993300' style='background-color:#993300' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#996633' style='background-color:#996633' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#666600' style='background-color:#666600' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#006600' style='background-color:#006600' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#336666' style='background-color:#336666' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#000099' style='background-color:#000099' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#333399' style='background-color:#333399' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#663366' style='background-color:#663366' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="</tr><tr>";
html[i++]="<td id='"+this._tdId+"#000000' style='background-color:#000000' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#330000' style='background-color:#330000' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#663300' style='background-color:#663300' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#663333' style='background-color:#663333' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#333300' style='background-color:#333300' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#003300' style='background-color:#003300' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#003333' style='background-color:#003333' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#000066' style='background-color:#000066' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#330099' style='background-color:#330099' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="<td id='"+this._tdId+"#330033' style='background-color:#330033' width='12' height='14'><img height='1' width='1'/></td>";
html[i++]="</tr></table>";
this.getHtmlElement().innerHTML=html.join("");
};
DwtColorPicker._mouseOverHdlr=function(ev){
var _8eb=DwtShell.mouseEvent;
_8eb.setFromDhtmlEvent(ev);
var _8ec=_8eb.target;
if(_8ec.nodeName.toLowerCase()=="img"){
_8ec=_8ec.parentNode;
}
if(_8eb.dwtObj._downTdId==_8ec.id){
var tmp=_8ec.style.backgroundColor;
_8ec.style.backgroundColor=_8eb.dwtObj._swappedColor;
_8eb.dwtObj._swappedColor=tmp;
_8ec.style.borderStyle="inset";
_8ec.style.borderColor=tmp;
}
this._stopPropagation=true;
this._returnValue=false;
_8eb.setToDhtmlEvent(ev);
return false;
};
DwtColorPicker._mouseOutHdlr=function(ev){
var _8ef=DwtShell.mouseEvent;
_8ef.setFromDhtmlEvent(ev);
var _8f0=_8ef.target;
if(_8f0.nodeName.toLowerCase()=="img"){
_8f0=_8f0.parentNode;
}
if(_8ef.dwtObj._downTdId==_8f0.id){
var tmp=_8f0.style.backgroundColor;
_8f0.style.backgroundColor=_8ef.dwtObj._swappedColor;
_8ef.dwtObj._swappedColor=tmp;
_8f0.style.borderStyle="outset";
_8f0.style.borderColor=tmp;
_8ef.dwtObj._downTdId=null;
}
this._stopPropagation=true;
this._returnValue=false;
_8ef.setToDhtmlEvent(ev);
return false;
};
DwtColorPicker._mouseDownHdlr=function(ev){
var _8f3=DwtShell.mouseEvent;
_8f3.setFromDhtmlEvent(ev);
var _8f4=_8f3.target;
if(_8f4.nodeName.toLowerCase()=="img"){
_8f4=_8f4.parentNode;
}
var _8f5=_8f3.target.style.backgroundColor;
var rgb;
var r,g,b;
_8f3.dwtObj._downTdId=_8f4.id;
_8f3.dwtObj._swappedColor=_8f5;
_8f4.style.borderStyle="inset";
if(_8f4.className!="NoFill"){
if(_8f5.substr(0,1)=="#"){
rgb=_8f5.match(DwtColorPicker._HEX_RE);
rgb[1]=DwtColorPicker._hexConv(rgb[1]);
rgb[2]=DwtColorPicker._hexConv(rgb[2]);
rgb[3]=DwtColorPicker._hexConv(rgb[3]);
}else{
rgb=_8f5.match(DwtColorPicker._RGB_RE);
}
r=Math.max(Math.floor(rgb[1]-(rgb[1]*0.25)),0);
g=Math.max(Math.floor(rgb[2]-(rgb[2]*0.25)),0);
b=Math.max(Math.floor(rgb[3]-(rgb[3]*0.25)),0);
_8f5="rgb("+r+","+g+","+b+")";
_8f4.style.backgroundColor=_8f5;
}
_8f3._stopPropagation=true;
_8f3._returnValue=false;
_8f3.setToDhtmlEvent(ev);
return false;
};
DwtColorPicker._hexConv=function(_8f8){
if(_8f8=="00"){
return 0;
}else{
if(_8f8=="33"){
return 51;
}else{
if(_8f8=="66"){
return 102;
}else{
if(_8f8=="99"){
return 153;
}else{
if(_8f8.toUpperCase()=="CC"){
return 204;
}else{
if(_8f8.toUpperCase()=="FF"){
return 255;
}else{
if(_8f8.toUpperCase()=="C0"){
return 192;
}
}
}
}
}
}
}
};
DwtColorPicker._mouseUpHdlr=function(ev){
var _8fa=DwtShell.mouseEvent;
_8fa.setFromDhtmlEvent(ev);
var me=_8fa.dwtObj;
var _8fc=_8fa.target;
if(_8fc.nodeName.toLowerCase()=="img"){
_8fc=_8fc.parentNode;
}
if(me._downTdId==_8fc.id){
_8fc.style.borderStyle="outset";
_8fc.style.borderColor=_8fa.dwtObj._swappedColor;
_8fc.style.backgroundColor=_8fa.dwtObj._swappedColor;
}
if(me._downTdId==_8fc.id){
if(me.parent instanceof DwtMenu){
DwtMenu.closeActiveMenu();
}
if(me.isListenerRegistered(DwtEvent.SELECTION)){
var _8fd=DwtShell.selectionEvent;
DwtUiEvent.copy(_8fd,_8fa);
_8fd.item=me;
_8fd.detail=_8fa.target.id.substr(_8fa.target.id.indexOf("#"));
me.notifyListeners(DwtEvent.SELECTION,_8fd);
}
}
me._downTdId=null;
_8fa._stopPropagation=true;
_8fa._returnValue=false;
_8fa.setToDhtmlEvent(ev);
return false;
};
function DwtBaseDialog(_8fe,_8ff,_900,_901,mode,loc,view,_905){
if(arguments.length==0){
return;
}
if(!(_8fe instanceof DwtShell)){
throw new DwtException("DwtBaseDialog parent must be a DwtShell",DwtException.INVALIDPARENT,"DwtDialog");
}
_8ff=_8ff||"DwtBaseDialog";
this._title=_900||"";
DwtComposite.call(this,_8fe,_8ff,DwtControl.ABSOLUTE_STYLE);
this._shell=_8fe;
this._zIndex=_901||Dwt.Z_DIALOG;
this._mode=mode||DwtBaseDialog.MODAL;
this._loc=new DwtPoint();
if(loc){
this._loc.x=loc.x;
this._loc.y=loc.y;
}else{
this._loc.x=this._loc.y=Dwt.LOC_NOWHERE;
}
this._tabGroup=new DwtTabGroup(this.toString(),true);
this._createHtml();
if(view!=null){
this.setView(view);
}
var _906=this.getHtmlElement();
var _907=_905?_905:(_906.id+"_handle");
this._initializeDragging(_907);
this.setZIndex(Dwt.Z_HIDDEN);
this._positionDialog(DwtBaseDialog.__nowhereLoc);
}
DwtBaseDialog.prototype=new DwtComposite;
DwtBaseDialog.prototype.constructor=DwtBaseDialog;
DwtBaseDialog.prototype._borderStyle="DwtDialog";
DwtBaseDialog.MODELESS=1;
DwtBaseDialog.MODAL=2;
DwtBaseDialog.__nowhereLoc=new DwtPoint(Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
DwtBaseDialog.prototype.toString=function(){
return "DwtBaseDialog";
};
DwtBaseDialog.prototype.addPopupListener=function(_908){
this.addListener(DwtEvent.POPUP,_908);
};
DwtBaseDialog.prototype.removePopupListener=function(_909){
this.removeListener(DwtEvent.POPUP,_909);
};
DwtBaseDialog.prototype.addPopdownListener=function(_90a){
this.addListener(DwtEvent.POPDOWN,_90a);
};
DwtBaseDialog.prototype.removePopdownListener=function(_90b){
this.removeListener(DwtEvent.POPDOWN,_90b);
};
DwtBaseDialog.prototype._initializeDragging=function(_90c){
var _90d=document.getElementById(_90c);
if(_90d){
var p=Dwt.getSize(AjxCore.objectWithId(window._dwtShell).getHtmlElement());
var _90f=document.getElementById(this._htmlElId);
var size=this.getSize();
var _911=new AjxCallback(this,this._dragEnd);
var _912=new AjxCallback(this,this._duringDrag);
var _913=new AjxCallback(this,this._dragStart);
DwtDraggable.init(_90d,_90f,0,document.body.offsetWidth-10,0,document.body.offsetHeight-10,_913,_912,_911);
}
};
DwtBaseDialog.prototype.popup=function(loc){
if(this._poppedUp){
return;
}
this.applyCaretHack();
this.cleanup(true);
var _915=this._zIndex;
if(this._mode==DwtBaseDialog.MODAL){
_915=this._setModalEffect(_915);
}
this._shell._veilOverlay.activeDialogs.push(this);
if(loc){
this._loc.x=loc.x;
this._loc.y=loc.y;
this._positionDialog(loc);
}else{
this._positionDialog();
}
this.setZIndex(_915);
this._poppedUp=true;
var _916=this._shell.getKeyboardMgr();
_916.pushTabGroup(this._tabGroup);
_916.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 _917=document.getElementById(this._focusElementId);
if(_917){
_917.focus();
}
}
}
};
DwtBaseDialog.prototype.isPoppedUp=function(){
return this._poppedUp;
};
DwtBaseDialog.prototype.popdown=function(){
if(this._poppedUp){
this._poppedUp=false;
this.cleanup(false);
var _918=this._zIndex;
this.setZIndex(Dwt.Z_HIDDEN);
this._positionDialog(DwtBaseDialog.__nowhereLoc);
if(this._mode==DwtBaseDialog.MODAL){
this._undoModality(_918);
}else{
this._shell._veilOverlay.activeDialogs.pop();
}
var _919=this._shell.getKeyboardMgr();
_919.popTabGroup(this._tabGroup);
_919.popDefaultHandler();
this.notifyListeners(DwtEvent.POPDOWN,this);
}
};
DwtBaseDialog.prototype.setView=function(_91a){
this.reset();
if(_91a){
this._getContentDiv().appendChild(_91a.getHtmlElement());
}
};
DwtBaseDialog.prototype.reset=function(){
this._loc.x=this._loc.y=Dwt.LOC_NOWHERE;
};
DwtBaseDialog.prototype.cleanup=function(_91b){
var _91c=this._getInputFields();
if(_91c){
var len=_91c.length;
for(var i=0;i<len;i++){
_91c[i].disabled=!_91b;
if(_91b){
_91c[i].value="";
}
}
}
};
DwtBaseDialog.prototype.setContent=function(text){
var d=this._getContentDiv();
if(d){
d.innerHTML=text;
}
};
DwtBaseDialog.prototype._getContentDiv=function(){
return this._contentDiv;
};
DwtBaseDialog.prototype.addEnterListener=function(_921){
this.addListener(DwtEvent.ENTER,_921);
};
DwtBaseDialog.getActiveDialog=function(){
var _922=null;
var _923=DwtShell.getShell(window);
if(_923){
var len=_923._veilOverlay.activeDialogs.length;
if(len>0){
_922=_923._veilOverlay.activeDialogs[len-1];
}
}
return _922;
};
DwtBaseDialog.prototype._getContentHtml=function(){
return "<div id='"+this._contentId+"'></div>";
};
DwtBaseDialog.prototype._createHtml=function(){
var id=this._htmlElId;
this._titleHandleId=id+"_title";
this._titleCellId=id+"_title_cell";
this._contentId=id+"_contents";
var subs={id:this._htmlElId,title:this._title,titleTextId:this._titleCellId,titleId:this._titleHandleId,icon:"",closeIcon1:"",closeIcon2:""};
var html=AjxTemplate.expand("ajax.dwt.templates.Widgets#"+this._borderStyle,subs);
this.getHtmlElement().innerHTML=html;
var _928=document.getElementById(id+"_container");
_928.innerHTML=this._getContentHtml();
this._contentDiv=document.getElementById(this._contentId);
};
DwtBaseDialog.prototype._setModalEffect=function(){
var _929=this._shell._veilOverlay.dialogZ;
var _92a=null;
var _92b,veilZ;
if(_929.length){
_92a=_929[_929.length-1];
}
if(_92a){
_92b=_92a+2;
veilZ=_92a+1;
}else{
_92b=this._zIndex;
veilZ=Dwt.Z_VEIL;
}
this._shell._veilOverlay.veilZ.push(veilZ);
this._shell._veilOverlay.dialogZ.push(_92b);
Dwt.setZIndex(this._shell._veilOverlay,veilZ);
return _92b;
};
DwtBaseDialog.prototype._undoModality=function(_92c){
var _92d=this._shell._veilOverlay.veilZ;
_92d.pop();
var _92e=_92d[_92d.length-1];
Dwt.setZIndex(this._shell._veilOverlay,_92e);
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(loc){
var _930=this._shell.getSize();
var _931=this.getSize();
var x,y;
if(loc==null){
x=Math.round((_930.x-_931.x)/2);
y=Math.round((_930.y-_931.y)/2);
}else{
x=loc.x;
y=loc.y;
}
if((x+_931.x)>_930.x){
x=_930.x-_931.x;
}
if((y+_931.y)>_930.y){
y=_930.y-_931.y;
}
this.setLocation(x,y);
};
DwtBaseDialog.prototype._getInputFields=function(){
};
DwtBaseDialog.prototype._dragStart=function(x,y){
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(x,y){
this._loc.x=x;
this._loc.y=y;
};
DwtBaseDialog.prototype._duringDrag=function(x,y){
};
DwtBaseDialog.prototype._doesContainElement=function(_939){
return Dwt.contains(this.getHtmlElement(),_939);
};
function DwtDialog(_93a,_93b,_93c,_93d,_93e,_93f,mode,loc){
if(arguments.length==0){
return;
}
_93b=_93b||"DwtDialog";
this._title=_93c||"";
if(!_93d){
_93d=[DwtDialog.OK_BUTTON,DwtDialog.CANCEL_BUTTON];
}else{
if(_93d==DwtDialog.NO_BUTTONS){
_93d=null;
}
}
this._buttonList=new Array();
if(_93d||_93e){
this._buttonDesc=new Object();
if(_93d&&_93d.length){
this._enterButtonId=_93d[0];
for(var i=0;i<_93d.length;i++){
var _943=_93d[i];
this._buttonList.push(_943);
this._buttonDesc[_943]=new DwtDialog_ButtonDescriptor(_943,AjxMsg[DwtDialog.MSG_KEY[_943]],this.getAlignmentForButton(_943));
}
this._resetCallbacks();
}
if(_93e&&_93e.length){
if(!this._enterButtonId){
this._enterButtonId=_93e[0];
}
for(var i=0;i<_93e.length;i++){
var _943=_93e[i].id;
this._buttonList.push(_943);
this._buttonDesc[_943]=_93e[i];
}
}
}
this._titleCellId=Dwt.getNextId();
this._contentId=Dwt.getNextId();
this._buttonElementId=new Object();
for(var i=0;i<this._buttonList.length;i++){
this._buttonElementId[this._buttonList[i]]=Dwt.getNextId();
}
DwtBaseDialog.call(this,_93a,_93b,this._title,_93f,mode,loc);
this._titleCell=document.getElementById(this._titleCellId);
this._contentDiv=document.getElementById(this._contentId);
this._button=new Object();
for(var i=0;i<this._buttonList.length;i++){
var _943=this._buttonList[i];
var b=this._button[_943]=new DwtButton(this);
b.setText(this._buttonDesc[_943].label);
b.buttonId=_943;
b.addSelectionListener(new AjxListener(this,this._buttonListener));
this._tabGroup.addMember(b);
document.getElementById(this._buttonElementId[_943]).appendChild(b.getHtmlElement());
}
this._initializeDragging(this._titleHandleId);
}
DwtDialog.prototype=new DwtBaseDialog;
DwtDialog.prototype.constructor=DwtDialog;
function DwtDialog_ButtonDescriptor(id,_946,_947,_948,_949){
this.id=id;
this.label=_946;
this.align=_947;
this.callback=_948;
this.cellTemplate=_949;
}
DwtDialog.prototype.getAlignmentForButton=function(id){
return DwtDialog.ALIGN[id];
};
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=new Object();
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=new Object();
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.toString=function(){
return "DwtDialog";
};
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].setActivated(false);
}
};
DwtDialog.prototype.getButton=function(_94b){
return this._button[_94b];
};
DwtDialog.prototype.setButtonEnabled=function(_94c,_94d){
this._button[_94c].setEnabled(_94d);
};
DwtDialog.prototype.setButtonVisible=function(_94e,_94f){
this._button[_94e].setVisible(_94f);
};
DwtDialog.prototype.getButtonEnabled=function(_950){
return this._button[_950].getEnabled();
};
DwtDialog.prototype.registerCallback=function(_951,func,obj,args){
this._buttonDesc[_951].callback=new AjxCallback(obj,func,args);
};
DwtDialog.prototype.unregisterCallback=function(_955){
this._buttonDesc[_955].callback=null;
};
DwtDialog.prototype.setButtonListener=function(_956,_957){
this._button[_956].removeSelectionListeners();
this._button[_956].addSelectionListener(_957);
};
DwtDialog.prototype.setTitle=function(_958){
this._title=_958;
this._titleCell.innerHTML=_958;
};
DwtDialog.prototype.associateEnterWithButton=function(id){
this._enterButtonId=id;
};
DwtDialog.prototype.getKeyMapName=function(){
return "DwtDialog";
};
DwtDialog.prototype.handleKeyAction=function(_95a,ev){
switch(_95a){
case DwtKeyMap.ENTER:
this.notifyListeners(DwtEvent.ENTER,ev);
break;
case DwtKeyMap.CANCEL:
this.popdown();
break;
default:
return false;
}
return true;
};
DwtDialog.prototype._getContentHtml=function(){
var html=new Array();
var idx=0;
if(AjxEnv.isNav){
html[idx++]="<input type='button' id='";
html[idx++]=this._focusElementId=Dwt.getNextId();
html[idx++]="' style='height:0px; width:0px; display:none;'>";
}
html[idx++]=DwtBaseDialog.prototype._getContentHtml.call(this);
idx=this._addButtonsHtml(html,idx);
return html.join("");
};
DwtDialog.prototype._getSeparatorTemplate=function(){
return "<div class=horizSep></div>";
};
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(html,idx){
if(this._buttonList&&this._buttonList.length){
var _960=new Array();
var _961=new Array();
var _962=new Array();
for(var i=0;i<this._buttonList.length;i++){
var _964=this._buttonList[i];
switch(this._buttonDesc[_964].align){
case DwtDialog.ALIGN_RIGHT:
_961.push(_964);
break;
case DwtDialog.ALIGN_LEFT:
_960.push(_964);
break;
case DwtDialog.ALIGN_CENTER:
_962.push(_964);
break;
}
}
html[idx++]=this._getSeparatorTemplate();
html[idx++]=this._getButtonsContainerStartTemplate();
if(_960.length){
html[idx++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["left"]);
for(var i=0;i<_960.length;i++){
var _964=_960[i];
var _965=this._buttonDesc[_964].cellTemplate?this._buttonDesc[_964].cellTemplate:this._getButtonsCellTemplate();
html[idx++]=AjxMessageFormat.format(_965,[this._buttonElementId[_964]]);
}
html[idx++]=this._getButtonsAlignEndTemplate();
}
if(_962.length){
html[idx++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["center"]);
for(var i=0;i<_962.length;i++){
var _964=_962[i];
var _965=this._buttonDesc[_964].cellTemplate?this._buttonDesc[_964].cellTemplate:this._getButtonsCellTemplate();
html[idx++]=AjxMessageFormat.format(_965,[this._buttonElementId[_964]]);
}
html[idx++]=this._getButtonsAlignEndTemplate();
}
if(_961.length){
html[idx++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["right"]);
for(var i=0;i<_961.length;i++){
var _964=_961[i];
var _965=this._buttonDesc[_964].cellTemplate?this._buttonDesc[_964].cellTemplate:this._getButtonsCellTemplate();
html[idx++]=AjxMessageFormat.format(_965,[this._buttonElementId[_964]]);
}
html[idx++]=this._getButtonsAlignEndTemplate();
}
html[idx++]=this._getButtonsContainerEndTemplate();
}
return idx;
};
DwtDialog.prototype._buttonListener=function(ev,args){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _969=obj.buttonId;
this._runCallbackForButtonId(_969,args);
};
DwtDialog.prototype._runCallbackForButtonId=function(id,args){
var _96c=this._buttonDesc[id].callback;
if(!_96c){
return;
}
args=(args instanceof Array)?args:[args];
_96c.run.apply(_96c,args);
};
DwtDialog.prototype._runEnterCallback=function(args){
if(this._enterButtonId&&this.getButtonEnabled(this._enterButtonId)){
this._runCallbackForButtonId(this._enterButtonId,args);
}
};
DwtDialog.prototype._resetCallbacks=function(){
for(var i=0;i<DwtDialog.ALL_BUTTONS.length;i++){
var id=DwtDialog.ALL_BUTTONS[i];
if(this._buttonDesc[id]){
this._buttonDesc[id].callback=new AjxCallback(this,this.popdown);
}
}
};
function DwtLabel(_970,_971,_972,_973,id,_975){
if(arguments.length==0){
return;
}
_972=_972?_972:"DwtLabel";
DwtControl.call(this,_970,_972,_973,false,id,_975);
this._style=_971?_971:(DwtLabel.IMAGE_LEFT|DwtLabel.ALIGN_CENTER);
this._row=null;
this._textCell=null;
this._textBackground=null;
this._textForeground=null;
this._imageCell=null;
this.__createTable();
}
DwtLabel.prototype=new DwtControl;
DwtLabel.prototype.constructor=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.toString=function(){
return "DwtLabel";
};
DwtLabel.prototype.setEnabled=function(_976){
if(_976!=this._enabled){
DwtControl.prototype.setEnabled.call(this,_976);
if(_976){
this.__setImage(this.__imageInfo);
if(this._textCell!=null){
this._textCell.className="Text";
}
}else{
if(this.__disabledImageInfo){
this.__setImage(this.__disabledImageInfo);
}
if(this._textCell){
this._textCell.className="DisabledText";
}
}
}
};
DwtLabel.prototype.getImage=function(){
return this.__imageInfo;
};
DwtLabel.prototype.setImage=function(_977){
this.__imageInfo=_977;
if(this._enabled||(!this._enabled&&this.__disabledImageInfo)){
this.__setImage(_977);
}
};
DwtLabel.prototype.setDisabledImage=function(_978){
this.__disabledImageInfo=_978;
if(!this._enabled&&_978){
this.__setImage(_978);
}
};
DwtLabel.prototype.getText=function(){
return (this.__text!=null)?this.__text.data:null;
};
DwtLabel.prototype.setText=function(text){
if(text==null||text==""){
if(this._textCell!=null){
var _97a=Dwt.getCellIndex(this._textCell);
this._row.deleteCell(_97a);
}
}else{
if(this.__text==null){
this.__text=document.createTextNode(text);
}
this.__text.data=text;
var idx;
if(this._textCell==null){
if(this._style&DwtLabel.IMAGE_RIGHT){
idx=0;
}else{
idx=(this._imageCell!=null)?1:0;
}
this._textCell=this._row.insertCell(idx);
this._textCell.className=this._enabled?"Text":"DisabledText";
if(this._textBackground){
this._textCell.style.backgroundColor=this._textBackground;
}
if(this._textForeground){
this._textCell.style.color=this._textForeground;
}
this.__doAlign();
this._textCell.noWrap=true;
this._textCell.style.verticalAlign="middle";
this._textCell.appendChild(this.__text);
}
}
};
DwtLabel.prototype.setTextBackground=function(_97c){
this._textBackground=_97c;
if(this._textCell){
this._textCell.style.backgroundColor=_97c;
}
};
DwtLabel.prototype.setTextForeground=function(_97d){
this._textForeground=_97d;
if(this._textCell){
this._textCell.style.color=_97d;
}
};
DwtLabel.prototype.setAlign=function(_97e){
this._style=_97e;
if(this._textCell){
this._row.removeChild(this._textCell);
this._textCell=null;
this.setText(this.__text.data);
}
if(this._imageCell){
this._row.removeChild(this._imageCell);
this._imageCell=null;
this.__setImage(this.__imageInfo);
}
};
DwtLabel.prototype.__createTable=function(){
this.__table=document.createElement("table");
this.__table.border=0;
if(this._style&DwtLabel.ALIGN_RIGHT){
this.__table.align="right";
}else{
if(!(this._style&DwtLabel.ALIGN_LEFT)){
this.__table.align="center";
this.__table.width=AjxEnv.isIE?"95%":"100%";
}
}
this._row=this.__table.insertRow(0);
this.getHtmlElement().appendChild(this.__table);
};
DwtLabel.prototype.__setImage=function(_97f){
if(!_97f){
if(this._imageCell){
var _980=Dwt.getCellIndex(this._imageCell);
this._row.deleteCell(_980);
this._imageCell=null;
}
}else{
var idx;
if(!this._imageCell){
if(this._style&DwtLabel.IMAGE_LEFT){
idx=0;
}else{
idx=this._textCell?1:0;
}
this._imageCell=this._row.insertCell(idx);
this._imageCell.className="Icon";
this.__doAlign();
}
AjxImg.setImage(this._imageCell,_97f);
}
};
DwtLabel.prototype.__doAlign=function(){
if(this._style&DwtLabel.ALIGN_CENTER){
if(this._imageCell!=null&&this._textCell!=null){
if(this._style&DwtLabel.IMAGE_LEFT){
this._imageCell.align="right";
this._textCell.align="left";
}else{
this._imageCell.align="left";
this._textCell.align="right";
}
}else{
if(this._imageCell!=null){
this._imageCell.align="center";
}else{
if(this._textCell!=null){
this._textCell.align="center";
}
}
}
}
};
function DwtCheckbox(_982,_983,_984,_985,id,_987){
if(arguments.length==0){
return;
}
_984=_984?_984:"DwtCheckbox";
DwtControl.call(this,_982,_984,_985,false,id,_987);
this.__createHtml();
}
DwtCheckbox.prototype=new DwtControl;
DwtCheckbox.prototype.constructor=DwtCheckbox;
DwtCheckbox.prototype.toString=function(){
return "DwtCheckbox";
};
DwtCheckbox.TEXT_LEFT=1;
DwtCheckbox.TEXT_RIGHT=2;
DwtCheckbox.DEFAULT_PLACEMENT=DwtCheckbox.TEXT_RIGHT;
DwtCheckbox.prototype._textPlacement=DwtCheckbox.DEFAULT_PLACEMENT;
DwtCheckbox.prototype._selected=false;
DwtCheckbox.prototype.addSelectionListener=function(_988){
this.addListener(DwtEvent.SELECTION,_988);
};
DwtCheckbox.prototype.removeSelectionListener=function(_989){
this.removeListener(DwtEvent.SELECTION,_989);
};
DwtCheckbox.prototype.setEnabled=function(_98a){
if(_98a!=this._enabled){
DwtControl.prototype.setEnabled.call(this,_98a);
this._inputEl.disabled=!_98a;
if(this._textCell){
this._textCell.className=_98a?"Text":"DisabledText";
}
}
};
DwtCheckbox.prototype.setSelected=function(_98b){
if(this._selected!=_98b){
this._selected=_98b;
this._inputEl.checked=_98b;
}
};
DwtCheckbox.prototype.isSelected=function(){
return this._selected;
};
DwtCheckbox.prototype.setText=function(text){
if(this._text!=text){
this._text=text;
if(!this._textEl){
this.__createHtml();
}else{
if(text){
this._textEl.innerHTML=text;
}
}
}
};
DwtCheckbox.prototype.getText=function(){
return this._text;
};
DwtCheckbox.prototype.getInputElement=function(){
return this._inputEl;
};
DwtCheckbox.prototype._replaceElementHook=function(oel,nel,_98f,_990){
nel=this.getInputElement();
DwtControl.prototype._replaceElementHook.call(this,oel,nel,_98f,_990);
if(oel.id){
nel.id=oel.id;
}
};
DwtCheckbox.prototype.__createHtml=function(){
var oel=this._inputEl;
var _992="ajax.dwt.templates.Widgets#checkbox";
if(this._text){
_992+=this._textPlacement==DwtCheckbox.TEXT_LEFT?"-text-left":"-text-right";
}
var id=oel?oel.id:this._htmlElId;
this.getHtmlElement().innerHTML=AjxTemplate.expand(_992,id);
this._inputEl=document.getElementById(id+"_input");
this._inputEl.checked=this._selected;
if(oel){
var _994=oel.className;
if(_994){
Dwt.addClass(this._inputEl,_994);
}
var _995=oel.getAttribute("style");
if(_995){
this._inputEl.setAttribute([this._inputEl.getAttribute("style"),_995].join(";"));
}
}
Dwt.setHandler(this._inputEl,DwtEvent.ONCLICK,DwtCheckbox.__handleClick);
Dwt.associateElementWithObject(this._inputEl,this);
this._textEl=document.getElementById(id+"_text");
if(this._text){
this._textEl.innerHTML=this._text;
}
};
DwtCheckbox.__handleClick=function(evt){
var _997=DwtUiEvent.getEvent(evt);
var _998=DwtUiEvent.getTarget(_997);
var _999=DwtShell.selectionEvent;
DwtUiEvent.copy(_999,_997);
_999.item=this;
_999.detail=_998.checked;
var _99a=Dwt.getObjectFromElement(_998);
_99a.setSelected(_998.checked);
_99a.notifyListeners(DwtEvent.SELECTION,_999);
};
function DwtRadioButtonGroup(_99b,_99c){
this._values={};
this._eventMgr=new AjxEventMgr();
for(var id in _99b){
this.addRadio(id,_99b[id],id==_99c);
}
if(_99c){
this.setSelectedId(_99c);
}
}
DwtRadioButtonGroup.toString=function(){
return "DwtRadioButtonGroup";
};
DwtRadioButtonGroup.prototype.addRadio=function(id,_99f,_9a0){
this._values[id]=_99f;
var _9a1=document.getElementById(id);
Dwt.setHandler(_9a1,DwtEvent.ONCLICK,DwtRadioButtonGroup.__handleClick);
Dwt.associateElementWithObject(_9a1,this);
_9a1.checked=_9a0?true:false;
if(_9a0){
this._selectedId=id;
}
};
DwtRadioButtonGroup.prototype.setSelectedId=function(id){
if(id!=this._selectedId){
document.getElementById(id).checked=true;
this._selectedId=id;
var _9a3=DwtShell.selectionEvent;
_9a3.reset();
this._notifySelection(_9a3);
}
};
DwtRadioButtonGroup.prototype.setSelectedValue=function(_9a4){
var id=this._valueToId(_9a4);
this.setSelectedId(id);
};
DwtRadioButtonGroup.prototype.getSelectedId=function(){
return this._selectedId;
};
DwtRadioButtonGroup.prototype.getSelectedValue=function(){
return this._values[this._selectedId];
};
DwtRadioButtonGroup.prototype.addSelectionListener=function(_9a6){
return this._eventMgr.addListener(DwtEvent.SELECTION,_9a6);
};
DwtRadioButtonGroup.prototype._valueToId=function(_9a7){
for(var id in this._values){
if(this._values[id]==_9a7){
return id;
}
}
return null;
};
DwtRadioButtonGroup.prototype._notifySelection=function(_9a9){
_9a9.item=this;
_9a9.detail={id:this._selectedId,value:this._values[this._selectedId]};
this._eventMgr.notifyListeners(DwtEvent.SELECTION,_9a9);
};
DwtRadioButtonGroup.prototype._handleClick=function(_9aa,_9ab){
var id=_9ab.id;
if(id!=this._selectedId){
this._selectedId=id;
var _9ad=DwtShell.selectionEvent;
DwtUiEvent.copy(_9ad,_9aa);
this._notifySelection(_9ad);
}
};
DwtRadioButtonGroup.__handleClick=function(_9ae){
_9ae=DwtUiEvent.getEvent(_9ae);
var _9af=DwtUiEvent.getTarget(_9ae);
var _9b0=Dwt.getObjectFromElement(_9af);
_9b0._handleClick(_9ae,_9af);
};
function DwtListView(_9b1,_9b2,_9b3,_9b4,_9b5){
if(arguments.length==0){
return;
}
_9b2=_9b2||"DwtListView";
DwtComposite.call(this,_9b1,_9b2,_9b3);
if(_9b4){
var _9b6=this.getHtmlElement();
this._listColDiv=document.createElement("div");
this._listColDiv.id=Dwt.getNextId();
this._listColDiv.className="DwtListView-ColHeader";
_9b6.appendChild(this._listColDiv);
this._listDiv=document.createElement("div");
this._listDiv.id=Dwt.getNextId();
this._listDiv.className="DwtListView-Rows";
_9b6.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=_9b4;
this._noMaximize=_9b5;
this._parentEl=this._headerList?this._listDiv:this.getHtmlElement();
this._list=null;
this._offset=0;
this._headerColCreated=false;
this._firstSelIndex=-1;
this._tmpPoint=new DwtPoint(0,0);
this.setMultiSelect(true);
}
DwtListView.ITEM_SELECTED=1;
DwtListView.ITEM_DESELECTED=2;
DwtListView.ITEM_DBL_CLICKED=3;
DwtListView._LAST_REASON=3;
DwtListView._TOOLTIP_DELAY=250;
DwtListView.HEADERITEM_HEIGHT=23;
DwtListView.HEADERITEM_ARROW="arr--";
DwtListView.HEADER_ID="crr--";
DwtListView.HEADERITEM_LABEL="drr--";
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=10;
DwtListView.COL_MOVE_THRESHOLD=3;
DwtListView._STYLE_CLASS="_sc";
DwtListView._SELECTED_STYLE_CLASS="_ssc";
DwtListView._SELECTED_DIS_STYLE_CLASS="_sdsc";
DwtListView._KBFOCUS_CLASS="_kfc";
DwtListView.prototype=new DwtComposite;
DwtListView.prototype.constructor=DwtListView;
DwtListView.prototype.toString=function(){
return "DwtListView";
};
DwtListView.prototype.setEnabled=function(_9b7){
DwtComposite.prototype.setEnabled.call(this,_9b7);
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(_9b7){
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 _9b8=this.getSelectedItems();
if(_9b8){
var _9b9=_9b8.getArray();
for(var i=0;i<_9b9.length;i++){
var _9bb=_9b9[i];
_9bb.className=_9b7?Dwt.getAttr(_9bb,DwtListView._SELECTED_STYLE_CLASS):Dwt.getAttr(_9bb,DwtListView._SELECTED_DIS_STYLE_CLASS);
}
}
};
DwtListView.prototype.createHeaderHtml=function(_9bc){
if(!this._headerList||this._headerColCreated){
return;
}
var idx=0;
var _9be=new Array();
this._headerTableId=DwtListView.HEADER_ID+Dwt.getNextId();
_9be[idx++]="<table id='";
_9be[idx++]=this._headerTableId;
_9be[idx++]="' cellpadding=0 cellspacing=0 border=0 height=100%";
_9be[idx++]=this._noMaximize?">":" width=100%>";
_9be[idx++]="<tr>";
var _9bf=this._headerList.length;
for(i=0;i<_9bf;i++){
var _9c0=this._headerList[i];
if(!_9c0._visible){
continue;
}
_9be[idx++]="<td id='";
_9be[idx++]=_9c0._id;
_9be[idx++]="' class='";
_9be[idx++]=_9c0._id==this._currentColId?"DwtListView-Column DwtListView-ColumnActive'":"DwtListView-Column'";
if(_9c0._width){
_9be[idx++]=" width=";
_9be[idx++]=_9c0._width;
if(_9c0._widthUnits){
_9be[idx++]=_9c0._widthUnits;
}
}
_9be[idx++]=">";
_9be[idx++]="<div";
var _9c1=null;
if(_9c0._width&&_9c0._width!="auto"){
_9c1=_9c0._width+2;
if(_9c0._widthUnits){
_9c1+=_9c0._widthUnits;
}
}
if(!!_9c1){
_9be[idx++]=" style='overflow: hidden; width: ";
_9be[idx++]=_9c1;
_9be[idx++]="'>";
}else{
_9be[idx++]=">";
}
_9be[idx++]="<table border=0 cellpadding=0 cellspacing=0 width=100%><tr>";
if(_9c0._iconInfo){
_9be[idx++]="<td><center>";
_9be[idx++]=AjxImg.getImageHtml(_9c0._iconInfo);
_9be[idx++]="</center></td>";
}
if(_9c0._label){
_9be[idx++]="<td id='";
_9be[idx++]=DwtListView.HEADERITEM_LABEL;
_9be[idx++]=_9c0._id;
_9be[idx++]="'>&nbsp;";
_9be[idx++]=_9c0._label;
_9be[idx++]="</td>";
}
if(_9c0._sortable){
var _9c2=this._bSortAsc?"ColumnUpArrow":"ColumnDownArrow";
this._currentColId=_9c0._id;
_9be[idx++]="<td width=10 id='";
_9be[idx++]=DwtListView.HEADERITEM_ARROW;
_9be[idx++]=_9c0._id;
_9be[idx++]="'>";
_9be[idx++]=_9c0._sortable==_9bc?AjxImg.getImageHtml(_9c2):AjxImg.getImageHtml(_9c2,"visibility:hidden");
_9be[idx++]="</td>";
}
if(i<(_9bf-1)){
_9be[idx++]="<td width=4>";
_9be[idx++]="<table align=right border=0 cellpadding=0 cellspacing=0 width=2 height=100%><tr>";
_9be[idx++]="<td class='DwtListView-Sash'><div style='width: 1px; height: ";
_9be[idx++]=(DwtListView.HEADERITEM_HEIGHT-2);
_9be[idx++]="px; background-color: #8A8A8A'></div></td>";
_9be[idx++]="<td class='DwtListView-Sash'><div style='width: 1px; height: ";
_9be[idx++]=(DwtListView.HEADERITEM_HEIGHT-2);
_9be[idx++]="px; background-color: #FFFFFF'></div></td>";
_9be[idx++]="</tr></table>";
_9be[idx++]="</td>";
}
_9be[idx++]="</tr></table>";
_9be[idx++]="</div></td>";
}
_9be[idx++]="</tr></table>";
this._listColDiv.innerHTML=_9be.join("");
for(var j=0;j<this._headerList.length;j++){
var cell=document.getElementById(this._headerList[j]._id);
if(cell==null){
continue;
}
var _9c5=this._headerList[j]._sortable;
if(_9c5&&_9c5==_9bc){
cell.className="DwtListView-Column DwtListView-ColumnActive";
}
var _9c6=this._headerList[j]._resizeable;
if(_9c6){
var _9c7=cell.firstChild.firstChild.rows[0].lastChild;
if(_9c7){
_9c7._type=DwtListView.TYPE_HEADER_SASH;
_9c7._itemIndex=j+"--sash";
}
}
cell._isSortable=_9c5!=null;
cell._isResizeable=_9c6;
cell._type=DwtListView.TYPE_HEADER_ITEM;
cell._itemIndex=j;
}
this._headerColCreated=true;
};
DwtListView.prototype.getColIndexForId=function(_9c8){
if(this._headerList){
for(var i=0;i<this._headerList.length;i++){
if(this._headerList[i]._id.indexOf(_9c8)!=-1){
return i;
}
}
}
return -1;
};
DwtListView.prototype.set=function(list,_9cb){
this._selectedItems.removeAll();
this.enableSorting(true);
this._resetList();
this._list=list;
this._now=new Date();
this.setUI(_9cb);
};
DwtListView.prototype.setUI=function(_9cc,_9cd){
this.removeAll();
this.createHeaderHtml(_9cc);
this._renderList(this._list,_9cd);
};
DwtListView.prototype._renderList=function(list,_9cf){
if(list instanceof AjxVector&&list.size()){
var size=list.size();
for(var i=0;i<size;i++){
var item=list.get(i);
var div=this._createItemHtml(item,this._now);
if(div){
if(div instanceof Array){
for(var j=0;j<div.length;j++){
this._addRow(div[j]);
}
}else{
this._addRow(div);
}
}
}
}else{
if(!_9cf){
this._setNoResultsHtml();
}
}
};
DwtListView.prototype.addItems=function(_9d5){
if(AjxUtil.isArray(_9d5)){
if(!this._list){
this._list=new AjxVector();
}
if(this._list.size()==0){
this._resetList();
}
var _9d6=this._list.size();
var vec=AjxVector.fromArray(_9d5);
this._renderList(vec);
this._list.addList(_9d5);
}
};
DwtListView.prototype.addItem=function(item,_9d9,_9da){
if(!this._list){
this._list=new AjxVector();
}
if(this._list.size()==0){
this._resetList();
}
this._list.add(item,_9d9);
var div=this._createItemHtml(item,this._now);
if(div){
if(div instanceof Array){
for(var j=0;j<div.length;j++){
this._addRow(div[j]);
}
}else{
this._addRow(div,_9d9);
}
}
if(!_9da&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtListView.prototype.removeItem=function(item,_9de){
var _9df=this._getElFromItem(item);
this._selectedItems.remove(_9df);
this._parentEl.removeChild(_9df);
this._list.remove(item);
if(!_9de&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtListView.prototype.removeLastItem=function(_9e0){
var last=this._list.get(this._list.size()-1);
this._list.remove(last);
this._parentEl.removeChild(this._getElFromItem(last));
if(!_9e0&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtListView.prototype.redrawItem=function(item){
var odiv=this._getElFromItem(item);
if(odiv){
var ndiv=this._createItemHtml(item,true);
this.associateItemWithElement(item,ndiv);
odiv.parentNode.replaceChild(ndiv,odiv);
var _9e5=this.getSelectedItems().getArray();
for(var i=0;i<_9e5.length;i++){
var _9e7=_9e5[i];
if(_9e7===item){
this.setSelectedItems([].concat(_9e5));
break;
}
}
}
};
DwtListView.prototype.reIndexColumn=function(_9e8,_9e9){
if(this._headerList==null){
return;
}
var len=this._headerList.length;
if(_9e8<0||_9e9<0||_9e8>=len||_9e9>=len||_9e8==_9e9){
return;
}
var temp=this._headerList.splice(_9e8,1);
this._headerList.splice(_9e9,0,temp[0]);
this._relayout();
};
DwtListView.prototype.reSizeColumn=function(_9ec,_9ed){
if(_9ed==this._headerList._width||_9ed<DwtListView.MIN_COLUMN_WIDTH){
return;
}
this._headerList[_9ec]._width=_9ed;
this._relayout();
};
DwtListView.prototype._resetColWidth=function(){
if(this._headerList==null){
return;
}
var _9ee=this._headerList.length-1;
var _9ef=null;
while(_9ef==null&&_9ee>=0){
if(this._headerList[_9ee]._visible){
_9ef=_9ee;
}
_9ee--;
}
var _9f0=this._headerList[_9ef];
var _9f1=document.getElementById(_9f0._id);
var div=_9f1.firstChild;
var _9f3=16;
var _9f4=this._listColDiv.clientWidth;
var _9f5=this._listDiv.clientWidth;
if(_9f4!=_9f5){
_9f1.style.width=div.style.width=_9f0._width!=null&&_9f0._width!="auto"?(_9f0._width+_9f3):(_9f1.clientWidth+_9f3);
}else{
_9f1.style.width=div.style.width=(_9f0._width||"");
}
};
DwtListView.prototype.size=function(){
return this._list?this._list.size():0;
};
DwtListView.prototype.setMultiSelect=function(_9f6){
this._multiSelectEnabled=_9f6;
};
DwtListView.prototype.isMultiSelectEnabled=function(){
return this._multiSelectEnabled;
};
DwtListView.prototype._getPropagationForEvent=function(){
if(AjxEnv.isSafari){
return false;
}else{
return DwtControl.prototype._getPropagationForEvent.call(this);
}
};
DwtListView.prototype._getReturnValueForEvent=function(){
if(AjxEnv.isSafari){
return true;
}else{
return DwtControl.prototype._getReturnValueForEvent.call(this);
}
};
DwtListView.prototype._addRow=function(row,_9f8){
var len=this._parentEl.childNodes.length;
if(_9f8!=null&&len>0&&_9f8!=len){
this._parentEl.insertBefore(row,this._parentEl.childNodes[_9f8]);
}else{
this._parentEl.appendChild(row);
}
};
DwtListView.prototype._createItemHtml=function(item,now,_9fc){
var div=document.createElement("DIV");
div.id=Dwt.getNextId();
var _9fe=AjxBuffer.concat(this._className,"Row");
div[DwtListView._STYLE_CLASS]=AjxBuffer.concat("Row ",_9fe);
div[DwtListView._SELECTED_STYLE_CLASS]=AjxBuffer.concat("Row-",DwtCssStyle.SELECTED," ",_9fe);
div[DwtListView._SELECTED_DIS_STYLE_CLASS]=AjxBuffer.concat("Row-",DwtCssStyle.SELECTED,"-",DwtCssStyle.DISABLED," ",_9fe);
div.className=div[DwtListView._STYLE_CLASS];
if(typeof (item)=="object"){
div.innerHTML=AjxStringUtil.htmlEncode(item.toString());
}else{
div.innerHTML=AjxStringUtil.htmlEncode(String(item));
}
this.associateItemWithElement(item,div,DwtListView.TYPE_LIST_ITEM);
return div;
};
DwtListView.prototype._setNoResultsHtml=function(){
var _9ff=new Array(3);
var idx=0;
_9ff[idx++]="<table width='100%' cellspacing='0' cellpadding='1'><tr><td class='NoResults'><br>";
_9ff[idx++]=AjxMsg.noResults;
_9ff[idx++]="</td></tr></table>";
var div=document.createElement("div");
div.innerHTML=_9ff.join("");
this._addRow(div);
};
DwtListView.prototype.addSelectionListener=function(_a02){
this._evtMgr.addListener(DwtEvent.SELECTION,_a02);
};
DwtListView.prototype.removeSelectionListener=function(_a03){
this._evtMgr.removeListener(DwtEvent.SELECTION,_a03);
};
DwtListView.prototype.addActionListener=function(_a04){
this._evtMgr.addListener(DwtEvent.ACTION,_a04);
};
DwtListView.prototype.removeActionListener=function(_a05){
this._evtMgr.removeListener(DwtEvent.ACTION,_a05);
};
DwtListView.prototype.addStateChangeListener=function(_a06){
this._evtMgr.addListener(DwtEvent.STATE_CHANGE,_a06);
};
DwtListView.prototype.removeStateChangeListener=function(_a07){
this._evtMgr.removeListener(DwtEvent.STATE_CHANGE,_a07);
};
DwtListView.prototype.removeAll=function(_a08){
this._parentEl.innerHTML="";
this._selectedItems.removeAll();
this._selAnchor=this._kbAnchor=null;
if(!_a08&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtListView.prototype.deselectAll=function(){
var a=this._selectedItems.getArray();
var sz=this._selectedItems.size();
for(var i=0;i<sz;i++){
a[i].className=Dwt.getAttr(a[i],DwtListView._STYLE_CLASS);
}
this._selectedItems.removeAll();
this._selAnchor=null;
if(this._kbAnchor!=null&&this.hasFocus()){
this._kbAnchor.className+=" "+Dwt.getAttr(this._kbAnchor,DwtListView._KBFOCUS_CLASS);
}
};
DwtListView.prototype.getDnDSelection=function(){
if(this._dndSelection instanceof AjxVector){
return this.getSelection();
}else{
return AjxCore.objectWithId(this._dndSelection);
}
};
DwtListView.prototype.getSelection=function(){
var a=new Array();
if(this._rightSelItems){
a.push(AjxCore.objectWithId(Dwt.getAttr(this._rightSelItems,"_itemIndex")));
}else{
var sa=this._selectedItems.getArray();
var _a0e=this._selectedItems.size();
for(var i=0;i<_a0e;i++){
a[i]=AjxCore.objectWithId(Dwt.getAttr(sa[i],"_itemIndex"));
}
}
return a;
};
DwtListView.prototype.getSelectedItems=function(){
return this._selectedItems;
};
DwtListView.prototype.setSelection=function(item,_a11){
var el=this._getElFromItem(item);
if(el){
var i;
this._deselectAllSelectedItems();
this._unmarkKbAnchorElement(true);
this._selectedItems.add(el);
this._selAnchor=this._kbAnchor=el;
el.className=this.getEnabled()?Dwt.getAttr(el,DwtListView._SELECTED_STYLE_CLASS):Dwt.getAttr(el,DwtListView._SELECTED_DIS_STYLE_CLASS);
if(this.hasFocus()){
el.className+=" "+Dwt.getAttr(el,DwtListView._KBFOCUS_CLASS);
}
this._firstSelIndex=this._list&&this._list.size()>0?this._list.indexOf(item):-1;
if(!_a11&&this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){
var _a14=new DwtSelectionEvent(true);
_a14.button=DwtMouseEvent.LEFT;
_a14.target=el;
_a14.item=AjxCore.objectWithId(Dwt.getAttr(el,"_itemIndex"));
_a14.detail=DwtListView.ITEM_SELECTED;
this._evtMgr.notifyListeners(DwtEvent.SELECTION,_a14);
}
}
};
DwtListView.prototype._deselectAllSelectedItems=function(){
var a=this._selectedItems.getArray();
var sz=this._selectedItems.size();
for(i=0;i<sz;i++){
a[i].className=Dwt.getAttr(a[i],DwtListView._STYLE_CLASS);
if(this._kbAnchor==a[i]&&this.hasFocus()){
a[i].className+=" "+Dwt.getAttr(a[i],DwtListView._KBFOCUS_CLASS);
}
}
this._selectedItems.removeAll();
};
DwtListView.prototype.setSelectedItems=function(_a17){
this._deselectAllSelectedItems();
var i,sz,el;
sz=_a17.length;
for(i=0;i<sz;++i){
el=this._getElFromItem(_a17[i]);
if(el){
el.className=this.getEnabled()?Dwt.getAttr(el,DwtListView._SELECTED_STYLE_CLASS):Dwt.getAttr(el,DwtListView._SELECTED_DIS_STYLE_CLASS);
if(this._kbAnchor==el&&this.hasFocus()){
el.className+=" "+Dwt.getAttr(el,DwtListView._KBFOCUS_CLASS);
}
this._selectedItems.add(el);
}
}
};
DwtListView.prototype.getSelectionCount=function(){
return this._rightSelItems?1:this._selectedItems.size();
};
DwtListView.prototype.handleActionPopdown=function(){
if(this._rightSelItems){
this._rightSelItems.className=Dwt.getAttr(this._rightSelItems,DwtListView._STYLE_CLASS);
this._rightSelItems=null;
}
};
DwtListView.prototype._getItemId=function(item){
return item?([this._getViewPrefix(),item.id].join("")):null;
};
DwtListView.prototype._getHeaderTableId=function(){
return this._headerList?this._headerTableId:null;
};
DwtListView.prototype._getElFromItem=function(item){
var _a1b=this._parentEl.childNodes;
var len=_a1b.length;
var _a1d=this._getItemId(item);
for(var i=0;i<len;i++){
if(_a1b[i].id==_a1d){
return _a1b[i];
}
}
return null;
};
DwtListView.prototype._getItemIndex=function(item){
var list=this._list;
var len=list.size();
for(var i=0;i<len;++i){
if(list.get(i).id==item.id){
return i;
}
}
};
DwtListView.prototype.getItemFromElement=function(_a23){
var _a24=Dwt.getAttr(_a23,"_itemIndex");
if(_a24!==void 0){
if(Dwt.getAttr(_a23,"_type")==DwtListView.TYPE_LIST_ITEM){
return AjxCore.objectWithId(_a24);
}
}
return null;
};
DwtListView.prototype._getViewPrefix=function(){
return "";
};
DwtListView.prototype.associateItemWithElement=function(item,_a26,type,_a28){
_a26.id=_a28||this._getItemId(item);
_a26._itemIndex=AjxCore.assignId(item);
_a26._type=type;
};
DwtListView.prototype._isValidDragObject=function(ev){
var div=ev.target;
div=Dwt.findAncestor(div,"_itemIndex");
return (div!=null);
};
DwtListView.prototype.dragSelect=function(row){
if(this._dragHighlight!=null){
var _a2c=document.getElementById(this._dragHighlight);
if(!row||row.id!=_a2c.id){
this._updateDragSelection(_a2c,false);
}
}
if(!row||Dwt.getAttr(row,"_type")!=DwtListView.TYPE_LIST_ITEM){
return;
}
if(row.id!=this._dragHighlight){
this._dragHighlight=row.id;
this._updateDragSelection(row,true);
}
};
DwtListView.prototype.dragDeselect=function(row){
if(this._dragHighlight){
var _a2e=document.getElementById(this._dragHighlight);
this._updateDragSelection(_a2e,false);
this._dragHighlight=null;
}
};
DwtListView.prototype._updateDragSelection=function(row,_a30){
if(!_a30){
row.className=row._dwtListViewOldClassName;
}else{
row._dwtListViewOldClassName=row.className;
row.className=row.className+"-drag";
}
};
DwtListView.prototype._mouseOverAction=function(_a31,div){
var type=Dwt.getAttr(div,"_type");
if((type==DwtListView.TYPE_HEADER_ITEM)&&this._sortingEnabled&&div._isSortable&&this._headerClone==null){
div.className="DwtListView-Column DwtListView-ColumnHover";
}else{
if(type==DwtListView.TYPE_HEADER_SASH){
div.style.cursor=AjxEnv.isIE?"col-resize":"e-resize";
}else{
if(type==DwtListView.TYPE_LIST_ITEM){
if(div._hoverStyleClass==null||div==this._rightSelItems){
div.hoverSet=false;
}else{
var _a34=this._selectedItems.getArray();
div.hoverSet=true;
for(var i=0;i<_a34.length;i++){
if(div==_a34[i]){
div.hoverSet=false;
break;
}
}
}
if(div.hoverSet){
div.className+=" "+div._hoverStyleClass;
}
}
}
}
return true;
};
DwtListView.prototype._mouseOutAction=function(_a36,div){
var type=Dwt.getAttr(div,"_type");
if(type==DwtListView.TYPE_HEADER_ITEM&&this._headerClone==null){
div.className=div.id!=this._currentColId?"DwtListView-Column":"DwtListView-Column DwtListView-ColumnActive";
}else{
if(type==DwtListView.TYPE_HEADER_SASH){
div.style.cursor="auto";
}else{
if(type==DwtListView.TYPE_LIST_ITEM){
if(div._hoverStyleClass&&div.hoverSet){
div.className=Dwt.getAttr(div,DwtListView._STYLE_CLASS);
}
}
}
}
return true;
};
DwtListView.prototype._mouseOverListener=function(ev){
var div=ev.target;
div=Dwt.findAncestor(div,"_itemIndex");
if(!div){
return;
}
this._mouseOverAction(ev,div);
};
DwtListView.prototype._mouseOutListener=function(ev){
var div=ev.target;
div=Dwt.findAncestor(div,"_itemIndex");
if(!div){
return;
}
this.setToolTipContent(null);
this._mouseOutAction(ev,div);
};
DwtListView.prototype._mouseMoveListener=function(ev){
if(this._clickDiv==null){
return;
}
var type=Dwt.getAttr(this._clickDiv,"_type");
if(type==DwtListView.TYPE_HEADER_ITEM){
this._handleColHeaderMove(ev);
}else{
if(type==DwtListView.TYPE_HEADER_SASH){
this._handleColHeaderResize(ev);
}
}
};
DwtListView.prototype._mouseUpAction=function(_a3f,div){
return true;
};
DwtListView.prototype._mouseDownListener=function(ev){
var div=ev.target;
div=Dwt.findAncestor(div,"_itemIndex");
if(div==null){
this._dndSelection=null;
}else{
this._clickDiv=div;
if(Dwt.getAttr(div,"_type")!=DwtListView.TYPE_LIST_ITEM){
this._dndSelection=null;
}else{
this._dndSelection=(this._selectedItems.contains(div))?this._selectedItems:Dwt.getAttr(div,"_itemIndex");
}
}
};
DwtListView.prototype._mouseUpListener=function(ev){
var div=ev.target;
div=Dwt.findAncestor(div,"_itemIndex");
var _a45=this._handleColHeaderDrop(ev);
var _a46=this._handleColSashDrop(ev);
if(!div||div!=this._clickDiv||_a45||_a46){
delete this._clickDiv;
return;
}
delete this._clickDiv;
var type=Dwt.getAttr(div,"_type");
if(this._headerList&&type==DwtListView.TYPE_HEADER_ITEM){
if(div._isSortable&&this._sortingEnabled&&ev.button==DwtMouseEvent.LEFT){
this._columnClicked(div,ev);
}else{
if(ev.button==DwtMouseEvent.RIGHT){
var _a48=this._getActionMenuForColHeader();
if(_a48&&_a48 instanceof DwtMenu){
_a48.popup(0,ev.docX,ev.docY);
}
}
}
}else{
if(type==DwtListView.TYPE_LIST_ITEM){
if(ev.button==DwtMouseEvent.LEFT||ev.button==DwtMouseEvent.RIGHT){
this._itemClicked(div,ev);
}
if(!this._mouseUpAction(ev,div)){
return;
}
}
}
};
DwtListView.prototype._doubleClickAction=function(_a49,div){
return true;
};
DwtListView.prototype._doubleClickListener=function(ev){
var div=ev.target;
div=Dwt.findAncestor(div,"_itemIndex");
if(!div){
return;
}
if(Dwt.getAttr(div,"_type")==DwtListView.TYPE_LIST_ITEM){
if(!this._doubleClickAction(ev,div)){
return;
}
if(this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){
DwtUiEvent.copy(this._selEv,ev);
this._selEv.item=this.getItemFromElement(div);
this._selEv.detail=DwtListView.ITEM_DBL_CLICKED;
this._evtMgr.notifyListeners(DwtEvent.SELECTION,this._selEv);
}
}
};
DwtListView.prototype.emulateDblClick=function(item){
var div=document.getElementById(this._getItemId(item));
if(div){
this._emulateDblClick(div);
}
};
DwtListView.prototype._emulateDblClick=function(_a4f){
var mev=DwtShell.mouseEvent;
mev.reset();
mev.target=_a4f;
mev.button=DwtMouseEvent.LEFT;
mev.ersatz=true;
this._itemClicked(_a4f,mev);
this._doubleClickListener(mev);
};
DwtListView.prototype._selectItem=function(next,_a52){
if(!this.size()){
return;
}
var _a53;
if(this._kbAnchor){
_a53=this._getSiblingElement(this._kbAnchor,next);
}else{
_a53=this._parentEl.firstChild;
}
this._scrollList(_a53);
this._emulateSingleClick(_a53,DwtMouseEvent.LEFT,false,_a52);
};
DwtListView.prototype._getSiblingElement=function(_a54,next){
var el=next?_a54.nextSibling:_a54.previousSibling;
return el?el:_a54;
};
DwtListView.prototype._scrollList=function(_a57){
var _a58=_a57.parentNode;
var _a59=this._tmpPoint;
var _a5a=Dwt.getLocation(_a57,_a59).y;
var _a5b=Dwt.getLocation(_a58,_a59).y;
var diff=_a5a-(_a58.scrollTop+_a5b);
if(diff<0){
_a58.scrollTop+=diff;
}else{
var _a5d=Dwt.getSize(_a58,_a59).y;
var _a5e=Dwt.getSize(_a57,_a59).y;
diff=(_a5a+_a5e)-(_a5b+_a5d+_a58.scrollTop);
if(diff>0){
_a58.scrollTop+=diff;
}
}
};
DwtListView.prototype._emulateSingleClick=function(_a5f,_a60,ctrl,_a62,alt,docX,docY){
this._clickDiv=Dwt.findAncestor(_a5f,"_itemIndex");
var mev=DwtShell.mouseEvent;
mev.reset();
mev.target=_a5f;
mev.button=_a60;
mev.docX=docX;
mev.docY=docY;
mev.shiftKey=_a62;
mev.altKey=alt;
mev.ctrlKey=ctrl;
mev.ersatz=true;
this._mouseUpListener(mev);
};
DwtListView.prototype._setKbFocusElement=function(next){
if(!this._list){
return;
}
var orig=this._kbAnchor;
if(this._kbAnchor){
this._kbAnchor=this._getSiblingElement(this._kbAnchor,next);
}else{
this._kbAnchor=this._parentEl.firstChild;
}
if(this._kbAnchor!=orig){
var _a69=Dwt.getAttr(orig,DwtListView._SELECTED_STYLE_CLASS);
if(orig.className.indexOf(_a69)!=-1){
orig.className=_a69;
}else{
orig.className=Dwt.getAttr(orig,DwtListView._STYLE_CLASS);
}
this._kbAnchor.className+=" "+Dwt.getAttr(this._kbAnchor,DwtListView._KBFOCUS_CLASS);
}
this._scrollList(this._kbAnchor);
};
DwtListView.prototype._itemSelected=function(_a6a,ev){
if(this._allowLeftSelection(_a6a,ev,(ev)?ev.button:null)){
this._unmarkKbAnchorElement(true);
var _a6c=this._selectedItems.size();
var a=this._selectedItems.getArray();
for(var i=0;i<_a6c;i++){
a[i].className=Dwt.getAttr(a[i],DwtListView._STYLE_CLASS);
}
this._selectedItems.removeAll();
this._selectedItems.add(_a6a);
this._selAnchor=this._kbAnchor=_a6a;
_a6a.className=Dwt.getAttr(_a6a,DwtListView._SELECTED_STYLE_CLASS);
if(this.hasFocus()){
_a6a.className+=" "+Dwt.getAttr(_a6a,DwtListView._KBFOCUS_CLASS);
}
this._firstSelIndex=this._list?this._list.indexOf(AjxCore.objectWithId(Dwt.getAttr(_a6a,"_itemIndex"))):-1;
}
};
DwtListView.prototype._itemClicked=function(_a6f,ev){
if(this._rightSelItems){
this._rightSelItems.className=Dwt.getAttr(this._rightSelItems,DwtListView._STYLE_CLASS);
this._rightSelItems=null;
}
var _a71=this._selectedItems.size();
if((!ev.shiftKey&&!ev.ctrlKey)||!this.isMultiSelectEnabled()){
if(ev.button==DwtMouseEvent.LEFT||ev.button==DwtMouseEvent.RIGHT){
this._selEv.detail=DwtListView.ITEM_SELECTED;
}
var _a72=this._selectedItems.contains(_a6f);
if(ev.button==DwtMouseEvent.LEFT){
this._itemSelected(_a6f,ev);
}else{
if(ev.button==DwtMouseEvent.RIGHT&&!_a72){
this._rightSelItems=_a6f;
_a6f.className=Dwt.getAttr(_a6f,DwtListView._SELECTED_STYLE_CLASS)+"-right";
if(this._kbAnchor==_a6f){
_a6f.className=" "+Dwt.getAttr(_a6f,DwtListView._KBFOCUS_CLASS);
}
}
}
_a6f.hoverSet=false;
}else{
if(ev.ctrlKey){
if(this._selectedItems.contains(_a6f)){
this._selectedItems.remove(_a6f);
_a6f.className=Dwt.getAttr(_a6f,DwtListView._STYLE_CLASS);
this._selEv.detail=DwtListView.ITEM_DESELECTED;
}else{
this._selectedItems.add(_a6f);
_a6f.className=Dwt.getAttr(_a6f,DwtListView._SELECTED_STYLE_CLASS);
_a6f.hoverSet=false;
this._selEv.detail=DwtListView.ITEM_SELECTED;
}
if(this._kbAnchor!=_a6f){
var _a73=this._kbAnchor;
var _a74=Dwt.getAttr(_a73,DwtListView._SELECTED_STYLE_CLASS);
if(_a73&&_a73.className&&_a73.className.indexOf(_a74)!=-1){
_a73.className=_a74;
}else{
if(_a73){
_a73.className=Dwt.getAttr(_a73,DwtListView._STYLE_CLASS);
}
}
}
this._selAnchor=this._kbAnchor=_a6f;
this._kbAnchor.className+=" "+Dwt.getAttr(this._kbAnchor,DwtListView._KBFOCUS_CLASS);
}else{
if(this._selAnchor==null){
return;
}
var _a75=this._getChildren()||_a6f.parentNode.childNodes;
var _a76=_a75.length;
var _a77;
var _a78=0;
for(var i=0;i<_a76;i++){
_a77=_a75[i];
if(_a77==this._rightSelItems){
this._rightSelItems=null;
}
if(_a77==_a6f){
_a78++;
}
var _a7a=Dwt.getAttr(_a77,DwtListView._SELECTED_STYLE_CLASS);
if(_a77==this._selAnchor){
_a78++;
if(_a77.className.indexOf(_a7a)==-1){
this._selectedItems.add(_a77);
}
_a77.className=_a7a;
continue;
}
if(_a78!=1&&_a77.className.indexOf(_a7a)!=-1&&_a77!=_a6f){
_a77.className=Dwt.getAttr(_a77,DwtListView._STYLE_CLASS);
this._selectedItems.remove(_a77);
}else{
if(_a78==1||_a77==_a6f){
if(_a77.className.indexOf(_a7a)==-1){
_a77.hoverSet=false;
this._selectedItems.add(_a77);
}
_a77.className=_a7a;
}
}
}
this._kbAnchor=_a6f;
this._kbAnchor.className+=" "+Dwt.getAttr(this._kbAnchor,DwtListView._KBFOCUS_CLASS);
var _a7b=this._selectedItems.size();
if(_a71<_a7b){
this._selEv.detail=DwtListView.ITEM_SELECTED;
}else{
if(_a71>_a7b){
this._selEv.detail=DwtListView.ITEM_DESELECTED;
}else{
return;
}
}
}
}
if(ev.button==DwtMouseEvent.LEFT&&this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){
if(this._setListEvent(ev,this._selEv,_a6f)){
this._evtMgr.notifyListeners(DwtEvent.SELECTION,this._selEv);
}
}else{
if(ev.button==DwtMouseEvent.RIGHT&&this._evtMgr.isListenerRegistered(DwtEvent.ACTION)){
if(this._setListEvent(ev,this._actionEv,_a6f)){
this._evtMgr.notifyListeners(DwtEvent.ACTION,this._actionEv);
}
}
}
};
DwtListView.prototype._setListEvent=function(ev,_a7d,_a7e){
DwtUiEvent.copy(_a7d,ev);
_a7d.item=AjxCore.objectWithId(Dwt.getAttr(_a7e,"_itemIndex"));
return true;
};
DwtListView.prototype._columnClicked=function(_a7f,ev){
var list=this.getList();
if(!list){
return;
}
var size=list.size();
if(!size){
return;
}
var item=this._headerList[Dwt.getAttr(_a7f,"_itemIndex")];
this._bSortAsc=item._id==this._currentColId?!this._bSortAsc:this._getDefaultSortbyForCol(item);
this._setSortedColStyle(item._id);
if(size>=1){
this._sortColumn(item,this._bSortAsc);
}
};
DwtListView.prototype._sortColumn=function(_a84,_a85){
};
DwtListView.prototype._getActionMenuForColHeader=function(){
return null;
};
DwtListView.prototype._getDefaultSortbyForCol=function(_a86){
return true;
};
DwtListView.prototype._allowLeftSelection=function(_a87,ev,_a89){
return true;
};
DwtListView.prototype._setSortedColStyle=function(_a8a){
if(this._currentColId!=null&&_a8a!=this._currentColId){
oldArrowId=DwtListView.HEADERITEM_ARROW+this._currentColId;
oldArrowCell=document.getElementById(oldArrowId);
if(oldArrowCell&&oldArrowCell.firstChild){
var _a8b=(AjxImg._mode==AjxImg.SINGLE_IMG)?oldArrowCell.firstChild:oldArrowCell.firstChild.firstChild;
if(_a8b){
_a8b.style.visibility="hidden";
}
}
var _a8c=document.getElementById(this._currentColId);
if(_a8c){
_a8c.className="DwtListView-Column";
}
}
this._currentColId=_a8a;
var _a8d=DwtListView.HEADERITEM_ARROW+_a8a;
var _a8e=document.getElementById(_a8d);
if(_a8e){
AjxImg.setImage(_a8e,this._bSortAsc?"ColumnUpArrow":"ColumnDownArrow");
var _a8b=(AjxImg._mode==AjxImg.SINGLE_IMG)?_a8e.firstChild:_a8e.firstChild.firstChild;
if(_a8b){
_a8b.style.visibility="visible";
}
}
var _a8f=document.getElementById(_a8a);
if(_a8f){
_a8f.className="DwtListView-Column DwtListView-ColumnActive";
}
};
DwtListView.prototype._resetList=function(){
this._resetModelList();
this._resetListView();
};
DwtListView.prototype._resetModelList=function(){
if(this._list&&this._list.size()){
this._list.removeAll();
}
};
DwtListView.prototype._resetListView=function(){
var cDiv;
while(this._parentEl.hasChildNodes()){
cDiv=this._parentEl.removeChild(this._parentEl.firstChild);
AjxCore.unassignId(Dwt.getAttr(cDiv,"_itemIndex"));
}
this._selectedItems.removeAll();
this._rightSelItems=null;
};
DwtListView.prototype._destroyDnDIcon=function(icon){
var _a92=Dwt.getAttr(icon,"_itemIndex");
if(_a92){
AjxCore.unassignId(_a92);
}
DwtControl.prototype._destroyDnDIcon.call(this,icon);
};
DwtListView.prototype._handleColHeaderMove=function(ev){
if(this._headerClone==null){
if(this._headerColX==null){
this._headerColX=ev.docX;
return;
}else{
var _a94=Math.abs(this._headerColX-ev.docX);
if(_a94<DwtListView.COL_MOVE_THRESHOLD){
return;
}
}
this._headerClone=document.createElement("div");
var size=Dwt.getSize(this._clickDiv);
var _a96=AjxEnv.isIE?size.x:size.x-3;
var _a97=AjxEnv.isIE?size.y:size.y-5;
Dwt.setSize(this._headerClone,_a96,_a97);
Dwt.setPosition(this._headerClone,Dwt.ABSOLUTE_STYLE);
Dwt.setZIndex(this._headerClone,Dwt.Z_DND);
Dwt.setLocation(this._headerClone,Dwt.DEFAULT,ev.docY);
this._headerClone.className=this._clickDiv.className+" DndIcon";
this._headerClone.innerHTML=this._clickDiv.innerHTML;
this._clickDiv.className="DwtListView-Column DwtListView-ColumnEmpty";
this._headerClone.style.borderTop="1px solid #777777";
var _a98=document.getElementById(DwtListView.HEADERITEM_LABEL+this._clickDiv.id);
if(_a98){
_a98.style.color="white";
}
this.shell.getHtmlElement().appendChild(this._headerClone);
}else{
var _a99=Dwt.findAncestor(ev.target,"_itemIndex");
if(_a99&&Dwt.getAttr(_a99,"_type")==DwtListView.TYPE_HEADER_ITEM){
if(this._headerCloneTarget&&this._headerCloneTarget==this._clickDiv){
this._headerCloneTarget=null;
}else{
if(this._headerCloneTarget!=_a99){
this._headerCloneTarget=_a99;
}
}
}else{
this._headerCloneTarget=null;
}
}
Dwt.setLocation(this._headerClone,ev.docX+2);
};
DwtListView.prototype._handleColHeaderResize=function(ev){
if(this._headerSash==null){
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);
Dwt.setLocation(this._headerSash,Dwt.DEFAULT,0);
this._headerSash.className="DwtListView-ColumnSash";
this.getHtmlElement().appendChild(this._headerSash);
this._headerSashX=ev.docX;
}
var _a9b=this._getParentForColResize();
var loc=Dwt.toWindow(_a9b.getHtmlElement(),0,0);
Dwt.setLocation(this._headerSash,ev.docX-loc.x);
};
DwtListView.prototype._handleColHeaderDrop=function(ev){
this._headerColX=null;
if(this._headerClone==null||ev.button==DwtMouseEvent.RIGHT){
return false;
}
if(this._headerCloneTarget){
var _a9e=Dwt.getAttr(this._clickDiv,"_itemIndex");
var _a9f=Dwt.getAttr(this._headerCloneTarget,"_itemIndex");
this.reIndexColumn(_a9e,_a9f);
}
this._clickDiv.className=this._clickDiv.id!=this._currentColId?"DwtListView-Column":"DwtListView-Column DwtListView-ColumnActive";
wasDraggingCol=true;
var _aa0=this._headerClone.parentNode;
if(_aa0){
_aa0.removeChild(this._headerClone);
}else{
}
delete this._headerClone;
if(Dwt.getAttr(this._clickDiv,"_type")!=DwtListView.TYPE_HEADER_ITEM){
var _aa1=this._getSortableFromColId(this._currentColId);
this._headerColCreated=false;
this.createHeaderHtml(_aa1);
}else{
var _aa2=document.getElementById(DwtListView.HEADERITEM_LABEL+this._clickDiv.id);
if(_aa2){
_aa2.style.color="black";
}
}
this._resetColWidth();
return true;
};
DwtListView.prototype._handleColSashDrop=function(ev){
if(this._headerSash==null||ev.button==DwtMouseEvent.RIGHT){
return false;
}
var _aa4=ev.docX-this._headerSashX;
var _aa5=Dwt.getAttr(this._clickDiv,"_itemIndex");
var _aa6=_aa5.indexOf("--sash");
var _aa7=parseInt(_aa5.substring(0,_aa6));
if(_aa7>=0&&_aa7<this._headerList.length){
var _aa8=null;
if(this._headerList[_aa7]._width){
_aa8=this._headerList[_aa7]._width+_aa4;
}else{
var _aa9=this._headerList[_aa7+1];
if(_aa9&&_aa9._width&&_aa9._resizeable){
var cell=document.getElementById(_aa9._id);
_aa8=cell?Dwt.getSize(cell).x+_aa4:null;
}
}
this.reSizeColumn(_aa7,_aa8);
}else{
}
var _aab=this._headerSash.parentNode;
if(_aab){
_aab.removeChild(this._headerSash);
}
delete this._headerSash;
this._resetColWidth();
return true;
};
DwtListView.prototype._relayout=function(){
this._headerColCreated=false;
var _aac=this._getSortableFromColId(this._currentColId);
var sel=this.getSelection()[0];
this.setUI(_aac);
this.setSelection(sel,true);
};
DwtListView.prototype._getSortableFromColId=function(_aae){
var _aaf=null;
for(var i=0;i<this._headerList.length;i++){
if(this._headerList[i]._id==_aae){
_aaf=this._headerList[i]._sortable;
break;
}
}
return _aaf;
};
DwtListView.prototype._getParentForColResize=function(){
return this;
};
DwtListView.prototype.setSize=function(_ab1,_ab2){
DwtComposite.prototype.setSize.call(this,_ab1,_ab2);
this._sizeChildren(_ab2);
};
DwtListView.prototype.setBounds=function(x,y,_ab5,_ab6){
DwtComposite.prototype.setBounds.call(this,x,y,_ab5,_ab6);
this._sizeChildren(_ab6);
};
DwtListView.prototype._sizeChildren=function(_ab7){
if(this._listDiv&&(_ab7!=Dwt.DEFAULT)){
Dwt.setSize(this._listDiv,Dwt.DEFAULT,_ab7-DwtListView.HEADERITEM_HEIGHT);
}
};
DwtListView.prototype._getChildren=function(){
return null;
};
DwtListView.prototype.setSortByAsc=function(_ab8,_ab9){
if(!this._headerList){
return;
}
this._bSortAsc=_ab9;
var _aba=null;
for(var i=0;i<this._headerList.length;i++){
if(this._headerList[i]._sortable&&this._headerList[i]._sortable==_ab8){
_aba=this._headerList[i]._id;
break;
}
}
if(_aba){
this._setSortedColStyle(_aba);
}
};
DwtListView.prototype.enableSorting=function(_abc){
this._sortingEnabled=_abc;
};
DwtListView.prototype.getOffset=function(){
return this._offset;
};
DwtListView.prototype.setOffset=function(_abd){
this._offset=_abd;
};
DwtListView.prototype.getNewOffset=function(_abe){
var _abf=this.getLimit();
var _ac0=_abe?this._offset+_abf:this._offset-_abf;
if(_ac0<0){
_ac0=0;
}
return _ac0;
};
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(list){
this._list.addList(list);
var size=list.size();
for(var i=0;i<size;i++){
var item=list.get(i);
var div=this._createItemHtml(item,this._now);
if(div){
this._addRow(div);
}
}
};
DwtListView.prototype._focus=function(){
if(this._kbAnchor!=null){
this._kbAnchor.className+=" "+Dwt.getAttr(this._kbAnchor,DwtListView._KBFOCUS_CLASS);
}
};
DwtListView.prototype._blur=function(){
this._unmarkKbAnchorElement();
};
DwtListView.prototype._unmarkKbAnchorElement=function(_ac6){
if(this._kbAnchor!=null){
if(this._selectedItems.contains(this._kbAnchor)){
this._kbAnchor.className=Dwt.getAttr(this._kbAnchor,DwtListView._SELECTED_STYLE_CLASS);
}else{
this._kbAnchor.className=Dwt.getAttr(this._kbAnchor,DwtListView._STYLE_CLASS);
}
}
if(_ac6){
this._kbAnchor=null;
}
};
DwtListView.prototype.getKeyMapName=function(){
return "DwtListView";
};
DwtListView.prototype.handleKeyAction=function(_ac7,ev){
switch(_ac7){
case DwtKeyMap.SELECT:
this._emulateSingleClick(this._kbAnchor,DwtMouseEvent.LEFT);
break;
case DwtKeyMap.SELECT_CURRENT:
this._emulateSingleClick(this._kbAnchor,DwtMouseEvent.LEFT,true);
break;
case DwtKeyMap.SELECT_NEXT:
this._selectItem(true);
break;
case DwtKeyMap.SELECT_PREV:
this._selectItem(false);
break;
case DwtKeyMap.ADD_SELECT_NEXT:
this._selectItem(true,true);
break;
case DwtKeyMap.ADD_SELECT_PREV:
this._selectItem(false,true);
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.PREV:
this._setKbFocusElement(false);
break;
case DwtKeyMap.NEXT:
this._setKbFocusElement(true);
break;
case DwtKeyMap.DBLCLICK:
this.emulateDblClick(this.getItemFromElement(this._kbAnchor));
break;
case DwtKeyMap.ACTION:
if(this._evtMgr.isListenerRegistered(DwtEvent.ACTION)){
var p=Dwt.toWindow(this._kbAnchor,0,0);
var s=Dwt.getSize(this._kbAnchor);
this._emulateSingleClick(this._kbAnchor,DwtMouseEvent.RIGHT,false,false,false,p.x+s.x/4,p.y+s.y/2);
}
break;
default:
return false;
}
return true;
};
function DwtListHeaderItem(id,_acd,_ace,_acf,_ad0,_ad1,_ad2,name){
this._id=id+Dwt.getNextId();
this._label=_acd;
this._iconInfo=_ace;
var w=parseInt(_acf);
this._widthUnits=null;
if(isNaN(w)||!w){
this._width="auto";
}else{
if(String(w).toString()==String(_acf).toString()){
this._width=w;
}else{
this._width=parseInt(String(_acf).substr(0,String(w).length));
this._widthUnits=AjxStringUtil.getUnitsFromSizeString(_acf);
}
}
this._sortable=_ad0;
this._resizeable=_ad1;
this._visible=(_ad2!==false);
this._name=name||_acd;
}
function DwtButton(_ad5,_ad6,_ad7,_ad8,_ad9,id,_adb){
if(arguments.length==0){
return;
}
_ad7=_ad7||"DwtButton";
DwtLabel.call(this,_ad5,_ad6,_ad7,_ad8,id,_adb);
this._origClassName=_ad7;
this._origClassNameFocused=_ad7+DwtButton.__KBFOCUS_STR;
this._disabledClassName=this._className+"-"+DwtCssStyle.DISABLED;
if(_ad6&DwtButton.ALWAYS_FLAT){
this._activatedClassName=this._className;
this._triggeredClassName=this._className;
this._toggledClassName=this._className;
}else{
this._activatedClassName=this._className+"-"+DwtCssStyle.ACTIVATED;
this._triggeredClassName=this._className+"-"+DwtCssStyle.TRIGGERED;
this._toggledClassName=this._className+"-"+DwtCssStyle.TOGGLED;
}
var _adc=[DwtEvent.ONCONTEXTMENU,DwtEvent.ONDBLCLICK,DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEMOVE,DwtEvent.ONMOUSEUP,DwtEvent.ONSELECTSTART];
if(AjxEnv.isIE){
_adc.push(DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE);
}else{
_adc.push(DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT);
}
this._setEventHdlrs(_adc);
this._mouseOverListenerObj=new AjxListener(this,DwtButton.prototype._mouseOverListener);
this._mouseOutListenerObj=new AjxListener(this,DwtButton.prototype._mouseOutListener);
this._mouseDownListenerObj=new AjxListener(this,DwtButton.prototype._mouseDownListener);
this._mouseUpListenerObj=new AjxListener(this,DwtButton.prototype._mouseUpListener);
this._addMouseListeners();
this._dropDownEvtMgr=new AjxEventMgr();
this._toggled=false;
this._actionTiming=_ad9?_ad9:DwtButton.ACTION_MOUSEUP;
this.__preventMenuFocus=null;
}
DwtButton.prototype=new DwtLabel;
DwtButton.prototype.constructor=DwtButton;
DwtButton.TOGGLE_STYLE=DwtLabel._LAST_STYLE*2;
DwtButton.ALWAYS_FLAT=DwtLabel._LAST_STYLE*4;
DwtButton.ACTION_MOUSEUP=1;
DwtButton.ACTION_MOUSEDOWN=2;
DwtButton.__KBFOCUS_STR="-"+DwtCssStyle.FOCUSED;
DwtButton.prototype.toString=function(){
return "DwtButton";
};
DwtButton.prototype.addSelectionListener=function(_add){
this.addListener(DwtEvent.SELECTION,_add);
};
DwtButton.prototype.removeSelectionListener=function(_ade){
this.removeListener(DwtEvent.SELECTION,_ade);
};
DwtButton.prototype.removeSelectionListeners=function(){
this.removeAllListeners(DwtEvent.SELECTION);
};
DwtButton.prototype.addDropDownSelectionListener=function(_adf){
return this._dropDownEvtMgr.addListener(DwtEvent.SELECTION,_adf);
};
DwtButton.prototype.removeDropDownSelectionListener=function(_ae0){
this._dropDownEvtMgr.removeListener(DwtEvent.SELECTION,_ae0);
};
DwtButton.prototype.setDropDownImages=function(_ae1,_ae2,_ae3,_ae4){
this._dropDownImg=_ae1;
this._dropDownDisImg=_ae2;
this._dropDownHovImg=_ae3;
this._dropDownDepImg=_ae4;
};
DwtButton.prototype._addMouseListeners=function(){
this.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListenerObj);
this.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListenerObj);
this.addListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListenerObj);
this.addListener(DwtEvent.ONMOUSEUP,this._mouseUpListenerObj);
};
DwtButton.prototype._removeMouseListeners=function(){
this.removeListener(DwtEvent.ONMOUSEOVER,this._mouseOverListenerObj);
this.removeListener(DwtEvent.ONMOUSEOUT,this._mouseOutListenerObj);
this.removeListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListenerObj);
this.removeListener(DwtEvent.ONMOUSEUP,this._mouseUpListenerObj);
};
DwtButton.prototype.setEnabled=function(_ae5){
if(_ae5!=this._enabled){
DwtLabel.prototype.setEnabled.call(this,_ae5);
if(_ae5){
this.__setClassName(this._origClassName);
this._addMouseListeners();
if(this._menu){
this._setupDropDownCellMouseHandlers();
AjxImg.setImage(this._dropDownCell,this._dropDownImg);
}
}else{
this.__setClassName(this._disabledClassName);
this._removeMouseListeners();
if(this._menu){
this._removeDropDownCellMouseHandlers();
AjxImg.setImage(this._dropDownCell,this._dropDownDisImg);
}
}
}
};
DwtButton.prototype.setHoverImage=function(_ae6){
this._hoverImageInfo=_ae6;
};
DwtButton.prototype.setMenu=function(_ae7,_ae8,_ae9){
this._menu=_ae7;
this._shouldToggleMenu=(_ae8===true);
this._followIconStyle=_ae9;
if(this._menu){
if(!this._dropDownCell){
var idx=(this._imageCell)?1:0;
if(this._textCell){
idx++;
}
this._dropDownCell=this._row.insertCell(idx);
this._dropDownCell.id=Dwt.getNextId();
this._dropDownCell.className="dropDownCell";
if(this._dropDownImg==null){
this._dropDownImg="SelectPullDownArrow";
}
if(this._dropDownDisImg==null){
this._dropDownDisImg="SelectPullDownArrowDis";
}
if(this._dropDownHovImg==null){
this._dropDownHovImg="SelectPullDownArrowHover";
}
AjxImg.setImage(this._dropDownCell,this._dropDownImg);
if(this._enabled){
this._setupDropDownCellMouseHandlers();
}
}
if(!(this._menu instanceof AjxCallback)){
this._menu.setAssociatedElementId(this._dropDownCell.id);
}
if((this.__preventMenuFocus!=null)&&(this._menu instanceof DwtMenu)){
this._menu.dontStealFocus(this.__preventMenuFocus);
}
}else{
if(this._dropDownCell){
this._row.deleteCell(Dwt.getCellIndex(this._dropDownCell));
this._dropDownCell=null;
}
}
};
DwtButton.prototype._setupDropDownCellMouseHandlers=function(){
Dwt.setHandler(this._dropDownCell,DwtEvent.ONMOUSEDOWN,DwtButton._dropDownCellMouseDownHdlr);
Dwt.setHandler(this._dropDownCell,DwtEvent.ONMOUSEUP,DwtButton._dropDownCellMouseUpHdlr);
};
DwtButton.prototype._removeDropDownCellMouseHandlers=function(){
Dwt.clearHandler(this._dropDownCell,DwtEvent.ONMOUSEDOWN);
Dwt.clearHandler(this._dropDownCell,DwtEvent.ONMOUSEUP);
};
DwtButton.prototype.getMenu=function(){
if(this._menu instanceof AjxCallback){
var _aeb=this._menu;
this.setMenu(_aeb.run());
if((this.__preventMenuFocus!=null)&&(this._menu instanceof DwtMenu)){
this._menu.dontStealFocus(this.__preventMenuFocus);
}
}
return this._menu;
};
DwtButton.prototype.resetClassName=function(){
this.__setClassName(this._origClassName);
};
DwtButton.prototype.setActionTiming=function(_aec){
this._actionTiming=_aec;
};
DwtButton.prototype.setActivated=function(_aed){
if(_aed){
this.__setClassName(this._activatedClassName);
}else{
this.__setClassName(this._origClassName);
}
};
DwtButton.prototype.setEnabledImage=function(_aee){
this._enabledImageInfo=_aee;
this.setImage(_aee);
};
DwtButton.prototype.setDepressedImage=function(_aef){
this._depressedImageInfo=_aef;
};
DwtButton.prototype.setToggled=function(_af0){
if((this._style&DwtButton.TOGGLE_STYLE)&&this._toggled!=_af0){
this._toggled=_af0;
this.__setClassName((_af0)?this._toggledClassName:this._origClassName);
}
};
DwtButton.prototype.isToggled=function(){
return this._toggled;
};
DwtButton.prototype.popup=function(){
var menu=this.getMenu();
if(!menu){
return;
}
var p=menu.parent;
var pb=p.getBounds();
var ws=menu.shell.getSize();
var s=menu.getSize();
var _af6=p.getHtmlElement();
var ptw=Dwt.toWindow(_af6,0,0);
var _af8=(_af6.style.borderLeftWidth=="")?0:parseInt(_af6.style.borderLeftWidth);
var x=ptw.x+_af8;
var _afa=(_af6.style.borderTopWidth=="")?0:parseInt(_af6.style.borderTopWidth);
_afa+=(_af6.style.borderBottomWidth=="")?0:parseInt(_af6.style.borderBottomWidth);
var y=ptw.y+pb.height+_afa;
x=((x+s.x)>=ws.x)?x-(x+s.x-ws.x):x;
menu.popup(0,x,y);
};
DwtButton.prototype.getKeyMapName=function(){
return "DwtButton";
};
DwtButton.prototype.handleKeyAction=function(_afc,ev){
switch(_afc){
case DwtKeyMap.SELECT:
this._emulateSingleClick();
break;
case DwtKeyMap.SUBMENU:
var menu=this.getMenu();
if(!menu){
return false;
}
this._emulateDropDownClick();
menu.setSelectedItem(0);
break;
}
return true;
};
DwtButton.prototype._emulateSingleClick=function(){
this.trigger();
var _aff=this.getHtmlElement();
var p=Dwt.toWindow(_aff);
var mev=DwtShell.mouseEvent;
mev.reset();
mev.target=_aff;
mev.button=DwtMouseEvent.LEFT;
mev.docX=p.x;
mev.docY=p.y;
if(this._actionTiming==DwtButton.ACTION_MOUSEDOWN){
this._mouseDownListener(mev);
}else{
this._mouseUpListener(mev);
}
};
DwtButton.prototype._emulateDropDownClick=function(){
var _b02=this._dropDownCell;
var p=Dwt.toWindow(_b02);
var mev=DwtShell.mouseEvent;
mev.reset();
mev.target=_b02;
mev.button=DwtMouseEvent.LEFT;
mev.docX=p.x;
mev.docY=p.y;
DwtButton._dropDownCellMouseDownHdlr(mev);
};
DwtButton.prototype._focusByMouseUpEvent=function(){
};
DwtButton.prototype._focus=function(){
this.__setClassName(this.getClassName());
};
DwtButton.prototype._blur=function(){
this.__setClassName(this.getClassName());
};
DwtButton.prototype._toggleMenu=function(){
if(this._shouldToggleMenu){
if(!this._menu.isPoppedup()){
this.popup();
this._menuUp=true;
}else{
this._menu.popdown();
this._menuUp=false;
}
}else{
this.popup();
}
};
DwtButton.prototype._mouseOverListener=function(ev){
if(this._hoverImageInfo){
this.setImage(this._hoverImageInfo);
}
this.__setClassName(this._activatedClassName);
if(this._dropDownCell&&this._dropDownHovImg&&!this.noMenuBar&&this.isListenerRegistered(DwtEvent.SELECTION)){
AjxImg.setImage(this._dropDownCell,this._dropDownHovImg);
}
ev._topPropagation=true;
};
DwtButton.prototype._mouseDownListener=function(ev){
if(ev.button!=DwtMouseEvent.LEFT){
return;
}
if(this._dropDownCell&&this._dropDownDepImg){
AjxImg.setImage(this._dropDownCell,this._dropDownDepImg);
}
switch(this._actionTiming){
case DwtButton.ACTION_MOUSEDOWN:
this.trigger();
if(this.isListenerRegistered(DwtEvent.SELECTION)){
var _b07=DwtShell.selectionEvent;
DwtUiEvent.copy(_b07,ev);
_b07.item=this;
_b07.detail=typeof this.__detail=="undefined"?0:this.__detail;
this.notifyListeners(DwtEvent.SELECTION,_b07);
}else{
if(this._menu){
this._toggleMenu();
}
}
break;
case DwtButton.ACTION_MOUSEUP:
this.trigger();
break;
}
};
DwtButton.prototype.trigger=function(){
if(this._depressedImageInfo){
this.setImage(this._depressedImageInfo);
}
this.__setClassName(this._triggeredClassName);
this.isTriggered=true;
};
DwtButton.prototype.deactivate=function(){
if(this._hoverImageInfo){
this.setImage(this._hoverImageInfo);
}
if(this._style&DwtButton.TOGGLE_STYLE){
this._toggled=!this._toggled;
}
this.__setClassName((!this._toggled)?this._activatedClassName:this._toggledClassName);
};
DwtButton.prototype.dontStealFocus=function(val){
if(val==null){
val=true;
}
if(this._menu instanceof DwtMenu){
this._menu.dontStealFocus(val);
}
this.__preventMenuFocus=val;
};
DwtButton.prototype._mouseUpListener=function(ev){
if(ev.button!=DwtMouseEvent.LEFT){
return;
}
if(this._dropDownCell&&this._dropDownHovImg&&!this.noMenuBar){
AjxImg.setImage(this._dropDownCell,this._dropDownHovImg);
}
switch(this._actionTiming){
case DwtButton.ACTION_MOUSEDOWN:
this.deactivate();
break;
case DwtButton.ACTION_MOUSEUP:
var el=this.getHtmlElement();
if(this.isTriggered){
this.deactivate();
if(this.isListenerRegistered(DwtEvent.SELECTION)){
var _b0b=DwtShell.selectionEvent;
DwtUiEvent.copy(_b0b,ev);
_b0b.item=this;
_b0b.detail=typeof this.__detail=="undefined"?0:this.__detail;
this.notifyListeners(DwtEvent.SELECTION,_b0b);
}else{
if(this._menu){
this._toggleMenu();
}
}
}
break;
}
};
DwtButton.prototype._setMouseOutClassName=function(){
this.__setClassName((this._toggled)?this._toggledClassName:this._origClassName);
};
DwtButton.prototype._mouseOutListener=function(ev){
if(this._hoverImageInfo){
this.setImage(this._enabledImageInfo);
}
this._setMouseOutClassName();
this.isTriggered=false;
if(this._dropDownCell){
AjxImg.setImage(this._dropDownCell,this._dropDownImg);
}
};
DwtButton._dropDownCellMouseDownHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _b0f=DwtShell.mouseEvent;
_b0f.setFromDhtmlEvent(ev);
if(_b0f.button==DwtMouseEvent.LEFT){
if(this._depImg){
AjxImg.setImage(this,this._depImg);
}
DwtEventManager.notifyListeners(DwtEvent.ONMOUSEDOWN,_b0f);
if(obj._menu instanceof AjxCallback){
obj.popup();
}
if(obj._dropDownEvtMgr.isListenerRegistered(DwtEvent.SELECTION)){
var _b10=DwtShell.selectionEvent;
DwtUiEvent.copy(_b10,_b0f);
_b10.item=obj;
obj._dropDownEvtMgr.notifyListeners(DwtEvent.SELECTION,_b10);
}else{
if(_b0f.button==DwtMouseEvent.LEFT){
obj._toggleMenu();
}
}
}
_b0f._stopPropagation=true;
_b0f._returnValue=false;
_b0f.setToDhtmlEvent(ev);
return false;
};
DwtButton._dropDownCellMouseUpHdlr=function(ev){
var _b12=DwtShell.mouseEvent;
_b12.setFromDhtmlEvent(ev);
if(_b12.button==DwtMouseEvent.LEFT){
if(this._hovImg&&!this.noMenuBar){
AjxImg.setImage(this,this._hovImg);
}
}
_b12._stopPropagation=true;
_b12._returnValue=false;
_b12.setToDhtmlEvent(ev);
return false;
};
DwtButton.prototype.__setClassName=function(_b13){
if(this.hasFocus()){
if(_b13==this._origClassName){
_b13+=DwtButton.__KBFOCUS_STR;
}
}else{
if(_b13==this._origClassNameFocused){
_b13=this._origClassName;
}
}
this.setClassName(_b13);
};
function DwtMenuItem(_b14,_b15,_b16,_b17,_b18,_b19){
_b18=_b18||"DwtMenuItem";
DwtComposite.call(this,_b14,_b18,_b19);
if(!(_b14 instanceof DwtMenu)){
throw new DwtException("Parent must be a DwtMenu object",DwtException.INVALIDPARENT,"DwtMenuItem");
}
this._style=_b15?_b15:DwtMenuItem.CASCADE_STYLE;
if(_b14._style==DwtMenu.BAR_STYLE&&this._style!=DwtMenuItem.PUSH_STYLE){
throw new DwtException("DwtMenuItemInit: invalid style",DwtException.INVALID_PARAM,"DwtMenuItem");
}
this._setMouseEventHdlrs();
this._origClassName=_b18;
this._selectedClassName=_b18+"-"+DwtCssStyle.SELECTED;
this._triggeredClassName=_b18+"-"+DwtCssStyle.TRIGGERED;
this._iconAreaClassName=_b18+"-IconArea";
this._iconAreaSelClassname=this._iconAreaClassName+"-"+DwtCssStyle.SELECTED;
this._checkedAreaClassName=_b18+"-CheckedArea";
this._checkedAreaSelClassname=this._checkedAreaClassName+"-"+DwtCssStyle.SELECTED;
this._table=document.createElement("table");
this._table.cellSpacing=this._table.cellPadding=0;
this._table.border=0;
this._table.borderCollapse="separate";
this._row=this._table.insertRow(0);
switch(this._style){
case DwtMenuItem.SEPARATOR_STYLE:
this._createSeparatorStyle();
break;
case DwtMenuItem.PUSH_STYLE:
this._createPushStyle();
break;
case DwtMenuItem.RADIO_STYLE:
case DwtMenuItem.CHECK_STYLE:
this._createCheckedStyle(_b16);
break;
case DwtMenuItem.SELECT_STYLE:
this._createSelectStyle();
break;
default:
this._createCascadeStyle();
}
this._mouseOverListenerObj=new AjxListener(this,DwtMenuItem.prototype._mouseOverListener);
this._mouseOutListenerObj=new AjxListener(this,DwtMenuItem.prototype._mouseOutListener);
this._mouseUpListenerObj=new AjxListener(this,DwtMenuItem.prototype._mouseUpListener);
this._mouseDownListenerObj=new AjxListener(this,DwtMenuItem.prototype._mouseDownListener);
this.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListenerObj);
this.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListenerObj);
this.addListener(DwtEvent.ONMOUSEUP,this._mouseUpListenerObj);
this.addListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListenerObj);
this.getHtmlElement().appendChild(this._table);
if(_b14._addItem){
_b14._addItem(this,_b17);
}
this.setCursor("pointer");
this._menu=null;
this._menuDisposeListener=new AjxListener(this,DwtMenuItem.prototype._menuDisposed);
}
DwtMenuItem.prototype=new DwtComposite;
DwtMenuItem.prototype.constructor=DwtMenuItem;
DwtMenuItem.prototype.toString=function(){
return "DwtMenuItem";
};
DwtMenuItem.CHECKED=1;
DwtMenuItem.UNCHECKED=2;
DwtMenuItem.NO_STYLE=0;
DwtMenuItem.CHECK_STYLE=1;
DwtMenuItem.RADIO_STYLE=2;
DwtMenuItem.SEPARATOR_STYLE=3;
DwtMenuItem.CASCADE_STYLE=4;
DwtMenuItem.PUSH_STYLE=5;
DwtMenuItem.SELECT_STYLE=6;
DwtMenuItem._IMAGECELL_DIM="22px";
DwtMenuItem._CASCADE_DIM="16px";
DwtMenuItem._CHECKEDCELL_DIM="13px";
DwtMenuItem._FILLCELL_DIM="7px";
DwtMenuItem._SEPAARATOR_DIM="1px";
DwtMenuItem._MENU_POPUP_DELAY=250;
DwtMenuItem._MENU_POPDOWN_DELAY=250;
DwtMenuItem.create=function(_b1a,_b1b,text,_b1d,_b1e,_b1f,_b20,idx,_b22,_b23){
var mi=new DwtMenuItem(_b1a,_b1f,_b20,idx,_b22,_b23);
if(_b1b){
mi.setImage(_b1b);
}
if(text){
mi.setText(text);
}
if(_b1d){
mi.setDisabledImage(_b1d);
}
mi.setEnabled(_b1e!==false);
return mi;
};
DwtMenuItem.prototype.addSelectionListener=function(_b25){
this.addListener(DwtEvent.SELECTION,_b25);
};
DwtMenuItem.prototype.removeSelectionListener=function(_b26){
this.removeListener(DwtEvent.SELECTION,_b26);
};
DwtMenuItem.prototype.getChecked=function(){
return this._itemChecked;
};
DwtMenuItem.prototype.setChecked=function(_b27,_b28){
this._setChecked(_b27,null,_b28);
};
DwtMenuItem.prototype._setChecked=function(_b29,ev,_b2b){
if((this._style==DwtMenuItem.CHECK_STYLE||this._style==DwtMenuItem.RADIO_STYLE)&&this._itemChecked!=_b29){
this._itemChecked=_b29;
if(_b29){
if(this._style==DwtMenuItem.CHECK_STYLE){
AjxImg.setImage(this._checkedCell,"MenuCheck");
}else{
AjxImg.setImage(this._checkedCell,"MenuRadio");
this.parent._radioItemSelected(this,_b2b);
}
var gp=this.parent.parent?this.parent.parent:null;
if(gp&&(gp instanceof DwtButton)&&(gp._followIconStyle==this._style)){
gp.setImage(this._imageInfo);
}
}else{
AjxImg.setImage(this._checkedCell,"Blank_9");
}
if(_b2b){
return;
}
var _b2d=DwtShell.selectionEvent;
if(ev){
DwtUiEvent.copy(_b2d,ev);
}else{
_b2d.reset();
}
_b2d.item=this;
_b2d.detail=(_b29)?DwtMenuItem.CHECKED:DwtMenuItem.UNCHECKED;
this.notifyListeners(DwtEvent.SELECTION,_b2d);
}
};
DwtMenuItem.prototype.setEnabled=function(_b2e){
if(_b2e!=this._enabled){
DwtControl.prototype.setEnabled.call(this,_b2e);
if(_b2e){
this.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListenerObj);
this.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListenerObj);
this.addListener(DwtEvent.ONMOUSEUP,this._mouseUpListenerObj);
this.addListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListenerObj);
if(this._imageInfo){
this._setImage(this._imageInfo);
}
if(this._textCell){
this._textCell.className="Text";
}
}else{
this.removeListener(DwtEvent.ONMOUSEOVER,this._mouseOverListenerObj);
this.removeListener(DwtEvent.ONMOUSEOUT,this._mouseOutListenerObj);
this.removeListener(DwtEvent.ONMOUSEUP,this._mouseUpListenerObj);
this.removeListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListenerObj);
if(this._disabledImageInfo){
this._setImage(this._disabledImageInfo);
}
if(this._textCell){
this._textCell.className="DisabledText";
}
}
}
};
DwtMenuItem.prototype.getDisabledImage=function(){
return this._disabledImage;
};
DwtMenuItem.prototype.setDisabledImage=function(_b2f){
this._disabledImageInfo=_b2f;
if(!this._enabled&&_b2f){
this._setImage(_b2f);
}
};
DwtMenuItem.prototype.getImage=function(){
return this._imageInfo;
};
DwtMenuItem.prototype.setImage=function(_b30){
this._imageInfo=_b30;
if(this._enabled||(!this._enabled&&!this._disabledImageInfo)){
this._setImage(_b30);
}
};
DwtMenuItem.prototype._setImage=function(_b31){
if(this._imageInfo==null){
return;
}
if(this._iconCell==null){
this._addIconCell();
this.parent._menuItemHasIcon();
}
if(this._style!=DwtMenuItem.SEPARATOR_STYLE){
AjxImg.setImage(this._iconCell,_b31);
}
};
DwtMenuItem.prototype.getMenu=function(){
if(this._menu instanceof AjxCallback){
var _b32=this._menu;
this.setMenu(_b32.run());
}
return this._menu;
};
DwtMenuItem.prototype.setMenu=function(_b33){
if((this.parent instanceof DwtMenu)&&(this.parent.__preventMenuFocus!=null)&&(_b33 instanceof DwtMenu)){
_b33.dontStealFocus(this.parent.__preventMenuFocus);
}
if(this._menu==_b33){
return;
}
if(this._menu&&!(this._menu instanceof AjxCallback)){
this._menu.removeDisposeListener(this._menuDisposeListener);
}
if(this._style==DwtMenuItem.CASCADE_STYLE||this._style==DwtMenuItem.CHECK_STYLE||this._style==DwtMenuItem.RADIO_STYLE){
if(_b33){
if(!this._menu){
this.parent._submenuItemAdded();
}
AjxImg.setImage(this._cascCell,"Cascade");
}else{
if(!_b33){
if(this._menu){
this.parent._submenuItemRemoved();
}
if(this._cascCell){
AjxImg.setImage(this._cascCell,"Blank_16");
}
}
}
}
this._menu=_b33;
if(_b33&&!(_b33 instanceof AjxCallback)){
_b33.addDisposeListener(this._menuDisposeListener);
}
};
DwtMenuItem.prototype.setSize=function(_b34,_b35){
DwtComposite.prototype.setSize.call(this,_b34,_b35);
if(_b34!=DwtControl.DEFAULT){
_b34=(typeof (_b34)=="number")?_b34+"px":_b34;
this._table.style.width=_b34;
}
if(_b35!=DwtControl.DEFAULT){
_b35=(typeof (_b35)=="number")?_b35+"px":_b35;
this._table.style.height=_b35;
}
};
DwtMenuItem.prototype.getText=function(){
if((this._style==DwtMenuItem.SEPARATOR_STYLE)!=0){
return null;
}
return this._textCell.innerHTML;
};
DwtMenuItem.prototype.getStyle=function(){
return this._style;
};
DwtMenuItem.prototype.setText=function(text){
if((this._style==DwtMenuItem.SEPARATOR_STYLE)!=0){
return;
}
this._textCell.innerHTML=text;
};
DwtMenuItem.prototype._createSeparatorStyle=function(){
var _b37=this._className+"-Separator";
this._table.style.width="100%";
fillCell=this._row.insertCell(0);
fillCell.innerHTML="<div class='"+_b37+"'></div>";
};
DwtMenuItem.prototype._createPushStyle=function(){
var i=0;
this._textCell=this._row.insertCell(i++);
this._textCell.className="Text";
if(this.parent._menuHasItemsWithIcons()){
this._addIconCell();
}
};
DwtMenuItem.prototype._createSelectStyle=function(){
this._table.style.width="100%";
this._textCell=this._row.insertCell(-1);
this._textCell.className="Text";
};
DwtMenuItem.prototype._createCascadeStyle=function(){
this._table.style.width="100%";
var i=0;
this._textCell=this._row.insertCell(i++);
this._textCell.className="Text";
if(this.parent._menuHasSubmenus()){
this._submenuItemAdded();
}
if(this.parent._menuHasCheckedItems()){
this._checkItemAdded();
}
if(this.parent._menuHasItemsWithIcons()){
this._addIconCell();
}
};
DwtMenuItem.prototype._createCheckedStyle=function(_b3a){
this._createCascadeStyle();
this._checkItemAdded();
this._radioGroupId=(_b3a!=null)?_b3a:0;
this._itemChecked=false;
};
DwtMenuItem.prototype._checkItemAdded=function(_b3b){
if(this._checkedCell==null){
this._checkedCell=this._row.insertCell(0);
this._checkedCell.noWrap=true;
this._checkedCell.align="center";
this._checkedCell.width=DwtMenuItem._CHECKEDCELL_DIM;
this._checkedCell.height=(this._style!=DwtMenuItem.SEPARATOR_STYLE)?DwtMenuItem._CHECKEDCELL_DIM:DwtMenuItem._SEPAARATOR_DIM;
if(_b3b==null){
_b3b=this._checkedAreaClassName;
}
this._checkedCell.className=_b3b;
}
};
DwtMenuItem.prototype._checkedItemsRemoved=function(){
this._row.deleteCell(0);
this._checkedCell=null;
};
DwtMenuItem.prototype._submenuItemAdded=function(){
if(this._style!=DwtMenuItem.SEPARATOR_STYLE){
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._style!=DwtMenuItem.SEPARATOR_STYLE){
this._row.deleteCell(this._row.cells.length-1);
this._cascCell=null;
}
};
DwtMenuItem.prototype._addIconCell=function(){
if(this._iconCell==null){
var i=(!this._checkedCell)?0:1;
this._iconCell=this._row.insertCell(i++);
this._iconCell.noWrap=true;
this._iconCell.align="center";
this._iconCell.width=DwtMenuItem._IMAGECELL_DIM;
this._iconCell.height=(this._style!=DwtMenuItem.SEPARATOR_STYLE)?DwtMenuItem._IMAGECELL_DIM:DwtMenuItem._SEPAARATOR_DIM;
this._iconCell.className=this._iconAreaClassName;
}
};
DwtMenuItem.prototype._menuDisposed=function(ev){
this.setMenu(null);
};
DwtMenuItem.prototype._popupMenu=function(_b3e,_b3f){
var menu=this.getMenu();
var pp=this.parent.parent;
var pb=this.getBounds();
var ws=menu.shell.getSize();
var s=menu.getSize();
var x;
var y;
var _b47;
var _b48;
var _b49=pp.getHtmlElement();
if(pp._style==DwtMenu.BAR_STYLE){
_b47=(_b49.style.borderLeftWidth=="")?0:parseInt(_b49.style.borderLeftWidth);
x=pb.x+_b47;
_b48=(_b49.style.borderTopWidth=="")?0:parseInt(_b49.style.borderTopWidth);
_b48+=(_b49.style.borderBottomWidth=="")?0:parseInt(_b49.style.borderBottonWidth);
y=pb.y+pb.height+_b48;
x=((x+s.x)>=ws.x)?x-(x+s.x-ws.x):x;
}else{
_b47=(_b49.style.borderLeftWidth=="")?0:parseInt(_b49.style.borderLeftWidth);
_b47+=(_b49.style.borderRightWidth=="")?0:parseInt(_b49.style.borderRightWidth);
x=pb.x+pb.width+_b47;
_b48=(_b49.style.borderTopWidth=="")?0:parseInt(_b49.style.borderTopWidth);
y=pb.y+_b48;
x=((x+s.x)>=ws.x)?pb.x-s.x-_b47:x;
}
menu.popup(_b3e,x,y,_b3f);
};
DwtMenuItem.prototype._popdownMenu=function(){
this._deselect(0);
};
DwtMenuItem.prototype._deselect=function(msec){
if(this._style==DwtMenuItem.CASCADE_STYLE||this._style==DwtMenuItem.CHECK_STYLE||this._style==DwtMenuItem.RADIO_STYLE){
if(this._iconCell){
this._iconCell.className=this._iconAreaClassName;
}
if(this._checkedCell){
this._checkedCell.className=this._checkedAreaClassName;
}
msec=(msec==null)?DwtMenuItem._MENU_POPDOWN_DELAY:msec;
}
var menu=this.getMenu();
if(menu){
menu.popdown(msec);
}
this.setClassName(this._origClassName);
this.setCursor("pointer");
this._isSelected=false;
};
DwtMenuItem.prototype._isMenuPoppedup=function(){
var menu=this.getMenu();
return (menu&&menu.isPoppedup())?true:false;
};
DwtMenuItem.prototype._mouseOverListener=function(ev){
if(this.parent.__selectedId!=this._htmlElId&&this._menu){
this._deselect(0);
}
this.parent.__selectedId=this._htmlElId;
if(this._style==DwtMenuItem.SEPARATOR_STYLE){
return;
}
var _b4e=this.parent.__currentItem;
if(_b4e&&_b4e._isSelected){
_b4e._deselect();
}
var _b4f=this.parent._getActiveItem();
if(_b4f){
_b4f._deselect();
}
this.parent.setCurrentItem(this);
if(this._style==DwtMenuItem.CASCADE_STYLE||this._style==DwtMenuItem.CHECK_STYLE||this._style==DwtMenuItem.RADIO_STYLE){
if(this._iconCell){
this._iconCell.className=this._iconAreaSelClassName;
}
if(this._checkedCell){
this._checkedCell.className=this._checkedAreaSelClassName;
}
if(this._menu&&!ev.ersatz){
this._popupMenu(DwtMenuItem._MENU_POPUP_DELAY);
}
this.setSelectedStyle();
}else{
if(this._style==DwtMenuItem.PUSH_STYLE||this._style==DwtMenuItem.SELECT_STYLE){
if(_b4f&&this._menu&&!ev.ersatz){
this._popupMenu(0);
this.setSelectedStyle();
}else{
this.setSelectedStyle();
}
}
}
ev._stopPropagation=true;
};
DwtMenuItem.prototype.setSelectedStyle=function(){
this.setClassName(this._selectedClassName);
this._isSelected=true;
};
DwtMenuItem.prototype.setTriggeredStyle=function(){
this.setCursor("wait");
this.setClassName(this._triggeredClassName);
};
DwtMenuItem.prototype._mouseOutListener=function(ev){
if(this._style==DwtMenuItem.SEPARATOR_STYLE){
return;
}
var menu=this.getMenu();
if(menu==null||!menu.isPoppedup()){
this._deselect();
}
};
DwtMenuItem.prototype._mouseDownListener=function(ev){
if(ev.button!=DwtMouseEvent.LEFT){
return;
}
this.setTriggeredStyle();
};
DwtMenuItem.prototype._mouseUpListener=function(ev){
if(ev.button!=DwtMouseEvent.LEFT){
return;
}
if(this._style==DwtMenuItem.CHECK_STYLE){
this._deselect();
this._setChecked(!this._itemChecked,ev);
DwtMenu.closeActiveMenu();
}else{
if(this._style==DwtMenuItem.RADIO_STYLE){
if(!this._itemChecked){
this._setChecked(!this._itemChecked,ev);
if(this._menu){
this._popupMenu(0);
}else{
DwtMenu.closeActiveMenu();
}
}else{
if(this._menu){
this._popupMenu(0);
}else{
DwtMenu.closeActiveMenu();
var _b54=DwtShell.selectionEvent;
if(ev){
DwtUiEvent.copy(_b54,ev);
}else{
_b54.reset();
}
_b54.item=this;
_b54.detail=(this._itemChecked)?DwtMenuItem.CHECKED:DwtMenuItem.UNCHECKED;
this.notifyListeners(DwtEvent.SELECTION,_b54);
}
}
}else{
if(this._style!=DwtMenuItem.PUSH_STYLE){
if(this._menu){
this._popupMenu(0);
}else{
if(this.isListenerRegistered(DwtEvent.SELECTION)){
this._deselect();
var _b54=DwtShell.selectionEvent;
DwtUiEvent.copy(_b54,ev);
_b54.item=_b54.dwtObj;
_b54.detail=0;
this.notifyListeners(DwtEvent.SELECTION,_b54);
DwtMenu.closeActiveMenu();
}else{
this._deselect();
DwtMenu.closeActiveMenu();
}
}
}else{
if(this._style==DwtMenuItem.PUSH_STYLE){
if(this._menu){
if(!this._isMenuPoppedup()){
this._popupMenu(0);
}else{
this._deselect(0);
}
}
}
}
}
}
return true;
};
function DwtMenu(_b55,_b56,_b57,_b58,_b59){
if(arguments.length==0){
return;
}
if(_b55){
if(_b55 instanceof DwtMenuItem||_b55 instanceof DwtButton){
if(_b56==DwtMenu.GENERIC_WIDGET_STYLE){
this._style=DwtMenu.GENERIC_WIDGET_STYLE;
}else{
this._style=DwtMenu.DROPDOWN_STYLE;
}
}else{
this._style=_b56||DwtMenu.POPUP_STYLE;
}
if(!_b58){
_b58=(this._style==DwtMenu.BAR_STYLE)?DwtControl.STATIC_STYLE:DwtControl.ABSOLUTE_STYLE;
}
}
_b57=_b57||"DwtMenu";
DwtComposite.call(this,(_b55 instanceof DwtShell)?_b55:_b55.shell,_b57,_b58);
this.parent=_b55;
if(_b55==null){
return;
}
this._dialog=_b59;
var _b5a=this.getHtmlElement();
Dwt.setLocation(_b5a,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;
_b5a.appendChild(this._table);
this._table.backgroundColor=DwtCssStyle.getProperty(_b5a,"background-color");
}
if(_b56!=DwtMenu.BAR_STYLE){
this.setZIndex(Dwt.Z_HIDDEN);
this._isPoppedup=false;
}else{
DwtMenu._activeMenuIds.add(_b5a.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((this.parent instanceof DwtMenuItem&&this.parent.parent._style==DwtMenu.BAR_STYLE)||!(this.parent instanceof DwtMenuItem)){
this._outsideListener=new AjxListener(this,this._outsideMouseDownListener);
}
this._numCheckedStyleItems=0;
this._menuItemsHaveIcons=false;
this._menuItemsWithSubmenus=0;
this.__currentItem=null;
this.__preventMenuFocus=false;
this._menuCapObj=new DwtMouseEventCapture(this,"DwtMenu",null,DwtMenu._capMouseDownHdlr,null,null,null,false);
this._tabGroup=new DwtTabGroup(this.toString(),true);
this._tabGroup.addMember(this);
}
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._activeMenuUp=false;
DwtMenu._activeMenuIds=new AjxVector();
DwtMenu.prototype.addPopupListener=function(_b5b){
this.addListener(DwtEvent.POPUP,_b5b);
};
DwtMenu.prototype.removePopupListener=function(_b5c){
this.removeListener(DwtEvent.POPUP,_b5c);
};
DwtMenu.prototype.addPopdownListener=function(_b5d){
this.addListener(DwtEvent.POPDOWN,_b5d);
};
DwtMenu.prototype.removePopdownListener=function(_b5e){
this.removeListener(DwtEvent.POPDOWN,_b5e);
};
DwtMenu.prototype.getItem=function(_b5f){
return this._children.get(_b5f);
};
DwtMenu.prototype.getItemById=function(key,id){
var _b62=this.getItems();
for(var i=0;i<_b62.length;i++){
var _b64=_b62[i].getData(key);
if(_b64==id){
return _b62[i];
}
}
return null;
};
DwtMenu.prototype.getItemCount=function(){
return this._children.size();
};
DwtMenu.prototype.getItems=function(){
return this._children.getArray();
};
DwtMenu.prototype.getSelectedItem=function(_b65){
var a=this._children.getArray();
for(var i=0;i<a.length;i++){
var mi=a[i];
if((!_b65||(mi._style==_b65))&&mi.getChecked()){
return mi;
}
}
return null;
};
DwtMenu.prototype.isPoppedup=function(){
return this._isPoppedup;
};
DwtMenu.prototype.popup=function(msec,x,y,_b6c){
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&&msec&&msec>0)){
return;
}else{
if(this._popupActionId!=-1){
AjxTimedAction.cancelAction(this._popupActionId);
this._popupActionId=-1;
}
}
if(!msec){
this._doPopup(x,y,_b6c);
}else{
this._popupAction.args=[x,y,_b6c];
this._popupActionId=AjxTimedAction.scheduleAction(this._popupAction,msec);
}
}
};
DwtMenu.prototype.popdown=function(msec){
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(msec==null||msec==0){
this._doPopdown();
}else{
this._popdownActionId=AjxTimedAction.scheduleAction(this._popdownAction,msec);
}
}
};
DwtMenu.prototype.getKeyMapName=function(){
return "DwtMenu";
};
DwtMenu.prototype.handleKeyAction=function(_b6e,ev){
switch(this._style){
case DwtMenu.BAR_STYLE:
case DwtMenu.POPUP_STYLE:
case DwtMenu.DROPDOWN_STYLE:
break;
default:
return false;
}
switch(_b6e){
case DwtKeyMap.SELECT_NEXT:
case DwtKeyMap.SELECT_PREV:
this.setSelectedItem(_b6e==DwtKeyMap.SELECT_NEXT);
break;
case DwtKeyMap.SELECT:
var mev=DwtShell.mouseEvent;
this._setMouseEvent(mev,true,this.__currentItem,DwtMouseEvent.LEFT,false,false,false,0,0);
this.__currentItem._mouseUpListener(mev);
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:
this.popdown(0);
break;
default:
return false;
}
return true;
};
DwtMenu.prototype.setCurrentItem=function(_b71){
this.__currentItem=_b71;
};
DwtMenu.prototype._setMouseEvent=function(mev,_b73,_b74,_b75,ctrl,_b77,alt,docX,docY){
mev.reset();
mev.target=_b74.getHtmlElement();
mev.button=_b75;
mev.docX=docX;
mev.docY=docY;
mev.shiftKey=_b77;
mev.altKey=alt;
mev.ctrlKey=ctrl;
mev.dwtObj=_b74;
mev.ersatz=_b73;
};
DwtMenu.prototype._focus=function(){
};
DwtMenu.prototype._blur=function(){
};
DwtMenu.prototype.setAssociatedObj=function(_b7b){
this._associatedObj=_b7b;
};
DwtMenu.prototype.setAssociatedElementId=function(id){
this._associatedElId=id;
};
DwtMenu.prototype.checkItem=function(_b7d,_b7e,_b7f){
var _b80=this._children.getArray();
for(var i=0;i<_b80.length;i++){
var item=_b80[i];
if(item._style!=DwtMenuItem.CHECK_STYLE&&item._style!=DwtMenuItem.RADIO_STYLE){
continue;
}
var val=item.getData(_b7d);
if(val==_b7e){
item.setChecked(true,_b7f);
}
}
};
DwtMenu.prototype.setSelectedItem=function(_b84){
var _b85=this.__currentItem;
if(typeof (_b84)=="boolean"){
_b85=!_b85?this._children.get(0):_b84?this._children.getNext(_b85):this._children.getPrev(_b85);
}else{
_b85=this._children.get(_b84);
}
while(_b85&&(_b85.getStyle()==DwtMenuItem.SEPARATOR_STYLE||!_b85.getEnabled())){
_b85=(_b84===false)?this._children.getPrev(_b85):this._children.getNext(_b85);
}
if(!_b85){
return;
}
var mev=DwtShell.mouseEvent;
if(this.__currentItem){
this._setMouseEvent(mev,true,this.__currentItem,null,false,false,false,0,0);
this.__currentItem._mouseOutListener(mev);
}
this._setMouseEvent(mev,true,_b85,null,false,false,false,0,0);
_b85._mouseOverListener(mev);
};
DwtMenu.prototype.clearExternallySelectedItems=function(){
if(this._externallySelected!=null){
this._externallySelected._deselect();
this._externallySelected=null;
}
};
DwtMenu.prototype.removeChild=function(_b87){
if(this._style==DwtMenu.BAR_STYLE){
var cell=_b87.getHtmlElement().parentNode;
this._table.rows[0].deleteCell(Dwt.getCellIndex(cell));
}else{
var sz=this._children.size();
if(sz>1&&(_b87._style==DwtMenuItem.CHECK_STYLE||_b87._style==DwtMenuItem.RADIO_STYLE)){
if(this._numCheckedStyleItems==1){
var a=this._children.getArray();
for(var i=0;i<sz;i++){
if(a[i]!=_b87){
a[i]._checkedItemsRemoved();
}
}
}
this._numCheckedStyleItems--;
}
if(sz>1&&_b87.getMenu()){
this._submenuItemRemoved();
}
var el=_b87.getHtmlElement();
if(el){
this._table.deleteRow(el.parentNode.parentNode.rowIndex);
}
}
this._children.remove(_b87);
};
DwtMenu.prototype.addChild=function(_b8d){
if((_b8d instanceof DwtColorPicker)||(_b8d instanceof DwtCalendar)||(this._style==DwtMenu.GENERIC_WIDGET_STYLE)){
this._addItem(_b8d);
}
};
DwtMenu.prototype._addItem=function(item,_b8f){
if(this._style==DwtMenu.COLOR_PICKER_STYLE||this._style==DwtMenu.CALENDAR_PICKER_STYLE||this._style==DwtMenu.GENERIC_WIDGET_STYLE){
if(this._children.size()>0||!(item.parent instanceof DwtMenu)||((this._style==DwtMenu.COLOR_PICKER_STYLE&&!(item instanceof DwtColorPicker))||(this._style==DwtMenu.CALENDAR_PICKER_STYLE&&!(item instanceof DwtCalendar))||(this._style==DwtMenu.GENERIC_WIDGET_STYLE&&!(item instanceof DwtControl)))){
throw new DwtException("Invalid child",DwtException.INVALID_PARAM,"DwtMenu.prototype._addItem");
}
this._children.add(item);
item.reparentHtmlElement(this.getHtmlElement());
}else{
var row;
var col;
if(this._style==DwtMenu.BAR_STYLE){
var rows=this._table.rows;
row=(rows.length!=0)?rows[0]:this._table.insertRow(0);
if(_b8f==null||_b8f>row.cells.length){
_b8f=rows.cells.length;
}
col=row.insertCell(_b8f);
col.align="center";
col.vAlign="middle";
var spc=row.insertCell(-1);
spc.nowrap=true;
spc.width="7px";
}else{
if(item._style==DwtMenuItem.CHECK_STYLE||item._style==DwtMenuItem.RADIO_STYLE){
if(this._numCheckedStyleItems==0){
var sz=this._children.size();
if(sz>0){
var a=this._children.getArray();
for(var i=0;i<sz;i++){
if(a[i]._style!=DwtMenuItem.CHECK_STYLE&&a[i]._style!=DwtMenuItem.RADIO_STYLE){
a[i]._checkItemAdded();
}
}
}
}
this._numCheckedStyleItems++;
}
if(_b8f==null||_b8f>this._table.rows.length){
_b8f=-1;
}
row=this._table.insertRow(_b8f);
col=row.insertCell(0);
}
col.noWrap=true;
col.appendChild(item.getHtmlElement());
this._children.add(item,_b8f);
}
};
DwtMenu.prototype._radioItemSelected=function(_b97,_b98){
var _b99=_b97._radioGroupId;
var sz=this._children.size();
var a=this._children.getArray();
for(var i=0;i<sz;i++){
if(a[i]!=_b97&&a[i]._style==DwtMenuItem.RADIO_STYLE&&a[i]._radioGroupId==_b99&&a[i]._itemChecked){
a[i].setChecked(false,_b98);
break;
}
}
};
DwtMenu.prototype._menuHasCheckedItems=function(){
return (this._numCheckedStyleItems>0);
};
DwtMenu.prototype._menuHasSubmenus=function(){
return (this._menuItemsWithSubmenus>0);
};
DwtMenu.prototype._menuHasItemsWithIcons=function(){
return this._menuItemsHaveIcons;
};
DwtMenu.prototype._menuItemHasIcon=function(item){
if(!this._menuItemsHaveIcons){
var sz=this._children.size();
if(sz>0){
var a=this._children.getArray();
for(var i=0;i<sz;i++){
if(a[i]!=item){
a[i]._addIconCell();
}
}
}
}
this._menuItemsHaveIcons=true;
};
DwtMenu.prototype._submenuItemAdded=function(){
if(this._menuItemsWithSubmenus==0){
var sz=this._children.size();
var a=this._children.getArray();
for(var i=0;i<sz;i++){
a[i]._submenuItemAdded();
}
}
this._menuItemsWithSubmenus++;
};
DwtMenu.prototype._submenuItemRemoved=function(){
if(this._menuItemsWithSubmenus==1){
var sz=this._children.size();
var a=this._children.getArray();
for(var i=0;i<sz;i++){
a[i]._submenuItemRemoved();
}
}
this._menuItemsWithSubmenus--;
};
DwtMenu.prototype.dontStealFocus=function(val){
if(val==null){
val=true;
}
this.__preventMenuFocus=!!val;
};
DwtMenu.prototype._doPopup=function(x,y,_baa){
var ws=this.shell.getSize();
var s=this.getSize();
ws.y-=10+AjxEnv.isIE?20:0;
if(((this._style==DwtMenu.POPUP_STYLE||(this._style==DwtMenu.DROPDOWN_STYLE&&this.parent instanceof DwtMenuItem))&&s.y>=ws.y)||(this._style==DwtMenu.DROPDOWN_STYLE&&y+s.y>=ws.y)){
var _bad=ws.y;
var newY=null;
if(this._style==DwtMenu.DROPDOWN_STYLE&&!(this.parent instanceof DwtMenuItem)){
_bad=ws.y-y;
var _baf=this.parent.getBounds().y;
var _bb0=_bad;
if(_bad<50||(s.y>_bb0&&s.y<_baf&&_baf/_bb0>2)){
_bad=_baf;
newY=_baf;
}
}
var rows=this._table.rows;
var _bb2=rows.length;
var _bb3=s.y;
for(var i=_bb2-1;i>=0;i--){
var row=rows[i];
_bb3-=AjxEnv.isSafari?15:Dwt.getSize(row).y;
if(_bb3<_bad){
break;
}
}
var _bb6=i+1;
for(var j=_bb6;j<_bb2;j++){
var row=rows[(j-_bb6)%_bb6];
var cell=row.insertCell(-1);
cell.className="DwtMenuCascadeCell";
var _bb9=rows[j].cells[0].firstChild;
while(_bb9!=null){
cell.appendChild(_bb9);
_bb9=_bb9.nextSibling;
}
}
for(j=rows.length-1;j>=_bb6;j--){
this._table.deleteRow(_bb6);
}
var _bba=_bb2%_bb6;
if(_bba>0){
for(var j=_bba;j<_bb6;j++){
var row=rows[j];
var cell=row.insertCell(-1);
cell.className="DwtMenuCascadeCell";
cell.empty=true;
cell.innerHTML="&nbsp;";
}
}
s=this.getSize();
if(newY){
y=newY-s.y;
}
}
var newX=((x+s.x)>=ws.x)?x-(x+s.x-ws.x):x;
var newY=((y+s.y)>=ws.y)?y-(y+s.y-ws.y):y;
this.setLocation(newX,newY);
this.notifyListeners(DwtEvent.POPUP,this);
var _bbc=this.shell.getToolTip();
if(_bbc){
_bbc.popdown();
}
var _bbd=this._dialog?Dwt.Z_DIALOG_MENU:Dwt.Z_MENU;
this.setZIndex(_bbd);
this._popupActionId=-1;
this._isPoppedup=true;
if(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;
DwtEventManager.addListener(DwtEvent.ONMOUSEDOWN,DwtMenu._outsideMouseDownListener);
DwtEventManager.addListener(DwtEvent.ONMOUSEWHEEL,DwtMenu._outsideMouseDownListener);
}
DwtMenu._activeMenuIds.add(this._htmlElId);
DwtMenu._activeMenuIds.sort();
if(!this._menuCapObj.capturing()){
this._menuCapObj.capture();
this._capturing=true;
}else{
this._capturing=false;
}
if(AjxEnv.isGeckoBased&&this._table){
var _bbe=this.getHtmlElement();
_bbe.style.width=s.x+"px";
}
if(!this.__preventMenuFocus){
DwtShell.getShell(window).getKeyboardMgr().pushTabGroup(this._tabGroup);
}
if(_baa){
this.handleKeyAction(DwtKeyMap.SELECT_NEXT);
}
};
DwtMenu.prototype.getSize=function(_bbf){
if(this._table){
return Dwt.getSize(this._table,_bbf);
}
return DwtComposite.prototype.getSize.call(this,_bbf);
};
DwtMenu.prototype._doPopdown=function(){
var a=this._children.getArray();
var s=this._children.size();
for(var i=0;i<s;i++){
if((a[i] instanceof DwtMenuItem)&&a[i]._style!=DwtMenuItem.SEPARATOR_STYLE){
a[i]._popdownMenu();
}
}
this.setZIndex(Dwt.Z_HIDDEN);
this.setLocation(Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
this.notifyListeners(DwtEvent.POPDOWN,this);
if(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;
DwtEventManager.removeListener(DwtEvent.ONMOUSEDOWN,DwtMenu._outsideMouseDownListener);
DwtEventManager.removeListener(DwtEvent.ONMOUSEWHEEL,DwtMenu._outsideMouseDownListener);
}
DwtMenu._activeMenuIds.remove(this._htmlElId);
this._popdownActionId=-1;
this._isPoppedup=false;
if(this._capturing){
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 _bc3=this._table.rows[0].cells.length;
var _bc4=this._table.rows.length;
for(var i=1;i<_bc3;i++){
for(var j=0;j<_bc4;j++){
var cell=this._table.rows[j].cells[i];
if(!cell.empty){
var _bc7=cell.firstChild;
var row=this._table.insertRow(this._table.rows.length);
var cell=row.insertCell(0);
while(_bc7!=null){
cell.appendChild(_bc7);
_bc7=_bc7.nextSibling;
}
}
}
}
for(var j=0;j<_bc4;j++){
var row=this._table.rows[j];
for(var i=row.cells.length-1;i>0;i--){
row.deleteCell(i);
}
}
}
this.__currentItem=null;
DwtShell.getShell(window).getKeyboardMgr().popTabGroup(this._tabGroup);
};
DwtMenu.prototype._getActiveItem=function(){
var a=this._children.getArray();
var s=this._children.size();
for(var i=0;i<s;i++){
if(a[i]._isMenuPoppedup()){
return a[i];
}
}
return null;
};
DwtMenu._outsideMouseDownListener=function(ev){
if(DwtMenu._activeMenuUp){
var menu=DwtMenu._activeMenu;
var _bce=DwtUiEvent.getDwtObjFromEvent(ev);
if(menu._associatedObj&&menu._associatedObj==_bce){
return false;
}
var id=menu._htmlElId;
var _bd0=DwtUiEvent.getTarget(ev);
while(_bd0!=null){
if(_bd0.id&&_bd0.id!=""&&(_bd0.id==id||_bd0.id==menu._associatedElId||DwtMenu._activeMenuIds.binarySearch(_bd0.id)!=-1)){
return false;
}
_bd0=_bd0.parentNode;
}
menu.popdown();
}
ev._stopPropagation=false;
ev._returnValue=true;
return true;
};
DwtMenu._capMouseDownHdlr=function(ev){
var menu=DwtMouseEventCapture.getTargetObj();
var _bd3=DwtShell.mouseEvent;
_bd3.setFromDhtmlEvent(ev);
DwtMenu._outsideMouseDownListener(_bd3);
DwtUiEvent.setBehaviour(ev,false,true);
return true;
};
DwtMenu.menuShowing=function(){
return DwtMenu._activeMenuUp;
};
DwtMenu.closeActiveMenu=function(){
if(DwtMenu._activeMenuUp){
DwtMenu._activeMenu.popdown();
}
};
function DwtMessageDialog(_bd4,_bd5,_bd6,_bd7){
if(arguments.length==0){
return;
}
this._msgCellId=Dwt.getNextId();
_bd6=_bd6?_bd6:[DwtDialog.OK_BUTTON];
DwtDialog.call(this,_bd4,_bd5,null,_bd6,_bd7);
this.setContent(this._contentHtml());
this._msgCell=document.getElementById(this._msgCellId);
this.addEnterListener(new AjxListener(this,this._enterListener));
}
DwtMessageDialog.prototype=new DwtDialog;
DwtMessageDialog.prototype.constructor=DwtMessageDialog;
DwtMessageDialog.CRITICAL_STYLE=1;
DwtMessageDialog.INFO_STYLE=2;
DwtMessageDialog.WARNING_STYLE=3;
DwtMessageDialog.TITLE=new Object();
DwtMessageDialog.TITLE[DwtMessageDialog.CRITICAL_STYLE]=AjxMsg.criticalMsg;
DwtMessageDialog.TITLE[DwtMessageDialog.INFO_STYLE]=AjxMsg.infoMsg;
DwtMessageDialog.TITLE[DwtMessageDialog.WARNING_STYLE]=AjxMsg.warningMsg;
DwtMessageDialog.ICON=new Object();
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(_bd8,_bd9,_bda){
_bd9=_bd9?_bd9:DwtMessageDialog.INFO_STYLE;
_bda=_bda?_bda:DwtMessageDialog.TITLE[_bd9];
this.setTitle(_bda);
if(_bd8){
var html=new Array();
var i=0;
html[i++]="<table cellspacing=0 cellpadding=0 border=0><tr>";
html[i++]="<td valign='top'>";
html[i++]=AjxImg.getImageHtml(DwtMessageDialog.ICON[_bd9]);
html[i++]="</td><td class='DwtMsgArea'>";
html[i++]=_bd8;
html[i++]="</td></tr></table>";
this._msgCell.innerHTML=html.join("");
}else{
this._msgCell.innerHTML="";
}
};
DwtMessageDialog.prototype.reset=function(){
this._msgCell.innerHTML="";
DwtDialog.prototype.reset.call(this);
};
DwtMessageDialog.prototype.handleKeyAction=function(_bdd,ev){
switch(_bdd){
case DwtKeyMap.CANCEL:
var _bdd=(this._button[DwtDialog.CANCEL_BUTTON])?_bdd:DwtKeyMap.ENTER;
default:
DwtDialog.prototype.handleKeyAction.call(this,_bdd,ev);
}
return true;
};
DwtMessageDialog.prototype._contentHtml=function(){
return "<div id='"+this._msgCellId+"' class='DwtMsgDialog'></div>";
};
DwtMessageDialog.prototype._enterListener=function(ev){
this._runEnterCallback();
};
function DwtHtmlEditor(_be0,_be1,_be2,_be3,mode,_be5){
if(arguments.length==0){
return;
}
this.setBlankIframeSrc(_be5);
_be1=_be1||"DwtHtmlEditor";
DwtComposite.call(this,_be0,_be1,_be2);
this._mode=mode==DwtHtmlEditor.HTML&&this.isHtmlEditingSupported()?mode:DwtHtmlEditor.TEXT;
this.__eventClosure=AjxCallback.simpleClosure(this.__eventClosure,this);
if(!_be3){
_be3=this._mode==DwtHtmlEditor.HTML?"<html><head></head><body></body></html>":"";
}
this._pendingContent=_be3;
this._htmlModeInited=false;
this._initialize();
}
DwtHtmlEditor.prototype=new DwtComposite();
DwtHtmlEditor.prototype.constructor=DwtHtmlEditor;
DwtHtmlEditor.HTML=1;
DwtHtmlEditor.TEXT=2;
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.DIRECTION_R2L;
DwtHtmlEditor.DIRECTION_L2R;
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._ARIAL_RE=/arial|helvetica|sans-serif/;
DwtHtmlEditor._TIMES_RE=/times|serif/;
DwtHtmlEditor._VERDANA_RE=/verdana/;
DwtHtmlEditor._COURIER_RE=/courier|mono/;
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._KEY2CMDS={"b":DwtHtmlEditor.BOLD_STYLE,"i":DwtHtmlEditor.ITALIC_STYLE,"u":DwtHtmlEditor.UNDERLINE_STYLE,"s":DwtHtmlEditor.STRIKETHRU_STYLE,"l":DwtHtmlEditor.JUSTIFY_LEFT,"e":DwtHtmlEditor.JUSTIFY_CENTER,"r":DwtHtmlEditor.JUSTIFY_RIGHT,"j":DwtHtmlEditor.JUSTIFY_FULL,"1":DwtHtmlEditor._STYLES[1],"2":DwtHtmlEditor._STYLES[1],"3":DwtHtmlEditor._STYLES[3],"4":DwtHtmlEditor._STYLES[4],"5":DwtHtmlEditor._STYLES[5],"6":DwtHtmlEditor._STYLES[6],"0":"DUMP"};
DwtHtmlEditor.prototype.focus=function(){
if(!AjxEnv.isIE&&this._mode==DwtHtmlEditor.TEXT){
document.getElementById(this._textAreaId).focus();
}else{
try{
this._getIframeWin().focus();
if(AjxEnv.isIE){
if(this._currInsPt){
if(this._currInsPt.text.length<=1){
this._currInsPt.collapse(false);
}
this._currInsPt.select();
}
}
}
catch(ex){
}
}
};
DwtHtmlEditor.prototype.moveCaretToTop=function(){
if(this._mode==DwtHtmlEditor.TEXT){
var _be6=document.getElementById(this._textAreaId);
if(_be6.createTextRange){
var _be7=_be6.createTextRange();
_be7.collapse(true);
_be7.select();
}else{
if(_be6.setSelectionRange){
_be6.setSelectionRange(0,0);
}
}
}else{
this._moveCaretToTopHtml(true);
}
};
DwtHtmlEditor.prototype._moveCaretToTopHtml=function(_be8){
var body=this._getIframeDoc().body;
var _bea=false;
if(AjxEnv.isIE){
if(body){
body.createTextRange().collapse(true);
_bea=true;
}
}else{
var _beb=this._getSelection();
if(_beb){
_beb.collapse(body,0);
_bea=true;
}
}
if(!_bea&&_be8){
var _bec=new AjxTimedAction(this,this._moveCaretToTopHtml);
AjxTimedAction.scheduleAction(_bec,DwtHtmlEditor._INITDELAY+1);
}
};
DwtHtmlEditor.prototype.addStateChangeListener=function(_bed){
this.addListener(DwtEvent.STATE_CHANGE,_bed);
};
DwtHtmlEditor.prototype.removeStateChangeListener=function(_bee){
this.removeListener(DwtEvent.STATE_CHANGE,_bee);
};
DwtHtmlEditor.prototype.clear=function(){
this.setContent("");
};
DwtHtmlEditor.prototype.enable=function(_bef){
if(this._textAreaId!=null){
document.getElementById(this._textAreaId).disabled=!_bef;
}
if(this._iFrameId!=null){
document.getElementById(this._iFrameId).disabled=!_bef;
}
};
DwtHtmlEditor.prototype.setBlankIframeSrc=function(src){
this._blankIframeSrc=src;
};
DwtHtmlEditor.prototype.isHtmlEditingSupported=function(){
return (!AjxEnv.isGeckoBased&&!AjxEnv.isIE)?false:true;
};
DwtHtmlEditor.prototype.getContent=function(){
if(this._mode==DwtHtmlEditor.HTML){
var _bf1=this._getIframeDoc();
var html=_bf1&&_bf1.body?(this._getIframeDoc().body.innerHTML):"";
return this._embedHtmlContent(html);
}else{
return document.getElementById(this._textAreaId).value;
}
};
DwtHtmlEditor.prototype._embedHtmlContent=function(html){
return ["<html><body>",html,"</body></html>"].join("");
};
DwtHtmlEditor.prototype.setContent=function(_bf4){
if(AjxEnv.isIE){
this._currInsPt=null;
}
if(this._mode==DwtHtmlEditor.HTML){
if(this._htmlModeInited){
this._pendingContent=_bf4?((_bf4 instanceof AjxVector)?_bf4[0]:_bf4):"";
this._setContentOnTimer();
}else{
var ta=new AjxTimedAction(this,this.setContent,[_bf4]);
AjxTimedAction.scheduleAction(ta,DwtHtmlEditor._INITDELAY+1);
}
}else{
document.getElementById(this._textAreaId).value=(_bf4||"");
}
};
DwtHtmlEditor.prototype.insertElement=function(_bf6){
this._execCommand(_bf6);
};
DwtHtmlEditor.prototype.insertText=function(text){
var node=this._getIframeDoc().createTextNode(text);
this._insertNodeAtSelection(node);
};
DwtHtmlEditor.prototype.insertImage=function(src){
this._execCommand(DwtHtmlEditor.IMAGE,src);
};
DwtHtmlEditor.prototype.insertTable=function(rows,cols,_bfc,_bfd,_bfe,_bff){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
var doc=this._getIframeDoc();
var _c01=doc.createElement("table");
_c01.className="DwtHtmlEditor-Table";
if(_bfc!=null){
_c01.style.width=_bfc;
}else{
_c01.style.width="100%";
}
_c01.style.textAlign="left";
_c01.style.verticalAlign="middle";
if(_bff!=null){
_c01.align=_bff.toLowerCase();
}
if(_bfd!=null){
_c01.cellSpacing=_bfd;
}else{
_c01.cellSpacing=0;
}
if(_bfe!=null){
_c01.cellPadding=_bfe;
}else{
_c01.cellPadding=0;
}
if(!AjxEnv.isIE){
_c01.style.border="1px solid #000";
}
_c01.style.borderCollapse="collapse";
var _c02;
_c02=Math.floor(100/cols)+"%";
var _c03=doc.createElement("tbody");
_c01.appendChild(_c03);
for(var i=0;i<rows;i++){
var tr=doc.createElement("tr");
_c03.appendChild(tr);
for(var j=0;j<cols;j++){
var td=doc.createElement("td");
if(i==0&&_c02){
td.style.width=_c02;
}
if(AjxEnv.isGeckoBased){
td.appendChild(doc.createElement("br"));
}else{
if(AjxEnv.isIE){
td.innerHTML="&nbsp;";
}
}
if(AjxEnv.isIE){
td.style.border="1px solid #000";
}else{
td.style.borderTop=td.style.borderLeft="1px solid #000";
}
tr.appendChild(td);
}
}
var p=doc.createElement("br");
var df=doc.createDocumentFragment();
df.appendChild(p);
df.appendChild(_c01);
df.appendChild(p.cloneNode(true));
this._insertNodeAtSelection(df);
this.selectNodeContents(_c01.rows[0].cells[0],true);
return _c01;
};
DwtHtmlEditor.prototype.applyTableProperties=function(_c0a,_c0b){
var doc=this._getIframeDoc();
var _c0d=[];
for(var i in _c0b){
var val=AjxStringUtil.trim(_c0b[i].toString());
var _c10=val!="";
switch(i){
case "caption":
var _c11=_c0a.getElementsByTagName("caption");
_c11=_c11.length>0?_c11[0]:null;
if(_c10&&!_c11){
_c11=doc.createElement("caption");
_c0a.insertBefore(_c11,_c0a.firstChild);
}
if(!_c10&&_c11){
_c11.parentNode.removeChild(_c11);
}
if(_c11){
_c11.innerHTML=val;
}
break;
case "summary":
case "align":
case "cellSpacing":
case "cellPadding":
if(!_c10){
_c0a.removeAttribute(i,0);
}else{
_c0a[i]=val;
}
break;
case "borderWidth":
case "borderStyle":
case "borderColor":
_c0a.style[i]=val;
_c0d.push([i,val]);
break;
default:
_c0a.style[i]=val;
break;
}
}
if(_c0d.length>0){
var tds=_c0a.getElementsByTagName("td");
for(var i=tds.length;--i>=0;){
var td=tds[i];
for(var j=_c0d.length;--j>=0;){
td.style[_c0d[j][0]]=_c0d[j][1];
}
}
}
if(AjxEnv.isGeckoBased){
this._forceRedraw();
}
};
DwtHtmlEditor.prototype.applyCellProperties=function(_c15,_c16,_c17){
var _c18=true;
for(var _c19=_c16.length;--_c19>=0;){
var row=_c16[_c19];
var _c1b=(_c19==0);
var _c1c=true;
for(var _c1d=row.length;--_c1d>=0;){
var _c1e=(_c1d==0);
var td=row[_c1d];
if(_c17.backgroundColor!=null){
td.style.backgroundColor=_c17.backgroundColor;
}
if(_c17.color!=null){
td.style.color=_c17.color;
}
if(_c17.textAlign!=null){
td.style.textAlign=_c17.textAlign;
}
if(_c17.verticalAlign!=null){
td.style.verticalAlign=_c17.verticalAlign;
}
if(_c17.width!=null){
if(_c17.width){
td.style.width=_c17.width+"px";
}else{
td.style.width="";
}
}
if(_c17.height!=null){
if(_c17.height){
td.style.height=_c17.height+"px";
}else{
td.style.height="";
}
}
if(_c17.vertPadding!=null){
if(_c17.vertPadding){
td.style.paddingTop=td.style.paddingBottom=_c17.vertPadding+"px";
}else{
td.style.paddingTop=td.style.paddingBottom="";
}
}
if(_c17.horizPadding!=null){
if(_c17.horizPadding){
td.style.paddingLeft=td.style.paddingRight=_c17.horizPadding+"px";
}else{
td.style.paddingLeft=td.style.paddingRight="";
}
}
var _c20=_c17.borders,b;
b=_c20[DwtHtmlEditor.BORDER_TOP];
if(b!=null&&_c1b){
td.style.borderTop=b.width+" "+b.style+" "+b.color;
}
b=_c20[DwtHtmlEditor.BORDER_MIDDLE];
if(b!=null){
b=b.width+" "+b.style+" "+b.color;
if(!_c18){
td.style.borderBottom=b;
}
if(!_c1b){
td.style.borderTop=b;
}
}
b=_c20[DwtHtmlEditor.BORDER_BOTTOM];
if(b!=null&&_c18){
td.style.borderBottom=b.width+" "+b.style+" "+b.color;
}
b=_c20[DwtHtmlEditor.BORDER_LEFT];
if(b!=null&&_c1e){
td.style.borderLeft=b.width+" "+b.style+" "+b.color;
}
b=_c20[DwtHtmlEditor.BORDER_CENTER];
if(b!=null){
b=b.width+" "+b.style+" "+b.color;
if(!_c1c){
td.style.borderRight=b;
}
if(!_c1e){
td.style.borderLeft=b;
}
}
b=_c20[DwtHtmlEditor.BORDER_RIGHT];
if(b!=null&&_c1c){
td.style.borderRight=b.width+" "+b.style+" "+b.color;
}
_c1c=false;
}
_c18=false;
}
if(AjxEnv.isGeckoBased){
this._forceRedraw();
}
};
DwtHtmlEditor.prototype._insertNodeAtSelection=function(node){
this.focus();
if(!AjxEnv.isIE){
var _c22=this._getRange();
this._getIframeWin().getSelection().removeAllRanges();
try{
_c22.deleteContents();
_c22.insertNode(node);
_c22.selectNodeContents(node);
}
catch(e){
}
}else{
var sel=this._getRange();
var _c22=sel.createRange();
var id="FOO-"+Dwt.getNextId();
try{
_c22.pasteHTML("<span id='"+id+"'></span>");
}
catch(ex){
_c22.collapse(false);
_c22.pasteHTML("<span id='"+id+"'></span>");
}
var el=this._getIframeDoc().getElementById(id);
el.parentNode.insertBefore(node,el);
el.parentNode.removeChild(el);
}
};
DwtHtmlEditor.prototype.setMode=function(mode,_c27){
if(mode==this._mode||(mode!=DwtHtmlEditor.HTML&&mode!=DwtHtmlEditor.TEXT)){
return;
}
this._mode=mode;
if(mode==DwtHtmlEditor.HTML){
var _c28=document.getElementById(this._textAreaId);
var _c29;
var idoc=this._getIframeDoc();
if(this._iFrameId!=null&&idoc){
idoc.body.innerHTML=(_c27)?AjxStringUtil.convertToHtml(_c28.value):_c28.value;
_c29=document.getElementById(this._iFrameId);
}else{
var _c2b=(_c27)?AjxStringUtil.convertToHtml(_c28.value):_c28.value;
_c2b=["<html><head></head><body>",_c2b,"</body></html>"].join("");
_c29=this._initHtmlMode(_c2b);
}
Dwt.setVisible(_c28,false);
Dwt.setVisible(_c29,true);
if(AjxEnv.isGeckoBased){
this._enableDesignMode(this._getIframeDoc());
}
}else{
var _c28=this._textAreaId!=null?document.getElementById(this._textAreaId):this._initTextMode(true);
var _c2b=(!this._pendingContent)?this._getIframeDoc().innerHTML:(this._pendingContent||"");
_c28.value=(_c27)?this._convertHtml2Text():this._getIframeDoc().innerHTML;
Dwt.setVisible(document.getElementById(this._iFrameId),false);
Dwt.setVisible(_c28,true);
}
};
DwtHtmlEditor.prototype.setTextDirection=function(_c2c){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
var dir=(_c2c==DwtHtmlEditor.DIRECTION_R2L)?"rtl":"ltr";
var el=this._getParentElement();
while(el&&!DwtHtmlEditor._BLOCK_ELEMENTS[el.nodeName.toLowerCase()]){
el=el.parentNode;
}
if(el){
el.style.direction=el.style.direction==dir?"":dir;
}
};
DwtHtmlEditor.prototype.setFont=function(_c2f,_c30,size,_c32,_c33){
if(_c2f){
this._execCommand(DwtHtmlEditor._FONT_NAME,_c2f);
}
if(_c30){
this._execCommand(_c30);
}
if(size){
this._execCommand(DwtHtmlEditor._FONT_SIZE,size);
}
if(_c32){
this._execCommand(DwtHtmlEditor._FONT_COLOR,_c32);
}
if(_c33){
this._execCommand((AjxEnv.isIE)?DwtHtmlEditor._FONT_HILITE_IE:DwtHtmlEditor._FONT_HILITE,_c33);
}
};
DwtHtmlEditor.prototype.setJustification=function(_c34){
this._execCommand(_c34);
};
DwtHtmlEditor.prototype.setIndent=function(_c35){
this._execCommand(_c35);
};
DwtHtmlEditor.prototype.setStyle=function(_c36){
this._execCommand(DwtHtmlEditor._FORMAT_BLOCK,DwtHtmlEditor._STYLES[_c36]);
};
DwtHtmlEditor.prototype.setSize=function(_c37,_c38){
DwtComposite.prototype.setSize.call(this,_c37,_c38);
var _c39=this.getHtmlElement();
if(this._iFrameId!=null){
var _c3a=document.getElementById(this._iFrameId);
_c3a.width=_c39.style.width;
_c3a.height=_c39.style.height;
}else{
var _c3b=document.getElementById(this._textAreaId);
_c3b.style.width=_c39.style.width;
_c3b.style.height=_c39.style.height;
}
};
DwtHtmlEditor.prototype.getIframe=function(){
return document.getElementById(this._iFrameId);
};
DwtHtmlEditor.prototype.getInputElement=function(){
var id=(this._mode==DwtHtmlEditor.HTML)?this._iFrameId:this._textAreaId;
return document.getElementById(id);
};
DwtHtmlEditor.prototype._initialize=function(){
if(this._mode==DwtHtmlEditor.HTML){
this._initHtmlMode(this._pendingContent);
}else{
this._initTextMode();
}
};
DwtHtmlEditor.prototype._initTextMode=function(_c3d){
var _c3e=this.getHtmlElement();
this._textAreaId="textarea_"+Dwt.getNextId();
var _c3f=document.createElement("textarea");
_c3f.className="DwtHtmlEditorTextArea";
_c3f.id=this._textAreaId;
_c3e.appendChild(_c3f);
if(!_c3d){
_c3f.value=this._pendingContent;
this._pendingContent=null;
}
return _c3f;
};
DwtHtmlEditor.prototype._initHtmlMode=function(_c40){
var _c41=this._createIFrameEl();
this._keyEvent=new DwtKeyEvent();
this._stateEvent=new DwtHtmlEditorStateEvent();
this._stateEvent.dwtObj=this;
this._updateStateAction=new AjxTimedAction(this,this._updateState);
this._pendingContent=_c40||"";
var _c42=new AjxTimedAction(this,this._finishHtmlModeInit);
AjxTimedAction.scheduleAction(_c42,DwtHtmlEditor._INITDELAY);
return _c41;
};
DwtHtmlEditor.prototype._createIFrameEl=function(){
var _c43=this.getHtmlElement();
this._iFrameId="iframe_"+Dwt.getNextId();
var _c44=document.createElement("iframe");
_c44.id=this._iFrameId;
_c44.className="DwtHtmlEditorIFrame";
_c44.setAttribute("border","0",false);
_c44.setAttribute("frameborder","0",false);
_c44.setAttribute("vspace","0",false);
_c44.setAttribute("autocomplete","off",false);
if(AjxEnv.isIE&&location.protocol=="https:"){
_c44.src=this._blankIframeSrc||"";
}
_c43.appendChild(_c44);
return _c44;
};
DwtHtmlEditor.prototype._initializeContent=function(_c45){
var _c46="<html><head></head><body>"+(_c45||"")+"</body></html>";
var doc=this._getIframeDoc();
try{
doc.write(_c46);
}
finally{
doc.close();
}
};
DwtHtmlEditor.prototype._finishHtmlModeInit=function(_c48){
var doc=this._getIframeDoc();
try{
doc.body.innerHTML=this._pendingContent||"";
}
catch(ex){
return;
}
this._enableDesignMode(doc);
this._updateState();
this._htmlModeInited=true;
if(AjxEnv.isIE){
doc.open();
doc.write(this._pendingContent||"");
doc.close();
}
this._registerEditorEventHandlers(document.getElementById(this._iFrameId),doc);
};
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 _c4a=this._getIframeDoc();
var _c4b=_c4a.selection;
var _c4c=_c4b.createRange();
if(_c4b.type=="None"||_c4b.type=="Text"){
return _c4b.createRange().parentElement();
}else{
if(_c4b.type=="Control"){
return _c4b.createRange().item(0);
}else{
return _c4a.body;
}
}
}else{
try{
var _c4c=this._getRange();
var p=_c4c.commonAncestorContainer;
if(!_c4c.collapsed&&_c4c.startContainer==_c4c.endContainer&&_c4c.startOffset-_c4c.endOffset<=1&&_c4c.startContainer.hasChildNodes()){
p=_c4c.startContainer.childNodes[_c4c.startOffset];
}
while(p.nodeType==3){
p=p.parentNode;
}
return p;
}
catch(e){
return null;
}
}
};
DwtHtmlEditor.prototype.getNearestElement=function(_c4e){
try{
var p=this._getParentElement();
_c4e=_c4e.toLowerCase();
while(p&&p.nodeName.toLowerCase()!=_c4e){
p=p.parentNode;
}
return p;
}
catch(ex){
return null;
}
};
DwtHtmlEditor.prototype.selectNodeContents=function(node,pos,_c52){
var _c53;
var _c54=(typeof pos=="boolean");
if(AjxEnv.isIE){
_c53=this._getIframeDoc().body.createTextRange();
_c53.moveToElementText(node);
(_c54)&&_c53.collapse(pos);
_c53.select();
}else{
var sel=this._getSelection();
_c53=this._getIframeDoc().createRange();
if(_c52){
_c53.selectNode(node);
}else{
_c53.selectNodeContents(node);
}
(_c54)&&_c53.collapse(pos);
sel.removeAllRanges();
sel.addRange(_c53);
}
};
DwtHtmlEditor.prototype._forceRedraw=function(){
var body=this._getIframeDoc().body;
body.style.display="none";
var self=this;
setTimeout(function(){
body.style.display="";
self.focus();
self=null;
},10);
};
DwtHtmlEditor.prototype.getSelectedCells=function(){
var _c58=null;
var sel=this._getSelection();
var _c5a,i=0;
var rows=[];
var row=null;
if(!AjxEnv.isIE){
try{
while(_c5a=sel.getRangeAt(i++)){
var td=_c5a.startContainer.childNodes[_c5a.startOffset];
if(td.parentNode!=row){
row=td.parentNode;
_c58&&rows.push(_c58);
_c58=[];
}
if(td.tagName&&/^td$/i.test(td.tagName)){
_c58.push(td);
}
}
}
catch(ex){
}
rows.push(_c58);
}else{
_c5a=sel.createRange();
var _c5e=_c5a.duplicate();
_c5a.collapse(true);
while(_c5e.compareEndPoints("EndToStart",_c5a)>=0){
var td=_c5a.parentElement();
while(td&&td.nodeName.toLowerCase()!="td"){
td=td.parentNode;
}
if(td){
if(td.parentNode!=row){
row=td.parentNode;
_c58&&rows.push(_c58);
_c58=[];
}
_c58.push(td);
_c5a.moveToElementText(td);
_c5a.collapse(false);
}
if(_c5a.move("character",1)==0){
break;
}
}
_c5e.select();
rows.push(_c58);
}
if(rows.length==0||!rows[0]||rows[0].length==0){
_c58=this.getNearestElement("td");
if(_c58){
rows=[[_c58]];
}
}
return rows;
};
DwtHtmlEditor.prototype._splitCells=function(td){
var _c60=td;
while(_c60&&_c60.nodeName.toLowerCase()!="table"){
_c60=_c60.parentNode;
}
var _c61=AjxEnv.isGeckoBased?"<br />":"";
function splitRow(td){
var n=td.rowSpan;
var nc=td.colSpan;
td.rowSpan=1;
tr=td.parentNode;
var itr=tr.rowIndex;
var trs=tr.parentNode.rows;
var _c67=td.cellIndex;
while(--n>0){
tr=trs[++itr];
var otd=td.cloneNode(false);
otd.removeAttribute("rowspan");
otd.colSpan=td.colSpan;
otd.innerHTML=_c61;
tr.insertBefore(otd,tr.cells[_c67]);
}
}
function splitCol(td){
var nc=td.colSpan;
td.colSpan=1;
tr=td.parentNode;
var ref=td.nextSibling;
while(--nc>0){
var otd=td.cloneNode(false);
otd.removeAttribute("colspan");
otd.rowSpan=td.rowSpan;
otd.innerHTML=_c61;
tr.insertBefore(otd,ref);
}
}
function splitCell(td){
var nc=td.colSpan;
splitCol(td);
var _c6f=td.parentNode.cells;
var _c70=td.cellIndex;
while(nc-->0){
splitRow(_c6f[_c70++]);
}
}
splitCell(td);
};
DwtHtmlEditor.prototype.doTableOperation=function(cmd,_c72){
var _c73=_c72.table||this.getNearestElement("table");
var td=_c72.td||this.getNearestElement("td");
var _c75,rowIndex,tr;
if(td){
_c75=td.cellIndex;
tr=td.parentNode;
rowIndex=tr.rowIndex;
}else{
_c75=0;
tr=this.getNearestElement("tr");
if(tr){
rowIndex=tr.rowIndex;
}
}
var _c76=_c72.cells;
while(true){
switch(cmd){
case "insertRowAbove":
DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertRow(td));
break;
case "insertRowUnder":
DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertRow(td,true));
break;
case "insertColumnBefore":
DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertCol(td));
break;
case "insertColumnAfter":
DwtHtmlEditor.table_fixCells(DwtHtmlEditor.table_insertCol(td,true));
break;
case "deleteRow":
for(var i=0;i<_c76.length;++i){
var td=DwtHtmlEditor.table_deleteRow(_c76[i][0]);
if(td){
this.selectNodeContents(td,true);
this.focus();
}
}
break;
case "deleteColumn":
for(var i=0;i<_c76[0].length;++i){
var td=DwtHtmlEditor.table_deleteCol(_c76[0][i]);
if(td){
this.selectNodeContents(td,true);
this.focus();
}
}
break;
case "mergeCells":
td=_c76[0][0];
var html=[td.innerHTML.replace(/<br>$/i,"")];
for(var i=0;i<_c76.length;++i){
var row=_c76[i];
for(var j=0;j<row.length;++j){
if(i||j){
html.push(row[j].innerHTML.replace(/<br>$/i,""));
row[j].parentNode.removeChild(row[j]);
}
}
}
td.colSpan=_c76[0].length;
td.rowSpan=_c76.length;
html=html.join(" ");
if(AjxEnv.isGeckoBased){
html+="<br/>";
}
td.innerHTML=html;
this.selectNodeContents(td,true);
break;
case "splitCells":
this._splitCells(td);
break;
case "deleteTable":
if(!AjxEnv.isIE){
this.selectNodeContents(_c73,null,true);
this.deleteSelectedNodes();
}else{
_c73.parentNode.removeChild(_c73);
}
break;
}
break;
}
if(AjxEnv.isGeckoBased){
this._forceRedraw();
}
this._updateState();
};
DwtHtmlEditor.prototype._getRange=function(){
var _c7b=this._getIframeDoc();
if(AjxEnv.isIE){
return _c7b.selection;
}else{
this.focus();
var _c7c=this._getIframeWin().getSelection();
if(_c7c!=null){
try{
return _c7c.getRangeAt(0);
}
catch(e){
return _c7b.createRange();
}
}else{
return _c7b.createRange();
}
}
};
DwtHtmlEditor.prototype.deleteSelectedNodes=function(){
var sel=this._getSelection();
if(AjxEnv.isGeckoBased){
sel.deleteFromDocument();
}else{
sel.clear();
}
};
DwtHtmlEditor.prototype._getSelection=function(){
if(AjxEnv.isIE){
return this._getIframeDoc().selection;
}else{
return this._getIframeWin().getSelection();
}
};
DwtHtmlEditor.prototype.__eventClosure=function(ev){
return this._handleEditorEvent(AjxEnv.isIE?this._getIframeWin().event:ev);
};
DwtHtmlEditor.prototype._registerEditorEventHandlers=function(_c7f,_c80){
var _c81=["mouseup","keydown","keypress","drag","mousedown","contextmenu"];
for(var i=0;i<_c81.length;++i){
if(AjxEnv.isIE){
_c80.attachEvent("on"+_c81[i],this.__eventClosure);
}else{
_c80.addEventListener(_c81[i],this.__eventClosure,true);
}
}
};
DwtHtmlEditor.prototype._handleEditorEvent=function(ev){
var _c84=true;
if(ev.type=="mousedown"){
DwtMenu._outsideMouseDownListener(ev);
}
if(ev.type=="contextmenu"){
var _c85=DwtShell.mouseEvent;
_c85.setFromDhtmlEvent(ev);
var pos=Dwt.getLocation(document.getElementById(this._iFrameId));
if(!AjxEnv.isIE){
var doc=this._getIframeDoc();
var sl=doc.documentElement.scrollLeft||doc.body.scrollLeft;
var st=doc.documentElement.scrollTop||doc.body.scrollTop;
pos.x-=sl;
pos.y-=st;
}
_c85.docX+=pos.x;
_c85.docY+=pos.y;
DwtControl.__mouseEvent(ev,DwtEvent.ONCONTEXTMENU,this,_c85);
_c84=_c85._returnValue;
}
var cmd=null;
if(DwtKeyEvent.isKeyPressEvent(ev)){
var ke=this._keyEvent;
ke.setFromDhtmlEvent(ev);
if(ke.ctrlKey){
var key=String.fromCharCode(ke.charCode).toLowerCase();
var _c8d=null;
switch(key){
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
cmd=DwtHtmlEditor._FORMAT_BLOCK;
_c8d=DwtHtmlEditor._KEY2CMDS[key];
break;
case "0":
try{
this.setMode((this._mode==DwtHtmlEditor.HTML)?DwtHtmlEditor.TEXT:DwtHtmlEditor.HTML,true);
}
catch(e){
}
ke._stopPropagation=true;
ke._returnValue=false;
ke.setToDhtmlEvent(ev);
_c84=false;
break;
default:
cmd=DwtHtmlEditor._KEY2CMDS[key];
break;
}
}
}
if(cmd){
this._execCommand(cmd,_c8d);
ke._stopPropagation=true;
ke._returnValue=false;
ke.setToDhtmlEvent(ev);
_c84=false;
}else{
if(ev.type=="keydown"){
_c84=DwtKeyboardMgr.__keyDownHdlr(ev);
}
}
if(AjxEnv.isIE){
var _c8e=this._getIframeDoc();
this._currInsPt=_c8e.selection.createRange();
if(_c8e.selection.type=="None"){
this._currInsPt.collapse(false);
}
}
if(this._stateUpdateActionId!=null){
AjxTimedAction.cancelAction(this._stateUpdateActionId);
}
this._stateUpdateActionId=AjxTimedAction.scheduleAction(this._updateStateAction,100);
return _c84;
};
DwtHtmlEditor.prototype._updateState=function(){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
this._stateUpdateActionId=null;
var ev=this._stateEvent;
ev.reset();
var _c90=this._getIframeDoc();
try{
ev.isBold=_c90.queryCommandState(DwtHtmlEditor.BOLD_STYLE);
ev.isItalic=_c90.queryCommandState(DwtHtmlEditor.ITALIC_STYLE);
ev.isUnderline=_c90.queryCommandState(DwtHtmlEditor.UNDERLINE_STYLE);
ev.isStrikeThru=_c90.queryCommandState(DwtHtmlEditor.STRIKETHRU_STYLE);
ev.isSuperscript=_c90.queryCommandState(DwtHtmlEditor.SUPERSCRIPT_STYLE);
ev.isSubscript=_c90.queryCommandState(DwtHtmlEditor.SUBSCRIPT_STYLE);
ev.isOrderedList=_c90.queryCommandState(DwtHtmlEditor.ORDERED_LIST);
ev.isUnorderedList=_c90.queryCommandState(DwtHtmlEditor.UNORDERED_LIST);
var _c91=_c90.queryCommandValue(DwtHtmlEditor._FONT_NAME);
if(_c91){
_c91=_c91.toLowerCase();
if(_c91.search(DwtHtmlEditor._VERDANA_RE)!=-1){
ev.fontFamily=3;
}else{
if(_c91.search(DwtHtmlEditor._ARIAL_RE)!=-1){
ev.fontFamily=0;
}else{
if(_c91.search(DwtHtmlEditor._TIMES_RE)!=-1){
ev.fontFamily=1;
}else{
if(_c91.search(DwtHtmlEditor._COURIER_RE)!=-1){
ev.fontFamily=2;
}else{
ev.fontFamily=null;
}
}
}
}
}else{
ev.fontFamily=null;
}
ev.fontSize=_c90.queryCommandValue(DwtHtmlEditor._FONT_SIZE);
ev.backgroundColor=_c90.queryCommandValue((AjxEnv.isIE)?"backcolor":"hilitecolor");
ev.color=_c90.queryCommandValue("forecolor");
if(AjxEnv.isIE){
ev.backgroundColor="#"+DwtButtonColorPicker.toHex(ev.backgroundColor,6).replace(/(..)(..)(..)/,"$3$2$1");
ev.color="#"+DwtButtonColorPicker.toHex(ev.color,6).replace(/(..)(..)(..)/,"$3$2$1");
}
ev.justification=null;
ev.direction=null;
var _c92=_c90.queryCommandValue(DwtHtmlEditor._FORMAT_BLOCK);
if(_c92){
if(_c92.search(DwtHtmlEditor._H1_RE)!=-1){
ev.style=DwtHtmlEditor.H1;
}else{
if(_c92.search(DwtHtmlEditor._H2_RE)!=-1){
ev.style=DwtHtmlEditor.H2;
}else{
if(_c92.search(DwtHtmlEditor._H3_RE)!=-1){
ev.style=DwtHtmlEditor.H3;
}else{
if(_c92.search(DwtHtmlEditor._H4_RE)!=-1){
ev.style=DwtHtmlEditor.H4;
}else{
if(_c92.search(DwtHtmlEditor._H5_RE)!=-1){
ev.style=DwtHtmlEditor.H5;
}else{
if(_c92.search(DwtHtmlEditor._H6_RE)!=-1){
ev.style=DwtHtmlEditor.H6;
}else{
if(_c92.search(DwtHtmlEditor._PARAGRAPH_RE)!=-1){
ev.style=DwtHtmlEditor.PARAGRAPH;
}else{
if(_c92.search(DwtHtmlEditor._ADDRESS_RE)!=-1){
ev.style=DwtHtmlEditor.ADDRESS;
}else{
if(_c92.search(DwtHtmlEditor._PREFORMATTED_RE)!=-1){
ev.style=DwtHtmlEditor.PREFORMATTED;
}
}
}
}
}
}
}
}
}
}
if(_c90.queryCommandState(DwtHtmlEditor.JUSTIFY_LEFT)){
ev.justification=DwtHtmlEditor.JUSTIFY_LEFT;
}else{
if(_c90.queryCommandState(DwtHtmlEditor.JUSTIFY_CENTER)){
ev.justification=DwtHtmlEditor.JUSTIFY_CENTER;
}else{
if(_c90.queryCommandState(DwtHtmlEditor.JUSTIFY_RIGHT)){
ev.justification=DwtHtmlEditor.JUSTIFY_RIGHT;
}else{
if(_c90.queryCommandState(DwtHtmlEditor.JUSTIFY_FULL)){
ev.justification=DwtHtmlEditor.JUSTIFY_FULL;
}
}
}
}
if(this.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this.notifyListeners(DwtEvent.STATE_CHANGE,ev);
}
}
catch(ex){
if(AjxEnv.isGeckoBased){
this._enableDesignMode(_c90);
}
}
};
DwtHtmlEditor.prototype._enableDesignMode=function(_c93){
if(!_c93){
return;
}
try{
_c93.designMode="on";
if(AjxEnv.isGeckoBased&&(AjxEnv.isLinux||AjxEnv.isMac)){
this._registerEditorEventHandlers(document.getElementById(this._iFrameId),_c93);
}
}
catch(ex){
if(AjxEnv.isGeckoBased){
var ta=new AjxTimedAction(this,this._enableDesignMode,[_c93]);
AjxTimedAction.scheduleAction(ta,10);
return true;
}else{
return false;
}
}
};
DwtHtmlEditor.prototype._onContentInitialized=function(){
};
DwtHtmlEditor.prototype._setContentOnTimer=function(){
var _c95=this._getIframeDoc();
try{
_c95.body.innerHTML=this._pendingContent;
if(AjxEnv.isGeckoBased){
this._enableDesignMode(_c95);
}
this._onContentInitialized();
}
catch(ex){
var ta=new AjxTimedAction(this,this._setContentOnTimer);
AjxTimedAction.scheduleAction(ta,10);
return true;
}
};
DwtHtmlEditor.prototype._execCommand=function(_c97,_c98){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
try{
this.focus();
this._getIframeDoc().execCommand(_c97,false,_c98);
}
catch(e){
this._enableDesignMode(this._getIframeDoc());
}
this._updateState();
};
DwtHtmlEditor.prototype._convertHtml2Text=function(){
var _c99=this._getIframeDoc();
return _c99&&_c99.body?AjxStringUtil.convertHtml2Text(_c99.body):"";
};
DwtHtmlEditor.table_analyzeCells=function(_c9a){
var _c9b=_c9a.parentNode.parentNode;
while(_c9b&&!/table/i.test(_c9b.tagName)){
_c9b=_c9b.parentNode;
}
var _c9c={};
var rows=_c9b.rows;
for(var i=0;i<rows.length;++i){
var _c9f=rows[i].cells;
var _ca0=0;
for(var j=0;j<_c9f.length;){
var td=_c9f[j];
var cs=td.colSpan||1;
var rs=(td.rowSpan||1)-1;
var tmp=_c9c[_ca0];
if(tmp){
if(--tmp.rs==0){
_c9c[_ca0]=null;
}
_ca0+=tmp.cs;
}
td.ZmIndex=_ca0;
if(++j<_c9f.length){
if(rs){
_c9c[_ca0]={cs:cs,rs:rs};
}
_ca0+=cs;
}
}
}
return _c9b;
};
DwtHtmlEditor.table_getCellAt=function(tr,_ca7){
var _ca8=tr.cells;
var last=null,next=null;
for(var i=0;i<_ca8.length;++i){
var td=_ca8[i];
var cs=(td.colSpan||1)-1;
if(td.ZmIndex<=_ca7&&td.ZmIndex+cs>=_ca7){
var rs=(td.rowSpan||1)-1;
return {td:td,cs:cs,rs:rs};
}else{
if(td.ZmIndex<_ca7){
last=td;
}else{
if(td.ZmIndex+cs>_ca7&&!next){
next=td;
}
}
}
}
return {last:last,next:next};
};
DwtHtmlEditor.table_getPrevCellAt=function(tr,_caf){
var _cb0=tr.parentNode;
while(_cb0&&!/table/i.test(_cb0.tagName)){
_cb0=_cb0.parentNode;
}
var rows=_cb0.rows;
for(var i=tr.rowIndex;--i>=0;){
var info=DwtHtmlEditor.table_getCellAt(rows[i],_caf);
if(info.td){
info.dist=tr.rowIndex-i;
return info;
}
}
return null;
};
DwtHtmlEditor.table_fixCells=function(_cb4){
for(var i=0;i<_cb4.length;++i){
var td=_cb4[i];
if(AjxEnv.isIE){
td.innerHTML="&nbsp;";
}else{
if(AjxEnv.isGeckoBased){
td.innerHTML="<br/>";
}
}
}
};
DwtHtmlEditor.table_insertCol=function(td,_cb8){
var _cb9=DwtHtmlEditor.table_analyzeCells(td);
var rows=_cb9.rows;
var _cbb=td.ZmIndex;
if(_cb8){
_cbb+=td.colSpan-1;
}
var _cbc=[];
var rs=0;
for(var i=0;i<rows.length;++i){
var tr=rows[i];
var info=DwtHtmlEditor.table_getCellAt(tr,_cbb);
var cc=info.td;
var _cc2=null;
if(cc){
if(cc.ZmIndex==_cbb&&!_cb8){
_cc2=tr.insertCell(cc.cellIndex);
}else{
if(cc.ZmIndex+info.cs==_cbb&&_cb8){
_cc2=tr.insertCell(cc.cellIndex+1);
}
}
if(_cc2){
rs=info.rs;
}else{
cc.colSpan=info.cs+2;
}
}else{
if(rs>0){
if(info.last){
_cc2=tr.insertCell(info.last.cellIndex+1);
}else{
if(info.next){
_cc2=tr.insertCell(info.next.cellIndex);
}
}
--rs;
}
}
if(_cc2){
_cbc.push(_cc2);
}
}
return _cbc;
};
DwtHtmlEditor.table_insertRow=function(td,_cc4){
var tr=td.parentNode;
var _cc6=DwtHtmlEditor.table_analyzeCells(td);
var _cc7=tr.rowIndex;
if(_cc4){
_cc7+=td.rowSpan;
tr=_cc6.rows[_cc7-1];
}
td=_cc6.rows[0].cells[_cc6.rows[0].cells.length-1];
var max=td.ZmIndex+td.colSpan;
var _cc9=_cc6.insertRow(_cc7);
var _cca=[];
var _ccb=tr.cells;
var _ccc;
for(var i=0;i<max;++i){
var info=DwtHtmlEditor.table_getCellAt(tr,i);
if(info.td){
if(!_cc4||!info.rs){
for(var j=0;j<=info.cs;++j){
_cca.push(_cc9.insertCell(-1));
}
}else{
if(info.rs){
info.td.rowSpan=info.rs+2;
}
}
}else{
info=DwtHtmlEditor.table_getPrevCellAt(tr,i);
if(_cc4&&info.rs==info.dist){
for(var j=0;j<=info.cs;++j){
_cca.push(_cc9.insertCell(-1));
}
}else{
info.td.rowSpan=info.rs+2;
}
}
i+=info.cs;
}
return _cca;
};
DwtHtmlEditor.table_deleteCol=function(td){
var _cd1=DwtHtmlEditor.table_analyzeCells(td);
var rows=_cd1.rows;
var _cd3=td.ZmIndex;
var tr=td.parentNode;
var _cd5;
try{
_cd5=tr.cells[td.cellIndex+1];
if(!_cd5){
_cd5=tr.cells[td.cellIndex-1];
}
}
catch(ex){
_cd5=null;
}
for(var i=0;i<rows.length;++i){
var tr=rows[i];
var info=DwtHtmlEditor.table_getCellAt(tr,_cd3);
if(info.td){
if(info.cs){
info.td.colSpan=info.cs;
}else{
tr.removeChild(info.td);
if(tr.cells.length==0){
tr.parentNode.removeChild(tr);
}
}
i+=info.rs;
}
}
if(_cd1.rows.length==0){
_cd1.parentNode.removeChild(_cd1);
}
return _cd5;
};
DwtHtmlEditor.table_deleteRow=function(td){
var tr=td.parentNode;
var _cda=DwtHtmlEditor.table_analyzeCells(td);
td=_cda.rows[0].cells[_cda.rows[0].cells.length-1];
var max=td.ZmIndex+td.colSpan;
var _cdc;
for(var i=max;--i>=0;){
var info=DwtHtmlEditor.table_getCellAt(tr,i);
if(info.td){
if(info.rs){
_cdc=_cda.rows[tr.rowIndex+1];
var tmp=DwtHtmlEditor.table_getCellAt(_cdc,i);
td=null;
if(tmp.last){
td=_cdc.insertCell(tmp.last.cellIndex+1);
}else{
if(tmp.next){
td=_cdc.insertCell(tmp.next.cellIndex);
}
}
if(td){
if(info.cs>0){
td.colSpan=info.cs+1;
}
if(info.rs>1){
td.rowSpan=info.rs;
}
}
}
tr.removeChild(info.td);
}else{
info=DwtHtmlEditor.table_getPrevCellAt(tr,i);
if(info){
if(info.rs){
info.td.rowSpan=info.rs;
i-=info.cs;
}
}
}
}
try{
_cdc=_cda.rows[tr.rowIndex+1];
if(!_cdc){
_cdc=_cda.rows[tr.rowIndex-1];
}
}
catch(ex){
_cdc=null;
}
tr.parentNode.removeChild(tr);
if(_cda.rows.length==0){
_cda.parentNode.removeChild(_cda);
}
if(_cdc){
return _cdc.cells[0];
}
};
function DwtInputField(_ce0){
if(arguments.length==0){
return;
}
this._origClassName=_ce0.className?_ce0.className:"DwtInputField";
this._errorClassName=this._origClassName+"-Error";
this._hintClassName=this._origClassName+"-hint";
this._disabledClassName=this._origClassName+"-disabled";
this._errorHintClassName=this._origClassName+"-errorhint";
DwtControl.call(this,_ce0.parent,_ce0.className,_ce0.posStyle);
this._inputEventHandlers={};
this._type=_ce0.type?_ce0.type:DwtInputField.STRING;
this._rows=_ce0.rows?_ce0.rows:1;
this._size=_ce0.size;
this._errorIconStyle=_ce0.errorIconStyle?_ce0.errorIconStyle:_ce0.validator?DwtInputField.ERROR_ICON_RIGHT:DwtInputField.ERROR_ICON_NONE;
this._validationStyle=_ce0.validationStyle?_ce0.validationStyle:DwtInputField.ONEXIT_VALIDATION;
this._hasError=false;
this._hintIsVisible=false;
this._hint=_ce0.hint;
var _ce1=Dwt.getNextId();
var _ce2=Dwt.getNextId();
var _ce3=this.getHtmlElement();
var _ce4=_ce0.skipCaretHack;
var _ce5=_ce4?"":Dwt.CARET_HACK_BEGIN;
var _ce6=_ce4?"":Dwt.CARET_HACK_END;
if(this._errorIconStyle==DwtInputField.ERROR_ICON_NONE){
if(_ce0.rows&&_ce0.rows>1){
var _ce7=[_ce5,"<textarea id='",_ce1,"' rows=",_ce0.rows];
var i=_ce7.length;
if(_ce0.size){
_ce7[i++]=" cols=";
_ce7[i++]=_ce0.size;
}
_ce7[i++]="></textarea>";
_ce7[i++]=_ce6;
_ce3.innerHTML=_ce7.join("");
}else{
_ce3.innerHTML=[_ce5,"<input id='",_ce1,"'>",_ce6].join("");
}
}else{
var _ce7=["<table cellspacing='0' cellpadding='0'><tr>"];
var i=1;
if(this._errorIconStyle==DwtInputField.ERROR_ICON_LEFT){
_ce7[i++]=["<td style='padding-right:2px;'id='",_ce2,"'></td>"].join("");
}
_ce7[i++]=["<td>",_ce5,"<input id='",_ce1,"'>",_ce6,"</td>"].join("");
if(this._errorIconStyle==DwtInputField.ERROR_ICON_RIGHT){
_ce7[i++]=["<td style='padding-left:2px;' id='",_ce2,"'></td>"].join("");
}
_ce7[i++]="</tr></table>";
_ce3.innerHTML=_ce7.join("");
if(this._errorIconStyle!=DwtInputField.ERROR_ICON_NONE){
this._errorIconTd=document.getElementById(_ce2);
this._errorIconTd.vAlign="middle";
this._errorIconTd.innerHTML=DwtInputField._NOERROR_ICON_HTML;
}
}
if(this._rows>1){
this._inputField=document.getElementById(_ce1);
Dwt.associateElementWithObject(this._inputField,this);
this._inputField.onkeyup=DwtInputField._keyUpHdlr;
this._inputField.onblur=DwtInputField._blurHdlr;
this._inputField.onfocus=DwtInputField._focusHdlr;
if(_ce0.size){
this._inputField.size=_ce0.size;
}
if(_ce0.maxLen){
this._inputField.maxLength=this._maxLen=_ce0.maxLen;
}
this._inputField.value=_ce0.initialValue||"";
}else{
var _ce9=document.getElementById(_ce1);
var _cea=this.__createInputEl(_ce0);
_ce9.parentNode.replaceChild(_cea,_ce9);
}
this.setValidatorFunction(_ce0.validatorCtxtObj,_ce0.validator);
this._setMouseEventHdlrs(false);
this._setKeyPressEventHdlr(false);
if(_ce0.required!=null){
this.setRequired(_ce0.required);
}
}
DwtInputField.prototype=new DwtControl;
DwtInputField.prototype.constructor=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.toString=function(){
return "DwtInputField";
};
DwtInputField.prototype.setHandler=function(_ceb,_cec){
if(!this._checkState()){
return;
}
this._inputEventHandlers[_ceb]=_cec;
Dwt.setHandler(this.getInputElement(),_ceb,_cec);
};
DwtInputField.prototype.setInputType=function(type){
if(type!=this._type&&this._rows==1){
this._type=type;
if(AjxEnv.isIE){
var _cee=this._inputField;
var _cef=this.__createInputEl();
_cee.parentNode.replaceChild(_cef,_cee);
}else{
this._inputField.type=this._type!=DwtInputField.PASSWORD?"text":"password";
}
}
};
DwtInputField.prototype.__createInputEl=function(_cf0){
var _cf1=this._inputField;
if(_cf1){
for(var _cf2 in this._inputEventHandlers){
_cf1.removeAttribute(_cf2);
}
Dwt.disassociateElementFromObject(_cf1,this);
}
var type=this._type!=DwtInputField.PASSWORD?"text":"password";
var _cf4=document.createElement(AjxEnv.isIE?["<INPUT type='",type,"'>"].join(""):"INPUT");
if(!AjxEnv.isIE){
_cf4.type=type;
}
this._inputField=_cf4;
var size=_cf0?_cf0.size:_cf1.size;
var _cf6=_cf0?_cf0.maxLen:_cf1.maxLength;
_cf4.autocomplete="off";
if(size){
_cf4.size=size;
}
if(_cf6){
_cf4.maxLength=_cf6;
}
_cf4.value=(_cf0?_cf0.initialValue:_cf1.value)||"";
_cf4.readonly=_cf1?_cf1.readonly:false;
Dwt.associateElementWithObject(_cf4,this);
_cf4.onkeyup=DwtInputField._keyUpHdlr;
_cf4.onblur=DwtInputField._blurHdlr;
_cf4.onfocus=DwtInputField._focusHdlr;
for(var _cf2 in this._inputEventHandlers){
_cf4[_cf2]=this._inputEventHandlers[_cf2];
}
return _cf4;
};
DwtInputField.prototype.setValidatorFunction=function(obj,_cf8){
if(_cf8){
this._validator=_cf8;
this._validatorObj=obj;
}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(_cf9,_cfa){
this._validator=_cf9;
this._validatorObj=null;
this._errorString=_cfa||"";
};
DwtInputField.prototype.setValidationCallback=function(_cfb){
this._validationCallback=_cfb;
};
DwtInputField.prototype.getInputElement=function(){
return this._inputField;
};
DwtInputField.prototype.getValue=function(){
return this._hintIsVisible?"":this._inputField.value;
};
DwtInputField.prototype.setValue=function(_cfc,_cfd){
this._inputField.value=_cfc;
if(!_cfd){
_cfc=this._validateInput(_cfc);
if(_cfc!=null){
this._inputField.value=_cfc;
}
}
if(this._hintIsVisible&&_cfc){
this._hideHint(_cfc);
}else{
if(!_cfc){
this._showHint();
}
}
};
DwtInputField.prototype.setHint=function(hint){
var _cff=this._hint;
this._hint=hint;
if(this._hintIsVisible){
this.getInputElement().value=hint;
if(!hint){
this._hintIsVisible=false;
this._updateClassName();
}
}else{
this._showHint();
}
};
DwtInputField.prototype.setValidNumberRange=function(min,max){
this._minNumVal=min;
this._maxNumVal=max;
var _d02=this._validateInput(this.getValue());
if(_d02!=null){
this.setValue(_d02);
}
};
DwtInputField.prototype.setValidStringLengths=function(_d03,_d04){
this._minLen=_d03||0;
if(_d04!=null){
this._inputField.maxLength=_d04;
this._maxLen=_d04;
}
};
DwtInputField.prototype.setNumberPrecision=function(_d05){
this._decimals=_d05;
};
DwtInputField.prototype.setReadOnly=function(_d06){
this._inputField.setAttribute("readonly",(_d06==null?true:_d06));
};
DwtInputField.prototype.setRequired=function(_d07){
var _d08=_d07==null?true:_d07;
if(this._required!=_d08){
this._required=_d08;
this.validate();
}
};
DwtInputField.prototype.getEnabled=function(){
return !this.getInputElement().disabled;
};
DwtInputField.prototype.setEnabled=function(_d09){
DwtControl.prototype.setEnabled.call(this,_d09);
this.getInputElement().disabled=!_d09;
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(_d0a){
Dwt.setVisible(this.getInputElement(),_d0a);
};
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(ex){
if(typeof ex=="string"){
return null;
}else{
throw ex;
}
}
};
DwtInputField.prototype.validate=function(){
var _d0b=this._validateInput(this.getValue());
if(_d0b!=null){
this.setValue(_d0b);
return true;
}else{
return false;
}
};
DwtInputField.validateNumber=function(_d0c){
var n=new Number(_d0c);
if(isNaN(n)||(Math.round(n)!=n)){
throw AjxMsg.notAnInteger;
}
return DwtInputField.validateFloat.call(this,_d0c);
};
DwtInputField.validateInteger=function(_d0e){
var n=new Number(_d0e);
if(isNaN(n)||(Math.round(n)!=n)||(n.toString()!=_d0e)){
throw AjxMsg.notAnInteger;
}
if(this._minNumVal&&_d0e<this._minNumVal){
throw AjxMessageFormat.format(AjxMsg.numberLessThanMin,this._minNumVal);
}
if(this._maxNumVal&&_d0e>this._maxNumVal){
throw AjxMessageFormat.format(AjxMsg.numberMoreThanMax,this._maxNumVal);
}
return _d0e;
};
DwtInputField.validateFloat=function(_d10){
if(this._required&&_d10==""){
throw AjxMsg.valueIsRequired;
}
var n=new Number(_d10);
if(isNaN(n)){
throw AjxMsg.notANumber;
}
if(this._minNumVal&&_d10<this._minNumVal){
throw AjxMessageFormat.format(AjxMsg.numberLessThanMin,this._minNumVal);
}
if(this._maxNumVal&&_d10>this._maxNumVal){
throw AjxMessageFormat.format(AjxMsg.numberMoreThanMax,this._maxNumVal);
}
if(this._decimals!=null){
var str=n.toString();
var pos=str.indexOf(".");
if(pos==-1){
pos=str.length;
}
_d10=n.toPrecision(pos+this._decimals);
}else{
_d10=n.toString();
}
return _d10;
};
DwtInputField.validateString=function(_d14){
if(this._required&&_d14==""){
throw AjxMsg.valueIsRequired;
}
if(this._minLen!=null&&_d14.length<this._minLen){
throw AjxMessageFormat.format(AjxMsg.stringTooShort,this._minLen);
}
if(this._maxLen!=null&&_d14.length>this._maxLen){
throw AjxMessageFormat.format(AjxMsg.stringTooLong,this._maxLen);
}
return _d14;
};
DwtInputField.validateDate=function(_d15){
if(this._required&&_d15==""){
throw AjxMsg.valueIsRequired;
}
if(AjxDateUtil.simpleParseDateStr(_d15)==null){
throw AjxMsg.invalidDatetimeString;
}
return _d15;
};
DwtInputField.validateAny=function(_d16){
if(this._required&&_d16==""){
throw AjxMsg.valueIsRequired;
}
return _d16;
};
DwtInputField.prototype._validateRegExp=function(_d17){
if(this._required&&_d17==""){
throw AjxMsg.valueIsRequired;
}
if(this._regExp&&!this._regExp.test(_d17)){
throw this._errorString;
}
return _d17;
};
DwtInputField._keyUpHdlr=function(ev){
var _d19=DwtShell.keyEvent;
_d19.setFromDhtmlEvent(ev);
var obj=_d19.dwtObj;
var _d1b=_d19.keyCode;
var obj=_d19.dwtObj;
if(obj.notifyListeners(DwtEvent.ONKEYUP,_d19)){
return true;
}
var val=null;
if((_d1b==13||_d1b==9)&&obj._validationStyle==DwtInputField.ONEXIT_VALIDATION){
val=obj._validateInput(obj.getValue());
}else{
if(obj._validationStyle==DwtInputField.CONTINUAL_VALIDATION){
val=obj._validateInput(obj.getValue());
}
}
if(val!=null&&val!=obj.getValue()){
obj.setValue(val);
}
return true;
};
DwtInputField._blurHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(obj){
obj._hasFocus=false;
if(obj._validationStyle==DwtInputField.ONEXIT_VALIDATION){
var val=obj._validateInput(obj.getValue());
if(val!=null){
obj.setValue(val);
}
}
if(!obj._hintIsVisible&&obj._hint){
obj._showHint();
}
}
};
DwtInputField._focusHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(obj){
if(obj._hintIsVisible){
obj._hideHint("");
}
}
};
DwtInputField.prototype._hideHint=function(_d22){
this.getInputElement().value=_d22;
this._hintIsVisible=false;
this._updateClassName();
};
DwtInputField.prototype._showHint=function(){
if(this._hint){
var _d23=this.getInputElement();
if(!_d23.value){
_d23.value=this._hint;
this._hintIsVisible=true;
this._updateClassName();
}
}
};
DwtInputField.prototype._updateClassName=function(){
var _d24;
if(!this.getEnabled()){
_d24=this._disabledClassName;
}else{
if(this._hasError){
if(this._hintIsVisible&&!this._hasFocus){
_d24=this._errorHintClassName;
}else{
_d24=this._errorClassName;
}
}else{
if(this._hintIsVisible&&!this._hasFocus){
_d24=this._hintClassName;
}else{
_d24=this._origClassName;
}
}
}
this.getHtmlElement().className=_d24;
};
DwtInputField.prototype._validateInput=function(_d25){
var _d26=true;
var _d27;
var _d28;
if(!this.getEnabled()){
_d27=this.getValue();
}else{
try{
if(typeof this._validator=="function"){
_d27=_d25=this._validatorObj?this._validator.call(this._validatorObj,_d25,this):this._validator(_d25);
}else{
if(!this._validator.test(_d25)){
_d28=this._errorString;
}
}
}
catch(ex){
if(typeof ex=="string"){
_d28=ex;
}else{
throw ex;
}
}
}
if(_d28){
this._hasError=true;
if(this._errorIconTd){
this._errorIconTd.innerHTML=DwtInputField._ERROR_ICON_HTML;
}
this.setToolTipContent(_d28);
_d26=false;
_d27=null;
}else{
this._hasError=false;
if(this._errorIconTd){
this._errorIconTd.innerHTML=DwtInputField._NOERROR_ICON_HTML;
}
this.setToolTipContent(null);
_d26=true;
}
this._updateClassName();
if(this._validationCallback){
this._validationCallback.run(this,_d26,_d25);
}
return _d27;
};
DwtInputField.prototype._focusByMouseUpEvent=function(){
if(this.getEnabled()){
this._hasFocus=true;
}
};
DwtInputField.prototype._replaceElementHook=function(oel,nel,_d2b,_d2c){
nel=this.getInputElement();
DwtControl.prototype._replaceElementHook.call(this,oel,nel,_d2b,_d2c);
if(oel.id){
nel.id=oel.id;
}
};
function DwtSash(_d2d,_d2e,_d2f,_d30,_d31){
_d2f=_d2f?_d2f:"DwtSash";
_d31=_d31?_d31:DwtControl.ABSOLUTE_STYLE;
DwtControl.call(this,_d2d,_d2f,_d31);
var _d32=this.getHtmlElement();
var _d33="ajax.dwt.templates.Widgets#";
if(_d2e==null||_d2e!=DwtSash.HORIZONTAL_STYLE){
this._style=DwtSash.VERTICAL_STYLE;
_d32.style.cursor=AjxEnv.isIE?"row-resize":"s-resize";
_d32.innerHTML=AjxTemplate.expand(_d33+"DwtVerticalSash");
}else{
this._style=DwtSash.HORIZONTAL_STYLE;
_d32.style.cursor=AjxEnv.isIE?"col-resize":"w-resize";
_d32.innerHTML=AjxTemplate.expand(_d33+"DwtHorizontalSash");
}
this._threshold=(_d30>0)?_d30:1;
this._captureObj=new DwtMouseEventCapture(this,"DwtSash",DwtSash._mouseOverHdlr,DwtSash._mouseDownHdlr,DwtSash._mouseMoveHdlr,DwtSash._mouseUpHdlr,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.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(_d34,_d35){
this._callbackFunc=_d34;
this._callbackObj=_d35;
};
DwtSash._mouseOverHdlr=function(ev){
var _d37=DwtShell.mouseEvent;
_d37.setFromDhtmlEvent(ev);
_d37._stopPropagation=true;
_d37._returnValue=false;
_d37.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseDownHdlr=function(ev){
var _d39=DwtShell.mouseEvent;
_d39.setFromDhtmlEvent(ev);
if(_d39.button!=DwtMouseEvent.LEFT){
DwtUiEvent.setBehaviour(ev,true,false);
return false;
}
var sash=_d39.dwtObj;
if(sash._callbackFunc!=null){
sash._captureObj.capture();
sash._startCoord=(sash._style==DwtSash.HORIZONTAL_STYLE)?_d39.docX:_d39.docY;
}
_d39._stopPropagation=true;
_d39._returnValue=false;
_d39.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseMoveHdlr=function(ev){
var _d3c=DwtShell.mouseEvent;
_d3c.setFromDhtmlEvent(ev);
var _d3d=0;
var sash=DwtMouseEventCapture.getTargetObj();
if(sash._style==DwtSash.HORIZONTAL_STYLE){
if(_d3c.docX>0&&_d3c.docX!=sash._startCoord){
_d3d=_d3c.docX-sash._startCoord;
}
}else{
if(_d3c.docY>0&&_d3c.docY!=sash._startCoord){
_d3d=_d3c.docY-sash._startCoord;
}
}
if(Math.abs(_d3d)>=sash._threshold){
if(sash._callbackObj!=null){
_d3d=sash._callbackFunc.call(sash._callbackObj,_d3d);
}else{
_d3d=sash._callbackFunc(_d3d);
}
sash._startCoord+=_d3d;
if(_d3d!=0&&sash.getHtmlElement().style.position==Dwt.ABSOLUTE_STYLE){
if(sash._style==DwtSash.HORIZONTAL_STYLE){
sash.setLocation(sash.getLocation().x+_d3d,Dwt.DEFAULT);
}else{
sash.setLocation(Dwt.DEFAULT,sash.getLocation().y+_d3d);
}
}
}
_d3c._stopPropagation=true;
_d3c._returnValue=false;
_d3c.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseUpHdlr=function(ev){
var _d40=DwtShell.mouseEvent;
_d40.setFromDhtmlEvent(ev);
if(_d40.button!=DwtMouseEvent.LEFT){
DwtUiEvent.setBehaviour(ev,true,false);
return false;
}
if(DwtMouseEventCapture.getTargetObj()._callbackFunc!=null){
DwtMouseEventCapture.getCaptureObj().release();
}
_d40._stopPropagation=true;
_d40._returnValue=false;
_d40.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseOutHdlr=function(ev){
var _d42=DwtShell.mouseEvent;
_d42.setFromDhtmlEvent(ev);
_d42._stopPropagation=true;
_d42._returnValue=false;
_d42.setToDhtmlEvent(ev);
return false;
};
function DwtToolBar(_d43,_d44,_d45,_d46,_d47,_d48,_d49){
if(arguments.length==0){
return;
}
_d44=_d44?_d44:"DwtToolBar";
DwtComposite.call(this,_d43,_d44,_d45);
this._style=_d49||DwtToolBar.HORIZ_STYLE;
this._table=document.createElement("table");
this._table.border=0;
this._table.cellPadding=_d47||0;
this._table.cellSpacing=_d46||0;
this._table.width=_d48||"";
this.getHtmlElement().appendChild(this._table);
this._table.backgroundColor=DwtCssStyle.getProperty(this.parent.getHtmlElement(),"background-color");
this._numFillers=0;
this._curFocusIndex=0;
var _d4a=(this._style==DwtToolBar.HORIZ_STYLE)?"horiz":"vert";
this._keyMapName=["DwtToolBar",_d4a].join("-");
}
DwtToolBar.prototype=new DwtComposite;
DwtToolBar.prototype.constructor=DwtToolBar;
DwtToolBar.HORIZ_STYLE=1;
DwtToolBar.VERT_STYLE=2;
DwtToolBar.ELEMENT=1;
DwtToolBar.SPACER=2;
DwtToolBar.SEPARATOR=3;
DwtToolBar.FILLER=4;
DwtToolBar.DEFAULT_SPACER=10;
DwtToolBar.prototype.toString=function(){
return "DwtToolBar";
};
DwtToolBar.prototype.__itemPaddingRight=AjxEnv.isIE?"4px":"0px";
DwtToolBar.prototype.getItem=function(_d4b){
return this._children.get(_d4b);
};
DwtToolBar.prototype.getItemCount=function(){
return this._children.size();
};
DwtToolBar.prototype.getItems=function(){
return this._children.toArray();
};
DwtToolBar.prototype.addSpacer=function(size,_d4d){
var el=this._createSpacerElement();
var _d4f=this._style==DwtToolBar.HORIZ_STYLE?"width":"height";
el.style[_d4f]=size?size:DwtToolBar.DEFAULT_SPACER;
this._addItem(DwtToolBar.SPACER,el,_d4d);
return el;
};
DwtToolBar.prototype._createSpacerElement=function(){
return document.createElement("div");
};
DwtToolBar.prototype.addSeparator=function(_d50,_d51){
var el=this._createSeparatorElement();
el.className=_d50;
this._addItem(DwtToolBar.SEPARATOR,el,_d51);
return el;
};
DwtToolBar.prototype._createSeparatorElement=DwtToolBar.prototype._createSpacerElement;
DwtToolBar.prototype._createFillerElement=DwtToolBar.prototype._createSpacerElement;
DwtToolBar.prototype.addFiller=function(_d53,_d54){
var el=this._createFillerElement();
if(_d53){
el.className=_d53;
}
this._addItem(DwtToolBar.FILLER,el,_d54);
return el;
};
DwtToolBar.prototype.addChild=function(_d56,_d57){
this._children.add(_d56,_d57);
var _d58=_d56._removedEl?_d56._removedEl:_d56.getHtmlElement();
this._addItem(DwtToolBar.ELEMENT,_d58,_d57);
};
DwtToolBar.prototype._addItem=function(type,_d5a,_d5b){
var row,col;
if(this._style==DwtToolBar.HORIZ_STYLE){
row=(this._table.rows.length!=0)?this._table.rows[0]:this._table.insertRow(0);
row.align="center";
row.vAlign="middle";
var _d5d=_d5b||row.cells.length;
col=row.insertCell(_d5d);
col.align="center";
col.vAlign="middle";
col.noWrap=true;
col.style.paddingRight=this.__itemPaddingRight;
if(type==DwtToolBar.FILLER){
this._numFillers++;
var perc=Math.floor(100/this._numFillers);
col.style.width=[perc,"%"].join("");
}else{
if(!AjxEnv.isGeckoBased){
col.style.width="1px";
}
}
col.appendChild(_d5a);
}else{
var _d5f=_d5b||-1;
row=this._table.insertRow(_d5f);
row.align="center";
row.vAlign="middle";
col=row.insertCell(0);
col.align="center";
col.vAlign="middle";
col.noWrap=true;
if(type==DwtToolBar.FILLER){
this._numFillers++;
var perc=Math.floor(100/this._numFillers);
col.style.height=[perc,"%"].join("");
}
col.appendChild(_d5a);
}
};
DwtToolBar.prototype._focus=function(item){
var kbm=this.shell.getKeyboardMgr();
if(kbm.isEnabled()){
var kmm=kbm.__keyMapMgr;
if(this._style==DwtToolBar.HORIZ_STYLE){
kmm.removeMapping("DwtButton","ArrowRight");
kmm.setMapping("DwtButton","ArrowDown",DwtKeyMap.SUBMENU);
}else{
kmm.removeMapping("DwtButton","ArrowDown");
kmm.setMapping("DwtButton","ArrowRight",DwtKeyMap.SUBMENU);
}
kmm.reloadMap("DwtButton");
}
item=item?item:this._getFocusItem(this._curFocusIndex);
if(item){
item._hasFocus=true;
item._focus();
}
};
DwtToolBar.prototype._blur=function(item){
item=item?item:this._getFocusItem(this._curFocusIndex);
if(item){
item._hasFocus=false;
item._blur();
}
};
DwtToolBar.prototype._getFocusItem=function(_d64){
var item=this.getItem(_d64);
if(!item||(item instanceof DwtToolBar)){
return null;
}
if(item.getEnabled&&!item.getEnabled()){
return null;
}
if(item.getVisible&&!item.getVisible()){
return null;
}
return item;
};
DwtToolBar.prototype._moveFocus=function(back){
var _d67=this._curFocusIndex;
var _d68=this.getItemCount()-1;
var item=null;
while(!item&&_d67>=0&&_d67<=_d68){
_d67=back?_d67-1:_d67+1;
item=this._getFocusItem(_d67);
}
if(item){
this._blur();
this._curFocusIndex=_d67;
this._focus(item);
}
};
DwtToolBar.prototype.getKeyMapName=function(){
return this._keyMapName;
};
DwtToolBar.prototype.handleKeyAction=function(_d6a,ev){
var item=this.getItem(this._curFocusIndex);
var _d6d=this.getItemCount();
if(_d6d<2){
return true;
}
switch(_d6a){
case DwtKeyMap.PREV:
if(this._curFocusIndex>0){
this._moveFocus(true);
}
break;
case DwtKeyMap.NEXT:
if(this._curFocusIndex<(_d6d-1)){
this._moveFocus();
}
break;
default:
if(item){
return item.handleKeyAction(_d6a,ev);
}
}
return true;
};
function DwtToolTip(_d6e,_d6f,_d70){
if(arguments.length==0){
return;
}
this.shell=_d6e;
this._dialog=_d70;
this._poppedUp=false;
this._div=document.createElement("div");
this._div.className=_d6f||"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 _d71="ajax.dwt.templates.Widgets#"+this._borderStyle;
this._div.innerHTML=AjxTemplate.expand(_d71,"tooltip");
var _d72=AjxTemplate.getParams(_d71);
this._borderWidth=Number(_d72.width);
this._borderHeight=Number(_d72.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(_d73,_d74){
this._content=_d73;
if(_d74){
this._contentDiv.innerHTML=this._content;
}
};
DwtToolTip.prototype.popup=function(x,y,_d77){
if(this._content!=null){
if(!_d77){
this._contentDiv.innerHTML=this._content;
}
var _d78=this._div;
var _d79="tooltip";
var clip=true;
var _d7b=this._dialog;
this._positionElement(_d78,x,y,_d79,clip,_d7b);
this._poppedUp=true;
}
};
DwtToolTip.prototype.popdown=function(){
if(this._content!=null&&this._poppedUp){
Dwt.setLocation(this._div,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
this._poppedUp=false;
}
};
DwtToolTip.prototype._positionElement=function(_d7c,_d7d,_d7e,_d7f,clip,_d81){
var _d82=5;
var _d83=8;
var _d84=8;
var _d85=document.getElementById(_d7f+"TopPointer");
_d85.style.display="block";
var size=Dwt.getSize(_d85),topPointerWidth=size.x,topPointerHeight=size.y;
var _d87=document.getElementById(_d7f+"BottomPointer");
_d87.style.display="block";
var size=Dwt.getSize(_d87);
bottomPointerWidth=size.x,bottomPointerHeight=size.y;
var _d88=_d85;
var _d89=DwtShell.getShell(window).getSize(),wdWidth=_d89.x,wdHeight=_d89.y;
var _d8a=Dwt.getSize(_d7c),popupWidth=_d8a.x,popupHeight=_d8a.y;
var _d8b=this._borderHeight,bottomBorderHeight=this._borderHeight,leftBorderWidth=this._borderWidth,rightBorderWidth=this._borderWidth;
var _d8c=_d7d-popupWidth/2-_d83,popupY;
var _d8d,pointerX,pointerWidth;
if(_d7e+_d84+topPointerHeight-_d8b+popupHeight<wdHeight-_d82){
_d87.style.display="none";
popupY=_d7e+_d84+topPointerHeight-_d8b;
_d8d=_d8b-topPointerHeight;
pointerWidth=topPointerWidth;
_d88=_d85;
}else{
_d85.style.display="none";
popupY=_d7e-_d84-bottomPointerHeight+bottomBorderHeight-popupHeight;
_d8d=popupHeight-bottomBorderHeight;
pointerWidth=bottomPointerWidth;
_d88=_d87;
}
var _d8e=document.getElementById(_d7f+"Contents");
if(popupWidth-leftBorderWidth-rightBorderWidth<pointerWidth){
_d8e.width=pointerWidth;
_d8e.style.width=String(pointerWidth)+"px";
}else{
_d8e.width="auto";
_d8e.style.width="auto";
}
if(_d8c<_d82){
_d8c=_d82;
}else{
if(_d8c+popupWidth>wdWidth-_d82){
_d8c=wdWidth-_d82-popupWidth;
}
}
pointerX=_d7d-_d8c-pointerWidth/2;
if(pointerX+pointerWidth>popupWidth-rightBorderWidth){
pointerX=popupWidth-rightBorderWidth-pointerWidth;
}
if(pointerX<leftBorderWidth){
pointerX=leftBorderWidth;
}
_d88.style.left=pointerX;
_d88.style.top=_d8d;
Dwt.setLocation(_d7c,_d8c,popupY);
var _d8f=_d81?_d81.getZIndex()+Dwt._Z_INC:Dwt.Z_TOOLTIP;
Dwt.setZIndex(_d7c,_d8f);
};
function DwtTreeItem(_d90,_d91,text,_d93,_d94,_d95,_d96){
if(_d90 instanceof DwtTree){
this._tree=_d90;
}else{
if(_d90 instanceof DwtTreeItem){
this._tree=_d90._tree;
}else{
throw new DwtException("DwtTreeItem parent must be a DwtTree or DwtTreeItem",DwtException.INVALIDPARENT,"DwtTreeItem");
}
}
this._origClassName=_d95?_d95:"DwtTreeItem";
this._textClassName=this._origClassName+"-Text";
this._selectedClassName=this._origClassName+"-"+DwtCssStyle.SELECTED;
this._actionedClassName=this._origClassName+"-"+DwtCssStyle.ACTIONED;
this._dragOverClassName=this._origClassName+"-DragOver";
DwtComposite.call(this,_d90,null,_d96,true);
this._imageInfoParam=_d93;
this._textParam=text;
this._deferred=(_d94!==false);
this._itemChecked=false;
this._initialized=false;
this._selectionEnabled=true;
this._actionEnabled=true;
if(this._tree._isCheckedStyle()){
this.enableSelection(false);
this._selectedClassName=this._origClassName;
}
if(_d90 instanceof DwtTree||(_d90._initialized&&(!_d90._deferred||_d90._expanded))){
this._initialize(_d91);
}else{
_d90._addDeferredChild(this,_d91);
this._index=_d91;
}
}
DwtTreeItem.prototype=new DwtComposite;
DwtTreeItem.prototype.constructor=DwtTreeItem;
DwtTreeItem.prototype.toString=function(){
return "DwtTreeItem";
};
DwtTreeItem._NODECELL_DIM="16px";
DwtTreeItem.prototype.getChecked=function(){
return this._itemChecked;
};
DwtTreeItem.prototype.setChecked=function(_d97,_d98){
if((this._itemChecked!=_d97)||_d98){
this._itemChecked=_d97;
if(this._checkBox!=null&&(this._checkBoxCell&&Dwt.getVisible(this._checkBoxCell))){
this._checkBox.checked=_d97;
if(this._checkBox._ieHack){
if(_d97){
var _d99=document.createElement("<INPUT type='checkbox' checked>");
Dwt.setHandler(_d99,DwtEvent.ONMOUSEDOWN,DwtTreeItem._checkBoxMouseDownHdlr);
Dwt.setHandler(_d99,DwtEvent.ONMOUSEUP,DwtTreeItem._checkBoxMouseUpHdlr);
this._checkBox.parentNode.replaceChild(_d99,this._checkBox);
this._checkBox=_d99;
}else{
this._checkBox._ieHack=false;
}
}
}
}
};
DwtTreeItem.prototype.getExpanded=function(){
return this._expanded;
};
DwtTreeItem.prototype.setExpanded=function(_d9a,_d9b){
if(_d9a){
var p=this.parent;
while(p instanceof DwtTreeItem&&!p._expanded){
p.setExpanded(true);
p=p.parent;
}
this._realizeDeferredChildren();
}
if(this.getNumChildren()){
if(_d9a&&_d9b){
if(!this._expanded){
this._expand(_d9a);
}
var a=this.getChildren();
for(var i=0;i<a.length;i++){
if(a[i] instanceof DwtTreeItem){
a[i].setExpanded(_d9a,_d9b);
}
}
}else{
if(this._expanded!=_d9a){
this._expand(_d9a);
}
}
}
};
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(_d9f){
if(this._initialized){
AjxImg.setImage(this._imageCell,_d9f);
this._imageInfo=_d9f;
}else{
this._imageInfoParam=_d9f;
}
};
DwtTreeItem.prototype.setDndImage=function(_da0){
this._dndImageInfo=_da0;
};
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(text){
if(this._initialized){
if(!text){
text.data="";
}
this._text=this._textCell.innerHTML=text;
}else{
this._textParam=text;
}
};
DwtTreeItem.prototype.setDndText=function(text){
this._dndText=text;
};
DwtTreeItem.prototype.showCheckBox=function(show){
if(this._checkBoxCell){
Dwt.setVisible(this._checkBoxCell,show);
}
};
DwtTreeItem.prototype.showExpansionIcon=function(show){
if(this._nodeCell){
Dwt.setVisible(this._nodeCell,show);
}
};
DwtTreeItem.prototype.enableSelection=function(_da5){
this._selectionEnabled=_da5;
};
DwtTreeItem.prototype.enableAction=function(_da6){
this._actionEnabled=_da6;
};
DwtTreeItem.prototype.addSeparator=function(_da7){
var _da8=new DwtTreeItemSeparator(this);
this._children.add(_da8,_da7);
};
DwtTreeItem.prototype.setVisible=function(_da9,_daa,_dab){
if(_daa&&!_dab){
Dwt.setVisible(this._itemDiv,_da9);
}else{
if(_dab&&!_daa){
Dwt.setVisible(this._childDiv,_da9);
}else{
DwtComposite.prototype.setVisible.call(this,_da9);
}
}
};
DwtTreeItem.prototype.removeChild=function(_dac){
if(_dac._initialized){
this._tree._deselect(_dac);
this._childDiv.removeChild(_dac.getHtmlElement());
}
this._children.remove(_dac);
if(this._children.size()==0){
if(this._expanded){
this._expanded=false;
}
if(this._initialized){
AjxImg.setImage(this._nodeCell,"Blank_16");
var _dad=AjxImg.getImageElement(this._nodeCell);
if(_dad){
Dwt.clearHandler(_dad,DwtEvent.ONMOUSEDOWN);
}
}
}
};
DwtTreeItem.prototype._initialize=function(_dae){
this._setMouseEventHdlrs();
this._itemDiv=document.createElement("div");
this._itemDiv.className=this._origClassName;
this.getHtmlElement().appendChild(this._itemDiv);
this._table=document.createElement("table");
this._table.cellSpacing=this._table.cellPadding=0;
this._table.border=0;
this._itemDiv.appendChild(this._table);
this._row=this._table.insertRow(0);
var i=0;
nodeCell=this._row.insertCell(i++);
nodeCell.style.width=nodeCell.style.height=DwtTreeItem._NODECELL_DIM;
nodeCell.align="center";
nodeCell.noWrap=true;
this._nodeCell=nodeCell;
if(this._children.size()>0){
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
var _db0=AjxImg.getImageElement(this._nodeCell);
if(_db0){
Dwt.setHandler(_db0,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
Dwt.setHandler(_db0,DwtEvent.ONMOUSEUP,DwtTreeItem._nodeIconMouseUpHdlr);
}
}else{
AjxImg.setImage(this._nodeCell,"Blank_16");
}
if(this._tree._isCheckedStyle()){
this._checkBoxCell=this._row.insertCell(i++);
this._checkBoxCell.noWrap=true;
this._checkBox=document.createElement("input");
this._checkBox.type="checkbox";
if(AjxEnv.isIE){
this._checkBox._ieHack=true;
}
this._checkBoxCell.appendChild(this._checkBox);
Dwt.setHandler(this._checkBox,DwtEvent.ONMOUSEDOWN,DwtTreeItem._checkBoxMouseDownHdlr);
Dwt.setHandler(this._checkBox,DwtEvent.ONMOUSEUP,DwtTreeItem._checkBoxMouseUpHdlr);
this._checkBox.checked=this._itemChecked;
}
this._imageCell=this._row.insertCell(i++);
this._imageCell.className="imageCell";
this._imageCell.noWrap=true;
if(this._imageInfoParam){
AjxImg.setImage(this._imageCell,this._imageInfoParam);
this._imageInfo=this._imageInfoParam;
}
this._textCell=this._row.insertCell(i);
this._textCell.className=this._textClassName;
this._textCell.noWrap=true;
if(this._textParam){
this._textCell.innerHTML=this._text=this._textParam;
}
this._expanded=this._selected=this._actioned=false;
this._gotMouseDownLeft=this._gotMouseDownRight=false;
this.addListener(DwtEvent.ONMOUSEDOWN,new AjxListener(this,this._mouseDownListener));
this.addListener(DwtEvent.ONMOUSEOUT,new AjxListener(this,this._mouseOutListener));
this.addListener(DwtEvent.ONMOUSEUP,new AjxListener(this,this._mouseUpListener));
this.addListener(DwtEvent.ONDBLCLICK,new AjxListener(this,this._doubleClickListener));
this.parent._addItem(this,_dae);
this._initialized=true;
};
DwtTreeItem.prototype._addDeferredChild=function(_db1,_db2){
if(this._initialized&&this._children.size()==0){
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
var _db3=AjxImg.getImageElement(this._nodeCell);
if(_db3){
Dwt.setHandler(_db3,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
Dwt.setHandler(_db3,DwtEvent.ONMOUSEUP,DwtTreeItem._nodeIconMouseUpHdlr);
}
}
this._children.add(_db1,_db2);
};
DwtTreeItem.prototype.addChild=function(_db4){
};
DwtTreeItem.prototype._addItem=function(item,_db6){
if(!this._children.contains(item)){
this._children.add(item,_db6);
}
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(AjxImg.getImageClass(this._nodeCell)==AjxImg.getClassForImage("Blank_16")){
if(this._expanded){
AjxImg.setImage(this._nodeCell,"NodeExpanded");
}else{
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
}
var _db7=AjxImg.getImageElement(this._nodeCell);
if(_db7){
Dwt.setHandler(_db7,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
}
}
var _db8=this._childDiv;
var _db9=_db8.childNodes.length;
if(_db6==null||_db6>=_db9||_db9==0){
_db8.appendChild(item.getHtmlElement());
}else{
_db8.insertBefore(item.getHtmlElement(),_db8.childNodes[_db6]);
}
};
DwtTreeItem.prototype._getDnDIcon=function(){
var icon=document.createElement("div");
Dwt.setPosition(icon,Dwt.ABSOLUTE_STYLE);
var _dbb=document.createElement("table");
icon.appendChild(_dbb);
_dbb.cellSpacing=_dbb.cellPadding=0;
var row=_dbb.insertRow(0);
var i=0;
var c=row.insertCell(i++);
c.noWrap=true;
if(this._dndImageInfo){
AjxImg.setImage(c,this._dndImageInfo);
}else{
if(this._imageInfo){
AjxImg.setImage(c,this._imageInfo);
}
}
c=row.insertCell(i);
c.noWrap=true;
c.className=this._origClassName;
if(this._dndText){
c.innerHTML=this._dndText;
}else{
if(this._text){
c.innerHTML=this._text;
}
}
this.shell.getHtmlElement().appendChild(icon);
Dwt.setZIndex(icon,Dwt.Z_DND);
return icon;
};
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(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _dc1=DwtShell.mouseEvent;
_dc1.setFromDhtmlEvent(ev);
if(_dc1.button==DwtMouseEvent.LEFT){
obj._expand(!obj._expanded,ev);
}else{
if(_dc1.button==DwtMouseEvent.RIGHT){
_dc1.dwtObj._tree._itemActioned(_dc1.dwtObj,_dc1);
}
}
_dc1._stopPropagation=true;
_dc1._returnValue=false;
_dc1.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem._nodeIconMouseUpHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _dc4=DwtShell.mouseEvent;
_dc4._stopPropagation=true;
_dc4._returnValue=false;
_dc4.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem.prototype._expand=function(_dc5,ev){
if(!_dc5){
this._expanded=false;
this._childDiv.style.display="none";
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
this._tree._itemCollapsed(this,ev);
}else{
this._realizeDeferredChildren();
this._expanded=true;
this._childDiv.style.display="block";
AjxImg.setImage(this._nodeCell,"NodeExpanded");
this._tree._itemExpanded(this,ev);
}
};
DwtTreeItem.prototype._realizeDeferredChildren=function(){
var a=this._children.getArray();
for(var i=0;i<a.length;i++){
if(!a[i]._initialized){
if(a[i]._isSeparator){
var div=a[i].div=document.createElement("div");
div.className="vSpace";
this._childDiv.appendChild(div);
a[i]._initialized=true;
}else{
a[i]._initialize(a[i]._index);
}
}
}
};
DwtTreeItem.prototype._isChildOf=function(item){
var test=this.parent;
while(test&&test!=this._tree){
if(test==item){
return true;
}
test=test.parent;
}
return false;
};
DwtTreeItem.prototype._setSelected=function(_dcc){
if(this._selected!=_dcc){
this._selected=_dcc;
if(!this._initialized){
this._initialize();
}
if(_dcc&&this._selectionEnabled){
this._textCell.className=this._selectedClassName;
return true;
}else{
this._textCell.className=this._textClassName;
return false;
}
}
};
DwtTreeItem.prototype._setActioned=function(_dcd){
if(this._actioned!=_dcd){
this._actioned=_dcd;
if(!this._initialized){
this._initialize();
}
if(_dcd&&this._actionEnabled&&!this._selected){
this._textCell.className=this._actionedClassName;
return true;
}else{
if(!_dcd){
this._textCell.className=this._textClassName;
return false;
}
}
}
};
DwtTreeItem.prototype._mouseDownListener=function(ev){
if(ev.target==this._childDiv){
return;
}
if(ev.button==DwtMouseEvent.LEFT&&this._selectionEnabled){
this._gotMouseDownLeft=true;
}else{
if(ev.button==DwtMouseEvent.RIGHT&&this._actionEnabled){
this._gotMouseDownRight=true;
}
}
};
DwtTreeItem.prototype._mouseOutListener=function(ev){
if(ev.target==this._childDiv){
return;
}
this._gotMouseDownLeft=false;
this._gotMouseDownRight=false;
};
DwtTreeItem.prototype._mouseUpListener=function(ev){
if(ev.target==this._childDiv){
return;
}
if(ev.button==DwtMouseEvent.LEFT&&this._gotMouseDownLeft){
this._tree._itemClicked(this,ev);
}else{
if(ev.button==DwtMouseEvent.RIGHT&&this._gotMouseDownRight){
this._tree._itemActioned(this,ev);
}
}
};
DwtTreeItem.prototype._doubleClickListener=function(ev){
if(ev.target==this._childDiv){
return;
}
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _dd3=DwtShell.mouseEvent;
_dd3.setFromDhtmlEvent(ev);
if(_dd3.button==DwtMouseEvent.LEFT||_dd3.button==DwtMouseEvent.NONE){
_dd3.dwtObj._tree._itemDblClicked(_dd3.dwtObj,_dd3);
}
};
DwtTreeItem._checkBoxMouseDownHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _dd6=DwtShell.mouseEvent;
_dd6.setFromDhtmlEvent(ev);
_dd6._stopPropagation=true;
_dd6._returnValue=false;
_dd6.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem._checkBoxMouseUpHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _dd9=DwtShell.mouseEvent;
_dd9.setFromDhtmlEvent(ev);
if(_dd9.button==DwtMouseEvent.LEFT){
_dd9.dwtObj._itemChecked=!_dd9.dwtObj._itemChecked;
_dd9.dwtObj._tree._itemChecked(_dd9.dwtObj,_dd9);
}else{
if(_dd9.button==DwtMouseEvent.RIGHT){
_dd9.dwtObj._tree._itemActioned(_dd9.dwtObj,_dd9);
}
}
};
function DwtTreeItemSeparator(_dda){
this.parent=_dda;
this._isSeparator=true;
this._initialized=false;
}
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;
};
function DwtTree(_ddb,_ddc,_ddd,_dde){
if(arguments.length==0){
return;
}
_ddd=_ddd||"DwtTree";
DwtComposite.call(this,_ddb,_ddd,_dde);
if(_ddc==null){
this._style=DwtTree.SINGLE_STYLE;
}else{
if(_ddc==DwtTree.CHECKEDITEM_STYLE){
_ddc|=DwtTree.SINGLE_STYLE;
}
this._style=_ddc;
}
this._selectedItems=new AjxVector();
this._selEv=new DwtSelectionEvent(true);
}
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(_ddf){
this.addListener(DwtEvent.SELECTION,_ddf);
};
DwtTree.prototype.removeSelectionListener=function(_de0){
this.removeListener(DwtEvent.SELECTION,_de0);
};
DwtTree.prototype.addTreeListener=function(_de1){
this.addListener(DwtEvent.TREE,_de1);
};
DwtTree.prototype.removeTreeListener=function(_de2){
this.removeListener(DwtEvent.TREE,_de2);
};
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 sz=this._selectedItems.size();
for(var i=0;i<sz;i++){
a[i]._setSelected(false);
}
if(sz>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(_de6,_de7){
var a=this._selectedItems.getArray();
var sz=this._selectedItems.size();
var da;
var j=0;
var _dec=false;
for(var i=0;i<sz;i++){
if(a[i]==_de6){
_dec=true;
}else{
a[i]._setSelected(false);
this._selectedItems.remove(a[i]);
if(da==null){
da=new Array();
}
da[j++]=a[i];
}
}
if(da&&!_de7){
this._notifyListeners(DwtEvent.SELECTION,da,DwtTree.ITEM_DESELECTED,null,this._selEv);
}
if(_dec){
return;
}
this._selectedItems.add(_de6);
var _dee=_de6.parent;
while(_dee instanceof DwtTreeItem){
_dee.setExpanded(true);
_dee=_dee.parent;
}
if(_de6._setSelected(true)&&!_de7){
this._notifyListeners(DwtEvent.SELECTION,[_de6],DwtTree.ITEM_SELECTED,null,this._selEv);
}
};
DwtTree.prototype.getSelectionCount=function(){
return this._selectedItems.size();
};
DwtTree.prototype.addChild=function(_def){
};
DwtTree.prototype.addSeparator=function(){
var sep=document.createElement("div");
sep.className="vSpace";
this.getHtmlElement().appendChild(sep);
};
DwtTree.prototype._addItem=function(item,_df2){
this._children.add(item,_df2);
var _df3=this.getHtmlElement();
var _df4=_df3.childNodes.length;
if(_df2==null||_df2>_df4){
_df3.appendChild(item.getHtmlElement());
}else{
_df3.insertBefore(item.getHtmlElement(),_df3.childNodes[_df2]);
}
};
DwtTree.prototype.removeChild=function(_df5){
this._children.remove(_df5);
this._selectedItems.remove(_df5);
this.getHtmlElement().removeChild(_df5.getHtmlElement());
};
DwtTree.prototype.setCheckboxes=function(_df6){
if(!this._isCheckedStyle()||!AjxEnv.isIE){
return;
}
if(_df6&&_df6._isSeparator){
return;
}
var _df7;
if(_df6){
_df6.setChecked(_df6.getChecked(),true);
_df7=_df6.getItems();
}else{
_df7=this.getItems();
}
for(var i=0;i<_df7.length;i++){
this.setCheckboxes(_df7[i]);
}
};
DwtTree.prototype._deselect=function(item){
if(this._selectedItems.contains(item)){
this._selectedItems.remove(item);
item._setSelected(false);
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_DESELECTED,null,this._selEv);
}
};
DwtTree.prototype._isCheckedStyle=function(){
return ((this._style&DwtTree.CHECKEDITEM_STYLE)!=0);
};
DwtTree.prototype._itemActioned=function(item,ev){
if(this._actionedItem){
this._actionedItem._setActioned(false);
this._notifyListeners(DwtEvent.SELECTION,[this._actionedItem],DwtTree.ITEM_DESELECTED,ev,this._selEv);
}
this._actionedItem=item;
item._setActioned(true);
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_ACTIONED,ev,this._selEv);
};
DwtTree.prototype._itemChecked=function(item,ev){
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_CHECKED,ev,this._selEv);
};
DwtTree.prototype._itemClicked=function(item,ev){
var i;
var a=this._selectedItems.getArray();
var _e02=this._selectedItems.size();
if(this._style&DwtTree.SINGLE_STYLE||(!ev.shiftKey&&!ev.ctrlKey)){
if(_e02>0){
for(i=0;i<_e02;i++){
a[i]._setSelected(false);
}
this._notifyListeners(DwtEvent.SELECTION,this._selectedItems.getArray(),DwtTree.ITEM_DESELECTED,ev,this._selEv);
this._selectedItems.removeAll();
}
this._selectedItems.add(item);
if(item._setSelected(true)){
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_SELECTED,ev,this._selEv);
}
}else{
if(ev.ctrlKey){
if(this._selectedItems.contains(item)){
this._selectedItems.remove(item);
item._setSelected(false);
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_DESELECTED,ev,this._selEv);
}else{
this._selectedItems.add(item);
if(item._setSelected(true)){
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_SELECTED,ev,this._selEv);
}
}
}else{
}
}
};
DwtTree.prototype._itemDblClicked=function(item,ev){
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_DBL_CLICKED,ev,this._selEv);
};
DwtTree.prototype._itemExpanded=function(item,ev){
this._notifyListeners(DwtEvent.TREE,[item],DwtTree.ITEM_EXPANDED,ev,DwtShell.treeEvent);
};
DwtTree.prototype._itemCollapsed=function(item,ev){
var i;
if(ev){
this._notifyListeners(DwtEvent.TREE,[item],DwtTree.ITEM_COLLAPSED,ev,DwtShell.treeEvent);
}
var _e0a=false;
var a=this._selectedItems.getArray();
var _e0c=this._selectedItems.size();
var da;
var j=0;
for(i=0;i<_e0c;i++){
if(a[i]._isChildOf(item)){
_e0a=true;
if(da==null){
da=new Array();
}
da[j++]=a[i];
a[i]._setSelected(false);
this._selectedItems.remove(a[i]);
}
}
if(da){
this._notifyListeners(DwtEvent.SELECTION,da,DwtTree.ITEM_DESELECTED,ev,this._selEv);
}
if(_e0a&&!this._selectedItems.contains(item)){
this._selectedItems.add(item);
if(item._setSelected(true)){
this._notifyListeners(DwtEvent.SELECTION,[item],DwtTree.ITEM_SELECTED,ev,this._selEv);
}
}
};
DwtTree.prototype._notifyListeners=function(_e0f,_e10,_e11,_e12,_e13){
if(this.isListenerRegistered(_e0f)){
if(_e12){
DwtUiEvent.copy(_e13,_e12);
}
_e13.items=_e10;
if(_e10.length==1){
_e13.item=_e10[0];
}
_e13.detail=_e11;
this.notifyListeners(_e0f,_e13);
}
};
function DwtCalendar(_e14,_e15,_e16,_e17,_e18,_e19,_e1a,_e1b){
if(arguments.length==0){
return;
}
_e15=_e15||"DwtCalendar";
DwtComposite.call(this,_e14,_e15,_e16);
this._skipNotifyOnPage=false;
this._hidePrevNextMo=_e1a;
this._readOnly=_e1b;
this._uuid=Dwt.getNextId();
var cn=this._origDayClassName=_e15+"Day";
this._todayClassName=" "+_e15+"Day-today";
this._selectedDayClassName=" "+cn+"-"+DwtCssStyle.SELECTED;
this._activatedDayClassName=" "+cn+"-"+DwtCssStyle.ACTIVATED;
this._triggeredDayClassName=" "+cn+"-"+DwtCssStyle.TRIGGERED;
this._hiliteClassName=" "+cn+"-hilited";
this._greyClassName=" "+cn+"-grey";
if(!this._readOnly){
this._installListeners();
}
this._selectionMode=DwtCalendar.DAY;
this._init();
this._weekDays=new Array(7);
this._workingDays=(_e19==null)?DwtCalendar._DEF_WORKING_DAYS:_e19;
this.setFirstDayOfWeek((_e17==null)?DwtCalendar.SUN:_e17);
this._forceRollOver=(_e18)?_e18:true;
}
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._ACTIVATED=2;
DwtCalendar._TRIGGERED=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_ACTIVATED_CLASS=DwtCalendar._BUTTON_CLASS+"-"+DwtCssStyle.ACTIVATED;
DwtCalendar._BUTTON_TRIGGERED_CLASS=DwtCalendar._BUTTON_CLASS+"-"+DwtCssStyle.TRIGGERED;
DwtCalendar._TITLE_CLASS="DwtCalendarTitle";
DwtCalendar._TITLE_ACTIVATED_CLASS=DwtCalendar._TITLE_CLASS+"-"+DwtCssStyle.ACTIVATED;
DwtCalendar._TITLE_TRIGGERED_CLASS=DwtCalendar._TITLE_CLASS+"-"+DwtCssStyle.TRIGGERED;
DwtCalendar.prototype.toString=function(){
return "DwtCalendar";
};
DwtCalendar.prototype.addSelectionListener=function(_e1d){
this.addListener(DwtEvent.SELECTION,_e1d);
};
DwtCalendar.prototype.removeSelectionListener=function(_e1e){
this.removeListener(DwtEvent.SELECTION,_e1e);
};
DwtCalendar.prototype.addActionListener=function(_e1f){
this.addListener(DwtEvent.ACTION,_e1f);
};
DwtCalendar.prototype.removeActionListener=function(_e20){
this.removeListener(DwtEvent.ACTION,_e20);
};
DwtCalendar.prototype.addDateRangeListener=function(_e21){
this.addListener(DwtEvent.DATE_RANGE,_e21);
};
DwtCalendar.prototype.removeDateRangeListener=function(_e22){
this.removeListener(DwtEvent.DATE_RANGE,_e22);
};
DwtCalendar.prototype.setSkipNotifyOnPage=function(skip){
this._skipNotifyOnPage=skip;
};
DwtCalendar.prototype.getSkipNotifyOnPage=function(){
return this._skipNotifyOnPage;
};
DwtCalendar.prototype.setDate=function(date,_e25,_e26,_e27){
_e26=(_e26==null)?this._forceRollOver:_e26;
var _e28=new Date(date.getTime());
var _e29=this._date;
var _e2a=false;
var _e2b=false;
var _e2c;
if(this._date2CellId!=null){
var idx=(_e28.getFullYear()*10000)+(_e28.getMonth()*100)+_e28.getDate();
var _e2c=this._date2CellId[idx];
if(_e2c){
if(_e2c==this._selectedCellId){
_e2b=true;
}
var cell=document.getElementById(_e2c);
if(cell._dayType==DwtCalendar._THIS_MONTH){
_e2b=true;
}else{
if(_e26){
_e2b=_e2a=true;
}else{
_e2b=true;
}
}
}else{
_e2b=_e2a=true;
}
}else{
_e2b=_e2a=true;
}
if(_e2b){
if(this._date){
_e28.setHours(this._date.getHours(),this._date.getMinutes(),this._date.getSeconds(),0);
}
this._date=_e28;
if(!_e2a&&!this._readOnly){
this._setSelectedDate();
this._setToday();
}
}
if(_e2a){
this._layout();
}
if(_e2b&&!_e25){
var type=_e27?DwtCalendar.DATE_DBL_CLICKED:DwtCalendar.DATE_SELECTED;
this._notifyListeners(DwtEvent.SELECTION,type,this._date);
}
return true;
};
DwtCalendar.prototype.isSelected=function(_e30){
if(_e30==this._selectedDayElId){
return true;
}else{
if(this._selectionMode!=DwtCalendar.DAY){
var _e31=this._getDayCellIndex(_e30);
if(Math.floor(_e31/7)==Math.floor(this._getDayCellIndex(this._selectedDayElId)/7)&&this._currWorkingDays[_e31%7]){
return true;
}
}
}
return false;
};
DwtCalendar.prototype.getForceRollOver=function(){
return this._forceRollOver;
};
DwtCalendar.prototype.setForceRollOver=function(_e32){
if(_e32==null){
return;
}
if(this._forceRollOver!=_e32){
this._forceRollOver=_e32;
this._layout();
}
};
DwtCalendar.prototype.getSelectionMode=function(){
return this._selectionMode;
};
DwtCalendar.prototype.setSelectionMode=function(_e33){
if(this._selectionMode==_e33){
return;
}
this._selectionMode=_e33;
if(_e33==DwtCalendar.WEEK){
this._currWorkingDays=DwtCalendar._FULL_WEEK;
}else{
if(_e33==DwtCalendar.WORK_WEEK){
this._currWorkingDays=this._workingDays;
}
}
this._layout();
};
DwtCalendar.prototype.setWorkingWeek=function(_e34){
this._workingDays=this._currWorkingDays=_e34;
if(this._selectionMode==DwtCalendar.WORK_WEEK){
this._layout();
}
};
DwtCalendar.prototype.setHilite=function(_e35,_e36,_e37){
if(this._date2CellId==null){
return;
}
var cell;
var _e39;
if(_e37){
for(_e39 in this._date2CellId){
cell=document.getElementById(this._date2CellId[_e39]);
if(cell._isHilited){
cell._isHilited=false;
this._setClassName(cell,DwtCalendar._NORMAL);
}
}
}
var _e3a;
for(var i in _e35){
_e39=_e35[i];
_e3a=this._date2CellId[_e39.getFullYear()*10000+_e39.getMonth()*100+_e39.getDate()];
if(_e3a){
cell=document.getElementById(_e3a);
if(cell._isHilited!=_e36){
cell._isHilited=_e36;
this._setClassName(cell,DwtCalendar._NORMAL);
}
}
}
};
DwtCalendar.prototype.getDate=function(){
return this._date;
};
DwtCalendar.prototype.setFirstDayOfWeek=function(_e3c){
for(var i=0;i<7;i++){
if(i<_e3c){
this._weekDays[i]=6-(_e3c-i-1);
}else{
this._weekDays[i]=i-_e3c;
}
var _e3e=document.getElementById(this._getDOWCellId(i));
_e3e.innerHTML=AjxDateUtil.WEEKDAY_SHORT[(_e3c+i)%7];
}
this._layout();
};
DwtCalendar.prototype.getDateRange=function(){
return this._range;
};
DwtCalendar.prototype._getDayCellId=function(_e3f){
return "c:"+_e3f+":"+this._uuid;
};
DwtCalendar.prototype._getDayCellIndex=function(_e40){
return _e40.substring(2,_e40.indexOf(":",3));
};
DwtCalendar.prototype._getDOWCellId=function(_e41){
return "w:"+_e41+":"+this._uuid;
};
DwtCalendar.prototype._getDaysInMonth=function(mo,yr){
if(mo!=1){
return DwtCalendar._DAYS_IN_MONTH[mo];
}else{
if(yr%4!=0||(yr%100==0&&yr%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(_e44,type,_e46,ev){
if(!this.isListenerRegistered(_e44)){
return;
}
var _e48=DwtShell.selectionEvent;
if(ev){
DwtUiEvent.copy(_e48,ev);
}else{
_e48.reset();
}
_e48.item=this;
_e48.detail=_e46;
_e48.type=type;
this.notifyListeners(_e44,_e48);
};
DwtCalendar.prototype._layout=function(){
if(this._date==null){
return false;
}
if(!this._calWidgetInited){
this._init();
}
var date=new Date(this._date.getTime());
date.setDate(1);
var year=date.getFullYear();
var _e4b=date.getMonth();
var _e4c=date.getDay();
var _e4d=this._getDaysInMonth(_e4b,year);
var day=1;
var _e4f=1;
this._date2CellId=new Object();
this._selectedDayElId=null;
if(!this._hidePrevNextMo){
if(_e4b!=0){
var _e50=this._getDaysInMonth(_e4b-1,year)-this._weekDays[_e4c]+1;
var _e51=year;
var _e52=_e4b-1;
if(_e4b!=11){
var _e53=_e4b+1;
var _e54=year;
}else{
var _e53=0;
var _e54=year+1;
}
}else{
var _e50=this._getDaysInMonth(11,year-1)-this._weekDays[_e4c]+1;
var _e51=year-1;
var _e52=11;
var _e53=1;
var _e54=year;
}
}
for(var i=0;i<6;i++){
for(var j=0;j<7;j++){
var _e57=document.getElementById(this._getDayCellId(i*7+j));
if(_e57._isHilited==null){
_e57._isHilited=false;
}
if(day<=_e4d){
if(i!=0||j>=this._weekDays[_e4c]){
this._date2CellId[(year*10000)+(_e4b*100)+day]=_e57.id;
_e57._day=day;
_e57._month=_e4b;
_e57._year=year;
_e57.innerHTML=day++;
_e57._dayType=DwtCalendar._THIS_MONTH;
if(this._readOnly){
_e57.style.fontFamily="Arial";
_e57.style.fontSize="10px";
}
}else{
if(this._hidePrevNextMo){
_e57.innerHTML="";
}else{
this._date2CellId[(_e51*10000)+(_e52*100)+_e50]=_e57.id;
_e57._day=_e50;
_e57._month=_e52;
_e57._year=_e51;
_e57.innerHTML=_e50++;
_e57._dayType=DwtCalendar._PREV_MONTH;
}
}
}else{
if(!this._hidePrevNextMo){
this._date2CellId[(_e54*10000)+(_e53*100)+_e4f]=_e57.id;
_e57._day=_e4f;
_e57._month=_e53;
_e57._year=_e54;
_e57.innerHTML=_e4f++;
_e57._dayType=DwtCalendar._NEXT_MONTH;
}
}
this._setClassName(_e57,DwtCalendar._NORMAL);
}
}
this._setTitle(_e4b,year);
if(!this._readOnly){
this._setSelectedDate();
this._setToday();
}
this._setRange();
};
DwtCalendar.prototype._setRange=function(){
var cell=document.getElementById(this._getDayCellId(0));
var _e59=new Date(cell._year,cell._month,cell._day,0,0,0,0);
cell=document.getElementById(this._getDayCellId(DwtCalendar._LAST_DAY_CELL_IDX));
var _e5a=this._getDaysInMonth(cell._month,cell._year);
var end;
if(cell._day<_e5a){
end=new Date(cell._year,cell._month,cell._day+1,0,0,0,0);
}else{
if(cell._month<11){
end=new Date(cell._year,cell._month+1,1,0,0,0,0);
}else{
end=new Date(cell._year+1,0,1,0,0,0,0);
}
}
if(this._range==null){
this._range=new Object();
}else{
if(this._range.start.getTime()==_e59.getTime()&&this._range.end.getTime()==end.getTime()){
return false;
}
}
this._range.start=_e59;
this._range.end=end;
if(!this.isListenerRegistered(DwtEvent.DATE_RANGE)){
return;
}
if(!this._dateRangeEvent){
this._dateRangeEvent=new DwtDateRangeEvent(true);
}
this._dateRangeEvent.item=this;
this._dateRangeEvent.start=_e59;
this._dateRangeEvent.end=end;
this.notifyListeners(DwtEvent.DATE_RANGE,this._dateRangeEvent);
};
DwtCalendar.prototype._setToday=function(){
var cell;
var _e5d=new Date();
var _e5e=_e5d.getDate();
if(!this._todayDay||this._todayDay!=_e5e){
if(this._todayCellId!=null){
cell=document.getElementById(this._todayCellId);
cell._isToday=false;
this._setClassName(cell,DwtCalendar._NORMAL);
}
this._todayCellId=this._date2CellId[(_e5d.getFullYear()*10000)+(_e5d.getMonth()*100)+_e5e];
if(this._todayCellId!=null){
cell=document.getElementById(this._todayCellId);
cell._isToday=true;
this._setClassName(cell,DwtCalendar._NORMAL);
}
}
};
DwtCalendar.prototype._setSelectedDate=function(){
var day=this._date.getDate();
var _e60=this._date.getMonth();
var year=this._date.getFullYear();
var cell;
if(this._selectedDayElId){
cell=document.getElementById(this._selectedDayElId);
this._setClassName(cell,DwtCalendar._DESELECTED);
}
var _e63=this._date2CellId[(year*10000)+(_e60*100)+day];
cell=document.getElementById(_e63);
this._selectedDayElId=_e63;
this._setClassName(cell,DwtCalendar._SELECTED);
};
DwtCalendar.prototype._setCellClassName=function(cell,_e65,mode){
if(cell._dayType!=DwtCalendar._THIS_MONTH){
_e65+=this._greyClassName;
}
if(this._selectionMode==DwtCalendar.DAY&&cell.id==this._selectedDayElId&&mode!=DwtCalendar._DESELECTED){
_e65+=this._selectedDayClassName;
}else{
if(this._selectionMode!=DwtCalendar.DAY&&mode!=DwtCalendar._DESELECTED&&this._selectedDayElId!=null){
var idx=this._getDayCellIndex(cell.id);
if(Math.floor(this._getDayCellIndex(this._selectedDayElId)/7)==Math.floor(idx/7)&&this._currWorkingDays[idx%7]){
_e65+=this._selectedDayClassName;
}
}
}
if(cell._isHilited){
_e65+=this._hiliteClassName;
}
if(cell._isToday){
_e65+=this._todayClassName;
}
return _e65;
};
DwtCalendar.prototype._setClassName=function(cell,mode){
var _e6a="";
if(mode==DwtCalendar._NORMAL){
_e6a=this._origDayClassName;
}else{
if(mode==DwtCalendar._ACTIVATED){
_e6a=this._activatedDayClassName;
}else{
if(mode==DwtCalendar._TRIGGERED){
_e6a=this._triggeredDayClassName;
}else{
if(this._selectionMode!=DwtCalendar.DAY&&(mode==DwtCalendar._SELECTED||mode==DwtCalendar._DESELECTED)){
var _e6b=Math.floor(this._getDayCellIndex(this._selectedDayElId)/7)*7;
for(var i=0;i<7;i++){
_e6a=this._origDayClassName;
var _e6d=document.getElementById(this._getDayCellId(_e6b++));
_e6d.className=this._setCellClassName(_e6d,_e6a,mode);
}
return;
}
}
}
}
cell.className=this._setCellClassName(cell,_e6a,mode);
};
DwtCalendar.prototype._setTitle=function(_e6e,year){
var cell=document.getElementById(this._monthCell);
var _e71=DwtCalendar.getMonthFormatter();
var date=new Date(year,_e6e);
cell.innerHTML=_e71.format(date);
};
DwtCalendar.prototype._init=function(){
var html=new Array(100);
var idx=0;
this._monthCell="t:"+this._uuid;
html[idx++]="<table width=100% cellspacing='0' cellpadding='0' style='border-collapse:collapse;'>";
html[idx++]="<tr><td class=DwtCalendarTitlebar>";
html[idx++]="<table width='100%' cellspacing='0' cellpadding='0'>";
html[idx++]="<tr>";
html[idx++]="<td class='";
html[idx++]=DwtCalendar._BUTTON_CLASS;
html[idx++]="' id='b:py:";
html[idx++]=this._uuid;
html[idx++]="'>";
html[idx++]=AjxImg.getImageHtml("FastRevArrowSmall",null,["id='b:py:img:",this._uuid,"'"].join(""));
html[idx++]="</td>";
html[idx++]="<td class='";
html[idx++]=DwtCalendar._BUTTON_CLASS;
html[idx++]="' id='b:pm:";
html[idx++]=this._uuid;
html[idx++]="'>";
html[idx++]=AjxImg.getImageHtml("RevArrowSmall",null,["id='b:pm:img:",this._uuid,"'"].join(""));
html[idx++]="</td>";
html[idx++]="<td align='center' class='DwtCalendarTitleCell' nowrap'><span class='";
html[idx++]=DwtCalendar._TITLE_CLASS;
html[idx++]="' id='";
html[idx++]=this._monthCell;
html[idx++]="'>&nbsp;</span></td>";
html[idx++]="<td class='";
html[idx++]=DwtCalendar._BUTTON_CLASS;
html[idx++]="' id='b:nm:";
html[idx++]=this._uuid;
html[idx++]="'>";
html[idx++]=AjxImg.getImageHtml("FwdArrowSmall",null,["id='b:nm:img:",this._uuid,"'"].join(""));
html[idx++]="</td>";
html[idx++]="<td class='";
html[idx++]=DwtCalendar._BUTTON_CLASS;
html[idx++]="' id='b:ny:";
html[idx++]=this._uuid;
html[idx++]="'>";
html[idx++]=AjxImg.getImageHtml("FastFwdArrowSmall",null,["id='b:ny:img:",this._uuid,"'"].join(""));
html[idx++]="</td>";
html[idx++]="</tr>";
html[idx++]="</table>";
html[idx++]="</td></tr>";
html[idx++]="<tr><td>";
html[idx++]="<table cellspacing='0' cellpadding='1' width='100%'>";
html[idx++]="<tr>";
for(var i=0;i<7;i++){
html[idx++]="<td class='DwtCalendarDow' width='";
html[idx++]=(i<5?"14%":"15%");
html[idx++]="' id='";
html[idx++]=this._getDOWCellId(i);
html[idx++]="'>&nbsp;</td>";
}
html[idx++]="</tr>";
for(var i=0;i<6;i++){
html[idx++]=AjxEnv.isLinux?"<tr style='line-height:12px'>":"<tr>";
for(var j=0;j<7;j++){
html[idx++]="<td id='";
html[idx++]=this._getDayCellId(i*7+j);
html[idx++]="'>&nbsp;</td>";
}
html[idx++]="</tr>";
}
html[idx++]="</td></tr></table></table>";
this.getHtmlElement().innerHTML=html.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(_e77){
this._mouseOverDayCB=_e77;
};
DwtCalendar.prototype.getDndDate=function(){
var _e78=this._lastDndCell;
if(_e78){
return new Date(_e78._year,_e78._month,_e78._day);
}else{
return null;
}
};
DwtCalendar._tmpDate=new Date();
DwtCalendar._tmpDate.setHours(0,0,0,0);
DwtCalendar.prototype._mouseOverListener=function(ev){
var _e7a=ev.target;
if(_e7a.id.charAt(0)=="c"){
this._setClassName(_e7a,DwtCalendar._ACTIVATED);
if(this._mouseOverDayCB){
DwtCalendar._tmpDate.setFullYear(_e7a._year,_e7a._month,_e7a._day);
this._mouseOverDayCB.run(this,DwtCalendar._tmpDate);
}
}else{
if(_e7a.id.charAt(0)=="t"){
return;
_e7a.className=DwtCssStyle.ACTIVATED;
}else{
if(_e7a.id.charAt(0)=="b"){
var img;
if(_e7a.firstChild==null){
img=_e7a;
AjxImg.getParentElement(_e7a).className=DwtCalendar._BUTTON_ACTIVATED_CLASS;
}else{
_e7a.className=DwtCalendar._BUTTON_ACTIVATED_CLASS;
img=AjxImg.getImageElement(_e7a);
}
img.className=img._origClassName;
}else{
if(_e7a.id.charAt(0)=="w"){
}
}
}
}
ev._stopPropagation=true;
};
DwtCalendar.prototype._mouseOutListener=function(ev){
this.setToolTipContent(null);
var _e7d=ev.target;
if(_e7d.id.charAt(0)=="c"){
this._setClassName(_e7d,DwtCalendar._NORMAL);
}else{
if(_e7d.id.charAt(0)=="t"){
return;
_e7d.className=DwtCalendar._TITLE_CLASS;
}else{
if(_e7d.id.charAt(0)=="b"){
var img;
_e7d.className=DwtCalendar._BUTTON_CLASS;
if(_e7d.firstChild==null){
img=_e7d;
AjxImg.getParentElement(_e7d).className=DwtCalendar._BUTTON_CLASS;
}else{
_e7d.className=DwtCalendar._BUTTON_CLASS;
img=AjxImg.getImageElement(_e7d);
}
img.className=img._origClassName;
}else{
if(_e7d.id.charAt(0)=="w"){
}
}
}
}
};
DwtCalendar.prototype._mouseDownListener=function(ev){
if(ev.button==DwtMouseEvent.LEFT){
var _e80=ev.target;
if(_e80.id.charAt(0)=="c"){
this._setClassName(_e80,DwtCalendar._TRIGGERED);
}else{
if(_e80.id.charAt(0)=="t"){
_e80.className=DwtCalendar._TITLE_TRIGGERED_CLASS;
}else{
if(_e80.id.charAt(0)=="b"){
var img;
if(_e80.firstChild==null){
img=_e80;
AjxImg.getParentElement(_e80).className=DwtCalendar._BUTTON_TRIGGERED_CLASS;
}else{
_e80.className=DwtCalendar._BUTTON_TRIGGERED_CLASS;
img=AjxImg.getImageElement(_e80);
}
img.className=img._origClassName;
}else{
if(_e80.id.charAt(0)=="w"){
}
}
}
}
}
};
DwtCalendar.prototype._mouseUpListener=function(ev){
var _e83=ev.target;
if(ev.button==DwtMouseEvent.LEFT){
if(_e83.id.charAt(0)=="c"){
if(this.parent instanceof DwtMenu){
DwtMenu.closeActiveMenu();
}
if(this.setDate(new Date(_e83._year,_e83._month,_e83._day))){
return;
}
this._setClassName(_e83,DwtCalendar._ACTIVATED);
}else{
if(_e83.id.charAt(0)=="b"){
var img;
if(_e83.firstChild==null){
img=_e83;
AjxImg.getParentElement(_e83).className=DwtCalendar._BUTTON_ACTIVATED_CLASS;
}else{
_e83.className=DwtCalendar._BUTTON_ACTIVATED_CLASS;
img=AjxImg.getImageElement(_e83);
}
img.className=img._origClassName;
if(img.id.indexOf("py")!=-1){
this._prevYear();
}else{
if(img.id.indexOf("pm")!=-1){
this._prevMonth();
}else{
if(img.id.indexOf("nm")!=-1){
this._nextMonth();
}else{
this._nextYear();
}
}
}
}else{
if(_e83.id.charAt(0)=="t"){
_e83.className=DwtCalendar._TITLE_ACTIVATED_CLASS;
this.setDate(new Date(),this._skipNotifyOnPage);
if(this.parent instanceof DwtMenu){
DwtMenu.closeActiveMenu();
}
}
}
}
}else{
if(ev.button==DwtMouseEvent.RIGHT&&_e83.id.charAt(0)=="c"){
this._notifyListeners(DwtEvent.ACTION,0,new Date(_e83._year,_e83._month,_e83._day),ev);
}
}
};
DwtCalendar.prototype._doubleClickListener=function(ev){
var _e86=ev.target;
if(this._selectionEvent){
this._selectionEvent.type=DwtCalendar.DATE_DBL_CLICKED;
}
if(_e86.id.charAt(0)=="c"){
if(this.parent instanceof DwtMenu){
DwtMenu.closeActiveMenu();
}
this.setDate(new Date(_e86._year,_e86._month,_e86._day),false,false,true);
}
};
DwtCalendar.prototype._prevMonth=function(ev){
var d=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(d,AjxDateUtil.MONTH,-1),this._skipNotifyOnPage);
};
DwtCalendar.prototype._nextMonth=function(ev){
var d=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(d,AjxDateUtil.MONTH,1),this._skipNotifyOnPage);
};
DwtCalendar.prototype._prevYear=function(ev){
var d=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(d,AjxDateUtil.YEAR,-1),this._skipNotifyOnPage);
};
DwtCalendar.prototype._nextYear=function(ev){
var d=new Date(this._date.getTime());
this.setDate(AjxDateUtil.roll(d,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.prototype._dragEnter=function(ev){
};
DwtCalendar.prototype._dragHover=function(ev){
};
DwtCalendar.prototype._dragOver=function(ev){
var _e92=ev.target;
if(_e92.id.charAt(0)=="c"){
this._setClassName(_e92,DwtCalendar._ACTIVATED);
this._lastDndCell=_e92;
}else{
this._lastDndCell=null;
}
};
DwtCalendar.prototype._dragLeave=function(ev){
};
function DwtPropertyPage(_e94,_e95,_e96){
if(arguments.length==0){
return;
}
var _e97=_e95||"DwtPropertyPage";
DwtComposite.call(this,_e94,_e95,_e96);
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(isD){
this._isDirty=isD;
};
DwtPropertyPage.prototype.isDirty=function(){
return this._isDirty;
};
DwtPropertyPage.prototype._installOnKeyUpHandler=function(_e99,func){
if(!_e99){
return;
}
var e=null;
e=document.getElementById(this._fieldIds[_e99]);
if(e){
Dwt.setHandler(e,DwtEvent.ONKEYUP,func?func:this._onKeyUp);
e._view=this;
e._field=_e99;
}
};
DwtPropertyPage.prototype._installOnClickHandler=function(_e9c,func){
if(!_e9c){
return;
}
var e=document.getElementById(this._fieldIds[_e9c]);
if(e){
Dwt.setHandler(e,DwtEvent.ONCLICK,func?func:this._onClick);
e._view=this;
e._field=_e9c;
}
};
DwtPropertyPage.prototype._onClick=function(ev){
this._view.setDirty(true);
return true;
};
DwtPropertyPage.prototype._onKeyUp=function(ev){
this._view.setDirty(true);
return true;
};
DwtPropertyPage.prototype._installOnChangeHandler=function(_ea1,func){
if(!_ea1){
return;
}
var e=null;
e=document.getElementById(this._fieldIds[_ea1]);
if(e){
Dwt.setHandler(e,DwtEvent.ONCHANGE,func?func:this._onChange);
e._view=this;
e._field=_ea1;
}
};
DwtPropertyPage._onChange=function(ev){
this._view.setDirty(true);
return true;
};
DwtPropertyPage.prototype._onChange2=function(ev){
this.setDirty(true);
return true;
};
DwtPropertyPage.prototype._addDwtSelectEntryRow=function(_ea6,_ea7,html,idx,_eaa){
var _eab="30ex";
if(_eaa){
_eab=_eaa;
}
html[idx++]="<tr valign='center'>";
idx=this._addDwtSelectEntryCell(_ea6,_ea7,html,idx,_eab);
html[idx++]="</tr>";
return idx;
};
DwtPropertyPage.prototype._addDwtSelectEntryCell=function(_eac,_ead,html,idx,_eb0){
var id=Dwt.getNextId();
this._fieldIds[_eac]=id;
if(_ead){
html[idx++]="<td align='left' style='width:"+_eb0+"'>";
html[idx++]=AjxStringUtil.htmlEncode(_ead)+":";
html[idx++]="</td>";
}
html[idx++]="<td align='left'>";
html[idx++]="<div id='"+id+"'></div></td>";
return idx;
};
DwtPropertyPage.prototype._addBoolEntryRow=function(_eb2,_eb3,html,idx,_eb6){
html[idx++]="<tr valign='center'>";
idx=this._addBoolEntryCell(_eb2,_eb3,html,idx,_eb6);
html[idx++]="</tr>";
return idx;
};
DwtPropertyPage.prototype._addBoolEntryCell=function(_eb7,_eb8,html,idx,_ebb){
var id=Dwt.getNextId();
this._fieldIds[_eb7]=id;
var _ebd="20ex";
if(_ebb){
_ebd=_ebb;
}
if(_eb8){
html[idx++]="<td style='width:"+_ebd+";' align='left'>";
html[idx++]=AjxStringUtil.htmlEncode(_eb8)+":";
html[idx++]="</td>";
}
html[idx++]="<td align='left'>";
html[idx++]="<input type='checkbox' id='"+id+"'>";
html[idx++]="</td>";
return idx;
};
DwtPropertyPage.prototype._addTextAreaEntryRow=function(_ebe,_ebf,html,idx,_ec2){
var _ec3="on";
if(_ec2){
_ec3="off";
}
var id=Dwt.getNextId();
this._fieldIds[_ebe]=id;
html[idx++]="<tr valign='center'>";
html[idx++]="<td align='left' style='width:60ex;'>";
html[idx++]=AjxStringUtil.htmlEncode(_ebf)+":";
html[idx++]="</td></tr>";
html[idx++]="<tr valign='center'><td align='left' style='width:60ex;'><textarea wrap='"+_ec3+"' rows='8' cols ='60' id='";
html[idx++]=id;
html[idx++]="'/></textarea></td></tr>";
return idx;
};
DwtPropertyPage.prototype._addEntryRow=function(_ec5,_ec6,html,idx,type,_eca,_ecb,_ecc,_ecd){
html[idx++]="<tr valign='center'>";
idx=this._addEntryCell(_ec5,_ec6,html,idx,type,_eca,_ecb,_ecc,_ecd);
html[idx++]="</tr>";
return idx;
};
DwtPropertyPage.prototype._addEntryCell=function(_ece,_ecf,html,idx,type,_ed3,_ed4,_ed5,_ed6){
if(type==null){
type="text";
}
if(_ed3==null){
_ed3=35;
}
var _ed7="20ex";
if(_ed5){
_ed7=_ed5;
}
var id=Dwt.getNextId();
this._fieldIds[_ece]=id;
if(_ecf){
html[idx++]="<td align='left' style='width:"+_ed7+";'>";
html[idx++]=AjxStringUtil.htmlEncode(_ecf)+":";
html[idx++]="</td>";
}
html[idx++]="<td ";
if(_ed6){
html[idx++]="class='redAsteric' ";
}
html[idx++]="\talign='left'><input autocomplete='off' size='"+_ed3+"' type='"+type+"' id='";
html[idx++]=id;
html[idx++]="'";
if(_ed6){
html[idx++]="/>*";
}else{
html[idx++]="/>&nbsp;";
}
if(_ed4!=null){
html[idx++]=_ed4;
}
html[idx++]="</td>";
return idx;
};
DwtPropertyPage.prototype._createHTML=function(){
};
function DwtTabView(_ed9,_eda,_edb){
if(arguments.length==0){
return;
}
var _edc=_eda||"DwtTabView";
var _edd=DwtControl.ABSOLUTE_STYLE;
if((_edb!==void 0)&&(_edb!==null)){
_edd=_edb;
}
DwtComposite.call(this,_ed9,_edc,_edd);
this._stateChangeEv=new DwtEvent(true);
this._tabs=new Array();
this._tabIx=1;
this._pageDiv=document.createElement("div");
this._pageDiv.className=_edc;
this._pageDiv.style.position=DwtControl.STATIC_STYLE;
this._tabBar=new DwtTabBar(this);
this._createHTML();
}
DwtTabView.prototype=new DwtComposite;
DwtTabView.prototype.constructor=DwtTabView;
DwtTabView.prototype.toString=function(){
return "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.addStateChangeListener=function(_ede){
this._eventMgr.addListener(DwtEvent.STATE_CHANGE,_ede);
};
DwtTabView.prototype.removeStateChangeListener=function(_edf){
this._eventMgr.removeListener(DwtEvent.STATE_CHANGE,_edf);
};
DwtTabView.prototype.addTab=function(_ee0,_ee1){
var _ee2=this._tabIx++;
this._tabs[_ee2]={title:_ee0,button:this._tabBar.addButton(_ee2,_ee0)};
this.setTabView(_ee2,_ee1);
if(_ee2==1){
if(_ee1 instanceof AjxCallback){
_ee1=_ee1.run(_ee2);
}
if(_ee1){
_ee1.showMe();
}
this._currentTabKey=_ee2;
this.switchToTab(_ee2);
}else{
if(_ee1&&!(_ee1 instanceof AjxCallback)){
_ee1.hideMe();
Dwt.setVisible(_ee1.getHtmlElement(),false);
}
}
this._tabBar.addSelectionListener(_ee2,new AjxListener(this,DwtTabView.prototype._tabButtonListener));
return _ee2;
};
DwtTabView.prototype.getCurrentTab=function(){
return this._currentTabKey;
};
DwtTabView.prototype.getNumTabs=function(){
return (this._tabs.length-1);
};
DwtTabView.prototype.getTab=function(_ee3){
if(this._tabs&&this._tabs[_ee3]){
return this._tabs[_ee3];
}else{
return null;
}
};
DwtTabView.prototype.getTabTitle=function(_ee4){
return this._tabs&&this._tabs[_ee4]?this._tabs[_ee4]["title"]:null;
};
DwtTabView.prototype.getTabButton=function(_ee5){
return this._tabs&&this._tabs[_ee5]?this._tabs[_ee5]["button"]:null;
};
DwtTabView.prototype.setTabView=function(_ee6,_ee7){
var tab=this.getTab(_ee6);
tab.view=_ee7;
if(_ee7&&!(_ee7 instanceof AjxCallback)){
this._pageDiv.appendChild(_ee7.getHtmlElement());
_ee7._tabKey=_ee6;
}
};
DwtTabView.prototype.getTabView=function(_ee9){
var tab=this.getTab(_ee9);
var _eeb=tab&&tab.view;
if(_eeb instanceof AjxCallback){
var _eec=_eeb;
_eeb=_eec.run(_ee9);
this.setTabView(_ee9,_eeb);
var size=this._getTabSize();
_eeb.setSize(size.x,size.y);
}
return _eeb;
};
DwtTabView.prototype.switchToTab=function(_eee){
if(this._tabs&&this._tabs[_eee]){
this._showTab(_eee);
this._tabBar.openTab(_eee);
}
if(this._eventMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._eventMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtTabView.prototype.setBounds=function(x,y,_ef1,_ef2){
DwtComposite.prototype.setBounds.call(this,x,y,_ef1,_ef2);
this._resetTabSizes(_ef1,_ef2);
};
DwtTabView.prototype.getActiveView=function(){
return this._tabs[this._currentTabKey].view;
};
DwtTabView.prototype.getKeyMapName=function(){
return "DwtTabView";
};
DwtTabView.prototype.resetKeyBindings=function(){
var kbm=this.shell.getKeyboardMgr();
if(kbm.isEnabled()){
var kmm=kbm.__keyMapMgr;
var num=this.getNumTabs();
var seqs=kmm.getKeySequences("DwtTabView","GoToTab");
for(var k=0;k<seqs.length;k++){
var ks=seqs[k];
for(var i=1;i<=num;i++){
var _efa=ks.replace(/NNN/,i);
kmm.setMapping("DwtTabView",_efa,"GoToTab"+i);
}
}
kmm.reloadMap("DwtTabView");
}
};
DwtTabView.prototype.handleKeyAction=function(_efb){
switch(_efb){
case DwtKeyMap.NEXT_TAB:
var _efc=this.getCurrentTab();
if(_efc<this.getNumTabs()){
this.switchToTab(_efc+1);
}
break;
case DwtKeyMap.PREV_TAB:
var _efc=this.getCurrentTab();
if(_efc>1){
this.switchToTab(_efc-1);
}
break;
default:
var m=_efb.match(DwtKeyMap.GOTO_TAB_RE);
if(m&&m.length){
var idx=m[1];
if((idx<=this.getNumTabs())&&(idx!=this.getCurrentTab())){
this.switchToTab(idx);
}
}else{
return false;
}
}
return true;
};
DwtTabView.prototype._resetTabSizes=function(_eff,_f00){
if(this._tabs&&this._tabs.length){
for(var _f01 in this._tabs){
var _f02=this._tabs[_f01].view;
if(_f02&&!(_f02 instanceof AjxCallback)){
_f02.resetSize(_eff,_f00);
}
}
}
};
DwtTabView.prototype._getTabSize=function(){
var size=this.getSize();
var _f04=size.x||this.getHtmlElement().clientWidth;
var _f05=size.y||this.getHtmlElement().clientHeight;
var _f06=this._tabBar.getSize();
var _f07=_f06.y||this._tabBar.getHtmlElement().clientHeight;
var _f08=_f04;
var _f09=_f05-_f07;
return new DwtPoint(_f08,_f09);
};
DwtTabView.prototype._createHTML=function(){
this._table=document.createElement("table");
this.getHtmlElement().appendChild(this._table);
this._table.width="100%";
this._table.border=this._table.cellPadding=this._table.cellSpacing=0;
this._table.backgroundColor=DwtCssStyle.getProperty(this.parent.getHtmlElement(),"background-color");
var row1=this._table.insertRow(-1);
row1.align="left";
row1.vAlign="middle";
var col1=row1.insertCell(-1);
col1.align="left";
col1.vAlign="middle";
col1.noWrap=true;
col1.width="100%";
col1.className="DwtTabTable";
col1.appendChild(this._tabBar.getHtmlElement());
var row2=this._table.insertRow(-1);
row2.align="left";
row2.vAlign="middle";
var col2=row2.insertCell(-1);
col2.align="left";
col2.vAlign="middle";
col2.noWrap=true;
col2.appendChild(this._pageDiv);
};
DwtTabView.prototype.addChild=function(_f0e){
this._children.add(_f0e);
};
DwtTabView.prototype._showTab=function(_f0f){
if(this._tabs&&this._tabs[_f0f]){
this._currentTabKey=_f0f;
this._hideAllTabs();
var _f10=this.getTabView(_f0f);
this.applyCaretHack();
Dwt.setVisible(_f10.getHtmlElement(),true);
_f10.showMe();
}
};
DwtTabView.prototype._hideAllTabs=function(){
if(this._tabs&&this._tabs.length){
for(var _f11 in this._tabs){
var _f12=this._tabs[_f11].view;
if(_f12&&!(_f12 instanceof AjxCallback)){
_f12.hideMe();
Dwt.setVisible(_f12.getHtmlElement(),false);
}
}
}
};
DwtTabView.prototype._tabButtonListener=function(ev){
if(ev.item instanceof DwtButton){
this.switchToTab(ev.item.getData("tabKey"));
}else{
if(ev&&ev.target){
var elem=ev.target;
while(elem.tagName!="TABLE"&&elem.offsetParent){
elem=elem.offsetParent;
}
var _f15=elem.getAttribute("tabKey");
if((_f15!==void 0)&&(_f15!==null)){
this.switchToTab(_f15);
}
}
}
};
function DwtTabViewPage(_f16,_f17,_f18){
if(arguments.length==0){
return;
}
var _f19=_f17||"DwtTabViewPage";
var ps=_f18||DwtControl.ABSOLUTE_STYLE;
this._rendered=true;
DwtPropertyPage.call(this,_f16,_f19,ps);
}
DwtTabViewPage.prototype=new DwtPropertyPage;
DwtTabViewPage.prototype.constructor=DwtTabViewPage;
DwtTabViewPage.prototype.toString=function(){
return "DwtTabViewPage";
};
DwtTabViewPage.prototype.showMe=function(){
this.setZIndex(DwtTabView.Z_ACTIVE_TAB);
if(this.parent.getHtmlElement().offsetHeight>80){
this.getHtmlElement().style.height=this.parent.getHtmlElement().offsetHeight-80;
}else{
var _f1b=parseInt(this.parent.getHtmlElement().style.height);
var _f1c=AjxStringUtil.getUnitsFromSizeString(this.parent.getHtmlElement().style.height);
if(_f1b>80){
this.getHtmlElement().style.height=(Number(_f1b-80).toString()+_f1c);
}
}
if(this.parent.getHtmlElement().offsetWidth>0){
this.getHtmlElement().style.width=this.parent.getHtmlElement().offsetWidth;
}else{
this.getHtmlElement().style.width=this.parent.getHtmlElement().style.width;
}
};
DwtTabViewPage.prototype.hideMe=function(){
this.setZIndex(DwtTabView.Z_HIDDEN_TAB);
};
DwtTabViewPage.prototype.resetSize=function(_f1d,_f1e){
if(this._rendered){
this.setSize(_f1d,_f1e);
}
};
function DwtTabBar(_f1f,_f20,_f21){
if(arguments.length==0){
return;
}
this._buttons=new Array();
this._tbuttons=new Array();
this._btnStyle=_f21?_f21:"DwtTabButton";
this._btnImage=null;
this._currentTabKey=1;
var _f22=_f20?_f20:"DwtTabBar";
DwtToolBar.call(this,_f1f,_f22,DwtControl.STATIC_STYLE);
this.addSpacer(null,0);
this.addFiller(null,1);
}
DwtTabBar.prototype=new DwtToolBar;
DwtTabBar.prototype.constructor=DwtTabBar;
DwtTabBar.prototype.toString=function(){
return "DwtTabBar";
};
DwtTabBar.prototype.getCurrentTab=function(){
return this._currentTabKey;
};
DwtTabBar.prototype.addSpacer=function(size,_f24){
var el=DwtToolBar.prototype.addSpacer.apply(this,arguments);
el.parentNode.style.verticalAlign="bottom";
return el;
};
DwtTabBar.prototype.addFiller=function(_f26,_f27){
var el=DwtToolBar.prototype.addFiller.apply(this,arguments);
el.parentNode.style.verticalAlign="bottom";
return el;
};
DwtTabBar.prototype.addStateChangeListener=function(_f29){
this._eventMgr.addListener(DwtEvent.STATE_CHANGE,_f29);
};
DwtTabBar.prototype.removeStateChangeListener=function(_f2a){
this._eventMgr.removeListener(DwtEvent.STATE_CHANGE,_f2a);
};
DwtTabBar.prototype.addSelectionListener=function(_f2b,_f2c){
this._buttons[_f2b].addSelectionListener(_f2c);
this._tbuttons[_f2b].table.setAttribute("tabKey",_f2b);
this._tbuttons[_f2b].leftImg.setAttribute("tabKey",_f2b);
this._tbuttons[_f2b].rightImg.setAttribute("tabKey",_f2b);
this._tbuttons[_f2b].leftTopImg.setAttribute("tabKey",_f2b);
this._tbuttons[_f2b].rightTopImg.setAttribute("tabKey",_f2b);
this._tbuttons[_f2b].topImg.setAttribute("tabKey",_f2b);
this._tbuttons[_f2b]._bottomRow.setAttribute("tabKey",_f2b);
this._tbuttons[_f2b].addListener(DwtEvent.ONMOUSEUP,_f2c);
};
DwtTabBar.prototype.removeSelectionListener=function(_f2d,_f2e){
this._buttons[_f2d].removeSelectionListener(_f2e);
};
DwtTabBar.prototype.addButton=function(_f2f,_f30){
var tb=this._tbuttons[_f2f]=new DwtTabButton(this);
var b=this._buttons[_f2f]=new DwtButton(tb,null,this._btnStyle,DwtControl.RELATIVE_STYLE);
var be=b.getHtmlElement();
be.style.position="relative";
be.style.top="-3px";
this._buttons[_f2f].addSelectionListener(new AjxListener(this,DwtTabBar._setActiveTab));
this._tbuttons[_f2f].addListener(DwtEvent.ONMOUSEUP,(new AjxListener(this,DwtTabBar._setActiveTab)));
if(this._btnImage!=null){
b.setImage(this._btnImage);
}
if(_f30!=null){
b.setText(_f30);
}
b.setEnabled(true);
b.setData("tabKey",_f2f);
if(parseInt(_f2f)==1){
tb.setOpen();
}
return b;
};
DwtTabBar.prototype.getButton=function(_f34){
if(this._buttons[_f34]){
return this._buttons[_f34];
}else{
return null;
}
};
DwtTabBar.prototype.openTab=function(tabK){
this._currentTabKey=tabK;
var cnt=this._tbuttons.length;
for(var ix=0;ix<cnt;ix++){
if(ix==tabK){
continue;
}
if(this._tbuttons[ix]){
this._tbuttons[ix].setClosed();
}
}
if(this._tbuttons[tabK]){
this._tbuttons[tabK].setOpen();
}
var _f38=parseInt(tabK)+1;
if(this._eventMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._eventMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtTabBar.prototype.__itemPaddingRight="0px";
DwtTabBar.prototype._addItem=function(type,_f3a,_f3b){
if(!AjxUtil.isNumber(_f3b)){
var el=this.getHtmlElement().firstChild;
_f3b=this._style==DwtToolBar.HORIZ_STYLE?(el.rows[0].cells.length-1):(el.rows.length-1);
}
DwtToolBar.prototype._addItem.call(this,type,_f3a,_f3b);
};
DwtTabBar.prototype._createSpacerElement=function(){
var _f3d=document.createElement("table");
_f3d.width="100%";
_f3d.cellSpacing=_f3d.cellPadding=0;
var row1=_f3d.insertRow(_f3d.rows.length);
var row2=_f3d.insertRow(_f3d.rows.length);
var row3=_f3d.insertRow(_f3d.rows.length);
var _f41=row3.insertCell(row3.cells.length);
AjxImg.setImage(_f41,"TabSpacer__H",true);
return _f3d;
};
DwtTabBar.prototype._createFillerElement=DwtTabBar.prototype._createSpacerElement;
DwtTabBar._setActiveTab=function(ev){
var tabK=null;
if(ev&&ev.item){
tabK=ev.item.getData("tabKey");
}else{
if(ev&&ev.target){
var elem=ev.target;
while(elem.tagName!="TABLE"&&elem.offsetParent){
elem=elem.offsetParent;
}
tabK=elem.getAttribute("tabKey");
if(tabK==null){
return false;
}
}else{
return false;
}
}
this.openTab(tabK);
};
function DwtTabButton(_f45){
if(arguments.length==0){
return;
}
this._isClosed=true;
DwtComposite.call(this,_f45,"DwtTabButton");
this._inactiveClassName="DwtTabButton-inactive";
this._activeClassName="DwtTabButton-active";
this._createHtml();
this._setMouseEventHdlrs();
this._mouseOverListener=new AjxListener(this,DwtTabButton.prototype._mouseOverListener);
this._mouseOutListener=new AjxListener(this,DwtTabButton.prototype._mouseOutListener);
this.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
this.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListener);
this._mouseOutAction=new AjxTimedAction(this,this._handleMouseOut);
this._mouseOutActionId=-1;
}
DwtTabButton.prototype=new DwtComposite;
DwtTabButton.prototype.constructor=DwtTabButton;
DwtTabButton.prototype.toString=function(){
return "DwtTabButton";
};
DwtTabButton.prototype._createHtml=function(){
this.table=document.createElement("table");
this.table.border=this.table.cellPadding=this.table.cellSpacing=0;
this.table.align="center";
this.table.width="100%";
this._topRow=this.table.insertRow(-1);
this._middleRow=this.table.insertRow(-1);
this._bottomRow=this.table.insertRow(-1);
this._leftTopCell=this._topRow.insertCell(-1);
this._centerTopCell=this._topRow.insertCell(-1);
this._rightTopCell=this._topRow.insertCell(-1);
this._leftMiddleCell=this._middleRow.insertCell(-1);
this._centerMiddleCell=this._middleRow.insertCell(-1);
this._rightMiddleCell=this._middleRow.insertCell(-1);
this._leftBottomCell=this._bottomRow.insertCell(-1);
this._centerBottomCell=this._bottomRow.insertCell(-1);
this._rightBottomCell=this._bottomRow.insertCell(-1);
this._leftTopCell.className="DwtTabButtonTL";
this._centerTopCell.className="DwtTabButtonTM";
this._rightTopCell.className="DwtTabButtonTR";
this._leftBottomCell.className="DwtTabButtonBL";
this._centerBottomCell.className="DwtTabButtonBM";
this._rightBottomCell.className="DwtTabButtonBR";
this.leftTopImg=document.createElement("div");
this.topImg=document.createElement("div");
this.rightTopImg=document.createElement("div");
AjxImg.setImage(this.leftTopImg,"Tab_TL",true);
AjxImg.setImage(this.topImg,"Tab_T__H",true);
AjxImg.setImage(this.rightTopImg,"Tab_TR",true);
this._leftTopCell.appendChild(this.leftTopImg);
this._centerTopCell.appendChild(this.topImg);
this._rightTopCell.appendChild(this.rightTopImg);
this.leftImg=this._leftMiddleCell;
this.centerImg=this._centerMiddleCell;
this.rightImg=this._rightMiddleCell;
AjxImg.setImage(this.leftImg,"Tab_L__V",true);
AjxImg.setImage(this.centerImg,"Tab__BG",true);
AjxImg.setImage(this.rightImg,"Tab_R__V",true);
this.leftBottomImg=document.createElement("div");
this.bottomImg=document.createElement("div");
this.rightBottomImg=document.createElement("div");
AjxImg.setImage(this.leftBottomImg,"Tab_BL",true);
AjxImg.setImage(this.bottomImg,"Tab_B__H",true);
AjxImg.setImage(this.rightBottomImg,"Tab_BR",true);
this._leftBottomCell.appendChild(this.leftBottomImg);
this._centerBottomCell.appendChild(this.bottomImg);
this._rightBottomCell.appendChild(this.rightBottomImg);
this.getHtmlElement().appendChild(this.table);
this.table.className=this._inactiveClassName;
};
DwtTabButton.prototype.setOpen=function(){
this.table.className=this._activeClassName;
this.setTabImageState("TabSel");
this._isClosed=false;
};
DwtTabButton.prototype.setClosed=function(){
this.table.className=this._inactiveClassName;
this.setTabImageState("Tab");
this._isClosed=true;
};
DwtTabButton.prototype.addChild=function(_f46){
this._centerMiddleCell.appendChild(_f46.getHtmlElement());
_f46.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
_f46.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListener);
};
DwtTabButton.prototype._mouseOverListener=function(ev){
if(this._mouseOutActionId!=-1){
AjxTimedAction.cancelAction(this._mouseOutActionId);
this._mouseOutActionId=-1;
}
if(this._isClosed){
this.setTabImageState("TabHover");
}
};
DwtTabButton.prototype._mouseOutListener=function(ev){
if(AjxEnv.isIE){
this._mouseOutActionId=AjxTimedAction.scheduleAction(this._mouseOutAction,1);
}else{
this._handleMouseOut();
}
};
DwtTabButton.prototype._handleMouseOut=function(){
this._mouseOutActionId=-1;
if(this._isClosed){
this.setTabImageState("Tab");
}
};
DwtTabButton.prototype.setTabImageState=function(_f49){
AjxImg.setImage(this.leftTopImg,_f49+"_TL",true);
AjxImg.setImage(this.topImg,_f49+"_T__H",true);
AjxImg.setImage(this.rightTopImg,_f49+"_TR",true);
AjxImg.setImage(this.leftImg,_f49+"_L__V",true);
AjxImg.setImage(this._centerMiddleCell,_f49+"__BG",true);
AjxImg.setImage(this.rightImg,_f49+"_R__V",true);
AjxImg.setImage(this.leftBottomImg,_f49+"_BL",true);
AjxImg.setImage(this.bottomImg,_f49+"_B__H",true);
AjxImg.setImage(this.rightBottomImg,_f49+"_BR",true);
};
function DwtWizardDialog(_f4a,_f4b,_f4c,w,h){
if(arguments.length==0){
return;
}
var _f4f=_f4b||"DwtDialog";
var _f50=new DwtDialog_ButtonDescriptor(DwtWizardDialog.NEXT_BUTTON,AjxMsg._next,DwtDialog.ALIGN_RIGHT,new AjxCallback(this,this.goNext));
var _f51=new DwtDialog_ButtonDescriptor(DwtWizardDialog.PREV_BUTTON,AjxMsg._prev,DwtDialog.ALIGN_RIGHT,new AjxCallback(this,this.goPrev));
var _f52=new DwtDialog_ButtonDescriptor(DwtWizardDialog.FINISH_BUTTON,AjxMsg._finish,DwtDialog.ALIGN_RIGHT,new AjxCallback(this,this.finishWizard));
DwtDialog.call(this,_f4a,_f4f,null,[DwtDialog.CANCEL_BUTTON],[_f51,_f50,_f52]);
if(!w){
this._contentW="80ex";
}else{
this._contentW=w;
}
if(!h){
this._contentH="100ex";
}else{
this._contentH=h;
}
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(_f4c);
}
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(_f53){
if(this._pages&&this._pages[_f53]){
this._currentPage=_f53;
this._showPage(_f53);
this._progressBar.showStep(_f53);
this._pages[_f53].setActive();
}
};
DwtWizardDialog.prototype.goNext=function(){
var _f54=this._currentPage+1;
if(this._pages&&this._pages[this._currentPage]){
this._pages[this._currentPage].switchToNextPage(_f54);
}
};
DwtWizardDialog.prototype.goPrev=function(){
var _f55=this._currentPage-1;
if(this._pages&&this._pages[this._currentPage]){
this._pages[this._currentPage].switchToPrevPage(_f55);
}
};
DwtWizardDialog.prototype.finishWizard=function(){
this.popdown();
};
DwtWizardDialog.prototype.getPage=function(_f56){
if(this._pages&&this._pages[_f56]){
return this._pages[_f56];
}else{
return null;
}
};
DwtWizardDialog.prototype.addPage=function(_f57,_f58){
var _f59=this._pageIx++;
this._pages[_f59]=_f57;
this._progressBar.addStep(_f59,_f58);
this._pageDiv.appendChild(this._pages[_f59].getHtmlElement());
if(_f59==1){
this._pages[_f59].setZIndex(DwtWizardDialog.Z_ACTIVE_PAGE);
}else{
this._pages[_f59].setZIndex(DwtWizardDialog.Z_HIDDEN_PAGE);
Dwt.setVisible(this._pages[_f59].getHtmlElement(),false);
}
return _f59;
};
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;
Dwt.associateElementWithObject(this._table,this);
this._table.backgroundColor=DwtCssStyle.getProperty(this.parent.getHtmlElement(),"background-color");
var row1;
var col1;
row1=this._table.insertRow(0);
row1.align="left";
row1.vAlign="middle";
col1=row1.insertCell(row1.cells.length);
col1.align="left";
col1.vAlign="middle";
col1.noWrap=true;
col1.width="100%";
col1.className="DwtTabTable";
col1.appendChild(this._progressBar.getHtmlElement());
var _f5c;
var _f5d;
_f5c=this._table.insertRow(1);
_f5c.align="center";
_f5c.vAlign="middle";
_f5d=_f5c.insertCell(_f5c.cells.length);
_f5d.align="left";
_f5d.vAlign="middle";
_f5d.noWrap=true;
_f5d.style.width=this._contentW;
var _f5e=document.createElement("div");
_f5e.className="horizSep";
_f5e.style.width=this._contentW;
_f5e.style.height="5px";
_f5d.appendChild(_f5e);
var row2;
var col2;
row2=this._table.insertRow(2);
row2.align="left";
row2.vAlign="middle";
col2=row2.insertCell(row2.cells.length);
col2.align="left";
col2.vAlign="middle";
col2.noWrap=true;
col2.width=this._contentW;
col2.appendChild(this._pageDiv);
this._contentDiv.appendChild(this._table);
};
DwtWizardDialog.prototype.addChild=function(_f61){
this._children.add(_f61);
};
DwtWizardDialog.prototype._showPage=function(_f62){
if(this._pages&&this._pages[_f62]){
this._hideAllPages();
this._pages[_f62].showMe();
Dwt.setVisible(this._pages[_f62].getHtmlElement(),true);
}
};
DwtWizardDialog.prototype._hideAllPages=function(){
if(this._pages&&this._pages.length){
for(var _f63 in this._pages){
if(this._pages[_f63]){
this._pages[_f63].hideMe();
Dwt.setVisible(this._pages[_f63].getHtmlElement(),false);
}
}
}
};
function DwtWizardPage(_f64,_f65){
if(arguments.length==0){
return;
}
var _f66=_f65||"DwtDialog";
DwtPropertyPage.call(this,_f64,_f65,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(_f67){
this.parent.goPage(_f67);
};
DwtWizardPage.prototype.switchToPrevPage=function(_f68){
this.parent.goPage(_f68);
};
DwtWizardPage.prototype.showMe=function(){
this.setZIndex(DwtTabView.Z_ACTIVE_TAB);
this.getHtmlElement().style.height=this.parent._contentH;
this.getHtmlElement().style.width=this.parent._contentW;
};
function DwtWizProgressBar(_f69){
if(arguments.length==0){
return;
}
DwtComposite.call(this,_f69,"DwtWizProgressBar",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(_f6a){
var _f6b="Step "+_f6a+" of "+this._stepsNumber;
if(this._steps[_f6a]){
_f6b=_f6b+": "+this._steps[_f6a];
}
this._lblHeader.setText(_f6b);
};
DwtWizProgressBar.prototype.addStep=function(_f6c,_f6d){
this._steps[_f6c]=_f6d;
return (++this._stepsNumber);
};
DwtWizProgressBar.prototype.addChild=function(_f6e){
this._children.add(_f6e);
var row;
var col;
this._table.width="100%";
row=(this._table.rows.length!=0)?this._table.rows[0]:this._table.insertRow(0);
row.align="center";
row.vAlign="middle";
col=row.insertCell(row.cells.length);
col.align="center";
col.vAlign="middle";
col.noWrap=true;
col.appendChild(_f6e.getHtmlElement());
};
function DwtStepLabel(_f71){
DwtLabel.call(this,_f71,DwtLabel.ALIGN_CENTER,"DwtStepLabel");
}
DwtStepLabel.prototype=new DwtLabel;
DwtStepLabel.prototype.constructor=DwtStepLabel;
DwtStepLabel.prototype.toString=function(){
return "DwtStepLabel";
};
DwtStepLabel.prototype.setActive=function(_f72){
if(_f72){
this._textCell.className="DwtStepLabelActive";
}else{
this._textCell.className="DwtStepLabelInactive";
}
};
function DwtSelect(_f73,_f74,_f75,_f76){
var _f77=_f75||"DwtSelectComposite";
var _f78=_f76||Dwt.STATIC_STYLE;
DwtComposite.call(this,_f73,_f77,_f78);
this._origClassName=this._className;
this._heightClassName=this._className+"Height";
this._menuClassName=this._className+"Menu";
this._menuTableId=false;
this._currentSelectionId=-1;
this._options=new AjxVector();
this._optionValuesToIndices=new Object();
this._selectedValue=this._selectedOption=null;
this.disabled=false;
this._menuListenerObject=new AjxListener(this,this._menuListener);
this._render(_f74);
}
DwtSelect.prototype=new DwtComposite;
DwtSelect.prototype.constructor=DwtSelect;
DwtSelect.prototype.toString=function(){
return "DwtSelect";
};
DwtSelect.prototype.getButton=function(){
return this._button;
};
DwtSelect.prototype.setText=function(text){
this._button.setText(text);
};
DwtSelect.prototype.setToolTipContent=function(text){
this._button.setToolTipContent(text);
};
DwtSelect.prototype.getToolTipContent=function(){
return this._button.getToolTipContent();
};
DwtSelect.prototype.setImage=function(_f7b){
this._button.setImage(_f7b);
};
DwtSelect.prototype.setAlign=function(_f7c){
this._button.setAlign(_f7c);
};
DwtSelect._objectIds=[null];
DwtSelect._assignId=function(_f7d){
var myId=DwtSelect._objectIds.length;
DwtSelect._objectIds[myId]=_f7d;
return myId;
};
DwtSelect._getObjectWithId=function(anId){
return DwtSelect._objectIds[anId];
};
DwtSelect._unassignId=function(anId){
DwtSelect._objectIds[anId]=null;
};
DwtSelect.getObjectFromElement=function(_f81){
return _f81&&_f81.dwtObj?AjxCore.objectWithId(_f81.dwtObj):null;
};
DwtSelect.prototype.dispose=function(){
DwtControl.prototype.dispose.call(this);
if(this._internalObjectId){
DwtSelect._unassignId(this._internalObjectId);
}
};
DwtSelect.prototype._render=function(_f82){
var _f83=Dwt.getNextId();
this._menuTableId=Dwt.getNextId();
var _f84=this._selectedValue?this._selectedValue:"";
var html=["<div class='",this._heightClassName,"'style='overflow:hidden;'>","<table border=0 cellpadding=0 cellspacing=0>","<tr><td id='",_f83,"'></td></tr>","<tr><td>","<table id='",this._menuTableId,"' class='",this._menuClassName,"' border=0 cellpadding=0 cellspacing=0>","</table>","</td></tr> ","</table>","</div>"];
var _f86=this.getHtmlElement();
_f86.innerHTML=html.join("");
this._button=new DwtButton(this,DwtLabel.ALIGN_LEFT);
this._button.reparentHtmlElement(_f83);
this._button.setDropDownImages("SelectPullDownArrow","SelectPullDownArrowDis","SelectPullDownArrowHover","SelectPullDownArrowSel");
this._button.getHtmlElement().style.minWidth=0;
this._button.setMenu(this._menuListenerObject,false);
if(_f82){
for(var i=0;i<_f82.length;++i){
this.addOption(_f82[i]);
}
}
};
DwtSelect.prototype.addOption=function(_f88,_f89,_f8a){
var opt=null;
var val=null;
if(typeof (_f88)=="string"){
val=_f8a!=null?_f8a:_f88;
opt=new DwtSelectOption(val,_f89,_f88,this,null,null);
}else{
if(_f88 instanceof DwtSelectOption){
opt=_f88;
if(_f8a){
opt.setValue(_f8a);
}
_f89=opt.isSelected();
}else{
if(_f88 instanceof DwtSelectOptionData||_f88.value){
val=_f8a!=null?_f8a:_f88.value;
opt=new DwtSelectOption(val,_f88.isSelected,_f88.displayValue,this,null,null,_f88.selectedValue);
_f89=Boolean(_f88.isSelected);
}else{
return -1;
}
}
}
this._options.add(opt);
if(this._options.size()==1||_f89){
this._setSelectedOption(opt);
}
var _f8d=document.getElementById(this._menuTableId);
var row=_f8d.insertRow(-1);
var cell=row.insertCell(-1);
cell.className="DwtMenuItem";
cell.innerHTML=["<div class='Text'>",AjxStringUtil.htmlEncode(opt.getDisplayValue()),"</div>"].join("");
this._button.setMenu(this._menuListenerObject,false);
this._optionValuesToIndices[opt.getValue()]=this._options.size()-1;
return (this._options.size()-1);
};
DwtSelect.prototype.rename=function(_f90,name){
var _f92=this.getOptionWithValue(_f90);
_f92._displayValue=name;
if(this.__selectedOption&&(this.__selectedOption._value==_f90)){
this.setText(name);
}
this._button.setMenu(this._menuListenerObject,false);
};
DwtSelect.prototype.clearOptions=function(){
var opts=this._options.getArray();
for(var i=0;i<opts.length;++i){
opts[i]=null;
}
this._options.removeAll();
this._optionValuesToIndices=null;
this._optionValuesToIndices=new Array();
this._selectedValue=null;
this._selectedOption=null;
this._currentSelectionId=-1;
};
DwtSelect.prototype.setName=function(name){
this._name=name;
};
DwtSelect.prototype.getName=function(){
return this._name;
};
DwtSelect.prototype.getEnabled=function(){
return this._button.getEnabled();
};
DwtSelect.prototype.setEnabled=function(_f96,_f97){
this._button.setEnabled(_f96,_f97);
};
DwtSelect.prototype.disable=function(){
this._button.setEnabled(false);
};
DwtSelect.prototype.enable=function(){
this._button.setEnabled(true);
};
DwtSelect.prototype._disableSelectionIE=function(){
return false;
};
DwtSelect.prototype._disableSelection=function(){
var func=function(){
window.getSelection().removeAllRanges();
};
window.setTimeout(func,5);
};
DwtSelect.prototype.setSelectedValue=function(_f99){
var _f9a=this._optionValuesToIndices[_f99];
if((_f9a!==void 0)&&(_f9a!==null)){
this.setSelected(_f9a);
}
};
DwtSelect.prototype.setSelected=function(_f9b){
var _f9c=this.getOptionWithHandle(_f9b);
this.setSelectedOption(_f9c);
};
DwtSelect.prototype.getOptionWithHandle=function(_f9d){
return this._options.get(_f9d);
};
DwtSelect.prototype.getIndexForValue=function(_f9e){
return this._optionValuesToIndices[_f9e];
};
DwtSelect.prototype.getOptionWithValue=function(_f9f){
var _fa0=this._optionValuesToIndices[_f9f];
var _fa1=null;
if((_fa0!==void 0)&&(_fa0!==null)){
_fa1=this.getOptionWithHandle(_fa0);
}
return _fa1;
};
DwtSelect.prototype.setSelectedOption=function(_fa2){
if(_fa2){
this._setSelectedOption(_fa2);
}
};
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.getWidth=function(){
return DwtControl.prototype.getSize.call(this).x;
};
DwtSelect.prototype.addChangeListener=function(_fa3){
this.addListener(DwtEvent.ONCHANGE,_fa3);
};
DwtSelect.prototype.size=function(){
return this._options.size();
};
DwtSelect.prototype._menuListener=function(){
var menu=new DwtMenu(this,DwtMenu.DROPDOWN_STYLE,"DwtSelectMenu",null,true);
this._button.setMenu(menu,true);
menu.setAssociatedObj(this);
for(var i=0,len=this._options.size();i<len;++i){
var mi=new DwtMenuItem(menu,DwtMenuItem.SELECT_STYLE);
var _fa7=this._options.get(i);
var text=_fa7.getDisplayValue();
if(text){
mi.setText(AjxStringUtil.htmlEncode(text));
}
var _fa9=_fa7.getImage();
if(_fa9){
mi.setImage(_fa9);
_fa7._imageWidth=Dwt.getSize(AjxImg.getImageElement(mi._iconCell)).x;
}
mi.addSelectionListener(new AjxListener(this,this._handleOptionSelection));
mi._optionIndex=i;
_fa7.setItem(mi);
}
var size=this._button.getSize();
menu.getHtmlElement().style.width=size.x;
var el=this.getHtmlElement();
return menu;
};
DwtSelect.prototype._handleOptionSelection=function(ev){
var _fad=ev.item;
var _fae=_fad._optionIndex;
var opt=this._options.get(_fae);
var _fb0=this.getValue();
this._setSelectedOption(opt);
var args=new Object();
args.selectObj=this;
args.newValue=opt.getValue();
args.oldValue=_fb0;
var _fb2=DwtUiEvent.getEvent(ev);
_fb2._args=args;
this.notifyListeners(DwtEvent.ONCHANGE,_fb2);
};
DwtSelect.prototype._clearOptionSelection=function(){
if(this._currentSelectionId!=-1){
var _fb3=DwtSelect._getObjectWithId(this._currentSelectionId);
_fb3.deSelect();
}
};
DwtSelect.prototype._setSelectedOption=function(_fb4){
var _fb5=_fb4.getSelectedValue()||_fb4.getDisplayValue();
var _fb6=_fb4.getImage();
if(this._selectedOption!=_fb4){
if(_fb5){
this.setText(_fb5);
}
if(_fb6){
this.setImage(_fb6);
}
this._selectedValue=_fb4._value;
this._selectedOption=_fb4;
}
this._updateSelection(_fb4);
};
DwtSelect.prototype._updateSelection=function(_fb7){
var _fb8=null;
if(this._currentSelectionId!=-1){
_fb8=DwtSelect._getObjectWithId(this._currentSelectionId);
}
if(_fb8){
_fb8.deSelect();
}
if(_fb7){
_fb7.select();
this._currentSelectionId=_fb7.getIdentifier();
}
};
DwtSelect.prototype._setDisabledStyle=function(){
this.setClassName(this._className+" disabled");
};
DwtSelect.prototype._setEnabledStyle=function(){
this.setClassName(this._origClassName);
};
function DwtSelectOptionData(_fb9,_fba,_fbb,_fbc){
if(_fb9==null||_fba==null){
return null;
}
this.value=_fb9;
this.displayValue=_fba;
this.isSelected=_fbb;
this.selectedValue=_fbc;
}
function DwtSelectOption(_fbd,_fbe,_fbf,_fc0,_fc1,_fc2,_fc3){
this._value=_fbd;
this._selected=_fbe;
this._displayValue=_fbf;
this._image=_fc2;
this._selectedValue=_fc3;
this._internalObjectId=DwtSelect._assignId(this);
}
DwtSelectOption.prototype.setItem=function(_fc4){
this._menuItem=_fc4;
};
DwtSelectOption.prototype.getItem=function(_fc5){
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(_fc6){
this._value=_fc6;
};
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;
};
function DwtAlert(_fc7,_fc8,_fc9){
if(arguments.length==0){
return;
}
_fc9=_fc9||DwtControl.STATIC_STYLE;
DwtControl.call(this,_fc7,null,_fc9);
this._alertClass=_fc8;
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.prototype._alertClass;
DwtAlert.prototype._alertStyle;
DwtAlert.prototype._alertTitle;
DwtAlert.prototype._alertContent;
DwtAlert.prototype._alertDiv;
DwtAlert.prototype._iconDiv;
DwtAlert.prototype._titleDiv;
DwtAlert.prototype._contentDiv;
DwtAlert.prototype.setStyle=function(_fca){
this._alertStyle=_fca||DwtAlert.INFORMATION;
this._iconDiv.className="DwtAlertIcon "+DwtAlert._ICONS[this._alertStyle];
this._alertDiv.className="DwtAlert "+(this._alertClass||DwtAlert._CLASSES[this._alertStyle]);
};
DwtAlert.prototype.getStyle=function(){
return this._alertStyle;
};
DwtAlert.prototype.setIconVisible=function(_fcb){
var _fcc=_fcb?"block":"none";
this._iconDiv.parentNode.style.display=_fcc;
};
DwtAlert.prototype.getIconVisible=function(){
return this._iconDiv.style.display=="block";
};
DwtAlert.prototype.setTitle=function(_fcd){
this._alertTitle=_fcd;
this._titleDiv.innerHTML=_fcd||"";
};
DwtAlert.prototype.getTitle=function(){
return this._alertTitle;
};
DwtAlert.prototype.setContent=function(_fce){
this._alertContent=_fce;
this._contentDiv.innerHTML=_fce||"";
};
DwtAlert.prototype.getContent=function(){
return this._alertContent;
};
DwtAlert.prototype._createHTML=function(){
var _fcf=this.getHtmlElement().id;
var _fd0=_fcf+"_icon";
var _fd1=_fcf+"_title";
var _fd2=_fcf+"_content";
this._alertDiv=document.createElement("TABLE");
this._alertDiv.width="90%";
this._alertDiv.cellPadding=0;
this._alertDiv.cellSpacing=0;
this._alertDiv.className="DwtAlert "+(this._alertClass||DwtAlert._CLASSES[this._alertStyle]);
this._iconDiv=document.createElement("DIV");
this._iconDiv.id=_fd0;
this._iconDiv.className="DwtAlertIcon "+DwtAlert._ICONS[this._alertStyle];
var row1=this._alertDiv.insertRow(0);
var _fd4=row1.insertCell(0);
_fd4.width="1%";
_fd4.appendChild(this._iconDiv);
var _fd5=document.createElement("TABLE");
_fd5.cellPadding=0;
_fd5.cellSpacing=0;
this._titleDiv=_fd5.insertRow(0).insertCell(0);
this._titleDiv.id=_fd1;
this._titleDiv.className="DwtAlertTitle";
this._contentDiv=_fd5.insertRow(1).insertCell(0);
this._contentDiv.id=_fd2;
this._contentDiv.className="DwtAlertContent";
var _fd6=row1.insertCell(1);
_fd6.width="99%";
_fd6.appendChild(_fd5);
var _fd7=this.getHtmlElement();
_fd7.style.align="center";
_fd7.appendChild(this._alertDiv);
};
function DwtText(_fd8,_fd9,_fda){
if(arguments.length==0){
return;
}
_fd9=_fd9||"DwtText";
DwtControl.call(this,_fd8,_fd9,_fda);
}
DwtText.prototype=new DwtControl;
DwtText.prototype.constructor=DwtText;
DwtText.prototype.toString=function(){
return "DwtText";
};
DwtText.prototype.setText=function(text){
if(!this._textNode){
this._textNode=document.createTextNode(text);
this.getHtmlElement().appendChild(this._textNode);
}else{
this._textNode.data=text;
}
};
DwtText.prototype.getText=function(){
return this._textNode.data;
};
DwtText.prototype.getTextNode=function(){
return this._textNode;
};
function DwtIframe(_fdc){
var _fdd=_fdc.posStyle?_fdc.posStyle:DwtControl.STATIC_STYLE;
DwtControl.call(this,_fdc.parent,_fdc.className||"DwtIframe",_fdd,false);
this._styles=_fdc.styles;
this._noscroll=_fdc.noscroll;
this._iframeID=Dwt.getNextId();
this._processHtmlCallback=_fdc.processHtmlCallback;
this._hidden=_fdc.hidden;
this._createFrame(_fdc.html);
if(_fdc.useKbMgmt){
var _fde=this.getIframe();
var idoc=Dwt.getIframeDoc(_fde);
var doc=AjxEnv.isIE?idoc:_fde.contentWindow;
Dwt.setHandler(doc,DwtEvent.ONKEYDOWN,DwtKeyboardMgr.__keyDownHdlr);
Dwt.setHandler(doc,DwtEvent.ONKEYUP,DwtKeyboardMgr.__keyUpHdlr);
Dwt.setHandler(doc,DwtEvent.ONKEYPRESS,DwtKeyboardMgr.__keyPressHdlr);
}
}
DwtIframe.prototype=new DwtControl;
DwtIframe.prototype.constructor=DwtIframe;
DwtIframe.prototype.getIframe=function(){
return document.getElementById(this._iframeID);
};
DwtIframe.prototype.getDocument=function(){
return this.getIframe().contentWindow.document;
};
DwtIframe.prototype._rawEventHandler=function(ev){
var _fe2=this.getIframe();
var win=_fe2.contentWindow;
if(AjxEnv.isIE){
ev=win.event;
}
var dw;
if(/mouse|context|click|select/i.test(ev.type)){
dw=new DwtMouseEvent(true);
}else{
dw=new DwtUiEvent(true);
}
dw.setFromDhtmlEvent(ev);
var type=dw.type.toLowerCase();
if(!/^on/.test(type)){
type="on"+type;
}
var pos=this.getLocation();
if(!AjxEnv.isIE){
var doc=win.document;
var sl=doc.documentElement.scrollLeft||doc.body.scrollLeft;
var st=doc.documentElement.scrollTop||doc.body.scrollTop;
pos.x-=sl;
pos.y-=st;
}
dw.docX+=pos.x;
dw.docY+=pos.y;
dw.elementX+=pos.x;
dw.elementY+=pos.y;
var _fea=DwtMouseEventCapture.getCaptureObj();
if(AjxEnv.isIE||AjxEnv.isSafari||!_fea){
DwtEventManager.notifyListeners(type,dw);
this.parent.notifyListeners(type,dw);
}else{
var fake=document.createEvent("MouseEvents");
fake.initMouseEvent(ev.type,true,true,document.defaultView,0,ev.screenX,ev.screenY,dw.docX,dw.docY,ev.ctrlKey,ev.altKey,ev.shiftKey,ev.metaKey,ev.button,ev.relatedTarget);
document.body.dispatchEvent(fake);
}
dw.setToDhtmlEvent(ev);
return dw._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(html){
var self=this;
function rawHandlerProxy(ev){
return self._rawEventHandler(ev);
}
(function(){
var _fef,tmp=[],i=0,idoc;
tmp[i++]="<iframe";
if(self._noscroll){
tmp[i++]=" scrolling='no'";
}
if(self._hidden){
tmp[i++]=" style='visibility:hidden'";
}
tmp[i++]=" frameborder='0' width='100%' id='";
tmp[i++]=self._iframeID;
tmp[i++]="' src='javascript:\"\";'></iframe>";
self.setContent(tmp.join(""));
html=html.replace(/(<style[^>]*>)[\s\t\u00A0]*(.*?)[\s\t\u00A0]*<\x2fstyle>/mgi,function(s,p1,p2){
return p1+p2.replace(/@import.*?(;|[\s\t\u00A0]*$)/gi,"")+"</style>";
});
_fef=self.getIframe();
idoc=Dwt.getIframeDoc(_fef);
idoc.open();
if(AjxEnv.isSafari){
idoc.write("<html><head></head>");
}
if(self._styles){
idoc.write(["<style type='text/css'>",self._styles,"</style>"].join(""));
}
idoc.write(html);
idoc.close();
if(self._processHtmlCallback){
self._processHtmlCallback.run(idoc);
}
tmp=idoc.documentElement.style;
tmp.margin=tmp.padding=idoc.body.style.margin="0";
Dwt.associateElementWithObject(idoc,self);
tmp=DwtIframe._forwardEvents;
if(!AjxEnv.isIE){
idoc=_fef.contentWindow;
}
for(i=tmp.length;--i>=0;){
idoc[tmp[i]]=rawHandlerProxy;
}
})();
};
function DwtPropertySheet(_ff3,_ff4,_ff5,_ff6){
if(arguments.length==0){
return;
}
_ff4=_ff4||"DwtPropertySheet";
DwtComposite.call(this,_ff3,_ff4,_ff5);
this._labelSide=_ff6||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 _ff7=this.getHtmlElement();
_ff7.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(_ff8,_ff9,_ffa){
var _ffb=this._tableEl.rows.length;
var row=this._tableEl.insertRow(_ffb);
row.vAlign="top";
if(this._labelSide==DwtPropertySheet.LEFT){
this._insertLabel(row,_ff8,_ffa);
this._insertValue(row,_ff9,_ffa);
}else{
this._insertValue(row,_ff9,_ffa);
this._insertLabel(row,_ff8,_ffa);
}
var id=this._propertyIdCount++;
var _ffe={id:id,index:_ffb,row:row,visible:true};
this._propertyList.push(_ffe);
this._propertyMap[id]=_ffe;
return id;
};
DwtPropertySheet.prototype._insertLabel=function(row,label,_1001){
var _1002=row.insertCell(-1);
_1002.className=this._labelCssClass;
if(this._labelSide!=DwtPropertySheet.LEFT){
_1002.width="100%";
_1002.style.textAlign="left";
}
_1002.innerHTML=label;
if(_1001){
var _1003=this._tableEl.ownerDocument.createElement("SUP");
_1003.innerHTML="*";
_1002.insertBefore(_1003,_1002.firstChild);
}
};
DwtPropertySheet.prototype._insertValue=function(row,value,_1006){
var _1007=row.insertCell(-1);
_1007.className=this._valueCssClass;
if(value instanceof DwtControl){
_1007.appendChild(value.getHtmlElement());
}else{
if(value.nodeType==AjxUtil.ELEMENT_NODE){
_1007.appendChild(value);
}else{
_1007.innerHTML=String(value);
}
}
};
DwtPropertySheet.prototype.removeProperty=function(id){
var prop=this._propertyMap[id];
if(prop.visible){
var _100a=prop.index;
var _100b=this.__getTableIndex(_100a);
var row=this._tableEl.rows[_100b];
row.parentNode.removeChild(row);
}
prop.row=null;
for(var i=index+1;i<this._propertyList.length;i++){
var prop=this._propertyList[i];
prop.index--;
}
this._propertyList.splice(index,1);
delete this._propertyMap[id];
};
DwtPropertySheet.prototype.setPropertyVisible=function(id,_100f){
var prop=this._propertyMap[id];
if(prop.visible!=_100f){
prop.visible=_100f;
var _1011=prop.index;
if(_100f){
var _1012=this.__getTableIndex(_1011);
var row=this._tableEl.insertRow(_1012);
DwtPropertySheet.__moveChildNodes(prop.row,row);
prop.row=row;
}else{
var row=prop.row;
row.parentNode.removeChild(row);
}
}
};
DwtPropertySheet.prototype.__getTableIndex=function(_1014){
var _1015=0;
for(var i=0;i<_1014;i++){
var prop=this._propertyList[i];
if(prop.visible){
_1015++;
}
}
return _1015;
};
DwtPropertySheet.__moveChildNodes=function(_1018,_1019){
if(_1018===_1019){
return;
}
var _101a=_1018.firstChild;
while(_101a!=null){
_1019.appendChild(_101a);
_101a=_1018.firstChild;
}
};
function DwtGrouper(_101b,_101c,_101d){
if(arguments.length==0){
return;
}
_101c=_101c||"DwtGrouper";
_101d=_101d||DwtControl.STATIC_STYLE;
DwtComposite.call(this,_101b,null,_101d);
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 _101e=this.getHtmlElement();
_101e.appendChild(this._borderEl);
}
DwtGrouper.prototype=new DwtComposite;
DwtGrouper.prototype.constructor=DwtGrouper;
DwtGrouper.prototype._borderEl;
DwtGrouper.prototype._labelEl;
DwtGrouper.prototype._insetEl;
DwtGrouper.prototype.setLabel=function(_101f){
Dwt.setVisible(this._labelEl,Boolean(_101f));
this._labelEl.style.display="";
this._labelEl.innerHTML=_101f?_101f:"";
};
DwtGrouper.prototype.setContent=function(_1020){
var _1021=this._insetEl;
_1021.innerHTML=_1020;
};
DwtGrouper.prototype.setElement=function(_1022){
var _1023=this._insetEl;
Dwt.removeChildren(_1023);
_1023.appendChild(_1022);
};
DwtGrouper.prototype.setView=function(_1024){
this.setElement(_1024.getHtmlElement());
};
DwtGrouper.prototype.getInsetHtmlElement=function(){
return this._insetEl;
};
function DwtProgressBar(_1025,_1026,_1027){
if(arguments.length==0){
return;
}
_1027=_1027||DwtControl.STATIC_STYLE;
DwtComposite.call(this,_1025,null,_1027);
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(val){
this._progressBgColor=val;
};
DwtProgressBar.prototype.setWholeBgColor=function(val){
this._wholeBgColor=val;
};
DwtProgressBar.prototype.setProgressCssClass=function(val){
this._progressCssClass=val;
};
DwtProgressBar.prototype.setWholeCssClass=function(val){
this._wholeCssClass=val;
};
DwtProgressBar.prototype.setProgressCssStyle=function(val){
this._progressCssStyle=val;
};
DwtProgressBar.prototype.setWholeCssStyle=function(val){
this._wholeCssStyle=val;
};
DwtProgressBar.prototype.setValue=function(val){
this._value=parseInt(val);
var _102f;
if(this._value==this._maxValue){
_102f=100;
}else{
_102f=Math.min(Math.round((this._value/this._maxValue)*100),100);
}
if(isNaN(_102f)){
_102f="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=_102f+"%";
};
DwtProgressBar.prototype.setValueByPercent=function(_1030){
this.setMaxValue(100);
this.setValue(_1030.replace(/\%/gi,""));
};
DwtProgressBar.prototype.getValue=function(){
return this._value;
};
DwtProgressBar.prototype.getMaxValue=function(){
return this._maxValue;
};
DwtProgressBar.prototype.setMaxValue=function(val){
this._maxValue=parseInt(val);
};
DwtProgressBar.prototype.setLabel=function(text,_1033){
var _1034=document.createTextNode(text);
var _1035=_1033?-1:0;
var _1036=this._row.insertCell(_1035);
_1036.appendChild(_1034);
};
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);
};
function DwtPropertyEditor(_1037,_1038,_1039,_103a,_103b){
if(arguments.length>0){
if(!_1039){
_1039="DwtPropertyEditor";
}
DwtComposite.call(this,_1037,_1039,_103a,_103b);
this._useDwtInputField=_1038!=null?_1038: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 div=document.createElement("div");
div.id=this._relDivId=Dwt.getNextId();
div.style.position="relative";
var table=document.createElement("table");
table.id=this._tableId=Dwt.getNextId();
table.cellSpacing=table.cellPadding=0;
table.appendChild(document.createElement("tbody"));
div.appendChild(table);
this.getHtmlElement().appendChild(div);
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(event){
var _103f=event.target;
var tag=_103f.tagName.toLowerCase();
if(tag=="input"){
event._stopPropagation=false;
event._returnValue=true;
return true;
}
if(this._currentInputField&&!this._currentInputField.onblur()){
event._stopPropagation=true;
event._returnValue=false;
return false;
}
try{
while(_103f&&tag!="tr"){
_103f=_103f.parentNode;
tag=_103f.tagName.toLowerCase();
}
if(_103f&&_103f.__msh_doMouseDown){
_103f.__msh_doMouseDown(event);
}
}
catch(ex){
}
};
DwtPropertyEditor.prototype.getProperties=function(){
if(this._currentInputField){
this._currentInputField.onblur();
}
function rec(_1041){
var prop={},tmp,n=_1041.length;
for(var i=0;i<n;++i){
tmp=_1041[i];
if(tmp.type=="struct"){
prop[tmp.name]=rec(tmp.children);
}else{
prop[tmp.name]=tmp.value;
}
}
return prop;
}
return rec(this._schema);
};
DwtPropertyEditor.prototype.validateData=function(){
var valid=true;
function rec(_1045){
var tmp,n=_1045.length;
for(var i=0;i<n;++i){
tmp=_1045[i];
if(tmp.type=="struct"){
rec(tmp.children);
}else{
if(!tmp._validate()){
valid=false;
}
}
}
}
rec(this._schema);
return valid;
};
DwtPropertyEditor.prototype.initProperties=function(_1048,_1049){
if(_1049==null){
this._schema=_1048;
_1049=null;
}
for(var i=0;i<_1048.length;++i){
this._createProperty(_1048[i],_1049);
}
};
DwtPropertyEditor.prototype._createProperty=function(prop,_104c){
var level=_104c?_104c._level+1:0;
var tr=this.getTable().firstChild.appendChild(document.createElement("tr"));
prop._parent=_104c;
prop._level=level;
prop._rowElId=tr.id=Dwt.getNextId();
prop._propertyEditor=this;
for(var i in DwtPropertyEditor._prop_functions){
prop[i]=DwtPropertyEditor._prop_functions[i];
}
prop._init();
tr.className="level-"+level;
if(prop.visible===false){
tr.className+=" invisible";
}
if(prop.readonly){
tr.className+=" readonly";
}
if(prop.type!="struct"){
tr.className+=" "+prop.type;
var _1050=document.createElement("td");
_1050.className="label";
tr.appendChild(_1050);
var html=AjxStringUtil.htmlEncode(prop.label||prop.name);
if(prop.required){
html+="<span class='DwtPropertyEditor-required'>*</span>";
}
_1050.innerHTML=html;
var _1052=document.createElement("td");
_1052.className="field";
tr.appendChild(_1052);
switch(prop.type){
case "boolean":
this._createCheckbox(prop,_1052);
break;
case "enum":
this._createDropDown(prop,_1052);
break;
case "date":
this._createCalendar(prop,_1052);
break;
default:
if(this._useDwtInputField){
this._createInputField(prop,_1052);
}else{
_1052.innerHTML=prop._makeDisplayValue();
tr.__msh_doMouseDown=DwtPropertyEditor.simpleClosure(prop._edit,prop);
}
break;
}
prop._fieldCellId=_1052.id=Dwt.getNextId();
if(_1050.offsetWidth>this.maxLabelWidth){
this.maxLabelWidth=_1050.offsetWidth;
}
if(_1052.offsetWidth>this.maxFieldWidth){
this.maxFieldWidth=_1052.offsetWidth;
}
}else{
var td=document.createElement("td");
td.colSpan=2;
tr.appendChild(td);
td.className="label";
tr.className+=" expander-collapsed";
td.innerHTML=["<div>",AjxStringUtil.htmlEncode(prop.label),"</div>"].join("");
this.initProperties(prop.children,prop);
tr.__msh_doMouseDown=DwtPropertyEditor.simpleClosure(prop._toggle,prop);
}
if(level>0){
tr.style.display="none";
_104c._hidden=true;
}
};
DwtPropertyEditor.prototype.setFixedLabelWidth=function(w){
try{
this.getTable().rows[0].cells[0].style.width=(w||this.maxLabelWidth)+"px";
}
catch(ex){
}
};
DwtPropertyEditor.prototype.setFixedFieldWidth=function(w){
try{
this.getTable().rows[0].cells[1].style.width=(w||this.maxFieldWidth)+"px";
}
catch(ex){
}
};
DwtPropertyEditor.prototype._setCurrentMsgDiv=function(div){
this._currentMsgDiv=div;
this._currentMsgDivTimer=setTimeout(DwtPropertyEditor.simpleClosure(this._clearMsgDiv,this),DwtPropertyEditor.MSG_TIMEOUT);
};
DwtPropertyEditor.prototype._clearMsgDiv=function(){
try{
this._stopMsgDivTimer();
}
catch(ex){
}
var div=this._currentMsgDiv;
if(div){
div.parentNode.removeChild(div);
this._currentMsgDiv=div=null;
this._currentMsgDivTimer=null;
}
};
DwtPropertyEditor.prototype._stopMsgDivTimer=function(){
if(this._currentMsgDivTimer){
clearTimeout(this._currentMsgDivTimer);
this._currentMsgDivTimer=null;
}
};
DwtPropertyEditor.prototype.addChild=function(child){
if(!this._currentFieldCell){
DwtComposite.prototype.addChild.call(this,child);
}else{
this._children.add(child);
this._currentFieldCell.appendChild(child.getHtmlElement());
}
};
DwtPropertyEditor.prototype._createCheckbox=function(prop,_105a){
var _105b=document.createElement("input");
_105b._prop=prop;
_105b.id=prop.name;
_105b.type="checkbox";
if(prop.value=="true"){
_105b.checked=prop.value;
}
_105b.addEventListener("click",prop._onCheckboxChange,false);
this._children.add(_105b);
_105a.appendChild(_105b);
};
DwtPropertyEditor.prototype._createDropDown=function(prop,_105d){
this._currentFieldCell=_105d;
var item,sel,i=0,options=[],items=prop.item;
while(item=items[i]){
options[i++]=new DwtSelectOption(item.value,item.value==prop.value,item.label);
}
prop._select=sel=new DwtSelect(this,options);
sel.addChangeListener(new AjxListener(prop,prop._onSelectChange));
sel.addListener(DwtEvent.ONMOUSEDOWN,this._onMouseDown);
this._currentFieldCell=null;
};
DwtPropertyEditor.prototype._createCalendar=function(prop,_1060){
this._currentFieldCell=_1060;
var btn=new DwtButton(this);
this._currentFieldCell=null;
btn.setText(prop._makeDisplayValue());
var menu=new DwtMenu(btn,DwtMenu.CALENDAR_PICKER_STYLE);
menu.setAssociatedObj(btn);
var cal=new DwtCalendar(menu);
var date=new Date();
date.setTime(prop.value);
cal.setDate(date);
cal.setSize(150,"auto");
cal.addSelectionListener(new AjxListener(prop,prop._onCalendarSelect));
btn.setMenu(menu);
prop._dateButton=btn;
prop._dateCalendar=cal;
};
DwtPropertyEditor.DWT_INPUT_FIELD_TYPES={"string":DwtInputField.STRING,"password":DwtInputField.PASSWORD,"integer":DwtInputField.INTEGER,"number":DwtInputField.FLOAT};
DwtPropertyEditor.prototype._createInputField=function(prop,_1066){
this._currentFieldCell=_1066;
var type=DwtPropertyEditor.DWT_INPUT_FIELD_TYPES[prop.type]||DwtInputField.STRING;
var field=new DwtInputField({parent:this,type:type,initialValue:prop.value,maxLen:prop.maxLength});
if(type==DwtInputField.INTEGER||type==DwtInputField.FLOAT){
field.setValidNumberRange(prop.minValue||null,prop.maxValue||null);
if(prop.decimals!=null){
field.setNumberPrecision(prop.decimals);
}
}
if(type==DwtInputField.STRING||type==DwtInputField.PASSWORD){
field.setValidStringLengths(prop.minLength,prop.maxLength);
}
if(prop.required){
field.setRequired();
}
this._currentFieldCell=null;
prop._inputField=field;
field.setValue(prop.value);
if(prop.readonly){
field.setReadOnly(true);
}
field.setValidationCallback(new AjxCallback(prop,prop._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 val=this._getValue();
switch(this.type){
case "password":
val=val.replace(/./g,"*");
break;
case "date":
var date=new Date();
date.setTime(val);
val=AjxDateFormat.format(this.format,date);
break;
}
if(val==""){
val="<br />";
}else{
val=AjxStringUtil.htmlEncode(String(val));
}
return val;
},_display:function(_106b){
var c=this.children,d=_106b?"":"none";
if(c){
var i=c.length;
while(--i>=0){
c[i]._getRowEl().style.display=d;
if(!_106b){
c[i]._display(false);
}
}
this._hidden=!_106b;
var tr=this._getRowEl();
tr.className=tr.className.replace(/expander-[^\s]+/,_106b?"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 pe=this._propertyEditor;
var td=document.getElementById(this._fieldCellId);
var _1071=pe.getRelDiv();
var input=document.createElement("input");
input.className="DwtPropertyEditor-input "+this.type;
input.setAttribute("autocomplete","off");
input.type=this.type=="password"?"password":"text";
var left=td.offsetLeft,top=td.offsetTop;
if(AjxEnv.isGeckoBased){
--left;
--top;
}
input.style.left=left+"px";
input.style.top=top+"px";
input.style.width=td.offsetWidth+1+"px";
input.style.height=td.offsetHeight+1+"px";
input.value=this._getValue();
_1071.appendChild(input);
input.focus();
input.onblur=DwtPropertyEditor.simpleClosure(this._saveInput,this);
input.onkeydown=DwtPropertyEditor.simpleClosure(this._inputKeyPress,this);
this._propertyEditor._currentInputField=this._inputField=input;
if(!AjxEnv.isGeckoBased){
input.select();
}else{
input.setSelectionRange(0,input.value.length);
}
},_getValue:function(){
return this.value||"";
},_checkValue:function(val){
var empty=val=="";
if(empty){
if(!this.required){
return val;
}
this._displayMsg(AjxMsg.valueIsRequired);
return null;
}
if(this.maxLength!=null&&val.length>this.maxLength){
this._displayMsg(AjxMessageFormat.format(AjxMsg.stringTooLong,this.maxLength));
return null;
}
if(this.minLength!=null&&val.length<this.minLength){
this._displayMsg(AjxMessageFormat.format(AjxMsg.stringTooShort,this.minLength));
return null;
}
if(this.mustMatch&&!this.mustMatch.test(val)){
this._displayMsg(this.msg_mustMatch||DwtPropertyEditor.MSG.mustMatch.replace(/REGEXP/,this.mustMatch.toString()));
return null;
}
if(this.mustNotMatch&&this.mustNotMatch.test(val)){
this._displayMsg(this.msg_mustNotMatch||DwtPropertyEditor.MSG.mustNotMatch.replace(/REGEXP/,this.mustNotMatch.toString()));
return null;
}
switch(this.type){
case "integer":
case "number":
var n=new Number(val);
if(isNaN(n)){
this._displayMsg(AjxMsg.notANumber);
return null;
}
if(this.type=="integer"&&Math.round(n)!=n){
this._displayMsg(AjxMsg.notAnInteger);
return null;
}
if(this.minValue!=null&&n<this.minValue){
this._displayMsg(AjxMessageFormat.format(AjxMsg.numberLessThanMin,this.minValue));
return null;
}
if(this.maxValue!=null&&n>this.maxValue){
this._displayMsg(AjxMessageFormat.format(AjxMsg.numberMoreThanMax,this.maxValue));
return null;
}
val=n;
if(this.type=="number"&&this.decimals!=null){
var str=val.toString();
var pos=str.indexOf(".");
if(pos==-1){
pos=str.length;
}
val=val.toPrecision(pos+this.decimals);
}
break;
}
return val;
},_displayMsg:function(msg){
var x,y,w,h;
var pe=this._propertyEditor;
var div=pe._currentMsgDiv;
if(!div){
div=document.createElement("div");
div.className="DwtPropertyEditor-ErrorMsg";
pe.getRelDiv().appendChild(div);
}else{
pe._stopMsgDivTimer();
}
div.style.visibility="hidden";
div.innerHTML=AjxStringUtil.htmlEncode(msg);
var table=pe.getTable();
w=table.offsetWidth;
if(!AjxEnv.isIE){
w-=12;
}
x=table.offsetLeft;
div.style.left=x+"px";
div.style.width=w+"px";
h=div.offsetHeight;
var td=document.getElementById(this._fieldCellId);
y=td.offsetTop+td.offsetHeight;
if(y+h>table.offsetTop+table.offsetHeight){
y=td.offsetTop-h;
}
div.style.top=y+"px";
div.style.visibility="";
pe._setCurrentMsgDiv(div);
},_saveInput:function(){
var input=this._inputField;
var val=this._checkValue(input.value);
if(val!=null){
this._setValue(val);
input.onblur=input.onkeyup=input.onkeydown=input.onkeypress=null;
var td=document.getElementById(this._fieldCellId);
td.innerHTML=this._makeDisplayValue();
this._inputField=null;
this._propertyEditor._currentInputField=null;
this._propertyEditor._clearMsgDiv();
input.parentNode.removeChild(input);
return true;
}else{
if(input.className.indexOf(" DwtPropertyEditor-input-error")==-1){
input.className+=" DwtPropertyEditor-input-error";
}
input.focus();
return false;
}
},_inputKeyPress:function(ev){
ev||(ev=window.event);
var input=this._inputField;
if(ev.keyCode==13){
this._saveInput();
}else{
if(ev.keyCode==27){
input.value=this._getValue();
this._saveInput();
}else{
this._propertyEditor._clearMsgDiv();
input.className=input.className.replace(/ DwtPropertyEditor-input-error/,"");
}
}
},_onCheckboxChange:function(){
this._prop._setValue(this.checked?"true":"false");
},_onSelectChange:function(){
this._setValue(this._select.getValue());
},_onCalendarSelect:function(){
this._setValue(this._dateCalendar.getDate().getTime());
this._dateButton.setText(this._makeDisplayValue());
},_onDwtInputFieldValidated:function(_1084,_1085,value){
if(_1085){
this._setValue(value);
}
},_setValue:function(val){
this.value=val;
var tr=this._getRowEl();
tr.className=tr.className.replace(/ dirty/,"");
if(this._modified()){
tr.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(func,obj){
return function(){
return func.call(obj,arguments[0]);
};
};
function DwtConfirmDialog(_108b,_108c){
if(arguments.length==0){
return;
}
var _108d=[DwtDialog.YES_BUTTON,DwtDialog.NO_BUTTON,DwtDialog.CANCEL_BUTTON];
DwtDialog.call(this,_108b,_108c,AjxMsg.confirmTitle,_108d);
this._questionDiv=document.createElement("DIV");
this._questionDiv.className="DwtConfirmDialogQuestion";
this._contentDiv.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(_108e,_108f,_1090,_1091,loc){
this._questionDiv.innerHTML=_108e||"";
this._yesCallback=_108f;
this._noCallback=_1090;
this._cancelCallback=_1091;
this.setButtonVisible(DwtDialog.CANCEL_BUTTON,Boolean(_1090));
DwtDialog.prototype.popup.call(this,loc);
};
DwtConfirmDialog.prototype.popdown=function(){
this._yesCallback=this._noCallback=this._cancelCallback=null;
DwtDialog.prototype.popdown.call(this);
};
DwtConfirmDialog.prototype._handleYesButton=function(ev){
if(this._yesCallback){
this._yesCallback.run(ev);
}
this.popdown();
};
DwtConfirmDialog.prototype._handleNoButton=function(ev){
if(this._noCallback){
this._noCallback.run(ev);
}
this.popdown();
};
DwtConfirmDialog.prototype._handleCancelButton=function(ev){
if(this._cancelCallback){
this._cancelCallback.run(ev);
}
this.popdown();
};
DwtConfirmDialog.prototype._getSeparatorTemplate=function(){
return "";
};
function DwtChooser(_1096){
if(arguments.length==0){
return;
}
DwtComposite.call(this,_1096.parent,_1096.className);
this._slvClassName=_1096.slvClassName;
this._tlvClassName=_1096.tlvClassName;
this._layoutStyle=_1096.layoutStyle?_1096.layoutStyle:DwtChooser.HORIZ_STYLE;
this._selectStyle=_1096.selectStyle?_1096.selectStyle:DwtChooser.MULTI_SELECT;
this._mode=_1096.listStyle?_1096.listStyle:DwtChooser.MODE_MOVE;
this._noDuplicates=(_1096.noDuplicates!==false);
this._singleHeight=_1096.singleHeight?_1096.singleHeight:45;
this._listSize=_1096.listSize;
this._sourceEmptyOk=_1096.sourceEmptyOk;
this._allButtons=_1096.allButtons;
this._hasTextField=_1096.hasTextField;
this._handleButtonInfo(_1096.buttonInfo);
this._mode=_1096.mode?_1096.mode:this._hasMultiButtons?DwtChooser.MODE_COPY:DwtChooser.MODE_MOVE;
this._createHtml();
this._initialize();
var _1097=_1096.parent.getSize();
var _1098=_1096.listWidth||_1097.x;
var _1099=_1096.listHeight||_1097.y;
if(_1098&&_1099){
this.resize(_1098,_1099);
}
}
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(items,view,_109c){
view=view?view:DwtChooserListView.SOURCE;
this._reset(view);
this.addItems(items,view,true);
this._selectFirst(view);
if(_109c){
this._reset((view==DwtChooserListView.SOURCE)?DwtChooserListView.TARGET:DwtChooserListView.SOURCE);
}
};
DwtChooser.prototype.getItems=function(view){
view=view?view:DwtChooserListView.TARGET;
if(view==DwtChooserListView.SOURCE){
return this.sourceListView.getList().clone();
}else{
if(this._hasMultiButtons){
var data={};
for(var i in this._data){
data[i]=this._data[i].clone();
}
return data;
}else{
return this._data[this._buttonInfo[0].id].clone();
}
}
};
DwtChooser.prototype.addItems=function(items,view,_10a2,id){
view=view?view:DwtChooserListView.SOURCE;
var list=(items instanceof AjxVector)?items.getArray():(items instanceof Array)?items:[items];
if(view==DwtChooserListView.SOURCE){
for(var i=0;i<list.length;i++){
this._addToSource(list[i],null,_10a2);
}
}else{
var data;
if(this._selectStyle==DwtChooser.SINGLE_SELECT){
this.targetListView._resetList();
list=(list.length>0)?[list[0]]:list;
}
for(var i=0;i<list.length;i++){
this._addToTarget(list[i],id,_10a2);
}
}
if(view==DwtChooserListView.SOURCE){
var list=this.sourceListView.getList();
this._sourceSize=list?list.size():0;
}
};
DwtChooser.prototype.removeItems=function(list,view,_10a9){
list=(list instanceof AjxVector)?list.getArray():(list instanceof Array)?list:[list];
for(var i=0;i<list.length;i++){
(view==DwtChooserListView.SOURCE)?this._removeFromSource(list[i],_10a9):this._removeFromTarget(list[i],_10a9);
}
};
DwtChooser.prototype.transfer=function(list,id,_10ad){
id=id?id:this._activeButtonId;
this._setActiveButton(id);
if(this._mode==DwtChooser.MODE_MOVE){
if(this._selectStyle==DwtChooser.SINGLE_SELECT){
var tlist=this.targetListView.getList();
if(tlist&&tlist.size()){
this.remove(tlist,true);
}
}
this.removeItems(list,DwtChooserListView.SOURCE,true);
}
this.addItems(list,DwtChooserListView.TARGET,_10ad);
this.sourceListView.deselectAll();
};
DwtChooser.prototype.remove=function(list,_10b0){
list=(list instanceof AjxVector)?list.getArray():(list instanceof Array)?list:[list];
if(this._mode==DwtChooser.MODE_MOVE){
for(var i=0;i<list.length;i++){
var index=this._getInsertionIndex(this.sourceListView,list[i]);
this.sourceListView.addItem(list[i],index,true);
}
this._sourceSize=list?list.length:0;
}
this.removeItems(list,DwtChooserListView.TARGET);
};
DwtChooser.prototype.setSelectStyle=function(style,_10b4){
if(style==this._selectStyle){
return;
}
this._selectStyle=style;
if(this._defLabel){
var _10b5=this._button[this._buttonInfo[0].id];
_10b5.setText((style==DwtChooser.SINGLE_SELECT)?AjxMsg.select:AjxMsg.add);
}
if(!_10b4){
var curSz=this.getSize();
this.resize(curSz.x,curSz.y);
}
if(this._allButtons){
this._addAllButton.setVisible(style==DwtChooser.MULTI_SELECT);
this._removeAllButton.setVisible(style==DwtChooser.MULTI_SELECT);
this._enableButtons();
}
if(style==DwtChooser.SINGLE_SELECT){
var list=this.targetListView.getList();
var a=list?list.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.setMultiSelect(style==DwtChooser.MULTI_SELECT);
this.targetListView.setMultiSelect(style==DwtChooser.MULTI_SELECT);
};
DwtChooser.prototype.reset=function(view){
this._reset(view);
this._setActiveButton(this._buttonInfo[0].id);
this._enableButtons();
if(this._hasTextField){
this._textField.setValue("");
}
};
DwtChooser.prototype._reset=function(view){
if(!view||view==DwtChooserListView.SOURCE){
this.sourceListView._resetList();
}
if(!view||view==DwtChooserListView.TARGET){
this.targetListView._resetList();
for(var i in this._data){
this._data[i].removeAll();
}
}
};
DwtChooser.prototype.addStateChangeListener=function(_10bc){
this.targetListView.addStateChangeListener(_10bc);
};
DwtChooser.prototype.removeStateChangeListener=function(_10bd){
this.targetListView.removeStateChangeListener(_10bd);
};
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 html=[];
var idx=0;
if(this._layoutStyle==DwtChooser.HORIZ_STYLE){
html[idx++]="<table cellspacing=0 cellpadding=0 border=0>";
html[idx++]="<tr>";
html[idx++]="<td id='";
html[idx++]=this._sourceListViewDivId;
html[idx++]="'></td>";
html[idx++]="<td valign='middle' id='";
html[idx++]=this._buttonsDivId;
html[idx++]="'>";
if(this._allButtons){
html[idx++]="<div id='";
html[idx++]=this._addAllButtonDivId;
html[idx++]="'></div><br>";
}
for(var i=0;i<this._buttonInfo.length;i++){
var id=this._buttonInfo[i].id;
html[idx++]="<div id='";
html[idx++]=this._buttonDivId[id];
html[idx++]="'></div><br>";
}
html[idx++]="<br><div id='";
html[idx++]=this._removeButtonDivId;
html[idx++]="'></div>";
if(this._allButtons){
html[idx++]="<br><div id='";
html[idx++]=this._removeAllButtonDivId;
html[idx++]="'></div><br>";
}
html[idx++]="</td>";
html[idx++]="<td id='";
html[idx++]=this._targetListViewDivId;
html[idx++]="'></td>";
html[idx++]="</tr>";
if(this._hasTextField){
html[idx++]="<tr><td>";
html[idx++]="<table border=0 width=100%><tr><td style='white-space:nowrap; width:1%'>";
html[idx++]=AjxMsg.add;
html[idx++]=":</td><td id='";
html[idx++]=this._textFieldTdId;
html[idx++]="'></td></tr></table>";
html[idx++]="</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
}
html[idx++]="</table>";
}else{
html[idx++]="<div id='";
html[idx++]=this._sourceListViewDivId;
html[idx++]="'></div>";
html[idx++]="<div align='center' id='";
html[idx++]=this._buttonsDivId;
html[idx++]="'>";
html[idx++]="<table><tr>";
if(this._allButtons){
html[idx++]="<td id='";
html[idx++]=this._addAllButtonDivId;
html[idx++]="'></td>";
}
for(var i=0;i<this._buttonInfo.length;i++){
var id=this._buttonInfo[i].id;
html[idx++]="<td id='";
html[idx++]=this._buttonDivId[id];
html[idx++]="'></td>";
}
html[idx++]="<td id='";
html[idx++]=this._removeButtonDivId;
html[idx++]="'></td>";
if(this._allButtons){
html[idx++]="<td id='";
html[idx++]=this._removeAllButtonDivId;
html[idx++]="'></td>";
}
html[idx++]="</tr></table></div>";
html[idx++]="<div id='";
html[idx++]=this._targetListViewDivId;
html[idx++]="'></div>";
}
this.getHtmlElement().innerHTML=html.join("");
};
DwtChooser.prototype._handleButtonInfo=function(_10c2){
if(!_10c2){
this._defLabel=(this._selectStyle==DwtChooser.SINGLE_SELECT)?AjxMsg.select:AjxMsg.add;
_10c2=[{label:this._defLabel}];
}
this._buttonInfo=_10c2;
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 i=0;i<this._buttonInfo.length;i++){
var id=this._buttonInfo[i].id;
this._buttonDivId[id]=Dwt.getNextId();
this._buttonId[id]=Dwt.getNextId();
}
this._hasMultiButtons=(this._buttonInfo.length>1);
};
DwtChooser.prototype._initialize=function(){
var _10c5=new AjxListener(this,this._transferButtonListener);
this._button={};
this._buttonIndex={};
this._data={};
for(var i=0;i<this._buttonInfo.length;i++){
var id=this._buttonInfo[i].id;
this._button[id]=this._setupButton(id,this._buttonId[id],this._buttonDivId[id],this._buttonInfo[i].label);
this._button[id].addSelectionListener(_10c5);
this._buttonIndex[id]=i;
this._data[id]=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 _10c8={parent:this,type:DwtInputField.STRING};
this._textField=new DwtInputField(_10c8);
this._textField.reparentHtmlElement(this._textFieldTdId);
this._textField.getInputElement()._chooserId=AjxCore.assignId(this);
this._textField.setHandler(DwtEvent.ONKEYUP,DwtChooser._onKeyUp);
Dwt.setSize(this._textField.getInputElement(),"100%",Dwt.DEFAULT);
}
if(this._selectStyle==DwtChooser.SINGLE_SELECT){
this.sourceListView.setMultiSelect(false);
this.targetListView.setMultiSelect(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(_10c9,_10ca){
var _10cb=document.getElementById(_10ca);
_10cb.appendChild(_10c9.getHtmlElement());
_10c9.setUI(null,true);
_10c9._initialized=true;
};
DwtChooser.prototype.resize=function(width,_10cd){
if(!width||!_10cd){
return;
}
if(width==Dwt.DEFAULT&&_10cd==Dwt.DEFAULT){
return;
}
var _10ce=document.getElementById(this._buttonsDivId);
var btnSz=Dwt.getSize(_10ce);
var w,sh,th;
if(this._layoutStyle==DwtChooser.HORIZ_STYLE){
w=this._listSize?this._listSize:(width==Dwt.DEFAULT)?width:Math.floor(((width-btnSz.x)/2)-12);
sh=th=_10cd;
}else{
w=width;
if(this._selectStyle==DwtChooser.SINGLE_SELECT){
sh=this._listSize?this._listSize:(_10cd==Dwt.DEFAULT)?_10cd:_10cd-btnSz.y-this._singleHeight-30;
th=(_10cd==Dwt.DEFAULT)?_10cd:_10cd-btnSz.y-sh-30;
}else{
sh=th=this._listSize?this._listSize:(_10cd==Dwt.DEFAULT)?_10cd:Math.floor(((_10cd-btnSz.y)/2)-12);
}
}
this.sourceListView.setSize(w,sh);
this.targetListView.setSize(w,th);
};
DwtChooser.prototype._setupButton=function(id,_10d2,_10d3,label){
var _10d5=new DwtButton(this);
_10d5.setText(label);
_10d5.id=_10d2;
_10d5.setHtmlElementId(_10d2);
_10d5._activeClassName=_10d5._origClassName+"-"+DwtCssStyle.ACTIVE;
_10d5._nonActiveClassName=_10d5._origClassName;
_10d5._buttonId=id;
var _10d6=document.getElementById(_10d3);
_10d6.appendChild(_10d5.getHtmlElement());
return _10d5;
};
DwtChooser.prototype._sourceListener=function(ev){
if(ev.detail==DwtListView.ITEM_DBL_CLICKED){
this.transfer(this.sourceListView.getSelection(),this._activeButtonId);
this.sourceListView.deselectAll();
}else{
if(this._activeButtonId==DwtChooser.REMOVE_BTN_ID){
var id=this._lastActiveTransferButtonId?this._lastActiveTransferButtonId:this._buttonInfo[0].id;
this._setActiveButton(id);
}
}
this.targetListView.deselectAll();
this._enableButtons();
};
DwtChooser.prototype._targetListener=function(ev){
if(ev.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(ev){
var _10db=DwtUiEvent.getDwtObjFromEvent(ev);
var id=_10db._buttonId;
var sel=this.sourceListView.getSelection();
if(sel&&sel.length){
this.transfer(sel,id);
var list=this.sourceListView.getList();
if(list&&list.size()){
this._selectFirst(DwtChooserListView.SOURCE);
}else{
this._enableButtons();
}
}else{
var email=this._getEmailFromText();
if(email){
this.transfer([email],id);
}else{
this._setActiveButton(id);
}
}
};
DwtChooser.prototype._removeButtonListener=function(ev){
this.remove(this.targetListView.getSelection());
var list=this.targetListView.getList();
if(list&&list.size()){
this._selectFirst(DwtChooserListView.TARGET);
}else{
this._enableButtons();
}
};
DwtChooser.prototype._addAllButtonListener=function(ev){
this.transfer(this.sourceListView.getList().clone());
this._selectFirst(DwtChooserListView.TARGET);
};
DwtChooser.prototype._removeAllButtonListener=function(ev){
this.remove(this.targetListView.getList().clone());
this._selectFirst(DwtChooserListView.SOURCE);
};
DwtChooser.prototype._enableButtons=function(_10e4,_10e5){
var _10e6=this.sourceListView.getList();
var _10e7=this.targetListView.getList();
var _10e8=(_10e4||(this.sourceListView.getSelectionCount()>0));
for(var i=0;i<this._buttonInfo.length;i++){
var id=this._buttonInfo[i].id;
this._button[id].setEnabled(_10e8);
}
var _10eb=(_10e5||(this.targetListView.getSelectionCount()>0));
this._removeButton.setEnabled(_10eb);
if(this._allButtons&&(this._selectStyle==DwtChooser.MULTI_SELECT)){
var _10ec=_10e6?_10e6.size():0;
var _10ed=_10e7?_10e7.size():0;
this._addAllButton.setEnabled(_10ec>0);
this._removeAllButton.setEnabled(_10ed>0);
}
};
DwtChooser.prototype._selectFirst=function(view,index){
var _10f0=(view==DwtChooserListView.SOURCE)?this.sourceListView:this.targetListView;
var list=_10f0.getList();
if(list&&list.size()>0){
_10f0.setSelection(list.get(0));
}
};
DwtChooser.prototype._setActiveButton=function(id){
if(!this._hasMultiButtons){
return;
}
if(id!=this._activeButtonId){
var _10f3=(this._activeButtonId==DwtChooser.REMOVE_BTN_ID)?this._removeButtonId:this._buttonId[this._activeButtonId];
if(_10f3){
var _10f4=Dwt.getObjectFromElement(document.getElementById(_10f3));
if(_10f4){
_10f4._origClassName=_10f4._nonActiveClassName;
_10f4.setClassName(_10f4._origClassName);
}
}
_10f3=(id==DwtChooser.REMOVE_BTN_ID)?this._removeButtonId:this._buttonId[id];
var _10f5=Dwt.getObjectFromElement(document.getElementById(_10f3));
if(_10f5){
_10f5._origClassName=_10f5._activeClassName;
_10f5.setClassName(_10f5._origClassName);
}
this._activeButtonId=id;
if(id!=DwtChooser.REMOVE_BTN_ID){
this._lastActiveTransferButtonId=id;
}
}
};
DwtChooser.prototype._isDuplicate=function(item,list){
return list.contains(item);
};
DwtChooser.prototype._addToSource=function(item,index,_10fa){
if(!item){
return;
}
if(!item._chooserIndex){
var list=this.sourceListView.getList();
item._chooserIndex=list?list.size()+1:1;
}
this.sourceListView.addItem(item,index,_10fa);
};
DwtChooser.prototype._addToTarget=function(item,id,_10fe){
if(!item){
return;
}
id=id?id:this._activeButtonId;
if(this._noDuplicates&&this._data[id]&&this._isDuplicate(item,this._data[id])){
return;
}
var list=this.targetListView.getList();
if(list&&list.contains(item)&&item.clone){
var _1100=item.clone();
_1100.id=Dwt.getNextId();
item=_1100;
}
var idx=null;
if(this._hasMultiButtons){
var list=[];
for(var i=0;i<this._buttonInfo.length;i++){
list=list.concat(this._data[this._buttonInfo[i].id].getArray());
}
var _1103=this._buttonIndex[id];
for(idx=0;idx<list.length;idx++){
var _1104=this._buttonIndex[list[idx]._buttonId];
if(_1104>_1103){
break;
}
}
}
item._buttonId=id;
this._data[id].add(item);
this.targetListView.addItem(item,idx,_10fe);
};
DwtChooser.prototype._removeFromSource=function(item,_1106){
if(!item){
return;
}
var list=this.sourceListView.getList();
if(!list){
return;
}
if(!list.contains(item)){
return;
}
this.sourceListView.removeItem(item,_1106);
};
DwtChooser.prototype._removeFromTarget=function(item,_1109){
if(!item){
return;
}
var list=this.targetListView.getList();
if(!list){
return;
}
if(!list.contains(item)){
return;
}
this._data[item._buttonId].remove(item);
this.targetListView.removeItem(item,_1109);
};
DwtChooser.prototype._getInsertionIndex=function(view,item){
var list=view.getList();
if(!list){
return null;
}
var a=list.getArray();
for(var i=0;i<a.length;i++){
if(item._chooserIndex&&a[i]._chooserIndex&&(a[i]._chooserIndex>=item._chooserIndex)){
return i;
}
}
return null;
};
DwtChooser.prototype._getEmailFromText=function(){
var text=this._textField.getValue();
var email=ZmEmailAddress.parse(text);
if(email){
email.id=Dwt.getNextId();
return email;
}
};
DwtChooser._onKeyUp=function(ev){
var el=DwtUiEvent.getTarget(ev);
var _1114=AjxCore.objectWithId(el._chooserId);
var key=DwtKeyEvent.getCharCode(ev);
if(key==3||key==13){
var email=_1114._getEmailFromText();
if(email){
_1114.transfer([email],_1114._activeButtonId);
el.value="";
}
}
_1114._enableButtons(el.value.length);
};
function DwtChooserListView(_1117,type,_1119){
if(arguments.length==0){
return;
}
_1119=_1119?_1119:"DwtChooserListView";
DwtListView.call(this,_1117,_1119,null,this._getHeaderList(_1117));
this.type=type;
this._chooserParent=_1117.parent;
}
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(_111a,_111b){
_111b=_111b?_111b:((this.type==DwtChooserListView.TARGET)||this.parent._sourceEmptyOk);
DwtListView.prototype.setUI.call(this,_111a,_111b);
};
DwtChooserListView.prototype._createItemHtml=function(item,now,_111e){
var div=document.createElement("div");
div[DwtListView._STYLE_CLASS]="Row";
div[DwtListView._SELECTED_STYLE_CLASS]=[div[DwtListView._STYLE_CLASS],"-",DwtCssStyle.SELECTED].join("");
div.className=div[DwtListView._STYLE_CLASS];
var _1120=(typeof item=="string")?String(item):item.toString();
div.innerHTML=AjxStringUtil.htmlEncode(_1120);
if(!item.id){
item.id=Dwt.getNextId();
}
this.associateItemWithElement(item,div,DwtListView.TYPE_LIST_ITEM);
return div;
};
DwtChooserListView.prototype._itemClicked=function(_1121,ev){
if(!ev.shiftKey&&!ev.ctrlKey&&ev.button==DwtMouseEvent.RIGHT){
return;
}else{
DwtListView.prototype._itemClicked.call(this,_1121,ev);
}
};
DwtChooserListView.prototype._sortColumn=function(_1123,_1124){
this._chooserParent.search(_1123,_1124);
};
function DwtGridSizePicker(_1125,title){
if(arguments.length==0){
return;
}
DwtControl.call(this,_1125,"DwtGridSizePicker");
this._title=title;
if(_1125 instanceof DwtMenu){
_1125.addPopdownListener(new AjxListener(this,this._reset));
}
this._reset();
}
DwtGridSizePicker.prototype=new DwtControl;
DwtGridSizePicker.prototype.constructor=DwtGridSizePicker;
DwtGridSizePicker.prototype.addSelectionListener=function(_1127){
this.addListener(DwtEvent.SELECTION,_1127);
};
DwtGridSizePicker.prototype.removeSelectionListener=function(_1128){
this.removeListener(DwtEvent.SELECTION,_1128);
};
DwtGridSizePicker.prototype._createGrid=function(){
var el=this.getHtmlElement();
var html=["<table cellpadding='0' border='0' cellspacing='0'>","<tr class='info'><td colspan='",this.maxCols,"'>",this._title,"</td></tr>"];
var row=["<tr class='grid'>"];
for(var i=0;i<this.maxCols;++i){
row.push("<td unselectable='unselectable'></td>");
}
row.push("</tr>");
row=row.join("");
for(var i=0;i<this.maxRows;++i){
html.push(row);
}
html.push("</table>");
html=html.join("");
el.innerHTML=html;
el.onmouseover=DwtGridSizePicker._onMouseOver;
el.onmouseup=DwtGridSizePicker._onSelect;
};
DwtGridSizePicker.prototype._reset=function(){
this._endRow=-1;
this._endCol=-1;
this.maxRows=7;
this.maxCols=7;
this._createGrid();
};
DwtGridSizePicker._onSelect=function(ev){
if(AjxEnv.isIE){
ev=window.event;
}
DwtUiEvent.getDwtObjFromEvent(ev)._onSelect(ev);
};
DwtGridSizePicker.prototype._onSelect=function(ev){
if(AjxEnv.isIE){
ev=window.event;
}
var dwtev=new DwtUiEvent();
dwtev.setFromDhtmlEvent(ev);
var _1130=dwtev.target;
if(_1130.tagName.toLowerCase()=="td"){
var row=_1130.parentNode.rowIndex;
if(row>0){
var col=_1130.cellIndex;
var selev=DwtShell.selectionEvent;
selev.item=this;
selev.detail={rows:row,cols:col+1};
if(this.parent instanceof DwtMenu){
DwtMenu.closeActiveMenu();
}
this.notifyListeners(DwtEvent.SELECTION,selev);
}
}
};
DwtGridSizePicker.prototype._onMouseOut=function(ev){
if(AjxEnv.isIE){
ev=window.event;
}
var dwtev=new DwtUiEvent();
dwtev.setFromDhtmlEvent(ev);
var tgt=dwtev.target;
var table=this.getHtmlElement().firstChild;
try{
while(tgt&&tgt!==table){
tgt=tgt.parentNode;
}
}
catch(ex){
tgt=null;
}
if(!tgt){
this._endRow=this._endCol=-1;
this._update();
}
};
DwtGridSizePicker._onMouseOver=function(ev){
if(AjxEnv.isIE){
ev=window.event;
}
DwtUiEvent.getDwtObjFromEvent(ev)._onMouseOver(ev);
};
DwtGridSizePicker.prototype._onMouseOver=function(ev){
var dwtev=new DwtUiEvent(true);
dwtev.setFromDhtmlEvent(ev);
var _113b=dwtev.target;
if(this._updateTimeout){
clearTimeout(this._updateTimeout);
}
this._updateTimeout=setTimeout(AjxCallback.simpleClosure(this._updateOnTimeout,this,_113b),10);
dwtev.setToDhtmlEvent(ev);
};
DwtGridSizePicker.prototype._addRow=function(){
var table=this.getHtmlElement().firstChild;
var tr=table.insertRow(-1);
tr.className="grid";
for(var i=0;i<this.maxCols;++i){
var td=tr.insertCell(-1);
td.unselectable=true;
}
++this.maxRows;
};
DwtGridSizePicker.prototype._addCol=function(){
var table=this.getHtmlElement().firstChild;
var rows=table.rows;
for(var i=1;i<=this.maxRows;++i){
var tr=rows[i];
var td=tr.insertCell(-1);
td.unselectable=true;
}
++table.rows[0].cells[0].colSpan;
++this.maxCols;
};
DwtGridSizePicker.prototype._updateOnTimeout=function(_1145){
var clear=true,row,col;
if(_1145.tagName.toLowerCase()=="td"){
row=_1145.parentNode.rowIndex;
if(row>0){
col=this._endCol=_1145.cellIndex;
this._endRow=_1145.parentNode.rowIndex-1;
clear=false;
}
}
if(clear){
this._endRow=this._endCol=-1;
}
this._update();
if(!clear){
if(row==this.maxRows){
this._addRow();
}
if(col==this.maxCols-1){
this._addCol();
}
}
};
DwtGridSizePicker.prototype._update=function(){
var _1147=this._endRow;
var _1148=this._endCol;
var table=this.getHtmlElement().firstChild;
var _114a=table.rows[0].cells[0];
this._rows=_1147+1;
this._cols=_1148+1;
if(this._rows>0&&this._cols>0){
_114a.innerHTML=this._rows+" x "+this._cols;
}else{
_114a.innerHTML=this._title;
}
for(var i=0;i<this.maxRows;++i){
var row=table.rows[i+1];
for(var j=0;j<this.maxCols;++j){
var cell=row.cells[j];
var clear=(i>this._endRow)||(j>this._endCol);
if(clear){
Dwt.delClass(cell,"Hovered");
}else{
Dwt.addClass(cell,"Hovered");
}
}
}
};
function DwtSpinner(_1150){
if(arguments.length==0){
return;
}
DwtControl.call(this,_1150.parent,_1150.className,_1150.posStyle);
this._maxValue=_1150.max!=null?_1150.max:null;
this._minValue=_1150.min!=null?_1150.min:null;
this._fieldSize=_1150.size!=null?_1150.size:3;
this._origValue=_1150.value||0;
this._maxLen=_1150.maxLen||null;
this._step=_1150.step||1;
this._decimals="decimals" in _1150?_1150.decimals:0;
this._align=_1150.align||null;
this._skipCaretHack=_1150.skipCaretHack;
this._timerFunc=AjxCallback.simpleClosure(this._timerFunc,this);
this._btnPressCapture=new DwtMouseEventCapture(this,"DwtSpinner",null,null,null,AjxCallback.simpleClosure(this._stopCapture,this),null,true);
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 div=this.getHtmlElement();
var id=Dwt.getNextId();
this._idField=id;
this._idUpButton=id+"-up";
this._idDownButton=id+"-down";
var _1153=this._skipCaretHack?"":Dwt.CARET_HACK_BEGIN;
var _1154=this._skipCaretHack?"":Dwt.CARET_HACK_END;
var html=["<table class='DwtSpinner' cellspacing='0' cellpadding='0'>","<tr><td rowspan='2' class='DwtSpinner-inputCell'>",_1153,"<input id='",id,"' autocomplete='off' />",_1154,"</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>"];
div.innerHTML=html.join("");
var b1=this._getUpButton();
b1.onmousedown=AjxCallback.simpleClosure(this._btnPressed,this,"Up");
var b2=this._getDownButton();
b2.onmousedown=AjxCallback.simpleClosure(this._btnPressed,this,"Down");
var input=this.getInputElement();
if(this._maxLen){
input.maxLength=this._maxLen;
}
if(this._fieldSize){
input.size=this._fieldSize;
}
if(this._align){
input.style.textAlign=this._align;
}
if(this._origValue!=null){
this.setValue(this._origValue);
}
input.onblur=AjxCallback.simpleClosure(this.setValue,this,null);
input[(AjxEnv.isIE||AjxEnv.isOpera)?"onkeydown":"onkeypress"]=AjxCallback.simpleClosure(this.__onKeyPress,this);
};
DwtSpinner.prototype._getValidValue=function(val){
var n=parseFloat(val);
if(isNaN(n)||n==null){
n=this._lastValidValue;
}
if(n==null){
n=this._minValue||0;
}
if(this._minValue!=null&&n<this._minValue){
n=this._minValue;
}
if(this._maxValue!=null&&n>this._maxValue){
n=this._maxValue;
}
n=parseFloat(n);
if(this._decimals!=null){
n=n.toFixed(this._decimals);
}
this._lastValidValue=n;
return n;
};
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(_115b){
switch(_115b){
case "Up":
return this._getUpButton();
case "Down":
return this._getDownButton();
}
};
DwtSpinner.prototype._setBtnState=function(dir,_115d){
var btn=this._getButton(dir);
if(_115d){
Dwt.addClass(btn,"DwtSpinner-"+dir+"-disabled");
btn.firstChild.className="Img"+dir+"ArrowSmallDis";
}else{
Dwt.delClass(btn,"DwtSpinner-"+dir+"-disabled");
btn.firstChild.className="Img"+dir+"ArrowSmall";
}
};
DwtSpinner.prototype.getValue=function(){
return parseFloat(this._getValidValue(this.getInputElement().value));
};
DwtSpinner.prototype.setValue=function(val){
if(val==null){
val=this.getInputElement().value;
}
val=this._getValidValue(val);
this.getInputElement().value=val;
val=parseFloat(val);
this._setBtnState("Down",this._minValue!=null&&this._minValue==val);
this._setBtnState("Up",this._maxValue!=null&&this._maxValue==val);
};
DwtSpinner.prototype.setEnabled=function(_1160){
DwtControl.prototype.setEnabled.call(this,_1160);
this.getInputElement().disabled=!_1160;
var table=this.getHtmlElement().firstChild;
if(!_1160){
Dwt.addClass(table,"DwtSpinner-disabled");
}else{
Dwt.delClass(table,"DwtSpinner-disabled");
}
};
DwtSpinner.prototype._rotateVal=function(_1162){
var val=this.getValue();
switch(_1162){
case "Up":
val+=this._step;
break;
case "Down":
val-=this._step;
break;
}
this.setValue(val);
};
DwtSpinner.prototype._btnPressed=function(_1164){
if(!this.getEnabled()){
return;
}
Dwt.addClass(this._getButton(_1164),"DwtSpinner-"+_1164+"-pressed");
this._direction=_1164;
this._rotateVal(_1164);
this._btnPressCapture.capture();
this._timerSteps=0;
this._timer=setTimeout(this._timerFunc,DwtSpinner.INIT_TIMER);
};
DwtSpinner.prototype._timerFunc=function(){
var v1=this.getValue();
this._rotateVal(this._direction);
var v2=this.getValue();
this._timerSteps++;
var _1167=this._timerSteps>4?DwtSpinner.FAST_TIMER:DwtSpinner.SLOW_TIMER;
if(v1!=v2){
this._timer=setTimeout(this._timerFunc,_1167);
}else{
this._stopCapture();
}
};
DwtSpinner.prototype._stopCapture=function(){
if(this._timer){
clearTimeout(this._timer);
}
this._timer=null;
this._timerSteps=null;
var _1168=this._direction;
Dwt.delClass(this._getButton(_1168),"DwtSpinner-"+_1168+"-pressed");
this._direction=null;
this._btnPressCapture.release();
var input=this.getInputElement();
input.focus();
Dwt.setSelectionRange(input,0,input.value.length);
};
DwtSpinner.prototype.__onKeyPress=function(ev){
if(AjxEnv.isIE){
ev=window.event;
}
var dir=null;
switch(ev.keyCode){
case 38:
dir="Up";
break;
case 40:
dir="Down";
break;
}
if(dir){
this._rotateVal(dir);
var input=this.getInputElement();
Dwt.setSelectionRange(input,0,input.value.length);
}
};
DwtSpinner.prototype.focus=function(){
this.getInputElement().focus();
};
DwtSpinner.prototype.select=function(){
var input=this.getInputElement();
input.focus();
Dwt.setSelectionRange(input,0,input.value.length);
};
function DwtButtonColorPicker(_116e,style,_1170,_1171,id,index,_1174){
DwtButton.call(this,_116e,style,_1170,_1171,DwtButton.ACTION_MOUSEUP,id,index);
var m=new DwtMenu(this,DwtMenu.COLOR_PICKER_STYLE,null,null,true);
this.setMenu(m);
var cp=new DwtColorPicker(m,null,null,_1174);
cp.addSelectionListener(new AjxListener(this,this._colorPicked));
this.__color="";
}
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(n,pad){
var _1179=[];
while(n){
var d=DwtButtonColorPicker._hexdigits[n&15];
_1179.push(d);
n=n>>4;
}
if(pad!=null){
pad-=_1179.length;
while(pad-->0){
_1179.push("0");
}
}
_1179.reverse();
return _1179.join("");
};
DwtButtonColorPicker.prototype._colorPicked=function(ev){
var color=ev.detail;
this.__color=this.__detail=color;
if(this.__colorDisplay){
this.__colorDisplay.firstChild.style.backgroundColor=color;
}
if(this.isListenerRegistered(DwtEvent.SELECTION)){
var selEv=DwtShell.selectionEvent;
selEv.item=this;
selEv.detail=color;
this.notifyListeners(DwtEvent.SELECTION,selEv);
}
};
DwtButtonColorPicker.prototype.showColorDisplay=function(_117e){
var row=this._row,idx=0;
if(this._textCell){
idx=Dwt.getCellIndex(this._textCell);
}else{
if(this._imageCell){
idx=Dwt.getCellIndex(this._imageCell)+1;
}
}
var div=this.__colorDisplay=row.insertCell(idx);
div.innerHTML="<div unselectable class='DwtButtonColorPicker-display'>&nbsp;</div>";
if(!_117e){
div=div.firstChild;
div.onmouseover=DwtButtonColorPicker.__colorDisplay_onMouseOver;
div.onmouseout=DwtButtonColorPicker.__colorDisplay_onMouseOut;
div.onmousedown=DwtButtonColorPicker.__colorDisplay_onMouseDown;
}
};
DwtButtonColorPicker.prototype.getColor=function(){
return this.__color;
};
DwtButtonColorPicker.prototype.setColor=function(color){
var rgb=color.match(DwtButtonColorPicker._RGB_RE);
if(rgb){
color="#"+DwtButtonColorPicker.toHex(parseInt(rgb[1]),2)+DwtButtonColorPicker.toHex(parseInt(rgb[2]),2)+DwtButtonColorPicker.toHex(parseInt(rgb[3]),2);
}
this.__color=color;
if(this.__colorDisplay){
this.__colorDisplay.firstChild.style.backgroundColor=color;
}
};
DwtButtonColorPicker.prototype.__colorDisplay_onMouseOver=function(ev,div){
if(!this.getEnabled()){
return;
}
Dwt.addClass(div,"ImgDisable");
};
DwtButtonColorPicker.prototype.__colorDisplay_onMouseOut=function(ev,div){
if(!this.getEnabled()){
return;
}
Dwt.delClass(div,"ImgDisable");
};
DwtButtonColorPicker.prototype.__colorDisplay_onMouseDown=function(ev,div){
if(!this.getEnabled()){
return;
}
var dwtev=DwtShell.mouseEvent;
dwtev.setFromDhtmlEvent(ev);
this.__color=this.__detail=div.style.backgroundColor="";
if(this.isListenerRegistered(DwtEvent.SELECTION)){
var selEv=DwtShell.selectionEvent;
selEv.item=this;
selEv.detail="";
this.notifyListeners(DwtEvent.SELECTION,selEv);
}
dwtev._stopPropagation=true;
dwtev._returnValue=false;
dwtev.setToDhtmlEvent(ev);
return false;
};
DwtButtonColorPicker.__colorDisplay_onMouseOver=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
obj.__colorDisplay_onMouseOver(ev,this);
};
DwtButtonColorPicker.__colorDisplay_onMouseOut=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
obj.__colorDisplay_onMouseOut(ev,this);
};
DwtButtonColorPicker.__colorDisplay_onMouseDown=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
obj.__colorDisplay_onMouseDown(ev,this);
};
function DwtMessageComposite(_1191,_1192,_1193){
if(arguments.length==0){
return;
}
_1192=_1192||"DwtMessageComposite";
DwtComposite.call(this,_1191,_1192,_1193);
}
DwtMessageComposite.prototype=new DwtComposite;
DwtMessageComposite.prototype.constructor=DwtMessageComposite;
DwtMessageComposite.prototype.toString=function(){
return "DwtMessageComposite";
};
DwtMessageComposite.prototype._formatter;
DwtMessageComposite.prototype._controls;
DwtMessageComposite.prototype.setFormat=function(_1194,_1195,_1196){
this._formatter=new AjxMessageFormat(_1194);
this._controls={};
var id=this._htmlElId;
var a=["<table border='0'><tr valign='center'>"];
var _1199=this._formatter.getSegments();
var cells={};
var hints={};
for(var i=0;i<_1199.length;i++){
var _119d=_1199[i];
var _119e=_119d instanceof AjxMessageFormat.MessageSegment;
var cid=[id,i].join("_");
a.push("<td id='",cid,"' class='",(_119e?"MessageControl"+_119d.getIndex():""),"'>");
if(_119e){
var _11a0=_1195?_1195.run(this,_119d,i):null;
if(!_11a0){
_11a0=new DwtInputField({parent:this});
}
cells[cid]=_11a0.getHtmlElement();
hints[cid]=_1196&&_1196.run(this,_119d,i);
var _11a1=_119d.getIndex();
this._controls[_11a1]=this._controls[_11a1]||_11a0;
}else{
a.push(_119d.toSubPattern());
}
a.push("</td>");
}
a.push("</tr></table>");
var el=this.getHtmlElement();
var count=el.childNodes.length;
var _11a4=document.createElement("DIV");
_11a4.className=id+"_container";
el.appendChild(_11a4);
_11a4.innerHTML=a.join("");
for(var cid in cells){
var cell=cells[cid];
var _11a6=document.getElementById(cid);
_11a6.appendChild(cell);
for(var p in hints[cid]){
_11a6[p]=hints[cid][p];
}
}
};
DwtMessageComposite.prototype.format=function(){
var args=[];
for(var _11a9 in this._controls){
args[_11a9]=this._controls[_11a9].getValue();
}
return this._formatter.format(args);
};
function ZmBatchCommand(_11aa,_11ab){
this._appCtxt=_11aa;
this._continue=(_11ab===false)?"stop":"continue";
this.curId=0;
this._cmds=[];
this._soapDocs=[];
this._respCallbacks=[];
this._errorCallbacks=[];
this._execFrames=[];
}
ZmBatchCommand.prototype.toString=function(){
return "ZmBatchCommand";
};
ZmBatchCommand.prototype.add=function(cmd){
this._cmds.push(cmd);
};
ZmBatchCommand.prototype.size=function(){
return this.curId;
};
ZmBatchCommand.prototype.run=function(_11ad){
for(var i=0;i<this._cmds.length;i++){
var cmd=this._cmds[i];
cmd.run(this);
this.curId++;
}
if(AjxEnv.isSafari){
this.runSafari(_11ad);
return;
}
var _11b0=AjxSoapDoc.create("BatchRequest","urn:zimbra");
_11b0.setMethodAttribute("onerror",this._continue);
var size=this.size();
for(var i=0;i<size;i++){
var _11b2=this._soapDocs[i];
var reqEl=_11b2.getMethod();
reqEl.setAttribute("id",i);
var node=_11b0.adoptNode(reqEl);
_11b0.getMethod().appendChild(node);
}
var _11b5=new AjxCallback(this,this._handleResponseRun,[_11ad]);
this._appCtxt.getAppController().sendRequest({soapDoc:_11b0,asyncMode:true,callback:_11b5});
};
ZmBatchCommand.prototype.runSafari=function(_11b6){
this._responseCount=0;
var _11b7=new AjxCallback(this,this._handleResponseRunSafari,[_11b6]);
var size=this.size();
for(var i=0;i<size;i++){
var _11ba=this._soapDocs[i];
var reqEl=_11ba.getMethod();
reqEl.setAttribute("id",i);
this._appCtxt.getAppController().sendRequest({soapDoc:_11ba,asyncMode:true,callback:_11b7});
}
};
ZmBatchCommand.prototype._handleResponseRun=function(_11bc,_11bd){
var _11be=_11bd.getResponse();
if(!_11be.BatchResponse){
return;
}
for(var _11bf in _11be.BatchResponse){
this._processResponse(_11bf,_11be.BatchResponse[_11bf]);
}
if(_11bc){
_11bc.run(_11bd);
}
};
ZmBatchCommand.prototype._handleResponseRunSafari=function(_11c0,_11c1){
var resp=_11c1.getResponse();
for(var i in resp){
this._processResponse(i,resp[i]);
}
var size=this.size();
if(++this._responseCount==size&&_11c0){
_11c0.run(_11c1);
}
};
ZmBatchCommand.prototype.addRequestParams=function(_11c5,_11c6,_11c7,_11c8){
this._soapDocs[this.curId]=_11c5;
this._respCallbacks[this.curId]=_11c6;
this._errorCallbacks[this.curId]=_11c7;
this._execFrames[this.curId]=_11c8;
};
ZmBatchCommand.prototype.addNewRequestParams=function(_11c9,_11ca,_11cb,_11cc){
this.addRequestParams(_11c9,_11ca,_11cb,_11cc);
this.curId++;
};
ZmBatchCommand.prototype._processResponse=function(_11cd,_11ce){
if(!(_11ce instanceof Array)){
_11ce=[_11ce];
}
for(var i=0;i<_11ce.length;i++){
var resp=_11ce[i];
var data={};
data[_11cd]=resp;
var id=resp.id;
if(_11cd=="Fault"){
var _11d3=this._execFrames[id];
if(this._errorCallbacks[id]){
var ex=ZmCsfeCommand.faultToEx(resp,"ZmBatchCommand.prototype.run");
var _11d5=this._errorCallbacks[id].run(ex);
if(!_11d5&&_11d3){
this._appCtxt.getAppController()._handleException(ex,_11d3);
}
}else{
if(_11d3){
this._appCtxt.getAppController()._handleException(ex,_11d3);
}
}
}else{
if(this._respCallbacks[id]){
var _11d6=new ZmCsfeResult(data);
this._respCallbacks[id].run(_11d6,resp);
}
}
}
};
function ZmCsfeCommand(){
}
ZmCsfeCommand._COOKIE_NAME="ZM_AUTH_TOKEN";
ZmCsfeCommand.serverUri=null;
ZmCsfeCommand._authToken=null;
ZmCsfeCommand._sessionId=null;
ZmCsfeCommand.getAuthToken=function(){
if(ZmCsfeCommand._authToken!=null){
return ZmCsfeCommand._authToken;
}
var _11d7=AjxCookie.getCookie(document,ZmCsfeCommand._COOKIE_NAME);
ZmCsfeCommand._authToken=_11d7;
return _11d7;
};
ZmCsfeCommand.setCookieName=function(_11d8){
ZmCsfeCommand._COOKIE_NAME=_11d8;
};
ZmCsfeCommand.setServerUri=function(uri){
ZmCsfeCommand.serverUri=uri;
};
ZmCsfeCommand.setAuthToken=function(_11da,_11db,_11dc){
ZmCsfeCommand._authToken=_11da;
if(_11db!=null){
var exp=null;
if(_11db>0){
exp=new Date();
var _11de=parseInt(_11db);
exp.setTime(exp.getTime()+_11de);
}
AjxCookie.setCookie(document,ZmCsfeCommand._COOKIE_NAME,_11da,exp,"/");
}else{
AjxCookie.deleteCookie(document,ZmCsfeCommand._COOKIE_NAME,"/");
}
if(_11dc){
ZmCsfeCommand.setSessionId(_11dc);
}
};
ZmCsfeCommand.clearAuthToken=function(){
ZmCsfeCommand._authToken=null;
AjxCookie.deleteCookie(document,ZmCsfeCommand._COOKIE_NAME,"/");
};
ZmCsfeCommand.getSessionId=function(){
return ZmCsfeCommand._sessionId;
};
ZmCsfeCommand.setSessionId=function(_11df){
var id=(_11df instanceof Array)?_11df[0].id:_11df;
ZmCsfeCommand._sessionId=parseInt(id);
};
ZmCsfeCommand.faultToEx=function(fault,_11e2){
var _11e3=AjxStringUtil.getAsString(fault.Code.Value);
var _11e4=AjxStringUtil.getAsString(fault.Detail.Error.Code);
var msg=AjxStringUtil.getAsString(fault.Reason.Text);
return new ZmCsfeException(msg,_11e4,_11e2,_11e3,fault.Detail.Error.a);
};
ZmCsfeCommand.prototype.invoke=function(_11e6){
if(!_11e6.soapDoc){
return;
}
var _11e7=_11e6.soapDoc;
var hdr=_11e7.createHeaderElement();
var _11e9=_11e7.set("context",null,hdr,"urn:zimbra");
var ua=_11e7.set("userAgent",null,_11e9);
var name=["ZimbraWebClient - ",AjxEnv.browser," (",AjxEnv.platform,")"].join("");
ua.setAttribute("name",name);
ua.setAttribute("version",ZmCsfeCommand.clientVersion);
if(_11e6.noSession){
_11e7.set("nosession",null,_11e9);
}
var _11ec=ZmCsfeCommand.getSessionId();
if(_11ec){
var si=_11e7.set("sessionId",null,_11e9);
si.setAttribute("id",_11ec);
}
if(_11e6.targetServer){
_11e7.set("targetServer",_11e6.targetServer,_11e9);
}
if(_11e6.highestNotifySeen){
var _11ee=_11e7.set("notify",null,_11e9);
_11ee.setAttribute("seq",_11e6.highestNotifySeen);
}
if(_11e6.changeToken){
var ct=_11e7.set("change",null,_11e9);
ct.setAttribute("token",_11e6.changeToken);
ct.setAttribute("type","new");
}
if(_11e6.accountId){
var acc=_11e7.set("account",_11e6.accountId,_11e9);
acc.setAttribute("by","id");
}else{
if(_11e6.accountName){
var acc=_11e7.set("account",_11e6.accountName,_11e9);
acc.setAttribute("by","name");
}
}
if(!_11e6.noAuthToken){
var _11f1=ZmCsfeCommand.getAuthToken();
if(!_11f1){
throw new ZmCsfeException("AuthToken required",ZmCsfeException.NO_AUTH_TOKEN,"ZmCsfeCommand.invoke");
}
_11e7.set("authToken",_11f1,_11e9);
}
if(!_11e6.useXml){
var js=_11e7.set("format",null,_11e9);
js.setAttribute("type","js");
}
var _11f3=_11e6.asyncMode;
var _11f4=_11e7.getMethod().nodeName;
var _11f5;
try{
var uri=_11e6.serverUri||ZmCsfeCommand.serverUri;
if(_11e6.logRequest){
uri=uri+_11e7._methodEl.nodeName;
}
var _11f7=_11e7.getXml();
if(AjxEnv.isSafari&&!AjxEnv.isSafariNightly){
_11f7=_11f7.replace("soap=","xmlns:soap=");
}
this._st=new Date();
if(_11f3){
_11f5=new AjxCallback(this,this._runCallback,_11e6.callback);
this._rpcId=AjxRpc.invoke(_11f7,uri,{"Content-Type":"application/soap+xml; charset=utf-8"},_11f5);
}else{
var _11f8=AjxRpc.invoke(_11f7,uri,{"Content-Type":"application/soap+xml; charset=utf-8"});
if(!_11e6.returnXml){
return this._getResponseData(_11f8,false);
}else{
return _11f8;
}
}
}
catch(ex){
if(!(ex&&(ex instanceof ZmCsfeException||ex instanceof AjxSoapException||ex instanceof AjxException))){
var newEx=new ZmCsfeException();
newEx.method="ZmCsfeCommand.invoke";
newEx.detail=ex?ex.toString():"undefined exception";
newEx.code=ZmCsfeException.UNKNOWN_ERROR;
newEx.msg="Unknown Error";
ex=newEx;
}
if(_11f3){
_11f5.run(new ZmCsfeResult(ex,true));
}else{
throw ex;
}
}
};
ZmCsfeCommand.prototype._getResponseData=function(_11fa,_11fb){
this._en=new Date();
var _11fc=new ZmCsfeResult();
var _11fd=false;
var _11fe=null;
if(typeof (_11fa.text)=="string"&&_11fa.text.indexOf("{")==0){
_11fe=_11fa.text;
}else{
try{
_11fd=true;
if(!(_11fa.text||(_11fa.xml&&(typeof _11fa.xml)=="string"))){
throw new ZmCsfeException("Csfe service error",ZmCsfeException.NETWORK_ERROR,"ZmCsfeCommand.prototype.invoke","Empty HTTP response");
}
_11fe=(AjxEnv.isIE||_11fa.xml==null)?AjxSoapDoc.createFromXml(_11fa.text):AjxSoapDoc.createFromDom(_11fa.xml);
}
catch(ex){
if(_11fb){
_11fc.set(ex,true);
return _11fc;
}else{
throw ex;
}
}
if(!_11fe){
var ex=new ZmCsfeException("Csfe service error",ZmCsfeException.SOAP_ERROR,"ZmCsfeCommand.prototype.invoke","Bad XML response doc");
if(_11fb){
_11fc.set(ex,true);
return _11fc;
}else{
throw ex;
}
}
}
var _1200="Response";
if(_11fe&&_11fe.match){
var m=_11fe.match(/\{"?Body"?:\{"?(\w+)"?:/);
if(m&&m.length){
_1200=m[1];
}
}
var data={};
if(_11fd){
data=_11fe._xmlDoc.toJSObject(true,false,true);
}else{
try{
eval("data="+_11fe);
}
catch(ex){
if(_11fb){
_11fc.set(ex,true);
return _11fc;
}else{
throw ex;
}
}
}
var fault=data.Body.Fault;
if(fault){
var ex=ZmCsfeCommand.faultToEx(fault,"ZmCsfeCommand.prototype.invoke");
if(_11fb){
_11fc.set(ex,true,data.Header);
return _11fc;
}else{
throw ex;
}
}else{
if(!_11fa.success){
var ex=new ZmCsfeException("Csfe service error",ZmCsfeException.CSFE_SVC_ERROR,"ZmCsfeCommand.prototype.invoke","HTTP response status "+_11fa.status);
if(_11fb){
_11fc.set(ex,true);
return _11fc;
}else{
throw ex;
}
}else{
if(_11fb){
_11fc.set(data);
}
}
}
if(data.Header&&data.Header.context&&data.Header.context.sessionId){
ZmCsfeCommand.setSessionId(data.Header.context.sessionId);
}
return _11fb?_11fc:data;
};
ZmCsfeCommand.prototype._runCallback=function(_1204,_1205){
if(!_1205){
return;
}
var _1206;
if(_1205 instanceof ZmCsfeResult){
_1206=_1205;
}else{
_1206=this._getResponseData(_1205,true);
}
this._en=new Date();
if(!_1204){
return;
}
if(_1204){
_1204.run(_1206);
}
};
ZmCsfeCommand.prototype.cancel=function(){
if(!this._rpcId){
return;
}
var req=AjxRpc.getRpcRequest(this._rpcId);
if(req){
req.cancel();
}
};
ZmCsfeCommand.invoke=function(_1208,_1209,_120a,_120b,_120c,_120d,_120e){
var hdr=_1208.createHeaderElement();
var _1210=_1208.set("context",null,hdr,"urn:zimbra");
if(_120d){
_1208.set("nosession",null,_1210);
}
var _1211=ZmCsfeCommand.getSessionId();
if(_1211){
var si=_1208.set("sessionId",null,_1210);
si.setAttribute("id",_1211);
}
if(_120b){
_1208.set("targetServer",_120b,_1210);
}
if(_120e){
var ct=_1208.set("change",null,_1210);
ct.setAttribute("token",_120e);
ct.setAttribute("type","new");
}
if(!_1209){
var _1214=ZmCsfeCommand.getAuthToken();
if(!_1214){
throw new ZmCsfeException("AuthToken required",ZmCsfeException.NO_AUTH_TOKEN,"ZmCsfeCommand.invoke");
}
_1208.set("authToken",_1214,_1210);
}
if(!_120c){
var js=_1208.set("format",null,_1210);
js.setAttribute("type","js");
}
var _1216=false;
try{
var uri=_120a||ZmCsfeCommand.serverUri;
var _1218=AjxEnv.isSafari&&!AjxEnv.isSafariNightly?_1208.getXml().replace("soap=","xmlns:soap="):_1208.getXml();
var _st=new Date();
var _121a=AjxRpc.invoke(_1218,uri,{"Content-Type":"application/soap+xml; charset=utf-8"});
var _en=new Date();
var _121c=null;
if(typeof (_121a.text)=="string"&&_121a.text.indexOf("{")==0){
_121c=_121a.text;
}else{
_1216=true;
_121c=(AjxEnv.isIE||_121a.xml==null)?AjxSoapDoc.createFromXml(_121a.text):AjxSoapDoc.createFromDom(_121a.xml);
}
}
catch(ex){
if(ex instanceof AjxSoapException){
throw ex;
}else{
if(ex instanceof AjxException){
throw ex;
}else{
var newEx=new ZmCsfeException();
newEx.method="ZmCsfeCommand.invoke";
newEx.detail=ex.toString();
newEx.code=ZmCsfeException.UNKNOWN_ERROR;
newEx.msg="Unknown Error";
throw newEx;
}
}
}
var resp;
if(_1216){
var body=_121c.getBody();
var fault=AjxSoapDoc.element2FaultObj(body);
if(fault){
throw new ZmCsfeException("Csfe service error",fault.errorCode,"ZmCsfeCommand.invoke",fault.reason);
}
if(_120c){
return body;
}
resp="{";
var hdr=_121c.getHeader();
if(hdr){
resp+=AjxUtil.xmlToJs(hdr)+",";
}
resp+=AjxUtil.xmlToJs(body);
resp+="}";
}else{
resp=_121c;
}
var data=new Object();
eval("data="+resp);
var fault=data.Body.Fault;
if(fault){
throw new ZmCsfeException(fault.Reason.Text,fault.Detail.Error.Code,"ZmCsfeCommand.invoke",fault.Code.Value);
}
if(data.Header&&data.Header.context&&data.Header.context.sessionId){
ZmCsfeCommand.setSessionId(data.Header.context.sessionId);
}
return data;
};
function ZmCsfeException(msg,code,_1224,_1225,data){
AjxException.call(this,msg,code,_1224,_1225);
if(data){
this.data={};
for(var i=0;i<data.length;i++){
var item=data[i];
var key=item.n;
if(!this.data[key]){
this.data[key]=[];
}
this.data[key].push(item._content);
}
}
}
ZmCsfeException.prototype=new AjxException;
ZmCsfeException.prototype.constructor=ZmCsfeException;
ZmCsfeException.prototype.toString=function(){
return "ZmCsfeException";
};
ZmCsfeException.MAIL_SEND_ADDRESS_FAILURE_INVALID="invalid";
ZmCsfeException.MAIL_SEND_ADDRESS_FAILURE_UNSENT="unsent";
ZmCsfeException._codeToMsg={};
ZmCsfeException.define=function(name,code,msg){
ZmCsfeException[name]=code;
ZmCsfeException._codeToMsg[code]=msg;
};
ZmCsfeException.getErrorMsg=function(code,args){
return args?AjxMessageFormat.format(ZmCsfeException._codeToMsg[code],args):ZmCsfeException._codeToMsg[code];
};
ZmCsfeException.prototype.getErrorMsg=function(args){
return ZmCsfeException.getErrorMsg(this.code,args);
};
ZmCsfeException.prototype.getData=function(key){
return this.data?this.data[key]:null;
};
ZmCsfeException.define("CSFE_SVC_ERROR","CSFE_SVC_ERROR",ZMsg.errorService);
ZmCsfeException.define("NETWORK_ERROR","NETWORK_ERROR",ZMsg.errorNetwork);
ZmCsfeException.define("NO_AUTH_TOKEN","NO_AUTH_TOKEN");
ZmCsfeException.define("SOAP_ERROR","SOAP_ERROR",ZMsg.errorNetwork);
ZmCsfeException.define("SVC_ALREADY_IN_PROGRESS","service.ALREADY_IN_PROGRESS");
ZmCsfeException.define("SVC_AUTH_EXPIRED","service.AUTH_EXPIRED");
ZmCsfeException.define("SVC_AUTH_REQUIRED","service.AUTH_REQUIRED");
ZmCsfeException.define("SVC_FAILURE","service.FAILURE",ZMsg.errorService);
ZmCsfeException.define("SVC_INVALID_REQUEST","service.INVALID_REQUEST");
ZmCsfeException.define("SVC_PARSE_ERROR","service.PARSE_ERROR",ZMsg.errorParse);
ZmCsfeException.define("SVC_PERM_DENIED","service.PERM_DENIED",ZMsg.errorPermission);
ZmCsfeException.define("SVC_RESOURCE_UNREACHABLE","service.RESOURCE_UNREACHABLE");
ZmCsfeException.define("SVC_UNKNOWN_DOCUMENT","service.UNKNOWN_DOCUMENT",ZMsg.errorUnknownDoc);
ZmCsfeException.define("SVC_WRONG_HOST","service.WRONG_HOST");
ZmCsfeException.define("SVC_TEMPORARILY_UNAVAILABLE","service.TEMPORARILY_UNAVAILABLE");
ZmCsfeException.define("ACCT_AUTH_FAILED","account.AUTH_FAILED");
ZmCsfeException.define("ACCT_CHANGE_PASSWORD","account.CHANGE_PASSWORD",ZMsg.errorPassChange);
ZmCsfeException.define("ACCT_EXISTS","account.ACCOUNT_EXISTS");
ZmCsfeException.define("ACCT_INVALID_PASSWORD","account.INVALID_PASSWORD",ZMsg.errorInvalidPass);
ZmCsfeException.define("ACCT_INVALID_PREF_NAME","account.INVALID_PREF_NAME",ZMsg.errorInvalidPrefName);
ZmCsfeException.define("ACCT_INVALID_PREF_VALUE","account.INVALID_PREF_VALUE",ZMsg.errorInvalidPrefValue);
ZmCsfeException.define("ACCT_MAINTENANCE_MODE","account.MAINTENANCE_MODE",ZMsg.errorMaintenanceMode);
ZmCsfeException.define("ACCT_NO_SUCH_ACCOUNT","account.NO_SUCH_ACCOUNT",ZMsg.errorNoSuchAcct);
ZmCsfeException.define("NO_SUCH_DISTRIBUTION_LIST","account.NO_SUCH_DISTRIBUTION_LIST");
ZmCsfeException.define("ACCT_NO_SUCH_SAVED_SEARCH","account.NO_SUCH_SAVED_SEARCH",ZMsg.errorNoSuchSavedSearch);
ZmCsfeException.define("ACCT_NO_SUCH_TAG","account.ACCT_NO_SUCH_TAG",ZMsg.errorNoSuchTag);
ZmCsfeException.define("ACCT_PASS_CHANGE_TOO_SOON","account.PASSWORD_CHANGE_TOO_SOON",ZMsg.errorPassChangeTooSoon);
ZmCsfeException.define("ACCT_PASS_LOCKED","account.PASSWORD_LOCKED",ZMsg.errorPassLocked);
ZmCsfeException.define("ACCT_PASS_RECENTLY_USED","account.PASSWORD_RECENTLY_USED",ZMsg.errorPassRecentlyUsed);
ZmCsfeException.define("DOMAIN_NOT_EMPTY","account.DOMAIN_NOT_EMPTY");
ZmCsfeException.define("DISTRIBUTION_LIST_EXISTS","account.DISTRIBUTION_LIST_EXISTS");
ZmCsfeException.define("IDENTITY_EXISTS","account.IDENTITY_EXISTS");
ZmCsfeException.define("TOO_MANY_IDENTITIES","account.TOO_MANY_IDENTITIES",ZMsg.errorTooManyIdentities);
ZmCsfeException.define("COS_EXISTS","account.COS_EXISTS");
ZmCsfeException.define("DOMAIN_EXISTS","account.DOMAIN_EXISTS");
ZmCsfeException.define("TOO_MANY_SEARCH_RESULTS","account.TOO_MANY_SEARCH_RESULTS");
ZmCsfeException.define("NO_SUCH_DOMAIN","account.NO_SUCH_DOMAIN");
ZmCsfeException.define("MAIL_ALREADY_EXISTS","mail.ALREADY_EXISTS",ZMsg.errorAlreadyExists);
ZmCsfeException.define("MODIFY_CONFLICT","mail.MODIFY_CONFLICT",ZMsg.errorModifyConflict);
ZmCsfeException.define("MAIL_INVALID_NAME","mail.INVALID_NAME",ZMsg.errorInvalidName);
ZmCsfeException.define("MAIL_MAINTENANCE_MODE","mail.MAINTENANCE_MODE",ZMsg.errorMaintenanceMode);
ZmCsfeException.define("MAIL_NO_SUCH_CONV","mail.NO_SUCH_CONV",ZMsg.errorNoSuchConv);
ZmCsfeException.define("MAIL_NO_SUCH_FOLDER","mail.NO_SUCH_FOLDER",ZMsg.errorNoSuchFolder);
ZmCsfeException.define("MAIL_NO_SUCH_ITEM","mail.NO_SUCH_ITEM",ZMsg.errorNoSuchItem);
ZmCsfeException.define("MAIL_NO_SUCH_MSG","mail.NO_SUCH_MSG",ZMsg.errorNoSuchMsg);
ZmCsfeException.define("MAIL_NO_SUCH_PART","mail.NO_SUCH_PART",ZMsg.errorNoSuchPart);
ZmCsfeException.define("MAIL_NO_SUCH_TAG","mail.NO_SUCH_TAG",ZMsg.errorNoSuchTag);
ZmCsfeException.define("MAIL_QUERY_PARSE_ERROR","mail.QUERY_PARSE_ERROR",ZMsg.errorQueryParse);
ZmCsfeException.define("MAIL_QUOTA_EXCEEDED","mail.QUOTA_EXCEEDED",ZMsg.errorQuotaExceeded);
ZmCsfeException.define("MAIL_SEND_ABORTED_ADDRESS_FAILURE","mail.SEND_ABORTED_ADDRESS_FAILURE",ZMsg.mailSendAddressFailure);
ZmCsfeException.define("MAIL_SEND_FAILURE","mail.SEND_FAILURE",ZMsg.mailSendFailure);
ZmCsfeException.define("MAIL_TOO_MANY_CONTACTS","mail.TOO_MANY_CONTACTS",ZMsg.errorTooManyContacts);
ZmCsfeException.define("MAIL_TOO_MANY_TERMS","mail.TOO_MANY_QUERY_TERMS_EXPANDED",ZMsg.errorTooManyTerms);
ZmCsfeException.define("MAIL_UNABLE_TO_IMPORT_CONTACTS","mail.UNABLE_TO_IMPORT_CONTACTS",ZMsg.errorUnableToImport);
ZmCsfeException.define("VOLUME_NO_SUCH_PATH","volume.NO_SUCH_PATH");
ZmCsfeException.define("LICENSE_ERROR","service.LICENSE_ERROR");
function ZmCsfeResult(data,_1232,_1233){
this.set(data,_1232,_1233);
}
ZmCsfeResult.prototype.set=function(data,_1235,_1236){
this._data=data;
this._isException=(_1235===true);
this._header=_1236;
};
ZmCsfeResult.prototype.getResponse=function(){
if(this._isException){
throw this._data;
}else{
return this._data;
}
};
ZmCsfeResult.prototype.getException=function(){
return this._isException?this._data:null;
};
ZmCsfeResult.prototype.isException=function(){
return this._isException;
};
ZmCsfeResult.prototype.getHeader=function(){
return this._header;
};
function ZmBaseSplashScreen(shell,_1238,_1239){
if(arguments.length==0){
return;
}
if(!(shell instanceof DwtShell)){
throw new AjxException("Parent must be a DwtShell",AjxException.INVALIDPARENT,"ZSplashScreen");
}
_1239=_1239||"ZSplashScreen";
DwtControl.call(this,shell,_1239,Dwt.ABSOLUTE_STYLE);
this.__createContents();
}
ZmBaseSplashScreen.prototype=new DwtControl;
ZmBaseSplashScreen.prototype.constructor=ZmBaseSplashScreen;
ZmBaseSplashScreen.prototype.getHtml=function(){
};
ZmBaseSplashScreen.prototype.setVisible=function(_123a){
if(_123a==this.getVisible()){
return;
}
if(_123a){
this.__createContents();
}
DwtControl.prototype.setVisible.call(this,_123a);
if(!_123a){
this.getHtmlElement().innerHTML="";
}
};
ZmBaseSplashScreen.prototype.__createContents=function(){
var _123b=this.getHtmlElement();
_123b.style.zIndex=Dwt.Z_SPLASH;
var _123c=document.createElement("table");
_123c.border=_123c.cellSpacing=_123c.cellPadding=0;
Dwt.setSize(_123c,"100%","100%");
var row=_123c.insertRow(0);
var cell=row.insertCell(0);
cell.vAlign="middle";
cell.align="center";
cell.innerHTML=this.getHtml();
_123b.appendChild(_123c);
_123b.style.cursor="wait";
};
function ZmErrorDialog(_123f,_1240,msgs){
if(arguments.length===0){
return;
}
this._appCtxt=_1240;
this._strNav=this._getNavigatorInfo();
this._subjPfx=this._getSubjectPrefix();
var _1242=new DwtDialog_ButtonDescriptor(ZmErrorDialog.REPORT_BUTTON,msgs.report,DwtDialog.ALIGN_LEFT);
var _1243=new DwtDialog_ButtonDescriptor(ZmErrorDialog.DETAIL_BUTTON,null,DwtDialog.ALIGN_LEFT);
DwtMessageDialog.call(this,_123f,null,null,[_1242,_1243]);
this._detailCell=document.getElementById(this._detailCellId);
var _1244=this._button[ZmErrorDialog.DETAIL_BUTTON];
_1244.setImage("SelectPullDownArrow");
Dwt.setSize(_1244.getHtmlElement(),22,(AjxEnv.isIE?21:19));
_1244.getHtmlElement().style.overflow="hidden";
var _1245=this._button[ZmErrorDialog.REPORT_BUTTON];
_1245.getHtmlElement().style.width="100px";
this.registerCallback(ZmErrorDialog.REPORT_BUTTON,this._reportCallback,this);
this.registerCallback(ZmErrorDialog.DETAIL_BUTTON,this._showDetail,this);
}
ZmErrorDialog.prototype=new DwtMessageDialog;
ZmErrorDialog.prototype.constructor=ZmErrorDialog;
ZmErrorDialog.REPORT_BUTTON=++DwtDialog.LAST_BUTTON;
ZmErrorDialog.DETAIL_BUTTON=++DwtDialog.LAST_BUTTON;
ZmErrorDialog.REPORT_URL="//www.zimbra.com/e/";
ZmErrorDialog.prototype.toString=function(){
return "ZmErrorDialog";
};
ZmErrorDialog.prototype.reset=function(){
this.setDetailString();
DwtMessageDialog.prototype.reset.call(this);
};
ZmErrorDialog.prototype.setMessage=function(_1246,_1247,style,title){
DwtMessageDialog.prototype.setMessage.call(this,_1246,style,title);
this.setDetailString(_1247);
};
ZmErrorDialog.prototype.setDetailString=function(text){
if(!(this._buttonElementId[ZmErrorDialog.DETAIL_BUTTON])){
return;
}
this._detailStr=text;
if(text){
this._button[ZmErrorDialog.DETAIL_BUTTON].setVisible(true);
if(this._detailCell&&this._detailCell.innerHTML!==""){
this._detailCell.innerHTML=this._getDetailHtml();
}
}else{
this._button[ZmErrorDialog.DETAIL_BUTTON].setVisible(false);
if(this._detailCell){
this._detailCell.innerHTML="";
}
}
};
ZmErrorDialog.prototype.popdown=function(){
DwtMessageDialog.prototype.popdown.call(this);
this.setButtonVisible(ZmErrorDialog.REPORT_BUTTON,true);
};
ZmErrorDialog.prototype._getContentHtml=function(){
this._detailCellId=Dwt.getNextId();
var html=[];
var idx=0;
html[idx++]=DwtMessageDialog.prototype._getContentHtml.call(this);
html[idx++]="<div id='";
html[idx++]=this._detailCellId;
html[idx++]="'></div>";
return html.join("");
};
ZmErrorDialog.prototype._getDetailHtml=function(){
return ["<div class='vSpace'></div><table cellspacing=0 cellpadding=0 width='100%'>","<tr><td><textarea readonly rows='10'>",this._detailStr,"</textarea></td></tr></table>"].join("");
};
ZmErrorDialog.prototype._getNavigatorInfo=function(){
var _124d=[];
var idx=0;
_124d[idx++]="\n\n";
_124d[idx++]="href: ";
_124d[idx++]=location.href;
_124d[idx++]="\n";
for(var i in navigator){
if(typeof navigator[i]=="function"){
continue;
}
if(typeof navigator[i]=="unknown"){
continue;
}
_124d[idx++]=i+": "+navigator[i]+"\n";
}
return _124d.join("");
};
ZmErrorDialog.prototype._getSubjectPrefix=function(){
var _1250=[];
var idx=0;
_1250[idx++]="ER: ";
if(AjxEnv.isIE){
_1250[idx++]="IE ";
}else{
if(AjxEnv.isFirefox){
_1250[idx++]="FF ";
}else{
if(AjxEnv.isMozilla){
_1250[idx++]="MOZ ";
}else{
if(AjxEnv.isSafari){
_1250[idx++]="SAF ";
}else{
if(AjxEnv.isOpera){
_1250[idx++]="OPE ";
}else{
_1250[idx++]="UKN ";
}
}
}
}
}
if(AjxEnv.isWindows){
_1250[idx++]="WIN ";
}else{
if(AjxEnv.isLinux){
_1250[idx++]="LNX ";
}else{
if(AjxEnv.isMac){
_1250[idx++]="MAC ";
}else{
_1250[idx++]="UNK ";
}
}
}
_1250[idx++]=this._appCtxt.get(ZmSetting.CLIENT_VERSION)+" ";
return _1250.join("");
};
ZmErrorDialog.prototype._getUserPrefs=function(){
var _1252=this._appCtxt.getCurrentSearch();
var _1253=[];
var idx=0;
_1253[idx++]="\n\n";
_1253[idx++]="username: ";
_1253[idx++]=this._appCtxt.get(ZmSetting.USERNAME);
_1253[idx++]="\n";
if(_1252){
_1253[idx++]="currentSearch: ";
_1253[idx++]=_1252.query;
_1253[idx++]="\n";
}
for(var i in ZmSetting.INIT){
if(ZmSetting.INIT[i][0]){
_1253[idx++]=ZmSetting.INIT[i][0];
_1253[idx++]=": ";
_1253[idx++]=(""+ZmSetting.INIT[i][3]);
_1253[idx++]="\n";
}
}
return _1253.join("");
};
ZmErrorDialog.prototype._reportCallback=function(){
if(!this._iframe||AjxEnv.isIE){
this._iframe=document.createElement("iframe");
this._iframe.style.width=this._iframe.style.height=0;
this._iframe.style.visibility="hidden";
var _1256=this._getContentDiv();
_1256.appendChild(this._iframe);
}
var _1257=this._getUserPrefs();
var _1258=Dwt.getNextId();
var html=[];
var idx=0;
var _125b=this._subjPfx+this._detailStr.substring(0,40);
var _125c=(location.protocol=="https:")?"https:":"http:";
html[idx++]="<html><head></head><body><form id='";
html[idx++]=_1258;
html[idx++]="' method='POST' action='";
html[idx++]=_125c;
html[idx++]=ZmErrorDialog.REPORT_URL;
html[idx++]="'>";
html[idx++]="<textarea name='details'>";
html[idx++]=this._detailStr;
html[idx++]="version - ";
html[idx++]=this._appCtxt.get(ZmSetting.CLIENT_VERSION);
html[idx++]="\n";
html[idx++]="release - ";
html[idx++]=this._appCtxt.get(ZmSetting.CLIENT_RELEASE);
html[idx++]="\n";
html[idx++]="date - ";
html[idx++]=this._appCtxt.get(ZmSetting.CLIENT_DATETIME);
html[idx++]="</textarea>";
html[idx++]="<textarea name='navigator'>";
html[idx++]=this._strNav;
html[idx++]="</textarea>";
html[idx++]="<textarea name='prefs'>";
html[idx++]=_1257;
html[idx++]="</textarea>";
html[idx++]="<textarea name='subject'>";
html[idx++]=_125b;
html[idx++]="</textarea>";
html[idx++]="</form></body></html>";
var idoc=Dwt.getIframeDoc(this._iframe);
idoc.open();
idoc.write(html.join(""));
idoc.close();
var form=idoc.getElementById(_1258);
if(form){
form.submit();
}
this.popdown();
};
ZmErrorDialog.prototype._showDetail=function(){
if(this._detailCell){
if(this._detailCell.innerHTML===""){
this._button[ZmErrorDialog.DETAIL_BUTTON].setImage("SelectPullUpArrow");
this._detailCell.innerHTML=this._getDetailHtml();
}else{
this._button[ZmErrorDialog.DETAIL_BUTTON].setImage("SelectPullDownArrow");
this._detailCell.innerHTML="";
}
}
};
ZLoginFactory=function(){
};
ZLoginFactory.USER_ID="ZLoginUserName";
ZLoginFactory.PASSWORD_ID="ZLoginPassword";
ZLoginFactory.REMEMBER_ME_ID="rememberMe";
ZLoginFactory.REMEMBER_ME_CONTAINER_ID="ZLoginRememberMeContainer";
ZLoginFactory.NEW_PASSWORD_ID="newpass1";
ZLoginFactory.NEW_PASSWORD_TR_ID="ZLoginNewPassword1Tr";
ZLoginFactory.PASSWORD_CONFIRM_TR_ID="ZLoginNewPassword2Tr";
ZLoginFactory.PASSWORD_CONFIRM_ID="newpass2";
ZLoginFactory.LOGIN_BUTTON_ID="ZLoginButton";
ZLoginFactory.HIDDEN_BUTTON_ID="ZLoginHiddenButton";
ZLoginFactory.TEXT_TYPE=0;
ZLoginFactory.CHECKBOX_TYPE=1;
ZLoginFactory.BUTTON_TYPE=2;
ZLoginFactory.TAB_ORDER=[ZLoginFactory.USER_ID,ZLoginFactory.PASSWORD_ID,ZLoginFactory.NEW_PASSWORD_ID,ZLoginFactory.PASSWORD_CONFIRM_ID,ZLoginFactory.REMEMBER_ME_ID,ZLoginFactory.LOGIN_BUTTON_ID];
ZLoginFactory.VISIBILITY=[ZLoginFactory.USER_ID,ZLoginFactory.PASSWORD_ID,ZLoginFactory.NEW_PASSWORD_TR_ID,ZLoginFactory.PASSWORD_CONFIRM_TR_ID,ZLoginFactory.REMEMBER_ME_CONTAINER_ID,ZLoginFactory.LOGIN_BUTTON_ID];
ZLoginFactory.TAB_TYPE=[ZLoginFactory.TEXT_TYPE,ZLoginFactory.TEXT_TYPE,ZLoginFactory.TEXT_TYPE,ZLoginFactory.TEXT_TYPE,ZLoginFactory.CHECKBOX_TYPE,ZLoginFactory.BUTTON_TYPE];
ZLoginFactory.copyDefaultParams=function(msgs){
return {showPanelBorder:true,companyURL:msgs["splashScreenCompanyURL"]||"",shortVersion:"",longVersion:"",appName:msgs["splashScreenAppName"]||"",productName:"",showError:false,errorMsg:"",showAbout:false,aboutMsg:"",showLoading:false,loadingMsg:msgs["splashScreenLoading"]||"",showForm:false,showUserField:false,userNameMsg:msgs["username"]?msgs["username"]+":":"",showPasswordField:false,passwordMsg:msgs["password"]?msgs["password"]+":":"",showNewPasswordFields:false,newPassword1Msg:msgs["newPassword"]+":"||"",newPassword2Msg:msgs["confirm"]+":"||"",showLicenseMsg:false,licenseMsg:"",showRememberMeCheckbox:false,rememberMeMsg:msgs["rememberMe"]||"",showLogOff:false,logOffMsg:msgs["loginAsDiff"]||"",logOffAction:"",showButton:false,loginAction:"ZmLogin.handleLogin();",buttonName:msgs["login"]||"",copyrightText:msgs["splashScreenCopyright"]||""};
};
ZLoginFactory.getLoginPanel=function(){
var _1260=this.get("ZLoginPanel");
if(!_1260){
_1260=this.get("ZLoginPanelInvisible");
}
return _1260;
};
ZLoginFactory.showErrorMsg=function(msg){
this.setHTML("ZLoginErrorMsg",msg);
this.show("ZLoginErrorPanel");
this._flickerErrorMessagePanel();
};
ZLoginFactory.hideErrorMsg=function(){
this.hide("ZLoginErrorPanel");
};
ZLoginFactory.getErrorMsgPanel=function(){
return this.get("ZLoginErrorPanel");
};
ZLoginFactory.showAboutMsg=function(msg){
this.setHTML("ZLoginAboutPanel",msg);
this.show("ZLoginAboutPanel");
};
ZLoginFactory.hideAboutMsg=function(){
this.hide("ZLoginAboutPanel");
};
ZLoginFactory.getAboutMsg=function(){
return this.get("ZLoginAboutPanel");
};
ZLoginFactory.showLoadingMsg=function(msg){
this.setHTML("ZLoginLoadingMsg",msg);
this.show("ZLoginAboutPanel");
};
ZLoginFactory.hideLoadingMsg=function(){
this.hide("ZLoginAboutPanel");
};
ZLoginFactory.getLoadingMsg=function(){
return this.get("ZLoginAboutPanel");
};
ZLoginFactory.showForm=function(){
this.show("ZLoginFormPanel");
};
ZLoginFactory.hideForm=function(){
this.hide("ZLoginFormPanel");
};
ZLoginFactory.getForm=function(){
return this.get("ZLoginFormPanel");
};
ZLoginFactory.showUserField=function(name){
this.setValue(ZLoginFactory.USER_ID,name);
this.show(ZLoginFactory.USER_ID);
};
ZLoginFactory.hideUserField=function(){
this.hide(ZLoginFactory.USER_ID);
};
ZLoginFactory.getUserField=function(){
return this.get(ZLoginFactory.USER_ID);
};
ZLoginFactory.showPasswordField=function(msg){
this.show(ZLoginFactory.PASSWORD_ID);
};
ZLoginFactory.hidePasswordField=function(){
this.hide(ZLoginFactory.PASSWORD_ID);
};
ZLoginFactory.getPasswordField=function(){
return this.get(ZLoginFactory.PASSWORD_ID);
};
ZLoginFactory.showNewPasswordFields=function(){
this.show(ZLoginFactory.NEW_PASSWORD_TR_ID);
this.show(ZLoginFactory.PASSWORD_CONFIRM_TR_ID);
};
ZLoginFactory.hideNewPasswordFields=function(){
this.hide(ZLoginFactory.NEW_PASSWORD_TR_ID);
this.hide(ZLoginFactory.PASSWORD_CONFIRM_TR_ID);
};
ZLoginFactory.areNewPasswordFieldsShown=function(){
return this.isShown(ZLoginFactory.NEW_PASSWORD_TR_ID);
};
ZLoginFactory.getNewPasswordField=function(){
return this.get(ZLoginFactory.NEW_PASSWORD_ID);
};
ZLoginFactory.getPasswordConfirmField=function(){
return this.get(ZLoginFactory.PASSWORD_CONFIRM_ID);
};
ZLoginFactory.showRememberMeCheckbox=function(){
this.show(ZLoginFactory.REMEMBER_ME_CONTAINER_ID);
};
ZLoginFactory.hideRememberMeCheckbox=function(){
this.hide(ZLoginFactory.REMEMBER_ME_CONTAINER_ID);
};
ZLoginFactory.showLogOff=function(){
this.show("ZLoginLogOffContainer");
};
ZLoginFactory.hideLogOff=function(){
this.hide("ZLoginLogOffContainer");
};
ZLoginFactory.setLoginButtonName=function(name){
this.setHTML("ZLoginButtonText",name);
};
ZLoginFactory.setLoginButtonAction=function(_1267){
var el=document.getElementById(ZLoginFactory.LOGIN_BUTTON_ID);
if(el){
el.onclick=_1267;
}
};
ZLoginFactory.getLoginButton=function(){
return this.get(ZLoginFactory.LOGIN_BUTTON_ID);
};
ZLoginFactory.getLoginDialogHTML=function(_1269){
var html=["<div ",(_1269.showPanelBorder?"id='ZLoginPanel'":"id='ZLoginPanelInvisible'"),">","<table class='zLoginTable' width='100%' cellpadding=0 cellspacing=0>","<tr><td id='ZLoginHeaderContainer'><center>","<table class='zLoginTable'>","<tr><td id='ZLoginBannerContainer'>","<div id='ZLoginBannerPanel'>","<table class='zLoginTable'><tr>","<td><div style='cursor:pointer' id='ZLoginBannerImage' class='ImgLoginBanner'"," onclick='window.open(\"",_1269.companyURL,"\", \"_blank\")'></div></td>","<td valign=top id='ZLoginShortVersion'>",_1269.shortVersion,"</td>","</tr></table>","<div id='ZLoginAppName'>",_1269.appName,"</div>","<div id='ZLoginProductName'>",_1269.productName,"</div>","<div id='ZLoginLongVersion'>",_1269.longVersion,"</div>","</div>","</td>","</tr>","</table>","</center></td>","</tr>","<tr><td id='ZLoginBodyContainer'>","<div id='ZLoginErrorPanel' ",(_1269.showError?"":"style='display:none'"),">","<table>","<tr><td valign='top' width='40'><img id='errorIcon' src='/zimbra/img/loRes/dwt/Critical_32.gif' width=32 height=32></td>","<td width='*' id='ZLoginErrorMsg' class='errorText'>",_1269.errorMsg,"</td>","</tr>","</table>","</div>","","<div id='ZLoginAboutPanel' ",(_1269.showAbout?"":"style='display:none'"),">",_1269.aboutMsg,"</div>","<div id='ZLoginLoadingPanel' ",(_1269.showLoading?"":"style='display:none'"),">","<table><tr><td></td><td id='ZLoginLoadingMsg'>",_1269.loadingMsg,"</td></tr></table>","</div>","<div id='ZLoginFormPanel' ",(_1269.showForm?"":"style='display:none'"),">","<table class='zLoginTable' width='100%' cellpadding=4>","<tr id='ZLoginUserTr'",(_1269.showUserField?"":"style='display:none'"),"><td class='zLoginLabelContainer'>",_1269.userNameMsg,"</td>","<td class='zLoginFieldContainer' colspan=2>",Dwt.CARET_HACK_BEGIN,"<input id='",ZLoginFactory.USER_ID,"' class='zLoginField' autocomplete=OFF type=text tabIndex=1>",Dwt.CARET_HACK_END,"</td>","</tr>","<tr id='ZLoginPasswordTr' ",(_1269.showPasswordField?"":"style='display:none'"),"><td class='zLoginLabelContainer'>",_1269.passwordMsg,"</td>","<td class='zLoginFieldContainer' colspan=2>",Dwt.CARET_HACK_BEGIN,"<input id='",ZLoginFactory.PASSWORD_ID,"' class='zLoginField' autocomplete=OFF type=password tabIndex=2>",Dwt.CARET_HACK_END,"</td>","</tr>","<tr id='",ZLoginFactory.NEW_PASSWORD_TR_ID,"' ",(_1269.showNewPasswordFields?"":"style='display:none'"),"><td class='zLoginLabelContainer'>",_1269.newPassword1Msg,"</td>","<td class='zLoginFieldContainer' colspan=2>",Dwt.CARET_HACK_BEGIN,"<input id='",ZLoginFactory.NEW_PASSWORD_ID,"' class='zLoginField' autocomplete=OFF type=password tabIndex=2>",Dwt.CARET_HACK_END,"</td>","</tr>","<tr id='",ZLoginFactory.PASSWORD_CONFIRM_TR_ID,"' ",(_1269.showNewPasswordFields?"":"style='display:none'"),"><td class='zLoginLabelContainer'>",_1269.newPassword2Msg,"</td>","<td class='zLoginFieldContainer' colspan=2>",Dwt.CARET_HACK_BEGIN,"<input id='",ZLoginFactory.PASSWORD_CONFIRM_ID,"' class='zLoginField' autocomplete=OFF type=password tabIndex=2>",Dwt.CARET_HACK_END,"</td>","</tr>","<tr id='ZLoginLicenseMsgContainer' ",(_1269.showLicenseMsg?"":"style='display:none'"),">","<td colspan=3 id='ZLoginLicenseMsg'>",_1269.licenseMsg,"</td>","</tr>","<tr><td class='zLoginLabelContainer'>&nbsp;</td>","<td class='zLoginFieldContainer' id='",ZLoginFactory.REMEMBER_ME_CONTAINER_ID,"' ",(_1269.showRememberMeCheckbox?"":"style='display:none'"),">","<table class='zLoginTable' width=100%>","<tr><td width=1><input id='",ZLoginFactory.REMEMBER_ME_ID,"' type='checkbox'></td>","<td class='zLoginCheckboxLabelContainer'>",_1269.rememberMeMsg,"</td>","</tr>","</table>","</td>","<td class='zLoginFieldContainer' id='ZLoginLogOffContainer' ",(_1269.showLogOff?"":"style='display:none'"),">","<a href='' onclick='javascript:"+_1269.logOffAction+";'>"+_1269.logOffMsg+"</a>","</td>","<td class='zLoginButtonContainer' align='right'",(_1269.showButton?"":"style='display:none'"),">","<div id='",ZLoginFactory.LOGIN_BUTTON_ID,"' class='DwtButton'","onclick='",_1269.loginAction,";return false'","onmouseover='javascript:this.className=\"DwtButton-activated\"'","onmouseout='javascript:this.className=\"DwtButton\"'","onmousedown='javascript:this.className=\"DwtButton-triggered\";return false'","onmouseup='javascript:this.className=\"DwtButton\"'","onmousemove='javascript:return false'","onselectstart='javascript: return false'","onfocus='javascript:this.className = \"DwtButton-focused\";return false'","onblur='javascript:this.className = \"DwtButton\";return false'",">","<table style='width:100%;height:100%' cellspacing=0>","<tr><td align='center' class='Text' id='ZLoginButtonText'>",_1269.buttonName,"</td></tr>","</table>","</div>","<!-- non-IE browsers dont allow focus for non-INPUT elements so we have to"," create a hidden input to fake focus for our DIV which acts as an input button -->","<input type='button' style='position:absolute;top:-10000;left:-10000;' id='",ZLoginFactory.HIDDEN_BUTTON_ID,"'>","</td>","</tr>","</table>","</div>","<table class='zLoginTable' width='100%' cellpadding=0 cellspacing=0>","<tr>","<td id='ZloginClientLevelContainer'>",_1269.clientLevelNotice,"</td>","</tr>","<tr><td id='ZLoginLicenseContainer'>",_1269.copyrightText,"</td>","</tr>","</table>","</td>","</tr>","</table>","</div>"].join("");
return html;
};
ZLoginFactory.setHTML=function(id,_126c){
var el=document.getElementById(id);
if(el&&_126c!=null){
el.innerHTML=_126c;
}
};
ZLoginFactory.setValue=function(id,_126f){
var el=document.getElementById(id);
if(el&&_126f!=null){
el.value=_126f;
}
};
ZLoginFactory.show=function(id,_1272){
var el=document.getElementById(id);
if(el){
el.style.display="";
}
};
ZLoginFactory.isShown=function(id){
var el=document.getElementById(id);
return el?(el.style.display!="none"):false;
};
ZLoginFactory.hide=function(id){
var el=document.getElementById(id);
if(el){
el.style.display="none";
}
};
ZLoginFactory.get=function(id){
return document.getElementById(id);
};
ZLoginFactory.handleKeyPress=function(ev){
ev=ev||window.event;
if(ev==null){
return true;
}
var _127a=ev.target?ev.target:ev.srcElement;
if(!_127a){
return true;
}
var _127b=ev.keyCode;
var _127c=false;
if(_127b==13){
if(_127a.id==ZLoginFactory.USER_ID||_127a.id=="newpass1"){
_127c=true;
}else{
var _127d=ZLoginFactory.get(ZLoginFactory.LOGIN_BUTTON_ID).onclick;
if(_127d){
_127d.call(_127a);
}
ZLoginFactory._cancelEvent(ev);
return false;
}
}
if(_127c||(_127b==9)){
var _127e=ZLoginFactory.TAB_ORDER.length-1;
for(var i=0;i<ZLoginFactory.TAB_ORDER.length;i++){
if(ZLoginFactory.TAB_ORDER[i]==_127a.id){
_127e=i;
break;
}
}
var _1280=!ev.shiftKey;
var _1281=ZLoginFactory._getTabToIndex(_127e,_1280);
var _1282=ZLoginFactory.TAB_ORDER[_1281];
var _1283=ZLoginFactory.TAB_TYPE[_1281];
ZLoginFactory._onFocusChange(_1283,_1282,_127a);
ZLoginFactory._cancelEvent(ev);
}
};
ZLoginFactory._cancelEvent=function(ev){
if(ev.stopPropagation){
ev.stopPropagation();
}
if(ev.preventDefault){
ev.preventDefault();
}
ev.cancelBubble=true;
ev.returnValue=false;
};
ZLoginFactory._onFocusChange=function(type,id,_1287){
if((type!=ZLoginFactory.BUTTON_TYPE)&&!AjxEnv.isIE){
ZLoginFactory._loginButtonBlur();
}
if(type==ZLoginFactory.TEXT_TYPE){
var edit=ZLoginFactory.get(id);
edit.focus();
edit.select();
}else{
if(type==ZLoginFactory.CHECKBOX_TYPE){
var _1289=ZLoginFactory.get(id);
_1289.focus();
}else{
var _128a=ZLoginFactory.get(id);
if(AjxEnv.isIE){
_128a.focus();
}else{
ZLoginFactory._loginButtonFocus(_128a);
_1287.blur();
document.getElementById(ZLoginFactory.HIDDEN_BUTTON_ID).focus();
}
}
}
};
ZLoginFactory._getTabToIndex=function(_128b,_128c){
var _128d=_128b;
do{
var _128e;
if(_128c){
_128d=(_128d==(ZLoginFactory.TAB_ORDER.length-1))?0:_128d+1;
}else{
_128d=(_128d==0)?(ZLoginFactory.TAB_ORDER.length-1):_128d-1;
}
var id=ZLoginFactory.TAB_ORDER[_128d];
var _1290=ZLoginFactory.VISIBILITY[_128d];
var _1291=ZLoginFactory.get(id);
if(ZLoginFactory.isShown(_1290)&&!ZLoginFactory.get(id).disabled){
return _128d;
}
}while(_128d!=_128b);
return 0;
};
ZLoginFactory._loginButtonFocus=function(_1292){
_1292.className="DwtButton-focused";
};
ZLoginFactory._loginButtonBlur=function(_1293){
var _1293=ZLoginFactory.get(ZLoginFactory.LOGIN_BUTTON_ID);
_1293.className="DwtButton";
};
ZLoginFactory._flickerErrorMessagePanel=function(){
ZLoginFactory.getErrorMsgPanel().style.visibility="hidden";
window.setTimeout(ZLoginFactory._showErrorMessagePanel,8);
};
ZLoginFactory._showErrorMessagePanel=function(){
ZLoginFactory.getErrorMsgPanel().style.visibility="visible";
};
function ZmEvent(type){
this.type=type;
this.event=null;
this.source=null;
this._details={};
}
ZmEvent.L_MODIFY=1;
ZmEvent.L_PICKER=2;
var i=1;
ZmEvent.S_FOLDER=i++;
ZmEvent.S_TAG=i++;
ZmEvent.S_CONV=i++;
ZmEvent.S_MSG=i++;
ZmEvent.S_ATT=i++;
ZmEvent.S_CONTACT=i++;
ZmEvent.S_GROUP=i++;
ZmEvent.S_APPT=i++;
ZmEvent.S_NOTE=i++;
ZmEvent.S_PAGE=i++;
ZmEvent.S_DOCUMENT=i++;
ZmEvent.S_NOTEBOOK=i++;
ZmEvent.S_PICKER=i++;
ZmEvent.S_SEARCH=i++;
ZmEvent.S_SETTING=i++;
ZmEvent.S_ZIMLET=i++;
ZmEvent.S_FILTER=i++;
ZmEvent.S_CHAT=i++;
ZmEvent.S_ROSTER=i++;
ZmEvent.S_ROSTER_ITEM=i++;
ZmEvent.S_ROSTER_TREE_ITEM=i++;
ZmEvent.S_ROSTER_TREE_GROUP=i++;
ZmEvent.S_RESOURCE=i++;
ZmEvent.S_MOUNTPOINT=i++;
ZmEvent.S_DATA_SOURCE=i++;
ZmEvent.S_IDENTITY=i++;
ZmEvent.S_ACCOUNT=i++;
ZmEvent.S_COS=i++;
ZmEvent.S_DOMAIN=i++;
ZmEvent.S_SERVER=i++;
ZmEvent.S_GLOBALCONFIG=i++;
ZmEvent.S_STATUS=i++;
ZmEvent.S_MAX=i-1;
i=1;
ZmEvent.E_CREATE=i++;
ZmEvent.E_DELETE=i++;
ZmEvent.E_MODIFY=i++;
ZmEvent.E_LOAD=i++;
ZmEvent.E_REMOVE=i++;
ZmEvent.E_REMOVE_ALL=i++;
ZmEvent.E_MOVE=i++;
ZmEvent.E_FLAGS=i++;
ZmEvent.E_TAGS=i++;
ZmEvent.E_CALENDARS=i++;
ZmEvent.E_ZIMLETS=i++;
ZmEvent.prototype.toString=function(){
return "ZmEvent";
};
ZmEvent.prototype.set=function(event,_1296){
this.event=event;
this.source=_1296;
};
ZmEvent.prototype.setDetail=function(field,value){
this._details[field]=value;
};
ZmEvent.prototype.getDetail=function(field){
return this._details[field];
};
ZmEvent.prototype.getItems=function(){
var items=this._details["items"];
return items?items:[];
};
ZmEvent.prototype.setDetails=function(_129b){
this._details=_129b?_129b:{};
};
ZmEvent.prototype.getDetails=function(){
return this._details;
};
function ZmModel(type){
if(arguments.length==0){
return;
}
this._evt=new ZmEvent(type);
this._evtMgr=new AjxEventMgr();
}
ZmModel.prototype.toString=function(){
return "ZmModel";
};
ZmModel.prototype.addChangeListener=function(_129d){
return this._evtMgr.addListener(ZmEvent.L_MODIFY,_129d);
};
ZmModel.prototype.removeChangeListener=function(_129e){
return this._evtMgr.removeListener(ZmEvent.L_MODIFY,_129e);
};
ZmModel.prototype.removeAllChangeListeners=function(){
return this._evtMgr.removeAll(ZmEvent.L_MODIFY);
};
ZmModel.prototype._notify=function(event,_12a0){
if(this._evtMgr.isListenerRegistered(ZmEvent.L_MODIFY)){
this._evt.set(event,this);
this._evt.setDetails(_12a0);
this._evtMgr.notifyListeners(ZmEvent.L_MODIFY,this._evt);
}
};
function ZmSetting(id,name,type,_12a4,_12a5,_12a6){
if(arguments.length==0){
return;
}
ZmModel.call(this,ZmEvent.S_SETTING);
this.id=id;
this.name=name;
this.type=type;
this.dataType=_12a4?_12a4:ZmSetting.D_STRING;
this.defaultValue=_12a5;
this.settings=_12a6;
if(this.dataType==ZmSetting.D_HASH){
this.value={};
this.defaultValue={};
}else{
if(this.dataType==ZmSetting.D_LIST){
this.value=[];
this.defaultValue=[];
}else{
this.value=null;
}
}
}
ZmSetting.prototype=new ZmModel;
ZmSetting.prototype.constructor=ZmSetting;
ZmSetting.CAL_DAY="day";
ZmSetting.CAL_MONTH="month";
ZmSetting.CAL_WEEK="week";
ZmSetting.CAL_WORK_WEEK="workWeek";
ZmSetting.CAL_SCHEDULE="schedule";
ZmSetting.COMPOSE_FONT_COLOR="#000000";
ZmSetting.COMPOSE_FONT_FAM="Times New Roman";
ZmSetting.COMPOSE_FONT_SIZE="12pt";
ZmSetting.COMPOSE_TEXT="text";
ZmSetting.COMPOSE_HTML="html";
ZmSetting.CV_CARDS="cards";
ZmSetting.CV_LIST="list";
ZmSetting.DEDUPE_NONE="dedupeNone";
ZmSetting.DEDUPE_SECOND="secondCopyifOnToOrCC";
ZmSetting.DEDUPE_INBOX="moveSentMessageToInbox";
ZmSetting.DEDUPE_ALL="dedupeAll";
ZmSetting.GROUP_BY_CONV="conversation";
ZmSetting.GROUP_BY_MESSAGE="message";
ZmSetting.INCLUDE_NONE="includeNone";
ZmSetting.INCLUDE="includeBody";
ZmSetting.INCLUDE_PREFIX="includeBodyWithPrefix";
ZmSetting.INCLUDE_ATTACH="includeAsAttachment";
ZmSetting.INCLUDE_SMART="includeSmart";
ZmSetting.LICENSE_BAD="bad";
ZmSetting.LICENSE_GOOD="good";
ZmSetting.LICENSE_GRACE="inGracePeriod";
ZmSetting.SIG_INTERNET="internet";
ZmSetting.SIG_OUTLOOK="outlook";
var i=1;
ZmSetting.AC_TIMER_INTERVAL=i++;
ZmSetting.ASYNC_MODE=i++;
ZmSetting.BRANCH=i++;
ZmSetting.CLIENT_DATETIME=i++;
ZmSetting.CLIENT_RELEASE=i++;
ZmSetting.CLIENT_VERSION=i++;
ZmSetting.CONFIG_PATH=i++;
ZmSetting.CSFE_MSG_FETCHER_URI=i++;
ZmSetting.CSFE_SERVER_URI=i++;
ZmSetting.CSFE_UPLOAD_URI=i++;
ZmSetting.CSFE_EXPORT_URI=i++;
ZmSetting.FORCE_CAL_OFF=i++;
ZmSetting.HELP_URI=i++;
ZmSetting.LOGO_URI=i++;
ZmSetting.LOG_REQUEST=i++;
ZmSetting.TIMEOUT=i++;
ZmSetting.USE_XML=i++;
ZmSetting.SKIN_APP_BOTTOM_TOOLBAR_ID=i++;
ZmSetting.SKIN_APP_CHOOSER_ID=i++;
ZmSetting.SKIN_APP_MAIN_ID=i++;
ZmSetting.SKIN_APP_TOP_TOOLBAR_ID=i++;
ZmSetting.SKIN_CURRENT_APP_ID=i++;
ZmSetting.SKIN_LOGO_ID=i++;
ZmSetting.SKIN_SASH_ID=i++;
ZmSetting.SKIN_SEARCH_BUILDER_ID=i++;
ZmSetting.SKIN_SEARCH_BUILDER_TOOLBAR_ID=i++;
ZmSetting.SKIN_SEARCH_BUILDER_TR_ID=i++;
ZmSetting.SKIN_SEARCH_ID=i++;
ZmSetting.SKIN_SHELL_ID=i++;
ZmSetting.SKIN_STATUS_ID=i++;
ZmSetting.SKIN_TREE_ID=i++;
ZmSetting.SKIN_TREE_FOOTER_ID=i++;
ZmSetting.SKIN_USER_INFO_ID=i++;
ZmSetting.SKIN_QUOTA_INFO_ID=i++;
ZmSetting.ALLOW_ANY_FROM_ADDRESS=i++;
ZmSetting.ALLOW_FROM_ADDRESSES=i++;
ZmSetting.AVAILABLE_SKINS=i++;
ZmSetting.BROWSE_ENABLED=i++;
ZmSetting.CALENDAR_ENABLED=i++;
ZmSetting.CHANGE_PASSWORD_ENABLED=i++;
ZmSetting.CONTACTS_ENABLED=i++;
ZmSetting.CONVERSATIONS_ENABLED=i++;
ZmSetting.DISPLAY_NAME=i++;
ZmSetting.FILTERS_ENABLED=i++;
ZmSetting.GAL_AUTOCOMPLETE_ENABLED=i++;
ZmSetting.GAL_ENABLED=i++;
ZmSetting.HTML_COMPOSE_ENABLED=i++;
ZmSetting.IDENTITIES_ENABLED=i++;
ZmSetting.IDLE_SESSION_TIMEOUT=i++;
ZmSetting.IM_ENABLED=i++;
ZmSetting.INITIAL_SEARCH_ENABLED=i++;
ZmSetting.MAIL_ALIASES=i++;
ZmSetting.MAIL_ENABLED=i++;
ZmSetting.MAX_CONTACTS=i++;
ZmSetting.MIN_POLLING_INTERVAL=i++;
ZmSetting.NOTEBOOK_ENABLED=i++;
ZmSetting.NOTIF_FEATURE_ENABLED=i++;
ZmSetting.OPTIONS_ENABLED=i++;
ZmSetting.POP_ACCOUNTS_ENABLED=i++;
ZmSetting.PWD_MAX_LENGTH=i++;
ZmSetting.PWD_MIN_LENGTH=i++;
ZmSetting.QUOTA=i++;
ZmSetting.SAVED_SEARCHES_ENABLED=i++;
ZmSetting.SHARING_ENABLED=i++;
ZmSetting.SKIN_CHANGE_ENABLED=i++;
ZmSetting.TAGGING_ENABLED=i++;
ZmSetting.VACATION_MSG_FEATURE_ENABLED=i++;
ZmSetting.VIEW_ATTACHMENT_AS_HTML=i++;
ZmSetting.LICENSE_STATUS=i++;
ZmSetting.QUOTA_USED=i++;
ZmSetting.TOKEN_LIFETIME=i++;
ZmSetting.USERID=i++;
ZmSetting.USERNAME=i++;
ZmSetting.ATT_VIEW_ENABLED=i++;
ZmSetting.EVAL_ENABLED=i++;
ZmSetting.FEED_ENABLED=i++;
ZmSetting.HELP_ENABLED=i++;
ZmSetting.MAIL_FORWARDING_ENABLED=i++;
ZmSetting.MIXED_VIEW_ENABLED=i++;
ZmSetting.NOTES_ENABLED=i++;
ZmSetting.PREFS_ENABLED=i++;
ZmSetting.PRINT_ENABLED=i++;
ZmSetting.REPLY_MENU_ENABLED=i++;
ZmSetting.FORWARD_MENU_ENABLED=i++;
ZmSetting.SAVE_DRAFT_ENABLED=i++;
ZmSetting.SEARCH_ENABLED=i++;
ZmSetting.SKI_HACK_ENABLED=i++;
ZmSetting.SPAM_ENABLED=i++;
ZmSetting.USER_FOLDERS_ENABLED=i++;
ZmSetting.AUTO_ADD_ADDRESS=i++;
ZmSetting.CONTACTS_PER_PAGE=i++;
ZmSetting.CONTACTS_VIEW=i++;
ZmSetting.EXPORT=i++;
ZmSetting.GAL_AUTOCOMPLETE=i++;
ZmSetting.GAL_AUTOCOMPLETE_SESSION=i++;
ZmSetting.IMPORT=i++;
ZmSetting.CAL_ALWAYS_SHOW_MINI_CAL=i++;
ZmSetting.CAL_FIRST_DAY_OF_WEEK=i++;
ZmSetting.CAL_REMINDER_WARNING_TIME=i++;
ZmSetting.CAL_SHOW_TIMEZONE=i++;
ZmSetting.CAL_USE_QUICK_ADD=i++;
ZmSetting.CALENDAR_INITIAL_VIEW=i++;
ZmSetting.DEFAULT_CALENDAR_TIMEZONE=i++;
ZmSetting.PASSWORD=i++;
ZmSetting.SEARCH_INCLUDES_SPAM=i++;
ZmSetting.SEARCH_INCLUDES_TRASH=i++;
ZmSetting.SHOW_SEARCH_STRING=i++;
ZmSetting.SKIN_NAME=i++;
ZmSetting.SORTING_PREF=i++;
ZmSetting.COMPOSE_AS_FORMAT=i++;
ZmSetting.COMPOSE_INIT_FONT_COLOR=i++;
ZmSetting.COMPOSE_INIT_FONT_FAMILY=i++;
ZmSetting.COMPOSE_INIT_FONT_SIZE=i++;
ZmSetting.COMPOSE_SAME_FORMAT=i++;
ZmSetting.DEDUPE_MSG_TO_SELF=i++;
ZmSetting.FORWARD_INCLUDE_ORIG=i++;
ZmSetting.GROUP_MAIL_BY=i++;
ZmSetting.INITIAL_GROUP_MAIL_BY=i++;
ZmSetting.INITIAL_SEARCH=i++;
ZmSetting.MAIL_LOCAL_DELIVERY_DISABLED=i++;
ZmSetting.MAIL_FORWARDING_ADDRESS=i++;
ZmSetting.NEW_WINDOW_COMPOSE=i++;
ZmSetting.NOTIF_ADDRESS=i++;
ZmSetting.NOTIF_ENABLED=i++;
ZmSetting.PAGE_SIZE=i++;
ZmSetting.POLLING_INTERVAL=i++;
ZmSetting.READING_PANE_ENABLED=i++;
ZmSetting.REPLY_INCLUDE_ORIG=i++;
ZmSetting.REPLY_PREFIX=i++;
ZmSetting.REPLY_TO_ADDRESS=i++;
ZmSetting.SAVE_TO_SENT=i++;
ZmSetting.SENT_FOLDER_NAME=i++;
ZmSetting.SHORTCUTS=i++;
ZmSetting.SHOW_BCC=i++;
ZmSetting.SHOW_FRAGMENTS=i++;
ZmSetting.SIGNATURE=i++;
ZmSetting.SIGNATURE_ENABLED=i++;
ZmSetting.SIGNATURE_STYLE=i++;
ZmSetting.USE_KEYBOARD_SHORTCUTS=i++;
ZmSetting.VACATION_MSG=i++;
ZmSetting.VACATION_MSG_ENABLED=i++;
ZmSetting.VIEW_AS_HTML=i++;
ZmSetting.MAX_INDEX=i-1;
delete i;
ZmSetting.T_CONFIG=1;
ZmSetting.T_PREF=2;
ZmSetting.T_COS=3;
ZmSetting.D_STRING=1;
ZmSetting.D_INT=2;
ZmSetting.D_BOOLEAN=3;
ZmSetting.D_LDAP_TIME=4;
ZmSetting.D_HASH=5;
ZmSetting.D_LIST=6;
ZmSetting.INIT={};
ZmSetting.INIT[ZmSetting.AC_TIMER_INTERVAL]=[null,ZmSetting.T_CONFIG,ZmSetting.D_INT,300];
ZmSetting.INIT[ZmSetting.ASYNC_MODE]=[null,ZmSetting.T_CONFIG,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.BRANCH]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"FRANK"];
ZmSetting.INIT[ZmSetting.CLIENT_DATETIME]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"20070712-1009"];
ZmSetting.INIT[ZmSetting.CLIENT_RELEASE]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"20070712095019"];
ZmSetting.INIT[ZmSetting.CLIENT_VERSION]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"4.5.6_GA_1044.RHEL5_64"];
ZmSetting.INIT[ZmSetting.CONFIG_PATH]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,appContextPath+"/js/zimbraMail/config"];
ZmSetting.INIT[ZmSetting.CSFE_MSG_FETCHER_URI]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.CSFE_SERVER_URI]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.CSFE_UPLOAD_URI]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.CSFE_EXPORT_URI]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.FORCE_CAL_OFF]=[null,ZmSetting.T_CONFIG,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.HELP_URI]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,appContextPath+"/help/Zimbra_User_Help.htm"];
ZmSetting.INIT[ZmSetting.LOG_REQUEST]=[null,ZmSetting.T_CONFIG,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.LOGO_URI]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"http://www.zimbra.com"];
ZmSetting.INIT[ZmSetting.TIMEOUT]=[null,ZmSetting.T_CONFIG,ZmSetting.D_INT,30];
ZmSetting.INIT[ZmSetting.USE_XML]=[null,ZmSetting.T_CONFIG,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SKIN_APP_BOTTOM_TOOLBAR_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_app_bottom_toolbar"];
ZmSetting.INIT[ZmSetting.SKIN_APP_CHOOSER_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_app_chooser"];
ZmSetting.INIT[ZmSetting.SKIN_APP_MAIN_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_app_main"];
ZmSetting.INIT[ZmSetting.SKIN_APP_TOP_TOOLBAR_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_app_top_toolbar"];
ZmSetting.INIT[ZmSetting.SKIN_CURRENT_APP_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_current_app"];
ZmSetting.INIT[ZmSetting.SKIN_LOGO_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_logo"];
ZmSetting.INIT[ZmSetting.SKIN_SASH_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_tree_app_sash"];
ZmSetting.INIT[ZmSetting.SKIN_SEARCH_BUILDER_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_search_builder"];
ZmSetting.INIT[ZmSetting.SKIN_SEARCH_BUILDER_TOOLBAR_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_search_builder_toolbar"];
ZmSetting.INIT[ZmSetting.SKIN_SEARCH_BUILDER_TR_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_tr_search_builder"];
ZmSetting.INIT[ZmSetting.SKIN_SEARCH_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_search"];
ZmSetting.INIT[ZmSetting.SKIN_SHELL_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_outer"];
ZmSetting.INIT[ZmSetting.SKIN_STATUS_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_status"];
ZmSetting.INIT[ZmSetting.SKIN_TREE_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_tree"];
ZmSetting.INIT[ZmSetting.SKIN_TREE_FOOTER_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_tree_footer"];
ZmSetting.INIT[ZmSetting.SKIN_USER_INFO_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_username"];
ZmSetting.INIT[ZmSetting.SKIN_QUOTA_INFO_ID]=[null,ZmSetting.T_CONFIG,ZmSetting.D_STRING,"skin_container_quota"];
ZmSetting.INIT[ZmSetting.ALLOW_ANY_FROM_ADDRESS]=["zimbraAllowAnyFromAddress",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.ALLOW_FROM_ADDRESSES]=["zimbraAllowFromAddress",ZmSetting.T_COS,ZmSetting.D_LIST];
ZmSetting.INIT[ZmSetting.AVAILABLE_SKINS]=[null,ZmSetting.T_COS,ZmSetting.D_LIST];
ZmSetting.INIT[ZmSetting.BROWSE_ENABLED]=["zimbraFeatureAdvancedSearchEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.CALENDAR_ENABLED]=["zimbraFeatureCalendarEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.CHANGE_PASSWORD_ENABLED]=["zimbraFeatureChangePasswordEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.CONTACTS_ENABLED]=["zimbraFeatureContactsEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.CONVERSATIONS_ENABLED]=["zimbraFeatureConversationsEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.DISPLAY_NAME]=["displayName",ZmSetting.T_COS,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.FILTERS_ENABLED]=["zimbraFeatureFiltersEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.GAL_AUTOCOMPLETE_ENABLED]=["zimbraFeatureGalAutoCompleteEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.GAL_ENABLED]=["zimbraFeatureGalEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.HTML_COMPOSE_ENABLED]=["zimbraFeatureHtmlComposeEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.IDENTITIES_ENABLED]=["zimbraFeatureIdentitiesEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.IDLE_SESSION_TIMEOUT]=["zimbraMailIdleSessionTimeout",ZmSetting.T_COS,ZmSetting.D_LDAP_TIME,0];
ZmSetting.INIT[ZmSetting.IM_ENABLED]=["zimbraFeatureIMEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.INITIAL_SEARCH_ENABLED]=["zimbraFeatureInitialSearchPreferenceEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.MAIL_ALIASES]=["zimbraMailAlias",ZmSetting.T_COS,ZmSetting.D_LIST];
ZmSetting.INIT[ZmSetting.MAIL_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.MAIL_FORWARDING_ENABLED]=["zimbraFeatureMailForwardingEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.MAX_CONTACTS]=["zimbraContactMaxNumEntries",ZmSetting.T_COS,ZmSetting.D_INT,0];
ZmSetting.INIT[ZmSetting.MIN_POLLING_INTERVAL]=["zimbraMailMinPollingInterval",ZmSetting.T_COS,ZmSetting.D_LDAP_TIME,120];
ZmSetting.INIT[ZmSetting.NOTEBOOK_ENABLED]=["zimbraFeatureNotebookEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.NOTIF_FEATURE_ENABLED]=["zimbraFeatureNewMailNotificationEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.OPTIONS_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.POP_ACCOUNTS_ENABLED]=["zimbraFeaturePop3DataSourceEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.PWD_MAX_LENGTH]=["zimbraPasswordMaxLength",ZmSetting.T_COS,ZmSetting.D_INT,64];
ZmSetting.INIT[ZmSetting.PWD_MIN_LENGTH]=["zimbraPasswordMinLength",ZmSetting.T_COS,ZmSetting.D_INT,6];
ZmSetting.INIT[ZmSetting.QUOTA]=["zimbraMailQuota",ZmSetting.T_COS,ZmSetting.D_INT,0];
ZmSetting.INIT[ZmSetting.SAVED_SEARCHES_ENABLED]=["zimbraFeatureSavedSearchesEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SHARING_ENABLED]=["zimbraFeatureSharingEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.SKIN_CHANGE_ENABLED]=["zimbraFeatureSkinChangeEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.TAGGING_ENABLED]=["zimbraFeatureTaggingEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.VACATION_MSG_FEATURE_ENABLED]=["zimbraFeatureOutOfOfficeReplyEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.VIEW_ATTACHMENT_AS_HTML]=["zimbraFeatureViewInHtmlEnabled",ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.LICENSE_STATUS]=[null,ZmSetting.T_COS,ZmSetting.D_STRING,ZmSetting.LICENSE_GOOD];
ZmSetting.INIT[ZmSetting.QUOTA_USED]=[null,ZmSetting.T_COS,ZmSetting.D_INT];
ZmSetting.INIT[ZmSetting.TOKEN_LIFETIME]=[null,ZmSetting.T_COS,ZmSetting.D_INT];
ZmSetting.INIT[ZmSetting.USERNAME]=[null,ZmSetting.T_COS,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.USERID]=["zimbraId",ZmSetting.T_COS,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.ATT_VIEW_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.EVAL_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.FEED_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.HELP_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.MIXED_VIEW_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.NOTES_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.PREFS_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.PRINT_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.REPLY_MENU_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.FORWARD_MENU_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.SAVE_DRAFT_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.SEARCH_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.SKI_HACK_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SPAM_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.USER_FOLDERS_ENABLED]=[null,ZmSetting.T_COS,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.AUTO_ADD_ADDRESS]=["zimbraPrefAutoAddAddressEnabled",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.CONTACTS_PER_PAGE]=["zimbraPrefContactsPerPage",ZmSetting.T_PREF,ZmSetting.D_INT,25];
ZmSetting.INIT[ZmSetting.CONTACTS_VIEW]=["zimbraPrefContactsInitialView",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.CV_LIST];
ZmSetting.INIT[ZmSetting.EXPORT]=[null,ZmSetting.T_PREF];
ZmSetting.INIT[ZmSetting.GAL_AUTOCOMPLETE]=["zimbraPrefGalAutoCompleteEnabled",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.GAL_AUTOCOMPLETE_SESSION]=[null,ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.IMPORT]=[null,ZmSetting.T_PREF];
ZmSetting.INIT[ZmSetting.CAL_ALWAYS_SHOW_MINI_CAL]=["zimbraPrefCalendarAlwaysShowMiniCal",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.CAL_FIRST_DAY_OF_WEEK]=["zimbraPrefCalendarFirstDayOfWeek",ZmSetting.T_PREF,ZmSetting.D_INT,0];
ZmSetting.INIT[ZmSetting.CAL_REMINDER_WARNING_TIME]=["zimbraPrefCalendarApptReminderWarningTime",ZmSetting.T_PREF,ZmSetting.D_INT,0];
ZmSetting.INIT[ZmSetting.CAL_SHOW_TIMEZONE]=["zimbraPrefUseTimeZoneListInCalendar",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.CAL_USE_QUICK_ADD]=["zimbraPrefCalendarUseQuickAdd",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.CALENDAR_INITIAL_VIEW]=["zimbraPrefCalendarInitialView",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.CAL_DAY];
ZmSetting.INIT[ZmSetting.DEFAULT_CALENDAR_TIMEZONE]=["zimbraPrefTimeZoneId",ZmSetting.T_PREF,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.PASSWORD]=[null,ZmSetting.T_PREF];
ZmSetting.INIT[ZmSetting.SEARCH_INCLUDES_SPAM]=["zimbraPrefIncludeSpamInSearch",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SEARCH_INCLUDES_TRASH]=["zimbraPrefIncludeTrashInSearch",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SHOW_SEARCH_STRING]=["zimbraPrefShowSearchString",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SKIN_NAME]=["zimbraPrefSkin",ZmSetting.T_PREF,ZmSetting.D_STRING,"sand"];
ZmSetting.INIT[ZmSetting.SORTING_PREF]=[null,ZmSetting.T_PREF,ZmSetting.D_HASH];
ZmSetting.INIT[ZmSetting.COMPOSE_AS_FORMAT]=["zimbraPrefComposeFormat",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.COMPOSE_TEXT];
ZmSetting.INIT[ZmSetting.COMPOSE_INIT_FONT_COLOR]=["zimbraPrefHtmlEditorDefaultFontColor",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.COMPOSE_FONT_COLOR];
ZmSetting.INIT[ZmSetting.COMPOSE_INIT_FONT_FAMILY]=["zimbraPrefHtmlEditorDefaultFontFamily",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.COMPOSE_FONT_FAM];
ZmSetting.INIT[ZmSetting.COMPOSE_INIT_FONT_SIZE]=["zimbraPrefHtmlEditorDefaultFontSize",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.COMPOSE_FONT_SIZE];
ZmSetting.INIT[ZmSetting.COMPOSE_SAME_FORMAT]=["zimbraPrefForwardReplyInOriginalFormat",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.DEDUPE_MSG_TO_SELF]=["zimbraPrefDedupeMessagesSentToSelf",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.DEDUPE_NONE];
ZmSetting.INIT[ZmSetting.FORWARD_INCLUDE_ORIG]=["zimbraPrefForwardIncludeOriginalText",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.INCLUDE];
ZmSetting.INIT[ZmSetting.INITIAL_GROUP_MAIL_BY]=["zimbraPrefGroupMailBy",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.GROUP_BY_MESSAGE];
ZmSetting.INIT[ZmSetting.GROUP_MAIL_BY]=[null,ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.GROUP_BY_MESSAGE];
ZmSetting.INIT[ZmSetting.INITIAL_SEARCH]=["zimbraPrefMailInitialSearch",ZmSetting.T_PREF,ZmSetting.D_STRING,"in:inbox"];
ZmSetting.INIT[ZmSetting.MAIL_FORWARDING_ADDRESS]=["zimbraPrefMailForwardingAddress",ZmSetting.T_PREF,ZmSetting.D_STRING];
ZmSetting.INIT[ZmSetting.MAIL_LOCAL_DELIVERY_DISABLED]=["zimbraPrefMailLocalDeliveryDisabled",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.NEW_WINDOW_COMPOSE]=["zimbraPrefComposeInNewWindow",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.NOTIF_ENABLED]=["zimbraPrefNewMailNotificationEnabled",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.NOTIF_ADDRESS]=["zimbraPrefNewMailNotificationAddress",ZmSetting.T_PREF];
ZmSetting.INIT[ZmSetting.PAGE_SIZE]=["zimbraPrefMailItemsPerPage",ZmSetting.T_PREF,ZmSetting.D_INT,25];
ZmSetting.INIT[ZmSetting.POLLING_INTERVAL]=["zimbraPrefMailPollingInterval",ZmSetting.T_PREF,ZmSetting.D_LDAP_TIME,300];
ZmSetting.INIT[ZmSetting.READING_PANE_ENABLED]=["zimbraPrefReadingPaneEnabled",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.REPLY_INCLUDE_ORIG]=["zimbraPrefReplyIncludeOriginalText",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.INCLUDE];
ZmSetting.INIT[ZmSetting.REPLY_PREFIX]=["zimbraPrefForwardReplyPrefixChar",ZmSetting.T_PREF,ZmSetting.D_STRING,">"];
ZmSetting.INIT[ZmSetting.REPLY_TO_ADDRESS]=["zimbraPrefReplyToAddress",ZmSetting.T_PREF];
ZmSetting.INIT[ZmSetting.SAVE_TO_SENT]=["zimbraPrefSaveToSent",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.SENT_FOLDER_NAME]=["zimbraPrefSentMailFolder",ZmSetting.T_PREF,ZmSetting.D_STRING,"sent"];
ZmSetting.INIT[ZmSetting.SHOW_BCC]=[null,ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SHOW_FRAGMENTS]=["zimbraPrefShowFragments",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SIGNATURE]=["zimbraPrefMailSignature",ZmSetting.T_PREF];
ZmSetting.INIT[ZmSetting.SIGNATURE_ENABLED]=["zimbraPrefMailSignatureEnabled",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SIGNATURE_STYLE]=["zimbraPrefMailSignatureStyle",ZmSetting.T_PREF,ZmSetting.D_STRING,ZmSetting.SIG_OUTLOOK];
ZmSetting.INIT[ZmSetting.USE_KEYBOARD_SHORTCUTS]=["zimbraPrefUseKeyboardShortcuts",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,true];
ZmSetting.INIT[ZmSetting.VACATION_MSG]=["zimbraPrefOutOfOfficeReply",ZmSetting.T_PREF];
ZmSetting.INIT[ZmSetting.VACATION_MSG_ENABLED]=["zimbraPrefOutOfOfficeReplyEnabled",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.VIEW_AS_HTML]=["zimbraPrefMessageViewHtmlPreferred",ZmSetting.T_PREF,ZmSetting.D_BOOLEAN,false];
ZmSetting.INIT[ZmSetting.SHORTCUTS]=["zimbraPrefShortcuts",ZmSetting.T_PREF,ZmSetting.D_STRING];
ZmSetting.getName=function(id){
return ZmSetting.INIT[id]?ZmSetting.INIT[id][0]:null;
};
ZmSetting.isPref=function(id){
var name=ZmSetting.getName(id);
return name?(name.indexOf("zimbraPref")==0):false;
};
ZmSetting.prototype.toString=function(){
return this.name+": "+this.value;
};
ZmSetting.prototype.getValue=function(key){
if(this.value!=null){
return key?this.value[key]:this.value;
}else{
if(this.defaultValue!=null){
return key?this.defaultValue[key]:this.defaultValue;
}else{
return null;
}
}
};
ZmSetting.prototype.getDefaultValue=function(key){
return key?this.defaultValue[key]:this.defaultValue;
};
ZmSetting.prototype.setValue=function(value,key,_12ae,_12af){
if(this.dataType==ZmSetting.D_STRING){
this.value=value;
}else{
if(this.dataType==ZmSetting.D_INT){
this.value=parseInt(value);
if(isNaN(this.value)){
this.value=value;
}
}else{
if(this.dataType==ZmSetting.D_BOOLEAN){
if(typeof (value)=="string"){
this.value=(value.toLowerCase()=="true");
}else{
this.value=value;
}
}else{
if(this.dataType==ZmSetting.D_LDAP_TIME){
var _12b0=(value.toLowerCase)?_12b0=(value.toLowerCase()).charAt(value.length-1):null;
var num=parseInt(value);
if(_12b0=="d"){
this.value=num*24*60*60;
}else{
if(_12b0=="h"){
this.value=num*60*60;
}else{
if(_12b0=="m"){
this.value=num*60;
}else{
this.value=num;
}
}
}
}else{
if(this.dataType==ZmSetting.D_HASH){
if(key){
this.value[key]=value;
}
}else{
if(this.dataType==ZmSetting.D_LIST){
if(value instanceof Array){
this.value=value;
}else{
this.value.push(value);
}
}
}
}
}
}
}
if(_12ae){
if(key){
this.defaultValue[key]=this.value[key];
}else{
this.defaultValue=this.value;
}
}
if(!this.name&&!_12af){
this._notify(ZmEvent.E_MODIFY);
}
};
ZmSetting.prototype.notifyModify=function(obj){
if(this.id==ZmSetting.QUOTA_USED&&obj._name=="mbx"){
this.setValue(obj.s);
this._notify(ZmEvent.E_MODIFY);
}
};
function ZmSettings(_12b3){
ZmModel.call(this,ZmEvent.S_SETTING);
this._appCtxt=_12b3;
this._settings={};
this._nameToId={};
this._initialize();
this._setDefaults();
this.userSettingsLoaded=false;
}
ZmSettings.prototype=new ZmModel;
ZmSettings.prototype.constructor=ZmSettings;
ZmSettings.get=function(id){
var args=ZmSetting.INIT[id];
return args?args[3]:null;
};
ZmSettings.prototype.get=function(id,key){
if(!this._settings[id]){
return null;
}
return this._settings[id].getValue(key);
};
ZmSettings.prototype.getSetting=function(id){
return this._settings[id];
};
ZmSettings.prototype.createFromDom=function(node){
var _12ba=node.childNodes;
for(i=0;i<_12ba.length;i++){
var child=_12ba[i];
var name=child.getAttribute("name");
var value=child.firstChild.nodeValue;
var _12be=this._settings[this._nameToId[name]];
if(_12be){
_12be.setValue(value);
}else{
}
}
};
ZmSettings.prototype.createFromJs=function(list){
if(list==null){
return;
}
for(i=0;i<list.length;i++){
var obj=list[i];
var _12c1=this._settings[this._nameToId[obj.name]];
if(_12c1){
_12c1.setValue(obj._content);
}else{
}
}
};
ZmSettings.prototype.loadUserSettings=function(_12c2,_12c3){
var _12c4=AjxSoapDoc.create("GetInfoRequest","urn:zimbraAccount");
var _12c5=new AjxCallback(this,this._handleResponseLoadUserSettings,_12c2);
this._appCtxt.getAppController().sendRequest({soapDoc:_12c4,asyncMode:true,callback:_12c5,errorCallback:_12c3});
};
ZmSettings.prototype._handleResponseLoadUserSettings=function(_12c6,_12c7){
var _12c8=_12c7.getResponse();
var obj=_12c8.GetInfoResponse;
if(obj.name){
this._settings[ZmSetting.USERNAME].setValue(obj.name);
}
if(obj.lifetime){
this._settings[ZmSetting.TOKEN_LIFETIME].setValue(obj.lifetime);
}
if(obj.used){
this._settings[ZmSetting.QUOTA_USED].setValue(obj.used);
}
if(obj.prefs&&obj.prefs.pref){
this.createFromJs(obj.prefs.pref);
}
if(obj.attrs&&obj.attrs.attr){
this.createFromJs(obj.attrs.attr);
}
if(obj.license){
this._settings[ZmSetting.LICENSE_STATUS].setValue(obj.license.status);
}
this._settings[ZmSetting.GROUP_MAIL_BY].setValue(this.get(ZmSetting.INITIAL_GROUP_MAIL_BY),null,true);
if((this.get(ZmSetting.GROUP_MAIL_BY)==ZmSetting.GROUP_BY_CONV)&&!this.get(ZmSetting.CONVERSATIONS_ENABLED)){
this._settings[ZmSetting.GROUP_MAIL_BY].setValue(ZmSetting.GROUP_BY_MESSAGE,null,true);
}
this._settings[ZmSetting.REPLY_TO_ADDRESS].defaultValue=this.get(ZmSetting.USERNAME);
if(!this.get(ZmSetting.SEARCH_ENABLED)){
this._settings[ZmSetting.BROWSE_ENABLED].setValue(false,null,true);
}
if(this.get(ZmSetting.FORCE_CAL_OFF)){
this._settings[ZmSetting.CALENDAR_ENABLED].setValue(false,null,true);
}
if(AjxEnv.isSafari){
this._settings[ZmSetting.HTML_COMPOSE_ENABLED].setValue(false);
}
if(obj.zimlets&&obj.zimlets.zimlet){
this._appCtxt.getZimletMgr().loadZimlets(obj.zimlets.zimlet,obj.props.prop);
}
var _12ca=this._appCtxt.getApp(ZmZimbraMail.PREFERENCES_APP);
var _12cb=_12ca.getIdentityCollection();
_12cb.initialize(obj.identities);
var _12cc=_12ca.getDataSourceCollection();
_12cc.initialize(obj.dataSources);
this.userSettingsLoaded=true;
if(_12c6){
_12c6.run(_12c7);
}
};
ZmSettings.prototype.loadAvailableSkins=function(_12cd){
var _12ce=AjxSoapDoc.create("GetAvailableSkinsRequest","urn:zimbraAccount");
var _12cf=new AjxCallback(this,this._handleResponseLoadAvailableSkins,[_12cd]);
this._appCtxt.getAppController().sendRequest({soapDoc:_12ce,asyncMode:true,callback:_12cf});
};
ZmSettings.prototype._handleResponseLoadAvailableSkins=function(_12d0,_12d1){
var resp=_12d1.getResponse().GetAvailableSkinsResponse;
var skins=resp.skin;
for(var i=0;i<skins.length;i++){
var name=skins[i].name;
this._settings[ZmSetting.AVAILABLE_SKINS].setValue(name);
}
if(_12d0){
_12d0.run();
}
};
ZmSettings.prototype.save=function(list,_12d7,_12d8){
if(!(list&&list.length)){
return;
}
var _12d9=AjxSoapDoc.create("ModifyPrefsRequest","urn:zimbraAccount");
var _12da=false;
for(var i=0;i<list.length;i++){
var _12dc=list[i];
if(_12dc.type!=ZmSetting.T_PREF){
continue;
}
if(!_12dc.name){
continue;
}
var value=_12dc.getValue();
if(_12dc.dataType==ZmSetting.D_BOOLEAN){
value=value?"TRUE":"FALSE";
}
var node=_12d9.set("pref",value);
node.setAttribute("name",_12dc.name);
_12da=true;
}
if(_12da){
var _12df=new AjxCallback(this,this._handleResponseSave,[list,_12d7]);
if(_12d8){
_12d8.addNewRequestParams(_12d9,_12df,null,"ModifyPrefsRequest");
}else{
this._appCtxt.getAppController().sendRequest({soapDoc:_12d9,asyncMode:true,callback:_12df});
}
}
};
ZmSettings.prototype._handleResponseSave=function(list,_12e1,_12e2){
var resp=_12e2.getResponse();
if(resp.ModifyPrefsResponse){
for(var i=0;i<list.length;i++){
var _12e5=list[i];
_12e5.origValue=_12e5.value;
if(_12e5.id==ZmSetting.SKIN_NAME){
ZmLogin.setSkinCookie(_12e5.getValue());
}
_12e5._notify(ZmEvent.E_MODIFY);
}
}
if(_12e1){
_12e1.run(_12e2);
}
};
ZmSettings.prototype.getGroupMailBy=function(){
var _12e6=this.get(ZmSetting.PREFS_ENABLED)?this.get(ZmSetting.GROUP_MAIL_BY):null;
if(!_12e6){
}
return _12e6?ZmPref.GROUP_MAIL_BY_ITEM[_12e6]:ZmItem.MSG;
};
ZmSettings.prototype._initialize=function(){
for(var id=1;id<=ZmSetting.MAX_INDEX;id++){
var args=ZmSetting.INIT[id];
if(!args){
continue;
}
var _12e9=new ZmSetting(id,args[0],args[1],args[2],args[3],this);
this._settings[id]=_12e9;
if(args[0]){
this._nameToId[args[0]]=id;
}
}
};
ZmSettings.prototype._setDefaults=function(){
var value;
var _12eb=(location.port==""||location.port=="80");
var _12ec=_12eb?"":":"+location.port;
value=_12ec+"/service/soap/";
if(location.search&&location.search.indexOf("host=")!=-1){
value+=location.search;
}
this._settings[ZmSetting.CSFE_SERVER_URI].setValue(value,null,false,true);
value=_12ec+"/service/home/~/?auth=co&";
this._settings[ZmSetting.CSFE_MSG_FETCHER_URI].setValue(value,null,false,true);
value=_12ec+"/service/upload";
this._settings[ZmSetting.CSFE_UPLOAD_URI].setValue(value,null,false,true);
value=_12ec+"/service/home/~/?auth=co&id={0}&fmt=csv";
this._settings[ZmSetting.CSFE_EXPORT_URI].setValue(value,null,false,true);
if(this._appCtxt){
this._settings[ZmSetting.SORTING_PREF].setValue(ZmSearch.DATE_DESC,ZmController.CONVLIST_VIEW,true,true);
this._settings[ZmSetting.SORTING_PREF].setValue(ZmSearch.DATE_DESC,ZmController.CONV_VIEW,true,true);
this._settings[ZmSetting.SORTING_PREF].setValue(ZmSearch.DATE_DESC,ZmController.TRAD_VIEW,true,true);
this._settings[ZmSetting.SORTING_PREF].setValue(ZmSearch.NAME_ASC,ZmController.CONTACT_SRC_VIEW,true,true);
this._settings[ZmSetting.SORTING_PREF].setValue(ZmSearch.NAME_ASC,ZmController.CONTACT_TGT_VIEW,true,true);
this._settings[ZmSetting.SORTING_PREF].setValue(ZmSearch.NAME_ASC,ZmController.CONTACT_SIMPLE_VIEW,true,true);
this._settings[ZmSetting.SORTING_PREF].setValue(ZmSearch.NAME_ASC,ZmController.CONTACT_CARDS_VIEW,true,true);
}
};
ZmSettings.prototype._loadShortcuts=function(){
var kbm=this._appCtxt.getKeyboardMgr();
var maps={};
var kmm=kbm.__keyMapMgr;
var _12f0=this.get(ZmSetting.SHORTCUTS);
if(!_12f0||!kmm){
return;
}
var _12f1=_12f0.split("|");
var len=_12f1.length;
for(var i=0;i<len;i++){
var sc=ZmShortcut.parse(_12f1[i]);
kmm.setMapping(sc.mapName,sc.keySequence,sc.action);
kmm.setArg(sc.mapName,sc.action,sc.arg);
maps[sc.mapName]=true;
}
for(var map in maps){
kmm.reloadMap(map);
}
};
ZmLogin=function(){
};
ZmLogin.lastGoodUserNameCookie="ls_last_username";
ZmLogin.lastGoodMailServerCookie="ls_last_server";
ZmLogin.skinCookie="ZM_SKIN";
ZmLogin.skinCookieLifetime=63072000000;
ZmLogin.CSFE_SERVER_URI=location.port=="80"?"/service/soap/":":"+location.port+"/service/soap/";
ZmLogin.DEFAULT_SKIN="sand";
ZmLogin.FETCH=[ZmSetting.SKIN_NAME,ZmSetting.MAIL_ENABLED,ZmSetting.CALENDAR_ENABLED,ZmSetting.CONTACTS_ENABLED,ZmSetting.OPTIONS_ENABLED,ZmSetting.IM_ENABLED,ZmSetting.NOTEBOOK_ENABLED];
ZmLogin.handleOnload=function(ev,_12f7){
if(!_12f7&&!ZmLogin.isSupportedBrowser()){
ZmLogin.showUnsupported();
}else{
if(ZmLogin.shouldReAuth()){
var _12f8=null;
if(!AjxCookie.areCookiesEnabled(document)){
_12f8=ZmMsg.errorCookiesDisabled;
}
ZmLogin.showPanel(_12f8);
}
}
};
ZmLogin.isSupportedBrowser=function(){
return AjxEnv.isIE6up||AjxEnv.isMozilla1_4up||AjxEnv.isFirefox1up||AjxEnv.isSafari;
};
ZmLogin.isAlmostSupportedBrowser=function(){
return AjxEnv.isOpera;
};
ZmLogin.showUnsupported=function(){
var _12f9=ZLoginFactory.copyDefaultParams(ZmMsg);
_12f9.showError=true;
_12f9.errorMsg=AjxMessageFormat.format(ZmMsg.errorBrowserUnsupported,[navigator.appName,navigator.appVersion]);
_12f9.showAbout=true;
if(ZmLogin.isAlmostSupportedBrowser()){
_12f9.aboutMsg=AjxMessageFormat.format(ZmMsg.almostSupportedBrowserTip,["ZmLogin.handleOnload(null, true);"]);
}else{
_12f9.aboutMsg=ZmMsg.unsupportedBrowserTip;
}
_12f9.clientLevelNotice=AjxMessageFormat.format(ZmMsg.clientLoginNotice,[appContextPath+"/h/"]);
var html=[];
var idx=0;
html[idx++]="<table border=0 cellspacing=0 cellpadding=0 style='width:100%; height:100%'><tr><td align='center' valign='center'>";
html[idx++]=ZLoginFactory.getLoginDialogHTML(_12f9);
html[idx++]="</td></tr></table>";
document.body.innerHTML=html.join("");
};
ZmLogin.shouldReAuth=function(){
ZmLogin.setServerUri();
var _12fc=ZmCsfeCommand.getAuthToken();
if(_12fc){
var _12fd=AjxCookie.getCookie(document,ZmLogin.lastGoodMailServerCookie);
try{
ZmLogin.submitNoOpRequest();
ZmLogin.handleSuccess(_12fc,null,_12fd);
return false;
}
catch(ex){
}
}
return true;
};
ZmLogin.showPanel=function(_12fe){
var html=[];
var idx=0;
html[idx++]="<table border=0 cellspacing=0 cellpadding=0 style='width:100%; height:100%'><tr><td align='center' valign='center'>";
var _1301=ZLoginFactory.copyDefaultParams(ZmMsg);
_1301.showForm=true;
_1301.showUserField=true;
_1301.showPasswordField=true;
_1301.showLicenseMsg=true;
_1301.showRememberMeCheckbox=true;
_1301.showButton=true;
if(_12fe){
_1301.errorMsg=_12fe;
_1301.showError=true;
}
_1301.clientLevelNotice=AjxMessageFormat.format(ZmMsg.clientLoginNotice,[appContextPath+"/h/"]);
html[idx++]=ZLoginFactory.getLoginDialogHTML(_1301);
html[idx++]="</td></tr></table>";
document.body.innerHTML=html.join("");
ZmLogin._registerKeyPress();
ZmLogin._setUserNameAndFocus();
};
ZmLogin._registerKeyPress=function(){
if(AjxEnv.isIE){
var el=ZLoginFactory.getLoginPanel();
el["onkeydown"]=ZLoginFactory.handleKeyPress;
}else{
window["onkeypress"]=ZLoginFactory.handleKeyPress;
}
};
ZmLogin._setUserNameAndFocus=function(){
var _1303=AjxCookie.getCookie(document,ZmLogin.lastGoodUserNameCookie);
var _1304=null;
if(_1303&&_1303!=""){
ZLoginFactory.showUserField(_1303);
_1304=ZLoginFactory.getPasswordField();
}else{
_1304=ZLoginFactory.getUserField();
}
_1304.focus();
};
ZmLogin._setErrorMessage=function(msg,_1306){
ZLoginFactory.showErrorMsg(msg);
if(!_1306){
ZLoginFactory.getUserField().focus();
}
};
ZmLogin.setServerUri=function(){
var value=location.protocol+"//"+location.hostname+ZmLogin.CSFE_SERVER_URI;
if(location.search&&location.search.indexOf("host=")!=-1){
value+=location.search;
}
ZmCsfeCommand.setServerUri(value);
};
ZmLogin.submitNoOpRequest=function(){
var _1308=AjxSoapDoc.create("NoOpRequest","urn:zimbraMail");
var _1309=new ZmCsfeCommand();
_1309.invoke({soapDoc:_1308,asyncMode:true});
};
ZmLogin.submitAuthRequest=function(uname,pword){
try{
var _130c=AjxSoapDoc.create("AuthRequest","urn:zimbraAccount");
}
catch(ex){
if(AjxEnv.isIE&&(ex.code==AjxException.INTERNAL_ERROR)){
ZmLogin._setErrorMessage(ZmMsg.errorNoActiveX);
}
return;
}
var el=_130c.set("account",uname);
el.setAttribute("by","name");
_130c.set("password",pword);
_130c.set("virtualHost",location.hostname);
var prefs=[],attrs=[];
if(ZmLogin.FETCH.length){
for(var i=0;i<ZmLogin.FETCH.length;i++){
var id=ZmLogin.FETCH[i];
var _1311=ZmSetting.getName(id);
if(_1311){
ZmSetting.isPref(id)?prefs.push(_1311):attrs.push(_1311);
}
}
if(prefs.length){
var _1312=_130c.set("prefs");
for(var i=0;i<prefs.length;i++){
var _1313=_130c.set("pref",null,_1312);
_1313.setAttribute("name",prefs[i]);
}
}
if(attrs.length){
var _1314=_130c.set("attrs");
for(var i=0;i<attrs.length;i++){
var _1315=_130c.set("attr",null,_1314);
_1315.setAttribute("name",attrs[i]);
}
}
}
var _1316=new ZmCsfeCommand();
var _1317=new AjxCallback(null,ZmLogin._handleResponseSubmitAuthRequest,[uname,pword]);
_1316.invoke({soapDoc:_130c,noAuthToken:true,noSession:true,asyncMode:true,callback:_1317});
};
ZmLogin._handleResponseSubmitAuthRequest=function(uname,pword,_131a){
var _131b;
try{
_131b=_131a.getResponse();
}
catch(ex){
if(ex.code==ZmCsfeException.ACCT_AUTH_FAILED||ex.code==ZmCsfeException.NO_SUCH_ACCOUNT){
ZmLogin._setErrorMessage(ZmMsg.loginError);
}else{
if(ex.code==ZmCsfeException.SOAP_ERROR||ex.code==ZmCsfeException.NETWORK_ERROR){
var msg=ZmMsg.errorNetwork+" "+ZmMsg.errorTryAgain+" "+ZmMsg.errorContact;
ZmLogin._setErrorMessage(msg);
}else{
if(ex.code==ZmCsfeException.ACCT_CHANGE_PASSWORD){
var _131d=document.getElementById(ZLoginFactory.USER_ID);
var _131e=document.getElementById(ZLoginFactory.PASSWORD_ID);
_131d.disabled=_131e.disabled=true;
ZmLogin.showChangePass(ex);
}else{
if(ex.code==ZmCsfeException.ACCT_MAINTENANCE_MODE){
var msg=ZmMsg.errorMaintenanceMode+" "+ZmMsg.errorContact;
ZmLogin._setErrorMessage(msg);
}else{
var msg=ZmMsg.errorApplication+" "+ZmMsg.errorTryAgain+" "+ZmMsg.errorContact;
ZmLogin._setErrorMessage(msg+" ("+ex.code+")");
}
}
}
}
return;
}
var resp=_131b.Body.AuthResponse;
ZmLogin._authToken=resp.authToken;
ZmLogin._authTokenLifetime=resp.lifetime;
var _1320=resp.refer;
var _1321=new ZmSettings();
var prefs=!resp.prefs?null:(resp.prefs instanceof Array)?resp.prefs[0].pref:resp.prefs.pref;
if(prefs&&prefs.length){
_1321.createFromJs(prefs);
}
var attrs=!resp.attrs?null:(resp.attrs instanceof Array)?resp.attrs[0].attr:resp.attrs.attr;
if(attrs&&attrs.length){
_1321.createFromJs(attrs);
}
var match=location.search?location.search.match(/\bredirect=([01])/):null;
var _1325=match?match[1]:null;
if(_1325=="0"||(location.hostname=="localhost")||(location.hostname&&location.hostname.match(/^\d+\.\d+\.\d+\.\d+$/))){
if(_1325!="1"){
_1320=location.hostname;
}
}
var _1326=document.getElementById(ZLoginFactory.REMEMBER_ME_ID).checked;
ZmLogin.handleSuccess(ZmLogin._authToken,ZmLogin._authTokenLifetime,_1320,uname,pword,_1326,_1321);
ZmLogin._authToken=ZmLogin._authTokenLifetime=null;
};
ZmLogin.accountPat=/((\s*([^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+(\.[^\x00-\x1F\x7F()<>\[\]:;@\,."\s]+)*)\s*)|(\s*"(([^\\"])|(\\([^\x0A\x0D])))+"\s*))/;
ZmLogin.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*)))/;
ZmLogin._prelimCheck=function(str){
var _1328=str.indexOf("@");
var _1329=str.lastIndexOf(".");
return ((_1328!=-1)&&(_1329!=-1)&&(_1329>_1328));
};
ZmLogin.isValid=function(str){
str=AjxStringUtil.trim(str);
var _132b=ZmLogin._prelimCheck(str);
return (_132b&&(str.match(ZmLogin.addrPat)!=null));
};
ZmLogin.isValidUsername=function(uname){
return uname.match(ZmLogin.accountPat)||ZmLogin.isValid(uname);
};
ZmLogin.handleLogin=function(){
var _132d=document.getElementById(ZLoginFactory.USER_ID);
var _132e=document.getElementById(ZLoginFactory.PASSWORD_ID);
var uname=_132d.value;
var pword=_132e.value;
if(_132d.disabled&&_132e.disabled){
ZmLogin.handleChangePass(uname,pword);
return;
}
if(!uname||!pword){
ZmLogin._setErrorMessage(ZmMsg.enterUsername);
return;
}
if(!ZmLogin.isValidUsername(uname)){
ZmLogin._setErrorMessage(ZmMsg.badUsername);
return;
}
ZmLogin.submitAuthRequest(uname,pword);
};
ZmLogin.handleSuccess=function(_1331,_1332,_1333,uname,_1335,_1336,_1337){
if(uname){
AjxCookie.setCookie(document,ZmLogin.lastGoodUserNameCookie,uname,null,"/");
}
if(_1333){
AjxCookie.setCookie(document,ZmLogin.lastGoodMailServerCookie,_1333,null,"/");
}
if(window.initMode!=""&&(window.initMode!=location.protocol)){
AjxDebug.deleteWindowCookie();
}
if(_1337){
ZmLogin.setSkinCookie(_1337.get(ZmSetting.SKIN_NAME)||ZmLogin.DEFAULT_SKIN);
}
ZmLogin._postAuthToServer(_1333,_1331,_1332,_1336);
};
ZmLogin.handleChangePass=function(uname,_1339){
var _133a=ZLoginFactory.getNewPasswordField();
var _133b=ZLoginFactory.getPasswordConfirmField();
var _133c=AjxStringUtil.trim(_133a.value);
var _133d=AjxStringUtil.trim(_133b.value);
if(!_133c||!_133d){
ZmLogin._setErrorMessage(ZmMsg.enterNewPassword,true);
return;
}
if(_133c!=_133d){
ZmLogin._setErrorMessage(ZmMsg.bothNewPasswordsMustMatch,true);
return;
}
var _133e=AjxSoapDoc.create("ChangePasswordRequest","urn:zimbraAccount");
var el=_133e.set("account",uname);
el.setAttribute("by","name");
_133e.set("oldPassword",_1339);
_133e.set("password",_133c);
_133e.set("virtualHost",location.hostname);
var resp=null;
try{
var _1341=new ZmCsfeCommand();
resp=_1341.invoke({soapDoc:_133e,noAuthToken:true,noSession:true}).Body.ChangePasswordResponse;
}
catch(ex){
if(ex.code=="account.PASSWORD_RECENTLY_USED"||ex.code=="account.PASSWORD_CHANGE_TOO_SOON"){
var msg=ex.code==ZmCsfeException.ACCT_PASS_RECENTLY_USED?ZmMsg.errorPassRecentlyUsed:(ZmMsg.errorPassChangeTooSoon+" "+ZmMsg.errorContact);
ZmLogin._setErrorMessage(msg);
_133a.value=_133b.value="";
_133a.focus();
}else{
if(ex.code=="account.PASSWORD_LOCKED"){
var _1343=document.getElementById("passTable");
_1343.deleteRow(2);
_1343.deleteRow(2);
var _1344=document.getElementById(ZLoginFactory.USER_ID);
var _1345=document.getElementById(ZLoginFactory.PASSWORD_ID);
_1344.disabled=_1345.disabled=false;
_1345.value="";
_1345.focus();
ZmLogin._setErrorMessage(ZmMsg.errorPassLocked);
}else{
if(ex.code=="account.INVALID_PASSWORD"){
ZmLogin._setErrorMessage(ZmMsg.errorInvalidPass);
_133a.focus();
}
}
}
}
if(resp){
ZmLogin.submitAuthRequest(uname,_133c);
}
};
ZmLogin.showChangePass=function(ex){
ZmLogin._setErrorMessage(ZmMsg.errorPassChange,true);
ZLoginFactory.showNewPasswordFields();
ZLoginFactory.getNewPasswordField().focus();
};
ZmLogin._postAuthToServer=function(_1347,_1348,_1349,_134a){
var form=document.createElement("form");
document.body.appendChild(form);
var html=[];
var i=0;
html[i++]="<input type='hidden' name='authToken' value='"+_1348+"'>";
if(_134a){
html[i++]="<input type='hidden' name='rememberMe' value='"+_134a+"'>";
}
if(_1349){
html[i++]="<input type='hidden' name='atl' value='"+_1349+"'>";
}
form.innerHTML=html.join("");
form.action=ZmLogin.getAuthUrl(_1347);
form.method="post";
form.submit();
};
ZmLogin.getAuthUrl=function(_134e){
var ms=_134e?_134e:location.hostname;
return (location.protocol+"//"+ms+((location.port==80)?"":":"+location.port)+appContextPath+"/auth/"+window.location.search);
};
ZmLogin.setSkinCookie=function(skin){
var exp=new Date();
exp.setTime(exp.getTime()+ZmLogin.skinCookieLifetime);
AjxCookie.setCookie(document,ZmLogin.skinCookie,skin,exp,"/");
};
AjxTemplate.register("ajax.dwt.templates.Widgets#checkbox",function(name,_1353,data,_1355){
var _1356=Boolean(_1355);
data=(typeof data=="string"?{id:data}:data)||{};
_1355=_1355||[];
var _i=_1355.length;
_1355[_i++]="\n";
_1355[_i++]="    <input id='";
_1355[_i++]=data["id"];
_1355[_i++]="_input' type='checkbox'>";
return _1356?_1355.length:_1355.join("");
},{"id":"checkbox"});
AjxTemplate.register("ajax.dwt.templates.Widgets",AjxTemplate.getTemplate("ajax.dwt.templates.Widgets#checkbox"),AjxTemplate.getParams("ajax.dwt.templates.Widgets#checkbox"));
AjxTemplate.register("ajax.dwt.templates.Widgets#checkbox-text-left",function(name,_1359,data,_135b){
var _135c=Boolean(_135b);
data=(typeof data=="string"?{id:data}:data)||{};
_135b=_135b||[];
var _i=_135b.length;
_135b[_i++]="\n";
_135b[_i++]="    <label id='";
_135b[_i++]=data["id"];
_135b[_i++]="_text' for='";
_135b[_i++]=data["id"];
_135b[_i++]="_input' style='text-align:right'></label>\n";
_135b[_i++]="    <input id='";
_135b[_i++]=data["id"];
_135b[_i++]="_input' type='checkbox'>";
return _135c?_135b.length:_135b.join("");
},{"id":"checkbox-text-left"});
AjxTemplate.register("ajax.dwt.templates.Widgets#checkbox-text-right",function(name,_135f,data,_1361){
var _1362=Boolean(_1361);
data=(typeof data=="string"?{id:data}:data)||{};
_1361=_1361||[];
var _i=_1361.length;
_1361[_i++]="\n";
_1361[_i++]="    <input id='";
_1361[_i++]=data["id"];
_1361[_i++]="_input' type='checkbox'>\n";
_1361[_i++]="    <label id='";
_1361[_i++]=data["id"];
_1361[_i++]="_text' for='";
_1361[_i++]=data["id"];
_1361[_i++]="_input' style='text-align:right'></label>";
return _1362?_1361.length:_1361.join("");
},{"id":"checkbox-text-right"});
AjxTemplate.register("ajax.dwt.templates.Widgets#DwtDialog",function(name,_1365,data,_1367){
var _1368=Boolean(_1367);
data=(typeof data=="string"?{id:data}:data)||{};
_1367=_1367||[];
var _i=_1367.length;
_1367[_i++]="\n";
_1367[_i++]="    <div class='DwtDialog WindowOuterContainer'>\n";
_1367[_i++]="        <table cellspacing=0 cellpadding=0 style='cursor:move;'>\n";
_1367[_i++]="            <tr id='";
_1367[_i++]=data["id"];
_1367[_i++]="_title'>\n";
_1367[_i++]="                <td class='minWidth'>";
_1367[_i++]=data["icon"];
_1367[_i++]="</td>\n";
_1367[_i++]="                <td id='";
_1367[_i++]=data["id"];
_1367[_i++]="_title_cell' class='DwtDialogTitle'>";
_1367[_i++]=data["title"];
_1367[_i++]="</td>\n";
_1367[_i++]="                <td class='minWidth'><div class='";
_1367[_i++]=data["closeIcon2"];
_1367[_i++]="'></div></td>\n";
_1367[_i++]="                <td class='minWidth'><div class='";
_1367[_i++]=data["closeIcon1"];
_1367[_i++]="'></div></td>\n";
_1367[_i++]="            </tr>\n";
_1367[_i++]="            <tr>\n";
_1367[_i++]="                <td id='";
_1367[_i++]=data["id"];
_1367[_i++]="_container' class='DwtDialogBody WindowInnerContainer' colspan='3' style='cursor:default;'></td>\n";
_1367[_i++]="            </tr>\n";
_1367[_i++]="        </table>\n";
_1367[_i++]="    </div>";
return _1368?_1367.length:_1367.join("");
},{"width":"20","height":"32","id":"DwtDialog"});
AjxTemplate.register("ajax.dwt.templates.Widgets#DwtSemiModalDialog",function(name,_136b,data,_136d){
var _136e=Boolean(_136d);
data=(typeof data=="string"?{id:data}:data)||{};
_136d=_136d||[];
var _i=_136d.length;
_136d[_i++]="\n";
_136d[_i++]="    <div class='DwtDialog LightWindowOuterContainer'>\n";
_136d[_i++]="        <table class='full_size' cellspacing=0 cellpadding=0 style='cursor:move;'>\n";
_136d[_i++]="            <tr id='";
_136d[_i++]=data["id"];
_136d[_i++]="_title'>\n";
_136d[_i++]="                <td class='minWidth'>";
_136d[_i++]=data["icon"];
_136d[_i++]="</td>\n";
_136d[_i++]="                <td id='";
_136d[_i++]=data["id"];
_136d[_i++]="_title_cell' class='DwtDialogTitle' width='*'>";
_136d[_i++]=data["title"];
_136d[_i++]="</td>\n";
_136d[_i++]="                <td id='";
_136d[_i++]=data["id"];
_136d[_i++]="_close' class='minWidth'></td>\n";
_136d[_i++]="            </tr>\n";
_136d[_i++]="            <tr>\n";
_136d[_i++]="                <td id='";
_136d[_i++]=data["id"];
_136d[_i++]="_container' class='DwtDialogBody LIghtWindowInnerContainer full_size' colspan='3'></td>\n";
_136d[_i++]="            </tr>\n";
_136d[_i++]="        </table>\n";
_136d[_i++]="    </div>";
return _136e?_136d.length:_136d.join("");
},{"width":"20","height":"32","id":"DwtSemiModalDialog"});
AjxTemplate.register("ajax.dwt.templates.Widgets#DwtToolTip",function(name,_1371,data,_1373){
var _1374=Boolean(_1373);
data=(typeof data=="string"?{id:data}:data)||{};
_1373=_1373||[];
var _i=_1373.length;
_1373[_i++]="\n";
_1373[_i++]="    <div class='DwtToolTip LightWindowOuterContainer'>\n";
_1373[_i++]="        <div id='";
_1373[_i++]=data["id"];
_1373[_i++]="TopPointer' class='DwtToolTipTopPointer'>\n";
_1373[_i++]="            <center>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:1px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:3px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:5px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:7px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:9px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:11px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:13px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:15px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:17px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:19px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:21px;'>&nbsp;</div>\n";
_1373[_i++]="            </center>\n";
_1373[_i++]="        </div>\n";
_1373[_i++]="        <div id='";
_1373[_i++]=data["id"];
_1373[_i++]="Contents' class='DwtToolTipBody'></div>\n";
_1373[_i++]="        <div id='";
_1373[_i++]=data["id"];
_1373[_i++]="BottomPointer' class='DwtToolTipBottomPointer'>\n";
_1373[_i++]="            <center>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:21px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:19px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:17px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:15px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:13px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:11px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:9px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:7px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:5px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:3px;'>&nbsp;</div>\n";
_1373[_i++]="                <div class='DwtToolTipPointerRow' style='width:1px;'>&nbsp;</div>\n";
_1373[_i++]="            </center>\n";
_1373[_i++]="        </div>\n";
_1373[_i++]="    </div>";
return _1374?_1373.length:_1373.join("");
},{"width":"5","height":"5","id":"DwtToolTip"});
AjxTemplate.register("ajax.dwt.templates.Widgets#DwtVerticalSash",function(name,_1377,data,_1379){
var _137a=Boolean(_1379);
data=(typeof data=="string"?{id:data}:data)||{};
_1379=_1379||[];
var _i=_1379.length;
_1379[_i++]="\n";
_1379[_i++]="\t<div class='DwtVerticalSash'>\n";
_1379[_i++]="        <center>\n";
_1379[_i++]="            <table cellspacing=0 width=20><tr>\n";
_1379[_i++]="                <td class='DwtVerticalSashContents'>&deg;</td>\n";
_1379[_i++]="                <td class='DwtVerticalSashContents'>&deg;</td>\n";
_1379[_i++]="                <td class='DwtVerticalSashContents'>&deg;</td>\n";
_1379[_i++]="                <td class='DwtVerticalSashContents'>&deg;</td>\n";
_1379[_i++]="                <td class='DwtVerticalSashContents'>&deg;</td>\n";
_1379[_i++]="            </tr></table>\n";
_1379[_i++]="        </center>\n";
_1379[_i++]="    </div>";
return _137a?_1379.length:_1379.join("");
},{"width":"0","height":"0","id":"DwtVerticalSash"});
AjxTemplate.register("ajax.dwt.templates.Widgets#DwtHorizontalSash",function(name,_137d,data,_137f){
var _1380=Boolean(_137f);
data=(typeof data=="string"?{id:data}:data)||{};
_137f=_137f||[];
var _i=_137f.length;
_137f[_i++]="\n";
_137f[_i++]="    <div class='DwtHorizontalSash'>\n";
_137f[_i++]="        <table cellspacing=0 cellpadding=1 height='90%'>\n";
_137f[_i++]="            <tr><td height='50%' class='DwtHorizonalSashContents'>&nbsp;</td></tr>\n";
_137f[_i++]="            <tr><td class='DwtHorizonalSashContents'>&deg;</td></tr>\n";
_137f[_i++]="            <tr><td class='DwtHorizonalSashContents'>&deg;</td></tr>\n";
_137f[_i++]="            <tr><td class='DwtHorizonalSashContents'>&deg;</td></tr>\n";
_137f[_i++]="            <tr><td class='DwtHorizonalSashContents'>&deg;</td></tr>\n";
_137f[_i++]="            <tr><td class='DwtHorizonalSashContents'>&deg;</td></tr>\n";
_137f[_i++]="            <tr><td height='50%' class='DwtHorizonalSashContents'>&nbsp;</td></tr>\n";
_137f[_i++]="        </table>\n";
_137f[_i++]="    </div>";
return _1380?_137f.length:_137f.join("");
},{"width":"0","height":"0","id":"DwtHorizontalSash"});

