if(!Array.prototype.push){Array.prototype.push=function(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a]}return this.length}}Array.prototype.find=function(b,c){c=c||0;for(var a=c;a<this.length;a++){if(this[a]==b){return a}}return -1};Array.prototype.has=function(a){return this.find(a)!==-1};function map(d,c){var a=[];c=c||function(e){return e};for(var b=0;b<d.length;b++){a.push(c(d[b],b,d))}return a}function filter(c,b){var a=[];b=b||function(d){return d};map(c,function(d){if(b(d)){a.push(d)}});return a}function getElem(a){if(document.getElementById){if(typeof a=="string"){a=document.getElementById(a);if(a===null){throw"cannot get element: element does not exist"}}else{if(typeof a!="object"){throw"cannot get element: invalid datatype"}}}else{throw"cannot get element: unsupported DOM"}return a}function hasClass(b,a){return getElem(b).className.split(" ").has(a)}function getElementsByClass(c,b,a){a=!isUndefined(a)?getElem(a):document;if(isUndefined(b)){b="*"}return filter(a.getElementsByTagName(b),function(d){return hasClass(d,c)})}function listen(c,b,a){b=getElem(b);if(b.addEventListener){b.addEventListener(c,a,false)}else{if(b.attachEvent){b.attachEvent("on"+c,function(){a(new W3CDOM_Event(b))})}else{throw"cannot add event listener"}}}function mlisten(b,c,a){map(c,function(d){listen(b,d,a)})}function W3CDOM_Event(a){this.currentTarget=a;this.preventDefault=function(){window.event.returnValue=false};return this}function isUndefined(a){var b;return a===b}var _POPUP_FEATURES="";function raw_popup(a,d,b){if(isUndefined(b)){b=_POPUP_FEATURES}if(isUndefined(d)){d="_blank"}var c=window.open(a,d,b);c.focus();return c}function link_popup(b,a){return raw_popup(b.getAttribute("href"),b.getAttribute("target")||"_blank",a)}function event_popup(a){link_popup(a.currentTarget);a.preventDefault()}function event_popup_features(a){return function(b){link_popup(b.currentTarget,a);b.preventDefault()}};
