
HClass=function(){if(arguments.length){if(this===window){HClass.prototype.extend.call(arguments[0],arguments.callee.prototype);}
else{this.extend(arguments[0]);}}};HClass.prototype={extend:function(_a1,_1){var _p0=HClass.prototype.extend;if(arguments.length===2){var _P4=this[_a1];if((_P4 instanceof Function)&&(_1 instanceof Function)&&_P4.valueOf()!==_1.valueOf()&&(/\bbase\b/).test(_1)){var _b1=_1;_1=function(){var _59=this.base;this.base=_P4;var _69=_b1.apply(this,arguments);this.base=_59;return _69;};_1.valueOf=function(){return _b1;};_1.toString=function(){return String(_b1);};}
return this[_a1]=_1;}else if(_a1){var _c1={toSource:null};var _r6=["toString","valueOf"];if(HClass._Q4){_r6.push("constructor");}
for(var i=0;(_d=_r6[i]);i++){if(_a1[_d]!==_c1[_d]){_p0.call(this,_d,_a1[_d]);}}
for(var _d in _a1){if(!_c1[_d]){_p0.call(this,_d,_a1[_d]);}}}
this.nu=function(){return new(this.extend({constructor:function(args){this.base.apply(this,args);}}))(arguments);};return this;},base:function(){}};HClass.extend=function(_Q,_R4){var _p0=HClass.prototype.extend;if(!_Q){_Q={};}
HClass._Q4=true;var _c1=new this;_p0.call(_c1,_Q);var _q2=_c1.constructor;_c1.constructor=this;delete HClass._Q4;var _P1=function(){if(!HClass._Q4){_q2.apply(this,arguments);}
this.constructor=_P1;};_P1.prototype=_c1;_P1.extend=this.extend;_P1.implement=this.implement;_P1.toString=function(){return String(_q2);};_p0.call(_P1,_R4);var _S4=_q2?_P1:_c1;if(_S4.init instanceof Function){_S4.init();}
return _S4;};HClass.implement=function(_43){if(_43 instanceof Function){_43=_43.prototype;}
this.prototype.extend(_43);};var Base=HClass;if([]['indexOf']===undefined){Object.extend=function(destination,source){for(property in source){destination[property]=source[property];}
return destination;};Object.extend(Array.prototype,{indexOf:function(_79){var i=0,l=this.length;for(;i<l;i++){if(this[i]===_79){return i;}}
return-1;}});}
try{if(window['console']===undefined){console={log:function(){}};}}catch(e){}
ELEMTickerInterval=10;BROWSER_TYPE={ie:false,ie6:false,ie7:false,ie8:false,opera:false,safari:false,symbian:false,chrome:false,firefox:false,firefox2:false,firefox3:false};ELEM={_q2:function(){var _0=ELEM;_0._Q1=false;_0._R1=[];_0._53=null;_0._O3=false;_0._s6=false;_0._89=0;_0._99=0;_0._a9=0;_0._t6=0;_0._u6=0;_0._P3=0;_0._6b=0;_0._v6=0;_0._T4=0;_0._w6=0;_0._63=500;_0._S1=null;_0._d1=ELEMTickerInterval;_0._T1=false;_0._73=false;_0._83=1;_0._u=[];if(_0._Q1){_0._S={_b9:[]};}else{_0._U4=[];}
_0._U1={};_0._h0={};_0._i0={};_0._C0={};_0._M0=[];_0._X0={};_0._c9=",ADDRESS,BLOCKQUOTE,CENTER,DIR,DIV,DL,FIELDSET,FORM,H1,H2,H3,H4,H5,H6,HR,ISINDEX,MENU,NOFRAMES,NOSCRIPT,OL,P,PRE,TABLE,UL,";},_7b:function(_x6,_F){if(!ELEM._Q1){return;}
var _0=ELEM,i=0,_y6=[],_S=_0._z6(_F),_N0=_S._N0;for(;i!==_x6;i++){_y6.push(_0.make(_N0,_F));}
for(i=0;i!==_x6;i++){_0.del(_y6[i]);}},_V4:function(_5){var _4,_0=ELEM,_u=_0._u,_d9=(_0._U4.length!==0);if(_d9){_4=_0._U4.pop();_u[_4]=_5;}
else{_u.push(_5);_4=_u.length-1;}
return _4;},_V1:function(_4){var _0=ELEM;_0._h0[_4]=[];_0._U1[_4]={};_0._i0[_4]=[];_0._C0[_4]={};_0._X0[_4]=false;},bindId:function(_A6){var _0=ELEM,_5=document.getElementById(_A6),_7=_0._V4(_5);_0._V1(_7);return _7;},bind:function(_5){var _0=ELEM,_4=_0._V4(_5);_0._V1(_4);return _4;},_8b:function(_4,_5){var _0=ELEM;_0._u[_4]=_5;},get:function(_4){return ELEM._u[_4];},setHTML:function(_4,_81){try{var _0=ELEM;if(!_0._u[_4]){return;}
if(!((typeof _81==='string')||(typeof _81==='number'))){return;}
_0._u[_4].innerHTML=_81;}catch(e){}},getHTML:function(_4){try{var _0=ELEM;if(_0._u[_4]){return _0._u[_4].innerHTML;}}catch(e){}
return'';},_z6:function(_F){if(!ELEM._Q1){return null;}
var _0=ELEM,_S=_0._S;if(!_S[_F]){_S._b9.push(_F);_S[_F]=[];_S[_F]._e9=1;_S[_F]._f9=0;_S[_F]._N0=_0.make(_0._N0,'div');}
return _S[_F]._N0;},del:function(_4){var _0=ELEM,_5=_0._u[_4];if(_0._T1){_0.del(_4);}
_0._T1=true;if(_0._Q1){var _F=_5.tagName,_N0=_0._z6(_F),_S=_0._S[_F];_0.append(_4,_N0);}
var _B6=_0._M0.indexOf(_4);if(_B6!==-1){_0._M0.splice(_B6,1);}
_0._V1(_4);if(_0._Q1){_S._e9++;_S.push(_4);}else{_0._U4.push(_4);var _C6=_5.parentNode;if(_C6!==null){_C6.removeChild(_5);}
_5=null;_0._u[_4]=null;}
_0._T1=false;},append:function(_D6,_v1){var _0=ELEM,_a1=_0._u[_D6],_g9=_0._u[_v1];_g9.appendChild(_a1);},setCSS:function(_4,_E6){ELEM._u[_4].style.cssText=_E6;},getCSS:function(_4){return ELEM._u[_4].style.cssText;},getVisibleSize:function(_4){var _r2,_0=ELEM,_5=_0._u[_4],w=_5.offsetWidth,h=_5.offsetHeight,_9=_5.parentNode;while(_9&&_9.nodeName.toLowerCase()!=='body'){if(!_0._O0){_r2=document.defaultView.getComputedStyle(_9,null).getPropertyValue('overflow');}
else{_r2=_9.currentStyle.getAttribute('overflow');}
_r2=_r2!=='visible';if(w>_9.clientWidth&&_r2){w=_9.clientWidth-_5.offsetLeft;}
if(h>_9.clientHeight&&_r2){h=_9.clientHeight-_5.offsetTop;}
_5=_5.parentNode;_9=_5.parentNode;}
return[w,h];},getSize:function(_4){var _0=ELEM,_5=_0._u[_4],w=_5.offsetWidth,h=_5.offsetHeight;return[w,h];},getScrollSize:function(_4){var _0=ELEM,_5=_0._u[_4],w=_5.scrollWidth,h=_5.scrollHeight;return[w,h];},getVisiblePosition:function(_4){var _0=ELEM,x=0,y=0,_5=_0._u[_4];while(_5!==document){x+=_5.offsetLeft;y+=_5.offsetTop;x-=_5.scrollLeft;y-=_5.scrollTop;_5=_5.parentNode;if(!_5){break;}}
return[x,y];},getOpacity:function(_4){var _O,_W4,_0=ELEM,_X4=_0.getStyle;if(_O===_X4(_4,'-khtml-opacity')){return parseFloat(_O);}
if(_O===_X4(_4,'-moz-opacity')){return parseFloat(_O);}
_W4=_X4(_4,'opacity',true);if(_O===_W4||(_W4===0)){return parseFloat(_O);}
if(_O===(_0._u[_4].currentStyle['filter']||'').match(/alpha(opacity=(.*))/)){if(_O[1]){return parseFloat(_O[1])/100;}}
return 1.0;},setOpacity:function(_4,_O){var _0=ELEM;if(_O===1&&_0._Y0){_0._u[_4].style.setAttribute('filter',_0.getStyle(_4,'filter',true).replace(/alpha([^)]*)/gi,''));}
else{if(_O<0.01){_O=0;}
if(_0._Y0){_0._u[_4].style.setAttribute('filter',_0.getStyle(_4,'filter',true).replace(/alpha([^)]*)/gi,'')+'alpha(opacity='+_O*100+')');}
else if(_0._O0){(_0._u[_4].style.setAttribute('opacity',_O));}
else{_0._u[_4].style.setProperty('opacity',_O,'');}}},getIntStyle:function(_4,_8){var _1=ELEM.getStyle(_4,_8);return parseInt(_1,10);},setBoxCoords:function(_4,_t0){ELEM.setStyle(_4,'left',_t0[0]+'px');ELEM.setStyle(_4,'top',_t0[1]+'px');ELEM.setStyle(_4,'width',_t0[2]+'px');ELEM.setStyle(_4,'height',_t0[3]+'px');},getExtraWidth:function(_4){var _e1=ELEM.getIntStyle;return _e1(_4,'padding-left')+_e1(_4,'padding-right')+_e1(_4,'border-left-width')+_e1(_4,'border-right-width');},getExtraHeight:function(_4){var _e1=ELEM.getIntStyle;return _e1(_4,'padding-top')+_e1(_4,'padding-bottom')+_e1(_4,'border-top-width')+_e1(_4,'border-bottom-width');},setFPS:function(_Z0){var _0=ELEM;_0._d1=1000/_Z0;if(_0._d1<ELEMTickerInterval){_0._d1=ELEMTickerInterval;}},setSlowness:function(_83){ELEM._83=_83;},setIdleDelay:function(_63){ELEM._63=_63;},_s2:false,flushLoop:function(_P0){var _0=ELEM;_0._P3++;if(_0._Y0&&(_0._P3%5===0)&&_0._s2){iefix._W0();_0._s2=false;}
clearTimeout(_0._S1);if(_0._T1){_P0*=2;_0._S1=setTimeout(function(){ELEM.flushLoop(_P0);},_P0);return;}else{if(!_0._73){if(_0._Y0&&_0._s2){iefix._W0();_0._s2=false;}
_0._S1=setTimeout(function(){ELEM.flushLoop(_P0);},_0._63);return;}
_P0=parseInt(_0._83*(_0._T4/_0._w6),ELEMTickerInterval);if(_P0<_0._d1||!_P0){_P0=_0._d1;}
_0._T1=true;_0._S1=setTimeout(function(){ELEM.flushLoop(_P0);},_P0);}
_0._T4-=new Date().getTime();var i,_4,_M0=_0._M0,_F6=_M0.length,_w1=_M0.splice(0,_F6),_9b=new Date().getTime();for(i=0;i<_F6;i++){_0._ab++;_4=_w1.pop();_0._X0[_4]=false;_0._Y4(_4);_0._h9(_4);}
_0._w6++;_0._T4+=new Date().getTime();if(_0._M0.length===0&&_0._73){_0._73=false;}
_0._T1=false;},_h9:function(_4){var _0=ELEM,_i0=_0._i0[_4],_C0=_0._C0[_4],_5=_0._u[_4],_8,_W1,i,_G6=_i0.length,_w1=_i0.splice(0,_G6);for(i=0;i!==_G6;i++){_8=_w1.pop();_W1=_C0[_8];_5.setAttribute(_8,_W1);}},getAttr:function(_4,_8,_N){var _0=ELEM,_H6=_0._C0[_4][_8],_W1;if(_H6!==undefined&&!_N){return _H6;}
var _5=_0._u[_4];if(_5.getAttribute(_8)===null){_5[_8]='';}
_W1=_5.getAttribute(_8);_0._C0[_4][_8]=_W1;return _W1;},setAttr:function(_4,_8,_1,_N){var _0=ELEM,_i0=_0._i0[_4],_C0=_0._C0[_4],_X1=_1!==_0.getAttr(_4,_8);if(_X1){_C0[_8]=_1;if(_N){_0._u[_4].setAttribute(_8,_1);}
else{if(_i0.indexOf(_8)===-1){_i0.push(_8);}
if(!_0._X0[_4]){_0._M0.push(_4);_0._X0[_4]=true;_0._Z4();}}}},delAttr:function(_4,_8){var _X1,_0=ELEM,_i0=_0._i0[_4],_C0=_0._C0[_4];delete _C0[_8];_0._u[_4].removeAttribute(_8);if(_i0.indexOf(_8)!==-1){_i0.splice(_i0.indexOf(_8,1));}
if(_0._X0[_4]){_0._M0.splice(_0._M0.indexOf(_4,1));_0._X0[_4]=false;_0._Z4();}},hasClassName:function(_7,_A){var _6=ELEM.get(_7);if(!_6){return null;}
var _f1=_6.className.split(' ');return(_f1.indexOf(_A)!==-1);},addClassName:function(_7,_A){var _0=ELEM,_6=_0.get(_7);if(!_6){return;}
if(_6.className===''||_6.className===' '){_6.className=_A;}
else{var _f1=_6.className.split(' '),_p=_f1.indexOf(_A);if(_p===-1){_f1.push(_A);_6.className=_f1.join(' ');}}},removeClassName:function(_7,_A){var _0=ELEM,_6=_0.get(_7);if(!_6){return;}
if(!_0.hasClassName(_7,_A)){return;}
var _f1=_6.className.split(' '),_p=_f1.indexOf(_A);if(_p!==-1){_f1.splice(_p,1);_6.className=_f1.join(' ');}},_Z4:function(){var _0=ELEM;if(!_0._73){_0._73=true;if(!_0._T1){clearTimeout(_0._S1);_0._S1=setTimeout(function(){ELEM.flushLoop(ELEM._d1);},_0._d1);}}},setStyle:function(_4,_8,_1,_N){var _0=ELEM,_J=_0._U1[_4],_I6=_0._u,_X1,_h0;_0._99++;if(_J===undefined){_0._V1(_4);_J=_0._U1[_4];}
_X1=_1!==_J[_8];if(_X1){_0._a9++;_J[_8]=_1;if(_N){if(_8==='opacity'){_0.setOpacity(_4,_1);}
else{if(_0._O0){var _Q3=_8.replace(/((-)([a-z])(\w))/g,function($0,$1,$2,$3,$4){return $3.toUpperCase()+$4;});_I6[_4].style[_Q3]=_J[_8];}
else{_I6[_4].style.setProperty(_8,_J[_8],'');}}
if(_0._Y0){if(iefix._I3.indexOf(_8)!==-1){_0._s2=true;}}}
else{_X0=_0._X0;_h0=_0._h0[_4];if(_h0.indexOf(_8)===-1){_h0.push(_8);}
if(!_X0[_4]){_0._M0.push(_4);_X0[_4]=true;_0._Z4();}}}},make:function(_v1,_F){if(_v1===undefined){_v1=0;}
if(_F===undefined){_F='DIV';}else{_F=_F.toUpperCase();}
var _0=ELEM,_5,_4;_0._89++;if(_0._Q1){if(_0._S[_F]){if(_0._S[_F].length!==0){_4=_0._S[_F].pop();_0._S[_F]._f9++;_5=_0._u[_4];if(_0._c9.indexOf(','+_F+',')!==-1){_0.setCSS(_4,'display:block;');}else{_0.setCSS(_4,'display:inline;');}
_0.append(_4,_v1);return _4;}}}
_5=document.createElement(_F);_0._u[_v1].appendChild(_5);_4=_0._V4(_5);_0._V1(_4);return _4;},windowSize:function(){return[(window.innerWidth)?window.innerWidth:document.documentElement.clientWidth,(window.innerHeight)?window.innerHeight:document.documentElement.clientHeight];},getStyle:function(_4,_8,_N){var _0=ELEM,_J=_0._U1[_4],_x1;_0._t6++;if((_J[_8]===undefined)||_N){if(!_N){_0._u6++;}
if((_8==='opacity')&&_N){_x1=_0.getOpacity(_4);}
else{_x1=document.defaultView.getComputedStyle(_0._u[_4],null).getPropertyValue(_8);}
_J[_8]=_x1;}
return _J[_8];},_i9:function(_4,_8,_N){var _0=ELEM,_J=_0._U1[_4],_x1;_0._t6++;if((_J[_8]===undefined)||_N){if(!_N){_0._u6++;}
if((_8==='opacity')&&_N){_x1=_0.getOpacity(_4);}
else{_j9=_8.replace(/((-)([a-z])(\w))/g,function($0,$1,$2,$3,$4){return $3.toUpperCase()+$4;});_0._u[_4].currentStyle[_j9];}
_J[_8]=_x1;}
return _J[_8];},_Y4:function(_4){var _0=ELEM,_h0=_0._h0[_4],_J=_0._U1[_4],_5=_0._u[_4],_93,_t2,_05,_8,_w1,_x1;if(!_5){return;}
_93=_5.style;_t2=_h0.length;_w1=_h0.splice(0,_t2);for(_05=0;_05!==_t2;_05++){_8=_w1.pop();_0._v6++;if(_8==='opacity'){_x1=_0.setOpacity(_4,_J[_8]);}
else{_93.setProperty(_8,_J[_8],'');}}},_k9:function(_4){var _0=ELEM,_h0=_0._h0[_4],_J=_0._U1[_4],_5=_0._u[_4];if(!_5){return;}
var _93=_5.style,_t2=_h0.length,i=0,_8,_w1=_h0.splice(0,_t2);for(;i!==_t2;i++){_8=_w1.pop();_0._v6++;if(_8==='opacity'){_0.setOpacity(_4,_J[_8]);}
else{if(_0._Y0){if(iefix._I3.indexOf(_8)!==-1){_0._s2=true;}}
try{var _Q3=_8.replace(/((-)([a-z])(\w))/g,function($0,$1,$2,$3,$4){return $3.toUpperCase()+$4;});_93.setAttribute(_Q3,_J[_8]);}
catch(e){console.log(e);}}}},_J6:function(){var _0=ELEM,_g1,_Y,_15;if(_0._O0){ELEM.getStyle=_0._i9;}
if(_0._O0){ELEM._Y4=_0._k9;}
_0.bind(document.body);if(_0._Q1){_0._N0=_0.make(0,'div');_0.setCSS(_0._N0,"display:none;visibility:hidden;");_0.setAttr(_0._N0,'id','trashcan_'+_0._N0);}
_0._S1=setTimeout(function(){ELEM.flushLoop(ELEM._d1);},_0._d1);if(!_0._R1){return;}
while(_0._R1.length!==0){_g1=_0._R1.shift();_Y=(typeof _g1);if(_Y==='function'){_g1.call();}
else if(_Y==='string'){_15=eval(_g1);if(typeof _15==='string'){_0._R1.push(_15);}}}
_0._s6=true;},_l9:function(){var _0=ELEM,_Q0=navigator.userAgent,_R3=(document.all&&_Q0.indexOf("Opera")===-1),_S3=[['opera','_cb',_Q0.indexOf("Opera")!==-1],['safari','_m9',_Q0.indexOf("KHTML")!==-1],['symbian','_db',_Q0.indexOf("SymbianOS")!==-1],['chrome','_eb',_Q0.indexOf("Chrome")!==-1],['ie','_O0',_R3],['ie6','_Y0',_R3&&_Q0.indexOf("MSIE 6")!==-1],['ie7','_fb',_R3&&_Q0.indexOf("MSIE 7")!==-1],['ie8','_gb',_R3&&_Q0.indexOf("MSIE 8")!==-1],['firefox','_hb',_Q0.indexOf("Firefox")!==-1],['firefox2','_ib',_Q0.indexOf("Firefox/2.")!==-1],['firefox3','_jb',_Q0.indexOf("Firefox/3.")!==-1]],i=0,_K6,_L6,_25;for(;i<_S3.length;i++){_K6=_S3[i][0];_L6=_S3[i][1];_25=_S3[i][2];BROWSER_TYPE[_K6]=_25;_0[_L6]=_25;}
_0._M6();},_n9:function(_g1){var _0=ELEM,_Y=(typeof _g1);if(_0._s6===true){if(_Y==='string'){eval(_g1);}
else if(_Y==='function'){_g1.call();}}else{_0._R1.push(_g1);}},_M6:function(){var _kb=false,_0=ELEM;if(_0._O0){var _N6="javascript:void(0)";if(location.protocol==="https:"){_N6="src=//0";}
document.write("<scr"+"ipt id=_o9 defer src="+_N6+"></scr"+"ipt>");var _p9=document.getElementById("_o9");_p9.onreadystatechange=function(){if(this.readyState==="complete"){ELEM._O3=true;ELEM._J6();delete ELEM._R1;clearTimeout(ELEM._53);delete ELEM._53;}};return;}
else if((/KHTML|WebKit/i.test(navigator.userAgent))&&(/loaded|complete/.test(document.readyState))){_0._O3=true;}
else if(document.body){_0._O3=true;}
if(!_0._O3){_0._53=setTimeout('ELEM._M6()',ELEMTickerInterval*10);}else{_0._J6();delete _0._R1;clearTimeout(_0._53);delete _0._53;}}};ELEM._q2();LOAD=ELEM._n9;ELEM._l9();Event={element:function(e){return e.target||e.srcElement;},pointerX:function(e){return e.pageX||e.clientX+document.documentElement.scrollLeft;},pointerY:function(e){return e.pageY||e.clientY+document.documentElement.scrollTop;},stop:function(e){if(e.preventDefault){e.preventDefault();e.stopPropagation();}
else{e.returnValue=false;e.cancelBubble=true;}},isLeftClick:function(e){if(ELEM._O0||ELEM._m9){return(e.button===1);}
else{return(e.button===0);}},observers:false,_q9:function(_5,_d,_B,_D0){if(!Event.observers){Event.observers=[];}
if(_5.addEventListener){this.observers.push([_5,_d,_B,_D0]);_5.addEventListener(_d,_B,_D0);}
else if(_5.attachEvent){this.observers.push([_5,_d,_B,_D0]);_5.attachEvent("on"+_d,_B);}},unloadCache:function(){if(!Event.observers){return;}
var i,l=Event.observers.length;for(i=0;i<l;i++){Event.stopObserving.apply(this,Event.observers[0]);}
Event.observers=false;},observe:function(_5,_d,_B,_D0){_D0=_D0||false;Event._q9(_5,_d,_B,_D0);},stopObserving:function(_5,_d,_B,_D0){if(_5===undefined){console.log('Warning Event.stopObserving of event name: "'+_d+'" called with an undefined elem!');return;}
_D0=_D0||false;if(_5['removeEventListener']){_5.removeEventListener(_d,_B,_D0);}
else if(detachEvent){_5.detachEvent("on"+_d,_B);}
var i=0;while(i<Event.observers.length){var eo=Event.observers[i];if(eo&&eo[0]===_5&&eo[1]===_d&&eo[2]===_B&&eo[3]===_D0){Event.observers[i]=null;Event.observers.splice(i,1);}
else{i++;}}},KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34};if(ELEM._O0){Event.observe(window,"unload",Event.unloadCache,false);}
_O6={mouseMove:false,mouseDown:false,click:false,mouseUp:false,draggable:false,droppable:false,keyDown:false,keyUp:false,mouseWheel:false,isDragged:false,textEnter:false};EVENT={status:[false,false,0,0,[],false,false,false],button1:0,button2:1,crsrX:2,crsrY:3,keysDown:4,altKeyDown:5,ctrlKeyDown:6,shiftKeyDown:7,enableDroppableChecks:true,startDroppable:function(){var _0=EVENT;_0.hovered=[];_0.hoverInterval=50;_0.hoverTimer=new Date().getTime();},start:function(){var _r9=ELEM._O0?document:window,_0=EVENT,_35=[['mousemove',_0.mouseMove],['mouseup',_0.mouseUp],['mousedown',_0.mouseDown],['click',_0.click],['keyup',_0.keyUp],['keydown',_0.keyDown],['keypress',_0.keyPress],['contextmenu',_0.contextMenu],['resize',_0.resize],['mousewheel',_0.mouseWheel]],i=0;for(;i!==_35.length;i++){Event.observe(_r9,_35[i][0],_35[i][1]);}
if(window.addEventListener){window.addEventListener('DOMMouseScroll',EVENT.mouseWheel,false);window.addEventListener('resize',EVENT.resize,false);}
_0.listeners=[];_0.focused=[];_0.resizeListeners=[];_0.coordListeners=[];_0.focusOptions={};_0.dragItems=[];if(_0.enableDroppableChecks){_0.startDroppable();}
_0.topmostDroppable=null;_0.textEnterCtrls=[];_0._u2=[];_0._s9=true;_0._P6=null;_0.activeControl=null;_0._45=null;},coordCacheFlush:function(_7){if(_7){EVENT._u2[_7]=null;}
else{EVENT._u2=[];}},reg:function(_e,_h1){var _7,_5,_0=EVENT,_T3;_7=_e.elemId;_5=ELEM.get(_7);if(ELEM._O0){_5.setAttribute('ctrl',_e);}
else{_5.ctrl=_e;}
_0.listeners[_7]=true;_0.focused[_7]=false;for(_T3 in _O6){if(_h1[_T3]===undefined){_h1[_T3]=_O6[_T3];}}
_0.focusOptions[_7]=_h1;var _55=_0.coordListeners.indexOf(_7);if(_h1.mouseMove){if(_55===-1){_0.coordListeners.push(_7);}}
else if(_55!==-1){_0.coordListeners.splice(_55,1);}
if(_h1.textEnter){if(_0.textEnterCtrls.indexOf(_e.viewId)===-1){_0.textEnterCtrls.push(_e.viewId);}}
if(_h1.resize){if(_0.resizeListeners.indexOf(_e.viewId)===-1){_0.resizeListeners.push(_e.viewId);}}
Event.observe(_5,'mouseover',_0._v2);},unreg:function(_e){var _0=EVENT,_7,_5;if(_e===this.activeControl){_0.changeActiveControl(null);}
_7=_e.elemId;_5=ELEM.get(_7);this.listeners[_7]=false;this.focused[_7]=false;this._u2[_7]=null;var _Q6=_0.textEnterCtrls.indexOf(_e.viewId);if(_Q6!==-1){_0.textEnterCtrls.splice(_Q6,1);}
var _R6=_0.resizeListeners.indexOf(_e.viewId);if(_R6!==-1){_0.resizeListeners.splice(_R6,1);}
if(_5!==undefined){Event.stopObserving(_5,'mouseover',_0._v2);}},resize:function(e){var i=0,_0=EVENT,_S6,_e;for(;i<_0.resizeListeners.length;i++){_S6=_0.resizeListeners[i];_e=HSystem.views[_S6];if(_e['onResize']){_e.onResize();}}},_v2:function(e){if(!Event.element){return;}
var _w=Event.element(e);while(_w&&_w.ctrl===undefined){_w=_w.parentNode;}
if(!_w){return;}
var _0=_w.ctrl;EVENT.focus(_0);Event.stop(e);},_U3:function(e){if(!Event.element){return;}
var _w=Event.element(e);while(_w&&_w.ctrl===undefined){_w=_w.parentNode;}
if(!_w){return;}
var _0=_w.ctrl;EVENT.blur(_0);Event.stop(e);},focus:function(_e){var _0=EVENT,_7=_e.elemId,_5=ELEM.get(_7);if(_0.focused[_7]===false&&_0.focusOptions[_7].isDragged===false){Event.stopObserving(_5,'mouseover',_0._v2);Event.observe(_5,'mouseout',_0._U3);_0.focused[_7]=true;if(_e['focus']){_e.focus();}}},blur:function(_e){var _0=EVENT,_7=_e.elemId,_5=ELEM.get(_7);if(_0.focused[_7]===true&&_0.focusOptions[_7].isDragged===false){Event.stopObserving(_5,'mouseout',_0._U3);Event.observe(_5,'mouseover',_0._v2);_0.focused[_7]=false;if(_e['blur']){_e.blur();}}},mouseMove:function(e){var _0=EVENT,x=Event.pointerX(e),y=Event.pointerY(e),_a3=_0.flushMouseMove(x,y);_0.status[_0.crsrX]=x;_0.status[_0.crsrY]=y;_0._w2(e);if(_a3){Event.stop(e);}},flushMouseMove:function(x,y){var _0=EVENT,_a3=false,i=0,j,_7,_e;clearTimeout(_0._P6);_a3=false;for(;i!==_0.dragItems.length;i++){_7=_0.dragItems[i];_0.focusOptions[_7].ctrl.doDrag(x,y);_0.coordCacheFlush(_7);_a3=true;}
if(_0.enableDroppableChecks){if(new Date().getTime()>_0.hoverTimer+_0.hoverInterval){for(i=0;i!==_0.coordListeners.length;i++){_7=_0.coordListeners[i];_e=_0.focusOptions[_7].ctrl;_e.mouseMove(x,y);}
if(_0.enableDroppableChecks){_0._T6();}
var _V3;for(i=0;i!==_0.dragItems.length;i++){_V3=_0.topmostDroppable;_0.topmostDroppable=null;_7=_0.dragItems[i];_e=_0.focusOptions[_7].ctrl;var _W3,_b3;for(j=0;j!==_0.hovered.length;j++){_W3=_0.hovered[j];if(_W3!==_7&&_0.focusOptions[_W3].ctrl){_b3=_0.focusOptions[_W3].ctrl;if(!_0.topmostDroppable||_b3.zIndex()>_0.topmostDroppable.zIndex()||_b3.supr===_0.topmostDroppable){if(_0.focusOptions[_b3.elemId].droppable){_0.topmostDroppable=_b3;}}}}
if(_V3!==_0.topmostDroppable){if(_V3){_V3.onHoverEnd(_e);}
if(_0.topmostDroppable){_0.topmostDroppable.onHoverStart(_e);}}}
_0.hoverTimer=new Date().getTime();}
else{_0._P6=setTimeout(function(){EVENT.flushMouseMove(x,y);},_0.hoverInterval);}}
return _a3;},_T6:function(){var _0=EVENT,x=_0.status[_0.crsrX],y=_0.status[_0.crsrY],i=0,_e,_5,_65,_41,_t0;_0.hovered=[];for(;i!==_0.listeners.length;i++){if(!_0.listeners[i]||!_0.focusOptions[i].ctrl){continue;}
_e=_0.focusOptions[i].ctrl;_5=ELEM.get(i);if(!_0._s9||!_0._u2[i]){_65=ELEM.getVisiblePosition(_e.elemId);_41=ELEM.getVisibleSize(_e.elemId);_0._u2[i]=[_65[0],_65[1],_41[0],_41[1]];}
_t0=_0._u2[i];if(x>=_t0[0]&&x<=_t0[0]+_t0[2]&&y>=_t0[1]&&y<=_t0[1]+_t0[3]){_0.hovered.push(i);}}},startDragging:function(_e){var _0=EVENT;_0.dragItems.push(_e.elemId);_0.changeActiveControl(_e);_e.startDrag(_0.status[_0.crsrX],_0.status[_0.crsrY]);},mouseDown:function(e,_R0){var _0=EVENT,_U6=false,x=_0.status[_0.crsrX],y=_0.status[_0.crsrY],i=0,_d0=null,_X3=[],_Y3=[];_0._w2(e);if(_R0===undefined){_R0=Event.isLeftClick(e);}
if(_R0){_0.status[_0.button1]=true;}
else{_0.status[_0.button2]=true;}
for(;i!==_0.focused.length;i++){if(_0.focused[i]===true){if(_0.focusOptions[i].ctrl.enabled){_d0=_0.focusOptions[i].ctrl;}
if((_0.focusOptions[i].draggable===true)&&_0.dragItems.indexOf(i)===-1){_X3.push(i);}
else if(_0.focusOptions[i].mouseDown===true){_Y3.push(i);}}}
if(_d0){_0.changeActiveControl(_d0);}
for(i=0;i!==_X3.length;i++){_0.dragItems.push(_X3[i]);_0.focusOptions[_X3[i]].ctrl.startDrag(x,y);_U6=true;}
var _c3=_Y3.length;for(i=0;i!==_Y3.length;i++){if(_0.focusOptions[_Y3[i]].ctrl.mouseDown(x,y,_R0)){_c3--;}}
if(_U6){document.body.focus();_0._t9=document.onselectstart;document.onselectstart=function(){return false;};}
if(this.enableDroppableChecks){if((_c3===0)&&(_0.hovered.length!==0)&&(_d0&&(_d0.textElemId===false))){Event.stop(e);}}
return true;},click:function(e,_R0){var _0=EVENT,x=_0.status[_0.crsrX],y=_0.status[_0.crsrY],i=0,_d0=null,_Z3=[];_0._w2(e);if(_R0===undefined){_R0=Event.isLeftClick(e);}
if(_R0){_0.status[_0.button1]=true;}
else{_0.status[_0.button2]=true;}
for(;i!==_0.focused.length;i++){if(_0.focused[i]===true){if(_0.focusOptions[i].ctrl.enabled){_d0=_0.focusOptions[i].ctrl;}
if(_0.focusOptions[i].click===true){_Z3.push(i);}}}
if(_d0){_0.changeActiveControl(_d0);}
var _c3=_Z3.length;for(i=0;i!==_Z3.length;i++){if(_0.focusOptions[_Z3[i]].ctrl.click(x,y,_R0)){_c3--;}}
if(_0.enableDroppableChecks){if((_c3===0)&&(_0.hovered.length!==0)&&(_d0&&(_d0.textElemId===false))){Event.stop(e);}}
return true;},changeActiveControl:function(_e){var _0=EVENT,_d3=_0.activeControl;if(_e!==_d3){if(_d3){_d3.active=false;_d3._V6(_e);}
_0.activeControl=null;if(_e){_e.active=true;_0.activeControl=_e;_e._W6(_d3);}}},mouseUp:function(e){var _0=EVENT,_X6=false,_R0=Event.isLeftClick(e),x=_0.status[_0.crsrX],y=_0.status[_0.crsrY],_7,_e,i=0;_0._w2(e);_0.status[_0.button1]=false;_0.status[_0.button2]=false;for(;i!==_0.dragItems.length;i++){_7=_0.dragItems[i];_e=_0.focusOptions[_7].ctrl;_e.endDrag(x,y);_X6=true;if(_0.enableDroppableChecks){_0._T6();if(_0.hovered.indexOf(_7)===-1){_0.blur(_e);}}
if(_0.topmostDroppable){_0.topmostDroppable.onHoverEnd(_e);_0.topmostDroppable.onDrop(_e);_0.topmostDroppable=null;}}
_0.dragItems=[];if(_X6){document.onselectstart=_0._t9;}
for(i=0;i!==_0.focused.length;i++){if(_0.focused[i]===true){if(_0.focusOptions[i].mouseUp===true){_0.focusOptions[i].ctrl.mouseUp(x,y,_R0);}}}
return true;},keyDown:function(e){var _0=EVENT,_y1=e.keyCode;_0._w2(e);if(_0.activeControl&&_0.focusOptions[_0.activeControl.elemId].keyDown===true){Event.stop(e);if(_0._45!==_y1){_0.activeControl.keyDown(_y1);}}
if(_0.status[_0.keysDown].indexOf(_y1)===-1){_0.status[_0.keysDown].push(_y1);}
_0._45=_y1;},keyUp:function(e){var _0=EVENT,_y1=e.keyCode,_75,i=0,_y3,_e;_0._w2(e);_0._45=null;if(_0.activeControl&&_0.focusOptions[_0.activeControl.elemId].keyUp===true){_0.activeControl.keyUp(_y1);}
_75=_0.status[_0.keysDown].indexOf(_y1);if(_75!==-1){_0.status[_0.keysDown].splice(_75,1);}
for(;i<_0.textEnterCtrls.length;i++){_y3=_0.textEnterCtrls[i];_e=HSystem.views[_y3];if(_e.textEnter){_e.textEnter();}}},keyPress:function(e){var _0=EVENT;if(_0.activeControl&&_0.focusOptions[_0.activeControl.elemId].keyDown===true){Event.stop(e);}},mouseWheel:function(e){var _0=EVENT,_20=0,i=0;if(!e){e=window.event;}
if(e.wheelDelta){_20=0-(e.wheelDelta/120);}
else if(e.detail){_20=0-(e.detail/3);}
if(BROWSER_TYPE.opera){_20=0-_20;}
for(;i!==_0.focused.length;i++){if(_0.focused[i]===true){if(_0.focusOptions[i].mouseWheel===true){Event.stop(e);_0.focusOptions[i].ctrl.mouseWheel(_20);}}}},contextMenu:function(e){EVENT.mouseDown(e,false);Event.stop(e);},_w2:function(e){var _0=EVENT;_0.status[_0.altKeyDown]=e.altKey;_0.status[_0.ctrlKeyDown]=e.ctrlKey;_0.status[_0.shiftKeyDown]=e.shiftKey;}};LOAD(function(){EVENT.start();});SHAClass=HClass.extend({constructor:function(_T){_T&&this.setChrsz(_T);},_85:0,hexCase:function(){return this._85;},setHexCase:function(_Y6){this._85=_Y6;},_95:"=",base64Pad:function(){return this._95;},setBase64Pad:function(_Z6){this._95=_Z6;},_T:8,chrsz:function(){return this._T;},setChrsz:function(_07){this._T=_07;},hexSHA1:function(_S0){var _0=this;return _0._17(_0._x2(_0._y2(_S0),_S0.length*_0._T));},b64SHA1:function(_S0){var _0=this;return _0._a5(_0._x2(_0._y2(_S0),_S0.length*_0._T));},strSHA1:function(_S0){var _0=this;return _0._27(_0._x2(_0._y2(_S0),_S0.length*_0._T));},hexHmacSHA1:function(_8,_r){var _0=this;return _0._17(_0._b5(_8,_r));},b64HmacSHA1:function(_8,_r){var _0=this;return _0._a5(_0._b5(_8,_r));},strHmacSHA1:function(_8,_r){var _0=this;return _0._27(_0._b5(_8,_r));},str2Base64:function(_n){var _0=this;return _0._a5(_0._y2(_n));},test:function(){return this.hexSHA1("abc")==="a9993e364706816aba3e25717850c26c9cd0d89d";},_x2:function(_o,_j0){var _0=this;_o[_j0>>5]|=0x80<<(24-_j0%32);_o[((_j0+64>>9)<<4)+15]=_j0;var _Y1=new Array(80),_Z1=1732584193,_k0=-271733879,_u0=-1732584194,_v0=271733878,_z2=-1009589776,i,_37,_47,_57,_67,_77,j,_01;for(i=0;i<_o.length;i+=16){_37=_Z1;_47=_k0;_57=_u0;_67=_v0;_77=_z2;for(j=0;j<80;j++){if(j<16){_Y1[j]=_o[i+j];}
else{_Y1[j]=_0._c5(_Y1[j-3]^_Y1[j-8]^_Y1[j-14]^_Y1[j-16],1);}
_01=_0._i1(_0._i1(_0._c5(_Z1,5),_0._u9(j,_k0,_u0,_v0)),_0._i1(_0._i1(_z2,_Y1[j]),_0._v9(j)));_z2=_v0;_v0=_u0;_u0=_0._c5(_k0,30);_k0=_Z1;_Z1=_01;}
_Z1=_0._i1(_Z1,_37);_k0=_0._i1(_k0,_47);_u0=_0._i1(_u0,_57);_v0=_0._i1(_v0,_67);_z2=_0._i1(_z2,_77);}
return[_Z1,_k0,_u0,_v0,_z2];},_u9:function(_01,_k0,_u0,_v0){if(_01<20){return(_k0&_u0)|((~_k0)&_v0);}
if(_01<40){return _k0^_u0^_v0;}
if(_01<60){return(_k0&_u0)|(_k0&_v0)|(_u0&_v0);}
return _k0^_u0^_v0;},_v9:function(_01){return(_01<20)?1518500249:(_01<40)?1859775393:(_01<60)?-1894007588:-899497514;},_b5:function(_8,_r){var _0=this,_e3=_0._y2(_8),_87=new Array(16),_97=new Array(16),i,_11;if(_e3.length>16){_e3=_0._x2(_e3,_8.length*_0._T);}
for(i=0;i<16;i++){_87[i]=_e3[i]^0x36363636;_97[i]=_e3[i]^0x5C5C5C5C;}
_11=_0._x2(_87.concat(_0._y2(_r)),512+_r.length*_0._T);return _0._x2(_97.concat(_11),512+160);},_i1:function(_o,_i){var _a7=(_o&0xFFFF)+(_i&0xFFFF),_w9=(_o>>16)+(_i>>16)+(_a7>>16);return(_w9<<16)|(_a7&0xFFFF);},_c5:function(_z3,_b7){return(_z3<<_b7)|(_z3>>>(32-_b7));},_y2:function(_n){var _0=this,_f3=[],_d5=(1<<_0._T)-1,_x9=_n.length*_0._T,i;for(i=0;i<_x9;i+=_0._T){_f3[i>>5]|=(_n.charCodeAt(i/_0._T)&_d5)<<(32-_0._T-i%32);}
return _f3;},_27:function(_f3){var _0=this,_n="",_d5=(1<<_0._T)-1,i,_e5=_f3.length*32,_y9=32-_0._T;for(i=0;i<_e5;i+=_0._T){_n+=String.fromCharCode((_f3[i>>5]>>>(_y9-i%32))&_d5);}
return _n;},_17:function(_j1){var _0=this,_c7=_0._85?"0123456789ABCDEF":"0123456789abcdef",_n="",i,_f5=_j1.length*4;for(i=0;i<_f5;i++){_n+=_c7.charAt((_j1[i>>2]>>((3-i%4)*8+4))&0xF)+
_c7.charAt((_j1[i>>2]>>((3-i%4)*8))&0xF);}
return _n;},_a5:function(_j1){var _0=this,_j2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_n="",i,_f5=_j1.length*4,_d7,_e7,_lb,_f7,j,_e5=_j1.length*32;for(i=0;i<_f5;i+=3){_d7=(((_j1[i>>2]>>8*(3-i%4))&0xFF)<<16);_e7=(((_j1[i+1>>2]>>8*(3-(i+1)%4))&0xFF)<<8);_z9=((_j1[i+2>>2]>>8*(3-(i+2)%4))&0xFF);_f7=(_d7|_e7|_z9);for(j=0;j<4;j++){if(i*8+j*6>_e5){_n+=_0._95;}
else{_n+=_j2.charAt((_f7>>6*(3-j))&0x3F);}}}
return _n;}});SHA=SHAClass.nu(16);HSystem=HClass.extend({windowFocusBehaviour:1,constructor:null,apps:[],appPriorities:[],busyApps:[],freeAppIds:[],defaultInterval:10,defaultPriority:20,viewsZOrder:[],ticks:0,maxAppRunTime:5000,scheduler:function(){for(var _C=0;_C<this.apps.length;_C++){if(this.apps[_C]){if(!this.busyApps[_C]){if((this.ticks%this.appPriorities[_C])===0){if(HSystem.apps[_C]){HSystem.apps[_C]._g7();}}}}}
if(this._A2.length!==0){this._A9();}},ticker:function(){this.ticks++;this.scheduler();this._mb=setTimeout(function(){HSystem.ticker();},this.defaultInterval);},addApp:function(_k1,_w0){var _C;if(this.freeAppIds.length!==0){_C=this.freeAppIds.unshift();this.apps[_C]=_k1;}else{this.apps.push(_k1);_C=this.apps.length-1;}
_k1.parent=this;_k1.parents=[this];_k1.appId=_C;this.startApp(_C,_w0);return _C;},startApp:function(_C,_w0){if(_w0===undefined){_w0=this.defaultInterval;}
this.appPriorities[_C]=_w0;this.busyApps[_C]=false;},stopApp:function(_C){this.busyApps[_C]=true;},reniceApp:function(_C,_w0){this.appPriorities[_C]=_w0;},killApp:function(_C,_h7){if(!_h7){var _B9=new Date().getTime();while(this.busyApps[_C]===true){if(new Date().getTime()>_B9+this.maxAppRunTime){break;}}}
this.busyApps[_C]=true;this.apps[_C].destroyAllViews();this.apps[_C]=null;this.freeAppIds.push(_C);},views:[],_g5:[],addView:function(_c){var _04;if(this._g5.length===0){_04=this.views.length;this.views.push(_c);}
else{_04=this._g5.pop();this.views[_04]=_c;}
return _04;},delView:function(_j){this.views[_j]=null;this._g5.push(_j);},activeWindowId:0,windowFocus:function(_c){if(!_c){this.activeWindowId=0;return;}
var _h5=this.activeWindowId,_E0=this.views,_j=_c.viewId;if(_E0[_h5]){if(_E0[_h5]["windowBlur"]){_E0[_h5].windowBlur();}}
this.activeWindowId=_j;_c.bringToFront();_c.windowFocus();},_A2:[],updateZIndexOfChildren:function(_j){if(this._A2.indexOf(_j)===-1){this._A2.push(_j);}},_A9:function(){var j=0,_0=HSystem,_i7=this._A2,_C9=_i7.length;for(;j<_C9;j++){var _j=_i7.shift(),_E0=((_j===null)?(_0.viewsZOrder):(_0.views[_j].viewsZOrder)),_D9=_E0.length,_02=ELEM.setStyle,_i5=_0.views,_j7,_c,_E9='elemId',_F9='z-index',i=0,_7;for(;i<_D9;i++){_j7=_E0[i];_c=_i5[_j7];_7=_c[_E9];_02(_7,_F9,i);}}}});LOAD(function(){HSystem.ticker();});HApplication=HClass.extend({componentBehaviour:['app'],constructor:function(_w0,_g){this.viewId=null;this.views=[];this.markupElemIds=[];this.viewsZOrder=HSystem.viewsZOrder;HSystem.addApp(this,_w0);if(_g){this.label=_g;}
else{this.label='ProcessID='+this.appId;}},buildParents:function(_j){var _c=HSystem.views[_j],i=0;_c.parent=this;_c.parents=[];for(;i<this.parents.length;i++){_c.parents.push(this.parents[i]);}
_c.parents.push(this);},addView:function(_c){var _j=HSystem.addView(_c);this.views.push(_j);this.buildParents(_j);this.viewsZOrder.push(_j);return _j;},removeView:function(_j){HSystem.views[_j].remove();},destroyView:function(_j){HSystem.views[_j].die();},die:function(){HSystem.killApp(this.appId,false);},destroyAllViews:function(){for(var i=0;i<this.views.length;i++){HSystem.views[this.views[i]].die();}},_G9:function(){var i,_j,_c;for(i=0;i<this.views.length;i++){_j=this.views[i];_c=HSystem.views[_j];if((_c!==null)&&(_c['onIdle']!==undefined)){_c.onIdle();}}},_g7:function(){HSystem.busyApps[this.appId]=true;this.onIdle();this._G9();HSystem.busyApps[this.appId]=false;},onIdle:function(){}});COMM={_nb:function(){alert("'ERROR: This web browser doesn't support XMLHttpRequest. Please upgrade; unable to continue.");}};if(window['XMLHttpRequest']!==undefined){COMM._j5=function(){return new XMLHttpRequest();};}
else if(BROWSER_TYPE.ie){COMM._j5=function(){return new ActiveXObject("Msxml2.XMLHTTP");};}
else{COMM._j5=function(){console.log("No XMLHttpRequest object types known. Can't Communicate.");return new COMM._ob();};}
COMM._k5=function(_g3){var i=0,_T0=_g3.length,_l5='';for(;i<_T0;i++){_l5+=encodeURIComponent(_g3[i]);_l5+=(i===_T0-1)?'':(i%2===0)?'=':'&';}
return _l5;};COMM._k7=function(_0){if(_0.X.readyState===4){var _14=_0.X.status,_l7='on'+_14,_H9=((_14>=200&&_14<300)||(_14===0));_0[_l7]?_0[_l7](_0):_H9?_0.onSuccess(_0):_0.onFailure(_0);}};COMM.request=function(_h,_3){var _24=COMM,_0=_3?_3:{},_b1=_3.method?_3.method.toUpperCase():'GET',_12=(_3.async===undefined)?true:_3.async,_g3=_3.params?_3.params:[],_m5=_3.headers?_3.headers:{},_l1=_3.contentType?_3.contentType:'application/x-www-form-urlencoded',_I9=_3.charset?_3.charset:'UTF-8',_J9=_3.username?_3.username:null,_K9=_3.username?_3.password:null;if(!_3.onFailure){_0.onFailure=function(resp){console.log('No failure handler specified, response: ',resp);};}
if(!_3.onSuccess){_0.onSuccess=function(resp){console.log('No success handler specified, response: ',resp);};}
_0.url=_h;_0.options=_3;_0.X=_24._j5();if(_b1==='GET'&&_g3.length!==0){_h+=((_h.indexOf('?')!==-1)?'&':'?')+_24._k5(_g3);}
if(!_12){console.log("WARNING: Synchronous "+_b1+" request to "+_h+", these will fail on the Symbian web browser.");}
_0.X.open(_b1,_h,_12,_J9,_K9);_0.X.onreadystatechange=function(){_24._k7(_0);};if(_b1==='POST'){_m5['Content-Type']=_l1+'; charset='+_I9;var _n5=_3.body?_3.body:'';for(var _m7 in _m5){_0.X.setRequestHeader(_m7,_m5[_m7]);}
_0.X.send(_n5);}
else if(_b1==='GET'){_0.X.send(null);}
if(!_12){_24._k7(_0);}
return _0;};COMM.Queue=HApplication.extend({constructor:function(){this.commandQueue=[];this.paused=false;this.base(10);},onIdle:function(){!this.paused&&this.commandQueue.length!==0&&this.flush();},pause:function(){this.paused=true;},resume:function(){this.paused=false;this.flush();},STRINGS:{ERR:'COMM.Queue Error: ',JS_EXEC_FAIL:'Failed to execute the Javascript function: ',REASON:' Reason:'},flush:function(){var i=0,_l,_B,_F0,_j0=this.commandQueue.length;for(;i<_j0;i++){if(this.paused){break;}
_l=this.commandQueue.shift();try{if(typeof _l==='function'){_l.call();}
else{_B=_l[0];_F0=_l[1];_B.call(_pb);}}
catch(e){var _o5=this.STRINGS;console.log([_o5.ERR_PREFIX,_o5.JS_EXEC_FAIL,_l,_o5.REASON,e.description].join(''));}}},unshift:function(_B,_F0){if(_F0!==undefined){this.commandQueue.unshift([_B,_F0]);}
else{this.commandQueue.unshift(_B);}},push:function(_B,_F0){if(_F0!==undefined){this.commandQueue.push([_B,_F0]);}
else{this.commandQueue.push(_B);}},unshiftEval:function(_p5,_F0){var _B;eval('_B = function(){'+_p5+'}');this.unshift(_B);},pushEval:function(_p5){var _B;eval('_B = function(){'+_p5+'}');this.push(_B);}}).nu();COMM.Session=HClass.extend({constructor:function(){var _0=this;_0.sha=SHAClass.nu(8);_0.sha_key=_0.sha.hexSHA1(((new Date().getTime())*Math.random()*1000).toString());_0.ses_key='0:.o.:'+_0.sha_key;_0.req_num=0;},newKey:function(_B2){var _0=this,_n7=_0.sha.hexSHA1(_B2+_0.sha_key);_0.req_num++;_0.ses_key=_0.req_num+':.o.:'+_n7;_0.sha_key=_n7;}}).nu();COMM.Transporter=HApplication.extend({constructor:function(){var _0=this;this.serverLostMessage='Server Connection Lost: Reconnecting...';_0.label='Transporter';_0.url=false;_0.busy=false;_0.stop=true;_0._C2=false;_0._q5=false;_0._qb=false;_0.base(1);},onIdle:function(){this.sync();},poll:function(_N9){HSystem.reniceApp(this.appId,_N9);},getClientEvalError:function(){var _0=COMM.Transporter;return _0._q5?'&err_msg='+
COMM.Values._o7(_0._q5):'';},success:function(resp){var _0=COMM.Transporter;if(!resp.X.responseText){_0.failure(resp);return;}
var _h3=eval(resp.X.responseText),i=1,_O9=_h3.length,_B2=_h3[0],_P9=COMM.Session,_z1=COMM.Queue;if(_B2===''){console.log('Invalid session, error message should follow...');}
else{_P9.newKey(_B2);}
for(;i<_O9;i++){try{_z1.pushEval(_h3[i]);}
catch(e){console.log('clientError:'+e+" - "+e.description+' - '+_h3[i]);_0._q5=e+" - "+e.description+' - '+_h3[i];}}
if(_0._C2){_0._C2.die();_0._C2=false;}
_z1.push(function(){COMM.Transporter.flushBusy();});_z1.flush();},flushBusy:function(){var _0=COMM.Transporter;_0.busy=false;COMM.Values.tosync.length!==0&&_0.sync();},failMessage:function(_30,_N1){var _0=COMM.Transporter,_z1=COMM.Queue;console.log('failMessage?');_0.stop=true;_z1.push(function(){jsLoader.load('default_theme');});_z1.push(function(){jsLoader.load('controls');});_z1.push(function(){jsLoader.load('servermessage');});_z1.push(function(){ReloadApp.nu(_30,_N1);});},failure:function(_G0){var _0=COMM.Transporter;if(_G0.X.status===0){console.log(_0.serverLostMessage);if(!_0._C2){_0._C2=HView.extend({_p7:function(_G0){if(_G0!==undefined){this._q7=_G0;}
this._r5++;return this;},_Q9:function(){this._r7++;var _G0=this._q7;COMM.request(_G0.url,_G0.options);},onIdle:function(){var _s7=new Date().getTime();this.bringToFront();if(this._r5>0&&(this._r7!==this._r5)&&(this._t7+2000<_s7)&&this._q7){this._t7=_s7;this._Q9();}
this.base();},_r5:0,_r7:0,_t7:new Date().getTime(),die:function(){var _k1=this.app;HSystem.reniceApp(_k1.appId,this._R9);this.base();_k1.sync();},drawSubviews:function(){var _W=[['padding-left','8px'],['background-color','#600'],['text-align','center'],['color','#fff'],['font-size','16px'],['opacity',0.85]],i=0;for(;i<_W.length;i++){this.setStyle(_W[i][0],_W[i][1]);}
this.setHTML(this.app.serverLostMessage);this._R9=HSystem.appPriorities[this.appId];if(HSystem.appPriorities[this.appId]<10){HSystem.reniceApp(this.appId,10);}
this._s5=HView.extend({_u7:0,_s5:function(){var _t5,_v=ELEM.getSize(this.parent.elemId)[0];this._u7++;if(this._u7%2===0){_t5=HRect.nu(0,0,80,20);}
else{_t5=HRect.nu(_v-80,0,_v,20);}
this.animateTo(_t5,2000);},onAnimationEnd:function(){if(this.drawn){this._s5();}}}).nu([0,0,80,20],this).setStyle('background-color','#fff').setStyle('opacity',0.8)._s5();}}).nu([0,0,200,20,0,null],_0)._p7(_G0);}
else{_0._C2._p7();}}
else{_0.failMessage('Transporter Error','Transporter was unable to complete the synchronization request.');}},sync:function(){if(this.stop){return;}
if(this.busy){return;}
this.busy=true;var _0=this,_40=COMM.Values.sync(),_B2='ses_key='+COMM.Session.ses_key,_S9=_0.getClientEvalError(),_n5=[_B2,_S9,_40?'&values='+_40:''].join('');COMM.request(_0.url,{_0:_0,onSuccess:COMM.Transporter.success,onFailure:COMM.Transporter.failure,method:'POST',async:true,body:_n5});}}).nu();COMM.SessionWatcher=HApplication.extend({constructor:function(_v7,_T9){this.base(10,'SesWatcher');this.sesTimeoutValue=HVM.values[_T9];this.timeoutSecs=_v7;},onIdle:function(){if((new Date().getTime()-this.sesTimeoutValue.value)>this.timeoutSecs){this.sesTimeoutValue.set(new Date().getTime());}}});COMM.URLResponder=HApplication.extend({constructor:function(){this.urlMatchers=[];this.urlCallBack=[];this.defaultCallBack=null;this.prevCallBack=false;this.prevMatchStr='';this.base(1,'URLResponder');this.value=0;this.clientValue=HValue.nu(false,'');this.clientValue.bind(this);this.serverValue=false;},setDefaultResponder:function(_A1){this.defaultCallBack=_A1;},delResponder:function(_i3,_A1){_A1.hide();if(_A1===this.prevCallBack){this.prevCallBack=false;this.prevMatchStr='';}
var i=0,_j3,_34;for(;i<this.urlMatchers.length;i++){_j3=this.urlMatchers[i].test(_i3);if(_j3){this.urlMatchers.splice(i,1);this.urlCallBack.splice(i,1);return 1;}}
return 0;},addResponder:function(_U9,_A1,_w7){this.urlMatchers.push(new RegExp(_U9));this.urlCallBack.push(_A1);this.checkMatch(this.value);if(_w7!==undefined){location.href=_w7;}},checkMatch:function(_i3){if(_i3===this.prevMatchStr){return 0;}
var i=0,_j3,_34;for(;i<this.urlMatchers.length;i++){_j3=this.urlMatchers[i].test(_i3);if(_j3){_34=this.urlCallBack[i];if(this.prevCallBack){this.prevCallBack.hide();}
_34.show();this.prevCallBack=_34;this.prevmatchStr=_i3;return 1;}}
if(this.defaultCallBack){if(this.prevCallBack){this.prevCallBack.hide();}
this.defaultCallBack.show();this.prevCallBack=this.defaultCallBack;}
return-1;},refresh:function(){var _1=this.value;if(_1.length===0){return;}
if(!this.serverValue&&this.valueObj.id!==this.clientValue.id){this.clientValue.die();}
if(location.href!==_1){location.href=_1;}
this.checkMatch(_1);},onIdle:function(){if(!this['valueObj']){return;}
var _x7=location.href;if(_x7!==this.valueObj.value){this.setValue(_x7);}}});LOAD(function(){COMM.URLResponder.implement(HValueResponder);COMM.urlResponder=COMM.URLResponder.nu();urlResponder=COMM.urlResponder;COMM.Transporter.url=HCLIENT_HELLO;COMM.Transporter.stop=false;COMM.Transporter.sync();});COMM.Values=HClass.extend({constructor:null,values:{},tosync:[],create:function(_4,_r){HValue.nu(_4,_r);},add:function(_4,_1){this.values[_4]=_1;},set:function(_4,_r){this.values[_4].set(_r);},s:function(_4,_r){var _0=this;_r=_0.decode(_r);_0.values[_4].set(_r);},del:function(_4){var _0=this,_40=_0.values,_1=_40[_4],_E0=_1.views,_u5=_E0.lengt,i=0,_c;for(;i<_u5;i++){_c=_E0[i];_c.valueObj=HDummyValue.nu(0,_1.value);}
_1.views=[];delete _40[_4];},changed:function(_1){var _0=this;if(_0.tosync.indexOf(_1.id)===-1){_0.tosync.push(_1.id);var _y7=COMM.Transporter;if(!_y7.busy){_y7.sync();}}},_z7:['b','n','s'],type:function(_f){var _Y=(typeof _f).slice(0,1);if(this._z7.indexOf(_Y)!==-1){return _Y;}
else if(_Y==='o'){if(_f.constructor===Array){return'a';}
else if(_f.constructor===Object){return'h';}
else if(_f.constructor===Date){return'd';}
return false;}
return false;},_V9:function(_22){var _n='[',_H0=[],_j0=_22.length,_0=this,_l,i=0;for(;i<_j0;i++){_l=_0.encode(_22[i]);_H0.push(_l);}
_n+=_H0.join(',')+']';return _n;},_W9:function(_22){var _H0=[],_j0=_22.length,_0=this,_l,i=0;for(;i<_j0;i++){_l=_0.decode(_22[i]);_H0.push(_l);}
return _H0;},_X9:function(_11){var _n='{',_H0=[],_0=this,_8,_1;for(_8 in _11){_1=_11[_8];_H0.push(_0.encode(_8)+':'+_0.encode(_1));}
_n+=_H0.join(',')+'}';return _n;},_Y9:function(_11){var _H0={},_0=this,_8,_1;for(_8 in _11){_1=_11[_8];_H0[_0.decode(_8)]=_0.decode(_1);}
return _H0;},_Z9:[[(/\\/g),'\\\\'],[(/\t/g),'\\t'],[(/\n/g),'\\n'],[(/\f/g),'\\f'],[(/\r/g),'\\r'],[(/"/g),'\\"']],_0a:function(_n){var _0=this,_A7=_0._Z9,i=0,_j0=_A7.length,_v5,_D2,_k3,_H0='';for(;i<_j0;i++){_v5=_A7[i];_D2=_v5[0];_k3=_v5[1];_n=_n.replace(_D2,_k3);}
return'"'+_n+'"';},_o7:function(_n){var _32;try{_32=unescape(encodeURIComponent(_n));}
catch(e){_32=_n;}
return _32;},_1a:function(_n){var _32;try{_32=decodeURIComponent(escape(_n));}
catch(e){_32=_n;}
return _32;},encode:function(_f){var _n,_Y,_0=this;if(_f===null){return'null';}
else if(_f!==undefined){_Y=_0.type(_f);if(!_Y){return'null';}
switch(_Y){case'b':_n=String(_f);break;case'n':_n=String(_f);break;case's':_n=_0._0a(_0._o7(_f));break;case'd':_n='"@'+String(_f.getTime()/1000)+'"';break;case'a':_n=_0._V9(_f);break;case'h':_n=_0._X9(_f);break;default:_n='null';break;}}
else{return'null';}
return _n;},decode:function(_21){var _f,_Y,_0=this;if(_21!==null&&_21!==undefined){_Y=_0.type(_21);if(!_Y){return null;}
switch(_Y){case'b':_f=_21;break;case'n':_f=_21;break;case's':_f=_0._1a(_21);break;case'd':_f=_21;break;case'a':_f=_0._W9(_21);break;case'h':_f=_0._Y9(_21);break;default:_f=null;break;}}
else{return null;}
return _f;},clone:function(_f){var _l,_E2;if(_f instanceof Array){_E2=[];for(_l=0;_l<_f.length;_l++){_E2[_l]=this.clone(_f[_l]);}
return _E2;}
else if(_f instanceof Object){_E2={};for(_l in _f){_E2[_l]=this.clone(_f[_l]);}
return _E2;}
else{return _f;}},sync:function(){if(this.tosync.length===0){return false;}
var _B7={},_0=this,_40=_0.values,_C7=_0.tosync,_j0=_C7.length,i=0,_4,_1;for(;i<_j0;i++){_4=_C7.shift();_1=_40[_4].value;_B7[_4]=_1;}
return encodeURIComponent(_0.encode(_B7));}});HVM=COMM.Values;HValue=HClass.extend({constructor:function(_4,_1){this.id=_4;this.type='[HValue]';this.value=_1;this.views=[];if(_4){COMM.Values.add(_4,this);}},die:function(){for(var _x0=0;_x0<this.views.length;_x0++){var _w5=this.views[_x0];_w5.setValueObj(HDummyValue.nu());this.views.splice(_x0,1);}
if(this.id){COMM.Values.del(this.id);}},set:function(_1){if(this.differs(_1)){this.value=_1;if(this.id){COMM.Values.changed(this);}
this.refresh();}},differs:function(_1){return(COMM.Values.encode(_1)!==COMM.Values.encode(this.value));},s:function(_1){this.value=_1;this.refresh();},get:function(){return this.value;},bind:function(_80){if(_80===undefined){throw("HValueBindError: responder is undefined!");}
if(this.views.indexOf(_80)===-1){this.views.push(_80);_80.setValueObj(this);}},unbind:function(_80){for(var _x0=0;_x0<this.views.length;_x0++){var _w5=this.views[_x0];if(_w5===_80){this.views.splice(_x0,1);return;}}},release:function(_80){return this.unbind(_80);},refresh:function(){for(var _x0=0;_x0<this.views.length;_x0++){var _80=this.views[_x0];if(_80.value!==this.value){if(!_80._D7){_80._D7=true;_80.setValue(this.value);_80._D7=false;}}}}});JSLoader=HClass.extend({constructor:function(_2a){var _0=this;_0._E7=[];_0.uri=_2a;_0._tb=false;},_3a:function(_0,_G0){console.log("failed to load js: "+_G0.url);},load:function(_44){var _0=this;if((_0._E7.indexOf(_44)!==-1)){return;}
COMM.Queue.pause();_0._E7.push(_44);_0._ub=COMM.request(_0.uri+_44+'.js',{onSuccess:function(_G0){COMM.Queue.unshiftEval(_G0.X.responseText);COMM.Queue.resume();},onFailure:_0._3a,method:'GET',async:true});}});LOAD(function(){jsLoader=JSLoader.nu(HCLIENT_BASE+'/js/');});HValueMatrixInterface={componentBehaviour:['view','control','matrix'],constructor:function(_2,_9,_3){this.base(_2,_9,_3);this.setValueMatrix();},setValueMatrix:function(){if(this.parent['valueMatrix']===undefined){this.parent.valueMatrix=HValueMatrix.nu();}
this.valueMatrixIndex=this.parent.valueMatrix.addControl(this);},click:function(){if(this.parent.valueMatrix instanceof HValueMatrix){this.parent.valueMatrix.setValue(this.valueMatrixIndex);}},die:function(){if(this['parent']){if(this.parent['valueMatrix']){this.parent.valueMatrix.release(this);}}
this.base();}};HValueMatrixComponentExtension=HValueMatrixInterface;HValueMatrix=HClass.extend({constructor:function(){this.ctrls=[];this.value=-1;this.valueObj=new HDummyValue();},setValueObj:function(_91){this.valueObj=_91;this.setValue(_91.value);},setValue:function(_p){if(_p!==this.value){if(this.value!==-1){if(this.ctrls[this.value]){this.ctrls[this.value].setValue(false);}}
this.value=_p;if(_p!==-1){if(_p<this.ctrls.length){this.ctrls[_p].setValue(true);}}
this.valueObj.set(_p);}},addControl:function(_e){this.ctrls.push(_e);var _F7=this.ctrls.length-1;if(_e.value){this.setValue(_F7);}
return _F7;},release:function(_e){var _p=this.ctrls.indexOf(_e);if(_p!==-1){this.ctrls.splice(_p,1);if(_p===this.value){this.setValue(-1);}}}});HPoint=HClass.extend({constructor:function(){this.type='[HPoint]';var _b=arguments;if(_b.length===0){this._l3();}
else if(_b.length===2){this._G7(_b[0],_b[1]);}
else if(_b.length===1){this._m3(_b[0]);}
else{throw"Invalid number of arguments.";}},_l3:function(){this.x=null;this.y=null;},_G7:function(x,y){this.x=x;this.y=y;},_m3:function(_k){this.x=_k.x;this.y=_k.y;},set:function(){var _b=arguments;if(_b.length===0){this._l3();}
else if(_b.length===2){this._G7(_b[0],_b[1]);}
else if(_b.length===1){this._m3(_b[0]);}
else{throw"Invalid number of arguments.";}},constrainTo:function(_2){if(this.x<_2.left){this.x=_2.left;}
if(this.y<_2.top){this.y=_2.top;}
if(this.x>_2.right){this.x=_2.right;}
if(this.y>_2.bottom){this.y=_2.bottom;}},add:function(_k){_b=arguments;if((_b.length===1)&&(_b[0].type===this.type)){_k=_b[0];return new HPoint((this.x+_k.x),(this.y+_k.y));}
else if(_b.length===2){return new HPoint((this.x+_b[0]),(this.y+_b[1]));}else{return new HPoint(0,0);}},subtract:function(){_b=arguments;if((_b.length===1)&&(_b[0].type===this.type)){_k=_b[0];return new HPoint(this.x-_k.x,this.y-_k.y);}
else if(_b.length===2){return new HPoint(this.x-_b[0],this.y-_b[1]);}else{return new HPoint(0,0);}},equals:function(_k){return(this.x===_k.x&&this.y===_k.y);}});HRect=HClass.extend({constructor:function(){this.type='[HRect]';var _b=arguments;if(_b.length===0){this._l3();}else if(_b.length===4){this._x5(_b[0],_b[1],_b[2],_b[3]);}
else if(_b.length===2){this._m3(_b[0],_b[1]);}
else if(_b.length===1){if(_b[0]instanceof Array){this._x5(_b[0][0],_b[0][1],_b[0][2],_b[0][3]);}
else{this._H7(_b[0]);}}
else{throw"Invalid number of arguments.";}
this.updateSecondaryValues();},_l3:function(){this.top=0;this.left=0;this.bottom=-1;this.right=-1;},_x5:function(_X,_z,_a0,_y){this.top=_z;this.left=_X;this.bottom=_y;this.right=_a0;},_m3:function(_I7,_J7){this.top=_I7.y;this.left=_I7.x;this.bottom=_J7.y;this.right=_J7.x;},_H7:function(_2){this.top=_2.top;this.left=_2.left;this.bottom=_2.bottom;this.right=_2.right;},updateSecondaryValues:function(){this.isValid=(this.right>=this.left&&this.bottom>=this.top);this.leftTop=new HPoint(this.left,this.top);this.leftBottom=new HPoint(this.left,this.bottom);this.rightTop=new HPoint(this.right,this.top);this.rightBottom=new HPoint(this.right,this.bottom);this.width=(this.right-this.left);this.height=(this.bottom-this.top);},set:function(){var _b=arguments;if(_b.length===0){this._l3();}else if(_b.length===4){this._x5(_b[0],_b[1],_b[2],_b[3]);}
else if(_b.length===2){this._m3(_b[0],_b[1]);}
else if(_b.length===1){this._H7(_b[0]);}
else{throw"Invalid number of arguments.";}
this.updateSecondaryValues();},setLeft:function(_X){this.left=_X;this.updateSecondaryValues();},setRight:function(_a0){this.right=_a0;this.updateSecondaryValues();},setTop:function(_z){this.top=_z;this.updateSecondaryValues();},setBottom:function(_y){this.bottom=_y;this.updateSecondaryValues();},setLeftTop:function(_k){this.left=_k.x;this.top=_k.y;this.updateSecondaryValues();},setLeftBottom:function(_k){this.left=_k.x;this.bottom=_k.y;this.updateSecondaryValues();},setRightTop:function(_k){this.right=_k.x;this.top=_k.y;this.updateSecondaryValues();},setRightBottom:function(_k){this.right=_k.x;this.bottom=_k.y;this.updateSecondaryValues();},setWidth:function(_v){this.right=this.left+_v;this.updateSecondaryValues();},setHeight:function(_G){this.bottom=this.top+_G;this.updateSecondaryValues();},setSize:function(){var _b=arguments;if(_b.length===2){_v=_b[0];_G=_b[1];}
else if(_b.length===1){_v=_b.x;_G=_b.y;}
this.right=this.left+_v;this.bottom=this.top+_G;this.updateSecondaryValues();},intersects:function(_2){return(((_2.left>=this.left&&_2.left<=this.right)||(_2.right>=this.left&&_2.right<=this.right))&&((_2.top>=this.top&&_2.top<=this.bottom)||(_2.bottom>=this.top&&_2.bottom<=this.bottom)));},contains:function(_f){if(_f instanceof HPoint){return this._4a(_f);}
else if(_f instanceof HRect){return this._5a(_f);}
else{throw"Wrong argument type.";}},_4a:function(_k){return(_k.x>=this.left&&_k.x<=this.right&&_k.y>=this.top&&_k.y<=this.bottom);},_5a:function(_2){return(_2.left>=this.left&&_2.right<=this.right&&_2.top>=this.top&&_2.bottom<=this.bottom);},insetBy:function(){var _b=arguments;if(_b.length===1){this._6a(_b[0]);}else if(_b.length===2){this._K7(_b[0],_b[1]);}else{throw"Invalid number of arguments.";}
this.updateSecondaryValues();},_6a:function(_k){this._K7(_k.x,_k.y);},_K7:function(x,y){this.left+=x;this.top+=y;this.right-=x;this.bottom-=y;},offsetBy:function(){var _b=arguments;if(_b.length===1){this._7a(_b[0]);}else if(_b.length===2){this._L7(_b[0],_b[1]);}else{throw"Invalid number of arguments.";}
this.updateSecondaryValues();},_7a:function(_k){this._L7(_k.x,_k.y);},_L7:function(x,y){this.left+=x;this.top+=y;this.right+=x;this.bottom+=y;},offsetTo:function(){var _b=arguments;if(_b.length===1){this._8a(_b[0]);}else if(_b.length===2){this._M7(_b[0],_b[1]);}else{throw"Invalid number of arguments.";}
this.updateSecondaryValues();},_8a:function(_k){this._M7(_k.x,_k.y);},_M7:function(x,y){this.right+=x-this.left;this.left=x;this.bottom+=y-this.top;this.top=y;},equals:function(_2){return(this.left===_2.left&&this.top===_2.top&&this.right===_2.right&&this.bottom===_2.bottom);},intersection:function(_2){return new HRect(Math.max(this.left,_2.left),Math.max(this.top,_2.top),Math.min(this.right,_2.right),Math.min(this.bottom,_2.bottom));},union:function(_2){return new HRect(Math.min(this.left,_2.left),Math.min(this.top,_2.top),Math.max(this.right,_2.right),Math.max(this.bottom,_2.bottom));},valueObj:null,viewIds:[],bind:function(_c){if(this.viewIds.indexOf(_c.viewId)!==-1){this.viewIds.push(_c.viewId);}},release:function(_c){var _N7=this.viewIds.indexOf(_c.viewId);if(_N7!==-1){this.viewIds.splice(_N7,1);}},setValueObj:function(_91){this.valueObj=_91;},setValue:function(_1,_9a){if(this.valueObj){this.valueObj.set(_1);}
this.set(_1[0],_1[1],_1[2],_1[3]);var i=0,_j;for(;i<this.viewIds.length;i++){_j=this.viewIds[i];HSystem.views[_j].drawRect();}}});HDefaultThemePath='/H/themes';HDefaultThemeName='default';HNoComponentCSS=[];HNoCommonCSS=[];HThemeHasIE6GifsInsteadOfPng=[];HThemeMode=1;HThemeManager=HClass.extend({constructor:null,init:function(){this.themePath=HDefaultThemePath;this._54={};this._64={};this.currentTheme=HDefaultThemeName;},setThemePath:function(_l0){this.themePath=_l0;},_aa:function(_h){console.log("ERROR: Template Not Found: '"+_h+"' ");},_ba:function(_h){console.log("ERROR: Template Failure: '"+_h+"' ");},_ca:function(_h){console.log("ERROR: Template Exception: '"+_h+"' ");},fetch:function(_h,_l1,_A1,_12){var _y5;if(!_l1){_l1='text/html; charset=UTF-8';}
if(_12){_y5=function(resp){_A1(resp.X.responseText);};}
else{var _O7;_y5=function(resp){_O7=resp.X.responseText;};}
COMM.request(_h,{onSuccess:_y5,on404:function(resp){HThemeManager._aa(resp.url);},onFailure:function(resp){HThemeManager._ba(resp.url);},onException:function(resp){HThemeManager._ca(resp.url);},method:'GET',async:_12});if(!_12){return _O7;}},getThemeGfxPath:function(){var _m=this._n3[0],_H=this._n3[1],_L=this._n3[2],_U=this._n3[3],_B1=this._B1(_m,_H,_L,_U);return this._e0(_B1,'gfx');},getCssFilePath:function(_31){var _m=this._n3[0];if((HThemeHasIE6GifsInsteadOfPng.indexOf(_m)!==-1)&&ELEM._Y0){return"url('"+this._e0(this.getThemeGfxPath(),_31.replace('.png','-ie6.gif'))+"')";}
else{return"url('"+this._e0(this.getThemeGfxPath(),_31)+"')";}},loadCSS:function(_h){var _l1='text/css',_da=function(_m1){if(!_m1||_m1===""){return;}
HThemeManager.useCSS(_m1);};this.fetch(_h,_l1,_da,true);},useCSS:function(_m1){var _l1='text/css';_m1=this._P7(_m1);var _W,_e6,_Q7;if(ELEM._O0){_W=document.createStyleSheet();_W.cssText=_m1;}
else{_W=document.createElement("style");_W.type=_l1;_W.media="all";_Q7=document.getElementsByTagName('head')[0];_Q7.appendChild(_W);if(BROWSER_TYPE.safari){var _ea=document.createTextNode(_m1);_W.appendChild(_ea);}
else{_W.innerHTML=_m1;}}},_fa:function(_n){if(_n[_n.length-1]!=='/'){_n+='/';}
return _n;},_e0:function(_ga,_ha){return this._fa(_ga)+_ha;},_B1:function(_m,_H,_L,_U){var _l0=_L;if(_L===null){_l0=this.themePath;}
if(HThemeMode===0){if(_U){_l0=this._e0(_l0,_U);}
if(_L===null){_l0=this._e0(_l0,_H);_l0=this._e0(_l0,'themes');}
_l0=this._e0(_l0,_m);}
else if(HThemeMode===1){_l0=this._e0(_l0,_m);}
return _l0;},_74:function(_m,_H,_L,_U){this._n3=[_m,_H,_L,_U];var _ia=this._B1(_m,_H,_L,_U),_ja=this._e0('css',_H+'.css'),_74=this._e0(_ia,_ja);return _74;},_z5:function(_m,_H,_L,_U){var _ka=this._B1(_m,_H,_L,_U),_la=this._e0('html',_H+'.html'),_ma=this._e0(_ka,_la);return _ma;},loadMarkup:function(_m,_H,_L,_U){if(!this._54[_m]){this._54[_m]={};}
var _J=this._54[_m][_H];if(null===_J||undefined===_J){var _z5=this._z5(_m,_H,_L,_U),_V=this.fetch(_z5,null,null,false);if(null===_V||undefined===_V){_V="";}
HThemeManager._54[_m][_H]=_V;return _V;}
return _J;},getMarkup:function(_m,_H,_L,_U){if(!this._64[_m]){this._64[_m]={};if(HNoCommonCSS.indexOf(_m)===-1){var _oa=this._74(_m,'common',_L,null);this.loadCSS(_oa);}}
if(HNoComponentCSS.indexOf(_m)===-1){if(!this._64[_m][_H]){var _pa=this._74(_m,_H,_L,_U);this._64[_m][_H]=true;this.loadCSS(_pa);}}
return this.loadMarkup(_m,_H,_L,_U);},_84:function(_m,_H,_L,_U){var _B1=this._B1(_m,_H,_L,_U),_h=this._e0(_B1,'gfx');return _h;},_qa:function(_m,_H,_L,_U,_31){if((HThemeHasIE6GifsInsteadOfPng.indexOf(_m)!==-1)&&ELEM._Y0){return this._e0(this._84(_m,_H,_L,_U),_31.replace('.png','-ie6.gif'));}
return this._e0(this._84(_m,_H,_L,_U),_31);},getThemeGfxFile:function(_31){return this.getThemeGfxPath()+_31;},setTheme:function(_S7){this.currentTheme=_S7;},restoreDefaultTheme:function(){this.setTheme(HDefaultThemeName);},_42:new RegExp(/#\{([^\}]*)\}/),_P7:function(_o3){while(this._42.test(_o3)){_o3=_o3.replace(this._42,eval(RegExp.$1));}
return _o3;}});HMarkupView=HClass.extend({bindMarkupVariables:function(){var _V=this.markup;while(HMarkupView._T7.test(_V)){_V=_V.replace(HMarkupView._T7,this.evalMarkupVariable(RegExp.$1,true));}
while(HMarkupView._42.test(_V)){_V=_V.replace(HMarkupView._42,this.evalMarkupVariable(RegExp.$1));}
this.markup=_V;return this;},evalMarkupVariable:function(_A5,_94){try{var _ID=this.elemId.toString(),_WIDTH=this.rect.width,_HEIGHT=this.rect.height,_U7=eval(_A5);if(_94){return'';}
if(_U7===undefined){return'';}
else{return _U7;}}
catch(e){console.log("Warning, the markup string '"+_A5+"' failed evaluation. Reason:"+e+' '+e.description);return'';}},toggleCSSClass:function(_n1,_a4,_V7){if(_n1){if(_V7){ELEM.addClassName(_n1,_a4);}
else{ELEM.removeClassName(_n1,_a4);}}
return this;}},{_42:new RegExp(/#\{([^\}]*)\}/),_T7:new RegExp(/\$\{([^\}]*)\}/)});HMorphAnimation=HClass.extend({animateTo:function(_f,_C1,_Z0){if(!this.drawn){return this;}
if(_f instanceof HPoint){var _2=new HRect(_f,_f);_2.setSize(this.rect.width,this.rect.height);this._B5(_2,_C1);}
else if(_f instanceof HRect){this._B5(_f,_C1);}
else{throw"Wrong argument type.";}
return this;},stopAnimation:function(){if(this._b4){window.clearInterval(this._b4);this._b4=null;var _X=parseInt(this.style('left'),10),_z=parseInt(this.style('top'),10),_v=parseInt(this.style('width'),10),_G=parseInt(this.style('height'),10);this.rect.set(_X,_z,_X+_v,_z+_G);this.drawRect();if(this._W7){this.onAnimationEnd();}
else{this.onAnimationCancel();}}
return this;},_B5:function(_2,_C1,_Z0){if(null===_C1||undefined===_C1){_C1=500;}
if(null===_Z0||undefined===_Z0||_Z0<1){_Z0=50;}
if(!this._b4){this._W7=false;this.onAnimationStart();var _sa=new Date().getTime();var _w=this;this._b4=window.setInterval(function(){if(!_w){return;}
_w._ta({startTime:_sa,duration:_C1,transition:function(t,b,c,d){return c*t/d+b;},props:[{prop:'left',from:_w.rect.left,to:_2.left,unit:'px'},{prop:'top',from:_w.rect.top,to:_2.top,unit:'px'},{prop:'width',from:_w.rect.width,to:_2.width,unit:'px'},{prop:'height',from:_w.rect.height,to:_2.height,unit:'px'}]});},Math.round(1000/_Z0));}
return this;},_ta:function(_f){var _X7=new Date().getTime(),i;if(_X7<_f.startTime+_f.duration){var _ua=_X7-_f.startTime;for(i=0;i<_f.props.length;i++){var _D2=_f.props[i].from;var _k3=_f.props[i].to;if(_D2!==_k3){var _va=_f.transition(_ua,_D2,(_k3-_D2),_f.duration);this.setStyle(_f.props[i].prop,_va+_f.props[i].unit);}}}else{for(i=0;i<_f.props.length;i++){this.setStyle(_f.props[i].prop,_f.props[i].to+_f.props[i].unit);}
this._W7=true;this.stopAnimation();}
return this;},onAnimationStart:function(){},onAnimationEnd:function(){},onAnimationCancel:function(){}});HView=HClass.extend({themePath:null,packageName:null,isAbsolute:true,flexRight:false,flexLeft:true,flexTop:true,flexBottom:false,flexRightOffset:0,flexBottomOffset:0,componentBehaviour:['view'],constructor:function(_2,_9){if(this.theme===undefined){this.theme=HThemeManager.currentTheme;this.preserveTheme=false;}
else{this.preserveTheme=true;}
this.optimizeWidthOnRefresh=true;this.parent=_9;this.viewId=this.parent.addView(this);this.appId=this.parent.appId;this.app=HSystem.apps[this.appId];this.views=[];this.viewsZOrder=[];this._wa();this.setRect(_2);this.isHidden=true;this.drawn=false;this._v3=_2.left;this._w3=_2.top;this._F2=[];if(!this.isinherited){this.draw();this.show();}},setFlexRight:function(_a,_R){if(_a===undefined){_a=true;}
this.flexRight=_a;if(_R===undefined){_R=0;}
this.flexRightOffset=_R;return this;},setFlexLeft:function(_a,_R){if(_a===undefined){_a=true;}
this.flexLeft=_a;if((_R||_R===0)&&this.rect){this.rect.setLeft(_R);}
return this;},setFlexTop:function(_a,_R){if(_a===undefined){_a=true;}
this.flexTop=_a;if((_R||_R===0)&&this.rect){this.rect.setTop(_R);}
return this;},setFlexBottom:function(_a,_R){if(_a===undefined){_a=true;}
this.flexBottom=_a;if(_R===undefined){_R=0;}
this.flexBottomOffset=_R;return this;},setAbsolute:function(_a){if(_a===undefined){_a=true;}
this.isAbsolute=_a;return this;},setRelative:function(_a){if(_a===undefined){_a=true;}
this.isAbsolute=(!_a);return this;},getThemeGfxPath:function(){if(this.preserveTheme){_m=this.theme;}else{_m=HThemeManager.currentTheme;}
return HThemeManager._84(_m,this.componentName,this.themePath,this.packageName);},getThemeGfxFile:function(_31){if(this.preserveTheme){_m=this.theme;}else{_m=HThemeManager.currentTheme;}
return HThemeManager._qa(_m,this.componentName,this.themePath,this.packageName,_31);},_l4:function(_G2){this.elemId=ELEM.make(_G2,'div');},_xa:function(_ya){var _c4='display:none;overflow:hidden;visibility:hidden;';if(this.isAbsolute){_c4+='position:absolute;';}else{_c4+='position:relative;';}
_c4+=_ya;ELEM.setCSS(this.elemId,_c4);},_J2:function(){var _G2;if(this.parent.elemId===undefined){_G2=0;}
else if(this.parent.markupElemIds&&this.parent.markupElemIds['subview']){_G2=this.parent.markupElemIds['subview'];}
else{_G2=this.parent.elemId;}
return _G2;},_wa:function(){if(!this.elemId){this._l4(this._J2());this._xa('');if(this.preserveTheme){ELEM.addClassName(this.elemId,this.theme);}
else{ELEM.addClassName(this.elemId,HThemeManager.currentTheme);}}},drawRect:function(){if(this.parent&&this.rect.isValid){var _0=this,_7=_0.elemId,_D=ELEM.setStyle,_2=_0.rect;_D(_7,'left',_0.flexLeft?(_2.left+'px'):'auto',true);_D(_7,'top',_0.flexTop?(_2.top+'px'):'auto',true);_D(_7,'right',_0.flexRight?(_0.flexRightOffset+'px'):'auto',true);_D(_7,'bottom',_0.flexBottom?(_0.flexBottomOffset+'px'):'auto',true);_D(_7,'width',(_0.flexLeft&&_0.flexRight)?'auto':(_2.width+'px'),true);_D(_7,'height',(_0.flexTop&&_0.flexBottom)?'auto':(_2.height+'px'),true);if(_0.flexLeft&&_0.flexRight){_D(_7,'min-width',_2.width+'px',true);}
if(_0.flexTop&&_0.flexBottom){_D(_7,'min-height',_2.height+'px',true);}
if(undefined===_0.isHidden||_0.isHidden===false){_D(_7,'visibility','inherit',true);}
_D(_7,'display','block',true);_0._u3();if(_0._v3!==_2.left||_0._w3!==_2.top){_0.invalidatePositionCache();_0._v3=_2.left;_0._w3=_2.top;}
_0.drawn=true;}
return this;},_u3:function(){HSystem.updateZIndexOfChildren(this.viewId);},_D1:function(){HSystem.updateZIndexOfChildren(this.parent.viewId);},draw:function(){var _D4=this.drawn;this.drawRect();if(!_D4){if(this['componentName']!==undefined){this.drawMarkup();}
this.drawSubviews();}
this.refresh();return this;},drawSubviews:function(){},_R7:function(){var _m,_V;if(this.preserveTheme){_m=this.theme;}
else{_m=HThemeManager.currentTheme;}
_V=HThemeManager.getMarkup(_m,this.componentName,this.themePath,this.packageName);if(_V===false){console.log('Warning: Markup template for "'+this.componentName+'" using theme "'+_m+'" not loaded.');}
this.markup=_V;return(_V!==false);},markupElemNames:['bg','label','state','control','value','subview'],drawMarkup:function(){ELEM.setStyle(this.elemId,'display','none',true);var _vb=this._R7();this.bindMarkupVariables();ELEM.setHTML(this.elemId,this.markup);this.markupElemIds={};for(var i=0;i<this.markupElemNames.length;i++){var _M=this.markupElemNames[i],_Y7=_M+this.elemId,_za=' id="'+_Y7+'"';if(this.markup.indexOf(_za)!==-1){this.markupElemIds[_M]=this.bindDomElement(_Y7);}}
ELEM.setStyle(this.elemId,'display','block');return this;},setHTML:function(_81){ELEM.setHTML(this.elemId,_81);return this;},refresh:function(){if(this.drawn){this.drawRect();}
if(this.optimizeWidthOnRefresh){this.optimizeWidth();}
return this;},setRect:function(_2){if(this.rect){this.rect.release(this);}
if(_2 instanceof Array){var _d4=_2.length,_C5='HView.setRect: If the HRect instance is replaced by an array, ';if((_d4===4)||(_d4===6)){var _52=_2[0],_62=_2[1],_v=_2[2],_G=_2[3],_D5=((_d4===6)?_2[4]:null),_E5=((_d4===6)?_2[5]:null),_72=(typeof _52==='number'),_82=(typeof _62==='number'),_92=(typeof _D5==='number'),_a2=(typeof _E5==='number'),_p3=(typeof _v==='number'),_q3=(typeof _G==='number'),_a0,_y;if((!_72&&!_92)||(!_82&&!_a2)){console.log(_C5+'(left or top) and (top or bottom) must be specified.');}
else if((!_p3&&!(_72&&_92))||(!_q3&&!(_82&&_a2))){console.log(_C5+'the (height or width) must be specified unless both (left and top) or (top and bottom) are specified.');}
this.setFlexLeft(_72,_52);this.setFlexTop(_82,_62);this.setFlexRight(_92,_D5);this.setFlexBottom(_a2,_E5);if(_72&&_p3&&!_92){_a0=_52+_v;}
else if(!_72&&_p3&&_92){_52=0;_a0=_v;}
else if(_72&&!_p3&&_92){_a0=_52+_D5;}
else if(_72&&_p3&&_92){_a0=_52+_v;}
if(_82&&_q3&&!_a2){_y=_62+_G;}
else if(!_82&&_q3&&_a2){_62=0;_y=_G;}
else if(_82&&!_q3&&_a2){_y=_62+_E5;}
else if(_82&&_q3&&_a2){_y=_62+_G;}
this.rect=HRect.nu(_52,_62,_a0,_y);}
else{console.log(_C5+'the length has to be either 4 or 6.');}}
else{this.rect=_2;}
this.rect.bind(this);this.refresh();return this;},setStyle:function(_d,_1,_y0){if(this.elemId){ELEM.setStyle(this.elemId,_d,_1,_y0);}
return this;},style:function(_d){if(this.elemId){return ELEM.getStyle(this.elemId,_d);}
return'';},setStyleOfPart:function(_M,_d,_1,_y0){if(!this.markupElemIds[_M]){console.log('Warning, setStyleOfPart: partName "'+_M+'" does not exist for viewId '+this.viewId+'.');}
else{ELEM.setStyle(this.markupElemIds[_M],_d,_1,_y0);}
return this;},styleOfPart:function(_M,_d){if(!this.markupElemIds[_M]){console.log('Warning, styleOfPart: partName "'+_M+'" does not exist for viewId '+this.viewId+'.');return'';}
return ELEM.getStyle(this.markupElemIds[_M],_d);},setMarkupOfPart:function(_M,_1){if(!this.markupElemIds[_M]){console.log('Warning, setMarkupOfPart: partName "'+_M+'" does not exist for viewId '+this.viewId+'.');}
else{ELEM.setHTML(this.markupElemIds[_M],_1);}
return this;},markupOfPart:function(_M){if(!this.markupElemIds[_M]){console.log('Warning, markupOfPart: partName "'+_M+'" does not exist for viewId '+this.viewId+'.');return'';}
return ELEM.getHTML(this.markupElemIds[_M]);},hide:function(){if(!this.isHidden){var _02=ELEM.setStyle,_7=this.elemId;_02(_7,'visibility','hidden');_02(_7,'display','none');this.isHidden=true;}
return this;},show:function(){if(this.isHidden){var _02=ELEM.setStyle,_7=this.elemId;_02(_7,'visibility','inherit');_02(_7,'display','block');this.isHidden=false;}
return this;},toggle:function(){if(this.isHidden){this.show();}else{this.hide();}
return this;},remove:function(){if(this.parent){var _Aa=this.parent.viewsZOrder.indexOf(this.viewId),_Ba=this.parent.views.indexOf(this.viewId);this.parent.views.splice(_Ba,1);HSystem.delView(this.viewId);this.parent.viewsZOrder.splice(_Aa,1);var _Z7=HSystem._A2.indexOf(this.viewId);if(_Z7!==-1){HSystem._A2.splice(_Z7,1);}
this._D1();this.parent=null;this.parents=[];}
return this;},die:function(){this.hide();this.drawn=false;this.stopAnimation();var _08,i;while(this.views.length!==0){_08=this.views[0];this.destroyView(_08);}
this.remove();for(i=0;i<this._F2.length;i++){ELEM.del(this._F2[i]);}
this._F2=[];ELEM.del(this.elemId);this.rect=null;var _0=this;for(i in _0){_0[i]=null;delete _0[i];}},onIdle:function(){for(var i=0;i<this.views.length;i++){HSystem.views[this.views[i]].onIdle();}},buildParents:function(_j){var _c=HSystem.views[_j];_c.parent=this;_c.parents=[];for(var _F5=0;_F5<this.parents.length;_F5++){_c.parents.push(this.parents[_F5]);}
_c.parents.push(this);},addView:function(_c){var _j=HSystem.addView(_c);this.views.push(_j);this.buildParents(_j);this.viewsZOrder.push(_j);return _j;},removeView:function(_j){HSystem.views[_j].remove();return this;},destroyView:function(_j){HSystem.views[_j].die();return this;},bounds:function(){var _b2=new HRect(this.rect);_b2.right-=_b2.left;_b2.left=0;_b2.bottom-=_b2.top;_b2.top=0;return _b2;},resizeBy:function(_G5,_r3){var _2=this.rect;_2.right+=_G5;_2.bottom+=_r3;_2.updateSecondaryValues();this.drawRect();return this;},resizeTo:function(_v,_G){var _2=this.rect;_2.right=_2.left+_v;_2.bottom=_2.top+_G;_2.updateSecondaryValues();this.drawRect();return this;},offsetTo:function(){this.rect.offsetTo.apply(this.rect,arguments);this.drawRect();return this;},moveTo:function(){this.offsetTo.apply(this,arguments);return this;},offsetBy:function(_G5,_r3){this.rect.offsetBy(_G5,_r3);this.drawRect();return this;},moveBy:function(){this.offsetBy.apply(this,arguments);return this;},bringToFront:function(){if(this.parent){var _p=this.zIndex();this.parent.viewsZOrder.splice(_p,1);this.parent.viewsZOrder.push(this.viewId);this._D1();}
return this;},bringToFrontOf:function(_c){if(this.parent.viewId===_c.parent.viewId){this.parent.viewsZOrder.splice(this.zIndex(),1);this.parent.viewsZOrder.splice(_c.zIndex()+1,0,this.viewId);this._D1();}
return this;},sendToBackOf:function(_c){if(this.parent.viewId===_c.parent.viewId){this.parent.viewsZOrder.splice(this.zIndex(),1);this.parent.viewsZOrder.splice(_c.zIndex(),0,this.viewId);this._D1();}
return this;},sendBackward:function(){var _p=this.zIndex();if(_p!==0){this.parent.viewsZOrder.splice(_p,1);this.parent.viewsZOrder.splice(_p-1,0,this.viewId);this._D1();}
return this;},bringForward:function(){var _p=this.zIndex();if(_p!==this.parent.viewsZOrder.length-1){this.parent.viewsZOrder.splice(_p,1);this.parent.viewsZOrder.splice(_p+1,0,this.viewId);this._D1();}
return this;},sendToBack:function(){if(this.parent){var _p=this.zIndex();this.parent.viewsZOrder.splice(_p,1);this.parent.viewsZOrder.splice(0,0,this.viewId);this._D1();}
return this;},zIndex:function(){if(!this.parent){return-1;}
return this.parent.viewsZOrder.indexOf(this.viewId);},stringSize:function(_V0,_T0,_7,_Da,_E1){if(_T0||_T0===0){_V0=_V0.substring(0,_T0);}
if(!_7&&_7!==0){_7=this.elemId;}
if(!_E1){_E1='';}
if(!_Da){_E1+='white-space:nowrap;';}
var _e4=ELEM.make(_7);ELEM.setCSS(_e4,"visibility:hidden;position:absolute;"+_E1);ELEM.setHTML(_e4,_V0);ELEM.flushLoop();var _Ea=ELEM.getVisibleSize(_e4);ELEM.del(_e4);return _Ea;},stringWidth:function(_V0,_T0,_7,_E1){return this.stringSize(_V0,_T0,_7,false,_E1)[0];},stringHeight:function(_V0,_T0,_7,_E1){return this.stringSize(_V0,_T0,_7,true,_E1)[1];},pageX:function(){var _o=0;var _5=this;while(_5){if(_5.elemId&&_5.rect){_o+=ELEM.get(_5.elemId).offsetLeft;_o-=ELEM.get(_5.elemId).scrollLeft;}
if(_5.markupElemIds&&_5.markupElemIds.subview){_o+=ELEM.get(_5.markupElemIds.subview).offsetLeft;_o-=ELEM.get(_5.markupElemIds.subview).scrollLeft;}
_5=_5.parent;}
return _o;},pageY:function(){var _i=0;var _5=this;while(_5){if(_5.elemId&&_5.rect){_i+=ELEM.get(_5.elemId).offsetTop;_i-=ELEM.get(_5.elemId).scrollTop;}
if(_5.markupElemIds&&_5.markupElemIds.subview){_i+=ELEM.get(_5.markupElemIds.subview).offsetTop;_i-=ELEM.get(_5.markupElemIds.subview).scrollTop;}
_5=_5.parent;}
return _i;},pageLocation:function(){return new HPoint(this.pageX(),this.pageY());},optimizeWidth:function(){},invalidatePositionCache:function(){for(var i=0;i<this.views.length;i++){HSystem.views[this.views[i]].invalidatePositionCache();}
return this;},bindDomElement:function(_18){var _H5=ELEM.bindId(_18);if(_H5){this._F2.push(_H5);}
return _H5;},unbindDomElement:function(_n1){var _28=this._F2.indexOf(_n1);if(_28>-1){ELEM.del(_n1);this._F2.splice(_28,1);}}});HView.implement(HMarkupView);HView.implement(HMorphAnimation);HEventResponder=HClass.extend({setEvents:function(_s3){if(!this.events){this.events=HClass.extend({mouseMove:false,mouseDown:false,mouseUp:false,draggable:false,droppable:false,keyDown:false,keyUp:false,mouseWheel:false,textEnter:false,click:false}).nu();}
if(_s3){this.events.extend(_s3);}
this.events.ctrl=this;EVENT.focusOptions[this.elemId]=this.events;var _38=this.events.mouseMove,_I5=EVENT.coordListeners.indexOf(this.elemId);if(_38&&(_I5===-1)){EVENT.coordListeners.push(this.elemId);}
else if((!_38)&&(_I5!==-1)){EVENT.coordListeners.splice(_I5,1);}
this.isDragged=false;return this;},setMouseMove:function(_a){this.events.mouseMove=_a;this.setEvents();return this;},setClickable:function(_a){this.events.click=_a;this.setEvents();return this;},setMouseDown:function(_a){this.events.mouseDown=_a;this.setEvents();return this;},setMouseUp:function(_a){this.events.mouseUp=_a;this.setEvents();return this;},setMouseWheel:function(_a){this.events.mouseWheel=_a;this.setEvents();return this;},setDraggable:function(_a){this.events.draggable=_a;this.setEvents();return this;},setDroppable:function(_a){this.events.droppable=_a;this.setEvents();return this;},setKeyDown:function(_a){this.events.keyDown=_a;this.setEvents();return this;},setKeyUp:function(_a){this.events.keyUp=_a;this.setEvents();return this;},setTextEnter:function(_a){this.events.textEnter=_a;this.setEvents();return this;},setClick:function(_a){return this.setClickable(_a);},focus:function(){},blur:function(){},gainedActiveStatus:function(_J5){if((HSystem.windowFocusBehaviour===1)&&(this.parents.length>2)){if(this.parents[2].componentBehaviour.indexOf('window')!==-1){this.parents[2].gainedActiveStatus();}}},_W6:function(_J5){if(this.enabled){this.toggleCSSClass(this.elemId,HControl.CSS_ACTIVE,true);}
this.gainedActiveStatus(_J5);},lostActiveStatus:function(_d0){},_V6:function(_d0){if(this.enabled){this.toggleCSSClass(this.elemId,HControl.CSS_ACTIVE,false);}
this.lostActiveStatus(_d0);},mouseMove:function(x,y){},click:function(x,y,_o1){},mouseDown:function(x,y,_o1){},mouseUp:function(x,y,_o1){},mouseWheel:function(_20){},startDrag:function(x,y){this.isDragged=true;},doDrag:function(x,y){},endDrag:function(x,y){this.isDragged=false;this.invalidatePositionCache();},onDrop:function(obj){},onHoverStart:function(obj){},onHoverEnd:function(obj){},keyDown:function(_50){},keyUp:function(_50){},textEnter:function(){},_v2:function(e){if(!Event.element){return;}
var _w=Event.element(e);while(_w&&_w.ctrl===undefined){_w=_w.parentNode;}
if(!_w){return;}
var _0=_w.ctrl;EVENT.focus(_0);Event.stop(e);},_U3:function(e){if(!Event.element){return;}
var _w=Event.element(e);while(_w&&_w.ctrl===undefined){_w=_w.parentNode;}
if(!_w){return;}
var _0=_w.owner;EVENT.blur(_0);Event.stop(e);},invalidatePositionCache:function(){this.base();EVENT.coordCacheFlush(this.elemId);return this;}});HValueResponder=HClass.extend({setValueObj:function(_91){this.valueObj=_91;this.setValue(_91.value);return this;},valueDiffers:function(_1){return(COMM.Values.encode(_1)!==COMM.Values.encode(this.value));},setValue:function(_1){if(_1!==undefined&&this['valueObj']&&this.valueDiffers(_1)){var _K5=COMM.Values;this.value=_1;if(_K5._z7.indexOf(_K5.type(_1))===-1){this.valueObj.set(_K5.clone(_1));}
else{this.valueObj.set(_1);}
(this['refresh']!==undefined)&&(typeof this.refresh==='function')&&this.refresh();}
return this;}});HDummyValue=HClass.extend({constructor:function(_4,_1){this.id=_4;this.value=_1;},set:function(_1){this.value=_1;},get:function(){return this.value;},bind:function(_Fa){},unbind:function(_Fa){}});HControlDefaults=HClass.extend({label:"",visible:true,events:{},value:0,enabled:true,active:false,minValue:-2147483648,maxValue:2147483648});HComponentDefaults=HControlDefaults;HControl=HView.extend({componentBehaviour:['view','control'],refreshOnValueChange:true,refreshOnLabelChange:true,controlDefaults:HControlDefaults,constructor:function(_2,_9,_3){if(!_3){_3={};}
_3=(this.controlDefaults.extend(_3)).nu();var _Ga=(_3.minValue||_3.maxValue),_g=_3.label,_s3=_3.events,_0=this;_0.options=_3;if(_0.isinherited){_0.base(_2,_9);}
else{_0.isinherited=true;_0.base(_2,_9);_0.isinherited=false;}
if(_3.visible){_0.show();}
else{_0.hide();}
_0.setLabel(_g);_0.setEvents(_s3);_0.setEnabled(_3.enabled);if(_3.valueObj){_3.valueObj.bind(_0);}
else if(!_0.valueObj){_0.valueObj=HDummyValue.nu();}
if((_0.value===undefined)&&(_3.value!==undefined)){_0.setValue(_3.value);}
if(_Ga){_0.setValueRange(this.value,_3.minValue,_3.maxValue);}
if(!_0.isinherited){_0.draw();}},die:function(){var _0=this;if(_0.valueObj){_0.valueObj.unbind(_0);_0.valueObj=null;}
EVENT.unreg(_0);_0.base();},setLabel:function(_g){var _0=this,_X1=(_g!==_0.label);if(_X1){_0.label=_g;_0.options.label=_g;_0.refresh();}
return this;},setEnabled:function(_a){var _0=this,_7=this.elemId,_i5=HSystem.views,i=0,_E0=_0.views,_u5=_E0.length;for(;i<_u5;i++){_i5[_E0[i]].setEnabled(_a);}
if(_0.enabled===_a){return this;}
_0.enabled=_a;if(_a){EVENT.reg(_0,_0.events);}
else{EVENT.unreg(this);}
_0.toggleCSSClass(_7,HControl.CSS_ENABLED,_a);_0.toggleCSSClass(_7,HControl.CSS_DISABLED,!_a);return this;},setValueRange:function(_1,_f4,_g4){this.minValue=_f4;this.maxValue=_g4;_1=(_1<_f4)?_f4:_1;_1=(_1>_g4)?_g4:_1;this.setValue(_1);return this;},refreshValue:function(){if(this.markupElemIds){if(this.markupElemIds['value']){ELEM.setHTML(this.markupElemIds.value,this.value);}}
return this;},refreshLabel:function(){if(this.markupElemIds){if(this.markupElemIds['label']){ELEM.setHTML(this.markupElemIds.label,this.label);}}
return this;},refresh:function(){this.base();if(this.drawn){if(this.refreshOnValueChange){this.refreshValue();}
if(this.refreshOnLabelChange){this.refreshLabel();}}
return this;}},{stopPropagation:function(event){if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},H_CONTROL_ON:1,H_CONTROL_OFF:0,CSS_DISABLED:"disabled",CSS_ENABLED:"enabled",CSS_ACTIVE:"active"});HControl.implement(HValueResponder);HControl.implement(HEventResponder);HDynControl=HControl.extend({componentBehaviour:['view','control','window'],constructor:function(_2,_9,_3){if(!_3){_3={};}
var _h4=ELEM.windowSize(),_90=HClass.extend({minX:0,minY:0,maxX:_h4[0],maxY:_h4[1],minSize:[24,54],maxSize:[_h4[0],_h4[1]],resizeW:1,resizeE:1,resizeN:1,resizeS:1,resizeNW:[1,1],resizeNE:[1,1],resizeSW:[1,1],resizeSE:[1,1],noResize:false});_3=new(_90.extend(_3))();if(_3.noResize){_3.minSize=[_2.width,_2.height];_3.maxSize=[_2.width,_2.height];_3.resizeW=0;resizeE=0;resizeN=0;resizeS=0;resizeNW=[0,0];resizeNE=[0,0];resizeSW=[0,0];resizeSE=[0,0];}
if(this.isinherited){this.base(_2,_9,_3);}
else{this.isinherited=true;this.base(_2,_9,_3);this.isinherited=false;}
this.preserveTheme=true;this.setDraggable(true);this._Ha();this._48();if(!this.isinherited){this.draw();}},_p1:function(_58,_68){var _0=this,_2=_0.rect,_3=_0.options,_i4,_j4;if(_2.width<_3.minSize[0]){_i4=0-(_3.minSize[0]-_2.width);_2.setWidth(_3.minSize[0]);if(_58){_2.offsetBy(_i4,0);}}
else if(_2.width>_3.maxSize[0]){_i4=0-(_3.maxSize[0]-_2.width);_2.setWidth(_3.maxSize[0]);if(_58){_2.offsetBy(_i4,0);}}
if(_2.height<_3.minSize[1]){_j4=0-(_3.minSize[1]-_2.height);_2.setHeight(_3.minSize[1]);if(_68){_2.offsetBy(0,_j4);}}
else if(_2.height>_3.maxSize[1]){_j4=0-(_3.maxSize[1]-_2.height);_2.setHeight(_3.maxSize[1]);if(_68){_2.offsetBy(0,_j4);}}
_0.drawRect();},_r0:function(x,y){return this._78.subtract(x,y);},dynResizeNW:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setLeftTop(_0._q1.leftTop.subtract(_10));_0._p1(1,1);},dynResizeNE:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setRightTop(_0._q1.rightTop.subtract(_10));_0._p1(0,1);},dynResizeSW:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setLeftBottom(_0._q1.leftBottom.subtract(_10));_0._p1(1,0);},dynResizeSE:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setRightBottom(_0._q1.rightBottom.subtract(_10));_0._p1(0,0);},dynResizeW:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setLeft(_0._q1.left-_10.x);_0._p1(1,0);},dynResizeE:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setRight(_0._q1.right-_10.x);_0._p1(0,0);},dynResizeN:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setTop(_0._q1.top-_10.y);_0._p1(0,1);},dynResizeS:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.setBottom(_0._q1.bottom-_10.y);_0._p1(0,0);},dynDrag:function(_0,x,y){var _10=_0._r0(x,y);_0.rect.offsetTo(_0._q1.leftTop.subtract(_10));_0._p1(1,1);},_Ha:function(){this._m0=[];this._Ia=['nw-resize','ne-resize','sw-resize','se-resize','w-resize','e-resize','n-resize','s-resize','move'];var i,_0=this,_Ja=0,_Ka=1,_La=2,_Ma=3,_Na=4,_Oa=5,_Pa=6,_Qa=7,_Ra=8,_m0=this._m0;_m0[_Ja]=_0.dynResizeNW;_m0[_Ka]=_0.dynResizeNE;_m0[_La]=_0.dynResizeSW;_m0[_Ma]=_0.dynResizeSE;_m0[_Na]=_0.dynResizeW;_m0[_Oa]=_0.dynResizeE;_m0[_Pa]=_0.dynResizeN;_m0[_Qa]=_0.dynResizeS;_m0[_Ra]=_0.dynDrag;},makeRectRules:function(){var _x=this.options,_2=this.rect;return[[0,0,_x.resizeNW[0],_x.resizeNW[1]],[_2.width-_x.resizeNE[0],0,_2.width,_x.resizeNE[1]],[0,_2.height-_x.resizeSW[1],_x.resizeSW[0],_2.height],[_2.width-_x.resizeSE[0],_2.height-_x.resizeSE[1],_2.width,_2.height],[0,_x.resizeN,_x.resizeW,_2.height-_x.resizeS],[_2.width-_x.resizeE,_x.resizeN,_2.width,_2.height-_x.resizeS],[_x.resizeW,0,_2.width-_x.resizeE,_x.resizeN],[_x.resizeW,_2.height-_x.resizeS,_2.width-_x.resizeE,_2.height],[_x.resizeW,_x.resizeN,_2.width-_x.resizeE,_2.height-_x.resizeS]];},_48:function(){this._c2=-1;this._k4=[];var i=0,_t3,_E3=this.makeRectRules();for(;i<9;i++){_t3=_E3[i];this._k4.push(HRect.nu(_t3[0],_t3[1],_t3[2],_t3[3]));}},_Sa:function(){var i,_Ta=this._78.subtract(this.rect.left,this.rect.top),_k4=this._k4;for(i=0;i!==9;i++){if(_k4[i].contains(_Ta)){this._c2=i;this.setStyle('cursor',this._Ia[i]);return;}}},startDrag:function(x,y,_o1){var _9=this.parent;if(_9.elemId){x-=_9.pageX();y-=_9.pageY();}
this._78=new HPoint(x,y);this._q1=new HRect(this.rect);this._Sa();if(this._c2!==-1){this._m0[this._c2](this,x,y);}
return true;},doDrag:function(x,y){var _9=this.parent;if(_9.elemId){x-=_9.pageX();y-=_9.pageY();}
if(this._c2!==-1){this._m0[this._c2](this,x,y);}
return true;},endDrag:function(x,y,_o1){var _9=this.parent;if(_9.elemId){x-=_9.pageX();y-=_9.pageY();}
if(this._c2!==-1){this._m0[this._c2](this,x,y);}
this.setStyle('cursor','default');this._48();return true;}});