var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};Object.extend=function(a,b){for(property in b)a[property]=b[property];return a};Function.prototype.bind=function(a){var b=this;return function(){return b.apply(a,arguments)}};Function.prototype.bindAsEventListener=function(a){var b=this;return function(c){b.call(a,c||window.event)}};
function $(){function a(c){if(typeof c=="string")c=document.getElementById(c);return c}if(arguments.length==1)return a(arguments[0]);var b=[];$c(arguments).each(function(c){b.push(a(c))});return b}if(!window.Element)var Element={};
Object.extend(Element,{remove:function(a){a=$(a);a.parentNode.removeChild(a)},hasClassName:function(a,b){if(a=$(a)){var c=false;a.className.split(" ").each(function(d){if(d==b)c=true});return c}},addClassName:function(a,b){a=$(a);Element.removeClassName(a,b);a.className+=" "+b},removeClassName:function(a,b){if(a=$(a)){var c="";a.className.split(" ").each(function(d,e){if(d!=b){if(e>0)c+=" ";c+=d}});a.className=c}},cleanWhitespace:function(a){a=$(a);$c(a.childNodes).each(function(b){b.nodeType==3&&
!/\S/.test(b.nodeValue)&&Element.remove(b)})},find:function(a,b){for(a=$(a)[b];a.nodeType!=1;)a=a[b];return a}});var Position={cumulativeOffset:function(a){var b=0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;a=a.offsetParent}while(a);return[c,b]}};document.getElementsByClassName=function(a){var b=document.getElementsByTagName("*")||document.all,c=[];$c(b).each(function(d){Element.hasClassName(d,a)&&c.push(d)});return c};Array.prototype.iterate=function(a){for(var b=0;b<this.length;b++)a(this[b],b)};
if(!Array.prototype.each)Array.prototype.each=Array.prototype.iterate;function $c(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b};