var Utils={intersect:function(b,a){if(!b){return false}if(!a){return false}if(b.left>a.right){return false}if(b.right<a.left){return false}if(b.top>a.bottom){return false}if(b.bottom<a.top){return false}return true},htmldecode:function(a){a=a.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#xD;/g,"\n");return a},htmlencode:function(a){a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;").replace(/\n/g,"&#xD;");return a},outerHTML:function(b){if(b.outerHTML){return b.outerHTML}var a=b.parentNode;var d=document.createElement(a.tagName);d.appendChild(b);var c=d.innerHTML;a.appendChild(b);return c},alertObject:function(b){var c=[];for(var a in b){c.push(a+": "+b[a])}alert(c.join("\n"))},alphatize:function(a){return a.toLowerCase().replace(/ /g,"_").replace(/[^~0-9a-zA-Z_]*/g,"")},Utf8:{encode:function(e){e=e.replace(/\r\n/g,"\n");var d="";for(var b=0;b<e.length;b++){var a=e.charCodeAt(b);if(a<128){d+=String.fromCharCode(a)}else{if((a>127)&&(a<2048)){d+=String.fromCharCode((a>>6)|192);d+=String.fromCharCode((a&63)|128)}else{d+=String.fromCharCode((a>>12)|224);d+=String.fromCharCode(((a>>6)&63)|128);d+=String.fromCharCode((a&63)|128)}}}return d},decode:function(d){var e="";var a=0;var b=c1=c2=0;while(a<d.length){b=d.charCodeAt(a);if(b<128){e+=String.fromCharCode(b);a++}else{if((b>191)&&(b<224)){c2=d.charCodeAt(a+1);e+=String.fromCharCode(((b&31)<<6)|(c2&63));a+=2}else{c2=d.charCodeAt(a+1);c3=d.charCodeAt(a+2);e+=String.fromCharCode(((b&15)<<12)|((c2&63)<<6)|(c3&63));a+=3}}}return e},decimal:function(b){var a="";return a}},debounce:function(b,a){if(this.toDebounce[b]){clearTimeout(this.toDebounce[b])}this.toDebounce[b]=setTimeout(b,a)},toDebounce:[]};Element.implement({redraw:function(){var b=this;var c=b.getStyle("display");b.style.display="none";var a=b.offsetHeight;b.style.display=c;return this}});window.mousex=0;window.mousey=0;window.mouse={};window.addEvent("load",function(){document.addEvent("mousemove",function(a){if(a&&a.page){window.mousex=a.page.x;window.mousey=a.page.y;window.mouse.left=a.page.x;window.mouse.right=a.page.x;window.mouse.top=a.page.y;window.mouse.bottom=a.page.y}})});