namespace('zwt');zwt.Object=function(){};namespace('zwt.event');zwt.event.EventManager=function($0){zwt.event.EventManager.superClass.constructor.call(this);this._object=$0;this._handlers={};};zwt.event.EventManager.inherits(zwt.Object);zwt.event.EventManager.prototype.onEvent=function($0,$1,$2){var $3=$1!=null?$1:this._object;for(var $4=0;this._handlers[$0.getType()]!=null&&$4<this._handlers[$0.getType()].length;$4++){this._handlers[$0.getType()][$4]($3,$0,$2);}};zwt.event.EventManager.prototype.addHandler=function($0,$1){if(this._handlers[$0]==null){this._handlers[$0]=new Array();}this._handlers[$0].push($1);};zwt.event.EventManager.prototype.addHandlers=function($0){for(var $1 in $0){if(this._handlers[$1]==null){this._handlers[$1]=new Array();}this._handlers[$1].push($0[$1]);}};zwt.event.EventManager.prototype.removeHandler=function($0,$1){if(this._handlers[$0]!=null){this._handlers[$0].remove($1);if(this._handlers[$0].length==0){delete this._handlers[$0];}}};zwt.event.EventManager.prototype.removeHandlers=function($0){for(var $1 in $0){if(this._handlers[$1]!=null){this._handlers[$1].remove($0[$1]);if(this._handlers[$1].length==0){delete this._handlers[$1];}}}};zwt.event.UIEventManager=function($0){zwt.event.UIEventManager.superClass.constructor.call(this,$0);};zwt.event.UIEventManager.inherits(zwt.event.EventManager);zwt.event.UIEventManager.prototype.registerElement=function($0){};zwt.event.UIEventManager.prototype.finalizeEventHandling=function($0,$1){if($1!=null){this._object.onEvent($1);if(!$1.getReturn()){if($0.preventDefault){$0.preventDefault();}$0.returnValue=false;}}};zwt.event.Event=function($0){zwt.event.Event.superClass.constructor.call(this);this._type=$0!=null?$0:zwt.event.Event.UNKNOWN;this._cancelBubble=false;this._touches=new Array();};zwt.event.Event.inherits(zwt.Object);zwt.event.Event.UNKNOWN='0';zwt.event.Event.prototype.getType=function(){return this._type;};zwt.event.Event.prototype.isCancelBubble=function(){return this._cancelBubble;};zwt.event.Event.prototype.setCancelBubble=function($0){this._cancelBubble=$0;};zwt.event.Event.prototype.touch=function($0){if(this._touches.contains($0)){return true;}this._touches.push($0);return false;};zwt.event.UIEvent=function($0,$1,$2,$3){zwt.event.UIEvent.superClass.constructor.call(this,$2);this._browserEvent=$0;this._return=true;this._widget=$1;if(this._browserEvent!=null&&!$3){if(this._browserEvent.stopPropagation){this._browserEvent.stopPropagation();}this._browserEvent.cancelBubble=true;}};zwt.event.UIEvent.inherits(zwt.event.Event);zwt.event.UIEvent.UNKNOWN='unknown';zwt.event.UIEvent.prototype.getBrowserEvent=function(){return this._browserEvent;};zwt.event.UIEvent.prototype.getBrowserEventTarget=function(){if(this._browserEvent!=null){if(System.userAgent.browser=='msie'&&(System.userAgent.browserVersion=='7.0'||System.userAgent.browserVersion=='8.0')){return this._browserEvent.srcElement;}else {return this._browserEvent.target;}}return null;};zwt.event.UIEvent.prototype.getWidget=function(){return this._widget;};zwt.event.UIEvent.prototype.getReturn=function(){return this._return;};zwt.event.UIEvent.prototype.setReturn=function($0){this._return=$0;};zwt.event.FocusEvent=function($0,$1,$2,$3){zwt.event.FocusEvent.superClass.constructor.call(this,$0,$1,$2,true);this._backward=$3==null?false:$3;if(this.getBrowserEventTarget()!=null&&this.getBrowserEventTarget()._zwtFocus==null){this.getBrowserEventTarget()._zwtFocus=$1;}};zwt.event.FocusEvent.inherits(zwt.event.UIEvent);zwt.event.FocusEvent.FOCUS='focus';zwt.event.FocusEvent.BLUR='blur';zwt.event.FocusEvent.prototype.isCancelBubble=function(){return true;};zwt.event.FocusEvent.prototype.isBackward=function(){return this._backward;};zwt.event.FocusEventManager=function($0){zwt.event.FocusEventManager.superClass.constructor.call(this,$0);};zwt.event.FocusEventManager.inherits(zwt.event.UIEventManager);zwt.event.FocusEventManager.prototype._dispatch=function($0){var $1=null;switch($0.type){case 'mousedown':$1=new zwt.event.FocusEvent($0,this._object,zwt.event.FocusEvent.FOCUS);break;default:$1=null;break;}this.finalizeEventHandling($0,$1);};zwt.event.FocusEventManager.prototype.registerElement=function($0){if($0.addEventListener){$0.addEventListener('mousedown',this._dispatch.bind(this),false);}else {$0.attachEvent('onmousedown',this._dispatch.bind(this));}};zwt.event.FocusEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.event.FocusEvent){zwt.event.FocusEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.event.FocusEventManager.prototype.addFocusHandler=function($0){this.addHandler(zwt.event.FocusEvent.FOCUS,$0);};zwt.event.FocusEventManager.prototype.removeFocusHandler=function($0){this.removeHandler(zwt.event.FocusEvent.FOCUS,$0);};zwt.event.FocusEventManager.prototype.addBlurHandler=function($0){this.addHandler(zwt.event.FocusEvent.BLUR,$0);};zwt.event.FocusEventManager.prototype.removeBlurHandler=function($0){this.removeHandler(zwt.event.FocusEvent.BLUR,$0);};zwt.event.KeyboardEvent=function($0,$1,$2){zwt.event.KeyboardEvent.superClass.constructor.call(this,$0,$1,$2,false);};zwt.event.KeyboardEvent.inherits(zwt.event.UIEvent);zwt.event.KeyboardEvent.KEY_PRESS='keypress';zwt.event.KeyboardEvent.KEY_DOWN='keydown';zwt.event.KeyboardEvent.KEY_UP='keyup';zwt.event.KeyboardEvent.prototype.getKey=function(){if(this._browserEvent.charCode){return this._browserEvent.charCode;}else {return this._browserEvent.keyCode;}};zwt.event.KeyboardEvent.prototype.isAlt=function(){return this._browserEvent.altKey;};zwt.event.KeyboardEvent.prototype.isCtrl=function(){return this._browserEvent.ctrlKey;};zwt.event.KeyboardEvent.prototype.isShift=function(){return this._browserEvent.shiftKey;};zwt.event.KeyboardEvent.prototype.isMeta=function(){return this._browserEvent.metaKey;};zwt.event.KeyboardEventManager=function($0){zwt.event.KeyboardEventManager.superClass.constructor.call(this,$0);};zwt.event.KeyboardEventManager.inherits(zwt.event.UIEventManager);zwt.event.KeyboardEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.event.KeyboardEvent){zwt.event.KeyboardEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.event.KeyboardEventManager.prototype.addKeyUpHandler=function($0){this.addHandler(zwt.event.KeyboardEvent.KEY_UP,$0);};zwt.event.KeyboardEventManager.prototype.removeKeyUpHandler=function($0){this.removeHandler(zwt.event.KeyboardEvent.KEY_UP,$0);};zwt.event.KeyboardEventManager.prototype.addKeyDownHandler=function($0){this.addHandler(zwt.event.KeyboardEvent.KEY_DOWN,$0);};zwt.event.KeyboardEventManager.prototype.removeKeyDownHandler=function($0){this.removeHandler(zwt.event.KeyboardEvent.KEY_DOWN,$0);};zwt.event.KeyboardEventManager.prototype.addKeyPressHandler=function($0){this.addHandler(zwt.event.KeyboardEvent.KEY_PRESS,$0);};zwt.event.KeyboardEventManager.prototype.removeKeyPressHandler=function($0){this.removeHandler(zwt.event.KeyboardEvent.KEY_PRESS,$0);};zwt.event.WheelEvent=function($0,$1,$2){zwt.event.WheelEvent.superClass.constructor.call(this,$0,$1,$2,false);};zwt.event.WheelEvent.inherits(zwt.event.UIEvent);zwt.event.WheelEvent.WHEEL='wheel';zwt.event.WheelEvent.prototype.getDelta=function(){var $0=0;if(System.userAgent.engine=='gecko'){$0=-this._browserEvent.detail/3;}else if(System.userAgent.engine=='presto'){$0=this._browserEvent.wheelDelta/80;}else {$0=this._browserEvent.wheelDelta/120;}return $0;};zwt.event.WheelEventManager=function($0){zwt.event.WheelEventManager.superClass.constructor.call(this,$0);};zwt.event.WheelEventManager.inherits(zwt.event.UIEventManager);zwt.event.WheelEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.event.WheelEvent){zwt.event.WheelEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.event.WheelEventManager.prototype.addWheelHandler=function($0){this.addHandler(zwt.event.WheelEvent.WHEEL,$0);};zwt.event.WheelEventManager.prototype.removeWheelHandler=function($0){this.removeHandler(zwt.event.WheelEvent.WHEEL,$0);};namespace('zwt.ui');zwt.ui.Dimension=function($0){zwt.ui.Dimension.superClass.constructor.call(this);this._element=$0;this.reset();};zwt.ui.Dimension.inherits(zwt.Object);zwt.ui.Dimension.ENABLE_WEBKIT_HACK=true;zwt.ui.Dimension.prototype.reset=function(){this._elementStyle=null;if(System.userAgent.browser=='msie'&&(System.userAgent.browserVersion=='7.0'||System.userAgent.browserVersion=='8.0')){this._elementStyle=this._element.currentStyle;}else {this._elementStyle=window.getComputedStyle(this._element,'');}this._marginTop=null;this._marginRight=null;this._marginBottom=null;this._marginLeft=null;this._paddingTop=null;this._paddingRight=null;this._paddingBottom=null;this._paddingLeft=null;this._borderTop=null;this._borderRight=null;this._borderBottom=null;this._borderLeft=null;this._userTop=null;this._userLeft=null;this._absWidth=null;this._absHeight=null;this._scrollWidth=null;this._scrollHeight=null;};zwt.ui.Dimension.prototype.marginTop=function($0){if(this._elementStyle==null){this.reset();}if(this._marginTop==null||$0){if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){var $1=this._element.style.position;if(System.userAgent.engine=='webkit'){this._element.style.position='absolute';}}this._marginTop=this._elementStyle.marginTop.substring(0,this._elementStyle.marginTop.length-2);if((''+parseInt(this._marginTop))!=this._marginTop){this._marginTop=0;}else {this._marginTop=parseInt(this._marginTop);}if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){if(System.userAgent.engine=='webkit'){this._element.style.position=$1;}}}return this._marginTop;};zwt.ui.Dimension.prototype.marginRight=function($0){if(this._elementStyle==null){this.reset();}if(this._marginRight==null||$0){if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){var $1=this._element.style.position;if(System.userAgent.engine=='webkit'){this._element.style.position='absolute';}}this._marginRight=this._elementStyle.marginRight.substring(0,this._elementStyle.marginRight.length-2);if((''+parseInt(this._marginRight))!=this._marginRight){this._marginRight=0;}else {this._marginRight=parseInt(this._marginRight);}if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){if(System.userAgent.engine=='webkit'){this._element.style.position=$1;}}}return this._marginRight;};zwt.ui.Dimension.prototype.marginBottom=function($0){if(this._elementStyle==null){this.reset();}if(this._marginBottom==null||$0){if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){var $1=this._element.style.position;if(System.userAgent.engine=='webkit'){this._element.style.position='absolute';}}this._marginBottom=this._elementStyle.marginBottom.substring(0,this._elementStyle.marginBottom.length-2);if((''+parseInt(this._marginBottom))!=this._marginBottom){this._marginBottom=0;}else {this._marginBottom=parseInt(this._marginBottom);}if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){if(System.userAgent.engine=='webkit'){this._element.style.position=$1;}}}return this._marginBottom;};zwt.ui.Dimension.prototype.marginLeft=function($0){if(this._elementStyle==null){this.reset();}if(this._marginLeft==null||$0){if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){var $1=this._element.style.position;if(System.userAgent.engine=='webkit'){this._element.style.position='absolute';}}this._marginLeft=this._elementStyle.marginLeft.substring(0,this._elementStyle.marginLeft.length-2);if((''+parseInt(this._marginLeft))!=this._marginLeft){this._marginLeft=0;}else {this._marginLeft=parseInt(this._marginLeft);}if(zwt.ui.Dimension.ENABLE_WEBKIT_HACK){if(System.userAgent.engine=='webkit'){this._element.style.position=$1;}}}return this._marginLeft;};zwt.ui.Dimension.prototype.paddingTop=function($0){if(this._elementStyle==null){this.reset();}if(this._paddingTop==null||$0){this._paddingTop=this._elementStyle.paddingTop.substring(0,this._elementStyle.paddingTop.length-2);if((''+parseInt(this._paddingTop))!=this._paddingTop){this._paddingTop=0;}else {this._paddingTop=parseInt(this._paddingTop);}}return this._paddingTop;};zwt.ui.Dimension.prototype.paddingRight=function($0){if(this._elementStyle==null){this.reset();}if(this._paddingRight==null||$0){this._paddingRight=this._elementStyle.paddingRight.substring(0,this._elementStyle.paddingRight.length-2);if((''+parseInt(this._paddingRight))!=this._paddingRight){this._paddingRight=0;}else {this._paddingRight=parseInt(this._paddingRight);}}return this._paddingRight;};zwt.ui.Dimension.prototype.paddingBottom=function($0){if(this._elementStyle==null){this.reset();}if(this._paddingBottom==null||$0){this._paddingBottom=this._elementStyle.paddingBottom.substring(0,this._elementStyle.paddingBottom.length-2);if((''+parseInt(this._paddingBottom))!=this._paddingBottom){this._paddingBottom=0;}else {this._paddingBottom=parseInt(this._paddingBottom);}}return this._paddingBottom;};zwt.ui.Dimension.prototype.paddingLeft=function($0){if(this._elementStyle==null){this.reset();}if(this._paddingLeft==null||$0){this._paddingLeft=this._elementStyle.paddingLeft.substring(0,this._elementStyle.paddingLeft.length-2);if((''+parseInt(this._paddingLeft))!=this._paddingLeft){this._paddingLeft=0;}else {this._paddingLeft=parseInt(this._paddingLeft);}}return this._paddingLeft;};zwt.ui.Dimension.prototype.borderTop=function($0){if(this._elementStyle==null){this.reset();}if(this._borderTop==null||$0){this._borderTop=this._elementStyle.borderTopWidth.substring(0,this._elementStyle.borderTopWidth.length-2);if((''+parseInt(this._borderTop))!=this._borderTop){this._borderTop=0;}else {this._borderTop=parseInt(this._borderTop);}}return this._borderTop;};zwt.ui.Dimension.prototype.borderRight=function($0){if(this._elementStyle==null){this.reset();}if(this._borderRight==null||$0){this._borderRight=this._elementStyle.borderRightWidth.substring(0,this._elementStyle.borderRightWidth.length-2);if((''+parseInt(this._borderRight))!=this._borderRight){this._borderRight=0;}else {this._borderRight=parseInt(this._borderRight);}}return this._borderRight;};zwt.ui.Dimension.prototype.borderBottom=function($0){if(this._elementStyle==null){this.reset();}if(this._borderBottom==null||$0){this._borderBottom=this._elementStyle.borderBottomWidth.substring(0,this._elementStyle.borderBottomWidth.length-2);if((''+parseInt(this._borderBottom))!=this._borderBottom){this._borderBottom=0;}else {this._borderBottom=parseInt(this._borderBottom);}}return this._borderBottom;};zwt.ui.Dimension.prototype.borderLeft=function($0){if(this._elementStyle==null){this.reset();}if(this._borderLeft==null||$0){this._borderLeft=this._elementStyle.borderLeftWidth.substring(0,this._elementStyle.borderLeftWidth.length-2);if((''+parseInt(this._borderLeft))!=this._borderLeft){this._borderLeft=0;}else {this._borderLeft=parseInt(this._borderLeft);}}return this._borderLeft;};zwt.ui.Dimension.prototype.userTop=function($0){if(this._elementStyle==null){this.reset();}if(this._userTop==null||$0){this._userTop=this._element.style.top.substring(0,this._element.style.top.length-2);if((''+parseFloat(this._userTop))!=this._userTop){this._userTop=0;}else {this._userTop=parseFloat(this._userTop);}}return this._userTop;};zwt.ui.Dimension.prototype.userLeft=function($0){if(this._elementStyle==null){this.reset();}if(this._userLeft==null||$0){this._userLeft=this._element.style.left.substring(0,this._element.style.left.length-2);if((''+parseFloat(this._userLeft))!=this._userLeft){this._userLeft=0;}else {this._userLeft=parseFloat(this._userLeft);}}return this._userLeft;};zwt.ui.Dimension.prototype.userHeight=function($0){if(this._elementStyle==null){this.reset();}if(this._userHeight==null||$0){this._userHeight=this._element.style.height.substring(0,this._element.style.height.length-2);if((''+parseFloat(this._userHeight))!=this._userHeight){this._userHeight=0;}else {this._userHeight=parseFloat(this._userHeight);}}return this._userHeight;};zwt.ui.Dimension.prototype.userWidth=function($0){if(this._elementStyle==null){this.reset();}if(this._userWidth==null||$0){this._userWidth=this._element.style.width.substring(0,this._element.style.width.length-2);if((''+parseFloat(this._userWidth))!=this._userWidth){this._userWidth=0;}else {this._userWidth=parseFloat(this._userWidth);}}return this._userWidth;};zwt.ui.Dimension.prototype.overflow=function(){if(this._elementStyle==null){this.reset();}return this._elementStyle.overflow;};zwt.ui.Dimension.prototype.top=function(){if(this._elementStyle==null){this.reset();}return this._element.offsetTop;};zwt.ui.Dimension.prototype.left=function(){if(this._elementStyle==null){this.reset();}return this._element.offsetLeft;};zwt.ui.Dimension.prototype.absWidth=function($0){if(this._elementStyle==null){this.reset();}if(this._absWidth==null||$0){this._absWidth=this._element.offsetWidth;}return this._absWidth;};zwt.ui.Dimension.prototype.absHeight=function($0){if(this._elementStyle==null){this.reset();}if(this._absHeight==null||$0){this._absHeight=this._element.offsetHeight;}return this._absHeight;};zwt.ui.Dimension.prototype.realWidth=function($0){if(this._elementStyle==null){this.reset();}if(this._realWidth==null||$0){this._realWidth=this._element.clientWidth;}return this._realWidth;};zwt.ui.Dimension.prototype.realHeight=function($0){if(this._elementStyle==null){this.reset();}if(this._realHeight==null||$0){this._realHeight=this._element.clientHeight;}return this._realHeight;};zwt.ui.Dimension.prototype.scrollWidth=function($0){if(this._elementStyle==null){this.reset();}if(this._scrollWidth==null||$0){this._scrollWidth=this._element.scrollWidth;}return this._scrollWidth;};zwt.ui.Dimension.prototype.scrollHeight=function($0){if(this._elementStyle==null){this.reset();}if(this._scrollHeight==null||$0){this._scrollHeight=this._element.scrollHeight;}return this._scrollHeight;};namespace('zwt.ui.container');zwt.ui.container.ContentEvent=function($0){zwt.ui.container.ContentEvent.superClass.constructor.call(this,$0);};zwt.ui.container.ContentEvent.inherits(zwt.event.Event);zwt.ui.container.ContentEvent.CHANGE='change';zwt.ui.Widget=function(){zwt.ui.Widget.superClass.constructor.call(this);this._element=null;this._parent=null;this._container=document.createElement('DIV');this._focusable=false;this._keepFocus=false;this._drawWidth=null;this._drawHeight=null;this._contentChanged=false;this._forceRedraw=false;this._focusEventManager=new zwt.event.FocusEventManager(this);this._keyboardEventManager=new zwt.event.KeyboardEventManager(this);this._wheelEventManager=new zwt.event.WheelEventManager(this);this.setId('ZWT_'+new Date().getTime());this.setVisible(false);};zwt.ui.Widget.inherits(zwt.Object);zwt.ui.Widget.FILL_NONE=0;zwt.ui.Widget.FILL_HORIZONTAL=1;zwt.ui.Widget.FILL_VERTICAL=2;zwt.ui.Widget.FILL_BOTH=3;zwt.ui.Widget.RELATIVE_CONTAINER=10;zwt.ui.Widget.RELATIVE_PART=11;zwt.ui.Widget.RELATIVE_WINDOW=12;zwt.ui.Widget.prototype._getRelativePosition=function($0,$1){var $2=this._parent;var $3=this._getPositions();switch($0){case zwt.ui.Widget.RELATIVE_CONTAINER:while($2!=null&&!($2 instanceof zwt.ui.container.Container)){$2=$2._parent;}break;case zwt.ui.Widget.RELATIVE_PART:while($2!=null&&!($2 instanceof zwt.ui.Part)){$2=$2._parent;}break;case zwt.ui.Widget.RELATIVE_WINDOW:return $3[$1];break;default:while($2!=null&&!($2 instanceof zwt.ui.container.Container)){$2=$2._parent;}break;}return $3[$1]-$2._getPositions()[$1];};zwt.ui.Widget.prototype._getPositions=function(){var $0=this._container;var $1=0;var $2=0;if($0.offsetParent!=null){while($0!=null&&$0!=document.body){$1+=$0.offsetLeft;$2+=$0.offsetTop;$0=$0.offsetParent;}}return [$1,$2];};zwt.ui.Widget.prototype.onEvent=function($0){if($0!=null&&!$0.touch(this)){this.processEvent($0);if(!$0.isCancelBubble()&&this._parent!=null){this._parent.onEvent($0);}}};zwt.ui.Widget.prototype.processEvent=function($0){if($0 instanceof zwt.event.FocusEvent){this.processFocusEvent($0);}else if($0 instanceof zwt.event.KeyboardEvent){this.processKeyboardEvent($0);}else if($0 instanceof zwt.event.WheelEvent){this.processWheelEvent($0);}else if($0 instanceof zwt.ui.container.ContentEvent){this.processContentEvent($0);}};zwt.ui.Widget.prototype.processFocusEvent=function($0){if(this.isFocusable()){if($0.getType()==zwt.event.FocusEvent.FOCUS){if(!this.hasFocus()){zwt.ui.Window.getWindow().acquireFocus(this);this._focusEventManager.onEvent($0);}}else if($0.getType()==zwt.event.FocusEvent.BLUR){if(this.hasFocus()){zwt.ui.Window.getWindow().clearFocus(this);this._focusEventManager.onEvent($0);}}}};zwt.ui.Widget.prototype.processKeyboardEvent=function($0){this._keyboardEventManager.onEvent($0);};zwt.ui.Widget.prototype.processWheelEvent=function($0){this._wheelEventManager.onEvent($0);};zwt.ui.Widget.prototype.processContentEvent=function($0){if($0.getType()==zwt.ui.container.ContentEvent.CHANGE){this._contentChanged=true;}};zwt.ui.Widget.prototype.getFocusEventManager=function(){return this._focusEventManager;};zwt.ui.Widget.prototype.getKeyboardEventManager=function(){return this._keyboardEventManager;};zwt.ui.Widget.prototype.getWheelEventManager=function(){return this._wheelEventManager;};zwt.ui.Widget.prototype.getId=function(){return this._container.id;};zwt.ui.Widget.prototype.setId=function($0){this._container.id=$0;};zwt.ui.Widget.prototype.getParent=function(){return this._parent;};zwt.ui.Widget.prototype.isVisible=function(){if((this._container.style.display==''||this._container.style.display=='block')&&this._parent!=null&&this._container.parentNode!=null&&this._container.parentNode.nodeType!=11){return this._parent.isVisible();}return false;};zwt.ui.Widget.prototype.setVisible=function($0){if($0){this._container.style.display='block';this.redraw();}else {this._container.style.display='none';}};zwt.ui.Widget.prototype.getElement=function(){return this._element;};zwt.ui.Widget.prototype.setStyle=function($0){this._element.className=$0;};zwt.ui.Widget.prototype.getStyle=function(){return this._element.className;};zwt.ui.Widget.prototype.addStyle=function($0){if(!this.hasStyle($0.trim())){this._element.className=(this._element.className+' '+$0.trim()).trim();}};zwt.ui.Widget.prototype.hasStyle=function($0){return new RegExp('(\\s'+$0.trim()+'\\s|^'+$0.trim()+'\\s|\\s'+$0.trim()+'$)','g').test(this._element.className);};zwt.ui.Widget.prototype.removeStyle=function($0){this._element.className=this._element.className.replace(new RegExp('(^'+$0.trim()+'\\s|\\s'+$0.trim()+'$)','g'),'').replace(new RegExp('\\s'+$0.trim()+'\\s'),' ');};zwt.ui.Widget.prototype.replaceStyle=function($0,$1){if(!this.hasStyle($1.trim())){this._element.className=this._element.className.replace(new RegExp('^'+$0.trim()+'\\s','g'),$1.trim()+'_').replace(new RegExp('\\s'+$0.trim()+'$','g'),' '+$1.trim()).replace(new RegExp(' '+$0.trim()+' ','g'),' '+$1.trim()+' ').trim();}};zwt.ui.Widget.prototype.getDimension=function(){if(this._dimension==null){this._dimension=new zwt.ui.Dimension(this._container);}return this._dimension;};zwt.ui.Widget.prototype.getElementDimension=function(){if(this._elementDimension==null){this._elementDimension=new zwt.ui.Dimension(this._element);}return this._elementDimension;};zwt.ui.Widget.prototype.hasFocus=function(){if(this._element.className.indexOf('focus')>0){return true;}return false;};zwt.ui.Widget.prototype.isFocusable=function(){return this._focusable;};zwt.ui.Widget.prototype.setFocusable=function($0){this._focusable=$0;};zwt.ui.Widget.prototype.getFill=function(){return this._fill;};zwt.ui.Widget.prototype.setFill=function($0){this._fill=$0;this.onEvent(new zwt.ui.container.ContentEvent(zwt.ui.container.ContentEvent.CHANGE));};zwt.ui.Widget.prototype.getContextFill=function(){var $0=this._fill;if(System.userAgent.engine=='webkit'){var $1=this._element.style.position;this._element.style.position='absolute';var $2=document.createElement('DIV');this._element.parentNode.appendChild($2);if(this._container.offsetWidth==0&&this._container.offsetHeight==0){$0=zwt.ui.Widget.FILL_NONE;}else if(this._container.offsetWidth==0){$0=$0&~zwt.ui.Widget.FILL_HORIZONTAL;}else if(this._container.offsetHeight==0){$0=$0&~zwt.ui.Widget.FILL_VERTICAL;}this._element.style.position=$1;this._element.parentNode.removeChild($2);}else if(System.userAgent.browser=='msie'&&(System.userAgent.browserVersion=='7.0'||System.userAgent.browserVersion=='8.0')){var $3=this._element.style.position;this._element.style.position='absolute';if(this._container.offsetWidth==0&&this._container.offsetHeight==0){$0=zwt.ui.Widget.FILL_NONE;}else if(this._container.offsetWidth==0){$0=$0&~zwt.ui.Widget.FILL_HORIZONTAL;}else if(this._container.offsetHeight==0){$0=$0&~zwt.ui.Widget.FILL_VERTICAL;}this._element.style.position=$3;}else {var $4=this._container.cloneNode(false);if(this._container.parentNode!=null){this._container.parentNode.insertBefore($4,this._container.parentNode.firstChild);if($4.offsetWidth==0&&$4.offsetHeight==0){$0=zwt.ui.Widget.FILL_NONE;}else if($4.offsetWidth==0){$0=$0&~zwt.ui.Widget.FILL_HORIZONTAL;}else if($4.offsetHeight==0){$0=$0&~zwt.ui.Widget.FILL_VERTICAL;}this._container.parentNode.removeChild($4);}}return $0;};zwt.ui.Widget.prototype.redraw=function(){if(this.getParent()!=null&&this._container.parentNode!=null){if(this.getParent()._forceRedraw){this._forceRedraw=true;this.getDimension().reset();this.getElementDimension().reset();}if(this.isVisible()&&(this._forceRedraw||this._container.offsetWidth!=this._drawWidth||this._container.offsetHeight!=this._drawHeight||this._contentChanged)){this.draw();this._forceRedraw=false;this._drawWidth=this._container.offsetWidth;this._drawHeight=this._container.offsetHeight;this._contentChanged=false;}}};zwt.ui.Widget.prototype.draw=function(){this._element.style.width='';this._element.style.height='';var $0=this.getContextFill();if($0!=zwt.ui.Widget.FILL_NONE){var $1=this.getDimension();var $2=this.getElementDimension();var $3=Math.max(0,$1.realWidth(true)-$2.paddingLeft()-$2.paddingRight()-$2.marginLeft()-$2.marginRight()-$2.borderLeft()-$2.borderRight());var $4=Math.max(0,$1.realHeight(true)-$2.paddingTop()-$2.paddingBottom()-$2.marginTop()-$2.marginBottom()-$2.borderTop()-$2.borderBottom());switch($0){case zwt.ui.Widget.FILL_HORIZONTAL:this._element.style.width=$3+'px';break;case zwt.ui.Widget.FILL_VERTICAL:this._element.style.height=$4+'px';break;case zwt.ui.Widget.FILL_BOTH:this._element.style.width=$3+'px';this._element.style.height=$4+'px';break;default:break;}}};zwt.ui.Widget.prototype.getRelativeLeft=function($0){return this._getRelativePosition($0,0);};zwt.ui.Widget.prototype.getRelativeTop=function($0){return this._getRelativePosition($0,1);};zwt.ui.container.ContentEventManager=function($0){zwt.ui.container.ContentEventManager.superClass.constructor.call(this,$0);};zwt.ui.container.ContentEventManager.inherits(zwt.event.EventManager);zwt.ui.container.ContentEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.ui.container.ContentEvent){zwt.ui.container.ContentEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.ui.container.ContentEventManager.prototype.addChangeHandler=function($0){this.addHandler(zwt.ui.container.ContentEvent.CHANGE,$0);};zwt.ui.container.ContentEventManager.prototype.removeChangeHandler=function($0){this.removeHandler(zwt.ui.container.ContentEvent.CHANGE,$0);};zwt.ui.container.Container=function(){zwt.ui.container.Container.superClass.constructor.call(this);this.setFocusable(true);this._focusContainer=false;this._contentChanged=false;this._emphasizedZIndex=1;this._contentEventManager=new zwt.ui.container.ContentEventManager(this);};zwt.ui.container.Container.inherits(zwt.ui.Widget);zwt.ui.container.Container.currentTop=null;zwt.ui.container.Container.prototype.processContentEvent=function($0){if($0.getType()==zwt.ui.container.ContentEvent.CHANGE){this._contentChanged=true;var $1=this._container.offsetWidth;var $2=this._container.offsetHeight;this.redraw();if($1==this._container.offsetWidth&&$2==this._container.offsetHeight){$0.setCancelBubble(true);}}this._contentEventManager.onEvent($0);};zwt.ui.container.Container.prototype.getContentEventManager=function(){return this._contentEventManager;};zwt.ui.container.Container.prototype._acquireZIndex=function($0){if($0==null||this._emphasizedZIndex>$0){z_index=this._emphasizedZIndex;}if(this.getParent()!=null){z_index=Math.max(z_index,this.getParent()._acquireZIndex($0));}this._emphasizedZIndex=z_index;zwt.ui.container.Container.currentTop=this;return this._emphasizedZIndex;};zwt.ui.container.Container.prototype._isOnTop=function(){return this==zwt.ui.container.Container.currentTop;};zwt.ui.container.Container.prototype.isFocusContainer=function(){return this._focusContainer;};zwt.ui.container.Container.prototype.setFocusContainer=function($0){this._focusContainer=$0;};zwt.ui.container.SingleContainer=function(){zwt.ui.container.SingleContainer.superClass.constructor.call(this);this._element=document.createElement('DIV');this._container.appendChild(this._element);this._contentChanged=false;this._content=null;};zwt.ui.container.SingleContainer.inherits(zwt.ui.container.Container);zwt.ui.container.SingleContainer.prototype.processFocusEvent=function($0){if(this.isFocusable()){if($0.getType()==zwt.event.FocusEvent.FOCUS){if(!this.hasFocus()&&this._content!=null){this._content.onEvent(new zwt.event.FocusEvent($0.getBrowserEvent(),this._content,zwt.event.FocusEvent.FOCUS,$0.isBackward()));this._focusEventManager.onEvent($0);}}else if($0.getType()==zwt.event.FocusEvent.BLUR){if(this.hasFocus()){zwt.ui.Window.getWindow().clearFocus(this);this._focusEventManager.onEvent($0);}}}};zwt.ui.container.SingleContainer.prototype.getContent=function(){return this._content;};zwt.ui.container.SingleContainer.prototype.setContent=function($0){if($0==null){if(this._content!=null){this._element.removeChild(this._content._container);this._content._parent=null;this._content.setVisible(false);this._content=null;}}else if($0.getParent()!=this){if(this._content!=null){this._element.removeChild(this._content._container);this._content._parent=null;this._content.setVisible(false);}$0.setVisible(true);this._content=$0;this._element.appendChild(this._content._container);this._content._parent=this;this.onEvent(new zwt.ui.container.ContentEvent(zwt.ui.container.ContentEvent.CHANGE));}};zwt.ui.container.SingleContainer.prototype.draw=function(){var $0=this.getDimension();var $1=this.getElementDimension();var $2=Math.max(0,$0.realWidth(true)-$0.paddingLeft()-$0.paddingRight()-$1.paddingLeft()-$1.paddingRight()-$1.marginLeft()-$1.marginRight()-$1.borderLeft()-$1.borderRight());var $3=Math.max(0,$0.realHeight(true)-$0.paddingTop()-$0.paddingBottom()-$1.paddingTop()-$1.paddingBottom()-$1.marginTop()-$1.marginBottom()-$1.borderTop()-$1.borderBottom());switch(this.getContextFill()){case zwt.ui.Widget.FILL_HORIZONTAL:this._element.style.width=$2+'px';this._element.style.height='';if(this._container!=null&&this._content!=null){var $4=this._content.getDimension();this._content._container.style.width=Math.max(0,($1.realWidth(true)-$1.paddingLeft()-$1.paddingRight()-$4.paddingLeft()-$4.paddingRight()-$4.marginLeft()-$4.marginRight()-$4.borderLeft()-$4.borderRight()))+'px';this._content._container.style.height='';this._content.redraw();this._element.style.height=(this._content._container.offsetHeight+$4.marginTop()+$4.marginBottom())+'px';}break;case zwt.ui.Widget.FILL_VERTICAL:this._element.style.width='';this._element.style.height=$3+'px';if(this._container!=null&&this._content!=null){var $5=this._content.getDimension();this._content._container.style.width='';this._content._container.style.height=Math.max(0,($1.realHeight(true)-$1.paddingTop()-$1.paddingBottom()-$5.paddingTop()-$5.paddingBottom()-$5.marginTop()-$5.marginBottom()-$5.borderTop()-$5.borderBottom()))+'px';this._content.redraw();this._element.style.width=(this._content._container.offsetWidth+$5.marginLeft()+$5.marginRight())+'px';}break;case zwt.ui.Widget.FILL_BOTH:this._element.style.width=$2+'px';this._element.style.height=$3+'px';if(this._container!=null&&this._content!=null){var $6=this._content.getDimension();this._content._container.style.width=Math.max(0,($1.realWidth(true)-$1.paddingLeft()-$1.paddingRight()-$6.paddingLeft()-$6.paddingRight()-$6.marginLeft()-$6.marginRight()-$6.borderLeft()-$6.borderRight()))+'px';this._content._container.style.height=Math.max(0,($1.realHeight(true)-$1.paddingTop()-$1.paddingBottom()-$6.paddingTop()-$6.paddingBottom()-$6.marginTop()-$6.marginBottom()-$6.borderTop()-$6.borderBottom()))+'px';this._content.redraw();}break;default:this._element.style.width='';this._element.style.height='';if(this._container!=null&&this._content!=null){var $7=this._content.getDimension();this._content._container.style.width='';this._content._container.style.height='';this._content.redraw();this._element.style.width=(this._content._container.offsetWidth+$7.marginLeft()+$7.marginRight())+'px';this._element.style.height=(this._content._container.offsetHeight+$7.marginTop()+$7.marginBottom())+'px';}break;}};zwt.ui.container.SingleContainer.prototype.isFocusable=function(){return this._focusable&&this._content!=null&&this._content.isFocusable();};zwt.ui.container.MultipleContainer=function(){zwt.ui.container.MultipleContainer.superClass.constructor.call(this);this._element=document.createElement('DIV');this._container.appendChild(this._element);this._topSlot=this._element;this._widgets=new Array();this._slots=new Array();this._slotsDims=new Array();this._fill=zwt.ui.Widget.FILL_BOTH;};zwt.ui.container.MultipleContainer.inherits(zwt.ui.container.Container);zwt.ui.container.MultipleContainer.prototype._emphasize=function($0){if(this._slots[$0]!=null){this._slots[$0].style.zIndex=this._acquireZIndex();}};zwt.ui.container.MultipleContainer.prototype.processFocusEvent=function($0){if(this.isFocusable()){if($0.getType()==zwt.event.FocusEvent.FOCUS){if(!this.hasFocus()&&this._widgets.length>0){var $1=0;if($0.isBackward()){$1=this._widgets.length-1;}while($1>=0&&$1<this._widgets.length){if(this._widgets[$1].isFocusable()){break;}if($0.isBackward()){$1--;}else {$1++;}}this._widgets[$1].onEvent(new zwt.event.FocusEvent($0.getBrowserEvent(),this._widgets[$1],zwt.event.FocusEvent.FOCUS,$0.isBackward()));this._focusEventManager.onEvent($0);}}else if($0.getType()==zwt.event.FocusEvent.BLUR){if(this.hasFocus()){zwt.ui.Window.getWindow().clearFocus(this);this._focusEventManager.onEvent($0);}}}};zwt.ui.container.MultipleContainer.prototype.add=function($0){this.insert($0,this.getLength());};zwt.ui.container.MultipleContainer.prototype.insert=function($0,$1){if($1<0){$1=0;}if($0.getParent()!=this&&this.indexOf($0)!=$1){if($0.getParent()!=null){$0.getParent().remove($0);}$0.setVisible(true);var $2=document.createElement('DIV');$2.appendChild($0._container);if($1<this.getLength()){this._topSlot.insertBefore($2,this._slots[$1]);this._slots.splice($1,0,$2);this._slotsDims.splice($1,0,new zwt.ui.Dimension($2));this._widgets.splice($1,0,$0);}else {this._topSlot.appendChild($2);this._slots.push($2);this._slotsDims.push(new zwt.ui.Dimension($2));this._widgets.push($0);}$0._parent=this;$0._container.style.position='';this.onEvent(new zwt.ui.container.ContentEvent(zwt.ui.container.ContentEvent.CHANGE));}};zwt.ui.container.MultipleContainer.prototype.remove=function($0){this.removeAt(this.indexOf($0));};zwt.ui.container.MultipleContainer.prototype.removeAt=function($0){if($0>=0&&$0<this.getLength()){var $1=this._widgets[$0];this._widgets.splice($0,1);this._topSlot.removeChild(this._slots[$0]);this._slots.splice($0,1);this._slotsDims.splice($0,1);$1._parent=null;$1.setVisible(false);this.onEvent(new zwt.ui.container.ContentEvent(zwt.ui.container.ContentEvent.CHANGE));}};zwt.ui.container.MultipleContainer.prototype.clear=function(){while(this._widgets.length>0){this.remove(this._widgets[this._widgets.length-1]);}};zwt.ui.container.MultipleContainer.prototype.get=function($0){return this._widgets[$0];};zwt.ui.container.MultipleContainer.prototype.indexOf=function($0){return this._widgets.indexOf($0);};zwt.ui.container.MultipleContainer.prototype.getLength=function(){return this._widgets.length;};zwt.ui.container.MultipleContainer.prototype.isFocusable=function(){if(!this._focusable){return false;}for(var $0=0;$0<this._widgets.length;$0++){if(this._widgets[$0].isFocusable()){return true;}}return false;};zwt.event.WindowKeyboardEventManager=function($0){zwt.event.WindowKeyboardEventManager.superClass.constructor.call(this,$0);};zwt.event.WindowKeyboardEventManager.inherits(zwt.event.KeyboardEventManager);zwt.event.WindowKeyboardEventManager.prototype._dispatch=function($0){var $1=null;switch($0.type){case 'keydown':$1=new zwt.event.KeyboardEvent($0,this._object,zwt.event.KeyboardEvent.KEY_DOWN);break;case 'keyup':$1=new zwt.event.KeyboardEvent($0,this._object,zwt.event.KeyboardEvent.KEY_UP);break;case 'keypress':$1=new zwt.event.KeyboardEvent($0,this._object,zwt.event.KeyboardEvent.KEY_PRESS);break;default:$1=null;break;}this.finalizeEventHandling($0,$1);};zwt.event.WindowKeyboardEventManager.prototype.registerElement=function($0){if($0.addEventListener){$0.addEventListener('keydown',this._dispatch.bind(this),false);$0.addEventListener('keyup',this._dispatch.bind(this),false);$0.addEventListener('keypress',this._dispatch.bind(this),false);}else {$0.attachEvent('onkeydown',this._dispatch.bind(this));$0.attachEvent('onkeyup',this._dispatch.bind(this));$0.attachEvent('onkeypress',this._dispatch.bind(this));}};zwt.event.WindowWheelEventManager=function($0){zwt.event.WindowWheelEventManager.superClass.constructor.call(this,$0);};zwt.event.WindowWheelEventManager.inherits(zwt.event.WheelEventManager);zwt.event.WindowWheelEventManager.prototype._dispatch=function($0){var $1=null;switch($0.type){case 'DOMMouseScroll':case 'mousewheel':$1=new zwt.event.WheelEvent($0,this._object,zwt.event.WheelEvent.WHEEL);break;default:$1=null;break;}this.finalizeEventHandling($0,$1);};zwt.event.WindowWheelEventManager.prototype.registerElement=function($0){if(System.userAgent.engine=='gecko'){$0.addEventListener('DOMMouseScroll',this._dispatch.bind(this),false);}else if($0.addEventListener){$0.addEventListener('mousewheel',this._dispatch.bind(this),false);}else {$0.attachEvent('onmousewheel',this._dispatch.bind(this));}};zwt.event.MouseEvent=function($0,$1,$2){zwt.event.MouseEvent.superClass.constructor.call(this,$0,$1,$2,false);};zwt.event.MouseEvent.inherits(zwt.event.UIEvent);zwt.event.MouseEvent.MOUSE_DOWN='mousedown';zwt.event.MouseEvent.MOUSE_UP='mouseup';zwt.event.MouseEvent.MOUSE_OVER='mouseover';zwt.event.MouseEvent.MOUSE_OUT='mouseout';zwt.event.MouseEvent.MOUSE_MOVE='mousemove';zwt.event.MouseEvent.LEFT_CLICK=10;zwt.event.MouseEvent.MIDDLE_CLICK=11;zwt.event.MouseEvent.RIGHT_CLICK=12;zwt.event.MouseEvent.prototype.getButton=function(){switch(this._browserEvent.button){case 0:return zwt.event.MouseEvent.LEFT_CLICK;break;case 1:return zwt.event.MouseEvent.MIDDLE_CLICK;break;case 2:return zwt.event.MouseEvent.RIGHT_CLICK;break;}};zwt.event.MouseEvent.prototype.getX=function(){return this._browserEvent.clientX;};zwt.event.MouseEvent.prototype.getY=function(){return this._browserEvent.clientY;};zwt.event.MouseEvent.prototype.isAlt=function(){return this._browserEvent.altKey;};zwt.event.MouseEvent.prototype.isCtrl=function(){return this._browserEvent.ctrlKey;};zwt.event.MouseEvent.prototype.isShift=function(){return this._browserEvent.shiftKey;};zwt.event.MouseEvent.prototype.isMeta=function(){return this._browserEvent.metaKey;};zwt.event.MouseEventManager=function($0){zwt.event.MouseEventManager.superClass.constructor.call(this,$0);};zwt.event.MouseEventManager.inherits(zwt.event.UIEventManager);zwt.event.MouseEventManager.prototype._dispatch=function($0){var $1=null;switch($0.type){case 'mouseover':$1=new zwt.event.MouseEvent($0,this._object,zwt.event.MouseEvent.MOUSE_OVER);break;case 'mouseout':$1=new zwt.event.MouseEvent($0,this._object,zwt.event.MouseEvent.MOUSE_OUT);break;case 'mousedown':$1=new zwt.event.MouseEvent($0,this._object,zwt.event.MouseEvent.MOUSE_DOWN);break;case 'mouseup':$1=new zwt.event.MouseEvent($0,this._object,zwt.event.MouseEvent.MOUSE_UP);break;case 'mousemove':$1=new zwt.event.MouseEvent($0,this._object,zwt.event.MouseEvent.MOUSE_MOVE);break;default:$1=null;break;}this.finalizeEventHandling($0,$1);};zwt.event.MouseEventManager.prototype.registerElement=function($0){if($0.addEventListener){$0.addEventListener('mouseover',this._dispatch.bind(this),false);$0.addEventListener('mouseout',this._dispatch.bind(this),false);$0.addEventListener('mousedown',this._dispatch.bind(this),false);$0.addEventListener('mouseup',this._dispatch.bind(this),false);$0.addEventListener('mousemove',this._dispatch.bind(this),false);}else {$0.attachEvent('onmouseover',this._dispatch.bind(this));$0.attachEvent('onmouseout',this._dispatch.bind(this));$0.attachEvent('onmousedown',this._dispatch.bind(this));$0.attachEvent('onmouseup',this._dispatch.bind(this));$0.attachEvent('onmousemove',this._dispatch.bind(this));}};zwt.event.MouseEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.event.MouseEvent){zwt.event.MouseEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.event.MouseEventManager.prototype.addMouseOverHandler=function($0){this.addHandler(zwt.event.MouseEvent.MOUSE_OVER,$0);};zwt.event.MouseEventManager.prototype.removeMouseOverHandler=function($0){this.removeHandler(zwt.event.MouseEvent.MOUSE_OVER,$0);};zwt.event.MouseEventManager.prototype.addMouseOutHandler=function($0){this.addHandler(zwt.event.MouseEvent.MOUSE_OUT,$0);};zwt.event.MouseEventManager.prototype.removeMouseOutHandler=function($0){this.removeHandler(zwt.event.MouseEvent.MOUSE_OUT,$0);};zwt.event.MouseEventManager.prototype.addMouseDownHandler=function($0){this.addHandler(zwt.event.MouseEvent.MOUSE_DOWN,$0);};zwt.event.MouseEventManager.prototype.removeMouseDownHandler=function($0){this.removeHandler(zwt.event.MouseEvent.MOUSE_DOWN,$0);};zwt.event.MouseEventManager.prototype.addMouseUpHandler=function($0){this.addHandler(zwt.event.MouseEvent.MOUSE_UP,$0);};zwt.event.MouseEventManager.prototype.removeMouseUpHandler=function($0){this.removeHandler(zwt.event.MouseEvent.MOUSE_UP,$0);};zwt.event.MouseEventManager.prototype.addMouseMoveHandler=function($0){this.addHandler(zwt.event.MouseEvent.MOUSE_MOVE,$0);};zwt.event.MouseEventManager.prototype.removeMouseMoveHandler=function($0){this.removeHandler(zwt.event.MouseEvent.MOUSE_MOVE,$0);};zwt.event.ClickEvent=function($0,$1,$2){zwt.event.ClickEvent.superClass.constructor.call(this,$0,$1,$2,false);};zwt.event.ClickEvent.inherits(zwt.event.UIEvent);zwt.event.ClickEvent.CLICK='click';zwt.event.ClickEvent.DOUBLE_CLICK='dblclick';zwt.event.ClickEvent.LEFT_CLICK=10;zwt.event.ClickEvent.MIDDLE_CLICK=11;zwt.event.ClickEvent.RIGHT_CLICK=12;zwt.event.ClickEvent.prototype.getButton=function(){switch(this._event.button){case 0:return zwt.event.ClickEvent.LEFT_CLICK;break;case 1:return zwt.event.ClickEvent.MIDDLE_CLICK;break;case 2:return zwt.event.ClickEvent.RIGHT_CLICK;break;}};zwt.event.ClickEvent.prototype.getX=function(){return this._browserEvent.clientX;};zwt.event.ClickEvent.prototype.getY=function(){return this._browserEvent.clientY;};zwt.event.ClickEvent.prototype.isAlt=function(){return this._browserEvent.altKey;};zwt.event.ClickEvent.prototype.isCtrl=function(){return this._browserEvent.ctrlKey;};zwt.event.ClickEvent.prototype.isShift=function(){return this._browserEvent.shiftKey;};zwt.event.ClickEvent.prototype.isMeta=function(){return this._browserEvent.metaKey;};zwt.event.ClickEventManager=function($0){zwt.event.ClickEventManager.superClass.constructor.call(this,$0);};zwt.event.ClickEventManager.inherits(zwt.event.UIEventManager);zwt.event.ClickEventManager.prototype._dispatch=function($0){var $1=null;switch($0.type){case 'click':$1=new zwt.event.ClickEvent($0,this._object,zwt.event.ClickEvent.CLICK);break;case 'dblclick':$1=new zwt.event.ClickEvent($0,this._object,zwt.event.ClickEvent.DOUBLE_CLICK);break;default:$1=null;break;}this.finalizeEventHandling($0,$1);};zwt.event.ClickEventManager.prototype.registerElement=function($0){if($0.addEventListener){$0.addEventListener('click',this._dispatch.bind(this),false);$0.addEventListener('dblclick',this._dispatch.bind(this),false);}else {$0.attachEvent('onclick',this._dispatch.bind(this));$0.attachEvent('ondblclick',this._dispatch.bind(this));}};zwt.event.ClickEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.event.ClickEvent){zwt.event.ClickEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.event.ClickEventManager.prototype.addClickHandler=function($0){this.addHandler(zwt.event.ClickEvent.CLICK,$0);};zwt.event.ClickEventManager.prototype.removeClickHandler=function($0){this.removeHandler(zwt.event.ClickEvent.CLICK,$0);};zwt.event.ClickEventManager.prototype.addDoubleClickHandler=function($0){this.addHandler(zwt.event.ClickEvent.DOUBLE_CLICK,$0);};zwt.event.ClickEventManager.prototype.removeDoubleClickHandler=function($0){this.removeHandler(zwt.event.ClickEvent.DOUBLE_CLICK,$0);};zwt.event.WindowEvent=function($0,$1,$2){zwt.event.WindowEvent.superClass.constructor.call(this,$0,$1,$2,false);};zwt.event.WindowEvent.inherits(zwt.event.UIEvent);zwt.event.WindowEvent.LOAD='load';zwt.event.WindowEvent.RESIZE='resize';zwt.event.WindowEvent.UNLOAD='unload';zwt.event.WindowEvent.ERROR='error';zwt.event.WindowEvent.ABORT='abort';zwt.event.WindowEventManager=function($0){zwt.event.WindowEventManager.superClass.constructor.call(this,$0);};zwt.event.WindowEventManager.inherits(zwt.event.UIEventManager);zwt.event.WindowEventManager.prototype._dispatch=function($0){var $1=null;switch($0.type){case 'resize':$1=new zwt.event.WindowEvent($0,this._object,zwt.event.WindowEvent.RESIZE);break;case 'load':$1=new zwt.event.WindowEvent($0,this._object,zwt.event.WindowEvent.LOAD);break;case 'unload':$1=new zwt.event.WindowEvent($0,this._object,zwt.event.WindowEvent.UNLOAD);break;case 'error':$1=new zwt.event.WindowEvent($0,this._object,zwt.event.WindowEvent.ERROR);break;case 'abort':$1=new zwt.event.WindowEvent($0,this._object,zwt.event.WindowEvent.ABORT);break;default:$1=null;break;}this.finalizeEventHandling($0,$1);};zwt.event.WindowEventManager.prototype.registerElement=function($0){if($0.addEventListener){$0.addEventListener('resize',this._dispatch.bind(this),false);$0.addEventListener('load',this._dispatch.bind(this),false);$0.addEventListener('unload',this._dispatch.bind(this),false);$0.addEventListener('error',this._dispatch.bind(this),false);$0.addEventListener('abort',this._dispatch.bind(this),false);}else {$0.attachEvent('onresize',this._dispatch.bind(this));$0.attachEvent('onload',this._dispatch.bind(this));$0.attachEvent('onunload',this._dispatch.bind(this));$0.attachEvent('onerror',this._dispatch.bind(this));$0.attachEvent('onabort',this._dispatch.bind(this));}};zwt.event.WindowEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.event.WindowEvent){zwt.event.WindowEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.event.WindowEventManager.prototype.addResizeHandler=function($0){this.addHandler(zwt.event.WindowEvent.RESIZE,$0);};zwt.event.WindowEventManager.prototype.removeResizeHandler=function($0){this.removeHandler(zwt.event.WindowEvent.RESIZE,$0);};zwt.event.WindowEventManager.prototype.addLoadHandler=function($0){this.addHandler(zwt.event.WindowEvent.LOAD,$0);};zwt.event.WindowEventManager.prototype.removeLoadHandler=function($0){this.removeHandler(zwt.event.WindowEvent.LOAD,$0);};zwt.event.WindowEventManager.prototype.addUnloadHandler=function($0){this.addHandler(zwt.event.WindowEvent.UNLOAD,$0);};zwt.event.WindowEventManager.prototype.removeUnloadHandler=function($0){this.removeHandler(zwt.event.WindowEvent.UNLOAD,$0);};zwt.event.WindowEventManager.prototype.addErrorHandler=function($0){this.addHandler(zwt.event.WindowEvent.ERROR,$0);};zwt.event.WindowEventManager.prototype.removeMouseUpHandler=function($0){this.removeHandler(zwt.event.WindowEvent.ERROR,$0);};zwt.event.WindowEventManager.prototype.addAbortHandler=function($0){this.addHandler(zwt.event.WindowEvent.ABORT,$0);};zwt.event.WindowEventManager.prototype.removeAbortHandler=function($0){this.removeHandler(zwt.event.WindowEvent.ABORT,$0);};zwt.event.PartEvent=function($0,$1,$2){zwt.event.PartEvent.superClass.constructor.call(this,$0,$1,$2,false);};zwt.event.PartEvent.inherits(zwt.event.Event);zwt.event.PartEvent.ATTACHED='attached';zwt.event.PartEvent.REDRAW='redraw';zwt.event.PartEvent.DETACHED='detached';zwt.ui.Window=function(){zwt.ui.Window.superClass.constructor.call(this);this._container=document;this._element=document;this._shadow=null;this._popupSlot=document.createElement('DIV');this._popupSlot.className='zwt';document.body.appendChild(this._popupSlot);this._parts=new Object();this._popups=new Object();this._emphasizedZIndex=10;this._focusWidget=null;this._focusContainer=null;this._themeLoadingElement=null;this._themeLoadingCounter=0;this._theme=null;this._clickEventManager=new zwt.event.ClickEventManager(this);this._clickEventManager.registerElement(this._element);this._mouseEventManager=new zwt.event.MouseEventManager(this);this._mouseEventManager.registerElement(this._element);this._keyboardEventManager=new zwt.event.WindowKeyboardEventManager(this);this._keyboardEventManager.registerElement(this._element);this._wheelEventManager=new zwt.event.WindowWheelEventManager(this);this._wheelEventManager.registerElement(this._element);this._windowEventManager=new zwt.event.WindowEventManager(this);this._windowEventManager.registerElement(window);this._textSelMouseDown=function($0,$1){$1.setReturn(false);};if(window.addEventListener){window.addEventListener('blur',function(){this.clearFocus();}.bind(this),false);}else {window.attachEvent('onblur',function(){if((document.activeElement==document.body)||(document.activeElement==document)||(document.activeElement==window)||(document.activeElement==document.documentElement)){this.clearFocus();}}.bind(this));}};zwt.ui.Window.inherits(zwt.ui.container.Container);zwt.ui.Window.prototype._getNextFocusWidget=function($0,$1){if($0!=null){var $2=null;var $3=$0.getParent();if($3 instanceof zwt.ui.container.MultipleContainer){var $4=$3.indexOf($0);var $5=$3.getLength();if($4==-1){$2=this._getNextFocusWidget($3,$1);}else {if($1){if($4-1<0){if($3.isFocusContainer()){$2=$3.get($5-1);}else {$3.onEvent(new zwt.event.FocusEvent(null,$3,zwt.event.FocusEvent.BLUR));$2=this._getNextFocusWidget($3,$1);}}else {$2=$3.get($4-1);}}else {if($4==$5-1){if($3.isFocusContainer()){$2=$3.get(0);}else {$3.onEvent(new zwt.event.FocusEvent(null,$3,zwt.event.FocusEvent.BLUR));$2=this._getNextFocusWidget($3,$1);}}else {$2=$3.get($4+1);}}}}else if($3 instanceof zwt.ui.container.SingleContainer){$3.onEvent(new zwt.event.FocusEvent(null,$3,zwt.event.FocusEvent.BLUR));$2=this._getNextFocusWidget($3,$1);}if($2!=null&&(!$2.isFocusable()||!$2.isVisible())){$2=this._getNextFocusWidget($2,$1);}return $2;}};zwt.ui.Window.prototype._acquireFocusContainer=function($0){if($0!=null){var $1=$0.getParent();if($1!=null&&$1 instanceof zwt.ui.container.Container&&$1.isFocusContainer()){if($1!=this._focusContainer){if(this._focusContainer!=null){this._focusContainer.removeStyle('zwt_container-focus');}$1.addStyle('zwt_container-focus');this._focusContainer=$1;}}else {this._acquireFocusContainer($1);}}};zwt.ui.Window.prototype._focusNext=function($0){if(this._focusWidget==null||!this._focusWidget._keepFocus){var $1=this._getNextFocusWidget(this._focusWidget,$0);if($1!=null){$1.onEvent(new zwt.event.FocusEvent(null,$1,zwt.event.FocusEvent.FOCUS,$0));}}};zwt.ui.Window.prototype._checkThemeLoading=function(){var $0=null;if(System.userAgent.browser=='msie'&&(System.userAgent.browserVersion=='7.0'||System.userAgent.browserVersion=='8.0')){$0=this._themeLoadingElement.currentStyle.marginLeft;}else {$0=window.getComputedStyle(this._themeLoadingElement,'marginLeft');}if($0!='42px'&&this._themeLoadingCounter<25){this._themeLoadingCounter++;setTimeout(this._checkThemeLoading.bind(this),10);}else {this._themeLoadingElement.parentNode.removeChild(this._themeLoadingElement);this._themeLoadingCounter=0;this._forceRedraw=true;this.redraw();System.hideLoadingFlag();}};zwt.ui.Window.prototype._acquireZIndex=function($0){if($0==null||this._emphasizedZIndex>$0){z_index=this._emphasizedZIndex;}z_index++;this._emphasizedZIndex=z_index;return this._emphasizedZIndex;};zwt.ui.Window.prototype.processEvent=function($0){zwt.ui.Window.superClass.prototype.processEvent.call(this,$0);if($0 instanceof zwt.event.ClickEvent){this.processClickEvent($0);}else if($0 instanceof zwt.event.MouseEvent){this.processMouseEvent($0);}else if($0 instanceof zwt.event.WindowEvent){this.processWindowEvent($0);}};zwt.ui.Window.prototype.processKeyboardEvent=function($0){if(this._focusWidget!=null){this._focusWidget.onEvent($0);}if(!$0.isCancelBubble()){zwt.ui.Window.superClass.prototype.processKeyboardEvent.call(this,$0);if($0.getKey()==9){if(System.userAgent.engine=='presto'||System.userAgent.engine=='gecko'){if($0.getType()==zwt.event.KeyboardEvent.KEY_PRESS){this._focusNext($0.isShift());$0.setReturn(false);}}else {if($0.getType()==zwt.event.KeyboardEvent.KEY_DOWN){this._focusNext($0.isShift());$0.setReturn(false);}}}}};zwt.ui.Window.prototype.processWheelEvent=function($0){if(this._focusWidget!=null){this._focusWidget.onEvent($0);}if(!$0.isCancelBubble()){zwt.ui.Window.superClass.prototype.processWheelEvent.call(this,$0);}};zwt.ui.Window.prototype.processClickEvent=function($0){this._clickEventManager.onEvent($0);};zwt.ui.Window.prototype.processMouseEvent=function($0){if($0.getType()==zwt.event.MouseEvent.MOUSE_DOWN){if($0.getBrowserEventTarget()!=null){if($0.getBrowserEventTarget()._zwtFocus==null){this.clearFocus();}else {$0.getBrowserEventTarget().removeAttribute('_zwtFocus');}}}this._mouseEventManager.onEvent($0);};zwt.ui.Window.prototype.processWindowEvent=function($0){this._windowEventManager.onEvent($0);};zwt.ui.Window.prototype.getClickEventManager=function(){return this._clickEventManager;};zwt.ui.Window.prototype.getMouseEventManager=function(){return this._mouseEventManager;};zwt.ui.Window.prototype.getWindowEventManager=function(){return this._windowEventManager;};zwt.ui.Window.prototype.getWheelEventManager=function(){return this._wheelEventManager;};zwt.ui.Window.prototype.acquireFocus=function($0){if($0!=this._focusWidget){this.clearFocus();this._acquireFocusContainer($0);this._focusWidget=$0;}};zwt.ui.Window.prototype.clearFocus=function($0){if(this._focusWidget!=null&&($0==null||$0!=this._focusWidget)){var $1=this._focusWidget;this._focusWidget=null;$1.onEvent(new zwt.event.FocusEvent(null,$1,zwt.event.FocusEvent.BLUR));}};zwt.ui.Window.getWindow=function(){if(zwt.ui.Window.window==null&&document.body!=null){zwt.ui.Window.window=new zwt.ui.Window();}return zwt.ui.Window.window;};zwt.ui.Window.prototype.addPopup=function($0,$1){$0._parent=this;this._popupSlot.appendChild($0._container);if($0.getId()!=null){$1=$0.getId();}this._popups[$1]=$0;};zwt.ui.Window.prototype.removePopup=function($0,$1){var $2=null;if($1!=null&&this._popups[$1]!=null){$2=this._popups[$1];delete this._popups[$1];}else {if($0!=null&&this._popups[$0.getId()]!=null){$2=this._popups[$0.getId()];delete this._popups[$0.getId()];}}if($2!=null){this._popupSlot.removeChild($2._container);$2._parent=null;}};zwt.ui.Window.prototype.getPopup=function($0){return this._popups[$0];};zwt.ui.Window.prototype.setPart=function($0,$1){if(this._parts[$1]!=$0){if(document.getElementById($1)!=null){if(this._parts[$1]!=null){this.removePart($1);}document.getElementById($1).appendChild($0._container);document.getElementById($1).className+=' zwt';$0._partContainer=$0._container;$0._container=document.getElementById($1);$0._dimension=null;$0._parent=this;this._parts[$1]=$0;$0._partContainer.style.display='block';$0.setVisible(true);var $2=new zwt.event.PartEvent(zwt.event.PartEvent.ATTACHED);$0.onEvent($2);delete $2;}}};zwt.ui.Window.prototype.removePart=function($0){if(this._parts[$0]!=null){this._parts[$0]._parent=null;this._parts[$0].setVisible(false);this._parts[$0]._container.removeChild(this._parts[$0]._partContainer);this._parts[$0]._container=this._parts[$0]._partContainer;this._parts[$0]._dimension=null;var $1=new zwt.event.PartEvent(zwt.event.PartEvent.DETACHED);this._parts[$0].onEvent($1);delete $1;delete this._parts[$0];}};zwt.ui.Window.prototype.getPart=function($0){return this._parts[$0];};zwt.ui.Window.prototype.setTitle=function($0){this._element.title=$0;};zwt.ui.Window.prototype.getTheme=function(){if(this._theme==null){var $0=document.getElementById('zwt_theme');this._theme=$0.href.match(new RegExp("([A-Z]|[a-z]|[0-9])+/zwt.css$","g"))[0];this._theme=this._theme.substring(0,this._theme.indexOf('/'));}return this._theme;};zwt.ui.Window.prototype.setTheme=function($0){if($0!=this.getTheme()&&(this._themeLoadingElement==null||this._themeLoadingElement.parentNode!=document.body)){System.showLoadingFlag('Loading theme '+$0+'...');if(this._themeLoadingElement==null){this._themeLoadingElement=document.createElement('DIV');this._themeLoadingElement.className='zwt_themeLoading';}document.body.appendChild(this._themeLoadingElement);var $1=document.getElementById('zwt_theme');$1.href=$1.href.replace(this.getTheme(),$0);this._theme=$0;this._checkThemeLoading();}};zwt.ui.Window.prototype.shade=function($0){if(this._shadow==null){this._shadow=document.createElement('DIV');this._shadow.className='zwt_window-shadow';this._shadow.style.position='absolute';this._shadow.style.top='0px';this._shadow.style.left='0px';document.body.appendChild(this._shadow);}if($0==null){$0=0;}this._shadow.style.zIndex=$0+this._acquireZIndex();this._shadow.style.width=Math.max(this.getScrollWidth(),this.getInnerWidth())+'px';this._shadow.style.height=Math.max(this.getScrollHeight(),this.getInnerHeight())+'px';this._shadow.style.display='';};zwt.ui.Window.prototype.unshade=function(){if(this._shadow!=null){this._shadow.style.display='none';}};zwt.ui.Window.prototype.setTextSelection=function($0){if(!$0){if(System.userAgent.engine=='webkit'||(System.userAgent.browser=='msie'&&(System.userAgent.browserVersion=='7.0'||System.userAgent.browserVersion=='8.0'))){document.onselectstart=function(){return false;};}else {this.getMouseEventManager().addMouseDownHandler(this._textSelMouseDown);}}else {if(System.userAgent.engine=='webkit'||(System.userAgent.browser=='msie'&&(System.userAgent.browserVersion=='7.0'||System.userAgent.browserVersion=='8.0'))){document.onselectstart=null;}else {this.getMouseEventManager().removeMouseDownHandler(this._textSelMouseDown);}}};zwt.ui.Window.prototype.getInnerWidth=function(){if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){return document.documentElement.clientWidth;}else {return document.body.clientWidth;}};zwt.ui.Window.prototype.getInnerHeight=function(){if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientHeight!='undefined'&&document.documentElement.clientHeight!=0){return document.documentElement.clientHeight;}else {return document.body.clientHeight;}};zwt.ui.Window.prototype.getScrollWidth=function(){if(typeof document.documentElement!='undefined'&&typeof document.documentElement.scrollWidth!='undefined'&&document.documentElement.scrollWidth!=0){return document.documentElement.scrollWidth;}else {return document.body.scrollWidth;}};zwt.ui.Window.prototype.getScrollHeight=function(){if(typeof document.documentElement!='undefined'&&typeof document.documentElement.scrollHeight!='undefined'&&document.documentElement.scrollHeight!=0){return document.documentElement.scrollHeight;}else {return document.body.scrollHeight;}};zwt.ui.Window.prototype.getScrollLeft=function(){if(typeof document.documentElement!='undefined'&&typeof document.documentElement.scrollLeft!='undefined'&&document.documentElement.scrollLeft!=0){return document.documentElement.scrollLeft;}else {return document.body.scrollLeft;}};zwt.ui.Window.prototype.getScrollTop=function(){if(typeof document.documentElement!='undefined'&&typeof document.documentElement.scrollTop!='undefined'&&document.documentElement.scrollTop!=0){return document.documentElement.scrollTop;}else {return document.body.scrollTop;}};zwt.ui.Window.prototype.setVisible=function($0){};zwt.ui.Window.prototype.isVisible=function(){return true;};zwt.ui.Window.prototype.redraw=function(){this.draw();this._forceRedraw=false;};zwt.ui.Window.prototype.draw=function(){for(id in this._popups){this._popups[id].redraw();}for(containerID in this._parts){this._parts[containerID].redraw();}};namespace('zwt.control');zwt.control.WindowController=function(){zwt.control.WindowController.superClass.constructor.call(this);this.init();};zwt.control.WindowController.inherits(zwt.Object);zwt.control.WindowController.prototype.init=function(){this._window=zwt.ui.Window.getWindow();};zwt.control.WindowController.prototype.getWindow=function(){return this._window;};zwt.control.PartControllerEvent=function($0){zwt.control.PartControllerEvent.superClass.constructor.call(this,$0);};zwt.control.PartControllerEvent.inherits(zwt.event.Event);zwt.control.PartControllerEvent.INIT=0;zwt.control.PartControllerEvent.MODEL_SET=1;zwt.control.PartControllerEventManager=function($0){zwt.control.PartControllerEventManager.superClass.constructor.call(this,$0);};zwt.control.PartControllerEventManager.inherits(zwt.event.EventManager);zwt.control.PartControllerEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.control.PartControllerEvent){zwt.control.PartControllerEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.control.PartControllerEventManager.prototype.addInitHandler=function($0){this.addHandler(zwt.control.PartControllerEvent.INIT,$0);};zwt.control.PartControllerEventManager.prototype.removeInitHandler=function($0){this.removeHandler(zwt.control.PartControllerEvent.INIT,$0);};zwt.control.PartControllerEventManager.prototype.addModelSetHandler=function($0){this.addHandler(zwt.control.PartControllerEvent.MODEL_SET,$0);};zwt.control.PartControllerEventManager.prototype.removeModelSetHandler=function($0){this.removeHandler(zwt.control.PartControllerEvent.MODEL_SET,$0);};zwt.control.PartController=function($0){zwt.control.PartController.superClass.constructor.call(this);this._part=null;this._model=null;this._partControllerEventManager=new zwt.control.PartControllerEventManager(this);this.init();this.onEvent(new zwt.control.PartControllerEvent(zwt.control.PartControllerEvent.INIT));};zwt.control.PartController.inherits(zwt.Object);zwt.control.PartController.prototype.onEvent=function($0){if($0 instanceof zwt.control.PartControllerEvent){this._partControllerEventManager.onEvent($0);}};zwt.control.PartController.prototype.getPartControllerEventManager=function(){return this._partControllerEventManager;};zwt.control.PartController.prototype.init=function(){};zwt.control.PartController.prototype.getPart=function(){return this._part;};zwt.control.PartController.prototype.getModel=function(){return this._model;};zwt.control.PartController.prototype.setModel=function($0){this._model=$0;this.onEvent(new zwt.control.PartControllerEvent(zwt.control.PartControllerEvent.MODEL_SET));};zwt.event.PartEventManager=function($0){zwt.event.PartEventManager.superClass.constructor.call(this,$0);};zwt.event.PartEventManager.inherits(zwt.event.EventManager);zwt.event.PartEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.event.PartEvent){zwt.event.PartEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.event.PartEventManager.prototype.addAttachedHandler=function($0){this.addHandler(zwt.event.PartEvent.ATTACHED,$0);};zwt.event.PartEventManager.prototype.removeAttachedHandler=function($0){this.removeHandler(zwt.event.PartEvent.ATTACHED,$0);};zwt.event.PartEventManager.prototype.addRedrawHandler=function($0){this.addHandler(zwt.event.PartEvent.REDRAW,$0);};zwt.event.PartEventManager.prototype.removeRedrawHandler=function($0){this.removeHandler(zwt.event.PartEvent.REDRAW,$0);};zwt.event.PartEventManager.prototype.addDetachedHandler=function($0){this.addHandler(zwt.event.PartEvent.DETACHED,$0);};zwt.event.PartEventManager.prototype.removeDetachedHandler=function($0){this.removeHandler(zwt.event.PartEvent.DETACHED,$0);};zwt.ui.Part=function(){zwt.ui.Part.superClass.constructor.call(this);this._content=null;this._emphasizedZIndex=0;this.setStyle('zwt_part');this._init=false;this._fill=zwt.ui.Widget.FILL_BOTH;this._clickEventManager=new zwt.event.ClickEventManager(this);this._clickEventManager.registerElement(this._element);this._mouseEventManager=new zwt.event.MouseEventManager(this);this._mouseEventManager.registerElement(this._element);this._partEventManager=new zwt.event.PartEventManager(this);};zwt.ui.Part.inherits(zwt.ui.container.SingleContainer);zwt.ui.Part.prototype.processEvent=function($0){zwt.ui.Part.superClass.prototype.processEvent.call(this,$0);if($0 instanceof zwt.event.ClickEvent){this.processClickEvent($0);}else if($0 instanceof zwt.event.MouseEvent){this.processMouseEvent($0);}else if($0 instanceof zwt.event.PartEvent){this.processPartEvent($0);}};zwt.ui.Part.prototype.processClickEvent=function($0){this._clickEventManager.onEvent($0);};zwt.ui.Part.prototype.processMouseEvent=function($0){this._mouseEventManager.onEvent($0);};zwt.ui.Part.prototype.processPartEvent=function($0){this._partEventManager.onEvent($0);};zwt.ui.Part.prototype.getClickEventManager=function(){return this._clickEventManager;};zwt.ui.Part.prototype.getMouseEventManager=function(){return this._mouseEventManager;};zwt.ui.Part.prototype.getPartEventManager=function(){return this._partEventManager;};zwt.ui.Part.prototype.setContent=function($0){if($0==null){if(this._content!=null){this._element.removeChild(this._content._container);this._content._parent=null;this._content.setVisible(false);this._content=null;}}else if($0.getParent()!=this){if(this._content!=null){this._element.removeChild(this._content._container);this._content._parent=null;this._content.setVisible(false);}$0.setVisible(true);this._content=$0;this._element.appendChild(this._content._container);this._content._parent=this;this._content._container.style.position='absolute';this.onEvent(new zwt.ui.container.ContentEvent(zwt.ui.container.ContentEvent.CHANGE));}};zwt.ui.Part.prototype.redraw=function(){var $0=new zwt.event.PartEvent(zwt.event.PartEvent.REDRAW);this.onEvent($0);delete $0;zwt.ui.Part.superClass.prototype.redraw.call(this);};namespace('zwt.ui.menu');zwt.ui.menu.MenuItem=function(){zwt.ui.menu.MenuItem.superClass.constructor.call(this);this._element=document.createElement('LI');this.setStyle('zwt_menuItem');this._isText=true;this._subMenu=null;this._label=document.createElement('DIV');this._label.className='zwt_menuItem-label';this._label.style.position='relative';this._bg1=document.createElement('DIV');this._bg1.className='zwt_menuItem-label-bg1';this._bg2=document.createElement('DIV');this._bg2.className='zwt_menuItem-label-bg2';this._labelMask=document.createElement('DIV');if(System.userAgent.browser=='msie'){this._labelMask.style.backgroundColor='#FFFFFF';if(System.userAgent.browserVersion=='7.0'||System.userAgent.browserVersion=='8.0'){this._labelMask.style.filter='alpha(opacity=0)';}else if(System.userAgent.browserVersion=='9.0'){this._labelMask.style.opacity=0;}}this._labelMask.style.position='absolute';this._labelMask.style.height='100%';this._labelMask.style.width='100%';this._labelMask.style.left='0px';this._labelMask.style.top='0px';this._labelContent=document.createElement('DIV');this._labelContent.className='zwt_menuItem-label-content';this._bg2.appendChild(this._labelContent);this._bg1.appendChild(this._bg2);this._label.appendChild(this._bg1);this._label.appendChild(this._labelMask);this._element.appendChild(this._label);this._container.appendChild(this._element);this._clickEventManager=new zwt.event.ClickEventManager(this);this._clickEventManager.registerElement(this._labelMask);this._mouseEventManager=new zwt.event.MouseEventManager(this);this._mouseEventManager.registerElement(this._labelMask);};zwt.ui.menu.MenuItem.inherits(zwt.ui.Widget);zwt.ui.menu.MenuItem.prototype.processEvent=function($0){zwt.ui.menu.MenuItem.superClass.prototype.processEvent.call(this,$0);if($0 instanceof zwt.event.ClickEvent){this.processClickEvent($0);}else if($0 instanceof zwt.event.MouseEvent){this.processMouseEvent($0);}};zwt.ui.menu.MenuItem.prototype.processClickEvent=function($0){if(!this.isDisabled()){if($0.getWidget()._subMenu!=null){$0.setCancelBubble(true);}this._clickEventManager.onEvent($0);}};zwt.ui.menu.MenuItem.prototype.processMouseEvent=function($0){if(!this.isDisabled()){this._mouseEventManager.onEvent($0);if($0.getType()==zwt.event.MouseEvent.MOUSE_OVER){this.select(this.getParent().isAutoOpen()||this.getParent()._opened);$0.setCancelBubble(true);}else if($0.getType()==zwt.event.MouseEvent.MOUSE_OUT){if(this._subMenu==null||!this._subMenu._opened){this.deselect(false);}$0.setCancelBubble(true);}else if($0.getType()==zwt.event.MouseEvent.MOUSE_DOWN){this.select(true);$0.setCancelBubble(true);}}};zwt.ui.menu.MenuItem.prototype.getClickEventManager=function(){return this._clickEventManager;};zwt.ui.menu.MenuItem.prototype.getMouseEventManager=function(){return this._mouseEventManager;};zwt.ui.menu.MenuItem.prototype.select=function($0){if(this.getParent()._selectedItem!=this){if(this.getParent()._selectedItem!=null){this.getParent()._selectedItem.deselect(true);}this.getParent()._selectedItem=this;this._element.className+=' zwt_menuItem-selected';this._label.className+=' zwt_menuItem-label-selected';}if(this._subMenu!=null){if($0&&!this._subMenu._opened){this._subMenu.open();if(!(this.getParent().getParent() instanceof zwt.ui.menu.MenuItem)){if(this.getParent().getParent()._emphasize){this.getParent().getParent()._emphasize(this.getParent().getParent()._widgets.indexOf(this.getParent()));}else {this.getParent().getParent()._acquireZIndex();}this.getParent()._opened=true;zwt.ui.Window.getWindow().getClickEventManager().addClickHandler(this.getParent()._menuCloseHandler);}}else if(!$0&&this._subMenu!=null&&this._subMenu._opened){this._subMenu.close();if(!(this.getParent().getParent() instanceof zwt.ui.menu.MenuItem)){zwt.ui.Window.getWindow().getClickEventManager().removeClickHandler(this.getParent()._menuCloseHandler);}}}};zwt.ui.menu.MenuItem.prototype.deselect=function($0){if(this.getParent()._selectedItem==this){this._element.className=this._element.className.replace(new RegExp(' zwt_menuItem-selected','g'),'');this._label.className=this._label.className.replace(new RegExp(' zwt_menuItem-label-selected','g'),'');this.getParent()._selectedItem=null;}if(this._subMenu!=null&&$0&&this._subMenu._opened){this._subMenu.close();if(!(this.getParent().getParent() instanceof zwt.ui.menu.MenuItem)){zwt.ui.Window.getWindow().getClickEventManager().removeClickHandler(this.getParent()._menuCloseHandler);}}};zwt.ui.menu.MenuItem.prototype.setText=function($0){this._labelContent.innerHTML=document.createTextNode($0).data;this._isText=true;};zwt.ui.menu.MenuItem.prototype.getText=function(){if(this._isText){return this._labelContent.innerHTML;}else {return null;}};zwt.ui.menu.MenuItem.prototype.setHTML=function($0){this._labelContent.innerHTML=$0;this._isText=false;};zwt.ui.menu.MenuItem.prototype.getHTML=function(){return this._labelContent.innerHTML;};zwt.ui.menu.MenuItem.prototype.setSubMenu=function($0){if(this._subMenu!=null){this.close();this._element.removeChild(this._subMenu._container);this._subMenu._container.style.position='';this._subMenu._parent=null;this._subMenu=null;}if($0!=null){this._element.appendChild($0._container);$0._parent=this;$0._container.style.position='absolute';$0._element.style.width='';$0._element.style.height='';this._label.className+=' zwt_menuItem-label-submenu';}else {this._label.className=this._label.className.replace(new RegExp(' zwt_menuItem-label-submenu','g'),'');}this._subMenu=$0;};zwt.ui.menu.MenuItem.prototype.getSubMenu=function(){return this._subMenu;};zwt.ui.menu.MenuItem.prototype.setSeparator=function($0){if($0){this._label.className+=' zwt_menuItem-label-separator';}else {this._label.className=this._label.className.replace(new RegExp(' zwt_menuItem-label-separator','g'),'');}};zwt.ui.menu.MenuItem.prototype.isSeparator=function(){var $0='zwt_menuItem-label-separator';return new RegExp('( '+$0.trim()+' |^'+$0.trim()+' | '+$0.trim()+'$)','g').test(this._label.className);};zwt.ui.menu.MenuItem.prototype.isDisabled=function(){return this.hasStyle('zwt_menuItem-disabled');};zwt.ui.menu.MenuItem.prototype.setDisabled=function($0){if(!this.isDisabled()&&$0){this.addStyle('zwt_menuItem-disabled');}else if(this.isDisabled()&&!$0){this.removeStyle('zwt_menuItem-disabled');}};zwt.ui.menu.MenuItem.prototype.draw=function(){};zwt.ui.menu.Menu=function($0,$1){zwt.ui.menu.Menu.superClass.constructor.call(this);this.setFocusable(true);this._element=document.createElement('UL');this._container.appendChild(this._element);this._items=new Array();this._selectedItem=null;this._opened=false;this._orientation=$0;this._autoOpen=$1!=null?$1:false;if(this._orientation==zwt.ui.menu.Menu.TOP||this._orientation==zwt.ui.menu.Menu.BOTTOM){this.setStyle('zwt_menu zwt_menu-horizontal');this._clear=document.createElement('DIV');this._clear.style.clear='both';this._element.appendChild(this._clear);this._element.style.width='4000px';this._fill=zwt.ui.Widget.FILL_HORIZONTAL;}else {this.setStyle('zwt_menu zwt_menu-vertical');this._fill=zwt.ui.Widget.FILL_VERTICAL;}this._menuCloseHandler=zwt.ui.menu.Menu._menuCloseHandler.bind(this);this._menuKeyboardHandler=zwt.ui.menu.Menu._menuKeyboardHandler.bind(this);if(System.userAgent.engine=='presto'||System.userAgent.engine=='gecko'){this.getKeyboardEventManager().addKeyPressHandler(this._menuKeyboardHandler);}else {this.getKeyboardEventManager().addKeyDownHandler(this._menuKeyboardHandler);}};zwt.ui.menu.Menu.inherits(zwt.ui.Widget);zwt.ui.menu.Menu.TOP=0;zwt.ui.menu.Menu.RIGHT=1;zwt.ui.menu.Menu.BOTTOM=2;zwt.ui.menu.Menu.LEFT=3;zwt.ui.menu.Menu._menuCloseHandler=function($0,$1){if(this._selectedItem!=null){this._selectedItem.deselect(true);}zwt.ui.Window.getWindow().clearFocus();this._opened=false;};zwt.ui.menu.Menu._menuKeyboardHandler=function($0,$1){if($1.getKey()==37){if(this._orientation==zwt.ui.menu.Menu.TOP||this._orientation==zwt.ui.menu.Menu.BOTTOM){var $2=this._selectedItem!=null?this._items.indexOf(this._selectedItem):0;var $3=$2;do{$3--;if($3<0){$3=this._items.length-1;}}while(this._items[$3].isDisabled()&&$3!=$2);if($3!=$2){this._items[$3].select(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened);}$1.setCancelBubble(true);}else if(this._orientation==zwt.ui.menu.Menu.RIGHT){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&!this._selectedItem.getSubMenu()._opened){this._selectedItem.select(true);$1.setCancelBubble(true);}}else if(this._orientation==zwt.ui.menu.Menu.LEFT){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened){this._selectedItem.select(false);$1.setCancelBubble(true);}}}else if($1.getKey()==38){$1.setReturn(false);if(this._orientation==zwt.ui.menu.Menu.LEFT||this._orientation==zwt.ui.menu.Menu.RIGHT){var $4=this._selectedItem!=null?this._items.indexOf(this._selectedItem):0;var $5=$4;do{$5--;if($5<0){$5=this._items.length-1;}}while(this._items[$5].isDisabled()&&$5!=$4);if($5!=$4){this._items[$5].select(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened);}$1.setCancelBubble(true);}else if(this._orientation==zwt.ui.menu.Menu.BOTTOM){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&!this._selectedItem.getSubMenu()._opened){this._selectedItem.select(true);$1.setCancelBubble(true);}}else if(this._orientation==zwt.ui.menu.Menu.TOP){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened){this._selectedItem.select(false);$1.setCancelBubble(true);}}}else if($1.getKey()==39){if(this._orientation==zwt.ui.menu.Menu.TOP||this._orientation==zwt.ui.menu.Menu.BOTTOM){var $6=this._selectedItem!=null?this._items.indexOf(this._selectedItem):this._items.length-1;var $7=$6;do{$7++;if($7>this._items.length-1){$7=0;}}while(this._items[$7].isDisabled()&&$7!=$6);if($7!=$6){this._items[$7].select(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened);}$1.setCancelBubble(true);}else if(this._orientation==zwt.ui.menu.Menu.LEFT){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&!this._selectedItem.getSubMenu()._opened){this._selectedItem.select(true);$1.setCancelBubble(true);}}else if(this._orientation==zwt.ui.menu.Menu.RIGHT){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened){this._selectedItem.select(false);$1.setCancelBubble(true);}}}else if($1.getKey()==40){$1.setReturn(false);if(this._orientation==zwt.ui.menu.Menu.LEFT||this._orientation==zwt.ui.menu.Menu.RIGHT){var $8=this._selectedItem!=null?this._items.indexOf(this._selectedItem):this._items.length-1;var $9=$8;do{$9++;if($9>this._items.length-1){$9=0;}}while(this._items[$9].isDisabled()&&$9!=$8);if($9!=$8){this._items[$9].select(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened);}$1.setCancelBubble(true);}else if(this._orientation==zwt.ui.menu.Menu.TOP){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&!this._selectedItem.getSubMenu()._opened){this._selectedItem.select(true);$1.setCancelBubble(true);}}else if(this._orientation==zwt.ui.menu.Menu.BOTTOM){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&this._selectedItem.getSubMenu()._opened){this._selectedItem.select(false);$1.setCancelBubble(true);}}}else if($1.getKey()==13){if(this._selectedItem!=null){this._selectedItem.onEvent(new zwt.event.ClickEvent(null,this._selectedItem,zwt.event.ClickEvent.CLICK));}}else if($1.getKey()==27){zwt.ui.Window.getWindow().onEvent(new zwt.event.ClickEvent(null,zwt.ui.Window.getWindow(),zwt.event.ClickEvent.CLICK));}};zwt.ui.menu.Menu.prototype.processFocusEvent=function($0){zwt.ui.menu.Menu.superClass.prototype.processFocusEvent.call(this,$0);if(this.isFocusable()){if($0.getType()==zwt.event.FocusEvent.FOCUS){this._hasFocus=true;}else if($0.getType()==zwt.event.FocusEvent.BLUR){if(!(this.getParent() instanceof zwt.ui.menu.MenuItem)){if(this._selectedItem!=null&&this._selectedItem.getSubMenu()!=null&&!this._selectedItem.getSubMenu()._opened){this._selectedItem.deselect(true);}}this._hasFocus=false;if(!(this.getParent() instanceof zwt.ui.menu.MenuItem)){this._opened=false;}}}};zwt.ui.menu.Menu.prototype.processContentEvent=function($0){zwt.ui.menu.Menu.superClass.prototype.processContentEvent.call(this,$0);if(this.getParent() instanceof zwt.ui.menu.MenuItem){this._contentChanged=false;$0.setCancelBubble(true);}};zwt.ui.menu.Menu.prototype.open=function(){if(!this._opened){var $0=false;var $1=false;var $2=this;while($2 instanceof zwt.ui.menu.Menu){if($2._orientation==zwt.ui.menu.Menu.BOTTOM){$0=true;}if($2._orientation==zwt.ui.menu.Menu.RIGHT){$1=true;}$2=$2.getParent().getParent();}this.setVisible(true);var $3=this.getParent().getDimension();var $4=this.getDimension();if(this.getParent().getParent()._orientation==zwt.ui.menu.Menu.TOP){}else if(this.getParent().getParent()._orientation==zwt.ui.menu.Menu.BOTTOM){this._container.style.top=($3.top(true)-$4.absHeight(true))+'px';}else if(this.getParent().getParent()._orientation==zwt.ui.menu.Menu.RIGHT){this._container.style.top=($3.top(true))+'px';this._container.style.left=($3.left(true)-$4.absWidth(true))+'px';}else if(this.getParent().getParent()._orientation==zwt.ui.menu.Menu.LEFT){if($0){this._container.style.top=($3.top(true)-$4.absHeight(true)+$3.absHeight(true))+'px';}else {this._container.style.top=($3.top(true))+'px';}this._container.style.left=($3.left(true)+$3.absWidth(true))+'px';}this._opened=true;this._container.style.zIndex=1;this.onEvent(new zwt.event.FocusEvent(null,this,zwt.event.FocusEvent.FOCUS));if(this._items.length>0&&this._selectedItem==null){for(var $5=0;$5<this._items.length;$5++){if(!this._items[$5].isDisabled()){this._items[$5].select(true);break;}}}}};zwt.ui.menu.Menu.prototype.close=function(){if(this._opened){this.setVisible(false);if(this._selectedItem!=null){this._selectedItem.deselect(true);}this._opened=false;this._container.style.zIndex='';this.onEvent(new zwt.event.FocusEvent(null,this,zwt.event.FocusEvent.BLUR));if(zwt.ui.Window.getWindow()._focusWidget instanceof zwt.ui.menu.Menu&&this.getParent().getParent() instanceof zwt.ui.menu.Menu){this.getParent().getParent().onEvent(new zwt.event.FocusEvent(null,this,zwt.event.FocusEvent.FOCUS));}}};zwt.ui.menu.Menu.prototype.addItem=function($0){this.insertItem($0,this._items.length);};zwt.ui.menu.Menu.prototype.insertItem=function($0,$1){if($0.getParent()!=null){$0.getParent().removeItem($0);}if($1<0){$1=0;}if(this._orientation==zwt.ui.menu.Menu.TOP||this._orientation==zwt.ui.menu.Menu.BOTTOM){$0._container.style.cssFloat='left';$0._container.style.styleFloat='left';$0._element.style.cssFloat='left';$0._element.style.styleFloat='left';}else {$0._container.style.cssFloat='';$0._container.style.styleFloat='';$0._element.style.cssFloat='';$0._element.style.styleFloat='';}if($1<this._items.length){this._element.insertBefore($0._container,this._items[$1]._container);this._items.splice($1,0,$0);}else {if(this._orientation==zwt.ui.menu.Menu.TOP||this._orientation==zwt.ui.menu.Menu.BOTTOM){this._element.insertBefore($0._container,this._clear);}else {this._element.appendChild($0._container);}this._items.push($0);}$0._parent=this;$0.setVisible(true);this.onEvent(new zwt.ui.container.ContentEvent(zwt.ui.container.ContentEvent.CHANGE));};zwt.ui.menu.Menu.prototype.removeItemAt=function($0){if($0>=0&&$0<this._items.length){this._element.removeChild(this._items[$0]._container);this._items[$0]._parent=null;this._items[$0].setVisible(false);this._items[$0]._container.style.cssFloat='';this._items[$0]._container.style.styleFloat='';this._items[$0]._element.style.cssFloat='';this._items[$0]._element.style.styleFloat='';this._items.splice($0,1);this.onEvent(new zwt.ui.container.ContentEvent(zwt.ui.container.ContentEvent.CHANGE));}};zwt.ui.menu.Menu.prototype.removeItem=function($0){this.removeItemAt(this.indexOf($0));};zwt.ui.menu.Menu.prototype.getItem=function($0){if($0<this._items.length){return this._items[$0];}return null;};zwt.ui.menu.Menu.prototype.setAutoOpen=function($0){this._autoOpen=$0;};zwt.ui.menu.Menu.prototype.isAutoOpen=function(){return this._autoOpen;};zwt.ui.menu.Menu.prototype.indexOf=function($0){return this._items.indexOf($0);};zwt.ui.menu.Menu.prototype.getLength=function(){return this._items.length;};zwt.ui.menu.Menu.prototype.redraw=function(){if(!(this.getParent() instanceof zwt.ui.menu.MenuItem)){zwt.ui.menu.Menu.superClass.prototype.redraw.call(this);}};zwt.ui.menu.Menu.prototype.draw=function(){zwt.ui.menu.Menu.superClass.prototype.draw.call(this);if(this.getContextFill()==zwt.ui.Widget.FILL_NONE){var $0=0;for(var $1=0;$1<this._items.length;$1++){$0+=this._items[$1].getDimension().absWidth(true);}this._element.style.width=$0+'px';}};namespace('org.zeleos.site');org.zeleos.site.NavBar=function(){org.zeleos.site.NavBar.superClass.constructor.call(this);this.setId('NavBar');this.setContent(this.getNavMenu());};org.zeleos.site.NavBar.inherits(zwt.ui.Part);org.zeleos.site.NavBar.prototype.getNavMenu=function(){if(this.NavMenu==null){this.NavMenu=new zwt.ui.menu.Menu(zwt.ui.menu.Menu.TOP);this.NavMenu.setId('NavMenu');this.NavMenu.setFill(zwt.ui.Widget.FILL_BOTH);this.NavMenu.setAutoOpen(true);this.NavMenu.addItem(this.getFeaturesItem());this.NavMenu.addItem(this.getSep1Item());this.NavMenu.addItem(this.getDocItem());this.NavMenu.addItem(this.getSep2Item());this.NavMenu.addItem(this.getDevelopmentItem());}return this.NavMenu;};org.zeleos.site.NavBar.prototype.getFeaturesItem=function(){if(this.FeaturesItem==null){this.FeaturesItem=new zwt.ui.menu.MenuItem();this.FeaturesItem.setId('FeaturesItem');this.FeaturesItem.setHTML('Features');}return this.FeaturesItem;};org.zeleos.site.NavBar.prototype.getSep1Item=function(){if(this.Sep1Item==null){this.Sep1Item=new zwt.ui.menu.MenuItem();this.Sep1Item.setId('Sep1Item');this.Sep1Item.setText('<span class="separator"/>');this.Sep1Item.setDisabled(true);this.Sep1Item.addStyle('sepItem');}return this.Sep1Item;};org.zeleos.site.NavBar.prototype.getDocItem=function(){if(this.DocItem==null){this.DocItem=new zwt.ui.menu.MenuItem();this.DocItem.setId('DocItem');this.DocItem.setHTML('Documentation');this.DocItem.setSubMenu(this.getDocMenu());}return this.DocItem;};org.zeleos.site.NavBar.prototype.getDocMenu=function(){if(this.DocMenu==null){this.DocMenu=new zwt.ui.menu.Menu(zwt.ui.menu.Menu.LEFT);this.DocMenu.setId('DocMenu');this.DocMenu.addItem(this.getDocZWTFiveMinItem());this.DocMenu.addItem(this.getDocZWTManualItem());this.DocMenu.addItem(this.getDocZWTDemosItem());this.DocMenu.addItem(this.getDocZUIDLItem());this.DocMenu.addItem(this.getDocZWTToolsItem());this.DocMenu.addItem(this.getDocZWTJSAPIItem());}return this.DocMenu;};org.zeleos.site.NavBar.prototype.getDocZWTFiveMinItem=function(){if(this.DocZWTFiveMinItem==null){this.DocZWTFiveMinItem=new zwt.ui.menu.MenuItem();this.DocZWTFiveMinItem.setId('DocZWTFiveMinItem');this.DocZWTFiveMinItem.setText('5 minutes tour');}return this.DocZWTFiveMinItem;};org.zeleos.site.NavBar.prototype.getDocZWTManualItem=function(){if(this.DocZWTManualItem==null){this.DocZWTManualItem=new zwt.ui.menu.MenuItem();this.DocZWTManualItem.setId('DocZWTManualItem');this.DocZWTManualItem.setText('Getting started');}return this.DocZWTManualItem;};org.zeleos.site.NavBar.prototype.getDocZWTDemosItem=function(){if(this.DocZWTDemosItem==null){this.DocZWTDemosItem=new zwt.ui.menu.MenuItem();this.DocZWTDemosItem.setId('DocZWTDemosItem');this.DocZWTDemosItem.setText('Demos and Samples');}return this.DocZWTDemosItem;};org.zeleos.site.NavBar.prototype.getDocZUIDLItem=function(){if(this.DocZUIDLItem==null){this.DocZUIDLItem=new zwt.ui.menu.MenuItem();this.DocZUIDLItem.setId('DocZUIDLItem');this.DocZUIDLItem.setText('ZUIDL Reference');}return this.DocZUIDLItem;};org.zeleos.site.NavBar.prototype.getDocZWTToolsItem=function(){if(this.DocZWTToolsItem==null){this.DocZWTToolsItem=new zwt.ui.menu.MenuItem();this.DocZWTToolsItem.setId('DocZWTToolsItem');this.DocZWTToolsItem.setText('Tools');}return this.DocZWTToolsItem;};org.zeleos.site.NavBar.prototype.getDocZWTJSAPIItem=function(){if(this.DocZWTJSAPIItem==null){this.DocZWTJSAPIItem=new zwt.ui.menu.MenuItem();this.DocZWTJSAPIItem.setId('DocZWTJSAPIItem');this.DocZWTJSAPIItem.setText('JavaScript API');}return this.DocZWTJSAPIItem;};org.zeleos.site.NavBar.prototype.getSep2Item=function(){if(this.Sep2Item==null){this.Sep2Item=new zwt.ui.menu.MenuItem();this.Sep2Item.setId('Sep2Item');this.Sep2Item.setText('<span class="separator"/>');this.Sep2Item.setDisabled(true);this.Sep2Item.addStyle('sepItem');}return this.Sep2Item;};org.zeleos.site.NavBar.prototype.getDevelopmentItem=function(){if(this.DevelopmentItem==null){this.DevelopmentItem=new zwt.ui.menu.MenuItem();this.DevelopmentItem.setId('DevelopmentItem');this.DevelopmentItem.setHTML('Development');}return this.DevelopmentItem;};namespace('zwt.model');zwt.model.ModelEvent=function($0){zwt.model.ModelEvent.superClass.constructor.call(this,$0!=null?$0:zwt.model.ModelEvent.NOTIFY);};zwt.model.ModelEvent.inherits(zwt.event.Event);zwt.model.ModelEvent.NOTIFY='notify';zwt.model.ModelEventManager=function($0){zwt.model.ModelEventManager.superClass.constructor.call(this,$0);this._notifyHandlers=new Array();};zwt.model.ModelEventManager.inherits(zwt.event.EventManager);zwt.model.ModelEventManager.prototype.onEvent=function($0,$1,$2){if($0 instanceof zwt.model.ModelEvent){zwt.model.ModelEventManager.superClass.prototype.onEvent.call(this,$0,$1,$2);}};zwt.model.ModelEventManager.prototype.addNotifyHandler=function($0){this.addHandler(zwt.model.ModelEvent.NOTIFY,$0);};zwt.model.ModelEventManager.prototype.removeNotifyHandler=function($0){this.removeHandler(zwt.model.ModelEvent.NOTIFY,$0);};zwt.model.Model=function(){zwt.model.Model.superClass.constructor.call(this);this._modelEventManager=new zwt.model.ModelEventManager(this);};zwt.model.Model.inherits(zwt.Object);zwt.model.Model.prototype.onEvent=function($0){if($0 instanceof zwt.model.ModelEvent){this._modelEventManager.onEvent($0);}};zwt.model.Model.prototype.getModelEventManager=function(){return this._modelEventManager;};org.zeleos.site.NavBarModel=function(){org.zeleos.site.NavBarModel.superClass.constructor.call(this);};org.zeleos.site.NavBarModel.inherits(zwt.model.Model);org.zeleos.site.NavBarController=function(){org.zeleos.site.NavBarController.superClass.constructor.call(this);};org.zeleos.site.NavBarController.inherits(zwt.control.PartController);org.zeleos.site.NavBarController.prototype.init=function(){org.zeleos.site.NavBarController.superClass.prototype.init.call(this);this._part=new org.zeleos.site.NavBar();this._part.getFeaturesItem().getClickEventManager().addClickHandler(this.onFeatZWT.bind(this));this._part.getDocItem().getClickEventManager().addClickHandler(this.onDoc.bind(this));this._part.getDocZWTFiveMinItem().getClickEventManager().addClickHandler(this.onDocZWT5Min.bind(this));this._part.getDocZWTManualItem().getClickEventManager().addClickHandler(this.onDocZWTManual.bind(this));this._part.getDocZWTDemosItem().getClickEventManager().addClickHandler(this.onDocZWTDemos.bind(this));this._part.getDocZUIDLItem().getClickEventManager().addClickHandler(this.onDocZWTZUIDL.bind(this));this._part.getDocZWTToolsItem().getClickEventManager().addClickHandler(this.onDocZWTTools.bind(this));this._part.getDocZWTJSAPIItem().getClickEventManager().addClickHandler(this.onDocZWTJSAPI.bind(this));this._part.getDevelopmentItem().getClickEventManager().addClickHandler(this.onDevelopment.bind(this));this.setModel(new org.zeleos.site.NavBarModel());};org.zeleos.site.NavBarController.prototype.onFeatZWT=function($0,$1){this._redirect(navBarURLs["zwt_overview"].url,navBarURLs["zwt_overview"].target);};org.zeleos.site.NavBarController.prototype.onFeatZWG=function($0,$1){this._redirect(navBarURLs["zwg_overview"].url,navBarURLs["zwg_overview"].target);};org.zeleos.site.NavBarController.prototype.onDoc=function($0,$1){};org.zeleos.site.NavBarController.prototype.onDocZWT5Min=function($0,$1){this._redirect(navBarURLs["zwt_doc_5min"].url,navBarURLs["zwt_doc_5min"].target);};org.zeleos.site.NavBarController.prototype.onDocZWTManual=function($0,$1){this._redirect(navBarURLs["zwt_doc_manual"].url,navBarURLs["zwt_doc_manual"].target);};org.zeleos.site.NavBarController.prototype.onDocZWTDemos=function($0,$1){this._redirect(navBarURLs["zwt_doc_demos"].url,navBarURLs["zwt_doc_demos"].target);};org.zeleos.site.NavBarController.prototype.onDocZWTZUIDL=function($0,$1){this._redirect(navBarURLs["zwt_doc_zuidlRef"].url,navBarURLs["zwt_doc_zuidlRef"].target);};org.zeleos.site.NavBarController.prototype.onDocZWTJSAPI=function($0,$1){this._redirect(navBarURLs["zwt_doc_jsAPI"].url,navBarURLs["zwt_doc_jsAPI"].target);};org.zeleos.site.NavBarController.prototype.onDocZWTTools=function($0,$1){this._redirect(navBarURLs["zwt_doc_tools"].url,navBarURLs["zwt_doc_tools"].target);};org.zeleos.site.NavBarController.prototype.onDocZWGManual=function($0,$1){this._redirect(navBarURLs["zwg_doc_manual"].url,navBarURLs["zwg_doc_manual"].target);};org.zeleos.site.NavBarController.prototype.onDocZWTWidgetsRef=function($0,$1){this._redirect(navBarURLs["zwg_doc_widgetsRef"].url,navBarURLs["zwg_doc_widgetsRef"].target);};org.zeleos.site.NavBarController.prototype.onAbout=function($0,$1){this._redirect(navBarURLs["about"].url,navBarURLs["about"].target);};org.zeleos.site.NavBarController.prototype.onDevelopment=function($0,$1){this._redirect(navBarURLs["zwt_development"].url,navBarURLs["zwt_development"].target);};org.zeleos.site.NavBarController.prototype._redirect=function($0,$1){if($1=='new'){window.open($0);}else {window.location=$0;}};org.zeleos.site.ZeleosAppController=function(){org.zeleos.site.ZeleosAppController.superClass.constructor.call(this);};org.zeleos.site.ZeleosAppController.inherits(zwt.control.WindowController);org.zeleos.site.ZeleosAppController.prototype.init=function(){org.zeleos.site.ZeleosAppController.superClass.prototype.init.call(this);zwt.ui.Window.getWindow().getWindowEventManager().addLoadHandler(this.onLoad.bind(this));};org.zeleos.site.ZeleosAppController.prototype.getNavBarSlot=function(){if(this.NavBarSlot==null){this.NavBarSlot=new org.zeleos.site.NavBarController();}return this.NavBarSlot;};org.zeleos.site.ZeleosAppController.prototype.onLoad=function($0,$1){if(System.userAgent.engine=='gecko'){zwt.ui.Window.getWindow()._forceRedraw=true;zwt.ui.Window.getWindow().redraw();}};org.zeleos.site.ZeleosApp=function(){org.zeleos.site.ZeleosApp.superClass.constructor.call(this);this._controller=new org.zeleos.site.ZeleosAppController();zwt.ui.Window.getWindow().setPart(this._controller.getNavBarSlot().getPart(),'NavBarSlot');};org.zeleos.site.ZeleosApp.inherits(zwt.Object);org.zeleos.site.ZeleosApp.main=function(){var $0=new org.zeleos.site.ZeleosApp();};
