function $(A){return document.getElementById(A)}var global=function(){var A={};A.trim=function(B){return B.replace(/^\s+|\s+$/g,"")};A.d2h=function(B){return B.toString(16)};A.h2d=function(B){return parseInt(B,16)};A.getquerystring=function(){return window.location.search.replace(/^\?/,"")};A.getkeycode=function(B){return B.keyCode||B.which};return A}();global.event=function(){var B={};var C=[];B.add=function(F,D,E){if(window.addEventListener){F.addEventListener(D,E,false)}else{if(window.attachEvent){F["e"+D+E]=E;F[D+E]=function(){return F["e"+D+E](window.event)};F.attachEvent("on"+D,F[D+E]);C[C.length]={o:F,type:D,func:E}}}};B.remove=function(F,D,E){if(window.removeEventListener){F.removeEventListener(D,E,false)}else{if(window.detachEvent){F.detachEvent("on"+D,F[D+E]);F[D+E]=null;F["e"+D+E]=null}}};function A(){for(var E=0,D=C.length;E<D;E++){B.remove(C[E].o,C[E].type,C[E].func)}C=null}if(window.detachEvent){B.add(window,"unload",A)}return B}();