if(typeof HTMLElement!="undefined"){if(window.Event){Event.prototype.__defineSetter__("returnValue",function(A){if(!A){this.preventDefault()}return A});Event.prototype.__defineSetter__("cancelBubble",function(A){if(A){this.stopPropagation()}return A});Event.prototype.__defineGetter__("srcElement",function(){var A=this.target;while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("fromElement",function(){var A;if(this.type=="mouseover"){A=this.relatedTarget}else{if(this.type=="mouseout"){A=this.target}}if(!A){return }while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("toElement",function(){var A;if(this.type=="mouseout"){A=this.relatedTarget}else{if(this.type=="mouseover"){A=this.target}}if(!A){return }while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("wheelDelta",function(){return -(this.detail*40)});Event.prototype.__defineGetter__("x",function(){return this.clientX});Event.prototype.__defineGetter__("y",function(){return this.clientY})}if(window.Document){}if(window.Node){Node.prototype.replaceNode=function(A){this.parentNode.replaceChild(A,this)};Node.prototype.removeNode=function(B){if(B){try{return this.parentNode.removeChild(this)}catch(C){document.body.removeChild(this)}}else{var A=document.createRange();A.selectNodeContents(this);return this.parentNode.replaceChild(A.extractContents(),this)}};Node.prototype.swapNode=function(B){var C=this.nextSibling;var A=this.parentNode;B.parentNode.replaceChild(this,B);A.insertBefore(B,C)}}if(window.HTMLElement){function _attachEvent(C,B,A){B=/^onmousewheel$/i.test(B)?"DOMMouseScroll":B.replace(/^on/i,"");return C.addEventListener(B,A,false)}HTMLElement.prototype.attachEvent=function(B,A){return _attachEvent(this,B,A)};window.attachEvent=function(B,A){return _attachEvent(window,B,A)};document.attachEvent=function(B,A){return _attachEvent(window,B,A)};function _detachEvent(C,B,A){B=/^onmousewheel$/i.test(B)?"DOMMouseScroll":B.replace(/^on/i,"");return C.removeEventListener(B,A,false)}HTMLElement.prototype.detachEvent=function(B,A){return _detachEvent(this,B,A)};window.detachEvent=function(B,A){return _detachEvent(window,B,A)};document.detachEvent=function(B,A){return _detachEvent(window,B,A)};HTMLElement.prototype.onpropertychange=function(B,A){return this.onchange};HTMLElement.prototype.__defineGetter__("all",function(){var A=this.getElementsByTagName("*");var B=this;A.tags=function(C){return B.getElementsByTagName(C)};return A});HTMLElement.prototype.__defineGetter__("parentElement",function(){if(this.parentNode==this.ownerDocument){return null}return this.parentNode});HTMLElement.prototype.__defineGetter__("children",function(){var C=[];var A=0;var D;for(var B=0;B"}return D+">"+this.innerHTML+""});HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){switch(this.tagName.toLowerCase()){case"area":case"base":case"basefont":case"col":case"frame":case"hr":case"img":case"br":case"input":case"isindex":case"link":case"meta":case"param":return false}return true});HTMLElement.prototype.__defineSetter__("innerText",function(B){var A=document.createTextNode(B);this.innerHTML=A;return A});HTMLElement.prototype.__defineGetter__("innerText",function(){var A=this.ownerDocument.createRange();A.selectNodeContents(this);return A.toString()});HTMLElement.prototype.__defineSetter__("outerText",function(B){var A=document.createTextNode(B);this.outerHTML=A;return A});HTMLElement.prototype.__defineGetter__("outerText",function(){var A=this.ownerDocument.createRange();A.selectNodeContents(this);return A.toString()});HTMLElement.prototype.__defineGetter__("uniqueID",function(){if(!this.id){this.id="control_"+random(7)}return this.id});HTMLElement.prototype.click=function(){this.onclick()};HTMLElement.prototype.setCapture=function(){document.onselectstart=function(){return false};window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP)};HTMLElement.prototype.releaseCapture=function(){document.onselectstart=null;window.releaseEvents(Event.MOUSEMOVE);window.releaseEvents(Event.MOUSEUP)};HTMLElement.prototype.contains=function(A){do{if(A==this){return true}}while(A=A.parentNode);return false};HTMLElement.prototype.insertAdjacentElement=function(A,B){switch(A){case"beforeBegin":this.parentNode.insertBefore(B,this);break;case"afterBegin":this.insertBefore(B,this.firstChild);break;case"beforeEnd":this.appendChild(B);break;case"afterEnd":if(this.nextSibling){this.parentNode.insertBefore(B,this.nextSibling)}else{this.parentNode.appendChild(B)}break}};HTMLElement.prototype.insertAdjacentHTML=function(B,D){var C=this.ownerDocument.createRange();C.setStartBefore(this);var A=C.createContextualFragment(D);this.insertAdjacentElement(B,A)};HTMLElement.prototype.insertAdjacentText=function(B,C){var A=document.createTextNode(C);this.insertAdjacentElement(B,A)}}HTMLElement.prototype.fireEvent=function(B){var A=document.createEvent("MouseEvents");A.initEvent(B.replace("on",""),true,true);this.dispatchEvent(A)}}if(window.addEventListener){FixPrototypeForGecko()}function FixPrototypeForGecko(){HTMLElement.prototype.__defineGetter__("runtimeStyle",element_prototype_get_runtimeStyle);window.constructor.prototype.__defineGetter__("event",window_prototype_get_event);Event.prototype.__defineGetter__("keyCode",event_prototype_get_keyCode);Event.prototype.__defineGetter__("x",event_prototype_get_x);Event.prototype.__defineGetter__("y",event_prototype_get_y);Event.prototype.__defineGetter__("offsetX",B);Event.prototype.__defineGetter__("offsetY",A);function B(){return D(this).offsetX}function A(){return D(this).offsetY}function D(F){var H=F.target;var G=C(H);var E={x:window.pageXOffset+F.clientX,y:window.pageYOffset+F.clientY};var I={offsetX:E.x-G.x,offsetY:E.y-G.y};return I}function C(E){var F={x:0,y:0};while(E){F.x+=E.offsetLeft;F.y+=E.offsetTop;E=E.offsetParent}return F}HTMLElement.prototype.__defineGetter__("pixelLeft",element_prototype_get_pixelLeft);HTMLElement.prototype.__defineGetter__("cssText",element_prototype_get_cssText);HTMLElement.prototype.__defineSetter__("cssText",element_prototype_set_cssText)}function element_prototype_get_runtimeStyle(){return this.style}function element_prototype_get_pixelLeft(){return parseInt(this.style.left.replace("px",""))}function event_prototype_get_x(){return this.layerX}function event_prototype_get_y(){return this.layerY}function event_prototype_get_offsetX(){return this.offsetX}function element_prototype_get_cssText(){var B="";for(var A in this){B+=A+":"+this[A]+";"}return B}function element_prototype_set_cssText(){var B="";for(var A in this){B+=A+":"+this[A]+";"}this.setAttribute("style",B)}function event_prototype_get_keyCode(){return event.which}function window_prototype_get_event(){return SearchEvent()}function SearchEvent(){if(document.all){return window.event}func=SearchEvent.caller;while(func!=null){var A=func.arguments[0];if(A){if(A.constructor==Event||A.constructor==MouseEvent){return A}}func=func.caller}return null};