/*  Prototype JavaScript framework, version 1.6.1
 *  (c) 2005-2009 Sam Stephenson
 *
 *  Prototype is freely distributable under the terms of an MIT-style license.
 *  For details, see the Prototype web site: http://www.prototypejs.org/
 *
 *--------------------------------------------------------------------------*/
/*  Only minimum part for OOP programing is retrived.
 *  (c) 2010 mtoyota@real.com
 *
 *  Available classes from Prototype version 1.6.1
 *  - Abstract (only namespace)
 *  - Class
 *  - Object
 **/
var Abstract={};var Class=(function(){function a(){}function b(){var g=null;var f=Array.prototype.slice.call(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=function(){}}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames()[0]=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var c=Object.prototype.toString;function f(o,q){for(var p in q){o[p]=q[p]}return o}function j(o){try{if(d(o)){return"undefined"}if(o===null){return"null"}return o.inspect?o.inspect():String(o)}catch(p){if(p instanceof RangeError){return"..."}throw p}}function i(o){var q=typeof o;switch(q){case"undefined":case"function":case"unknown":return;case"boolean":return o.toString()}if(o===null){return"null"}if(o.toJSON){return o.toJSON()}if(g(o)){return}var p=[];for(var s in o){var r=i(o[s]);if(!d(r)){p.push(s.toJSON()+": "+r)}}return"{"+p.join(", ")+"}"}function m(o){var p=[];for(var q in o){p.push(q)}return p}function k(o){var p=[];for(var q in o){p.push(o[q])}return p}function h(o){return f({},o)}function g(o){return !!(o&&o.nodeType==1)}function e(o){return c.call(o)=="[object Array]"}function n(o){return o instanceof Hash}function b(o){return typeof o==="function"}function a(o){return c.call(o)=="[object String]"}function l(o){return c.call(o)=="[object Number]"}function d(o){return typeof o==="undefined"}f(Object,{extend:f,inspect:j,toJSON:i,keys:m,values:k,clone:h,isElement:g,isArray:e,isHash:n,isFunction:b,isString:a,isNumber:l,isUndefined:d})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return l.length==1&&!l[0]?[]:l}function h(n){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var l=this,m=k.call(arguments,1);return function(){var o=i(m,arguments);return l.apply(n,o)}}function f(n){var l=this,m=k.call(arguments,1);return function(p){var o=d([p||window.event],m);return l.apply(n,o)}}function j(){if(!arguments.length){return this}var l=this,m=k.call(arguments,0);return function(){var n=i(m,arguments);return l.apply(this,n)}}function e(n){var l=this,m=k.call(arguments,1);n=n*1000;return window.setTimeout(function(){return l.apply(l,m)},n)}function a(){var l=d([0.01],arguments);return this.delay.apply(this,l)}function c(m){var l=this;return function(){var n=d([l.bind(this)],arguments);return m.apply(this,n)}}function b(){if(this._methodized){return this._methodized}var l=this;return this._methodized=function(){var m=d([this],arguments);return l.apply(null,m)}}return{argumentNames:g,bind:h,bindAsEventListener:f,curry:j,delay:e,defer:a,wrap:c,methodize:b}})());if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,a){a||(a=0);var b=this.length;if(a<0){a=b+a}for(;a<b;a++){if(this[a]===c){return a}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(b,a){a=isNaN(a)?this.length:(a<0?this.length+a:a)+1;var c=this.slice(0,a).reverse().indexOf(b);return(c<0)?c:a-c-1}}if(!String.prototype.startsWith){String.prototype.startsWith=function(a){return this.indexOf(a)===0}}if(!String.prototype.endsWith){String.prototype.endsWith=function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b}};
