function getTarget(b){var a=b.target?b.target:b.srcElement;return a.nodeType==3?a.parentNode:a}function getPageXY(b){var a=b.pageX||(b.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),c=b.pageY||(b.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return[a,c]}function preventDefault(a){a.preventDefault()}function keyCode(a){return a.which?a.which:a.keyCode}function addEvent(d,c,b){if(d.addEventListener){d.addEventListener(c,b,false)}else{if(d.nodeType===3||d.nodeType===8){return}if(d.setInterval&&(d!==window&&!d.frameElement)){d=window}if(!b.__guid){b.__guid=addEvent.guid++}if(!d.events){d.events={}}var a=d.events[c];if(!a){a=d.events[c]={};if(d["on"+c]){a[0]=d["on"+c]}}a[b.__guid]=b;d["on"+c]=addEvent.handleEvent}}addEvent.guid=1;addEvent.handleEvent=function(d){var a=true;d=d||addEvent.fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var b=this.events[d.type];for(var c in b){this.__handleEvent=b[c];if(this.__handleEvent(d)===false){a=false}}return a};addEvent.preventDefault=function(){this.returnValue=false};addEvent.stopPropagation=function(){this.cancelBubble=true};addEvent.fixEvent=function(a){a.preventDefault=addEvent.preventDefault;a.stopPropagation=addEvent.stopPropagation;return a};function removeEvent(c,b,a){if(c.removeEventListener){c.removeEventListener(b,a,false)}else{if(c.events&&c.events[b]){delete c.events[b][a.__guid]}}};