function AjxCore(){
}
AjxCore._objectIds=[null];
AjxCore.assignId=function(_1){
var _2=AjxCore._objectIds.length;
AjxCore._objectIds[_2]=_1;
return _2;
};
AjxCore.unassignId=function(_3){
AjxCore._objectIds[_3]=null;
};
AjxCore.objectWithId=function(_4){
return AjxCore._objectIds[_4];
};
AjxCore.addListener=function(_5,_6,_7){
_5=AjxCore._getEventSource(_5);
var _8=AjxCore._getListenerStruct(_5,_6,true);
_8.list[_8.list.length]=_7;
};
AjxCore.setEventHandler=function(_9,_a,_b){
_9=AjxCore._getEventSource(_9);
var _c=AjxCore._getListenerStruct(_9,_a,true);
_c.single=_b;
};
AjxCore.removeListener=function(_d,_e,_f){
_d=AjxCore._getEventSource(_d);
var _10=AjxCore._getListenerStruct(_d,_e);
if(_10){
var _11=_10.list;
for(var i=0;i<_11.length;i++){
if(_11[i]==_f){
_11[i]=null;
}
}
}
};
AjxCore.removeAllListeners=function(_13,_14){
_13=AjxCore._getEventSource(_13);
var _15=AjxCore._getListenerStruct(_13,_14);
if(_15){
var _16=_15.list;
for(var i=0;i<_16.length;i++){
_16[i]=null;
}
}
AjxCore.unassignId(_15.id);
};
AjxCore.notifyListeners=function(_18,_19,_1a){
_18=AjxCore._getEventSource(_18);
var _1b=AjxCore._getListenerStruct(_18,_19);
if(_1b){
_18[_19](_1a);
}
};
AjxCore._getEventSource=function(_1c){
if(typeof (_1c)=="string"){
_1c=document.getElementById(_1c);
}
return _1c;
};
AjxCore.getListenerStruct=function(_1d,_1e){
return AjxCore._getListenerStruct(_1d,_1e);
};
AjxCore._getListenerStruct=function(_1f,_20,_21){
var _22=null;
if(_1f[_20]){
var id=_1f[_20]._lsListenerStructId;
_22=AjxCore.objectWithId(id);
}else{
if(_21){
_22=AjxCore._setupListener(_1f,_20);
}
}
return _22;
};
AjxCore._setupListener=function(_24,_25,id){
var _27=new Object();
_27.list=new Array();
_27.single=null;
var lid=_27.id=AjxCore.assignId(_27);
var _29=AjxCore._createListenerClosure(lid);
_24[_25]=_29;
_24[_25]._lsListenerStructId=lid;
return _27;
};
AjxCore._createListenerClosure=function(id){
var _2b=function(_2c){
var _2d=AjxCore.objectWithId(id);
var _2e=_2d.list;
for(var i=0;i<_2e.length;i++){
var _30=_2e[i];
if(_30){
if(typeof (_30)=="string"){
eval(_30);
}else{
if(_30.handleEvent){
_30.handleEvent(_2c,this);
}else{
_30(_2c,this);
}
}
}
}
if(_2d.single){
var _30=_2d.single;
if(typeof (_30)=="string"){
eval(_30);
}else{
return _30.handleEvent?_30.handleEvent(_2c,this):_30(_2c,this);
}
}
};
return _2b;
};
AjxCore.addOnloadListener=function(_31){
if(window.onload&&(!window.onload._lsListenerStructId)){
var _32=window.onload;
window.onload=null;
AjxCore.addListener(window,"onload",_32);
}
AjxCore.addListener(window,"onload",_31);
};
AjxCore.addOnunloadListener=function(_33){
if(window.onunload&&(!window.onunload._lsListenerStructId)){
var _34=window.onunload;
window.onunload=null;
AjxCore.addListener(window,"onunload",_34);
}
AjxCore.addListener(window,"onunload",_33);
};
function AjxEnv(){
}
AjxEnv._inited=false;
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.isMozilla=false;
AjxEnv.isMozilla1_4up=false;
AjxEnv.isSafari=false;
AjxEnv.isGeckoBased=false;
AjxEnv.isOpera=false;
AjxEnv.useTransparentPNGs=false;
AjxEnv.is800x600orLower=screen.width<=800&&screen.height<=600;
};
AjxEnv.parseUA=function(_35){
var agt=_35.toLowerCase();
var _37=agt.split(" ");
var i=0;
var _39=-1;
var _3a=null;
var _3b=false;
var _3c=false;
var _3d=false;
var _3e=false;
var _3f=false;
if(_37!=null){
if((_39=_37[0].search(/^\s*mozilla\//))!=-1){
_3e=true;
AjxEnv.browserVersion=parseFloat(_37[0].substring(_39+8));
AjxEnv.isNav=true;
}
for(;i<_37.length;++i){
_3a=_37[i];
if(_3a.indexOf("compatible")!=-1){
_3f=true;
AjxEnv.isNav=false;
}else{
if((_3a.indexOf("opera"))!=-1){
AjxEnv.isOpera=true;
AjxEnv.isNav=false;
AjxEnv.browserVersion=parseFloat(_37[i+1]);
}else{
if((_3a.indexOf("spoofer"))!=-1){
_3b=true;
AjxEnv.isNav=false;
}else{
if((_3a.indexOf("webtv"))!=-1){
_3c=true;
AjxEnv.isNav=false;
}else{
if((_3a.indexOf("hotjava"))!=-1){
_3d=true;
AjxEnv.isNav=false;
}else{
if((_39=_3a.indexOf("msie"))!=-1){
AjxEnv.isIE=true;
AjxEnv.browserVersion=parseFloat(_37[i+1]);
}else{
if((_39=_3a.indexOf("gecko/"))!=-1){
AjxEnv.isGeckoBased=true;
AjxEnv.geckoDate=parseFloat(_3a.substr(_39+6));
}else{
if((_39=_3a.indexOf("rv:"))!=-1){
AjxEnv.mozVersion=parseFloat(_3a.substr(_39+3));
AjxEnv.browserVersion=AjxEnv.mozVersion;
}else{
if((_39=_3a.indexOf("firefox/"))!=-1){
AjxEnv.isFirefox=true;
AjxEnv.browserVersion=parseFloat(_3a.substr(_39+8));
}else{
if((_39=_3a.indexOf("netscape6/"))!=-1){
AjxEnv.trueNs=true;
AjxEnv.browserVersion=parseFloat(_3a.substr(_39+10));
}else{
if((_39=_3a.indexOf("netscape/"))!=-1){
AjxEnv.trueNs=true;
AjxEnv.browserVersion=parseFloat(_3a.substr(_39+9));
}else{
if((_39=_3a.indexOf("safari/"))!=-1){
AjxEnv.isSafari=true;
AjxEnv.browserVersion=parseFloat(_3a.substr(_39+7));
}else{
if(_3a.indexOf("windows")!=-1){
AjxEnv.isWindows=true;
}else{
if((_3a.indexOf("macintosh")!=-1)||(_3a.indexOf("mac_")!=-1)){
AjxEnv.isMac=true;
}else{
if(_3a.indexOf("linux")!=-1){
AjxEnv.isLinux=true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
AjxEnv.isNav=(_3e&&!_3b&&!_3f&&!AjxEnv.isOpera&&!_3c&&!_3d&&!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.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);
}
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;
};
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 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(_43){
return ((_43!==void 0)&&(_43!==null));
};
AjxUtil.isUndefined=function(_44){
return (_44===void 0);
};
AjxUtil.isNull=function(_45){
return (_45===null);
};
AjxUtil.isBoolean=function(_46){
return (typeof (_46)=="boolean");
};
AjxUtil.isString=function(_47){
return (typeof (_47)=="string");
};
AjxUtil.isNumber=function(_48){
return (typeof (_48)=="number");
};
AjxUtil.isObject=function(_49){
return ((typeof (_49)=="object")&&(_49!==null));
};
AjxUtil.isArray=function(_4a){
return AjxUtil.isInstance(_4a,Array);
};
AjxUtil.isFunction=function(_4b){
return (typeof (_4b)=="function");
};
AjxUtil.isDate=function(_4c){
return AjxUtil.isInstance(_4c,Date);
};
AjxUtil.isLifeTime=function(_4d){
return AjxUtil.LIFETIME_FIELD.test(_4d);
};
AjxUtil.isNumeric=function(_4e){
return (!isNaN(parseFloat(_4e))&&AjxUtil.FLOAT_RE.test(_4e)&&!AjxUtil.NOTFLOAT_RE.test(_4e));
};
AjxUtil.isLong=function(_4f){
return (AjxUtil.isNumeric(_4f)&&!AjxUtil.NOTINT_RE.test(_4f));
};
AjxUtil.isNonNegativeLong=function(_50){
return (AjxUtil.isNumeric(_50)&&AjxUtil.isLong(_50)&&(parseFloat(_50)>=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\-]{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-z0-9\-]{2,}(\.[A-Za-z0-9\-]{2,})*(:([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,_55){
return _55?AjxUtil.DOMAIN_NAME_SHORT_RE.test(s):AjxUtil.DOMAIN_NAME_FULL_RE.test(s);
};
AjxUtil.isEmailAddress=function(s,_57){
return _57?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(_58,_59,_5a){
if(_59==null){
_59=true;
}
if(_5a==null){
_5a=20;
}
var _5b=AjxUtil.SIZE_BYTES;
if(_58>=1073741824){
_58/=1073741824;
_5b=AjxUtil.SIZE_GIGABYTES;
}else{
if(_58>=1048576){
_58/=1048576;
_5b=AjxUtil.SIZE_MEGABYTES;
}else{
if(_58>1023){
_58/=1024;
_5b=AjxUtil.SIZE_KILOBYTES;
}
}
}
var _5c=_59?Math.round(_58):_58.toFixed(_5a).replace(/\.?0+$/,"");
var _5d=" "+_5b;
return _5c+_5d;
};
AjxUtil.formatSizeForUnits=function(_5e,_5f,_60,_61){
if(_5f==null){
_5f=AjxUtil.SIZE_BYTES;
}
if(_60==null){
_60=true;
}
if(_61==null){
_61=20;
}
switch(_5f){
case AjxUtil.SIZE_GIGABYTES:
_5e/=1073741824;
break;
case AjxUtil.SIZE_MEGABYTES:
_5e/=1048576;
break;
case AjxUtil.SIZE_KILOBYTES:
_5e/=1024;
break;
}
var _62=_60?Math.round(_5e):_5e.toFixed(_61).replace(/\.?0+$/,"");
return _62;
};
AjxUtil.parseSize=function(_63,_64){
var _65=parseFloat(_63.replace(/^\s*/,""));
var _66=/[GMK]?B$/i;
var _67=_66.exec(_63);
if(_67){
_64=_67[0].toUpperCase();
}
switch(_64){
case AjxUtil.SIZE_GIGABYTES:
_65*=1073741824;
break;
case AjxUtil.SIZE_MEGABYTES:
_65*=1048576;
break;
case AjxUtil.SIZE_KILOBYTES:
_65*=1024;
break;
}
return _65;
};
AjxUtil.isInstance=function(_68,_69){
return !!(_68&&_68.constructor&&(_68.constructor===_69));
};
AjxUtil.assert=function(_6a,_6b){
if(!_6a&&AjxUtil.onassert){
AjxUtil.onassert(_6b);
}
};
AjxUtil.onassert=function(_6c){
var _6d=new Object();
_6d.message=_6c;
var _6e=new Array();
if(AjxEnv.isIE5_5up){
var _6f=arguments.caller;
while(_6f){
_6e[_6e.length]=_6f.callee;
_6f=_6f.caller;
}
}else{
try{
var _6f=arguments.callee.caller;
while(_6f){
_6e[_6e.length]=_6f;
if(_6e.length>2){
break;
}
_6f=_6f.caller;
}
}
catch(e){
}
}
_6d.stack=_6e;
var _70="";
var _71=170;
for(var i=1;i<_6e.length;i++){
if(i>1){
_70+="\n";
}
if(i<11){
var fs=_6e[i].toString();
if(fs.length>_71){
fs=fs.substr(0,_71)+"...";
fs=fs.replace(/\n/g,"");
}
_70+=i+": "+fs;
}else{
_70+="("+(_6e.length-11)+" frames follow)";
break;
}
}
alert("assertion:\n\n"+_6c+"\n\n---- Call Stack ---\n"+_70);
throw _6d;
};
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(_74,_75){
if(_74.nodeType==AjxUtil.TEXT_NODE){
return ["\"",_74.data,"\""].join("");
}
var _76=_74.name?_74.name:_74.localName;
if(_74.nodeType==AjxUtil.ELEMENT_NODE){
var _77=(_74.childNodes&&_74.childNodes.length==1&&(_74.childNodes[0].nodeType==AjxUtil.TEXT_NODE));
var _78;
if(_75){
_78="{";
}else{
if(_77){
_78=[_76,":"].join("");
}else{
_78=[_76,":{"].join("");
}
}
var _79=false;
if(_74.attributes){
for(var i=0;i<_74.attributes.length;i++){
var _7b=_74.attributes[i];
if(_7b.name=="xmlns"){
continue;
}
if(_79){
_78+=",";
}
var _7c=AjxUtil.isNumeric(_7b.value)?_7b.value:AjxUtil.jsEncode(_7b.value);
_78=[_78,_7b.name,":",_7c].join("");
_79=true;
}
}
if(_74.hasChildNodes()){
var _7d=new Object();
var _7e=false;
for(var i=0;i<_74.childNodes.length;i++){
var _7f=_74.childNodes[i];
var _80=_7f.name?_7f.name:_7f.localName;
var _81=AjxUtil.NODE_IS_ATTR[_80]||(_76=="content"&&parent.name=="note");
if(_81){
if(_79){
_78+=",";
}
_78=[_78,_80,":",AjxUtil.jsEncode(_7f.textContent)].join("");
_79=true;
}else{
if(!_7d[_80]){
_7d[_80]=new Array();
}
_7d[_80].push(_7f);
_7e=true;
}
}
if(_7e&&_79){
_78+=",";
_79=false;
}
for(var _80 in _7d){
if(_79){
_78+=",";
_79=false;
}
var _82=AjxUtil.NODE_REPEATS[_80]||(_80=="mp"&&_76=="mp");
if(_82){
_78+=_80+":[";
}
var _83=_7d[_80];
for(var i=0;i<_83.length;i++){
if(_79){
_78+=",";
}
_78+=AjxUtil.xmlToJs(_83[i],_82);
_79=true;
}
if(_82){
_78+="]";
}
}
}
if(!_77){
_78+="}";
}
}
return _78;
};
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(_84){
if(!_84){
return "\"\"";
}
var _85="\"";
for(var i=0;i<_84.length;i++){
var c=_84.charAt(i);
switch(c){
case "\\":
case "\"":
case "/":
_85+="\\"+c;
break;
default:
var _88=_84.charCodeAt(i);
_85+=(_88<32)?AjxUtil.JS_CHAR_ENCODINGS[_88]:c;
}
}
_85+="\"";
return _85;
};
AjxUtil.getInnerText=function(_89){
if(AjxEnv.isIE){
return _89.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(_89);
};
AjxUtil.createProxy=function(_8d,_8e){
var _8f;
var _90=function(){
};
_90.prototype=_8d;
if(_8d instanceof Array){
_8f=new Array();
var cnt=_8d.length;
for(var ix=0;ix<cnt;ix++){
_8f[ix]=_8d[ix];
}
}else{
_8f=new _90;
}
if(_8e){
for(var _93 in _8d){
if(typeof _8d[_93]=="object"){
_8f[_93]=AjxUtil.createProxy(_8d[_93],_8e-1);
}
}
}
_8f._object_=_8d;
return _8f;
};
AjxUtil.collapseList=function(_94){
var _95=[];
for(var i=0;i<_94.length;i++){
if(_94[i]){
_95.push(_94[i]);
}
}
return _95;
};
function AjxFormat(_97){
this._pattern=_97;
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(_9a){
var s=[];
for(var i=0;i<this._segments.length;i++){
s.push(this._segments[i].format(_9a));
}
return s.join("");
};
AjxFormat.prototype.parse=function(s){
var _9e=this._createParseObject();
var _9f=0;
for(var i=0;i<this._segments.length;i++){
var _a1=this._segments[i];
_9f=_a1.parse(_9e,s,_9f);
}
if(_9f<s.length){
throw new AjxFormat.ParsingException(this,null,"input too long");
}
return _9e;
};
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,_a4,_a5,_a6){
s=typeof s=="string"?s:String(s);
if(s.length>=_a4){
return s;
}
_a5=_a5||"0";
var a=[];
for(var i=s.length;i<_a4;i++){
a.push(_a5);
}
a[_a6?"unshift":"push"](s);
return a.join("");
};
AjxFormat.FormatException=function(_a9,_aa){
this._format=_a9;
this._message=_aa;
};
AjxFormat.FormatException.prototype.toString=function(){
return this._message;
};
AjxFormat.FormatException.prototype._format;
AjxFormat.FormatException.prototype._message;
AjxFormat.FormattingException=function(_ab,_ac,_ad){
AjxFormat.FormatException.call(this,_ab,_ad);
this._segment=_ac;
};
AjxFormat.FormattingException.prototype=new AjxFormat.FormatException;
AjxFormat.FormattingException.prototype.constructor=AjxFormat.FormattingException;
AjxFormat.FormattingException.prototype._segment;
AjxFormat.ParsingException=function(_ae,_af,_b0){
AjxFormat.FormatException.call(this,_ae,_b0);
this._segment=_af;
};
AjxFormat.ParsingException.prototype=new AjxFormat.FormatException;
AjxFormat.ParsingException.prototype.constructor=AjxFormat.ParsingException;
AjxFormat.ParsingException.prototype._segment;
AjxFormat.Segment=function(_b1,s){
this._parent=_b1;
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._parseLiteral=function(_b7,s,_b9){
if(s.length-_b9<_b7.length){
throw new AjxFormat.ParsingException(this._parent,this,"input too short");
}
for(var i=0;i<_b7.length;i++){
if(_b7.charAt(i)!=s.charAt(_b9+i)){
throw new AjxFormat.ParsingException(this._parent,this,"input doesn't match");
}
}
return _b9+_b7.length;
};
AjxFormat.Segment._parseLiterals=function(_bb,s,_bd){
for(var i=0;i<_bb.length;i++){
try{
var _bf=_bb[i];
return AjxFormat.Segment._parseLiteral(_bf,s,_bd);
}
catch(e){
}
}
return -1;
};
AjxFormat.Segment._parseInt=function(o,f,_c2,s,_c4,_c5){
var len=_c5||s.length-_c4;
var _c7=_c4;
for(var i=0;i<len;i++){
if(!s.charAt(_c4++).match(/\d/)){
_c4--;
break;
}
}
var _c9=_c4;
if(_c7==_c9){
throw new AjxFormat.ParsingException(this._parent,this,"number not present");
}
if(_c5&&_c9-_c7!=_c5){
throw new AjxFormat.ParsingException(this._parent,this,"number too short");
}
var _ca=parseInt(s.substring(_c7,_c9),10);
if(f){
var _cb=o||window;
f.call(_cb,_ca+_c2);
}
return _c9;
};
function AjxDateFormat(_cc){
AjxFormat.call(this,_cc);
if(typeof _cc=="number"){
switch(_cc){
case AjxDateFormat.SHORT:
_cc=I18nMsg.formatDateShort;
break;
case AjxDateFormat.MEDIUM:
_cc=I18nMsg.formatDateMedium;
break;
case AjxDateFormat.LONG:
_cc=I18nMsg.formatDateLong;
break;
case AjxDateFormat.FULL:
_cc=I18nMsg.formatDateFull;
break;
}
}
if(!_cc||!_cc.length){
return;
}
for(var i=0;i<_cc.length;i++){
var c=_cc.charAt(i);
if(c=="'"){
var _cf=i+1;
for(i++;i<_cc.length;i++){
var c=_cc.charAt(i);
if(c=="'"){
if(i+1<_cc.length&&_cc.charAt(i+1)=="'"){
_cc=_cc.substr(0,i)+_cc.substr(i+1);
}else{
break;
}
}
}
if(i==_cc.length){
throw new FormatException(this,"unterminated string literal");
}
var _d0=i;
var _d1=new AjxFormat.TextSegment(this,_cc.substring(_cf,_d0));
this._segments.push(_d1);
continue;
}
var _cf=i;
while(i<_cc.length){
c=_cc.charAt(i);
if(AjxDateFormat._META_CHARS.indexOf(c)!=-1||c=="'"){
break;
}
i++;
}
var _d0=i;
if(_cf!=_d0){
var _d1=new AjxFormat.TextSegment(this,_cc.substring(_cf,_d0));
this._segments.push(_d1);
i--;
continue;
}
var _cf=i;
while(++i<_cc.length){
if(_cc.charAt(i)!=c){
break;
}
}
var _d0=i--;
var _d2=_d0-_cf;
var _d3=_cc.substr(_cf,_d2);
var _d1=null;
switch(c){
case "G":
_d1=new AjxDateFormat.EraSegment(this,_d3);
break;
case "y":
_d1=new AjxDateFormat.YearSegment(this,_d3);
break;
case "M":
_d1=new AjxDateFormat.MonthSegment(this,_d3);
break;
case "w":
_d1=new AjxDateFormat.WeekSegment(this,_d3);
break;
case "W":
_d1=new AjxDateFormat.WeekSegment(this,_d3);
break;
case "D":
_d1=new AjxDateFormat.DaySegment(this,_d3);
break;
case "d":
_d1=new AjxDateFormat.DaySegment(this,_d3);
break;
case "F":
_d1=new AjxDateFormat.WeekdaySegment(this,_d3);
break;
case "E":
_d1=new AjxDateFormat.WeekdaySegment(this,_d3);
break;
case "a":
_d1=new AjxDateFormat.AmPmSegment(this,_d3);
break;
case "H":
_d1=new AjxDateFormat.HourSegment(this,_d3);
break;
case "k":
_d1=new AjxDateFormat.HourSegment(this,_d3);
break;
case "K":
_d1=new AjxDateFormat.HourSegment(this,_d3);
break;
case "h":
_d1=new AjxDateFormat.HourSegment(this,_d3);
break;
case "m":
_d1=new AjxDateFormat.MinuteSegment(this,_d3);
break;
case "s":
_d1=new AjxDateFormat.SecondSegment(this,_d3);
break;
case "S":
_d1=new AjxDateFormat.SecondSegment(this,_d3);
break;
case "z":
_d1=new AjxDateFormat.TimezoneSegment(this,_d3);
break;
case "Z":
_d1=new AjxDateFormat.TimezoneSegment(this,_d3);
break;
}
if(_d1!=null){
_d1._index=this._segments.length;
this._segments.push(_d1);
}
}
}
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(_d4){
_d4=_d4!=null?_d4:AjxDateFormat.DEFAULT;
if(!AjxDateFormat._DATE_FORMATTERS[_d4]){
AjxDateFormat._DATE_FORMATTERS[_d4]=new AjxDateFormat(AjxDateFormat._dateFormats[_d4]);
}
return AjxDateFormat._DATE_FORMATTERS[_d4];
};
AjxDateFormat.getTimeInstance=function(_d5){
_d5=_d5!=null?_d5:AjxDateFormat.DEFAULT;
if(!AjxDateFormat._TIME_FORMATTERS[_d5]){
AjxDateFormat._TIME_FORMATTERS[_d5]=new AjxDateFormat(AjxDateFormat._timeFormats[_d5]);
}
return AjxDateFormat._TIME_FORMATTERS[_d5];
};
AjxDateFormat.getDateTimeInstance=function(_d6,_d7){
_d6=_d6!=null?_d6:AjxDateFormat.DEFAULT;
_d7=_d7!=null?_d7:AjxDateFormat.DEFAULT;
var _d8=_d6*10+_d7;
if(!AjxDateFormat._DATETIME_FORMATTERS[_d8]){
var _d9=I18nMsg.formatDateTime;
var _da=[AjxDateFormat._dateFormats[_d6],AjxDateFormat._timeFormats[_d7]];
var _db=AjxMessageFormat.format(_d9,_da);
AjxDateFormat._DATETIME_FORMATTERS[_d8]=new AjxDateFormat(_db);
}
return AjxDateFormat._DATETIME_FORMATTERS[_d8];
};
AjxDateFormat.format=function(_dc,_dd){
return new AjxDateFormat(_dc).format(_dd);
};
AjxDateFormat.parse=function(_de,_df){
return new AjxDateFormat(_de).parse(_df);
};
AjxDateFormat.prototype.parse=function(s){
var _e1=null;
try{
_e1=AjxFormat.prototype.parse.call(this,s);
}
catch(e){
}
return _e1;
};
AjxDateFormat.prototype._createParseObject=function(){
return new Date(0,0,1,0,0,0,0);
};
AjxFormat.TextSegment=function(_e2,s){
AjxFormat.Segment.call(this,_e2,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,_e6){
return AjxFormat.Segment._parseLiteral(this._s,s,_e6);
};
AjxDateFormat.DateSegment=function(_e7,s){
AjxFormat.Segment.call(this,_e7,s);
};
AjxDateFormat.DateSegment.prototype=new AjxFormat.Segment;
AjxDateFormat.DateSegment.prototype.constructor=AjxDateFormat.DateSegment;
AjxDateFormat.DateSegment.prototype._getFixedLength=function(){
var _e9;
if(this._index+1<this._parent._segments.length){
var _ea=this._parent._segments[this._index+1];
if(!(_ea instanceof AjxFormat.TextSegment)){
_e9=this._s.length;
}
}
return _e9;
};
AjxDateFormat.EraSegment=function(_eb,s){
AjxDateFormat.DateSegment.call(this,_eb,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(_ed){
return I18nMsg.eraAD;
};
AjxDateFormat.YearSegment=function(_ee,s){
AjxDateFormat.DateSegment.call(this,_ee,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(_f0){
var _f1=String(_f0.getFullYear());
return this._s.length<4?_f1.substr(_f1.length-2):AjxFormat._zeroPad(_f1,this._s.length);
};
AjxDateFormat.YearSegment.prototype.parse=function(_f2,s,_f4){
var _f5=this._getFixedLength();
var _f6=AjxFormat.Segment._parseInt(_f2,_f2.setFullYear,0,s,_f4,_f5);
if(_f6-_f4==2){
if(!AjxDateFormat._2digitStartYear){
AjxDateFormat._2digitStartYear=parseInt(AjxMsg.dateParsing2DigitStartYear);
}
var _f7=AjxDateFormat._2digitStartYear;
var _f8=parseInt(s.substr(_f4,2));
var _f9=(Math.floor(_f7/100)+(_f8<(_f7%100)?1:0))*100;
var _fa=_f9+_f8;
_f2.setFullYear(_fa);
}
return _f6;
};
AjxDateFormat.MonthSegment=function(_fb,s){
AjxDateFormat.DateSegment.call(this,_fb,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(_fd){
var _fe=_fd.getMonth();
switch(this._s.length){
case 1:
return String(_fe+1);
case 2:
return AjxFormat._zeroPad(_fe+1,2);
case 3:
return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM][_fe];
case 5:
return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT][_fe];
}
return AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG][_fe];
};
AjxDateFormat.MonthSegment.prototype.parse=function(_ff,s,_101){
var _102;
switch(this._s.length){
case 3:
_102=AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.SHORT];
case 4:
_102=_102||AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.MEDIUM];
case 5:
_102=_102||AjxDateFormat.MonthSegment.MONTHS[AjxDateFormat.LONG];
var _103=AjxFormat.Segment._parseLiterals(_102,s,_101);
if(_103!=-1){
return _103;
}
throw new AjxFormat.ParsingException(this._parent,this,"no match");
}
var _104=this._getFixedLength();
return AjxFormat.Segment._parseInt(_ff,_ff.setMonth,-1,s,_101,_104);
};
AjxDateFormat.WeekSegment=function(_105,s){
AjxDateFormat.DateSegment.call(this,_105,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 _109=date.getMonth();
var day=date.getDate();
var _10b=/w/.test(this._s);
var _10c=new Date(year,_10b?0:_109,1);
var week=0;
while(true){
week++;
if(_10c.getMonth()>_109||(_10c.getMonth()==_109&&_10c.getDate()>=day)){
break;
}
_10c.setDate(_10c.getDate()+7);
}
return AjxFormat._zeroPad(week,this._s.length);
};
AjxDateFormat.DaySegment=function(_10e,s){
AjxDateFormat.DateSegment.call(this,_10e,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 _111=date.getMonth();
var day=date.getDate();
if(/D/.test(this._s)&&_111>0){
var year=date.getYear();
do{
var _114=new Date(year,_111,1);
_114.setDate(0);
day+=_114.getDate();
_111--;
}while(_111>0);
}
return AjxFormat._zeroPad(day,this._s.length);
};
AjxDateFormat.DaySegment.prototype.parse=function(date,s,_117){
if(/D/.test(this._s)){
date.setMonth(0);
}
var _118=this._getFixedLength();
return AjxFormat.Segment._parseInt(date,date.setDate,0,s,_117,_118);
};
AjxDateFormat.WeekdaySegment=function(_119,s){
AjxDateFormat.DateSegment.call(this,_119,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 _11c=date.getDay();
if(/E/.test(this._s)){
var _11d;
switch(this._s.length){
case 4:
_11d=AjxDateFormat.LONG;
break;
case 5:
_11d=AjxDateFormat.SHORT;
break;
default:
_11d=AjxDateFormat.MEDIUM;
}
return AjxDateFormat.WeekdaySegment.WEEKDAYS[_11d][_11c];
}
return AjxFormat._zeroPad(_11c,this._s.length);
};
AjxDateFormat.TimeSegment=function(_11e,s){
AjxFormat.Segment.call(this,_11e,s);
};
AjxDateFormat.TimeSegment.prototype=new AjxFormat.Segment;
AjxDateFormat.TimeSegment.prototype.constructor=AjxDateFormat.TimeSegment;
AjxDateFormat.HourSegment=function(_120,s){
AjxFormat.Segment.call(this,_120,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 _123=date.getHours();
if(_123>12&&/[hK]/.test(this._s)){
_123-=12;
}
return AjxFormat._zeroPad(_123,this._s.length);
};
AjxDateFormat.MinuteSegment=function(_124,s){
AjxFormat.Segment.call(this,_124,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 _127=date.getMinutes();
return AjxFormat._zeroPad(_127,this._s.length);
};
AjxDateFormat.SecondSegment=function(_128,s){
AjxFormat.Segment.call(this,_128,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 _12b=/s/.test(this._s)?date.getSeconds():date.getMilliseconds();
return AjxFormat._zeroPad(_12b,this._s.length);
};
AjxDateFormat.AmPmSegment=function(_12c,s){
AjxFormat.Segment.call(this,_12c,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 _12f=date.getHours();
return _12f<12?I18nMsg.periodAm:I18nMsg.periodPm;
};
AjxDateFormat.TimezoneSegment=function(_130,s){
AjxFormat.Segment.call(this,_130,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 _133=date.timezone||AjxTimezone.DEFAULT;
if(/Z/.test(this._s)){
return AjxTimezone.getShortName(_133);
}
return this._s.length<4?AjxTimezone.getMediumName(_133):AjxTimezone.getLongName(_133);
};
function AjxMessageFormat(_134){
AjxFormat.call(this,_134);
for(var i=0;i<_134.length;i++){
var c=_134.charAt(i);
if(c=="'"){
if(i+1<_134.length&&_134.charAt(i+1)=="'"){
var _137=new AjxFormat.TextSegment(this,"'");
this._segments.push(_137);
i++;
continue;
}
var head=i+1;
for(i++;i<_134.length;i++){
var c=_134.charAt(i);
if(c=="'"){
if(i+1<_134.length&&_134.charAt(i+1)=="'"){
_134=_134.substr(0,i)+_134.substr(i+1);
}else{
break;
}
}
}
if(i==_134.length){
throw new AjxFormat.FormatException(this,"unterminated string literal");
}
var tail=i;
var _137=new AjxFormat.TextSegment(this,_134.substring(head,tail));
this._segments.push(_137);
continue;
}
var head=i;
while(i<_134.length){
c=_134.charAt(i);
if(c=="{"||c=="'"){
break;
}
i++;
}
var tail=i;
if(head!=tail){
var _137=new AjxFormat.TextSegment(this,_134.substring(head,tail));
this._segments.push(_137);
i--;
continue;
}
var head=i+1;
while(++i<_134.length){
if(_134.charAt(i)=="}"){
break;
}
}
var tail=i;
var _13a=tail-head;
var _13b=_134.substr(head,_13a);
var _137=new AjxMessageFormat.MessageSegment(this,_13b);
if(_137!=null){
this._segments.push(_137);
}
}
}
AjxMessageFormat.prototype=new AjxFormat;
AjxMessageFormat.prototype.constructor=AjxMessageFormat;
AjxMessageFormat.prototype.toString=function(){
return "[AjxMessageFormat: "+AjxFormat.prototype.toString.call(this)+"]";
};
AjxMessageFormat.format=function(_13c,_13d){
return new AjxMessageFormat(_13c).format(_13d);
};
AjxMessageFormat.prototype.format=function(_13e){
if(!(_13e instanceof Array)){
_13e=[_13e];
}
return AjxFormat.prototype.format.call(this,_13e);
};
AjxMessageFormat.MessageSegment=function(_13f,s){
AjxFormat.Segment.call(this,_13f,s);
var _141=s.split(",");
this._index=Number(_141[0]);
this._type=_141[1]||"string";
this._style=_141[2];
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":
break;
}
};
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._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._formatter;
AjxMessageFormat.MessageSegment.prototype.format=function(args){
var _145=args[this._index];
return this._formatter?this._formatter.format(_145):String(_145);
};
function AjxNumberFormat(_146,_147){
AjxFormat.call(this,_146);
if(_146==""){
return;
}
var _148=_146.split(/;/);
var _146=_148[0];
var i=0;
var _14a=this.__parseStatic(_146,i);
i=_14a.offset;
var _14b=_14a.text!="";
if(_14b){
this._segments.push(new AjxFormat.TextSegment(this,_14a.text));
}
var _14c=i;
while(i<_146.length&&AjxNumberFormat._META_CHARS.indexOf(_146.charAt(i))!=-1){
i++;
}
var end=i;
var _14e=_146.substring(_14c,end);
var e=_14e.indexOf("E");
var _150=e!=-1?_14e.substring(e+1):null;
if(_150){
_14e=_14e.substring(0,e);
this._showExponent=true;
}
var dot=_14e.indexOf(".");
var _152=dot!=-1?_14e.substring(0,dot):_14e;
if(_152){
var _153=_152.lastIndexOf(",");
if(_153!=-1){
this._groupingOffset=_152.length-_153-1;
}
_152=_152.replace(/[^#0]/g,"");
var zero=_152.indexOf("0");
if(zero!=-1){
this._minIntDigits=_152.length-zero;
}
this._maxIntDigits=_152.length;
}
var _155=dot!=-1?_14e.substring(dot+1):null;
if(_155){
var zero=_155.lastIndexOf("0");
if(zero!=-1){
this._minFracDigits=zero+1;
}
this._maxFracDigits=_155.replace(/[^#0]/g,"").length;
}
this._segments.push(new AjxNumberFormat.NumberSegment(this,_14e));
var _14a=this.__parseStatic(_146,i);
i=_14a.offset;
if(_14a.text!=""){
this._segments.push(new AjxFormat.TextSegment(this,_14a.text));
}
if(_147){
return;
}
if(_148.length>1){
var _146=_148[1];
this._negativeFormatter=new AjxNumberFormat(_146,true);
}else{
var _156=new AjxNumberFormat("");
_156._segments=_156._segments.concat(this._segments);
var _157=_14b?1:0;
var _158=new AjxFormat.TextSegment(_156,I18nMsg.numberSignMinus);
_156._segments.splice(_157,0,_158);
this._negativeFormatter=_156;
}
}
AjxNumberFormat.prototype=new AjxFormat;
AjxNumberFormat.prototype.constructor=AjxNumberFormat;
AjxNumberFormat.prototype.toString=function(){
var _159=["[AjxNumberFormat: ","formatter=",AjxFormat.prototype.toString.call(this)];
if(this._negativeFormatter){
_159.push(", negativeFormatter=",this._negativeFormatter.toString());
}
_159.push("]");
return _159.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(_15a,_15b){
return new AjxNumberFormat(_15a).format(_15b);
};
AjxNumberFormat.prototype.format=function(_15c){
if(_15c<0&&this._negativeFormatter){
return this._negativeFormatter.format(_15c);
}
return AjxFormat.prototype.format.call(this,_15c);
};
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 _161=i;
while(i<s.length&&s.charAt(i++)!="'"){
}
var end=i;
c=end-_161==0?"'":s.substring(_161,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(_163,s){
AjxFormat.Segment.call(this,_163,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(_165){
if(isNaN(_165)){
return I18nMsg.numberNaN;
}
if(_165===Number.NEGATIVE_INFINITY||_165===Number.POSITIVE_INFINITY){
return I18nMsg.numberInfinity;
}
if(typeof _165!="number"){
_165=Number(_165);
}
_165=Math.abs(_165);
if(this._parent._isPercent){
_165*=100;
}else{
if(this._parent._isPerMille){
_165*=1000;
}
}
var s=this._parent._showExponent?_165.toExponential(this._parent._maxFracDigits).toUpperCase().replace(/E\+/,"E"):_165.toFixed(this._parent._maxFracDigits);
s=this._normalize(s);
return s;
};
AjxNumberFormat.NumberSegment.prototype._normalize=function(s){
var _168=s.split(/([\.Ee])/);
var _169=_168.shift();
if(_169.length<this._parent._minIntDigits){
_169=AjxFormat._zeroPad(_169,this._parent._minIntDigits,I18nMsg.numberZero);
}
if(_169.length>this._parent._groupingOffset){
var a=[];
var i=_169.length-this._parent._groupingOffset;
while(i>0){
a.unshift(_169.substr(i,this._parent._groupingOffset));
a.unshift(I18nMsg.numberSeparatorGrouping);
i-=this._parent._groupingOffset;
}
a.unshift(_169.substring(0,i+this._parent._groupingOffset));
_169=a.join("");
}
var _16c="0";
var _16d;
while(_168.length>0){
switch(_168.shift()){
case ".":
_16c=_168.shift();
break;
case "E":
case "e":
_16d=_168.shift();
break;
default:
}
}
_16c=_16c.replace(/0+$/,"");
if(_16c.length<this._parent._minFracDigits){
_16c=AjxFormat._zeroPad(_16c,this._parent._minFracDigits,I18nMsg.numberZero,true);
}
var a=[_169];
if(_16c.length>0){
var _16e=this._parent._isCurrency?I18nMsg.numberSeparatorMoneyDecimal:I18nMsg.numberSeparatorDecimal;
a.push(_16e,_16c);
}
if(_16d){
a.push("E",_16d.replace(/^\+/,""));
}
return a.join("");
};
function AjxChoiceFormat(_16f){
AjxFormat.call(this,_16f);
var _170=_16f.split("|");
if(arguments.length==1){
this._limits=new Array(_170.length);
this._lessThan=new Array(_170.length);
this._formats=new Array(_170.length);
var _171=new RegExp("^([^#<\u2264]+)([#<\u2264])(.*)$");
for(var i=0;i<_170.length;i++){
var _173=_170[i];
var _174=_171.exec(_173);
var _175=_174[1];
var _176=_174[2];
var _177=_174[3];
if(_175=="\u221e"){
this._limits[i]=Number.POSITIVE_INFINITY;
}else{
if(_175=="-\u221e"){
this._limits[i]=Number.NEGATIVE_INFINITY;
}else{
this._limits[i]=parseFloat(_175);
}
}
this._lessThan[i]=_176=="#"||_176=="\u2264";
this._formats[i]=new AjxMessageFormat(_177);
}
}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(_178){
var _179;
if(isNaN(_178)||_178<this._limits[0]){
_179=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=_178>=a;
var aLTb=this._lessThan[i+1]?_178<b:_178<=b;
if(aGEb&&aLTb){
_179=this._formats[i];
break;
}
}
if(!_179){
_179=this._formats[this._formats.length-1];
}
}
return _179.format(_178);
};
function AjxException(msg,code,_181,_182){
if(arguments.length==0){
return;
}
this.msg=msg;
this.code=code;
this.method=_181;
this.detail=_182;
}
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 _188=doc.cookie;
var i=0;
while(i<clen){
var j=i+alen;
if(_188.substring(i,j)==arg){
var _18b=_188.indexOf(";",j);
if(_18b==-1){
_18b=_188.length;
}
return unescape(_188.substring(j,_18b));
}
i=_188.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
};
AjxCookie.setCookie=function(doc,name,_18e,_18f,path,_191,_192){
doc.cookie=name+"="+escape(_18e)+((_18f)?"; expires="+_18f.toGMTString():"")+((path)?"; path="+path:"")+((_191)?"; domain="+_191:"")+((_192)?"; secure":"");
};
AjxCookie.deleteCookie=function(doc,name,path,_196){
doc.cookie=name+"="+((path)?"; path="+path:"")+((_196)?"; domain="+_196:"")+"; expires=Fri, 31 Dec 1999 23:59:59 GMT";
};
function AjxSoapException(msg,code,_199,_19a){
AjxException.call(this,msg,code,_199,_19a);
}
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(_19b){
if(arguments.length==0){
return;
}
var _19c=_19b.prefix;
var _19d=_19c+":Code";
var _19e=_19c+":Reason";
var _19f=_19c+":Detail";
for(var i=0;i<_19b.childNodes.length;i++){
var _1a1=_19b.childNodes[i];
if(_1a1.nodeName==_19d){
var _1a2=_1a1.firstChild.firstChild.nodeValue;
if(_1a2==(_19c+":VersionMismatch")){
this.faultCode=AjxSoapFault.VERSION_MISMATCH;
}else{
if(_1a2==(_19c+":MustUnderstand")){
this.faultCode=AjxSoapFault.MUST_UNDERSTAND;
}else{
if(_1a2==(_19c+":DataEncodingUnknown")){
this.faultCode=AjxSoapFault.DATA_ENCODING_UNKNOWN;
}else{
if(_1a2==(_19c+":Sender")){
this.faultCode=AjxSoapFault.SENDER;
}else{
if(_1a2==(_19c+":Receiver")){
this.faultCode=AjxSoapFault.RECEIVER;
}else{
this.faultCode=AjxSoapFault.UNKNOWN;
}
}
}
}
}
}else{
if(_1a1.nodeName==_19e){
this.reason=_1a1.firstChild.firstChild.nodeValue;
}else{
if(_1a1.nodeName==_19f){
this.errorCode=_1a1.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(){
}
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(_1a3,_1a4,_1a5,_1a6){
var sd=new AjxSoapDoc();
sd._xmlDoc=AjxXmlDoc.create();
var d=sd._xmlDoc.getDoc();
var _1a9=d.createElement("soap:Envelope");
if(!_1a6){
_1a6=AjxSoapDoc._SOAP_URI;
}
_1a9.setAttribute("xmlns:soap",_1a6);
d.appendChild(_1a9);
var _1aa=d.createElement("soap:Body");
_1a9.appendChild(_1aa);
sd._methodEl=d.createElement(_1a3);
if(_1a5==null){
sd._methodEl.setAttribute("xmlns",_1a4);
}else{
sd._methodEl.setAttribute("xmlns:"+_1a5,_1a4);
}
_1aa.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 _1b0=el.firstChild;
if(!AjxEnv.isSafari){
if(_1b0!=null&&_1b0.namespaceURI!=AjxSoapDoc._SOAP_URI||_1b0.nodeName!=(el.prefix+":Fault")){
return null;
}
}else{
if(_1b0!=null&&_1b0.nodeName!=(el.prefix+":Fault")){
return null;
}
}
return new AjxSoapFault(_1b0);
};
AjxSoapDoc.prototype.setMethodAttribute=function(name,_1b2){
this._methodEl.setAttribute(name,_1b2);
};
AjxSoapDoc.prototype.set=function(name,_1b4,_1b5){
var doc=this.getDoc();
var p=name?doc.createElement(name):doc.createDocumentFragment();
if(_1b4!=null){
if(typeof _1b4=="object"){
for(i in _1b4){
this.set(i,_1b4[i],p);
}
}else{
if(AjxEnv.isSafari){
_1b4=AjxStringUtil.xmlEncode(_1b4);
}
p.appendChild(doc.createTextNode(_1b4));
}
}
if(!_1b5){
_1b5=this._methodEl;
}
return _1b5.appendChild(p);
};
AjxSoapDoc.prototype.getMethod=function(){
return this._methodEl;
};
AjxSoapDoc.prototype.createHeaderElement=function(){
var d=this._xmlDoc.getDoc();
var _1b9=d.firstChild;
var _1ba=this.getHeader();
if(_1ba!=null){
throw new AjxSoapException("SOAP header already exists",AjxSoapException.ELEMENT_EXISTS,"AjxSoapDoc.prototype.createHeaderElement");
}
_1ba=d.createElement("soap:Header");
_1b9.insertBefore(_1ba,_1b9.firstChild);
return _1ba;
};
AjxSoapDoc.prototype.getHeader=function(){
var d=this._xmlDoc.getDoc();
var _1bc=AjxEnv.isIE?(d.getElementsByTagName(d.firstChild.prefix+":Header")):(d.getElementsByTagNameNS(AjxSoapDoc._SOAP_URI,"Header"));
return _1bc?_1bc[0]:null;
};
AjxSoapDoc.prototype.getBody=function(){
var d=this._xmlDoc.getDoc();
var _1be=AjxEnv.isIE?(d.getElementsByTagName(d.firstChild.prefix+":Body")):(d.getElementsByTagNameNS(AjxSoapDoc._SOAP_URI,"Body"));
return _1be?_1be[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.getByTagName("Header")||this.createHeaderElement());
};
AjxSoapDoc.prototype.getDoc=function(){
return this._xmlDoc.getDoc();
};
AjxSoapDoc.prototype.getXml=function(){
return AjxEnv.isSafari?(AjxXmlDoc.getXml(this._xmlDoc.getDoc())):this._xmlDoc.getDoc().xml;
};
AjxSoapDoc.prototype._check=function(_1c1){
var doc=_1c1.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,ctxt){
if(!AjxRpcRequest._inited){
AjxRpcRequest._init();
}
this.id=id;
this.ctxt=ctxt;
if(AjxEnv.isIE){
this._httpReq=new ActiveXObject(AjxRpcRequest._msxmlVers);
}else{
if(AjxEnv.isSafari||AjxEnv.isNav){
this._httpReq=new XMLHttpRequest();
}
}
}
AjxRpcRequest._inited=false;
AjxRpcRequest._msxmlVers=null;
AjxRpcRequest.prototype.toString=function(){
return "AjxRpcRequest";
};
AjxRpcRequest.prototype.invoke=function(_1c6,_1c7,_1c8,_1c9,_1ca,_1cb){
var _1cc=(_1c9!=null);
this._httpReq.open((_1ca)?"get":"post",_1c7,_1cc);
if(_1cc){
this._callback=_1c9;
var _1cd=this;
this._httpReq.onreadystatechange=function(ev){
AjxRpcRequest._handleResponse(_1cd,_1c9);
};
}else{
this._httpReq.onreadystatechange=function(ev){
};
}
if(_1c8){
for(var i in _1c8){
this._httpReq.setRequestHeader(i,_1c8[i]);
}
}
this._httpReq.send(_1c6);
if(_1cc){
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._handleResponse=function(req,_1d2){
if(!req){
_1d2.run({text:null,xml:null,success:false,status:500});
return;
}
if(req._httpReq.readyState==4){
if(req._httpReq.status==200){
_1d2.run({text:req._httpReq.responseText,xml:req._httpReq.responseXML,success:true});
}else{
_1d2.run({text:req._httpReq.responseText,xml:req._httpReq.responseXML,success:false,status:req._httpReq.status});
}
req.ctxt.busy=false;
}
};
AjxRpcRequest.prototype.cancel=function(){
this._httpReq.abort();
};
AjxRpcRequest._init=function(){
if(AjxEnv.isIE){
var _1d3=["MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
for(var i=0;i<_1d3.length;i++){
try{
var x=new ActiveXObject(_1d3[i]);
AjxRpcRequest._msxmlVers=_1d3[i];
break;
}
catch(ex){
}
}
if(AjxRpcRequest._msxmlVers==null){
throw new AjxException("MSXML not installed",AjxException.INTERNAL_ERROR,"AjxRpc._init");
}
}
AjxRpcRequest._inited=true;
};
function AjxRpc(){
}
AjxRpc._rpcCache=[];
AjxRpc._RPC_CACHE_MAX=50;
AjxRpc._RPC_REAP_COUNT=5;
AjxRpc._RPC_REAP_AGE=300000;
AjxRpc._TRIES=0;
AjxRpc.invoke=function(_1d6,_1d7,_1d8,_1d9,_1da){
var _1db=(_1d9!=null);
var _1dc=AjxRpc._getFreeRpcCtxt();
try{
var _1dd=_1dc.req.invoke(_1d6,_1d7,_1d8,_1d9,_1da);
}
catch(ex){
var _1de=new AjxException();
_1de.method="AjxRpc.prototype._invoke";
if(ex instanceof Error){
_1de.detail=ex.message;
_1de.code=AjxException.NETWORK_ERROR;
_1de.msg="Network error";
}else{
_1de.detail=ex.toString();
_1de.code=AjxException.UNKNOWN_ERROR;
_1de.msg="Unknown Error";
}
if(!_1db){
_1dc.busy=false;
}
if(AjxRpc._TRIES<10){
AjxRpc._TRIES++;
return AjxRpc.invoke(_1d6,_1d7,_1d8,_1d9,_1da);
}else{
throw _1de;
}
}
if(!_1db){
_1dc.busy=false;
}
AjxRpc._TRIES=0;
return _1dd;
};
AjxRpc._getFreeRpcCtxt=function(){
var _1df=null;
for(var i=0;i<AjxRpc._rpcCache.length;i++){
_1df=AjxRpc._rpcCache[i];
if(!_1df.busy){
break;
}
}
if(i==AjxRpc._rpcCache.length){
if(AjxRpc._rpcCache.length==AjxRpc._RPC_CACHE_MAX){
return AjxRpc._getFreeRpcCtxt();
}else{
if(i>0&&(i%AjxRpc._RPC_REAP_COUNT==0)){
AjxRpc._reap();
}
}
var id="_rpcCtxt_"+i;
_1df=new _RpcCtxt(id);
AjxRpc._rpcCache.push(_1df);
}
_1df.busy=true;
_1df.timestamp=(new Date()).getTime();
return _1df;
};
AjxRpc.getRpcRequest=function(id){
for(var i=0;i<AjxRpc._rpcCache.length;i++){
var _1e4=AjxRpc._rpcCache[i];
if(_1e4.id==id){
return _1e4.req;
}
}
return null;
};
AjxRpc._reap=function(){
var time=(new Date()).getTime();
for(var i=0;i<AjxRpc._rpcCache.length;i++){
var _1e7=AjxRpc._rpcCache[i];
if(_1e7.timestamp+AjxRpc._RPC_REAP_AGE<time){
_1e7.req.cancel();
_1e7.busy=false;
}
}
};
function _RpcCtxt(id){
this.id=id;
this.req=new AjxRpcRequest(id,this);
this.busy=false;
}
function AjxVector(){
this._array=new Array();
}
AjxVector.prototype.toString=function(sep,_1ea){
if(_1ea!==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,_1f1){
if(_1f1==null||_1f1<0||_1f1>=this._array.length){
this._array.push(obj);
}else{
this._array.splice(_1f1,0,obj);
}
};
AjxVector.prototype.addList=function(list){
if(!list){
return;
}
if((list instanceof Array)&&list.length){
this._array=this._array.concat(list);
}else{
if((list instanceof AjxVector)&&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(_1f5){
if(_1f5>=this._array.length||_1f5<0){
return null;
}
var _1f6=this._array.splice(_1f5,1);
var ret=null;
if(_1f6){
ret=_1f6[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(_1f9,_1fa){
var _1fb=this._array[_1f9];
this._array[_1f9]=_1fa;
return _1fb;
};
AjxVector.prototype.indexOf=function(obj){
for(var i=0;i<this._array.length;i++){
if(this._array[i]==obj){
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,_202){
var _203=_202.call(obj);
for(var i=0;i<this._array.length;i++){
var test=_202.call(this._array[i]);
if(test==_203){
return true;
}
}
return false;
};
AjxVector.prototype.get=function(_206){
return _206>=this._array.length||_206<0?null:this._array[_206];
};
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.sort=function(_207){
if(!_207){
_207=AjxVector._defaultArrayComparator;
}
this._array.sort(_207);
};
AjxVector.prototype.binarySearch=function(_208,_209){
if(!_209){
_209=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 _20e=_209(_208,arr[i]);
if(_20e<0){
u=i-1;
}else{
if(_20e>0){
l=i+1;
}else{
return i;
}
}
}
};
AjxVector.prototype.merge=function(_20f,list){
if(_20f<0){
return;
}
var _211=list instanceof AjxVector?list.getArray():list;
var _212=this._array.length<(_20f+_211.length)?this._array.length:_20f+_211.length;
if(_20f<this._array.length){
var _213=0;
for(var i=_20f;i<_212;i++){
this._array[i]=_211[_213++];
}
if(_213<_211.length){
this._array=this._array.concat(_211.slice(_213));
}
}else{
this._array=this._array.concat(_211);
}
};
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,_219,_21a){
if(!str){
return "";
}
var _21b=AjxStringUtil.TRIM_RE;
var _21c=AjxStringUtil.COMPRESS_RE;
if(_21a){
_21b=new RegExp("^"+_21a+"+|"+_21a+"+$","g");
_21c=new RegExp(_21a+"+","g");
}else{
_21a=" ";
}
str=str.replace(_21b,"");
if(_219){
str=str.replace(_21c,_21a);
}
return str;
};
AjxStringUtil.repeat=function(str,num){
var text="";
for(var i=0;i<num;i++){
text+=str;
}
return text;
};
AjxStringUtil.getUnitsFromSizeString=function(_221){
var _222="px";
if(typeof (_221)=="string"){
var _223=Number(parseInt(_221)).toString();
if(_221.length>_223.length){
_222=_221.substr(_223.length,(_221.length-_223.length));
if(!(_222=="em"||_222=="ex"||_222=="px"||_222=="in"||_222=="cm"==_222=="mm"||_222=="pt"||_222=="pc"||_222=="%")){
_222="px";
}
}
}
return _222;
};
AjxStringUtil.split=function(str,dels){
if(!str){
return new Array();
}
dels=dels?dels:",";
var _226=new Object;
if(typeof dels=="string"){
_226[dels]=1;
}else{
for(var i=0;i<dels.length;i++){
_226[dels[i]]=1;
}
}
var q=false;
var p=0;
var _22a=0;
var _22b;
var _22c=new Array();
var j=0;
for(var 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(_226[c]){
if(!q&&!p){
_22b=str.substring(_22a,i);
_22c[j++]=_22b;
_22a=i+1;
}
}
}
}
}
}
_22b=str.substring(_22a,str.length);
_22c[j++]=_22b;
return _22c;
};
AjxStringUtil.wordWrap=function(text,len,pre,eol,_233,_234){
if(!text){
return "";
}
len=len?len:80;
eol=eol?eol:"\n";
pre=pre?pre:"";
len-=pre.length;
var _235=new Array();
var c=0;
text=AjxStringUtil.trim(text,false);
text=text.replace(/[ \t]+\n/g,"\n");
if(_234){
text=text.replace(/\b\n\b/g," ");
}
var _237=text.length;
for(var i=0,bk=0,sp=-1;i<_237;i++){
var ch=text.charAt(i);
if(ch.match(/[ \t]/)){
sp=i;
}
if(ch=="\n"){
_235[c++]=pre+text.substring(bk,i);
bk=i+1;
sp=-1;
}
if(i-bk>=len){
if(sp==-1){
if(_233){
_235[c++]=pre+text.substring(bk,i);
bk=i;
sp=-1;
}
}else{
_235[c++]=pre+text.substring(bk,sp);
bk=sp+1;
sp=-1;
}
}
}
if(i>bk){
_235[c++]=pre+text.substring(bk,i);
}
return _235.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(_23a){
return AjxStringUtil.IS_PRINT_CODE[_23a];
};
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(_23b,_23c){
return _23c?AjxStringUtil.SHIFT_CHAR[_23b]||String.fromCharCode(_23b):String.fromCharCode(_23b);
};
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,_242){
return AjxMessageFormat.format(str,_242);
};
AjxStringUtil.urlEncode=function(str){
if(!str){
return "";
}
return escape(str.replace(/ /g,"+")).replace(/[+]/g,"%2B");
};
AjxStringUtil.ENCODE_MAP={">":"&gt;","<":"&lt;","&":"&amp;"};
AjxStringUtil.htmlEncode=function(str,_245){
if(!str){
return "";
}
if(!AjxEnv.isSafari){
if(_245){
return str.replace(/[<>&]/g,function(_246){
return AjxStringUtil.ENCODE_MAP[_246];
}).replace(/  /g," &nbsp;");
}else{
return str.replace(/[<>&]/g,function(_247){
return AjxStringUtil.ENCODE_MAP[_247];
});
}
}else{
if(_245){
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(_24a){
return AjxStringUtil.SPACE_ENCODE_MAP[_24a];
});
}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/g,"<pre style='display:inline;'>\t</pre>").replace(/\n/g,"<br>");
};
AjxStringUtil.xmlEncode=function(str){
return str?str.replace(/&/g,"&amp;").replace(/</g,"&lt;"):"";
};
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");
};
var 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(_251,_252,_253){
var _254=AjxStringUtil.calcDIV();
if(arguments.length==3){
_254.className=_253;
}
_254.innerHTML=_251;
if(_254.offsetWidth<=_252){
return _251;
}
for(var i=_251.length-1;i>0;i--){
var _256=_251.substr(0,i);
_254.innerHTML=_256+AjxStringUtil.ELLIPSIS;
if(_254.offsetWidth<=_252){
return _256+AjxStringUtil.ELLIPSIS;
}
}
return _251;
};
AjxStringUtil.wrap=function(_257,_258,_259){
var _25a=AjxStringUtil.calcDIV();
if(arguments.length==3){
_25a.className=_259;
}
var _25b="";
var _25c="";
textRows=_257.split("/n");
for(var _25d=0;_25d<textRows.length;_25d++){
if(_25d!=0){
_25b+=_25c+"<br>";
_25c="";
}
htmlRows=textRows[_25d].split("<br>");
for(var _25e=0;_25e<htmlRows.length;_25e++){
if(_25e!=0){
_25b+=_25c+"<br>";
_25c="";
}
words=htmlRows[_25e].split(" ");
var _25f=0;
while(_25f<words.length){
_25a.innerHTML=_25c+" "+words[_25f];
var _260=_25a.offsetWidth;
if(_260>_258){
_25a.innerHTML=words[_25f];
_260=_260-_25a.offsetWidth;
if((_260>=_258)||(_25a.offsetWidth<=_258)){
_25b+=_25c+"<br>";
_25c="";
}else{
var _261=true;
var _262=0;
while(_261){
_262++;
_25a.innerHTML=_25c+" "+words[_25f].substring(0,_262);
_261=(_25a.offsetWidth<=_258);
}
_262--;
_25b+=_25c+words[_25f].substring(0,_262)+"<br>";
words[_25f]=words[_25f].substr(_262);
_25c="";
}
}else{
_25c+=" "+words[_25f];
_25f++;
}
}
}
}
_25b+=_25c;
return _25b;
};
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 _265=text.split(eol);
var len=_265.length;
var i=0,start=0;
var _268=new Array();
var _269=false;
while(i<len){
var _26a=_269;
var skip=AjxStringUtil._linesToSkip(_265,i);
_269=(skip>0);
if(_26a&&!_269){
start=i;
}else{
if(!_26a&&_269&&i>start){
_268.push(AjxStringUtil._trimBlankLines(_265.slice(start,i).join(eol),eol)+eol);
}
}
i+=_269?skip:1;
}
if(!_269&&i>start){
_268.push(AjxStringUtil._trimBlankLines(_265.slice(start,i).join(eol),eol)+eol);
}
return _268;
};
AjxStringUtil._linesToSkip=function(_26c,i){
var len=_26c.length;
var skip=0;
var _270=i;
if(AjxStringUtil.MSG_SEP_RE.test(_26c[i])){
skip=len-i;
}else{
if(AjxStringUtil.SIG_RE.test(_26c[i])){
skip=len-i;
}else{
if(AjxStringUtil.PREFIX_RE.test(_26c[i])){
while(i<_26c.length&&(AjxStringUtil.PREFIX_RE.test(_26c[i])||AjxStringUtil.BLANK_RE.test(_26c[i]))){
i++;
}
skip=i-_270;
}else{
if(AjxStringUtil.COLON_RE.test(_26c[i])){
var idx=AjxStringUtil._nextNonBlankLineIndex(_26c,i+1);
var _272=(idx!=-1)?_26c[idx]:null;
if(_272&&AjxStringUtil.PREFIX_RE.test(_272)){
skip=idx-i;
}else{
if(idx!=-1){
idx=AjxStringUtil._nextNonBlankLineIndex(_26c,idx+1);
}
var _273=(idx!=-1)?_26c[idx]:null;
if(_273&&AjxStringUtil.BRACKET_RE.test(_272)&&AjxStringUtil.PREFIX_RE.test(_273)){
skip=idx-i;
}
}
}else{
if(AjxStringUtil.LINE_RE.test(_26c[i])){
var idx=AjxStringUtil._nextNonBlankLineIndex(_26c,i+1);
var _272=(idx!=-1)?_26c[idx]:null;
if(_272&&AjxStringUtil.HDR_RE.test(_272)){
skip=len-i;
}
}
}
}
}
}
return skip;
};
AjxStringUtil._nextNonBlankLineIndex=function(_274,i){
while(i<_274.length&&AjxStringUtil.BLANK_RE.test(_274[i])){
i++;
}
return ((i<_274.length)?i:-1);
};
AjxStringUtil._trimBlankLines=function(text,eol){
eol=eol?eol:"\n";
var _278=text.split(eol);
var len=_278.length;
var i=0;
while(i<len&&AjxStringUtil.BLANK_RE.test(_278[i])){
i++;
}
var j=len;
while(j>0&&AjxStringUtil.BLANK_RE.test(_278[j-1])){
j--;
}
if(i!=0||j!=len){
text=_278.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(_27c){
if(!_27c){
return null;
}
var text=new Array();
var idx=0;
var ctxt=new Object();
this._traverse(_27c,text,idx,AjxStringUtil._NO_LIST,0,0,ctxt);
var _280=text.join("");
return _280;
};
AjxStringUtil._traverse=function(el,text,idx,_284,_285,_286,ctxt){
var _288=el.nodeName.toLowerCase();
if(_288=="#text"){
if(el.nodeValue.search(AjxStringUtil._NON_WHITESPACE)!=-1){
if(ctxt.lastNode=="ol"||ctxt.lastNode=="ul"){
text[idx++]="\n";
}
text[idx++]=AjxStringUtil.trim(el.nodeValue.replace(AjxStringUtil._LF," "),true)+" ";
}
}else{
if(_288=="p"){
text[idx++]="\n\n";
}else{
if(_284==AjxStringUtil._NO_LIST&&(_288=="br"||_288=="hr")){
text[idx++]="\n";
}else{
if(_288=="ol"||_288=="ul"){
text[idx++]="\n";
if(el.parentNode.nodeName.toLowerCase()!="li"&&ctxt.lastNode!="br"&&ctxt.lastNode!="hr"){
text[idx++]="\n";
}
_284=(_288=="ol")?AjxStringUtil._ORDERED_LIST:AjxStringUtil._UNORDERED_LIST;
_285++;
_286=0;
}else{
if(_288=="li"){
for(var i=0;i<_285;i++){
text[idx++]=AjxStringUtil._INDENT;
}
if(_284==AjxStringUtil._ORDERED_LIST){
text[idx++]=_286+". ";
}else{
text[idx++]="\u2022 ";
}
}else{
if(_288=="img"){
if(el.alt&&el.alt!=""){
text[idx++]=el.alt;
}
}else{
if(_288=="tr"&&el.parentNode.firstChild!=el){
text[idx++]="\n";
}else{
if(_288=="td"&&el.parentNode.firstChild!=el){
text[idx++]="\t";
}else{
if(_288=="div"){
text[idx++]="\n";
}else{
if(_288=="#comment"||_288=="script"||_288=="select"||_288=="style"){
return idx;
}
}
}
}
}
}
}
}
}
}
var _28a=el.childNodes;
var len=_28a.length;
for(var i=0;i<len;i++){
if(_288=="ol"){
_286++;
}
idx=this._traverse(_28a[i],text,idx,_284,_285,_286,ctxt);
}
if(_288=="h1"||_288=="h2"||_288=="h3"||_288=="h4"||_288=="h5"||_288=="h6"){
text[idx++]="\n";
ctxt.list=false;
}else{
if(_288=="li"){
if(!ctxt.list){
text[idx++]="\n";
}
ctxt.list=false;
}else{
if(_288=="ol"||_288=="ul"){
ctxt.list=true;
}else{
if(_288!="#text"){
ctxt.list=false;
}
}
}
}
ctxt.lastNode=_288;
return idx;
};
function AjxDebug(_28c,name,_28e){
this._dbgName="AjxDebugWin_"+location.hostname.replace(/\./g,"_");
this._level=_28c;
this._showTime=_28e;
this._enabled=(this._level!=AjxDebug.NONE);
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;
if(!this._enabled){
return;
}
this._openDebugWindow();
}
AjxDebug.NONE="DBG0";
AjxDebug.DBG1="DBG1";
AjxDebug.DBG2="DBG2";
AjxDebug.DBG3="DBG3";
AjxDebug.PERF="PERF";
AjxDebug.DBG=new Object();
AjxDebug.DBG[-1]=AjxDebug.PERF;
AjxDebug.DBG[0]=AjxDebug.NONE;
AjxDebug.DBG[1]=AjxDebug.DBG1;
AjxDebug.DBG[2]=AjxDebug.DBG2;
AjxDebug.DBG[3]=AjxDebug.DBG3;
AjxDebug.GBD={};
AjxDebug.GBD[AjxDebug.PERF]=-1;
AjxDebug.GBD[AjxDebug.NONE]=0;
AjxDebug.GBD[AjxDebug.DBG1]=1;
AjxDebug.GBD[AjxDebug.DBG2]=2;
AjxDebug.GBD[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(_28f){
if(_28f==this._level){
return;
}
this._level=_28f;
if(_28f==AjxDebug.NONE){
this._enabled=false;
this._debugWindow.close();
this._debugWindow=null;
}else{
this._enabled=true;
if(this._debugWindow==null||this._debugWindow.closed){
this._openDebugWindow();
}
}
};
AjxDebug.prototype.getDebugLevel=function(_290){
return this._level;
};
AjxDebug.prototype.isShowTiming=function(){
return this._showTiming;
};
AjxDebug.prototype.showTiming=function(on,_292,msg){
this._showTiming=on;
if(on){
this._startTimePt=this._lastTimePt=0;
var a=[];
for(var i=1;i<arguments.length;i++){
a.push(arguments[i]);
}
var args=this._handleArgs(a);
if(args){
var _297=AjxDebug.DBG1;
if(String(_292).match(/^DBG|PERF/)){
_297=_292;
}
this.println(_297," ----- "+args[0]+" ----- ");
}
}
this._startTimePt=this._lastTimePt=new Date().getTime();
};
AjxDebug.prototype.println=function(_298,msg,_29a){
if(this.isDisabled()||this._debugWindow.closed){
return;
}
var args=this._handleArgs(arguments,_29a);
if(!args){
return;
}
msg=args.join("");
this._add(this._timestamp()+msg+"<br>",null,null,null,_29a);
};
AjxDebug.prototype.isDisabled=function(){
return !this._enabled;
};
AjxDebug.prototype.dumpObj=function(_29c,obj,_29e,_29f){
if(this.isDisabled()||this._debugWindow.closed){
return;
}
var args=this._handleArgs(arguments,_29f);
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(_2a1,text,_2a3){
if(this.isDisabled()||this._debugWindow.closed){
return;
}
var args=this._handleArgs(arguments,_2a3);
if(!args){
return;
}
text=args[0];
this._add(null,text,false,true);
};
AjxDebug.prototype.printXML=function(_2a5,text,_2a7){
if(this.isDisabled()||this._debugWindow.closed){
return;
}
var args=this._handleArgs(arguments,_2a7);
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(_2a9,text){
if(this.isDisabled()||this._debugWindow.closed){
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(_2a9,text);
};
AjxDebug.prototype.timePt=function(_2ac,msg){
if(!this._showTiming||!this._enabled||this._debugWindow.closed){
return;
}
var args=this._handleArgs(arguments);
if(!args){
return;
}
var msg=args[0];
var now=new Date().getTime();
var _2b0=now-this._startTimePt;
var _2b1=now-this._lastTimePt;
this._lastTimePt=now;
var text="["+_2b0+" / "+_2b1+"]";
if(msg){
text+=" "+msg;
}
html="<div>"+text+"</div>";
extraType=typeof (text);
var _2b3=new DebugMessage(html);
this._addMessage(_2b3);
return _2b1;
};
AjxDebug.prototype._getHtmlForObject=function(_2b4,_2b5,_2b6){
var html=new Array();
var idx=0;
if(AjxUtil.isUndefined(_2b4)){
html[idx++]="<span>Undefined</span>";
}else{
if(AjxUtil.isNull(_2b4)){
html[idx++]="<span>NULL</span>";
}else{
if(AjxUtil.isBoolean(_2b4)){
html[idx++]="<span>"+_2b4+"</span>";
}else{
if(AjxUtil.isNumber(_2b4)){
html[idx++]="<span>"+_2b4+"</span>";
}else{
if(_2b6){
html[idx++]=this._timestamp();
html[idx++]="<textarea rows='25' style='width:100%' readonly='true'>";
html[idx++]=_2b4;
html[idx++]="</textarea>";
html[idx++]="<p></p>";
}else{
if(_2b5){
var _2b9=new AjxDebugXmlDocument;
var doc=_2b9.create();
doc.loadXML(_2b4);
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(_2b4,true);
html[idx++]="</div>";
html[idx++]="</pre>";
}
}
}
}
}
}
return html.join("");
};
AjxDebug.prototype._dump=function(obj,_2bc){
var _2bd=0;
var _2be=false;
var _2bf=false;
if(arguments.length>2){
_2bd=arguments[2];
_2be=arguments[3];
_2bf=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 _2c0=AjxStringUtil.repeat(" ",_2bd);
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 _2c2=AjxUtil.isArray(obj);
if(_2bf){
text+=_2c2?"[Array]":obj.toString();
}else{
_2bf=!_2bc;
var keys=new Array();
for(var i in obj){
keys.push(i);
}
_2c2?keys.sort(function(a,b){
return a-b;
}):keys.sort();
if(_2be){
text+=_2c2?"[":"{";
}
for(var i=0;i<keys.length;i++){
var key=keys[i];
var _2c8=obj[key];
var _2c9=null;
if(_2c8==window||_2c8==document||(!AjxEnv.isIE&&_2c8 instanceof Node)){
_2c9=_2c8.toString();
}
if((typeof (_2c8)=="function")){
if(this._showFuncs){
_2c9="[function]";
}else{
continue;
}
}
if(i>0){
text+=",";
}
text+="\n"+_2c0;
if(_2c9!=null){
text+=key+": "+_2c9;
}else{
text+=key+": "+this._dump(_2c8,_2bc,_2bd+2,true,_2bf);
}
}
if(i>0){
text+="\n"+AjxStringUtil.repeat(" ",_2bd-1);
}
if(_2be){
text+=_2c2?"]":"}";
}
}
}
}
}
}
}
}
return text;
};
AjxDebug.prototype._handleArgs=function(args,_2cb){
if(this._level==AjxDebug.NONE){
return;
}
var _2cc=false;
var _2cd=AjxDebug.GBD[this._level];
var _2ce=AjxDebug.GBD[AjxDebug.DBG1];
if(typeof args[0]=="string"&&String(args[0]).match(/^DBG|PERF/)){
_2ce=AjxDebug.GBD[args[0]];
_2cc=true;
}
if(_2ce>_2cd){
return;
}
var _2cf=new Array(args.length);
var len=(_2cb)?args.length-1:args.length;
for(var i=0;i<len;i++){
_2cf[i]=args[i];
}
if(_2cc){
_2cf.shift();
}
return _2cf;
};
AjxDebug.prototype._getCookieVal=function(_2d2){
var myRE=_2d2+"=([^;]+)";
var _2d4=document.cookie.match(new RegExp(myRE));
var val=null;
if(_2d4&&(_2d4.length>0)){
var _2d6=_2d4[_2d4.length-1];
if(_2d6=="true"){
val=true;
}else{
if(_2d6=="false"){
val=false;
}else{
val=_2d6;
}
}
}
return val;
};
AjxDebug.prototype._openDebugWindow=function(){
this._enabled=true;
this._isPrevWinOpen=this._getCookieVal("AjxDebugWinOpen");
if(!this._isPrevWinOpen){
this._debugWindow=AjxWindowOpener.openBlank(this._dbgName,"width=600,height=400,resizable=yes,scrollbars=yes",this._initWindow,this);
}else{
this._debugWindow=window.open("",this._dbgName,"width=600,height=400,resizable=yes,scrollbars=yes");
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();
this._debugWindow.close();
if(AjxDebug._openErrors<5){
AjxDebug._openErrors++;
this._openDebugWindow();
}
}
};
AjxDebug.prototype._finishInitWindow=function(){
this._contentFrame=this._document.getElementById(AjxDebug._CONTENT_FRAME_ID);
this._linkFrame=this._document.getElementById(AjxDebug._LINK_FRAME_ID);
var _2d8=this._document.getElementById(AjxDebug._BUTTON_FRAME_ID);
var _2d9=_2d8.contentWindow.document;
var _2da=_2d9.body;
var _2db=this._markBtn=_2d9.createElement("button");
_2db.innerHTML="Mark";
_2db._dbg=this;
_2db.onclick=AjxDebug._mark;
var _2dc=this._markBtn=_2d9.createElement("button");
_2dc._contentFrameId=AjxDebug._CONTENT_FRAME_ID;
_2dc._linkFrameId=AjxDebug._LINK_FRAME_ID;
_2dc.innerHTML="Clear";
_2dc._dbg=this;
_2dc.onclick=AjxDebug._clear;
_2da.appendChild(_2db);
_2da.appendChild(_2d9.createTextNode(" "));
_2da.appendChild(_2dc);
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(){
if(AjxEnv.isIE){
this._contentFrame.contentWindow.document.body.scrollIntoView(false);
this._linkFrame.contentWindow.document.body.scrollIntoView(false);
}else{
this._contentFrame.contentWindow.scrollTo(0,this._contentFrame.contentWindow.document.body.offsetHeight);
this._linkFrame.contentWindow.scrollTo(0,this._linkFrame.contentWindow.document.body.offsetHeight);
}
};
AjxDebug.prototype._timestamp=function(){
return this._showTime?AjxDateFormat.getTimeInstance().format(new Date())+": ":"";
};
AjxDebug.prototype.setShowTimestamps=function(show){
this._showTime=show;
};
AjxDebug.prototype._createXmlTree=function(node,_2df){
if(node==null){
return "";
}
var str="";
switch(node.nodeType){
case 1:
str+="<div style='color: blue; padding-left: 16px;'>&lt;<span style='color: DarkRed;'>"+node.nodeName+"</span>";
var _2e1=node.attributes;
for(var i=0;i<_2e1.length;i++){
str+=this._createXmlAttribute(_2e1[i]);
}
if(!node.hasChildNodes()){
return str+"/&gt;</div>";
}
str+="&gt;<br />";
var cs=node.childNodes;
for(var i=0;i<cs.length;i++){
str+=this._createXmlTree(cs[i],_2df+3);
}
str+="&lt;/<span style='color: DarkRed;'>"+node.nodeName+"</span>&gt;</div>";
break;
case 9:
var cs=node.childNodes;
for(var i=0;i<cs.length;i++){
str+=this._createXmlTree(cs[i],_2df);
}
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 _2e1=node.attributes;
for(var i=0;i<_2e1.length;i++){
str+=this._createXmlAttribute(_2e1[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,_2ea,_2eb,_2ec,_2ed){
var _2ee=typeof (_2ea);
if(AjxUtil.isSpecified(_2ea)){
_2ea=this._getHtmlForObject(_2ea,_2eb,_2ec);
}
this._addMessage(new DebugMessage(aMsg,null,null,null,_2ea,_2ed));
};
AjxDebug.prototype._addMessage=function(aMsg){
this._msgQueue[this._msgQueue.length]=aMsg;
this._showMessages();
};
donola=false;
AjxDebug.prototype._showMessages=function(){
if(!this._dbgWindowInited){
return;
}
if(this._msgQueue.length>0){
var msg;
var _2f1;
var _2f2;
var _2f3=this._contentFrame.contentWindow.document;
var _2f4=this._linkFrame.contentWindow.document;
for(var i=0;i<this._msgQueue.length;++i){
var now=new Date();
msg=this._msgQueue[i];
_2f1=_2f3.createElement("div");
_2f1.innerHTML=[msg.message,msg.eHtml].join("");
if(msg.linkName){
_2f2=_2f4.createElement("div");
_2f2._targetId=_2f1.id=[AjxDebug._getNextId(),now.getMilliseconds()].join("");
_2f2._dbg=this;
_2f2.className="Link";
_2f2.onclick=AjxDebug._linkClicked;
_2f2.innerHTML=msg.linkName+" - ["+AjxDebug._getTimeStamp(now)+"]";
_2f4.body.appendChild(_2f2);
}
_2f3.body.appendChild(_2f1);
}
}
this._msgQueue.length=0;
this._scrollToBottom();
};
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(_2f9){
var div=this._contentFrame.contentWindow.document.createElement("div");
div.innerHTML=_2f9;
return div;
};
AjxDebug._mark=function(){
this._dbg._createLinkNContent(this._dbg,"MarkLink","MARK","Mark","MARK");
};
AjxDebug.prototype._createLinkNContent=function(_2fb,_2fc,_2fd,_2fe,_2ff){
var now=new Date();
var _301=[" - [",AjxDebug._getTimeStamp(now),"]"].join("");
var _302=_2fb._linkFrame.contentWindow.document;
var div=_302.createElement("div");
div.className=_2fc;
div.innerHTML=_2fd+_301;
var id="Lnk_"+now.getMilliseconds();
div._targetId=id;
div._dbg=_2fb;
div.onclick=AjxDebug._linkClicked;
_302.body.appendChild(div);
var _305=_2fb._contentFrame.contentWindow.document;
div=_305.createElement("div");
div.className=_2fe;
div.id=id;
div.innerHTML=_2ff+_301;
div._dbg=_2fb;
_305.body.appendChild(_305.createElement("p"));
_305.body.appendChild(div);
_305.body.appendChild(_305.createElement("p"));
};
AjxDebug._clear=function(){
this._dbg._contentFrame.contentWindow.document.body.innerHTML="";
this._dbg._linkFrame.contentWindow.document.body.innerHTML="";
};
AjxDebug.myWindowUnloadHandler=function(){
if(AjxEnv.isNav){
DBG._debugWindow.onunload=null;
}else{
DBG._debugWindow.detachEvent("onunload",AjxDebug.unloadHandler);
}
};
AjxDebug.unloadHandler=function(){
try{
window.AjxDebug.deleteWindowCookie();
}
catch(ex){
}
};
AjxDebug.deleteWindowCookie=function(){
var _306=new Date("Fri, 31 Dec 1999 23:59:59 GMT");
document.cookie="AjxDebugWinOpen=false;expires="+_306.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;
};
AjxDebug._getTimeStamp=function(date){
date=(date)?date:new Date();
return AjxStringUtil.htmlEncode([AjxDateUtil.getTimeStr(date,"%H:%m:%s"),".",date.getMilliseconds()].join(""),true);
};
DebugMessage=function(aMsg,_30b,_30c,_30d,_30e,_30f){
this.message=(AjxUtil.isSpecified(aMsg))?aMsg:"";
this.type=_30b?_30b:null;
this.category=_30c?_30c:"";
this.time=_30d?_30d:(new Date().getTime());
this.eHtml=_30e?_30e:"";
this.linkName=_30f;
};
function AjxDebugXmlDocument(){
}
function getDomDocumentPrefix(){
if(getDomDocumentPrefix.prefix){
return getDomDocumentPrefix.prefix;
}
var _310=["MSXML2","Microsoft","MSXML","MSXML3"];
var o;
for(var i=0;i<_310.length;i++){
try{
o=new ActiveXObject(_310[i]+".DomDocument");
return getDomDocumentPrefix.prefix=_310[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);
}
for(var i=0;i<doc2.childNodes.length;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 _317=new AjxXmlDoc();
var _318=null;
if(AjxEnv.isIE){
_318=new ActiveXObject(AjxXmlDoc._msxmlVers);
_318.async=true;
if(AjxXmlDoc._msxmlVers=="MSXML2.DOMDocument.4.0"){
_318.setProperty("SelectionLanguage","XPath");
}
}else{
if(document.implementation&&document.implementation.createDocument){
_318=document.implementation.createDocument("","",null);
}else{
throw new AjxException("Unable to create new Doc",AjxException.INTERNAL_ERROR,"AjxXmlDoc.create");
}
}
_317._doc=_318;
return _317;
};
AjxXmlDoc.createFromDom=function(doc){
var _31a=new AjxXmlDoc();
_31a._doc=doc;
return _31a;
};
AjxXmlDoc.createFromXml=function(xml){
var _31c=AjxXmlDoc.create();
_31c.loadFromString(xml);
return _31c;
};
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(_322,_323,_324){
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(_322){
t=t.replace(/^.*?:/,"");
}
if(_323){
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(_324){
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 _32f=["MSXML4.DOMDocument","MSXML3.DOMDocument","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XmlDom"];
for(var i=0;i<_32f.length;i++){
try{
new ActiveXObject(_32f[i]);
AjxXmlDoc._msxmlVers=_32f[i];
break;
}
catch(ex){
}
}
if(AjxXmlDoc._msxmlVers==null){
throw new AjxException("MSXML not installed",AjxException.INTERNAL_ERROR,"AjxXmlDoc._init");
}
}else{
if(AjxEnv.isNav){
Document.prototype.loadXML=function(str){
var _332=new DOMParser();
var _333=_332.parseFromString(str,"text/xml");
while(this.hasChildNodes()){
this.removeChild(this.lastChild);
}
for(var i=0;i<_333.childNodes.length;i++){
var _335=this.importNode(_333.childNodes[i],true);
this.appendChild(_335);
}
};
_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 _338=new DOMParser();
var _339=_338.parseFromString(str,"text/xml");
while(this.hasChildNodes()){
this.removeChild(this.lastChild);
}
for(var i=0;i<_339.childNodes.length;i++){
var _33b=this.importNode(_339.childNodes[i],true);
this.appendChild(_33b);
}
};
}
}
}
AjxXmlDoc._inited=true;
};
AjxXmlDoc.prototype.set=function(name,_33d,_33e){
var p=this._doc.createElement(name);
if(_33d!=null){
var _340=this._doc.createTextNode("");
p.appendChild(_340);
_340.nodeValue=_33d;
}
if(_33e==null){
if(this.root==null){
throw new AjxException("Must create an XML root element first",AjxException.INTERNAL_ERROR,"AjxXmlDoc.prototype.set");
}else{
this.root.appendChild(p);
}
}else{
_33e.appendChild(p);
}
return p;
};
AjxXmlDoc.prototype.getDocXml=function(){
if(AjxEnv.isSafari){
return AjxXmlDoc.getXml(this.getDoc());
}else{
return this.getDoc().xml;
}
};
AjxXmlDoc.createRoot=function(_341){
var _342=AjxXmlDoc.create();
var d=_342.getDoc();
_342.root=d.createElement(_341);
d.appendChild(_342.root);
return _342;
};
function AjxEnv(){
}
AjxEnv._inited=false;
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.isMozilla=false;
AjxEnv.isMozilla1_4up=false;
AjxEnv.isSafari=false;
AjxEnv.isGeckoBased=false;
AjxEnv.isOpera=false;
AjxEnv.useTransparentPNGs=false;
AjxEnv.is800x600orLower=screen.width<=800&&screen.height<=600;
};
AjxEnv.parseUA=function(_344){
var agt=_344.toLowerCase();
var _346=agt.split(" ");
var i=0;
var _348=-1;
var _349=null;
var _34a=false;
var _34b=false;
var _34c=false;
var _34d=false;
var _34e=false;
if(_346!=null){
if((_348=_346[0].search(/^\s*mozilla\//))!=-1){
_34d=true;
AjxEnv.browserVersion=parseFloat(_346[0].substring(_348+8));
AjxEnv.isNav=true;
}
for(;i<_346.length;++i){
_349=_346[i];
if(_349.indexOf("compatible")!=-1){
_34e=true;
AjxEnv.isNav=false;
}else{
if((_349.indexOf("opera"))!=-1){
AjxEnv.isOpera=true;
AjxEnv.isNav=false;
AjxEnv.browserVersion=parseFloat(_346[i+1]);
}else{
if((_349.indexOf("spoofer"))!=-1){
_34a=true;
AjxEnv.isNav=false;
}else{
if((_349.indexOf("webtv"))!=-1){
_34b=true;
AjxEnv.isNav=false;
}else{
if((_349.indexOf("hotjava"))!=-1){
_34c=true;
AjxEnv.isNav=false;
}else{
if((_348=_349.indexOf("msie"))!=-1){
AjxEnv.isIE=true;
AjxEnv.browserVersion=parseFloat(_346[i+1]);
}else{
if((_348=_349.indexOf("gecko/"))!=-1){
AjxEnv.isGeckoBased=true;
AjxEnv.geckoDate=parseFloat(_349.substr(_348+6));
}else{
if((_348=_349.indexOf("rv:"))!=-1){
AjxEnv.mozVersion=parseFloat(_349.substr(_348+3));
AjxEnv.browserVersion=AjxEnv.mozVersion;
}else{
if((_348=_349.indexOf("firefox/"))!=-1){
AjxEnv.isFirefox=true;
AjxEnv.browserVersion=parseFloat(_349.substr(_348+8));
}else{
if((_348=_349.indexOf("netscape6/"))!=-1){
AjxEnv.trueNs=true;
AjxEnv.browserVersion=parseFloat(_349.substr(_348+10));
}else{
if((_348=_349.indexOf("netscape/"))!=-1){
AjxEnv.trueNs=true;
AjxEnv.browserVersion=parseFloat(_349.substr(_348+9));
}else{
if((_348=_349.indexOf("safari/"))!=-1){
AjxEnv.isSafari=true;
AjxEnv.browserVersion=parseFloat(_349.substr(_348+7));
}else{
if(_349.indexOf("windows")!=-1){
AjxEnv.isWindows=true;
}else{
if((_349.indexOf("macintosh")!=-1)||(_349.indexOf("mac_")!=-1)){
AjxEnv.isMac=true;
}else{
if(_349.indexOf("linux")!=-1){
AjxEnv.isLinux=true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
AjxEnv.isNav=(_34d&&!_34a&&!_34e&&!AjxEnv.isOpera&&!_34b&&!_34c&&!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.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);
}
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;
};
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 AjxImg(){
}
AjxImg.prototype=new Object;
AjxImg.prototype.constructor=null;
AjxImg.ICON=1;
AjxImg.HORIZ_BORDER=2;
AjxImg.VERT_BORDER=3;
AjxImg.BACKGROUND=4;
AjxImg._VIEWPORT_ID="AjxImg_VP";
AjxImg.setImage=function(_352,_353,_354,_355){
var _356=AjxImg.getClassForImage(_353);
if(_355){
_352.className=_356;
}else{
if(_352.firstChild==null){
_352.innerHTML=_356?["<div class='",_356,"'></div>"].join(""):"<div></div>";
}else{
_352.firstChild.className=_356;
}
}
};
AjxImg.getClassForImage=function(_357){
return "Img"+_357;
};
AjxImg.getImageClass=function(_358){
return _358.firstChild?_358.firstChild.className:_358.className;
};
AjxImg.getImageElement=function(_359){
return _359.firstChild?_359.firstChild:_359;
};
AjxImg.getParentElement=function(_35a){
return _35a.parentNode;
};
AjxImg.getImageHtml=function(_35b,_35c,_35d,_35e){
_35d=(!_35d)?"":_35d;
var _35f=AjxImg.getClassForImage(_35b);
_35c=_35c?"style='"+_35c+"' ":"";
var pre=_35e?"<table style='display:inline' cellpadding=0 cellspacing=0 border=0><tr><td align=center valign=bottom>":"";
var post=_35e?"</td></tr></table>":"";
if(_35f){
return [pre,"<div class='",_35f,"' ",_35c," ",_35d,"></div>",post].join("");
}
return [pre,"<div ",_35c," ",_35d,"></div>",post].join("");
};
function AjxException(msg,code,_364,_365){
if(arguments.length==0){
return;
}
this.msg=msg;
this.code=code;
this.method=_364;
this.detail=_365;
}
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 AjxCallback(obj,func,args){
if(arguments.length==0){
return;
}
this.obj=obj;
this.func=func;
this._args=args;
}
AjxCallback.prototype.toString=function(){
return "AjxCallback";
};
AjxCallback.prototype.run=function(args){
var _36a;
if(this._args!=undefined&&args!=undefined){
_36a=new Array();
if(this._args instanceof Array){
for(var i=0;i<this._args.length;i++){
_36a.push(this._args[i]);
}
}else{
_36a.push(this._args);
}
if(args instanceof Array){
for(var i=0;i<args.length;i++){
_36a.push(args[i]);
}
}else{
_36a.push(args);
}
}else{
_36a=args?args:this._args;
}
if(this.obj){
return this.func.call(this.obj,_36a);
}else{
return this.func(_36a);
}
};
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=new Object();
AjxTimedAction._nextActionId=0;
AjxTimedAction.scheduleAction=function(_36f,_370){
if(_36f._tid){
AjxTimedAction.cancelAction(_36f._id);
}
var id=_36f._id=AjxTimedAction._nextActionId++;
AjxTimedAction._pendingActions[id]=_36f;
var _372="AjxTimedAction._exec("+id+")";
_36f._tid=window.setTimeout(_372,_370?_370:0);
return _36f._id;
};
AjxTimedAction.cancelAction=function(_373){
var _374=AjxTimedAction._pendingActions[_373];
if(_374){
window.clearTimeout(_374._tid);
delete AjxTimedAction._pendingActions[_373];
delete _374._tid;
}
};
AjxTimedAction._exec=function(_375){
var _376=AjxTimedAction._pendingActions[_375];
delete AjxTimedAction._pendingActions[_375];
delete _376._tid;
_376.run();
};
function AjxEvent(){
}
AjxEvent.prototype.toString=function(){
return "AjxEvent";
};
function AjxEventMgr(){
this._listeners=new Object();
}
AjxEventMgr.prototype.toString=function(){
return "AjxEventMgr";
};
AjxEventMgr.prototype.addListener=function(_377,_378){
var lv=this._listeners[_377];
if(lv==null){
lv=this._listeners[_377]=new AjxVector();
}
if(!lv.contains(_378)){
if(this._notifyingListeners){
lv=this._listeners[_377]=lv.clone();
}
lv.add(_378);
return true;
}
return false;
};
AjxEventMgr.prototype.notifyListeners=function(_37a,_37b){
this._notifyingListeners=true;
var lv=this._listeners[_37a];
if(lv!=null){
var a=lv.getArray();
var s=lv.size();
var _37f=null;
var c=null;
for(var i=0;i<s;i++){
c=a[i];
_37f=c.handleEvent?c.handleEvent(_37b):c(_37b);
if(_37f===false){
break;
}
}
}
this._notifyingListeners=false;
};
AjxEventMgr.prototype.isListenerRegistered=function(_382){
var lv=this._listeners[_382];
return (lv!=null&&lv.size()>0);
};
AjxEventMgr.prototype.removeListener=function(_384,_385){
var lv=this._listeners[_384];
if(lv!=null){
if(this._notifyingListeners){
lv=this._listeners[_384]=lv.clone();
}
lv.remove(_385);
return true;
}
return false;
};
AjxEventMgr.prototype.removeAll=function(_387){
var lv=this._listeners[_387];
if(lv!=null){
if(this._notifyingListeners){
lv=this._listeners[_387]=lv.clone();
}
lv.removeAll();
return true;
}
return false;
};
function AjxListener(obj,_38a){
AjxCallback.call(this,obj,_38a);
}
AjxListener.prototype=AjxCallback;
AjxListener.prototype.constructor=AjxListener;
AjxListener.prototype.toString=function(){
return "AjxListener";
};
AjxListener.prototype.handleEvent=function(ev){
return AjxCallback.prototype.run.call(this,ev);
};
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._12hour="12";
AjxDateUtil._24hour="24";
AjxDateUtil._init=function(){
AjxDateUtil._dateFormat=AjxDateFormat.getDateInstance(AjxDateFormat.SHORT).clone();
var _38c=AjxDateUtil._dateFormat.getSegments();
for(var i=0;i<_38c.length;i++){
if(_38c[i] instanceof AjxDateFormat.YearSegment){
_38c[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.roll=function(date,_398,_399){
var d=date.getDate();
if(_398==AjxDateUtil.MONTH){
date.setDate(1);
date.setMonth(date.getMonth()+_399);
var max=AjxDateUtil.daysInMonth(date.getFullYear(),date.getMonth());
date.setDate(Math.min(d,max));
}else{
if(_398==AjxDateUtil.YEAR){
date.setDate(1);
date.setFullYear(date.getFullYear()+_399);
var max=AjxDateUtil.daysInMonth(date.getFullYear(),date.getMonth());
date.setDate(Math.min(d,max));
}else{
if(_398==AjxDateUtil.WEEK){
date.setDate(date.getDate()+7*_399);
}else{
if(_398==AjxDateUtil.DAY){
date.setDate(date.getDate()+_399);
}else{
return date;
}
}
}
}
return date;
};
AjxDateUtil.computeDateDelta=function(_39c){
var _39d=(new Date()).getTime()-_39c;
if(_39d<0){
return null;
}
var _39e=Math.floor(_39d/(AjxDateUtil.MSEC_PER_DAY*365));
if(_39e!=0){
_39d-=_39e*AjxDateUtil.MSEC_PER_DAY*365;
}
var _39f=Math.floor(_39d/(AjxDateUtil.MSEC_PER_DAY*30.42));
if(_39f>0){
_39d-=Math.floor(_39f*AjxDateUtil.MSEC_PER_DAY*30.42);
}
var days=Math.floor(_39d/AjxDateUtil.MSEC_PER_DAY);
if(days>0){
_39d-=days*AjxDateUtil.MSEC_PER_DAY;
}
var _3a1=Math.floor(_39d/AjxDateUtil.MSEC_PER_HOUR);
if(_3a1>0){
_39d-=_3a1*AjxDateUtil.MSEC_PER_HOUR;
}
var mins=Math.floor(_39d/60000);
if(mins>0){
_39d-=mins*60000;
}
var secs=Math.floor(_39d/1000);
var _3a4="";
if(_39e>0){
_3a4=_39e+" ";
_3a4+=(_39e>1)?AjxMsg.years:AjxMsg.year;
if(_39e<=3&&_39f>0){
_3a4+=" "+_39f;
_3a4+=" "+((_39f>1)?AjxMsg.months:AjxMsg.months);
}
}else{
if(_39f>0){
_3a4=_39f+" ";
_3a4+=(_39f>1)?AjxMsg.months:AjxMsg.month;
if(_39f<=3&&days>0){
_3a4+=" "+days;
_3a4+=" "+((days>1)?AjxMsg.days:AjxMsg.day);
}
}else{
if(days>0){
_3a4=days+" ";
_3a4+=(days>1)?AjxMsg.days:AjxMsg.day;
if(days<=2&&_3a1>0){
_3a4+=" "+_3a1;
_3a4+=" "+((_3a1>1)?AjxMsg.hours:AjxMsg.hour);
}
}else{
if(_3a1>0){
_3a4=_3a1+" ";
_3a4+=(_3a1>1)?AjxMsg.hours:AjxMsg.hour;
if(_3a1<5&&mins>0){
_3a4+=" "+mins;
_3a4+=" "+((mins>1)?AjxMsg.minutes:AjxMsg.minute);
}
}else{
if(mins>0){
_3a4=mins+" ";
_3a4+=((mins>1)?AjxMsg.minutes:AjxMsg.minute);
if(mins<5&&secs>0){
_3a4+=" "+secs;
_3a4+=" "+((secs>1)?AjxMsg.seconds:AjxMsg.second);
}
}else{
_3a4=secs;
_3a4+=" "+((secs>1)?AjxMsg.seconds:AjxMsg.second);
}
}
}
}
}
_3a4+=" "+AjxMsg.ago;
return _3a4;
};
AjxDateUtil.simpleComputeDateStr=function(date,_3a6){
var _3a7=AjxDateUtil._dateFormat.format(date);
return _3a6?_3a6+_3a7:_3a7;
};
AjxDateUtil.simpleParseDateStr=function(_3a8){
return AjxDateUtil._dateFormat.parse(_3a8);
};
AjxDateUtil.simpleComputeDateTimeStr=function(date,_3aa){
var _3ab=AjxDateUtil._dateTimeFormat.format(date);
return _3aa?_3aa+_3ab:_3ab;
};
AjxDateUtil.simpleParseDateTimeStr=function(_3ac){
return AjxDateUtil._dateTimeFormat.parse(_3ac);
};
AjxDateUtil.longComputeDateStr=function(date){
var _3ae=AjxDateFormat.getDateInstance(AjxDateFormat.FULL);
return _3ae.format(date);
};
AjxDateUtil.computeDateStr=function(now,_3b0){
if(_3b0==null){
return "";
}
var date=new Date(_3b0);
if(now.getTime()-_3b0<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 _3b3=AjxDateFormat.getTimeInstance(AjxDateFormat.SHORT);
return _3b3.format(date);
};
AjxDateUtil._getHoursStr=function(date,pad,_3b6){
var _3b7=date.getHours();
if(!_3b6){
_3b7%=12;
if(_3b7==0){
_3b7=12;
}
}
return pad?AjxDateUtil._pad(_3b7):_3b7;
};
AjxDateUtil._getMinutesStr=function(date){
return AjxDateUtil._pad(date.getMinutes());
};
AjxDateUtil._getSecondsStr=function(date){
return AjxDateUtil._pad(date.getSeconds());
};
AjxDateUtil._getAMPM=function(date,_3bb){
var _3bc=date.getHours();
return (_3bc<12)?(_3bb?"AM":"am"):(_3bb?"PM":"pm");
};
AjxDateUtil._getMonthName=function(date,_3be){
return _3be?AjxDateUtil.MONTH_MEDIUM[date.getMonth()]:AjxDateUtil.MONTH_LONG[date.getMonth()];
};
AjxDateUtil._getMonth=function(date,pad){
var _3c1=date.getMonth()+1;
if(pad){
return AjxDateUtil._pad(_3c1);
}else{
return _3c1;
}
};
AjxDateUtil._getDate=function(date,pad){
var _3c4=date.getDate();
return pad==true?AjxDateUtil._pad(_3c4):_3c4;
};
AjxDateUtil._getWeekday=function(date){
var _3c6=date.getDay();
return AjxDateUtil.WEEKDAY_LONG[_3c6];
};
AjxDateUtil._getFullYear=function(date){
return date.getFullYear();
};
AjxDateUtil.getTimeStr=function(date,_3c9){
var s=_3c9;
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,_3cc){
var mins=date.getMinutes();
if(mins!=0&&_3cc){
mins=(Math.ceil((mins/_3cc)))*_3cc;
}
return mins;
};
AjxDateUtil.roundTimeMins=function(date,_3cf){
var mins=date.getMinutes();
var _3d1=date.getHours();
if(mins!=0&&_3cf){
mins=(Math.ceil((mins/_3cf)))*_3cf;
if(mins==60){
mins=0;
_3d1++;
}
date.setMinutes(mins);
date.setHours(_3d1);
}
return date;
};
AjxDateUtil.isInRange=function(_3d2,_3d3,_3d4,_3d5){
return (_3d2<_3d5&&_3d3>_3d4);
};
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,_3d8){
var _3d9=date;
var _3da=null;
if(_3d8){
if(!AjxDateUtil._serverDateTimeFormatterUTC){
AjxDateUtil._serverDateTimeFormatterUTC=new AjxDateFormat("yyyyMMdd'T'HHmmss'Z'");
}
_3da=AjxDateUtil._serverDateTimeFormatterUTC;
_3d9=new Date(date.getTime());
_3d9.setMinutes(_3d9.getMinutes()+_3d9.getTimezoneOffset());
}else{
if(!AjxDateUtil._serverDateTimeFormatter){
AjxDateUtil._serverDateTimeFormatter=new AjxDateFormat("yyyyMMdd'T'HHmmss");
}
_3da=AjxDateUtil._serverDateTimeFormatter;
}
return _3da.format(_3d9);
};
AjxDateUtil.parseServerTime=function(_3db,date){
if(_3db.charAt(8)=="T"){
var hh=parseInt(_3db.substr(9,2),10);
var mm=parseInt(_3db.substr(11,2),10);
var ss=parseInt(_3db.substr(13,2),10);
if(_3db.charAt(15)=="Z"){
mm+=AjxTimezone.getOffset(AjxTimezone.DEFAULT,date);
}
date.setHours(hh,mm,ss,0);
}
return date;
};
AjxDateUtil.parseServerDateTime=function(_3e0){
if(_3e0==null){
return null;
}
var d=new Date();
var yyyy=parseInt(_3e0.substr(0,4),10);
var MM=parseInt(_3e0.substr(4,2),10);
var dd=parseInt(_3e0.substr(6,2),10);
d.setFullYear(yyyy);
d.setMonth(MM-1);
d.setMonth(MM-1);
d.setDate(dd);
AjxDateUtil.parseServerTime(_3e0,d);
return d;
};
AjxDateUtil._pad=function(n){
return n<10?("0"+n):n;
};
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,_3e8,_3e9){
if(!str){
return "";
}
var _3ea=AjxStringUtil.TRIM_RE;
var _3eb=AjxStringUtil.COMPRESS_RE;
if(_3e9){
_3ea=new RegExp("^"+_3e9+"+|"+_3e9+"+$","g");
_3eb=new RegExp(_3e9+"+","g");
}else{
_3e9=" ";
}
str=str.replace(_3ea,"");
if(_3e8){
str=str.replace(_3eb,_3e9);
}
return str;
};
AjxStringUtil.repeat=function(str,num){
var text="";
for(var i=0;i<num;i++){
text+=str;
}
return text;
};
AjxStringUtil.getUnitsFromSizeString=function(_3f0){
var _3f1="px";
if(typeof (_3f0)=="string"){
var _3f2=Number(parseInt(_3f0)).toString();
if(_3f0.length>_3f2.length){
_3f1=_3f0.substr(_3f2.length,(_3f0.length-_3f2.length));
if(!(_3f1=="em"||_3f1=="ex"||_3f1=="px"||_3f1=="in"||_3f1=="cm"==_3f1=="mm"||_3f1=="pt"||_3f1=="pc"||_3f1=="%")){
_3f1="px";
}
}
}
return _3f1;
};
AjxStringUtil.split=function(str,dels){
if(!str){
return new Array();
}
dels=dels?dels:",";
var _3f5=new Object;
if(typeof dels=="string"){
_3f5[dels]=1;
}else{
for(var i=0;i<dels.length;i++){
_3f5[dels[i]]=1;
}
}
var q=false;
var p=0;
var _3f9=0;
var _3fa;
var _3fb=new Array();
var j=0;
for(var 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(_3f5[c]){
if(!q&&!p){
_3fa=str.substring(_3f9,i);
_3fb[j++]=_3fa;
_3f9=i+1;
}
}
}
}
}
}
_3fa=str.substring(_3f9,str.length);
_3fb[j++]=_3fa;
return _3fb;
};
AjxStringUtil.wordWrap=function(text,len,pre,eol,_402,_403){
if(!text){
return "";
}
len=len?len:80;
eol=eol?eol:"\n";
pre=pre?pre:"";
len-=pre.length;
var _404=new Array();
var c=0;
text=AjxStringUtil.trim(text,false);
text=text.replace(/[ \t]+\n/g,"\n");
if(_403){
text=text.replace(/\b\n\b/g," ");
}
var _406=text.length;
for(var i=0,bk=0,sp=-1;i<_406;i++){
var ch=text.charAt(i);
if(ch.match(/[ \t]/)){
sp=i;
}
if(ch=="\n"){
_404[c++]=pre+text.substring(bk,i);
bk=i+1;
sp=-1;
}
if(i-bk>=len){
if(sp==-1){
if(_402){
_404[c++]=pre+text.substring(bk,i);
bk=i;
sp=-1;
}
}else{
_404[c++]=pre+text.substring(bk,sp);
bk=sp+1;
sp=-1;
}
}
}
if(i>bk){
_404[c++]=pre+text.substring(bk,i);
}
return _404.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(_409){
return AjxStringUtil.IS_PRINT_CODE[_409];
};
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(_40a,_40b){
return _40b?AjxStringUtil.SHIFT_CHAR[_40a]||String.fromCharCode(_40a):String.fromCharCode(_40a);
};
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,_411){
return AjxMessageFormat.format(str,_411);
};
AjxStringUtil.urlEncode=function(str){
if(!str){
return "";
}
return escape(str.replace(/ /g,"+")).replace(/[+]/g,"%2B");
};
AjxStringUtil.ENCODE_MAP={">":"&gt;","<":"&lt;","&":"&amp;"};
AjxStringUtil.htmlEncode=function(str,_414){
if(!str){
return "";
}
if(!AjxEnv.isSafari){
if(_414){
return str.replace(/[<>&]/g,function(_415){
return AjxStringUtil.ENCODE_MAP[_415];
}).replace(/  /g," &nbsp;");
}else{
return str.replace(/[<>&]/g,function(_416){
return AjxStringUtil.ENCODE_MAP[_416];
});
}
}else{
if(_414){
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(_419){
return AjxStringUtil.SPACE_ENCODE_MAP[_419];
});
}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/g,"<pre style='display:inline;'>\t</pre>").replace(/\n/g,"<br>");
};
AjxStringUtil.xmlEncode=function(str){
return str?str.replace(/&/g,"&amp;").replace(/</g,"&lt;"):"";
};
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");
};
var 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(_420,_421,_422){
var _423=AjxStringUtil.calcDIV();
if(arguments.length==3){
_423.className=_422;
}
_423.innerHTML=_420;
if(_423.offsetWidth<=_421){
return _420;
}
for(var i=_420.length-1;i>0;i--){
var _425=_420.substr(0,i);
_423.innerHTML=_425+AjxStringUtil.ELLIPSIS;
if(_423.offsetWidth<=_421){
return _425+AjxStringUtil.ELLIPSIS;
}
}
return _420;
};
AjxStringUtil.wrap=function(_426,_427,_428){
var _429=AjxStringUtil.calcDIV();
if(arguments.length==3){
_429.className=_428;
}
var _42a="";
var _42b="";
textRows=_426.split("/n");
for(var _42c=0;_42c<textRows.length;_42c++){
if(_42c!=0){
_42a+=_42b+"<br>";
_42b="";
}
htmlRows=textRows[_42c].split("<br>");
for(var _42d=0;_42d<htmlRows.length;_42d++){
if(_42d!=0){
_42a+=_42b+"<br>";
_42b="";
}
words=htmlRows[_42d].split(" ");
var _42e=0;
while(_42e<words.length){
_429.innerHTML=_42b+" "+words[_42e];
var _42f=_429.offsetWidth;
if(_42f>_427){
_429.innerHTML=words[_42e];
_42f=_42f-_429.offsetWidth;
if((_42f>=_427)||(_429.offsetWidth<=_427)){
_42a+=_42b+"<br>";
_42b="";
}else{
var _430=true;
var _431=0;
while(_430){
_431++;
_429.innerHTML=_42b+" "+words[_42e].substring(0,_431);
_430=(_429.offsetWidth<=_427);
}
_431--;
_42a+=_42b+words[_42e].substring(0,_431)+"<br>";
words[_42e]=words[_42e].substr(_431);
_42b="";
}
}else{
_42b+=" "+words[_42e];
_42e++;
}
}
}
}
_42a+=_42b;
return _42a;
};
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 _434=text.split(eol);
var len=_434.length;
var i=0,start=0;
var _437=new Array();
var _438=false;
while(i<len){
var _439=_438;
var skip=AjxStringUtil._linesToSkip(_434,i);
_438=(skip>0);
if(_439&&!_438){
start=i;
}else{
if(!_439&&_438&&i>start){
_437.push(AjxStringUtil._trimBlankLines(_434.slice(start,i).join(eol),eol)+eol);
}
}
i+=_438?skip:1;
}
if(!_438&&i>start){
_437.push(AjxStringUtil._trimBlankLines(_434.slice(start,i).join(eol),eol)+eol);
}
return _437;
};
AjxStringUtil._linesToSkip=function(_43b,i){
var len=_43b.length;
var skip=0;
var _43f=i;
if(AjxStringUtil.MSG_SEP_RE.test(_43b[i])){
skip=len-i;
}else{
if(AjxStringUtil.SIG_RE.test(_43b[i])){
skip=len-i;
}else{
if(AjxStringUtil.PREFIX_RE.test(_43b[i])){
while(i<_43b.length&&(AjxStringUtil.PREFIX_RE.test(_43b[i])||AjxStringUtil.BLANK_RE.test(_43b[i]))){
i++;
}
skip=i-_43f;
}else{
if(AjxStringUtil.COLON_RE.test(_43b[i])){
var idx=AjxStringUtil._nextNonBlankLineIndex(_43b,i+1);
var _441=(idx!=-1)?_43b[idx]:null;
if(_441&&AjxStringUtil.PREFIX_RE.test(_441)){
skip=idx-i;
}else{
if(idx!=-1){
idx=AjxStringUtil._nextNonBlankLineIndex(_43b,idx+1);
}
var _442=(idx!=-1)?_43b[idx]:null;
if(_442&&AjxStringUtil.BRACKET_RE.test(_441)&&AjxStringUtil.PREFIX_RE.test(_442)){
skip=idx-i;
}
}
}else{
if(AjxStringUtil.LINE_RE.test(_43b[i])){
var idx=AjxStringUtil._nextNonBlankLineIndex(_43b,i+1);
var _441=(idx!=-1)?_43b[idx]:null;
if(_441&&AjxStringUtil.HDR_RE.test(_441)){
skip=len-i;
}
}
}
}
}
}
return skip;
};
AjxStringUtil._nextNonBlankLineIndex=function(_443,i){
while(i<_443.length&&AjxStringUtil.BLANK_RE.test(_443[i])){
i++;
}
return ((i<_443.length)?i:-1);
};
AjxStringUtil._trimBlankLines=function(text,eol){
eol=eol?eol:"\n";
var _447=text.split(eol);
var len=_447.length;
var i=0;
while(i<len&&AjxStringUtil.BLANK_RE.test(_447[i])){
i++;
}
var j=len;
while(j>0&&AjxStringUtil.BLANK_RE.test(_447[j-1])){
j--;
}
if(i!=0||j!=len){
text=_447.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(_44b){
if(!_44b){
return null;
}
var text=new Array();
var idx=0;
var ctxt=new Object();
this._traverse(_44b,text,idx,AjxStringUtil._NO_LIST,0,0,ctxt);
var _44f=text.join("");
return _44f;
};
AjxStringUtil._traverse=function(el,text,idx,_453,_454,_455,ctxt){
var _457=el.nodeName.toLowerCase();
if(_457=="#text"){
if(el.nodeValue.search(AjxStringUtil._NON_WHITESPACE)!=-1){
if(ctxt.lastNode=="ol"||ctxt.lastNode=="ul"){
text[idx++]="\n";
}
text[idx++]=AjxStringUtil.trim(el.nodeValue.replace(AjxStringUtil._LF," "),true)+" ";
}
}else{
if(_457=="p"){
text[idx++]="\n\n";
}else{
if(_453==AjxStringUtil._NO_LIST&&(_457=="br"||_457=="hr")){
text[idx++]="\n";
}else{
if(_457=="ol"||_457=="ul"){
text[idx++]="\n";
if(el.parentNode.nodeName.toLowerCase()!="li"&&ctxt.lastNode!="br"&&ctxt.lastNode!="hr"){
text[idx++]="\n";
}
_453=(_457=="ol")?AjxStringUtil._ORDERED_LIST:AjxStringUtil._UNORDERED_LIST;
_454++;
_455=0;
}else{
if(_457=="li"){
for(var i=0;i<_454;i++){
text[idx++]=AjxStringUtil._INDENT;
}
if(_453==AjxStringUtil._ORDERED_LIST){
text[idx++]=_455+". ";
}else{
text[idx++]="\u2022 ";
}
}else{
if(_457=="img"){
if(el.alt&&el.alt!=""){
text[idx++]=el.alt;
}
}else{
if(_457=="tr"&&el.parentNode.firstChild!=el){
text[idx++]="\n";
}else{
if(_457=="td"&&el.parentNode.firstChild!=el){
text[idx++]="\t";
}else{
if(_457=="div"){
text[idx++]="\n";
}else{
if(_457=="#comment"||_457=="script"||_457=="select"||_457=="style"){
return idx;
}
}
}
}
}
}
}
}
}
}
var _459=el.childNodes;
var len=_459.length;
for(var i=0;i<len;i++){
if(_457=="ol"){
_455++;
}
idx=this._traverse(_459[i],text,idx,_453,_454,_455,ctxt);
}
if(_457=="h1"||_457=="h2"||_457=="h3"||_457=="h4"||_457=="h5"||_457=="h6"){
text[idx++]="\n";
ctxt.list=false;
}else{
if(_457=="li"){
if(!ctxt.list){
text[idx++]="\n";
}
ctxt.list=false;
}else{
if(_457=="ol"||_457=="ul"){
ctxt.list=true;
}else{
if(_457!="#text"){
ctxt.list=false;
}
}
}
}
ctxt.lastNode=_457;
return idx;
};
function AjxVector(){
this._array=new Array();
}
AjxVector.prototype.toString=function(sep,_45c){
if(_45c!==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,_463){
if(_463==null||_463<0||_463>=this._array.length){
this._array.push(obj);
}else{
this._array.splice(_463,0,obj);
}
};
AjxVector.prototype.addList=function(list){
if(!list){
return;
}
if((list instanceof Array)&&list.length){
this._array=this._array.concat(list);
}else{
if((list instanceof AjxVector)&&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(_467){
if(_467>=this._array.length||_467<0){
return null;
}
var _468=this._array.splice(_467,1);
var ret=null;
if(_468){
ret=_468[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(_46b,_46c){
var _46d=this._array[_46b];
this._array[_46b]=_46c;
return _46d;
};
AjxVector.prototype.indexOf=function(obj){
for(var i=0;i<this._array.length;i++){
if(this._array[i]==obj){
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,_474){
var _475=_474.call(obj);
for(var i=0;i<this._array.length;i++){
var test=_474.call(this._array[i]);
if(test==_475){
return true;
}
}
return false;
};
AjxVector.prototype.get=function(_478){
return _478>=this._array.length||_478<0?null:this._array[_478];
};
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.sort=function(_479){
if(!_479){
_479=AjxVector._defaultArrayComparator;
}
this._array.sort(_479);
};
AjxVector.prototype.binarySearch=function(_47a,_47b){
if(!_47b){
_47b=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 _480=_47b(_47a,arr[i]);
if(_480<0){
u=i-1;
}else{
if(_480>0){
l=i+1;
}else{
return i;
}
}
}
};
AjxVector.prototype.merge=function(_481,list){
if(_481<0){
return;
}
var _483=list instanceof AjxVector?list.getArray():list;
var _484=this._array.length<(_481+_483.length)?this._array.length:_481+_483.length;
if(_481<this._array.length){
var _485=0;
for(var i=_481;i<_484;i++){
this._array[i]=_483[_485++];
}
if(_485<_483.length){
this._array=this._array.concat(_483.slice(_485));
}
}else{
this._array=this._array.concat(_483);
}
};
AjxVector._defaultArrayComparator=function(a,b){
return a<b?-1:(a>b?1:0);
};
AjxSelectionManager=function(_489){
this._owner=_489;
};
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 _48a=this.getItems();
if(_48a.length>0){
this._anchor=_48a[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,_490){
this._setAnchorAndCursor(item,_490);
var _491=this._selectedItems;
var _492=(_491==null)?0:_491.length;
this._selectedItems=null;
this._selectedItems=this._createItemsCollection();
var _493=this._owner.getItemCount();
var _494=false;
var _495=false;
var _496=false;
for(var i=0;i<_493;++i){
var _498=this._owner.getItem(i);
var _499=this._isItemOldSelection(_498,_491);
var _49a=_499;
switch(_490){
case AjxSelectionManager.SELECT_TO_ANCHOR:
if(this._anchor==null){
this._anchor=_498;
}
var _49b=(_498==this._anchor||_498==item);
var _49c=false;
if(!_496&&_49b){
_496=true;
_49c=true;
}
_49a=_496;
if((!_49c||this._anchor==item)&&_496&&_49b){
_496=false;
}
break;
case AjxSelectionManager.SELECT_ONE_CLEAR_OTHERS:
_49a=(_498==item);
break;
case AjxSelectionManager.TOGGLE_ONE_LEAVE_OTHERS:
if(_498==item){
_49a=!_499;
}
break;
case AjxSelectionManager.DESELECT_ALL:
_49a=false;
break;
case AjxSelectionManager.SELECT_ALL:
_49a=true;
break;
}
if(_49a){
this._selectedItems.add(_498);
_494=(this._selectedItems.length>1);
}
if(_49a!=_499){
if(this._owner.itemSelectionChanged!=null){
this._owner.itemSelectionChanged(_498,i,_49a);
}
_495=true;
}
}
_495=_495||(_492!=this._selectedItems.length);
if(_494){
this._selectedItems.sort();
}
if(_495&&this._owner.selectionChanged!=null){
this._owner.selectionChanged(item);
}
};
AjxSelectionManager.prototype.removeItem=function(item){
if(this._selectedItems){
var _49e=this._selectedItems.binarySearch(item);
if(_49e>-1){
this._selectedItems.removeAt(_49e);
}
}
};
AjxSelectionManager.prototype._createItemsCollection=function(){
return new AjxVector();
};
AjxSelectionManager.prototype._isItemOldSelection=function(_49f,_4a0){
var ret=false;
if(_4a0){
var _4a2=_4a0.binarySearch(_49f);
if(_4a2>-1){
_4a0.removeAt(_4a2);
}
ret=(_4a2!=-1);
}
return ret;
};
AjxSelectionManager.prototype._setAnchorAndCursor=function(item,_4a4){
switch(_4a4){
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(_4a5){
this._callback=null;
this._iframeId=_4a5;
}
AjxPost._reqIds=0;
AjxPost._outStandingRequests=new Object();
AjxPost.SC_CONTINUE=100;
AjxPost.SC_OK=200;
AjxPost.SC_ACCEPTED=202;
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(_4a6,form,_4a8){
form.target=this._iframeId;
this._callback=_4a6;
var req=new AjxPostRequest(form);
var _4aa=new AjxTimedAction(this,this._onFailure,[req.id]);
var _4ab=_4a8?_4a8:5000;
AjxPost._outStandingRequests[req.id]=req;
req.send(_4aa,_4ab);
};
AjxPost.prototype._onFailure=function(_4ac){
var req=AjxPost._outStandingRequests[_4ac];
req.cancel();
delete AjxPost._outStandingRequests[_4ac];
if(this._callback){
this._callback.run([404]);
this._callback=null;
}
};
AjxPost.prototype.loaded=function(_4ae,_4af,id){
var req=AjxPost._outStandingRequests[_4af];
if(req&&!req.hasBeenCancelled()){
req.cancelTimeout();
}
delete AjxPost._outStandingRequests[_4af];
if(this._callback){
this._callback.run(_4ae,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(_4b4,_4b5){
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(_4b6){
if(_4b6==null){
_4b6="";
}
return this.buffer.join(_4b6);
};
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,_4ba){
this._cache[key]=_4ba;
};
AjxCache.prototype.get=function(key){
return this._cache[key];
};
AjxCache.prototype.getByProperty=function(prop,_4bd){
var list=new Array();
for(var key in this._cache){
var obj=this._cache[key];
if(obj instanceof Object&&obj[prop]==_4bd){
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,_4c4){
for(var key in this._cache){
var obj=this._cache[key];
if(obj[prop]==_4c4){
this._cache[key]=null;
}
}
};
function DwtImg(){
}
DwtImg.BLANK16=["",16,16];
DwtImg.BLANK16REAL=["Blank_16",16,16];
DwtImg.BLANK9=["",9,9];
DwtImg.CASCADE=["Cascade",16,16];
DwtImg.COLUMN_DOWN=["ColumnDownArrow",8,7];
DwtImg.COLUMN_UP=["ColumnUpArrow",8,7];
DwtImg.CRITICAL=["Critical_32",32,32];
DwtImg.DROP_DOWN=["DropDown",8,8];
DwtImg.DROP_DOWN_DISABLED=["DropDown_D",8,8];
DwtImg.FAST_FWD=["FastFwdArrowSmall",10,9];
DwtImg.FAST_REV=["FastRevArrowSmall",10,9];
DwtImg.FWD=["FwdArrowSmall",6,9];
DwtImg.IMAGE_UNAVAIL=["DataUnavailable"];
DwtImg.INFORMATION=["Information_32",32,32];
DwtImg.MENU_CHECK=["MenuCheck",9,9];
DwtImg.MENU_RADIO=["MenuRadio",9,9];
DwtImg.NODE_COLLAPSED=["NodeCollapsed",16,16];
DwtImg.NODE_EXPANDED=["NodeExpanded",16,16];
DwtImg.REV=["RevArrowSmall",6,9];
DwtImg.SELECT_PULL_DOWN=["SelectPullDownArrow",16,18];
DwtImg.SELECT_PULL_DOWN_DEPRESSED=["SelectPullDownArrowSel",16,18];
DwtImg.SELECT_PULL_DOWN_DISABLED=["SelectPullDownArrowDis",16,18];
DwtImg.SELECT_PULL_DOWN_ENABLED=["SelectPullDownArrowHover",16,18];
DwtImg.SELECT_PULL_UP=["SelectPullUpArrow",16,18];
DwtImg.WARNING=["Warning_32",32,32];
DwtImg.TAB_TOP_LEFT=["tab_TL",10,10];
DwtImg.TAB_TOP_MIDDLE=["tab_T",10,10];
DwtImg.TAB_TOP_RIGHT=["tab_TR",10,10];
DwtImg.TAB_MIDDLE_LEFT=["tab_L",10,10];
DwtImg.TAB_MIDDLE_MIDDLE=["tab_BG",10,10];
DwtImg.TAB_MIDDLE_RIGHT=["tab_R",10,10];
DwtImg.TAB_BOTTOM_LEFT=["tab_BL",10,10];
DwtImg.TAB_BOTTOM_MIDDLE=["tab_B",10,10];
DwtImg.TAB_BOTTOM_RIGHT=["tab_BR",10,10];
DwtImg.TAB_SELECTED_TOP_LEFT=["tab_selected_TL",10,10];
DwtImg.TAB_SELECTED_TOP_MIDDLE=["tab_selected_T",10,10];
DwtImg.TAB_SELECTED_TOP_RIGHT=["tab_selected_TR",10,10];
DwtImg.TAB_SELECTED_MIDDLE_LEFT=["tab_selected_L",10,10];
DwtImg.TAB_SELECTED_MIDDLE_MIDDLE=["tab_selected_BG",10,10];
DwtImg.TAB_SELECTED_MIDDLE_RIGHT=["tab_selected_R",10,10];
DwtImg.TAB_SELECTED_BOTTOM_LEFT=["tab_selected_BL",10,10];
DwtImg.TAB_SELECTED_BOTTOM_MIDDLE=["tab_selected_B",10,10];
DwtImg.TAB_SELECTED_BOTTOM_RIGHT=["tab_selected_BR",10,10];
DwtImg.TAB_ACTIVE_TOP_LEFT=["tab_active_TL",10,10];
DwtImg.TAB_ACTIVE_TOP_MIDDLE=["tab_active_T",10,10];
DwtImg.TAB_ACTIVE_TOP_RIGHT=["tab_active_TR",10,10];
DwtImg.TAB_ACTIVE_MIDDLE_LEFT=["tab_active_L",10,10];
DwtImg.TAB_ACTIVE_MIDDLE_MIDDLE=["tab_active_BG",10,10];
DwtImg.TAB_ACTIVE_MIDDLE_RIGHT=["tab_active_R",10,10];
DwtImg.TAB_ACTIVE_BOTTOM_LEFT=["tab_active_BL",10,10];
DwtImg.TAB_ACTIVE_BOTTOM_MIDDLE=["tab_active_B",10,10];
DwtImg.TAB_ACTIVE_BOTTOM_RIGHT=["tab_active_BR",10,10];
DwtImg.TAB_DISABLED_TOP_LEFT=["tab_disabled_TL",10,10];
DwtImg.TAB_DISABLED_TOP_MIDDLE=["tab_disabled_T",10,10];
DwtImg.TAB_DISABLED_TOP_RIGHT=["tab_disabled_TR",10,10];
DwtImg.TAB_DISABLED_MIDDLE_LEFT=["tab_disabled_L",10,10];
DwtImg.TAB_DISABLED_MIDDLE_MIDDLE=["tab_disabled_BG",10,10];
DwtImg.TAB_DISABLED_MIDDLE_RIGHT=["tab_disabled_R",10,10];
DwtImg.TAB_DISABLED_BOTTOM_LEFT=["tab_disabled_BL",10,10];
DwtImg.TAB_DISABLED_BOTTOM_MIDDLE=["tab_disabled_B",10,10];
DwtImg.TAB_DISABLED_BOTTOM_RIGHT=["tab_disabled_BR",10,10];
DwtImg.TAB_SPACER=["tab_spacer",10,10];
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.LEFT=100;
Dwt.RIGHT=101;
Dwt.TOP=102;
Dwt.BOTTOM=103;
Dwt.ABOVE=104;
Dwt.BELOW=105;
Dwt.WIDTH=106;
Dwt.HEIGHT=107;
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.Z_INC=1;
Dwt.DEFAULT=-123456789;
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._nextId=1;
Dwt.getDomObj=function(doc,id){
alert("DEPRACATED: Please use document.getElementById instead");
};
Dwt.getNextId=function(){
return "DWT"+Dwt._nextId++;
};
Dwt.associateElementWithObject=function(_4c9,_4ca){
_4c9.dwtObj=_4ca.__internalId=AjxCore.assignId(_4ca);
};
Dwt.disassociateElementFromObject=function(_4cb,_4cc){
if(_4cb){
delete _4cb.dwtObj;
}
if(_4cc.__internalId){
AjxCore.unassignId(_4cc.__internalId);
}
};
Dwt.getObjectFromElement=function(_4cd){
return AjxCore.objectWithId(_4cd.dwtObj);
};
Dwt.setHandler=function(_4ce,_4cf,func){
if(_4cf==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){
Dwt.clearHandler(_4ce,_4cf);
}
_4ce[_4cf]=func;
if(_4cf==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){
_4ce.addEventListener("DOMMouseScroll",func,true);
}
};
Dwt.clearHandler=function(_4d1,_4d2){
if(_4d2==DwtEvent.ONMOUSEWHEEL&&AjxEnv.isGeckoBased){
if(_4d1[_4d2]){
var func=_4d1[_4d2];
_4d1.removeEventListener("DOMMouseScroll",func,true);
}
}
_4d1[_4d2]=null;
};
Dwt.getBackgroundRepeat=function(_4d4){
return DwtCssStyle.getProperty(_4d4,"background-repeat");
};
Dwt.setBackgroundRepeat=function(_4d5,_4d6){
_4d5.style.backgroundRepeat=_4d6;
};
Dwt.getBounds=function(_4d7,_4d8){
var loc=Dwt.getLocation(_4d7);
var size=Dwt.getSize(_4d7,_4d8);
return new DwtRectangle(loc.x,loc.y,size.x,size.y);
};
Dwt.setBounds=function(_4db,x,y,_4de,_4df){
Dwt.setLocation(_4db,x,y);
Dwt.setSize(_4db,_4de,_4df);
};
Dwt.getCursor=function(_4e0){
return DwtCssStyle.getProperty(_4e0,"cursor");
};
Dwt.setCursor=function(_4e1,_4e2){
_4e1.style.cursor=_4e2;
};
Dwt.getLocation=function(_4e3){
if(_4e3.style.position==Dwt.ABSOLUTE_STYLE){
return new DwtPoint(parseInt(DwtCssStyle.getProperty(_4e3,"left")),parseInt(DwtCssStyle.getProperty(_4e3,"top")));
}else{
return Dwt.toWindow(_4e3,0,0);
}
};
Dwt.setLocation=function(_4e4,x,y){
if(_4e4.style.position!=Dwt.ABSOLUTE_STYLE){
throw new DwtException("Static widgets may not be positioned",DwtException.INVALID_OP,"Dwt.setLocation");
}
if(x=Dwt.checkPxVal(x)){
_4e4.style.left=x;
}
if(y=Dwt.checkPxVal(y)){
_4e4.style.top=y;
}
};
Dwt.checkPxVal=function(val,_4e8){
if(val==Dwt.DEFAULT){
return false;
}
if(_4e8&&val<0&&val!=Dwt.LOC_NOWHERE){
val=0;
}
if(typeof (val)=="number"){
val=val+"px";
}
return val;
};
Dwt.getPosition=function(_4e9){
return _4e9.style.position;
};
Dwt.setPosition=function(_4ea,_4eb){
_4ea.style.position=_4eb;
};
Dwt.getScrollStyle=function(_4ec){
var _4ed=DwtCssStyle.getProperty(_4ec,"overflow");
if(_4ed=="hidden"){
return Dwt.CLIP;
}else{
if(_4ed=="auto"){
return Dwt.SCROLL;
}else{
if(_4ed=="scroll"){
return Dwt.FIXED_SCROLL;
}else{
return Dwt.VISIBLE;
}
}
}
};
Dwt.setScrollStyle=function(_4ee,_4ef){
if(_4ef==Dwt.CLIP){
_4ee.style.overflow="hidden";
}else{
if(_4ef==Dwt.SCROLL){
_4ee.style.overflow="auto";
}else{
if(_4ef==Dwt.FIXED_SCROLL){
_4ee.style.overflow="scroll";
}else{
_4ee.style.overflow="visible";
}
}
}
};
Dwt.getSize=function(_4f0,_4f1){
var p=new DwtPoint(0,0);
if(_4f0.offsetWidth!=null){
p.x=_4f0.offsetWidth;
p.y=_4f0.offsetHeight;
}else{
if(_4f0.clip&&_4f0.clip.width!=null){
p.x=_4f0.clip.width;
p.y=_4f0.clip.height;
}else{
if(_4f0.style&&_4f0.style.pixelWidth!=null){
p.x=_4f0.style.pixelWidth;
p.y=_4f0.style.pixelHeight;
}
}
}
p.x=parseInt(p.x);
p.y=parseInt(p.y);
return p;
};
Dwt.setSize=function(_4f3,_4f4,_4f5){
if(_4f4=Dwt.checkPxVal(_4f4,true)){
_4f3.style.width=_4f4;
}
if(_4f5=Dwt.checkPxVal(_4f5,true)){
_4f3.style.height=_4f5;
}
};
Dwt.getHtmlExtent=function(html){
if(!Dwt._measureDiv){
var _4f7=document.createElement("div");
_4f7.id=this._measureDivId=Dwt.getNextId();
Dwt.setPosition(_4f7,Dwt.ABSOLUTE_STYLE);
Dwt.setLocation(_4f7,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
document.body.appendChild(_4f7);
Dwt._measureDiv=_4f7;
}
Dwt._measureDiv.innerHTML=html;
return Dwt.getSize(Dwt._measureDiv);
};
Dwt.getAttr=function(_4f8,attr,_4fa){
if(!_4fa){
return _4f8&&_4f8.tagName?(_4f8.getAttribute(attr)||_4f8[attr]):null;
}else{
while(_4f8){
if(Dwt.getAttr(_4f8,attr)!=null){
return _4f8;
}
_4f8=_4f8.parentNode;
}
return null;
}
};
Dwt.getVisible=function(_4fb){
var disp=DwtCssStyle.getProperty(_4fb,"display");
return (disp!=Dwt.DISPLAY_NONE);
};
Dwt.setVisible=function(_4fd,_4fe){
_4fd.style.display=_4fe?Dwt.DISPLAY_BLOCK:Dwt.DISPLAY_NONE;
};
Dwt.getVisibility=function(_4ff){
var vis=DwtCssStyle.getProperty(_4ff,"visibility");
return (vis=="visible");
};
Dwt.setVisibility=function(_501,_502){
_501.style.visibility=_502?"visible":"hidden";
};
Dwt.setOpacity=function(_503,_504){
if(AjxEnv.isIE){
_503.style.filter="alpha(opacity="+_504+")";
}else{
_503.style.opacity=_504/100;
}
};
Dwt.getZIndex=function(_505){
return DwtCssStyle.getProperty(_505,"z-index");
};
Dwt.setZIndex=function(_506,idx){
_506.style.zIndex=idx;
};
Dwt.getDisplay=function(_508){
DwtCssStyle.getProperty(_508,"display");
};
Dwt.setDisplay=function(_509,_50a){
_509.style.display=_50a;
};
Dwt.getWindowSize=function(){
var p=new DwtPoint(0,0);
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(_50c,x,y,_50f,_510){
var p=new DwtPoint(x,y);
var _512=_50c;
while(_512&&_512!=_50f){
p.x+=_512.offsetLeft;
p.y+=_512.offsetTop;
if(!_510){
if(_512.scrollTop){
p.y-=_512.scrollTop;
}
var _513=_512.parentNode;
while(_513!=_512.offsetParent&&_513!=_50f){
if(_513.scrollTop){
p.y-=_513.scrollTop;
}
_513=_513.parentNode;
}
}
_512=_512.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(_516){
if(_516){
return AjxEnv.isIE?_516.contentWindow.document:_516.contentDocument;
}
return null;
};
Dwt.getIframeWindow=function(_517){
return _517.contentWindow;
};
Dwt._ffOverflowHack=function(_518,_519,_51a,_51b,_51c){
if(!AjxEnv.isNav){
return;
}
var ds=_51c?_51c:false;
var _51e=_51a?_51a:-100;
var coll=document.getElementsByTagName("div");
var temp=null;
var len=coll.length;
var _522=-1;
for(var i=0;i<len;++i){
temp=coll[i];
if(temp.id==_518){
temp=coll[++i];
while(i<len&&temp.style.zIndex==""){
if(temp._oldOverflow&&_51b){
temp.style.overflow=temp._oldOverflow;
delete temp._oldOverflow;
}else{
if(ds){
temp._oldOverflow=temp.style.overflow;
temp.style.overflow="hidden";
}
}
temp=coll[++i];
}
if(i==len){
break;
}
}
var _524=parseInt(temp.style.zIndex);
if(isNaN(_524)){
_524=_522;
}else{
_522=_524;
}
if(_524<_519&&_524>=_51e){
switch(_51b){
case true:
if(!temp._oldOverflow){
var _525=window.getComputedStyle(temp,"");
var _526=_525.getPropertyValue("overflow");
if(AjxEnv.isFirefox1_5up&&_526=="0px"){
var _527=_525.getPropertyValue("overflow-x");
_526=_527=="hidden"?"-moz-scrollbars-vertical":"-moz-scrollbars-horizontal";
}
if(_526!="hidden"){
temp._oldOverflow=_526;
temp._oldScrollTop=temp.scrollTop;
temp.style.overflow="visible";
}
}
break;
case false:
if(temp._oldOverflow){
temp.style.overflow=temp._oldOverflow;
delete temp._oldOverflow;
}
if(temp._oldScrollTop!=null){
temp.scrollTop=temp._oldScrollTop;
}
break;
}
}
}
};
Dwt.parseHtmlFragment=function(html,_529){
if(!Dwt._div){
Dwt._div=document.createElement("div");
}
if(_529){
html="<table style='table-layout:fixed'>"+html+"</table>";
}
Dwt._div.innerHTML=html;
return _529?Dwt._div.firstChild.rows[0]:Dwt._div.firstChild;
};
Dwt.contains=function(_52a,_52b){
var _52c=false;
if(AjxEnv.isSafari){
return false;
}else{
if(_52a.compareDocumentPosition){
var _52d=_52a.compareDocumentPosition(_52b);
if((_52d==(document.DOCUMENT_POSITION_CONTAINED_BY|document.DOCUMENT_POSITION_FOLLOWING))){
_52c=true;
}
}else{
if(_52a.contains){
_52c=_52a.contains(_52b);
}
}
}
return _52c;
};
Dwt.removeChildren=function(_52e){
while(_52e.hasChildNodes()){
_52e.removeChild(_52e.firstChild);
}
};
Dwt.getCellIndex=function(cell){
if(AjxEnv.isSafari){
if(cell.tagName&&cell.tagName.toLowerCase()=="td"){
var _530=cell.parentNode.cells;
for(var i=0;i<_530.length;i++){
if(_530[i]==cell){
return i;
}
}
}
}else{
return cell.cellIndex;
}
return -1;
};
function DwtException(msg,code,_534,_535){
if(arguments.length==0){
return;
}
AjxException.call(this,msg,code,_534,_535);
}
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(_536,_537,minX,maxX,minY,maxY,_53c,_53d,_53e,_53f,_540,_541,_542){
_536.onmousedown=DwtDraggable._start;
_536._hMode=_53f?false:true;
_536._vMode=_540?false:true;
_536._root=(_537&&_537!=null)?_537:_536;
if(_536._hMode&&isNaN(parseInt(_536._root.style.left))){
_536._root.style.left="0px";
}
if(_536._vMode&&isNaN(parseInt(_536._root.style.top))){
_536._root.style.top="0px";
}
if(!_536._hMode&&isNaN(parseInt(_536._root.style.right))){
_536._root.style.right="0px";
}
if(!_536._vMode&&isNaN(parseInt(_536._root.style.bottom))){
_536._root.style.bottom="0px";
}
_536._minX=(typeof minX!="undefined")?minX:null;
_536._minY=(typeof minY!="undefined")?minY:null;
_536._maxX=(typeof maxX!="undefined")?maxX:null;
_536._maxY=(typeof maxY!="undefined")?maxY:null;
_536._xMapper=_541?_541:null;
_536._yMapper=_542?_542:null;
_536._root.onDragStart=_53c;
_536._root.onDragEnd=_53e;
_536._root.onDrag=_53d;
};
DwtDraggable.setDragBoundaries=function(_543,minX,maxX,minY,maxY){
if(_543!=null){
if(minX!=null){
_543._minX=minX;
}
if(maxX!=null){
_543._maxX=maxX;
}
if(minY!=null){
_543._minY=minY;
}
if(maxY!=null){
_543._maxY=maxY;
}
}
};
DwtDraggable._start=function(e){
var _549=DwtDraggable._dragEl=this;
e=DwtDraggable._fixE(e);
var x=parseInt(_549._hMode?_549._root.style.left:_549._root.style.right);
var y=parseInt(_549._vMode?_549._root.style.top:_549._root.style.bottom);
if(_549._root.onDragStart){
_549._root.onDragStart.run([x,y]);
}
_549._lastMouseX=e.clientX;
_549._lastMouseY=e.clientY;
if(_549._hMode){
if(_549._minX!=null){
_549._minMouseX=e.clientX-x+_549._minX;
}
if(_549._maxX!=null){
_549._maxMouseX=_549._minMouseX+_549._maxX-_549._minX;
}
}else{
if(_549._minX!=null){
_549._maxMouseX=-_549._minX+e.clientX+x;
}
if(_549._maxX!=null){
_549._minMouseX=-_549._maxX+e.clientX+x;
}
}
if(_549._vMode){
if(_549._minY!=null){
_549._minMouseY=e.clientY-y+_549._minY;
}
if(_549._maxY!=null){
_549._maxMouseY=_549._minMouseY+_549._maxY-_549._minY;
}
}else{
if(_549._minY!=null){
_549._maxMouseY=-_549._minY+e.clientY+y;
}
if(_549._maxY!=null){
_549._minMouseY=-_549._maxY+e.clientY+y;
}
}
document.onmousemove=DwtDraggable._drag;
document.onmouseup=DwtDraggable._end;
return false;
};
DwtDraggable._drag=function(e){
e=DwtDraggable._fixE(e);
var _54d=DwtDraggable._dragEl;
var ey=e.clientY;
var ex=e.clientX;
var x=parseInt(_54d._hMode?_54d._root.style.left:_54d._root.style.right);
var y=parseInt(_54d._vMode?_54d._root.style.top:_54d._root.style.bottom);
var nx,ny;
if(!_54d._xMapper){
if(_54d._minX!=null){
ex=_54d._hMode?Math.max(ex,_54d._minMouseX):Math.min(ex,_54d._maxMouseX);
}
if(_54d._maxX!=null){
ex=_54d._hMode?Math.min(ex,_54d._maxMouseX):Math.max(ex,_54d._minMouseX);
}
nx=x+((ex-_54d._lastMouseX)*(_54d._hMode?1:-1));
}else{
nx=_54d._xMapper(x,ex);
}
if(!_54d._yMapper){
if(_54d._minY!=null){
ey=_54d._vMode?Math.max(ey,_54d._minMouseY):Math.min(ey,_54d._maxMouseY);
}
if(_54d._maxY!=null){
ey=_54d._vMode?Math.min(ey,_54d._maxMouseY):Math.max(ey,_54d._minMouseY);
}
ny=y+((ey-_54d._lastMouseY)*(_54d._vMode?1:-1));
}else{
ny=_54d._yMapper(y,ey);
}
DwtDraggable._dragEl._root.style[_54d._hMode?"left":"right"]=nx+"px";
DwtDraggable._dragEl._root.style[_54d._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 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.getProperty=function(_554,_555){
var _556;
if(_554.ownerDocument==null){
for(var _557=_554.parentNode;_557.parentNode!=null;_557=_557.parentNode){
}
var doc=_557;
}else{
var doc=_554.ownerDocument;
}
if(doc.defaultView&&!AjxEnv.isSafari){
var _559=doc.defaultView.getComputedStyle(_554,"");
_556=_559.getPropertyValue(_555);
}else{
var _55a=_555.split("-");
var _55b="";
var i;
for(i=0;i<_55a.length;i++){
if(i!=0){
_55b+=_55a[i].substring(0,1).toUpperCase();
}else{
_55b+=_55a[i].substring(0,1);
}
_55b+=_55a[i].substring(1);
}
if(_554.currentStyle){
_556=_554.currentStyle[_55b];
}else{
if(_554.style){
_556=_554.style[_55b];
}
}
}
return _556;
};
DwtCssStyle.getComputedStyleObject=function(_55d){
if(_55d.ownerDocument==null){
for(var _55e=_55d.parentNode;_55e.parentNode!=null;_55e=_55e.parentNode){
}
var doc=_55e;
}else{
var doc=_55d.ownerDocument;
}
if(doc.defaultView&&!AjxEnv.isSafari){
return doc.defaultView.getComputedStyle(_55d,"");
}else{
if(_55d.currentStyle){
return _55d.currentStyle;
}else{
if(_55d.style){
return _55d.style;
}
}
}
};
function DwtPoint(x,y){
this.x=x;
this.y=y;
}
DwtPoint.prototype.toString=function(){
return "DwtPoint";
};
function DwtRectangle(x,y,_564,_565){
this.x=x;
this.y=y;
this.width=_564;
this.height=_565;
}
DwtRectangle.prototype.toString=function(){
return "DwtRectangle";
};
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(init){
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.BUTTON_PRESSED="BUTTON_PRESSED";
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(_567,_568){
DwtEventManager._instance.addListener(_567,_568);
};
DwtEventManager.notifyListeners=function(_569,_56a){
DwtEventManager._instance.notifyListeners(_569,_56a);
};
DwtEventManager.removeListener=function(_56b,_56c){
DwtEventManager._instance.removeListener(_56b,_56c);
};
DwtEventManager.addGlobalListener=function(_56d,_56e,_56f){
AjxCore.addListener(_56d,_56e,_56f);
var _570=DwtEventManager._domEventToDwtMap[_56e];
if(_570){
DwtEventManager.addListener(_570,_56f);
}
};
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.shiftKey=false;
this.target=null;
this.type=null;
this.docX=-1;
this.docY=-1;
this.elementX=-1;
this.elementY=-1;
this._stopPropagation=false;
this._returnValue=true;
};
DwtUiEvent.getEvent=function(ev){
return (ev)?ev:((window.event)?window.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 _578=DwtUiEvent.getTarget(ev);
while(_578){
if(Dwt.getAttr(_578,prop)!=null){
return _578;
}
_578=_578.parentNode;
}
return null;
};
DwtUiEvent.getTargetWithProps=function(ev,_57a){
var _57b=DwtUiEvent.getTarget(ev);
while(_57b){
var okay=true;
for(var i in _57a){
if(_57b[_57a[i]]==null){
_57b=_57b.parentNode;
okay=false;
break;
}
}
if(okay){
return _57b;
}
}
return null;
};
DwtUiEvent.getDwtObjFromEvent=function(ev){
var _57f=DwtUiEvent.getTargetWithProp(ev,"dwtObj");
return _57f?Dwt.getObjectFromElement(_57f):null;
};
DwtUiEvent.getDwtObjWithProp=function(ev,prop){
var _582=DwtUiEvent.getTargetWithProps(ev,["dwtObj",prop]);
return _582?Dwt.getObjectFromElement(_582):null;
};
DwtUiEvent.copy=function(dest,src){
dest.altKey=src.altKey;
dest.ctrlKey=src.ctrlKey;
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._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.shiftKey=ev.shiftKey;
this.type=ev.type;
this.target=DwtUiEvent.getTarget(ev);
var _586=this.target;
while(_586!=null){
if(_586.dwtObj!=null){
this.dwtObj=Dwt.getObjectFromElement(_586);
break;
}
_586=_586.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 _587=document.body.parentElement;
this.docX+=_587.scrollLeft-_587.clientLeft;
this.docY+=_587.scrollTop-_587.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;
}
}
return ev;
};
DwtUiEvent.prototype.setToDhtmlEvent=function(ev){
DwtUiEvent.setBehaviour(ev,this._stopPropagation,this._returnValue);
};
DwtUiEvent.setBehaviour=function(ev,_58a,_58b){
ev=DwtUiEvent.getEvent(ev);
if(ev.stopPropagation!=null){
if(_58a){
ev.stopPropagation();
}
if(!_58b){
ev.preventDefault();
}
}else{
ev.returnValue=_58b;
ev.cancelBubble=_58a;
}
};
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 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(_58e){
if(!_58e){
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(_593){
if(!_593){
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(_595,id,_597,_598,_599,_59a,_59b,_59c){
this.targetObj=_595;
this._id=id;
this._mouseOverHdlr=(_597!=null)?_597:DwtMouseEventCapture.emptyHdlr;
this._mouseDownHdlr=(_598!=null)?_598:DwtMouseEventCapture.emptyHdlr;
this._mouseMoveHdlr=(_599!=null)?_599:DwtMouseEventCapture.emptyHdlr;
this._mouseUpHdlr=(_59a!=null)?_59a:DwtMouseEventCapture.emptyHdlr;
this._mouseOutHdlr=(_59b!=null)?_59b:DwtMouseEventCapture.emptyHdlr;
this._hardCapture=(_59c==null||_59c==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 _59f=DwtMouseEventCapture.getCaptureObj();
var _5a0=DwtShell.mouseEvent;
_5a0.setFromDhtmlEvent(ev);
if(_59f._hardCapture){
_5a0._stopPropagation=true;
_5a0._returnValue=false;
_5a0.setToDhtmlEvent(ev);
return false;
}else{
_5a0._stopPropagation=false;
_5a0._returnValue=true;
_5a0.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(_5a1){
if(!_5a1){
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(_5a3){
if(!_5a3){
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,_5a8,_5a9,x,y){
if(arguments.length==0){
return;
}
DwtEvent.call(this,true);
this.type=type;
this.delay=_5a8;
this.object=_5a9;
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 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(_5ac){
this._supportedOps=_5ac;
this._evtMgr=new AjxEventMgr();
}
DwtDragSource._DRAG_LISTENER="DwtDragSource._DRAG_LISTENER";
DwtDragSource._dragEvent=new DwtDragEvent();
DwtDragSource.prototype.toString=function(){
return "DwtDragSource";
};
DwtDragSource.prototype.addDragListener=function(_5ad){
this._evtMgr.addListener(DwtDragSource._DRAG_LISTENER,_5ad);
};
DwtDragSource.prototype.removeDragListener=function(_5ae){
this._evtMgr.removeListener(DwtDragSource._DRAG_LISTENER,_5ae);
};
DwtDragSource.prototype._beginDrag=function(_5af,_5b0){
if(!(this._supportedOps&_5af)){
return Dwt.DND_DROP_NONE;
}
DwtDragSource._dragEvent.operation=_5af;
DwtDragSource._dragEvent.srcControl=_5b0;
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(_5b1){
this._transferTypes=new Array();
this._hasMultiple=false;
if(_5b1){
for(var i=0;i<arguments.length;i++){
this._transferTypes[i]=arguments[i];
}
this._transferTypes.length=i;
}
this._evtMgr=new AjxEventMgr();
}
DwtDropTarget._DROP_LISTENER="DwtDropTarget._DROP_LISTENER";
DwtDropTarget._dropEvent=new DwtDropEvent();
DwtDropTarget.prototype.toString=function(){
return "DwtDropTarget";
};
DwtDropTarget.prototype.addDropListener=function(_5b3){
this._evtMgr.addListener(DwtDropTarget._DROP_LISTENER,_5b3);
};
DwtDropTarget.prototype.removeDropListener=function(_5b4){
this._evtMgr.removeListener(DwtDropTarget._DROP_LISTENER,_5b4);
};
DwtDropTarget.prototype.isValidTarget=function(_5b5){
if(_5b5 instanceof Array){
for(var i=0;i<_5b5.length;i++){
if(!this._checkTarget(_5b5[i])){
return false;
}
}
return true;
}else{
return this._checkTarget(_5b5);
}
};
DwtDropTarget.prototype.markAsMultiple=function(){
this._hasMultiple=true;
};
DwtDropTarget.prototype.hasMultipleTargets=function(){
return this._hasMultiple;
};
DwtDropTarget.prototype._checkTarget=function(item){
for(var i=0;i<this._transferTypes.length;i++){
if(item instanceof this._transferTypes[i]){
return true;
}
}
if(i==this._transferTypes.length){
return false;
}
};
DwtDropTarget.prototype.getTransferTypes=function(){
return this._transferTypes;
};
DwtDropTarget.prototype.setTransferTypes=function(_5b9){
for(var i=0;i<arguments.length;i++){
this._transferTypes[i]=arguments[i];
}
this._transferTypes.length=i;
};
DwtDropTarget.prototype._dragEnter=function(_5bb,_5bc,_5bd,ev){
DwtDropTarget._dropEvent.operation=_5bb;
DwtDropTarget._dropEvent.targetControl=_5bc;
DwtDropTarget._dropEvent.action=DwtDropEvent.DRAG_ENTER;
DwtDropTarget._dropEvent.srcData=_5bd;
DwtDropTarget._dropEvent.uiEvent=ev;
DwtDropTarget._dropEvent.doIt=true;
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(_5bf){
DwtDropTarget._dropEvent.operation=_5bf;
DwtDropTarget._dropEvent.action=DwtDropEvent.DRAG_OP_CHANGED;
this._evtMgr.notifyListeners(DwtDropTarget._DROP_LISTENER,DwtDropTarget._dropEvent);
return DwtDropTarget._dropEvent.doIt;
};
DwtDropTarget.prototype._drop=function(_5c0,ev){
DwtDropTarget._dropEvent.action=DwtDropEvent.DRAG_DROP;
DwtDropTarget._dropEvent.srcData=_5c0;
DwtDropTarget._dropEvent.uiEvent=ev;
this._evtMgr.notifyListeners(DwtDropTarget._DROP_LISTENER,DwtDropTarget._dropEvent);
return DwtDropTarget._dropEvent.doIt;
};
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(_5c2){
this._hoverObject=_5c2;
};
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(_5c3){
this._hoverOverDelay=_5c3;
};
DwtHoverMgr.prototype.setHoverOverData=function(data){
this._hoverOverData=data;
};
DwtHoverMgr.prototype.setHoverOverListener=function(_5c5){
this._hoverOverListener=_5c5;
};
DwtHoverMgr.prototype.setHoverOutDelay=function(_5c6){
this._hoverOutDelay=_5c6;
};
DwtHoverMgr.prototype.setHoverOutData=function(data){
this._hoverOutData=data;
};
DwtHoverMgr.prototype.setHoverOutListener=function(_5c8){
this._hoverOutListener=_5c8;
};
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 _5cd=new DwtHoverEvent(DwtEvent.HOVEROVER,this._hoverOverDelay,this._hoverOverData,x,y);
this._hoverOverListener.handleEvent(_5cd);
}
};
DwtHoverMgr.prototype._notifyHoverOut=function(){
this._hoverOutActionId=-1;
this._isHovering=false;
if(this._hoverOutListener!=null){
var _5ce=new DwtHoverEvent(DwtEvent.HOVEROUT,this._hoverOutDelay,this._hoverOutData);
this._hoverOutListener.handleEvent(_5ce);
}
};
function DwtControl(_5cf,_5d0,_5d1,_5d2){
if(arguments.length==0){
return;
}
this.parent=_5cf;
if(_5cf!=null&&!(_5cf instanceof DwtComposite)){
throw new DwtException("Parent must be a subclass of Composite",DwtException.INVALIDPARENT,"DwtWidget");
}
this._data=new Object();
this._eventMgr=new AjxEventMgr();
this._disposed=false;
if(_5cf==null){
return;
}
this._className=_5d0?_5d0:"DwtControl";
this._posStyle=_5d1;
if(!_5d2){
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._keyPressHdlr=function(ev){
var obj=obj?obj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj._toolTipContent!=null){
var _5d5=DwtShell.getShell(window);
var _5d6=_5d5.getHoverMgr();
_5d6.setHoverOutListener(obj._hoverOutListener);
_5d6.hoverOut();
obj._tooltipClosed=false;
}
};
DwtControl._dblClickHdlr=function(ev){
return DwtControl._mouseEvent(ev,DwtEvent.ONDBLCLICK);
};
DwtControl._mouseOverHdlr=function(ev){
var _5d9=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
if(_5d9!=null){
ev=DwtUiEvent.getEvent(ev);
ev._stopPropagation=true;
return false;
}
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
var _5db=DwtShell.mouseEvent;
if(obj._dragging==DwtControl._NO_DRAG){
_5db.setFromDhtmlEvent(ev);
if(obj.isListenerRegistered(DwtEvent.ONMOUSEOVER)){
obj.notifyListeners(DwtEvent.ONMOUSEOVER,_5db);
}
if(obj._toolTipContent!=null){
var _5dc=DwtShell.getShell(window);
var _5dd=_5dc.getHoverMgr();
if((_5dd.getHoverObject()!=this||!_5dd.isHovering())&&!DwtMenu.menuShowing()){
_5dd.reset();
_5dd.setHoverObject(this);
_5dd.setHoverOverData(obj);
_5dd.setHoverOverDelay(DwtToolTip.TOOLTIP_DELAY);
_5dd.setHoverOverListener(obj._hoverOverListener);
_5dd.hoverOver(_5db.docX,_5db.docY);
}
}
}
_5db._stopPropagation=true;
_5db._returnValue=false;
_5db.setToDhtmlEvent(ev);
return false;
};
DwtControl._mouseDownHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj._toolTipContent!=null){
var _5e0=DwtShell.getShell(window);
var _5e1=_5e0.getHoverMgr();
_5e1.setHoverOutListener(obj._hoverOutListener);
_5e1.hoverOut();
}
var _5e2=DwtShell.mouseEvent;
_5e2.setFromDhtmlEvent(ev);
if(obj._dragSource!=null&&_5e2.button==DwtMouseEvent.LEFT&&obj._isValidDragObject(_5e2)){
try{
obj._ctrlCaptureObj.capture();
}
catch(ex){
}
obj._dragOp=(_5e2.ctrlKey)?Dwt.DND_DROP_COPY:Dwt.DND_DROP_MOVE;
obj._dragStartX=_5e2.docX;
obj._dragStartY=_5e2.docY;
}
return DwtControl._mouseEvent(ev,DwtEvent.ONMOUSEDOWN,obj,_5e2);
};
DwtControl._mouseMoveHdlr=function(ev){
var _5e4=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
var obj=(_5e4)?_5e4.targetObj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj._dndHoverActionId!=-1){
AjxTimedAction.cancelAction(obj._dndHoverActionId);
obj._dndHoverActionId=-1;
}
var _5e6=DwtShell.mouseEvent;
_5e6.setFromDhtmlEvent(ev);
if(_5e6.docX<0||_5e6.docY<0){
_5e6._stopPropagation=true;
_5e6._returnValue=false;
_5e6.setToDhtmlEvent(ev);
return false;
}
if(obj._dragSource==null||_5e4==null||(obj!=null&&obj._dragging==DwtControl._NO_DRAG&&Math.abs(obj._dragStartX-_5e6.docX)<DwtControl._DRAG_THRESHOLD&&Math.abs(obj._dragStartY-_5e6.docY)<DwtControl._DRAG_THRESHOLD)){
if(obj._toolTipContent!=null){
var _5e7=DwtShell.getShell(window);
var _5e8=_5e7.getHoverMgr();
if(!_5e8.isHovering()&&!obj._tooltipClosed&&!DwtMenu.menuShowing()){
_5e8.hoverOver(_5e6.docX,_5e6.docY);
}else{
var _5e9=obj._lastTooltipX?Math.abs(_5e6.docX-obj._lastTooltipX):null;
var _5ea=obj._lastTooltipY?Math.abs(_5e6.docY-obj._lastTooltipY):null;
if((_5e9!=null&&_5e9>DwtControl.TOOLTIP_THRESHOLD)||(_5ea!=null&&_5ea>DwtControl.TOOLTIP_THRESHOLD)){
_5e8.setHoverOutListener(obj._hoverOutListener);
_5e8.hoverOut();
obj._tooltipClosed=true;
}
}
}
return DwtControl._mouseEvent(ev,DwtEvent.ONMOUSEMOVE,obj,_5e6);
}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 _5eb=_5e6.dwtObj;
if(_5eb){
obj._dndHoverAction.args=[_5eb];
obj._dndHoverActionId=AjxTimedAction.scheduleAction(obj._dndHoverAction,DwtControl._DND_HOVER_DELAY);
}
if(_5eb&&_5eb._dropTarget&&_5eb!=obj){
if(_5eb!=obj._lastDestDwtObj||_5eb._dropTarget.hasMultipleTargets()){
if(_5eb._dropTarget._dragEnter(obj._dragOp,_5eb,obj._dragSource._getData(),_5e6)){
obj._setDnDIconState(true);
obj._dropAllowed=true;
_5eb._dragEnter(_5e6);
}else{
obj._setDnDIconState(false);
obj._dropAllowed=false;
}
}else{
if(obj._dropAllowed){
_5eb._dragOver(_5e6);
}
}
}else{
obj._setDnDIconState(false);
}
if(obj._lastDestDwtObj&&obj._lastDestDwtObj!=_5eb&&obj._lastDestDwtObj._dropTarget&&obj._lastDestDwtObj!=obj){
obj._lastDestDwtObj._dragLeave(_5e6);
obj._lastDestDwtObj._dropTarget._dragLeave();
}
obj._lastDestDwtObj=_5eb;
Dwt.setLocation(obj._dndIcon,_5e6.docX+2,_5e6.docY+2);
}else{
DwtControl._mouseEvent(ev,DwtEvent.ONMOUSEMOVE,obj,_5e6);
}
_5e6._stopPropagation=true;
_5e6._returnValue=false;
_5e6.setToDhtmlEvent(ev);
return false;
}
};
DwtControl._mouseUpHdlr=function(ev){
var _5ed=(DwtMouseEventCapture.getId()=="DwtControl")?DwtMouseEventCapture.getCaptureObj():null;
var obj=(_5ed)?_5ed.targetObj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj._dndHoverActionId!=-1){
AjxTimedAction.cancelAction(obj._dndHoverActionId);
obj._dndHoverActionId=-1;
}
if(!obj._dragSource||!_5ed){
return DwtControl._mouseEvent(ev,DwtEvent.ONMOUSEUP,obj);
}else{
_5ed.release();
var _5ef=DwtShell.mouseEvent;
_5ef.setFromDhtmlEvent(ev);
if(obj._dragging!=DwtControl._DRAGGING){
obj._dragging=DwtControl._NO_DRAG;
return DwtControl._mouseEvent(ev,DwtEvent.ONMOUSEUP,obj,_5ef);
}else{
obj._lastDestDwtObj=null;
var _5f0=_5ef.dwtObj;
if(_5f0!=null&&_5f0._dropTarget!=null&&obj._dropAllowed&&_5f0!=obj){
_5f0._drop(_5ef);
_5f0._dropTarget._drop(obj._dragSource._getData(),_5ef);
obj._dragSource._endDrag();
obj._destroyDnDIcon(obj._dndIcon);
obj._dragging=DwtControl._NO_DRAG;
}else{
obj._dragEndX=_5ef.docX;
obj._dragEndY=_5ef.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);
}
_5ef._stopPropagation=true;
_5ef._returnValue=false;
_5ef.setToDhtmlEvent(ev);
return false;
}
}
};
DwtControl._mouseOutHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(obj._toolTipContent!=null){
var _5f4=DwtShell.getShell(window);
var _5f5=_5f4.getHoverMgr();
_5f5.setHoverOutListener(obj._hoverOutListener);
_5f5.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 _5fb=obj?obj.preventContextMenu():true;
if(_5fb){
DwtControl._mouseEvent(ev,DwtEvent.ONMOUSEDOWN);
DwtControl._mouseEvent(ev,DwtEvent.ONMOUSEUP);
return;
}
}
return DwtControl._mouseEvent(ev,DwtEvent.ONCONTEXTMENU);
};
DwtControl._mouseEvent=function(ev,_5fd,obj,_5ff){
var obj=obj?obj:DwtUiEvent.getDwtObjFromEvent(ev);
if(!obj){
return false;
}
if(!_5ff){
_5ff=DwtShell.mouseEvent;
_5ff.setFromDhtmlEvent(ev);
}
var tn=_5ff.target.tagName.toLowerCase();
if(tn!="input"&&tn!="textarea"){
_5ff._stopPropagation=obj.getPropagationForEvent();
_5ff._returnValue=obj.getReturnValueForEvent();
}else{
_5ff._stopPropagation=false;
_5ff._returnValue=true;
}
DwtEventManager.notifyListeners(_5fd,_5ff);
if(obj.isListenerRegistered&&obj.isListenerRegistered(_5fd)){
obj.notifyListeners(_5fd,_5ff);
}
_5ff.setToDhtmlEvent(ev);
return _5ff._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.toString=function(){
return "DwtControl";
};
DwtControl.prototype.addControlListener=function(_601){
this.addListener(DwtEvent.CONTROL,_601);
};
DwtControl.prototype.removeControlListener=function(_602){
this.removeListener(DwtEvent.CONTROL,_602);
};
DwtControl.prototype.addDisposeListener=function(_603){
this.addListener(DwtEvent.DISPOSE,_603);
};
DwtControl.prototype.removeDisposeListener=function(_604){
this.removeListener(DwtEvent.DISPOSE,_604);
};
DwtControl.prototype.addListener=function(_605,_606){
return this._eventMgr.addListener(_605,_606);
};
DwtControl.prototype.notifyListeners=function(_607,_608){
return this._eventMgr.notifyListeners(_607,_608);
};
DwtControl.prototype.isListenerRegistered=function(_609){
return this._eventMgr.isListenerRegistered(_609);
};
DwtControl.prototype.removeListener=function(_60a,_60b){
return this._eventMgr.removeListener(_60a,_60b);
};
DwtControl.prototype.removeAllListeners=function(_60c){
return this._eventMgr.removeAll(_60c);
};
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);
delete ev;
};
DwtControl.prototype.getDocument=function(){
alert("DEPRACATED: Please use document instead");
};
DwtControl.prototype.getData=function(key){
return this._data[key];
};
DwtControl.prototype.setData=function(key,_610){
this._data[key]=_610;
};
DwtControl.prototype.isDisposed=function(){
return this._isDisposed;
};
DwtControl.prototype.isInitialized=function(){
return this._ctrlInited;
};
DwtControl.prototype.getPropagationForEvent=function(){
return true;
};
DwtControl.prototype.getReturnValueForEvent=function(){
return false;
};
DwtControl.prototype.reparent=function(_611){
if(!this._checkState()){
return;
}
var _612=this.getHtmlElement();
this.parent.removeChild(this);
DwtComposite._pendingElements[this._htmlElId]=_612;
_611.addChild(this);
this.parent=_611;
};
DwtControl.prototype.reparentHtmlElement=function(_613){
if(typeof _613=="string"){
_613=document.getElementById(_613);
}
_613.appendChild(this.getHtmlElement());
};
DwtControl.prototype.setHandler=function(_614,func){
if(!this._checkState()){
return;
}
var _616=this.getHtmlElement();
Dwt.setHandler(_616,_614,func);
};
DwtControl.prototype.clearHandler=function(_617){
if(!this._checkState()){
return;
}
var _618=this.getHtmlElement();
Dwt.clearHandler(_618,_617);
};
DwtControl.prototype.getBounds=function(_619){
if(!this._checkState()){
return;
}
return Dwt.getBounds(this.getHtmlElement(),_619);
};
DwtControl.prototype.setBounds=function(x,y,_61c,_61d){
if(!this._checkState()){
return;
}
var _61e=this.getHtmlElement();
if(this.isListenerRegistered(DwtEvent.CONTROL)){
this._controlEvent.reset();
var bds=Dwt.getBounds(_61e);
this._controlEvent.oldX=bds.x;
this._controlEvent.oldY=bds.y;
this._controlEvent.oldWidth=bds.width;
this._controlEvent.oldHeight=bds.height;
Dwt.setBounds(_61e,x,y,_61c,_61d);
bds=Dwt.getBounds(_61e);
this._controlEvent.newX=bds.x;
this._controlEvent.newY=bds.y;
this._controlEvent.newWidth=bds.width;
this._controlEvent.newHeight=bds.height;
this.notifyListeners(DwtEvent.CONTROL,this._controlEvent);
}else{
Dwt.setBounds(_61e,x,y,_61c,_61d);
}
return this;
};
DwtControl.prototype.getClassName=function(){
return this._className;
};
DwtControl.prototype.setClassName=function(_620){
if(!this._checkState()){
return;
}
this._className=_620;
this.getHtmlElement().className=_620;
};
DwtControl.prototype.getCursor=function(){
if(!this._checkState()){
return;
}
return Dwt.getCursor(this.getHtmlElement());
};
DwtControl.prototype.setCursor=function(_621){
if(!this._checkState()){
return;
}
Dwt.setCursor(this.getHtmlElement(),_621);
};
DwtControl.prototype.getDragSource=function(){
return this._dragSource;
};
DwtControl.prototype.setDragSource=function(_622){
this._dragSource=_622;
if(_622!=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(_623){
this._dropTarget=_623;
};
DwtControl.prototype.getEnabled=function(){
if(!this._checkState()){
return;
}
return this._enabled;
};
DwtControl.prototype.setEnabled=function(_624,_625){
if(!this._checkState()){
return;
}
if(_624!=this._enabled){
this._enabled=_624;
if(_625){
this.getHtmlElement().disabled=!_624;
}
}
};
DwtControl.prototype.getHtmlElement=function(){
if(!this._checkState()){
return;
}
var _626=document.getElementById(this._htmlElId);
if(_626==null){
_626=DwtComposite._pendingElements[this._htmlElId];
}else{
if(!_626._rendered){
delete DwtComposite._pendingElements[this._htmlElId];
_626._rendered=true;
}
}
return _626;
};
DwtControl.prototype.setHtmlElementId=function(id){
if(this._disposed){
return;
}
if(this._ctrlInited){
var _628=this.getHtmlElement();
if(!_628._rendered){
delete DwtComposite._pendingElements[this._htmlElId];
DwtComposite._pendingElements[id]=_628;
}
_628.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 _629=this.getBounds();
return _629.x+_629.width;
};
DwtControl.prototype.getY=function(){
if(!this._checkState()){
return;
}
return Dwt.getLocation(this.getHtmlElement()).y;
};
DwtControl.prototype.getYH=function(){
if(!this._checkState()){
return;
}
var _62a=this.getBounds();
return _62a.y+_62a.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 _62d=this.getHtmlElement();
this._controlEvent.reset();
var loc=Dwt.getLocation(_62d);
this._controlEvent.oldX=loc.x;
this._controlEvent.oldY=loc.y;
Dwt.setLocation(_62d,x,y);
loc=Dwt.getLocation(_62d);
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(_62f){
if(!this._checkState()){
return;
}
Dwt.setScrollStyle(this.getHtmlElement(),_62f);
};
DwtControl.prototype.getW=function(_630){
if(!this._checkState()){
return;
}
return Dwt.getSize(this.getHtmlElement(),_630).x;
};
DwtControl.prototype.getH=function(_631){
if(!this._checkState()){
return;
}
return Dwt.getSize(this.getHtmlElement(),_631).y;
};
DwtControl.prototype.getSize=function(_632){
if(!this._checkState()){
return;
}
return Dwt.getSize(this.getHtmlElement(),_632);
};
DwtControl.prototype.setSize=function(_633,_634){
if(!this._checkState()){
return;
}
if(this.isListenerRegistered(DwtEvent.CONTROL)){
var _635=this.getHtmlElement();
this._controlEvent.reset();
var sz=Dwt.getSize(_635);
this._controlEvent.oldWidth=sz.x;
this._controlEvent.oldHeight=sz.y;
Dwt.setSize(_635,_633,_634);
sz=Dwt.getSize(_635);
this._controlEvent.newWidth=sz.x;
this._controlEvent.newHeight=sz.y;
this.notifyListeners(DwtEvent.CONTROL,this._controlEvent);
}else{
Dwt.setSize(this.getHtmlElement(),_633,_634);
}
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(_638){
if(!this._checkState()){
return;
}
Dwt.setVisible(this.getHtmlElement(),_638);
};
DwtControl.prototype.setVisibility=function(_639){
if(!this._checkState()){
return;
}
Dwt.setVisibility(this.getHtmlElement(),_639);
};
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(_63c){
if(!this._checkState()){
return;
}
Dwt.setDisplay(this.getHtmlElement(),_63c);
};
DwtControl.prototype.preventSelection=function(_63d){
return !this._isInputEl(_63d);
};
DwtControl.prototype.preventContextMenu=function(_63e){
return _63e?(!this._isInputEl(_63e)):true;
};
DwtControl.prototype._checkState=function(){
if(this._disposed){
return false;
}
if(!this._ctrlInited){
this._initCtrl();
}
return true;
};
DwtControl.prototype._isInputEl=function(_63f){
var _640=false;
if(!_63f||!_63f.tagName){
return _640;
}
var _641=_63f.tagName.toLowerCase();
var type=_641=="input"?_63f.type.toLowerCase():null;
if(_641=="textarea"||(type&&(type=="text"||type=="password"))){
_640=true;
}
return _640;
};
DwtControl.prototype._setEventHdlrs=function(_643,_644){
if(!this._checkState()){
return;
}
var _645=this.getHtmlElement();
for(var i=0;i<_643.length;i++){
if(_644!==true){
Dwt.setHandler(_645,_643[i],DwtControl.HANDLER[_643[i]]);
}else{
Dwt.clearHandler(_645,_643[i]);
}
}
};
DwtControl.prototype._setMouseEventHdlrs=function(_647){
this._setEventHdlrs(DwtEvent.MOUSE_EVENTS,_647);
};
DwtControl.prototype._setKeyPressEventHdlr=function(_648){
this._setEventHdlrs([DwtEvent.ONKEYPRESS],_648);
};
DwtControl.prototype._dndDoHover=function(_649){
_649._dragHover();
};
DwtControl.prototype._getDnDIcon=function(_64a){
return null;
};
DwtControl.prototype._setDnDIconState=function(_64b){
this._dndIcon.className=(_64b)?"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._initCtrl=function(){
this.shell=this.parent.shell||this.parent;
var _653=document.createElement("div");
this._htmlElId=_653.id=(this._htmlElId==null)?Dwt.getNextId():this._htmlElId;
DwtComposite._pendingElements[this._htmlElId]=_653;
Dwt.associateElementWithObject(_653,this);
if(this._posStyle==null||this._posStyle==DwtControl.STATIC_STYLE){
_653.style.position=DwtControl.STATIC_STYLE;
}else{
_653.style.position=this._posStyle;
}
_653.className=this._className;
_653.style.overflow="visible";
this._enabled=true;
this._controlEvent=new DwtControlEvent();
this._dragging=DwtControl._NO_DRAG;
this._ctrlInited=true;
this.parent.addChild(this);
};
DwtControl.prototype.setContent=function(_654){
if(_654){
this.getHtmlElement().innerHTML=_654;
}
};
DwtControl.prototype.clearContent=function(){
this.getHtmlElement().innerHTML="";
};
DwtControl.prototype._badDropEffect=function(m,c,d){
var _658=(Math.abs(m)<=1);
var _659=_658?this._dragStartX-this._dragEndX:this._dragStartY-this._dragEndY;
if(_659*d>0){
if(_658){
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(_65a){
if(this._eventMgr.isListenerRegistered(DwtEvent.HOVEROVER)){
this._eventMgr.notifyListeners(DwtEvent.HOVEROVER,_65a);
}
if(this._toolTipContent!=null){
var _65b=DwtShell.getShell(window);
var _65c=_65b.getToolTip();
_65c.setContent(this._toolTipContent);
_65c.popup(_65a.x,_65a.y);
this._lastTooltipX=_65a.x;
this._lastTooltipY=_65a.y;
this._tooltipClosed=false;
}
};
DwtControl.prototype._handleHoverOut=function(_65d){
if(this._eventMgr.isListenerRegistered(DwtEvent.HOVEROUT)){
this._eventMgr.notifyListeners(DwtEvent.HOVEROUT,_65d);
}
var _65e=DwtShell.getShell(window);
var _65f=_65e.getToolTip();
_65f.popdown();
this._lastTooltipX=null;
this._lastTooltipY=null;
};
function DwtComposite(_660,_661,_662,_663){
if(arguments.length==0){
return;
}
_661=_661||"DwtComposite";
DwtControl.call(this,_660,_661,_662,_663);
this._children=new AjxVector();
this._updating=false;
}
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 sz=this._children.size();
if(sz>0){
var a=this._children.getArray().slice(0);
for(var i=0;i<sz;i++){
if(a[i].dispose){
a[i].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(this._children.size()>0){
a[0].dispose();
}
};
DwtComposite.prototype.clear=function(){
this.removeChildren();
this.getHtmlElement().innerHTML="";
};
DwtComposite.prototype.addChild=function(_668){
this._children.add(_668);
var _669=_668._removedEl?_668._removedEl:_668.getHtmlElement();
if(this instanceof DwtShell&&this.isVirtual()){
document.body.appendChild(_669);
}else{
this.getHtmlElement().appendChild(_669);
}
if(_668._removedEl){
_668._removedEl=null;
}
};
DwtComposite.prototype.removeChild=function(_66a,_66b){
if(_66a.isInitialized()){
this._children.remove(_66a);
var _66c=_66a.getHtmlElement();
if(_66c&&_66c.parentNode){
var el=_66c.parentNode.removeChild(_66c);
if(_66b){
_66a._removedEl=el;
}
}
}
};
DwtComposite.prototype._update=function(){
};
function DwtShell(_66e,_66f,_670,_671,_672){
if(window._dwtShell!=null){
throw new DwtException("DwtShell already exists for window",DwtException.INVALID_OP,"DwtShell");
}
_66e=_66e||"DwtShell";
DwtComposite.call(this,null,_66e);
this._ctrlInited=true;
window._dwtShell=AjxCore.assignId(this);
if((_670!=null)&&(document.domain!="localhost")){
window.onbeforeunload=_670;
}
document.body.style.margin=0;
if(_66f!=null&&!_66f){
document.body.style.overflow="hidden";
}
Dwt.setHandler(document,DwtEvent.ONKEYPRESS,DwtShell._keyPressHdlr);
var _673=document.createElement("div");
this._htmlElId=_673.id=Dwt.getNextId();
_673.className=_66e;
_673.style.width=_673.style.height="100%";
if(_673.style.overflow){
_673.style.overflow=null;
}
if(_671){
document.body.removeChild(_671);
}
document.body.appendChild(_673);
if(_671){
var _674=new DwtControl(this,null,Dwt.ABSOLUTE_STYLE);
_674.getHtmlElement().appendChild(_671);
_674.setSize("100%","100%");
_674.zShow(true);
}
Dwt.associateElementWithObject(_673,this);
this.shell=this;
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>";
_673.appendChild(this._veilOverlay);
if(_672){
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>";
_673.appendChild(this._curtainOverlay);
}
this._uiEvent=new DwtUiEvent(true);
this._currWinSize=Dwt.getWindowSize();
this._toolTip=new DwtToolTip(this);
this._hoverMgr=new DwtHoverMgr();
}
DwtShell.prototype=new DwtComposite;
DwtShell.prototype.constructor=DwtShell;
DwtShell.CANCEL_BUTTON=-1;
DwtShell.controlEvent=new DwtControlEvent();
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.setBusy=function(busy,id,_678,_679,_67a){
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;
}else{
if(this._setBusy&&(this._setBusyCount<=0)){
Dwt.setCursor(this._busyOverlay,"default");
Dwt.setVisible(this._busyOverlay,false);
this._setBusy=false;
}
}
if(busy&&_678){
if(_679&&_679>0){
this._busyActionId[id]=AjxTimedAction.scheduleAction(this._busyTimedAction,_679);
}else{
this._showBusyDialogAction(id);
}
if(_67a){
this._cancelBusyCallback=_67a;
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.setBusyDialogText=function(text){
this._busyDialogTxt.innerHTML=(text)?text:"";
};
DwtShell.prototype.setBusyDialogTitle=function(_67c){
this._busyDialog.setTitle((_67c)?_67c:AjxMsg.workInProgress);
};
DwtShell.prototype.getHoverMgr=function(){
return this._hoverMgr;
};
DwtShell.prototype.getToolTip=function(){
return this._toolTip;
};
DwtShell.prototype.getH=function(_67d){
return (!this._virtual)?Dwt.getSize(this.getHtmlElement(),_67d).y:Dwt.getSize(document.body,_67d).y;
};
DwtShell.prototype.getW=function(_67e){
return (!this._virtual)?Dwt.getSize(this.getHtmlElement(),_67e).x:Dwt.getSize(document.body,_67e).x;
};
DwtShell.prototype.getSize=function(_67f){
return (!this._virtual)?Dwt.getSize(this.getHtmlElement(),_67f):Dwt.getSize(document.body,_67f);
};
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(){
return (!this._virtual)?Dwt.getBounds(this.getHtmlElement(),incScroll):Dwt.getBounds(document.body,incScroll);
};
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(_681){
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>";
_681.appendChild(this._busyOverlay);
Dwt.setVisible(this._busyOverlay,false);
var _682=new DwtDialog_ButtonDescriptor(DwtShell.CANCEL_BUTTON,AjxMsg.cancelRequest,DwtDialog.ALIGN_CENTER);
this._busyDialog=new DwtDialog(this,"DwtShellbusyDialog",AjxMsg.workInProgress,DwtDialog.NO_BUTTONS,[_682],Dwt.BUSY+10);
this._busyDialog._disableFFhack();
this._busyDialog.registerCallback(DwtShell.CANCEL_BUTTON,this._busyCancelButtonListener,this);
var _683=Dwt.getNextId();
var html=["<table xborder=1 class='DialogContent'><tr>","<td class='WaitIcon'></td><td class='MsgText' id='",_683,"'>&nbsp;</td>","</tr></table>"].join("");
this._busyDialog.setContent(html);
this._busyDialogTxt=document.getElementById(_683);
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 _689=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(_689!=null&&typeof (_689)=="object"){
if((_689.tagName=="A"||_689.tagName=="a")&&_689.href){
evt._stopPropagation=false;
evt._returnValue=true;
}
}
}
evt.setToDhtmlEvent(ev);
return evt._returnValue;
};
DwtShell._keyPressHdlr=function(ev){
var _68c=AjxCore.objectWithId(window._dwtShell);
if(_68c.isListenerRegistered(DwtEvent.ONKEYPRESS)){
var _68d=DwtShell.keyEvent;
_68d.setFromDhtmlEvent(ev);
var _68e=(_68d.target)?_68d.target.tagName.toLowerCase():null;
if(_68e!="input"&&_68e!="textarea"){
return _68c.notifyListeners(DwtEvent.ONKEYPRESS,_68d);
}
}
};
DwtShell._resizeHdlr=function(ev){
var _690=AjxCore.objectWithId(window._dwtShell);
if(_690.isListenerRegistered(DwtEvent.CONTROL)){
var evt=DwtShell.controlEvent;
evt.reset();
evt.oldWidth=_690._currWinSize.x;
evt.oldHeight=_690._currWinSize.y;
_690._currWinSize=Dwt.getWindowSize();
evt.newWidth=_690._currWinSize.x;
evt.newHeight=_690._currWinSize.y;
_690.notifyListeners(DwtEvent.CONTROL,evt);
}else{
_690._currWinSize=Dwt.getWindowSize();
}
};
function DwtBaseDialog(_692,_693,_694,_695,mode,loc,_698,_699){
if(arguments.length==0){
return;
}
if(!(_692 instanceof DwtShell)){
throw new DwtException("DwtBaseDialog parent must be a DwtShell",DwtException.INVALIDPARENT,"DwtDialog");
}
_693=_693||"DwtBaseDialog";
this._title=_694||"";
DwtComposite.call(this,_692,_693,DwtControl.ABSOLUTE_STYLE);
this._shell=_692;
this._zIndex=_695||Dwt.Z_DIALOG;
this._mode=mode||DwtBaseDialog.MODAL;
this._loc=loc;
this._ffHackDisabled=false;
this._createHtml();
if(_698!=null){
this.setView(_698);
}
var _69a=this.getHtmlElement();
var _69b=_699?_699:(_69a.id+"_handle");
this.initializeDragging(_69b);
this._tabIndex=0;
this.setZIndex(Dwt.Z_HIDDEN);
this._positionDialog({x:-10000,y:-10000});
}
DwtBaseDialog.prototype=new DwtComposite;
DwtBaseDialog.prototype.constructor=DwtBaseDialog;
DwtBaseDialog.MODELESS=1;
DwtBaseDialog.MODAL=2;
DwtBaseDialog.prototype.toString=function(){
return "DwtBaseDialog";
};
DwtBaseDialog.prototype.initializeDragging=function(_69c){
var _69d=document.getElementById(_69c);
if(_69d){
var p=Dwt.getSize(AjxCore.objectWithId(window._dwtShell).getHtmlElement());
var _69f=document.getElementById(this._htmlElId);
var size=this.getSize();
var _6a1=new AjxCallback(this,this._dragEnd);
var _6a2=new AjxCallback(this,this._duringDrag);
var _6a3=new AjxCallback(this,this._dragStart);
DwtDraggable.init(_69d,_69f,0,document.body.offsetWidth-10,0,document.body.offsetHeight-10,_6a3,_6a2,_6a1);
}
};
DwtBaseDialog.prototype.popup=function(loc){
this.cleanup(true);
var _6a5=this._zIndex;
if(this._mode==DwtBaseDialog.MODAL){
_6a5=this._setModalEffect(_6a5);
}
this.addKeyListeners();
this._shell._veilOverlay.activeDialogs.push(this);
if(!this._ffHackDisabled){
Dwt._ffOverflowHack(this._htmlElId,_6a5,null,false);
}
loc=this._loc=loc||this._loc;
this._positionDialog(loc);
this.setZIndex(_6a5);
this._poppedUp=true;
this.focus();
};
DwtBaseDialog.prototype._disableFFhack=function(){
this._ffHackDisabled=true;
};
DwtBaseDialog.prototype.focus=function(){
if(this.isListenerRegistered(DwtEvent.ONFOCUS)){
this.notifyListeners(DwtEvent.ONFOCUS);
}else{
if(this._focusElementId){
var _6a6=document.getElementById(this._focusElementId);
if(_6a6){
_6a6.focus();
}
}
}
};
DwtBaseDialog.prototype.isPoppedUp=function(){
return this._poppedUp;
};
DwtBaseDialog.prototype.popdown=function(){
if(this._poppedUp){
this._poppedUp=false;
this.cleanup(false);
var _6a7=this._zIndex;
this.setZIndex(Dwt.Z_HIDDEN);
this._positionDialog({x:Dwt.LOC_NOWHERE,y:Dwt.LOC_NOWHERE});
if(this._mode==DwtBaseDialog.MODAL){
this._undoModality(_6a7);
}else{
if(!this._ffHackDisabled){
Dwt._ffOverflowHack(this._htmlElId,_6a7,null,false);
}
this._shell._veilOverlay.activeDialogs.pop();
}
this.removeKeyListeners();
}
};
DwtBaseDialog.prototype.setView=function(_6a8){
this.reset();
if(_6a8){
this._getContentDiv().appendChild(_6a8.getHtmlElement());
}
};
DwtBaseDialog.prototype.reset=function(){
this._loc=null;
};
DwtBaseDialog.prototype.cleanup=function(_6a9){
var _6aa=this._getInputFields();
if(_6aa){
for(var i=0;i<_6aa.length;i++){
_6aa[i].disabled=!_6a9;
if(_6a9){
_6aa[i].value="";
}
}
}
};
DwtBaseDialog.prototype.setContent=function(text){
var d=this._getContentDiv();
if(d){
var _6ae=DwtBorder.getBorderStartHtml("dialog")+text+DwtBorder.getBorderEndHtml("dialog");
d.innerHTML=text;
}
};
DwtBaseDialog.prototype._getContentDiv=function(){
return this._contentDiv;
};
DwtBaseDialog.prototype.addTabListener=function(_6af){
this.addListener(DwtEvent.TAB,_6af);
};
DwtBaseDialog.prototype.addEnterListener=function(_6b0){
this.addListener(DwtEvent.ENTER,_6b0);
};
DwtBaseDialog.getActiveDialog=function(){
var _6b1=null;
var _6b2=DwtShell.getShell(window);
if(_6b2){
var len=_6b2._veilOverlay.activeDialogs.length;
if(len>0){
_6b1=_6b2._veilOverlay.activeDialogs[len-1];
}
}
return _6b1;
};
DwtBaseDialog.prototype.handleKeys=function(ev){
var ad=DwtBaseDialog.getActiveDialog();
var _6b6=ad.getHtmlElement();
var _6b7=DwtUiEvent.getTarget(ev);
var _6b8=DwtKeyEvent.getCharCode(ev);
switch(_6b8){
case DwtKeyEvent.KEY_TAB:
if(ad&&ad._mode==DwtBaseDialog.MODAL){
ev.item=ad;
var _6b9=ad._doesContainElement(_6b7);
if(_6b9){
ev.isTargetInDialog=true;
if(ad._tabIdOrder){
var _6ba=-1;
if(ad._tabIndex!=null){
_6ba=ad._tabIndex;
ad._tabIndex=++ad._tabIndex%ad._tabIdOrder.length;
}else{
ad._tabIndex=1;
}
var id=ad._tabIdOrder[ad._tabIndex];
document.getElementById(id).focus();
ev.oldTabIndexId=(_6ba==-1)?_6ba:ad._tabIdOrder[_6ba];
ev.isTargetInDialog=true;
ev.currentTabIndexId=id;
}
}else{
ev.oldTabIndexId=-1;
ev.isTargetInDialog=false;
ev.currentTabIndexId=-1;
}
ad.notifyListeners(DwtEvent.TAB,ev);
DwtUiEvent.setBehaviour(ev,true,false);
}
break;
case DwtKeyEvent.KEY_ENTER:
ad.notifyListeners(DwtEvent.ENTER,ev);
break;
}
};
DwtBaseDialog.prototype.setTabOrder=function(_6bc){
this._tabIdOrder=_6bc;
};
DwtBaseDialog.prototype.addKeyListeners=function(){
if(this._shell._veilOverlay.activeDialogs.length==0){
if(window.addEventListener){
window.addEventListener("keypress",this.handleKeys,false);
}else{
if(document.body.attachEvent){
document.body.attachEvent("onkeydown",this.handleKeys);
}
}
}
};
DwtBaseDialog.prototype.removeKeyListeners=function(){
if(this._shell._veilOverlay.activeDialogs.length==0){
if(window.removeEventListener){
window.removeEventListener("keypress",this.handleKeys,false);
}else{
if(document.body.detachEvent){
document.body.detachEvent("onkeydown",this.handleKeys);
}
}
}
};
DwtBaseDialog.prototype._getStartBorder=function(){
if(!this._titleHandleId){
this._titleHandleId=Dwt.getNextId();
}
if(!this._contentId){
this._contentId=Dwt.getNextId();
}
if(!this._titleCellId){
this._titleCellId=Dwt.getNextId();
}
return DwtBorder.getBorderStartHtml("dialog",{title:this._title,titleTextId:this._titleCellId,titleId:this._titleHandleId});
};
DwtBaseDialog.prototype._getEndBorder=function(){
return DwtBorder.getBorderEndHtml("dialog");
};
DwtBaseDialog.prototype._getContentHtml=function(){
return "<div id='"+this._contentId+"'></div>";
};
DwtBaseDialog.prototype._createHtml=function(){
var _6bd=this.getHtmlElement();
var html=new Array();
var idx=0;
html[idx++]=this._getStartBorder();
html[idx++]=this._getContentHtml();
html[idx++]=this._getEndBorder();
_6bd.innerHTML=html.join("");
this._contentDiv=document.getElementById(this._contentId);
};
DwtBaseDialog.prototype._setModalEffect=function(){
var _6c0=this._shell._veilOverlay.dialogZ;
var _6c1=null;
var _6c2;
if(_6c0.length){
_6c1=_6c0[_6c0.length-1];
}
if(_6c1){
thisZ=_6c1+2;
_6c2=_6c1+1;
}else{
thisZ=this._zIndex;
_6c2=Dwt.Z_VEIL;
}
this._shell._veilOverlay.veilZ.push(_6c2);
this._shell._veilOverlay.dialogZ.push(thisZ);
Dwt.setZIndex(this._shell._veilOverlay,_6c2);
return thisZ;
};
DwtBaseDialog.prototype._undoModality=function(_6c3){
var _6c4=this._shell._veilOverlay.veilZ;
_6c4.pop();
var _6c5=_6c4[_6c4.length-1];
if(!this._ffHackDisabled){
Dwt._ffOverflowHack(this._htmlElId,_6c3,null,false);
}
Dwt.setZIndex(this._shell._veilOverlay,_6c5);
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 _6c7=this._shell.getSize();
var _6c8=this.getSize();
var x,y;
if(loc==null){
x=Math.round((_6c7.x-_6c8.x)/2);
y=Math.round((_6c7.y-_6c8.y)/2);
}else{
x=loc.x;
y=loc.y;
}
if((x+_6c8.x)>_6c7.x){
x=_6c7.x-_6c8.x;
}
if((y+_6c8.y)>_6c7.y){
y=_6c7.y-_6c8.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=new DwtPoint(x,y);
};
DwtBaseDialog.prototype._duringDrag=function(x,y){
};
DwtBaseDialog.prototype._doesContainElement=function(_6d0){
return Dwt.contains(this.getHtmlElement(),_6d0);
};
function DwtDialog(_6d1,_6d2,_6d3,_6d4,_6d5,_6d6,mode,loc){
if(arguments.length==0){
return;
}
_6d2=_6d2||"DwtDialog";
this._title=_6d3||"";
if(!_6d4){
_6d4=[DwtDialog.OK_BUTTON,DwtDialog.CANCEL_BUTTON];
}else{
if(_6d4==DwtDialog.NO_BUTTONS){
_6d4=null;
}
}
this._buttonList=new Array();
if(_6d4||_6d5){
this._buttonDesc=new Object();
if(_6d4&&_6d4.length){
this._enterButtonId=_6d4[0];
for(var i=0;i<_6d4.length;i++){
var _6da=_6d4[i];
this._buttonList.push(_6da);
this._buttonDesc[_6da]=new DwtDialog_ButtonDescriptor(_6da,AjxMsg[DwtDialog.MSG_KEY[_6da]],this.getAlignmentForButton(_6da));
}
this._resetCallbacks();
}
if(_6d5&&_6d5.length){
if(!this._enterButtonId){
this._enterButtonId=_6d5[0];
}
for(var i=0;i<_6d5.length;i++){
var _6da=_6d5[i].id;
this._buttonList.push(_6da);
this._buttonDesc[_6da]=_6d5[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,_6d1,_6d2,this._title,_6d6,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 _6da=this._buttonList[i];
this._button[_6da]=new DwtButton(this);
this._button[_6da].setText(this._buttonDesc[_6da].label);
this._button[_6da].buttonId=_6da;
this._button[_6da].addSelectionListener(new AjxListener(this,this._buttonListener));
document.getElementById(this._buttonElementId[_6da]).appendChild(this._button[_6da].getHtmlElement());
}
this.initializeDragging(this._titleHandleId);
}
DwtDialog.prototype=new DwtBaseDialog;
DwtDialog.prototype.constructor=DwtDialog;
function DwtDialog_ButtonDescriptor(id,_6dc,_6dd,_6de,_6df){
this.id=id;
this.label=_6dc;
this.align=_6dd;
this.callback=_6de;
this.cellTemplate=_6df;
}
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(_6e1){
return this._button[_6e1];
};
DwtDialog.prototype.setButtonEnabled=function(_6e2,_6e3){
this._button[_6e2].setEnabled(_6e3);
};
DwtDialog.prototype.setButtonVisible=function(_6e4,_6e5){
this._button[_6e4].setVisible(_6e5);
};
DwtDialog.prototype.getButtonEnabled=function(_6e6){
return this._button[_6e6].getEnabled();
};
DwtDialog.prototype.registerCallback=function(_6e7,func,obj,args){
this._buttonDesc[_6e7].callback=new AjxCallback(obj,func,args);
};
DwtDialog.prototype.unregisterCallback=function(_6eb){
this._buttonDesc[_6eb].callback=null;
};
DwtDialog.prototype.setButtonListener=function(_6ec,_6ed){
this._button[_6ec].removeSelectionListeners();
this._button[_6ec].addSelectionListener(_6ed);
};
DwtDialog.prototype.setTitle=function(_6ee){
this._title=_6ee;
this._titleCell.innerHTML=_6ee;
};
DwtBaseDialog.prototype._getContentDiv=function(){
return this._contentDiv;
};
DwtDialog.prototype.associateEnterWithButton=function(id){
this._enterButtonId=id;
};
DwtDialog.prototype._getStartBorder=function(){
var html=new Array();
var idx=0;
html[idx++]=DwtBaseDialog.prototype._getStartBorder.call(this);
if(AjxEnv.isNav){
html[idx++]="<input type='button' id='";
html[idx++]=this._focusElementId=Dwt.getNextId();
html[idx++]="' style='height:0px; width:0px;";
html[idx++]="display:none;";
html[idx++]="'>";
}
return html.join("");
};
DwtDialog.prototype._getContentHtml=function(){
var html=new Array();
var idx=0;
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){
var _6f6=new Array();
var _6f7=new Array();
var _6f8=new Array();
for(var i=0;i<this._buttonList.length;i++){
var _6fa=this._buttonList[i];
switch(this._buttonDesc[_6fa].align){
case DwtDialog.ALIGN_RIGHT:
_6f7.push(_6fa);
break;
case DwtDialog.ALIGN_LEFT:
_6f6.push(_6fa);
break;
case DwtDialog.ALIGN_CENTER:
_6f8.push(_6fa);
break;
}
}
html[idx++]=this._getSeparatorTemplate();
html[idx++]=this._getButtonsContainerStartTemplate();
if(_6f6.length){
html[idx++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["left"]);
for(var i=0;i<_6f6.length;i++){
var _6fa=_6f6[i];
var _6fb=this._buttonDesc[_6fa].cellTemplate?this._buttonDesc[_6fa].cellTemplate:this._getButtonsCellTemplate();
html[idx++]=AjxMessageFormat.format(_6fb,[this._buttonElementId[_6fa]]);
}
html[idx++]=this._getButtonsAlignEndTemplate();
}
if(_6f8.length){
html[idx++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["center"]);
for(var i=0;i<_6f8.length;i++){
var _6fa=_6f8[i];
var _6fb=this._buttonDesc[_6fa].cellTemplate?this._buttonDesc[_6fa].cellTemplate:this._getButtonsCellTemplate();
html[idx++]=AjxMessageFormat.format(_6fb,[this._buttonElementId[_6fa]]);
}
html[idx++]=this._getButtonsAlignEndTemplate();
}
if(_6f7.length){
html[idx++]=AjxMessageFormat.format(this._getButtonsAlignStartTemplate(),["right"]);
for(var i=0;i<_6f7.length;i++){
var _6fa=_6f7[i];
var _6fb=this._buttonDesc[_6fa].cellTemplate?this._buttonDesc[_6fa].cellTemplate:this._getButtonsCellTemplate();
html[idx++]=AjxMessageFormat.format(_6fb,[this._buttonElementId[_6fa]]);
}
html[idx++]=this._getButtonsAlignEndTemplate();
}
html[idx++]=this._getButtonsContainerEndTemplate();
}
return idx;
};
DwtDialog.prototype._buttonListener=function(ev,args){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _6ff=obj.buttonId;
this._runCallbackForButtonId(_6ff,args);
};
DwtDialog.prototype._runCallbackForButtonId=function(id,args){
var _702=this._buttonDesc[id].callback;
if(!_702){
return;
}
args=(args instanceof Array)?args:[args];
_702.run.apply(_702,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(_706,_707,_708,_709){
if(arguments.length==0){
return;
}
_708=_708?_708:"DwtLabel";
DwtComposite.call(this,_706,_708,_709);
this._style=_707?_707:(DwtLabel.IMAGE_LEFT|DwtLabel.ALIGN_CENTER);
this._createTable();
this.setCursor("default");
}
DwtLabel.prototype=new DwtComposite;
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._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="100%";
}
}
this._row=this._table.insertRow(0);
this.getHtmlElement().appendChild(this._table);
};
DwtLabel.prototype.setEnabled=function(_70a){
if(_70a!=this._enabled){
DwtControl.prototype.setEnabled.call(this,_70a);
if(_70a){
this._setImage(this._imageInfo);
if(this._textCell!=null){
this._textCell.className="";
}
}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(_70b){
this._imageInfo=_70b;
if(this._enabled||(!this._enabled&&this._disabledImageInfo)){
this._setImage(_70b);
}
};
DwtLabel.prototype.setDisabledImage=function(_70c){
this._disabledImageInfo=_70c;
if(!this._enabled&&_70c){
this._setImage(_70c);
}
};
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 _70e=Dwt.getCellIndex(this._textCell);
this._row.deleteCell(_70e);
}
}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(_710){
this._textBackground=_710;
if(this._textCell){
this._textCell.style.backgroundColor=_710;
}
};
DwtLabel.prototype.setTextForeground=function(_711){
this._textForeground=_711;
if(this._textCell){
this._textCell.style.color=_711;
}
};
DwtLabel.prototype.setAlign=function(_712){
this._style=_712;
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._setImage=function(_713){
if(!_713){
if(this._imageCell){
var _714=Dwt.getCellIndex(this._imageCell);
this._row.deleteCell(_714);
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._doAlign();
}
AjxImg.setImage(this._imageCell,_713);
}
};
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 DwtListView(_716,_717,_718,_719,_71a){
if(arguments.length==0){
return;
}
_717=_717||"DwtListView";
DwtComposite.call(this,_716,_717,_718);
if(_719){
var _71b=this.getHtmlElement();
this._listColDiv=document.createElement("div");
this._listColDiv.id=Dwt.getNextId();
this._listColDiv.className="DwtListView-ColHeader";
_71b.appendChild(this._listColDiv);
this._listDiv=document.createElement("div");
this._listDiv.id=Dwt.getNextId();
this._listDiv.className="DwtListView-Rows";
_71b.appendChild(this._listDiv);
this._bSortAsc=false;
this._currentColId=null;
this._sortingEnabled=true;
}else{
this.setScrollStyle(DwtControl.SCROLL);
}
this._setMouseEventHdlrs();
this.setCursor("default");
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._selEv=new DwtSelectionEvent(true);
this._actionEv=new DwtListViewActionEvent(true);
this._stateChangeEv=new DwtEvent(true);
this._headerList=_719;
this._noMaximize=_71a;
this._parentEl=this._headerList?this._listDiv:this.getHtmlElement();
this._list=null;
this._offset=0;
this._headerColCreated=false;
this._firstSelIndex=-1;
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=24;
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.prototype=new DwtComposite;
DwtListView.prototype.constructor=DwtListView;
DwtListView.prototype.toString=function(){
return "DwtListView";
};
DwtListView.prototype.setEnabled=function(_71c){
DwtComposite.prototype.setEnabled.call(this,_71c);
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(_71c){
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 _71d=this.getSelectedItems();
if(_71d){
var _71e=_71d.getArray();
for(var i=0;i<_71e.length;i++){
var _720=_71e[i];
_720.className=_71c?Dwt.getAttr(_720,"_selectedStyleClass"):Dwt.getAttr(_720,"_selectedDisabledStyleClass");
}
}
};
DwtListView.prototype.createHeaderHtml=function(_721){
if(!this._headerList||this._headerColCreated){
return;
}
var idx=0;
var _723=new Array();
this._headerTableId=DwtListView.HEADER_ID+Dwt.getNextId();
_723[idx++]="<table id='"+this._headerTableId+"' cellpadding=0 cellspacing=0 border=0 height=100%";
_723[idx++]=this._noMaximize?">":" width=100%>";
_723[idx++]="<tr>";
for(i=0;i<this._headerList.length;i++){
var _724=this._headerList[i];
if(!_724._visible){
continue;
}
_723[idx++]="<td id='"+_724._id+"' class='";
_723[idx++]=_724._id==this._currentColId?"DwtListView-Column DwtListView-ColumnActive'":"DwtListView-Column'";
_723[idx++]=_724._width?" width="+_724._width+">":">";
_723[idx++]="<div";
_723[idx++]=_724._width?(" style='width: "+(_724._width+2)+"'>"):">";
_723[idx++]="<table border=0 cellpadding=0 cellspacing=0 width=100%><tr>";
if(_724._iconInfo){
_723[idx++]="<td><center>";
_723[idx++]=AjxImg.getImageHtml(_724._iconInfo);
_723[idx++]="</center></td>";
}
if(_724._label){
_723[idx++]="<td id='"+DwtListView.HEADERITEM_LABEL+_724._id+"'>&nbsp;"+_724._label+"</td>";
}
if(_724._sortable){
var _725=this._bSortAsc?"ColumnUpArrow":"ColumnDownArrow";
var id=DwtListView.HEADERITEM_ARROW+_724._id;
if(_724._sortable==_721){
this._currentColId=_724._id;
_723[idx++]="<td width=10 id='"+id+"'>"+AjxImg.getImageHtml(_725)+"</td>";
}else{
_723[idx++]="<td width=10 id='"+id+"'>"+AjxImg.getImageHtml(_725,"visibility:hidden")+"</td>";
}
}
_723[idx++]="<td width=4>";
_723[idx++]="<table align=right border=0 cellpadding=0 cellspacing=0 width=2 height=100%><tr>";
_723[idx++]="<td class='DwtListView-Sash'><div style='width: 1px; height: "+(DwtListView.HEADERITEM_HEIGHT-2)+"px; background-color: #8A8A8A'></div></td>";
_723[idx++]="<td class='DwtListView-Sash'><div style='width: 1px; height: "+(DwtListView.HEADERITEM_HEIGHT-2)+"px; background-color: #FFFFFF'></div></td>";
_723[idx++]="</tr></table>";
_723[idx++]="</td>";
_723[idx++]="</tr></table>";
_723[idx++]="</div></td>";
}
_723[idx++]="</tr>";
_723[idx++]="</table>";
this._listColDiv.innerHTML=_723.join("");
for(var j=0;j<this._headerList.length;j++){
var cell=document.getElementById(this._headerList[j]._id);
if(cell==null){
continue;
}
var _729=this._headerList[j]._sortable;
if(_729&&_729==_721){
cell.className="DwtListView-Column DwtListView-ColumnActive";
}
var _72a=this._headerList[j]._resizeable;
if(_72a){
var _72b=cell.firstChild.firstChild.rows[0].lastChild;
if(_72b){
_72b._type=DwtListView.TYPE_HEADER_SASH;
_72b._itemIndex=j+"--sash";
}
}
cell._isSortable=_729!=null;
cell._isResizeable=_72a;
cell._type=DwtListView.TYPE_HEADER_ITEM;
cell._itemIndex=j;
}
this._headerColCreated=true;
};
DwtListView.prototype.getColIndexForId=function(_72c){
if(this._headerList){
for(var i=0;i<this._headerList.length;i++){
if(this._headerList[i]._id.indexOf(_72c)!=-1){
return i;
}
}
}
return -1;
};
DwtListView.prototype.set=function(list,_72f){
this._selectedItems.removeAll();
this.enableSorting(true);
this._resetList();
this._list=list;
this._now=new Date();
this.setUI(_72f);
};
DwtListView.prototype.setUI=function(_730,_731){
this.removeAll();
this.createHeaderHtml(_730);
this._renderList(this._list,_731);
};
DwtListView.prototype._renderList=function(list,_733){
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(!_733){
this._setNoResultsHtml();
}
}
};
DwtListView.prototype.addItems=function(_739,_73a){
if(AjxUtil.isArray(_739)){
if(!this._list){
this._list=new AjxVector();
}
if(this._list.size()==0){
this._resetList();
}
var _73b=this._list.size();
var vec=AjxVector.fromArray(_739);
this._renderList(vec);
this._list.addList(_739);
}
};
DwtListView.prototype.addItem=function(item,_73e,_73f){
if(!this._list){
this._list=new AjxVector();
}
if(this._list.size()==0){
this._resetList();
}
this._list.add(item,_73e);
var div=this._createItemHtml(item,this._now);
if(div){
this._addRow(div,_73e);
}
if(!_73f&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtListView.prototype.removeItem=function(item,_742){
var _743=this._getElFromItem(item);
this._selectedItems.remove(_743);
this._parentEl.removeChild(_743);
this._list.remove(item);
if(!_742&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtListView.prototype.removeLastItem=function(_744){
var last=this._list.get(this._list.size()-1);
this._list.remove(last);
this._parentEl.removeChild(this._getElFromItem(last));
if(!_744&&this._evtMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._evtMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtListView.prototype.reIndexColumn=function(_746,_747){
if(this._headerList==null){
return;
}
var len=this._headerList.length;
if(_746<0||_747<0||_746>=len||_747>=len||_746==_747){
return;
}
var temp=this._headerList.splice(_746,1);
this._headerList.splice(_747,0,temp[0]);
this._relayout();
};
DwtListView.prototype.reSizeColumn=function(_74a,_74b){
if(_74b==this._headerList._width||_74b<DwtListView.MIN_COLUMN_WIDTH){
return;
}
this._headerList[_74a]._width=_74b;
this._relayout();
};
DwtListView.prototype._resetColWidth=function(){
if(this._headerList==null){
return;
}
var _74c=this._headerList.length-1;
var _74d=null;
while(_74d==null&&_74c>=0){
if(this._headerList[_74c]._visible){
_74d=_74c;
}
_74c--;
}
var _74e=document.getElementById(this._headerList[_74d]._id);
var div=_74e.firstChild;
var _750=16;
var _751=this._listColDiv.clientWidth;
var _752=this._listDiv.clientWidth;
if(_751!=_752){
_74e.style.width=div.style.width=this._headerList[_74d]._width?(this._headerList[_74d]._width+_750):(_74e.clientWidth+_750);
}else{
_74e.style.width=div.style.width=(this._headerList[_74d]._width||"");
}
};
DwtListView.prototype.size=function(){
if(this._list){
return this._list.size();
}else{
return 0;
}
};
DwtListView.prototype.setMultiSelect=function(_753){
this._multiSelectEnabled=_753;
};
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,_755){
if(_755!=null&&this._parentEl.childNodes.length>0&&_755<this._parentEl.childNodes.length){
this._parentEl.insertBefore(row,this._parentEl.childNodes[_755]);
}else{
this._parentEl.appendChild(row);
}
};
DwtListView.prototype._createItemHtml=function(item,now,_758){
var div=document.createElement("DIV");
div.id=Dwt.getNextId();
var _75a=AjxBuffer.concat(this._className,"Row");
div._styleClass=AjxBuffer.concat("Row ",_75a);
div._selectedStyleClass=AjxBuffer.concat("Row-",DwtCssStyle.SELECTED," ",_75a);
div._selectedDisabledStyleClass=AjxBuffer.concat("Row-",DwtCssStyle.SELECTED,"-",DwtCssStyle.DISABLED," ",_75a);
div.className=div._styleClass;
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 _75b=new Array(5);
var div=document.createElement("div");
var idx=0;
_75b[idx++]="<table width='100%' cellspacing='0' cellpadding='1'>";
_75b[idx++]="<tr><td class='NoResults'><br>";
_75b[idx++]=AjxMsg.noResults;
_75b[idx++]="</td></tr></table>";
div.innerHTML=_75b.join("");
this._addRow(div);
};
DwtListView.prototype.addSelectionListener=function(_75e){
this._evtMgr.addListener(DwtEvent.SELECTION,_75e);
};
DwtListView.prototype.removeSelectionListener=function(_75f){
this._evtMgr.removeListener(DwtEvent.SELECTION,_75f);
};
DwtListView.prototype.addActionListener=function(_760){
this._evtMgr.addListener(DwtEvent.ACTION,_760);
};
DwtListView.prototype.removeActionListener=function(_761){
this._evtMgr.removeListener(DwtEvent.ACTION,_761);
};
DwtListView.prototype.addStateChangeListener=function(_762){
this._evtMgr.addListener(DwtEvent.STATE_CHANGE,_762);
};
DwtListView.prototype.removeStateChangeListener=function(_763){
this._evtMgr.removeListener(DwtEvent.STATE_CHANGE,_763);
};
DwtListView.prototype.removeAll=function(_764){
this._parentEl.innerHTML="";
this._selectedItems.removeAll();
this._selAnchor=null;
if(!_764&&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],"_styleClass");
}
this._selectedItems.removeAll();
this._selAnchor=null;
};
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 _76a=this._selectedItems.size();
for(var i=0;i<_76a;i++){
a[i]=AjxCore.objectWithId(Dwt.getAttr(sa[i],"_itemIndex"));
}
}
return a;
};
DwtListView.prototype.getSelectedItems=function(){
return this._selectedItems;
};
DwtListView.prototype.setSelection=function(item,_76d){
var el=this._getElFromItem(item);
if(el){
var i;
this._deselectAllSelectedItems();
this._selectedItems.add(el);
this._selAnchor=el;
el.className=this.getEnabled()?Dwt.getAttr(el,"_selectedStyleClass"):Dwt.getAttr(el,"_selectedDisabledStyleClass");
this._firstSelIndex=this._list&&this._list.size()>0?this._list.indexOf(item):-1;
if(!_76d&&this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){
var _770=new DwtSelectionEvent(true);
_770.button=DwtMouseEvent.LEFT;
_770.target=el;
_770.item=AjxCore.objectWithId(Dwt.getAttr(el,"_itemIndex"));
_770.detail=DwtListView.ITEM_SELECTED;
this._evtMgr.notifyListeners(DwtEvent.SELECTION,_770);
}
}
};
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],"_styleClass");
}
this._selectedItems.removeAll();
};
DwtListView.prototype.setSelectedItems=function(_773){
this._deselectAllSelectedItems();
var i,sz,el;
sz=_773.length;
for(i=0;i<sz;++i){
el=this._getElFromItem(_773[i]);
if(el){
el.className=this.getEnabled()?Dwt.getAttr(el,"_selectedStyleClass"):Dwt.getAttr(el,"_selectedDisabledStyleClass");
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,"_styleClass");
this._rightSelItems=null;
}
};
DwtListView.prototype._getItemId=function(item){
return item?(this._getViewPrefix()+item.id):null;
};
DwtListView.prototype._getHeaderTableId=function(){
return this._headerList?this._headerTableId:null;
};
DwtListView.prototype._getElFromItem=function(item){
var _777=this._parentEl.childNodes;
var len=_777.length;
var _779=this._getItemId(item);
for(var i=0;i<len;i++){
if(_777[i].id==_779){
return _777[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(_77f){
var _780=Dwt.getAttr(_77f,"_itemIndex");
if(_780!==void 0){
if(Dwt.getAttr(_77f,"_type")==DwtListView.TYPE_LIST_ITEM){
return AjxCore.objectWithId(_780);
}
}
return null;
};
DwtListView.prototype._getViewPrefix=function(){
return "";
};
DwtListView.prototype.associateItemWithElement=function(item,_782,type,_784){
_782.id=_784?_784:this._getItemId(item);
_782._itemIndex=AjxCore.assignId(item);
_782._type=type;
};
DwtListView.prototype._isValidDragObject=function(ev){
var div=ev.target;
div=this._findAncestor(div,"_itemIndex");
return (div!=null);
};
DwtListView.prototype.dragSelect=function(row){
if(this._dragHighlight!=null){
var _788=document.getElementById(this._dragHighlight);
if(!row||row.id!=_788.id){
this._updateDragSelection(_788,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 _78a=document.getElementById(this._dragHighlight);
this._updateDragSelection(_78a,false);
this._dragHighlight=null;
}
};
DwtListView.prototype._updateDragSelection=function(row,_78c){
if(!_78c){
row.className=row._dwtListViewOldClassName;
}else{
row._dwtListViewOldClassName=row.className;
row.className=row.className+"-drag";
}
};
DwtListView.prototype._mouseOverAction=function(_78d,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 _790=this._selectedItems.getArray();
div.hoverSet=true;
for(var i=0;i<_790.length;i++){
if(div==_790[i]){
div.hoverSet=false;
break;
}
}
}
if(div.hoverSet){
div.className+=" "+div._hoverStyleClass;
}
}
}
}
return true;
};
DwtListView.prototype._mouseOutAction=function(_792,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,"_styleClass");
}
}
}
}
return true;
};
DwtListView.prototype._mouseOverListener=function(ev){
var div=ev.target;
div=this._findAncestor(div,"_itemIndex");
if(!div){
return;
}
this._mouseOverAction(ev,div);
};
DwtListView.prototype._mouseOutListener=function(ev){
var div=ev.target;
div=this._findAncestor(div,"_itemIndex");
if(!div){
return;
}
this._toolTipContent=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(_79b,div){
return true;
};
DwtListView.prototype._findAncestor=function(elem,attr){
while(elem&&(Dwt.getAttr(elem,attr)==void 0)){
elem=elem.parentNode;
}
return elem;
};
DwtListView.prototype._mouseDownListener=function(ev){
var div=ev.target;
div=this._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=this._findAncestor(div,"_itemIndex");
var _7a3=this._handleColHeaderDrop(ev);
var _7a4=this._handleColSashDrop(ev);
if(!div||div!=this._clickDiv||_7a3||_7a4){
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 _7a6=this._getActionMenuForColHeader();
if(_7a6&&_7a6 instanceof DwtMenu){
_7a6.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(_7a7,div){
return true;
};
DwtListView.prototype._doubleClickListener=function(ev){
var div=ev.target;
div=this._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){
var ev=new Object();
ev.target=div;
ev.button=DwtMouseEvent.LEFT;
this._itemClicked(div,ev);
this._doubleClickListener(ev);
}
};
DwtListView.prototype._itemClicked=function(_7ae,ev){
var i;
var a=this._selectedItems.getArray();
var _7b2=this._selectedItems.size();
if(this._rightSelItems){
this._rightSelItems.className=Dwt.getAttr(this._rightSelItems,"_styleClass");
this._rightSelItems=null;
}
if((!ev.shiftKey&&!ev.ctrlKey)||!this.isMultiSelectEnabled()){
if(ev.button==DwtMouseEvent.LEFT||ev.button==DwtMouseEvent.RIGHT){
this._selEv.detail=DwtListView.ITEM_SELECTED;
}
var _7b3=this._selectedItems.contains(_7ae);
if(ev.button==DwtMouseEvent.LEFT){
if(this._allowLeftSelection(_7ae,ev,ev.button)){
for(i=0;i<_7b2;i++){
a[i].className=Dwt.getAttr(a[i],"_styleClass");
}
this._selectedItems.removeAll();
this._selectedItems.add(_7ae);
this._selAnchor=_7ae;
_7ae.className=Dwt.getAttr(_7ae,"_selectedStyleClass");
this._firstSelIndex=this._list?this._list.indexOf(AjxCore.objectWithId(Dwt.getAttr(_7ae,"_itemIndex"))):-1;
}
}else{
if(ev.button==DwtMouseEvent.RIGHT&&!_7b3){
this._rightSelItems=_7ae;
_7ae.className=Dwt.getAttr(_7ae,"_selectedStyleClass")+"-right";
}
}
_7ae.hoverSet=false;
}else{
if(ev.ctrlKey){
if(this._selectedItems.contains(_7ae)){
this._selectedItems.remove(_7ae);
_7ae.className=Dwt.getAttr(_7ae,"_styleClass");
this._selEv.detail=DwtListView.ITEM_DESELECTED;
}else{
this._selectedItems.add(_7ae);
_7ae.className=Dwt.getAttr(_7ae,"_selectedStyleClass");
_7ae.hoverSet=false;
this._selEv.detail=DwtListView.ITEM_SELECTED;
}
this._selAnchor=_7ae;
}else{
if(this._selAnchor==null){
return;
}
var _7b4=this._getChildren()||_7ae.parentNode.childNodes;
var _7b5=_7b4.length;
var _7b6;
var _7b7=0;
for(i=0;i<_7b5;i++){
_7b6=_7b4[i];
if(_7b6==this._rightSelItems){
this._rightSelItems=null;
}
if(_7b6==_7ae){
_7b7++;
}
var _7b8=Dwt.getAttr(_7b6,"_selectedStyleClass");
if(_7b6==this._selAnchor){
_7b7++;
if(_7b6.className!=_7b8){
_7b6.className=_7b8;
this._selectedItems.add(_7b6);
}
continue;
}
if(_7b7!=1&&_7b6.className==_7b8&&_7b6!=_7ae){
_7b6.className=Dwt.getAttr(_7b6,"_styleClass");
this._selectedItems.remove(_7b6);
}else{
if(_7b7==1||_7b6==_7ae){
if(_7b6.className!=_7b8){
_7b6.className=_7b8;
_7b6.hoverSet=false;
this._selectedItems.add(_7b6);
}
}
}
}
var _7b9=this._selectedItems.size();
if(_7b2<_7b9){
this._selEv.detail=DwtListView.ITEM_SELECTED;
}else{
if(_7b2>_7b9){
this._selEv.detail=DwtListView.ITEM_DESELECTED;
}else{
return;
}
}
}
}
if(ev.button==DwtMouseEvent.LEFT&&this._evtMgr.isListenerRegistered(DwtEvent.SELECTION)){
if(this._setListEvent(ev,this._selEv,_7ae)){
this._evtMgr.notifyListeners(DwtEvent.SELECTION,this._selEv);
}
}else{
if(ev.button==DwtMouseEvent.RIGHT&&this._evtMgr.isListenerRegistered(DwtEvent.ACTION)){
if(this._setListEvent(ev,this._actionEv,_7ae)){
this._evtMgr.notifyListeners(DwtEvent.ACTION,this._actionEv);
}
}
}
};
DwtListView.prototype._setListEvent=function(ev,_7bb,_7bc){
DwtUiEvent.copy(_7bb,ev);
_7bb.item=AjxCore.objectWithId(Dwt.getAttr(_7bc,"_itemIndex"));
return true;
};
DwtListView.prototype._columnClicked=function(_7bd,ev){
var list=this.getList();
if(!list){
return;
}
var size=list.size();
if(!size){
return;
}
var item=this._headerList[Dwt.getAttr(_7bd,"_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(_7c2,_7c3){
};
DwtListView.prototype._getActionMenuForColHeader=function(){
return null;
};
DwtListView.prototype._getDefaultSortbyForCol=function(_7c4){
return true;
};
DwtListView.prototype._allowLeftSelection=function(_7c5,ev,_7c7){
return true;
};
DwtListView.prototype._setSortedColStyle=function(_7c8){
if(this._currentColId!=null&&_7c8!=this._currentColId){
oldArrowId=DwtListView.HEADERITEM_ARROW+this._currentColId;
oldArrowCell=document.getElementById(oldArrowId);
if(oldArrowCell&&oldArrowCell.firstChild){
var _7c9=(AjxImg._mode==AjxImg.SINGLE_IMG)?oldArrowCell.firstChild:oldArrowCell.firstChild.firstChild;
if(_7c9){
_7c9.style.visibility="hidden";
}
}
var _7ca=document.getElementById(this._currentColId);
if(_7ca){
_7ca.className="DwtListView-Column";
}
}
this._currentColId=_7c8;
var _7cb=DwtListView.HEADERITEM_ARROW+_7c8;
var _7cc=document.getElementById(_7cb);
if(_7cc){
AjxImg.setImage(_7cc,this._bSortAsc?"ColumnUpArrow":"ColumnDownArrow");
var _7c9=(AjxImg._mode==AjxImg.SINGLE_IMG)?_7cc.firstChild:_7cc.firstChild.firstChild;
if(_7c9){
_7c9.style.visibility="visible";
}
}
var _7cd=document.getElementById(_7c8);
if(_7cd){
_7cd.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(){
while(this._parentEl.hasChildNodes()){
cDiv=this._parentEl.removeChild(this._parentEl.firstChild);
AjxCore.unassignId(Dwt.getAttr(cDiv,"_itemIndex"));
}
};
DwtListView.prototype._destroyDnDIcon=function(icon){
var _7cf=Dwt.getAttr(icon,"_itemIndex");
if(_7cf){
AjxCore.unassignId(_7cf);
}
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 _7d1=Math.abs(this._headerColX-ev.docX);
if(_7d1<DwtListView.COL_MOVE_THRESHOLD){
return;
}
}
this._headerClone=document.createElement("div");
var size=Dwt.getSize(this._clickDiv);
var _7d3=AjxEnv.isIE?size.x:size.x-3;
var _7d4=AjxEnv.isIE?size.y:size.y-5;
Dwt.setSize(this._headerClone,_7d3,_7d4);
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 _7d5=document.getElementById(DwtListView.HEADERITEM_LABEL+this._clickDiv.id);
if(_7d5){
_7d5.style.color="white";
}
this.shell.getHtmlElement().appendChild(this._headerClone);
}else{
var _7d6=this._findAncestor(ev.target,"_itemIndex");
if(_7d6&&Dwt.getAttr(_7d6,"_type")==DwtListView.TYPE_HEADER_ITEM){
if(this._headerCloneTarget&&this._headerCloneTarget==this._clickDiv){
this._headerCloneTarget=null;
}else{
if(this._headerCloneTarget!=_7d6){
this._headerCloneTarget=_7d6;
}
}
}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 _7d8=this._getParentForColResize();
var loc=Dwt.toWindow(_7d8.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 _7db=Dwt.getAttr(this._clickDiv,"_itemIndex");
var _7dc=Dwt.getAttr(this._headerCloneTarget,"_itemIndex");
this.reIndexColumn(_7db,_7dc);
}
this._clickDiv.className=this._clickDiv.id!=this._currentColId?"DwtListView-Column":"DwtListView-Column DwtListView-ColumnActive";
wasDraggingCol=true;
var _7dd=this._headerClone.parentNode;
if(_7dd){
_7dd.removeChild(this._headerClone);
}else{
}
delete this._headerClone;
if(Dwt.getAttr(this._clickDiv,"_type")!=DwtListView.TYPE_HEADER_ITEM){
var _7de=this._getSortableFromColId(this._currentColId);
this._headerColCreated=false;
this.createHeaderHtml(_7de);
}else{
var _7df=document.getElementById(DwtListView.HEADERITEM_LABEL+this._clickDiv.id);
if(_7df){
_7df.style.color="black";
}
}
this._resetColWidth();
return true;
};
DwtListView.prototype._handleColSashDrop=function(ev){
if(this._headerSash==null||ev.button==DwtMouseEvent.RIGHT){
return false;
}
var _7e1=ev.docX-this._headerSashX;
var _7e2=Dwt.getAttr(this._clickDiv,"_itemIndex");
var _7e3=_7e2.indexOf("--sash");
var _7e4=parseInt(_7e2.substring(0,_7e3));
if(_7e4>=0&&_7e4<this._headerList.length){
var _7e5=null;
if(this._headerList[_7e4]._width){
_7e5=this._headerList[_7e4]._width+_7e1;
}else{
var _7e6=this._headerList[_7e4+1];
if(_7e6&&_7e6._width&&_7e6._resizeable){
var cell=document.getElementById(_7e6._id);
_7e5=cell?Dwt.getSize(cell).x+_7e1:null;
}
}
this.reSizeColumn(_7e4,_7e5);
}else{
}
var _7e8=this._headerSash.parentNode;
if(_7e8){
_7e8.removeChild(this._headerSash);
}
delete this._headerSash;
this._resetColWidth();
return true;
};
DwtListView.prototype._relayout=function(){
this._headerColCreated=false;
var _7e9=this._getSortableFromColId(this._currentColId);
var sel=this.getSelection()[0];
this.setUI(_7e9);
this.setSelection(sel,true);
};
DwtListView.prototype._getSortableFromColId=function(_7eb){
var _7ec=null;
for(var i=0;i<this._headerList.length;i++){
if(this._headerList[i]._id==_7eb){
_7ec=this._headerList[i]._sortable;
break;
}
}
return _7ec;
};
DwtListView.prototype._getParentForColResize=function(){
return this;
};
DwtListView.prototype.setSize=function(_7ee,_7ef){
DwtComposite.prototype.setSize.call(this,_7ee,_7ef);
this._sizeChildren(_7ef);
};
DwtListView.prototype.setBounds=function(x,y,_7f2,_7f3){
DwtComposite.prototype.setBounds.call(this,x,y,_7f2,_7f3);
this._sizeChildren(_7f3);
};
DwtListView.prototype._sizeChildren=function(_7f4){
if(this._listDiv&&(_7f4!=Dwt.DEFAULT)){
Dwt.setSize(this._listDiv,Dwt.DEFAULT,_7f4-DwtListView.HEADERITEM_HEIGHT);
}
};
DwtListView.prototype._getChildren=function(){
return null;
};
DwtListView.prototype.setSortByAsc=function(_7f5,_7f6){
if(!this._headerList){
return;
}
this._bSortAsc=_7f6;
var _7f7=null;
for(var i=0;i<this._headerList.length;i++){
if(this._headerList[i]._sortable&&this._headerList[i]._sortable==_7f5){
_7f7=this._headerList[i]._id;
break;
}
}
if(_7f7){
this._setSortedColStyle(_7f7);
}
};
DwtListView.prototype.enableSorting=function(_7f9){
this._sortingEnabled=_7f9;
};
DwtListView.prototype.getOffset=function(){
return this._offset;
};
DwtListView.prototype.setOffset=function(_7fa){
this._offset=_7fa;
};
DwtListView.prototype.getNewOffset=function(_7fb){
var _7fc=this.getLimit();
var _7fd=_7fb?this._offset+_7fc:this._offset-_7fc;
if(_7fd<0){
_7fd=0;
}
return _7fd;
};
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);
}
}
};
function DwtListHeaderItem(id,_804,_805,_806,_807,_808,_809,name){
this._id=id+Dwt.getNextId();
this._label=_804;
this._iconInfo=_805;
this._width=_806;
this._sortable=_807;
this._resizeable=_808;
this._visible=(_809!==false);
this._name=name||_804;
}
function DwtButton(_80b,_80c,_80d,_80e,_80f){
if(arguments.length==0){
return;
}
_80d=_80d||"DwtButton";
DwtLabel.call(this,_80b,_80c,_80d,_80e);
this._origClassName=_80d;
this._activatedClassName=this._className+"-"+DwtCssStyle.ACTIVATED;
this._triggeredClassName=this._className+"-"+DwtCssStyle.TRIGGERED;
this._toggledClassName=this._className+"-"+DwtCssStyle.TOGGLED;
var _810=[DwtEvent.ONCONTEXTMENU,DwtEvent.ONDBLCLICK,DwtEvent.ONMOUSEDOWN,DwtEvent.ONMOUSEMOVE,DwtEvent.ONMOUSEUP,DwtEvent.ONSELECTSTART];
if(AjxEnv.isIE){
_810.push(DwtEvent.ONMOUSEENTER,DwtEvent.ONMOUSELEAVE);
}else{
_810.push(DwtEvent.ONMOUSEOVER,DwtEvent.ONMOUSEOUT);
}
this._setEventHdlrs(_810);
this._mouseOverListener=new AjxListener(this,DwtButton.prototype._mouseOverListener);
this._mouseOutListener=new AjxListener(this,DwtButton.prototype._mouseOutListener);
this._mouseDownListener=new AjxListener(this,DwtButton.prototype._mouseDownListener);
this._mouseUpListener=new AjxListener(this,DwtButton.prototype._mouseUpListener);
this._addMouseListeners();
this._dropDownEvtMgr=new AjxEventMgr();
this._toggled=false;
this._actionTiming=_80f?_80f:DwtButton.ACTION_MOUSEUP;
}
DwtButton.prototype=new DwtLabel;
DwtButton.prototype.constructor=DwtButton;
DwtButton.TOGGLE_STYLE=DwtLabel._LAST_STYLE*2;
DwtButton.ACTION_MOUSEUP=1;
DwtButton.ACTION_MOUSEDOWN=2;
DwtButton.prototype.toString=function(){
return "DwtButton";
};
DwtButton.prototype.addSelectionListener=function(_811){
this.addListener(DwtEvent.SELECTION,_811);
};
DwtButton.prototype.removeSelectionListener=function(_812){
this.removeListener(DwtEvent.SELECTION,_812);
};
DwtButton.prototype.removeSelectionListeners=function(){
this.removeAllListeners(DwtEvent.SELECTION);
};
DwtButton.prototype.addDropDownSelectionListener=function(_813){
return this._dropDownEvtMgr.addListener(DwtEvent.SELECTION,_813);
};
DwtButton.prototype.removeDropDownSelectionListener=function(_814){
this._dropDownEvtMgr.removeListener(DwtEvent.SELECTION,_814);
};
DwtButton.prototype.setDropDownImages=function(_815,_816,_817,_818){
this._dropDownImg=_815;
this._dropDownDisImg=_816;
this._dropDownHovImg=_817;
this._dropDownDepImg=_818;
};
DwtButton.prototype._addMouseListeners=function(){
this.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
this.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListener);
this.addListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListener);
this.addListener(DwtEvent.ONMOUSEUP,this._mouseUpListener);
};
DwtButton.prototype._removeMouseListeners=function(){
this.removeListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
this.removeListener(DwtEvent.ONMOUSEOUT,this._mouseOutListener);
this.removeListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListener);
this.removeListener(DwtEvent.ONMOUSEUP,this._mouseUpListener);
};
DwtButton.prototype.setEnabled=function(_819){
if(_819!=this._enabled){
DwtLabel.prototype.setEnabled.call(this,_819);
if(_819){
this._addMouseListeners();
if(this._menu){
this._setupDropDownCellMouseHandlers();
AjxImg.setImage(this._dropDownCell,this._dropDownImg);
}
}else{
this.setClassName(this._origClassName);
this._removeMouseListeners();
if(this._menu){
this._removeDropDownCellMouseHandlers();
AjxImg.setImage(this._dropDownCell,this._dropDownDisImg);
}
}
}
};
DwtButton.prototype.setHoverImage=function(_81a){
this._hoverImageInfo=_81a;
};
DwtButton.prototype.setMenu=function(_81b,_81c,_81d){
this._menu=_81b;
this._shouldToggleMenu=(_81c===true);
this._followIconStyle=_81d;
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);
}
}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 _81f=this._menu;
this.setMenu(_81f.run());
}
return this._menu;
};
DwtButton.prototype.resetClassName=function(){
this.setClassName(this._origClassName);
};
DwtButton.prototype.setActionTiming=function(_820){
this._actionTiming=_820;
};
DwtButton.prototype.setActivated=function(_821){
if(_821){
this.setClassName(this._activatedClassName);
}else{
this.setClassName(this._origClassName);
}
};
DwtButton.prototype.setEnabledImage=function(_822){
this._enabledImageInfo=_822;
this.setImage(_822);
};
DwtButton.prototype.setDepressedImage=function(_823){
this._depressedImageInfo=_823;
};
DwtButton.prototype.setToggled=function(_824){
if((this._style&DwtButton.TOGGLE_STYLE)&&this._toggled!=_824){
this._toggled=_824;
this.setClassName((_824)?this._toggledClassName:this._origClassName);
}
};
DwtButton.prototype.isToggled=function(){
return this._toggled;
};
DwtButton.prototype.popup=function(){
var menu=this.getMenu();
var p=menu.parent;
var pb=p.getBounds();
var ws=menu.shell.getSize();
var s=menu.getSize();
var _82a=p.getHtmlElement();
var ptw=Dwt.toWindow(_82a,0,0);
var _82c=(_82a.style.borderLeftWidth=="")?0:parseInt(_82a.style.borderLeftWidth);
var x=ptw.x+_82c;
var _82e=(_82a.style.borderTopWidth=="")?0:parseInt(_82a.style.borderTopWidth);
_82e+=(_82a.style.borderBottomWidth=="")?0:parseInt(_82a.style.borderBottonWidth);
var y=ptw.y+pb.height+_82e;
x=((x+s.x)>=ws.x)?x-(x+s.x-ws.x):x;
menu.popup(0,x,y);
};
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._stopPropagation=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:
var el=this.getHtmlElement();
this.trigger();
if(this.isListenerRegistered(DwtEvent.SELECTION)){
var _833=DwtShell.selectionEvent;
DwtUiEvent.copy(_833,ev);
_833.item=this;
_833.detail=0;
this.notifyListeners(DwtEvent.SELECTION,_833);
}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._depressedImageInfo){
this.setImage(this._hoverImageInfo);
}
if(this._style&DwtButton.TOGGLE_STYLE){
this._toggled=!this._toggled;
}
this.setClassName((!this._toggled)?this._activatedClassName:this._toggledClassName);
};
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 _836=DwtShell.selectionEvent;
DwtUiEvent.copy(_836,ev);
_836.item=this;
_836.detail=0;
this.notifyListeners(DwtEvent.SELECTION,_836);
}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 _83a=DwtShell.mouseEvent;
_83a.setFromDhtmlEvent(ev);
if(_83a.button==DwtMouseEvent.LEFT){
if(this._depImg){
AjxImg.setImage(this,this._depImg);
}
DwtEventManager.notifyListeners(DwtEvent.ONMOUSEDOWN,_83a);
if(obj._menu instanceof AjxCallback){
obj.popup();
}
if(obj._dropDownEvtMgr.isListenerRegistered(DwtEvent.SELECTION)){
var _83b=DwtShell.selectionEvent;
DwtUiEvent.copy(_83b,_83a);
_83b.item=obj;
obj._dropDownEvtMgr.notifyListeners(DwtEvent.SELECTION,_83b);
}else{
if(_83a.button==DwtMouseEvent.LEFT){
obj._toggleMenu();
}
}
}
_83a._stopPropagation=true;
_83a._returnValue=false;
_83a.setToDhtmlEvent(ev);
return false;
};
DwtButton._dropDownCellMouseUpHdlr=function(ev){
var _83d=DwtShell.mouseEvent;
_83d.setFromDhtmlEvent(ev);
if(_83d.button==DwtMouseEvent.LEFT){
if(this._hovImg&&!this.noMenuBar){
AjxImg.setImage(this,this._hovImg);
}
}
_83d._stopPropagation=true;
_83d._returnValue=false;
_83d.setToDhtmlEvent(ev);
return false;
};
function DwtMenuItem(_83e,_83f,_840,_841,_842,_843){
_842=_842||"DwtMenuItem";
DwtComposite.call(this,_83e,_842,_843);
if(!(_83e instanceof DwtMenu)){
throw new DwtException("Parent must be a DwtMenu object",DwtException.INVALIDPARENT,"DwtMenuItem");
}
this._style=_83f?_83f:DwtMenuItem.CASCADE_STYLE;
if(_83e._style==DwtMenu.BAR_STYLE&&this._style!=DwtMenuItem.PUSH_STYLE){
throw new DwtException("DwtMenuItemInit: invalid style",DwtException.INVALID_PARAM,"DwtMenuItem");
}
this._setMouseEventHdlrs();
this._origClassName=_842;
this._selectedClassName=_842+"-"+DwtCssStyle.SELECTED;
this._triggeredClassName=_842+"-"+DwtCssStyle.TRIGGERED;
this._iconAreaClassName=_842+"-IconArea";
this._iconAreaSelClassname=this._iconAreaClassName+"-"+DwtCssStyle.SELECTED;
this._checkedAreaClassName=_842+"-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(_840);
break;
case DwtMenuItem.SELECT_STYLE:
this._createSelectStyle();
break;
default:
this._createCascadeStyle();
}
this._mouseOverListener=new AjxListener(this,DwtMenuItem.prototype._mouseOverListener);
this._mouseOutListener=new AjxListener(this,DwtMenuItem.prototype._mouseOutListener);
this._mouseUpListener=new AjxListener(this,DwtMenuItem.prototype._mouseUpListener);
this._mouseDownListener=new AjxListener(this,DwtMenuItem.prototype._mouseDownListener);
this.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
this.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListener);
this.addListener(DwtEvent.ONMOUSEUP,this._mouseUpListener);
this.addListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListener);
this.getHtmlElement().appendChild(this._table);
if(_83e._addItem){
_83e._addItem(this,_841);
}
this.setCursor("default");
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._MENU_POPUP_DELAY=250;
DwtMenuItem._MENU_POPDOWN_DELAY=250;
DwtMenuItem.create=function(_844,_845,text,_847,_848,_849,_84a,idx,_84c,_84d){
var mi=new DwtMenuItem(_844,_849,_84a,idx,_84c,_84d);
if(_845){
mi.setImage(_845);
}
if(text){
mi.setText(text);
}
if(_847){
mi.setDisabledImage(_847);
}
mi.setEnabled(_848!==false);
return mi;
};
DwtMenuItem.prototype.addSelectionListener=function(_84f){
this.addListener(DwtEvent.SELECTION,_84f);
};
DwtMenuItem.prototype.removeSelectionListener=function(_850){
this.removeListener(DwtEvent.SELECTION,_850);
};
DwtMenuItem.prototype.getChecked=function(){
return this._itemChecked;
};
DwtMenuItem.prototype.setChecked=function(_851,_852){
this._setChecked(_851,null,_852);
};
DwtMenuItem.prototype._setChecked=function(_853,ev,_855){
if((this._style==DwtMenuItem.CHECK_STYLE||this._style==DwtMenuItem.RADIO_STYLE)&&this._itemChecked!=_853){
this._itemChecked=_853;
if(_853){
if(this._style==DwtMenuItem.CHECK_STYLE){
AjxImg.setImage(this._checkedCell,"MenuCheck");
}else{
AjxImg.setImage(this._checkedCell,"MenuRadio");
this.parent._radioItemSelected(this,_855);
}
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(_855){
return;
}
var _857=DwtShell.selectionEvent;
if(ev){
DwtUiEvent.copy(_857,ev);
}else{
_857.reset();
}
_857.item=this;
_857.detail=(_853)?DwtMenuItem.CHECKED:DwtMenuItem.UNCHECKED;
this.notifyListeners(DwtEvent.SELECTION,_857);
}
};
DwtMenuItem.prototype.setEnabled=function(_858){
if(_858!=this._enabled){
DwtControl.prototype.setEnabled.call(this,_858);
if(_858){
this.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
this.addListener(DwtEvent.ONMOUSEOUT,this._mouseOutListener);
this.addListener(DwtEvent.ONMOUSEUP,this._mouseUpListener);
this.addListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListener);
if(this._imageInfo){
this._setImage(this._imageInfo);
}
if(this._textCell){
this._textCell.className="Text";
}
}else{
this.removeListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
this.removeListener(DwtEvent.ONMOUSEOUT,this._mouseOutListener);
this.removeListener(DwtEvent.ONMOUSEUP,this._mouseUpListener);
this.removeListener(DwtEvent.ONMOUSEDOWN,this._mouseDownListener);
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(_859){
this._disabledImageInfo=_859;
if(!this._enabled&&_859){
this._setImage(_859);
}
};
DwtMenuItem.prototype.getImage=function(){
return this._imageInfo;
};
DwtMenuItem.prototype.setImage=function(_85a){
this._imageInfo=_85a;
if(this._enabled||(!this._enabled&&!this._disabledImageInfo)){
this._setImage(_85a);
}
};
DwtMenuItem.prototype._setImage=function(_85b){
if(this._imageInfo==null){
return;
}
if(this._iconCell==null){
this._addIconCell(this);
this.parent._menuItemHasIcon();
}
if(this._style!=DwtMenuItem.SEPARATOR_STYLE){
AjxImg.setImage(this._iconCell,_85b);
}
};
DwtMenuItem.prototype.getMenu=function(){
if(this._menu instanceof AjxCallback){
var _85c=this._menu;
this.setMenu(_85c.run());
}
return this._menu;
};
DwtMenuItem.prototype.setMenu=function(_85d){
if(this._menu==_85d){
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(_85d){
if(!this._menu){
this.parent._submenuItemAdded();
}
AjxImg.setImage(this._cascCell,"Cascade");
}else{
if(!_85d){
if(this._menu){
this.parent._submenuItemRemoved();
}
if(this._cascCell){
AjxImg.setImage(this._cascCell,"Blank_16");
}
}
}
}
this._menu=_85d;
if(_85d&&!(_85d instanceof AjxCallback)){
_85d.addDisposeListener(this._menuDisposeListener);
}
};
DwtMenuItem.prototype.setSize=function(_85e,_85f){
DwtComposite.prototype.setSize.call(this,_85e,_85f);
if(_85e!=DwtControl.DEFAULT){
_85e=(typeof (_85e)=="number")?_85e+"px":_85e;
this._table.style.width=_85e;
}
if(_85f!=DwtControl.DEFAULT){
_85f=(typeof (_85f)=="number")?_85f+"px":_85f;
this._table.style.height=_85f;
}
};
DwtMenuItem.prototype.getText=function(){
if((this._style==DwtMenuItem.SEPARATOR_STYLE)!=0){
return null;
}
return this._textCell.innerHTML;
};
DwtMenuItem.prototype.setText=function(text){
if((this._style==DwtMenuItem.SEPARATOR_STYLE)!=0){
return;
}
this._textCell.innerHTML=text;
};
DwtMenuItem.prototype._createSeparatorStyle=function(){
this._table.style.width="100%";
fillCell=this._row.insertCell(0);
fillCell.className=this._className+"-Separator";
if(this.parent._menuHasCheckedItems()){
this._checkItemAdded();
}
if(this.parent._menuHasItemsWithIcons()){
this._addIconCell();
}
};
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(_863){
this._createCascadeStyle();
this._checkItemAdded();
this._radioGroupId=(_863!=null)?_863:0;
this._itemChecked=false;
};
DwtMenuItem.prototype._checkItemAdded=function(){
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:1;
this._checkedCell.className=this._checkedAreaClassName;
}
};
DwtMenuItem.prototype._checkedItemsRemoved=function(){
this._row.deleteCell(0);
this._checkedCell=null;
};
DwtMenuItem.prototype._submenuItemAdded=function(){
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:1;
}
};
DwtMenuItem.prototype._submenuItemRemoved=function(){
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:1;
this._iconCell.className=this._iconAreaClassName;
}
};
DwtMenuItem.prototype._menuDisposed=function(ev){
this.setMenu(null);
};
DwtMenuItem.prototype._popupMenu=function(_866){
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 _86e;
var _86f;
var _870=pp.getHtmlElement();
if(pp._style==DwtMenu.BAR_STYLE){
_86e=(_870.style.borderLeftWidth=="")?0:parseInt(_870.style.borderLeftWidth);
x=pb.x+_86e;
_86f=(_870.style.borderTopWidth=="")?0:parseInt(_870.style.borderTopWidth);
_86f+=(_870.style.borderBottomWidth=="")?0:parseInt(_870.style.borderBottonWidth);
y=pb.y+pb.height+_86f;
x=((x+s.x)>=ws.x)?x-(x+s.x-ws.x):x;
}else{
_86e=(_870.style.borderLeftWidth=="")?0:parseInt(_870.style.borderLeftWidth);
_86e+=(_870.style.borderRightWidth=="")?0:parseInt(_870.style.borderRightWidth);
x=pb.x+pb.width+_86e;
_86f=(_870.style.borderTopWidth=="")?0:parseInt(_870.style.borderTopWidth);
y=pb.y+_86f;
x=((x+s.x)>=ws.x)?pb.x-s.x-_86e:x;
}
menu.popup(_866,x,y);
};
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("default");
};
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 _875=this.parent._getActiveItem();
this.parent.clearExternallySelectedItems();
if(this._style==DwtMenuItem.CASCADE_STYLE||this._style==DwtMenuItem.CHECK_STYLE||this._style==DwtMenuItem.RADIO_STYLE){
if(_875){
_875._deselect();
}
if(this._iconCell){
this._iconCell.className=this._iconAreaSelClassName;
}
if(this._checkedCell){
this._checkedCell.className=this._checkedAreaSelClassName;
}
if(this._menu){
this._popupMenu(DwtMenuItem._MENU_POPUP_DELAY);
}
this.setSelectedStyle();
}else{
if(this._style==DwtMenuItem.PUSH_STYLE||this._style==DwtMenuItem.SELECT_STYLE){
if(_875){
_875._deselect(0);
}
if(_875&&this._menu){
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 _87a=DwtShell.selectionEvent;
if(ev){
DwtUiEvent.copy(_87a,ev);
}else{
_87a.reset();
}
_87a.item=this;
_87a.detail=(this._itemChecked)?DwtMenuItem.CHECKED:DwtMenuItem.UNCHECKED;
this.notifyListeners(DwtEvent.SELECTION,_87a);
}
}
}else{
if(this._style!=DwtMenuItem.PUSH_STYLE){
if(this._menu){
this._popupMenu(0);
}else{
if(this.isListenerRegistered(DwtEvent.SELECTION)){
this._deselect();
var _87a=DwtShell.selectionEvent;
DwtUiEvent.copy(_87a,ev);
_87a.item=_87a.dwtObj;
_87a.detail=0;
this.notifyListeners(DwtEvent.SELECTION,_87a);
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(_87b,_87c,_87d,_87e,_87f){
if(arguments.length==0){
return;
}
if(_87b){
if(_87b instanceof DwtMenuItem||_87b instanceof DwtButton){
this._style=DwtMenu.DROPDOWN_STYLE;
}else{
this._style=_87c||DwtMenu.POPUP_STYLE;
}
if(!_87e){
_87e=(this._style==DwtMenu.BAR_STYLE)?DwtControl.STATIC_STYLE:DwtControl.ABSOLUTE_STYLE;
}
}
_87d=_87d||"DwtMenu";
DwtComposite.call(this,(_87b instanceof DwtShell)?_87b:_87b.shell,_87d,_87e);
this.parent=_87b;
if(_87b==null){
return;
}
this._dialog=_87f;
var _880=this.getHtmlElement();
Dwt.setLocation(_880,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
if(this._style!=DwtMenu.COLOR_PICKER_STYLE&&this._style!=DwtMenu.CALENDAR_PICKER_STYLE){
this._table=document.createElement("table");
this._table.border=0;
this._table.cellPadding=0;
this._table.cellSpacing=0;
_880.appendChild(this._table);
this._table.backgroundColor=DwtCssStyle.getProperty(_880,"background-color");
}
if(_87c!=DwtMenu.BAR_STYLE){
this.setZIndex(Dwt.Z_HIDDEN);
this._isPoppedup=false;
}else{
DwtMenu._activeMenuIds.add(_880.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._menuCapObj=new DwtMouseEventCapture(this,"DwtMenu",null,DwtMenu._capMouseDownHdlr,null,null,null,false);
}
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._activeMenuUp=false;
DwtMenu._activeMenuIds=new AjxVector();
DwtMenu.prototype.addPopupListener=function(_881){
this.addListener(DwtEvent.POPUP,_881);
};
DwtMenu.prototype.removePopupListener=function(_882){
this.removeListener(DwtEvent.POPUP,_882);
};
DwtMenu.prototype.addPopdownListener=function(_883){
this.addListener(DwtEvent.POPDOWN,_883);
};
DwtMenu.prototype.removePopdownListener=function(_884){
this.removeListener(DwtEvent.POPDOWN,_884);
};
DwtMenu.prototype.getItem=function(_885){
return this._children.get(_885);
};
DwtMenu.prototype.getItemById=function(key,id){
var _888=this.getItems();
for(var i=0;i<_888.length;i++){
var _88a=_888[i].getData(key);
if(_88a==id){
return _888[i];
}
}
return null;
};
DwtMenu.prototype.getItemCount=function(){
return this._children.size();
};
DwtMenu.prototype.getItems=function(){
return this._children.getArray();
};
DwtMenu.prototype.getSelectedItem=function(_88b){
var a=this._children.getArray();
for(var i=0;i<a.length;i++){
var mi=a[i];
if((!_88b||(mi._style==_88b))&&mi.getChecked()){
return mi;
}
}
return null;
};
DwtMenu.prototype.isPoppedup=function(){
return this._isPoppedup;
};
DwtMenu.prototype.popup=function(msec,x,y){
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);
}else{
this._popupAction.args=[x,y];
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.setAssociatedObj=function(_893){
this._associatedObj=_893;
};
DwtMenu.prototype.setAssociatedElementId=function(id){
this._associatedElId=id;
};
DwtMenu.prototype.checkItem=function(_895,_896,_897){
var _898=this._children.getArray();
for(var i=0;i<_898.length;i++){
var item=_898[i];
if(item._style!=DwtMenuItem.CHECK_STYLE&&item._style!=DwtMenuItem.RADIO_STYLE){
continue;
}
var val=item.getData(_895);
if(val==_896){
item.setChecked(true,_897);
}
}
};
DwtMenu.prototype.setSelectedItem=function(_89c){
var mi=this._children.get(_89c);
mi.setSelectedStyle();
this._externallySelected=mi;
};
DwtMenu.prototype.clearExternallySelectedItems=function(){
if(this._externallySelected!=null){
this._externallySelected._deselect();
this._externallySelected=null;
}
};
DwtMenu.prototype.removeChild=function(_89e){
if(this._style==DwtMenu.BAR_STYLE){
var cell=_89e.getHtmlElement().parentNode;
this._table.rows[0].deleteCell(Dwt.getCellIndex(cell));
}else{
var sz=this._children.size();
if(sz>1&&(_89e._style==DwtMenuItem.CHECK_STYLE||_89e._style==DwtMenuItem.RADIO_STYLE)){
if(this._numCheckedStyleItems==1){
var a=this._children.getArray();
for(var i=0;i<sz;i++){
if(a[i]!=_89e){
a[i]._checkedItemsRemoved();
}
}
}
this._numCheckedStyleItems--;
}
if(sz>1&&_89e.getMenu()){
this._submenuItemRemoved();
}
this._table.deleteRow(_89e.getHtmlElement().parentNode.parentNode.rowIndex);
}
this._children.remove(_89e);
};
DwtMenu.prototype.addChild=function(_8a3){
if((_8a3 instanceof DwtColorPicker)||(_8a3 instanceof DwtCalendar)){
this._addItem(_8a3);
}
};
DwtMenu.prototype._addItem=function(item,_8a5){
if(this._style==DwtMenu.COLOR_PICKER_STYLE||this._style==DwtMenu.CALENDAR_PICKER_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)))){
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(_8a5==null||_8a5>row.cells.length){
_8a5=rows.cells.length;
}
col=row.insertCell(_8a5);
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(_8a5==null||_8a5>this._table.rows.length){
_8a5=-1;
}
row=this._table.insertRow(_8a5);
col=row.insertCell(0);
}
col.noWrap=true;
col.appendChild(item.getHtmlElement());
this._children.add(item,_8a5);
}
};
DwtMenu.prototype._radioItemSelected=function(_8ad,_8ae){
var _8af=_8ad._radioGroupId;
var sz=this._children.size();
var a=this._children.getArray();
for(var i=0;i<sz;i++){
if(a[i]!=_8ad&&a[i]._style==DwtMenuItem.RADIO_STYLE&&a[i]._radioGroupId==_8af&&a[i]._itemChecked){
a[i].setChecked(false,_8ae);
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._doPopup=function(x,y){
var ws=this.shell.getSize();
var s=this.getSize();
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 _8c1=this._style==DwtMenu.POPUP_STYLE||(this._style==DwtMenu.DROPDOWN_STYLE&&this.parent instanceof DwtMenuItem)?ws.y:ws.y-y;
var rows=this._table.rows;
var _8c3=rows.length;
var _8c4=s.y;
for(var i=_8c3-1;i>=0;i--){
var row=rows[i];
_8c4-=AjxEnv.isSafari?15:Dwt.getSize(row).y;
if(_8c4<_8c1){
break;
}
}
var _8c7=i;
for(var j=_8c7;j<_8c3;j++){
var row=rows[(j-_8c7)%_8c7];
var cell=row.insertCell(-1);
cell.className="DwtMenuCascadeCell";
var _8ca=rows[j].cells[0].firstChild;
while(_8ca!=null){
cell.appendChild(_8ca);
_8ca=_8ca.nextSibling;
}
}
for(j=rows.length-1;j>=_8c7;j--){
this._table.deleteRow(_8c7);
}
var _8cb=_8c3%_8c7;
if(_8cb>0){
for(var j=_8cb;j<_8c7;j++){
var row=rows[j];
var cell=row.insertCell(-1);
cell.className="DwtMenuCascadeCell";
cell.empty=true;
cell.innerHTML="&nbsp;";
}
}
s=this.getSize();
}
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 _8ce=this.shell.getToolTip();
if(_8ce){
_8ce.popdown();
}
var _8cf=this._dialog?Dwt.Z_DIALOG_MENU:Dwt.Z_MENU;
this.setZIndex(_8cf);
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 _8d0=this.getHtmlElement();
_8d0.style.width=s.x+"px";
}
};
DwtMenu.prototype.getSize=function(_8d1){
if(this._table){
return Dwt.getSize(this._table,_8d1);
}
return DwtComposite.prototype.getSize.call(this,_8d1);
};
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 _8d5=this._table.rows[0].cells.length;
var _8d6=this._table.rows.length;
for(var i=1;i<_8d5;i++){
for(var j=0;j<_8d6;j++){
var cell=this._table.rows[j].cells[i];
if(!cell.empty){
var _8d9=cell.firstChild;
var row=this._table.insertRow(this._table.rows.length);
var cell=row.insertCell(0);
while(_8d9!=null){
cell.appendChild(_8d9);
_8d9=_8d9.nextSibling;
}
}
}
}
for(var j=0;j<_8d6;j++){
var row=this._table.rows[j];
for(var i=row.cells.length-1;i>0;i--){
row.deleteCell(i);
}
}
}
};
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 _8e0=DwtUiEvent.getDwtObjFromEvent(ev);
if(menu._associatedObj&&menu._associatedObj==_8e0){
return false;
}
var id=menu._htmlElId;
var _8e2=DwtUiEvent.getTarget(ev);
while(_8e2!=null){
if(_8e2.id&&_8e2.id!=""&&(_8e2.id==id||_8e2.id==menu._associatedElId||DwtMenu._activeMenuIds.binarySearch(_8e2.id)!=-1)){
return false;
}
_8e2=_8e2.parentNode;
}
menu.popdown();
}
ev._stopPropagation=false;
ev._returnValue=true;
return true;
};
DwtMenu._capMouseDownHdlr=function(ev){
var menu=DwtMouseEventCapture.getTargetObj();
var _8e5=DwtShell.mouseEvent;
_8e5.setFromDhtmlEvent(ev);
DwtMenu._outsideMouseDownListener(_8e5);
DwtUiEvent.setBehaviour(ev,false,true);
return true;
};
DwtMenu.menuShowing=function(){
return DwtMenu._activeMenuUp;
};
DwtMenu.closeActiveMenu=function(){
if(DwtMenu._activeMenuUp){
DwtMenu._activeMenu.popdown();
}
};
function DwtMessageDialog(_8e6,_8e7,_8e8,_8e9){
if(arguments.length==0){
return;
}
this._msgCellId=Dwt.getNextId();
_8e8=_8e8?_8e8:[DwtDialog.OK_BUTTON];
DwtDialog.call(this,_8e6,_8e7,null,_8e8,_8e9);
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.TIME_BASED_PUBLISHING_STYLE=4;
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.TITLE[DwtMessageDialog.TIME_BASED_PUBLISHING_STYLE]=AjxMsg.timebasedpublishingMsg;
DwtMessageDialog.ICON=new Object();
DwtMessageDialog.ICON[DwtMessageDialog.CRITICAL_STYLE]="Critical_32";
DwtMessageDialog.ICON[DwtMessageDialog.INFO_STYLE]="Information_32";
DwtMessageDialog.ICON[DwtMessageDialog.TIME_BASED_PUBLISHING_STYLE]="Clock";
DwtMessageDialog.ICON[DwtMessageDialog.WARNING_STYLE]="Warning_32";
DwtMessageDialog.prototype.toString=function(){
return "DwtMessageDialog";
};
DwtMessageDialog.prototype.setMessage=function(_8ea,_8eb,_8ec){
_8eb=_8eb?_8eb:DwtMessageDialog.INFO_STYLE;
_8ec=_8ec?_8ec:DwtMessageDialog.TITLE[_8eb];
this.setTitle(_8ec);
if(_8ea){
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[_8eb]);
html[i++]="</td><td class='DwtMsgArea'>";
html[i++]=_8ea;
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._contentHtml=function(){
return "<div id='"+this._msgCellId+"' class='DwtMsgDialog'></div>";
};
DwtMessageDialog.prototype._enterListener=function(ev){
this._runEnterCallback();
};
function DwtHtmlEditor(_8f0,_8f1,_8f2,_8f3,mode,_8f5){
if(arguments.length==0){
return;
}
this.setBlankIframeSrc(_8f5);
_8f1=_8f1||"DwtHtmlEditor";
DwtComposite.call(this,_8f0,_8f1,_8f2);
this._mode=mode==DwtHtmlEditor.HTML&&this.isHtmlEditingSupported()?mode:DwtHtmlEditor.TEXT;
this._initialStyle=this._getInitialStyle(true);
var _8f6="<html><head>"+this._getInitialStyle(false)+"</head><body></body></html>";
if(!_8f3){
_8f3=this._mode==DwtHtmlEditor.HTML?_8f6:"";
}
this._pendingContent=_8f3;
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.ARIAL=1;
DwtHtmlEditor.COURIER=2;
DwtHtmlEditor.TIMES=3;
DwtHtmlEditor.VERDANA=4;
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.DIRECTION_R2L;
DwtHtmlEditor.DIRECTION_L2R;
DwtHtmlEditor._ARIAL="Arial, Helvetica, sans-serif";
DwtHtmlEditor._COURIER="Courier New, Courier, mono";
DwtHtmlEditor._TIMES="Times New Roman, Times, serif";
DwtHtmlEditor._VERDANA="Verdana, Arial, Helvetica, sans-serif";
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(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.addStateChangeListener=function(_8f7){
this.addListener(DwtEvent.STATE_CHANGE,_8f7);
};
DwtHtmlEditor.prototype.removeStateChangeListener=function(_8f8){
this.removeListener(DwtEvent.STATE_CHANGE,_8f8);
};
DwtHtmlEditor.prototype.clear=function(){
this.setContent("");
};
DwtHtmlEditor.prototype.enable=function(_8f9){
if(this._textAreaId!=null){
document.getElementById(this._textAreaId).disabled=!_8f9;
}
if(this._iFrameId!=null){
document.getElementById(this._iframeId).disabled=!_8f9;
}
};
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 _8fb=this._getIframeDoc();
return _8fb&&_8fb.body?(this._initialStyle+this._getIframeDoc().body.innerHTML):"";
}else{
return document.getElementById(this._textAreaId).value;
}
};
DwtHtmlEditor.prototype.setContent=function(_8fc){
if(this._mode==DwtHtmlEditor.HTML){
if(this._htmlModeInited){
this._pendingContent=_8fc?((_8fc instanceof AjxVector)?_8fc[0]:_8fc):"";
this._setContentOnTimer();
}else{
var ta=new AjxTimedAction(this,this.setContent,[_8fc]);
AjxTimedAction.scheduleAction(ta,DwtHtmlEditor._INITDELAY+1);
}
}else{
document.getElementById(this._textAreaId).value=(_8fc||"");
}
};
DwtHtmlEditor.prototype.insertElement=function(_8fe){
this._execCommand(_8fe);
};
DwtHtmlEditor.prototype.insertTable=function(rows,cols,_901,_902,_903,_904){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
var doc=this._getIframeDoc();
var _906=doc.createElement("table");
if(_901){
_906.width=_901;
}
if(_904){
_906.align=_904.toLowerCase();
}
if(_902){
_906.cellSpacing=_902;
}
if(_903){
_906.cellPadding=_903;
}
_906.border=1;
_906.style.border="1px solid #000";
_906.rules="all";
_906.style.borderCollapse="collapse";
var _907="";
if(1){
_907=Math.floor(100/cols)+"%";
}
var _908=doc.createElement("tbody");
_906.appendChild(_908);
for(var i=0;i<rows;i++){
var tr=doc.createElement("tr");
_908.appendChild(tr);
for(var j=0;j<cols;j++){
var td=doc.createElement("td");
if(_907){
td.style.width=_907;
}
if(AjxEnv.isGeckoBased){
td.appendChild(doc.createElement("br"));
}
tr.appendChild(td);
}
}
this._insertNodeAtSelection(_906);
};
DwtHtmlEditor.prototype._insertNodeAtSelection=function(node){
if(!AjxEnv.isIE){
var _90e=this._getRange();
this._getIframeWin().getSelection().removeAllRanges();
_90e.deleteContents();
_90e.insertNode(node);
_90e.selectNodeContents(node);
}else{
this._getRange().pasteHTML(node.outerHTML);
}
};
DwtHtmlEditor.prototype.setMode=function(mode,_910){
if(mode==this._mode||(mode!=DwtHtmlEditor.HTML&&mode!=DwtHtmlEditor.TEXT)){
return;
}
this._mode=mode;
if(mode==DwtHtmlEditor.HTML){
var _911=document.getElementById(this._textAreaId);
var _912;
var idoc=this._getIframeDoc();
if(this._iFrameId!=null&&idoc){
idoc.body.innerHTML=(_910)?AjxStringUtil.convertToHtml(_911.value):_911.value;
_912=document.getElementById(this._iFrameId);
}else{
_912=this._initHtmlMode((_910)?AjxStringUtil.convertToHtml(_911.value):_911.value);
}
Dwt.setVisible(_911,false);
Dwt.setVisible(_912,true);
if(AjxEnv.isGeckoBased){
this._enableDesignMode(this._getIframeDoc());
}
}else{
var _911=this._textAreaId!=null?document.getElementById(this._textAreaId):this._initTextMode(true);
var _914=(!this._pendingContent)?this._getIframeDoc().innerHTML:(this._pendingContent||"");
_911.value=(_910)?this._convertHtml2Text():this._getIframeDoc().innerHTML;
Dwt.setVisible(document.getElementById(this._iFrameId),false);
Dwt.setVisible(_911,true);
}
};
DwtHtmlEditor.prototype.setTextDirection=function(_915){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
var dir=(_915==DwtHtmlEditor.DIRECTION_R2L)?"rtl":"ltr";
var el=this._getParentElement();
while(el&&!DwtHtmlEditor._BLOCK_ELEMENTS[el.tagName.toLowerCase()]){
el=el.parentNode;
}
if(el){
el.style.direction=el.style.direction==dir?"":dir;
}
};
DwtHtmlEditor.prototype.setFont=function(_918,_919,size,_91b,_91c){
if(_918){
switch(_918){
case DwtHtmlEditor.ARIAL:
this._execCommand(DwtHtmlEditor._FONT_NAME,DwtHtmlEditor._ARIAL);
break;
case DwtHtmlEditor.COURIER:
this._execCommand(DwtHtmlEditor._FONT_NAME,DwtHtmlEditor._COURIER);
break;
case DwtHtmlEditor.TIMES:
this._execCommand(DwtHtmlEditor._FONT_NAME,DwtHtmlEditor._TIMES);
break;
case DwtHtmlEditor.VERDANA:
this._execCommand(DwtHtmlEditor._FONT_NAME,DwtHtmlEditor._VERDANA);
break;
}
}
if(_919){
this._execCommand(_919);
}
if(size&&size>0&&size<8){
this._execCommand(DwtHtmlEditor._FONT_SIZE,size);
}
if(_91b){
this._execCommand(DwtHtmlEditor._FONT_COLOR,_91b);
}
if(_91c){
this._execCommand((AjxEnv.isIE)?DwtHtmlEditor._FONT_HILITE_IE:DwtHtmlEditor._FONT_HILITE,_91c);
}
};
DwtHtmlEditor.prototype.setJustification=function(_91d){
this._execCommand(_91d);
};
DwtHtmlEditor.prototype.setIndent=function(_91e){
this._execCommand(_91e);
};
DwtHtmlEditor.prototype.setStyle=function(_91f){
this._execCommand(DwtHtmlEditor._FORMAT_BLOCK,DwtHtmlEditor._STYLES[_91f]);
};
DwtHtmlEditor.prototype.setSize=function(_920,_921){
DwtComposite.prototype.setSize.call(this,_920,_921);
var _922=this.getHtmlElement();
if(this._iFrameId!=null){
var _923=document.getElementById(this._iFrameId);
_923.width=_922.style.width;
_923.height=_922.style.height;
}else{
var _924=document.getElementById(this._textAreaId);
_924.style.width=_922.style.width;
_924.style.height=_922.style.height;
}
};
DwtHtmlEditor.prototype.getIframe=function(){
return document.getElementById(this._iFrameId);
};
DwtHtmlEditor.prototype._initialize=function(){
if(this._mode==DwtHtmlEditor.HTML){
this._initHtmlMode(this._pendingContent);
}else{
this._initTextMode();
}
};
DwtHtmlEditor.prototype._initTextMode=function(_925){
var _926=this.getHtmlElement();
this._textAreaId="textarea_"+Dwt.getNextId();
var _927=document.createElement("textarea");
_927.className="DwtHtmlEditorTextArea";
_927.id=this._textAreaId;
_926.appendChild(_927);
if(!_925){
_927.value=this._pendingContent;
this._pendingContent=null;
}
return _927;
};
DwtHtmlEditor.prototype._initHtmlMode=function(_928){
var _929=this._createIFrameEl();
this._keyEvent=new DwtKeyEvent();
this._stateEvent=new DwtHtmlEditorStateEvent();
this._stateEvent.dwtObj=this;
this._updateStateAction=new AjxTimedAction(this,this._updateState);
this._pendingContent=_928||"";
var _92a=new AjxTimedAction(this,this._finishHtmlModeInit);
AjxTimedAction.scheduleAction(_92a,DwtHtmlEditor._INITDELAY);
return _929;
};
DwtHtmlEditor.prototype._getInitialStyle=function(_92b){
var _92c=this._getInitialFontFamily();
var _92d=this._getInitialFontSize();
var _92e=this._getInitialFontColor();
var html=new Array();
var i=0;
if(_92b){
html[i++]="<div style='";
html[i++]="font-family:"+_92c+";";
html[i++]="font-size:"+_92d+";";
html[i++]="color:"+_92e+";";
html[i++]="'>";
}else{
html[i++]="<style type='text/css'>";
html[i++]="p { ";
html[i++]="font-family:"+_92c+";";
html[i++]="font-size:"+_92d+";";
html[i++]="color:"+_92e+";";
html[i++]=" } ";
html[i++]="body { ";
html[i++]="font-family:"+_92c+";";
html[i++]="font-size:"+_92d+";";
html[i++]="color:"+_92e+";";
html[i++]=" } ";
html[i++]="</style>";
}
return html.join("");
};
DwtHtmlEditor.prototype._getInitialFontFamily=function(){
return DwtHtmlEditor._TIMES;
};
DwtHtmlEditor.prototype._getInitialFontSize=function(){
return "12pt";
};
DwtHtmlEditor.prototype._getInitialFontColor=function(){
return "black";
};
DwtHtmlEditor.prototype._createIFrameEl=function(){
var _931=this.getHtmlElement();
this._iFrameId="iframe_"+Dwt.getNextId();
var _932=document.createElement("iframe");
_932.id=this._iFrameId;
_932.className="DwtHtmlEditorIFrame";
_932.setAttribute("border","0",false);
_932.setAttribute("frameborder","0",false);
_932.setAttribute("vspace","0",false);
if(AjxEnv.isIE&&location.protocol=="https:"){
_932.src=this._blankIframeSrc||"";
}
_931.appendChild(_932);
return _932;
};
DwtHtmlEditor.prototype._finishHtmlModeInit=function(_933){
var doc=this._getIframeDoc();
try{
doc.body.innerHTML=this._pendingContent||"";
}
catch(ex){
return;
}
this._enableDesignMode(doc);
this.focus();
this._updateState();
this._htmlModeInited=true;
if(AjxEnv.isIE){
doc.open();
doc.write("");
doc.close();
doc.body.innerHTML=this._pendingContent||"";
}
this._registerEditorEventHandlers(document.getElementById(this._iFrameId),doc);
};
DwtHtmlEditor.prototype._getIframeDoc=function(){
return Dwt.getIframeDoc(document.getElementById(this._iFrameId));
};
DwtHtmlEditor.prototype._getIframeWin=function(){
return Dwt.getIframeWindow(document.getElementById(this._iFrameId));
};
DwtHtmlEditor.prototype._getParentElement=function(){
if(AjxEnv.isIE){
var _935=this._getIframeDoc();
var _936=_935.selection;
var _937=_936.createRange();
if(_936.type=="None"||_936.type=="Text"){
return _936.createRange().parentElement();
}else{
if(_936.type=="Control"){
return _936.createRange().item(0);
}else{
return _935.body;
}
}
}else{
try{
var _937=this._getRange();
var p=_937.commonAncestorContainer;
if(!_937.collapsed&&_937.startContainer==_937.endContainer&&_937.startOffset-_937.endOffset<=1&&_937.startContainer.hasChildNodes()){
p=_937.startContainer.childNodes[_937.startOffset];
}
while(p.nodeType==3){
p=p.parentNode;
}
return p;
}
catch(e){
return null;
}
}
};
DwtHtmlEditor.prototype._getRange=function(){
var _939=this._getIframeDoc();
if(AjxEnv.isIE){
return _939.selection;
}else{
this.focus();
var _93a=this._getIframeWin().getSelection();
if(_93a!=null){
try{
return _93a.getRangeAt(0);
}
catch(e){
return _939.createRange();
}
}else{
return _939.createRange();
}
}
};
DwtHtmlEditor.prototype.__eventClosure=function(ev){
if(this._handleEditorEvent==undefined){
return;
}
return this._handleEditorEvent(AjxEnv.isIE?this._getIframeWin().event:ev);
};
DwtHtmlEditor.prototype._registerEditorEventHandlers=function(_93c,_93d){
var _93e=["mouseup","keydown","keypress","drag","mousedown"];
for(var i=0;i<_93e.length;++i){
if(AjxEnv.isIE){
_93d.attachEvent("on"+_93e[i],this.__eventClosure);
}else{
_93d.addEventListener(_93e[i],this.__eventClosure,true);
}
}
};
DwtHtmlEditor.prototype._handleEditorEvent=function(ev){
var _941=true;
if(ev.type=="mousedown"){
DwtMenu._outsideMouseDownListener(ev);
}
if(DwtKeyEvent.isKeyPressEvent(ev)){
var ke=this._keyEvent;
ke.setFromDhtmlEvent(ev);
if(ke.ctrlKey){
var key=String.fromCharCode(ke.charCode).toLowerCase();
var cmd=null;
var _945=null;
switch(key){
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
cmd=DwtHtmlEditor._FORMAT_BLOCK;
_945=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);
_941=false;
break;
default:
cmd=DwtHtmlEditor._KEY2CMDS[key];
break;
}
if(cmd){
this._execCommand(cmd,_945);
ke._stopPropagation=true;
ke._returnValue=false;
ke.setToDhtmlEvent(ev);
_941=false;
}
}
}
if(AjxEnv.isIE){
var _946=this._getIframeDoc();
this._currInsPt=_946.selection.createRange();
if(_946.selection.type=="None"){
this._currInsPt.collapse(false);
this._currInsPt.text="";
}
}
if(this._stateUpdateActionId!=null){
AjxTimedAction.cancelAction(this._stateUpdateActionId);
}
this._stateUpdateActionId=AjxTimedAction.scheduleAction(this._updateStateAction,100);
return _941;
};
DwtHtmlEditor.prototype._updateState=function(){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
this._stateUpdateActionId=null;
var ev=this._stateEvent;
ev.reset();
var _948=this._getIframeDoc();
try{
ev.isBold=_948.queryCommandState(DwtHtmlEditor.BOLD_STYLE);
ev.isItalic=_948.queryCommandState(DwtHtmlEditor.ITALIC_STYLE);
ev.isUnderline=_948.queryCommandState(DwtHtmlEditor.UNDERLINE_STYLE);
ev.isStrikeThru=_948.queryCommandState(DwtHtmlEditor.STRIKETHRU_STYLE);
ev.isSuperscript=_948.queryCommandState(DwtHtmlEditor.SUPERSCRIPT_STYLE);
ev.isSubscript=_948.queryCommandState(DwtHtmlEditor.SUBSCRIPT_STYLE);
ev.isOrderedList=_948.queryCommandState(DwtHtmlEditor.ORDERED_LIST);
ev.isUnorderedList=_948.queryCommandState(DwtHtmlEditor.UNORDERED_LIST);
var _949=_948.queryCommandValue(DwtHtmlEditor._FONT_NAME);
if(_949){
_949=_949.toLowerCase();
if(_949.search(DwtHtmlEditor._VERDANA_RE)!=-1){
ev.fontFamily=DwtHtmlEditor.VERDANA;
}else{
if(_949.search(DwtHtmlEditor._ARIAL_RE)!=-1){
ev.fontFamily=DwtHtmlEditor.ARIAL;
}else{
if(_949.search(DwtHtmlEditor._TIMES_RE)!=-1){
ev.fontFamily=DwtHtmlEditor.TIMES;
}else{
if(_949.search(DwtHtmlEditor._COURIER_RE)!=-1){
ev.fontFamily=DwtHtmlEditor.COURIER;
}
}
}
}
}
ev.fontSize=_948.queryCommandValue(DwtHtmlEditor._FONT_SIZE);
ev.backgroundColor=_948.queryCommandValue((AjxEnv.isIE)?"backcolor":"hilitecolor");
ev.color=_948.queryCommandValue("forecolor");
ev.justification=null;
ev.direction=null;
var _94a=_948.queryCommandValue(DwtHtmlEditor._FORMAT_BLOCK);
if(_94a){
if(_94a.search(DwtHtmlEditor._H1_RE)!=-1){
ev.style=DwtHtmlEditor.H1;
}else{
if(_94a.search(DwtHtmlEditor._H2_RE)!=-1){
ev.style=DwtHtmlEditor.H2;
}else{
if(_94a.search(DwtHtmlEditor._H3_RE)!=-1){
ev.style=DwtHtmlEditor.H3;
}else{
if(_94a.search(DwtHtmlEditor._H4_RE)!=-1){
ev.style=DwtHtmlEditor.H4;
}else{
if(_94a.search(DwtHtmlEditor._H5_RE)!=-1){
ev.style=DwtHtmlEditor.H5;
}else{
if(_94a.search(DwtHtmlEditor._H6_RE)!=-1){
ev.style=DwtHtmlEditor.H6;
}else{
if(_94a.search(DwtHtmlEditor._PARAGRAPH_RE)!=-1){
ev.style=DwtHtmlEditor.PARAGRAPH;
}else{
if(_94a.search(DwtHtmlEditor._ADDRESS_RE)!=-1){
ev.style=DwtHtmlEditor.ADDRESS;
}else{
if(_94a.search(DwtHtmlEditor._PREFORMATTED_RE)!=-1){
ev.style=DwtHtmlEditor.PREFORMATTED;
}
}
}
}
}
}
}
}
}
}
if(_948.queryCommandState(DwtHtmlEditor.JUSTIFY_LEFT)){
ev.justification=DwtHtmlEditor.JUSTIFY_LEFT;
}else{
if(_948.queryCommandState(DwtHtmlEditor.JUSTIFY_CENTER)){
ev.justification=DwtHtmlEditor.JUSTIFY_CENTER;
}else{
if(_948.queryCommandState(DwtHtmlEditor.JUSTIFY_RIGHT)){
ev.justification=DwtHtmlEditor.JUSTIFY_RIGHT;
}else{
if(_948.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(_948);
}
}
};
DwtHtmlEditor.prototype._enableDesignMode=function(_94b){
if(!_94b){
return;
}
try{
_94b.designMode="on";
if(AjxEnv.isGeckoBased&&(AjxEnv.isLinux||AjxEnv.isMac)){
this._registerEditorEventHandlers(document.getElementById(this._iFrameId),_94b);
}
}
catch(ex){
if(AjxEnv.isGeckoBased){
var ta=new AjxTimedAction(this,this._enableDesignMode,[_94b]);
AjxTimedAction.scheduleAction(ta,10);
return true;
}else{
return false;
}
}
};
DwtHtmlEditor.prototype._setContentOnTimer=function(){
var _94d=this._getIframeDoc();
try{
_94d.body.innerHTML=this._pendingContent;
if(AjxEnv.isGeckoBased){
this._enableDesignMode(_94d);
}
}
catch(ex){
var ta=new AjxTimedAction(this,this._setContentOnTimer);
AjxTimedAction.scheduleAction(ta,10);
return true;
}
};
DwtHtmlEditor.prototype._execCommand=function(_94f,_950){
if(this._mode!=DwtHtmlEditor.HTML){
return;
}
try{
this.focus();
this._getIframeDoc().execCommand(_94f,false,_950);
}
catch(e){
this._enableDesignMode(this._getIframeDoc());
}
this._updateState();
};
DwtHtmlEditor.prototype._convertHtml2Text=function(){
var _951=this._getIframeDoc();
return _951&&_951.body?AjxStringUtil.convertHtml2Text(_951.body):"";
};
function DwtSash(_952,_953,_954,_955,_956){
_954=_954?_954:"DwtSash";
_956=_956?_956:DwtControl.ABSOLUTE_STYLE;
DwtControl.call(this,_952,_954,_956);
var _957=this.getHtmlElement();
if(_953==null||_953!=DwtSash.HORIZONTAL_STYLE){
this._style=DwtSash.VERTICAL_STYLE;
_957.style.cursor=AjxEnv.isIE?"row-resize":"n-resize";
_957.innerHTML=DwtBorder.getBorderHtml("h_sash");
}else{
this._style=DwtSash.HORIZONTAL_STYLE;
_957.style.cursor=AjxEnv.isIE?"col-resize":"e-resize";
}
this._threshold=(_955>0)?_955: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(_958,_959){
this._callbackFunc=_958;
this._callbackObj=_959;
};
DwtSash._mouseOverHdlr=function(ev){
var _95b=DwtShell.mouseEvent;
_95b.setFromDhtmlEvent(ev);
_95b._stopPropagation=true;
_95b._returnValue=false;
_95b.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseDownHdlr=function(ev){
var _95d=DwtShell.mouseEvent;
_95d.setFromDhtmlEvent(ev);
if(_95d.button!=DwtMouseEvent.LEFT){
DwtUiEvent.setBehaviour(ev,true,false);
return false;
}
var sash=_95d.dwtObj;
if(sash._callbackFunc!=null){
sash._captureObj.capture();
sash._startCoord=(sash._style==DwtSash.HORIZONTAL_STYLE)?_95d.docX:_95d.docY;
}
_95d._stopPropagation=true;
_95d._returnValue=false;
_95d.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseMoveHdlr=function(ev){
var _960=DwtShell.mouseEvent;
_960.setFromDhtmlEvent(ev);
var _961=0;
var sash=DwtMouseEventCapture.getTargetObj();
if(sash._style==DwtSash.HORIZONTAL_STYLE){
if(_960.docX>0&&_960.docX!=sash._startCoord){
_961=_960.docX-sash._startCoord;
}
}else{
if(_960.docY>0&&_960.docY!=sash._startCoord){
_961=_960.docY-sash._startCoord;
}
}
if(Math.abs(_961)>=sash._threshold){
if(sash._callbackObj!=null){
_961=sash._callbackFunc.call(sash._callbackObj,_961);
}else{
_961=sash._callbackFunc(_961);
}
sash._startCoord+=_961;
if(_961!=0&&sash._posStyle==Dwt.ABSOLUTE_STYLE){
if(sash._style==DwtSash.HORIZONTAL_STYLE){
sash.setLocation(sash.getLocation().x+_961,Dwt.DEFAULT);
}else{
sash.setLocation(Dwt.DEFAULT,sash.getLocation().y+_961);
}
}
}
_960._stopPropagation=true;
_960._returnValue=false;
_960.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseUpHdlr=function(ev){
var _964=DwtShell.mouseEvent;
_964.setFromDhtmlEvent(ev);
if(_964.button!=DwtMouseEvent.LEFT){
DwtUiEvent.setBehaviour(ev,true,false);
return false;
}
if(DwtMouseEventCapture.getTargetObj()._callbackFunc!=null){
DwtMouseEventCapture.getCaptureObj().release();
}
_964._stopPropagation=true;
_964._returnValue=false;
_964.setToDhtmlEvent(ev);
return false;
};
DwtSash._mouseOutHdlr=function(ev){
var _966=DwtShell.mouseEvent;
_966.setFromDhtmlEvent(ev);
_966._stopPropagation=true;
_966._returnValue=false;
_966.setToDhtmlEvent(ev);
return false;
};
function DwtToolBar(_967,_968,_969,_96a,_96b,_96c){
if(arguments.length==0){
return;
}
_968=_968||"DwtToolBar";
DwtComposite.call(this,_967,_968,_969);
this._style=_96c?_96c:DwtToolBar.HORIZ_STYLE;
this._table=document.createElement("table");
this._table.border=0;
this._table.cellPadding=_96b?_96b:0;
this._table.cellSpacing=_96a?_96a:0;
this.getHtmlElement().appendChild(this._table);
this._table.backgroundColor=DwtCssStyle.getProperty(this.parent.getHtmlElement(),"background-color");
this._numFillers=0;
}
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(_96d){
return this._children.get(_96d);
};
DwtToolBar.prototype.getItemCount=function(){
return this._children.size();
};
DwtToolBar.prototype.getItems=function(){
return this._children.toArray();
};
DwtToolBar.prototype.addSpacer=function(size,_96f){
var el=this._createSpacerElement();
var _971=this._style==DwtToolBar.HORIZ_STYLE?"width":"height";
el.style[_971]=size||DwtToolBar.DEFAULT_SPACER;
this._addItem(DwtToolBar.SPACER,el,_96f);
return el;
};
DwtToolBar.prototype._createSpacerElement=function(){
return document.createElement("div");
};
DwtToolBar.prototype.addSeparator=function(_972,_973){
var el=this._createSeparatorElement();
el.className=_972;
this._addItem(DwtToolBar.SEPARATOR,el,_973);
return el;
};
DwtToolBar.prototype._createSeparatorElement=DwtToolBar.prototype._createSpacerElement;
DwtToolBar.prototype._createFillerElement=DwtToolBar.prototype._createSpacerElement;
DwtToolBar.prototype.addFiller=function(_975,_976){
var el=this._createFillerElement();
this._defaultFillClass=el.className;
el.className=_975||this._defaultFillClass;
this._addItem(DwtToolBar.FILLER,el,_976);
return el;
};
DwtToolBar.prototype.addChild=function(_978,_979){
this._children.add(_978);
var _97a=_978._removedEl?_978._removedEl:_978.getHtmlElement();
this._addItem(DwtToolBar.ELEMENT,_97a,_979);
};
DwtToolBar.prototype._addItem=function(type,_97c,_97d){
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 _97f=_97d||row.cells.length;
col=row.insertCell(_97f);
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{
col.style.width="1";
}
col.appendChild(_97c);
}else{
var _981=_97d||-1;
row=this._table.insertRow(_981);
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(_97c);
}
};
function DwtBorder(){
}
DwtBorder._borderTemplates={};
DwtBorder.getBorderTemplate=function(_982){
return this._borderTemplates[_982];
};
DwtBorder.getBorderHtml=function(_983,_984,_985){
return AjxBuffer.append(this.getBorderStartHtml(_983,_984),(_985?"<div id="+_985+"></div>":""),this.getBorderEndHtml(_983,_984));
};
DwtBorder.getBorderStartHtml=function(_986,_987){
var _988=this._borderTemplates[_986];
if(_988==null){
return "";
}
var html=_988.start;
if(_987!=null){
html=DwtBorder.performSubstitutions(html,_987);
}
return html;
};
DwtBorder.getBorderEndHtml=function(_98a,_98b){
var _98c=this._borderTemplates[_98a];
if(_98c==null||_98c==""){
return "";
}
var html=_98c.end;
if(_98b!=null){
html=DwtBorder.performSubstitutions(html,_98b);
}
return html;
};
DwtBorder.getBorderHeight=function(_98e){
var _98f=this._borderTemplates[_98e];
return _98f?_98f.height:0;
};
DwtBorder.getBorderWidth=function(_990){
var _991=this._borderTemplates[_990];
return _991?_991.width:0;
};
DwtBorder.performSubstitutions=function(html,_993){
for(var prop in _993){
var str="<!--$"+prop+"-->";
if(html.indexOf(str)){
html=html.split(str).join(_993[prop]);
}
var str="{$"+prop+"}";
if(html.indexOf(str)){
html=html.split(str).join(_993[prop]);
}
}
return html;
};
DwtBorder.registerBorder=function(_996,_997){
this._borderTemplates[_996]=_997;
};
DwtBorder.registerBorder("1pxBlack",{start:"<div style='border:1px solid black'>",end:"</div>",width:2,height:2});
DwtBorder.registerBorder("card",{start:"<table class=card_border_table cellspacing=0 cellpadding=0>"+"<tr><td class=card_spacer_TL><div class=ImgCard_TL></div></td>"+"<td class=ImgCard_T__H></td>"+"<td class=card_spacer_TR><div class=ImgCard_TR></div></td>"+"</tr>"+"<tr><td class=ImgCard_L__V></td>"+"<td class=card_spacer_BG>"+"<div class=card_contents>",end:"</div class=card_contents>"+"</td>"+"<td class=ImgCard_R__V></td>"+"</tr>"+"<tr><td class=card_spacer_BL><div class=ImgCard_BL></div></td>"+"<td class=ImgCard_B__H></td>"+"<td class=card_spacer_BR><div class=ImgCard_BR></div></td>"+"</tr>"+"</table>",width:20,height:20});
DwtBorder.registerBorder("cardSel",{start:"<table class=card_border_table cellspacing=0 cellpadding=0>"+"<tr><td class=card_spacer_TL><div class=ImgCardSel_TL></div></td>"+"<td class=ImgCardSel_T__H></td>"+"<td class=card_spacer_TR><div class=ImgCardSel_TR></div></td>"+"</tr>"+"<tr><td class=ImgCardSel_L__V></td>"+"<td class=card_spacer_BG>"+"<div class=card_contents>",end:"</div class=card_contents>"+"</td>"+"<td class=ImgCardSel_R__V></td>"+"</tr>"+"<tr><td class=card_spacer_BL><div class=ImgCardSel_BL></div></td>"+"<td class=ImgCardSel_B__H></td>"+"<td class=card_spacer_BR><div class=ImgCardSel_BR></div></td>"+"</tr>"+"</table>",width:19,height:18});
var dialogPieces={start:AjxBuffer.concat("<table class='DialogTable' cellpadding='0' cellspacing='0' border='0' Xborder=1>","<tr><td class='border_outset_c'><div class='ImgDialogOutset_TL'></div></td>","<td colspan=3 class='ImgDialogOutset_T__H'></td>","<td class='border_outset_c'><div class='ImgDialogOutset_TR'></div></td>",(AjxEnv.useTransparentPNGs?"<td rowspan=2 valign=top class='border_shadow_v'><div class='ImgShadowBig_TR'></div><div class='ImgShadowBig_R__V' style='height:100%'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td colspan=3 id='<!--$titleId-->' class='DialogTitle'>","<table class='dialog_table' cellpadding='0' cellspacing='0'><tr>","<td class='DialogTitleCell'><!--$icon--></td>","<td id='<!--$titleTextId-->' class='DialogTitleCell'><!--$title--></td>","<td class='DialogTitleCell'><div class='<!--$closeIcon2-->' style='cursor:pointer'></div></td>","<td class='DialogTitleCell'><div class='<!--$closeIcon1-->' style='cursor:pointer'></div></td>","</tr></table></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>","</tr>"),topNoToolbar:AjxBuffer.concat("<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogBody'><div class='ImgDialogInset_TL'></div></td>","<td class='DialogBody' Xstyle='width:100%'><div class='ImgDialogInset_T__H'></div></td>","<td class='DialogBody'><div class='ImgDialogInset_TR'></div></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogBody ImgDialogInset_L__V' style='height:100%'></td>","<td class='DialogBody'>"),topWithToolbar:AjxBuffer.concat("<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogToolbar'><div class='ImgDialogInset_TL'></div></td>","<td class='DialogToolbar' style='width:100%'><div class='ImgDialogInset_T__H'></div></td>","<td class='DialogToolbar'><div class='ImgDialogInset_TR'></div></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogToolbar'><div class='ImgDialogInset_L__V' style='height:20'></div></td>","<td class='DialogToolbar'></td>","<td class='DialogToolbar'><div class='ImgDialogInset_R__V' style='height:20'></div></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='ImgDialogToolbarSep_L'></td>","<td class='ImgDialogToolbarSep__H'></td>","<td class='ImgDialogToolbarSep_R'></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogBody ImgDialogInset_L__V' style='height:100%'></td>","<td class='DialogBody'>"),bottomNoToolbar:AjxBuffer.concat("</td> ","<td class='DialogBody ImgDialogInset_R__V' style='height:100%'></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogBody'><div class='ImgDialogInset_BL'></div></td>","<td class='DialogBody'><div class='ImgDialogInset_B__H'></div></td>","<td class='DialogBody'><div class='ImgDialogInset_BR'></div></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>"),bottomWithToolbar:AjxBuffer.concat("</td>","<td class='DialogBody ImgDialogInset_R__V' style='height:100%'></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='ImgDialogToolbarSep_L'></td>","<td class='ImgDialogToolbarSep__H'></td>","<td class='ImgDialogToolbarSep_R'></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogToolbar'><div class='ImgDialogInset_L__V' style='height:20'></td>","<td class='DialogToolbar'><div id='<!--$id-->_bottom_toolbar'></div></td>","<td class='DialogToolbar'><div class='ImgDialogInset_R__V' style='height:20'></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>","<tr><td class='ImgDialogOutset_L__V' style='height:100%'></td>","<td class='DialogToolbar'><div class='ImgDialogInset_BL'></div></td>","<td class='DialogToolbar'><div class='ImgDialogInset_B__H'></div></td>","<td class='DialogToolbar'><div class='ImgDialogInset_BR'></div></td>","<td class='ImgDialogOutset_R__V' style='height:100%'></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>"),end:AjxBuffer.concat("<tr><td class='dialog_bottom_left_corner'><div class='ImgDialogOutset_bl'></div></td>","<td colspan=3 class='ImgDialogOutset_B__H'></td>","<td class='dialog_bottom_right_corner'><div class='ImgDialogOutset_br'></div></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgShadowBig_R__V'></div></td>":""),"</tr>",(AjxEnv.useTransparentPNGs?"<tr><td colspan=5><table cellspacing=0 cellpadding=0 border=0><tr><td><div class='ImgShadowBig_BL'></div><td>"+"<td width=100%><div class='ImgShadowBig_B__H' style='width:100%'></div></td></tr></table>"+"</td>"+"<td class=dialog_shadow_c><div class='ImgShadowBig_BR'></div><td>"+"</tr>":""),"</table>")};
DwtBorder.registerBorder("dialog",{start:dialogPieces.start+dialogPieces.topNoToolbar,end:dialogPieces.bottomNoToolbar+dialogPieces.end,width:40,height:45});
DwtBorder.registerBorder("dialogWithTopToolbar",{start:dialogPieces.start+dialogPieces.topWithToolbar,end:dialogPieces.bottomNoToolbar+dialogPieces.end,width:40,height:45});
DwtBorder.registerBorder("dialogWithBottomToolbar",{start:dialogPieces.start+dialogPieces.topNoToolbar,end:dialogPieces.bottomWithToolbar+dialogPieces.end,width:40,height:45});
DwtBorder.registerBorder("dialogWithBothToolbars",{start:dialogPieces.start+dialogPieces.topWithToolbar,end:dialogPieces.bottomWithToolbar+dialogPieces.end,width:40,height:45});
DwtBorder.registerBorder("h_sash",{start:AjxBuffer.concat("<table width=100% cellspacing=0 cellpadding=0><tr>","<td><div  class=ImgHSash_L></div></td>","<td class=ImgHSash__H style='width:50%'></td>","<td><div class=ImgHSashGrip></div></td>","<td class=ImgHSash__H style='width:50%'></td>","<td><div  class=ImgHSash_TR></div></td>","</tr></table>"),end:"",width:10,height:7});
DwtBorder.registerBorder("calendar_appt",{start:AjxBuffer.concat("<div id='<!--$id-->_body' class='appt_body <!--$bodyColor-->'>","<table style='width:100%;height:100%'cellspacing=0 cellpadding=2>","<tr class='<!--$headerColor-->'>","<td class=appt<!--$newState-->_time id='<!--$id-->_st'><!--$starttime--></td>","<td class=appt_status-<!--$statusKey--> style='text-align:right'><!--$status--></td>","</tr>","<tr valign=top>","<td colspan=2 class=appt<!--$newState-->_name style='height:100%'>","<!--$name-->","<BR>","<!--$location-->","</td>","<tr>","<td colspan=2 class=appt_end_time id='<!--$id-->_et'><!--$endtime--></td>","</tr>","</table>","</div>"),end:"",width:10,height:7});
DwtBorder.registerBorder("calendar_appt_bottom_only",{start:AjxBuffer.concat("<div id='<!--$id-->_body' class='appt_body <!--$bodyColor-->'>","<table style='width:100%;height:100%'cellspacing=0 cellpadding=2>","<tr valign=top>","<td colspan=2 class=appt<!--$newState-->_name style='height:100%'>","<!--$name-->","<BR>","<!--$location-->","</td>","<tr>","<td colspan=2 class=appt_end_time id='<!--$id-->_et'><!--$endtime--></td>","</tr>","</table>","</div>"),end:"",width:10,height:7});
DwtBorder.registerBorder("calendar_appt_30",{start:AjxBuffer.concat("<div id='<!--$id-->_body' class='appt_30_body <!--$headerColor-->'>","<table width=100% cellspacing=0 cellpadding=2>","<tr>","<td class=appt_30<!--$newState-->_name><!--$name--></td>","</tr>","</table>","</div>"),end:"",width:4,height:4});
DwtBorder.registerBorder("calendar_appt_allday",{start:AjxBuffer.concat("<div id='<!--$id-->_body' <!--$body_style--> class='appt_allday_body <!--$headerColor-->'>","<table width=100% cellspacing=0 cellpadding=2>","<tr>","<td class=appt_allday<!--$newState-->_name><!--$name--></td>","</tr>","</table>","</div>"),end:"",width:4,height:4});
DwtBorder.registerBorder("hover",{start:AjxBuffer.concat("<div id='{$id}_tip_t' class='hover_tip_top ImgHoverTip_T'></div>","<table class=hover_frame_table border=0 cellspacing=0 cellpadding=0>","<tr>","<td id='{$id}_border_tl' class=ImgHover_TL></td>","<td id='{$id}_border_tm' class=ImgHover_T__H></td>","<td id='{$id}_border_tr' class=ImgHover_TR></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgCurvedShadow_TR'></td>":""),"</tr>","<tr>","<td id='{$id}_border_ml' class=ImgHover_L__V></td>","<td id='{$id}_border_mm' class=ImgHover__BG><div id='{$id}_contents' class=hover_contents>"),end:AjxBuffer.concat("</div></td>","<td id='{$id}_border_mr' class=ImgHover_R__V></td>",(AjxEnv.useTransparentPNGs?"<td valign=top><div class='ImgCurvedShadow_T2R'></div><div class='ImgCurvedShadow_R__V' style='height:100%;'></div></td>":""),"</tr>","<tr>","<td id='{$id}_border_bl' class=ImgHover_BL></div></td>","<td id='{$id}_border_bm' class=ImgHover_B__H></td>","<td id='{$id}_border_br' class=ImgHover_BR></div></td>",(AjxEnv.useTransparentPNGs?"<td></td>":""),"</tr>",(AjxEnv.useTransparentPNGs?"<tr><td class='ImgCurvedShadow_BL'></td>"+"<td><div id='{$id}_border_shadow_b' class='ImgCurvedShadow_B__H' style='width:100%;'></td>"+"<td></td>"+"<td><div style='position:relative;'><div class='ImgCurvedShadow_BR' style='position:absolute;left:-20;top:-14'></div></div></td>"+"</tr>":""),"</table>","<div id='{$id}_tip_b' class='hover_tip_bottom ImgHoverTip_B'></div>")});
DwtBorder.registerBorder("SemiModalDialog",{start:AjxBuffer.concat("<table class=hover_frame_table border=0 cellspacing=0 cellpadding=0>","<tr>","<td id='{$id}_border_tl' class=ImgSemiModalHeader_TL></td>","<td id='{$id}_border_tm' class=ImgSemiModalHeader_T__H colspan=2></td>","<td id='{$id}_border_tr' class=ImgSemiModalHeader_TR></td>",(AjxEnv.useTransparentPNGs?"<td class='ImgCurvedShadow_TR'></td>":""),"</tr>","<tr>","<td id='{$id}_border_ml' class='ImgSemiModalHeader_L__V'></td>","<td class='ImgSemiModalHeader__BG'><div id='{$id}_title' class='DwtStickyToolTipTitle'>{$title}</div></td>","<td class='ImgSemiModalHeader__BG'><div id='{$id}_close' class='DwtStickyToolTipTitle' style='position:relative;top:-3px;left:20px;align:right;'></div></td>","<td id='{$id}_border_mr' class=ImgSemiModalHeader_R__V></td>",(AjxEnv.useTransparentPNGs?"<td valign=top><div class='ImgCurvedShadow_T2R'></div><div class='ImgCurvedShadow_R__V' style='height:100%;'></div></td>":""),"</tr>","<tr>","<td id='{$id}_border_ml' class='ImgSemiModalBody_TL'></td>","<td id='{$id}_title' class='ImgSemiModalBody_T__H' colspan=2></td>","<td id='{$id}_border_mr' class=ImgSemiModalBody_TR></td>",(AjxEnv.useTransparentPNGs?"<td><div class='ImgCurvedShadow_R__V' style='height:100%;'></div></td>":""),"</tr>","<tr>","<td id='{$id}_border_ml' class=ImgSemiModalBody_L__V></td>","<td id='{$id}_border_mm' class=ImgSemiModalBody__BG colspan=2><div id='{$id}_contents'>"),end:AjxBuffer.concat("</div></td>","<td id='{$id}_border_mr' class=ImgSemiModalBody_R__V></td>",(AjxEnv.useTransparentPNGs?"<td valign=top><div class='ImgCurvedShadow_R__V' style='height:100%;'></div></td>":""),"</tr>","<tr>","<td class=ImgSemiModalBody_B1L></div></td>","<td class=ImgSemiModalBody__BG colspan=2></td>","<td class=ImgSemiModalBody_B1R></div></td>",(AjxEnv.useTransparentPNGs?"<td><div class='ImgCurvedShadow_R__V' style='height:100%;'></div></td>":""),"</tr>","<tr>","<td id='{$id}_border_bl' class=ImgSemiModalBody_B2L></div></td>","<td id='{$id}_border_bm' class=ImgSemiModalBody_B2__H colspan=2></td>","<td id='{$id}_border_br' class=ImgSemiModalBody_B2R></div></td>",(AjxEnv.useTransparentPNGs?"<td></td>":""),"</tr>",(AjxEnv.useTransparentPNGs?"<tr><td class='ImgCurvedShadow_BL'></td>"+"<td colspan=2><div id='{$id}_border_shadow_b' class='ImgCurvedShadow_B__H' style='width:100%;'></td>"+"<td></td>"+"<td><div style='position:relative;'><div class='ImgCurvedShadow_BR' style='position:absolute;left:-20;top:-14'></div></div></td>"+"</tr>":""),"</table>","<div id='{$id}_tip_b' class='hover_tip_bottom ImgSemiModalBodyTip_B'></div>")});
DwtBorder.registerBorder("SplashScreen",{start:AjxBuffer.concat("<table class='DialogTable' cellpadding='0' Xborder=1>","<tr><td><div style='position:relative'>"+"<div class='ImgSplashScreen_blank' style='background-color:white'></div>","<div class=SplashScreenUrl><!--$url--></div>","<div class=SplashScreenShortVersion><!--$shortVersion--></div>","<div class=SplashScreenAppName><!--$appName--></div>","<div class=SplashScreenVersion><!--$version--></div>","<div class=SplashScreenContents><!--$contents--></div>","<div class=SplashScreenLicense><!--$license--></div>","<div class=SplashScreenOKButton id='<!--$buttonId-->'><!--$button--></div>","</div></td>",(AjxEnv.useTransparentPNGs?"<td valign=top class='border_shadow_v'><div class='ImgShadowBig_TR'></div>"+"<div class='ImgShadowBig_R__V' style='height:100%'></div></td>":""),"</tr>"),end:AjxBuffer.concat((AjxEnv.useTransparentPNGs?"<tr><td>"+"<table cellspacing=0 cellpadding=0 Xborder=1 width=100%><tr>"+"<td><div class='ImgShadowBig_BL'></div><td>"+"<td width=100%><div class='ImgShadowBig_B__H' style='width:100%'></div></td>"+"</tr></table>"+"</td>"+"<td class='dialog_shadow_c'><div class='ImgShadowBig_BR'></div></td>"+"</tr>":""),"</table>")});
DwtBorder.registerBorder("LoginBanner",{start:AjxBuffer.concat("<table class='DialogTable' cellpadding='0' Xborder=1>","<tr><td><div style='position:relative'>"+"<div class='ImgLoginBanner_blank'></div>","<div id=LoginBannerUrl><!--$url--></div>","<div id=LoginBannerShortVersion><!--$shortVersion--></div>","<div id=LoginBannerAppName><!--$appName--></div>","<div id=LoginBannerVersion><!--$version--></div>","</div></td>","</tr>","</table>"),end:""});
function DwtToolTip(_998,_999,_99a){
this.shell=_998;
this._dialog=_99a;
this._div=document.createElement("div");
this._div.className=_999||"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 _99b="hover";
var _99c={id:"tooltip"};
this._borderStart=DwtBorder.getBorderStartHtml(_99b,_99c);
this._borderEnd=DwtBorder.getBorderEndHtml(_99b,_99c);
}
DwtToolTip.TOOLTIP_DELAY=750;
DwtToolTip.prototype.toString=function(){
return "DwtToolTip";
};
DwtToolTip.prototype.getContent=function(){
return this._div.innerHTML;
};
DwtToolTip.prototype.setContent=function(_99d,_99e){
this._content=_99d;
if(_99e){
this._div.innerHTML=this._borderStart+this._content+this._borderEnd;
}
};
DwtToolTip.prototype.popup=function(x,y,_9a1){
if(this._content!=null){
if(!_9a1){
this._div.innerHTML=this._borderStart+this._content+this._borderEnd;
}
var _9a2=this._div;
var _9a3="tooltip";
var clip=true;
var _9a5=this._dialog;
this._positionElement(_9a2,x,y,_9a3,clip,_9a5);
}
};
DwtToolTip.prototype.popdown=function(){
if(this._content!=null){
Dwt.setLocation(this._div,Dwt.LOC_NOWHERE,Dwt.LOC_NOWHERE);
}
};
DwtToolTip.prototype._positionElement=function(_9a6,x,y,_9a9,clip,_9ab){
var _9ac=5;
var _9ad=8;
var _9ae=8;
var tt=document.getElementById(_9a9+"_tip_t");
var tb=document.getElementById(_9a9+"_tip_b");
var t=tt;
var ex=x;
var ey=y;
var w=DwtShell.getShell(window).getSize();
var ww=w.x;
var wh=w.y;
var p=Dwt.getSize(_9a6);
var pw=p.x;
var ph=p.y;
var btEl=document.getElementById(_9a9+"_border_tm");
var blEl=document.getElementById(_9a9+"_border_ml");
var brEl=document.getElementById(_9a9+"_border_mr");
var bbEl=document.getElementById(_9a9+"_border_bm");
var bth=Dwt.getSize(btEl).y;
var blw=Dwt.getSize(blEl).x;
var brw=Dwt.getSize(brEl).x;
var bbh=Dwt.getSize(bbEl).y;
var ttw=Dwt.getSize(tt).x;
var tth=Dwt.getSize(tt).y;
var tbw=Dwt.getSize(tb).x;
var tbh=Dwt.getSize(tb).y;
if(AjxEnv.useTransparentPNGs){
var bsEl=document.getElementById(_9a9+"_border_shadow_b");
var bsh=Dwt.getSize(bsEl).y;
}
var px=ex-pw/2-_9ad;
var py;
var ty;
var tw;
var _9cc=tbh;
if(ph+ey+tth-bth+_9ae<wh-_9ac+_9cc){
py=ey+tth-bth+_9ae;
tb.style.display="none";
ty=bth-tth;
tw=ttw;
t=tt;
}else{
py=ey-ph-tbh+bbh-_9ae;
py+=tbh;
tt.style.display="none";
ty=-bbh;
if(AjxEnv.useTransparentPNGs){
ty-=bsh;
}
tw=tbw;
t=tb;
}
if(pw-blw-brw<tw){
var _9cd=document.getElementById(_9a9+"_contents");
_9cd.width=tw;
_9cd.style.width=String(tw)+"px";
}
if(px<_9ac){
px=_9ac;
}else{
if(px+pw>ww-_9ac){
px=ww-_9ac-pw;
}
}
var tx=ex-px-tw/2;
if(tx+tw>pw-brw){
tx=pw-brw-tw;
}
if(tx<blw){
tx=blw;
}
t.style.left=tx;
t.style.top=ty;
if(clip){
if(t==tb){
var y=t.offsetTop;
_9a6.style.clip="rect(auto,auto,"+(y+tbh)+",auto)";
}else{
_9a6.style.clip="rect(auto,auto,auto,auto)";
}
}
Dwt.setLocation(_9a6,px,py);
var _9cf=_9ab?_9ab.getZIndex()+Dwt.Z_INC:Dwt.Z_TOOLTIP;
Dwt.setZIndex(_9a6,_9cf);
};
function DwtStickyToolTip(_9d0,_9d1,_9d2){
_9d1=_9d1||"DwtStickyToolTip";
_9d2=_9d2||Dwt.ABSOLUTE_STYLE;
DwtBaseDialog.call(this,_9d0,_9d1,_9d2,null,DwtBaseDialog.MODELESS);
this._contentDiv=document.getElementById(this._htmlElId+"_contents");
this._contentView=new DwtControl(this);
}
DwtStickyToolTip.prototype=new DwtBaseDialog;
DwtStickyToolTip.prototype.constructor=DwtStickyToolTip;
DwtStickyToolTip.prototype.setTitle=function(_9d3){
this._title=_9d3;
var _9d4=document.getElementById(this._htmlElId+"_title");
_9d4.innerHTML=_9d3;
};
DwtStickyToolTip.prototype.setContent=function(_9d5){
this._contentView.setContent(_9d5);
this.setView(this._contentView);
};
DwtStickyToolTip.prototype.popup=function(x,y){
DwtBaseDialog.prototype.popup.call(this,new DwtPoint(x,y));
};
DwtStickyToolTip.prototype._positionDialog=function(loc){
var _9d9=this.getHtmlElement();
var _9da=this._htmlElId;
var clip=false;
DwtToolTip.prototype._positionElement.call(this,_9d9,loc.x,loc.y,_9da,clip);
};
DwtStickyToolTip.prototype._createHtml=function(){
DwtBaseDialog.prototype._createHtml.call(this);
var _9dc=new DwtButton(this,DwtLabel.IMAGE_RIGHT|DwtLabel.ALIGN_RIGHT,"DwtStickyToolTipClose");
_9dc.setImage(["ImgRedCircleClose"]);
_9dc.addSelectionListener(new AjxListener(this,this._handleClose));
var _9dd=document.getElementById(this._htmlElId+"_close");
var _9de=_9dc.getHtmlElement();
_9dd.appendChild(_9de);
};
DwtStickyToolTip.prototype._handleClose=function(_9df){
this.popdown();
this.dispose();
};
DwtStickyToolTip.prototype._getStartBorder=function(){
if(!this._titleHandleId){
this._titleHandleId=Dwt.getNextId();
}
if(!this._contentId){
this._contentId=Dwt.getNextId();
}
if(!this._titleCellId){
this._titleCellId=Dwt.getNextId();
}
var _9e0="SemiModalDialog";
var _9e1={id:this._htmlElId,title:this._title};
return DwtBorder.getBorderStartHtml(_9e0,_9e1);
};
DwtStickyToolTip.prototype._getEndBorder=function(){
var _9e2="SemiModalDialog";
var _9e3={id:this._htmlElId};
return DwtBorder.getBorderEndHtml(_9e2,_9e3);
};
DwtStickyToolTip.prototype._getContentHtml=function(){
return "";
};
function DwtTreeItem(_9e4,_9e5,text,_9e7,_9e8,_9e9,_9ea,_9eb){
if(_9e4 instanceof DwtTree){
this._tree=_9e4;
}else{
if(_9e4 instanceof DwtTreeItem){
this._tree=_9e4._tree;
}else{
throw new DwtException("DwtTreeItem parent must be a DwtTree or DwtTreeItem",DwtException.INVALIDPARENT,"DwtTreeItem");
}
}
this._parent=_9e4;
this._origClassName=_9e9?_9e9:"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,_9e4,null,_9ea,true);
this._imageInfoParam=_9e7;
this._textParam=text;
this._deferred=(_9e8!=false);
this._itemChecked=false;
this._initialized=false;
this._selectionEnabled=true;
this._actionEnabled=true;
this._showExpandAll=_9eb;
if(this._tree._isCheckedStyle()){
this.enableSelection(false);
this._selectedClassName=this._origClassName;
}
if(_9e4 instanceof DwtTree||(_9e4._initialized&&(!_9e4._deferred||_9e4._expanded))){
this._initialize(_9e5);
}else{
_9e4._addDeferredChild(this,_9e5);
this._index=_9e5;
}
}
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.setExpandAll=function(_9ec){
this._showExpandAll=_9ec;
};
DwtTreeItem.prototype.setChecked=function(_9ed,_9ee){
if((this._itemChecked!=_9ed)||_9ee){
this._itemChecked=_9ed;
if(this._checkBox!=null&&(this._checkBoxCell&&Dwt.getVisible(this._checkBoxCell))){
this._checkBox.checked=_9ed;
if(this._checkBox._ieHack){
if(_9ed){
var _9ef=document.createElement("<INPUT type='checkbox' checked>");
Dwt.setHandler(_9ef,DwtEvent.ONMOUSEDOWN,DwtTreeItem._checkBoxMouseDownHdlr);
Dwt.setHandler(_9ef,DwtEvent.ONMOUSEUP,DwtTreeItem._checkBoxMouseUpHdlr);
this._checkBox.parentNode.replaceChild(_9ef,this._checkBox);
this._checkBox=_9ef;
}else{
delete this._checkBox._ieHack;
}
}
}
}
};
DwtTreeItem.prototype.getExpanded=function(){
return this._expanded;
};
DwtTreeItem.prototype.setExpanded=function(_9f0,_9f1){
if(_9f0){
var p=this.parent;
while(p instanceof DwtTreeItem&&!p._expanded){
p.setExpanded(true);
p=p.parent;
}
this._realizeDeferredChildren();
}
if(this.getNumChildren()){
if(_9f0&&_9f1){
if(!this._expanded){
this._expand(_9f0);
}
var a=this.getChildren();
for(var i=0;i<a.length;i++){
if(a[i] instanceof DwtTreeItem){
a[i].setExpanded(_9f0,_9f1);
}
}
}else{
if(this._expanded!=_9f0){
this._expand(_9f0);
}
}
}
};
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(_9f5){
if(this._initialized){
AjxImg.setImage(this._imageCell,_9f5);
this._imageInfo=_9f5;
}else{
this._imageInfoParam=_9f5;
}
};
DwtTreeItem.prototype.setDndImage=function(_9f6){
this._dndImageInfo=_9f6;
};
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(_9fb){
this._selectionEnabled=_9fb;
};
DwtTreeItem.prototype.enableAction=function(_9fc){
this._actionEnabled=_9fc;
};
DwtTreeItem.prototype.addSeparator=function(_9fd){
var _9fe=new Object();
_9fe._isSeparator=true;
_9fe._initialized=false;
this._children.add(_9fe,_9fd);
};
DwtTreeItem.prototype.setVisible=function(_9ff,_a00,_a01){
if(_a00&&!_a01){
Dwt.setVisible(this._itemDiv,_9ff);
}else{
if(_a01&&!_a00){
Dwt.setVisible(this._childDiv,_9ff);
}else{
DwtComposite.prototype.setVisible.call(this,_9ff);
}
}
};
DwtTreeItem.prototype.removeChild=function(_a02){
if(!_a02){
return;
}
if(_a02._initialized){
this._tree._deselect(_a02);
this._childDiv.removeChild(_a02.getHtmlElement());
}
this._children.remove(_a02);
if(this._children.size()==0){
if(this._expanded){
this._expanded=false;
}
if(this._initialized){
AjxImg.setImage(this._nodeCell,"Blank_16");
var _a03=AjxImg.getImageElement(this._nodeCell);
if(_a03){
Dwt.clearHandler(_a03,DwtEvent.ONMOUSEDOWN);
}
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"Blank_16");
var _a04=AjxImg.getImageElement(this._imageCell);
if(_a04){
Dwt.clearHandler(_a04,DwtEvent.ONMOUSEDOWN);
}
}
}
}
};
DwtTreeItem.prototype._initialize=function(_a05){
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;
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;
}
if(this._children.size()>0){
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
var _a07=AjxImg.getImageElement(this._nodeCell);
if(_a07){
Dwt.setHandler(_a07,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
Dwt.setHandler(_a07,DwtEvent.ONMOUSEUP,DwtTreeItem._nodeIconMouseUpHdlr);
}
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"ExpandAll");
var _a08=AjxImg.getImageElement(this._imageCell);
if(_a08){
Dwt.setHandler(_a08,DwtEvent.ONMOUSEDOWN,DwtTreeItem._expandAllMouseDownHdlr);
Dwt.setHandler(_a08,DwtEvent.ONMOUSEUP,DwtTreeItem._expandAllMouseUpHdlr);
}
}
}else{
AjxImg.setImage(this._nodeCell,"Blank_16");
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"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._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,_a05);
this._initialized=true;
};
DwtTreeItem.prototype._addDeferredChild=function(_a09,_a0a){
if(this._initialized&&this._children.size()==0){
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
var _a0b=AjxImg.getImageElement(this._nodeCell);
if(_a0b){
Dwt.setHandler(_a0b,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
Dwt.setHandler(_a0b,DwtEvent.ONMOUSEUP,DwtTreeItem._nodeIconMouseUpHdlr);
}
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"ExpandAll");
var _a0c=AjxImg.getImageElement(this._imageCell);
if(_a0c){
Dwt.setHandler(_a0c,DwtEvent.ONMOUSEDOWN,DwtTreeItem._expandAllMouseDownHdlr);
Dwt.setHandler(_a0c,DwtEvent.ONMOUSEUP,DwtTreeItem._expandAllMouseUpHdlr);
}
}
}
this._children.add(_a09,_a0a);
};
DwtTreeItem.prototype.addChild=function(_a0d){
};
DwtTreeItem.prototype._addItem=function(item,_a0f){
if(!this._children.contains(item)){
this._children.add(item,_a0f);
}
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");
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"CollapseAll");
}
}else{
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"ExpandAll");
}
}
var _a10=AjxImg.getImageElement(this._nodeCell);
if(_a10){
Dwt.setHandler(_a10,DwtEvent.ONMOUSEDOWN,DwtTreeItem._nodeIconMouseDownHdlr);
}
if(this._showExpandAll){
var _a11=AjxImg.getImageElement(this._imageCell);
if(_a11){
Dwt.setHandler(_a11,DwtEvent.ONMOUSEDOWN,DwtTreeItem._expandAllMouseDownHdlr);
}
}
}
var _a12=this._childDiv;
var _a13=_a12.childNodes.length;
if(_a0f==null||_a0f>=_a13||_a13==0){
_a12.appendChild(item.getHtmlElement());
}else{
_a12.insertBefore(item.getHtmlElement(),_a12.childNodes[_a0f]);
}
};
DwtTreeItem.prototype._getDnDIcon=function(){
var icon=document.createElement("div");
Dwt.setPosition(icon,Dwt.ABSOLUTE_STYLE);
var _a15=document.createElement("table");
icon.appendChild(_a15);
_a15.cellSpacing=_a15.cellPadding=0;
var row=_a15.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 _a1b=DwtShell.mouseEvent;
_a1b.setFromDhtmlEvent(ev);
if(_a1b.button==DwtMouseEvent.LEFT){
obj._expand(!obj._expanded,ev);
}else{
if(_a1b.button==DwtMouseEvent.RIGHT){
_a1b.dwtObj._tree._itemActioned(_a1b.dwtObj,_a1b);
}
}
_a1b._stopPropagation=true;
_a1b._returnValue=false;
_a1b.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem._nodeIconMouseUpHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _a1e=DwtShell.mouseEvent;
_a1e._stopPropagation=true;
_a1e._returnValue=false;
_a1e.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem._expandAllMouseDownHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _a21=DwtShell.mouseEvent;
_a21.setFromDhtmlEvent(ev);
if(_a21.button==DwtMouseEvent.LEFT){
if(obj._expanded){
DwtTreeItem._collapseAll(obj,ev);
}else{
obj._startingPoint=obj._level;
DwtTreeItem._expandAll(obj,ev);
}
}
_a21._stopPropagation=true;
_a21._returnValue=false;
_a21.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem._expandAllMouseUpHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _a24=DwtShell.mouseEvent;
_a24._stopPropagation=true;
_a24._returnValue=false;
_a24.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem._expandAll=function(item,ev){
item._expand(true,ev);
item._expandAll=true;
var a=item.getChildren();
for(var i=0;i<a.length;i++){
if(a[i].getItemCount()>0&&!a[i]._expanded){
DwtTreeItem._expandAll(a[i],ev);
}
}
};
DwtTreeItem._collapseAll=function(item,ev){
item._expand(false,ev);
item._expandAll=false;
};
DwtTreeItem.prototype._expand=function(_a2b,ev){
if(!_a2b){
this._expanded=false;
this._childDiv.style.display="none";
AjxImg.setImage(this._nodeCell,"NodeCollapsed");
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"ExpandAll");
}
if(!ev){
ev=new DwtTreeEvent();
ev.detail=DwtTree.ITEM_COLLAPSED;
ev.item=this;
}
this._tree._itemCollapsed(this,ev);
}else{
this._realizeDeferredChildren();
this._expanded=true;
this._childDiv.style.display="block";
AjxImg.setImage(this._nodeCell,"NodeExpanded");
if(this._showExpandAll){
AjxImg.setImage(this._imageCell,"CollapseAll");
}
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=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(_a32){
if(this._selected!=_a32){
this._selected=_a32;
if(!this._initialized){
this._initialize();
}
if(_a32&&this._selectionEnabled){
this._textCell.className=this._selectedClassName;
return true;
}else{
this._textCell.className=this._textClassName;
return false;
}
}
};
DwtTreeItem.prototype._setActioned=function(_a33){
if(this._actioned!=_a33){
this._actioned=_a33;
if(!this._initialized){
this._initialize();
}
if(_a33&&this._actionEnabled&&!this._selected){
this._textCell.className=this._actionedClassName;
return true;
}else{
if(!_a33){
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 _a39=DwtShell.mouseEvent;
_a39.setFromDhtmlEvent(ev);
if(_a39.button==DwtMouseEvent.LEFT||_a39.button==DwtMouseEvent.NONE){
_a39.dwtObj._tree._itemDblClicked(_a39.dwtObj,_a39);
}
};
DwtTreeItem._checkBoxMouseDownHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _a3c=DwtShell.mouseEvent;
_a3c.setFromDhtmlEvent(ev);
_a3c._stopPropagation=true;
_a3c._returnValue=false;
_a3c.setToDhtmlEvent(ev);
return false;
};
DwtTreeItem._checkBoxMouseUpHdlr=function(ev){
var obj=DwtUiEvent.getDwtObjFromEvent(ev);
var _a3f=DwtShell.mouseEvent;
_a3f.setFromDhtmlEvent(ev);
if(_a3f.button==DwtMouseEvent.LEFT){
_a3f.dwtObj._itemChecked=!_a3f.dwtObj._itemChecked;
_a3f.dwtObj._tree._itemChecked(_a3f.dwtObj,_a3f);
}else{
if(_a3f.button==DwtMouseEvent.RIGHT){
_a3f.dwtObj._tree._itemActioned(_a3f.dwtObj,_a3f);
}
}
};
function DwtTree(_a40,_a41,_a42,_a43){
if(arguments.length==0){
return;
}
_a42=_a42||"DwtTree";
DwtComposite.call(this,_a40,_a42,_a43);
if(_a41==null){
this._style=DwtTree.SINGLE_STYLE;
}else{
if(_a41==DwtTree.CHECKEDITEM_STYLE){
_a41|=DwtTree.SINGLE_STYLE;
}
this._style=_a41;
}
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.addSelectionListener=function(_a44){
this.addListener(DwtEvent.SELECTION,_a44);
};
DwtTree.prototype.removeSelectionListener=function(_a45){
this.removeListener(DwtEvent.SELECTION,_a45);
};
DwtTree.prototype.addTreeListener=function(_a46){
this.addListener(DwtEvent.TREE,_a46);
};
DwtTree.prototype.removeTreeListener=function(_a47){
this.removeListener(DwtEvent.TREE,_a47);
};
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(_a4b,_a4c){
var a=this._selectedItems.getArray();
var sz=this._selectedItems.size();
var da;
var j=0;
var _a51=false;
for(var i=0;i<sz;i++){
if(a[i]==_a4b){
_a51=true;
}else{
a[i]._setSelected(false);
this._selectedItems.remove(a[i]);
if(da==null){
da=new Array();
}
da[j++]=a[i];
}
}
if(da&&!_a4c){
this._notifyListeners(DwtEvent.SELECTION,da,DwtTree.ITEM_DESELECTED,null,this._selEv);
}
if(_a51){
return;
}
this._selectedItems.add(_a4b);
var _a53=_a4b.parent;
while(_a53 instanceof DwtTreeItem){
_a53.setExpanded(true);
_a53=_a53.parent;
}
if(_a4b._setSelected(true)&&!_a4c){
this._notifyListeners(DwtEvent.SELECTION,[_a4b],DwtTree.ITEM_SELECTED,null,this._selEv);
}
};
DwtTree.prototype.getSelectionCount=function(){
return this._selectedItems.size();
};
DwtTree.prototype.addChild=function(_a54){
};
DwtTree.prototype.addSeparator=function(){
var sep=document.createElement("div");
sep.className="vSpace";
this.getHtmlElement().appendChild(sep);
};
DwtTree.prototype._addItem=function(item,_a57){
this._children.add(item,_a57);
var _a58=this.getHtmlElement();
var _a59=_a58.childNodes.length;
if(_a57==null||_a57>_a59){
_a58.appendChild(item.getHtmlElement());
}else{
_a58.insertBefore(item.getHtmlElement(),_a58.childNodes[_a57]);
}
};
DwtTree.prototype.removeChild=function(_a5a){
this._children.remove(_a5a);
this._selectedItems.remove(_a5a);
this.getHtmlElement().removeChild(_a5a.getHtmlElement());
};
DwtTree.prototype.setCheckboxes=function(_a5b){
if(!this._isCheckedStyle()||!AjxEnv.isIE){
return;
}
var _a5c;
if(_a5b){
_a5b.setChecked(_a5b.getChecked(),true);
_a5c=_a5b.getItems();
}else{
_a5c=this.getItems();
}
for(var i=0;i<_a5c.length;i++){
this.setCheckboxes(_a5c[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 _a67=this._selectedItems.size();
if(this._style&DwtTree.SINGLE_STYLE||(!ev.shiftKey&&!ev.ctrlKey)){
if(_a67>0){
for(i=0;i<_a67;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 _a6f=false;
var a=this._selectedItems.getArray();
var _a71=this._selectedItems.size();
var da;
var j=0;
for(i=0;i<_a71;i++){
if(a[i]._isChildOf(item)){
_a6f=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(_a6f&&!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(_a74,_a75,_a76,_a77,_a78){
if(this.isListenerRegistered(_a74)){
if(_a77){
DwtUiEvent.copy(_a78,_a77);
}
_a78.items=_a75;
if(_a75.length==1){
_a78.item=_a75[0];
}
_a78.detail=_a76;
this.notifyListeners(_a74,_a78);
}
};
function DwtPropertyPage(_a79,_a7a,_a7b){
if(arguments.length==0){
return;
}
var _a7c=_a7a||"DwtPropertyPage";
DwtComposite.call(this,_a79,_a7a,_a7b);
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(_a7e,func){
if(!_a7e){
return;
}
var e=null;
e=document.getElementById(this._fieldIds[_a7e]);
if(e){
Dwt.setHandler(e,DwtEvent.ONKEYUP,func?func:this._onKeyUp);
e._view=this;
e._field=_a7e;
}
};
DwtPropertyPage.prototype._installOnClickHandler=function(_a81,func){
if(!_a81){
return;
}
var e=document.getElementById(this._fieldIds[_a81]);
if(e){
Dwt.setHandler(e,DwtEvent.ONCLICK,func?func:this._onClick);
e._view=this;
e._field=_a81;
}
};
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(_a86,func){
if(!_a86){
return;
}
var e=null;
e=document.getElementById(this._fieldIds[_a86]);
if(e){
Dwt.setHandler(e,DwtEvent.ONCHANGE,func?func:this._onChange);
e._view=this;
e._field=_a86;
}
};
DwtPropertyPage._onChange=function(ev){
this._view.setDirty(true);
return true;
};
DwtPropertyPage.prototype._onChange2=function(ev){
this.setDirty(true);
return true;
};
DwtPropertyPage.prototype._addDwtSelectEntryRow=function(_a8b,_a8c,html,idx,_a8f){
var _a90="30ex";
if(_a8f){
_a90=_a8f;
}
html[idx++]="<tr valign='center'>";
idx=this._addDwtSelectEntryCell(_a8b,_a8c,html,idx,_a90);
html[idx++]="</tr>";
return idx;
};
DwtPropertyPage.prototype._addDwtSelectEntryCell=function(_a91,_a92,html,idx,_a95){
var id=Dwt.getNextId();
this._fieldIds[_a91]=id;
if(_a92){
html[idx++]="<td align='left' style='width:"+_a95+"'>";
html[idx++]=AjxStringUtil.htmlEncode(_a92)+":";
html[idx++]="</td>";
}
html[idx++]="<td align='left'>";
html[idx++]="<div id='"+id+"'></div></td>";
return idx;
};
DwtPropertyPage.prototype._addBoolEntryRow=function(_a97,_a98,html,idx,_a9b){
html[idx++]="<tr valign='center'>";
idx=this._addBoolEntryCell(_a97,_a98,html,idx,_a9b);
html[idx++]="</tr>";
return idx;
};
DwtPropertyPage.prototype._addBoolEntryCell=function(_a9c,_a9d,html,idx,_aa0){
var id=Dwt.getNextId();
this._fieldIds[_a9c]=id;
var _aa2="20ex";
if(_aa0){
_aa2=_aa0;
}
if(_a9d){
html[idx++]="<td style='width:"+_aa2+";' align='left'>";
html[idx++]=AjxStringUtil.htmlEncode(_a9d)+":";
html[idx++]="</td>";
}
html[idx++]="<td align='left'>";
html[idx++]="<input type='checkbox' id='"+id+"'>";
html[idx++]="</td>";
return idx;
};
DwtPropertyPage.prototype._addTextAreaEntryRow=function(_aa3,_aa4,html,idx,_aa7){
var _aa8="on";
if(_aa7){
_aa8="off";
}
var id=Dwt.getNextId();
this._fieldIds[_aa3]=id;
html[idx++]="<tr valign='center'>";
html[idx++]="<td align='left' style='width:60ex;'>";
html[idx++]=AjxStringUtil.htmlEncode(_aa4)+":";
html[idx++]="</td></tr>";
html[idx++]="<tr valign='center'><td align='left' style='width:60ex;'><textarea wrap='"+_aa8+"' rows='8' cols ='60' id='";
html[idx++]=id;
html[idx++]="'/></textarea></td></tr>";
return idx;
};
DwtPropertyPage.prototype._addEntryRow=function(_aaa,_aab,html,idx,type,_aaf,_ab0,_ab1,_ab2){
html[idx++]="<tr valign='center'>";
idx=this._addEntryCell(_aaa,_aab,html,idx,type,_aaf,_ab0,_ab1,_ab2);
html[idx++]="</tr>";
return idx;
};
DwtPropertyPage.prototype._addEntryCell=function(_ab3,_ab4,html,idx,type,_ab8,_ab9,_aba,_abb){
if(type==null){
type="text";
}
if(_ab8==null){
_ab8=35;
}
var _abc="20ex";
if(_aba){
_abc=_aba;
}
var id=Dwt.getNextId();
this._fieldIds[_ab3]=id;
if(_ab4){
html[idx++]="<td align='left' style='width:"+_abc+";'>";
html[idx++]=AjxStringUtil.htmlEncode(_ab4)+":";
html[idx++]="</td>";
}
html[idx++]="<td ";
if(_abb){
html[idx++]="class='redAsteric' ";
}
html[idx++]="\talign='left'><input autocomplete='off' size='"+_ab8+"' type='"+type+"' id='";
html[idx++]=id;
html[idx++]="'";
if(_abb){
html[idx++]="/>*";
}else{
html[idx++]="/>&nbsp;";
}
if(_ab9!=null){
html[idx++]=_ab9;
}
html[idx++]="</td>";
return idx;
};
DwtPropertyPage.prototype._createHTML=function(){
};
function DwtTabView(_abe,_abf,_ac0){
if(arguments.length==0){
return;
}
var _ac1=_abf||"DwtTabView";
var _ac2=DwtControl.ABSOLUTE_STYLE;
if((_ac0!==void 0)&&(_ac0!==null)){
_ac2=_ac0;
}
DwtComposite.call(this,_abe,_ac1,_ac2);
this._stateChangeEv=new DwtEvent(true);
this._tabs=new Array();
this._tabIx=1;
this._pageDiv=document.createElement("div");
this._pageDiv.className=_ac1;
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(_ac3){
this._eventMgr.addListener(DwtEvent.STATE_CHANGE,_ac3);
};
DwtTabView.prototype.removeStateChangeListener=function(_ac4){
this._eventMgr.removeListener(DwtEvent.STATE_CHANGE,_ac4);
};
DwtTabView.prototype.addTab=function(_ac5,_ac6){
var _ac7=this._tabIx++;
this._tabs[_ac7]=new Object();
this._tabs[_ac7]["title"]=_ac5;
this._tabs[_ac7]["button"]=this._tabBar.addButton(_ac7,_ac5);
if(_ac6){
this._tabs[_ac7]["view"]=_ac6;
this._pageDiv.appendChild(this._tabs[_ac7]["view"].getHtmlElement());
_ac6._tabKey=_ac7;
}else{
this._tabs[_ac7]["view"]=null;
}
if(_ac7==1){
if(this._tabs[_ac7]["view"]){
this._tabs[_ac7]["view"].showMe();
}
this._currentTabKey=_ac7;
this.switchToTab(_ac7);
}else{
if(this._tabs[_ac7]["view"]){
this._tabs[_ac7]["view"].hideMe();
Dwt.setVisible(this._tabs[_ac7]["view"].getHtmlElement(),false);
}
}
this._tabBar.addSelectionListener(_ac7,new AjxListener(this,DwtTabView.prototype._tabButtonListener));
return _ac7;
};
DwtTabView.prototype.getCurrentTab=function(){
return this._currentTabKey;
};
DwtTabView.prototype.getTab=function(_ac8){
if(this._tabs&&this._tabs[_ac8]){
return this._tabs[_ac8];
}else{
return null;
}
};
DwtTabView.prototype.getTabTitle=function(_ac9){
return this._tabs&&this._tabs[_ac9]?this._tabs[_ac9]["title"]:null;
};
DwtTabView.prototype.getTabButton=function(_aca){
return this._tabs&&this._tabs[_aca]?this._tabs[_aca]["button"]:null;
};
DwtTabView.prototype.getTabView=function(_acb){
return this._tabs&&this._tabs[_acb]?this._tabs[_acb]["view"]:null;
};
DwtTabView.prototype.switchToTab=function(_acc){
if(this._tabs&&this._tabs[_acc]){
this._showTab(_acc);
this._tabBar.openTab(_acc);
}
if(this._eventMgr.isListenerRegistered(DwtEvent.STATE_CHANGE)){
this._eventMgr.notifyListeners(DwtEvent.STATE_CHANGE,this._stateChangeEv);
}
};
DwtTabView.prototype.setBounds=function(x,y,_acf,_ad0){
DwtComposite.prototype.setBounds.call(this,x,y,_acf,_ad0);
this._resetTabSizes(_acf,_ad0);
};
DwtTabView.prototype.getActiveView=function(){
return this._tabs[this._currentTabKey].view;
};
DwtTabView.prototype._resetTabSizes=function(_ad1,_ad2){
var _ad3=this._tabBar.getSize();
var _ad4=_ad3.y||this._tabBar.getHtmlElement().clientHeight;
var _ad5=_ad1;
var _ad6=_ad2-_ad4;
if(this._tabs&&this._tabs.length){
for(var _ad7 in this._tabs){
if(this._tabs[_ad7]["view"]){
this._tabs[_ad7]["view"].resetSize(_ad1,_ad2);
}
}
}
};
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(_adc){
this._children.add(_adc);
};
DwtTabView.prototype._showTab=function(_add){
if(this._tabs&&this._tabs[_add]){
this._currentTabKey=_add;
this._hideAllTabs();
if(this._tabs[_add]["view"]){
Dwt.setVisible(this._tabs[_add]["view"].getHtmlElement(),true);
this._tabs[_add]["view"].showMe();
}
}
};
DwtTabView.prototype._hideAllTabs=function(){
if(this._tabs&&this._tabs.length){
for(var _ade in this._tabs){
if(this._tabs[_ade]["view"]){
this._tabs[_ade]["view"].hideMe();
Dwt.setVisible(this._tabs[_ade]["view"].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 _ae1=elem.getAttribute("tabKey");
if((_ae1!==void 0)&&(_ae1!==null)){
this.switchToTab(_ae1);
}
}
}
};
function DwtTabViewPage(_ae2,_ae3,_ae4){
if(arguments.length==0){
return;
}
var _ae5=_ae3||"DwtTabViewPage";
var ps=_ae4||DwtControl.ABSOLUTE_STYLE;
this._rendered=true;
DwtPropertyPage.call(this,_ae2,_ae5,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 _ae7=parseInt(this.parent.getHtmlElement().style.height);
var _ae8=AjxStringUtil.getUnitsFromSizeString(this.parent.getHtmlElement().style.height);
if(_ae7>80){
this.getHtmlElement().style.height=(Number(_ae7-80).toString()+_ae8);
}
}
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(_ae9,_aea){
if(this._rendered){
this.setSize(_ae9,_aea);
}
};
function DwtTabBar(_aeb,_aec,_aed){
if(arguments.length==0){
return;
}
this._buttons=new Array();
this._tbuttons=new Array();
this._btnStyle=_aed?_aed:"DwtTabButton";
this._btnImage=null;
this._currentTabKey=1;
var _aee=_aec?_aec:"DwtTabBar";
DwtToolBar.call(this,_aeb,_aee,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,_af0){
var el=DwtToolBar.prototype.addSpacer.apply(this,arguments);
el.parentNode.style.verticalAlign="bottom";
return el;
};
DwtTabBar.prototype.addFiller=function(_af2,_af3){
var el=DwtToolBar.prototype.addFiller.apply(this,arguments);
el.parentNode.style.verticalAlign="bottom";
return el;
};
DwtTabBar.prototype.addStateChangeListener=function(_af5){
this._eventMgr.addListener(DwtEvent.STATE_CHANGE,_af5);
};
DwtTabBar.prototype.removeStateChangeListener=function(_af6){
this._eventMgr.removeListener(DwtEvent.STATE_CHANGE,_af6);
};
DwtTabBar.prototype.addSelectionListener=function(_af7,_af8){
this._buttons[_af7].addSelectionListener(_af8);
this._tbuttons[_af7].table.setAttribute("tabKey",_af7);
this._tbuttons[_af7].leftImg.setAttribute("tabKey",_af7);
this._tbuttons[_af7].rightImg.setAttribute("tabKey",_af7);
this._tbuttons[_af7].leftTopImg.setAttribute("tabKey",_af7);
this._tbuttons[_af7].rightTopImg.setAttribute("tabKey",_af7);
this._tbuttons[_af7].topImg.setAttribute("tabKey",_af7);
this._tbuttons[_af7]._bottomRow.setAttribute("tabKey",_af7);
this._tbuttons[_af7].addListener(DwtEvent.ONMOUSEUP,_af8);
};
DwtTabBar.prototype.removeSelectionListener=function(_af9,_afa){
this._buttons[_af9].removeSelectionListener(_afa);
};
DwtTabBar.prototype.addButton=function(_afb,_afc){
var tb=this._tbuttons[_afb]=new DwtTabButton(this);
var b=this._buttons[_afb]=new DwtButton(tb,null,this._btnStyle,DwtControl.RELATIVE_STYLE);
var be=b.getHtmlElement();
be.style.position="relative";
be.style.top="-3px";
this._buttons[_afb].addSelectionListener(new AjxListener(this,DwtTabBar._setActiveTab));
this._tbuttons[_afb].addListener(DwtEvent.ONMOUSEUP,(new AjxListener(this,DwtTabBar._setActiveTab)));
if(this._btnImage!=null){
b.setImage(this._btnImage);
}
if(_afc!=null){
b.setText(_afc);
}
b.setEnabled(true);
b.setData("tabKey",_afb);
if(parseInt(_afb)==1){
tb.setOpen();
}
return b;
};
DwtTabBar.prototype.getButton=function(_b00){
if(this._buttons[_b00]){
return this._buttons[_b00];
}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 _b04=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,_b06,_b07){
if(!AjxUtil.isNumber(_b07)){
var el=this.getHtmlElement().firstChild;
_b07=this._style==DwtToolBar.HORIZ_STYLE?(el.rows[0].cells.length-1):(el.rows.length-1);
}
DwtToolBar.prototype._addItem.call(this,type,_b06,_b07);
};
DwtTabBar.prototype._createSpacerElement=function(){
var el=document.createElement("div");
AjxImg.setImage(el,"TabSpacer__H",null,true);
return el;
};
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(_b0d){
if(arguments.length==0){
return;
}
this._isClosed=true;
DwtComposite.call(this,_b0d,"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",null,true);
AjxImg.setImage(this.topImg,"Tab_T__H",AjxImg.HORIZ_BORDER,true);
AjxImg.setImage(this.rightTopImg,"Tab_TR",null,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",AjxImg.VERT_BORDER,true);
AjxImg.setImage(this.centerImg,"Tab__BG",AjxImg.BACKGROUND,true);
AjxImg.setImage(this.rightImg,"Tab_R__V",AjxImg.VERT_BORDER,true);
this.leftBottomImg=document.createElement("div");
this.bottomImg=document.createElement("div");
this.rightBottomImg=document.createElement("div");
AjxImg.setImage(this.leftBottomImg,"Tab_BL",null,true);
AjxImg.setImage(this.bottomImg,"Tab_B__H",AjxImg.HORIZ_BORDER,true);
AjxImg.setImage(this.rightBottomImg,"Tab_BR",null,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(_b0e){
this._centerMiddleCell.appendChild(_b0e.getHtmlElement());
_b0e.addListener(DwtEvent.ONMOUSEOVER,this._mouseOverListener);
_b0e.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(_b11){
AjxImg.setImage(this.leftTopImg,_b11+"_TL",null,true);
AjxImg.setImage(this.topImg,_b11+"_T__H",AjxImg.HORIZ_BORDER,true);
AjxImg.setImage(this.rightTopImg,_b11+"_TR",null,true);
AjxImg.setImage(this.leftImg,_b11+"_L__V",AjxImg.VERT_BORDER,true);
AjxImg.setImage(this._centerMiddleCell,_b11+"__BG",AjxImg.BACKGROUND,true);
AjxImg.setImage(this.rightImg,_b11+"_R__V",AjxImg.VERT_BORDER,true);
AjxImg.setImage(this.leftBottomImg,_b11+"_BL",null,true);
AjxImg.setImage(this.bottomImg,_b11+"_B__H",AjxImg.HORIZ_BORDER,true);
AjxImg.setImage(this.rightBottomImg,_b11+"_BR",null,true);
};
function DwtAlert(_b12,_b13,_b14){
if(arguments.length==0){
return;
}
_b14=_b14||DwtControl.STATIC_STYLE;
DwtComposite.call(this,_b12,null,_b14);
this._alertClass=_b13;
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(_b15){
this._alertStyle=_b15||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(_b16){
var _b17=_b16?"block":"none";
this._iconDiv.parentNode.style.display=_b17;
};
DwtAlert.prototype.getIconVisible=function(){
return this._iconDiv.style.display=="block";
};
DwtAlert.prototype.setTitle=function(_b18){
this._alertTitle=_b18;
this._titleDiv.innerHTML=_b18||"";
};
DwtAlert.prototype.getTitle=function(){
return this._alertTitle;
};
DwtAlert.prototype.setContent=function(_b19){
this._alertContent=_b19;
this._contentDiv.innerHTML=_b19||"";
};
DwtAlert.prototype.getContent=function(){
return this._alertContent;
};
DwtAlert.prototype._createHTML=function(){
var _b1a=this.getHtmlElement().id;
var _b1b=_b1a+"_icon";
var _b1c=_b1a+"_title";
var _b1d=_b1a+"_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=_b1b;
this._iconDiv.className="DwtAlertIcon "+DwtAlert._ICONS[this._alertStyle];
var row1=this._alertDiv.insertRow(0);
var _b1f=row1.insertCell(0);
_b1f.width="1%";
_b1f.appendChild(this._iconDiv);
var _b20=document.createElement("TABLE");
_b20.cellPadding=0;
_b20.cellSpacing=0;
this._titleDiv=_b20.insertRow(0).insertCell(0);
this._titleDiv.id=_b1c;
this._titleDiv.className="DwtAlertTitle";
this._contentDiv=_b20.insertRow(1).insertCell(0);
this._contentDiv.id=_b1d;
this._contentDiv.className="DwtAlertContent";
var _b21=row1.insertCell(1);
_b21.width="99%";
_b21.appendChild(_b20);
var _b22=this.getHtmlElement();
_b22.style.align="center";
_b22.appendChild(this._alertDiv);
};
function DwtText(_b23,_b24,_b25){
if(arguments.length==0){
return;
}
_b24=_b24||"DwtText";
DwtControl.call(this,_b23,_b24,_b25);
}
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 AsynchCommand(){
this.invokeListeners=new Array();
this.commandXmlDoc="";
this._responseXmlDoc=null;
this._st=null;
this._en=null;
}
AsynchCommand.prototype.toString=function(){
return "AsynchCommand";
};
AsynchCommand.prototype.addInvokeListener=function(obj){
this.invokeListeners.push(obj);
GlobalCommands[GlobalListenerCount]=this;
GlobalListenerCount++;
};
AsynchCommand.prototype.removeInvokeListener=function(obj){
var cnt=this.invokeListeners.length;
var ix=0;
for(;ix<cnt;ix++){
if(this.invokeListeners[ix]==obj){
this.invokeListeners[ix]=null;
break;
}
}
};
AsynchCommand.prototype.removeAllInvokeListeners=function(){
var cnt=this.invokeListeners.length;
var ix=0;
for(;ix<cnt;ix++){
this.invokeListeners[ix]=null;
}
this.invokeListeners=null;
};
AsynchCommand.prototype._fireInvokeEvent=function(_b2d){
var cnt=this.invokeListeners.length;
for(var ix=0;ix<cnt;ix++){
if(this.invokeListeners[ix]!=null){
if(_b2d){
this.invokeListeners[ix].run(_b2d);
}else{
if(this._responseXmlDoc){
this.invokeListeners[ix].run(this._responseXmlDoc);
}else{
this.invokeListeners[ix].run(new AjxException("Service error",AjxException.UNKNOWN_ERROR,"AsynchCommand.prototype._fireInvokeEvent","Service returned empty document"));
}
}
}
}
};
AsynchCommand.prototype.rpcCallback=function(_b30){
this._en=new Date();
var _b31=null;
if(!_b30.success){
if(_b30.text==null){
return;
}
try{
var _b32=AjxEnv.isIE||_b30.xml==null?AjxXmlDoc.createFromXml(_b30.text):AjxXmlDoc.createFromDom(_b30.xml);
if(_b32.getBody()){
}
}
catch(ex){
_b31=new AjxException();
_b31.method="AsynchCommand.prototype.rpcCallback";
_b31.detail="Unknown problem ecnountered while communicating with the server. ";
_b31.detail+="text: ";
_b31.detail+=_b30.text;
_b31.detail+="\n";
_b31.detail+="xml: ";
_b31.detail+=_b30.xml;
_b31.detail+="\n";
_b31.detail+="status: ";
_b31.detail+=_b30.status;
_b31.detail+="\n";
_b31.code=AjxException.UNKNOWN_ERROR;
_b31.msg="Unknown Error";
}
}else{
try{
var _b32=AjxEnv.isIE||_b30.xml==null?AjxXmlDoc.createFromXml(_b30.text):AjxXmlDoc.createFromDom(_b30.xml);
this._responseXmlDoc=_b32;
}
catch(ex){
if(ex instanceof AjxException){
_b31=ex;
}else{
_b31=new AjxException();
_b31.method="AsynchCommand.prototype.rpcCallback";
_b31.detail=ex.toString();
_b31.code=AjxException.UNKNOWN_ERROR;
_b31.msg="Unknown Error";
}
this._fireInvokeEvent(_b31);
return;
}
}
this._fireInvokeEvent(_b31);
};
AsynchCommand.prototype.cancel=function(){
if(!this._rpcId){
return;
}
var req=AjxRpc.getRpcRequest(this._rpcId);
if(req){
req.cancel();
}
};
AsynchCommand.prototype.invoke=function(_b34,_b35){
if(arguments.length<2){
return;
}
try{
var _b36=_b34.getDocXml();
this._st=new Date();
GlobalCallback[GlobalCallbackCount]=new AjxCallback(this,this.rpcCallback);
this._rpcId=AjxRpc.invoke(_b36,_b35,{"Content-Type":"text/xml; charset=utf-8"},GlobalCallback[GlobalCallbackCount]);
GlobalCallbackCount++;
}
catch(ex){
var _b37=new AjxException();
_b37.method="AsynchCommand.invoke";
if(ex instanceof AjxException){
_b37.detail=ex.msg+": "+ex.code+" ("+ex.method+")";
_b37.msg="Network Error";
_b37.code=ex.code;
}else{
_b37.detail=ex.toString();
_b37.code=AjxException.UNKNOWN_ERROR;
_b37.msg="Unknown Error";
}
this._fireInvokeEvent(_b37);
}
};
function XmlUtils(){
}
XmlUtils.getNodeValue=function(_b38,_b39){
var tmp=_b38;
var tag="<"+_b39;
var _b3c=tmp.indexOf(tag);
if(_b3c>-1){
tmp=tmp.substring(_b3c+tag.length);
_b3c=tmp.indexOf(">")+1;
}
var end=tmp.indexOf("</"+_b39+">");
if(_b3c!=-1&&_b3c<end){
return tmp.substring(_b3c,end);
}else{
delete tmp;
return null;
}
};
XmlUtils.getAttrValue=function(_b3e,_b3f,_b40){
var tmp=_b3e;
var tag="<"+_b3f;
var _b43=tmp.indexOf(tag);
if(_b43>-1){
tmp=tmp.substring(_b43);
}else{
return null;
}
var end=tmp.indexOf(">");
tmp=tmp.substring(_b43,end);
_b43=tmp.indexOf(" "+_b40+"=\"");
if(_b43==-1){
_b43=tmp.indexOf(" "+_b40.toLowerCase()+"=\"");
}
if(_b43>-1){
var _b45=tmp.substring(_b43+_b40.length+3);
delete tmp;
return _b45.substring(0,_b45.indexOf("\""));
}else{
delete tmp;
return null;
}
};
XmlUtils.splitXml=function(_b46,_b47){
var _b48=new Array();
for(var i=0;;i++){
var _b4a=_b46.indexOf("<"+_b47);
if(_b4a<0){
return _b48;
}
var end=_b46.indexOf("</"+_b47+">");
var _b4c=3;
if(end<0){
end=_b46.indexOf("/>");
_b4c=2-_b47.length;
}
_b48[i]=_b46.substring(_b4a,end+_b47.length+_b4c);
_b46=_b46.substring(end+_b47.length+_b4c);
}
};
function ClientException(msg,code,_b4f,_b50){
if(arguments.length==0){
return;
}
AjxException.call(this,msg,code,_b4f,_b50);
}
ClientException.prototype=new AjxException;
ClientException.prototype.constructor=ClientException;
ClientException.prototype.toString=function(){
return "ClientException";
};
ClientException.CSFE_SVC_ERROR="CSFE_SVC_ERROR";
ClientException.NETWORK_ERROR="NETWORK_ERROR";
ClientException.NO_AUTH_TOKEN="NO_AUTH_TOKEN";
ClientException.SOAP_ERROR="SOAP_ERROR";
ClientException.SVC_AUTH_EXPIRED="service.AUTH_EXPIRED";
ClientException.SVC_AUTH_REQUIRED="service.AUTH_REQUIRED";
ClientException.SVC_FAILURE="service.FAILURE";
ClientException.SVC_INVALID_REQUEST="service.INVALID_REQUEST";
ClientException.SVC_PARSE_ERROR="service.PARSE_ERROR";
ClientException.SVC_PERM_DENIED="service.PERM_DENIED";
ClientException.SVC_UNKNOWN_DOCUMENT="service.UNKNOWN_DOCUMENT";
ClientException.SVC_WRONG_HOST="service.WRONG_HOST";
ClientException.ACCT_AUTH_FAILED="account.AUTH_FAILED";
ClientException.ACCT_EXISTS="account.ACCOUNT_EXISTS";
ClientException.ACCT_INVALID_PASSWORD="account.INVALID_PASSWORD";
ClientException.ACCT_INVALID_PREF_NAME="account.INVALID_PREF_NAME";
ClientException.ACCT_INVALID_PREF_VALUE="account.INVALID_PREF_VALUE";
ClientException.ACCT_NO_SUCH_ACCOUNT="account.NO_SUCH_ACCOUNT";
ClientException.ACCT_NO_SUCH_SAVED_SEARCH="account.NO_SUCH_SAVED_SEARCH";
ClientException.ACCT_NO_SUCH_TAG="account.ACCT_NO_SUCH_TAG";
ClientException.ACCT_PASS_RECENTLY_USED="account.PASSWORD_RECENTLY_USED";
ClientException.ACCT_PASS_CHANGE_TOO_SOON="account.PASSWORD_CHANGE_TOO_SOON";
ClientException.DOMAIN_NOT_EMPTY="account.DOMAIN_NOT_EMPTY";
ClientException.COS_EXISTS="account.COS_EXISTS";
ClientException.DOMAIN_EXISTS="account.DOMAIN_EXISTS";
ClientException.MAIL_INVALID_NAME="mail.INVALID_NAME";
ClientException.MAIL_NO_SUCH_FOLDER="mail.NO_SUCH_FOLDER";
ClientException.MAIL_NO_SUCH_TAG="mail.NO_SUCH_TAG";
ClientException.MAIL_NO_SUCH_CONV="mail.NO_SUCH_CONV";
ClientException.MAIL_NO_SUCH_MSG="mail.NO_SUCH_MSG";
ClientException.MAIL_NO_SUCH_PART="mail.NO_SUCH_PART";
ClientException.MAIL_QUOTA_EXCEEDED="mail.QUOTA_EXCEEDED";
ClientException.MAIL_QUERY_PARSE_ERROR="mail.QUERY_PARSE_ERROR";
ClientException.MAIL_SEND_FAILURE="mail.SEND_FAILURE";
function unloadZimbra(){
for(var i in ClientException){
ClientException[i]=null;
}
ClientException=null;
for(var i in XmlUtils){
XmlUtils[i]=null;
}
XmlUtils=null;
for(var i in AsynchCommand){
AsynchCommand[i]=null;
}
AsynchCommand=null;
for(var i in DwtText){
DwtText[i]=null;
}
DwtText=null;
for(var i in DwtAlert){
DwtAlert[i]=null;
}
DwtAlert=null;
for(var i in DwtTree){
DwtTree[i]=null;
}
DwtTree=null;
for(var i in DwtTreeItem){
DwtTreeItem[i]=null;
}
DwtTreeItem=null;
for(var i in DwtStickyToolTip){
DwtStickyToolTip[i]=null;
}
DwtStickyToolTip=null;
for(var i in DwtToolTip){
DwtToolTip[i]=null;
}
DwtToolTip=null;
for(var i in DwtBorder){
DwtBorder[i]=null;
}
DwtBorder=null;
for(var i in DwtToolBar){
DwtToolBar[i]=null;
}
DwtToolBar=null;
for(var i in DwtSash){
DwtSash[i]=null;
}
DwtSash=null;
for(var i in DwtMenu){
DwtMenu[i]=null;
}
DwtMenu=null;
for(var i in DwtMenuItem){
DwtMenuItem[i]=null;
}
DwtMenuItem=null;
for(var i in DwtButton){
DwtButton[i]=null;
}
DwtButton=null;
for(var i in DwtListView){
DwtListView[i]=null;
}
DwtListView=null;
for(var i in DwtLabel){
DwtLabel[i]=null;
}
DwtLabel=null;
for(var i in DwtDialog){
DwtDialog[i]=null;
}
DwtDialog=null;
for(var i in DwtBaseDialog){
DwtBaseDialog[i]=null;
}
DwtBaseDialog=null;
for(var i in DwtShell){
DwtShell[i]=null;
}
DwtShell=null;
for(var i in DwtComposite){
DwtComposite[i]=null;
}
DwtComposite=null;
for(var i in DwtControl){
DwtControl[i]=null;
}
DwtControl=null;
for(var i in DwtHoverMgr){
DwtHoverMgr[i]=null;
}
DwtHoverMgr=null;
for(var i in DwtDropTarget){
DwtDropTarget[i]=null;
}
DwtDropTarget=null;
for(var i in DwtDropEvent){
DwtDropEvent[i]=null;
}
DwtDropEvent=null;
for(var i in DwtDragSource){
DwtDragSource[i]=null;
}
DwtDragSource=null;
for(var i in DwtDragEvent){
DwtDragEvent[i]=null;
}
DwtDragEvent=null;
for(var i in DwtHoverEvent){
DwtHoverEvent[i]=null;
}
DwtHoverEvent=null;
for(var i in DwtTreeEvent){
DwtTreeEvent[i]=null;
}
DwtTreeEvent=null;
for(var i in DwtHtmlEditorStateEvent){
DwtHtmlEditorStateEvent[i]=null;
}
DwtHtmlEditorStateEvent=null;
for(var i in DwtSelectionEvent){
DwtSelectionEvent[i]=null;
}
DwtSelectionEvent=null;
for(var i in DwtListViewActionEvent){
DwtListViewActionEvent[i]=null;
}
DwtListViewActionEvent=null;
for(var i in DwtMouseEventCapture){
DwtMouseEventCapture[i]=null;
}
DwtMouseEventCapture=null;
for(var i in DwtMouseEvent){
DwtMouseEvent[i]=null;
}
DwtMouseEvent=null;
for(var i in DwtKeyEvent){
DwtKeyEvent[i]=null;
}
DwtKeyEvent=null;
for(var i in DwtControlEvent){
DwtControlEvent[i]=null;
}
DwtControlEvent=null;
for(var i in DwtUiEvent){
DwtUiEvent[i]=null;
}
DwtUiEvent=null;
for(var i in DwtDisposeEvent){
DwtDisposeEvent[i]=null;
}
DwtDisposeEvent=null;
for(var i in DwtDateRangeEvent){
DwtDateRangeEvent[i]=null;
}
DwtDateRangeEvent=null;
for(var i in DwtEventManager){
DwtEventManager[i]=null;
}
DwtEventManager=null;
for(var i in DwtEvent){
DwtEvent[i]=null;
}
DwtEvent=null;
for(var i in DwtUnits){
DwtUnits[i]=null;
}
DwtUnits=null;
for(var i in DwtRectangle){
DwtRectangle[i]=null;
}
DwtRectangle=null;
for(var i in DwtPoint){
DwtPoint[i]=null;
}
DwtPoint=null;
for(var i in DwtCssStyle){
DwtCssStyle[i]=null;
}
DwtCssStyle=null;
for(var i in DwtDraggable){
DwtDraggable[i]=null;
}
DwtDraggable=null;
for(var i in DwtException){
DwtException[i]=null;
}
DwtException=null;
for(var i in Dwt){
Dwt[i]=null;
}
Dwt=null;
for(var i in DwtImg){
DwtImg[i]=null;
}
DwtImg=null;
DBG=null;
}
function ComplexTreeProperties(_b52,_b53,_b54,_b55,_b56,_b57,_b58,_b59,_b5a){
this.CURRENT_STYLE=_b52;
this.CURRENT_TREE_PATTERN=_b53;
this.CURRENT_LIST_PATTERN=_b54;
this.CURRENT_XML_TAG_NAME=_b55;
this.ENTRY_POINT_URL=_b56;
this.EXPAND_SERVER_URL=_b57;
this.EXPAND_SERVER_URL_LOADED=_b59;
this.COLLAPSE_SERVER_URL=_b58;
this.TREE_DIV=_b5a;
}
ComplexTreeProperties.extention=["doc","xls","ppt","zip","pdf","txt","html","htm","wav","mp3","bmp","jpg","jpeg","gif","png","tif","tiff","avi","mpeg","mpa","mpg","mpe","mov","exe","text","rar","tgz"];
ComplexTreeProperties.picto=["doc","xls","ppt","zip","pdf","txt","html","html","sound","sound","img","img","img","img","img","img","img","video","video","video","video","video","video","exe","txt","rar","zip"];
ComplexTreeProperties.LOADING_ID=-1;
ComplexTreeProperties.ROW_HEIGHT=(AjxEnv.isIE?27:28);
ComplexTreeProperties.SHELL_HEIGHT=320;
ComplexTreeProperties.MIN_TREE_WIDTH=200;
ComplexTreeProperties.MAX_DATA_HEIGHT=550;
ComplexTreeProperties.TREE_WIDTH=250;
ComplexTreeProperties.SASH_HEIGHT=24;
ComplexTreeProperties.RESIZE=50;
ComplexTreeProperties.EXPANDALL_LEVEL=3;
ComplexTreeProperties.MAX_RETRIEVED_OBJECTS_EXPAND_ALL=50;
ComplexTreeProperties.RELOAD_ON_COLLAPSE=false;
ComplexTreeProperties.CONTINUE_IF_EMPTY=false;
ComplexTreeProperties.DELETED_WORKFLOW_STATE=-2;
ComplexTreeProperties.ACTIVE_WORKFLOW_STATE=1;
ComplexTreeProperties.STAGING_WORKFLOW_STATE=2;
ComplexTreeProperties.WAITING_WORKFLOW_STATE=3;
ComplexTreeProperties.LOCKED_STATE=4;
ComplexTreeProperties.WARNINGS_STATE=5;
ComplexTreeProperties.ERRORS_STATE=6;
ComplexTreeProperties.PARTIAL_WARNINGS_STATE=26;
ComplexTreeProperties.STANDARD_STATE=7;
ComplexTreeProperties.N_STEP_STATE=8;
ComplexTreeProperties.NO_WFLOW_STATE=9;
ComplexTreeProperties.LINKED_WFLOW_STATE=26;
ComplexTreeProperties.EXISTING_STATE=10;
ComplexTreeProperties.SELECT_SUB_TREE=11;
ComplexTreeProperties.UNSELECT_SUB_TREE=12;
ComplexTreeProperties.INFO=13;
ComplexTreeProperties.PROPS=14;
ComplexTreeProperties.IE_FOLDER=15;
ComplexTreeProperties.ADD_CATEGORY=16;
ComplexTreeProperties.EDIT_CATEGORY=17;
ComplexTreeProperties.MOVE_CATEGORY=18;
ComplexTreeProperties.DELETE_CATEGORY=19;
ComplexTreeProperties.EXPIRED_BUT_WILL_BECOME_VALID=20;
ComplexTreeProperties.EXPIRED=21;
ComplexTreeProperties.VALID_BUT_WILL_EXPIRE=22;
ComplexTreeProperties.VALID=23;
ComplexTreeProperties.NOT_VALID_BUT_WILL_BECOME_VALID=24;
ComplexTreeProperties.UNKNOWN=25;
ComplexTreeProperties.WORKFLOW_ICONS_PATH="/jsp/jahia/engines/images/icons/workflow/";
ComplexTreeProperties.ACTIVE_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/state_active.gif";
ComplexTreeProperties.WAITING_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/state_waiting.gif";
ComplexTreeProperties.EDIT_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/state_edit.gif";
ComplexTreeProperties.DELETED_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/state_deleted.gif";
ComplexTreeProperties.ACCEPT_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/accept.gif";
ComplexTreeProperties.REFUSE_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/refuse.gif";
ComplexTreeProperties.LOCKED_ICONE_SRC="/jsp/jahia/engines/images/icons/locked.gif";
ComplexTreeProperties.WARNINGS_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/warnings.gif";
ComplexTreeProperties.PARTIAL_WARNINGS_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/partial_warnings.gif";
ComplexTreeProperties.ERRORS_ICONE_SRC="/jsp/jahia/engines/images/icons/workflow/errors.gif";
ComplexTreeProperties.EMPTY_SRC="/jsp/jahia/javascript/zimbra/complexTree/empty.gif";
ComplexTreeProperties.PIX_SRC="/jsp/jahia/javascript/zimbra/complexTree/pix.gif";
ComplexTreeProperties.IE_FOLDER_SRC="/jsp/jahia/javascript/zimbra/complexTree/IEFolder.gif";
ComplexTreeProperties.UPDATE_ICONE_SRC="/jsp/jahia/engines/images/actions/update.gif";
ComplexTreeProperties.DELETE_ICONE_SRC="/jsp/jahia/engines/images/actions/delete.gif";
ComplexTreeProperties.STANDARD="/jsp/jahia/javascript/zimbra/complexTree/jgear.gif";
ComplexTreeProperties.N_STEP="/jsp/jahia/javascript/zimbra/complexTree/ngear.gif";
ComplexTreeProperties.NO_WFLOW="/jsp/jahia/javascript/zimbra/complexTree/gear_forbidden.gif";
ComplexTreeProperties.LINKED="/jsp/jahia/javascript/zimbra/complexTree/lgear.gif";
ComplexTreeProperties.EXPIRED_BUT_WILL_BECOME_VALID_SRC="/jsp/jahia/engines/images/icons/timebasedpublishing/yellow_clock.gif";
ComplexTreeProperties.EXPIRED_SRC="/jsp/jahia/engines/images/icons/timebasedpublishing/red_clock.gif";
ComplexTreeProperties.VALID_BUT_WILL_EXPIRE_SRC="/jsp/jahia/engines/images/icons/timebasedpublishing/orange_clock.gif";
ComplexTreeProperties.VALID_SRC="/jsp/jahia/engines/images/icons/timebasedpublishing/valid_clock.gif";
ComplexTreeProperties.NOT_VALID_BUT_WILL_BECOME_VALID_SRC="/jsp/jahia/engines/images/icons/timebasedpublishing/yellow_clock.gif";
ComplexTreeProperties.UNKNOWN_SRC="/jsp/jahia/engines/images/icons/timebasedpublishing/grey_clock.gif";
ComplexTreeProperties.EXISTING="/jsp/jahia/javascript/zimbra/complexTree/check.gif";
ComplexTreeProperties.FILE_SRC="/jsp/jahia/javascript/zimbra/complexTree/img.gif";
ComplexTreeProperties.FOLDER_SRC="/jsp/jahia/javascript/zimbra/complexTree/folder.gif";
ComplexTreeProperties.COMPUTER_SRC="/jsp/jahia/javascript/zimbra/complexTree/computer.gif";
ComplexTreeProperties.INFO_SRC="/jsp/jahia/engines/images/about.gif";
ComplexTreeProperties.PROPS_SRC="/jsp/jahia/engines/images/preferences.gif";
ComplexTreeProperties.ADD_CATEGORY_SRC="/jsp/jahia/javascript/zimbra/complexTree/add.gif";
ComplexTreeProperties.EDIT_CATEGORY_SRC="/jsp/jahia/javascript/zimbra/complexTree/edit.gif";
ComplexTreeProperties.MOVE_CATEGORY_SRC="/jsp/jahia/javascript/zimbra/complexTree/move.gif";
ComplexTreeProperties.DELETE_CATEGORY_SRC="/jsp/jahia/javascript/zimbra/complexTree/delete.gif";
ComplexTreeProperties.PORTLET_CATEGORY_ALLSOURCES_SRC="/jsp/jahia/javascript/zimbra/complexTree/allsources.png";
ComplexTreeProperties.I=0;
ComplexTreeProperties.W_FLOW_CHECKBOXES=ComplexTreeProperties.I++;
ComplexTreeProperties.W_FLOW_TYPE=ComplexTreeProperties.I++;
ComplexTreeProperties.W_FLOW_IMAGES=ComplexTreeProperties.I++;
ComplexTreeProperties.VERSIONNING_CHECKBOX=ComplexTreeProperties.I++;
ComplexTreeProperties.IMAGE=ComplexTreeProperties.I++;
ComplexTreeProperties.IMAGE_LINK=ComplexTreeProperties.I++;
ComplexTreeProperties.BLANK=ComplexTreeProperties.I++;
ComplexTreeProperties.IMAGE_LINK_SAME_PAGE=ComplexTreeProperties.I++;
ComplexTreeProperties.LINK=ComplexTreeProperties.I++;
ComplexTreeProperties.LINK_SAME_PAGE=ComplexTreeProperties.I++;
ComplexTreeProperties.LINK_FCK=ComplexTreeProperties.I++;
ComplexTreeProperties.ID=ComplexTreeProperties.I++;
ComplexTreeProperties.SELECT_RADIO=ComplexTreeProperties.I++;
ComplexTreeProperties.KEY=ComplexTreeProperties.I++;
ComplexTreeProperties.SPACE=ComplexTreeProperties.I++;
ComplexTreeProperties.VERSIONNING_IMAGES=ComplexTreeProperties.I++;
ComplexTreeProperties.FILE_IMAGE=ComplexTreeProperties.I++;
ComplexTreeProperties.FILEMANAGER_CHECKBOX=ComplexTreeProperties.I++;
ComplexTreeProperties.FILEMANAGER_IMAGES=ComplexTreeProperties.I++;
ComplexTreeProperties.FILESIZE=ComplexTreeProperties.I++;
ComplexTreeProperties.LASTMODIF=ComplexTreeProperties.I++;
ComplexTreeProperties.SELECT_FOLDER=ComplexTreeProperties.I++;
ComplexTreeProperties.NEW_LINE=ComplexTreeProperties.I++;
ComplexTreeProperties.TITLE=ComplexTreeProperties.I++;
ComplexTreeProperties.CATEGORY_LAUNCHERS=ComplexTreeProperties.I++;
ComplexTreeProperties.CATEGORY_LAUNCHERS=ComplexTreeProperties.I++;
ComplexTreeProperties.CATEGORY_RADIO=ComplexTreeProperties.I++;
ComplexTreeProperties.CATEGORY_CHECKBOX=ComplexTreeProperties.I++;
ComplexTreeProperties.PORTLET_CHECKBOX=ComplexTreeProperties.I++;
ComplexTreeProperties.SELECTED_FILE=ComplexTreeProperties.I++;
ComplexTreeProperties.FILEMANAGER_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.SIMPLE_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.WORKFLOW_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.SELECT_PAGE_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.SITEMAP_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.CATEGORY_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.VERSIONNING_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.FCK_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.WEBDAV_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.WEBDAV_SELECT_FOLDER_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.ADMIN_CATEGORY_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.SELECT_CATEGORY_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.MOVE_CATEGORY_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.PORTLET_CATEGORY_STYLE=ComplexTreeProperties.I++;
ComplexTreeProperties.SIMPLE_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.LINK];
ComplexTreeProperties.SIMPLE_LIST_STYLE_PATTERN=[];
ComplexTreeProperties.FCK_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.LINK_FCK];
ComplexTreeProperties.FCK_LIST_STYLE_PATTERN=[];
ComplexTreeProperties.WORKFLOW_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.ID,ComplexTreeProperties.W_FLOW_TYPE,ComplexTreeProperties.SPACE,ComplexTreeProperties.LINK];
ComplexTreeProperties.WORKFLOW_LIST_STYLE_PATTERN=[[ComplexTreeProperties.W_FLOW_IMAGES],[ComplexTreeProperties.IMAGE,ComplexTreeProperties.SPACE,ComplexTreeProperties.W_FLOW_CHECKBOXES]];
ComplexTreeProperties.SITEMAP_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.ID,ComplexTreeProperties.LINK_SAME_PAGE];
ComplexTreeProperties.SITEMAP_LIST_STYLE_PATTERN=[[ComplexTreeProperties.IMAGE_LINK_SAME_PAGE,ComplexTreeProperties.BLANK]];
ComplexTreeProperties.SELECT_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.SELECT_RADIO,ComplexTreeProperties.ID,ComplexTreeProperties.SELECT_PAGE_STYLE,ComplexTreeProperties.SPACE,ComplexTreeProperties.LINK];
ComplexTreeProperties.SELECT_LIST_STYLE_PATTERN=[];
ComplexTreeProperties.VERSIONNING_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.ID,ComplexTreeProperties.LINK];
ComplexTreeProperties.VERSIONNING_LIST_STYLE_PATTERN=[[ComplexTreeProperties.VERSIONNING_CHECKBOX,ComplexTreeProperties.IMAGE,ComplexTreeProperties.SPACE,ComplexTreeProperties.VERSIONNING_IMAGES]];
ComplexTreeProperties.WEBDAV_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.FILE_IMAGE,ComplexTreeProperties.SPACE,ComplexTreeProperties.LINK_FCK];
ComplexTreeProperties.WEBDAV_LIST_STYLE_PATTERN=[];
ComplexTreeProperties.WEBDAV_SELECT_FOLDER_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.FILE_IMAGE,ComplexTreeProperties.SPACE,ComplexTreeProperties.SELECT_FOLDER];
ComplexTreeProperties.FILEMANAGER_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.FILE_IMAGE,ComplexTreeProperties.SPACE,ComplexTreeProperties.LINK_SAME_PAGE];
ComplexTreeProperties.FILEMANAGER_LIST_STYLE_PATTERN=[[ComplexTreeProperties.SELECTED_FILE,ComplexTreeProperties.FILEMANAGER_CHECKBOX,ComplexTreeProperties.FILE_IMAGE,ComplexTreeProperties.SPACE,ComplexTreeProperties.LINK_SAME_PAGE],[ComplexTreeProperties.FILEMANAGER_IMAGES],[ComplexTreeProperties.FILESIZE],[ComplexTreeProperties.LASTMODIF]];
ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN=[[ComplexTreeProperties.FILE_IMAGE,ComplexTreeProperties.NEW_LINE,ComplexTreeProperties.FILEMANAGER_CHECKBOX,ComplexTreeProperties.LINK_SAME_PAGE]];
ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN=[[ComplexTreeProperties.FILE_IMAGE,ComplexTreeProperties.NEW_LINE,ComplexTreeProperties.FILEMANAGER_CHECKBOX,ComplexTreeProperties.LINK_SAME_PAGE]];
ComplexTreeProperties.CATEGORY_ADMIN_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.TITLE,ComplexTreeProperties.SPACE,ComplexTreeProperties.CATEGORY_LAUNCHERS];
ComplexTreeProperties.CATEGORY_MOVE_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.CATEGORY_RADIO,ComplexTreeProperties.SPACE,ComplexTreeProperties.TITLE];
ComplexTreeProperties.CATEGORY_SELECT_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.CATEGORY_CHECKBOX,ComplexTreeProperties.SPACE,ComplexTreeProperties.TITLE];
ComplexTreeProperties.CATEGORY_PORTLET_TREE_STYLE_PATTERN=[ComplexTreeProperties.KEY,ComplexTreeProperties.PORTLET_CHECKBOX,ComplexTreeProperties.SPACE,ComplexTreeProperties.TITLE];
ComplexTreeProperties.OBJECT="object";
ComplexTreeProperties.PAGE="page";
ComplexTreeProperties.CATEGORY="category";
ComplexTreeProperties.COUNTER=0;
ComplexTreeProperties.getPicto=function(ext){
var f=ext.toLowerCase();
for(var k=0;k<ComplexTreeProperties.extention.length;k++){
if(f==ComplexTreeProperties.extention[k]){
return ComplexTreeProperties.picto[k];
}
}
return "file";
};
ComplexTreeProperties.getFileTypeImageLarge=function(ext){
if(ext=="dir"){
return ComplexTreeProperties.CONTEXT+"/jsp/jahia/engines/images/types/large/folder.gif";
}
return ComplexTreeProperties.CONTEXT+"/jsp/jahia/engines/images/types/large/"+ComplexTreeProperties.getPicto(ext)+".gif";
};
ComplexTreeProperties.getFileTypeImageTbnail=function(ext,key){
if(ext=="dir"){
return ComplexTreeProperties.CONTEXT+"/jsp/jahia/engines/images/types/tbnail/folder.gif";
}
var _b61=ComplexTreeProperties.getPicto(ext);
if(_b61.indexOf("img")>-1){
if(key.indexOf("_th_64")>-1){
return ComplexTreeProperties.webdavPath+key;
}
var _b62=key.substring(0,key.length-4);
_b62+="_th_64."+ext;
return ComplexTreeProperties.webdavPath+_b62;
}else{
return ComplexTreeProperties.CONTEXT+"/jsp/jahia/engines/images/types/tbnail/"+_b61+".gif";
}
};
ComplexTreeProperties.getFileTypeImage=function(ext){
if(ext=="root"){
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.COMPUTER_SRC;
}else{
if(ext=="dir"){
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.FOLDER_SRC;
}
}
return ComplexTreeProperties.CONTEXT+"/jsp/jahia/engines/images/types/"+ComplexTreeProperties.getPicto(ext)+".gif";
};
ComplexTreeProperties.getImageSrc=function(_b64){
_b64=parseInt(_b64,10);
switch(_b64){
case ComplexTreeProperties.ACTIVE_WORKFLOW_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.ACTIVE_ICONE_SRC;
case ComplexTreeProperties.STAGING_WORKFLOW_STATE:
ComplexTreeProperties.DOUBLE_BUTTONS=false;
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.EDIT_ICONE_SRC;
case ComplexTreeProperties.WAITING_WORKFLOW_STATE:
ComplexTreeProperties.DOUBLE_BUTTONS=true;
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.WAITING_ICONE_SRC;
case ComplexTreeProperties.DELETED_WORKFLOW_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.DELETED_ICONE_SRC;
case ComplexTreeProperties.LOCKED_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.LOCKED_ICONE_SRC;
case ComplexTreeProperties.WARNINGS_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.WARNINGS_ICONE_SRC;
case ComplexTreeProperties.PARTIAL_WARNINGS_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.PARTIAL_WARNINGS_ICONE_SRC;
case ComplexTreeProperties.ERRORS_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.ERRORS_ICONE_SRC;
case ComplexTreeProperties.STANDARD_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.STANDARD;
case ComplexTreeProperties.N_STEP_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.N_STEP;
case ComplexTreeProperties.NO_WFLOW_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.NO_WFLOW;
case ComplexTreeProperties.LINKED_WFLOW_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.LINKED;
case ComplexTreeProperties.EXISTING_STATE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.EXISTING;
case ComplexTreeProperties.SELECT_SUB_TREE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.ACCEPT_ICONE_SRC;
case ComplexTreeProperties.UNSELECT_SUB_TREE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.REFUSE_ICONE_SRC;
case ComplexTreeProperties.INFO:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.INFO_SRC;
case ComplexTreeProperties.PROPS:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.PROPS_SRC;
case ComplexTreeProperties.IE_FOLDER:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.IE_FOLDER_SRC;
case ComplexTreeProperties.ADD_CATEGORY:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.ADD_CATEGORY_SRC;
case ComplexTreeProperties.EDIT_CATEGORY:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.EDIT_CATEGORY_SRC;
case ComplexTreeProperties.MOVE_CATEGORY:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.MOVE_CATEGORY_SRC;
case ComplexTreeProperties.DELETE_CATEGORY:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.DELETE_CATEGORY_SRC;
case ComplexTreeProperties.EXPIRED_BUT_WILL_BECOME_VALID:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.EXPIRED_BUT_WILL_BECOME_VALID_SRC;
case ComplexTreeProperties.EXPIRED:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.EXPIRED_SRC;
case ComplexTreeProperties.VALID:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.VALID_SRC;
case ComplexTreeProperties.VALID_BUT_WILL_EXPIRE:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.VALID_BUT_WILL_EXPIRE_SRC;
case ComplexTreeProperties.NOT_VALID_BUT_WILL_BECOME_VALID:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.NOT_VALID_BUT_WILL_BECOME_VALID_SRC;
case ComplexTreeProperties.UNKNOWN:
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.UNKNOWN_SRC;
case -3:
ComplexTreeProperties.Error=true;
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.PIX_SRC;
default:
if(_b64>=100&&_b64<=999){
if(_b64.toString().charAt(1)=="3"||_b64==600){
ComplexTreeProperties.DOUBLE_BUTTONS=true;
}
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.WORKFLOW_ICONS_PATH+_b64+".png";
}else{
ComplexTreeProperties.Error=true;
return ComplexTreeProperties.CONTEXT+ComplexTreeProperties.EMPTY_SRC;
}
}
};
ComplexTreeProperties.getPatternItemSize=function(type){
switch(type){
case ComplexTreeProperties.BLANK:
case ComplexTreeProperties.SPACE:
case ComplexTreeProperties.NEW_LINE:
return 0;
case ComplexTreeProperties.ID:
case ComplexTreeProperties.KEY:
case ComplexTreeProperties.FILESIZE:
case ComplexTreeProperties.LASTMODIF:
case ComplexTreeProperties.TITLE:
return 1;
case ComplexTreeProperties.LINK:
case ComplexTreeProperties.LINK_SAME_PAGE:
case ComplexTreeProperties.LINK_FCK:
case ComplexTreeProperties.IMAGE:
case ComplexTreeProperties.SELECT_RADIO:
case ComplexTreeProperties.FILEMANAGER_CHECKBOX:
case ComplexTreeProperties.SELECT_FOLDER:
case ComplexTreeProperties.CATEGORY_RADIO:
case ComplexTreeProperties.CATEGORY_CHECKBOX:
case ComplexTreeProperties.SELECTED_FILE:
return 2;
case ComplexTreeProperties.SELECT_PAGE_STYLE:
case ComplexTreeProperties.FILE_IMAGE:
case ComplexTreeProperties.IMAGE_LINK:
case ComplexTreeProperties.IMAGE_LINK_SAME_PAGE:
case ComplexTreeProperties.W_FLOW_TYPE:
case ComplexTreeProperties.PORTLET_CHECKBOX:
return 3;
case ComplexTreeProperties.W_FLOW_CHECKBOXES:
case ComplexTreeProperties.VERSIONNING_CHECKBOX:
return 4;
case ComplexTreeProperties.VERSIONNING_IMAGES:
return 6;
case ComplexTreeProperties.FILEMANAGER_IMAGES:
return 9;
case ComplexTreeProperties.W_FLOW_IMAGES:
case ComplexTreeProperties.CATEGORY_LAUNCHERS:
return 12;
default:
return 0;
}
};
ComplexTreeProperties.getPatternItemLength=function(_b66){
var _b67=new Array(_b66.length);
for(var i=0;i<_b66.length;i++){
var _b69=0;
for(var j=0;j<_b66[i].length;j++){
_b69+=ComplexTreeProperties.getPatternItemSize(_b66[i][j]);
}
_b67[i]=_b69;
delete _b69;
}
return _b67;
};
ComplexTreeProperties.decodeOnClickURL=function(url,_b6c){
if((url.indexOf("'key'")>-1||url.indexOf("\"key\"")>-1)){
if(_b6c.canWrite!="true"){
return false;
}
var reg=new RegExp("(key)","g");
url=url.replace(reg,escape(_b6c.url));
delete reg;
}else{
if((url.indexOf("'folderUrl'")>-1||url.indexOf("\"folderUrl\"")>-1)){
if(_b6c.canRead!="true"){
return false;
}
var reg=new RegExp("(folderUrl)","g");
url=url.replace(reg,ComplexTreeProperties.webdavPath+escape(_b6c.url));
delete reg;
}
}
return url;
};
ComplexTreeProperties.getDataFromObjectInfo=function(_b6e,_b6f,_b70,_b71,_b72){
var _b73=parseInt(_b6f,10);
switch(_b73){
case ComplexTreeProperties.KEY:
return [_b6e.key];
case ComplexTreeProperties.ID:
return [_b6e.id];
case ComplexTreeProperties.TITLE:
return [_b6e.title];
case ComplexTreeProperties.FILESIZE:
return [_b6e.fileSize];
case ComplexTreeProperties.LASTMODIF:
return [_b6e.lastModif];
case ComplexTreeProperties.CATEGORY_RADIO:
return [_b6e.id,_b6e.disable];
case ComplexTreeProperties.CATEGORY_CHECKBOX:
return [_b6e.id,_b6e.checked];
case ComplexTreeProperties.PORTLET_CHECKBOX:
return [_b6e.id,_b6e.checked,_b6e.allsources];
case ComplexTreeProperties.LINK:
case ComplexTreeProperties.LINK_SAME_PAGE:
var _b74=_b6e.warnings||_b6e.partialWarnings||_b6e.errors||_b6e.locked;
if(_b6e.dir){
if(_b6e.dir=="dir"){
if(_b72&&_b72._urlToUseOnclick){
return [[ComplexTreeProperties.decodeOnClickURL(_b72._urlToUseOnclick,_b6e),_b74],_b6e.title];
}else{
return [[_b6e.title,_b74],null];
}
}else{
if(_b6e.dir=="root"){
return [[_b6e.title,_b74],null];
}else{
return [["javascript:go(\"sendForm\", true, \""+escape(_b6e.url)+"\");",_b74],_b6e.title];
}
}
}else{
if(_b72&&_b72._urlToUseOnclick){
return [[ComplexTreeProperties.decodeOnClickURL(_b72._urlToUseOnclick,_b6e),_b74],_b6e.title];
}else{
return [[_b6e.url,_b74],_b6e.title];
}
}
case ComplexTreeProperties.LINK_FCK:
if(_b6e.dir){
if(_b6e.dir!="root"&&_b6e.dir!="dir"){
return [["javascript:Set(\""+ComplexTreeProperties.webdavPath+escape(_b6e.url)+"\");void(0);",_b74],_b6e.title];
}else{
return [[_b6e.title,_b74],null];
}
}else{
return [["javascript:Set(\""+escape(_b6e.url)+"\");void(0);"],_b6e.title];
}
case ComplexTreeProperties.SELECT_FOLDER:
if(_b6e.dir){
if(_b6e.dir=="dir"){
if(_b72&&_b72._urlToUseOnclick){
if(_b6e.canRead=="true"){
var url=ComplexTreeProperties.decodeOnClickURL(_b72._urlToUseOnclick,_b6e);
if(!url){
return [_b6e.title,null];
}else{
return [url,_b6e.title];
}
}else{
return [_b6e.title,null];
}
}else{
return [_b6e.url,_b6e.title];
}
}else{
return [_b6e.title,null];
}
}else{
if(_b72._urlToUseOnclick){
return [ComplexTreeProperties.decodeOnClickURL(_b72._urlToUseOnclick,_b6e),_b6e.title];
}else{
return [_b6e.url,_b6e.title];
}
}
case ComplexTreeProperties.SELECT_PAGE_STYLE:
if(_b6e.displayImage){
return [ComplexTreeProperties.getTimeBasedPublishingLauncher(_b6e),_b6e.displayImage,_b6e.key];
}
return [null,null,null];
case ComplexTreeProperties.W_FLOW_TYPE:
if(ComplexTreeProperties.activeTab){
if(_b6e.activeTab&&_b6e.displayImage){
return [ComplexTreeProperties.getWorkflowLauncher(_b6e.activeTab,_b6e.key),_b6e.displayImage,_b6e.activeTab];
}
}
return [null,null,null];
case ComplexTreeProperties.W_FLOW_CHECKBOXES:
if(_b6e[_b70]&&_b6e[_b70][4]&&!_b6e[_b70][3]){
var _b76=new Array(4);
_b76[0]="checkbox|"+_b70+"|"+_b6e.key+(_b6e[_b70][4]?"|"+_b6e[_b70][4]:"");
_b76[1]=_b6e[_b70][1];
if(_b6e[_b70][5]){
_b76[2]="checkbox|"+_b70+"|"+_b6e.key+(_b6e[_b70][5]?"|"+_b6e[_b70][5]:"");
_b76[3]=_b6e[_b70][1];
}else{
_b76[2]=null;
_b76[3]=null;
}
return _b76;
}else{
return [null,null,null,null];
}
case ComplexTreeProperties.FILE_IMAGE:
var tmp=_b6e.dir;
if(tmp=="root"){
return [tmp,"root",_b6e];
}else{
if(tmp=="dir"){
return [tmp,"folder",_b6e];
}else{
return [tmp,"file",_b6e];
}
}
case ComplexTreeProperties.IMAGE:
if(_b6e[_b70]){
return [_b6e[_b70][0],_b6e[_b70][0]];
}
return [null,null];
case ComplexTreeProperties.SELECTED_FILE:
var _b78=document.getElementById("file_id");
if(_b78&&_b78.value==_b6e.key){
delete _b78;
return [ComplexTreeProperties.EXISTING_STATE,ComplexTreeProperties.EXISTING_STATE];
}
delete _b78;
return [" ",null];
case ComplexTreeProperties.VERSIONNING_CHECKBOX:
if(_b6e[_b70]){
return [ComplexTreeProperties.COUNTER,"checkbox_"+_b6e.key+"_"+_b6e.parentID+"_"+_b70,_b6e[_b70][1],_b6e[_b70][3]];
}else{
return [null,null,null,null];
}
case ComplexTreeProperties.IMAGE_LINK:
case ComplexTreeProperties.IMAGE_LINK_SAME_PAGE:
if(_b6e[_b70]){
return [_b6e[_b70][2],_b6e[_b70][0],_b6e[_b70][0]];
}else{
return [null,null,null];
}
case ComplexTreeProperties.VERSIONNING_IMAGES:
var res;
if(_b6e[_b70]){
res=["javascript:selectSubTree('checkbox_"+ComplexTreeProperties.COUNTER+"', 'select', '"+_b70+"')",ComplexTreeProperties.SELECT_SUB_TREE,"","javascript:selectSubTree('checkbox_"+ComplexTreeProperties.COUNTER+"', 'unselect', '"+_b70+"')",ComplexTreeProperties.UNSELECT_SUB_TREE,""];
ComplexTreeProperties.COUNTER++;
}else{
res=[null,null,null,null,null,null];
}
return res;
case ComplexTreeProperties.SELECT_RADIO:
return [_b6e.id,"sourcePageID"];
case ComplexTreeProperties.FILEMANAGER_CHECKBOX:
var res=[ComplexTreeProperties.COUNTER,_b6e.key];
ComplexTreeProperties.COUNTER++;
return res;
case ComplexTreeProperties.FILEMANAGER_IMAGES:
if(_b6e.info){
var res=[_b6e.info[0],_b6e.info[1],_b6e.info[2]];
}else{
var res=[null,null,null];
return res;
}
if(_b6e.locked){
res[res.length]=_b6e.locked[0];
res[res.length]=_b6e.locked[1];
res[res.length]=_b6e.locked[2];
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
if(_b6e.dir=="dir"&&AjxEnv.isIE){
res[res.length]=_b6e.url;
res[res.length]=ComplexTreeProperties.IE_FOLDER;
res[res.length]=_b6e.url;
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
return res;
case ComplexTreeProperties.W_FLOW_IMAGES:
var res=new Array();
if(_b6e.errors){
res[res.length]=_b6e.errors;
res[res.length]=ComplexTreeProperties.ERRORS_STATE;
res[res.length]="Blocking validation errors";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
if(_b6e.partialWarnings){
res[res.length]=_b6e.partialWarnings;
res[res.length]=ComplexTreeProperties.PARTIAL_WARNINGS_STATE;
res[res.length]="Partially blocking validation errors";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
if(_b6e.warnings){
res[res.length]=_b6e.warnings;
res[res.length]=ComplexTreeProperties.WARNINGS_STATE;
res[res.length]="Validation warnings";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
if(_b6e.locked){
res[res.length]=_b6e.locked;
res[res.length]=ComplexTreeProperties.LOCKED_STATE;
res[res.length]="Object is locked";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
return res;
case ComplexTreeProperties.CATEGORY_LAUNCHERS:
var res=new Array();
if(_b6e.add){
res[res.length]=_b6e.add;
res[res.length]=ComplexTreeProperties.ADD_CATEGORY;
res[res.length]="add";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
if(_b6e.edit){
res[res.length]=_b6e.edit;
res[res.length]=ComplexTreeProperties.EDIT_CATEGORY;
res[res.length]="edit";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
if(_b6e.move){
res[res.length]=_b6e.move;
res[res.length]=ComplexTreeProperties.MOVE_CATEGORY;
res[res.length]="move";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
if(_b6e.remove){
res[res.length]=_b6e.remove;
res[res.length]=ComplexTreeProperties.DELETE_CATEGORY;
res[res.length]="remove";
}else{
res[res.length]=null;
res[res.length]=null;
res[res.length]=null;
}
return res;
default:
return null;
}
};
ComplexTreeProperties.getHtml=function(type,data,_b7c,_b7d){
if(type==ComplexTreeProperties.SPACE){
return "&nbsp;";
}
if(type==ComplexTreeProperties.NEW_LINE){
return "<br/>";
}
if(type==ComplexTreeProperties.BLANK){
return AjxEnv.isIE?"<img src='"+ComplexTreeProperties.getImageSrc(-1)+"' alt='' border='0' />":"&nbsp;";
}
if((data[0]==null||data[0].length==0)&&type==ComplexTreeProperties.W_FLOW_CHECKBOXES){
return AjxEnv.isIE?"<img src='"+ComplexTreeProperties.getImageSrc(-1)+"' alt='' border='0' />":"&nbsp;";
}
if((data[0]==null||data[0].length==0)&&type!=ComplexTreeProperties.W_FLOW_IMAGES){
return "";
}
switch(type){
case ComplexTreeProperties.KEY:
return " ";
case ComplexTreeProperties.FILESIZE:
case ComplexTreeProperties.LASTMODIF:
case ComplexTreeProperties.TITLE:
return " "+data[0]+" ";
case ComplexTreeProperties.ID:
return " ["+data[0]+"] ";
case ComplexTreeProperties.W_FLOW_CHECKBOXES:
var res="<input ondblclick='uncheck(\""+"checkA"+ComplexTreeProperties.COUNTER+"\")' id='checkA"+ComplexTreeProperties.COUNTER+"' name='"+data[0]+"' value='"+data[0]+"' type='radio' "+(_b7c?"":" disabled='disabled' ")+(data[1]?"checked='checked'":"")+"/>";
ComplexTreeProperties.COUNTER++;
if(data[2]&&ComplexTreeProperties.DOUBLE_BUTTONS){
res+="<input ondblclick='uncheck(\""+"checkR"+ComplexTreeProperties.COUNTER+"\")' id='checkR"+ComplexTreeProperties.COUNTER+"' name='"+data[0]+"' value='"+data[2]+"' type='radio' "+(_b7c?"":" disabled='disabled' ")+(data[3]?"checked='checked'":"")+"/>";
ComplexTreeProperties.COUNTER++;
ComplexTreeProperties.DOUBLE=true;
}
return res;
case ComplexTreeProperties.VERSIONNING_CHECKBOX:
return "<input id='checkbox_"+data[0]+"' name='"+data[1]+"' type='checkbox' "+(data[3]?" disabled='disabled' ":"")+(data[2]?"checked='checked'":"")+"/>";
case ComplexTreeProperties.FILEMANAGER_CHECKBOX:
return "<input onclick='getFileManagerBar(this)' id='checkbox_"+data[0]+"' name='"+data[1]+"' type='checkbox' />";
case ComplexTreeProperties.FILE_IMAGE:
if(_b7d&&_b7d.CURRENT_LIST_PATTERN==ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN){
return "<img onmouseover='this.style.cursor=\"pointer\"' onclick='javascript:openManager(\""+data[2].key+"\", \"info\");' src='"+ComplexTreeProperties.getFileTypeImageLarge(data[0])+"' alt='"+data[1]+"' border='0' />";
}else{
if(_b7d&&_b7d.CURRENT_LIST_PATTERN==ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN){
return "<img onmouseover='this.style.cursor=\"pointer\"' onclick='javascript:openManager(\""+data[2].key+"\", \"info\");' src='"+ComplexTreeProperties.getFileTypeImageTbnail(data[0],data[2].url)+"' alt='"+data[1]+"' border='0' />";
}else{
return "<img src='"+ComplexTreeProperties.getFileTypeImage(data[0])+"' alt='"+data[1]+"' border='0' />";
}
}
case ComplexTreeProperties.SELECTED_FILE:
case ComplexTreeProperties.IMAGE:
ComplexTreeProperties.CONTINUE_IF_EMPTY=true;
if(data[0]==" "){
return " ";
}
return "<img src='"+ComplexTreeProperties.getImageSrc(data[0])+"' title='' alt='"+data[1]+"' border='0' "+(data[0].length==3?" width='12'":"")+"/>";
case ComplexTreeProperties.IMAGE_LINK:
var _b7f=parseInt(data[1],10);
if(_b7f==ComplexTreeProperties.NO_WFLOW_STATE||_b7f==ComplexTreeProperties.LINKED_WFLOW_STATE){
return "<img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' />";
}
if(_b7f==-1){
return "<img src='"+ComplexTreeProperties.getImageSrc(-1)+"' alt='' border='0' />";
}
return "<a target='_blank' href=\""+data[0]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' /></a>";
case ComplexTreeProperties.IMAGE_LINK_SAME_PAGE:
var _b7f=parseInt(data[1],10);
if(_b7f==ComplexTreeProperties.NO_WFLOW_STATE||_b7f==ComplexTreeProperties.LINKED_WFLOW_STATE){
return "<img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' />";
}
if(_b7f==-1){
return "<img src='"+ComplexTreeProperties.getImageSrc(-1)+"' alt='' border='0' />";
}
var _b80=_b7f>100&&_b7f<=999?" width='12'":"";
return "<a href=\""+data[0]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='' alt='"+data[2]+"' border='0' "+_b80+"/></a>";
case ComplexTreeProperties.W_FLOW_TYPE:
var _b7f=parseInt(data[1],10);
if(!_b7f||!data[0]){
return "";
}
if(_b7f==ComplexTreeProperties.NO_WFLOW_STATE||_b7f==ComplexTreeProperties.LINKED_WFLOW_STATE){
return "<img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' />";
}
if(_b7f==-1){
return "<img src='"+ComplexTreeProperties.getImageSrc(-1)+"' alt='' border='0' />";
}
return "<a href=\""+data[0]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' /></a>";
case ComplexTreeProperties.SELECT_PAGE_STYLE:
var _b7f=parseInt(data[1],10);
if(!_b7f||!data[0]){
return "";
}
return "<img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' id='img_"+data[2]+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' "+" onClick=\""+data[0]+"\" />";
case ComplexTreeProperties.LINK:
if(data[0][1]){
return "<a target='_blank' class='redlink' href='"+data[0][0]+"'>"+data[1]+"</a>";
}else{
return "<a target='_blank' class='link' href='"+data[0][0]+"'>"+data[1]+"</a>";
}
case ComplexTreeProperties.LINK_SAME_PAGE:
case ComplexTreeProperties.LINK_FCK:
if(!data[1]){
return "<span class='pointer'>"+data[0][0]+"</span>";
}else{
if(data[0][0].indexOf("javascript")>-1){
return "<a class='blacklink' href='"+data[0][0]+"'>"+data[1]+"</a>";
}else{
if(data[0][1]){
return "<a class='redlink' href='"+data[0][0]+"'>"+data[1]+"</a>";
}else{
return "<a class='link' href='"+data[0][0]+"'>"+data[1]+"</a>";
}
}
}
case ComplexTreeProperties.SELECT_FOLDER:
if(data[1]==null){
return " "+data[0]+" ";
}else{
return "<a class='link' href='"+data[0]+"'>"+data[1]+"</a>";
}
case ComplexTreeProperties.SELECT_RADIO:
return "<input type='radio' name='"+data[1]+"' value='"+data[0]+"'"+(_b7c?"":" disabled='disabled' ")+"/>";
case ComplexTreeProperties.VERSIONNING_IMAGES:
return "<a href=\""+data[0]+"\"><img src='"+ComplexTreeProperties.getImageSrc(parseInt(data[1],10))+"' alt='"+data[2]+"' border='0' /></a>\n"+"<a href=\""+data[3]+"\"><img src='"+ComplexTreeProperties.getImageSrc(parseInt(data[4],10))+"' alt='"+data[5]+"' border='0' /></a>";
case ComplexTreeProperties.W_FLOW_IMAGES:
var _b7f=parseInt(data[1],10);
var res="";
if(data[0]){
tmp="<a href=\""+data[0]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[4],10);
if(data[3]){
tmp="<a href=\""+data[3]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[5]+"' alt='"+data[5]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[7],10);
if(data[6]){
tmp="<a href=\""+data[6]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[8]+"' alt='"+data[8]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[10],10);
if(data[9]){
tmp="<a href=\""+data[9]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[11]+"' alt='"+data[11]+"' border='0' /></a>\n";
res+=tmp;
}
return res;
case ComplexTreeProperties.FILEMANAGER_IMAGES:
var _b7f=parseInt(data[1],10);
var res="";
if(data[0]){
tmp="<a href=\""+data[0]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[4],10);
if(data[3]){
tmp="<a href=\""+data[3]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[5]+"' alt='"+data[5]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[7],10);
if(data[6]){
tmp="<a target='_new' folder='"+ComplexTreeProperties.webdavPath+escape(data[6])+"' style='behavior:url(#default#AnchorClick)'><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' alt='IE Folder' border='0' /></a>\n";
res+=tmp;
}
return res;
case ComplexTreeProperties.CATEGORY_LAUNCHERS:
var res="";
var _b7f=parseInt(data[1],10);
if(data[0]){
tmp="<a href=\""+data[0]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[2]+"' alt='"+data[2]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[4],10);
if(data[3]){
tmp="<a href=\""+data[3]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[5]+"' alt='"+data[5]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[7],10);
if(data[6]){
tmp="<a href=\""+data[6]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[8]+"' alt='"+data[8]+"' border='0' /></a>\n";
res+=tmp;
}
_b7f=parseInt(data[10],10);
if(data[9]){
tmp="<a href=\""+data[9]+"\"><img src='"+ComplexTreeProperties.getImageSrc(_b7f)+"' title='"+data[11]+"' alt='"+data[11]+"' border='0' /></a>\n";
res+=tmp;
}
return res;
case ComplexTreeProperties.CATEGORY_RADIO:
return "<input type='radio' name='newParentKey' "+(data[1]?"disabled='disabled'":"")+" value='"+data[0]+"' />";
case ComplexTreeProperties.CATEGORY_CHECKBOX:
return "<input onclick='javascript:clicked(this)' type='checkbox' "+(data[1]?"checked='checked'":"")+" name='category_"+data[0]+"' />";
case ComplexTreeProperties.PORTLET_CHECKBOX:
var _b81="<img src='"+ComplexTreeProperties.CONTEXT+ComplexTreeProperties.PORTLET_CATEGORY_ALLSOURCES_SRC+"' />";
return "<input onclick='javascript:this.value=true;' type='checkbox' "+(data[1]?"checked='checked'":"")+" name='category_"+data[0]+"' />"+(data[2]?_b81:"");
default:
return null;
}
};
ComplexTreeProperties.getHtmls=function(_b82,data,_b84,_b85){
var _b86="";
var _b87=0;
for(var i=0;i<_b82.length;i++){
var tmp=new Array();
for(var j=0;j<ComplexTreeProperties.getPatternItemSize(_b82[i]);j++){
tmp[j]=data[_b87];
_b87++;
}
_b86+=ComplexTreeProperties.getHtml(_b82[i],tmp,_b84,_b85);
if((_b86.length==0||ComplexTreeProperties.Error)&&!ComplexTreeProperties.CONTINUE_IF_EMPTY){
ComplexTreeProperties.Error=false;
return _b86;
}
ComplexTreeProperties.CONTINUE_IF_EMPTY=false;
}
return _b86;
};
ComplexTreeProperties.getWorkflowLauncher=function(_b8b,_b8c){
return "javascript:handleActionChanges('display&display="+_b8b+"&obj="+_b8c+"');";
};
ComplexTreeProperties.getTimeBasedPublishingLauncher=function(_b8d){
var _b8e="handleTimeBasedPublishing(event,'";
_b8e+=_b8d.timeBasedPublishingActionURL;
_b8e+="','";
_b8e+=_b8d.key;
_b8e+="','/op/edit/pid/";
_b8e+=_b8d.timeBasedPublishingPageId;
_b8e+="','";
_b8e+=_b8d.timeBasedPublishingDialogTitle;
_b8e+="');";
return _b8e;
};
function ListItem(id,_b90,_b91,_b92,_b93){
this._id=id;
this._hidden=(_b92?_b92:false);
this._regroup=(_b93?_b93:[1]);
this._values=_b91;
this._enabled=true;
for(var i=0;i<_b90.length;i++){
this.setValue(_b90[i][0],_b91[i]);
}
}
ListItem.prototype.toString=function(){
return "ListItem "+this._id;
};
ListItem.prototype.getID=function(){
return this._id;
};
ListItem.prototype.setValue=function(_b95,_b96){
this[_b95]=_b96;
};
ListItem.prototype.getValue=function(_b97){
return this[_b97];
};
ListItem.prototype.getValues=function(){
return this._values;
};
ListItem.prototype.clear=function(){
for(var i in this){
this[i]=null;
}
};
ListItem.prototype.hide=function(){
this._hidden=true;
};
ListItem.prototype.show=function(){
this._hidden=false;
};
ListItem.prototype.disable=function(){
this._enabled=false;
};
ListItem.prototype.enable=function(){
this._enabled=true;
};
ListItem.prototype.isHidden=function(){
return this._hidden;
};
ListItem.prototype.getRegroup=function(){
return this._regroup;
};
ListItem.prototype.invertCheckboxValue=function(_b99){
var _b9a=this.getValue(_b99);
if(_b9a[1]!=null){
_b9a[1]=!_b9a[1];
}
delete _b9a;
};
function PageInfoListView(_b9b,_b9c,_b9d,_b9e){
this._tableWidth=0;
this._headers=this._getHeaderList(_b9c);
this._columns=_b9c.length;
this._pattern=_b9d;
this._props=_b9e;
this.currentHTML="";
var _b9f=_b9e.CURRENT_STYLE==ComplexTreeProperties.FILEMANAGER_STYLE?"DwtListView scrollable":"DwtListView";
DwtListView.call(this,_b9b,_b9f,DwtControl.ABSOLUTE_STYLE,this._headers,true);
}
PageInfoListView.prototype=new DwtListView;
PageInfoListView.prototype.constructor=PageInfoListView;
PageInfoListView.COLUMN_BETWEEN_SPACING=4;
PageInfoListView.prototype.toString=function(){
return "PageInfoListView";
};
PageInfoListView.prototype.clear=function(){
this._resetList();
this.removeAll(true);
this._list=null;
this._tableWidth=null;
this._headers=null;
this._columns=null;
this._pattern=null;
this._props=null;
this.currentHTML=null;
DwtComposite.prototype.dispose.call(this);
};
PageInfoListView.prototype.getColumnCount=function(){
return this._columns;
};
PageInfoListView.prototype.getMinTableWidth=function(){
return this._tableWidth;
};
PageInfoListView.prototype._createItemHtml=function(item,now,_ba2){
var div=document.createElement("div");
var base="Row";
if(this._pattern==ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN||this._pattern==ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN){
base="RowIcon";
}
div._styleClass=base;
div._selectedStyleClass=[base,DwtCssStyle.SELECTED].join("-");
this.associateItemWithElement(item,div,DwtListView.TYPE_LIST_ITEM);
div.className=div._styleClass;
if(item.isHidden()){
div.className+="-hidden";
return div;
}
var _ba5=new Array();
var idx=0;
var _ba7=this.getSize().x-30;
if((this._pattern==ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN&&(_ba2-1)%3==0)||(this._pattern==ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN&&(_ba2-1)%3==0)){
_ba5[idx++]="<table cellpadding='0' cellspacing='0' border='0' ";
this._noMaximize=true;
if(this._headers.length==1){
_ba5[idx++]=" width='"+_ba7+"'>";
}
_ba5[idx++]="<tr id='"+item._id+"'>";
}else{
if(this._pattern!=ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN&&this._pattern!=ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN){
this._noMaximize=true;
_ba5[idx++]="<table cellpadding='0' cellspacing='0' border='0' ";
_ba5[idx++]=this._noMaximize?">":" width=100%>";
_ba5[idx++]="<tr id='"+item._id+"'>";
}
}
var size=this._pattern.length;
var _ba9=item.dir&&(this._pattern==ComplexTreeProperties.FILEMANAGER_LIST_STYLE_PATTERN||this._pattern==ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN||this._pattern==ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN);
for(var j=0;j<this._headers.length;j++){
var col=this._headers[j];
if(!col._visible){
continue;
}
_ba5[idx++]="<td ";
if(_ba9&&j==0){
_ba5[idx++]="ondblclick='javascript:getFolderWithKey(\""+item._id+"\", \""+this._props.TREE_DIV+"\");' ";
}
if(this._pattern==ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN||this._pattern==ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN){
_ba5[idx++]="width='"+_ba7/3+"' align='left' style='text-align:center;overflow:hidden;white-space:nowrap;'><div style='overflow:hidden;white-space:nowrap;width:"+_ba7/3+"px;'>";
}else{
var _bac=col._width+"";
_bac=_bac.indexOf("%")<0;
var _bad=(AjxEnv.isIE&&_bac)?(col._width+4):col._width;
_ba5[idx++]=_bad?(" width="+_bad+">"):">";
_ba5[idx++]="<div";
_ba5[idx++]=_bad?" style='width: "+_bad+"'>":">";
delete _bac;
delete _bad;
}
var _bae=j;
if(this._pattern==ComplexTreeProperties.WORKFLOW_LIST_STYLE_PATTERN&&j>0){
_bae=1;
}else{
if(this._pattern==ComplexTreeProperties.WORKFLOW_LIST_STYLE_PATTERN){
_bae=0;
}else{
if(size==1){
_bae=0;
}
}
}
var _baf=ComplexTreeProperties.getHtmls(this._pattern[_bae],item.getValue(col.attrId),item._enabled,this._props);
_ba5[idx++]=_baf+"</div></td>";
delete col;
delete _bae;
delete _baf;
}
delete _ba9;
delete size;
if((this._pattern==ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN&&(_ba2-1)%3==2)||(this._pattern==ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN&&(_ba2-1)%3==2)||this._pattern!=ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN&&this._pattern!=ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN){
_ba5[idx++]="</tr></table>";
div.newRow=true;
}
this.currentHTML+=_ba5.join("");
delete _ba5;
delete idx;
delete base;
delete _ba7;
return div;
};
PageInfoListView.prototype.addItem=function(item,_bb1,_bb2,last){
if(!this._list){
this._list=new AjxVector();
}
if(this._list.size()==0){
this._resetList();
}
this._list.add(item,_bb1);
var _bb4;
if(!_bb1){
_bb4=this.getList().size();
}else{
_bb4=_bb1;
}
var div=this._createItemHtml(item,this._now,_bb4);
if(div.newRow||last){
if(last){
var _bb6=this.getSize().x-30;
for(var i=0;i<2-((_bb4-1)%3);i++){
this.currentHTML+="<td width='"+_bb6/3+"'><div style='width:"+_bb6/3+"px' &nbsp;</td>";
}
this.currentHTML+="</tr></table>";
delete _bb6;
}
div.innerHTML=this.currentHTML;
this._addRow(div,_bb1);
this.currentHTML="";
}
delete _bb4;
delete div;
};
PageInfoListView.prototype._renderList=function(list){
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,i);
if(div){
if(div instanceof Array){
for(var j=0;j<div.length;j++){
this._addRow(div[j]);
}
}else{
div.innerHTML=this.currentHTML;
this.currentHTML="";
this._addRow(div);
}
}
delete item;
delete div;
}
delete size;
}
};
PageInfoListView.prototype._getHeaderList=function(_bbe){
var _bbf=new Array();
for(var i=0;i<_bbe.length;i++){
var _bc1=_bbe[i];
var _bc2=i+"col";
var _bc3;
if(_bc1[4]&&_bc1[1]){
_bc3="<a href="+_bc1[4]+"><img src='"+_bc1[1]+"' alt='"+_bc1[0]+"' border='0' class='flagImg' /></a>";
}else{
if(_bc1[4]){
_bc3="<a href="+_bc1[4]+" class='blacklink'>"+_bc1[0]+"</a>";
}else{
if(_bc1[1]){
_bc3="<img src='"+_bc1[1]+"' alt='"+_bc1[0]+"' border='0' class='flagImg' /></a>";
}else{
_bc3=_bc1[0];
}
}
}
_bbf[i]=new DwtListHeaderItem(_bc2,_bc3,null,_bc1[2],null,_bc1[3],true);
_bbf[i].attrId=_bc1[0];
_bbf[i]._tfAttr=_bc1;
_bbf[i]._visible=true;
this._tableWidth+=_bc1[2]+PageInfoListView.COLUMN_BETWEEN_SPACING;
delete _bc1;
delete _bc2;
delete _bc3;
}
this._tableWidth+=PageInfoListView.COLUMN_BETWEEN_SPACING;
return _bbf;
};
PageInfoListView.prototype.getCurrentHeaders=function(){
var _bc4=new Array();
for(var i=0;i<this._headers.length;i++){
_bc4[i]=[this._headers[i].attrId];
}
return _bc4;
};
PageInfoListView.prototype.makeListItemData=function(_bc6,_bc7){
var _bc8=new Array();
var size=this._pattern.length;
for(var i=0;i<this._headers.length;i++){
var _bcb=this._headers[i].attrId;
var _bcc=i;
if(this._pattern==ComplexTreeProperties.WORKFLOW_LIST_STYLE_PATTERN&&i>0){
_bcc=1;
}else{
if(this._pattern==ComplexTreeProperties.WORKFLOW_LIST_STYLE_PATTERN){
_bcc=0;
}else{
if(size==1){
_bcc=0;
}
}
}
var tmp=new Array();
for(var j=0;j<this._pattern[_bcc].length;j++){
var _bcf=ComplexTreeProperties.getDataFromObjectInfo(_bc6,this._pattern[_bcc][j],_bcb,this._props,_bc7);
if(!_bcf){
continue;
}
for(var k=0;k<_bcf.length;k++){
tmp[tmp.length]=_bcf[k];
}
delete _bcf;
}
_bc8[i]=tmp;
delete _bcb;
delete _bcc;
delete tmp;
}
delete size;
return _bc8;
};
PageInfoListView.prototype.hideRow=function(_bd1){
var item=this.getList().get(_bd1);
if(!item||item.isHidden()){
return;
}
item.hide();
};
PageInfoListView.prototype.deleteRow=function(_bd3){
var item=this.getList().get(_bd3);
if(item){
this.getList().remove(item);
}
item=null;
this.setUI();
};
PageInfoListView.prototype.showRow=function(_bd5){
var item=this.getList().get(_bd5);
if(!item||!item.isHidden()){
return;
}
item.show();
};
PageInfoListView.prototype.invertCheckBoxValues=function(_bd7){
var _bd8=this.getList().getArray();
for(var i=0;i<_bd8.length;i++){
_bd8[0].invertCheckboxValue(_bd7);
}
delete _bd8;
this.setUI();
};
function ComplexTree(_bda,_bdb,_bdc,_bdd,_bde,_bdf,_be0,_be1,_be2,_be3,_be4){
this.DATA_HEIGHT=ComplexTreeProperties.ROW_HEIGHT;
this._loadingText=_bde;
this._treeItems=new AjxVector();
this._parentDiv=_bdf;
this._goToNode=_be4;
var _be5=document.getElementById(_bdf);
if(!_be5){
alert("HTML element with id '"+_bdf+"' does not exist ! Aborting !");
return;
}
try{
switch(_bdc){
case ComplexTreeProperties.WORKFLOW_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.WORKFLOW_STYLE,ComplexTreeProperties.WORKFLOW_TREE_STYLE_PATTERN,ComplexTreeProperties.WORKFLOW_LIST_STYLE_PATTERN,ComplexTreeProperties.OBJECT,_be0,_be1,_be2,_be3,_bdf);
if(AjxEnv.isIE){
ComplexTreeProperties.ROW_HEIGHT=29;
}
break;
case ComplexTreeProperties.SELECT_PAGE_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.SELECT_PAGE_STYLE,ComplexTreeProperties.SELECT_TREE_STYLE_PATTERN,ComplexTreeProperties.SELECT_LIST_STYLE_PATTERN,ComplexTreeProperties.PAGE,_be0,_be1,_be2,_be3,_bdf);
break;
case ComplexTreeProperties.SITEMAP_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.SITEMAP_STYLE,ComplexTreeProperties.SITEMAP_TREE_STYLE_PATTERN,ComplexTreeProperties.SITEMAP_LIST_STYLE_PATTERN,ComplexTreeProperties.PAGE,_be0,_be1,_be2,_be3,_bdf);
if(AjxEnv.isIE){
ComplexTreeProperties.ROW_HEIGHT=29;
}
break;
case ComplexTreeProperties.VERSIONNING_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.VERSIONNING_STYLE,ComplexTreeProperties.VERSIONNING_TREE_STYLE_PATTERN,ComplexTreeProperties.VERSIONNING_LIST_STYLE_PATTERN,ComplexTreeProperties.PAGE,_be0,_be1,_be2,_be3,_bdf);
break;
case ComplexTreeProperties.SIMPLE_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.SIMPLE_STYLE,ComplexTreeProperties.SIMPLE_TREE_STYLE_PATTERN,ComplexTreeProperties.SIMPLE_LIST_STYLE_PATTERN,ComplexTreeProperties.PAGE,_be0,_be1,_be2,_be3,_bdf);
break;
case ComplexTreeProperties.FCK_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.FCK_STYLE,ComplexTreeProperties.FCK_TREE_STYLE_PATTERN,ComplexTreeProperties.FCK_LIST_STYLE_PATTERN,ComplexTreeProperties.PAGE,_be0,_be1,_be2,_be3,_bdf);
break;
case ComplexTreeProperties.WEBDAV_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.WEBDAV_STYLE,ComplexTreeProperties.WEBDAV_TREE_STYLE_PATTERN,ComplexTreeProperties.WEBDAV_LIST_STYLE_PATTERN,ComplexTreeProperties.OBJECT,_be0,_be1,_be2,_be3,_bdf);
break;
case ComplexTreeProperties.WEBDAV_SELECT_FOLDER_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.WEBDAV_SELECT_FOLDER_STYLE,ComplexTreeProperties.WEBDAV_SELECT_FOLDER_STYLE_PATTERN,ComplexTreeProperties.WEBDAV_LIST_STYLE_PATTERN,ComplexTreeProperties.OBJECT,_be0,_be1,_be2,_be3,_bdf);
break;
case ComplexTreeProperties.FILEMANAGER_STYLE:
var _be6;
if(_be0.indexOf("listView")>-1){
_be6=ComplexTreeProperties.FILEMANAGER_LIST_STYLE_PATTERN;
}else{
if(_be0.indexOf("iconsView")>-1){
_be6=ComplexTreeProperties.FILEMANAGER_ICONS_STYLE_PATTERN;
}else{
if(_be0.indexOf("thumbnailView")>-1){
_be6=ComplexTreeProperties.FILEMANAGER_TB_STYLE_PATTERN;
}else{
_be6=[];
}
}
}
this._props=new ComplexTreeProperties(ComplexTreeProperties.FILEMANAGER_STYLE,ComplexTreeProperties.FILEMANAGER_TREE_STYLE_PATTERN,_be6,ComplexTreeProperties.OBJECT,_be0,_be1,_be2,_be3,_bdf);
ComplexTreeProperties.TREE_WIDTH=200;
ComplexTreeProperties.LOAD_FOLDER=true;
window.currentValue="";
window["treeItems"]="";
delete _be6;
break;
case ComplexTreeProperties.ADMIN_CATEGORY_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.ADMIN_CATEGORY_STYLE,ComplexTreeProperties.CATEGORY_ADMIN_TREE_STYLE_PATTERN,[],ComplexTreeProperties.CATEGORY,_be0,_be1,_be2,_be3,_bdf);
if(AjxEnv.isIE){
ComplexTreeProperties.ROW_HEIGHT=29;
}
break;
case ComplexTreeProperties.SELECT_CATEGORY_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.SELECT_CATEGORY_STYLE,ComplexTreeProperties.CATEGORY_SELECT_TREE_STYLE_PATTERN,[],ComplexTreeProperties.CATEGORY,_be0,_be1,_be2,_be3,_bdf);
if(AjxEnv.isIE&&(AjxEnv.browserVersion>6.9)){
ComplexTreeProperties.ROW_HEIGHT=29;
}
break;
case ComplexTreeProperties.MOVE_CATEGORY_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.MOVE_CATEGORY_STYLE,ComplexTreeProperties.CATEGORY_MOVE_TREE_STYLE_PATTERN,[],ComplexTreeProperties.CATEGORY,_be0,_be1,_be2,_be3,_bdf);
if(AjxEnv.isIE){
ComplexTreeProperties.ROW_HEIGHT=29;
}
break;
case ComplexTreeProperties.PORTLET_CATEGORY_STYLE:
this._props=new ComplexTreeProperties(ComplexTreeProperties.PORTLET_CATEGORY_STYLE,ComplexTreeProperties.CATEGORY_PORTLET_TREE_STYLE_PATTERN,[],ComplexTreeProperties.CATEGORY,_be0,_be1,_be2,_be3,_bdf);
break;
}
var _be7=DwtShell.getShell(window);
if(_be7){
this._app=_be7;
}else{
this._app=new DwtShell("MainShell");
this._app.setSize(0,0);
}
delete _be7;
this._container=new DwtComposite(this._app,"RootDivContainer",DwtControl.RELATIVE_STYLE);
this._shell=new DwtComposite(this._container,"MainDivContainer",DwtControl.RELATIVE_STYLE);
if(_bdc==ComplexTreeProperties.FILEMANAGER_STYLE){
this._treeContainer=new DwtComposite(this._shell,null,DwtControl.RELATIVE_STYLE);
this._treeContainer.setSize(ComplexTreeProperties.TREE_WIDTH,this.DATA_HEIGHT+ComplexTreeProperties.ROW_HEIGHT);
this._treeContainer.setScrollStyle(DwtControl.SCROLL);
this._tree=new DwtTree(this._treeContainer,DwtTree.SINGLE_STYLE,null,DwtControl.RELATIVE_STYLE);
}else{
this._tree=new DwtTree(this._shell,DwtTree.SINGLE_STYLE,null,DwtControl.RELATIVE_STYLE);
}
this._createRoot(_bdd,_bdb);
this._theTreeListener=new AjxListener(this,this._treeListener);
this._tree.addTreeListener(this._theTreeListener);
if(_bdc==ComplexTreeProperties.FILEMANAGER_STYLE){
this._theSelectionListener=new AjxListener(this,this._treeSelectionListener);
this._tree.addSelectionListener(this._theSelectionListener);
}
if(this._props.CURRENT_LIST_PATTERN.length>0){
this._itemLength=ComplexTreeProperties.getPatternItemLength(this._props.CURRENT_LIST_PATTERN);
this._items=new AjxVector();
this._pageInfoView=new PageInfoListView(this._shell,_bda,this._props.CURRENT_LIST_PATTERN,this._props);
this._pageInfoView.set(this._items);
this._pageInfoView.zShow(true);
this._pageInfoView.setScrollStyle(DwtControl.SCROLL);
this._sash=new DwtSash(this._shell,DwtSash.HORIZONTAL_STYLE,"AppSash-horiz",2);
this._sash.registerCallback(this._sashCallback,this);
this._layout();
this._layoutInfo={treeW:ComplexTreeProperties.MIN_TREE_WIDTH,tableW:this._pageInfoView.getMinTableWidth()};
}
_be5.appendChild(this._container.getHtmlElement());
var _be8=this._container.getHtmlElement().scrollHeight;
var _be9;
if(_be8>ComplexTreeProperties.SHELL_HEIGHT){
_be5.style.height=ComplexTreeProperties.SHELL_HEIGHT+"px";
_be9=ComplexTreeProperties.SHELL_HEIGHT;
}else{
_be5.style.height=_be8+"px";
_be9=_be8;
ComplexTreeProperties.SHELL_HEIGHT=_be9;
if(this._plusButton){
this._plusButton.setEnabled(false);
}
}
this._maxListener();
this._container.zShow(true);
this._tree.zShow(true);
delete _be8;
delete _be9;
}
catch(ex){
if(ex instanceof DwtException){
alert(ex.dump());
}else{
alert(ex);
}
}
}
ComplexTree.prototype.DATA_HEIGHT=0;
ComplexTree.prototype.RETRIEVED_OBJECTS_EXPAND_ALL=0;
ComplexTree.prototype.setUrlToUseOnclick=function(_bea){
this._urlToUseOnclick=_bea;
};
ComplexTree.prototype.clear=function(){
this._tree.removeTreeListener(this._theTreeListener);
this._theTreeListener=null;
this._tree.removeSelectionListener(this._theSelectionListener);
this._theSelectionListener=null;
this._tree._children.removeAll();
this._tree.dispose();
this._tree=null;
if(this._pageInfoView){
this._pageInfoView.clear();
this._pageInfoView=null;
}
if(this._treeContainer){
this._treeContainer.dispose();
this._treeContainer=null;
}
this._shell.dispose();
this._shell=null;
this._container.dispose();
this._container=null;
this.DATA_HEIGHT=null;
this._loadingText=null;
this._treeItems.removeAll();
this._treeItems=null;
this._parentDiv=null;
this._goToNode=null;
this._props=null;
this._unlockChildrenCallback=null;
this._getChildrenCallback=null;
this._fileManagerCallback=null;
};
ComplexTree.prototype._layout=function(){
var x=0,y=0;
var _bec=this._shell.getSize().y;
if(this._sash){
x=(this._sash.getBounds().x!=ComplexTreeProperties.TREE_WIDTH?this._sash.getBounds().x:ComplexTreeProperties.TREE_WIDTH);
if(x==0||!x){
x=ComplexTreeProperties.TREE_WIDTH;
}
if(this._props.CURRENT_STYLE==ComplexTreeProperties.FILEMANAGER_STYLE){
this._sash.setBounds(x,y,Dwt.DEFAULT,this.DATA_HEIGHT+ComplexTreeProperties.ROW_HEIGHT);
this._treeContainer.setSize(x,this.DATA_HEIGHT+ComplexTreeProperties.ROW_HEIGHT);
}else{
this._sash.setBounds(x,y,Dwt.DEFAULT,ComplexTreeProperties.SASH_HEIGHT+(AjxEnv.isIE?1:0));
}
x+=this._sash.getSize().x;
}
if(this._pageInfoView){
var _bed=this._shell.getSize().x-x;
this._pageInfoView.setBounds(x,y,_bed,this.DATA_HEIGHT+ComplexTreeProperties.ROW_HEIGHT);
delete _bed;
}
delete x;
delete y;
delete _bec;
};
ComplexTree.prototype._sashCallback=function(_bee){
var _bef=this._pageInfoView.getBounds();
var _bf0;
if(this._treeContainer){
_bf0=this._treeContainer.getSize();
}else{
_bf0=this._tree.getSize();
}
var _bf1=this._sash.getBounds();
if(_bee>0){
var move=_bf1.x-_bee;
if(move<=0){
_bee-=move;
}
delete move;
}else{
if(_bee<0){
var move=_bf0.x+_bee;
if(move<=this._layoutInfo.treeW){
_bee+=this._layoutInfo.treeW-move;
}
delete move;
}
}
var info={filterW:_bf0.x+_bee,viewX:_bef.x+_bee,viewW:_bef.width-_bee};
this._adjustSash(info);
delete info;
delete _bef;
delete _bf0;
delete _bf1;
return _bee;
};
ComplexTree.prototype._adjustSash=function(info){
this._pageInfoView.setBounds(info.viewX,Dwt.DEFAULT,info.viewW,this.DATA_HEIGHT+ComplexTreeProperties.ROW_HEIGHT);
if(this._treeContainer){
this._treeContainer.setSize(info.filterW,this.DATA_HEIGHT+ComplexTreeProperties.ROW_HEIGHT);
}else{
this._tree.setSize(info.filterW,Dwt.DEFAULT);
}
};
ComplexTree.prototype._createRoot=function(_bf5,_bf6){
var _bf7;
if((!_bf5||_bf5.length==0)&&this._props.CURRENT_LIST_PATTERN.length==0){
_bf7=new DwtTreeItem(this._tree,null,_bf5,null,null,"hideHeader");
}else{
_bf7=new DwtTreeItem(this._tree,null,_bf5,null,null,"treeHeader");
}
_bf7._index=0;
_bf7._level=1;
var _bf8=new DwtTreeItem(_bf7,null,this._loadingText);
_bf8._key=ComplexTreeProperties.LOADING_ID;
_bf7.expandChild=true;
_bf7.setExpanded(true);
var _bf9=new AsynchCommand();
GlobalCallback[GlobalCallbackCount]=new AjxCallback(this,this._getChildrenCallback,_bf7);
_bf9.addInvokeListener(GlobalCallback[GlobalCallbackCount]);
GlobalCallbackCount++;
var _bfa=AjxXmlDoc.createRoot("GetEntryPoint");
_bfa.set("key",(_bf6));
_bf9.invoke(_bfa,this._props.ENTRY_POINT_URL);
delete _bf7;
delete _bf8;
delete _bf9;
delete _bfa;
};
ComplexTree.prototype._addTreeItem=function(_bfb,_bfc,_bfd,_bfe){
var _bff=ComplexTreeProperties.getHtmls(this._props.CURRENT_TREE_PATTERN,_bfc,!_bfe.disable);
var val;
if(_bfe.style){
val="<span class='"+_bfe.style+"'>"+_bff+"</span>";
}else{
val=_bff;
}
var _c01=true;
if(this._props.CURRENT_STYLE==ComplexTreeProperties.WEBDAV_STYLE||this._props.CURRENT_STYLE==ComplexTreeProperties.FILEMANAGER_STYLE){
_c01=false;
}
var ti=new DwtTreeItem(_bfb,null,val,null,null,null,null,_c01);
ti._key=_bfc[0];
ti._index=_bfd+1;
ti._level=_bfb._level+1;
ti._url=_bfe.url;
if(this._props.CURRENT_STYLE==ComplexTreeProperties.FILEMANAGER_STYLE||this._props.CURRENT_STYLE==ComplexTreeProperties.ADMIN_CATEGORY_STYLE){
if(window["treeItem"+ti._key]==null){
window["treeItems"]+=","+ti._key;
}
window["treeItem"+ti._key]=ti;
}
this._treeItems.add(ti,_bfd);
if(!_bfe.NoChildren){
var _c03=new DwtTreeItem(ti,null,this._loadingText);
_c03._key=ComplexTreeProperties.LOADING_ID;
if(_bfb.expandChild){
ti.setExpanded(true);
}else{
if(this._goToNode&&this._goToNode!="null"&&this._goToNode.indexOf(ti._key)==0){
if(this._props.CURRENT_STYLE==ComplexTreeProperties.FILEMANAGER_STYLE){
this.getFolderWithKey(this._goToNode,this._goToNode);
this._goToNode=null;
}
}
}
delete _c03;
}
delete val;
delete _bff;
delete ti;
};
ComplexTree.prototype._adjustTreeItemIndexes=function(_c04){
var _c05;
for(var i=_c04;i<this._treeItems.size();i++){
_c05=this._treeItems.get(i);
_c05._index=i+1;
}
delete _c05;
delete i;
};
ComplexTree.prototype._treeListener=function(ev){
this._shell.setCursor("wait");
this._tree.setCursor("wait");
if(this._pageInfoView){
this._pageInfoView.setCursor("wait");
}
var _c08=ev.item;
if(_c08.DisableTreeListener){
_c08.DisableTreeListener=false;
this._shell.setCursor("default");
this._tree.setCursor("default");
if(this._pageInfoView){
this._pageInfoView.setCursor("default");
}
return;
}
switch(ev.detail){
case DwtTree.ITEM_EXPANDED:
if(_c08.getItems()[0]._key!=ComplexTreeProperties.LOADING_ID){
if(this._props.CURRENT_STYLE!=ComplexTreeProperties.FILEMANAGER_STYLE){
this._displayChildren(_c08,true);
}
if(_c08._key&&this._props.EXPAND_SERVER_URL_LOADED){
var _c09=new AsynchCommand();
GlobalCallback[GlobalCallbackCount]=new AjxCallback(this,this._lockChildrenCallback,_c08);
_c09.addInvokeListener(GlobalCallback[GlobalCallbackCount]);
GlobalCallbackCount++;
var _c0a=AjxXmlDoc.createRoot("LockChildren");
var keys=this._keys.getArray();
for(var i=0;i<keys.length;i++){
_c0a.set("key",(keys[i]));
}
_c09.invoke(_c0a,this._props.EXPAND_SERVER_URL_LOADED);
delete _c09;
delete _c0a;
delete keys;
}
break;
}
if(_c08._key&&this._props.EXPAND_SERVER_URL){
var _c09=new AsynchCommand();
GlobalCallback[GlobalCallbackCount]=new AjxCallback(this,this._getChildrenCallback,_c08);
_c09.addInvokeListener(GlobalCallback[GlobalCallbackCount]);
GlobalCallbackCount++;
var _c0a=AjxXmlDoc.createRoot("GetChildren");
_c0a.set("key",(_c08._key));
if(this._props.CURRENT_STYLE==ComplexTreeProperties.FILEMANAGER_STYLE&&this._props.EXPAND_SERVER_URL.indexOf("display=")<0){
_c09.invoke(_c0a,this._props.EXPAND_SERVER_URL+"&display=directories_Only");
}else{
_c09.invoke(_c0a,this._props.EXPAND_SERVER_URL);
}
delete _c09;
delete _c0a;
if(this._props.CURRENT_STYLE==ComplexTreeProperties.ADMIN_CATEGORY_STYLE){
ComplexTreeProperties.RELOAD_ON_COLLAPSE=false;
}
}
break;
case DwtTree.ITEM_COLLAPSED:
if(this._props.CURRENT_STYLE!=ComplexTreeProperties.FILEMANAGER_STYLE){
this._hideChildren(_c08);
}
if(_c08._key&&this._props.COLLAPSE_SERVER_URL){
var keys=this._keys.getArray();
if(keys.length==0){
break;
}
var _c09=new AsynchCommand();
GlobalCallback[GlobalCallbackCount]=new AjxCallback(this,this._unlockChildrenCallback,_c08);
_c09.addInvokeListener(GlobalCallback[GlobalCallbackCount]);
GlobalCallbackCount++;
var _c0a=AjxXmlDoc.createRoot("UnlockChildren");
for(var i=0;i<keys.length;i++){
_c0a.set("key",(keys[i]));
}
_c09.invoke(_c0a,this._props.COLLAPSE_SERVER_URL);
delete _c09;
delete _c0a;
delete keys;
}
if(ComplexTreeProperties.RELOAD_ON_COLLAPSE&&_c08._key){
var _c0d=_c08.getItems();
var size=_c0d.length;
var _c0f=_c0d[0]._index-1;
for(var i=0;i<size;i++){
var _c10=_c0d[0];
_c08.removeChild(_c10);
_c10=null;
if(this._props.CURRENT_STYLE!=ComplexTreeProperties.FILEMANAGER_STYLE&&this._pageInfoView){
this._pageInfoView.deleteRow(_c0f);
}
}
_c0d=null;
size=null;
_c0f=null;
var _c11=new DwtTreeItem(_c08,null,this._loadingText);
_c11._key=ComplexTreeProperties.LOADING_ID;
_c11=null;
}
if(this._expandTreeItem){
this._expandTreeItem=false;
if(this._props.CURRENT_STYLE==ComplexTreeProperties.ADMIN_CATEGORY_STYLE){
_c08.setExpanded(true);
}else{
this.getFolderWithKey(_c08._key);
}
}
break;
}
delete _c08;
this._shell.setCursor("default");
this._tree.setCursor("default");
if(this._pageInfoView){
this._pageInfoView.setCursor("default");
}
};
ComplexTree.prototype._treeSelectionListener=function(ev){
switch(ev.detail){
case DwtTree.ITEM_SELECTED:
if(typeof ev.item._key!="undefined"){
this.getFolder(ev.item);
}
break;
}
};
ComplexTree.prototype.collapseExpand=function(_c13){
var item=window["treeItem"+_c13];
if(!item){
return;
}
this._expandTreeItem=true;
var _c15=item.getItems();
if(_c15&&_c15.length>0){
if(item.getExpanded()){
item.setExpanded(false);
}else{
item.setExpanded(true);
}
}else{
this.addLoadingNodeAndExpand(item);
if(this._props.CURRENT_STYLE==ComplexTreeProperties.ADMIN_CATEGORY_STYLE){
item.setExpanded(true);
}else{
this.getFolderWithKey(_c13);
}
}
delete item;
delete _c15;
};
ComplexTree.prototype.getFolderWithKey=function(_c16,_c17,_c18,_c19){
if(_c18==undefined){
_c18=true;
}
if(_c19==undefined){
_c19="name";
}
var item=window["treeItem"+_c16];
var _c1b=_c16.substring(0,_c16.lastIndexOf("/"));
if(_c1b.length==0){
_c1b="/";
}
var _c1c=window["treeItem"+_c1b];
if(item){
if(_c17&&_c17!=_c16){
item.reachDir=_c17;
}
var _c1d=new AsynchCommand();
GlobalCallback[GlobalCallbackCount]=new AjxCallback(this,this._fileManagerCallback,item);
_c1d.addInvokeListener(GlobalCallback[GlobalCallbackCount]);
GlobalCallbackCount++;
var _c1e=AjxXmlDoc.createRoot("GetDirContent");
_c1e.set("key",(item._key));
var reg=new RegExp("(&display=directories_Only)","g");
var _c20=this._props.EXPAND_SERVER_URL.replace(reg,"&display=");
var _c21=document.getElementById("filters");
if(_c21&&_c21.value.length>0){
_c20+=encodeURIComponent("|"+_c21.value);
}
if(_c18&&_c16==_c17){
this.updateBar=true;
}
_c20+="&sortBy="+_c19;
_c1d.invoke(_c1e,_c20);
delete reg;
delete _c1d;
delete _c1e;
delete reg;
delete _c20;
delete _c21;
}else{
this.updateBar=false;
var dirs=_c16.split("/");
var ok=!_c1c||!_c1c.getExpanded();
if(dirs.length>2&&(_c16.charAt(0)=="/")&&ok){
var _c24;
if(!_c17){
_c24=_c16;
}else{
_c24=_c17;
}
this.getFolderWithKey(_c1b,_c24);
delete _c24;
}else{
var _c25=document.getElementById("addressBarDisp");
if(_c25){
_c25.value=window.currentValue;
}
delete _c25;
}
delete dirs;
delete ok;
}
delete item;
delete _c1b;
delete _c1c;
};
ComplexTree.prototype.getFolder=function(item){
var _c27=new AsynchCommand();
GlobalCallback[GlobalCallbackCount]=new AjxCallback(this,this._fileManagerCallback,item);
_c27.addInvokeListener(GlobalCallback[GlobalCallbackCount]);
GlobalCallbackCount++;
var _c28=AjxXmlDoc.createRoot("GetDirContent");
_c28.set("key",(item._key));
var reg=new RegExp("(&display=directories_Only)","g");
var _c2a=this._props.EXPAND_SERVER_URL.replace(reg,"&display=");
var _c2b=document.getElementById("filters");
if(_c2b&&_c2b.value.length>0){
_c2a+=encodeURIComponent("|"+_c2b.value);
}
_c27.invoke(_c28,_c2a);
updateMenuBarAfterSelect(item._key);
delete _c27;
delete _c28;
delete reg;
delete _c2a;
delete _c2b;
};
ComplexTree.prototype._getChildrenCallback=function(args){
if(!args[1]||args[1] instanceof AjxException){
args[0].setExpanded(false);
if(!args[0].doStop){
args[0].setExpanded(true);
args[0].doStop=true;
}else{
alert("Exception during getChildrenCallback: "+args[1].dump());
}
return;
}
var _c2d=args[0];
var msg=args[1];
var _c2f=XmlUtils.splitXml(msg.getDocXml(),this._props.CURRENT_XML_TAG_NAME);
var _c30;
var _c31=0;
for(var i=0;i<_c2f.length;i++){
_c30=this._getAllObjectInfo(_c2f[i],this._props.CURRENT_STYLE);
if(_c30.dir!="dir"&&_c30.dir!="root"&&this._props.EXPAND_SERVER_URL.indexOf("directories_Only")>0){
_c31++;
continue;
}
var data=new Array();
var _c34=0;
for(var j=0;j<this._props.CURRENT_TREE_PATTERN.length;j++){
var _c36=ComplexTreeProperties.getDataFromObjectInfo(_c30,this._props.CURRENT_TREE_PATTERN[j],null,this._props,this);
if(!_c36){
continue;
}
for(var k=0;k<_c36.length;k++){
if(!_c36[k]&&j>2&&this._props.CURRENT_STYLE==ComplexTreeProperties.WORKFLOW_STYLE){
continue;
}
data[_c34]=_c36[k];
_c34++;
}
delete _c36;
}
var _c38=_c2d._index+i;
this._addTreeItem(_c2d,data,_c38,_c30);
if(this._pageInfoView&&this._props.CURRENT_STYLE!=ComplexTreeProperties.FILEMANAGER_STYLE){
data=this._pageInfoView.makeListItemData(_c30,this);
var _c39=new ListItem("item"+_c30.key,this._pageInfoView.getCurrentHeaders(),data,false,this._itemLength);
if(_c30.disable||(!_c30.admin)&&_c30.activeTab&&_c30.activeTab!=ComplexTreeProperties.activeTab){
_c39.disable();
}
this._pageInfoView.addItem(_c39,_c38);
delete _c39;
}
delete _c38;
delete data;
this.RETRIEVED_OBJECTS_EXPAND_ALL++;
}
delete _c30;
delete _c2f;
_c2d.removeChild(_c2d.getItems()[0]);
this._adjustTreeItemIndexes(_c2d._index);
if(this._props.CURRENT_STYLE!=ComplexTreeProperties.FILEMANAGER_STYLE){
this._displayChildren(_c2d);
}else{
this.DATA_HEIGHT+=(_c2f.length-_c31)*ComplexTreeProperties.ROW_HEIGHT;
if(this._maximize){
this._adjustBestHeight();
}
this._layout();
}
if(_c2d._expandAll){
if(_c2d._startingPoint){
ComplexTreeProperties.GOTO=_c2d._startingPoint+ComplexTreeProperties.EXPANDALL_LEVEL;
_c2d._startingPoint=null;
this.RETRIEVED_OBJECTS_EXPAND_ALL=_c2f.length;
}
if(_c2d._level<(ComplexTreeProperties.GOTO-1)&&this.RETRIEVED_OBJECTS_EXPAND_ALL<ComplexTreeProperties.MAX_RETRIEVED_OBJECTS_EXPAND_ALL){
var a=_c2d.getChildren();
for(var i=0;i<a.length;i++){
a[i]._expandAll=true;
a[i].setExpanded(true);
}
delete a;
}else{
_c2d._expandAll=false;
_c2d._parent._expandAll=false;
ComplexTreeProperties.GOTO=null;
}
}
if(_c2d.reachDir){
this.getFolderWithKey(_c2d.reachDir,_c2d.reachDir);
_c2d.reachDir=null;
}
delete msg;
delete _c2d;
};
ComplexTree.prototype._fileManagerCallback=function(args){
if(!args[1]||args[1] instanceof AjxException){
alert("Exception during fileManagerCallback: "+args[1].dump());
return;
}
var _c3c=args[0];
var msg=args[1];
this._pageInfoView._list.removeAll();
this._pageInfoView._resetList();
var _c3e=XmlUtils.splitXml(msg.getDocXml(),this._props.CURRENT_XML_TAG_NAME);
if(!_c3c.reachDir){
if(_c3e.length==0){
this._pageInfoView._setNoResultsHtml();
}else{
for(var i=0;i<_c3e.length;i++){
var _c40=this._getAllObjectInfo(_c3e[i],this._props.CURRENT_STYLE);
var data=this._pageInfoView.makeListItemData(_c40,this);
var _c42=new ListItem(_c40.key,this._pageInfoView.getCurrentHeaders(),data,false,this._itemLength);
_c42.dir=_c40.dir=="dir";
_c42.position=i;
if(_c40.disable||(!_c40.admin)&&_c40.activeTab&&_c40.activeTab!=ComplexTreeProperties.activeTab){
_c42.disable();
}
this._pageInfoView.addItem(_c42,null,null,(i==_c3e.length-1));
delete _c40;
delete data;
delete _c42;
}
}
var _c43=document.getElementById("addressBar");
var _c44=document.getElementById("addressBarDisp");
if(_c43){
_c43.value=_c3c._key;
_c44.value=_c3c._url;
}
_c3c.setText("<b>"+_c3c.getText()+"</b>");
delete _c43;
delete _c44;
}
delete _c3e;
if(this._oldSelected){
var _c45=this._oldSelected.getText();
if(_c45.indexOf("<b>")>-1){
this._oldSelected.setText(_c45.substring(3,_c45.length-4));
}
delete _c45;
}
window.currentValue=_c3c._url;
this._oldSelected=_c3c;
if(!_c3c.getExpanded()){
_c3c.DisableTreeListener=true;
_c3c.setExpanded(true);
this._getChildrenCallback(args);
}else{
if(_c3c.getItemCount()==1&&_c3c.getItems()[0].getText()==this._loadingText){
_c3c.removeChild(_c3c.getItems()[0]);
}
}
if(this.updateBar){
updateMenuBarAfterSelect(_c3c._key);
}
this.updateBar=null;
delete msg;
delete _c3c;
};
ComplexTree.prototype.addLoadingNodeAndExpand=function(_c46){
var _c47=new DwtTreeItem(_c46,null,this._loadingText);
_c47._key=ComplexTreeProperties.LOADING_ID;
_c46.setExpanded(true);
delete _c47;
};
ComplexTree.prototype._lockChildrenCallback=function(args){
if(!args[1]||args[1] instanceof AjxException){
alert("Exception during lockChildrenCallback: "+args[1].dump());
}
};
ComplexTree.prototype._unlockChildrenCallback=function(args){
if(!args[1]||args[1] instanceof AjxException){
alert("Exception during unlockChildrenCallback: "+args[1].dump());
}
};
ComplexTree.prototype._displayChildren=function(_c4a,_c4b){
this._showHideChildren(_c4a,false,_c4b);
};
ComplexTree.prototype._hideChildren=function(_c4c){
this._showHideChildren(_c4c,true,true);
};
ComplexTree.prototype._showHideChildren=function(_c4d,hide,_c4f){
this._count=0;
this._keys=new AjxVector();
this._getChildrenRecu(_c4d,hide);
if(hide){
this.DATA_HEIGHT-=this._count*ComplexTreeProperties.ROW_HEIGHT;
}else{
this.DATA_HEIGHT+=this._count*ComplexTreeProperties.ROW_HEIGHT;
}
if(_c4f&&this._pageInfoView){
this._pageInfoView.setUI();
}
if(this._maximize){
this._adjustBestHeight();
}
this._layout();
};
ComplexTree.prototype._getChildrenRecu=function(_c50,hide){
if(_c50._key==ComplexTreeProperties.LOADING_ID){
this._count--;
return;
}
if(this._count>0){
if(this._pageInfoView){
if(hide){
this._pageInfoView.hideRow(_c50._index-1);
}else{
this._pageInfoView.showRow(_c50._index-1);
}
}
this._keys.add(_c50._key);
if(!_c50.getExpanded()){
return;
}
}
if(hide){
_c50._expandAll=false;
}
this._count+=_c50.getItemCount();
var _c52=_c50.getItems();
for(var i=0;i<_c52.length;i++){
this._getChildrenRecu(_c52[i],hide);
}
delete _c52;
};
ComplexTree.prototype._getAllObjectInfo=function(_c54,_c55){
var _c56=new Object();
var _c57=new AjxVector();
var _c58=new AjxVector();
_c56.key=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"key");
_c57.add("key");
_c56.id=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"id");
_c57.add("id");
_c56.title=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"title");
_c57.add("title");
_c56.url=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"url");
_c57.add("url");
var dir=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"dir");
if(dir){
_c56.dir=dir;
}
delete dir;
var _c5a=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"Style");
if(_c5a){
_c56.style=_c5a;
}
delete _c5a;
var _c5b=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"parentID");
if(_c5b){
_c56.parentID=_c5b;
}
delete _c5b;
var _c5c=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"Disable");
if(_c5c){
_c56.disable=_c5c;
}
delete _c5c;
var _c5d=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"Admin");
if(_c5d){
_c56.admin=_c5d;
}
delete _c5d;
var _c5e=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"NoChildren");
if(_c5e){
_c56.NoChildren=_c5e;
}
delete _c5e;
var _c5f=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"canWrite");
if(_c5f){
_c56.canWrite=_c5f;
}
delete _c5f;
var _c60=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"canRead");
if(_c60){
_c56.canRead=_c60;
}
delete _c60;
if(_c55==ComplexTreeProperties.FILEMANAGER_STYLE){
var info=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"info");
if(info){
_c57.add("info");
_c56.info=["javascript:openManager('"+_c56.key+"', 'info')",ComplexTreeProperties.INFO,"info"];
}
delete info;
var _c62=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"props");
if(_c62){
_c57.add("props");
_c56.props=["javascript:openManager('"+_c56.key+"', 'edit')",ComplexTreeProperties.PROPS,"props"];
}
delete _c62;
var _c63=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"fileSize");
if(_c63){
_c57.add("fileSize");
_c56.fileSize=_c63;
}
delete _c63;
var _c64=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"lastModif");
if(_c64){
_c57.add("lastModif");
_c56.lastModif=_c64;
}
delete _c64;
var _c65=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"locked");
if(_c65){
_c57.add("locked");
_c56.locked=["javascript:openManager('"+_c56.key+"','unlockFile')",ComplexTreeProperties.LOCKED_STATE,"unlockFile"];
}
delete _c65;
}else{
if(_c55==ComplexTreeProperties.WORKFLOW_STYLE){
var _c66=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"warnings");
if(_c66){
_c57.add("warnings");
_c56.warnings=_c66;
}
delete _c66;
var _c67=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"partialWarnings");
if(_c67){
_c57.add("partialWarnings");
_c56.partialWarnings=_c67;
}
delete _c67;
var _c68=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"errors");
if(_c68){
_c57.add("errors");
_c56.errors=_c68;
}
delete _c68;
var _c69=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"activeTab");
if(_c69){
_c57.add("activeTab");
_c56.activeTab=_c69;
}
delete _c69;
var _c6a=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"displayImage");
if(_c6a){
_c57.add("displayImage");
_c56.displayImage=_c6a;
}
delete _c6a;
var _c65=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"locked");
if(_c65){
_c57.add("locked");
_c56.locked=_c65;
}
delete _c65;
}else{
if(_c55==ComplexTreeProperties.SELECT_PAGE_STYLE){
var _c6a=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"displayImage");
if(_c6a){
_c57.add("displayImage");
_c56.displayImage=_c6a;
}
delete _c6a;
var _c6b=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"timeBasedPublishingActionURL");
if(_c6b){
_c57.add("timeBasedPublishingActionURL");
_c56.timeBasedPublishingActionURL=_c6b;
}
delete _c6b;
var _c6c=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"timeBasedPublishingDialogTitle");
if(_c6b){
_c57.add("timeBasedPublishingDialogTitle");
_c56.timeBasedPublishingDialogTitle=_c6c;
}
delete _c6c;
var _c6d=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"timeBasedPublishingPageId");
if(_c6b){
_c57.add("timeBasedPublishingPageId");
_c56.timeBasedPublishingPageId=_c6d;
}
delete _c6d;
}else{
if(_c55==ComplexTreeProperties.ADMIN_CATEGORY_STYLE){
var add=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"add");
if(add){
_c57.add("add");
_c56.add=add;
}
delete add;
var edit=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"edit");
if(edit){
_c57.add("edit");
_c56.edit=edit;
}
delete edit;
var move=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"move");
if(move){
_c57.add("move");
_c56.move=move;
}
delete move;
var _c71=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"remove");
if(_c71){
_c57.add("remove");
_c56.remove=_c71;
}
delete _c71;
}else{
if(_c55==ComplexTreeProperties.SELECT_CATEGORY_STYLE){
var _c72=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"checked");
if(_c72){
_c57.add("checked");
_c56.checked=_c72;
}
delete _c72;
}else{
if(_c55==ComplexTreeProperties.PORTLET_CATEGORY_STYLE){
var _c72=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"checked");
if(_c72){
_c57.add("checked");
_c56.checked=_c72;
}
delete _c72;
var _c73=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"allsources");
if(_c73){
_c57.add("allsources");
_c56.allsources=_c73;
}
delete _c73;
}else{
var _c65=XmlUtils.getAttrValue(_c54,this._props.CURRENT_XML_TAG_NAME,"locked");
if(_c65){
_c57.add("locked");
_c56.locked=_c65;
}
delete _c65;
}
}
}
}
}
}
var _c74=XmlUtils.splitXml(_c54,"lang");
for(var i=0;i<_c74.length;i++){
var _c76=_c74[i];
var key=XmlUtils.getAttrValue(_c76,"lang","code");
var _c72=XmlUtils.getAttrValue(_c76,"lang","checked");
var _c78=XmlUtils.getAttrValue(_c76,"lang","langURL");
var _c79=XmlUtils.getAttrValue(_c76,"lang","Disable");
var _c7a=XmlUtils.getAttrValue(_c76,"lang","additionalKey0");
var _c7b=XmlUtils.getAttrValue(_c76,"lang","additionalKey1");
_c56[key]=[XmlUtils.getNodeValue(_c76,"lang"),_c72,_c78,_c79,_c7a,_c7b];
_c58.add(key);
}
_c56.langs=_c58;
_c57.add("langs");
delete _c74;
delete _c58;
_c56.keys=_c57;
delete _c57;
return _c56;
};
ComplexTree.prototype._maxListener=function(ev){
this._maximize=true;
this._adjustBestHeight();
};
ComplexTree.prototype._adjustBestHeight=function(){
if(this._props.CURRENT_STYLE==ComplexTreeProperties.FILEMANAGER_STYLE){
this.DATA_HEIGHT=ComplexTreeProperties.MAX_DATA_HEIGHT;
}
ComplexTreeProperties.SHELL_HEIGHT=this.DATA_HEIGHT+ComplexTreeProperties.ROW_HEIGHT;
var _c7d=document.getElementById(this._parentDiv);
_c7d.style.height=ComplexTreeProperties.SHELL_HEIGHT+"px";
this._container.setSize(null,ComplexTreeProperties.SHELL_HEIGHT);
if(this._plusButton){
this._plusButton.setEnabled(false);
}
};
ComplexTree.prototype.addWflowTab=function(_c7e,name){
var tabs=document.getElementById("tabs");
if(tabs){
if(!document.getElementById(_c7e)){
tabs.innerHTML+="\n<a id=\""+_c7e+"\" href=\"javascript:handleActionChanges('display&display="+_c7e+"')\">"+name+"</a>";
}
}
};
ComplexTree.prototype.toString=function(){
return "ComplexTree";
};


