Chainable={chain:function(f,ie){if(typeof(f)=="function"){if(ie){try{f()}catch(i){}}else f()}return Chainable}};function $(o,p,x){var elm;if(typeof(o)=="string"){if(o.indexOf("*")!=0){elm=document.getElementById(o)}else{var ar=p?p.getElementsByTagName(o.substring(1,o.length)):document.getElementsByTagName(o.split("*")[1]),l=ar.length,i=0,m=typeof(x)=="object",g,e=[],cpts,cf;for(i;i<l;i=i+1){if(m){g=true;for(a in x){if(!ar[i][a]){g=false;break}else if(a=="className"){cpts=ar[i][a].split(" ");cf=false;$(cpts).each(function(cpt){if(cpt==x[a]){cf=true;return $.BreakLoop}});g=cf;break}else if(ar[i][a]!=x[a]){g=false;break}}if(g)e.push($(ar[i]))}else{e.push($(ar[i]))}}return $(e)}}else if(typeof(o)=="object"||typeof(o)=="function"){elm=o}if(!elm)return;if(elm.addStyle)return elm;elm.chain=function(f){if(typeof(f)=="function")f();return this};elm.addStyle=elm.addStyles=function(s,a,c){if(s&&a&&typeof(a)=="string")this.style[s]=a;else{if(typeof(s)=="string"){if(s.indexOf(":")>-1){s=s.split(":");this.style[s[0]]=s[1]}}else if(typeof(s)=="object"){for(n in s){this.style[n]=s[n]}}}if(typeof(c)=="function")c();else if(typeof(a)=="function")a();else return this};elm.getScrollLeft=function(){return this.scrollLeft*1};elm.setScrollLeft=function(l){this.scrollLeft=l};elm.getScrollTop=function(){return this.scrollTop*1};elm.setScrollTop=function(l){this.scrollTop=l};elm.removeStyle=elm.removeStyles=function(s){if(s){if(typeof(s)=="string"){this.style[s]=""}}return this};elm.addEvent=elm.addEvents=function(e){if(typeof(e)=="object"){for(n in e){this[n]=e[n]}}return this};elm.getWidth=function(){if(typeof($Anim)=="object"&&this.style.width.length>0)return $Anim._on(this.style.width);return parseInt(this.offsetWidth)};elm.getHeight=function(){if(typeof($Anim)=="object"&&this.style.height.length>0)return $Anim._on(this.style.height);return parseInt(this.offsetHeight)};elm.getLeft=function(){return this.position().left};elm.getTop=function(){return this.position().top};elm.getText=function(){if(!this.innerText)return this.textContent;else return this.innerText};elm.hide=function(){return this.addStyle({display:"none"})};elm.show=function(){return this.addStyle({display:""})};elm.setOpacity=function(o){if(o>1)o=o/100.0;return this.addStyles({opacity:o,filter:"alpha(opacity="+(o*100)+")"})};elm.getOpacity=function(){if(typeof(this.style.opacity)=="string"){if(this.style.opacity.length>0)return this.style.opacity*100;else return 100}else if(typeof(this.style.filter)=="string"){if(this.style.filter.length>0){var pts=this.style.filter.split("=");return parseInt(pts[1].substring(0,pts[1].length))}else return 100}};elm.each=function(f){if(typeof(this.length)=="number"&&typeof(f)=="function"){var l=this.length,i=0;for(i;i<l;i=i+1){if(f(this[i],i)==$.breakLoop)break}}return this};elm.contains=function(e){if(typeof(this.length)=="number"){var l=this.length,i=0;for(i;i<l;i=i+1){if(this[i]==e)return true}}return false};elm.getMonthName=function(e){if(this.getMonth){return["January","February","March","April","May","June","July","August","September","October","November","December"][this.getMonth()]}return false};elm.position=function(){var o=this,fbq=true,l=0,t=0,op=null,oo=o,el=o,cs;op=o.offsetParent;while(el.parentNode!=null){el=el.parentNode;if(el.offsetParent!=null){cs=true;if(fbq&&window.opera)if(el==oo.parentNode||el.nodeName=="TR")cs=false;if(cs){if(el.scrollTop&&el.scrollTop>0)t=t-el.scrollTop;if(el.scrollLeft&&el.scrollLeft>0)l=l-el.scrollLeft}}if(el==op){l=l+o.offsetLeft;if(el.clientLeft&&el.nodeName!="TABLE")l=l+el.clientLeft;t+=o.offsetTop;if(el.clientTop&&el.nodeName!="TABLE")t=t+el.clientTop;o=el;if(o.offsetParent==null){if(o.offsetLeft)l=l+o.offsetLeft;if(o.offsetTop)t=t+o.offsetTop}op=o.offsetParent}}return{'left':l,'top':t}};elm.trackMouseMovement=function(y){if(y==true||y==undefined){this._tracking_mouse=true;this._trackMouse()}else{if(this.omv)this.onmousemove=this.omv;this._tracking_mouse=false}};elm._trackMouse=function(){t=this;t.onmousemove=function(ev){if(!ev)ev=window.event;if(typeof(ev.clientX)=="number"){t.X=ev.clientX+document.body.scrollLeft;t.Y=ev.clientY+document.body.scrollTop}else{t.X=e.pageX;t.Y=e.pageY}if(t.X<0)t.X=0;if(t.Y<0)t.Y=0;return true}};elm.getMousePosition=function(){if(this._tracking_mouse)return{X:this.X,Y:this.Y};else return{X:-1,Y:-1}};elm.addClass=function(n){var cns=elm.className.split(" "),nn="";if(!$(cns).contains(n))cns.push(n);$(cns).each(function(c,i){if(i>0)nn+=" ";nn+=c});elm.className=nn;return elm};elm.removeClass=function(n){var cns=elm.className.split(" "),nn="";$(cns).each(function(c){if(c!=n){if(nn.length>0)nn+=" ";nn+=c}});elm.className=nn;return elm};elm.hasClass=function(n){var hasClass=false;var cns=elm.className.split(" ");$(cns).each(function(c){if(c==n){hasClass=true}});return hasClass};if(typeof($Anim)=="object")$Anim.addFeatures(elm);if($.plugins.length>0){$($.plugins).each(function(f){elm[f.name]=f.func})}return elm}$._cache=[];$.plugins=[];$.addPlugin=function(n,f){$.plugins.push({name:n,func:f})};$.breakLoop=$.BreakLoop="$.breakLoop";$.chain=function(f,ie){if(typeof(f)=="function"){if(ie){try{f()}catch(i){}}else f()}return Chainable};$.preventDefault=(function(){return function(e){try{if(!e)var e=window.event;e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();e.preventDefault()}}catch(i){}}})();$.onready=(function(){return function(f){__DR.ready(f)}})();(function(){var __DR=window.__DR={};var userAgent=navigator.userAgent.toLowerCase();var browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:(/msie/.test(userAgent))&&(!/opera/.test(userAgent)),mozilla:(/mozilla/.test(userAgent))&&(!/(compatible|webkit)/.test(userAgent))};var readyBound=false;var isReady=false;var readyList=[];function domReady(){if(!isReady){isReady=true;if(readyList){for(var fn=0;fn<readyList.length;fn++){readyList[fn].call(window,[])}readyList=[]}}};function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func}else{window.onload=function(){if(oldonload){oldonload()}func()}}}function bindReady(){if(readyBound){return}readyBound=true;if(document.addEventListener&&!browser.opera){document.addEventListener("DOMContentLoaded",domReady,false)}if(browser.msie&&window==top)(function(){if(isReady)return;try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}domReady()})();if(browser.opera){document.addEventListener("DOMContentLoaded",function(){if(isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return}domReady()},false)}if(browser.safari){var numStyles;(function(){if(isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return}if(numStyles===undefined){var links=document.getElementsByTagName("link");for(var i=0;i<links.length;i++){if(links[i].getAttribute('rel')=='stylesheet'){numStyles++}}var styles=document.getElementsByTagName("style");numStyles+=styles.length}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return}domReady()})()}addLoadEvent(domReady)};__DR.ready=function(fn,args){bindReady();if(isReady){fn.call(window,[])}else{readyList.push(function(){return fn.call(window,[])})}};bindReady()})();
