$=function(a){switch(typeof a){case"string":return document.getElementById(a);break;default:return a;break}};var Glry={Handlers:new Object(),Linky:function(c){var a,b;if(c==undefined){a=document.links}else{a=c.getElementsByTagName("A")}for(var d=0;d<a.length;d++){b=a[d];if(b.getAttribute("enabled")!==null){if(b.getAttribute("enabled")=="true"){a[d].onclick=Glry.Clicky;}}}},Event:function(e){switch(e.keyCode){case 27:if(Glry.Handlers.Hide!==undefined && Glry.Handlers.Esc!==undefined){Glry.Handlers.Esc();return;}break;}},Clicky:function(){Ajax.Get(this.href);return false}};Glry.Util={Param:Object(),RandomString:function(){var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";var d="";for(var c=0;c<10;c++){var b=Math.floor(Math.random()*a.length);d+=a.substring(b,b+1)}return d},CreateInterval:function(c,b){var a=setInterval(c,b);window.onunload=function(){clearInterval(Glry.Util.Param.IntervalId)};Glry.Util.Param.IntervalId=a;return a},CreateObject:function(b){if(b==undefined){b="DIV"}var a=document.createElement(b);if(Glry.Util.Param.Attr!==undefined){for(var c in Glry.Util.Param.Attr){a.setAttribute(c,Glry.Util.Param.Attr[c])}}Glry.Util.Param=new Object();return a},GetCenter:function(b){var a={scrollX:Glry.Util.ScrollX(),scrollY:Glry.Util.ScrollY(),viewPortWidth:Glry.Util.ClientWidth(),viewPortHeight:Glry.Util.ClientHeight(),elementHeight:b.offsetHeight,elementWidth:b.offsetWidth};this.x=(a.viewPortWidth/2)-(a.elementWidth/2)+a.scrollX;this.y=(a.viewPortHeight/2)-(a.elementHeight/2)+a.scrollY;if(a.elementHeight>=a.viewPortHeight){this.y=a.scrollY}return this},GetMouse:function(a){Glry.Util.Param.MouseX=0;Glry.Util.Param.MouseX=0;if(!a){var a=window.event}if(a.pageX||a.pageY){Glry.Util.Param.MouseX=a.pageX;Glry.Util.Param.MouseY=a.pageY}else{if(a.clientX||a.clientY){Glry.Util.Param.MouseX=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;Glry.Util.Param.MouseY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}}return{x:Glry.Util.Param.MouseX,y:Glry.Util.Param.MouseY}},DocumentWidth:function(){return document.documentElement.offsetWidth||document.body.offsetWidth},DocumentHeight:function(){return document.documentElement.offsetHeight||document.body.offsetHeight},ClientWidth:function(){return window.innerWidth||document.documentElement.clientWidth},ClientHeight:function(){return window.innerHeight||document.documentElement.clientHeight},ScrollX:function(){return document.documentElement.scrollLeft||document.body.scrollLeft},ScrollY:function(){return document.documentElement.scrollTop||document.body.scrollTop},Position:function(a){var d=0,c=0;var b=a;while(b){d+=b.offsetLeft;c+=b.offsetTop;b=b.offsetParent}return{x:d,y:c,width:a.offsetWidth,height:a.offsetHeight}}};
