var TMBootstrap=new Object();
Date.prototype.equals=function(_1){
var _2=false;
if(_1["getUTCDate"]){
_2=(this.valueOf()==_1.valueOf());
}
return _2;
};
TMStrings=new Object();
TMStrings.COMMA=",";
TMStrings.START_CURLY_BRACKET="{";
TMStrings.CLOSE_CURLY_BRACKET="}";
TMStrings.EQUALS="=";
TMStrings.initUpperCase=function(_3){
if(!_3){
return _3;
}
var _4=_3.charAt(0);
var _5=_4.toUpperCase();
return (_4==_5)?_3:_5+_3.substr(1);
};
TMStrings.createConstantName=function(_6){
var _7=_6.replace(TMStrings._CONSTANT_REGEXP,TMStrings._REPLACE_PATTERN);
_7=_7.toUpperCase();
return _7;
};
TMStrings._CONSTANT_REGEXP=/([A-Z])/g;
TMStrings._REPLACE_PATTERN="_$1";
var TMAssert=new Object();
TMAssert.FUNC_NAME_PROPERTY="_funcName";
TMAssert.CLASS_NAME_PROPERTY="_className";
TMAssert._MAX_STACK_DEPTH_LIMIT=20;
TMAssert._PARAMS_NAME_PROPERTY="_funcParams";
TMAssert.assert=function(_8,_9){
if(TMAssert.DEBUG&&!_8){
if(arguments.length>2){
_9+="(";
for(var i=2;i<arguments.length;i++){
_9+=arguments[i];
}
_9+=")";
}
TMAssert.assertionFailed(_9,1);
}
};
TMAssert.failedInAbstractFunction=function(){
if(TMAssert.DEBUG){
TMAssert.assertionFailed("Abstract function called",1);
}
};
TMAssert.assertPrototype=function(_b,_c,_d){
if(TMAssert.DEBUG){
if(_b!=null){
TMAssert.assertType(_c,"function",null,1,false);
var _e=_c.prototype;
if(!_e.isPrototypeOf(_b)){
TMAssert.assertionFailed("object '"+_b+"' doesn't match prototype "+_e,1,_d);
}
}else{
TMAssert.assertionFailed("null object doesn't match prototype "+_e,1,_d);
}
}
};
TMAssert.assertPrototypeOrNull=function(_f,_10,_11){
if(TMAssert.DEBUG&&(_f!=null)){
if(_f!=null){
TMAssert.assertType(_10,"function",null,1,false);
var _12=_10.prototype;
if(!_12.isPrototypeOf(_f)){
TMAssert.assertionFailed("object '"+_f+"' doesn't match prototype "+_12,1,_11);
}
}else{
TMAssert.assertionFailed("null object doesn't match prototype "+_12,1,_11);
}
}
};
TMAssert.assertPrototypes=function(_13,_14,_15,_16){
if(TMAssert.DEBUG){
var _17=_14.prototype;
var _18=_15.prototype;
if(!(_17.isPrototypeOf(_13)||_18.isPrototypeOf(_13))){
TMAssert.assertionFailed("object '"+_13+"' doesn't match prototype "+_17+" or "+_18,1,_16);
}
}
};
TMAssert.assertDomNodeOrNull=function(_19,_1a){
if(TMAssert.DEBUG&&(_19!=null)){
if(_19["nodeType"]==undefined){
TMAssert.assertionFailed(_19+" is not a DOM Node",_1a+1);
}
}
};
TMAssert.assertDomNode=function(_1b,_1c){
if(TMAssert.DEBUG){
if(!_1b||(_1b["nodeType"]==undefined)){
TMAssert.assertionFailed(_1b+" is not a DOM Node",_1c+1);
}
}
};
TMAssert.assertDomElement=function(_1d,_1e){
if(TMAssert.DEBUG){
TMAssert.assertDomNode(_1d,1);
if(_1d.nodeType!=1){
TMAssert.assertionFailed(_1d+" is not a DOM Element",1);
}else{
if(_1e&&(_1d.nodeName!=_1e)){
TMAssert.assertionFailed(_1d+" is not a "+_1e+" Element",1);
}
}
}
};
TMAssert.assertDomElementOrNull=function(_1f,_20){
if(TMAssert.DEBUG&&(_1f!=null)){
TMAssert.assertDomNode(_1f,1);
if(_1f.nodeType!=1){
TMAssert.assertionFailed(_1f+" is not a DOM Element",1);
}else{
if(_20&&(_1f.nodeName!=_20)){
TMAssert.assertionFailed(_1f+" is not a "+_20+" Element",1);
}
}
}
};
TMAssert.assertType=function(_21,_22,_23,_24,_25){
if(TMAssert.DEBUG){
if(!(((_21==null)&&_25)||((typeof _21)==_22))){
var _26=_21+" is not of type "+_22;
if(_23){
_26=_23+_26;
}
if(!_24){
_24=0;
}
TMAssert.assertionFailed(_26,_24+1);
}
}
};
TMAssert.assertObject=function(_27,_28){
if(TMAssert.DEBUG){
TMAssert.assertType(_27,"object",_28,1,false);
}
};
TMAssert.assertObjectOrNull=function(_29,_2a){
if(TMAssert.DEBUG){
TMAssert.assertType(_29,"object",_2a,1,true);
}
};
TMAssert.assertString=function(_2b,_2c){
if(TMAssert.DEBUG){
TMAssert.assertType(_2b,"string",_2c,1,false);
}
};
TMAssert.assertStringOrNull=function(_2d,_2e){
if(TMAssert.DEBUG){
TMAssert.assertType(_2d,"string",_2e,1,true);
}
};
TMAssert.assertFunction=function(_2f,_30){
if(TMAssert.DEBUG){
TMAssert.assertType(_2f,"function",_30,1,false);
}
};
TMAssert.assertFunctionOrNull=function(_31,_32){
if(TMAssert.DEBUG){
TMAssert.assertType(_31,"function",_32,1,true);
}
};
TMAssert.assertBoolean=function(_33,_34){
if(TMAssert.DEBUG){
TMAssert.assertType(_33,"boolean",_34,1,false);
}
};
TMAssert.assertNumber=function(_35,_36){
if(TMAssert.DEBUG){
TMAssert.assertType(_35,"number",_36,1,false);
}
};
TMAssert.assertNumberOrNull=function(_37,_38){
if(TMAssert.DEBUG){
TMAssert.assertType(_37,"number",_38,1,true);
}
};
TMAssert.assertArray=function(_39,_3a){
};
TMAssert.assertArrayOrNull=function(_3b,_3c){
};
TMAssert.assertNonNumeric=function(_3d,_3e){
if(TMAssert.DEBUG){
if(!isNaN(_3d)){
if(_3e==undefined){
_3e=_3d+" is convertible to a number";
}
TMAssert.assertionFailed(_3e,1);
}
}
};
TMAssert.assertNumeric=function(_3f,_40){
if(TMAssert.DEBUG){
if(isNaN(_3f)){
if(_40==undefined){
_40=_3f+" is not convertible to a number";
}
TMAssert.assertionFailed(_40,1);
}
}
};
TMAssert.assertInSet=function(_41,set,_43){
if(TMAssert.DEBUG){
if((_41==null)||(set[_41.toString()]==undefined)){
if(_43==undefined){
var _44=" is not in set: {";
for(var k in set){
_44+=k;
_44+=",";
}
_44+="}";
_43=_41+_44;
}
TMAssert.assertionFailed(_43,1);
}
}
};
TMAssert.assertionFailed=function(_46,_47,_48){
if(TMAssert.DEBUG){
if(!_47){
_47=0;
}
var _49="Assertion";
if(_48){
_49+=" ("+_48+")";
}
_49+=" failed: ";
if(_46!=undefined){
_49+=_46;
}
var _4a=TMAssert._getStackTrace(_47+1);
var _4b=TMAssert._getStackString(_4a);
_49+="\nStackTrace:\n"+_4b;
alert(_49);
throw error;
}
};
TMAssert.getFunctionName=function(_4c){
var _4d=_4c[TMAssert.FUNC_NAME_PROPERTY];
if(_4d==undefined){
var _4e=_4c.toString();
var _4f=_4e.indexOf("(");
var _50=_4e.lastIndexOf(" ",_4f);
_4d=_4e.substring(_50+1,_4f);
if(!_4d.length){
_4d=null;
}
_4c[TMAssert.FUNC_NAME_PROPERTY]=_4d;
}
return _4d;
};
TMAssert.getStackString=function(_51){
if(_51==null){
_51=1;
}
return TMAssert._getStackString(TMAssert._getStackTrace(1));
};
TMAssert._getStackTrace=function(_52){
if(_52==undefined){
_52=0;
}
TMAssert.assert(_52>=0);
var _53=new Array();
try{
var _54=TMAssert._getStackTrace.caller;
while(_54&&(_53.length<TMAssert._MAX_STACK_DEPTH_LIMIT)){
if(!_52){
_53.push(_54);
}else{
_52--;
}
_54=_54.caller;
}
}
catch(e){
}
return _53;
};
TMAssert._getFuncParams=function(_55){
var _56=_55[TMAssert._PARAMS_NAME_PROPERTY];
if(_56==undefined){
var _57=_55.toString();
var _58=_57.indexOf("(");
var _59=_57.indexOf(")",_58+1);
_56=_57.substring(_58,_59+1);
_56=_56.replace(/\s+/g,"");
if(!_56.length){
_56=null;
}
_55[TMAssert._PARAMS_NAME_PROPERTY]=_56;
}
return _56;
};
TMAssert._getStackString=function(_5a){
if(!_5a){
return "";
}
var _5b=_5a.length;
var _5c=new Array(_5b);
for(var _5d=0;_5d<_5b;_5d++){
var _5e=_5a[_5d];
var _5f=TMAssert.getFunctionName(_5e);
if(!_5f){
_5f="anonymous";
}
var _60=_5e[TMAssert.CLASS_NAME_PROPERTY];
if(_60){
_5f=_60+"."+_5f;
}
var _61=TMAssert._getFuncParams(_5e);
var _62=_5e.arguments;
var _63=_62.length;
var _64=null;
if(_63){
_64=new Array(_63);
for(var _65=0;_65<_63;_65++){
var _66=_62[_65];
if(typeof _66=="function"){
var _67=TMAssert.getFunctionName(_66);
if(!_67){
_67="anonymous";
}
var _68=TMAssert._getFuncParams(_66);
_66="function "+_67+_68;
}
_64[_65]=_66;
}
}
var _69=new Array();
_69[0]=_5f;
_69[1]=_61;
if(_64){
_69[2]="\n";
_69[3]="[";
_69[4]=TMAssert._safeJoin(_64,",");
_69[5]="]";
}
_5c[_5d]=_69.join("");
}
return _5c.join("\n");
};
TMAssert._safeJoin=function(arr,sep){
var _6c=arr.length;
var _6d="";
for(var i=0;i<_6c;i++){
var ele=arr[i];
var str=ele?(ele.toString?ele.toString():"Unknown"):"(empty)";
_6d+=str;
if(sep){
if(i<_6c-1){
_6d+=sep;
}
}
}
return _6d;
};
var TMDomUtils=new Object();
TMDomUtils.createElementWithName=function(_71,_72){
var _73=TMAgent.AGENT;
return _73.createElementWithName(_71,_72);
};
TMDomUtils.isVisible=function(_74){
if(_74==null){
return false;
}
return (_74.style.display!="none");
};
TMDomUtils.isInVisibleSubtree=function(_75){
if(_75==null){
return false;
}
while(_75!=null){
if(_75.style&&_75.style.display=="none"){
return false;
}
_75=_75.parentNode;
}
return true;
};
TMDomUtils.setVisible=function(_76,_77){
_76.style.display=(_77?"":"none");
};
TMDomUtils.stripScripts=function(_78){
var _79=_78.childNodes;
if(_79!=null){
var _7a=null;
for(var i=(_79.length-1);i>-1;i--){
_7a=_79[i];
if(_7a.nodeType==1&&_7a.tagName=="SCRIPT"){
_78.removeChild(_7a);
}
}
}
};
TMDomUtils.isNodeInDocumentHierarchy=function(_7c,_7d){
if(_7d==_7c){
return true;
}
if(_7c==_7d.ownerDocument){
while(_7d!=null){
_7d=_7d.parentNode;
if(_7d==_7c){
return true;
}
}
}
return false;
};
TMDomUtils.isAncestor=function(_7e,_7f){
var _80=_7f.parentNode;
while(_80){
if(_80==_7e){
return true;
}
_80=_80.parentNode;
}
return false;
};
TMDomUtils.isAncestorOrSelf=function(_81,_82){
return (_82==_81)?true:TMDomUtils.isAncestor(_81,_82);
};
TMDomUtils.getFormElement=function(_83){
var _84=_83.ownerDocument;
var _85=TMAgent.AGENT;
while(_83!=_84){
if(_85.getNodeName(_83)=="FORM"){
return _83;
}
_83=_83.parentNode;
}
return null;
};
TMDomUtils.getFirstChildElement=function(_86){
var _87=_86.childNodes;
if(_87){
var _88=_87.length;
for(var i=0;i<_88;i++){
var _8a=_87[i];
if(_8a.nodeType==1){
return _8a;
}
}
}
return null;
};
TMDomUtils.getLastChildElement=function(_8b){
var _8c=_8b.childNodes;
if(_8c){
var _8d=_8c.length;
for(var i=_8d-1;i>=0;i--){
var _8f=_8c[i];
if(_8f.nodeType==1){
return _8f;
}
}
}
return null;
};
TMDomUtils.getOnlyChildElement=function(_90){
var _91=null;
var _92=_90.childNodes;
if(_92){
var _93=_92.length;
for(var i=0;i<_93;i++){
childNode=_92[i];
var _95=childNode.nodeType;
if(_95==8){
continue;
}
if(_95==3){
var _96=childNode.data.replace(/\s*/,"");
if(_96.length>0){
return null;
}
}else{
if(_95==1){
if(_91){
return null;
}
_91=childNode;
}else{
return null;
}
}
}
}
return _91;
};
TMDomUtils.getNextElement=function(_97){
if(_97){
var el=_97.nextSibling;
while(el){
if(el.nodeType==1){
return el;
}
el=el.nextSibling;
}
}
};
TMDomUtils.getPreviousElement=function(_99){
if(_99){
var el=_99.previousSibling;
while(el){
if(el.nodeType==1){
return el;
}
el=el.previousSibling;
}
}
};
TMDomUtils.getElementPosition=function(_9b){
var pos=-1;
if(_9b){
var el=_9b;
var _9e=_9b.nodeType;
while(el){
if(el.nodeType==_9e){
pos++;
}
el=el.previousSibling;
}
}
return pos;
};
TMDomUtils.getChildElementByPosition=function(_9f,_a0,_a1){
var el=null;
if(_9f){
var idx=-1;
el=_9f.firstChild;
while(el&&idx<_a1){
if(el.nodeType==_a0){
idx++;
}
if(idx!=_a1){
el=el.nextSibling;
}
}
}
return el;
};
TMDomUtils.getElementAtPoint=function(_a4,_a5,_a6,_a7){
if(TMAgent.AGENT.pointInElementBounds(_a4,_a5,_a6)){
_a7=_a4;
var _a8=_a4.firstChild;
while(_a8){
if(_a8.nodeType==1){
var _a9=TMDomUtils.getElementAtPoint(_a8,_a5,_a6,_a7);
if(_a9!=_a7){
return _a9;
}
}
_a8=_a8.nextSibling;
}
}
return _a7;
};
TMDomUtils.canScroll=function(_aa,_ab,_ac){
return ((_aa.scrollWidth!=_ab)||(_aa.scrollHeight!=_ac));
};
TMDomUtils.getAutoScrollDeltas=function(_ad,_ae,_af){
var _b0=_ad.clientWidth;
var _b1=_ad.clientHeight;
var _b2=0;
var _b3=0;
var _b4=_ad.scrollTop;
var _b5=_ad.scrollLeft;
var _b6=_ae-_b5;
var _b7=_af-_b4;
if(_b5&&(_b6<5)){
_b2=-Math.min(_b5,10);
}else{
if((_b0-_b6)<5){
var _b8=_ad.scrollWidth-_b0;
_b2=Math.min(_b8,10);
}
}
if(_b4&&(_b7<5)){
_b3=-Math.min(_b4,10);
}else{
if((_b1-_b7)<5){
var _b9=_ad.scrollHeight-_b1;
_b3=Math.min(_b9,10);
}
}
if(_b2||_b3){
return {x:_b2,y:_b3};
}else{
return null;
}
};
TMDomUtils.removeAllNodes=function(_ba){
var _bb=_ba.childNodes;
for(var i=_bb.length-1;i>=0;i--){
_ba.removeChild(_bb[i]);
}
};
TMDomUtils.scrollRightBy=function(_bd,_be){
TMDomUtils.setScrollLeft(_bd,_bd.scrollLeft+_be);
};
TMDomUtils.setScrollLeft=function(_bf,_c0){
_c0=Math.max(_c0,0);
var _c1=_bf.scrollWidth-_bf.clientWidth;
_bf.scrollLeft=Math.min(_c0,_c1);
};
TMDomUtils.scrollDownBy=function(_c2,_c3){
TMDomUtils.setScrollTop(_c2,_c2.scrollTop+_c3);
};
TMDomUtils.setScrollTop=function(_c4,_c5){
_c5=Math.max(_c5,0);
var _c6=_c4.scrollHeight-_c4.clientHeight;
_c4.scrollTop=Math.min(_c5,_c6);
};
TMDomUtils.scrollChildIntoViewY=function(_c7){
var _c8=_c7.offsetTop;
var _c9=_c7.offsetHeight;
var _ca=_c7.offsetParent;
var _cb=_c7.parentNode;
while(_cb&&(_cb.scrollHeight<=_cb.offsetHeight)){
if(_cb.offsetParent!=_ca){
_c8+=_cb.offsetTop;
_ca=_cb.offsetParent;
}
_cb=_cb.parentNode;
}
if(_cb!=null){
if(_c8<_cb.scrollTop){
_cb.scrollTop=_c8;
}else{
if((_c8+_c9)>(_cb.scrollTop+_cb.clientHeight)){
_cb.scrollTop=_c8+_c9-_cb.clientHeight;
}
}
}
};
TMDomUtils.getNodeInfo=function(_cc){
var _cd="";
if(_cc){
_cd+=_cc.nodeName;
if(_cc.id){
_cd+=" id="+_cc.id;
}
if(_cc._afrpeerid){
_cd+=" peer id="+_cc._afrpeerid;
}
if(_cc.className){
_cd+=" class="+_cc.className;
}
}
return _cd;
};
TMDomUtils.swapIcon=function(_ce,_cf){
};
TMDomUtils._getCSSClassNameIndex=function(_d0,_d1){
if(!_d0){
return -1;
}else{
if(_d1===_d0){
return 0;
}else{
var _d2=_d1.length;
var _d3=_d0.length;
var _d4=_d0.indexOf(_d1);
if(_d4>=0){
var _d5=(_d4==0)||(_d0.charAt(_d4-1)==" ");
var _d6=_d4+_d2;
var _d7=(_d6==_d3)||(_d0.charAt(_d6)==" ");
if(_d5&&_d7){
return _d4;
}else{
var _d8=_d0.lastIndexOf(_d1);
if(_d8!=_d4){
_d5=_d0.charAt(_d8-1);
_d6=_d8+_d2;
_d7=(_d6==_d3)||(_d0.charAt(_d6)==" ");
if(_d5&&_d7){
return _d8;
}else{
return _d0.indexOf(" "+_d1+" ");
}
}
}
}
return -1;
}
}
};
TMDomUtils.setCSSClassName=function(el,_da){
if(el){
el.className=_da;
}
};
TMDomUtils.addCSSClassName=function(el,_dc,_dd){
var _de=el.className;
var _df=TMDomUtils._getCSSClassNameIndex(_de,_dc);
if(_df==-1){
if(_dd!=null&&el.className.match(new RegExp("(^| )"+_dd))){
el.className=el.className.replace(new RegExp("( |^)"+_dd),"$1"+_dc+" "+_dd);
}else{
if(!el.className.match(new RegExp("(^| )"+_dc+"($| )"))){
el.className=_dc+" "+el.className;
el.className=el.className.replace(/(^ +)|( +$)/g,"");
}
}
}
};
TMDomUtils.replaceCSSClassName=function(el,_e1,_e2){
var _e3=el.className;
_e3=_e3.replace(_e1,_e2);
el.className=_e3;
};
TMDomUtils.removeCSSClassName=function(el,_e5){
var old=el.className;
var _e7=" "+el.className+" ";
_e7=_e7.replace(new RegExp(" ("+_e5+" +)+","g")," ");
el.className=_e7.replace(/(^ +)|( +$)/g,"");
};
TMDomUtils.addOrRemoveCSSClassName=function(add,_e9,_ea,_eb){
if(add){
TMDomUtils.addCSSClassName(_e9,_ea,_eb);
}else{
TMDomUtils.removeCSSClassName(_e9,_ea);
}
};
TMDomUtils.containsCSSClassName=function(_ec,_ed){
if(_ed!=null){
return TMDomUtils._getCSSClassNameIndex(_ec.className,_ed)!=-1;
}else{
return false;
}
};
TMDomUtils.addInlineStyle=function(_ee,_ef,_f0){
if(_ef==null){
return;
}
var _f1=_ee.style.cssText;
if(_f1==null||_f1==""){
_ee.style.cssText=_ef;
}else{
if(_f0==true){
_ee.style.cssText=_f1+";"+_ef;
}else{
_ee.style.cssText=_ef+";"+_f1;
}
}
};
TMDomUtils.fillEmptyCell=function(_f2){
if(_f2.firstChild==null){
var div=_f2.ownerDocument.createElement("div");
_f2.appendChild(div);
}
};
var TMUIUtils=new Object();
TMUIUtils.dumpHtmlDom=function(_f4,_f5){
TMUIUtils.dump(_f4,_f5,{innerText:1,outerText:1,outerHTML:1,innerHTML:1});
};
TMUIUtils.dump=function(_f6,_f7,_f8){
var _f9="";
if(_f6){
var _fa=typeof _f6;
var _fb=(_fa=="object");
var _fc=(_fa=="function");
if(!_fb&&!_fc){
_f9=_fa+":"+_f6.valueOf();
}else{
if(_fc){
_f9=_fa+":"+_f6.valueOf();
}else{
if(TMCollections.isArray(_f6)){
_f9="Array length="+_f6.length+" contents=["+_f6.valueOf()+"] ";
}
}
if(!_f7){
_f7=_f6["name"];
}
var _fd=0;
var _fe=new Array();
for(var _ff in _f6){
if((!_f8||!_f8[_ff])&&!_ff.match(/DOM/)){
_fe[_fd]=_ff;
_fd++;
}
}
_fe.sort();
var _100=_fe.length;
var _101=Math.ceil(_100/TMUIUtils._MAX_ALERT_ROWS);
for(var _102=0;_102<_100;_102++){
var _103="";
try{
_103=TMUIUtils._getKeyValueString(_f6,_fe[_102]);
_103+=TMUIUtils.getTabbedSpacer(_102,_101);
}
catch(e){
}
_f9+=_103;
}
if(!_f7){
_f7=""+_f6;
}
}
}else{
if(!_f7){
_f7="(Undefined)";
}
}
if(_f9==""){
_f9="No properties";
}
alert("Dump of "+_f7+":\n"+_f9);
};
TMUIUtils._getKeyValueString=function(_104,key){
var _106=_104[key];
if(typeof (_106)=="function"){
_106="[function]";
}
return key+":"+_106;
};
TMUIUtils.getTabbedSpacer=function(_107,_108){
if(!_108){
_108=3;
}
var _109=(TMAgent.AGENT.isGecko())?((_107+1)%_108==0)?"\n":"    ":"\t";
return _109;
};
TMUIUtils.getSingleSpacer=function(){
return " ";
};
TMUIUtils.getCommaSpacer=function(){
return ",";
};
TMUIUtils.getPropertiesAsString=function(_10a,_10b,_10c,_10d){
if(!_10a){
return "No target";
}
var _10e="";
if(_10c==null){
_10c=true;
}
if(_10d==null){
_10d=true;
}
var _10f=typeof _10a;
var _110=_10f=="object";
var _111=(_10f=="function");
if(!_110&&!_111){
_10e=_10f+":"+_10a.valueOf();
}else{
if(_111){
_10e=_10f+":"+_10a.valueOf();
}else{
if(TMCollections.isArray(_10a)){
_10e="Array length="+_10a.length+" contents=["+_10a.valueOf()+"] ";
}
}
if(_10b==undefined){
_10b=TMUIUtils.getTabbedSpacer;
}
var _112=0;
for(var _113 in _10a){
var _114="";
if(!_10d){
if(_113==_113.toUpperCase()){
continue;
}
}
try{
var _115=_10a[_113];
if(typeof (_115)=="function"){
if(!_10c){
continue;
}
_115="[function]";
}
_114=_113+":"+_115;
if(_10b){
_114+=_10b(_112++);
}
}
catch(e){
}
_10e+=_114;
}
if(!_10e.length){
_10e="Unknown:"+_10a.valueOf();
}
}
return _10e;
};
TMUIUtils.compareArrays=function(_116,_117){
if(_116.length==_117.length){
for(var _118 in _116){
var _119=_116[_118];
var _11a=_117[_118];
if(!TMUIUtils.compareValues(_119,_11a)){
return false;
}
}
return true;
}else{
return false;
}
};
TMUIUtils.compareObjects=function(_11b,_11c){
var _11d=_11b["equals"];
if(_11d&&typeof (_11d)=="function"){
return _11d.call(_11b,_11c);
}
for(var _11e in _11b){
var _11f=_11b[_11e];
var _120=_11c[_11e];
if(!TMUIUtils.compareValues(_11f,_120)){
return false;
}
}
for(var _11e in _11c){
var _11f=_11b[_11e];
var _120=_11c[_11e];
if(!TMUIUtils.compareValues(_120,_11f)){
return false;
}
}
return true;
};
TMUIUtils.compareValues=function(_121,_122){
var _123=(_121===_122);
if(!_123&&(_121!=null)&&(_122!=null)){
if(Array.prototype.isPrototypeOf(_121)&&Array.prototype.isPrototypeOf(_122)){
_123=TMUIUtils.compareArrays(_121,_122);
}else{
if(TMObject.prototype.isPrototypeOf(_121)&&TMObject.prototype.isPrototypeOf(_122)){
_123=_121.equals(_122);
}else{
if(Object.prototype.isPrototypeOf(_121)&&Object.prototype.isPrototypeOf(_122)){
_123=TMUIUtils.compareObjects(_121,_122);
}
}
}
}
return _123;
};
TMUIUtils.trim=function(data){
if(data!=null&&(typeof data)=="string"){
return data.replace(TMUIUtils._TRIM_ALL_RE,"");
}
return data;
};
TMUIUtils.trimLeading=function(data){
if(data!=null&&(typeof data)=="string"){
return data.replace(TMUIUtils._TRIM_BEGINNING_RE,"");
}
return data;
};
TMUIUtils.trimTrailing=function(data){
if(data!=null&&(typeof data)=="string"){
return data.replace(TMUIUtils._TRIM_ENDING_RE,"");
}
return data;
};
TMUIUtils._MAX_ALERT_ROWS=28;
TMUIUtils._TRIM_ALL_RE=/^\s*|\s*$/g;
TMUIUtils._TRIM_BEGINNING_RE=/^\s*/g;
TMUIUtils._TRIM_END_RE=/\s*$/g;
var TMFocusUtils=new Object();
TMFocusUtils.containsFocus=function(_127){
var _128=TMPage.PAGE.getActiveDomElement();
while(_128!=null){
if(_128==_127){
return true;
}
_128=_128.parentNode;
}
return false;
};
TMFocusUtils.focusElementById=function(id){
var el=TMAgent.AGENT.getElementById(id);
if(el){
TMFocusUtils.focusElement(el);
}
};
TMFocusUtils.focusElement=function(_12b){
if(TMPage.PAGE.isScreenReaderMode()){
TMFocusUtils._focusElementDelayed(_12b);
}else{
TMFocusUtils._focusElementImpl(_12b);
}
};
TMFocusUtils.isFocusChangePending=function(){
return (TMFocusUtils._delayFocusTimerId!=null);
};
TMFocusUtils.focusFirstTabStop=function(_12c){
var _12d=TMFocusUtils.getFirstTabStop(_12c);
if(_12d!=null){
TMFocusUtils.focusElement(_12d);
}
return _12d;
};
TMFocusUtils.focusLastTabStop=function(_12e){
var _12f=TMFocusUtils.getLastTabStop(_12e);
if(_12f!=null){
TMFocusUtils.focusElement(_12f);
}
return _12f;
};
TMFocusUtils.focusNextTabStop=function(_130,_131,_132){
var _133=TMFocusUtils.getNextTabStop(_130,_131,_132);
if(!_133){
if(!_131){
_131=_130.ownerDocument;
}
_133=TMFocusUtils.getFirstTabStop(_131);
}
if(_133){
TMFocusUtils.focusElement(_133);
}
return _133;
};
TMFocusUtils.focusPreviousTabStop=function(_134,_135,_136){
var _137=TMFocusUtils.getPreviousTabStop(_134,_135,_136);
if(!_137){
if(!_135){
_135=_134.ownerDocument;
}
_137=TMFocusUtils.getLastTabStop(_135);
}
if(_137){
TMFocusUtils.focusElement(_137);
}
return _137;
};
TMFocusUtils.getFirstTabStop=function(_138,_139){
var _13a=null;
var _13b=TMFocusUtils.getIfTabStop;
if(!_139){
_13a=_13b(_138);
}
if((_13a==null)&&_138.getElementsByTagName){
var _13c=_138.getElementsByTagName("*");
var _13d=_13c.length;
for(var i=0;i<_13d&&!_13a;i++){
_13a=_13b(_13c[i]);
}
}
return _13a;
};
TMFocusUtils.getLastTabStop=function(_13f,_140){
var _141=null;
var _142=TMFocusUtils.getIfTabStop;
if(_13f.getElementsByTagName){
var _143=_13f.getElementsByTagName("*");
for(var i=_143.length-1;i>=0&&!_141;i--){
_141=_142(_143[i]);
}
}
if(!_141&&!_140){
_141=_142(_13f);
}
return _141;
};
TMFocusUtils.getNextTabStop=function(el,_146,_147){
var _148;
if(!_147){
_148=TMFocusUtils.getFirstTabStop(el,true);
}
while(!_148&&el&&(el!=_146)){
if(el.nextSibling){
if(el=el.nextSibling){
_148=TMFocusUtils.getFirstTabStop(el);
}
}else{
el=el.parentNode;
}
}
return _148;
};
TMFocusUtils.getPreviousTabStop=function(el,_14a){
var _14b;
while(!_14b&&el&&(el!=_14a)){
if(el.previousSibling){
if(el=el.previousSibling){
_14b=TMFocusUtils.getLastTabStop(el);
}
}else{
if(el=el.parentNode){
_14b=TMFocusUtils.getIfTabStop(el);
}
}
}
return _14b;
};
TMFocusUtils.getIfTabStop=function(el){
var _14d=null;
if(el&&TMFocusUtils.isTabStop(el)){
_14d=el;
}
return _14d;
};
TMFocusUtils.isTabStop=function(el){
return (TMFocusUtils.isFocusable(el)&&(el.tabIndex>-1));
};
TMFocusUtils.isFocusable=function(el){
if((el==null)||(el.nodeType!=1)){
return false;
}
if(el.disabled){
return false;
}
var _150=el.tabIndex;
if(_150<-1){
return false;
}
if(!TMFocusUtils._isConnectedAndVisible(el)){
return false;
}
switch(el.nodeName.toLowerCase()){
case "a":
if(!el.href){
return false;
}
case "input":
if(el.type=="hidden"&&el.isContentEditable!=true){
return false;
}
case "area":
case "body":
case "button":
case "frame":
case "iframe":
case "isindex":
case "object":
case "select":
case "textarea":
return true;
default:
if((_150==-1)||(_150>=1)){
return true;
}
if(_150==0){
return (el.getAttribute("tabIndex",2)==0);
}
return false;
}
};
TMFocusUtils._isConnectedAndVisible=function(el){
var _152=TMAgent.AGENT;
var _153=_152.getDomDocument().documentElement;
while(el!=null){
if(el.nodeType!=1){
return false;
}
var _154=_152.getComputedStyle(el);
if(_154.display=="none"){
if(el.style.display=="none"){
return false;
}
}
if(_154.visibility=="hidden"){
return false;
}
if(el==_153){
return true;
}
el=el.parentNode;
}
return false;
};
TMFocusUtils._focusElementDelayed=function(_155){
var page=TMPage.PAGE;
var _157=TMFocusUtils._delayFocusTimerId;
if(_157){
page.cancelTimer(_157);
}
TMFocusUtils._delayFocusTimerId=page.scheduleTimer(null,TMFocusUtils._focusElementDelayedCallback,_155,250);
};
TMFocusUtils._focusElementDelayedCallback=function(_158){
TMFocusUtils._delayFocusTimerId=null;
TMFocusUtils._focusElementImpl(_158);
};
TMFocusUtils._focusElementImpl=function(_159){
try{
_159.focus();
}
catch(e){
}
};
var TMCollections=new Object();
TMCollections.EMPTY_ARRAY=new Array();
TMCollections.isArray=function(_15a){
if(_15a){
if(typeof _15a=="object"){
var _15b=_15a["slice"];
if(_15b){
var _15c=_15a["length"];
if(_15c!=null){
return true;
}
}
}
}
return false;
};
TMCollections.clear=function(_15d){
if(!_15d){
return;
}
for(var i in _15d){
delete _15d[i];
}
};
TMCollections.isEmpty=function(_15f){
var _160=true;
for(var k in _15f){
_160=false;
break;
}
return _160;
};
TMCollections.clearArray=function(_162){
_162.length=0;
};
TMCollections.cloneArray=function(_163){
if(!_163){
return null;
}
var _164=new Array(_163.length);
return TMCollections.copyInto(_164,_163);
};
TMCollections.copyInto=function(_165,_166,_167){
if(_165&&_166&&(_165!==_166)){
for(var k in _166){
var _169;
if(_167){
_169=_167(k);
}else{
_169=k;
}
try{
_165[_169]=_166[k];
}
catch(e){
}
}
}
return _165;
};
TMCollections.copyProperties=function(_16a,_16b,_16c,_16d){
if(!_16a||!_16b||!_16c||(_16a===_16b)){
return;
}
var _16e=_16c.length;
for(var i=0;i<_16e;i++){
var _170=_16c[i];
var _171=_16b[_170];
if(_171){
var _172;
if(_16d){
_172=_16d(_170);
}else{
_172=_170;
}
try{
_16a[_172]=_171;
}
catch(e){
}
}
}
return _16a;
};
TMCollections.removeAll=function(_173,_174,_175){
if(_175){
if(_175!==_173){
_175.clear();
}
}else{
_175=new Object();
}
if(!_173){
return _175;
}
TMCollections.copyInto(_175,_173);
if(_174){
for(var k in _174){
delete _175[k];
}
}
return _175;
};
TMCollections.union=function(_177,_178,_179){
if((_177==null)||(_178==null)){
var _17a=(_177==null)?_178:_177;
if(_179){
TMCollections.clear(_179);
TMCollections.copyInto(_179,_17a);
}
return _17a;
}
if(!_179){
_179=new Object();
}else{
if((_179!==_177)&&(_179!==_178)){
TMCollections.clear(_179);
}
}
TMCollections.copyInto(_179,_177);
TMCollections.copyInto(_179,_178);
return _179;
};
TMCollections.getKeyOf=function(_17b,_17c){
if(_17b){
for(var k in _17b){
if(_17b[k]===_17c){
return k;
}
}
}
};
TMCollections.removeValue=function(_17e,_17f){
var key=TMCollections.getKeyOf(_17e,_17f);
if(key){
delete _17e[key];
}
return key;
};
TMCollections.removeArrayValue=function(_181,_182){
if(_181){
var _183=_181.length;
for(var i=0;i<_183;i++){
if(_181[i]==_182){
_181.splice(i,1);
return i;
}
}
}
return -1;
};
TMCollections.removeArrayKey=function(_185,key){
var _187=parseInt(key);
if(isNaN(_187)){
delete _185[key];
}else{
_185.splice(_187,1);
}
};
TMCollections.addArrayKey=function(_188,key,_18a){
var _18b=parseInt(key);
if(isNaN(_18b)){
_188[key]=_18a;
}else{
_188.splice(_18b,0,_18a);
}
};
TMCollections.indexOf=function(_18c,_18d){
if(!_18c){
return -1;
}
var _18e=-1;
var _18f=_18c.length;
for(var i=0;i<_18f;i++){
if(_18c[i]==_18d){
_18e=i;
break;
}
}
return _18e;
};
var TMDhtmlInputChooseBindingUtils=new Object();
TMDhtmlInputChooseBindingUtils.registerBinding=function(_191,_192,_193){
var list=this._getList();
if((list[_192]==null)||(_191)){
list[_192]=_193;
this._saveList(list);
}
return;
};
TMDhtmlInputChooseBindingUtils.returnToInputComponent=function(_195,_196){
var _197=this.getInputComponent(_195.getClientId());
if(_197!=null){
_197.getPeer().handleReturnFromChooseComponent(_197,_196);
}
};
TMDhtmlInputChooseBindingUtils.updateChooseComponentProperty=function(_198,_199,_19a,_19b){
if(_199!=null){
var _19c=TMPage.PAGE.findComponent(_199);
if(_19c!=null){
var _19d=_198.getProperty(_19a);
var peer=_19c.getPeer();
peer.handleUpdateFromInputComponent(_19c,_19b,_19d);
}
}
};
TMDhtmlInputChooseBindingUtils.updateInputComponentProperty=function(_19f,_1a0,_1a1,_1a2){
var _1a3=this.getInputComponent(_19f.getClientId());
if(_1a3!=null){
if(_1a2===undefined){
_1a2=_19f.getProperty(_1a0);
}
var peer=_1a3.getPeer();
peer.handleUpdateFromChooseComponent(_1a3,_1a1,_1a2);
}
};
TMDhtmlInputChooseBindingUtils.getInputComponent=function(_1a5){
var list=this._getList();
if(list==null){
return null;
}
var _1a7=list[_1a5];
if(_1a7!=null){
return TMPage.PAGE.findComponent(_1a7);
}
return null;
};
TMDhtmlInputChooseBindingUtils._getList=function(){
var page=TMPage.PAGE;
var list=page.getPageProperty(TMDhtmlInputChooseBindingUtils._PROPERTY_NAME);
if(list==null){
list=new Object();
}
return list;
};
TMDhtmlInputChooseBindingUtils._saveList=function(list){
var page=TMPage.PAGE;
page.setPageProperty(TMDhtmlInputChooseBindingUtils._PROPERTY_NAME,list);
};
TMDhtmlInputChooseBindingUtils._PROPERTY_NAME="TMDhtmlInputChooseBindingUtils.binding";
function TMObject(){
this.Init();
}
TMObject.superclass=null;
TMObject._GET_FUNCTION_NAME_REGEXP=/function\s+([\S^]+)\s*\(/;
TMObject.prototype=new Object();
TMObject.prototype.constructor=TMObject;
TMObject.createSubclass=function(_1ac,_1ad,_1ae){
if(_1ad==undefined){
_1ad=TMObject;
}
var _1af=TMObject._tempSubclassConstructor;
_1af.prototype=_1ad.prototype;
_1ac.prototype=new _1af();
_1ac.prototype.constructor=_1ac;
_1ac.superclass=_1ad.prototype;
if(_1ae){
_1ac._typeName=_1ae;
}
};
TMObject._tempSubclassConstructor=function(){
};
TMObject.prototype.getClass=function(_1b0){
if(_1b0==undefined){
_1b0=this;
}else{
if(_1b0==null){
return null;
}
}
return _1b0["constructor"];
};
TMObject.prototype.toString=function(){
return this.toDebugString();
};
TMObject.prototype.toDebugString=function(){
return this.getTypeName()+" Object";
};
TMObject.getTypeName=function(_1b1){
var _1b2=_1b1._typeName;
if(_1b2==null){
var _1b3=_1b1.toString();
var _1b4=TMObject._GET_FUNCTION_NAME_REGEXP.exec(_1b3);
_1b2=_1b4[1];
_1b1._typeName=_1b2;
}
return _1b2;
};
TMObject.prototype.getTypeName=function(){
return TMObject.getTypeName(this.constructor);
};
TMObject.prototype.Init=function(){
var _1b5=this.constructor;
if(!_1b5._initialized){
TMObject._initClasses(_1b5);
}
};
TMObject.prototype.equals=function(_1b6){
return this===_1b6;
};
TMObject.prototype.createCallback=function(func){
var _1b8=new Function("var f=arguments.callee; return f._func.apply(f._owner, arguments);");
_1b8._owner=this;
_1b8._func=func;
return _1b8;
};
TMObject.createInitializedObject=function(){
var _1b9=arguments.length;
var _1ba=new Object();
for(var i=0;i<_1b9;i++){
var _1bc=arguments[i];
i++;
_1ba[_1bc]=arguments[i];
}
return _1ba;
};
TMObject.ensureClassInitialization=function(_1bd){
if(!_1bd._initialized){
TMObject._initClasses(_1bd);
}
};
TMObject._initClasses=function(_1be){
_1be._initialized=true;
var _1bf=_1be.superclass;
if(_1bf){
var _1c0=_1bf.constructor;
if(_1c0&&!_1c0._initialized){
TMObject._initClasses(_1c0);
}
}
var _1c1=TMObject.getTypeName(_1be);
try{
var _1c2=_1be.InitClass;
if(_1c2){
_1c2.call(_1be);
}
}
finally{
}
};
function TMDataFlavor(_1c3){
this.Init(_1c3);
}
TMObject.createSubclass(TMDataFlavor);
TMDataFlavor.getRowKeyDataFlavor=function(_1c4){
if(!_1c4||(_1c4.length==0)){
return TMDataFlavor._GENERIC_ROWDATA_FLAVOR;
}
var _1c5=TMDataFlavor._ROWDATA_FLAVOR_MAP[_1c4];
if(!_1c5){
_1c5=new TMDataFlavor("rowKey/"+_1c4);
_1c5._isRowKey=true;
TMDataFlavor._ROWDATA_FLAVOR_MAP[_1c4]=_1c5;
}
return _1c5;
};
TMDataFlavor.isRowKeyDataFlavor=function(_1c6){
return _1c6._isRowKey;
};
TMDataFlavor.getObjectFlavor=function(_1c7){
var _1c8=typeof _1c7;
if(_1c8===TMDataFlavor._OBJECT_STRING){
_1c8=(TMObject.prototype.isPrototypeOf(_1c7))?_1c7.getTypeName():TMAssert.getFunctionName(_1c7.constructor);
}
if(_1c8){
var _1c9=TMDataFlavor._OBJECT_FLAVOR_MAP[_1c8];
if(!_1c9){
_1c9=new TMDataFlavor(TMDataFlavor._JSOBJECT_PREFIX_STRING+_1c8);
TMDataFlavor._OBJECT_FLAVOR_MAP[_1c8]=_1c9;
}
return _1c9;
}else{
return null;
}
};
TMDataFlavor.prototype.getStringForm=function(){
return this._stringForm;
};
TMDataFlavor.prototype.equals=function(_1ca){
return (this===_1ca)||(this._stringForm==_1ca._stringForm);
};
TMDataFlavor.prototype.Init=function(_1cb){
TMDataFlavor.superclass.Init.call(this);
this._stringForm=_1cb;
this._isRowKey=false;
};
TMDataFlavor.prototype.toDebugString=function(){
return TMDataFlavor.superclass.toDebugString.call(this)+":"+this._stringForm;
};
TMDataFlavor._OBJECT_STRING="object";
TMDataFlavor._JSOBJECT_PREFIX_STRING="jsObject/";
TMDataFlavor._OBJECT_FLAVOR_MAP=new Object();
TMDataFlavor._ROWDATA_FLAVOR_MAP=new Object();
TMDataFlavor._GENERIC_ROWDATA_FLAVOR=new TMDataFlavor("rowKey/");
TMDataFlavor.STRING_FLAVOR=TMDataFlavor.getObjectFlavor("");
TMDataFlavor.OBJECT_FLAVOR=TMDataFlavor.getObjectFlavor(new Object());
TMDataFlavor.ANY_FLAVOR=new TMDataFlavor("*");
function TMTransferable(){
}
TMObject.createSubclass(TMTransferable);
TMTransferable.prototype.Init=function(){
TMTransferable.superclass.Init.call(this);
};
TMTransferable.prototype.getTransferData=function(_1cc){
return null;
};
TMTransferable.prototype.getTransferDataFlavors=function(){
return null;
};
TMTransferable.prototype.isDataFlavorSupported=function(_1cd){
return (this.getTransferData(_1cd)!=null);
};
function TMObjectTransferable(_1ce,_1cf,_1d0,_1d1){
this.Init(_1ce,_1cf,_1d0,_1d1);
}
TMObject.createSubclass(TMObjectTransferable,TMTransferable);
TMObjectTransferable.createSingleObjectTransferable=function(data,_1d3){
var _1d4;
if(_1d3){
_1d4=[_1d3];
}
return new TMObjectTransferable([[data]],_1d4);
};
TMObjectTransferable.createMultiObjectTransferable=function(_1d5,_1d6){
return new TMObjectTransferable([_1d5],[_1d6]);
};
TMObjectTransferable.prototype.Init=function(_1d7,_1d8,_1d9,_1da){
TMObjectTransferable.superclass.Init.call(this);
this._baseObjects=_1d9;
this._converters=_1da;
this._dataFlavors=TMObjectTransferable._createDataFlavors(_1d7,_1d8);
if(_1d7==null){
_1d7=new Array();
}
this._objectsForFlavors=_1d7;
};
TMObjectTransferable.prototype.getTransferData=function(_1db){
var _1dc=this._dataFlavors[_1db.getStringForm()];
if((_1dc==null)&&(_1db===TMDataFlavor.ANY_FLAVOR)){
_1dc=0;
}
if(_1dc!=null){
var _1dd=this._objectsForFlavors[_1dc];
if(_1dd==null){
var _1de=this._baseObjects;
if(_1de!=null){
var _1df=this._converters[_1dc];
var _1e0=_1de.length;
_1dd=new Array(_1e0);
for(var i=0;i<_1e0;i++){
_1dd[i]=_1df(_1de[i]);
}
this._objectsForFlavors[_1dc]=_1dd;
}
}
return _1dd;
}else{
return undefined;
}
};
TMObjectTransferable.prototype.getTransferDataFlavors=function(){
return this._dataFlavors;
};
TMObjectTransferable.prototype.isDataFlavorSupported=function(_1e2){
if(_1e2===TMDataFlavor.ANY_FLAVOR){
return true;
}else{
return _1e2.getStringForm() in this._dataFlavors;
}
};
TMObjectTransferable.prototype.toDebugString=function(){
return TMObjectTransferable.superclass.toDebugString.call(this)+"["+" dataObjects:"+this._objectsForFlavors+" dataFlavors:"+this._dataFlavors+"]";
};
TMObjectTransferable._createDataFlavors=function(_1e3,_1e4){
var _1e5=_1e3.length;
var _1e6=new Array(_1e5);
for(var i=0;i<_1e5;i++){
var _1e8=_1e3[i];
var _1e9=(_1e4)?_1e4[i]:null;
if(!_1e9){
_1e9=TMDataFlavor.getObjectFlavor(_1e8[0]);
}
_1e6[i]=_1e9;
_1e6[_1e9.getStringForm()]=i;
}
return _1e6;
};
function TMKeyStroke(_1ea,_1eb,_1ec){
this.Init(_1ea,_1eb,_1ec);
}
TMObject.createSubclass(TMKeyStroke);
TMKeyStroke.SHIFT_MASK=1<<0;
TMKeyStroke.CTRL_MASK=1<<1;
TMKeyStroke.META_MASK=1<<2;
TMKeyStroke.ALT_MASK=1<<3;
TMKeyStroke.BACKSPACE_KEY=8;
TMKeyStroke.TAB_KEY=9;
TMKeyStroke.ALT_KEY=18;
TMKeyStroke.ARROWDOWN_KEY=40;
TMKeyStroke.ARROWUP_KEY=38;
TMKeyStroke.ARROWRIGHT_KEY=39;
TMKeyStroke.ARROWLEFT_KEY=37;
TMKeyStroke.ESC_KEY=27;
TMKeyStroke.ENTER_KEY=13;
TMKeyStroke.SPACE_KEY=32;
TMKeyStroke.PAGEUP_KEY=33;
TMKeyStroke.PAGEDOWN_KEY=34;
TMKeyStroke.END_KEY=35;
TMKeyStroke.HOME_KEY=36;
TMKeyStroke.INSERT_KEY=45;
TMKeyStroke.DELETE_KEY=46;
TMKeyStroke.A_KEY=65;
TMKeyStroke.C_KEY=67;
TMKeyStroke.D_KEY=68;
TMKeyStroke.G_KEY=71;
TMKeyStroke.M_KEY=77;
TMKeyStroke.V_KEY=86;
TMKeyStroke.W_KEY=87;
TMKeyStroke.X_KEY=88;
TMKeyStroke.F1_KEY=112;
TMKeyStroke.F2_KEY=113;
TMKeyStroke.F3_KEY=114;
TMKeyStroke.F4_KEY=115;
TMKeyStroke.F5_KEY=116;
TMKeyStroke.F6_KEY=117;
TMKeyStroke.F7_KEY=118;
TMKeyStroke.F8_KEY=119;
TMKeyStroke.F9_KEY=120;
TMKeyStroke.F10_KEY=121;
TMKeyStroke.F11_KEY=122;
TMKeyStroke.F12_KEY=123;
TMKeyStroke.InitClass=function(){
this._MODIFIER_STRINGS=new Array(16);
this._MODIFIER_DISPLAY_STRINGS=new Array(16);
this._CACHE=new Object();
var _1ed=["BACK_SPACE",TMKeyStroke.BACKSPACE_KEY,"TAB",TMKeyStroke.TAB_KEY,"DOWN",TMKeyStroke.ARROWDOWN_KEY,"UP",TMKeyStroke.ARROWUP_KEY,"RIGHT",TMKeyStroke.ARROWRIGHT_KEY,"LEFT",TMKeyStroke.ARROWLEFT_KEY,"ESCAPE",TMKeyStroke.ESC_KEY,"ENTER",TMKeyStroke.ENTER_KEY,"SPACE",TMKeyStroke.SPACE_KEY,"PAGE_UP",TMKeyStroke.PAGEUP_KEY,"PAGE_DOWN",TMKeyStroke.PAGEDOWN_KEY,"END",TMKeyStroke.END_KEY,"HOME",TMKeyStroke.HOME_KEY,"INSERT",TMKeyStroke.INSERT_KEY,"DELETE",TMKeyStroke.DELETE_KEY,"F1",TMKeyStroke.F1_KEY,"F2",TMKeyStroke.F2_KEY,"F3",TMKeyStroke.F3_KEY,"F4",TMKeyStroke.F4_KEY,"F5",TMKeyStroke.F5_KEY,"F6",TMKeyStroke.F6_KEY,"F7",TMKeyStroke.F7_KEY,"F8",TMKeyStroke.F8_KEY,"F9",TMKeyStroke.F9_KEY,"F10",TMKeyStroke.F10_KEY,"F11",TMKeyStroke.F11_KEY,"F12",TMKeyStroke.F12_KEY];
var _1ee=new Array();
for(var i=_1ed.length-1;i>=0;i--){
var _1f0=_1ed[i];
i--;
var _1f1=_1ed[i];
_1ee[_1f0]=_1f1;
_1ee[_1f1]=_1f0;
}
this._KEYCODE_MAPPINGS=_1ee;
this._SHIFT_MODIFIER="shift";
this._CTRL_MODIFIER="ctrl";
this._META_MODIFIER="meta";
this._ALT_MODIFIER="alt";
var _1f2=new Object();
_1f2[this._SHIFT_MODIFIER]=this.SHIFT_MASK;
_1f2[this._CTRL_MODIFIER]=this.CTRL_MASK;
_1f2[this._META_MODIFIER]=this.META_MASK;
_1f2[this._ALT_MODIFIER]=this.ALT_MASK;
this._MODIFIER_NAME_TO_FLAG=_1f2;
};
TMKeyStroke.prototype.Init=function(_1f3,_1f4,_1f5){
TMKeyStroke.superclass.Init.call(this);
this._keyCode=_1f3;
this._modifiers=_1f4;
this._stringForm=_1f5;
};
TMKeyStroke.prototype.getKeyCode=function(){
return this._keyCode;
};
TMKeyStroke.prototype.getModifiers=function(){
return this._modifiers;
};
TMKeyStroke._getModifierString=function(_1f6){
var _1f7=TMKeyStroke._MODIFIER_STRINGS;
var _1f8=_1f7[_1f6];
if(_1f8==null){
var _1f9=new Array();
if((_1f6&TMKeyStroke.SHIFT_MASK)!=0){
_1f9.push(TMKeyStroke._SHIFT_MODIFIER);
}
if((_1f6&TMKeyStroke.CTRL_MASK)!=0){
_1f9.push(TMKeyStroke._CTRL_MODIFIER);
}
if((_1f6&TMKeyStroke.META_MASK)!=0){
_1f9.push(TMKeyStroke._META_MODIFIER);
}
if((_1f6&TMKeyStroke.ALT_MASK)!=0){
_1f9.push(TMKeyStroke._ALT_MODIFIER);
}
_1f8=_1f9.join(" ");
_1f7[_1f6]=_1f8;
}
return _1f8;
};
TMKeyStroke._getModifierDisplayString=function(_1fa){
var _1fb=TMKeyStroke._MODIFIER_DISPLAY_STRINGS;
var _1fc=_1fb[_1fa];
if(_1fc==null){
var _1fd=TMAgent.AGENT;
var _1fe=new Array(4);
if((_1fa&(TMKeyStroke.SHIFT_MASK))!=0){
_1fe.push(_1fd.getModifierDisplayName(TMKeyStroke.SHIFT_MASK));
}
if((_1fa&(TMKeyStroke.CTRL_MASK))!=0){
_1fe.push(_1fd.getModifierDisplayName(TMKeyStroke.CTRL_MASK));
}
if((_1fa&(TMKeyStroke.META_MASK))!=0){
_1fe.push(_1fd.getModifierDisplayName(TMKeyStroke.META_MASK));
}
if((_1fa&(TMKeyStroke.ALT_MASK))!=0){
_1fe.push(_1fd.getModifierDisplayName(TMKeyStroke.ALT_MASK));
}
_1fc=_1fe.join(" ");
_1fb[_1fa]=_1fc;
}
return _1fc;
};
TMKeyStroke._getStringForm=function(_1ff,_200){
var _201=TMKeyStroke._getModifierString(_200);
var _202=TMKeyStroke._getNameFromKeyCode(_1ff);
if(_201.length==0){
return _202;
}else{
return _201+" "+_202;
}
};
TMKeyStroke.prototype.toMarshalledString=function(){
return this._stringForm;
};
TMKeyStroke.getKeyStroke=function(_203,_204){
TMObject.ensureClassInitialization(TMKeyStroke);
var _205=TMKeyStroke._getStringForm(_203,_204);
var _206=TMKeyStroke._CACHE;
var _207=_206[_205];
if(_207==null){
_207=new TMKeyStroke(_203,_204,_205);
_206[_205]=_207;
}
return _207;
};
TMKeyStroke.getKeyStrokeFromMarshalledString=function(_208){
TMObject.ensureClassInitialization(TMKeyStroke);
var _209=TMKeyStroke._CACHE;
var _20a=_209[_208];
if(_20a==null){
var _20b=_208.split(" ");
var _20c=_20b.length-1;
var _20d=_20b[_20c];
var _20e=TMKeyStroke._KEYCODE_MAPPINGS[_20d];
if(_20e===undefined){
_20e=_20d.charCodeAt(0);
}
var _20f=TMKeyStroke._MODIFIER_NAME_TO_FLAG;
var _210=0;
var _211=false;
for(var i=0;i<_20c;i++){
var _213=_20f[_20b[i]];
if(_213==undefined){
_213=0;
}
if(_213<=_210){
_211=true;
}
_210|=_213;
}
if(_211){
_20a=TMKeyStroke.getKeyStroke(_20e,_210);
}else{
_20a=new TMKeyStroke(_20e,_210,_208);
_209[_208]=_20a;
}
}
return _20a;
};
TMKeyStroke._getNameFromKeyCode=function(_214){
var _215=TMKeyStroke._KEYCODE_MAPPINGS[_214];
if(_215==null){
_215=String.fromCharCode(_214);
}
return _215;
};
TMKeyStroke.prototype.toString=function(){
return TMKeyStroke.superclass.toString.call(this)+" "+this._stringForm;
};
function TMBaseEvent(){
}
TMObject.createSubclass(TMBaseEvent);
TMBaseEvent.CAPTURING_PHASE=0;
TMBaseEvent.AT_TARGET_PHASE=1;
TMBaseEvent.BUBBLING_PHASE=2;
TMBaseEvent.prototype.getType=function(){
return this._type;
};
TMBaseEvent.prototype.getSource=function(){
return this._source;
};
TMBaseEvent.prototype.getCurrentTarget=function(){
return this.getSource();
};
TMBaseEvent.prototype.getEventPhase=function(){
return TMBaseEvent.AT_TARGET;
};
TMBaseEvent.prototype.getDoesBubbles=function(){
return false;
};
TMBaseEvent.prototype.propagatesToServer=function(){
return false;
};
TMBaseEvent.prototype.isValidationNeeded=function(){
return false;
};
TMBaseEvent.prototype.isImmediate=function(){
return false;
};
TMBaseEvent.prototype.getRoot=function(){
return (this._root);
};
TMBaseEvent.prototype.setRoot=function(root){
this._root=root;
};
TMBaseEvent.prototype.isCancelable=function(){
return true;
};
TMBaseEvent.prototype.isCanceled=function(){
return (this._canceled==true);
};
TMBaseEvent.prototype.isPartial=function(){
return (this._partial==true);
};
TMBaseEvent.prototype.setPartial=function(_217){
this._partial=_217;
};
TMBaseEvent.prototype.cancel=function(){
if(this.isCancelable()){
this._canceled=true;
}
};
TMBaseEvent.prototype.getProperties=function(){
var _218={};
this.AddMarshalledProperties(_218);
_218.type=this._type;
return _218;
};
TMBaseEvent.prototype.AddMarshalledProperties=function(_219){
};
TMBaseEvent.prototype.Init=function(_21a,type){
TMBaseEvent.superclass.Init.call(this);
this._source=_21a;
this._type=type;
this._canceled=false;
};
TMBaseEvent.prototype.toDebugString=function(){
var _21c=this.getTypeName()+" [type="+this.getType()+", source="+this.getSource();
if(this.isCanceled()){
_21c+=", canceled";
}
return _21c+"]";
};
function TMPhasedEvent(_21d,type){
}
TMObject.createSubclass(TMPhasedEvent,TMBaseEvent);
TMPhasedEvent.prototype.setCurrentTarget=function(_21f){
this._currTarget=_21f;
};
TMPhasedEvent.prototype.getCurrentTarget=function(){
return this._currTarget;
};
TMPhasedEvent.prototype.nextEventPhase=function(){
var _220=this.getEventPhase();
this._eventPhase=(_220==TMBaseEvent.CAPTURING_PHASE)?TMBaseEvent.AT_TARGET_PHASE:(_220==TMBaseEvent.AT_TARGET_PHASE)?TMBaseEvent.BUBBLING_PHASE:undefined;
};
TMPhasedEvent.prototype.getEventPhase=function(){
return this._eventPhase;
};
TMPhasedEvent.prototype.getDoesBubbles=function(){
return true;
};
TMPhasedEvent.prototype.isCancelable=function(){
return true;
};
TMPhasedEvent.prototype.Init=function(_221,type){
TMPhasedEvent.superclass.Init.call(this,_221,type);
this._currTarget=null;
this._eventPhase=TMBaseEvent.CAPTURING_PHASE;
};
TMPhasedEvent.prototype.toDebugString=function(){
var _223=TMPhasedEvent.superclass.toDebugString.call(this);
var _224=this.getEventPhase();
var _225=(_224==TMBaseEvent.CAPTURING_PHASE)?"CAPTURING_PHASE":(_224==TMBaseEvent.AT_TARGET_PHASE)?"AT_TARGET_PHASE":(_224==TMBaseEvent.BUBBLING_PHASE)?"BUBBLING_PHASE":"<invalid phase>";
return _223.substring(0,_223.length-1)+", phase="+_225+"]";
};
function TMComponentEvent(_226,type,_228){
if(arguments.length){
this.Init(_226,type,_228);
}
}
TMComponentEvent.FOCUS_EVENT_TYPE="focus";
TMComponentEvent.BLUR_EVENT_TYPE="blur";
TMObject.createSubclass(TMComponentEvent,TMPhasedEvent);
TMComponentEvent.prototype.Init=function(_229,type,_22b){
TMComponentEvent.superclass.Init.call(this,_229,type);
this._listener=_22b;
};
TMComponentEvent.prototype.getListener=function(){
return this._listener;
};
TMComponentEvent.prototype.queue=function(_22c){
if(_22c!==undefined){
this.setPartial(_22c);
}
this.getSource().queueEvent(this);
};
TMObject.createSubclass(TMContentFetchEvent,TMComponentEvent);
function TMContentFetchEvent(_22d,type,_22f){
this.Init(_22d,type,_22f);
}
TMContentFetchEvent.FETCH_EVENT_TYPE="fetch";
TMContentFetchEvent.CLIENT_FETCH_EVENT_TYPE="clientFetch";
TMContentFetchEvent.LOADED_EVENT_TYPE="contentLoaded";
TMContentFetchEvent.prototype.Init=function(_230,type,_232){
this._params=_232;
TMContentFetchEvent.superclass.Init.call(this,_230,type);
this.setPartial(true);
this.setRoot(_230);
};
TMContentFetchEvent.prototype.propagatesToServer=function(){
return (this.getType()==TMContentFetchEvent.FETCH_EVENT_TYPE);
};
TMContentFetchEvent.prototype.AddMarshalledProperties=function(_233){
TMContentFetchEvent.superclass.AddMarshalledProperties.call(this,_233);
if(this._params){
for(var i in this._params){
_233[i]=this._params[i];
}
}
};
function TMDialogEvent(_235,_236){
this.Init(_235,_236);
}
TMObject.createSubclass(TMDialogEvent,TMComponentEvent);
TMDialogEvent.EVENT_TYPE="dialog";
TMDialogEvent.OUTCOME_OK="ok";
TMDialogEvent.OUTCOME_YES="yes";
TMDialogEvent.OUTCOME_NO="no";
TMDialogEvent.OUTCOME_CANCEL="cancel";
TMDialogEvent.prototype.Init=function(_237,_238){
TMDialogEvent.superclass.Init.call(this,_237,TMDialogEvent.EVENT_TYPE);
this._outcome=_238;
this.setPartial(true);
};
TMDialogEvent.prototype.getOutcome=function(){
return this._outcome;
};
TMDialogEvent.prototype.AddMarshalledProperties=function(_239){
_239.outcome=this._outcome;
};
TMDialogEvent.prototype.propagatesToServer=function(){
return (this.getOutcome()!=TMDialogEvent.OUTCOME_CANCEL);
};
TMDialogEvent.prototype.isValidationNeeded=TMDialogEvent.prototype.propagatesToServer;
function TMPopupClosedEvent(_23a){
this.Init(_23a);
}
TMObject.createSubclass(TMPopupClosedEvent,TMComponentEvent);
TMPopupClosedEvent.POPUP_CLOSED_EVENT_TYPE="popupClosed";
TMPopupClosedEvent.prototype.Init=function(_23b){
TMPopupClosedEvent.superclass.Init.call(this,_23b,TMPopupClosedEvent.POPUP_CLOSED_EVENT_TYPE);
};
TMPopupClosedEvent.prototype.isCancelable=function(){
return false;
};
function TMPopupOpeningEvent(_23c){
this.Init(_23c);
}
TMObject.createSubclass(TMPopupOpeningEvent,TMComponentEvent);
TMPopupOpeningEvent.POPUP_OPENING_EVENT_TYPE="popupOpening";
TMPopupOpeningEvent.prototype.Init=function(_23d){
TMPopupOpeningEvent.superclass.Init.call(this,_23d,TMPopupOpeningEvent.POPUP_OPENING_EVENT_TYPE);
};
function TMPopupOpenedEvent(_23e){
this.Init(_23e);
}
TMObject.createSubclass(TMPopupOpenedEvent,TMComponentEvent);
TMPopupOpenedEvent.POPUP_OPENED_EVENT_TYPE="popupOpened";
TMPopupOpenedEvent.prototype.Init=function(_23f){
TMPopupOpenedEvent.superclass.Init.call(this,_23f,TMPopupOpenedEvent.POPUP_OPENED_EVENT_TYPE);
};
TMPopupOpenedEvent.prototype.isCancelable=function(){
return false;
};
function TMUIInputEvent(){
}
TMObject.createSubclass(TMUIInputEvent,TMComponentEvent);
TMUIInputEvent.CLICK_EVENT_TYPE="click";
TMUIInputEvent.DOUBLE_CLICK_EVENT_TYPE="dblClick";
TMUIInputEvent.MOUSE_DOWN_EVENT_TYPE="mouseDown";
TMUIInputEvent.MOUSE_UP_EVENT_TYPE="mouseUp";
TMUIInputEvent.MOUSE_MOVE_EVENT_TYPE="mouseMove";
TMUIInputEvent.MOUSE_IN_EVENT_TYPE="mouseOver";
TMUIInputEvent.MOUSE_OUT_EVENT_TYPE="mouseOut";
TMUIInputEvent.KEY_DOWN_EVENT_TYPE="keyDown";
TMUIInputEvent.KEY_UP_EVENT_TYPE="keyUp";
TMUIInputEvent.KEY_PRESS_EVENT_TYPE="keyPress";
TMUIInputEvent.FOCUS_EVENT_TYPE="focus";
TMUIInputEvent.BLUR_EVENT_TYPE="blur";
TMUIInputEvent.CONTEXT_MENU_EVENT_TYPE="contextMenu";
TMUIInputEvent.LEFT_BUTTON_FLAG=1;
TMUIInputEvent.RIGHT_BUTTON_FLAG=2;
TMUIInputEvent.MIDDLE_BUTTON_FLAG=4;
TMUIInputEvent.prototype.getOffsetX=function(){
};
TMUIInputEvent.prototype.getOffsetY=function(){
};
TMUIInputEvent.prototype.getClientX=function(){
};
TMUIInputEvent.prototype.getClientY=function(){
};
TMUIInputEvent.prototype.getPageX=function(){
};
TMUIInputEvent.prototype.getPageY=function(){
};
TMUIInputEvent.prototype.getScreenX=function(){
};
TMUIInputEvent.prototype.getScreenY=function(){
};
TMUIInputEvent.prototype.getButtons=function(){
};
TMUIInputEvent.prototype.isLeftButtonPressed=function(){
return (this.getButtons()&TMUIInputEvent.LEFT_BUTTON_FLAG)!=0;
};
TMUIInputEvent.prototype.isRightButtonPressed=function(){
return (this.getButtons()&TMUIInputEvent.RIGHT_BUTTON_FLAG)!=0;
};
TMUIInputEvent.prototype.getKeyCode=function(){
};
function TMDomUIInputEvent(_240,type,_242){
if(arguments.length){
this.Init(_240,type,_242);
}
}
TMObject.createSubclass(TMDomUIInputEvent,TMUIInputEvent);
TMDomUIInputEvent.prototype.getDoesBubbles=function(){
return (this.getType()!=TMUIInputEvent.MOUSE_MOVE_EVENT_TYPE);
};
TMDomUIInputEvent.prototype.getOffsetX=function(){
return this.Event.clientX;
};
TMDomUIInputEvent.prototype.getOffsetY=function(){
return this.Event.clientY;
};
TMDomUIInputEvent.prototype.getClientX=function(){
return this.Event.clientX;
};
TMDomUIInputEvent.prototype.getClientY=function(){
return this.Event.clientY;
};
TMDomUIInputEvent.prototype.getPageX=function(){
return this.Event.clientX;
};
TMDomUIInputEvent.prototype.getPageY=function(){
return this.Event.clientY;
};
TMDomUIInputEvent.prototype.getScreenX=function(){
return this.Event.screenX;
};
TMDomUIInputEvent.prototype.getScreenY=function(){
return this.Event.screenY;
};
TMDomUIInputEvent.prototype.getButtons=function(){
var _243=this.Event.button;
switch(_243){
case 0:
return TMUIInputEvent.LEFT_BUTTON_FLAG;
case 1:
return TMUIInputEvent.MIDDLE_BUTTON_FLAG;
case 2:
return TMUIInputEvent.RIGHT_BUTTON_FLAG;
default:
return 0;
}
};
TMDomUIInputEvent.prototype.getKeyCode=function(){
return this.Event.keyCode;
};
TMDomUIInputEvent.prototype.getNativeEvent=function(){
return this.Event;
};
TMDomUIInputEvent.prototype.getNativeEventTarget=function(){
var _244=this.Event;
if(_244){
return TMAgent.AGENT.getEventTarget(_244);
}else{
return null;
}
};
TMDomUIInputEvent.prototype.clone=function(){
var _245=TMAgent.AGENT.cloneEvent(this.Event);
return new this.constructor(this.getSource(),this.getType(),_245);
};
TMDomUIInputEvent.prototype.cancel=function(){
TMDomUIInputEvent.superclass.cancel.call(this);
TMAgent.AGENT.preventDefault(this.Event);
};
TMDomUIInputEvent.prototype.Init=function(_246,type,_248){
TMDomUIInputEvent.superclass.Init.call(this,_246,type);
this.Event=_248;
};
function TMGeckoUIInputEvent(_249,type,_24b){
this.Init(_249,type,_24b);
}
TMObject.createSubclass(TMGeckoUIInputEvent,TMDomUIInputEvent);
TMGeckoUIInputEvent.prototype.getOffsetX=function(){
return this.Event.clientX-TMAgent.AGENT.getElementLeft(this.Event.target);
};
TMGeckoUIInputEvent.prototype.getOffsetY=function(){
return this.Event.clientY-TMAgent.AGENT.getElementTop(this.Event.target);
};
TMGeckoUIInputEvent.prototype.getPageX=function(){
return this.Event.pageX;
};
TMGeckoUIInputEvent.prototype.getPageY=function(){
return this.Event.pageY;
};
TMGeckoUIInputEvent.prototype.getKeyCode=function(){
var _24c=this.Event.keyCode;
return (_24c)?_24c:this.Event.charCode;
};
function TMIEUIInputEvent(_24d,type,_24f){
this.Init(_24d,type,_24f);
}
TMObject.createSubclass(TMIEUIInputEvent,TMDomUIInputEvent);
TMIEUIInputEvent.prototype.getOffsetX=function(){
return this.Event.offsetX;
};
TMIEUIInputEvent.prototype.getOffsetY=function(){
return this.Event.offsetY;
};
TMIEUIInputEvent.prototype.getPageX=function(){
var _250=this.Event;
var _251=_250.srcElement.ownerDocument;
return _251.documentElement.scrollLeft+_250.clientX;
};
TMIEUIInputEvent.prototype.getPageY=function(){
var _252=this.Event;
var _253=_252.srcElement.ownerDocument;
return _253.documentElement.scrollTop+_252.clientY;
};
TMIEUIInputEvent.prototype.getButtons=function(){
return this.Event.button;
};
TMIEUIInputEvent.prototype.isLeftButtonPressed=function(){
if(this.getType()==TMUIInputEvent.CLICK_EVENT_TYPE){
return true;
}else{
return TMIEUIInputEvent.superclass.isLeftButtonPressed.call(this);
}
};
function TMActionEvent(_254){
this.Init(_254);
}
TMObject.createSubclass(TMActionEvent,TMComponentEvent);
TMActionEvent.ACTION_EVENT_TYPE="action";
TMActionEvent.prototype.Init=function(_255){
TMActionEvent.superclass.Init.call(this,_255,TMActionEvent.ACTION_EVENT_TYPE);
};
TMActionEvent.prototype.propagatesToServer=function(){
return false;
};
TMActionEvent.prototype.isValidationNeeded=function(){
return true;
};
TMActionEvent.prototype.isImmediate=function(){
return this.getSource().getImmediate();
};
TMActionEvent.queue=function(_256,_257){
new TMActionEvent(_256).queue(_257);
};
function TMCustomEvent(_258,type,_25a,_25b,_25c){
if(arguments.length){
this.Init(_258,type,_25a,_25b,_25c);
}
}
TMObject.createSubclass(TMCustomEvent,TMComponentEvent);
TMCustomEvent.prototype.Init=function(_25d,type,_25f,_260,_261){
if(_260===undefined){
_260=true;
}
TMCustomEvent.superclass.Init.call(this,_25d,type,_261);
this.setPartial(true);
this._params=_25f;
this._immediate=_260;
this.setRoot(_25d);
};
TMCustomEvent.prototype.GetParams=function(){
return this._params;
};
TMCustomEvent.prototype.propagatesToServer=function(){
return false;
};
TMCustomEvent.prototype.isImmediate=function(){
return this._immediate;
};
TMCustomEvent.prototype.AddMarshalledProperties=function(_262){
_262["_custom"]=true;
if(this._params){
TMCollections.copyInto(_262,this._params);
}
if(this.isImmediate()){
_262.immediate=true;
}
};
TMCustomEvent.prototype.toDebugString=function(){
var _263=TMCustomEvent.superclass.toDebugString.call(this);
return _263.substring(0,_263.length-1)+TMUIUtils.getPropertiesAsString(this._params,undefined,false,false)+"]";
};
TMCustomEvent.queue=function(_264,type,_266,_267){
new TMCustomEvent(_264,type,_266,_267).queue();
};
function TMDropEvent(_268,_269,_26a,_26b,_26c,_26d,_26e,_26f,_270,_271){
if(arguments.length){
if(!_26e){
_26e=TMDropEvent.DROP_ORIENTATION_ON;
}
if(_26f===undefined){
_26f=null;
}
if(_270===undefined){
_270=-1;
}
this.Init(_268,_269,_26a,_26b,_26c,_26d,_26e,_26f,_270,_271);
}
}
TMObject.createSubclass(TMDropEvent,TMCustomEvent);
TMDropEvent.DROP_EVENT_TYPE="drop";
TMDropEvent.DROP_ORIENTATION_ON="ON";
TMDropEvent.DROP_ORIENTATION_INSIDE="INSIDE";
TMDropEvent.DROP_ORIENTATION_BEFORE="BEFORE";
TMDropEvent.DROP_ORIENTATION_AFTER="AFTER";
TMDropEvent.prototype.Init=function(_272,_273,_274,_275,_276,_277,_278,_279,_27a,_27b){
var _27c=new Object();
_27c.dragSource=_273.getComponent().getClientId();
_27c.dropX=_276;
_27c.dropY=_277;
_27c.dropOrientation=_278;
_27c.dropSite=_279;
_27c.dropSiteIndex=_27a;
var _27d=null;
switch(_275){
case TMDnDContext.ACTION_COPY:
_27d="COPY";
break;
case TMDnDContext.ACTION_MOVE:
_27d="MOVE";
break;
case TMDnDContext.ACTION_LINK:
_27d="LINK";
break;
default:
throw new Error("Unknown drag action:"+_275);
}
_27c.proposedAction=_27d;
var _27e=_274.getTransferDataFlavors();
var _27f=_27e.length;
var _280=new Array(_27f*2);
var _281=0;
for(var _282=0;_282<_27f;_282++){
var _283=_27e[_282];
_280[_281]=_283.getStringForm();
_281++;
var data=_274.getTransferData(_283);
if((data.length==1)&&!TMDataFlavor.isRowKeyDataFlavor(_283)){
data=data[0];
}
_280[_281]=data;
_281++;
}
_27c.transferable=_280;
TMDropEvent.superclass.Init.call(this,_272,TMDropEvent.DROP_EVENT_TYPE,_27c,true,_27b);
};
function TMValueChangeEvent(_285,_286,_287,_288){
this.Init(_285,_286,_287,_288);
}
TMObject.createSubclass(TMValueChangeEvent,TMComponentEvent);
TMValueChangeEvent.VALUE_CHANGE_TYPE="valueChange";
TMValueChangeEvent.prototype.getOldValue=function(){
return this._oldValue;
};
TMValueChangeEvent.prototype.getNewValue=function(){
return this._newValue;
};
TMValueChangeEvent.prototype.isValidationNeeded=function(){
return this._autoSubmit==true;
};
TMValueChangeEvent.prototype.isImmediate=function(){
return this.getSource().getImmediate();
};
TMValueChangeEvent.prototype.toDebugString=function(){
var _289=TMValueChangeEvent.superclass.toDebugString.call(this);
return _289.substring(0,_289.length-1)+", oldValue="+this._oldValue+", newValue="+this._newValue+"]";
};
TMValueChangeEvent.prototype.Init=function(_28a,_28b,_28c,_28d){
TMValueChangeEvent.superclass.Init.call(this,_28a,TMValueChangeEvent.VALUE_CHANGE_TYPE);
this._oldValue=_28b;
this._newValue=_28c;
this._autoSubmit=_28d;
this.setRoot(_28a);
};
TMValueChangeEvent.prototype.propagatesToServer=function(){
return false;
};
TMValueChangeEvent.queue=function(_28e,_28f,_290,_291){
new TMValueChangeEvent(_28e,_28f,_290,_291).queue(true);
};
function TMPage(_292){
this.Init(_292);
}
TMPage.PAGE=null;
TMObject.createSubclass(TMPage);
TMPage._COMPONENT_TO_PEER_NAME={"CommandButton":"TMDhtmlButtonPeer","Dialog":"","InputDate":"TMDhtmlInputDatePeer","Popup":"TMDhtmlPopupPeer","ChooseDate":"TMDhtmlChooseDatePeer","GroupLayout":"TMDhtmlPanelGroupLayoutPeer","PanelSplitter":"TMDhtmlPanelSplitterPeer","PanelStretchLayout":"TMDhtmlPanelStretchLayoutPeer","ShowDetail":"TMDhtmlShowDetailPeer","ShowDetailHeader":"TMDhtmlShowDetailHeaderPeer","Table":"TMDhtmlTablePeer","TableColumn":"TMDhtmlTableColumnPeer","Menu":"TMDhtmlMenuPeer","NavigationPane":"TMDhtmlNavigationPanePeer","CommandMenuItem":"TMDhtmlCommandMenuItemPeer","CommandNavigationItem":"TMDhtmlCommandNavigationItemPeer","Form":"TMDhtmlFormPeer","Document":"TMDhtmlDocumentPeer"};
TMPage.DELIVER_EVENTS_PHASE="deliverEventsPhase";
TMPage.WAITING_FOR_USER_INPUT_PHASE="waitingForUserInputPhase";
TMPage.ACTIVE_COMPONENT_PROPERTY="activeComponent";
TMPage.SCREEN_READER_ACCESSIBILITY_MODE="screenReader";
TMPage.prototype.getPeer=function(_293){
var _294=_293.constructor;
var _295=_294._PEER_CONSTRUCTOR;
if(_295==null){
var _296=_293.getComponentType();
var _297=TMPage._COMPONENT_TO_PEER_NAME[_296];
if(!_297){
_295=TMUIPeer;
}else{
_295=window[_297];
}
_294._PEER_CONSTRUCTOR=_295;
}
var peer=_295._PEER;
if(peer==null){
peer=new _295(_293);
if(_295.STATELESS){
_295._PEER=peer;
}
}
return peer;
};
TMPage.prototype.Init=function(_299){
TMPage.superclass.Init.call(this);
this._window=_299;
this._document=_299.document;
_299.onunload=this.createCallback(this.Dispose);
_299.onbeforeunload=this.createCallback(this._onBeforeUnload);
_299.onresize=this.createCallback(this._handleResize);
var _29a=[];
_29a._nextTimerId=0;
_29a._freeList=[];
this._clientIdToComponentMap=new Object();
this._eventQueue=new Array();
this._resizeNotifyTree=new Object();
this._resizeNotifyMap=new Object();
this._keyStrokeToCallbackMap=new Object();
this._keyStrokeToCallbackContextMap=new Object();
this._pageProperties=new Object();
TMPage._timers=_29a;
this._activeDomElement=null;
var _29b=this.getDomDocument();
_29b.ondragstart=this.createCallback(this._onDragStart);
this._dragStartX=0;
this._dragStartY=0;
this._dragLastX=0;
this._dragLastY=0;
var _29c=this.createCallback(this._dragMouseMove);
var _29d=this.createCallback(this._dragMouseUp);
var _29e=this.createCallback(this._dragKeyDown);
this._dragDropCallbacks={mousemove:_29c,mouseup:_29d,keydown:_29e};
this._resizeAgain=false;
this._newComponentBuffer=new Array();
this._resizeTimeout=null;
};
TMPage.InitClass=function(){
var _29f=new Object();
var _2a0=[TMKeyStroke.getKeyStroke(TMKeyStroke.A_KEY,TMKeyStroke.CTRL_MASK),TMKeyStroke.getKeyStroke(TMKeyStroke.C_KEY,TMKeyStroke.CTRL_MASK),TMKeyStroke.getKeyStroke(TMKeyStroke.V_KEY,TMKeyStroke.CTRL_MASK),TMKeyStroke.getKeyStroke(TMKeyStroke.X_KEY,TMKeyStroke.CTRL_MASK),TMKeyStroke.getKeyStroke(TMKeyStroke.DELETE_KEY,0)];
for(var i=_2a0.length-1;i>=0;i--){
_29f[_2a0[i].toMarshalledString()]=true;
}
this._KEYSTROKE_OVERRIDES=_29f;
this._DELAYED_RESIZE_TIMEOUT=250;
var _2a2=["blur","focus","focusIn","focusOut","click","dblClick","mouseDown","mouseUp","mouseMove","mouseOver","mouseOut","keyDown","keyUp","keyPress","contextMenu","change","scroll"];
var _2a3="_EVENT_TYPE";
var _2a4="on";
var _2a5=new Object();
var _2a6=new Object();
var _2a7=_2a2.length;
for(var _2a8=0;_2a8<_2a7;_2a8++){
var _2a9=_2a2[_2a8];
var _2aa=_2a9.toLowerCase();
_2a6[_2aa]=_2a9;
var _2ab=TMStrings.createConstantName(_2a9)+_2a3;
this[_2ab]=_2aa;
_2a5[_2aa]=_2a4+_2aa;
}
this.EVENT_TYPE_TO_ATTRIBUTE_MAP=_2a5;
this.EVENT_TYPE_TO_CAMEL_CASE_MAP=_2a6;
this._HANDLE_DOM_EVENT_FORMAT=new Array("HandleDom",null);
this._HANDLE_COMPONENT_EVENT_FORMAT=new Array("HandleComponent",null);
};
TMPage.prototype.isScreenReaderMode=function(){
return (this._accessibilityMode==TMPage.SCREEN_READER_ACCESSIBILITY_MODE);
};
TMPage.prototype.setPageProperty=function(_2ac,_2ad){
this._pageProperties[_2ac]=_2ad;
};
TMPage.prototype.getPageProperty=function(_2ae){
return this._pageProperties[_2ae];
};
TMPage.prototype.getDnDContext=function(){
var _2af=this._dndContext;
if(!_2af){
_2af=this.CreateDnDContext();
this._dndContext=_2af;
}
return _2af;
};
TMPage.prototype.CreateDnDContext=function(){
return new TMDhtmlDnDContext();
};
TMPage.prototype.Dispose=function(){
var _2b0=TMAgent.AGENT;
var _2b1=this.getDomDocument();
var _2b2=this.getDomWindow();
_2b0.removeEventBubbles(_2b1,this._redistributeEventsCallback);
_2b0.removeKeyEventListener(_2b1,TMPage._keyEventCallback);
this._redistributeEventsCallback=null;
_2b2.onload=null;
_2b2.onunload=null;
_2b2.onresize=null;
if(this._autoDismissalManager!=null){
this._autoDismissalManager.dispose();
this._autoDismissalManager=null;
}
if(this._modalityManager!=null){
this._modalityManager.dispose();
this._modalityManager=null;
}
if(this._positionManager!=null){
this._positionManager.dispose();
this._positionManager=null;
}
if(this._zOrderManager!=null){
this._zOrderManager.dispose();
this._zOrderManager=null;
}
this._uiBlockingDiv=null;
this._glassPane=null;
this._uiMaskingFrame=null;
this._activeElementBeforeBlocking=null;
this._keyCaptureState=null;
this._window=null;
this._document=null;
this._delayedResizeCallback=null;
this._dragDropCallbacks=null;
this._clientIdToComponentMap=null;
TMPage._disposeIFrames(_2b1);
TMPage.PAGE=null;
};
TMPage.prototype.addComponent=function(_2b3){
var _2b4=this.getDomWindow();
_2b3.AddNotify();
};
TMPage.prototype.addPartialTargets=function(_2b5){
var _2b6=arguments.length;
if(_2b6>0){
var _2b7=this._partialTargets;
if(_2b7==null){
_2b7=new Array();
this._partialTargets=_2b7;
}
for(var i=0;i<_2b6;i++){
var _2b9=arguments[i];
var _2ba=_2b9.getClientId();
if(!(_2ba in _2b7)){
_2b7[_2ba]=true;
_2b7.push(_2ba);
}
}
this.queueEventTimerIfNeeded();
}
};
TMPage.prototype.getAutoDismissalManager=function(){
var _2bb=this._autoDismissalManager;
if(_2bb==null){
this._autoDismissalManager=_2bb=new TMAutoDismissalManager();
}
return _2bb;
};
TMPage.prototype.getModalityManager=function(){
var _2bc=this._modalityManager;
if(_2bc==null){
this._modalityManager=_2bc=new TMModalityManager();
}
return _2bc;
};
TMPage.prototype.getPositionManager=function(){
var _2bd=this._positionManager;
if(_2bd==null){
this._positionManager=_2bd=new TMPositionManager();
}
return _2bd;
};
TMPage.prototype.getZOrderManager=function(){
var _2be=this._zOrderManager;
if(_2be==null){
this._zOrderManager=_2be=new TMZOrderManager();
}
return _2be;
};
TMPage.prototype.scheduleTimer=function(_2bf,_2c0,_2c1,_2c2){
var _2c3=TMPage._timers;
var _2c4=_2c3._freeList.pop();
if(_2c4==null){
_2c4=_2c3.length;
_2c3.push(new Function("TMPage.__callTimerCallback("+_2c4+");"));
}
var _2c5={context:_2bf,state:_2c1,callback:_2c0};
var _2c6=_2c3[_2c4];
_2c6._timerRecord=_2c5;
_2c5.domTimerId=window.setTimeout(_2c6,_2c2);
return _2c4;
};
TMPage.prototype.rescheduleTimer=function(_2c7,_2c8){
var _2c9=_2c7.valueOf();
var _2ca=TMPage._timers[_2c9];
if(_2ca!=null){
var _2cb=_2ca._timerRecord;
window.clearTimeout(_2cb.domTimerId);
_2cb.domTimerId=window.setTimeout(_2ca,_2c8);
}else{
alert("Attempt to reschedule unknown timerId:",_2c7);
}
};
TMPage.prototype.cancelTimer=function(_2cc){
var _2cd=_2cc.valueOf();
var _2ce=TMPage._timers;
var _2cf=_2ce[_2cd];
if(_2cf!=null){
window.clearTimeout(_2cf._timerRecord.domTimerId);
delete _2cf._timerRecord;
_2ce._freeList.push(_2cd);
}else{
alert("Attempt to cancel unknown timerId:",_2cc);
}
};
TMPage.__callTimerCallback=function(_2d0){
var _2d1=TMPage._timers;
var _2d2=_2d1[_2d0];
var _2d3=_2d2._timerRecord;
var _2d4;
try{
_2d4=_2d3.callback.call(_2d3.context,_2d3.state);
}
catch(e){
alert(e," when calling timer callback");
}
if((_2d4==undefined)||(_2d4<0)){
delete _2d2._timerRecord;
_2d1._freeList.push(_2d0);
}else{
_2d3.domTimerId=window.setTimeout(_2d2,_2d4);
}
};
TMPage._disposeIFrames=function(_2d5){
var _2d6=_2d5.getElementsByTagName("iframe");
for(var f=_2d6.length-1;f>=0;f--){
var _2d8=_2d6[f];
_2d8.parentNode.removeChild(_2d8);
}
};
TMPage.prototype._onDragStart=function(){
TMAgent.AGENT.preventDefault(this.getDomWindow().event);
return false;
};
TMPage.prototype._onSelectStart=function(){
return !this.getDnDContext().isDragging();
};
TMPage.prototype._handleResize=function(){
if(TMAgent.AGENT.isIE()){
if(!this._resizePending){
this._resizePending=true;
this._resizeTimeout=setTimeout(this._getDelayedResizeCallback(),TMPage._DELAYED_RESIZE_TIMEOUT);
}else{
window.clearTimeout(this._resizeTimeout);
t=setTimeout(this._getDelayedResizeCallback(),TMPage._DELAYED_RESIZE_TIMEOUT);
}
}else{
this._onResize();
}
};
TMPage.prototype._getDelayedResizeCallback=function(){
if(!this._delayedResizeCallback){
this._delayedResizeCallback=this.createCallback(this._delayedOnResize);
}
return this._delayedResizeCallback;
};
TMPage.prototype._delayedOnResize=function(){
this._resizePending=false;
this._resizeTimeout=null;
this._onResize();
};
TMPage.prototype.addComponents=function(_2d9){
var _2da=_2d9.length;
for(var i=0;i<_2da;i++){
_2d9[i].AddNotify();
}
this._newComponentBuffer=null;
};
TMPage.prototype.bufferComponent=function(_2dc){
this._newComponentBuffer[this._newComponentBuffer.length]=_2dc;
};
TMPage.prototype._onResize=function(){
if(this.getPhase()!=TMPage.CREATE_VIEW_PHASE){
this._positionGlassPane(false);
TMPage._doResizeNotify(this._resizeNotifyTree,false);
}
};
TMPage.prototype.startDrag=function(evt,_2de,_2df,_2e0,_2e1){
this._dragStartX=evt.clientX;
this._dragStartY=evt.clientY;
this._dragLastX=this._dragStartX;
this._dragLastY=this._dragStartY;
this._moveCallback=_2de;
this._dropCallback=_2df;
this._abortCallback=_2e0;
this._dragHideGlassPane=_2e1;
if(_2e1){
this.showGlassPane(this._dragDropCallbacks,"auto");
}else{
TMAgent.AGENT.startMouseEventCapture(this._dragDropCallbacks);
}
};
TMPage.prototype._dragMouseMove=function(evt){
var _2e3=this._moveCallback;
if(_2e3){
_2e3(evt,evt.clientX-this._dragLastX,evt.clientY-this._dragLastY);
}
this._dragLastX=evt.clientX;
this._dragLastY=evt.clientY;
};
TMPage.prototype._dragMouseUp=function(evt){
var _2e5=this._dropCallback;
this.stopDrag();
if(_2e5){
_2e5(evt,evt.clientX-this._dragStartX,evt.clientY-this._dragStartY);
}
this._dragLastX=evt.clientX;
this._dragLastY=evt.clientY;
};
TMPage.prototype._dragKeyDown=function(evt){
if(evt.keyCode==TMKeyStroke.ESC_KEY){
var _2e7=this._abortCallback;
if(_2e7){
this.stopDrag();
_2e7();
TMAgent.AGENT.eatEvent(evt);
return false;
}
}
};
TMPage.prototype.stopDrag=function(){
if(this._dragHideGlassPane){
this.hideGlassPane(this._dragDropCallbacks);
}else{
TMAgent.AGENT.stopMouseEventCapture(this._dragDropCallbacks);
}
this._moveCallback=null;
this._dropCallback=null;
this._abortCallback=null;
};
TMPage.prototype.isDragging=function(){
return this.dragMouseMove!=null;
};
TMPage.prototype.setOnLoadCallback=function(_2e8){
this._onLoadCallback=_2e8;
};
TMPage.prototype._onBeforeUnload=function(){
};
TMPage.prototype.setExpectedWindowId=function(_2e9){
this._expectedWindowId=_2e9;
};
TMPage.prototype.createFloatingDiv=function(_2ea,_2eb,_2ec){
var _2ed=_2ea.ownerDocument;
var _2ee=_2ed.createElement("DIV");
var _2ef=_2ee.style;
_2ef.zIndex=_2eb;
_2ef.position="absolute";
_2ef.visibility="hidden";
var _2f0=_2ed.createElement("SPAN");
_2f0.style.display="block";
_2f0.className=_2ec;
_2ee.appendChild(_2f0);
_2ea.appendChild(_2ee);
return _2ee;
};
TMPage.prototype.showFloatingDiv=function(_2f1,_2f2){
this._clearFloatingDiv(_2f1);
var _2f3=_2f1.firstChild;
_2f3.appendChild(_2f2);
var _2f4=_2f1.style;
_2f4.visibility="visible";
};
TMPage.prototype.hideFloatingDiv=function(_2f5){
var _2f6=_2f5.style;
_2f6.visibility="hidden";
_2f6.top="-100px";
_2f6.left="-100px";
this._clearFloatingDiv(_2f5);
};
TMPage.prototype._clearFloatingDiv=function(_2f7){
var _2f8=_2f7.firstChild;
var _2f9=_2f8.firstChild;
var _2fa;
while(_2f9){
_2fa=_2f9.nextSibling;
_2f8.removeChild(_2f9);
_2f9=_2fa;
}
};
TMPage.prototype.createMaskingFrame=function(_2fb){
var _2fc=TMAgent.AGENT;
var _2fd=_2fc.getComputedStyle(_2fb);
var _2fe=this._maskFramePool,_2ff,_300;
if(_2fe!=null&&_2fe.length>0){
_2ff=_2fe.pop();
_300=_2ff.style;
}else{
_2ff=_2fb.ownerDocument.createElement("iframe");
_2ff.src="about:blank";
_2ff.frameBorder="none";
_300=_2ff.style;
_300.borderStyle="none";
_300.position="absolute";
}
_300.top=_2fc.getElementTop(_2fb)+"px";
_300.left=_2fc.getElementLeft(_2fb)+"px";
_300.width=_2fb.offsetWidth+"px";
_300.height=_2fb.offsetHeight+"px";
_300.zIndex=_2fd.zIndex-1;
return _2ff;
};
TMPage.prototype.moveMaskingFrame=function(_301,_302){
var _303=TMAgent.AGENT;
var _304=_302.style;
var pos=_303.getElementPosition(_301);
_304.top=pos.y+"px";
_304.left=pos.x+"px";
_304.width=_301.offsetWidth+"px";
_304.height=_301.offsetHeight+"px";
};
TMPage.prototype.removeMaskingFrame=function(_306){
_306.parentNode.removeChild(_306);
var _307=this._maskFramePool;
if(_307==null){
_307=this._maskFramePool=new Array();
}
_307.push(_306);
};
TMPage.prototype.getDomDocument=function(){
return this._document;
};
TMPage.prototype.getDomWindow=function(){
return this._window;
};
TMPage.prototype.showGlassPane=function(_308,_309){
var _30a=TMAgent.AGENT;
var _30b=this.getGlassPane();
this._positionGlassPane(true);
var _30c=_30b.style;
_30c.visibility="visible";
_30c.cursor=_30a.getCursor(_309);
_30a.startMouseEventCapture(_308);
this._keyCaptureState=_30a.startDocumentKeyEventCapture(_308,_30b);
};
TMPage.prototype.hideGlassPane=function(_30d){
var _30e=TMAgent.AGENT;
_30e.stopMouseEventCapture(_30d);
var _30f=this.getGlassPane();
_30e.endDocumentKeyEventCapture(_30d,_30f,this._keyCaptureState);
this._keyCaptureState=null;
var _310=_30f.style;
_310.cursor="auto";
_310.visibility="hidden";
_30e.forceCursorChange(this.getDomDocument());
};
TMPage.prototype.getGlassPane=function(){
var _311=this._glassPane;
if(!_311){
_311=this._createGlassPane(this.getDomDocument());
this._glassPane=_311;
}
return _311;
};
TMPage.prototype._createGlassPane=function(_312){
var _313=_312.createElement("div");
_313.className="RichUIBlockingDiv";
var _314=_313.style;
_314.position="absolute";
_314.left="0px";
_314.top="0px";
_314.zIndex=32000;
_314.visibility="hidden";
_314.tabIndex=-1;
var _315=TMAgent.AGENT;
_315.disableUserSelect(_313);
_312.body.appendChild(_313);
_315.setOpacity(_313,0);
return _313;
};
TMPage.prototype._positionGlassPane=function(_316){
var _317=this._glassPane;
if(_317){
var _318=_317.style;
if(_316||(_318.visibility=="visible")){
var _319=this.getDomDocument().body;
var _31a=Math.max(_319.offsetHeight,_319.scrollHeight);
var _31b=Math.max(_319.offsetWidth,_319.scrollWidth);
_318.height=_31a+"px";
_318.width=_31b+"px";
}
}
};
TMPage.prototype._createUIBlockingDiv=function(_31c){
var _31d=TMAgent.AGENT;
var _31e=_31c.createElement("div");
_31e.className="RichUIBlockingDiv";
_31e.onkeydown=TMAgent.eatEventCallback;
_31e.onkeyup=TMAgent.eatEventCallback;
_31e.onkeypress=TMAgent.eatEventCallback;
var _31f=_31e.style;
_31f.position="absolute";
_31f.left=_31f.top="0px";
_31f.zIndex=32000;
_31f.cursor="wait";
_31d.disableBrowserContextMenu(_31e);
_31c.body.appendChild(_31e);
_31d.setOpacity(_31e,0);
this._uiBlockingDiv=_31e;
var _320=this._uiMaskingFrame=this.createMaskingFrame(_31e);
_31c.body.appendChild(_320);
var _321=_320.document;
if(_321!=null){
_31d.disableBrowserContextMenu(_321);
}
_31d.setOpacity(this._uiMaskingFrame,0);
};
TMPage.prototype._installBlockingHandler=function(_322){
var _323=TMAgent.AGENT;
var _324=_323.isIE();
this._uiBlockingDiv.style.visibility="visible";
this._uiMaskingFrame.style.visibility="visible";
this.getDomWindow().setTimeout("TMPage.PAGE._positionBlockingDiv()",100);
if(_324){
this._activeElementBeforeBlocking=_322.activeElement;
if(this._activeElementBeforeBlocking){
this._activeIDBeforeBlocking=this._activeElementBeforeBlocking.id;
}
TMFocusUtils.focusElement(this._uiBlockingDiv);
}else{
_323.installKeyboardBlocker(_322,true);
}
};
TMPage.prototype._positionBlockingDiv=function(){
var _325=this.getDomDocument(),_326=this.getDomDocument().body;
var _327=_325.documentElement;
var _328=Math.max(_326.offsetHeight,_326.scrollHeight),_329=Math.max(_326.offsetWidth,_326.scrollWidth),_32a=this._uiBlockingDiv.style,_32b=this._uiMaskingFrame.style;
if(_32b.visibility!="hidden"){
_328=Math.max(_328,_327.clientHeight);
_329=Math.max(_329,_327.clientWidth);
_32b.height=_32a.height=_328+"px";
_32b.width=_32a.width=_329+"px";
}
};
TMPage.prototype._hideBlockingDiv=function(){
var _32c=this._uiBlockingDiv.style;
var _32d=this._uiMaskingFrame.style;
_32d.visibility=_32c.visibility="hidden";
_32d.height=_32c.height="0px";
_32d.width=_32c.width="0px";
};
TMPage.prototype._removeBlockingHandler=function(_32e){
var _32f=TMAgent.AGENT;
var _330=_32f.isIE();
this._hideBlockingDiv();
try{
if(this._activeIDBeforeBlocking){
var _331=_32f.getElementById(this._activeIDBeforeBlocking);
TMFocusUtils.focusElement(_331);
}else{
TMFocusUtils.focusElement(this._activeElementBeforeBlocking);
}
}
catch(ignore){
}
if(_330){
this._activeElementBeforeBlocking=null;
this._activeIDBeforeBlocking=null;
}else{
_32f.installKeyboardBlocker(_32e,false);
}
};
TMPage.prototype.blockUI=function(_332){
var _333=TMAgent.AGENT;
var _334=this.getDomDocument();
if(_332&&!this._uiBlocked){
if(null==this._uiBlockingDiv){
this._createUIBlockingDiv(_334);
}
_333.showBusyCursor(_334,_332);
this._installBlockingHandler(_334);
this._uiBlocked=true;
}else{
if(!_332&&this._uiBlocked){
_333.showBusyCursor(_334,_332);
this._removeBlockingHandler(_334);
this._uiBlocked=false;
}
}
};
TMPage.prototype.isUIBlocked=function(){
return (this._uiBlocked);
};
TMPage._keyEventCallback=function(_335){
TMPage.PAGE._handleKey(_335);
};
TMPage.prototype.registerKeyStroke=function(_336,_337,_338){
var _339=_336.toMarshalledString();
this._keyStrokeToCallbackMap[_339]=_337;
this._keyStrokeToCallbackContextMap[_339]=_338;
};
TMPage.prototype.unregisterKeyStroke=function(_33a){
var _33b=_33a.toMarshalledString();
delete this._keyStrokeToCallbackMap[_33b];
delete this._keyStrokeToCallbackContextMap[_33b];
};
TMPage.prototype._handleKey=function(_33c){
if(_33c.cancelBubble==true){
return;
}
var _33d=TMAgent.AGENT;
var _33e=_33d.getKeyCode(_33c);
var _33f=(_33c.shiftKey*TMKeyStroke.SHIFT_MASK)|(_33c.ctrlKey*TMKeyStroke.CTRL_MASK)|(_33c.altKey*TMKeyStroke.ALT_MASK);
if(_33c.metaKey){
_33f|=TMKeyStroke.META_MASK;
}
var _340=TMKeyStroke.getKeyStroke(_33e,_33f);
var _341=_340.toMarshalledString();
var _342=this._keyStrokeToCallbackMap[_341];
if(_342!=null){
var _343=_341 in TMPage._KEYSTROKE_OVERRIDES;
if(_343){
var _344=_33d.getEventTarget(_33c);
var _345=_33d.getNodeName(_344).toLowerCase();
if(_345!="textarea"){
if(_345=="input"){
var type=_344.type.toLowerCase();
_343=(type=="text")||(type=="password");
}else{
_343=false;
}
}
}
if(!_343){
var _347=this._keyStrokeToCallbackContextMap[_341];
var _348=_342.call(_347,_340,_33c)!==false;
if(_348){
_33d.eatEvent(_33c);
}
}
}
};
TMPage.prototype._doFullPostback=function(_349,_34a){
for(var _34b in _34a){
this._setParameter(_349,_34b,_34a[_34b]);
}
_349.submit();
_349.action=_349.action;
for(var _34b in _34a){
var _34c=this._getParameterElement(_349,_34b);
_34c.parentNode.removeChild(_34c);
}
};
TMPage.prototype._getParameterElement=function(form,name){
var _34f=TMAgent.AGENT;
var _350=_34f.getFormElement(form,name);
if(!_350){
_350=this.getDomDocument().createElement("input");
_350.type="hidden";
_350.name=name;
form.appendChild(_350);
}
return _350;
};
TMPage.prototype._setParameter=function(form,name,_353){
this._getParameterElement(form,name).value=_353;
};
TMPage.prototype._appendParameter=function(form,name,_356){
var _357=this._getParameterElement(form,name);
var _358=_357.value;
if(_358){
_356=_358+","+_356;
}
_357.value=_356;
};
TMPage._removeAllFormElements=function(_359){
var _35a=_359.elements;
if(_35a){
var _35b=null;
for(var j=_35a.length-1;j>=0;j--){
_35b=_35a.item(0);
if(_35b){
_35b.parentNode.removeChild(_35b);
}
}
}
};
TMPage.prototype.isLibraryShared=function(){
return false;
};
TMPage.prototype._redistribute=function(_35d){
if(this.getDnDContext().isDragging()){
return;
}
this.SetPhase(TMPage.DELIVER_EVENTS_PHASE);
if(!_35d){
_35d=this.getDomWindow().event;
}
var _35e=TMAgent.AGENT;
var _35f=_35e.getEventTarget(_35d);
if((_35f==null)||(_35f.nodeType==null)){
return;
}
var _360=false;
if(_35d.type=="click"){
_360=true;
}
var _361=TMUIPeer.getFirstAncestorComponent(_35f,_360);
if(_361!=null){
var peer=_361.getPeer();
var _363=peer.__CreateComponentEvent(_361,_35d);
if(_363){
var _364=_363.getType();
switch(_364){
case TMComponentEvent.FOCUS_EVENT_TYPE:
this._setActiveDomElementInfo(_35f,_361.getClientId());
break;
}
if(TMUIInputEvent.prototype.isPrototypeOf(_363)){
var _365=this.getDnDContext().__handleInputEvent(_363);
if(!_365){
_35e.preventDefault(_35d);
}
}
_361.queueEvent(_363);
this._eventLoopDeliverEvents();
}
}else{
if(_35d.type=="focusin"||_35d.type=="focus"){
this._setActiveDomElementInfo(_35f,null);
}
}
this.SetPhase(TMPage.WAITING_FOR_USER_INPUT_PHASE);
};
TMPage.prototype.SetPhase=function(_366){
this._phase=_366;
};
TMPage.prototype.getPhase=function(){
return this._phase;
};
TMPage.prototype.ensureComponentIsActive=function(_367,_368){
var _369=_367.getClientId();
var _36a=this.getActiveComponentId();
var _36b=_367;
if(_369!=_36a){
_36b=this.getActiveComponent();
}
this._setActiveDomElementInfo(_368,_369);
if(_36b!=_367){
if(_36b){
new TMComponentEvent(_36b,TMComponentEvent.BLUR_EVENT_TYPE).queue();
}
new TMComponentEvent(_367,TMComponentEvent.FOCUS_EVENT_TYPE).queue();
}
};
TMPage.prototype.queueEvent=function(_36c){
if(_36c){
if(_36c.isValidationNeeded()){
var _36d=_36c.getSource();
var _36e=_36c.isImmediate();
}
this._eventQueue.push(_36c);
if(this.getPhase()!=TMPage.DELIVER_EVENTS_PHASE){
this.queueEventTimerIfNeeded();
}
}
};
TMPage.prototype.queueEventTimerIfNeeded=function(){
if(this._eventDispatcherID===undefined){
this._updateDeliveryTimer();
}
};
TMPage.prototype._updateDeliveryTimer=function(){
this._eventDispatcherID=this.getDomWindow().setTimeout(TMPage._timerDeliverEvents,50);
};
TMPage._timerDeliverEvents=function(){
var _36f=TMPage.PAGE;
_36f._deliverAllQueuedEvents();
_36f._eventDispatcherID=undefined;
};
TMPage.prototype._eventLoopDeliverEvents=function(){
this._deliverAllQueuedEvents();
if(this._eventDispatcherID!==undefined){
this.getDomWindow().clearTimeout(this._eventDispatcherID);
this._eventDispatcherID=undefined;
}
};
TMPage.prototype.getActiveComponent=function(){
var _370=this._activeComponentId;
return (_370!=null)?this.findComponent(_370):null;
};
TMPage.prototype.getActiveComponentId=function(){
return this._activeComponentId;
};
TMPage.prototype._setActiveComponentId=function(_371){
var _372=(_371!=null)?TMAgent.AGENT.getElementById(_371):null;
this._setActiveDomElementInfo(_371,_372);
};
TMPage.prototype.getActiveDomElement=function(){
return this._activeDomElement;
};
TMPage.prototype._setActiveDomElementInfo=function(_373,_374){
if(_373===undefined){
_373=null;
}
var _375=this.getActiveComponent();
var _376=this._activeDomElement;
this._activeDomElement=_373;
this._activeComponentId=_374;
};
TMPage.prototype._applyClientResponse=function(_377,_378){
var _379=[];
var _37a=this._getFocusPath();
this._handleClientNodeAddition(_377,_379,_37a);
if(_378){
TMAgent.AGENT.execScript(this.getDomWindow(),_378);
}
this._doResizeNotify(_379);
};
TMPage.prototype._handleClientNodeAddition=function(node,_37c,_37d){
var id=node.getAttribute("id");
var doc=this.getDomDocument();
var _380=TMAgent.AGENT;
var _381=_380.getElementById(id);
if(_381==null){
}else{
var _382=_37d[id];
var _383=TMUIPeer.getFirstAncestorComponent(_381.parentNode);
var peer=(_383)?_383.getPeer():null;
if(peer!=null){
peer.replaceDomElement(_383,node,_381);
}else{
this.__replaceDomElement(node,_381);
}
if(_382!=null){
this._restoreFocusPath(_37d,_382);
}
var _385=null;
if(_383){
_385=peer.domReplaceNotify(_383,node);
}else{
_385=node;
}
if(_385){
_37c.push(_385);
}
}
};
TMPage.prototype.__replaceDomElement=function(_386,_387){
var _388=TMAgent.AGENT;
this.removeComponentsInSubtree(_387);
_387.parentNode.replaceChild(_386,_387);
};
TMPage.prototype._getFocusPath=function(){
var _389=this._activeDomElement;
var _38a=[];
if(_389!=null){
var _38b=_389;
while(_38b){
var _38c=_38b.id;
if(_38c){
_38a[_38c]=_38a.push(_38b)-1;
}
_38b=_38b.parentNode;
}
}
return _38a;
};
TMPage.prototype._restoreFocusPath=function(_38d,_38e){
var _38f=_38d.length;
if(_38e>=_38f){
_38e=_38f-1;
}
var _390=TMAgent.AGENT;
for(var _391=0;_391<=_38e;_391++){
var _392=_38d[_391];
var _393=_392.id;
var _394=_390.getElementById(_393);
if(_394!=null){
var _395=TMFocusUtils.getFirstTabStop(_394);
if(!_395){
_395=TMFocusUtils.getNextTabStop(_394,null,true);
if(!_395){
_395=TMFocusUtils.getPreviousTabStop(_394,null,true);
}
}
if(_395){
TMFocusUtils.focusElement(_395);
}
break;
}
}
};
TMPage.prototype._doResizeNotify=function(_396){
for(var i=0;i<_396.length;i++){
var _398=_396[i];
this.doResizeNotifyDom(_398,true);
}
};
TMPage._doResizeNotify=function(node,_39a,_39b){
var _39c=node.component;
if(_39c){
var _39d=TMUIPeer.getDomElementForComponent(_39c);
var _39e=_39d.clientWidth;
var _39f=_39d.clientHeight;
var _3a0=node.clientWidth;
var _3a1=node.clientHeight;
if((_39e==0)||(_39f==0)||((_39e==_3a0)&&(_39f==_3a1)&&!_39a)){
return;
}
node.clientWidth=_39e;
node.clientHeight=_39f;
_39c.resizeNotify(_3a0,_3a1,_39e,_39f);
}
var _3a2=node.children;
if(_3a2){
var _3a3=_3a2.length;
for(var i=0;i<_3a3;i++){
TMPage._doResizeNotify(_3a2[i],_39b,_39b);
}
}
};
TMPage.prototype.doResizeNotify=function(_3a5){
var _3a6;
if(_3a5==null){
_3a6=this._resizeNotifyTree;
}else{
var _3a7=_3a5.getClientId();
_3a6=this._resizeNotifyMap[_3a7];
}
TMPage._doResizeNotify(_3a6,true);
};
TMPage.prototype.registerResizeNotifyComponent=function(_3a8){
var _3a9={"component":_3a8};
var _3aa=_3a8.getClientId();
var _3ab=this._resizeNotifyMap;
_3ab[_3aa]=_3a9;
var _3ac;
var _3ad=TMUIPeer.getDomElementForComponent(_3a8).parentNode;
while(_3ad){
if(_3ad.nodeType==1){
var _3ae=_3ad.id;
_3ac=_3ab[_3ae];
if(_3ac){
break;
}
}
_3ad=_3ad.parentNode;
}
if(_3ac==null){
_3ac=this._resizeNotifyTree;
}
if(_3ac.children==null){
_3ac.children=new Array();
}
_3ac.children.push(_3a9);
_3a9.parent=_3ac;
};
TMPage.prototype.unregisterResizeNotifyComponent=function(_3af){
var _3b0=_3af.getClientId();
var _3b1=this._resizeNotifyMap;
var _3b2=_3b1[_3b0];
if(_3b2){
delete _3b1[_3b0];
var _3b3=_3b2.parent;
if(_3b3){
TMCollections.removeArrayValue(_3b3.children,_3b2);
}
delete _3b2.parent;
var _3b4=_3b2.children;
if(_3b4){
delete _3b2.children;
}
}
};
TMPage.prototype.doResizeNotifyDom=function(_3b5,_3b6){
var _3b7=this._resizeNotifyMap;
var _3b8=_3b7[_3b5.id];
if(_3b8){
TMPage._doResizeNotify(_3b8,_3b6);
return;
}
var _3b9=_3b5.parentNode;
while(_3b9){
_3b8=_3b7[_3b9.id];
if(_3b8){
break;
}
_3b9=_3b9.parentNode;
}
var _3ba=false;
if(!_3b8){
var _3bb=this.getZOrderManager();
if(_3bb){
_3ba=_3bb.containsElement(_3b5);
}
_3b8=this._resizeNotifyTree;
}
this._doResizeNotifyDomChildren(_3b5,_3b8,_3ba);
};
TMPage.prototype._doResizeNotifyDomChildren=function(_3bc,_3bd,_3be){
var _3bf=TMAgent.AGENT;
var _3c0=_3bd.children;
if(_3c0){
var _3c1=_3c0.length;
for(var i=0;i<_3c1;i++){
var _3c3=_3c0[i];
var _3c4=_3c3.component.getClientId();
var _3c5=_3bf.getElementById(_3c4);
if(TMDomUtils.isAncestor(_3bc,_3c5)){
TMPage._doResizeNotify(_3c3,false);
}else{
if(_3be){
this._doResizeNotifyDomChildren(_3bc,_3c3,true);
}
}
}
}
};
TMPage.prototype._deliverAllQueuedEvents=function(){
this._deliverQueuedEvents();
};
TMPage.prototype._deliverQueuedEvents=function(){
var _3c6=this._eventQueue;
do{
var _3c7=_3c6.shift();
if(!_3c7){
break;
}
_3c7.getSource().broadcast(_3c7);
}while(true);
};
TMPage._appendUrlFormEncoded=function(_3c8,key,_3ca){
if(_3c8.length>0){
_3c8=_3c8+"&";
}
return _3c8+key+"="+_3ca.toString().replace(/\%/g,"%25").replace(/\+/g,"%2B").replace(/\//g,"%2F").replace(/\&/g,"%26").replace(/\"/g,"%22").replace(/\'/g,"%27");
};
TMPage.prototype.findComponent=function(_3cb){
return this._clientIdToComponentMap[_3cb];
};
TMPage.prototype.unmapComponent=function(_3cc){
delete this._clientIdToComponentMap[_3cc];
};
TMPage.prototype.mapComponent=function(_3cd,_3ce){
this._clientIdToComponentMap[_3cd]=_3ce;
};
TMPage.prototype.removeComponentsInSubtree=function(_3cf){
var _3d0=new Array();
this._postOrderPopulate(_3cf,0,_3d0,false);
for(var _3d1=_3d0.length-1;_3d1>=0;_3d1--){
var _3d2=_3d0[_3d1];
if(_3d2!=null){
var _3d3=_3d2.length;
for(var _3d4=0;_3d4<_3d3;_3d4++){
var _3d5=_3d2[_3d4];
var _3d6=this.findComponent(_3d5);
if(_3d6!=null){
_3d6.RemoveNotify();
}
}
}
}
};
TMPage.prototype._postOrderPopulate=function(_3d7,_3d8,_3d9,_3da){
if(!_3da||TMDomUtils.isVisible(_3d7)){
var _3db=_3d7.firstChild;
if(_3db!=null){
var _3dc=_3d8+1;
do{
if(_3db.nodeType==1){
this._postOrderPopulate(_3db,_3dc,_3d9,_3da);
}
_3db=_3db.nextSibling;
}while(_3db!=null);
}
var _3dd=_3d7.id;
if(_3dd&&(this.findComponent(_3dd)!=null)){
var _3de=_3d9[_3d8];
if(_3de==null){
_3de=new Array(_3dd);
_3d9[_3d8]=_3de;
}else{
_3de.push(_3dd);
}
}
}
};
TMPage.prototype.setLastFocusedElement=function(_3df){
this._lastFocusedElement=_3df;
};
TMPage.prototype.getLastFocusedElement=function(_3e0){
return this._lastFocusedElement;
};
TMPage.prototype.setResizeAgain=function(_3e1){
return this._resizeAgain=_3e1;
};
TMPage.prototype.__onLoad=function(){
var _3e2=TMAgent.AGENT;
var _3e3=this.getDomWindow();
this.addComponents(this._newComponentBuffer);
try{
var _3e4=this.getDomDocument();
var _3e5=this.createCallback(this._redistribute);
_3e2.addEventBubbles(_3e4,_3e5);
this._redistributeEventsCallback=_3e5;
_3e2.addKeyEventListener(_3e4,TMPage._keyEventCallback);
TMPage._doResizeNotify(this._resizeNotifyTree);
if(this._resizeAgain){
TMPage._doResizeNotify(this._resizeNotifyTree,true,true);
}
this._resizeAgain=false;
var _3e6=this._onLoadCallback;
if(_3e6){
_3e6();
}
if(!_3e2.isIE()){
_3e2.setAllImageTitlesFromAlts();
}
}
finally{
this.SetPhase(TMPage.WAITING_FOR_USER_INPUT_PHASE);
}
this._initializationComplete=true;
};
TMAgent._UNSUPPORTED_BROWSER_ALERT="You are using an unsupported browser.";
TMAgent.IE_PLATFORM="ie";
TMAgent.GECKO_PLATFORM="gecko";
TMAgent.OPERA_PLATFORM="opera";
TMAgent.SAFARI_PLATFORM="safari";
TMAgent.UNKNOWN_PLATFORM="unknown";
TMAgent._REDISTRIBUTE_EVENTS=["click","dblclick","keydown","keypress","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","focus","blur","contextmenu"];
TMAgent.KEY_EVENTS=["keydown","keypress","keyup"];
TMAgent._MOUSE_EVENTS={click:1,mousedown:1,mouseup:1,mouseover:1,mousemove:1,mouseout:1};
TMAgent._CSS3_TO_CSS2_MAP={"auto":"auto","default":"default","none":"default","context-menu":"default","help":"help","pointer":"pointer","progress":"wait","wait":"wait","cell":"crosshair","crosshair":"crosshair","text":"text","vertical-text":"text","alias":"crosshair","copy":"crosshair","move":"move","no-drop":"move","not-allowed":"move ","e-resize":"e-resize","n-resize":"n-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","s-resize":"s-resize","se-resize":"se-resize","sw-resize":"sw-resize","w-resize":"w-resize","ew-resize":"e-resize","ns-resize":"s-resize","nesw-resize":"move","col-resize":"e-resize","row-resize":"s-resize","all-scroll":"move","inherit":"inherit"};
TMAgent._NATIVE_TO_COMPONENT_MAPPINGS={"blur":TMComponentEvent.BLUR_EVENT_TYPE,"focus":TMComponentEvent.FOCUS_EVENT_TYPE,"focusin":TMComponentEvent.FOCUS_EVENT_TYPE,"focusout":TMComponentEvent.BLUR_EVENT_TYPE,"click":TMUIInputEvent.CLICK_EVENT_TYPE,"dblclick":TMUIInputEvent.DOUBLE_CLICK_EVENT_TYPE,"mousedown":TMUIInputEvent.MOUSE_DOWN_EVENT_TYPE,"mouseup":TMUIInputEvent.MOUSE_UP_EVENT_TYPE,"mousemove":TMUIInputEvent.MOUSE_MOVE_EVENT_TYPE,"mouseover":TMUIInputEvent.MOUSE_IN_EVENT_TYPE,"mouseout":TMUIInputEvent.MOUSE_OUT_EVENT_TYPE,"keydown":TMUIInputEvent.KEY_DOWN_EVENT_TYPE,"keyup":TMUIInputEvent.KEY_UP_EVENT_TYPE,"keypress":TMUIInputEvent.KEY_PRESS_EVENT_TYPE,"contextmenu":TMUIInputEvent.CONTEXT_MENU_EVENT_TYPE};
TMAgent._CSS_TO_DOM_MAP={};
function TMAgent(_3e7){
this.Init(TMAgent.UNKNOWN_PLATFORM,TMAgent.guessVersion(),_3e7);
}
TMObject.createSubclass(TMAgent);
TMAgent.prototype.Init=function(_3e8,_3e9,_3ea){
TMAgent.superclass.Init.call(this);
this._window=_3ea;
this._document=_3ea.document;
this._platform=_3e8;
this._version=_3e9;
this.compatMode=this._document.compatMode;
};
TMAgent.InitClass=function(){
TMAgent._agent=null;
};
TMAgent.prototype.getDomWindow=function(){
return this._window;
};
TMAgent.prototype.getDomDocument=function(){
return this._document;
};
TMAgent.prototype.getVersion=function(){
return this._version;
};
TMAgent.prototype.getPlatform=function(){
return this._platform;
};
TMAgent.prototype.isIE=function(){
return (this.getPlatform()==TMAgent.IE_PLATFORM);
};
TMAgent.prototype.isIE6=function(){
return (this.getPlatform()==TMAgent.IE_PLATFORM&&this.getVersion()==6);
};
TMAgent.prototype.isGecko=function(){
return (this.getPlatform()==TMAgent.GECKO_PLATFORM);
};
TMAgent.guessVersion=function(){
return parseFloat(navigator.appVersion);
};
TMAgent.prototype.isBackwardCompatible=function(){
return (this.compatMode=="BackCompat");
};
TMAgent.getAgent=function(_3eb){
if(_3eb!=null){
TMAgent._agent=null;
}
if(!TMAgent._agent){
var _3ec=navigator.userAgent.toLowerCase();
var _3ed;
var _3ee;
try{
if(_3ec.indexOf("opera")!=-1){
_3ed=new TMOperaAgent(_3eb);
}else{
if(_3ec.indexOf("msie")!=-1){
_3ee=TMAgent._parseFloatVersion(_3ec,/msie (\d+[.]\d+)/);
if(_3ee>=7){
_3ed=new TMIEAgent(_3eb);
}else{
_3ed=new TMIEAgent(_3eb);
}
}else{
if((_3ec.indexOf("applewebkit")!=-1)||(_3ec.indexOf("safari")!=-1)){
_3ed=new TMSafariAgent(_3eb);
}else{
if(_3ec.indexOf("gecko/")!=-1){
_3ee=TMAgent._parseFloatVersion(_3ec,/rv:(\d+[.]\d+)/);
_3ed=new TMGeckoAgent(_3ee,_3eb);
}else{
alert(TMAgent._UNSUPPORTED_BROWSER_ALERT);
}
}
}
}
}
catch(e){
TMAgent._agent=new TMAgent(_3eb);
}
TMAgent._agent=_3ed;
}
return TMAgent._agent;
};
TMAgent.prototype.removeStyleProperty=function(_3ef,_3f0){
_3ef.style.removeProperty(_3f0);
};
TMAgent.prototype.setTableRowHeight=function(row,_3f2){
row.style.height=_3f2+"px";
};
TMAgent._parseFloatVersion=function(_3f3,_3f4){
var _3f5=_3f3.match(_3f4);
if(_3f5){
var _3f6=_3f5[1];
if(_3f6){
return parseFloat(_3f6);
}
}
return undefined;
};
TMAgent.getCSSLengthAsInt=function(_3f7){
if((_3f7.length)>0&&(_3f7!="auto")){
var _3f8=parseInt(_3f7);
if(isNaN(_3f8)){
_3f8=0;
}
return _3f8;
}else{
return 0;
}
};
TMAgent.prototype.getElementWindow=function(_3f9){
return _3f9.ownerDocument.contentWindow;
};
TMAgent.prototype.getWindowHeight=function(){
return this._window.innerHeight;
};
TMAgent.prototype.getWindowWidth=function(){
return this._window.innerWidth;
};
TMAgent.prototype.getElementLeft=function(_3fa){
var _3fb=this.getElementWindow(_3fa);
var _3fc=_3fa.offsetParent;
var _3fd=_3fa.offsetLeft;
while(_3fc!=_3fb){
_3fa=_3fc;
_3fd+=_3fa.offsetLeft;
_3fd-=_3fa.scrollLeft;
_3fc=_3fc.offsetParent;
}
return _3fd;
};
TMAgent.prototype.getElementTop=function(_3fe){
var _3ff=this.getElementWindow(_3fe);
var _400=_3fe.offsetParent;
var _401=_3fe.offsetTop;
while(_400!=_3ff){
_3fe=_400;
_401+=_3fe.offsetTop;
_401-=_3fe.scrollTop;
_400=_400.offsetParent;
}
return _401;
};
TMAgent.prototype.getElementPageBounds=function(_402){
var _403=this.getElementTop(_402);
var _404=this.getElementLeft(_402);
return {top:_403,left:_404,bottom:(_403+_402.offsetHeight),right:(_404+_402.offsetWidth)};
};
TMAgent.prototype.pointInElementBounds=function(_405,_406,_407){
var _408=this.getElementTop(_405);
if(_407>=_408){
var _409=this.getElementLeft(_405);
if(_406>=_409){
return (_407<=_408+_405.offsetHeight)&&(_406<=_409+_405.offsetWidth);
}
}
return false;
};
TMAgent.prototype.setOuterHeight=function(_40a,_40b){
var _40c=this.getComputedStyle(_40a);
var _40d=TMAgent.getCSSLengthAsInt;
var _40e=_40b-_40d(_40c.paddingTop)-_40d(_40c.paddingBottom)-_40d(_40c.marginTop)-_40d(_40c.marginBottom);
if(_40a.tagName.toUpperCase()!="TABLE"){
_40e-=(_40d(_40c.borderTopWidth)+_40d(_40c.borderBottomWidth));
}
if(_40e<0){
_40e=0;
}
_40a.style.height=_40e+"px";
};
TMAgent.prototype.getOuterWidth=function(_40f,_410,_411){
if(!_411){
_411=this.getComputedStyle(_40f);
}
var _412=TMAgent.getCSSLengthAsInt;
var _413=_410+_412(_411.paddingLeft)+_412(_411.paddingRight)+_412(_411.marginLeft)+_412(_411.marginRight);
if(_40f.tagName.toUpperCase()!="TABLE"){
_413+=(_412(_411.borderLeftWidth)+_412(_411.borderRightWidth));
}
return _413;
};
TMAgent.prototype.getOuterHeight=function(_414,_415,_416){
if(!_416){
_416=this.getComputedStyle(_414);
}
var _417=TMAgent.getCSSLengthAsInt;
var _418=_415-_417(_416.paddingTop)+_417(_416.paddingBottom)+_417(_416.marginTop)+_417(_416.marginBottom);
if(_414.tagName.toUpperCase()!="TABLE"){
_418+=(_417(_416.borderTopWidth)+_417(_416.borderBottomWidth));
}
return _418;
};
TMAgent.prototype.setOuterWidth=function(_419,_41a){
var _41b=this.getComputedStyle(_419);
var _41c=TMAgent.getCSSLengthAsInt;
var _41d=_41a-_41c(_41b.paddingLeft)-_41c(_41b.paddingRight)-_41c(_41b.marginLeft)-_41c(_41b.marginRight);
if(_419.tagName.toUpperCase()!="TABLE"){
_41d-=(_41c(_41b.borderLeftWidth)+_41c(_41b.borderRightWidth));
}
if(_41d<0){
_41d=0;
}
_419.style.width=_41d+"px";
};
TMAgent.prototype.getWindowClientWidth=function(_41e){
return _41e.document.documentElement.clientWidth;
};
TMAgent.prototype.getWindowClientHeight=function(_41f){
return _41f.document.documentElement.clientHeight;
};
TMAgent.prototype.getWindowScrollWidth=function(_420){
return _420.document.documentElement.scrollWidth;
};
TMAgent.prototype.getWindowScrollHeight=function(_421){
return _421.document.documentElement.scrollHeight;
};
TMAgent.prototype.getComputedStyle=function(_422){
return _422.ownerDocument.defaultView.getComputedStyle(_422,null);
};
TMAgent.prototype.getElementById=function(id){
return this._document.getElementById(id);
};
TMAgent.prototype.getElementsByName=function(name){
return this._document.getElementsByName(name);
};
TMAgent.prototype.elementsRemoved=function(_425){
};
TMAgent.prototype.elementsAdded=function(_426){
};
TMAgent.prototype.createElementWithName=function(type,name){
el=this._document.createElement(type);
el.setAttribute("name",name);
return el;
};
TMAgent.prototype.isEventInElement=function(_429,_42a){
var _42b=this.getMousePosition(_429);
var _42c=this.getElementLeft(_42a);
if((_42b.x>=_42c)&&(_42b.x<=(_42c+_42a.offsetWidth))){
var _42d=this.getElementTop(_42a);
if((_42b.y>=_42d)&&(_42b.y<=(_42d+_42a.offsetHeight))){
return true;
}
}
return false;
};
TMAgent.prototype.getElementPosition=function(el){
var _42f=0;
var _430=0;
var _431=el;
var _432=TMAgent.getCSSLengthAsInt;
while(_431.offsetParent!=null){
var _433=this.getComputedStyle(_431);
_42f+=_431.offsetTop;
_430+=_431.offsetLeft;
if(_431!=el){
_42f+=_432(_433.borderTopWidth);
_430+=_432(_433.borderLeftWidth);
_42f-=_431.scrollTop;
_430-=_431.scrollLeft;
}
_431=_431.offsetParent;
}
return {x:_430,y:_42f};
};
TMAgent.prototype.getCursor=function(_434){
return _434;
};
TMAgent.getCSS2Cursor=function(_435){
return TMAgent._CSS3_TO_CSS2_MAP[_435];
};
TMAgent.prototype.scrollToPos=function(el,posX,posY){
if(posY!=null){
el.scrollTop=posY;
}
if(posX!=null){
el.scrollLeft=posX;
}
};
TMAgent.prototype.getWindowScrollTop=function(){
if(this.isBackwardCompatible()){
return this._document.body.scrollTop;
}else{
return this._document.documentElement.scrollTop;
}
};
TMAgent.prototype.getWindowScrollLeft=function(){
if(this.isBackwardCompatible()){
return this._document.body.scrollLeft;
}else{
return this._document.documentElement.scrollLeft;
}
};
TMAgent.prototype.resizeStretchedChild=function(_439,_43a){
};
TMAgent.prototype.resizeStretchedElement=function(_43b,_43c,_43d){
};
TMAgent.prototype.prepareStretchedChild=function(_43e,_43f){
var _440=_43e.style;
_440.position="absolute";
_440.width="auto";
_440.height="auto";
_440.left=_43f;
_440.top=_43f;
_440.bottom=_43f;
_440.right=_43f;
};
TMAgent.prototype.repositionStretchedElement=function(_441,_442,_443,_444,_445){
if(_441){
var _446=_441.style;
if(_442){
_446.top=_442;
}
if(_444){
_446.left=_444;
}
if(_443){
_446.height="auto";
_446.bottom=_443;
}
if(_445){
_446.width="auto";
_446.right=_445;
}
}
};
TMAgent.prototype.startDocumentKeyEventCapture=function(_447,_448){
var _449=_448.ownerDocument;
var _44a=TMAgent.KEY_EVENTS;
var _44b=_44a.length;
for(var _44c=0;_44c<_44b;_44c++){
var _44d=_44a[_44c];
var _44e=_447[_44d];
if(_44e){
_449.addEventListener(_44d,_44e,true);
}
}
return null;
};
TMAgent.prototype.endDocumentKeyEventCapture=function(_44f,_450){
var _451=_450.ownerDocument;
var _452=TMAgent.KEY_EVENTS;
var _453=_452.length;
for(var _454=0;_454<_453;_454++){
var _455=_452[_454];
_451.removeEventListener(_455,_44f[_455],true);
}
};
TMAgent.prototype.getKeyCode=function(_456){
return _456.keyCode;
};
TMAgent.prototype.isFunctionKey=function(_457){
return (_457.charCode==0);
};
TMAgent.prototype.getEventTarget=function(_458){
return _458.target;
};
TMAgent.prototype.getFormElement=function(form,_45a){
return form.elements[_45a];
};
TMAgent.prototype.showBusyCursor=function(_45b,show){
if(show){
this._oldBodyCursor=_45b.body.style.cursor;
_45b.body.style.cursor="wait";
}else{
_45b.body.style.cursor=this._oldBodyCursor;
}
};
TMAgent.prototype.setCursor=function(el,_45e){
el.style.cursor=_45e;
};
TMAgent.eatEventCallback=function(_45f){
var _45f=(_45f!=null?_45f:TMAgent.AGENT.getDomWindow().event);
TMAgent.AGENT.eatEvent(_45f);
return false;
};
TMAgent.prototype.forceCursorChange=function(_460){
};
TMAgent.preventDefaultCallback=function(_461){
var _461=(_461!=null?_461:TMAgent.AGENT.getDomWindow().event);
TMAgent.AGENT.preventDefault(_461);
return false;
};
TMAgent.prototype.installKeyboardBlocker=function(_462,_463){
if(_463){
_462.addEventListener("keypress",TMAgent.eatEventCallback,true);
_462.addEventListener("keyup",TMAgent.eatEventCallback,true);
_462.addEventListener("keydown",TMAgent.eatEventCallback,true);
}else{
_462.removeEventListener("keypress",TMAgent.eatEventCallback,true);
_462.removeEventListener("keyup",TMAgent.eatEventCallback,true);
_462.removeEventListener("keydown",TMAgent.eatEventCallback,true);
}
};
TMAgent.prototype.setOpacity=function(_464,_465){
_464.style.opacity=(_465/100);
};
TMAgent.prototype.disableBrowserContextMenu=function(_466){
_466.oncontextmenu=new Function("return false;");
};
TMAgent.prototype.execScript=function(_467,_468){
_467.eval(_468);
};
TMAgent.prototype.disableUserSelect=function(_469){
};
TMAgent.prototype.enableUserSelect=function(_46a){
};
TMAgent.prototype.stopPropagation=function(evt){
evt.stopPropagation();
};
TMAgent.prototype.preventDefault=function(evt){
evt.preventDefault();
};
TMAgent.prototype.eatEvent=function(evt){
this.stopPropagation(evt);
this.preventDefault(evt);
};
TMAgent.prototype.getMousePosition=function(evt){
return {x:evt.clientX,y:evt.clientY};
};
TMAgent.prototype.addBubbleEventListener=function(_46f,_470,_471){
_46f.addEventListener(_470,_471,false);
};
TMAgent.prototype.removeBubbleEventListener=function(_472,_473,_474){
_472.removeEventListener(_473,_474,false);
};
TMAgent.prototype.addEventCaptures=function(node,_476){
var _477=TMAgent._REDISTRIBUTE_EVENTS;
var _478=_477.length;
for(var _479=0;_479<_478;_479++){
node.addEventListener(_477[_479],_476,true);
}
};
TMAgent.prototype.removeEventCaptures=function(node,_47b){
var _47c=TMAgent._REDISTRIBUTE_EVENTS;
var _47d=_47c.length;
for(var _47e=0;_47e<_47d;_47e++){
node.removeEventListener(_47c[_47e],_47b,true);
}
};
TMAgent.prototype.addEventBubbles=function(node,_480){
var _481=TMAgent._REDISTRIBUTE_EVENTS;
var _482=_481.length;
for(var _483=0;_483<_482;_483++){
node.addEventListener(_481[_483],_480,false);
}
};
TMAgent.prototype.removeEventBubbles=function(node,_485){
var _486=TMAgent._REDISTRIBUTE_EVENTS;
var _487=_486.length;
for(var _488=0;_488<_487;_488++){
node.removeEventListener(_486[_488],_485,false);
}
};
TMAgent.prototype.addKeyEventListener=function(_489,_48a){
_489.addEventListener("keydown",_48a,false);
};
TMAgent.prototype.removeKeyEventListener=function(_48b,_48c){
_48b.removeEventListener("keydown",_48c,false);
};
TMAgent.prototype.startMouseEventCapture=function(_48d){
for(type in _48d){
if(!(type in TMAgent.KEY_EVENTS)){
this._document.addEventListener(type,_48d[type],true);
}
}
};
TMAgent.prototype.stopMouseEventCapture=function(_48e){
for(type in _48e){
if(!(type in TMAgent.KEY_EVENTS)){
this._document.removeEventListener(type,_48e[type],true);
}
}
};
TMAgent.prototype.isMouseEvent=function(_48f){
return (TMAgent._MOUSE_EVENTS[_48f.type]!=undefined);
};
TMAgent.prototype.cloneEvent=function(_490,_491){
if(this.isMouseEvent(_490)){
var _492=(_491)?_491:_490.target;
var _493=_492.ownerDocument;
var _494=new Object();
for(var k in _490){
_494[k]=_490[k];
}
return _494;
}else{
return _490;
}
};
TMAgent.prototype.dispatchEvent=function(_496,_497){
return _496.dispatchEvent(_497);
};
TMAgent.prototype.checkMouseOutEvent=function(_498,evt){
var _49a=false;
var pos=this.getElementPosition(_498);
var _49c=this.getMousePosition(evt);
_49a=_49c.x>pos.x&&_49c.x<pos.x+_498.offsetWidth&&_49c.y>pos.y&&_49c.y<pos.y+_498.offsetHeight;
return !_49a;
};
TMAgent.prototype.isLeftButton=function(evt){
return evt.button==0;
};
TMAgent.prototype.isLeftButtonClick=function(evt){
return (evt.type=="click");
};
TMAgent.prototype.isElementHTML=function(_49f){
return true;
};
TMAgent.prototype.CreateUIInputEvent=function(_4a0,type,_4a2){
return new TMDomUIInputEvent(_4a0,type,_4a2);
};
TMAgent.prototype.mapNativeToComponentEventType=function(_4a3){
return TMAgent._NATIVE_TO_COMPONENT_MAPPINGS[_4a3];
};
TMAgent.prototype.getComponentEvent=function(_4a4,_4a5){
var type=this.mapNativeToComponentEventType(_4a5.type);
if(type){
if((type==TMComponentEvent.FOCUS_EVENT_TYPE)||(type==TMComponentEvent.BLUR_EVENT_TYPE)){
return new TMComponentEvent(_4a4,type);
}else{
return this.CreateUIInputEvent(_4a4,type,_4a5);
}
}else{
return null;
}
};
TMAgent.prototype.setAttribute=function(_4a7,_4a8,_4a9){
var _4aa=_4a7[_4a8];
if(_4aa==undefined||typeof (_4aa)!="boolean"||_4a9!="false"){
_4a7.setAttribute(_4a8,_4a9);
}
};
TMAgent.prototype.getIntAttribute=function(_4ab,_4ac,_4ad){
if(_4ad==undefined){
_4ad=null;
}
if(_4ab.hasAttribute(_4ac)){
var _4ae=_4ab.getAttribute(_4ac);
_4ae=parseInt(_4ae);
if(isNaN(_4ae)){
_4ae=_4ad;
}
}else{
_4ae=_4ad;
}
return _4ae;
};
TMAgent.prototype.getBooleanAttribute=function(_4af,_4b0,_4b1){
if(_4b1==undefined){
_4b1=null;
}
var _4b2=_4af.getAttribute(_4b0);
if(_4b2==null){
_4b2=_4b1;
}else{
if(_4b2=="true"){
_4b2=true;
}else{
if(_4b2=="false"){
_4b2=false;
}else{
_4b2=_4b1;
}
}
}
return _4b2;
};
TMAgent.prototype.getAttributeName=function(attr){
return attr.name;
};
TMAgent.prototype.getAttribute=function(node,_4b5){
return node.getAttribute(_4b5);
};
TMAgent.prototype.isAttributeSpecified=function(attr){
return attr.specified;
};
TMAgent.prototype.getNodeName=function(_4b7){
return _4b7.nodeName;
};
TMAgent.prototype.getTextContent=function(node){
return node.textContent;
};
TMAgent.prototype.setExpandoProperty=function(_4b9,_4ba,_4bb){
_4b9[_4ba]=_4bb;
};
TMAgent.prototype.getExpandoProperty=function(_4bc,_4bd,_4be){
var _4bf=_4bc[_4bd];
if(_4bf!=undefined){
return _4bf;
}else{
return _4be;
}
};
TMAgent.prototype.setAllImageTitlesFromAlts=function(){
var doc=this._document;
for(var i=0;(el=doc.getElementsByTagName("img")[i]);++i){
el.setAttribute("title",el.getAttribute("alt"));
}
};
TMAgent.prototype.setWindowTitle=function(_4c2){
var _4c3=this.getDomWindow();
_4c3.top.document.title=_4c2;
};
TMIEAgent._REDISTRIBUTE_EVENTS=["onclick","ondblclick","onkeydown","onkeyup","onkeypress","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onfocusin","onfocusout","oncontextmenu"];
TMIEAgent._CSS3_TO_IE_MAP={"auto":"auto","default":"default","none":"default","context-menu":"default","help":"help","pointer":"pointer","progress":"progress","wait":"wait","cell":"crosshair","crosshair":"crosshair","text":"text","vertical-text":"vertical-text","alias":"crosshair","copy":"crosshair","move":"move","no-drop":"no-drop","not-allowed":"not-allowed","e-resize":"e-resize","n-resize":"n-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","s-resize":"s-resize","se-resize":"se-resize","sw-resize":"sw-resize","w-resize":"w-resize","ew-resize":"e-resize","ns-resize":"n-resize","nesw-resize":"move","col-resize":"col-resize","row-resize":"row-resize","all-scroll":"all-scroll","inherit":"auto"};
TMIEAgent._CSS_TO_DOM_MAP={"float":"styleFloat"};
function TMIEAgent(_4c4){
this.Init(_4c4);
}
TMObject.createSubclass(TMIEAgent,TMAgent);
TMIEAgent._IN_CAPTURE="_afrInCapture";
TMIEAgent.prototype.Init=function(_4c5){
var _4c6=navigator.userAgent.toLowerCase();
var a11=_4c6.match(/msie (\d+\.\d+);/);
if(a11==null){
a11=_4c6.match(/msie (\d+\.\d+)b;/);
}
var _4c8=parseFloat(a11[1]);
TMIEAgent.superclass.Init.call(this,TMAgent.IE_PLATFORM,_4c8,_4c5);
};
TMIEAgent.prototype.getElementById=function(id){
var node=this._document.getElementById(id);
return node;
};
TMIEAgent.prototype.elementsRemoved=function(node){
var _4cc=this._ID_TO_DOM_MAP;
var _4cd=node.id;
if(_4cd!=null){
delete _4cc[_4cd];
}
var _4ce=node.all;
var _4cf=_4ce.length;
for(var i=0;i<_4cf;i++){
var _4d1=_4ce(i);
var _4d2=_4d1.id;
if(_4d2){
delete _4cc[_4d2];
}
}
};
TMIEAgent.prototype.elementsAdded=function(node){
var _4d4=this._ID_TO_DOM_MAP;
var _4d5=node.id;
if(_4d5!=null){
_4d4[_4d5]=node;
}
var _4d6=node.all;
var _4d7=_4d6.length;
for(var i=0;i<_4d7;i++){
var _4d9=_4d6(i);
var _4da=_4d9.id;
if(_4da){
_4d4[_4da]=_4d9;
}
}
};
TMIEAgent._doNothing=function(){
var evt=TMAgent.AGENT.getDomWindow().event;
evt.returnValue=false;
return false;
};
TMIEAgent.prototype.disableUserSelect=function(_4dc){
if(_4dc){
_4dc.attachEvent("onselectstart",TMIEAgent._doNothing);
}
};
TMIEAgent.prototype.enableUserSelect=function(_4dd){
if(_4dd){
_4dd.detachEvent("onselectstart",TMIEAgent._doNothing);
}
};
TMIEAgent.prototype.addBubbleEventListener=function(el,_4df,_4e0){
el.attachEvent("on"+_4df,_4e0);
};
TMIEAgent.prototype.removeBubbleEventListener=function(_4e1,_4e2,_4e3){
_4e1.detachEvent("on"+_4e2,_4e3);
};
TMIEAgent.prototype.stopPropagation=function(evt){
evt.cancelBubble=true;
};
TMIEAgent.prototype.preventDefault=function(evt){
evt.returnValue=false;
var _4e6=evt.keyCode;
if(_4e6&&(_4e6!=17)&&(_4e6!=16)){
try{
evt.keyCode=0;
}
catch(e){
}
}
};
TMIEAgent.prototype.startDocumentKeyEventCapture=function(_4e7,_4e8){
var _4e9=TMAgent.KEY_EVENTS;
var _4ea=_4e9.length;
for(var _4eb=0;_4eb<_4ea;_4eb++){
var _4ec=_4e9[_4eb];
var _4ed=_4e7[_4ec];
if(_4ed){
_4e8.attachEvent("on"+_4ec,_4ed);
}
}
var _4ee=null;
var _4ef=_4e8.ownerDocument.activeElement;
if(_4ef){
var _4f0=_4ef.id;
_4ee={"activeElement":_4ef,"activeID":_4f0};
}
_4e8.focus();
return _4ee;
};
TMIEAgent.prototype.endDocumentKeyEventCapture=function(_4f1,_4f2,_4f3){
var _4f4=TMAgent.KEY_EVENTS;
var _4f5=_4f4.length;
for(var _4f6=0;_4f6<_4f5;_4f6++){
var _4f7=_4f4[_4f6];
var _4f8=_4f1[_4f7];
if(_4f8){
_4f2.detachEvent("on"+_4f7,_4f8);
}
}
if(_4f3){
var _4f9=_4f3.activeElement;
if(_4f9){
var _4fa=_4f2.ownerDocument;
if(!TMDomUtils.isNodeInDocumentHierarchy(_4fa,_4f9)){
var _4fb=_4f3.activeID;
if(_4fb){
_4f9=this.getElementById(_4fb);
}else{
_4f9=null;
}
}
if(_4f9){
_4f9.setActive();
}
}
}
};
TMIEAgent.prototype.isFunctionKey=function(_4fc){
var _4fd=_4fc.keyCode;
return (_4fd>=112&&_4fd<=123);
};
TMIEAgent.prototype.getEventTarget=function(_4fe){
if(_4fe){
return _4fe.srcElement;
}
return null;
};
TMIEAgent.prototype.cloneEvent=function(_4ff,_500){
var _501=(_500)?_500:_4ff.srcElement;
return _501.ownerDocument.createEventObject(_4ff);
};
TMIEAgent.prototype.dispatchEvent=function(_502,_503){
return _502.fireEvent("on"+_503.type,_503);
};
TMIEAgent.prototype.CreateUIInputEvent=function(_504,type,_506){
return new TMIEUIInputEvent(_504,type,_506);
};
TMIEAgent.prototype.getFormElement=function(form,_508){
var _509=null;
for(var i=0;i<form.elements.length;i++){
var _50b=form.elements[i];
if(_50b.name==_508){
_509=_50b;
break;
}
}
return _509;
};
TMIEAgent.prototype.addEventBubbles=function(_50c,_50d){
var _50e=TMIEAgent._REDISTRIBUTE_EVENTS;
var _50f=_50e.length;
for(var _510=0;_510<_50f;_510++){
_50c[_50e[_510]]=_50d;
}
};
TMIEAgent.prototype.removeEventBubbles=function(_511,_512){
var _513=TMIEAgent._REDISTRIBUTE_EVENTS;
var _514=_513.length;
for(var _515=0;_515<_514;_515++){
_511[_513[_515]]=null;
}
};
TMIEAgent.prototype.addKeyEventListener=function(_516,_517){
_516.attachEvent("onkeydown",_517);
};
TMIEAgent.prototype.removeKeyEventListener=function(_518,_519){
_518.detachEvent("onkeydown",_519);
};
TMIEAgent.prototype.addEventCaptures=function(node,_51b){
var _51c=node.id;
var _51d=this._EVENT_CAPTURES;
var _51e=_51d[_51c];
if(_51e==null){
_51e=new Array();
_51d[_51c]=_51e;
}
_51e.push(_51b);
_51d._captureRefCount++;
if(_51d._captureRefCount==1){
var _51f=this._getCaptureDiv();
_51f.setCapture(false);
}
};
TMIEAgent.prototype.removeEventCaptures=function(node,_521){
var _522=node.id;
var _523=this._EVENT_CAPTURES;
var _524=_523[_522];
if(_524==null){
return;
}
var _525=TMCollections.removeArrayValue(_524,_521);
if(_524.length==0){
delete _523[_522];
}
_523._captureRefCount--;
if(_523._captureRefCount==0){
var _526=this._getCaptureDiv();
_526.releaseCapture();
}
};
TMIEAgent.prototype.checkMouseOutEvent=function(_527,evt){
var _529=false;
var _52a=evt.toElement;
while(_52a!=null){
if(_52a==_527){
_529=true;
break;
}
_52a=_52a.parentNode;
}
return !_529;
};
TMIEAgent.prototype.isLeftButton=function(evt){
return this.getDomWindow().event.button==1;
};
TMIEAgent.prototype.getMousePosition=function(evt){
var _52d=this.getDomDocument();
var _52e=_52d.documentElement;
return {x:evt.clientX+_52e.scrollLeft-_52e.clientLeft,y:evt.clientY+_52e.scrollTop-_52e.clientTop};
};
TMIEAgent.prototype.startMouseEventCapture=function(_52f){
var _530=this.getDomDocument().documentElement;
_530[TMIEAgent._IN_CAPTURE]=true;
_530.setCapture();
for(type in _52f){
if(!(type in TMAgent.KEY_EVENTS)){
_530.attachEvent("on"+type,_52f[type]);
}
}
};
TMIEAgent.prototype.stopMouseEventCapture=function(_531){
var _532=this.getDomDocument().documentElement;
_532[TMIEAgent._IN_CAPTURE]=false;
_532.releaseCapture();
for(type in _531){
if(!(type in TMAgent.KEY_EVENTS)){
_532.detachEvent("on"+type,_531[type]);
}
}
};
TMIEAgent.prototype.getComputedStyle=function(_533){
return _533.currentStyle;
};
TMIEAgent.prototype.setCursor=function(el,_535){
var _536=el.ownerDocument.documentElement;
if(_536[TMIEAgent._IN_CAPTURE]){
el=_536;
}
el.style.cursor=_535;
};
TMIEAgent.prototype.setOpacity=function(_537,_538){
_537.style.filter="alpha(opacity="+_538+")";
};
TMIEAgent.prototype.createElementWithName=function(type,name){
el=document.createElement("<"+type+" name='"+name+"'></"+type+">");
return el;
};
TMIEAgent.prototype.setTableRowHeight=function(row,_53c){
var _53d=0;
var _53e=0;
var _53f=row.cells[0];
if(_53f){
var _540=this.getComputedStyle(_53f);
_53d=TMAgent.getCSSLengthAsInt(_540.paddingTop);
_53e=TMAgent.getCSSLengthAsInt(_540.paddingBottom);
borderTop=TMAgent.getCSSLengthAsInt(_540.borderTopWidth);
borderBottom=TMAgent.getCSSLengthAsInt(_540.borderBottomWidth);
}
row.style.height=(_53c-_53d-_53e-borderTop-borderBottom)+"px";
};
TMIEAgent.prototype.execScript=function(_541,_542){
if(_542&&(_542.length>0)){
_541.execScript(_542);
}
};
TMIEAgent.prototype.getWindowHeight=function(){
if(this.isBackwardCompatible()){
return this.getDomDocument().body.clientHeight;
}else{
return this.getDomDocument().documentElement.clientHeight;
}
};
TMIEAgent.prototype.getWindowWidth=function(){
if(this.isBackwardCompatible()){
return this.getDomDocument().body.clientWidth;
}else{
return this.getDomDocument().documentElement.clientWidth;
}
};
TMIEAgent.prototype.getElementPageBounds=function(_543){
var _544=_543.getBoundingClientRect();
var _545=_543.ownerDocument.documentElement;
deltaX=2-_545.scrollLeft;
deltaY=2-_545.scrollTop;
return {top:(_544.top-deltaY),left:(_544.left-deltaX),bottom:(_544.bottom-deltaY),right:(_544.right-deltaX)};
};
TMIEAgent.prototype.pointInElementBounds=function(_546,_547,_548){
var _549=_546.getBoundingClientRect();
var _54a=_546.ownerDocument.documentElement;
_547+=_54a.scrollLeft+2;
_548+=_54a.scrollTop+2;
return (_548>=_549.top)&&(_548<=_549.bottom)&&(_547>=_549.left)&&(_547<=_549.right);
};
TMIEAgent.prototype.getElementPosition=function(_54b){
if(this.isBackwardCompatible()){
var a=TMIEAgent.superclass.getElementPosition.call(this,_54b);
return a;
}else{
var _54d=_54b.getBoundingClientRect();
var _54e=_54d.top;
var _54f=_54d.left;
var _550=_54b.ownerDocument.documentElement;
_54f-=(_550.clientLeft-this.getWindowScrollLeft());
_54e-=(_550.clientTop-this.getWindowScrollTop());
return {x:_54f,y:_54e};
}
};
TMIEAgent.prototype.getIntAttribute=function(_551,_552,_553){
if(_551.attributes==null){
return _553;
}
var _554=_551.getAttribute(_552);
if(_554==undefined){
return _553;
}
if(typeof _554=="string"){
_554=parseInt(_554);
}
return _554;
};
TMIEAgent.prototype.getBooleanAttribute=function(_555,_556,_557){
var _558=_555.getAttribute(_556);
if(_558==true||_558==false){
return _558;
}
return TMIEAgent.superclass.getBooleanAttribute.call(this,_555,_556,_557);
};
TMIEAgent.prototype.getTextContent=function(node){
switch(node.nodeType){
case 1:
var _55a=node.innerText;
if(_55a==undefined){
_55a=node.text;
}
return _55a;
case 2:
case 5:
case 6:
case 11:
case 3:
case 4:
case 8:
case 7:
return node.nodeValue;
case 9:
case 10:
case 12:
return null;
}
};
TMIEAgent.prototype.getCursor=function(_55b){
return TMIEAgent._CSS3_TO_IE_MAP[_55b];
};
function TMGeckoAgent(_55c,_55d){
if(arguments.length){
this.Init(_55c,_55d);
}
}
TMObject.createSubclass(TMGeckoAgent,TMAgent);
TMGeckoAgent.InitClass=function(){
TMGeckoAgent._NBSP_STRING=String.fromCharCode(160);
};
TMGeckoAgent.prototype.Init=function(_55e,_55f){
TMGeckoAgent.superclass.Init.call(this,TMAgent.GECKO_PLATFORM,_55e,_55f);
};
TMGeckoAgent.prototype.getElementById=function(id){
node=this._document.getElementById(id);
return node;
};
TMGeckoAgent.prototype.elementsRemoved=function(node){
var _562=this._ID_TO_DOM_MAP;
var _563=node.id;
if(_563!=null){
delete _562[_563];
}
if(node.firstChild){
var _564=this.getDomDocument().evaluate(".//*[@id]",node,null,XPathResult.ANY_TYPE,null);
var _565=_564.iterateNext();
while(_565){
delete _562[_565.id];
_565=_564.iterateNext();
}
}
};
TMGeckoAgent.prototype.elementsAdded=function(node){
var _567=this._ID_TO_DOM_MAP;
var _568=node.id;
if(_568!=null){
_567[_568]=node;
}
if(node.firstChild){
var _569=this.getDomDocument().evaluate(".//*[@id]",node,null,XPathResult.ANY_TYPE,null);
var _56a=_569.iterateNext();
while(_56a){
_567[_56a.id]=_56a;
_56a=_569.iterateNext();
}
}
};
TMGeckoAgent.prototype.disableUserSelect=function(_56b){
_56b.style.MozUserSelect="none";
};
TMGeckoAgent.prototype.enableUserSelect=function(_56c){
_56c.style.MozUserSelect="";
};
TMGeckoAgent.prototype.getCursor=function(_56d){
return _56d;
};
TMGeckoAgent.prototype.isLeftButtonClick=function(evt){
return ((evt.type=="click")&&(evt.button==0));
};
TMGeckoAgent.prototype.getKeyCode=function(_56f){
if(this.isFunctionKey(_56f)){
return _56f.keyCode;
}else{
var code=_56f.charCode;
if(code>=97&&code<=122){
return (code-32);
}else{
return code;
}
}
};
TMGeckoAgent.prototype.isElementHTML=function(_571){
return _571 instanceof HTMLElement;
};
TMGeckoAgent._resetThrobber=function(_572){
var _573=TMAgent.AGENT;
if(_573._needsReset){
_573._needsReset=false;
var _574=_573.getDomDocument();
var _575=_574.documentElement;
var _576=_574.createElement("iframe");
_576.frameBorder="none";
_576.scrolling="no";
_576.style.zIndex=900;
_576.style.position="absolute";
_576.style.borderStyle="none";
_576.style.top=_575.style.top;
_576.style.left=_575.style.left;
_576.style.width=_575.offsetWidth+"px";
_576.style.height=_575.offsetHeight+"px";
_574.body.appendChild(_576);
_574.body.removeChild(_576);
}
};
TMGeckoAgent.prototype.addEventBubbles=function(_577,_578){
var _579=TMGeckoAgent.superclass.addEventBubbles;
_579.call(this,_577,_578);
_579.call(this,_577,TMGeckoAgent._resetThrobber);
};
TMGeckoAgent.prototype.removeEventBubbles=function(_57a,_57b){
var _57c=TMGeckoAgent.superclass.removeEventBubbles;
_57c.call(this,_57a,_57b);
_57c.call(this,_57a,TMGeckoAgent._resetThrobber);
};
TMGeckoAgent.prototype.addKeyEventListener=function(node,_57e){
node.addEventListener("keypress",_57e,false);
};
TMGeckoAgent.prototype.stopPropagation=function(evt){
evt.cancelBubble=true;
evt.stopPropagation();
};
TMGeckoAgent.prototype.removeKeyEventListener=function(node,_581){
node.removeEventListener("keypress",_581,false);
};
TMGeckoAgent.prototype.CreateUIInputEvent=function(_582,type,_584){
return new TMGeckoUIInputEvent(_582,type,_584);
};
TMGeckoAgent.prototype.getMousePosition=function(evt){
return {x:evt.pageX,y:evt.pageY};
};
TMGeckoAgent.prototype.getElementPosition=function(_586){
var _587=_586.ownerDocument;
var _588=_587.getBoxObjectFor(_586);
var _589=_588.screenY;
var _58a=_588.screenX;
_588=_587.getBoxObjectFor(_587.documentElement);
_589-=_588.screenY;
_58a-=_588.screenX;
return {x:_58a,y:_589};
};
TMGeckoAgent.prototype.getElementLeft=function(_58b){
var _58c=0;
var _58d=_58b;
while(_58d!=null){
currScrollLeft=_58d.scrollLeft;
if(currScrollLeft>0){
_58c+=currScrollLeft;
}
_58d=_58d.parentNode;
}
return _58b.ownerDocument.getBoxObjectFor(_58b).x-_58c;
};
TMGeckoAgent.prototype.getElementTop=function(_58e){
var _58f=0;
var _590=_58e;
while(_590!=null){
currScrollTop=_590.scrollTop;
if(currScrollTop>0){
_58f+=currScrollTop;
}
_590=_590.parentNode;
}
return _58e.ownerDocument.getBoxObjectFor(_58e).y-_58f;
};
TMGeckoAgent.prototype.getElementPageBounds=function(_591){
var _592=_591.ownerDocument;
var _593=_592.getBoxObjectFor(_591);
var _594=0;
var _595=0;
var _596=_591;
while(_596!=null){
_594+=_596.scrollTop;
_595+=_596.scrollLeft;
_596=_596.offsetParent;
}
var _597=_593.y-_594;
var _598=_593.x-_595;
var _599;
var _59a;
if(_591==_592.documentElement){
_599=_591.clientWidth;
_59a=_591.clientHeight;
}else{
_599=_593.width;
_59a=_593.height;
}
return {top:_597,left:_598,bottom:(_597+_59a),right:(_598+_599)};
};
TMGeckoAgent.prototype.pointInElementBounds=function(_59b,_59c,_59d){
var _59e=0;
var _59f=0;
var _5a0=_59b.offsetParent;
while(_5a0!=null){
_59e+=_5a0.scrollTop;
_59f+=_5a0.scrollLeft;
_5a0=_5a0.offsetParent;
}
_59d+=_59e;
_59c+=_59f;
var _5a1=_59b.ownerDocument;
var _5a2=_5a1.getBoxObjectFor(_59b);
if((_59d>=_5a2.y)&&(_59c>=_5a2.x)){
var _5a3;
var _5a4;
if(_59b==_5a1.documentElement){
_5a3=_59b.clientWidth;
_5a4=_59b.clientHeight;
}else{
_5a3=_5a2.width;
_5a4=_5a2.height;
}
return (_59d<=_5a2.y+_5a4)&&(_59c<=_5a2.x+_5a3);
}
return false;
};
function TMOperaAgent(_5a5){
this.Init(_5a5);
}
TMObject.createSubclass(TMOperaAgent,TMAgent);
TMOperaAgent.prototype.Init=function(_5a6){
var _5a7=navigator.userAgent.toLowerCase();
var _5a8=_5a7.match(/^opera\s*\/?\s*(\d+\.\d+)/);
var _5a9=7.54;
if(_5a8&&(_5a8.length>=2)){
_5a9=parseFloat(_5a8[1]);
}
TMOperaAgent.superclass.Init.call(this,TMAgent.OPERA_PLATFORM,_5a9,_5a6);
};
TMOperaAgent.prototype.isLeftButton=function(evt){
return this.getDomWindow().event.button==1;
};
TMOperaAgent.prototype.preventDefault=function(evt){
evt.returnValue=false;
};
TMAgent.prototype.CreateUIInputEvent=function(_5ac,type,_5ae){
return new TMIEUIInputEvent(_5ac,type,_5ae);
};
function TMSafariAgent(_5af){
this.Init(_5af);
}
TMObject.createSubclass(TMSafariAgent,TMAgent);
TMSafariAgent.prototype.setOpacity=function(_5b0,_5b1){
TMSafariAgent.superclass.setOpacity.call(this,_5b0,_5b1);
_5b0.style.setAttribute("-khtml-opacity",(_5b1/100));
};
function TMAutoDismissalManager(){
this.Init();
}
TMObject.createSubclass(TMAutoDismissalManager);
TMAutoDismissalManager.prototype.Init=function(){
this._componentStack=new Array();
};
TMAutoDismissalManager.prototype.dispose=function(){
this._componentStack=null;
this._unregisterEventHandlers();
};
TMAutoDismissalManager.prototype.addBehavior=function(_5b2,_5b3){
if(this.hasComponent(_5b2)){
return;
}
var type=_5b3[TMDhtmlPopupWindow.HINT_AUTODISMISS];
switch(type){
case TMDhtmlPopupWindow.HINT_AUTODISMISS_MENU:
case TMDhtmlPopupWindow.HINT_AUTODISMISS_ALWAYS:
case TMDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT:
this._addComponent(_5b2,type,_5b3[TMDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT_ID]);
break;
}
};
TMAutoDismissalManager.prototype.removeBehavior=function(_5b5){
var id=_5b5.getClientId();
var _5b7=this._componentStack.length;
for(var i=0;i<_5b7;i++){
var _5b9=this._componentStack[i];
var _5ba=_5b9["id"];
if(_5ba==id){
for(var j=i;j<_5b7;j++){
this._popComponent();
}
break;
}
}
};
TMAutoDismissalManager.prototype.changeBehavior=function(_5bc,_5bd){
var id=_5bc.getClientId();
var _5bf=this._componentStack.length;
var type=_5bd[TMDhtmlPopupWindow.HINT_AUTODISMISS];
for(var i=0;i<_5bf;i++){
var _5c2=this._componentStack[i];
var _5c3=_5c2["id"];
if(_5c3==id){
if(type==TMDhtmlPopupWindow.HINT_AUTODISMISS_NEVER){
for(var j=i+1;j<_5bf;j++){
this._popComponent();
}
this._popComponent(true);
}else{
_5c2["type"]=type;
}
break;
}
}
};
TMAutoDismissalManager.prototype.hasComponents=function(){
return this._componentStack.length>0;
};
TMAutoDismissalManager.prototype.hasComponent=function(_5c5){
var _5c6=_5c5.getClientId();
var _5c7=this._componentStack.length;
for(var i=0;i<_5c7;i++){
if(this._componentStack[i]["id"]==_5c6){
return true;
}
}
return false;
};
TMAutoDismissalManager.prototype.closeAll=function(){
var _5c9=this._componentStack.length;
for(var i=0;i<_5c9;i++){
this._popComponent();
}
};
TMAutoDismissalManager.prototype._addComponent=function(_5cb,type,_5cd){
var id=_5cb.getClientId();
var peer=_5cb.getPeer();
var _5d0=peer.getDomElement();
this.dismiss(_5d0);
var _5d1=new Object();
_5d1["id"]=id;
_5d1["type"]=type;
_5d1["autodismissMouseOutId"]=_5cd;
if(this._componentStack.length==0){
this._registerEventHandlers();
}
this._componentStack.push(_5d1);
};
TMAutoDismissalManager.prototype.dismiss=function(_5d2){
for(var i=this._componentStack.length-1;i>=0;i--){
var _5d4=this._componentStack[i];
if(this.cancelDismissal(_5d2,_5d4)){
break;
}else{
this._popComponent();
}
}
};
TMAutoDismissalManager.prototype._dismissOnMouseOver=function(_5d5){
for(var i=this._componentStack.length-1;i>=0;i--){
var _5d7=this._componentStack[i];
if(_5d7.type==TMDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT&&!this.cancelDismissal(_5d5,_5d7)){
this._popComponent();
}
}
};
TMAutoDismissalManager.prototype.cancelDismissal=function(_5d8,_5d9){
var _5da=_5d9["id"];
var _5db=_5d9["autodismissMouseOutId"];
var _5dc=TMPage.PAGE.findComponent(_5da);
var _5dd=_5dc.getPeer();
_5dd.bind(_5dc);
var _5de=_5dd.getAllPopups(_5dc);
if(_5de==null){
return false;
}
var _5df=this.targetInPopup(_5d8,_5de)||this.popupUnderneathGlassPane(_5de);
var _5e0;
switch(_5d9["type"]){
case TMDhtmlPopupWindow.HINT_AUTODISMISS_ALWAYS:
_5e0=_5df;
break;
case TMDhtmlPopupWindow.HINT_AUTODISMISS_MENU:
_5e0=_5df||this.targetInOwner(_5d8,_5dc);
break;
case TMDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT:
if(_5db){
_5e0=_5df||TMDomUtils.isAncestorOrSelf(TMAgent.AGENT.getElementById(_5db),_5d8);
}else{
_5e0=_5df||this.targetInOwner(_5d8,_5dc);
}
break;
}
return _5e0;
};
TMAutoDismissalManager.prototype.targetInPopup=function(_5e1,_5e2){
for(var _5e3 in _5e2){
var _5e4=_5e2[_5e3];
var _5e5=_5e4.getElement();
if(TMDomUtils.isAncestor(_5e5,_5e1)){
return true;
}
}
return false;
};
TMAutoDismissalManager.prototype.popupUnderneathGlassPane=function(_5e6){
for(var _5e7 in _5e6){
var _5e8=_5e6[_5e7];
var _5e9=_5e8.getElement();
var _5ea=TMPage.PAGE.getModalityManager();
if(_5ea.isGlassPaneVisible()){
if(!_5ea.isAboveTopGlassPane(_5e9)){
return true;
}
}
}
return false;
};
TMAutoDismissalManager.prototype.targetInOwner=function(_5eb,_5ec){
var _5ed=_5ec.getPeer();
_5ed.bind(_5ec);
var _5ee=_5ed.getDomElement();
return TMDomUtils.isAncestorOrSelf(_5ee,_5eb);
};
TMAutoDismissalManager.prototype._popComponent=function(_5ef){
var obj=this._componentStack.pop();
var id=obj["id"];
var _5f2=TMPage.PAGE.findComponent(id);
if(this._componentStack.length==0){
this._unregisterEventHandlers();
}
if(!_5ef){
if(_5f2 instanceof TMUIMenuComponent){
var peer=_5f2.getPeer();
peer.hidePopup();
}else{
var peer=_5f2.getPeer();
peer.hideAllPopups(_5f2);
}
}
};
TMAutoDismissalManager.prototype._registerEventHandlers=function(){
var _5f4=TMAgent.AGENT,isIE=_5f4.isIE();
var _5f6=_5f4.getDomDocument();
_5f4.addBubbleEventListener(_5f6,"keyup",TMAutoDismissalManager._handleKeyUp);
_5f4.addBubbleEventListener(_5f6.body,"mousedown",TMAutoDismissalManager._handleMouseDown);
_5f4.addBubbleEventListener(_5f6,"mouseover",TMAutoDismissalManager._handleMouseOver);
};
TMAutoDismissalManager.prototype._unregisterEventHandlers=function(){
var _5f7=TMAgent.AGENT,isIE=_5f7.isIE();
var _5f9=_5f7.getDomDocument();
_5f7.removeBubbleEventListener(_5f9,"keyup",TMAutoDismissalManager._handleKeyUp);
_5f7.removeBubbleEventListener(_5f9.body,"mousedown",TMAutoDismissalManager._handleMouseDown);
_5f7.removeBubbleEventListener(_5f9,"mouseover",TMAutoDismissalManager._handleMouseOver);
};
TMAutoDismissalManager._handleFocusIn=function(evt){
var _5fb=TMAgent.AGENT.getEventTarget(evt);
if(_5fb&&_5fb.tagName=="IFRAME"){
TMPage.PAGE.getAutoDismissalManager().dismiss(_5fb);
}
};
TMAutoDismissalManager._handleMouseDown=function(evt){
var _5fd=TMAgent.AGENT.getEventTarget(evt);
TMPage.PAGE.getAutoDismissalManager().dismiss(_5fd);
};
TMAutoDismissalManager._handleKeyUp=function(evt){
var _5ff=evt.keyCode||evt.which;
if(_5ff==9){
var _600=TMAgent.AGENT.getEventTarget(evt);
TMPage.PAGE.getAutoDismissalManager().dismiss(_600);
}
};
TMAutoDismissalManager._handleBlur=function(evt){
if(TMAgent&&evt.target instanceof HTMLDocument){
var _602=TMAgent.AGENT.getEventTarget(evt);
TMPage.PAGE.getAutoDismissalManager().dismiss(_602);
}
};
TMAutoDismissalManager._handleMouseOver=function(evt){
TMAutoDismissalManager._lastMOTarget=TMAgent.AGENT.getEventTarget(evt);
if(!TMAutoDismissalManager._moTimeout){
TMAutoDismissalManager._moTimeout=TMPage.PAGE.getDomWindow().setTimeout(TMAutoDismissalManager._handleMouseOverTimeout,300);
}
};
TMAutoDismissalManager._handleMouseOverTimeout=function(){
TMPage.PAGE.getAutoDismissalManager()._dismissOnMouseOver(TMAutoDismissalManager._lastMOTarget);
delete TMAutoDismissalManager._moTimeout;
};
function TMModalityManager(){
this.Init();
}
TMObject.createSubclass(TMModalityManager);
TMModalityManager.prototype.Init=function(){
TMModalityManager.superclass.Init.call(this);
this._modalElementStack=[];
this._glassPaneStack=[];
};
TMModalityManager.prototype.dispose=function(){
this._modalElementStack=null;
this._glassPaneStack=null;
};
TMModalityManager.prototype.pushModal=function(_604){
var _605=_604.ownerDocument;
if(this.isGlassPaneVisible()){
var _606=this._glassPaneStack[this._glassPaneStack.length-1];
_606.style.display="none";
}else{
var _607=TMAgent.AGENT,isIE=_607.isIE();
var _609=_607.getDomWindow();
this._setupEventHandler(_607,"_handleResize","resize",true,_609);
}
var _60a=_604.parentNode;
var _60b=this._createGlassPane();
_60a.insertBefore(_60b,_604);
_60b.style.zIndex=_604.style.zIndex-1;
this._modalElementStack.push(_604);
this._glassPaneStack.push(_60b);
this._handleResize();
};
TMModalityManager.prototype.popModal=function(){
var _60c=this._modalElementStack.pop();
var _60d=this._glassPaneStack.pop();
_60d.style.width="1px";
_60d.style.height="1px";
var _60e=_60c.parentNode;
_60e.removeChild(_60d);
if(this._modalElementStack.length>0){
var _60f=this._glassPaneStack[this._glassPaneStack.length-1];
_60f.style.display="block";
}else{
var _610=TMAgent.AGENT,isIE=_610.isIE();
var _612=_610.getDomDocument();
var _613=_610.getDomWindow();
this._setupEventHandler(_610,"_handleResize","resize",false,_613);
}
};
TMModalityManager.prototype._createGlassPane=function(){
var el=TMPage.PAGE.getDomDocument().createElement("div");
el.style.position="absolute";
el.style.display="block";
el.style.backgroundColor="#999999";
el.unselectable="on";
var _615=TMAgent.AGENT,isIE=_615.isIE();
if(!isIE){
this._setupEventHandler(_615,"_handleMouseDownOnGlassPane","mousedown",true,el);
}
if(isIE){
el.style.filter="alpha(opacity:50)";
}else{
el.style.opacity="0.5";
}
return el;
};
TMModalityManager.prototype._handleMouseDownOnGlassPane=function(evt){
evt.preventDefault();
evt.stopPropagation();
};
TMModalityManager.prototype._handleResize=function(){
var _618=TMAgent.AGENT;
var _619=_618.getDomDocument().documentElement;
for(var i=0;i<this._glassPaneStack.length;i++){
var _61b=this._glassPaneStack[i];
_61b.style.width=_619.scrollWidth+"px";
_61b.style.height=_619.scrollHeight+"px";
}
};
TMModalityManager.prototype.getTopGlassPane=function(){
if(this.isGlassPaneVisible()){
return this._glassPaneStack[this._glassPaneStack.length-1];
}
};
TMModalityManager.prototype._setupEventHandler=function(_61c,_61d,_61e,_61f,_620){
var _621=_61d+"Stub";
if(this[_621]==null){
this[_621]=this.createCallback(this[_61d]);
}
if(!_620){
_620=_61c.getDomDocument().body;
}
if(_61f){
_61c.addBubbleEventListener(_620,_61e,this[_621]);
}else{
_61c.removeBubbleEventListener(_620,_61e,this[_621]);
}
};
TMModalityManager.prototype.isAboveTopGlassPane=function(_622){
var _623=function(_624){
return _622==_624;
};
return this._traverseAhead(this.getTopGlassPane(),true,_623);
};
TMModalityManager.prototype._traverseAhead=function(_625,_626,_627){
var _628=false;
if(_625){
_628=_628||_627(_625);
_628=_628||this._traverseAhead(_625.firstChild,false,_627);
_628=_628||this._traverseAhead(_625.nextSibling,false,_627);
if(!_628){
if(_626){
for(var _629=_625.parentNode;_629;_629=_629.parentNode){
_628=_628||this._traverseAhead(_629.nextSibling,false,_627);
}
}
}
}
return _628;
};
TMModalityManager.prototype.isGlassPaneVisible=function(){
return (this._glassPaneStack.length>0);
};
function TMPositionManager(){
this.Init();
}
TMObject.createSubclass(TMPositionManager);
TMPositionManager.InitClass=function(){
this.TOP=0;
this.MIDDLE=1;
this.BOTTOM=2;
this.LEFT=3;
this.CENTER=4;
this.RIGHT=5;
this.MIN_WIDTH=32;
this._SHADOW_TOLERENCE=7;
};
TMPositionManager.prototype.Init=function(){
TMPositionManager.superclass.Init.call(this);
this._elements=new Array();
this._isRTL=false;
var _62a=TMAgent.AGENT;
var _62b=_62a.getDomWindow(),_62c=_62a.getDomDocument();
var _62d=this.createCallback(this._repostionOnScroll);
_62a.addBubbleEventListener(_62c,"mousewheel",_62d);
if(!_62a.isIE()){
_62a.addBubbleEventListener(_62c,"DOMMouseScroll",_62d);
}
_62a.addBubbleEventListener(_62b,"resize",_62d);
};
TMPositionManager.prototype.dispose=function(){
this._elements=null;
};
TMPositionManager.prototype.addFloatingElement=function(_62e,_62f){
return this._addFloatingElement(_62e,_62f);
};
TMPositionManager.prototype.addFloatingElementByPosition=function(_630,pos){
_630.setAlignPosition(pos);
var _632=TMDhtmlPopupWindow.ALIGN_AFTER_START;
return this._addFloatingElement(_630,_632);
};
TMPositionManager.prototype._addFloatingElement=function(_633,_634){
var _635=TMPositionManager.BOTTOM;
var top=TMPositionManager.TOP;
var _637="start";
var end="end";
switch(_634){
case TMDhtmlPopupWindow.ALIGN_AFTER_START:
var _639=[_635,top];
var _63a=[_637,_637];
break;
case TMDhtmlPopupWindow.ALIGN_AFTER_END:
var _639=[_635,top];
var _63a=[end,end];
break;
case TMDhtmlPopupWindow.ALIGN_BEFORE_START:
var _639=[top,_635];
var _63a=[_637,_637];
break;
case TMDhtmlPopupWindow.ALIGN_BEFORE_END:
var _639=[top,_635];
var _63a=[end,end];
break;
case TMDhtmlPopupWindow.ALIGN_END_AFTER:
var _639=[_635,_635];
var _63a=[end,_637];
break;
case TMDhtmlPopupWindow.ALIGN_END_BEFORE:
var _639=[top,top];
var _63a=[end,_637];
break;
case TMDhtmlPopupWindow.ALIGN_START_AFTER:
var _639=[_635,_635];
var _63a=[_637,end];
break;
case TMDhtmlPopupWindow.ALIGN_START_BEFORE:
var _639=[top,top];
var _63a=[_637,end];
break;
case TMDhtmlPopupWindow.ALIGN_OVERLAP:
var _639=[top,top];
var _63a=[_637,_637];
break;
case "_note_window_alignment":
var _639=[top,_635];
var _63a=[end,_637];
break;
}
_63a=[this._convertHorizontal(_63a[0]),this._convertHorizontal(_63a[1])];
var _63b=this._getBehavior(_639);
var _63c=this._getBehavior(_63a);
var _63d=this._addElement(_633,_63b,_63c);
return _63d;
};
TMPositionManager.prototype._inversePosition=function(_63e){
switch(_63e){
case TMPositionManager.TOP:
return TMPositionManager.BOTTOM;
case TMPositionManager.BOTTOM:
return TMPositionManager.TOP;
case TMPositionManager.LEFT:
return TMPositionManager.RIGHT;
case TMPositionManager.RIGHT:
return TMPositionManager.LEFT;
}
};
TMPositionManager.prototype._positionToString=function(_63f){
switch(_63f){
case TMPositionManager.TOP:
return "Top";
case TMPositionManager.BOTTOM:
return "Bottom";
case TMPositionManager.LEFT:
return "Left";
case TMPositionManager.RIGHT:
return "Right";
}
};
TMPositionManager.prototype._getBehavior=function(_640){
var _641="_prefer"+this._positionToString(_640[0])+this._positionToString(_640[1])+"Condition";
var _642=this[_641];
return new Array({alignElementAnchor:this._inversePosition(_640[0]),floatingElementAnchor:this._inversePosition(_640[1]),condition:_642},{alignElementAnchor:_640[0],floatingElementAnchor:_640[1]});
};
TMPositionManager.prototype._getBox=function(_643){
var _644=TMAgent.AGENT;
var el=_643.getElement();
var _646=el.offsetWidth;
var _647=el.offsetHeight;
var pos=_644.getElementPosition(el);
var top=pos.y;
var left=pos.x;
var _64b=TMPositionManager._SHADOW_TOLERENCE;
if(_646==0){
var _64c=el.firstChild;
if(_64c){
_646=_64c.offsetWidth;
_647=_64c.offsetHeight;
}
}
_646+=_64b;
_647+=_64b;
var box={top:top,right:left+_646,bottom:top+_647,left:left,width:_646,height:_647};
return box;
};
TMPositionManager.prototype._getAlignBox=function(_64e){
var _64f=TMAgent.AGENT;
var _650=_64e.getAlignElement();
if(_650){
var _651=_650.offsetWidth;
var _652=_650.offsetHeight;
var pos=_64f.getElementPosition(_650);
var top=pos.y;
var left=pos.x;
}else{
var pos=_64e.getAlignPosition();
var _651=0;
var _652=0;
var top;
var left;
if(pos==null){
top=0;
left=0;
}else{
top=pos.y;
left=pos.x;
}
}
var box={top:top,right:left+_651,bottom:top+_652,left:left,width:_651,height:_652};
return box;
};
TMPositionManager.prototype._preferTopTopCondition=function(box,_658,_659){
var _65a=TMAgent.AGENT;
var _65b=_65a.getDomDocument();
var _65c=_65a.getWindowHeight();
var _65d=_658.top+box.height>_65c+_65a.getWindowScrollTop();
var _65e=_658.bottom-box.height<_65a.getWindowScrollTop();
if(_659){
return !_65d&&_65e;
}else{
return _65d&&!_65e;
}
};
TMPositionManager.prototype._preferBottomBottomCondition=function(box,_660){
return this._preferTopTopCondition(box,_660,true);
};
TMPositionManager.prototype._preferBottomTopCondition=function(box,_662,_663){
var _664=TMAgent.AGENT;
var _665=_664.getDomDocument();
var _666=_664.getWindowHeight();
var _667=_662.top-box.height<_664.getWindowScrollTop();
var _668=_662.bottom+box.height>_666+_664.getWindowScrollTop();
if(_663){
return !_668&&_667;
}else{
return _668&&!_667;
}
};
TMPositionManager.prototype._preferTopBottomCondition=function(box,_66a){
return this._preferBottomTopCondition(box,_66a,true);
};
TMPositionManager.prototype._preferLeftLeftCondition=function(box,_66c,_66d){
var _66e=TMAgent.AGENT;
var _66f=_66e.getDomDocument();
var _670=_66e.getWindowWidth();
var _671=_66c.left+box.width>_670+_66e.getWindowScrollLeft();
var _672=_66c.right-box.width<_66e.getWindowScrollLeft();
if(_66d){
return !_671&&_672;
}else{
return _671&&!_672;
}
};
TMPositionManager.prototype._preferRightRightCondition=function(box,_674){
return this._preferLeftLeftCondition(box,_674,true);
};
TMPositionManager.prototype._preferRightLeftCondition=function(box,_676,_677){
var _678=TMAgent.AGENT;
var _679=_678.getDomDocument();
var _67a=_678.getWindowWidth();
var _67b=_676.left-box.width<_678.getWindowScrollLeft();
var _67c=_676.right+box.width>_67a+_678.getWindowScrollLeft();
if(_677){
return !_67c&&_67b;
}else{
return _67c&&!_67b;
}
};
TMPositionManager.prototype._preferLeftRightCondition=function(box,_67e){
return this._preferRightLeftCondition(box,_67e,true);
};
TMPositionManager.prototype._convertHorizontal=function(_67f){
if((_67f=="start"&&this._isRTL)||(_67f=="end"&&!this._isRTL)){
return TMPositionManager.RIGHT;
}else{
return TMPositionManager.LEFT;
}
};
TMPositionManager.prototype._addElement=function(_680,_681,_682){
var _683=_680.getAlignElement();
if(_683){
var _684=this.managesElement(_683);
}else{
var _684=false;
}
var _685={element:_680,verticalBehaviors:_681,horizontalBehaviors:_682,alignElementIsManaged:_684};
this._elements.push(_685);
return this._elements.length-1;
};
TMPositionManager.prototype.removeElement=function(_686){
delete this._elements[_686];
};
TMPositionManager.prototype.managesElement=function(_687){
return TMPage.PAGE.getZOrderManager().containsElement(_687);
};
TMPositionManager.prototype.validatePosition=function(_688){
var _689=this._elements[_688];
if(_689!=null){
var _68a=_689.element;
var _68b=TMAgent.AGENT,isIE=_68b.isIE();
var box=this._getBox(_68a);
var _68e=this._getAlignBox(_68a);
var _68f=this._selectBehavior(_689.verticalBehaviors,box,_68e);
var _690=this._selectBehavior(_689.horizontalBehaviors,box,_68e);
_689._computedBehavior=new Object();
_689._computedBehavior.verticalBehavior=_68f;
_689._computedBehavior.horizontalBehavior=_690;
this._positionElement(_68a,_689._computedBehavior,_689.alignElementIsManaged,box,_68e);
}
};
TMPositionManager.prototype._selectBehavior=function(_691,box,_693){
var _694;
for(var i=0;!_694&&i<_691.length;i++){
if((i==_691.length-1)||_691[i].condition.call(this,box,_693)){
_694=_691[i];
}
}
return _694;
};
TMPositionManager.prototype.getComputedBehavior=function(_696){
return this._elements[_696]._computedBehavior;
};
TMPositionManager.prototype._positionElement=function(_697,_698,_699,box,_69b){
var _69c=_698.verticalBehavior;
var _69d=_698.horizontalBehavior;
var _69e=TMAgent.AGENT;
var _69f=_69e.getDomDocument();
var isIE=_69e.isIE();
var _6a1=_69e.getWindowHeight();
var _6a2=_69e.getWindowWidth();
var _6a3,_6a4;
switch(_69c.alignElementAnchor){
case TMPositionManager.TOP:
_6a3=_69b.top;
break;
case TMPositionManager.BOTTOM:
_6a3=_69b.bottom;
break;
}
switch(_69d.alignElementAnchor){
case TMPositionManager.LEFT:
_6a4=_69b.left;
break;
case TMPositionManager.RIGHT:
_6a4=_69b.right;
break;
}
var _6a5,_6a6;
switch(_69c.floatingElementAnchor){
case TMPositionManager.TOP:
_6a5=_6a3;
break;
case TMPositionManager.BOTTOM:
_6a5=_6a3-box.height;
break;
}
switch(_69d.floatingElementAnchor){
case TMPositionManager.LEFT:
_6a6=_6a4;
break;
case TMPositionManager.RIGHT:
_6a6=_6a4-box.width;
break;
}
_697.setPosition(_6a5,_6a6);
};
TMPositionManager.prototype._repostionOnScroll=function(evt){
var _6a8=TMAgent.AGENT,_6a9=_6a8.getDomWindow();
if(this._repostionCallback==null){
this._repostionCallback=this.createCallback(this._repostionOnScrollTimeout);
}
if(this._repostionTimeout){
_6a9.clearTimeout(this._repostionCallback,this._repostionTimeout);
}
this._repostionTimeout=_6a9.setTimeout(this._repostionCallback,200);
};
TMPositionManager.prototype._repostionOnScrollTimeout=function(){
delete this._repostionTimeout;
var _6aa=this._elements,_6ab=_6aa.length;
for(var i=0;i<_6ab;i++){
var _6ad=_6aa[i];
if(_6ad!=null){
var _6ae=_6aa[i].element,_6af=_6ae.getAlignElement();
if(_6af!=null){
if(this._isOutsideScrollView(_6af)){
_6ae.hide();
}else{
this.validatePosition(i);
}
}
}
}
};
TMPositionManager.prototype._isOutsideScrollView=function(_6b0){
var _6b1=TMAgent.AGENT;
var _6b2=_6b1.getDomDocument(),body=_6b2.body;
var body=document.body;
var _6b4=_6b0.offsetParent;
var _6b5=_6b0.offsetLeft,_6b6=_6b0.offsetTop;
var _6b7=_6b0.offsetWidth,_6b8=_6b0.offsetHeight;
var _6b9=TMAgent.getCSSLengthAsInt;
while(_6b4&&(_6b4!=body)){
if(_6b4.clientHeight>0&&_6b4.clientWidth>0){
if((_6b5<_6b4.scrollLeft)||((_6b5+_6b7)>(_6b4.scrollLeft+_6b4.clientWidth))||(_6b6<_6b4.scrollTop)||((_6b6+_6b8)>(_6b4.scrollTop+_6b4.clientHeight))){
return true;
}
}
var _6ba=_6b1.getComputedStyle(_6b4);
_6b6+=_6b9(_6ba.borderTopWidth);
_6b5+=_6b9(_6ba.borderLeftWidth);
if(!isIE()){
_6b6+=_6b9(_6ba.paddingTop);
_6b5+=_6b9(_6ba.paddingLeft);
}
_6b5+=_6b4.offsetLeft-_6b4.scrollLeft;
_6b6+=_6b4.offsetTop-_6b4.scrollTop;
_6b4=_6b4.offsetParent;
}
return false;
};
function TMZOrderManager(){
this.Init();
}
TMObject.createSubclass(TMZOrderManager);
TMZOrderManager.InitClass=function(){
var _6bb=["__af_Z_window"];
this.LAYERCONTAINER="DhtmlZOrderManagerLayerContainer";
this.FLOATINGTYPE_WINDOW=_6bb[0];
this.LAYERIDS=_6bb;
this._LAYER_CONTAINER_STYLECLASS="TMZOrderLayerContainer";
this._LAYER_STYLECLASS="TMZOrderLayer";
this._MAXZ=Math.pow(2,31)-1;
this._SHADOWDECORATORZINDEX=3;
};
TMZOrderManager.prototype.Init=function(){
TMZOrderManager.superclass.Init.call(this);
this._layerHash={};
};
TMZOrderManager.prototype.dispose=function(){
this._layerContainer=null;
this._layerHash=null;
};
TMZOrderManager.prototype.addElementToLayer=function(_6bc,_6bd){
this._assertLayers();
var _6be=this._getLayer(_6bd);
_6be.addElement(_6bc);
};
TMZOrderManager.prototype.raiseToFront=function(_6bf){
this._assertLayers();
var _6c0=_6bf.parentNode.getAttribute("id");
this._getLayer(_6c0).raiseToFront(_6bf);
};
TMZOrderManager.prototype._getLayer=function(id){
return this._layerHash[id];
};
TMZOrderManager.prototype._createLayers=function(){
var page=TMPage.PAGE;
var _6c3=page.getDomDocument();
var _6c4=TMZOrderManager.LAYERIDS;
this._layerContainer=this._createLayerElement(TMZOrderManager.LAYERCONTAINER);
TMDomUtils.addCSSClassName(this._layerContainer,TMZOrderManager._LAYER_CONTAINER_STYLECLASS);
for(var i=0;i<_6c4.length;i++){
var id=_6c4[i];
var _6c7=this._createLayerElement(id);
var _6c8=new TMZOrderLayer(_6c7);
this._addLayer(_6c8);
TMDomUtils.addCSSClassName(_6c7,TMZOrderManager._LAYER_STYLECLASS);
}
};
TMZOrderManager.prototype._createLayerElement=function(id){
if(this._layerHash[id]){
return this._layerHash[id];
}
var _6ca=TMPage.PAGE.getDomDocument();
var _6cb=_6ca.createElement("div");
_6cb.setAttribute("id",id);
_6cb.style.zIndex=TMZOrderManager._MAXZ;
return _6cb;
};
TMZOrderManager.prototype._addLayer=function(_6cc){
var id=_6cc.getId();
this._layerHash[id]=_6cc;
this._layerContainer.appendChild(_6cc.getContainerElement());
};
TMZOrderManager.prototype._assertLayers=function(){
if(!this._layerContainer){
this._createLayers();
}
var _6ce=TMPage.PAGE.getDomDocument();
if(TMZOrderManager._getFormOrBody(_6ce).lastChild!=this._layerContainer){
this._repairLayers();
}
};
TMZOrderManager.prototype._repairLayers=function(){
var _6cf=TMPage.PAGE.getDomDocument();
var _6d0=TMZOrderManager._getFormOrBody(_6cf);
var _6d1=this._layerContainer;
if(_6d1.parentNode!=_6d0){
this._positionLayerContainer();
return;
}
for(var el=_6d1.nextSibling;el;el=_6d1.nextSibling){
_6d0.insertBefore(el,_6d1);
}
};
TMZOrderManager.prototype._positionLayerContainer=function(){
var _6d3=TMPage.PAGE.getDomDocument();
var _6d4=TMZOrderManager._getFormOrBody(_6d3);
var _6d5=this._layerContainer;
if(_6d5.parentNode!=_6d4){
_6d4.appendChild(_6d5);
}
};
TMZOrderManager.prototype.containsElement=function(_6d6){
if(_6d6==null){
return false;
}
for(_6d6=_6d6.parentNode;_6d6;_6d6=_6d6.parentNode){
if(_6d6==this._layerContainer){
return true;
}
}
return false;
};
TMZOrderManager.prototype.removeElement=function(_6d7){
if(_6d7.parentNode){
var _6d8=_6d7.parentNode;
var _6d9=_6d8.getAttribute("id");
this._layerHash[_6d9].removeElement(_6d7);
}
};
TMZOrderManager._getFormOrBody=function(_6da){
var _6db=null;
if(_6da.forms&&_6da.forms.length){
if(_6da.forms.length>0){
var form=_6da.forms["management_main"];
if(form){
_6db=form;
}else{
_6db=_6da.forms[0];
}
}else{
_6db=_6da.forms[0];
}
}
if(_6db){
var el=_6db.parentNode;
while(el){
if(el.id=="bodyDataOutContDiv"){
return _6da.body;
}
el=el.parentNode;
}
return _6db;
}else{
return _6da.body;
}
};
TMObject.ensureClassInitialization(TMZOrderManager);
function TMZOrderLayer(_6de){
this.Init(_6de);
}
TMObject.createSubclass(TMZOrderLayer);
TMZOrderLayer.prototype.Init=function(_6df){
TMZOrderLayer.superclass.Init.call(this);
this._containerElement=_6df;
this._elements=new Array();
this.MINIMAL_Z_INDEX=20;
};
TMZOrderLayer.prototype.getContainerElement=function(){
return this._containerElement;
};
TMZOrderLayer.prototype.getId=function(){
return this._containerElement.getAttribute("id");
};
TMZOrderLayer.prototype.addElement=function(_6e0){
this._elements.push(_6e0);
this._updateElement(this._elements.length-1);
this._containerElement.appendChild(_6e0);
};
TMZOrderLayer.prototype.removeElement=function(_6e1){
this.raiseToFront(_6e1);
this._elements.pop();
this._containerElement.removeChild(_6e1);
};
TMZOrderLayer.prototype.raiseToFront=function(_6e2){
var _6e3=false;
for(var i=0;i<this._elements.length;i++){
if(_6e3){
this._elements[i-1]=this._elements[i];
this._updateElement(i-1);
}else{
if(this._elements[i]==_6e2){
_6e3=true;
}
}
}
var _6e5=this._elements.length-1;
this._elements[_6e5]=_6e2;
this._updateElement(_6e5);
};
TMZOrderLayer.prototype._updateElement=function(_6e6){
var el=this._elements[_6e6];
var _6e8=(_6e6*2)+this.MINIMAL_Z_INDEX;
el.style.zIndex=_6e8;
};
function TMDhtmlPopupWindowFactory(){
this.Init();
}
TMObject.createSubclass(TMDhtmlPopupWindowFactory);
TMDhtmlPopupWindowFactory.createPopup=function(_6e9){
var _6ea;
if(_6e9[TMDhtmlPopupWindow.HINT_TYPE]==TMDhtmlPopupWindow.HINT_TYPE_MENU){
_6ea=new TMDhtmlPopupMenu();
}else{
if(_6e9[TMDhtmlPopupWindow.HINT_TYPE]==TMDhtmlPopupWindow.HINT_TYPE_NOTEWINDOW){
_6ea=null;
}else{
if(_6e9[TMDhtmlPopupWindow.HINT_AUTODISMISS]){
_6ea=new TMPopupSelector();
}else{
_6ea=null;
}
}
}
return _6ea;
};
function TMAbstractFloatingElement(_6eb){
this.Init(_6eb);
}
TMObject.createSubclass(TMAbstractFloatingElement);
TMAbstractFloatingElement.prototype.Init=function(_6ec){
TMAbstractFloatingElement.superclass.Init.call(this);
this._floatingType=_6ec;
this._alignElement=null;
this._rootElement=null;
this._shadowAnchor=null;
this._alignPosition=null;
};
TMAbstractFloatingElement.prototype.setElement=function(_6ed){
this._rootElement=_6ed;
this.setShadowAnchor(_6ed);
var _6ee=_6ed.style;
_6ee.position="absolute";
_6ee.zIndex=2;
TMPage.PAGE.getZOrderManager().addElementToLayer(_6ed,this._floatingType);
};
TMAbstractFloatingElement.prototype.getElement=function(){
return this._rootElement;
};
TMAbstractFloatingElement.prototype.setAlignElement=function(_6ef){
this._alignElement=_6ef;
};
TMAbstractFloatingElement.prototype.setAlignPosition=function(pos){
this._alignPosition=pos;
this._alignElement=null;
};
TMAbstractFloatingElement.prototype.getAlignPosition=function(){
return this._alignPosition;
};
TMAbstractFloatingElement.prototype.getAlignElement=function(){
return this._alignElement;
};
TMAbstractFloatingElement.prototype.show=function(){
this._rootElement.style.display="";
};
TMAbstractFloatingElement.prototype.hide=function(){
this._rootElement.style.display="none";
};
TMAbstractFloatingElement.prototype.destroy=function(){
TMPage.PAGE.getZOrderManager().removeElement(this._rootElement);
};
TMAbstractFloatingElement.prototype.getWidth=function(){
return this.getElement().offsetWidth;
};
TMAbstractFloatingElement.prototype.getHeight=function(){
return this.getElement().offsetHeight;
};
TMAbstractFloatingElement.prototype.setShadowAnchor=function(el){
this._shadowAnchor=el;
};
TMAbstractFloatingElement.prototype.getShadowAnchor=function(){
return this._shadowAnchor;
};
TMAbstractFloatingElement.prototype.setTop=function(_6f2){
if(!isNaN(_6f2)){
_6f2+="px";
}
this._rootElement.style.top=_6f2;
};
TMAbstractFloatingElement.prototype.getTop=function(){
return parseInt(this._rootElement.style.top);
};
TMAbstractFloatingElement.prototype.setLeft=function(_6f3){
if(!isNaN(_6f3)){
_6f3+="px";
}
this._rootElement.style.left=_6f3;
};
TMAbstractFloatingElement.prototype.getLeft=function(){
return parseInt(this._rootElement.style.left);
};
TMAbstractFloatingElement.prototype.setPosition=function(_6f4,_6f5){
if(!isNaN(_6f4)){
_6f4+="px";
}
if(!isNaN(_6f5)){
_6f5+="px";
}
this._rootElement.style.left=_6f5;
this._rootElement.style.top=_6f4;
};
TMAbstractFloatingElement.prototype.raiseToFront=function(){
TMPage.PAGE.getZOrderManager().raiseToFront(this._rootElement);
};
TMAbstractFloatingElement.prototype.CreateTable=function(rows,cols){
var _6f8=TMPage.PAGE.getDomDocument();
var _6f9=_6f8.createElement("table");
for(var i=0;i<rows;i++){
var tr=_6f9.insertRow(i);
for(var j=0;j<cols;j++){
tr.insertCell(j);
}
}
_6f9.cellPadding=0;
_6f9.cellSpacing=0;
return _6f9;
};
function TMRepositionable(_6fd,_6fe){
this.Init(_6fd,_6fe);
}
TMObject.createSubclass(TMRepositionable);
TMRepositionable.InitClass=function(){
var _6ff=this.prototype;
_6ff.NORMAL=0;
_6ff.START_DRAGGING=1;
_6ff.DRAGGING=2;
};
TMRepositionable.prototype.destroy=function(){
var _700=TMAgent.AGENT;
var _701=_700.getDomDocument();
_700.removeBubbleEventListener(this._handle,"mousedown",this._mousedownStub);
if(this._state!=this.NORMAL){
_700.removeBubbleEventListener(_701,"mousemove",this._mousemoveStub);
_700.removeBubbleEventListener(_701,"mouseup",this._mouseupStub);
_700.enableUserSelect(_701.body);
if(_701.body.releaseCapture){
_701.body.releaseCapture();
}
}
};
TMRepositionable.prototype.getElement=function(){
return this._floatingElement.getElement();
};
TMRepositionable.prototype._dragStartHandler=function(){
for(el=event.srcElement;el.parentNode;el=el.parentNode){
if(el==this._handle){
this._mouseDownHandler();
event.cancelBubble=true;
event.returnValue=false;
}
}
};
TMRepositionable.prototype._mouseDownHandler=function(evt){
var _703=TMAgent.AGENT;
evt=evt||_703.getDomWindow().event;
var _704=_703.getDomDocument();
if(!_703.isLeftButton(evt)){
return;
}
this._state=this.START_DRAGGING;
_703.addBubbleEventListener(_704,"mousemove",this._mousemoveStub);
_703.addBubbleEventListener(_704,"mouseup",this._mouseupStub);
_703.preventDefault(evt);
_703.disableUserSelect(_704.body);
if(_704.body.setCapture){
_704.body.setCapture();
}
};
TMRepositionable.prototype._mouseMoveHandler=function(evt){
var _706=TMAgent.AGENT;
evt=evt||_706.getDomWindow().event;
if(this._state==this.START_DRAGGING){
this._onDragStart.apply(this._floatingElement);
this._state=this.DRAGGING;
this._mouseStartX=evt.clientX;
this._mouseStartY=evt.clientY;
this._originalLeftPosition=parseInt(this._floatingElement.getLeft());
this._originalTopPosition=parseInt(this._floatingElement.getTop());
if(!this._originalLeftPosition){
this._originalLeftPosition=0;
}
if(!this._originalTopPosition){
this._originalTopPosition=0;
}
}
if(this._state==this.DRAGGING){
var _707=evt.clientX-this._mouseStartX;
var _708=evt.clientY-this._mouseStartY;
this._move(_707,_708);
}
};
TMRepositionable.prototype._stopDragging=function(){
this._originalLeftPosition=null;
this._originalTopPosition=null;
this._mouseStartX=null;
this._mouseStartY=null;
var _709=TMAgent.AGENT;
var _70a=_709.getDomDocument();
_709.enableUserSelect(_70a.body);
_709.removeBubbleEventListener(_70a,"mousemove",this._mousemoveStub);
_709.removeBubbleEventListener(_70a,"mouseup",this._mouseupStub);
if(_70a.body.releaseCapture){
_70a.body.releaseCapture();
}
if(this._state==this.DRAGGING){
this._onDragEnd.apply(this._floatingElement);
}
this._state=this.NORMAL;
};
TMRepositionable.prototype._move=function(_70b,_70c){
var _70d=this._originalLeftPosition+_70b;
var _70e=this._originalTopPosition+_70c;
var _70f=TMAgent.AGENT;
var _710=AdfPage.PAGE.getDomDocument();
var body=_710.body;
var _712=_710.documentElement;
var isIE=_70f.isIE();
var _714=false;
var el=this.getElement();
var _716=_712.scrollWidth;
var _717=_712.scrollHeight;
var _718=4;
var _719=_714?_718:0;
if(isIE&&_714){
var _71a=(_712.scrollWidth-_712.clientWidth);
_719-=_71a;
_716-=_71a;
}
if(_70d>_719){
_70d=Math.min(_70d,_716-el.offsetWidth-2*_718);
}else{
_70d=_719;
}
if(_70e>0){
_70e=Math.min(_70e,_717-el.offsetHeight-2*_718);
}else{
_70e=0;
}
this._floatingElement.setPosition(_70e,_70d);
this._onDrag();
};
TMRepositionable.prototype.setDragStartHandler=function(_71b){
this._onDragStart=_71b;
};
TMRepositionable.prototype.setDragEndHandler=function(_71c){
this._onDragEnd=_71c;
};
TMRepositionable.prototype.setDragHandler=function(_71d){
this._onDrag=_71d;
};
TMRepositionable.prototype._onDragStart=function(){
};
TMRepositionable.prototype._onDragEnd=function(){
};
TMRepositionable.prototype._onDrag=function(){
};
function TMClientBehavior(){
}
TMObject.createSubclass(TMClientBehavior);
TMClientBehavior.prototype.initialize=function(_71e){
};
function TMInitializationBehavior(js){
this.Init(js);
}
TMObject.createSubclass(TMInitializationBehavior,TMClientBehavior);
TMInitializationBehavior.prototype.initialize=function(_720){
try{
var _721=new Function("component",this._js+";");
_721(_720);
}
catch(e){
}
};
TMInitializationBehavior.prototype.Init=function(js){
TMInitializationBehavior.superclass.Init.call(this);
this._js=js;
};
function TMShowPopupBehavior(_723,_724,_725,type){
this.Init(_723,_724,_725,type);
}
TMObject.createSubclass(TMShowPopupBehavior,TMClientBehavior);
TMShowPopupBehavior.prototype.initialize=function(_727){
var type=this._type;
if(!type){
type=TMActionEvent.ACTION_EVENT_TYPE;
}
_727.addEventListener(type,this.fire,this);
};
TMShowPopupBehavior.prototype.fire=function(_729){
_729.cancel();
var _72a=_729.getSource();
var _72b=_72a.findComponent(this._popupId);
if(!_72b){
return;
}
var _72c=this._align;
var _72d=this._alignId;
var _72e;
var _72f=(this._type==TMUIInputEvent.CONTEXT_MENU_EVENT_TYPE);
if(_72d||_72c||_72f){
_72e={};
if(_72c){
_72e[TMDhtmlPopupWindow.HINT_ALIGN]=_72c;
if(!_72d){
_72d=_72a.getClientId();
}
}
if(_72d){
var _730=_72a.findComponent(_72d);
if(_730){
_72e[TMDhtmlPopupWindow.HINT_ALIGN_ID]=_730.getClientId();
}
}
if(_72f){
_72e[TMDhtmlPopupWindow.HINT_TYPE]=AdfDhtmlPopupWindow.HINT_TYPE_MENU;
_72e[TMDhtmlPopupWindow.HINT_AUTODISMISS]=true;
if(!_72d){
var pos=TMAgent.AGENT.getMousePosition(_729.getNativeEvent());
_72e[TMDhtmlPopupWindow.HINT_MOUSEPOSITION]=pos;
}
}
}
_72b.show(_72e);
};
TMShowPopupBehavior.prototype.Init=function(_732,_733,_734,type){
TMShowPopupBehavior.superclass.Init.call(this);
this._popupId=_732;
this._align=_733;
this._alignId=_734;
this._type=type;
};
function TMDhtmlPopupWindow(){
this.Init();
}
TMObject.createSubclass(TMDhtmlPopupWindow,TMAbstractFloatingElement);
TMDhtmlPopupWindow.HINT_ALIGN_ELEMENT="alignElement";
TMDhtmlPopupWindow.HINT_MOUSEPOSITION="mousePosition";
TMDhtmlPopupWindow.HINT_TYPE="type";
TMDhtmlPopupWindow.HINT_TYPE_MENU="menu";
TMDhtmlPopupWindow.HINT_TYPE_NOTEWINDOW="noteWindow";
TMDhtmlPopupWindow.HINT_AUTODISMISS="autodismiss";
TMDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT_ID="autodismissMouseOut";
TMDhtmlPopupWindow.HINT_FOCUS="focus";
TMDhtmlPopupWindow.HINT_AUTODISMISS_NEVER="autodismissNever";
TMDhtmlPopupWindow.HINT_AUTODISMISS_ALWAYS="autodismissAlways";
TMDhtmlPopupWindow.HINT_AUTODISMISS_MENU="autodismissMenu";
TMDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT="autodismissMouseOut";
TMDhtmlPopupWindow.HINT_CLOSE_ON_ESCAPE="closeOnEscape";
TMDhtmlPopupWindow.HINT_ALIGN="align";
TMDhtmlPopupWindow.ALIGN_AFTER_START="after_start";
TMDhtmlPopupWindow.ALIGN_AFTER_END="after_end";
TMDhtmlPopupWindow.ALIGN_BEFORE_START="before_start";
TMDhtmlPopupWindow.ALIGN_BEFORE_END="before_end";
TMDhtmlPopupWindow.ALIGN_END_AFTER="end_after";
TMDhtmlPopupWindow.ALIGN_END_BEFORE="end_before";
TMDhtmlPopupWindow.ALIGN_START_AFTER="start_after";
TMDhtmlPopupWindow.ALIGN_START_BEFORE="start_before";
TMDhtmlPopupWindow.ALIGN_OVERLAP="overlap";
TMDhtmlPopupWindow.HINT_ALIGN_ID="alignId";
TMDhtmlPopupWindow.InitClass=function(){
this.HINT_ALIGN=TMDhtmlPopupWindow.HINT_ALIGN;
this.HINT_TITLE="title";
this.HINT_CLOSEICON_VISIBLE="closeIconVisible";
this.HINT_TITLEICON="ShowTitleIcon";
this.HINT_MODAL="modal";
this.HINT_CONTENT="content";
this.HINT_DRAG_ELEMENT="dragElement";
this.HINT_FOOTER_CONTENT="footerContent";
this.HINT_POSITION_HANDLER="positionHandler";
this.HINT_CLOSE_HANDLER="closeHandler";
this.HINT_CLOSE_HANDLER_PARAM="closeHandlerParam";
this.HINT_DETACH_DRAG_START_HANDLER="detachDragStartHandler";
this.HINT_DETACH_DRAG_END_HANDLER="detachDragEndHandler";
this.HINT_DETACHABLE="detachable";
this.HINT_COMPONENT_CLIENT_ID="componentId";
this.MAX_WIDTH=512;
this._SCROLL_POSITION="_tmScrollPosition";
};
TMDhtmlPopupWindow.prototype.Init=function(){
TMObject.ensureClassInitialization(TMZOrderManager);
TMDhtmlPopupWindow.superclass.Init.call(this,TMZOrderManager.FLOATINGTYPE_WINDOW);
var _736=this.CreateDomElement();
this.setElement(_736);
_736.style.display="none";
};
TMDhtmlPopupWindow.prototype.CreateDomElement=function(){
};
TMDhtmlPopupWindow.prototype.show=function(_737){
var _738=_737[TMDhtmlPopupWindow.HINT_COMPONENT_CLIENT_ID];
var _739=_737[TMDhtmlPopupWindow.HINT_FOCUS];
var _73a=_737[TMDhtmlPopupWindow.HINT_CONTENT];
var _73b=_737[TMDhtmlPopupWindow.HINT_ALIGN_ELEMENT];
var _73c=_737[TMDhtmlPopupWindow.HINT_ALIGN];
var _73d=_737[TMDhtmlPopupWindow.HINT_POSITION_HANDLER];
var _73e=_737[TMDhtmlPopupWindow.HINT_MOUSEPOSITION];
var _73f=_737[TMDhtmlPopupWindow.HINT_AUTODISMISS];
var page=TMPage.PAGE;
var _741=page.findComponent(_738);
var doc=page.getDomDocument();
var _743=page.isScreenReaderMode();
if(_73a){
_73a.style.maxWidth=TMDhtmlPopupWindow.MAX_WIDTH+"px";
_73a=_737[TMDhtmlPopupWindow.HINT_CONTENT]=this.WrapContent(_737,_73a,_743);
this.setContent(_73a);
}
this.setCloseHandler(_737[TMDhtmlPopupWindow.HINT_CLOSE_HANDLER]);
this.setCloseHandlerParam(_737[TMDhtmlPopupWindow.HINT_CLOSE_HANDLER_PARAM]);
this.setAlignElement(_73b);
if(_73c&&_73b){
this._position(_73c);
}else{
if(_73e){
this._positionAtMousePointer(_73e);
}
}
if(this.IsDisplayOnTimeout()){
this.getElement().style.visibility="hidden";
}
this.DoShow(_737);
this.DoResizeNotifyDom(_73a);
if(!_73c&&_73d){
var _744=_73d(_73a);
this.setPosition(_744.top,_744.left);
}
if(_73f===true){
_737[TMDhtmlPopupWindow.HINT_AUTODISMISS]=TMDhtmlPopupWindow.HINT_AUTODISMISS_ALWAYS;
}
this._componentId=_738;
page.getAutoDismissalManager().addBehavior(_741,_737);
if(_739==undefined){
_739=_73f&&(_737[TMDhtmlPopupWindow.HINT_TYPE]!=TMDhtmlPopupWindow.HINT_TYPE_NOTEWINDOW);
}
var _745=page.getDomWindow();
this._sizeTimeout=_745.setTimeout(this.createCallback(this._size),50);
if(_73a){
this.RestoreScrollValues(_73a);
}
if(_739==true){
this._restoreFocusElement=page.getActiveDomElement();
this._focusHint=_739;
this._focusTimeout=_745.setTimeout(this.createCallback(this.FocusOnFirstElement),50);
}
this._closeOnEscape=(false!=_737[TMDhtmlPopupWindow.HINT_CLOSE_ON_ESCAPE]);
this._keyDownCallback=this.createCallback(this._handleKeyDown);
TMAgent.AGENT.addBubbleEventListener(doc,"keydown",this._keyDownCallback);
};
TMDhtmlPopupWindow.prototype.WrapContent=function(_746,_747,_748){
var page=TMPage.PAGE;
var doc=page.getDomDocument();
var _74b=doc.createElement("table");
_74b.cellPadding=_74b.cellSpacing=0;
_74b.insertRow(0).insertCell(0).appendChild(_747);
_74b.style.position="relative";
if(_748){
var _74c=TMAgent.AGENT;
var _74d=doc.createElement("div");
var _74e=doc.createElement("h1");
var _74f=doc.createElement("h1");
_74f.tabIndex=_74e.tabIndex=0;
_74f.style.cssText=_74e.style.cssText="font-size:small";
isMenu=_746[TMDhtmlPopupWindow.HINT_TYPE]==TMDhtmlPopupWindow.HINT_TYPE_MENU;
_74c.setTextContent(_74e,"Start of Menu");
_74c.setTextContent(_74f,"End of Menu");
_74d.appendChild(_74e);
_74d.appendChild(_74b);
_74d.appendChild(_74f);
return _74d;
}else{
return _74b;
}
};
TMDhtmlPopupWindow.prototype.hide=function(){
var _750=this.getContent();
this.SaveScrollValues(_750);
if(TMFocusUtils.containsFocus(this.getElement())&&!TMFocusUtils.isFocusChangePending()){
this._restoreFocus();
}
var _751=this._closeHandler;
if(_751){
delete this._closeHandler;
_751(this._closeHandlerParam);
delete this._closeHandlerParam;
}
this.destroy();
var page=TMPage.PAGE;
var _753=page.findComponent(this._componentId);
page.getAutoDismissalManager().removeBehavior(_753);
};
TMDhtmlPopupWindow.prototype._restoreFocus=function(){
var _754=this.getAlignElement();
if(TMFocusUtils.isFocusable(_754)){
TMFocusUtils.focusElement(_754);
return;
}
var _755=this._restoreFocusElement;
if(TMFocusUtils.isFocusable(_755)){
TMFocusUtils.focusElement(_755);
return;
}
var _756=TMPage.PAGE.getDomDocument().body;
TMFocusUtils.focusFirstTabStop(_756);
};
TMDhtmlPopupWindow.prototype.setContent=function(_757){
var _758=this.GetContentParent();
if(_758.firstChild){
_758.removeChild(_758.firstChild);
}
_758.appendChild(_757);
};
TMDhtmlPopupWindow.prototype.getContent=function(){
return this.GetContentParent().firstChild;
};
TMDhtmlPopupWindow.prototype.GetContentParent=function(){
};
TMDhtmlPopupWindow.prototype.setCloseHandler=function(_759){
this._closeHandler=_759;
};
TMDhtmlPopupWindow.prototype.setCloseHandlerParam=function(_75a){
this._closeHandlerParam=_75a;
};
TMDhtmlPopupWindow.prototype.isVisible=function(){
return this.getElement().style.display!="none";
};
TMDhtmlPopupWindow.prototype.IsDisplayOnTimeout=function(){
return true;
};
TMDhtmlPopupWindow.prototype.DoShow=function(_75b){
TMDhtmlPopupWindow.superclass.show.call(this);
this.raiseToFront();
if(this._positionManagerIndex!=null){
TMPage.PAGE.getPositionManager().validatePosition(this._positionManagerIndex);
}
if(!this.IsDisplayOnTimeout()){
this.CreateShadow();
}
};
TMDhtmlPopupWindow.prototype.CreateShadow=function(){
if(TMAgent.AGENT.isIE6()){
var el=this.getElement();
var _75d=this._maskFrame=TMPage.PAGE.createMaskingFrame(el);
_75d.style.zIndex=TMAgent.AGENT.getComputedStyle(el).zIndex-1;
var _75e=el.ownerDocument;
_75e.body.appendChild(_75d);
createIEShimFix(el,_75e);
}
};
TMDhtmlPopupWindow.prototype.destroy=function(){
var _75f=TMAgent.AGENT;
var page=TMPage.PAGE;
var _761=_75f.getDomWindow();
this._restoreFocusElement=null;
if(this._focusTimeout){
_761.clearTimeout(this._focusTimeout);
}
if(this._sizeTimeout){
_761.clearTimeout(this._sizeTimeout);
}
var _762=this.getShadowAnchor();
if(null!=this._maskFrame){
page.removeMaskingFrame(this._maskFrame);
endIEShimFix(this.getElement());
}
if(this._positionManagerIndex!=null){
page.getPositionManager().removeElement(this._positionManagerIndex);
}
if(this._closeOnEscapeCallback){
_75f.removeBubbleEventListener(page.getDomDocument(),"keyup",this._closeOnEscapeCallback);
delete this._closeOnEscapeCallback;
}
this.setAlignElement(null);
this._maskFrame=null;
TMDhtmlPopupWindow.superclass.destroy.call(this);
};
TMDhtmlPopupWindow.prototype.GetPositionManagerIndex=function(){
return this._positionManagerIndex;
};
TMDhtmlPopupWindow.prototype._handleKeyDown=function(_763){
if(_763.keyCode==TMKeyStroke.ESC_KEY){
var _764=_763.target||_763.srcElement;
if(this._closeOnEscape&&TMDomUtils.isAncestorOrSelf(this.getElement(),_764)){
this.hide();
TMAgent.AGENT.eatEvent(_763);
}
}else{
if(_763.keyCode==TMKeyStroke.TAB_KEY){
var _765=TMPage.PAGE.getDomDocument();
var _766=this.getContent();
var _767=TMFocusUtils.getFirstTabStop(_766);
var _768=TMFocusUtils.getLastTabStop(_766);
if(_763.shiftKey){
var _764=TMAgent.AGENT.getEventTarget(_763);
if(_764==_767){
TMFocusUtils.focusPreviousTabStop(_764,_766);
TMAgent.AGENT.eatEvent(_763);
}
}else{
var _764=TMAgent.AGENT.getEventTarget(_763);
if(_768==_764){
TMFocusUtils.focusNextTabStop(_764,_766,true);
TMAgent.AGENT.eatEvent(_763);
}
}
}
}
};
TMDhtmlPopupWindow.prototype._initializeCloseOnEscape=function(){
this._closeOnEscapeCallback=this.createCallback(this._handleCloseOnEscape);
TMAgent.AGENT.addBubbleEventListener(TMPage.PAGE.getDomDocument(),"keyup",this._closeOnEscapeCallback);
};
TMDhtmlPopupWindow.prototype._handleCloseOnEscape=function(_769){
if(_769.keyCode==TMKeyStroke.ESC_KEY){
this.hide();
}
};
TMDhtmlPopupWindow.prototype._size=function(){
if(this._sizeTimeout==null){
return;
}
delete this._sizeTimeout;
var _76a=this.getElement(),_76b=_76a.style;
_76b.width=Math.min(_76a.offsetWidth,TMDhtmlPopupWindow.MAX_WIDTH)+"px";
if(this.IsDisplayOnTimeout()){
_76b.visibility="";
if(this._positionManagerIndex!=null){
TMPage.PAGE.getPositionManager().validatePosition(this._positionManagerIndex);
}
this.CreateShadow();
}
};
TMDhtmlPopupWindow.prototype.autoSize=function(){
var _76c=this.getElement(),_76d=_76c.style;
_76d.width="auto";
_76d.width=Math.min(_76c.offsetWidth,TMDhtmlPopupWindow.MAX_WIDTH)+"px";
var _76e=this.getShadowAnchor();
};
TMDhtmlPopupWindow.prototype.FocusOnFirstElement=function(){
if(this._focusTimeout){
delete this._focusTimeout;
}
var _76f=this.getElement();
TMFocusUtils.focusFirstTabStop(_76f);
};
TMDhtmlPopupWindow.prototype._position=function(_770){
this._positionManagerIndex=TMPage.PAGE.getPositionManager().addFloatingElement(this,_770);
};
TMDhtmlPopupWindow.prototype._positionAtMousePointer=function(pos){
this._positionManagerIndex=TMPage.PAGE.getPositionManager().addFloatingElementByPosition(this,pos);
};
TMDhtmlPopupWindow.prototype.DoResizeNotifyDom=function(_772){
TMPage.PAGE.doResizeNotifyDom(_772,false);
};
TMDhtmlPopupWindow.prototype.SaveScrollValues=function(_773){
var _774=_773.getElementsByTagName("div");
var _775=_774.length;
for(var i=0;i<_775;i++){
var _777=_774[i];
var _778=_777.scrollTop;
if(_778>0){
_777.setAttribute(TMDhtmlPopupWindow._SCROLL_POSITION,_778);
}
}
};
TMDhtmlPopupWindow.prototype.RestoreScrollValues=function(_779){
var _77a=_779.getElementsByTagName("div");
var _77b=_77a.length;
for(var y=0;y<_77b;y++){
var _77d=_77a[y];
var _77e=_77d.getAttribute(TMDhtmlPopupWindow._SCROLL_POSITION);
if(_77e>0){
TMDomUtils.setScrollTop(_77d,_77e);
}
}
};
function TMDhtmlPopupMenu(){
this.Init();
}
TMObject.createSubclass(TMDhtmlPopupMenu,TMDhtmlPopupWindow);
TMDhtmlPopupMenu.InitClass=function(){
TMDhtmlPopupMenu._POPUP_STYLE_CLASS="TMPopupMenuPopup";
TMDhtmlPopupMenu._CONTENT_STYLE_CLASS="TMPopupMenuContent";
};
TMDhtmlPopupMenu.prototype.Init=function(){
TMDhtmlPopupMenu.superclass.Init.call(this);
this.setShadowAnchor(this._mainElement);
};
TMDhtmlPopupMenu.prototype.CreateDomElement=function(){
var _77f=TMPage.PAGE.getDomDocument();
var _780=_77f.createElement("div");
var _781=_77f.createElement("div");
var _782=_77f.createElement("div");
TMDomUtils.addCSSClassName(_781,TMDhtmlPopupMenu._POPUP_STYLE_CLASS);
TMDomUtils.addCSSClassName(_782,TMDhtmlPopupMenu._CONTENT_STYLE_CLASS);
_780.appendChild(_781);
_781.appendChild(_782);
this._mainElement=_781;
this._contentElement=_782;
return _780;
};
TMDhtmlPopupMenu.CreateContentDomElement=function(_783){
var _784=TMPage.PAGE.getDomDocument();
var _785=_784.createElement("div");
var _786=_783.id;
var id=TMUIPeer.CreateSubId(_786,"content");
_785.id=id;
return _785;
};
TMDhtmlPopupMenu.prototype.GetContentParent=function(){
return this._contentElement;
};
TMDhtmlPopupMenu.prototype.CreateShadow=function(){
};
TMDhtmlPopupMenu.prototype.IsDisplayOnTimeout=function(){
return false;
};
TMDhtmlPopupMenu.prototype.DoResizeNotifyDom=function(_788){
};
TMDhtmlPopupMenu.prototype.SaveScrollValues=function(_789){
};
TMDhtmlPopupMenu.prototype.RestoreScrollValues=function(_78a){
};
function TMPopupSelector(){
this.Init();
}
TMObject.createSubclass(TMPopupSelector,TMDhtmlPopupWindow);
TMPopupSelector.InitClass=function(){
};
TMPopupSelector.prototype.Init=function(){
TMPopupSelector.superclass.Init.call(this);
};
TMPopupSelector.prototype.CreateDomElement=function(){
var _78b=TMPage.PAGE.getDomDocument().createElement("div");
_78b.className="iWin";
this.SetContentParent(_78b);
return _78b;
};
TMPopupSelector.prototype.SetContentParent=function(_78c){
this._contentElement=_78c;
};
TMPopupSelector.prototype.GetContentParent=function(){
return this._contentElement;
};
function TMDnDContext(){
this.Init();
}
TMObject.createSubclass(TMDnDContext);
TMDnDContext.ACTION_NONE=0;
TMDnDContext.ACTION_COPY=1;
TMDnDContext.ACTION_MOVE=2;
TMDnDContext.ACTION_LINK=4;
TMDnDContext.ACTION_COPY_OR_MOVE=TMDnDContext.ACTION_COPY|TMDnDContext.ACTION_MOVE;
TMDnDContext.ACTIONS_ALL=TMDnDContext.ACTION_COPY_OR_MOVE|TMDnDContext.ACTION_LINK;
TMDnDContext.prototype.__addComponentTarget=function(_78d){
};
TMDnDContext.prototype.__removeComponentTarget=function(_78e){
};
TMDnDContext.prototype.isDragging=function(){
return (this._draggingContext!=null);
};
TMDnDContext.prototype.getDragSource=function(){
return this._dragSource;
};
TMDnDContext.prototype.getTransferable=function(){
return null;
};
TMDnDContext.prototype.getSourceActions=function(){
return TMDnDContext.ACTION_NONE;
};
TMDnDContext.prototype.getUserAction=function(){
return TMDnDContext.ACTION_NONE;
};
TMDnDContext.prototype.setDropTargetProperty=function(name,_790){
};
TMDnDContext.prototype.getDropTargetProperty=function(name){
return null;
};
TMDnDContext.prototype.getTriggerEvent=function(){
return null;
};
TMDnDContext.prototype.startDrag=function(_792,_793,_794,_795,_796,_797,_798,_799,_79a){
};
function TMDhtmlDnDContext(){
this.Init();
}
TMObject.createSubclass(TMDhtmlDnDContext,TMDnDContext);
TMDhtmlDnDContext.prototype.Init=function(){
TMDhtmlDnDContext.superclass.Init.call(this);
this._clearDrag(false);
this._dropTargetComponents=new Array();
};
TMDhtmlDnDContext.InitClass=function(){
var _79b=TMAgent.AGENT;
this._NOT_ALLOWED_CURSOR=_79b.getCursor("not-allowed");
this._LINK_CURSOR=_79b.getCursor("alias");
this._COPY_CURSOR=_79b.getCursor("copy");
this._MOVE_CURSOR=_79b.getCursor("default");
this._INHERIT_CURSOR=_79b.getCursor("inherit");
};
TMDhtmlDnDContext.prototype.__addComponentTarget=function(_79c){
this._dropTargetComponents.push(_79c);
};
TMDhtmlDnDContext.prototype.__removeComponentTarget=function(_79d){
var _79e=TMCollections.removeArrayValue(this._dropTargetComponents,_79d);
var _79f=this._lastDropTarget;
if(_79f&&(_79f.getComponent()===_79d)){
this._lastDropTarget=null;
}
};
TMDhtmlDnDContext.prototype.isDragging=function(){
return (this._draggingContext!=null);
};
TMDhtmlDnDContext.prototype.getDragSource=function(){
return this._dragSource;
};
TMDhtmlDnDContext.prototype.getTransferable=function(){
var _7a0=this._draggingContext;
if(_7a0){
return _7a0._transferable;
}else{
return null;
}
};
TMDhtmlDnDContext.prototype.getSourceActions=function(){
var _7a1=this._draggingContext;
if(_7a1){
return _7a1._sourceActions;
}else{
return TMDnDContext.ACTION_NONE;
}
};
TMDhtmlDnDContext.prototype.getUserAction=function(){
var _7a2=this._draggingContext;
if(_7a2){
return _7a2._userAction;
}else{
return TMDnDContext.ACTION_NONE;
}
};
TMDhtmlDnDContext.prototype.setDropTargetProperty=function(name,_7a4){
var _7a5=this._draggingContext;
var _7a6=_7a5._currDropProperties;
_7a6[name]=_7a4;
};
TMDhtmlDnDContext.prototype.getDropTargetProperty=function(name){
var _7a8=this._draggingContext;
var _7a9=_7a8._currDropProperties;
return _7a9[name];
};
TMDhtmlDnDContext.prototype.getTriggerEvent=function(){
var _7aa=this._draggingContext;
if(_7aa){
return _7aa._triggerEvent;
}else{
return null;
}
};
TMDhtmlDnDContext.prototype.startDrag=function(_7ab,_7ac,_7ad,_7ae,_7af,_7b0,_7b1,_7b2,_7b3){
if(_7ae==undefined){
_7ae=(_7ad&TMDnDContext.ACTION_MOVE)?TMDnDContext.ACTION_MOVE:(_7ad&TMDnDContext.ACTION_COPY)?TMDnDContext.ACTION_COPY:TMDnDContext.ACTION_LINK;
}
if(_7b2=="auto"){
_7b2=null;
}
var _7b4=new Object();
_7b4._triggerEvent=_7ab;
_7b4._transferable=_7ac;
_7b4._sourceActions=_7ad;
_7b4._originX=_7b0;
_7b4._originY=_7b1;
_7b4._cursor=_7b2;
_7b4._userAction=TMDnDContext.ACTION_NONE;
_7b4._defaultAction=_7ae;
_7b4._autoscrollTimerID=null;
_7b4._dropTarget=null;
_7b4._lastDropTarget=null;
_7b4._dropProperties=new Object();
_7b4._currDropProperties=null;
_7b4._lastMousePage=null;
this._draggingContext=_7b4;
this._pendingMouseUp=false;
if(_7af){
var _7b5=this._getDragDiv();
TMAgent.AGENT.setOpacity(_7af,75);
var _7b6=TMPage.PAGE;
_7b6.showFloatingDiv(_7b5,_7af);
}else{
_7b5=null;
}
_7b4.dragger=_7b5;
TMPage.PAGE.showGlassPane(TMDhtmlDnDContext._CAPTURE_MAP,"no-drop");
};
TMDhtmlDnDContext.prototype._abortDrag=function(){
var _7b7=this._draggingContext;
if(_7b7){
_7b7._userAction=TMDnDContext.ACTION_NONE;
var _7b8=_7b7._dropTarget;
if(_7b8){
try{
_7b8.dragExit(this);
}
catch(e){
}
this._changeActiveDropCSSClass(_7b8,false);
}
this._dragComplete(false);
}else{
if(this._prepContext){
this._clearDrag(true);
}
}
};
TMDhtmlDnDContext.prototype.__handleInputEvent=function(_7b9){
var _7ba=true;
var _7bb=this._draggingContext;
if(!_7bb){
var _7bc=this._dragSource;
if(_7bc){
var _7bd=_7bc.getDragRecognizer();
_7be=this._prepContext;
if(_7be){
var _7bf=true;
try{
_7bf=_7bd.abortPrep(_7be,_7b9);
}
catch(e){
}
if(_7bf){
this._abortDrag();
}else{
var _7c0=null;
try{
_7c0=_7bd.recognizeDrag(_7be,_7b9);
}
catch(e){
}
if(_7c0){
this._prepContext=null;
try{
_7bc.initiateDrag(this,_7c0);
}
catch(e){
}
if(this._draggingContext!=null){
this._trackDrag(_7b9.getNativeEvent());
}
}
}
}else{
var _7be=null;
try{
_7be=_7bd.prepDrag(this,_7bc,_7b9);
}
catch(e){
}
if(_7be){
this._prepContext=_7be;
_7ba=false;
}
}
}
if(!this._draggingContext&&!_7be&&(_7b9.getType()==TMUIInputEvent.MOUSE_MOVE_EVENT_TYPE)){
this._findDragSource(_7b9);
}
}
return _7ba;
};
TMDhtmlDnDContext.prototype._setCursor=function(_7c1){
TMAgent.AGENT.setCursor(TMPage.PAGE.getGlassPane(),_7c1);
};
TMDhtmlDnDContext.prototype._findDragSource=function(_7c2){
var _7c3=this._findContainingDragSource(_7c2);
var _7c4=this._dragSource;
if(_7c3!=_7c4){
this._dragSource=_7c3;
}
};
TMDhtmlDnDContext.prototype._findContainingDragSource=function(_7c5){
var _7c6=_7c5.getSource();
while(_7c6!=null){
var _7c7=_7c6.getDragSource();
if(_7c7){
try{
if(_7c7.isAvailable(this,_7c5)){
return _7c7;
}
}
catch(e){
}
}
_7c6=_7c6.getParent();
}
return null;
};
TMDhtmlDnDContext.prototype._findDropTarget=function(_7c8,_7c9,_7ca){
var _7cb=this._dropTargetComponents;
var _7cc=_7cb.length;
for(var i=_7cc-1;i>=0;i--){
var _7ce=_7cb[i];
if(TMDhtmlDnDContext._pointInDropTarget(_7ce,_7c9,_7ca)){
return _7ce.getDropTarget();
}
}
return null;
};
TMDhtmlDnDContext._pointInDropTarget=function(_7cf,_7d0,_7d1){
var _7d2=TMUIPeer.getDomElementForComponent(_7cf);
return (_7d2)?TMAgent.AGENT.pointInElementBounds(_7d2,_7d0,_7d1):false;
};
TMDhtmlDnDContext.prototype._getDragDiv=function(){
if(!this._dragDiv){
var _7d3=TMPage.PAGE;
this._dragDiv=_7d3.createFloatingDiv(_7d3.getDomDocument().body,2,"DragContent");
}
return this._dragDiv;
};
TMDhtmlDnDContext.prototype._clearDrag=function(_7d4){
this._dragSource=null;
this._prepContext=null;
this._draggingContext=null;
this._dragDiv=null;
if(_7d4){
this._setCursor("auto");
}
};
TMDhtmlDnDContext.prototype.toDebugString=function(){
return TMDhtmlDnDContext.superclass.toDebugString.call(this)+"["+" dragSource:"+this._dragSource+" prepContext:"+this._prepContext+" drag context:"+this._draggingContext+" drag div:"+this._dragDiv+"]";
};
TMDhtmlDnDContext.prototype._trackDrag=function(_7d5){
if(this._pendingMouseUp){
return;
}
var _7d6=this._draggingContext;
var _7d7=TMAgent.AGENT;
var _7d8=_7d7.getMousePosition(_7d5);
_7d6._lastMousePage=_7d8;
var _7d9=_7d6._dropTarget;
var _7da=this._lastDropTarget;
var _7db=(_7d9)?_7d9:_7da?_7da:null;
var _7dc=this._findDropTarget(_7db,_7d8.x,_7d8.y);
var _7dd=this._dragSource;
if(_7dc!=_7d9){
if(_7d9){
this._setUserAction(TMDnDContext.ACTION_NONE,false);
}
if(_7dc){
this._lastDropTarget=_7dc;
var _7de=_7dc.getComponent().getClientId();
var _7df=_7d6._dropProperties;
var _7e0=_7df[_7de];
if(!_7e0){
_7e0=new Object();
_7df[_7de]=_7e0;
}
_7d6._currDropProperties=_7e0;
this._acceptDrag(_7dc,_7d5,"acceptDragEnter",_7d8);
if(_7d6._userAction!=TMDnDContext.ACTION_NONE){
_7d6._dropTarget=_7dc;
this._changeActiveDropCSSClass(_7dc,true);
try{
_7dd.dragEnter(this);
}
catch(e){
}
}
}
}else{
if(_7dc){
this._acceptDrag(_7dc,_7d5,"acceptDragOver",_7d8);
if(_7d6._userAction!=TMDnDContext.ACTION_NONE){
try{
_7dd.dragOver(this);
}
catch(e){
}
}
}
}
var _7e1=_7d8.x-_7d6._originX;
if(_7e1<0){
_7e1=0;
}
var _7e2=_7d8.y-_7d6._originY;
if(_7e2<0){
_7e2=0;
}
if(_7d6.dragger){
var _7e3=_7d6.dragger.style;
_7e3.left=_7e1+"px";
_7e3.top=_7e2+"px";
}
_7d6.dragPageX=_7e1;
_7d6.dragPageY=_7e2;
};
TMDhtmlDnDContext.prototype._acceptDrag=function(_7e4,_7e5,_7e6,_7e7){
if(_7e7==null){
_7e7=TMAgent.AGENT.getMousePosition(_7e5);
}
var _7e8=TMDnDContext.ACTION_NONE;
var _7e9=this._draggingContext;
if(_7e5.ctrlKey&&_7e5.shiftKey){
_7e8=TMDnDContext.ACTION_LINK;
}else{
if(_7e5.ctrlKey){
_7e8=TMDnDContext.ACTION_COPY;
}else{
if(_7e5.shiftKey){
_7e8=TMDnDContext.ACTION_MOVE;
}
}
}
_7e8&=_7e9._sourceActions;
if(_7e8==TMDnDContext.ACTION_NONE){
_7e8=_7e9._defaultAction;
}
var _7ea=TMDnDContext.ACTION_NONE;
try{
_7ea=_7e4[_7e6](this,_7e8,_7e7.x,_7e7.y);
}
catch(e){
}
this._setUserAction(_7ea,"acceptDropActionChanged"==_7e6);
};
TMDhtmlDnDContext.prototype._setUserAction=function(_7eb,_7ec){
var _7ed=this._draggingContext;
var _7ee=_7ed._userAction;
if(_7eb!=_7ee){
_7ed._userAction=_7eb;
var _7ef="auto";
switch(_7eb){
case TMDnDContext.ACTION_NONE:
_7ef=TMDhtmlDnDContext._NOT_ALLOWED_CURSOR;
break;
case TMDnDContext.ACTION_LINK:
_7ef=TMDhtmlDnDContext._LINK_CURSOR;
break;
case TMDnDContext.ACTION_COPY:
_7ef=TMDhtmlDnDContext._COPY_CURSOR;
break;
case TMDnDContext.ACTION_MOVE:
_7ef=TMDhtmlDnDContext._MOVE_CURSOR;
break;
}
this._setCursor(_7ef);
if(_7eb!=TMDnDContext.ACTION_NONE){
if(_7ec){
try{
this._dragSource.dropActionChanged(this);
}
catch(e){
}
}
}else{
if(_7ee!=TMDnDContext.ACTION_NONE){
try{
this._dragSource.dragExit(this);
}
catch(e){
}
var _7f0=_7ed._dropTarget;
try{
_7f0.dragExit(this);
}
catch(e){
}
this._changeActiveDropCSSClass(_7f0,false);
_7ed._dropTarget=null;
_7ed._currDropProperties=null;
}
}
}
};
TMDhtmlDnDContext.prototype._changeActiveDropCSSClass=function(_7f1,_7f2){
var _7f3=_7f1.getComponent();
var _7f4=_7f3.getPeer();
if(_7f4!=null){
_7f4.bind(_7f3);
var func=(_7f2)?TMDomUtils.addCSSClassName:TMDomUtils.removeCSSClassName;
func(_7f4.getDomElement(),TMUIPeer.DROP_TARGET_STYLECLASS);
}else{
}
};
TMDhtmlDnDContext.prototype._doDrop=function(_7f6){
if(this._pendingMouseUp){
TMPage.PAGE.hideGlassPane(TMDhtmlDnDContext._CAPTURE_MAP);
this._pendingMouseUp=false;
return;
}
var _7f7=this._draggingContext;
if(_7f7._userAction!=TMDnDContext.ACTION_NONE){
var _7f8=_7f7._dropTarget;
var _7f9=TMAgent.AGENT.getMousePosition(_7f6);
var _7fa=TMDnDContext.ACTION_NONE;
try{
_7fa=_7f8.drop(this,_7f7._userAction,_7f9.x,_7f9.y);
this._changeActiveDropCSSClass(_7f8,false);
}
catch(e){
}
this._setUserAction(_7fa,false);
}
this._dragComplete(true);
};
TMDhtmlDnDContext.prototype._dragComplete=function(_7fb){
try{
this._dragSource.dragDropEnd(this,this.getUserAction());
}
catch(e){
}
this._stopAutoscroll();
var _7fc=TMAgent.AGENT;
var _7fd=TMPage.PAGE;
_7fd.hideFloatingDiv(this._getDragDiv());
this._clearDrag(true);
if((_7fc.isIE())&&!_7fb){
this._pendingMouseUp=true;
}else{
_7fd.hideGlassPane(TMDhtmlDnDContext._CAPTURE_MAP);
}
};
TMDhtmlDnDContext.prototype._abortEvent=function(_7fe){
if(this._pendingMouseUp){
return;
}
this._abortDrag();
TMAgent.eatEventCallback(_7fe);
};
TMDhtmlDnDContext.prototype._checkAbort=function(_7ff){
if(this._pendingMouseUp){
return;
}
if(_7ff.keyCode==27){
this._abortEvent(_7ff);
}else{
var _800=this._draggingContext;
var _801=_800._dropTarget;
if(_801){
this._acceptDrag(_801,_7ff,"acceptDropActionChanged",_800._lastMousePage);
}
}
};
TMDhtmlDnDContext.prototype._autoscroll=function(){
var _802="no autoscroll";
var _803=null;
var _804=this._draggingContext;
if(_804){
var _805=_804.scrollTarget;
if(_805){
_803=TMDomUtils.getAutoScrollDeltas(_805,_804.scrollClientX,_804.scrollClientY);
if(_803){
_804.scrollClientX+=_803.x;
_804.scrollClientY+=_803.y;
TMDomUtils.scrollDownBy(_805,_803.y);
TMDomUtils.scrollRightBy(_805,_803.x);
if(_805==_805.ownerDocument.documentElement){
_804.dragPageX+=_803.x;
_804.dragPageY+=_803.y;
if(_804.dragger){
var _806=_804.dragger.style;
_806.left=_804.dragPageX+"px";
_806.top=_804.dragPageY+"px";
}
}
_802="autoscroll:"+TMDomUtils.getNodeInfo(_805)+"("+_803.x+","+_803.y+") out of "+_805.scrollLeft+","+_805.scrollTop;
}else{
_802="NO autoscroll:"+TMDomUtils.getNodeInfo(_805)+"("+_804.scrollClientX+","+_804.scrollClientY+") out of "+_805.scrollLeft+","+_805.scrollTop;
}
}
}
if(!_803){
this._stopAutoscroll();
}
};
TMDhtmlDnDContext.prototype._startAutoscroll=function(){
this._draggingContext._autoscrollTimerID=top.setInterval(TMDhtmlDnDContext._autoscrollCallback,100);
};
TMDhtmlDnDContext.prototype._stopAutoscroll=function(){
var _807=this._draggingContext;
if(_807&&_807._autoscrollTimerID){
top.clearInterval(_807._autoscrollTimerID);
_807._autoscrollTimerID=null;
}
};
TMDhtmlDnDContext._trackDragCallback=function(_808){
TMPage.PAGE.getDnDContext()._trackDrag(_808);
TMAgent.eatEventCallback(_808);
return false;
};
TMDhtmlDnDContext._doDropCallback=function(_809){
TMPage.PAGE.getDnDContext()._doDrop(_809);
TMAgent.eatEventCallback(_809);
return false;
};
TMDhtmlDnDContext._checkAbortCallback=function(_80a){
return TMPage.PAGE.getDnDContext()._checkAbort(_80a);
};
TMDhtmlDnDContext._updateDragOptionsCallback=function(_80b){
var _80c=TMPage.PAGE.getDnDContext();
var _80d=_80c._dropTarget;
if(_80d){
_80c._acceptDrag(_80d,_80b,"acceptDropActionChanged",this._lastMousePage);
}
};
TMDhtmlDnDContext._autoscrollCallback=function(){
TMPage.PAGE.getDnDContext()._autoscroll();
};
TMDhtmlDnDContext._abortIfOutsideWindowCallback=function(_80e){
var _80f=_80e.pageX;
if(_80f===undefined){
return true;
}
if(!TMAgent.AGENT.pointInElementBounds(document.documentElement,_80f,_80e.pageY)){
TMPage.PAGE.getDnDContext()._abortEvent(_80e);
return false;
}else{
return true;
}
};
TMDhtmlDnDContext._CAPTURE_MAP={mouseout:TMDhtmlDnDContext._abortIfOutsideWindowCallback,mousemove:TMDhtmlDnDContext._trackDragCallback,mouseup:TMDhtmlDnDContext._doDropCallback,keydown:TMDhtmlDnDContext._checkAbortCallback,keyup:TMDhtmlDnDContext._updateDragOptionsCallback};
function TMDragSource(_810,_811){
if(arguments.length){
this.Init(_810,_811);
}
}
TMObject.createSubclass(TMDragSource);
TMDragSource.prototype.Init=function(_812,_813){
TMDragSource.superclass.Init.call(this);
if(_812==undefined){
_812=_813;
if(_812==undefinded){
_812=TMDnDContext.ACTION_COPY;
}
}
if(_813==undefined){
_813=(_812&TMDnDContext.ACTION_COPY)?TMDnDContext.ACTION_COPY:(_812&TMDnDContext.ACTION_MOVE)?TMDnDContext.ACTION_MOVE:TMDnDContext.ACTION_LINK;
}
this._allowedActions=_812;
this._defaultAction=_813;
this._dragRecognizer=this.CreateDragRecognizer();
this._component=null;
};
TMDragSource.prototype.initiateDrag=function(_814,_815){
var _816=this.GetDragTransferable(_815);
if(_816){
var _817=this.GetDragOffset(_815);
_814.startDrag(_815,_816,this.getAllowedActions(),this.getDefaultAction(),this.GetDragOverFeedback(_815),_817.x,_817.y,this.getDefaultDragCursor());
this._component.getPeer().initiateDrag(_814,_815);
}
};
TMDragSource.prototype.getDragRecognizer=function(){
return this._dragRecognizer;
};
TMDragSource.prototype.getComponent=function(){
return this._component;
};
TMDragSource.prototype.isAvailable=function(_818){
return (this.GetDragTransferable(_818)!=null);
};
TMDragSource.prototype.dragDropEnd=function(_819,_81a){
};
TMDragSource.prototype.dragEnter=function(_81b){
};
TMDragSource.prototype.dragExit=function(_81c){
};
TMDragSource.prototype.dragOver=function(_81d){
};
TMDragSource.prototype.dropActionChanged=function(_81e){
};
TMDragSource.prototype.toDebugString=function(){
return TMDragSource.superclass.toDebugString.call(this)+"["+"sourceComponent:"+this._component+"]";
};
TMDragSource.prototype.GetDragTransferable=function(_81f){
return null;
};
TMDragSource.prototype.getDefaultDragCursor=function(){
return "auto";
};
TMDragSource.prototype.getAllowedActions=function(){
return this._allowedActions;
};
TMDragSource.prototype.getDefaultAction=function(){
return this._defaultAction;
};
TMDragSource.prototype.GetDragOverFeedback=function(_820){
var _821=this.GetDragSourceNode(_820);
var _822=_821.cloneNode(true);
if(_822.nodeType==1){
this._cleanElement(_822);
}
var _823=TMAgent.AGENT.getComputedStyle(_821);
TMCollections.copyInto(_822.style,_823);
return _822;
};
TMDragSource.prototype._cleanElement=function(_824){
if(_824.id){
_824.id="";
}
if(_824.name){
_824.name="";
}
var _825=_824.firstChild;
while(_825){
if(_825.nodeType==1){
this._cleanElement(_825);
}
_825=_825.nextSibling;
}
};
TMDragSource.prototype.CreateDragRecognizer=function(){
return new TMDragRecognizer();
};
TMDragSource.prototype.GetDragOffset=function(_826){
return {x:_826.getOffsetX(),y:_826.getOffsetY()};
};
TMDragSource.prototype.__setComponent=function(_827){
this._component=_827;
};
function TMAttributeDragSource(_828){
this.Init(_828,TMDnDContext.ACTION_COPY,TMDnDContext.ACTION_COPY);
}
TMObject.createSubclass(TMAttributeDragSource,TMDragSource);
TMAttributeDragSource.prototype.Init=function(_829,_82a,_82b){
TMAttributeDragSource.superclass.Init.call(this,_82a,_82b);
this._propertyName=_829;
this._checkIfNeedsValidate=("value"==_829);
};
TMAttributeDragSource.prototype.toDebugString=function(){
return TMAttributeDragSource.superclass.toDebugString.call(this)+" propertyName:"+this._propertyName;
};
TMAttributeDragSource.prototype.isAvailable=function(_82c,_82d){
var _82e=this.getComponent();
if(_82e){
var _82f=_82e.getProperty(this._propertyName);
return (_82f!=null);
}else{
return false;
}
};
TMAttributeDragSource.prototype.GetDragTransferable=function(_830){
var _831=null;
var _832=this.getComponent();
if(_832){
if(this._checkIfNeedsValidate&&TMUIEditableValue.prototype.isPrototypeOf(_832)){
_832.validate();
}
var _833=_832.getProperty(this._propertyName);
if(_833!=null){
_831=TMObjectTransferable.createSingleObjectTransferable(_833);
}
}
return _831;
};
function TMDragRecognizer(){
this.Init();
}
TMObject.createSubclass(TMDragRecognizer);
TMDragRecognizer.prototype.Init=function(){
TMDragRecognizer.superclass.Init.call(this);
};
TMDragRecognizer.prototype.prepDrag=function(_834,_835,_836){
if(_836.getType()!=TMUIInputEvent.MOUSE_DOWN_EVENT_TYPE){
return null;
}
if(!_835.isAvailable(_834,_836)){
return null;
}
var _837=new Object();
_837.triggerEvent=_836.clone();
_837.startPageX=_836.getPageX();
_837.startPageY=_836.getPageY();
return _837;
};
TMDragRecognizer.prototype.abortPrep=function(_838,_839){
return _839.getType()==TMUIInputEvent.MOUSE_UP_EVENT_TYPE;
};
TMDragRecognizer.prototype.recognizeDrag=function(_83a,_83b){
if(_83b.getType()==TMUIInputEvent.MOUSE_MOVE_EVENT_TYPE){
var _83c=_83b.getPageX();
var _83d=_83b.getPageY();
if((Math.abs(_83a.startPageX-_83c)>3)||(Math.abs(_83a.startPageY-_83d)>3)){
return _83a.triggerEvent;
}
}
return null;
};
function TMDropTarget(){
this.Init();
}
TMObject.createSubclass(TMDropTarget);
TMDropTarget.prototype.Init=function(){
TMDropTarget.superclass.Init.call(this);
this._component=null;
};
TMDropTarget.prototype.getComponent=function(){
return this._component;
};
TMDropTarget.prototype.toDebugString=function(){
return TMDropTarget.superclass.toDebugString.call(this)+"[source component:"+this._component+"]";
};
TMDropTarget.prototype.acceptDragEnter=function(_83e,_83f,_840,_841){
var _842=this._acceptDrag(_83e,_83f,_840,_841);
if(_842!=TMDnDContext.ACTION_NONE){
this.AcceptedDragEnter(_83e,_842,_840,_841);
}
return _842;
};
TMDropTarget.prototype.dragExit=function(_843){
};
TMDropTarget.prototype.acceptDragOver=function(_844,_845,_846,_847){
return this._acceptDrag(_844,_845,_846,_847);
};
TMDropTarget.prototype.drop=function(_848,_849,_84a,_84b){
var _84c=this._component;
var _84d=_84c.getPeer().getPagePosition(_84c);
var _84e=_84a-_84d.x;
var _84f=_84b-_84d.y;
var _850=new TMDropEvent(_84c,_848.getDragSource(),_848.getTransferable(),_849,_84e,_84f);
_850.queue();
return TMDnDContext.ACTION_NONE;
};
TMDropTarget.prototype.acceptDropActionChanged=function(_851,_852,_853,_854){
return this._acceptDrag(_851,_852,_853,_854);
};
TMDropTarget.prototype.AcceptDrag=function(_855,_856,_857,_858,_859){
var _85a=_855.getDropTargetProperty("DropTarget:flavorAcceptance");
if(_85a==null){
_85a=this.CalculateFlavorAcceptance(_855);
_855.setDropTargetProperty("DropTarget:flavorAcceptance",_85a);
}
if(!_85a){
return TMDnDContext.ACTION_NONE;
}else{
if(_857&_856){
return _857;
}else{
if(_856&TMDnDContext.ACTION_MOVE){
return TMDnDContext.ACTION_MOVE;
}else{
if(_856&TMDnDContext.ACTION_COPY){
return TMDnDContext.ACTION_COPY;
}else{
if(_856&TMDnDContext.ACTION_LINK){
return TMDnDContext.ACTION_COPY;
}else{
return TMDnDContext.ACTION_NONE;
}
}
}
}
}
};
TMDropTarget.prototype.CalculateFlavorAcceptance=function(_85b){
var _85c=this.GetAllowedFlavors(_85b);
var _85d=(_85c)?_85c.length:0;
var _85e=_85b.getTransferable();
for(var i=0;i<_85d;i++){
var _860=_85c[i];
if(_85e.isDataFlavorSupported(_860)){
return true;
}
}
return false;
};
TMDropTarget.prototype.AcceptedDragEnter=function(_861,_862,_863,_864){
};
TMDropTarget.prototype.GetAllowedActions=function(_865){
return TMDnDContext.ACTIONS_ALL;
};
TMDropTarget.prototype.GetAllowedFlavors=function(_866){
return null;
};
TMDropTarget.prototype.__setComponent=function(_867){
this._component=_867;
};
TMDropTarget.prototype._acceptDrag=function(_868,_869,_86a,_86b){
var _86c=this.GetAllowedActions()&_868.getSourceActions();
if(_86c){
return this.AcceptDrag(_868,_86c,_869,_86a,_86b);
}else{
return TMDnDContext.ACTION_NONE;
}
};
function TMBasicDropTarget(_86d,_86e,_86f){
if(!TMCollections.isArray(_86f)){
_86f=[_86f];
}
this.Init(_86d,_86e,_86f);
}
TMObject.createSubclass(TMBasicDropTarget,TMDropTarget);
TMBasicDropTarget.prototype.Init=function(_870,_871,_872){
TMBasicDropTarget.superclass.Init.call(this);
this._dropHandler=_870;
this._allowedActions=_871;
this._allowedFlavors=_872;
};
TMBasicDropTarget.prototype.drop=function(_873,_874,_875,_876){
var _877=this._dropHandler;
var _878;
if(_877!=null){
_878=_877.call(this,_873,_874,_875,_876);
}else{
_878=_874;
}
if(_878==TMDnDContext.ACTION_NONE){
return _878;
}
return TMBasicDropTarget.superclass.drop.call(this,_873,_878,_875,_876);
};
TMBasicDropTarget.prototype.toDebugString=function(){
var _879=TMBasicDropTarget.superclass.toDebugString.call(this);
var _87a=this._allowedActions;
if(_87a){
_879+=" allowedActions:"+_87a.toString(2);
}
_879+=" allowedFlavors:"+this._allowedFlavors;
return _879;
};
TMBasicDropTarget.prototype.GetAllowedFlavors=function(_87b){
return this._allowedFlavors;
};
TMBasicDropTarget.prototype.GetAllowedActions=function(_87c){
return this._allowedActions;
};
function TMAttributeDropTarget(_87d){
this.Init(_87d,TMDnDContext.ACTION_COPY);
}
TMObject.createSubclass(TMAttributeDropTarget,TMDropTarget);
TMAttributeDropTarget.prototype.Init=function(_87e,_87f,_880){
TMAttributeDropTarget.superclass.Init.call(this,_87f,_880);
this._propertyName=_87e;
this._checkIfNeedsValidate=("value"==_87e);
};
TMAttributeDropTarget.prototype.toDebugString=function(){
return TMAttributeDropTarget.superclass.toDebugString.call(this)+" propertyName:"+this._propertyName;
};
TMAttributeDropTarget.prototype.drop=function(_881,_882,_883,_884){
var _885=_881.getTransferable().getTransferData(this._getTargetFlavor());
if((_885!=null)&&(_885.length==1)){
var _886=this.getComponent();
if(this._checkIfNeedsValidate&&TMUIEditableValue.prototype.isPrototypeOf(_886)){
_886.validate();
}
var _887=_885[0];
var _888=this._propertyName;
_886.setProperty(_888,_887);
return TMDnDContext.ACTION_COPY;
}else{
return TMDnDContext.ACTION_NONE;
}
};
TMAttributeDropTarget.prototype.GetAllowedActions=function(_889){
return TMDnDContext.ACTION_COPY;
};
TMAttributeDropTarget.prototype.GetAllowedFlavors=function(_88a){
var _88b=this._getTargetFlavor();
if(_88b!=null){
return [_88b];
}else{
return null;
}
};
TMAttributeDropTarget.prototype._getTargetFlavor=function(){
var _88c=this.getComponent();
var _88d=_88c.getProperty(this._propertyName);
if(_88d!=null){
return TMDataFlavor.getObjectFlavor(_88d);
}else{
if(_88d!==undefined){
return TMDataFlavor.ANY_FLAVOR;
}else{
return null;
}
}
};
function TMStampedDragSource(_88e,_88f,_890){
if(arguments.length){
this.Init(_88e,_88f,_890);
}
}
TMObject.createSubclass(TMStampedDragSource,TMDragSource);
TMStampedDragSource.prototype.Init=function(_891,_892,_893){
TMStampedDragSource.superclass.Init.call(this,_891,_892);
this._modelName=_893;
};
TMStampedDragSource.prototype.getModelName=function(){
return this._modelName;
};
TMStampedDragSource.prototype.isAvailable=function(_894,_895){
var _896=this._getRowKeys(_895);
if(_896){
return this.AreRowKeysAvailable(_894,_896);
}else{
return false;
}
};
TMStampedDragSource.prototype.getRowKeyDataFlavor=function(){
var _897=this.getComponent();
if(_897){
var _898=this._modelName;
if(_898){
return TMDataFlavor.getRowKeyDataFlavor(_898);
}
}
return null;
};
TMStampedDragSource.prototype.GetDragTransferable=function(_899){
var _89a=this.getComponent();
var _89b=this._modelName;
if(_89b&&_89b.length){
var _89c=this._getRowKeys(_899);
if(_89c){
var _89d=TMDataFlavor.getRowKeyDataFlavor(_89b);
var _89e=new Array();
_89e.push(_89c);
var _89f=new Array();
_89f.push(_89d);
this.UpdateTransferableObjects(_89e,_89f);
return new TMObjectTransferable(_89e,_89f);
}
}
return null;
};
TMStampedDragSource.prototype.UpdateTransferableObjects=function(_8a0,_8a1){
};
TMStampedDragSource.prototype.GetDragOverFeedback=function(_8a2){
return this.GetDragOverFeedbackForRowKeys(this._getRowKeys(_8a2));
};
TMStampedDragSource.prototype.GetDragOverFeedbackForRowKeys=function(_8a3){
return this.getComponent().getPeer().getDragNodeForRowKeys(_8a3);
};
TMStampedDragSource.prototype.GetDraggedRowKeys=function(_8a4){
return [_8a4];
};
TMStampedDragSource.prototype._getRowKeys=function(_8a5){
var peer=this.getComponent().getPeer();
var _8a7=peer.getRowKeyForEvent(_8a5);
if(_8a7){
return this.GetDraggedRowKeys(_8a7);
}else{
return null;
}
};
TMStampedDragSource.prototype.AreRowKeysAvailable=function(_8a8,_8a9){
var _8aa=true;
var len=_8a9.length;
for(var i=0;i<len;++i){
if(_8a9[i]=="-1"){
_8aa=false;
}
}
return _8aa;
};
function TMStampedDropTarget(_8ad,_8ae,_8af){
if(arguments.length){
this.Init(_8ad,_8ae,_8af);
}
}
TMObject.createSubclass(TMStampedDropTarget,TMDropTarget);
TMStampedDropTarget.prototype.Init=function(_8b0,_8b1,_8b2){
TMStampedDropTarget.superclass.Init.call(this);
this._allowedActions=_8b0;
this._modelName=_8b1;
this._listener=_8b2;
};
TMStampedDropTarget.prototype.toDebugString=function(){
return TMStampedDropTarget.superclass.toDebugString.call(this)+" allowedActions:"+this._allowedActions.toString(2);
};
TMStampedDropTarget.prototype.dragExit=function(_8b3){
this._cleanUpDragFeedback(_8b3);
};
TMStampedDropTarget.prototype.drop=function(_8b4,_8b5,_8b6,_8b7){
this._cleanUpDragFeedback(_8b4);
var key=this._getKeyForHintedPosition(_8b6,_8b7,_8b4.getDropTargetProperty(TMStampedDropTarget._LAST_KEY_KEY),_8b4.getDropTargetProperty(TMStampedDropTarget._LAST_KEY_BOUNDS_PROPERTY));
if(key){
return this.DropOnKey(_8b4,_8b5,_8b6,_8b7,key);
}else{
}
return TMDnDContext.ACTION_NONE;
};
TMStampedDropTarget.prototype._getKeyForHintedPosition=function(_8b9,_8ba,_8bb,_8bc){
var peer=this.getComponent().getPeer();
return peer.getRowKeyForHintedPosition(_8b9,_8ba,_8bb,_8bc);
};
TMStampedDropTarget.prototype.DropOnKey=function(_8be,_8bf,_8c0,_8c1,key){
var _8c3=new TMDropEvent(this.getComponent(),_8be.getDragSource(),_8be.getTransferable(),_8bf,_8c0,_8c1,TMDropEvent.DROP_ORIENTATION_ON,key,null,this._listener);
_8c3.queue();
return _8bf;
};
TMStampedDropTarget.prototype.getRowKeyDataFlavor=function(){
var _8c4=this.getComponent();
if(_8c4){
var _8c5=this._modelName;
if(_8c5){
return TMDataFlavor.getRowKeyDataFlavor(_8c5);
}
}
return null;
};
TMStampedDropTarget.prototype.AcceptDrag=function(_8c6,_8c7,_8c8,_8c9,_8ca){
var _8cb=TMDnDContext.ACTION_NONE;
var key=null;
var _8cd=null;
_8c8=TMStampedDropTarget.superclass.AcceptDrag.call(this,_8c6,_8c7,_8c8,_8c9,_8ca);
if(_8c8!=TMDnDContext.ACTION_NONE){
var _8ce=this.getComponent();
var peer=_8ce.getPeer();
var _8d0=_8c6.getDropTargetProperty(TMStampedDropTarget._LAST_KEY_KEY);
key=this._getKeyForHintedPosition(_8c9,_8ca,_8d0,_8c6.getDropTargetProperty(TMStampedDropTarget._LAST_KEY_BOUNDS_PROPERTY));
if(key!=null){
var _8d1=_8c6.getDropTargetProperty(key);
var _8d2;
var _8d3=TMStampedDropTarget._ACTION_KEYS[_8c8];
if(_8d1==null){
_8d1=new Object();
_8c6.setDropTargetProperty(key,_8d1);
_8cd=this._getKeyBounds(key);
_8d1[TMStampedDropTarget._BOUNDS_KEY]=_8cd;
_8d2=null;
}else{
_8d2=_8d1[_8d3];
_8cd=_8d1[TMStampedDropTarget._BOUNDS_KEY];
}
if(_8d2!=null){
_8cb=_8d2;
}else{
if(_8c8==TMDnDContext.ACTION_MOVE){
var _8d4=_8c6.getTransferable();
if(_8d4){
var _8d5=_8d4.getTransferData(this.getRowKeyDataFlavor());
if(TMCollections.indexOf(_8d5,key)!=-1){
_8c8=TMDnDContext.ACTION_NONE;
}
}
}
if(_8c8!=TMDnDContext.ACTION_NONE){
_8cb=this.AcceptDragOntoKey(_8c6,key,_8c7,_8c8,_8c9,_8ca);
}
_8d1[_8d3]=_8cb;
}
}
this._showDragFeedback(_8c6,key,_8cb,_8d0,_8c9,_8ca);
_8c6.setDropTargetProperty(TMStampedDropTarget._LAST_KEY_KEY,key);
_8c6.setDropTargetProperty(TMStampedDropTarget._LAST_ROWKEY_BOUNDS_PROPERTY,_8cd);
}
return _8cb;
};
TMStampedDropTarget.prototype._getKeyBounds=function(key){
var _8d7=this.FindRowByKey(rowKey);
if(_8d7){
return TMAgent.AGENT.getElementPageBounds(_8d7.tr);
}else{
return null;
}
};
TMStampedDropTarget.prototype.GetAllowedFlavors=function(_8d8){
var _8d9=null;
var _8da=this.getRowKeyDataFlavor();
if(_8da){
_8d9=new Array();
_8d9.push(_8da);
}
return _8d9;
};
TMStampedDropTarget.prototype.GetAllowedActions=function(_8db){
return this._allowedActions;
};
TMStampedDropTarget.prototype.AcceptDragOntoKey=function(_8dc,key,_8de,_8df,_8e0,_8e1){
return _8df;
};
TMStampedDropTarget.prototype._showDragFeedback=function(_8e2,key,_8e4,_8e5,_8e6,_8e7){
this.getComponent().getPeer().showDragFeedback(_8e2,key,_8e4,_8e5,_8e6,_8e7);
};
TMStampedDropTarget.prototype._cleanUpDragFeedback=function(_8e8){
this._showDragFeedback(_8e8,null,TMDnDContext.ACTION_NONE,_8e8.getDropTargetProperty(TMStampedDropTarget._LAST_KEY_KEY));
};
TMStampedDropTarget._LAST_KEY_KEY="StampedDropTarget:lrk";
TMStampedDropTarget._LAST_KEY_BOUNDS_PROPERTY="StampedDropTarget:lrkb";
TMStampedDropTarget._BOUNDS_KEY="bounds";
TMStampedDropTarget._ACTION_KEYS=[null,"COPY","MOVE",null,"LINK"];
function TMOverflowSupport(_8e9,peer,type,_8ec,_8ed){
this.Init(_8e9,peer,type,_8ec,_8ed);
}
TMObject.createSubclass(TMOverflowSupport);
TMOverflowSupport.InitClass=function(){
this._POPUP_ID_START="_afrOverflowPopupStart";
this._POPUP_ID_END="_afrOverflowPopupEnd";
};
TMOverflowSupport.needsOverflow=function(_8ee){
var _8ef=TMAgent.AGENT.getElementById(_8ee);
var _8f0=Math.max(_8ef.firstChild.offsetWidth,_8ef.scrollWidth);
var _8f1=Math.max(_8ef.firstChild.offsetHeight,_8ef.scrollHeight);
return (_8f0>_8ef.offsetWidth)||(_8f1>_8ef.offsetHeight);
};
TMOverflowSupport.prototype.Init=function(_8f2,peer,type,_8f5,_8f6){
TMOverflowSupport.superclass.Init.call(this);
this._peer=peer;
this._type=type||"end";
this._position=_8f5||"after";
this._orientation=_8f6||"horizontal";
this._initElements(_8f2);
this._steps=[];
this._startStep=0;
this._endStep=-1;
this._visibleSteps=0;
};
TMOverflowSupport.prototype.createStep=function(){
var step={elements:[],overflowElements:[],swapElements:[]};
this._steps.push(step);
this._visibleSteps++;
this._endStep++;
};
TMOverflowSupport.prototype.addElement=function(_8f8){
var _8f9=this._steps.length-1;
this._steps[_8f9].elements.push(_8f8);
};
TMOverflowSupport.prototype.addOverflowElement=function(_8fa){
this._steps[this._steps.length-1].overflowElements.push(_8fa);
};
TMOverflowSupport.prototype.createSwapPosition=function(_8fb){
var _8fc=this._steps.length-1;
var _8fd=_8fb.ownerDocument;
var _8fe=_8fd.createElement("a");
_8fe.style.display="none";
var _8ff=_8fd.createElement("a");
_8ff.style.display="none";
_8fb.parentNode.insertBefore(_8ff,_8fb);
this._steps[_8fc].swapElements.push([_8fb,_8ff,_8fe]);
return _8fe;
};
TMOverflowSupport.prototype.handleResize=function(){
this._handleResize();
};
TMOverflowSupport.prototype._handleResize=function(){
if(this._type=="both"){
this._setActiveStep();
}
while(this._showNext()){
}
while(this._hideNext()){
}
if(this._visibleSteps==this._steps.length){
var peer=this._peer,_901=peer.getComponent();
if(peer.isPopupVisible(_901,TMOverflowSupport._POPUP_ID_START)){
peer.hidePopup(_901,TMOverflowSupport._POPUP_ID_START);
}
if(peer.isPopupVisible(_901,TMOverflowSupport._POPUP_ID_END)){
peer.hidePopup(_901,TMOverflowSupport._POPUP_ID_END);
}
}
};
TMOverflowSupport.prototype.removeOverflowSupport=function(){
delete this._peer;
delete this._element;
if(this._type!="end"){
this._removeCallbacks(true);
delete this._startIndicator;
delete this._startContainer;
}
if(this._type!="start"){
this._removeCallbacks();
delete this._endIndicator;
delete this._endContainer;
}
this._removeSteps();
};
TMOverflowSupport.prototype._initElements=function(_902){
this._element=TMAgent.AGENT.getElementById(_902);
if(this._type!="end"){
this._startIndicator=this._getElement(_902,"soi");
this._startIndicator.tabIndex=0;
this._startContainer=this._getElement(_902,"soc");
this._initClickHandling(true);
}
if(this._type!="start"){
this._endIndicator=this._getElement(_902,"eoi");
this._endIndicator.tabIndex=0;
this._endContainer=this._getElement(_902,"eoc");
this._initClickHandling();
}
};
TMOverflowSupport.prototype._getElement=function(_903,_904){
var id=TMUIPeer.CreateSubId(_903,_904);
return TMAgent.AGENT.getElementById(id);
};
TMOverflowSupport.prototype._initClickHandling=function(_906){
var _907=_906?this._showStartContainer:this._showEndContainer;
var _908=_906?this._startIndicator:this._endIndicator;
this._initShowHints(_906);
var _909=this.createCallback(_907);
this[_906?"_startShowCall":"_endShowCall"]=_909;
TMAgent.AGENT.addBubbleEventListener(_908,"click",_909);
TMAgent.AGENT.addBubbleEventListener(_908,"keydown",_909);
};
TMOverflowSupport.prototype._initShowHints=function(_90a){
var _90b,_90c=new Object();
if(this._position=="before"){
_90b=TMUIPopupComponent[_90a?"ALIGN_BEFORE_START":"ALIGN_BEFORE_END"];
}else{
_90b=TMUIPopupComponent[_90a?"ALIGN_AFTER_START":"ALIGN_AFTER_END"];
}
_90c[TMDhtmlPopupWindow.HINT_ALIGN]=_90b;
_90c[TMDhtmlPopupWindow.HINT_ALIGN_ELEMENT]=this[_90a?"_startIndicator":"_endIndicator"];
_90c[TMDhtmlPopupWindow.HINT_AUTODISMISS]=TMDhtmlPopupWindow.HINT_AUTODISMISS_ALWAYS;
_90c[TMDhtmlPopupWindow.HINT_TYPE]=TMDhtmlPopupWindow.HINT_TYPE_MENU;
this[_90a?"_startHints":"_endHints"]=_90c;
};
TMOverflowSupport.prototype._showStartContainer=function(_90d){
if(_90d.type=="keydown"&&(_90d.keyCode!=AdfKeyStroke.ENTER_KEY&&_90d.keyCode!=AdfKeyStroke.ARROWDOWN_KEY)){
return;
}
var _90e=this._peer.getComponent();
this._peer.showPopup(_90e,this._startContainer,this._startHints,TMOverflowSupport._POPUP_ID_START);
};
TMOverflowSupport.prototype._showEndContainer=function(_90f){
if(_90f.type=="keydown"&&(_90f.keyCode!=AdfKeyStroke.ENTER_KEY&&_90f.keyCode!=AdfKeyStroke.ARROWDOWN_KEY)){
return;
}
var _910=this._peer.getComponent();
this._peer.showPopup(_910,this._endContainer,this._endHints,TMOverflowSupport._POPUP_ID_END);
};
TMOverflowSupport.prototype._setActiveStep=function(){
var step,i=-1;
while(step=this._steps[++i]){
var _913,j=0;
while(_913=step.overflowElements[j++]){
if(TMDomUtils.containsCSSClassName(_913.firstChild,"p_TMSelected")){
this._activeStep=i;
return;
}
}
j=0;
while(_913=step.elements[j++]){
if(TMDomUtils.containsCSSClassName(_913,"p_TMSelected")){
this._activeStep=i;
return;
}
}
}
};
TMOverflowSupport.prototype._showNext=function(){
if(this._visibleSteps==this._steps.length){
return false;
}
if(this._hasAvailableSpace()||!this._activeStepIsVisible()){
switch(this._type){
case "end":
this._showEndStep();
break;
case "start":
this._showStartStep();
break;
case "both":
var _915=this._activeStep-this._startStep;
var _916=this._visibleSteps-_915-1;
var _917=this._steps.length-1;
if((_915<_916&&this._startStep!=0)||this._endStep==_917){
this._showStartStep();
}else{
this._showEndStep();
}
}
return true;
}
return false;
};
TMOverflowSupport.prototype._hideNext=function(){
if(this._visibleSteps==0||this._hasAvailableSpace()){
return false;
}
switch(this._type){
case "end":
this._hideEndStep();
break;
case "start":
this._hideStartStep();
break;
case "both":
var _918=this._activeStep-this._startStep;
var _919=this._visibleSteps-_918-1;
if((_918>=_919)||this._startStep==-1){
this._hideStartStep();
}else{
this._hideEndStep();
}
}
return true;
};
TMOverflowSupport.prototype._activeStepIsVisible=function(){
if(this._type!="both"){
return true;
}
return this._activeStep>=this._startStep&&this._activeStep<=this._endStep;
};
TMOverflowSupport.prototype._hasAvailableSpace=function(){
var _91a=0;
switch(this._startStep){
case _91a:
TMDomUtils.removeCSSClassName(this._element,"p_TMStartOverflow");
break;
case _91a+1:
TMDomUtils.addCSSClassName(this._element,"p_TMStartOverflow");
break;
}
var _91b=this._steps.length-1;
switch(this._endStep){
case _91b:
TMDomUtils.removeCSSClassName(this._element,"p_TMEndOverflow");
break;
case _91b-1:
TMDomUtils.addCSSClassName(this._element,"p_TMEndOverflow");
break;
}
var _91c=Math.max(this._element.firstChild.offsetWidth,this._element.scrollWidth);
var _91d=Math.max(this._element.firstChild.offsetHeight,this._element.scrollHeight);
var _91e=3;
var _91f=_91c<=this._element.offsetWidth+_91e;
var _920=_91d<=this._element.offsetHeight+_91e;
return _91f&&_920;
};
TMOverflowSupport.prototype._showStartStep=function(){
var step=this._steps[this._startStep-1];
this._showStep(step,true);
this._startStep--;
};
TMOverflowSupport.prototype._showEndStep=function(){
var step=this._steps[this._endStep+1];
this._showStep(step);
this._endStep++;
};
TMOverflowSupport.prototype._hideStartStep=function(){
var step=this._steps[this._startStep];
this._hideStep(step,true);
this._startStep++;
};
TMOverflowSupport.prototype._hideEndStep=function(){
var step=this._steps[this._endStep];
this._hideStep(step);
this._endStep--;
};
TMOverflowSupport.prototype._showStep=function(step,_926){
this._showElements(step.elements);
this._hideOverflowElements(step.overflowElements,_926);
this._swapElements(step.swapElements,true);
this._visibleSteps++;
};
TMOverflowSupport.prototype._hideStep=function(step,_928){
this._hideElements(step.elements);
this._showOverflowElements(step.overflowElements,_928);
this._swapElements(step.swapElements);
this._visibleSteps--;
};
TMOverflowSupport.prototype._hideElements=function(_929){
var i=0,_92b;
while(_92b=_929[i++]){
_92b._display=_92b.style.display;
_92b.style.display="none";
}
};
TMOverflowSupport.prototype._showElements=function(_92c){
var i=0,_92e;
while(_92e=_92c[i++]){
_92e.style.display=_92e._display||"";
}
};
TMOverflowSupport.prototype._hideOverflowElements=function(_92f,_930){
var i=0,_932;
while(_932=_92f[i++]){
_932.parentNode.removeChild(_932);
}
};
TMOverflowSupport.prototype._showOverflowElements=function(_933,_934){
var i=0,_936;
var _937=_934?this._startContainer:this._endContainer;
while(_936=_933[i++]){
if(this._position=="before"||(_934&&(this._orientation=="vertical"))){
_937.appendChild(_936);
}else{
_937.insertBefore(_936,_937.firstChild);
}
}
};
TMOverflowSupport.prototype._swapElements=function(_938,show){
var i=0,_93b;
while(_93b=_938[i++]){
var _93c=_93b[0];
var _93d=_93b[show?1:2];
_93d.parentNode.insertBefore(_93c,_93d);
}
};
TMOverflowSupport.prototype._removeCallbacks=function(_93e){
var _93f=_93e?this._startIndicator:this._endIndicator;
var _940=_93e?this._startShowCall:this._endShowCall;
TMAgent.AGENT.removeBubbleEventListener(_93f,"click",_940);
TMAgent.AGENT.removeBubbleEventListener(_93f,"keydown",_940);
};
TMOverflowSupport.prototype._removeSteps=function(){
var step,_942=this._steps;
while(step=_942.pop()){
TMCollections.clear(step.elements);
TMCollections.clear(step.overflowElements);
var _943,_944=step.swapElements;
while(_943=_944.pop()){
TMCollections.clear(_943);
}
}
};

