if(!window.Node){var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11}}var ARIA_STATE="aria-";function Widgets(){this.widgets=new Array()}Widgets.prototype.add=function(a){this.widgets[this.widgets.length]=a};Widgets.prototype.init=function(){for(var a=0;a<this.widgets.length;a++){this.widgets[a].init()}};function _$(a){return document.getElementById(a)}function WebBrowser(){}if(document.addEventListener){WebBrowser.prototype.setMouseCapture=function(c,e,b,d,a){if(e){document.addEventListener("click",e,true)}if(b){document.addEventListener("mousedown",b,true)}if(d){document.addEventListener("mousemove",d,true)}if(a){document.addEventListener("mouseup",a,true)}};WebBrowser.prototype.releaseMouseCapture=function(c,e,b,d,a){if(a){document.removeEventListener("mouseup",a,true)}if(d){document.removeEventListener("mousemove",d,true)}if(b){document.removeEventListener("mousedown",b,true)}if(e){document.removeEventListener("click",e,true)}}}else{WebBrowser.prototype.setMouseCapture=function(c,e,b,d,a){c.setCapture();if(e){c.attachEvent("onclick",e)}if(b){c.attachEvent("onmousedown",b)}if(d){c.attachEvent("onmousemove",d)}if(a){c.attachEvent("onmouseup",a)}};WebBrowser.prototype.releaseMouseCapture=function(c,e,b,d,a){if(a){c.detachEvent("onmouseup",a)}if(d){c.detachEvent("onmousemove",d)}if(b){c.detachEvent("onmousedown",b)}if(e){c.detachEvent("onclick",e)}c.releaseCapture()}}if(document.createEvent){WebBrowser.prototype.simulateOnClickEvent=function(a){var b=document.createEvent("MouseEvents");b.initEvent("click",true,true);a.dispatchEvent(b)}}else{WebBrowser.prototype.simulateOnClickEvent=function(a){var b=document.createEventObject();a.fireEvent("onclick",b)}}WebBrowser.prototype.keyCode=function(a){var b=a||window.event;return b.keyCode};if(typeof document.documentElement.setAttributeNS!="undefined"){WebBrowser.prototype.stopPropagation=function(a){a.stopPropagation();a.preventDefault();return false};WebBrowser.prototype.target=function(a){return a.target};WebBrowser.prototype.charCode=function(a){return a.charCode};WebBrowser.prototype.calculateOffsetLeft=function(a){return a.offsetLeft};WebBrowser.prototype.calculateOffsetTop=function(a){return a.offsetTop};WebBrowser.prototype.pageX=function(a){return a.pageX};WebBrowser.prototype.pageY=function(a){return a.pageY}}else{WebBrowser.prototype.stopPropagation=function(a){window.event.cancelBubble=true;window.event.returnValue=false;return false};WebBrowser.prototype.charCode=function(a){return window.browser.keyCode(a)};WebBrowser.prototype.target=function(a){return window.event.srcElement};WebBrowser.prototype.calculateOffsetLeft=function(a){var b=0;while(a){b+=a.offsetLeft;a=a.offsetParent}return b};WebBrowser.prototype.calculateOffsetTop=function(a){var b=0;while(a){b=b+a.offsetTop;a=a.offsetParent}return b};WebBrowser.prototype.pageX=function(a){return a.clientX+document.body.scrollLeft};WebBrowser.prototype.pageY=function(a){return a.clientY+document.body.scrollTop}}if(document.addEventListener){WebBrowser.prototype.addEvent=function(a,b,c){a.addEventListener(b,c,false);returnValue=true};WebBrowser.prototype.removeEvent=function(a,b,c){a.removeEventListener(b,c,false);returnValue=true};WebBrowser.prototype.addChangeEvent=function(a,b){a.addEventListener("DOMAttrModified",b,false);returnValue=true}}else{if(document.attachEvent){WebBrowser.prototype.addEvent=function(a,b,c){returnValue=a.attachEvent("on"+b,c)};WebBrowser.prototype.removeEvent=function(a,b,c){returnValue=a.detachEvent("on"+b,c)};WebBrowser.prototype.addChangeEvent=function(a,b){returnValue=a.attachEvent("onpropertychange",b)}}else{WebBrowser.prototype.addEvent=function(a,b,c){return false};WebBrowser.prototype.removeEvent=function(a,b,c){return false};WebBrowser.prototype.addChangeEvent=function(a,b){return false}}}function ARIA(){}ARIA.prototype.setAriaState=function(c,a,b){c.setAttribute(ARIA_STATE+a,b)};ARIA.prototype.setRole=function(b,a){b.setAttribute("role",a)};ARIA.prototype.getAriaState=function(b,a){return b.getAttribute(ARIA_STATE+a)};ARIA.prototype.removeAriaState=function(b,a){return b.removeAttribute(ARIA_STATE+a)};ARIA.prototype.hasAriaState=function(b,a){return b.hasAttribute(ARIA_STATE+a)};ARIA.prototype.setRolesAndStates=function(g){var i=0;var a=1;var h=2;var d=g.className;var b=d.split(" ");var e=i;var f="";for(j=0;j<b.length;j++){var d=b[j].replace(/ /g,"");if(!d){continue}if(d=="axs"){e=a}else{if(e==a){this.setRole(g,d);e=h;f=d}else{if(e==h){if(d.indexOf("-")!=-1){var c=d.split(/-/);if(c[0]!="tabindex"){this.setAriaState(g,c[0],c[1])}else{if(c[1]!=""){g.tabIndex=c[1]}else{g.tabIndex=-1}}}else{this.setAriaState(g,d,"")}}}}}};initApp=function(g){if(document.isInitialized){return}document.isInitialized=true;if((!g)||(!g.getElementsByTagName)){g=document.body}if(/axs /.test(g.className)){aria.setRolesAndStates(g)}if(document.evaluate){var e=document.evaluate(".//*[contains(@class, 'axs ')]",g,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var f=e.snapshotLength-1;f>=0;f--){aria.setRolesAndStates(e.snapshotItem(f),"wairole:")}}else{var c=new Array();var d=0;var b=(typeof g.all!="undefined")?g.all:g.getElementsByTagName("*");var a=b.length;for(var f=0;f<a;f++){if(/axs /.test(b[f].className)){aria.setRolesAndStates(b[f])}}}widgets.init()};widgets_flag=true;var widgets=new Widgets();var browser=new WebBrowser();var aria=new ARIA();