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