var Prototype={Version:'1.6.0.2',Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf('AppleWebKit/')>-1,Gecko:navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('KHTML')==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement('div').__proto__&&document.createElement('div').__proto__!==document.createElement('form').__proto__},ScriptFragment:'<script[^>]*>([\\S\\s]*?)<\/script>',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari)Prototype.BrowserFeatures.SpecificElementExtensions=false;var Class={create:function(){var a=null,properties=$A(arguments);if(Object.isFunction(properties[0]))a=properties.shift();function klass(){this.initialize.apply(this,arguments)}Object.extend(klass,Class.Methods);klass.superclass=a;klass.subclasses=[];if(a){var b=function(){};b.prototype=a.prototype;klass.prototype=new b;a.subclasses.push(klass)}for(var i=0;i<properties.length;i++)klass.addMethods(properties[i]);if(!klass.prototype.initialize)klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass}};Class.Methods={addMethods:function(a){var b=this.superclass&&this.superclass.prototype;var c=Object.keys(a);if(!Object.keys({toString:true}).length)c.push("toString","valueOf");for(var i=0,length=c.length;i<length;i++){var d=c[i],value=a[d];if(b&&Object.isFunction(value)&&value.argumentNames().first()=="$super"){var e=value,value=Object.extend((function(m){return function(){return b[m].apply(this,arguments)}})(d).wrap(e),{valueOf:function(){return e},toString:function(){return e.toString()}})}this.prototype[d]=value}return this}};var Abstract={};Object.extend=function(a,b){for(var c in b)a[c]=b[c];return a};Object.extend(Object,{inspect:function(a){try{if(Object.isUndefined(a))return'undefined';if(a===null)return'null';return a.inspect?a.inspect():String(a)}catch(e){if(e instanceof RangeError)return'...';throw e;}},toJSON:function(a){var b=typeof a;switch(b){case'undefined':case'function':case'unknown':return;case'boolean':return a.toString()}if(a===null)return'null';if(a.toJSON)return a.toJSON();if(Object.isElement(a))return;var c=[];for(var d in a){var e=Object.toJSON(a[d]);if(!Object.isUndefined(e))c.push(d.toJSON()+': '+e)}return'{'+c.join(', ')+'}'},toQueryString:function(a){return $H(a).toQueryString()},toHTML:function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)},keys:function(a){var b=[];for(var c in a)b.push(c);return b},values:function(a){var b=[];for(var c in a)b.push(a[c]);return b},clone:function(a){return Object.extend({},a)},isElement:function(a){return a&&a.nodeType==1},isArray:function(a){return a!=null&&typeof a=="object"&&'splice'in a&&'join'in a},isHash:function(a){return a instanceof Hash},isFunction:function(a){return typeof a=="function"},isString:function(a){return typeof a=="string"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var a=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return a.length==1&&!a[0]?[]:a},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var a=this,args=$A(arguments),object=args.shift();return function(){return a.apply(object,args.concat($A(arguments)))}},bindAsEventListener:function(){var b=this,args=$A(arguments),object=args.shift();return function(a){return b.apply(object,[a||window.event].concat(args))}},curry:function(){if(!arguments.length)return this;var a=this,args=$A(arguments);return function(){return a.apply(this,args.concat($A(arguments)))}},delay:function(){var a=this,args=$A(arguments),timeout=args.shift()*1000;return window.setTimeout(function(){return a.apply(a,args)},timeout)},wrap:function(a){var b=this;return function(){return a.apply(this,[b.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized)return this._methodized;var a=this;return this._methodized=function(){return a.apply(null,[this].concat($A(arguments)))}}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+'-'+(this.getUTCMonth()+1).toPaddedString(2)+'-'+this.getUTCDate().toPaddedString(2)+'T'+this.getUTCHours().toPaddedString(2)+':'+this.getUTCMinutes().toPaddedString(2)+':'+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var a;for(var i=0,length=arguments.length;i<length;i++){var b=arguments[i];try{a=b();break}catch(e){}}return a}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1')};var PeriodicalExecuter=Class.create({initialize:function(a,b){this.callback=a;this.frequency=b;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(a){return a==null?'':String(a)},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});Object.extend(String.prototype,{gsub:function(a,b){var c='',source=this,match;b=arguments.callee.prepareReplacement(b);while(source.length>0){if(match=source.match(a)){c+=source.slice(0,match.index);c+=String.interpret(b(match));source=source.slice(match.index+match[0].length)}else{c+=source,source=''}}return c},sub:function(b,c,d){c=this.gsub.prepareReplacement(c);d=Object.isUndefined(d)?1:d;return this.gsub(b,function(a){if(--d<0)return a[0];return c(a)})},scan:function(a,b){this.gsub(a,b);return String(this)},truncate:function(a,b){a=a||30;b=Object.isUndefined(b)?'...':b;return this.length>a?this.slice(0,a-b.length)+b:String(this)},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'')},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'')},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'')},extractScripts:function(){var b=new RegExp(Prototype.ScriptFragment,'img');var c=new RegExp(Prototype.ScriptFragment,'im');return(this.match(b)||[]).map(function(a){return(a.match(c)||['',''])[1]})},evalScripts:function(){return this.extractScripts().map(function(a){return eval(a)})},escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var c=new Element('div');c.innerHTML=this.stripTags();return c.childNodes[0]?(c.childNodes.length>1?$A(c.childNodes).inject('',function(a,b){return a+b.nodeValue}):c.childNodes[0].nodeValue):''},toQueryParams:function(e){var f=this.strip().match(/([^?#]*)(#.*)?$/);if(!f)return{};return f[1].split(e||'&').inject({},function(a,b){if((b=b.split('='))[0]){var c=decodeURIComponent(b.shift());var d=b.length>1?b.join('='):b[0];if(d!=undefined)d=decodeURIComponent(d);if(c in a){if(!Object.isArray(a[c]))a[c]=[a[c]];a[c].push(d)}else a[c]=d}return a})},toArray:function(){return this.split('')},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?'':new Array(a+1).join(this)},camelize:function(){var a=this.split('-'),len=a.length;if(len==1)return a[0];var b=this.charAt(0)=='-'?a[0].charAt(0).toUpperCase()+a[0].substring(1):a[0];for(var i=1;i<len;i++)b+=a[i].charAt(0).toUpperCase()+a[i].substring(1);return b},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,'/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase()},dasherize:function(){return this.gsub(/_/,'-')},inspect:function(c){var d=this.gsub(/[\x00-\x1f\\]/,function(a){var b=String.specialChar[a[0]];return b?b:'\\u00'+a[0].charCodeAt().toPaddedString(2,16)});if(c)return'"'+d.replace(/"/g,'\\"')+'"';return"'"+d.replace(/'/g,'\\\'')+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,'#{1}')},isJSON:function(){var a=this;if(a.blank())return false;a=this.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'');return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)},evalJSON:function(a){var b=this.unfilterJSON();try{if(!a||b.isJSON())return eval('('+b+')')}catch(e){}throw new SyntaxError('Badly formed JSON string: '+this.inspect());},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var d=this.length-a.length;return d>=0&&this.lastIndexOf(a)===d},empty:function(){return this==''},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return new Template(this,b).evaluate(a)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE)Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;')},unescapeHTML:function(){return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>')}});String.prototype.gsub.prepareReplacement=function(b){if(Object.isFunction(b))return b;var c=new Template(b);return function(a){return c.evaluate(a)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement('div'),text:document.createTextNode('')});with(String.prototype.escapeHTML)div.appendChild(text);var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(f){if(Object.isFunction(f.toTemplateReplacements))f=f.toTemplateReplacements();return this.template.gsub(this.pattern,function(a){if(f==null)return'';var b=a[1]||'';if(b=='\\')return a[2];var c=f,expr=a[3];var d=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;a=d.exec(expr);if(a==null)return b;while(a!=null){var e=a[1].startsWith('[')?a[2].gsub('\\\\]',']'):a[1];c=c[e];if(null==c||''==a[3])break;expr=expr.substring('['==a[3]?a[1].length:a[0].length);a=d.exec(expr)}return b+String.interpret(c)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(b,c){var d=0;b=b.bind(c);try{this._each(function(a){b(a,d++)})}catch(e){if(e!=$break)throw e;}return this},eachSlice:function(a,b,c){b=b?b.bind(c):Prototype.K;var d=-a,slices=[],array=this.toArray();while((d+=a)<array.length)slices.push(array.slice(d,d+a));return slices.collect(b,c)},all:function(c,d){c=c?c.bind(d):Prototype.K;var e=true;this.each(function(a,b){e=e&&!!c(a,b);if(!e)throw $break;});return e},any:function(c,d){c=c?c.bind(d):Prototype.K;var e=false;this.each(function(a,b){if(e=!!c(a,b))throw $break;});return e},collect:function(c,d){c=c?c.bind(d):Prototype.K;var e=[];this.each(function(a,b){e.push(c(a,b))});return e},detect:function(c,d){c=c.bind(d);var e;this.each(function(a,b){if(c(a,b)){e=a;throw $break;}});return e},findAll:function(c,d){c=c.bind(d);var e=[];this.each(function(a,b){if(c(a,b))e.push(a)});return e},grep:function(c,d,e){d=d?d.bind(e):Prototype.K;var f=[];if(Object.isString(c))c=new RegExp(c);this.each(function(a,b){if(c.match(a))f.push(d(a,b))});return f},include:function(b){if(Object.isFunction(this.indexOf))if(this.indexOf(b)!=-1)return true;var c=false;this.each(function(a){if(a==b){c=true;throw $break;}});return c},inGroupsOf:function(b,c){c=Object.isUndefined(c)?null:c;return this.eachSlice(b,function(a){while(a.length<b)a.push(c);return a})},inject:function(c,d,e){d=d.bind(e);this.each(function(a,b){c=d(c,a,b)});return c},invoke:function(b){var c=$A(arguments).slice(1);return this.map(function(a){return a[b].apply(a,c)})},max:function(c,d){c=c?c.bind(d):Prototype.K;var e;this.each(function(a,b){a=c(a,b);if(e==null||a>=e)e=a});return e},min:function(c,d){c=c?c.bind(d):Prototype.K;var e;this.each(function(a,b){a=c(a,b);if(e==null||a<e)e=a});return e},partition:function(c,d){c=c?c.bind(d):Prototype.K;var e=[],falses=[];this.each(function(a,b){(c(a,b)?e:falses).push(a)});return[e,falses]},pluck:function(b){var c=[];this.each(function(a){c.push(a[b])});return c},reject:function(c,d){c=c.bind(d);var e=[];this.each(function(a,b){if(!c(a,b))e.push(a)});return e},sortBy:function(e,f){e=e.bind(f);return this.map(function(a,b){return{value:a,criteria:e(a,b)}}).sort(function(c,d){var a=c.criteria,b=d.criteria;return a<b?-1:a>b?1:0}).pluck('value')},toArray:function(){return this.map()},zip:function(){var c=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last()))c=args.pop();var d=[this].concat(args).map($A);return this.map(function(a,b){return c(d.pluck(b))})},size:function(){return this.toArray().length},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>'}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(a){if(!a)return[];if(a.toArray)return a.toArray();var b=a.length||0,results=new Array(b);while(b--)results[b]=a[b];return results}if(Prototype.Browser.WebKit){$A=function(a){if(!a)return[];if(!(Object.isFunction(a)&&a=='[object NodeList]')&&a.toArray)return a.toArray();var b=a.length||0,results=new Array(b);while(b--)results[b]=a[b];return results}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(a){for(var i=0,length=this.length;i<length;i++)a(this[i])},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(a,b){return a.concat(Object.isArray(b)?b.flatten():[b])})},without:function(){var b=$A(arguments);return this.select(function(a){return!b.include(a)})},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(d){return this.inject([],function(a,b,c){if(0==c||(d?a.last()!=b:!a.include(b)))a.push(b);return a})},intersect:function(c){return this.uniq().findAll(function(b){return c.detect(function(a){return b===a})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']'},toJSON:function(){var c=[];this.each(function(a){var b=Object.toJSON(a);if(!Object.isUndefined(b))c.push(b)});return'['+c.join(', ')+']'}});if(Object.isFunction(Array.prototype.forEach))Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a,i){i||(i=0);var b=this.length;if(i<0)i=b+i;for(;i<b;i++)if(this[i]===a)return i;return-1};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(a,i){i=isNaN(i)?this.length:(i<0?this.length+i:i)+1;var n=this.slice(0,i).reverse().indexOf(a);return(n<0)?n:i-n-1};Array.prototype.toArray=Array.prototype.clone;function $w(a){if(!Object.isString(a))return[];a=a.strip();return a?a.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var a=[];for(var i=0,length=this.length;i<length;i++)a.push(this[i]);for(var i=0,length=arguments.length;i<length;i++){if(Object.isArray(arguments[i])){for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++)a.push(arguments[i][j])}else{a.push(arguments[i])}}return a}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(a){$R(0,this,true).each(a);return this},toPaddedString:function(a,b){var c=this.toString(b||10);return'0'.times(a-c.length)+c},toJSON:function(){return isFinite(this)?this.toString():'null'}});$w('abs round ceil floor').each(function(a){Number.prototype[a]=Math[a].methodize()});function $H(a){return new Hash(a)};var Hash=Class.create(Enumerable,(function(){function toQueryPair(a,b){if(Object.isUndefined(b))return a;return a+'='+encodeURIComponent(String.interpret(b))}return{initialize:function(a){this._object=Object.isHash(a)?a.toObject():Object.clone(a)},_each:function(a){for(var b in this._object){var c=this._object[b],pair=[b,c];pair.key=b;pair.value=c;a(pair)}},set:function(a,b){return this._object[a]=b},get:function(a){return this._object[a]},unset:function(a){var b=this._object[a];delete this._object[a];return b},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck('key')},values:function(){return this.pluck('value')},index:function(b){var c=this.detect(function(a){return a.value===b});return c&&c.key},merge:function(a){return this.clone().update(a)},update:function(c){return new Hash(c).inject(this,function(a,b){a.set(b.key,b.value);return a})},toQueryString:function(){return this.map(function(a){var b=encodeURIComponent(a.key),values=a.value;if(values&&typeof values=='object'){if(Object.isArray(values))return values.map(toQueryPair.curry(b)).join('&')}return toQueryPair(b,values)}).join('&')},inspect:function(){return'#<Hash:{'+this.map(function(a){return a.map(Object.inspect).join(': ')}).join(', ')+'}>'},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(a,b,c){this.start=a;this.end=b;this.exclusive=c},_each:function(a){var b=this.start;while(this.include(b)){a(b);b=b.succ()}},include:function(a){if(a<this.start)return false;if(this.exclusive)return a<this.end;return a<=this.end}});var $R=function(a,b,c){return new ObjectRange(a,b,c)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){if(!this.include(a))this.responders.push(a)},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(b,c,d,f){this.each(function(a){if(Object.isFunction(a[b])){try{a[b].apply(a,[c,d,f])}catch(e){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(a){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:'',evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters))this.options.parameters=this.options.parameters.toQueryParams();else if(Object.isHash(this.options.parameters))this.options.parameters=this.options.parameters.toObject()}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,b,c){$super(c);this.transport=Ajax.getTransport();this.request(b)},request:function(a){this.url=a;this.method=this.options.method;var b=Object.clone(this.options.parameters);if(!['get','post'].include(this.method)){b['_method']=this.method;this.method='post'}this.parameters=b;if(b=Object.toQueryString(b)){if(this.method=='get')this.url+=(this.url.include('?')?'&':'?')+b;else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))b+='&_='}try{var c=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(c);Ajax.Responders.dispatch('onCreate',this,c);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous)this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||b):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)this.onStateChange()}catch(e){this.dispatchException(e)}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==4)&&this._complete))this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var b={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){b['Content-type']=this.options.contentType+(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)b['Connection']='close'}if(typeof this.options.requestHeaders=='object'){var c=this.options.requestHeaders;if(Object.isFunction(c.push))for(var i=0,length=c.length;i<length;i+=2)b[c[i]]=c[i+1];else $H(c).each(function(a){b[a.key]=a.value})}for(var d in b)this.transport.setRequestHeader(d,b[d])},success:function(){var a=this.getStatus();return!a||(a>=200&&a<300)},getStatus:function(){try{return this.transport.status||0}catch(e){return 0}},respondToReadyState:function(a){var b=Ajax.Request.Events[a],response=new Ajax.Response(this);if(b=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON)}catch(e){this.dispatchException(e)}var c=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&this.isSameOrigin()&&c&&c.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))this.evalResponse()}try{(this.options['on'+b]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on'+b,this,response,response.headerJSON)}catch(e){this.dispatchException(e)}if(b=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var m=this.url.match(/^\s*https?:\/\/[^\/]*/);return!m||(m[0]=='#{protocol}//#{domain}#{port}'.interpolate({protocol:location.protocol,domain:document.domain,port:location.port?':'+location.port:''}))},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(e){return null}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch('onException',this,a)}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(a){this.request=a;var b=this.transport=a.transport,readyState=this.readyState=b.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(b.responseText);this.headerJSON=this._getHeaderJSON()}if(readyState==4){var c=b.responseXML;this.responseXML=Object.isUndefined(c)?null:c;this.responseJSON=this._getResponseJSON()}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||''}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(e){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader('X-JSON');if(!a)return null;a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(e){this.request.dispatchException(e)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||(a.evalJSON!='force'&&!(this.getHeader('Content-type')||'').include('application/json'))||this.responseText.blank())return null;try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(e){this.request.dispatchException(e)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,d,e,f){this.container={success:(d.success||d),failure:(d.failure||(d.success?null:d))};f=Object.clone(f);var g=f.onComplete;f.onComplete=(function(a,b){this.updateContent(a.responseText);if(Object.isFunction(g))g(a,b)}).bind(this);$super(e,f)},updateContent:function(a){var b=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)a=a.stripScripts();if(b=$(b)){if(options.insertion){if(Object.isString(options.insertion)){var c={};c[options.insertion]=a;b.insert(c)}else options.insertion(b,a)}else b.update(a)}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,b,c,d){$super(d);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=b;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(a){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)elements.push($(arguments[i]));return elements}if(Object.isString(a))a=document.getElementById(a);return Element.extend(a)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(a,b){var c=[];var d=document.evaluate(a,$(b)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=d.snapshotLength;i<length;i++)c.push(Element.extend(d.snapshotItem(i)));return c}}if(!window.Node)var Node={};if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var d=this.Element;this.Element=function(a,b){b=b||{};a=a.toLowerCase();var c=Element.cache;if(Prototype.Browser.IE&&b.name){a='<'+a+' name="'+b.name+'">';delete b.name;return Element.writeAttribute(document.createElement(a),b)}if(!c[a])c[a]=Element.extend(document.createElement(a));return Element.writeAttribute(c[a].cloneNode(false),b)};Object.extend(this.Element,d||{})}).call(window);Element.cache={};Element.Methods={visible:function(a){return $(a).style.display!='none'},toggle:function(a){a=$(a);Element[Element.visible(a)?'hide':'show'](a);return a},hide:function(a){$(a).style.display='none';return a},show:function(a){$(a).style.display='';return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(a,b){a=$(a);if(b&&b.toElement)b=b.toElement();if(Object.isElement(b))return a.update().insert(b);b=Object.toHTML(b);a.innerHTML=b.stripScripts();b.evalScripts.bind(b).defer();return a},replace:function(a,b){a=$(a);if(b&&b.toElement)b=b.toElement();else if(!Object.isElement(b)){b=Object.toHTML(b);var c=a.ownerDocument.createRange();c.selectNode(a);b.evalScripts.bind(b).defer();b=c.createContextualFragment(b.stripScripts())}a.parentNode.replaceChild(b,a);return a},insert:function(a,b){a=$(a);if(Object.isString(b)||Object.isNumber(b)||Object.isElement(b)||(b&&(b.toElement||b.toHTML)))b={bottom:b};var c,insert,tagName,childNodes;for(var d in b){c=b[d];d=d.toLowerCase();insert=Element._insertionTranslations[d];if(c&&c.toElement)c=c.toElement();if(Object.isElement(c)){insert(a,c);continue}c=Object.toHTML(c);tagName=((d=='before'||d=='after')?a.parentNode:a).tagName.toUpperCase();childNodes=Element._getContentFromAnonymousElement(tagName,c.stripScripts());if(d=='top'||d=='after')childNodes.reverse();childNodes.each(insert.curry(a));c.evalScripts.bind(c).defer()}return a},wrap:function(a,b,c){a=$(a);if(Object.isElement(b))$(b).writeAttribute(c||{});else if(Object.isString(b))b=new Element(b,c);else b=new Element('div',b);if(a.parentNode)a.parentNode.replaceChild(b,a);b.appendChild(a);return b},inspect:function(d){d=$(d);var e='<'+d.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(a){var b=a.first(),attribute=a.last();var c=(d[b]||'').toString();if(c)e+=' '+attribute+'='+c.inspect(true)});return e+'>'},recursivelyCollect:function(a,b){a=$(a);var c=[];while(a=a[b])if(a.nodeType==1)c.push(Element.extend(a));return c},ancestors:function(a){return $(a).recursivelyCollect('parentNode')},descendants:function(a){return $(a).select("*")},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1)a=a.nextSibling;return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild))return[];while(a&&a.nodeType!=1)a=a.nextSibling;if(a)return[a].concat($(a).nextSiblings());return[]},previousSiblings:function(a){return $(a).recursivelyCollect('previousSibling')},nextSiblings:function(a){return $(a).recursivelyCollect('nextSibling')},siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(a,b){if(Object.isString(b))b=new Selector(b);return b.match($(a))},up:function(a,b,c){a=$(a);if(arguments.length==1)return $(a.parentNode);var d=a.ancestors();return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},down:function(a,b,c){a=$(a);if(arguments.length==1)return a.firstDescendant();return Object.isNumber(b)?a.descendants()[b]:a.select(b)[c||0]},previous:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(a));var d=a.previousSiblings();return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},next:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(a));var d=a.nextSiblings();return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},select:function(){var a=$A(arguments),element=$(a.shift());return Selector.findChildElements(element,a)},adjacent:function(){var a=$A(arguments),element=$(a.shift());return Selector.findChildElements(element.parentNode,a).without(element)},identify:function(a){a=$(a);var b=a.readAttribute('id'),self=arguments.callee;if(b)return b;do{b='anonymous_element_'+self.counter++}while($(b));a.writeAttribute('id',b);return b},readAttribute:function(a,b){a=$(a);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[b])return t.values[b](a,b);if(t.names[b])b=t.names[b];if(b.include(':')){return(!a.attributes||!a.attributes[b])?null:a.attributes[b].value}}return a.getAttribute(b)},writeAttribute:function(a,b,c){a=$(a);var d={},t=Element._attributeTranslations.write;if(typeof b=='object')d=b;else d[b]=Object.isUndefined(c)?true:c;for(var e in d){b=t.names[e]||e;c=d[e];if(t.values[e])b=t.values[e](a,c);if(c===false||c===null)a.removeAttribute(b);else if(c===true)a.setAttribute(b,b);else a.setAttribute(b,c)}return a},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(!(a=$(a)))return;var c=a.className;return(c.length>0&&(c==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(c)))},addClassName:function(a,b){if(!(a=$(a)))return;if(!a.hasClassName(b))a.className+=(a.className?' ':'')+b;return a},removeClassName:function(a,b){if(!(a=$(a)))return;a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)"),' ').strip();return a},toggleClassName:function(a,b){if(!(a=$(a)))return;return a[a.hasClassName(b)?'removeClassName':'addClassName'](b)},cleanWhitespace:function(a){a=$(a);var b=a.firstChild;while(b){var c=b.nextSibling;if(b.nodeType==3&&!/\S/.test(b.nodeValue))a.removeChild(b);b=c}return a},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(b,c){b=$(b),c=$(c);var d=c;if(b.compareDocumentPosition)return(b.compareDocumentPosition(c)&8)===8;if(b.sourceIndex&&!Prototype.Browser.Opera){var e=b.sourceIndex,a=c.sourceIndex,nextAncestor=c.nextSibling;if(!nextAncestor){do{c=c.parentNode}while(!(nextAncestor=c.nextSibling)&&c.parentNode)}if(nextAncestor&&nextAncestor.sourceIndex)return(e>a&&e<nextAncestor.sourceIndex)}while(b=b.parentNode)if(b==d)return true;return false},scrollTo:function(a){a=$(a);var b=a.cumulativeOffset();window.scrollTo(b[0],b[1]);return a},getStyle:function(a,b){a=$(a);b=b=='float'?'cssFloat':b.camelize();var c=a.style[b];if(!c){var d=document.defaultView.getComputedStyle(a,null);c=d?d[b]:null}if(b=='opacity')return c?parseFloat(c):1.0;return c=='auto'?null:c},getOpacity:function(a){return $(a).getStyle('opacity')},setStyle:function(a,b){a=$(a);var c=a.style,match;if(Object.isString(b)){a.style.cssText+=';'+b;return b.include('opacity')?a.setOpacity(b.match(/opacity:\s*(\d?\.?\d*)/)[1]):a}for(var d in b)if(d=='opacity')a.setOpacity(b[d]);else c[(d=='float'||d=='cssFloat')?(Object.isUndefined(c.styleFloat)?'cssFloat':'styleFloat'):d]=b[d];return a},setOpacity:function(a,b){a=$(a);a.style.opacity=(b==1||b==='')?'':(b<0.00001)?0:b;return a},getDimensions:function(a){a=$(a);var b=$(a).getStyle('display');if(b!='none'&&b!=null)return{width:a.offsetWidth,height:a.offsetHeight};var c=a.style;var d=c.visibility;var e=c.position;var f=c.display;c.visibility='hidden';c.position='absolute';c.display='block';var g=a.clientWidth;var h=a.clientHeight;c.display=f;c.position=e;c.visibility=d;return{width:g,height:h}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,'position');if(b=='static'||!b){a._madePositioned=true;a.style.position='relative';if(window.opera){a.style.top=0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=''}return a},makeClipping:function(a){a=$(a);if(a._overflow)return a;a._overflow=Element.getStyle(a,'overflow')||'auto';if(a._overflow!=='hidden')a.style.overflow='hidden';return a},undoClipping:function(a){a=$(a);if(!a._overflow)return a;a.style.overflow=a._overflow=='auto'?'':a._overflow;a._overflow=null;return a},cumulativeOffset:function(a){var b=0,valueL=0;do{b+=a.offsetTop||0;valueL+=a.offsetLeft||0;a=a.offsetParent}while(a);return Element._returnOffset(valueL,b)},positionedOffset:function(a){var b=0,valueL=0;do{b+=a.offsetTop||0;valueL+=a.offsetLeft||0;a=a.offsetParent;if(a){if(a.tagName=='BODY')break;var p=Element.getStyle(a,'position');if(p!=='static')break}}while(a);return Element._returnOffset(valueL,b)},absolutize:function(a){a=$(a);if(a.getStyle('position')=='absolute')return;var b=a.positionedOffset();var c=b[1];var d=b[0];var e=a.clientWidth;var f=a.clientHeight;a._originalLeft=d-parseFloat(a.style.left||0);a._originalTop=c-parseFloat(a.style.top||0);a._originalWidth=a.style.width;a._originalHeight=a.style.height;a.style.position='absolute';a.style.top=c+'px';a.style.left=d+'px';a.style.width=e+'px';a.style.height=f+'px';return a},relativize:function(a){a=$(a);if(a.getStyle('position')=='relative')return;a.style.position='relative';var b=parseFloat(a.style.top||0)-(a._originalTop||0);var c=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=b+'px';a.style.left=c+'px';a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a},cumulativeScrollOffset:function(a){var b=0,valueL=0;do{b+=a.scrollTop||0;valueL+=a.scrollLeft||0;a=a.parentNode}while(a);return Element._returnOffset(valueL,b)},getOffsetParent:function(a){if(a.offsetParent)return $(a.offsetParent);if(a==document.body)return $(a);while((a=a.parentNode)&&a!=document.body)if(Element.getStyle(a,'position')!='static')return $(a);return $(document.body)},viewportOffset:function(a){var b=0,valueL=0;var c=a;do{b+=c.offsetTop||0;valueL+=c.offsetLeft||0;if(c.offsetParent==document.body&&Element.getStyle(c,'position')=='absolute')break}while(c=c.offsetParent);c=a;do{if(!Prototype.Browser.Opera||c.tagName=='BODY'){b-=c.scrollTop||0;valueL-=c.scrollLeft||0}}while(c=c.parentNode);return Element._returnOffset(valueL,b)},clonePosition:function(a,b){var c=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});b=$(b);var p=b.viewportOffset();a=$(a);var d=[0,0];var e=null;if(Element.getStyle(a,'position')=='absolute'){e=a.getOffsetParent();d=e.viewportOffset()}if(e==document.body){d[0]-=document.body.offsetLeft;d[1]-=document.body.offsetTop}if(c.setLeft)a.style.left=(p[0]-d[0]+c.offsetLeft)+'px';if(c.setTop)a.style.top=(p[1]-d[1]+c.offsetTop)+'px';if(c.setWidth)a.style.width=b.offsetWidth+'px';if(c.setHeight)a.style.height=b.offsetHeight+'px';return a}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:'class',htmlFor:'for'},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(d,e,f){switch(f){case'left':case'top':case'right':case'bottom':if(d(e,'position')==='static')return null;case'height':case'width':if(!Element.visible(e))return null;var g=parseInt(d(e,f),10);if(g!==e['offset'+f.capitalize()])return g+'px';var h;if(f==='height'){h=['border-top-width','padding-top','padding-bottom','border-bottom-width']}else{h=['border-left-width','padding-left','padding-right','border-right-width']}return h.inject(g,function(a,b){var c=d(e,b);return c===null?a:a-parseInt(c,10)})+'px';default:return d(e,f)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(a,b,c){if(c==='title')return b.title;return a(b,c)})}else if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(a,b){b=$(b);var c=b.getStyle('position');if(c!=='static')return a(b);b.setStyle({position:'relative'});var d=a(b);b.setStyle({position:c});return d});$w('positionedOffset viewportOffset').each(function(f){Element.Methods[f]=Element.Methods[f].wrap(function(a,b){b=$(b);var c=b.getStyle('position');if(c!=='static')return a(b);var d=b.getOffsetParent();if(d&&d.getStyle('position')==='fixed')d.setStyle({zoom:1});b.setStyle({position:'relative'});var e=a(b);b.setStyle({position:c});return e})});Element.Methods.getStyle=function(a,b){a=$(a);b=(b=='float'||b=='cssFloat')?'styleFloat':b.camelize();var c=a.style[b];if(!c&&a.currentStyle)c=a.currentStyle[b];if(b=='opacity'){if(c=(a.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/))if(c[1])return parseFloat(c[1])/100;return 1.0}if(c=='auto'){if((b=='width'||b=='height')&&(a.getStyle('display')!='none'))return a['offset'+b.capitalize()]+'px';return null}return c};Element.Methods.setOpacity=function(b,c){function stripAlpha(a){return a.replace(/alpha\([^\)]*\)/gi,'')}b=$(b);var d=b.currentStyle;if((d&&!d.hasLayout)||(!d&&b.style.zoom=='normal'))b.style.zoom=1;var e=b.getStyle('filter'),style=b.style;if(c==1||c===''){(e=stripAlpha(e))?style.filter=e:style.removeAttribute('filter');return b}else if(c<0.00001)c=0;style.filter=stripAlpha(e)+'alpha(opacity='+(c*100)+')';return b};Element._attributeTranslations={read:{names:{'class':'className','for':'htmlFor'},values:{_getAttr:function(a,b){return a.getAttribute(b,2)},_getAttrNode:function(a,b){var c=a.getAttributeNode(b);return c?c.value:""},_getEv:function(a,b){b=a.getAttribute(b);return b?b.toString().slice(23,-2):null},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){return a.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:'cellPadding',cellspacing:'cellSpacing'},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=b?b:''}}};Element._attributeTranslations.has={};$w('colSpan rowSpan vAlign dateTime accessKey tabIndex '+'encType maxLength readOnly longDesc').each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a;Element._attributeTranslations.has[a.toLowerCase()]=a});(function(v){Object.extend(v,{href:v._getAttr,src:v._getAttr,type:v._getAttr,action:v._getAttrNode,disabled:v._flag,checked:v._flag,readonly:v._flag,multiple:v._flag,onload:v._getEv,onunload:v._getEv,onclick:v._getEv,ondblclick:v._getEv,onmousedown:v._getEv,onmouseup:v._getEv,onmouseover:v._getEv,onmousemove:v._getEv,onmouseout:v._getEv,onfocus:v._getEv,onblur:v._getEv,onkeypress:v._getEv,onkeydown:v._getEv,onkeyup:v._getEv,onsubmit:v._getEv,onreset:v._getEv,onselect:v._getEv,onchange:v._getEv})})(Element._attributeTranslations.read.values)}else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1)?0.999999:(b==='')?'':(b<0.00001)?0:b;return a}}else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1||b==='')?'':(b<0.00001)?0:b;if(b==1)if(a.tagName=='IMG'&&a.width){a.width++;a.width--}else try{var n=document.createTextNode(' ');a.appendChild(n);a.removeChild(n)}catch(e){}return a};Element.Methods.cumulativeOffset=function(a){var b=0,valueL=0;do{b+=a.offsetTop||0;valueL+=a.offsetLeft||0;if(a.offsetParent==document.body)if(Element.getStyle(a,'position')=='absolute')break;a=a.offsetParent}while(a);return Element._returnOffset(valueL,b)}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(b,c){b=$(b);if(c&&c.toElement)c=c.toElement();if(Object.isElement(c))return b.update().insert(c);c=Object.toHTML(c);var d=b.tagName.toUpperCase();if(d in Element._insertionTranslations.tags){$A(b.childNodes).each(function(a){b.removeChild(a)});Element._getContentFromAnonymousElement(d,c.stripScripts()).each(function(a){b.appendChild(a)})}else b.innerHTML=c.stripScripts();c.evalScripts.bind(c).defer();return b}}if('outerHTML'in document.createElement('div')){Element.Methods.replace=function(b,c){b=$(b);if(c&&c.toElement)c=c.toElement();if(Object.isElement(c)){b.parentNode.replaceChild(c,b);return b}c=Object.toHTML(c);var d=b.parentNode,tagName=d.tagName.toUpperCase();if(Element._insertionTranslations.tags[tagName]){var e=b.next();var f=Element._getContentFromAnonymousElement(tagName,c.stripScripts());d.removeChild(b);if(e)f.each(function(a){d.insertBefore(a,e)});else f.each(function(a){d.appendChild(a)})}else b.outerHTML=c.stripScripts();c.evalScripts.bind(c).defer();return b}}Element._returnOffset=function(l,t){var a=[l,t];a.left=l;a.top=t;return a};Element._getContentFromAnonymousElement=function(a,b){var c=new Element('div'),t=Element._insertionTranslations.tags[a];if(t){c.innerHTML=t[0]+b+t[1];t[2].times(function(){c=c.firstChild})}else c.innerHTML=b;return $A(c.childNodes)};Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(a,b){b=Element._attributeTranslations.has[b]||b;var c=$(a).getAttributeNode(b);return c&&c.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement('div').__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement('div').__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions)return Prototype.K;var c={},ByTag=Element.Methods.ByTag;var d=Object.extend(function(a){if(!a||a._extendedByPrototype||a.nodeType!=1||a==window)return a;var b=Object.clone(c),tagName=a.tagName,property,value;if(ByTag[tagName])Object.extend(b,ByTag[tagName]);for(property in b){value=b[property];if(Object.isFunction(value)&&!(property in a))a[property]=value.methodize()}a._extendedByPrototype=Prototype.emptyFunction;return a},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(c,Element.Methods);Object.extend(c,Element.Methods.Simulated)}}});d.refresh();return d})();Element.hasAttribute=function(a,b){if(a.hasAttribute)return a.hasAttribute(b);return Element.Methods.Simulated.hasAttribute(a,b)};Element.addMethods=function(f){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!f){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)})}if(arguments.length==2){var g=f;f=arguments[1]}if(!g)Object.extend(Element.Methods,f||{});else{if(Object.isArray(g))g.each(extend);else extend(g)}function extend(a){a=a.toUpperCase();if(!Element.Methods.ByTag[a])Element.Methods.ByTag[a]={};Object.extend(Element.Methods.ByTag[a],f)}function copy(a,b,c){c=c||false;for(var d in a){var e=a[d];if(!Object.isFunction(e))continue;if(!c||!(d in b))b[d]=e.methodize()}}function findDOMClass(a){var b;var c={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(c[a])b='HTML'+c[a]+'Element';if(window[b])return window[b];b='HTML'+a+'Element';if(window[b])return window[b];b='HTML'+a.capitalize()+'Element';if(window[b])return window[b];window[b]={};window[b].prototype=document.createElement(a).__proto__;return window[b]}if(F.ElementExtensions){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true)}if(F.SpecificElementExtensions){for(var h in Element.Methods.ByTag){var i=findDOMClass(h);if(Object.isUndefined(i))continue;copy(T[h],i.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={}};document.viewport={getDimensions:function(){var a={};var B=Prototype.Browser;$w('width height').each(function(d){var D=d.capitalize();a[d]=(B.WebKit&&!document.evaluate)?self['inner'+D]:(B.Opera)?document.body['client'+D]:document.documentElement['client'+D]});return a},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(a){this.expression=a.strip();this.compileMatcher()},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath)return false;var e=this.expression;if(Prototype.Browser.WebKit&&(e.include("-of-type")||e.include(":empty")))return false;if((/(\[[\w-]*?:|:checked)/).test(this.expression))return false;return true},compileMatcher:function(){if(this.shouldUseXPath())return this.compileXPathMatcher();var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],'');break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join('\n'));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var e=this.expression,ps=Selector.patterns,x=Selector.xpath,le,m;if(Selector._cache[e]){this.xpath=Selector._cache[e];return}this.matcher=['.//*'];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){if(m=e.match(ps[i])){this.matcher.push(Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m));e=e.replace(m[0],'');break}}}this.xpath=this.matcher.join('');Selector._cache[this.expression]=this.xpath},findElements:function(a){a=a||document;if(this.xpath)return document._getElementsByXPath(this.xpath,a);return this.matcher(a)},match:function(a){this.tokens=[];var e=this.expression,ps=Selector.patterns,as=Selector.assertions;var b,p,m;while(e&&b!==e&&(/\S/).test(e)){b=e;for(var i in ps){p=ps[i];if(m=e.match(p)){if(as[i]){this.tokens.push([i,Object.clone(m)]);e=e.replace(m[0],'')}else{return this.findElements(document).include(a)}}}}var c=true,name,matches;for(var i=0,token;token=this.tokens[i];i++){name=token[0],matches=token[1];if(!Selector.assertions[name](a,matches)){c=false;break}}return c},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:'/following-sibling::*',tagName:function(m){if(m[1]=='*')return'';return"[local-name()='"+m[1].toLowerCase()+"' or local-name()='"+m[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(m){m[1]=m[1].toLowerCase();return new Template("[@#{1}]").evaluate(m)},attr:function(m){m[1]=m[1].toLowerCase();m[3]=m[5]||m[6];return new Template(Selector.xpath.operators[m[2]]).evaluate(m)},pseudo:function(m){var h=Selector.xpath.pseudos[m[1]];if(!h)return'';if(Object.isFunction(h))return h(m);return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m)},operators:{'=':"[@#{1}='#{3}']",'!=':"[@#{1}!='#{3}']",'^=':"[starts-with(@#{1}, '#{3}')]",'$=':"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",'*=':"[contains(@#{1}, '#{3}')]",'~=':"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",'|=':"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{'first-child':'[not(preceding-sibling::*)]','last-child':'[not(following-sibling::*)]','only-child':'[not(preceding-sibling::* or following-sibling::*)]','empty':"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",'checked':"[@checked]",'disabled':"[@disabled]",'enabled':"[not(@disabled)]",'not':function(m){var e=m[6],p=Selector.patterns,x=Selector.xpath,le,v;var a=[];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in p){if(m=e.match(p[i])){v=Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m);a.push("("+v.substring(1,v.length-1)+")");e=e.replace(m[0],'');break}}}return"[not("+a.join(" and ")+")]"},'nth-child':function(m){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",m)},'nth-last-child':function(m){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",m)},'nth-of-type':function(m){return Selector.xpath.pseudos.nth("position() ",m)},'nth-last-of-type':function(m){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",m)},'first-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-of-type'](m)},'last-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-last-of-type'](m)},'only-of-type':function(m){var p=Selector.xpath.pseudos;return p['first-of-type'](m)+p['last-of-type'](m)},nth:function(c,m){var d,formula=m[6],predicate;if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';if(d=formula.match(/^(\d+)$/))return'['+c+"= "+d[1]+']';if(d=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(d[1]=="-")d[1]=-1;var a=d[1]?Number(d[1]):1;var b=d[2]?Number(d[2]):0;predicate="[((#{fragment} - #{b}) mod #{a} = 0) and "+"((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(predicate).evaluate({fragment:c,a:a,b:b})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(m){m[3]=(m[5]||m[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m)},pseudo:function(m){if(m[6])m[6]=m[6].replace(/"/g,'\\"');return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,b[1])},attr:function(a,b){var c=Element.readAttribute(a,b[1]);return c&&Selector.operators[b[2]](c,b[5]||b[6])}},handlers:{concat:function(a,b){for(var i=0,node;node=b[i];i++)a.push(node);return a},mark:function(a){var b=Prototype.emptyFunction;for(var i=0,node;node=a[i];i++)node._countedByPrototype=b;return a},unmark:function(a){for(var i=0,node;node=a[i];i++)node._countedByPrototype=undefined;return a},index:function(a,b,c){a._countedByPrototype=Prototype.emptyFunction;if(b){for(var d=a.childNodes,i=d.length-1,j=1;i>=0;i--){var e=d[i];if(e.nodeType==1&&(!c||e._countedByPrototype))e.nodeIndex=j++}}else{for(var i=0,j=1,d=a.childNodes;e=d[i];i++)if(e.nodeType==1&&(!c||e._countedByPrototype))e.nodeIndex=j++}},unique:function(a){if(a.length==0)return a;var b=[],n;for(var i=0,l=a.length;i<l;i++)if(!(n=a[i])._countedByPrototype){n._countedByPrototype=Prototype.emptyFunction;b.push(Element.extend(n))}return Selector.handlers.unmark(b)},descendant:function(a){var h=Selector.handlers;for(var i=0,results=[],node;node=a[i];i++)h.concat(results,node.getElementsByTagName('*'));return results},child:function(a){var h=Selector.handlers;for(var i=0,results=[],node;node=a[i];i++){for(var j=0,child;child=node.childNodes[j];j++)if(child.nodeType==1&&child.tagName!='!')results.push(child)}return results},adjacent:function(a){for(var i=0,results=[],node;node=a[i];i++){var b=this.nextElementSibling(node);if(b)results.push(b)}return results},laterSibling:function(a){var h=Selector.handlers;for(var i=0,results=[],node;node=a[i];i++)h.concat(results,Element.nextSiblings(node));return results},nextElementSibling:function(a){while(a=a.nextSibling)if(a.nodeType==1)return a;return null},previousElementSibling:function(a){while(a=a.previousSibling)if(a.nodeType==1)return a;return null},tagName:function(a,b,c,d){var e=c.toUpperCase();var f=[],h=Selector.handlers;if(a){if(d){if(d=="descendant"){for(var i=0,node;node=a[i];i++)h.concat(f,node.getElementsByTagName(c));return f}else a=this[d](a);if(c=="*")return a}for(var i=0,node;node=a[i];i++)if(node.tagName.toUpperCase()===e)f.push(node);return f}else return b.getElementsByTagName(c)},id:function(a,b,c,d){var e=$(c),h=Selector.handlers;if(!e)return[];if(!a&&b==document)return[e];if(a){if(d){if(d=='child'){for(var i=0,node;node=a[i];i++)if(e.parentNode==node)return[e]}else if(d=='descendant'){for(var i=0,node;node=a[i];i++)if(Element.descendantOf(e,node))return[e]}else if(d=='adjacent'){for(var i=0,node;node=a[i];i++)if(Selector.handlers.previousElementSibling(e)==node)return[e]}else a=h[d](a)}for(var i=0,node;node=a[i];i++)if(node==e)return[e];return[]}return(e&&Element.descendantOf(e,b))?[e]:[]},className:function(a,b,c,d){if(a&&d)a=this[d](a);return Selector.handlers.byClassName(a,b,c)},byClassName:function(a,b,c){if(!a)a=Selector.handlers.descendant([b]);var d=' '+c+' ';for(var i=0,results=[],node,nodeClassName;node=a[i];i++){nodeClassName=node.className;if(nodeClassName.length==0)continue;if(nodeClassName==c||(' '+nodeClassName+' ').include(d))results.push(node)}return results},attrPresence:function(a,b,c,d){if(!a)a=b.getElementsByTagName("*");if(a&&d)a=this[d](a);var e=[];for(var i=0,node;node=a[i];i++)if(Element.hasAttribute(node,c))e.push(node);return e},attr:function(a,b,c,d,e,f){if(!a)a=b.getElementsByTagName("*");if(a&&f)a=this[f](a);var g=Selector.operators[e],results=[];for(var i=0,node;node=a[i];i++){var h=Element.readAttribute(node,c);if(h===null)continue;if(g(h,d))results.push(node)}return results},pseudo:function(a,b,c,d,e){if(a&&e)a=this[e](a);if(!a)a=d.getElementsByTagName("*");return Selector.pseudos[b](a,c,d)}},pseudos:{'first-child':function(a,b,c){for(var i=0,results=[],node;node=a[i];i++){if(Selector.handlers.previousElementSibling(node))continue;results.push(node)}return results},'last-child':function(a,b,c){for(var i=0,results=[],node;node=a[i];i++){if(Selector.handlers.nextElementSibling(node))continue;results.push(node)}return results},'only-child':function(a,b,c){var h=Selector.handlers;for(var i=0,results=[],node;node=a[i];i++)if(!h.previousElementSibling(node)&&!h.nextElementSibling(node))results.push(node);return results},'nth-child':function(a,b,c){return Selector.pseudos.nth(a,b,c)},'nth-last-child':function(a,b,c){return Selector.pseudos.nth(a,b,c,true)},'nth-of-type':function(a,b,c){return Selector.pseudos.nth(a,b,c,false,true)},'nth-last-of-type':function(a,b,c){return Selector.pseudos.nth(a,b,c,true,true)},'first-of-type':function(a,b,c){return Selector.pseudos.nth(a,"1",c,false,true)},'last-of-type':function(a,b,c){return Selector.pseudos.nth(a,"1",c,true,true)},'only-of-type':function(a,b,c){var p=Selector.pseudos;return p['last-of-type'](p['first-of-type'](a,b,c),b,c)},getIndices:function(a,b,d){if(a==0)return b>0?[b]:[];return $R(1,d).inject([],function(c,i){if(0==(i-b)%a&&(i-b)/a>=0)c.push(i);return c})},nth:function(c,d,e,f,g){if(c.length==0)return[];if(d=='even')d='2n+0';if(d=='odd')d='2n+1';var h=Selector.handlers,results=[],indexed=[],m;h.mark(c);for(var i=0,node;node=c[i];i++){if(!node.parentNode._countedByPrototype){h.index(node.parentNode,f,g);indexed.push(node.parentNode)}}if(d.match(/^\d+$/)){d=Number(d);for(var i=0,node;node=c[i];i++)if(node.nodeIndex==d)results.push(node)}else if(m=d.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(m[1]=="-")m[1]=-1;var a=m[1]?Number(m[1]):1;var b=m[2]?Number(m[2]):0;var k=Selector.pseudos.getIndices(a,b,c.length);for(var i=0,node,l=k.length;node=c[i];i++){for(var j=0;j<l;j++)if(node.nodeIndex==k[j])results.push(node)}}h.unmark(c);h.unmark(indexed);return results},'empty':function(a,b,c){for(var i=0,results=[],node;node=a[i];i++){if(node.tagName=='!'||(node.firstChild&&!node.innerHTML.match(/^\s*$/)))continue;results.push(node)}return results},'not':function(a,b,c){var h=Selector.handlers,selectorType,m;var d=new Selector(b).findElements(c);h.mark(d);for(var i=0,results=[],node;node=a[i];i++)if(!node._countedByPrototype)results.push(node);h.unmark(d);return results},'enabled':function(a,b,c){for(var i=0,results=[],node;node=a[i];i++)if(!node.disabled)results.push(node);return results},'disabled':function(a,b,c){for(var i=0,results=[],node;node=a[i];i++)if(node.disabled)results.push(node);return results},'checked':function(a,b,c){for(var i=0,results=[],node;node=a[i];i++)if(node.checked)results.push(node);return results}},operators:{'=':function(a,v){return a==v},'!=':function(a,v){return a!=v},'^=':function(a,v){return a.startsWith(v)},'$=':function(a,v){return a.endsWith(v)},'*=':function(a,v){return a.include(v)},'~=':function(a,v){return(' '+a+' ').include(' '+v+' ')},'|=':function(a,v){return('-'+a.toUpperCase()+'-').include('-'+v.toUpperCase()+'-')}},split:function(a){var b=[];a.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(m){b.push(m[1].strip())});return b},matchElements:function(a,b){var c=$$(b),h=Selector.handlers;h.mark(c);for(var i=0,results=[],element;element=a[i];i++)if(element._countedByPrototype)results.push(element);h.unmark(c);return results},findElement:function(a,b,c){if(Object.isNumber(b)){c=b;b=false}return Selector.matchElements(a,b||'*')[c||0]},findChildElements:function(a,b){b=Selector.split(b.join(','));var c=[],h=Selector.handlers;for(var i=0,l=b.length,selector;i<l;i++){selector=new Selector(b[i].strip());h.concat(c,selector.findElements(a))}return(l>1)?h.unique(c):c}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(a,b){for(var i=0,node;node=b[i];i++)if(node.tagName!=="!")a.push(node);return a},unmark:function(a){for(var i=0,node;node=a[i];i++)node.removeAttribute('_countedByPrototype');return a}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(a){$(a).reset();return a},serializeElements:function(c,d){if(typeof d!='object')d={hash:!!d};else if(Object.isUndefined(d.hash))d.hash=true;var e,value,submitted=false,submit=d.submit;var f=c.inject({},function(a,b){if(!b.disabled&&b.name){e=b.name;value=$(b).getValue();if(value!=null&&(b.type!='submit'||(!submitted&&submit!==false&&(!submit||e==submit)&&(submitted=true)))){if(e in a){if(!Object.isArray(a[e]))a[e]=[a[e]];a[e].push(value)}else a[e]=value}}return a});return d.hash?f:Object.toQueryString(f)}};Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(c){return $A($(c).getElementsByTagName('*')).inject([],function(a,b){if(Form.Element.Serializers[b.tagName.toLowerCase()])a.push(Element.extend(b));return a})},getInputs:function(a,b,c){a=$(a);var d=a.getElementsByTagName('input');if(!b&&!c)return $A(d).map(Element.extend);for(var i=0,matchingInputs=[],length=d.length;i<length;i++){var e=d[i];if((b&&e.type!=b)||(c&&e.name!=c))continue;matchingInputs.push(Element.extend(e))}return matchingInputs},disable:function(a){a=$(a);Form.getElements(a).invoke('disable');return a},enable:function(a){a=$(a);Form.getElements(a).invoke('enable');return a},findFirstElement:function(b){var c=$(b).getElements().findAll(function(a){return'hidden'!=a.type&&!a.disabled});var d=c.findAll(function(a){return a.hasAttribute('tabIndex')&&a.tabIndex>=0}).sortBy(function(a){return a.tabIndex}).first();return d?d:c.find(function(a){return['input','select','textarea'].include(a.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},request:function(a,b){a=$(a),b=Object.clone(b||{});var c=b.parameters,action=a.readAttribute('action')||'';if(action.blank())action=window.location.href;b.parameters=a.serialize(true);if(c){if(Object.isString(c))c=c.toQueryParams();Object.extend(b.parameters,c)}if(a.hasAttribute('method')&&!b.method)b.method=a.method;return new Ajax.Request(action,b)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c)}}return''},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value='';return a},present:function(a){return $(a).value!=''},activate:function(a){a=$(a);try{a.focus();if(a.select&&(a.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(a.type)))a.select()}catch(e){}return a},disable:function(a){a=$(a);a.blur();a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(Object.isUndefined(b))return a.checked?a.value:null;else a.checked=!!b},textarea:function(a,b){if(Object.isUndefined(b))return a.value;else a.value=b},select:function(a,b){if(Object.isUndefined(b))return this[a.type=='select-one'?'selectOne':'selectMany'](a);else{var c,value,single=!Object.isArray(b);for(var i=0,length=a.length;i<length;i++){c=a.options[i];value=this.optionValue(c);if(single){if(value==b){c.selected=true;return}}else c.selected=b.include(value)}}},selectOne:function(a){var b=a.selectedIndex;return b>=0?this.optionValue(a.options[b]):null},selectMany:function(a){var b,length=a.length;if(!length)return null;for(var i=0,b=[];i<length;i++){var c=a.options[i];if(c.selected)b.push(this.optionValue(c))}return b},optionValue:function(a){return Element.extend(a).hasAttribute('value')?a.value:a.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,b,c,d){$super(d,c);this.element=$(b);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')this.registerFormCallbacks();else this.registerCallback(this.element)},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case'checkbox':case'radio':Event.observe(a,'click',this.onElementEvent.bind(this));break;default:Event.observe(a,'change',this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event)var Event={};Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(a){var b;switch(a.type){case'mouseover':b=a.fromElement;break;case'mouseout':b=a.toElement;break;default:return null}return Element.extend(b)}});Event.Methods=(function(){var e;if(Prototype.Browser.IE){var f={0:1,1:4,2:2};e=function(a,b){return a.button==f[b]}}else if(Prototype.Browser.WebKit){e=function(a,b){switch(b){case 0:return a.which==1&&!a.metaKey;case 1:return a.which==1&&a.metaKey;default:return false}}}else{e=function(a,b){return a.which?(a.which===b+1):(a.button===b)}}return{isLeftClick:function(a){return e(a,0)},isMiddleClick:function(a){return e(a,1)},isRightClick:function(a){return e(a,2)},element:function(a){var b=Event.extend(a).target;return Element.extend(b.nodeType==Node.TEXT_NODE?b.parentNode:b)},findElement:function(a,b){var c=Event.element(a);if(!b)return c;var d=[c].concat(c.ancestors());return Selector.findElement(d,b,0)},pointer:function(a){return{x:a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),y:a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}},pointerX:function(a){return Event.pointer(a).x},pointerY:function(a){return Event.pointer(a).y},stop:function(a){Event.extend(a);a.preventDefault();a.stopPropagation();a.stopped=true}}})();Event.extend=(function(){var c=Object.keys(Event.Methods).inject({},function(m,a){m[a]=Event.Methods[a].methodize();return m});if(Prototype.Browser.IE){Object.extend(c,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(a){if(!a)return false;if(a._extendedByPrototype)return a;a._extendedByPrototype=Prototype.emptyFunction;var b=Event.pointer(a);Object.extend(a,{target:a.srcElement,relatedTarget:Event.relatedTarget(a),pageX:b.x,pageY:b.y});return Object.extend(a,c)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(Event.prototype,c);return Prototype.K}})();Object.extend(Event,(function(){var h=Event.cache;function getEventID(a){if(a._prototypeEventID)return a._prototypeEventID[0];arguments.callee.id=arguments.callee.id||1;return a._prototypeEventID=[++arguments.callee.id]}function getDOMEventName(a){if(a&&a.include(':'))return"dataavailable";return a}function getCacheForID(a){return h[a]=h[a]||{}}function getWrappersForEventName(a,b){var c=getCacheForID(a);return c[b]=c[b]||[]}function createWrapper(b,d,e){var f=getEventID(b);var c=getWrappersForEventName(f,d);if(c.pluck("handler").include(e))return false;var g=function(a){if(!Event||!Event.extend||(a.eventName&&a.eventName!=d))return false;Event.extend(a);e.call(b,a)};g.handler=e;c.push(g);return g}function findWrapper(b,d,e){var c=getWrappersForEventName(b,d);return c.find(function(a){return a.handler==e})}function destroyWrapper(a,b,d){var c=getCacheForID(a);if(!c[b])return false;c[b]=c[b].without(findWrapper(a,b,d))}function destroyCache(){for(var a in h)for(var b in h[a])h[a][b]=null}if(window.attachEvent){window.attachEvent("onunload",destroyCache)}return{observe:function(a,b,c){a=$(a);var d=getDOMEventName(b);var e=createWrapper(a,b,c);if(!e)return a;if(a.addEventListener){a.addEventListener(d,e,false)}else{a.attachEvent("on"+d,e)}return a},stopObserving:function(b,c,d){b=$(b);var e=getEventID(b),name=getDOMEventName(c);if(!d&&c){getWrappersForEventName(e,c).each(function(a){b.stopObserving(c,a.handler)});return b}else if(!c){Object.keys(getCacheForID(e)).each(function(a){b.stopObserving(a)});return b}var f=findWrapper(e,c,d);if(!f)return b;if(b.removeEventListener){b.removeEventListener(name,f,false)}else{b.detachEvent("on"+name,f)}destroyWrapper(e,c,d);return b},fire:function(a,b,c){a=$(a);if(a==document&&document.createEvent&&!a.dispatchEvent)a=document.documentElement;var d;if(document.createEvent){d=document.createEvent("HTMLEvents");d.initEvent("dataavailable",true,true)}else{d=document.createEventObject();d.eventType="ondataavailable"}d.eventName=b;d.memo=c||{};if(document.createEvent){a.dispatchEvent(d)}else{a.fireEvent(d.eventType,d)}return Event.extend(d)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var a;function fireContentLoadedEvent(){if(document.loaded)return;if(a)window.clearInterval(a);document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){a=window.setInterval(function(){if(/loaded|complete/.test(document.readyState))fireContentLoadedEvent()},0);Event.observe(window,"load",fireContentLoadedEvent)}else{document.addEventListener("DOMContentLoaded",fireContentLoadedEvent,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;fireContentLoadedEvent()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(a,x,y){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(a,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(a);return(y>=this.offset[1]&&y<this.offset[1]+a.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+a.offsetWidth)},withinIncludingScrolloffsets:function(a,x,y){var b=Element.cumulativeScrollOffset(a);this.xcomp=x+b[0]-this.deltaX;this.ycomp=y+b[1]-this.deltaY;this.offset=Element.cumulativeOffset(a);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth)},overlap:function(a,b){if(!a)return 0;if(a=='vertical')return((this.offset[1]+b.offsetHeight)-this.ycomp)/b.offsetHeight;if(a=='horizontal')return((this.offset[0]+b.offsetWidth)-this.xcomp)/b.offsetWidth},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},relativize:function(a){Position.prepare();return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(a,b,c){c=c||{};return Element.clonePosition(b,a,c)}};if(!document.getElementsByClassName)document.getElementsByClassName=function(f){function iter(a){return a.blank()?null:"[contains(concat(' ', @class, ' '), ' "+a+" ')]"}f.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(a,b){b=b.toString().strip();var c=/\s/.test(b)?$w(b).map(iter).join(''):iter(b);return c?document._getElementsByXPath('.//*'+c,a):[]}:function(b,c){c=c.toString().strip();var d=[],classNames=(/\s/.test(c)?$w(c):null);if(!classNames&&!c)return d;var e=$(b).getElementsByTagName('*');c=' '+c+' ';for(var i=0,child,cn;child=e[i];i++){if(child.className&&(cn=' '+child.className+' ')&&(cn.include(c)||(classNames&&classNames.all(function(a){return!a.toString().blank()&&cn.include(' '+a+' ')}))))d.push(Element.extend(child))}return d};return function(a,b){return $(b||document.body).getElementsByClassName(a)}}(Element.Methods);Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(b){this.element.className.split(/\s+/).select(function(a){return a.length>0})._each(b)},set:function(a){this.element.className=a},add:function(a){if(this.include(a))return;this.set($A(this).concat(a).join(' '))},remove:function(a){if(!this.include(a))return;this.set($A(this).without(a).join(' '))},toString:function(){return $A(this).join(' ')}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('D 56={9D:\'1.8.1\',9E:t(a){18.d6(\'<4b 6b="7F/9F" 3i="\'+a+\'"><\\/4b>\')},7G:\'1.6.0\',7H:t(){t 7I(a){D r=a.6c(\'.\');G 28(r[0])*d7+28(r[1])*2u+28(r[2])}C((29 1n==\'3F\')||(29 V==\'3F\')||(29 V.57==\'3F\')||(7I(1n.9D)<7I(56.7G)))2S("4b.7J.7K 7L 9G 1n d8 d9 >= "+56.7G);D d=/(da|db)dc[a-9H-9.3j-]*\\.4c(\\?.*)?$/;$A(18.6d("4b")).9I(t(s){G(s.3i&&s.3i.2F(d))}).1d(t(s){D b=s.3i.3G(d,\'\');D c=(s.3i.2F(/\\?.*7H=([a-z,]*)/)||[,\'\'])[1];c.6c(\',\').dd(\'\').1d(t(a){56.9E(b+a+\'.4c\')})})}};D 3H={9J:{9K:\'1I\',9L:\'2T\',9M:\'2T\',9N:\'2T\',9O:\'de\',9P:\'2U\',7M:\'2U\',9Q:\'4d\',9R:\'2T\',9S:\'2T\',9T:\'2T\',9U:\'2T\',9V:\'2T\',9W:\'2T\'},7N:t(a){a=a.2V();D b=q.9J[a]||\'4e\';D c=18.21(b);7O{c.2W="<"+a+"></"+a+">"}7P(e){}D d=c.58||17;C(d&&(d.2X.2V()!=a))d=d.6d(a)[0];C(!d)d=18.21(a);C(!d)G;C(12[1])C(q.6e(12[1])||(12[1]df 9X)||12[1].2X){q.7Q(d,12[1])}13{D f=q.9Y(12[1]);C(f.14){7O{c.2W="<"+a+" "+f+"></"+a+">"}7P(e){}d=c.58||17;C(!d){d=18.21(a);1U(6f 3I 12[1])d[6f==\'9Z\'?\'4f\':6f]=12[1][6f]}C(d.2X.2V()!=a)d=c.6d(a)[0]}}C(12[2])q.7Q(d,12[2]);G d},4g:t(a){G 18.59(a)},7R:{\'4f\':\'9Z\',\'dg\':\'1U\'},9Y:t(a){D b=[];1U(5a 3I a)b.1x((5a 3I q.7R?q.7R[5a]:5a)+\'="\'+a[5a].dh().di().dj(/"/,\'&dk;\')+\'"\');G b.4h(" ")},7Q:t(a,b){C(b.2X){a.1L(b);G}C(29 b==\'4d\'){b.2v().1d(t(e){C(29 e==\'4d\')a.1L(e);13 C(3H.6e(e))a.1L(3H.4g(e))})}13 C(3H.6e(b))a.1L(3H.4g(b))},6e:t(a){G(29 a==\'a0\'||29 a==\'dl\')},dm:t(a){D b=q.7N(\'4e\');$(b).1e(a.5b());G b.22()},dn:t(b){C(29 b!=\'4d\'&&29 b!=\'t\')b=1M;D c=("A dp dq dr ds 9K B dt du dv dw dx a1 "+"dy a2 9L dz dA dB 9M 9N dC dD dE dF a3 dG dH dI dJ "+"dK dL dM dN dO dP dQ dR dS dT dU dV dW I dX dY a4 dZ e0 "+"e1 e2 9O 7S e3 e4 e5 e6 e7 e8 e9 ea 9P 7M P "+"9Q eb Q S ec ed a5 ee ef eg eh ei ej ek el 9R 9S "+"a6 9T 9U 9V en 9W eo U ep eq").6c(/\\s+/);c.1d(t(a){b[a]=t(){G 3H.7N.er(3H,[a].7T($A(12)))}})}};4i.4j.3k=t(){D a=\'#\';C(q.3J(0,4)==\'es(\'){D b=q.3J(4,q.14-1).6c(\',\');D i=0;do{a+=28(b[i]).5c()}4k(++i<3)}13{C(q.3J(0,1)==\'#\'){C(q.14==4)1U(D i=1;i<4;i++)a+=(q.6g(i)+q.6g(i)).3l();C(q.14==7)a=q.3l()}}G(a.14==7?a:(12[0]||q))};V.6h=t(b){G $A($(b).2Y).7U(t(a){G(a.7V==3?a.7W:(a.7X()?V.6h(a):\'\'))}).2v().4h(\'\')};V.6i=t(b,c){G $A($(b).2Y).7U(t(a){G(a.7V==3?a.7W:((a.7X()&&!V.et(a,c))?V.6i(a,c):\'\'))}).2v().4h(\'\')};V.a7=t(a,b){a=$(a);a.1j({3K:(b/2w)+\'em\'});C(1n.2i.5d)1M.7Y(0,0);G a};V.2Z=t(a){G $(a).O.1S||\'\'};V.7Z=t(a){7O{a=$(a);D n=18.59(\' \');a.1L(n);a.a8(n)}7P(e){}};D J={4l:{3m:\'eu\',ev:\'ew ey ez E eA eB eC, eD eE eF 1U q 5e 1V eG\'},2j:{a9:1n.K,3L:t(a){G(-1B.6j(a*1B.6k)/2)+0.5},eH:t(a){G 1-a},aa:t(a){D a=((-1B.6j(a*1B.6k)/4)+0.75)+1B.eI()/4;G a>1?1:a},eJ:t(a){G(-1B.6j(a*1B.6k*(9*a))/2)+0.5},ab:t(a,b){b=b||5;G(((a%(1/b))*b).23()==0?((a*b*2)-(a*b*2).ac()):1-((a*b*2)-(a*b*2).ac()))},eK:t(a){G 1-(1B.6j(a*4.5*1B.6k)*1B.eL(-a*6))},3n:t(a){G 0},ad:t(a){G 1}},3M:{1t:1.0,ae:2w,24:M,25:0.0,1V:1.0,2a:0.0,2b:\'eM\'},eN:t(c){D d=\'1C:af\';C(1n.2i.4m)d+=\';80:1\';c=$(c);$A(c.2Y).1d(t(b){C(b.7V==3){b.7W.eO().1d(t(a){c.4n(X V(\'eP\',{O:d}).1e(a==\' \'?4i.eQ(eR):a),b)});V.3o(b)}})},eS:t(c,d){D e;C(((29 c==\'4d\')||N.4o(c))&&(c.14))e=c;13 e=$(c).2Y;D f=N.11({ag:0.1,2a:0.0},12[2]||{});D g=f.2a;$A(e).1d(t(a,b){X d(a,N.11(f,{2a:b*f.ag+g}))})},81:{\'eT\':[\'ah\',\'ai\'],\'eU\':[\'aj\',\'ak\'],\'82\':[\'6l\',\'83\']},eV:t(a,b){a=$(a);b=(b||\'82\').3l();D c=N.11({2b:{1C:\'2x\',5f:(a.19||\'5g\'),84:1}},12[2]||{});J[a.eW()?J.81[b][1]:J.81[b][0]](a,c)}};J.3M.2c=J.2j.3L;J.al=1D.1y(eX,{1G:t(){q.1m=[];q.5h=17},am:t(a){q.1m.am(a)},4p:t(a){D b=X 6m().ao();D c=N.3p(a.u.2b)?a.u.2b:a.u.2b.1C;6n(c){1E\'eY\':q.1m.9I(t(e){G e.4q==\'85\'}).1d(t(e){e.3q+=a.3r;e.3r+=a.3r});1N;1E\'5i-ap\':b=q.1m.aq(\'3q\').30()||b;1N;1E\'2x\':b=q.1m.aq(\'3r\').30()||b;1N}a.3q+=b;a.3r+=b;C(!a.u.2b.84||(q.1m.14<a.u.2b.84))q.1m.1x(a);C(!q.5h)q.5h=ar(q.4r.1g(q),15)},3o:t(a){q.1m=q.1m.4s(t(e){G e==a});C(q.1m.14==0){as(q.5h);q.5h=17}},4r:t(){D a=X 6m().ao();1U(D i=0,at=q.1m.14;i<at;i++)q.1m[i]&&q.1m[i].4r(a)}});J.6o={86:$H(),2k:t(a){C(!N.3p(a))G a;G q.86.2k(a)||q.86.6p(a,X J.al())}};J.eZ=J.6o.2k(\'5g\');J.2d=1D.1y({1C:17,1u:t(c){t 5j(a,b){G((a[b+\'6q\']?\'q.u.\'+b+\'6q(q);\':\'\')+(a[b]?\'q.u.\'+b+\'(q);\':\'\'))}C(c&&c.2c===M)c.2c=J.2j.a9;q.u=N.11(N.11({},J.3M),c||{});q.87=0;q.4q=\'85\';q.3q=q.u.2a*2u;q.3r=q.3q+(q.u.1t*2u);q.au=q.u.1V-q.u.25;q.av=q.3r-q.3q;q.aw=q.u.ae*q.u.1t;ax(\'q.2G = t(5k){ \'+\'C (q.4q=="85"){q.4q="ay";\'+5j(q.u,\'3N\')+(q.4t?\'q.4t();\':\'\')+5j(q.u,\'6r\')+\'};C (q.4q=="ay"){\'+\'5k=q.u.2c(5k)*\'+q.au+\'+\'+q.u.25+\';\'+\'q.1C=5k;\'+5j(q.u,\'f0\')+(q.1e?\'q.1e(5k);\':\'\')+5j(q.u,\'f1\')+\'}}\');q.2H(\'f2\');C(!q.u.24)J.6o.2k(N.3p(q.u.2b)?\'5g\':q.u.2b.5f).4p(q)},4r:t(a){C(a>=q.3q){C(a>=q.3r){q.2G(1.0);q.31();q.2H(\'az\');C(q.3O)q.3O();q.2H(\'88\');G}D b=(a-q.3q)/q.av,89=(b*q.aw).23();C(89>q.87){q.2G(b);q.87=89}}},31:t(){C(!q.u.24)J.6o.2k(N.3p(q.u.2b)?\'5g\':q.u.2b.5f).3o(q);q.4q=\'f3\'},2H:t(a){C(q.u[a+\'6q\'])q.u[a+\'6q\'](q);C(q.u[a])q.u[a](q)},5l:t(){D a=$H();1U(6s 3I q)C(!N.4o(q[6s]))a.6p(6s,q[6s]);G\'#<J:\'+a.5l()+\',u:\'+$H(q.u).5l()+\'>\'}});J.4u=1D.1y(J.2d,{1G:t(a){q.1m=a||[];q.1u(12[1])},1e:t(a){q.1m.aA(\'2G\',a)},3O:t(b){q.1m.1d(t(a){a.2G(1.0);a.31();a.2H(\'az\');C(a.3O)a.3O(b);a.2H(\'88\')})}});J.aB=1D.1y(J.2d,{1G:t(b,c,d){b=N.3p(b)?$(b):b;D e=$A(12),2l=e.ap(),u=e.14==5?e[3]:17;q.2l=N.4o(2l)?2l.1g(b):N.4o(b[2l])?b[2l].1g(b):t(a){b[2l]=a};q.1u(N.11({25:c,1V:d},u||{}))},1e:t(a){q.2l(a)}});J.Z=1D.1y(J.2d,{1G:t(){q.1u(N.11({1t:0},12[0]||{}))},1e:1n.3P});J.2I=1D.1y(J.2d,{1G:t(a){q.E=$(a);C(!q.E)2S(J.4l);C(1n.2i.4m&&(!q.E.8a.aC))q.E.1j({80:1});D b=N.11({25:q.E.5m()||0.0,1V:1.0},12[1]||{});q.1u(b)},1e:t(a){q.E.aD(a)}});J.2e=1D.1y(J.2d,{1G:t(a){q.E=$(a);C(!q.E)2S(J.4l);D b=N.11({x:0,y:0,aE:\'af\'},12[1]||{});q.1u(b)},4t:t(){q.E.2m();q.5n=32(q.E.1o(\'1h\')||\'0\');q.5o=32(q.E.1o(\'1c\')||\'0\');C(q.u.aE==\'3s\'){q.u.x=q.u.x-q.5n;q.u.y=q.u.y-q.5o}},1e:t(a){q.E.1j({1h:(q.u.x*a+q.5n).23()+\'1v\',1c:(q.u.y*a+q.5o).23()+\'1v\'})}});J.f4=t(a,b,c){G X J.2e(a,N.11({x:c,y:b},12[3]||{}))};J.2n=1D.1y(J.2d,{1G:t(a,b){q.E=$(a);C(!q.E)2S(J.4l);D c=N.11({2J:Y,5p:Y,2K:Y,6t:M,2L:\'8b\',3Q:2w.0,aF:b},12[2]||{});q.1u(c)},4t:t(){q.2o=q.u.2o||M;q.aG=q.E.1o(\'1C\');q.8c={};[\'1c\',\'1h\',\'1k\',\'1f\',\'3K\'].1d(t(k){q.8c[k]=q.E.O[k]}.1g(q));q.5o=q.E.aH;q.5n=q.E.f5;D b=q.E.1o(\'f6-5q\')||\'2w%\';[\'em\',\'1v\',\'%\',\'aI\'].1d(t(a){C(b.2y(a)>0){q.3K=32(b);q.aJ=a}}.1g(q));q.aK=(q.u.aF-q.u.3Q)/2w;q.2z=17;C(q.u.2L==\'8b\')q.2z=[q.E.3t,q.E.3R];C(/^f7/.5r(q.u.2L))q.2z=[q.E.f8,q.E.f9];C(!q.2z)q.2z=[q.u.2L.5s,q.u.2L.5t]},1e:t(a){D b=(q.u.3Q/2w.0)+(q.aK*a);C(q.u.2K&&q.3K)q.E.1j({3K:q.3K*b+q.aJ});q.aL(q.2z[0]*b,q.2z[1]*b)},3O:t(a){C(q.2o)q.E.1j(q.8c)},aL:t(a,b){D d={};C(q.u.2J)d.1k=b.23()+\'1v\';C(q.u.5p)d.1f=a.23()+\'1v\';C(q.u.6t){D c=(a-q.2z[0])/2;D e=(b-q.2z[1])/2;C(q.aG==\'3s\'){C(q.u.5p)d.1c=q.5o-c+\'1v\';C(q.u.2J)d.1h=q.5n-e+\'1v\'}13{C(q.u.5p)d.1c=-c+\'1v\';C(q.u.2J)d.1h=-e+\'1v\'}}q.E.1j(d)}});J.6u=1D.1y(J.2d,{1G:t(a){q.E=$(a);C(!q.E)2S(J.4l);D b=N.11({6v:\'#aM\'},12[1]||{});q.1u(b)},4t:t(){C(q.E.1o(\'5u\')==\'3n\'){q.31();G}q.8d={};C(!q.u.8e){q.8d.aN=q.E.1o(\'6w-fa\');q.E.1j({aN:\'3n\'})}C(!q.u.6x)q.u.6x=q.E.1o(\'6w-34\').3k(\'#8f\');C(!q.u.6y)q.u.6y=q.E.1o(\'6w-34\');q.8g=$R(0,2).1I(t(i){G 28(q.u.6v.3J(i*2+1,i*2+3),16)}.1g(q));q.aO=$R(0,2).1I(t(i){G 28(q.u.6x.3J(i*2+1,i*2+3),16)-q.8g[i]}.1g(q))},1e:t(a){q.E.1j({4v:$R(0,2).8h(\'#\',t(m,v,i){G m+((q.8g[i]+(q.aO[i]*a)).23().5c())}.1g(q))})},3O:t(){q.E.1j(N.11(q.8d,{4v:q.u.6y}))}});J.fb=t(a){D b=12[1]||{},8i=18.8j.aP(),6z=$(a).3u(),30=18.8j.aP[0]-18.8j.fc();C(b.5v)6z[1]+=b.5v;G X J.aB(17,8i.1c,6z[1]>30?30:6z[1],b,t(p){8k(8i.1h,p.23())})};J.83=t(b){b=$(b);D c=b.2Z();D d=N.11({25:b.5m()||1.0,1V:0.0,1q:t(a){C(a.u.1V!=0)G;a.E.1r().1j({1S:c})}},12[1]||{});G X J.2I(b,d)};J.6l=t(b){b=$(b);D c=N.11({25:(b.1o(\'5u\')==\'3n\'?0.0:b.5m()||0.0),1V:1.0,1q:t(a){a.E.7Z()},3N:t(a){a.E.aD(a.u.25).1O()}},12[1]||{});G X J.2I(b,c)};J.fd=t(b){b=$(b);D c={1S:b.2Z(),1C:b.1o(\'1C\'),1c:b.O.1c,1h:b.O.1h,1k:b.O.1k,1f:b.O.1f};G X J.4u([X J.2n(b,fe,{24:Y,6t:Y,2K:Y,2o:Y}),X J.2I(b,{24:Y,1V:0.0})],N.11({1t:1.0,ff:t(a){1p.aQ(a.1m[0].E)},1q:t(a){a.1m[0].E.1r().1j(c)}},12[1]||{}))};J.ak=t(b){b=$(b);b.35();G X J.2n(b,0,N.11({2K:M,2J:M,2o:Y,1q:t(a){a.E.1r().36()}},12[1]||{}))};J.aj=t(b){b=$(b);D c=b.5w();G X J.2n(b,2w,N.11({2K:M,2J:M,3Q:0,2L:{5s:c.1f,5t:c.1k},2o:Y,6r:t(a){a.E.35().1j({1f:\'8l\'}).1O()},1q:t(a){a.E.36()}},12[1]||{}))};J.fg=t(c){c=$(c);D d=c.2Z();G X J.6l(c,N.11({1t:0.4,25:0,2c:J.2j.aa,1q:t(b){X J.2n(b.E,1,{1t:0.3,6t:Y,2J:M,2K:M,2o:Y,3N:t(a){a.E.2m().35()},1q:t(a){a.E.1r().36().37().1j({1S:d})}})}},12[1]||{}))};J.fh=t(b){b=$(b);D c={1c:b.1o(\'1c\'),1h:b.1o(\'1h\'),1S:b.2Z()};G X J.4u([X J.2e(b,{x:0,y:2w,24:Y}),X J.2I(b,{24:Y,1V:0.0})],N.11({1t:0.5,3N:t(a){a.1m[0].E.2m()},1q:t(a){a.1m[0].E.1r().37().1j(c)}},12[1]||{}))};J.fi=t(g){g=$(g);D h=N.11({aR:20,1t:0.5},12[1]||{});D i=32(h.aR);D j=32(h.1t)/10.0;D k={1c:g.1o(\'1c\'),1h:g.1o(\'1h\')};G X J.2e(g,{x:i,y:0,1t:j,1q:t(f){X J.2e(f.E,{x:-i*2,y:0,1t:j*2,1q:t(e){X J.2e(e.E,{x:i*2,y:0,1t:j*2,1q:t(d){X J.2e(d.E,{x:-i*2,y:0,1t:j*2,1q:t(c){X J.2e(c.E,{x:i*2,y:0,1t:j*2,1q:t(b){X J.2e(b.E,{x:-i,y:0,1t:j,1q:t(a){a.E.37().1j(k)}})}})}})}})}})}})};J.ah=t(b){b=$(b).5x();D c=b.22().1o(\'2A\');D d=b.5w();G X J.2n(b,2w,N.11({2K:M,2J:M,3Q:1M.3S?0:1,2L:{5s:d.1f,5t:d.1k},2o:Y,6r:t(a){a.E.2m();a.E.22().2m();C(1M.3S)a.E.1j({1c:\'\'});a.E.35().1j({1f:\'8l\'}).1O()},aS:t(a){a.E.22().1j({2A:(a.2z[0]-a.E.6A)+\'1v\'})},1q:t(a){a.E.36().37();a.E.22().37().1j({2A:c})}},12[1]||{}))};J.ai=t(b){b=$(b).5x();D c=b.22().1o(\'2A\');D d=b.5w();G X J.2n(b,1M.3S?0:1,N.11({2K:M,2J:M,2L:\'8b\',3Q:2w,2L:{5s:d.1f,5t:d.1k},2o:Y,6r:t(a){a.E.2m();a.E.22().2m();C(1M.3S)a.E.1j({1c:\'\'});a.E.35().1O()},aS:t(a){a.E.22().1j({2A:(a.2z[0]-a.E.6A)+\'1v\'})},1q:t(a){a.E.1r().36().37();a.E.22().37().1j({2A:c})}},12[1]||{}))};J.fj=t(b){G X J.2n(b,1M.3S?1:0,{2o:Y,3N:t(a){a.E.35()},1q:t(a){a.E.1r().36()}})};J.fk=t(c){c=$(c);D d=N.11({6B:\'6C\',6D:J.2j.3L,6E:J.2j.3L,6F:J.2j.ad},12[1]||{});D e={1c:c.O.1c,1h:c.O.1h,1f:c.O.1f,1k:c.O.1k,1S:c.2Z()};D f=c.5w();D g,3T;D h,26;6n(d.6B){1E\'1c-1h\':g=3T=h=26=0;1N;1E\'1c-5y\':g=f.1k;3T=26=0;h=-f.1k;1N;1E\'2A-1h\':g=h=0;3T=f.1f;26=-f.1f;1N;1E\'2A-5y\':g=f.1k;3T=f.1f;h=-f.1k;26=-f.1f;1N;1E\'6C\':g=f.1k/2;3T=f.1f/2;h=-f.1k/2;26=-f.1f/2;1N}G X J.2e(c,{x:g,y:3T,1t:0.fl,3N:t(a){a.E.1r().35().2m()},1q:t(b){X J.4u([X J.2I(b.E,{24:Y,1V:1.0,25:0.0,2c:d.6F}),X J.2e(b.E,{x:h,y:26,24:Y,2c:d.6D}),X J.2n(b.E,2w,{2L:{5s:f.1f,5t:f.1k},24:Y,3Q:1M.3S?1:0,2c:d.6E,2o:Y})],N.11({3N:t(a){a.1m[0].E.1j({1f:\'8l\'}).1O()},1q:t(a){a.1m[0].E.36().37().1j(e)}},d))}})};J.fm=t(b){b=$(b);D c=N.11({6B:\'6C\',6D:J.2j.3L,6E:J.2j.3L,6F:J.2j.3n},12[1]||{});D d={1c:b.O.1c,1h:b.O.1h,1f:b.O.1f,1k:b.O.1k,1S:b.2Z()};D e=b.5w();D f,26;6n(c.6B){1E\'1c-1h\':f=26=0;1N;1E\'1c-5y\':f=e.1k;26=0;1N;1E\'2A-1h\':f=0;26=e.1f;1N;1E\'2A-5y\':f=e.1k;26=e.1f;1N;1E\'6C\':f=e.1k/2;26=e.1f/2;1N}G X J.4u([X J.2I(b,{24:Y,1V:0.0,25:1.0,2c:c.6F}),X J.2n(b,1M.3S?1:0,{24:Y,2c:c.6E,2o:Y}),X J.2e(b,{x:f,y:26,24:Y,2c:c.6D})],N.11({fn:t(a){a.1m[0].E.2m().35()},1q:t(a){a.1m[0].E.1r().36().37().1j(d)}},c))};J.fo=t(b){b=$(b);D c=12[1]||{};D d=b.2Z();D e=c.2c||J.2j.3L;D f=t(a){G e(1-J.2j.ab(a,c.fp))};f.1g(e);G X J.2I(b,N.11(N.11({1t:2.0,25:0,1q:t(a){a.E.1j({1S:d})}},c),{2c:f}))};J.fq=t(c){c=$(c);D d={1c:c.O.1c,1h:c.O.1h,1k:c.O.1k,1f:c.O.1f};c.35();G X J.2n(c,5,N.11({2K:M,2J:M,1q:t(b){X J.2n(c,1,{2K:M,5p:M,1q:t(a){a.E.1r().36().1j(d)}})}},12[1]||{}))};J.8m=1D.1y(J.2d,{1G:t(c){q.E=$(c);C(!q.E)2S(J.4l);D d=N.11({O:{}},12[1]||{});C(!N.3p(d.O))q.O=$H(d.O);13{C(d.O.4w(\':\'))q.O=d.O.aT();13{q.E.2B(d.O);q.O=$H(q.E.5z());q.E.3v(d.O);D e=q.E.5z();q.O=q.O.4s(t(a){G a.1a==e[a.4x]});d.1q=t(b){b.E.2B(b.u.O);b.6G.1d(t(a){b.E.O[a.O]=\'\'})}}}q.1u(d)},4t:t(){t 3k(a){C(!a||[\'fr(0, 0, 0, 0)\',\'aU\'].4w(a))a=\'#8f\';a=a.3k();G $R(0,2).1I(t(i){G 28(a.3J(i*2+1,i*2+3),16)})}q.6G=q.O.1I(t(a){D b=a[0],1a=a[1],2C=17;C(1a.3k(\'#aV\')!=\'#aV\'){1a=1a.3k();2C=\'34\'}13 C(b==\'1S\'){1a=32(1a);C(1n.2i.4m&&(!q.E.8a.aC))q.E.1j({80:1})}13 C(V.aW.5r(1a)){D c=1a.2F(/^([\\+\\-]?[0-9\\.]+)(.*)$/);1a=32(c[1]);2C=(c.14==3)?c[2]:17}D d=q.E.1o(b);G{O:b.aX(),2D:2C==\'34\'?3k(d):32(d||0),3U:2C==\'34\'?3k(1a):1a,2C:2C}}.1g(q)).4s(t(a){G((a.2D==a.3U)||(a.2C!=\'34\'&&(aY(a.2D)||aY(a.3U))))})},1e:t(a){D b={},1P,i=q.6G.14;4k(i--)b[(1P=q.6G[i]).O]=1P.2C==\'34\'?\'#\'+(1B.23(1P.2D[0]+(1P.3U[0]-1P.2D[0])*a)).5c()+(1B.23(1P.2D[1]+(1P.3U[1]-1P.2D[1])*a)).5c()+(1B.23(1P.2D[2]+(1P.3U[2]-1P.2D[2])*a)).5c():(1P.2D+(1P.3U-1P.2D)*a).fs(3)+(1P.2C===17?\'\':1P.2C);q.E.1j(b,Y)}});J.ft=1D.1y({1G:t(a){q.2E=[];q.u=12[1]||{};q.aZ(a)},aZ:t(c){c.1d(t(a){a=$H(a);D b=a.1J().b0();q.2E.1x($H({b1:a.fu().b0(),5e:J.8m,u:{O:b}}))}.1g(q));G q},8n:t(){G X J.4u(q.2E.1I(t(a){D b=a.2k(\'b1\'),5e=a.2k(\'5e\'),u=a.2k(\'u\');D c=[$(b)||$$(b)].2v();G c.1I(t(e){G X 5e(e,N.11({24:Y},u))})}).2v(),q.u)}});V.6H=$w(\'4v fv fw fx \'+\'fy fz fA fB \'+\'fC fD fE fF \'+\'fG fH fI 2A fJ 34 \'+\'3K fK 1f 1h fL fM \'+\'fN fO fP fQ fR fS \'+\'fT fU fV 1S fW fX \'+\'fY fZ g0 g1 g2 \'+\'5y g3 1c 1k g4 5A\');V.aW=/^(([\\+\\-]?[0-9\\.]+)(em|ex|1v|3I|cm|g5|aI|g6|\\%))|0$/;4i.8o=18.21(\'4e\');4i.4j.aT=t(){D b,6I=$H();C(1n.2i.5d)b=X V(\'4e\',{O:q}).O;13{4i.8o.2W=\'<4e O="\'+q+\'"></4e>\';b=4i.8o.2Y[0].O}V.6H.1d(t(a){C(b[a])6I.6p(a,b[a])});C(1n.2i.4m&&q.4w(\'1S\'))6I.6p(\'1S\',q.2F(/1S:\\s*((?:0|1)?(?:\\.\\d*)?)/)[1]);G 6I};C(18.8p&&18.8p.b2){V.5z=t(c){D d=18.8p.b2($(c),17);G V.6H.8h({},t(a,b){a[b]=d[b];G a})}}13{V.5z=t(c){c=$(c);D d=c.8a,5B;5B=V.6H.8h({},t(a,b){a[b]=d[b];G a});C(!5B.1S)5B.1S=c.5m();G 5B}}J.57={g7:t(a,b){a=$(a);X J.8m(a,N.11({O:b},12[2]||{}));G a},g8:t(a,b,c){a=$(a);D s=b.g9().aX(),b3=s.6g(0).2V()+s.8q(1);X J[b3](a,c);G a},ga:t(a,b){a=$(a);X J.6u(a,b);G a}};$w(\'gb 82 gc gd ge gf gg gh gi \'+\'gj gk gl gm gn go\').1d(t(c){J.57[c]=t(a,b){a=$(a);J[c.6g(0).2V()+c.8q(1)](a,b);G a}});$w(\'2Z 7Z a7 6h 6i 5z\').1d(t(f){J.57[f]=V[f]});V.gp(J.57);C(N.8r(J))2S("gq.4c 7L b4 4b.7J.7K\' 1m.4c b5");D 2f={4y:[],3o:t(a){q.4y=q.4y.4s(t(d){G d.E==$(a)})},4p:t(a){a=$(a);D b=N.11({gr:Y,2M:17,27:M},12[1]||{});C(b.3V){b.5C=[];D d=b.3V;C(N.6J(d)){d.1d(t(c){b.5C.1x($(c))})}13{b.5C.1x($(d))}}C(b.5D)b.5D=[b.5D].2v();V.2m(a);b.E=a;q.4y.1x(b)},b6:t(a){6K=a[0];1U(i=1;i<a.14;++i)C(V.5E(a[i].E,6K.E))6K=a[i];G 6K},b7:t(a,b){D d;C(b.27){d=a.8s}13{d=a.1z}G b.5C.6L(t(c){G d==c})},8t:t(a,b,c){G((c.E!=b)&&((!c.5C)||q.b7(b,c))&&((!c.5D)||(V.b8(b).6L(t(v){G c.5D.4w(v)})))&&1p.b9(c.E,a[0],a[1]))},5F:t(a){C(a.2M)V.3v(a.E,a.2M);q.2g=17},3w:t(a){C(a.2M)V.2B(a.E,a.2M);q.2g=a},1O:t(b,c){C(!q.4y.14)G;D d,6M=[];q.4y.1d(t(a){C(2f.8t(b,c,a))6M.1x(a)});C(6M.14>0)d=2f.b6(6M);C(q.2g&&q.2g!=d)q.5F(q.2g);C(d){1p.b9(d.E,b[0],b[1]);C(d.3x)d.3x(c,d.E,1p.2p(d.2p,d.E));C(d!=q.2g)2f.3w(d)}},ba:t(a,b){C(!q.2g)G;1p.6N();C(q.8t([Z.4z(a),Z.4A(a)],b,q.2g))C(q.2g.bb){q.2g.bb(b,q.2g.E,a);G Y}},bc:t(){C(q.2g)q.5F(q.2g)}};D 1l={4B:[],4C:[],bd:t(a){C(q.4B.14==0){q.4D=q.4E.2q(q);q.4F=q.6O.2q(q);q.8u=q.6P.2q(q);Z.1W(18,"6Q",q.4D);Z.1W(18,"6R",q.4F);Z.1W(18,"be",q.8u)}q.4B.1x(a)},bf:t(a){q.4B=q.4B.4s(t(d){G d==a});C(q.4B.14==0){Z.2N(18,"6Q",q.4D);Z.2N(18,"6R",q.4F);Z.2N(18,"be",q.8u)}},3w:t(a){C(a.u.2a){q.5G=4G(t(){1l.5G=17;1M.5H();1l.2O=a}.1g(q),a.u.2a)}13{1M.5H();q.2O=a}},5F:t(){q.2O=17},6O:t(a){C(!q.2O)G;D b=[Z.4z(a),Z.4A(a)];C(q.4H&&(q.4H.5l()==b.5l()))G;q.4H=b;q.2O.6O(a,b)},4E:t(a){C(q.5G){8v(q.5G);q.5G=17}C(!q.2O)G;q.4H=17;q.2O.4E(a);q.2O=17},6P:t(a){C(q.2O)q.2O.6P(a)},bg:t(a){q.4C.1x(a);q.8w()},bh:t(a){q.4C=q.4C.4s(t(o){G o.E==a});q.8w()},5I:t(a,b,c){C(q[a+\'bi\']>0)q.4C.1d(t(o){C(o[a])o[a](a,b,c)});C(b.u[a])b.u[a](b,c)},8w:t(){[\'8x\',\'8y\',\'8z\'].1d(t(a){1l[a+\'bi\']=1l.4C.2U(t(o){G o[a]}).14})}};D 3W=1D.1y({1G:t(e){D f={1K:M,3X:t(a,b,c){D d=1B.gs(1B.6S(b^2)+1B.6S(c^2))*0.gt;X J.2e(a,{x:-c,y:-b,1t:d,2b:{5f:\'bj\',1C:\'2x\'}})},3Y:t(a){D b=N.gu(a.6T)?a.6T:1.0;X J.2I(a,{1t:0.2,25:0.7,1V:b,2b:{5f:\'bj\',1C:\'2x\'},88:t(){3W.5J[a]=M}})},3Z:2u,8A:M,4I:M,1i:M,2r:20,1X:15,38:M,2a:0};C(!12[1]||N.8r(12[1].3Y))N.11(f,{4J:t(a){a.6T=V.5m(a);3W.5J[a]=Y;X J.2I(a,{1t:0.2,25:a.6T,1V:0.7})}});D g=N.11(f,12[1]||{});q.E=$(e);C(g.1K&&N.3p(g.1K))q.1K=q.E.22(\'.\'+g.1K,0);C(!q.1K)q.1K=$(g.1K);C(!q.1K)q.1K=q.E;C(g.1i&&!g.1i.8k&&!g.1i.gv){g.1i=$(g.1i);q.8B=V.gw(q.E,g.1i)}V.2m(q.E);q.u=g;q.2s=M;q.3y=q.bk.2q(q);Z.1W(q.1K,"4K",q.3y);1l.bd(q)},4L:t(){Z.2N(q.1K,"4K",q.3y);1l.bf(q)},6U:t(){G([28(V.1o(q.E,\'1h\')||\'0\'),28(V.1o(q.E,\'1c\')||\'0\')])},bk:t(a){C(!N.8r(3W.5J[q.E])&&3W.5J[q.E])G;C(Z.bl(a)){D b=Z.E(a);C((4M=b.2X.2V())&&(4M==\'a4\'||4M==\'a5\'||4M==\'7M\'||4M==\'a2\'||4M==\'a6\'))G;D c=[Z.4z(a),Z.4A(a)];D d=1p.3u(q.E);q.5v=[0,1].1I(t(i){G(c[i]-d[i])});1l.3w(q);Z.1Y(a)}},6V:t(a){q.2s=Y;C(!q.5K)q.5K=q.6U();C(q.u.3Z){q.bm=28(V.1o(q.E,\'z-1T\')||0);q.E.O.5A=q.u.3Z}C(q.u.3z){q.6W=q.E.gx(Y);q.6X=(q.E.1o(\'1C\')==\'3s\');C(!q.6X)1p.aQ(q.E);q.E.1z.4n(q.6W,q.E)}C(q.u.1i){C(q.u.1i==1M){D b=q.6Y(q.u.1i);q.8C=b.1h;q.8D=b.1c}13{q.8C=q.u.1i.4N;q.8D=q.u.1i.41}}1l.5I(\'8x\',q,a);C(q.u.4J)q.u.4J(q.E)},6O:t(a,b){C(!q.2s)q.6V(a);C(!q.u.4I){1p.6N();2f.1O(b,q.E)}1l.5I(\'8z\',q,a);q.5L(b);C(q.u.6Z)q.u.6Z(q);C(q.u.1i){q.8E();D p;C(q.u.1i==1M){5i(q.6Y(q.u.1i)){p=[1h,1c,1h+1k,1c+1f]}}13{p=1p.gy(q.u.1i);p[0]+=q.u.1i.4N+1p.bn;p[1]+=q.u.1i.41+1p.bo;p.1x(p[0]+q.u.1i.3R);p.1x(p[1]+q.u.1i.3t)}D c=[0,0];C(b[0]<(p[0]+q.u.2r))c[0]=b[0]-(p[0]+q.u.2r);C(b[1]<(p[1]+q.u.2r))c[1]=b[1]-(p[1]+q.u.2r);C(b[0]>(p[2]-q.u.2r))c[0]=b[0]-(p[2]-q.u.2r);C(b[1]>(p[3]-q.u.2r))c[1]=b[1]-(p[3]-q.u.2r);q.bp(c)}C(1n.2i.5d)1M.7Y(0,0);Z.1Y(a)},5M:t(a,b){q.2s=M;C(q.u.4I){1p.6N();D c=[Z.4z(a),Z.4A(a)];2f.1O(c,q.E)}C(q.u.3z){C(!q.6X)1p.gz(q.E);8F q.6X;V.3o(q.6W);q.6W=17}D e=M;C(b){e=2f.ba(a,q.E);C(!e)e=M}C(e&&q.u.bq)q.u.bq(q.E);1l.5I(\'8y\',q,a);D f=q.u.8A;C(f&&N.4o(f))f=f(q.E);D d=q.6U();C(f&&q.u.3X){C(e==0||f!=\'gA\')q.u.3X(q.E,d[1]-q.5K[1],d[0]-q.5K[0])}13{q.5K=d}C(q.u.3Z)q.E.O.5A=q.bm;C(q.u.3Y)q.u.3Y(q.E);1l.5F(q);2f.bc()},6P:t(a){C(a.42!=Z.8G)G;q.5M(a,M);Z.1Y(a)},4E:t(a){C(!q.2s)G;q.8E();q.5M(a,Y);Z.1Y(a)},5L:t(a){D b=1p.3u(q.E);C(q.u.3z){D r=1p.gB(q.E);b[0]+=r[0]-1p.bn;b[1]+=r[1]-1p.bo}D d=q.6U();b[0]-=d[0];b[1]-=d[1];C(q.u.1i&&(q.u.1i!=1M&&q.8B)){b[0]-=q.u.1i.4N-q.8C;b[1]-=q.u.1i.41-q.8D}D p=[0,1].1I(t(i){G(a[i]-b[i]-q.5v[i])}.1g(q));C(q.u.38){C(N.4o(q.u.38)){p=q.u.38(p[0],p[1],q)}13{C(N.6J(q.u.38)){p=p.1I(t(v,i){G(v/q.u.38[i]).23()*q.u.38[i]}.1g(q))}13{p=p.1I(t(v){G(v/q.u.38).23()*q.u.38}.1g(q))}}}D c=q.E.O;C((!q.u.43)||(q.u.43==\'8H\'))c.1h=p[0]+"1v";C((!q.u.43)||(q.u.43==\'5N\'))c.1c=p[1]+"1v";C(c.70=="71")c.70=""},8E:t(){C(q.72){as(q.72);q.72=17;1l.2P=17}},bp:t(a){C(!(a[0]||a[1]))G;q.1X=[a[0]*q.u.1X,a[1]*q.u.1X];q.8I=X 6m();q.72=ar(q.1i.1g(q),10)},1i:t(){D a=X 6m();D b=a-q.8I;q.8I=a;C(q.u.1i==1M){5i(q.6Y(q.u.1i)){C(q.1X[0]||q.1X[1]){D d=b/2u;q.u.1i.8k(1h+d*q.1X[0],1c+d*q.1X[1])}}}13{q.u.1i.4N+=q.1X[0]*b/2u;q.u.1i.41+=q.1X[1]*b/2u}1p.6N();2f.1O(1l.4H,q.E);1l.5I(\'8z\',q);C(q.8B){1l.2P=1l.2P||$A(1l.4H);1l.2P[0]+=q.1X[0]*b/2u;1l.2P[1]+=q.1X[1]*b/2u;C(1l.2P[0]<0)1l.2P[0]=0;C(1l.2P[1]<0)1l.2P[1]=0;q.5L(1l.2P)}C(q.u.6Z)q.u.6Z(q)},6Y:t(w){D T,L,W,H;5i(w.18){C(w.18.3A&&3A.41){T=3A.41;L=3A.4N}13 C(w.18.44){T=44.41;L=44.4N}C(w.bs){W=w.bs;H=w.gC}13 C(w.18.3A&&3A.8J){W=3A.8J;H=3A.6A}13{W=44.3R;H=44.3t}}G{1c:T,1h:L,1k:W,1f:H}}});3W.5J={};D bt=1D.1y({1G:t(a,b){q.E=$(a);q.4O=b;q.4P=1b.5O(q.E)},8x:t(){q.4P=1b.5O(q.E)},8y:t(){1b.bu();C(q.4P!=1b.5O(q.E))q.4O(q.E)}});D 1b={bv:/^[^3j\\-](?:[A-gD-9H-9\\-\\3j]*)[3j](.*)$/,5P:{},bw:t(a){4k(a.2X.2V()!="a1"){C(a.19&&1b.5P[a.19])G a;a=a.1z}},u:t(a){a=1b.bw($(a));C(!a)G;G 1b.5P[a.19]},4L:t(a){D s=1b.u(a);C(s){1l.bh(s.E);s.5Q.1d(t(d){2f.3o(d)});s.8K.aA(\'4L\');8F 1b.5P[s.E.19]}},1y:t(b){b=$(b);D c=N.11({E:b,4Q:\'5R\',bx:M,27:M,5S:\'8L\',2p:\'5N\',43:\'5N\',3V:b,1K:M,45:M,2a:0,2M:17,3z:M,4I:M,1i:M,2r:20,1X:15,3B:q.bv,by:M,1w:M,39:1n.3P,bz:1n.3P},12[1]||{});q.4L(b);D d={8A:Y,4I:c.4I,1i:c.1i,1X:c.1X,2r:c.2r,2a:c.2a,3z:c.3z,43:c.43,1K:c.1K};C(c.4J)d.4J=c.4J;C(c.3X)d.3X=c.3X;13 C(c.3z)d.3X=t(a){a.O.1c=0;a.O.1h=0};C(c.3Y)d.3Y=c.3Y;C(c.3Z)d.3Z=c.3Z;D f={2p:c.2p,3V:c.3V,27:c.27,2M:c.2M,3x:1b.3x};D g={3x:1b.bA,2p:c.2p,3V:c.3V,2M:c.2M};V.5x(b);c.8K=[];c.5Q=[];C(c.bx||c.27){2f.4p(b,g);c.5Q.1x(b)}(c.by||q.4R(b,c)||[]).1d(t(e,i){D a=c.1w?$(c.1w[i]):(c.1K?$(e).2U(\'.\'+c.1K)[0]:e);c.8K.1x(X 3W(e,N.11(d,{1K:a})));2f.4p(e,f);C(c.27)e.8s=b;c.5Q.1x(e)});C(c.27){(1b.bB(b,c)||[]).1d(t(e){2f.4p(e,g);e.8s=b;c.5Q.1x(e)})}q.5P[b.19]=c;1l.bg(X bt(b,c.bz))},4R:t(a,b){G V.73(a,b.45,b.27?Y:M,b.4Q)},bB:t(a,b){G V.73(a,b.45,b.27?Y:M,b.5S)},3x:t(a,b,c){C(V.5E(b,a))G;C(c>.33&&c<.66&&1b.u(b).27){G}13 C(c>0.5){1b.8M(b,\'gE\');C(b.gF!=a){D d=a.1z;a.O.70="71";b.1z.4n(a,b);C(b.1z!=d)1b.u(d).39(a);1b.u(b.1z).39(a)}}13{1b.8M(b,\'bC\');D e=b.gG||17;C(e!=a){D d=a.1z;a.O.70="71";b.1z.4n(a,e);C(b.1z!=d)1b.u(d).39(a);1b.u(b.1z).39(a)}}},bA:t(a,b,c){D d=a.1z;D e=1b.u(b);C(!V.5E(b,a)){D f;D g=1b.4R(b,{4Q:e.4Q,45:e.45});D h=17;C(g){D i=V.5T(b,e.2p)*(1.0-c);1U(f=0;f<g.14;f+=1){C(i-V.5T(g[f],e.2p)>=0){i-=V.5T(g[f],e.2p)}13 C(i-(V.5T(g[f],e.2p)/2)>=0){h=f+1<g.14?g[f+1]:17;1N}13{h=g[f];1N}}}b.4n(a,h);1b.u(d).39(a);e.39(a)}},bu:t(){C(1b.3a)1b.3a.1r()},8M:t(a,b){D c=1b.u(a.1z);C(c&&!c.3z)G;C(!1b.3a){1b.3a=($(\'bD\')||V.11(18.21(\'a3\'))).1r().2B(\'bD\').1j({1C:\'3s\'});18.6d("44").gH(0).1L(1b.3a)}D d=1p.3u(a);1b.3a.1j({1h:d[0]+\'1v\',1c:d[1]+\'1v\'});C(b==\'bC\')C(c.2p==\'8H\')1b.3a.1j({1h:(d[0]+a.8J)+\'1v\'});13 1b.3a.1j({1c:(d[1]+a.6A)+\'1v\'});1b.3a.1O()},8N:t(a,b,c){D d=1b.4R(a,b)||[];1U(D i=0;i<d.14;++i){D e=d[i].19.2F(b.3B);C(!e)gI;D f={19:3b(e?e[1]:17),E:a,8O:c,4S:[],1C:c.4S.14,74:$(d[i]).22(b.5S)};C(f.74)q.8N(f.74,b,f);c.4S.1x(f)}G c},27:t(a){a=$(a);D b=q.u(a);D c=N.11({4Q:b.4Q,5S:b.5S,45:b.45,3m:a.19,3B:b.3B},12[1]||{});D d={19:17,8O:17,4S:[],74:a,1C:0};G 1b.8N(a,c,d)},bE:t(a){D b=\'\';do{C(a.19)b=\'[\'+a.1C+\']\'+b}4k((a=a.8O)!=17);G b},bF:t(b){b=$(b);D c=N.11(q.u(b),12[1]||{});G $(q.4R(b,c)||[]).1I(t(a){G a.19.2F(c.3B)?a.19.2F(c.3B)[1]:\'\'})},gJ:t(b,c){b=$(b);D d=N.11(q.u(b),12[2]||{});D e={};q.4R(b,d).1d(t(n){C(n.19.2F(d.3B))e[n.19.2F(d.3B)[1]]=[n,n.1z];n.1z.a8(n)});c.1d(t(a){D n=e[a];C(n){n[1].1L(n[0]);8F e[a]}})},5O:t(b){b=$(b);D c=N.11(1b.u(b),12[1]||{});D d=3b((12[1]&&12[1].3m)?12[1].3m:b.19);C(c.27){G 1b.27(b,12[1]).4S.1I(t(a){G[d+1b.bE(a)+"[19]="+3b(a.19)].7T(a.4S.1I(12.8P))}).2v().4h(\'&\')}13{G 1b.bF(b,12[1]).1I(t(a){G d+"[]="+3b(a)}).4h(\'&\')}}};V.5E=t(a,b){C(!a.1z||a==b)G M;C(a.1z==b)G Y;G V.5E(a.1z,b)};V.73=t(b,c,d,f){C(!b.7X())G 17;f=f.2V();C(c)c=[c].2v();D g=[];$A(b.2Y).1d(t(e){C(e.2X&&e.2X.2V()==f&&(!c||(V.b8(e).6L(t(v){G c.4w(v)}))))g.1x(e);C(d){D a=V.73(e,c,d,f);C(a)g.1x(a)}});G(g.14>0?g.2v():[])};V.5T=t(a,b){G a[\'5v\'+((b==\'5N\'||b==\'1f\')?\'gK\':\'gL\')]};C(29 J==\'3F\')2S("gM.4c 7L b4 4b.7J.7K\' 1m.4c b5");D 46={};46.2d=1D.1y({8Q:t(c,d,e){c=$(c);q.E=c;q.1e=$(d);q.4T=M;q.5U=M;q.1Z=M;q.1T=0;q.3c=0;q.5V=q.E.1a;C(q.8R)q.8R(e);13 q.u=e||{};q.u.4U=q.u.4U||q.E.3m;q.u.2Q=q.u.2Q||[];q.u.8S=q.u.8S||0.4;q.u.8T=q.u.8T||1;q.u.8U=q.u.8U||t(a,b){C(!b.O.1C||b.O.1C==\'3s\'){b.O.1C=\'3s\';1p.8V(a,b,{gN:M,aH:a.3t})}J.6l(b,{1t:0.15})};q.u.8W=q.u.8W||t(a,b){X J.83(b,{1t:0.15})};C(29(q.u.2Q)==\'a0\')q.u.2Q=X 9X(q.u.2Q);C(!q.u.2Q.4w(\'\\n\'))q.u.2Q.1x(\'\\n\');q.4O=17;q.E.gO(\'gP\',\'gQ\');V.1r(q.1e);Z.1W(q.E,\'gR\',q.bG.2q(q));Z.1W(q.E,\'bH\',q.bI.2q(q))},1O:t(){C(V.1o(q.1e,\'5u\')==\'3n\')q.u.8U(q.E,q.1e);C(!q.3C&&(1n.2i.4m)&&(V.1o(q.1e,\'1C\')==\'3s\')){X gS.bJ(q.1e,\'<bK 19="\'+q.1e.19+\'bL" \'+\'O="5u:3n;1C:3s;gT:gU:gV.gW.gX(1S=0);" \'+\'3i="9F:M;" gY="0" gZ="h0"></bK>\');q.3C=$(q.1e.19+\'bL\')}C(q.3C)4G(q.bM.1g(q),50)},bM:t(){1p.8V(q.1e,q.3C,{h1:(!q.1e.O.1f)});q.3C.O.5A=1;q.1e.O.5A=2;V.1O(q.3C)},1r:t(){q.8X();C(V.1o(q.1e,\'5u\')!=\'3n\')q.u.8W(q.E,q.1e);C(q.3C)V.1r(q.3C)},bN:t(){C(q.u.76)V.1O(q.u.76)},8X:t(){C(q.u.76)V.1r(q.u.76)},bI:t(a){C(q.1Z)6n(a.42){1E Z.bO:1E Z.8Y:q.77();Z.1Y(a);1E Z.8G:q.1r();q.1Z=M;Z.1Y(a);G;1E Z.h2:1E Z.h3:G;1E Z.h4:q.bP();q.2G();Z.1Y(a);G;1E Z.h5:q.bQ();q.2G();Z.1Y(a);G}13 C(a.42==Z.bO||a.42==Z.8Y||(1n.2i.5d>0&&a.42==0))G;q.5U=Y;q.4T=Y;C(q.4O)8v(q.4O);q.4O=4G(q.bR.1g(q),q.u.8S*2u)},3w:t(){q.5U=M;q.4T=Y;q.78()},3x:t(a){D b=Z.bS(a,\'7S\');C(q.1T!=b.79){q.1T=b.79;q.2G()}Z.1Y(a)},bT:t(a){D b=Z.bS(a,\'7S\');q.1T=b.79;q.77();q.1r()},bG:t(a){4G(q.1r.1g(q),h6);q.4T=M;q.1Z=M},2G:t(){C(q.3c>0){1U(D i=0;i<q.3c;i++)q.1T==i?V.2B(q.47(i),"4V"):V.3v(q.47(i),"4V");C(q.4T){q.1O();q.1Z=Y}}13{q.1Z=M;q.1r()}},bP:t(){C(q.1T>0)q.1T--;13 q.1T=q.3c-1;q.47(q.1T).bU(Y)},bQ:t(){C(q.1T<q.3c-1)q.1T++;13 q.1T=0;q.47(q.1T).bU(M)},47:t(a){G q.1e.58.2Y[a]},bV:t(){G q.47(q.1T)},77:t(){q.1Z=M;q.7a(q.bV())},7a:t(a){C(q.u.7a){q.u.7a(a);G}D b=\'\';C(q.u.2U){D c=$(a).2U(\'.\'+q.u.2U)||[];C(c.14>0)b=V.6h(c[0],q.u.2U)}13 b=V.6i(a,\'h7\');D d=q.7b();C(d[0]!=-1){D e=q.E.1a.3d(0,d[0]);D f=q.E.1a.3d(d[0]).2F(/^\\s+/);C(f)e+=f[0];q.E.1a=e+b+q.E.1a.3d(d[1])}13{q.E.1a=b}q.5V=q.E.1a;q.E.5H();C(q.u.bW)q.u.bW(q.E,a)},8Z:t(a){C(!q.5U&&q.4T){q.1e.2W=a;V.5x(q.1e);V.5x(q.1e.22());C(q.1e.58&&q.1e.22().2Y){q.3c=q.1e.22().2Y.14;1U(D i=0;i<q.3c;i++){D b=q.47(i);b.79=i;q.bX(b)}}13{q.3c=0}q.8X();q.1T=0;C(q.3c==1&&q.u.h8){q.77();q.1r()}13{q.2G()}}},bX:t(a){Z.1W(a,"bY",q.3x.2q(q));Z.1W(a,"bZ",q.bT.2q(q))},bR:t(){q.5U=M;q.7c=17;C(q.7d().14>=q.u.8T){q.78()}13{q.1Z=M;q.1r()}q.5V=q.E.1a},7d:t(){D a=q.7b();G q.E.1a.8q(a[0],a[1]).5b()},7b:t(){C(17!=q.7c)G q.7c;D a=q.E.1a;C(a.5b().h9())G[-1,0];D b=12.8P.c0(a,q.5V);D c=(b==q.5V.14?1:0);D d=-1,7e=a.14;D e;1U(D f=0,l=q.u.2Q.14;f<l;++f){e=a.ha(q.u.2Q[f],b+c-1);C(e>d)d=e;e=a.2y(q.u.2Q[f],b+c);C(-1!=e&&e<7e)7e=e}G(q.7c=[d+1,7e])}});46.2d.4j.7b.c0=t(a,b){D c=1B.5W(a.14,b.14);1U(D d=0;d<c;++d)C(a[d]!=b[d])G d;G c};1H.46=1D.1y(46.2d,{1G:t(a,b,c,d){q.8Q(a,b,d);q.u.hb=Y;q.u.2R=q.2R.1g(q);q.u.90=q.u.3D||17;q.3e=c},78:t(){q.bN();D a=3b(q.u.4U)+\'=\'+3b(q.7d());q.u.3D=q.u.4W?q.u.4W(q.E,a):a;C(q.u.90)q.u.3D+=\'&\'+q.u.90;X 1H.5X(q.3e,q.u)},2R:t(a){q.8Z(a.5Y)}});46.hc=1D.1y(46.2d,{1G:t(a,b,c,d){q.8Q(a,b,d);q.u.91=c},78:t(){q.8Z(q.u.c1(q))},8R:t(h){q.u=N.11({92:10,c2:Y,c3:2,93:Y,c4:M,c1:t(a){D b=[];D c=[];D d=a.7d();D e=0;1U(D i=0;i<a.u.91.14&&b.14<a.u.92;i++){D f=a.u.91[i];D g=a.u.93?f.3l().2y(d.3l()):f.2y(d);4k(g!=-1){C(g==0&&f.14!=d.14){b.1x("<5R><7f>"+f.3d(0,d.14)+"</7f>"+f.3d(d.14)+"</5R>");1N}13 C(d.14>=a.u.c3&&a.u.c2&&g!=-1){C(a.u.c4||/\\s/.5r(f.3d(g-1,1))){c.1x("<5R>"+f.3d(0,g)+"<7f>"+f.3d(g,d.14)+"</7f>"+f.3d(g+d.14)+"</5R>");1N}}g=a.u.93?f.3l().2y(d.3l(),g+1):f.2y(d,g+1)}}C(c.14)b=b.7T(c.3J(0,a.u.92-b.14));G"<8L>"+b.4h(\'\')+"</8L>"}},h||{})}});94.c5=t(a){4G(t(){94.3w(a)},1)};1H.3f=1D.1y({1G:t(a,b,c){q.3e=b;q.E=a=$(a);q.c6();q.1A={};12.8P.c7(c);N.11(q.u,c||{});C(!q.u.4X&&q.E.19){q.u.4X=q.E.19+\'-7g\';C($(q.u.4X))q.u.4X=\'\'}C(q.u.2h)q.u.2h=$(q.u.2h);C(!q.u.2h)q.u.7h=M;q.7i=q.E.1o(\'6w-34\')||\'aU\';q.E.hd=q.u.c8;q.7j=q.95.1g(q);q.c9=(q.u.2R||1n.3P).1g(q);q.7k=q.ca.1g(q);q.5Z=q.96.1g(q);q.97=q.98.1g(q);q.cb()},cc:t(e){C(!q.7l||e.he||e.hf||e.hg)G;C(Z.8G==e.42)q.95(e);13 C(Z.8Y==e.42)q.96(e)},99:t(a,b,c){D d=q.u[a+\'7m\'];D e=q.u[a+\'hh\'];C(\'7n\'==d){D f=18.21(\'cd\');f.6b=\'hi\';f.1a=e;f.4f=\'ce\'+a+\'hj\';C(\'31\'==a)f.cf=q.7j;q.1F.1L(f);q.1A[a]=f}13 C(\'7o\'==d){D g=18.21(\'a\');g.hk=\'#\';g.1L(18.59(e));g.cf=\'31\'==a?q.7j:q.5Z;g.4f=\'ce\'+a+\'hl\';C(c)g.4f+=\' \'+c;q.1F.1L(g);q.1A[a]=g}},9a:t(){D a=(q.u.4Y?q.u.9b:q.7p());D b;C(1>=q.u.60&&!/\\r|\\n/.5r(q.7p())){b=18.21(\'cd\');b.6b=\'7F\';D c=q.u.5q||q.u.9c||0;C(0<c)b.5q=c}13{b=18.21(\'cg\');b.60=(1>=q.u.60?q.u.ch:q.u.60);b.9c=q.u.9c||40}b.3m=q.u.4U;b.1a=a;b.4f=\'hm\';C(q.u.ci)b.hn=q.5Z;q.1A.1Q=b;C(q.u.4Y)q.7q();q.1F.1L(q.1A.1Q)},cj:t(){D d=q;t 7r(a,b){D c=d.u[\'7F\'+a+\'ho\'];C(!c||b===M)G;d.1F.1L(18.59(c))};q.1F=$(18.21(\'ck\'));q.1F.19=q.u.4X;q.1F.2B(q.u.cl);q.1F.hp=q.5Z;q.9a();C(\'cg\'==q.1A.1Q.2X.3l())q.1F.1L(18.21(\'br\'));C(q.u.9d)q.u.9d(q,q.1F);7r(\'hq\',q.u.61||q.u.62);q.99(\'cn\',q.5Z);7r(\'hr\',q.u.61&&q.u.62);q.99(\'31\',q.7j,\'hs\');7r(\'bJ\',q.u.61||q.u.62)},4L:t(){C(q.48)q.E.2W=q.48;q.9e();q.co()},cp:t(e){C(q.63||q.7l)G;q.7l=Y;q.4Z(\'cq\');C(q.u.2h)q.u.2h.1r();q.E.1r();q.cj();q.E.1z.4n(q.1F,q.E);C(!q.u.4Y)q.9f();C(e)Z.1Y(e)},cr:t(e){C(q.u.64)q.E.2B(q.u.64);C(q.63)G;q.4Z(\'cs\')},7p:t(){G q.E.2W},ca:t(a){q.4Z(\'3g\',a);C(q.48){q.E.2W=q.48;q.48=17}},95:t(e){q.98();C(e)Z.1Y(e)},96:t(e){D a=q.1F;D b=$F(q.1A.1Q);q.ct();D c=q.u.4W(a,b)||\'\';C(N.3p(c))c=c.ht();c.7s=q.E.19;C(q.u.cu){D d=N.11({hu:Y},q.u.51);N.11(d,{3D:c,2R:q.97,3g:q.7k});X 1H.hv({hw:q.E},q.3e,d)}13{D d=N.11({2l:\'2k\'},q.u.51);N.11(d,{3D:c,2R:q.97,3g:q.7k});X 1H.5X(q.3e,d)}C(e)Z.1Y(e)},9e:t(){q.E.3v(q.u.9g);q.9h();q.7t();q.E.O.4v=q.7i;q.E.1O();C(q.u.2h)q.u.2h.1O();q.63=M;q.7l=M;q.48=17;q.4Z(\'cv\')},7t:t(e){C(q.u.64)q.E.3v(q.u.64);C(q.63)G;q.4Z(\'cw\')},7q:t(){q.1F.2B(q.u.65);q.1A.1Q.3h=Y;D c=N.11({2l:\'2k\'},q.u.51);N.11(c,{3D:\'7s=\'+3b(q.E.19),2R:1n.3P,9i:t(a){q.1F.3v(q.u.65);D b=a.5Y;C(q.u.cx)b=b.9j();q.1A.1Q.1a=b;q.1A.1Q.3h=M;q.9f()}.1g(q),3g:q.7k});X 1H.5X(q.u.4Y,c)},9f:t(){D a=q.u.cy;C(a)$(q.1A.1Q)[\'5H\'==a?\'5H\':\'3w\']()},c6:t(){q.u=N.8V(1H.3f.3M);N.11(q.u,1H.3f.cz);[q.cA].2v().hx().1d(t(a){N.11(q.u,a)}.1g(q))},ct:t(){q.63=Y;q.9h();q.7t();q.cB()},cb:t(){q.9k={};D b;$H(1H.3f.cC).1d(t(a){b=q[a.1a].1g(q);q.9k[a.4x]=b;C(!q.u.7h)q.E.1W(a.4x,b);C(q.u.2h)q.u.2h.1W(a.4x,b)}.1g(q))},9h:t(){C(!q.1F)G;q.1F.3o();q.1F=17;q.1A={}},cB:t(){q.48=q.E.2W;q.E.2W=q.u.cD;q.E.2B(q.u.9g);q.E.O.4v=q.7i;q.E.1O()},4Z:t(a,b){C(\'t\'==29 q.u[a]){q.u[a](q,b)}},co:t(){$H(q.9k).1d(t(a){C(!q.u.7h)q.E.2N(a.4x,a.1a);C(q.u.2h)q.u.2h.2N(a.4x,a.1a)}.1g(q))},98:t(a){q.9e();q.c9(a,q.E)}});N.11(1H.3f.4j,{cE:1H.3f.4j.4L});1H.9l=1D.1y(1H.3f,{1G:t($cF,b,c,d){q.cA=1H.9l.3M;$cF(b,c,d)},9a:t(){D a=18.21(\'2U\');a.3m=q.u.4U;a.5q=1;q.1A.1Q=a;q.52=q.u.cG||[];C(q.u.cH)q.cI();13 q.9m();q.1F.1L(q.1A.1Q)},cI:t(){q.1F.2B(q.u.65);q.9n(q.u.cJ);D c=N.11({2l:\'2k\'},q.u.51);N.11(c,{3D:\'7s=\'+3b(q.E.19),2R:1n.3P,9i:t(a){D b=a.5Y.5b();C(!/^\\[.*\\]$/.5r(b))2S(\'hy hz an hA cG hB.\');q.52=ax(b);q.9m()}.1g(q),3g:q.3g});X 1H.5X(q.u.cH,c)},9n:t(a){q.1A.1Q.3h=Y;D b=q.1A.1Q.58;C(!b){b=18.21(\'cK\');b.1a=\'\';q.1A.1Q.1L(b);b.4V=Y}b.1e((a||\'\').hC().9j())},9m:t(){q.4g=q.7p();C(q.u.4Y)q.7q();13 q.9o()},7q:t(){q.9n(q.u.9b);D b=N.11({2l:\'2k\'},q.u.51);N.11(b,{3D:\'7s=\'+3b(q.E.19),2R:1n.3P,9i:t(a){q.4g=a.5Y.5b();q.9o()}.1g(q),3g:q.3g});X 1H.5X(q.u.4Y,b)},9o:t(){q.1F.3v(q.u.65);q.52=q.52.1I(t(a){G 2===a.14?a:[a,a].2v()});D c=(\'1a\'3I q.u)?q.u.1a:q.4g;D d=q.52.hD(t(a){G a[0]==c}.1g(q));q.1A.1Q.1e(\'\');D e;q.52.1d(t(a,b){e=18.21(\'cK\');e.1a=a[0];e.4V=d?a[0]==c:0==b;e.1L(18.59(a[1]));q.1A.1Q.1L(e)}.1g(q));q.1A.1Q.3h=M;94.c5(q.1A.1Q)}});1H.3f.4j.1G.c7=t(c){C(!c)G;t 67(a,b){C(a 3I c||b===3F)G;c[a]=b};67(\'62\',(c.cL?\'7o\':(c.cM?\'7n\':c.cL==c.cM==M?M:3F)));67(\'61\',(c.cN?\'7o\':(c.cO?\'7n\':c.cN==c.cO==M?M:3F)));67(\'68\',c.hE);67(\'9p\',c.hF)};N.11(1H.3f,{3M:{51:{},ch:3,62:\'7o\',hG:\'31\',c8:\'hH 1V hI\',2h:17,7h:M,cy:\'3w\',cl:\'7g-ck\',4X:17,68:\'#aM\',9p:\'#8f\',64:\'\',cu:Y,65:\'7g-hJ\',9b:\'cP...\',61:\'7n\',hK:\'cn\',4U:\'1a\',60:1,9g:\'7g-hL\',cD:\'hM...\',5q:0,cx:M,ci:M,hN:\'\',hO:\'\',hP:\'\'},cz:{4W:t(a){G cQ.5O(a)},2R:t(a,b){X J.6u(b,{6v:q.u.68,8e:Y})},cq:17,cs:t(a){a.E.O.4v=a.u.68;C(a.9q)a.9q.31()},3g:t(a,b){hQ(\'hR hS 5i 9G hT: \'+a.5Y.9j())},9d:17,cv:17,cw:t(a){a.9q=X J.6u(a.E,{6v:a.u.68,6x:a.u.9p,6y:a.7i,8e:Y})}},cC:{bZ:\'cp\',bH:\'cc\',bY:\'cr\',hU:\'7t\'}});1H.9l.3M={cJ:\'cP u...\'};cQ.V.hV=1D.1y({1G:t(a,b,c){q.2a=b||0.5;q.E=$(a);q.4W=c;q.69=17;q.4P=$F(q.E);Z.1W(q.E,\'hW\',q.cR.2q(q))},cR:t(a){C(q.4P==$F(q.E))G;C(q.69)8v(q.69);q.69=4G(q.cS.1g(q),q.2a*2u);q.4P=$F(q.E)},cS:t(){q.69=17;q.4W(q.E,$F(q.E))}});C(!7m)D 7m={};7m.hX=1D.1y({1G:t(a,b,c){D d=q;C(N.6J(a)){q.1w=a.7U(t(e){G $(e)})}13{q.1w=[$(a)]}q.1s=$(b);q.u=c||{};q.9r=q.u.9r||\'8H\';q.cT=q.u.cT||1;q.cU=28(q.u.cU||\'1\');q.1R=q.u.1R||$R(0,1);q.1a=0;q.1J=q.1w.1I(t(){G 0});q.49=q.u.49?q.u.49.1I(t(s){G $(s)}):M;q.u.7u=$(q.u.7u||17);q.u.7v=$(q.u.7v||17);q.9s=q.u.9s||M;q.7w=q.u.7w||q.1R.2x;q.9t=q.u.9t||q.1R.1u;q.7x=28(q.u.7x||\'0\');q.7y=28(q.u.7y||\'0\');q.9u=q.cV()-q.cW();q.7z=q.3E()?(q.1w[0].3t!=0?q.1w[0].3t:q.1w[0].O.1f.3G(/1v$/,"")):(q.1w[0].3R!=0?q.1w[0].3R:q.1w[0].O.1k.3G(/1v$/,""));q.1Z=M;q.2s=M;q.3h=M;C(q.u.3h)q.cX();q.2t=q.u.1J?q.u.1J.cY(1n.K):M;C(q.2t){q.9t=q.2t.5W();q.7w=q.2t.30()}q.3y=q.6V.2q(q);q.4D=q.4E.2q(q);q.4F=q.1e.2q(q);q.1w.1d(t(h,i){i=d.1w.14-1-i;d.6a(32((N.6J(d.u.9v)?d.u.9v[i]:d.u.9v)||d.1R.1u),i);h.2m().1W("4K",d.3y)});q.1s.1W("4K",q.3y);18.1W("6Q",q.4D);18.1W("6R",q.4F);q.7A=Y},cE:t(){D a=q;Z.2N(q.1s,"4K",q.3y);Z.2N(18,"6Q",q.4D);Z.2N(18,"6R",q.4F);q.1w.1d(t(h){Z.2N(h,"4K",a.3y)})},cX:t(){q.3h=Y},hY:t(){q.3h=M},cZ:t(b){C(q.2t){C(b>=q.2t.30())G(q.2t.30());C(b<=q.2t.5W())G(q.2t.5W());D c=1B.6S(q.2t[0]-b);D d=q.2t[0];q.2t.1d(t(v){D a=1B.6S(v-b);C(a<=c){d=v;c=a}});G d}C(b>q.1R.2x)G q.1R.2x;C(b<q.1R.1u)G q.1R.1u;G b},6a:t(a,b){C(!q.1Z){q.53=b||0;q.54=q.1w[q.53];q.9w()}b=b||q.53||0;C(q.7A&&q.9s){C((b>0)&&(a<q.1J[b-1]))a=q.1J[b-1];C((b<(q.1w.14-1))&&(a>q.1J[b+1]))a=q.1J[b+1]}a=q.cZ(a);q.1J[b]=a;q.1a=q.1J[0];q.1w[b].O[q.3E()?\'1c\':\'1h\']=q.55(a);q.d0();C(!q.2s||!q.2H)q.9x()},hZ:t(a,b){q.6a(q.1J[b||q.53||0]+a,b||q.53||0)},55:t(a){G 1B.23(((q.9u-q.7z)/(q.1R.2x-q.1R.1u))*(a-q.1R.1u))+"1v"},9y:t(a){G((a/(q.9u-q.7z)*(q.1R.2x-q.1R.1u))+q.1R.1u)},7B:t(a){D v=q.1J.cY(1n.K);a=a||0;G $R(v[a],v[a+1])},cW:t(){G(q.3E()?q.7y:q.7x)},cV:t(){G(q.3E()?(q.1s.3t!=0?q.1s.3t:q.1s.O.1f.3G(/1v$/,""))-q.7y:(q.1s.3R!=0?q.1s.3R:q.1s.O.1k.3G(/1v$/,""))-q.7x)},3E:t(){G(q.9r==\'5N\')},d0:t(){D a=q;C(q.49)$R(0,q.49.14-1).1d(t(r){a.7C(a.49[r],a.7B(r))});C(q.u.7u)q.7C(q.u.7u,$R(0,q.1J.14>1?q.7B(0).5W():q.1a));C(q.u.7v)q.7C(q.u.7v,$R(q.1J.14>1?q.7B(q.49.14-1).30():q.1a,q.7w))},7C:t(a,b){C(q.3E()){a.O.1c=q.55(b.1u);a.O.1f=q.55(b.2x-b.1u+q.1R.1u)}13{a.O.1h=q.55(b.1u);a.O.1k=q.55(b.2x-b.1u+q.1R.1u)}},9w:t(){q.1w.1d(t(h){V.3v(h,\'4V\')});V.2B(q.54,\'4V\')},6V:t(a){C(Z.bl(a)){C(!q.3h){q.1Z=Y;D b=Z.E(a);D c=[Z.4z(a),Z.4A(a)];D d=b;C(d==q.1s){D e=1p.3u(q.1s);q.2H=a;q.6a(q.9y((q.3E()?c[1]-e[1]:c[0]-e[0])-(q.7z/2)));D e=1p.3u(q.54);q.9z=(c[0]-e[0]);q.9A=(c[1]-e[1])}13{4k((q.1w.2y(b)==-1)&&b.1z)b=b.1z;C(q.1w.2y(b)!=-1){q.54=b;q.53=q.1w.2y(q.54);q.9w();D e=1p.3u(q.54);q.9z=(c[0]-e[0]);q.9A=(c[1]-e[1])}}}Z.1Y(a)}},1e:t(a){C(q.1Z){C(!q.2s)q.2s=Y;q.5L(a);C(1n.2i.5d)1M.7Y(0,0);Z.1Y(a)}},5L:t(a){D b=[Z.4z(a),Z.4A(a)];D c=1p.3u(q.1s);b[0]-=q.9z+c[0];b[1]-=q.9A+c[1];q.2H=a;q.6a(q.9y(q.3E()?b[1]:b[0]));C(q.7A&&q.u.d1)q.u.d1(q.1J.14>1?q.1J:q.1a,q)},4E:t(a){C(q.1Z&&q.2s){q.5M(a,Y);Z.1Y(a)}q.1Z=M;q.2s=M},5M:t(a,b){q.1Z=M;q.2s=M;q.9x()},9x:t(){C(q.7A&&q.u.39)q.u.39(q.1J.14>1?q.1J:q.1a,q);q.2H=17}});4a={2E:{},7D:Y,9B:X d2(\'<i0 O="1f:0" 19="7E#{1s}3j#{19}" 3i="#{3e}" 4r="M" d3="Y" 71="Y"/>\'),i1:t(){4a.7D=Y},i2:t(){4a.7D=M},8n:t(c){C(!4a.7D)G;D d=N.11({1s:\'5g\',3e:c,3G:M},12[1]||{});C(d.3G&&q.2E[d.1s]){$R(0,q.2E[d.1s].19).1d(t(a){D b=$(\'7E\'+d.1s+\'3j\'+a);b.d4&&b.d4();b.3o()});q.2E[d.1s]=17}C(!q.2E[d.1s])q.2E[d.1s]={19:0};13 q.2E[d.1s].19++;d.19=q.2E[d.1s].19;$$(\'44\')[0].i3(1n.2i.4m?X V(\'i4\',{19:\'7E\'+d.1s+\'3j\'+d.19,3i:d.3e,4r:1,d3:Y}):4a.9B.i5(d))}};C(1n.2i.i6&&9C.i7.2y("i8")>0){C(9C.d5&&$A(9C.d5).6L(t(p){G p.3m.2y(\'i9\')!=-1}))4a.9B=X d2(\'<4d 19="7E#{1s}3j#{19}" 1k="0" 1f="0" 6b="ia/ib" ic="#{3e}"/>\');13 4a.8n=t(){}}56.7H();',62,1129,'||||||||||||||||||||||||||this|||function|options||||||||if|var|element||return|||Effect|||false|Object|style|||||||Element||new|true|Event||extend|arguments|else|length|||null|document|id|value|Sortable|top|each|update|height|bind|left|scroll|setStyle|width|Draggables|effects|Prototype|getStyle|Position|afterFinishInternal|hide|track|duration|start|px|handles|push|create|parentNode|_controls|Math|position|Class|case|_form|initialize|Ajax|map|values|handle|appendChild|window|break|show|transform|editor|range|opacity|index|for|to|observe|scrollSpeed|stop|active||createElement|down|round|sync|from|moveY|tree|parseInt|typeof|delay|queue|transition|Base|Move|Droppables|last_active|externalControl|Browser|Transitions|get|method|makePositioned|Scale|restoreAfterFinish|overlap|bindAsEventListener|scrollSensitivity|dragging|allowedValues|1000|flatten|100|end|indexOf|dims|bottom|addClassName|unit|originalValue|tracks|match|render|event|Opacity|scaleX|scaleContent|scaleMode|hoverclass|stopObserving|activeDraggable|_lastScrollPointer|tokens|onComplete|throw|table|select|toUpperCase|innerHTML|tagName|childNodes|getInlineOpacity|max|cancel|parseFloat||color|makeClipping|undoClipping|undoPositioned|snap|onChange|_marker|encodeURIComponent|entryCount|substr|url|InPlaceEditor|onFailure|disabled|src|_|parseColor|toLowerCase|name|none|remove|isString|startOn|finishOn|absolute|offsetHeight|cumulativeOffset|removeClassName|activate|onHover|eventMouseDown|ghosting|documentElement|format|iefix|parameters|isVertical|undefined|replace|Builder|in|slice|fontSize|sinoidal|DefaultOptions|beforeSetup|finish|emptyFunction|scaleFrom|offsetWidth|opera|initialMoveY|targetValue|containment|Draggable|reverteffect|endeffect|zindex||scrollTop|keyCode|constraint|body|only|Autocompleter|getEntry|_oldInnerHTML|spans|Sound|script|js|object|div|className|_text|join|String|prototype|while|_elementDoesNotExistError|IE|insertBefore|isFunction|add|state|loop|reject|setup|Parallel|backgroundColor|include|key|drops|pointerX|pointerY|drags|observers|eventMouseUp|endDrag|eventMouseMove|setTimeout|_lastPointer|quiet|starteffect|mousedown|destroy|tag_name|scrollLeft|observer|lastValue|tag|findElements|children|hasFocus|paramName|selected|callback|formId|loadTextURL|triggerCallback||ajaxOptions|_collection|activeHandleIdx|activeHandle|translateToPx|Scriptaculous|Methods|firstChild|createTextNode|attribute|strip|toColorPart|WebKit|effect|scope|global|interval|with|codeForEvent|pos|inspect|getOpacity|originalLeft|originalTop|scaleY|size|test|originalHeight|originalWidth|display|offset|getDimensions|cleanWhitespace|right|getStyles|zIndex|styles|_containers|accept|isParent|deactivate|_timeout|focus|notify|_dragging|delta|draw|finishDrag|vertical|serialize|sortables|droppables|li|treeTag|offsetSize|changed|oldElementValue|min|Request|responseText|_boundSubmitHandler|rows|okControl|cancelControl|_saving|hoverClassName|loadingClassName||fallback|highlightColor|timer|setValue|type|split|getElementsByTagName|_isStringOrNumber|attr|charAt|collectTextNodes|collectTextNodesIgnoreClass|cos|PI|Appear|Date|switch|Queues|set|Internal|afterSetup|property|scaleFromCenter|Highlight|startcolor|background|endcolor|restorecolor|elementOffsets|clientHeight|direction|center|moveTransition|scaleTransition|opacityTransition|transforms|CSS_PROPERTIES|styleRules|isArray|deepest|detect|affected|prepare|updateDrag|keyPress|mouseup|mousemove|abs|_opacity|currentDelta|startDrag|_clone|_originallyAbsolute|_getWindowScroll|change|visibility|hidden|scrollInterval|findChildren|container||indicator|selectEntry|getUpdatedChoices|autocompleteIndex|updateElement|getTokenBounds|tokenBounds|getToken|nextTokenPos|strong|inplaceeditor|externalControlOnly|_originalBackground|_boundCancelHandler|_boundFailureHandler|_editing|Control|button|link|getText|loadExternalText|addText|editorId|leaveHover|startSpan|endSpan|maximum|alignX|alignY|handleLength|initialized|getRange|setSpan|_enabled|sound_|text|REQUIRED_PROTOTYPE|load|convertVersionString|aculo|us|requires|OPTION|node|try|catch|_children|ATTR_MAP|LI|concat|collect|nodeType|nodeValue|hasChildNodes|scrollBy|forceRerendering|zoom|PAIRS|appear|Fade|limit|idle|instances|currentFrame|afterFinish|frame|currentStyle|box|originalStyle|oldStyle|keepBackgroundImage|ffffff|_base|inject|scrollOffsets|viewport|scrollTo|0px|Morph|play|__parseStyleElement|defaultView|substring|isUndefined|treeNode|isAffected|eventKeypress|clearTimeout|_cacheObserverCallbacks|onStart|onEnd|onDrag|revert|_isScrollChild|originalScrollLeft|originalScrollTop|stopScrolling|delete|KEY_ESC|horizontal|lastScrolled|clientWidth|draggables|ul|mark|_tree|parent|callee|baseInitialize|setOptions|frequency|minChars|onShow|clone|onHide|stopIndicator|KEY_RETURN|updateChoices|defaultParams|array|choices|ignoreCase|Field|handleFormCancellation|handleFormSubmission|_boundWrapperHandler|wrapUp|createControl|createEditField|loadingText|cols|onFormCustomization|leaveEditMode|postProcessEditField|savingClassName|removeForm|onSuccess|stripTags|_listeners|InPlaceCollectionEditor|checkForExternalText|showLoadingText|buildOptionList|highlightEndColor|_effect|axis|restricted|minimum|trackLength|sliderValue|updateStyles|updateFinished|translateToValue|offsetX|offsetY|template|navigator|Version|require|javascript|the|z0|findAll|NODEMAP|AREA|CAPTION|COL|COLGROUP|LEGEND|OPTGROUP|PARAM|TBODY|TD|TFOOT|TH|THEAD|TR|Array|_attributes|class|string|BODY|BUTTON|DIV|INPUT|SELECT|TEXTAREA|setContentZoom|removeChild|linear|flicker|pulse|floor|full|fps|relative|speed|SlideDown|SlideUp|BlindDown|BlindUp|ScopedQueue|_each||getTime|last|pluck|setInterval|clearInterval|len|fromToDelta|totalTime|totalFrames|eval|running|beforeFinish|invoke|Tween|hasLayout|setOpacity|mode|scaleTo|elementPositioning|offsetTop|pt|fontSizeType|factor|setDimensions|ffff99|backgroundImage|_delta|getScrollOffsets|absolutize|distance|afterUpdateInternal|parseStyle|transparent|zzzzzz|CSS_LENGTH|camelize|isNaN|addTracks|first|ids|getComputedStyle|klass|including|library|findDeepestChild|isContained|classNames|within|fire|onDrop|reset|register|keypress|unregister|addObserver|removeObserver|Count|_draggable|initDrag|isLeftClick|originalZ|deltaX|deltaY|startScrolling|onDropped||innerWidth|SortableObserver|unmark|SERIALIZE_RULE|_findRootElement|dropOnEmpty|elements|onUpdate|onEmptyHover|findTreeElements|after|dropmarker|_constructIndex|sequence|onBlur|keydown|onKeyPress|After|iframe|_iefix|fixIEOverlapping|startIndicator|KEY_TAB|markPrevious|markNext|onObserverEvent|findElement|onClick|scrollIntoView|getCurrentEntry|afterUpdateElement|addObservers|mouseover|click|getFirstDifferencePos|selector|partialSearch|partialChars|fullSearch|scrollFreeActivate|prepareOptions|dealWithDeprecatedOptions|clickToEditText|_boundComplete|handleAJAXFailure|registerListeners|checkForEscapeOrReturn|input|editor_|onclick|textarea|autoRows|submitOnBlur|createForm|form|formClassName||ok|unregisterListeners|enterEditMode|onEnterEditMode|enterHover|onEnterHover|prepareSubmission|htmlResponse|onLeaveEditMode|onLeaveHover|stripLoadedTextTags|fieldPostCreation|DefaultCallbacks|_extraDefaultOptions|showSaving|Listeners|savingText|dispose|super|collection|loadCollectionURL|loadCollection|loadingCollectionText|option|cancelLink|cancelButton|okLink|okButton|Loading|Form|delayedListener|onTimerEvent|increment|step|maximumOffset|minimumOffset|setDisabled|sortBy|getNearestValue|drawSpans|onSlide|Template|autostart|Stop|plugins|write|100000|JavaScript|framework|proto|scripta|culous|without|fieldset|instanceof|htmlFor|toString|escapeHTML|gsub|quot|number|build|dump||ABBR|ACRONYM|ADDRESS|APPLET|BASE|BASEFONT|BDO|BIG|BLOCKQUOTE|BR|CENTER|CITE|CODE|DD|DEL|DFN|DIR|DL|DT|EM|FIELDSET|FONT|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|IFRAME|IMG|INS|ISINDEX|KBD|LABEL|LINK|MAP|MENU|META|NOFRAMES|NOSCRIPT|OBJECT|OL|PRE|SAMP|SCRIPT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE||TITLE|TT|UL|VAR|apply|rgb|hasClassName|ElementDoesNotExistError|message|The||specified|DOM|does|not|exist|but|is|required|operate|reverse|random|wobble|spring|exp|parallel|tagifyText|toArray|span|fromCharCode|160|multiple|slide|blind|toggle|visible|Enumerable|front|Queue|beforeUpdate|afterUpdate|beforeStart|finished|MoveBy|offsetLeft|font|content|scrollHeight|scrollWidth|image|ScrollTo|getHeight|Puff|200|beforeSetupInternal|SwitchOff|DropOut|Shake|Squish|Grow|01|Shrink|beforeStartInternal|Pulsate|pulses|Fold|rgba|toFixed|Transform|keys|backgroundPosition|borderBottomColor|borderBottomStyle|borderBottomWidth|borderLeftColor|borderLeftStyle|borderLeftWidth|borderRightColor|borderRightStyle|borderRightWidth|borderSpacing|borderTopColor|borderTopStyle|borderTopWidth|clip|fontWeight|letterSpacing|lineHeight|marginBottom|marginLeft|marginRight|marginTop|markerOffset|maxHeight|maxWidth|minHeight|minWidth|outlineColor|outlineOffset|outlineWidth|paddingBottom|paddingLeft|paddingRight|paddingTop|textIndent|wordSpacing|mm|pc|morph|visualEffect|dasherize|highlight|fade|grow|shrink|fold|blindUp|blindDown|slideUp|slideDown|pulsate|shake|puff|squish|switchOff|dropOut|addMethods|dragdrop|greedy|sqrt|02|isNumber|outerHTML|childOf|cloneNode|page|relativize|failure|realOffset|innerHeight|Za|before|previousSibling|nextSibling|item|continue|setSequence|Height|Width|controls|setHeight|setAttribute|autocomplete|off|blur|Insertion|filter|progid|DXImageTransform|Microsoft|Alpha|frameborder|scrolling|no|setTop|KEY_LEFT|KEY_RIGHT|KEY_UP|KEY_DOWN|250|informal|autoSelect|empty|lastIndexOf|asynchronous|Local|title|ctrlKey|altKey|shiftKey|Text|submit|_button|href|_link|editor_field|onblur|Controls|onsubmit|Before|Between|editor_cancel|toQueryParams|evalScripts|Updater|success|compact|Server|returned|invalid|representation|stripScripts|any|highlightcolor|highlightendcolor|cancelText|Click|edit|loading|okText|saving|Saving|textAfterControls|textBeforeControls|textBetweenControls|alert|Error|communication|server|mouseout|DelayedObserver|keyup|Slider|setEnabled|setValueBy|embed|enable|disable|insert|bgsound|evaluate|Gecko|userAgent|Win|QuickTime|audio|mpeg|data'.split('|'),0,{}));if(typeof Prototype=="undefined"){throw"Unable to load Shadowbox, Prototype framework not found."}if(typeof Effect=="undefined"){throw"Unable to load Shadowbox, Scriptaculous effects framework not found."}var Shadowbox={};Shadowbox.lib={getStyle:function(B,A){return Element.getStyle(B,A)},setStyle:function(C,B,D){if(typeof B!="object"){var A={};A[B]=D;B=A}Element.setStyle(C,B)},get:function(A){return $(A)},remove:function(A){Element.remove(A)},getTarget:function(A){return Event.element(A)},preventDefault:function(A){Event.stop(A)},addEvent:function(C,A,B){Event.observe(C,A,B)},removeEvent:function(C,A,B){Event.stopObserving(C,A,B)},animate:function(A,D,C,F){var E={};for(var B in D){for(var B in D){E[B]=String(D[B].to);if(B!="opacity"){E[B]+="px"}}}return new Effect.Morph(A,{afterFinish:F,duration:C,style:E})}};if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox, no base library adapter found."}(function(){var version="1.0";var options={assetURL:"",loadingImage:"/includes/js/shadowbox/images/loading.gif",animate:true,animSequence:"wh",flvPlayer:"flvplayer.swf",overlayColor:"#000",overlayOpacity:0.55,overlayBgImage:"/includes/js/shadowbox/images/overlay-85.png",listenOverlay:true,autoplayMovies:true,showMovieControls:true,resizeDuration:0.35,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:"default",viewportPadding:20,handleLgImages:"resize",initialHeight:160,initialWidth:320,enableKeys:true,keysClose:["c","q",27],keysNext:["n",39],keysPrev:["p",37],onOpen:null,onFinish:null,onChange:null,onClose:null,handleUnsupported:"link",skipSetup:false,text:{cancel:"Cancel",loading:"loading",close:'<span class="shortcut">C</span>errar',next:'<span class="shortcut">N</span>ext',prev:'<span class="shortcut">P</span>revious',errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}},errors:{fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}},skin:{main:'<div id="shadowbox_overlay"></div><div id="shadowbox_container"><div id="shadowbox"><div id="shadowbox_title"><div id="shadowbox_title_inner"></div></div><div id="shadowbox_body"><div id="shadowbox_body_inner"></div><div id="shadowbox_loading"></div></div><div id="shadowbox_toolbar"><div id="shadowbox_toolbar_inner"></div></div></div></div>',loading:'<img src="{0}" alt="{1}" /><span><a href="javascript:Shadowbox.close();">{2}</a></span>',counter:'<div id="shadowbox_counter">{0}</div>',close:'<div id="shadowbox_nav_close"><a href="javascript:Shadowbox.close();">{0}</a></div>',next:'<div id="shadowbox_nav_next"><a href="javascript:Shadowbox.next();">{0}</a></div>',prev:'<div id="shadowbox_nav_previous"><a href="javascript:Shadowbox.previous();">{0}</a></div>'},ext:{img:["png","jpg","jpeg","gif","bmp"],qt:["dv","mov","moov","movie","mp4"],wmp:["asf","wm","wmv"],qtwmp:["avi","mpg","mpeg"],iframe:["asp","aspx","cgi","cfm","htm","html","pl","php","php3","php4","php5","phtml","rb","rhtml","shtml","txt","vbs"]}};var default_options=null;var SL=Shadowbox.lib;var RE={resize:/(img|swf|flv)/,overlay:/(img|iframe|html|inline)/,swf:/\.swf\s*$/i,flv:/\.flv\s*$/i,domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/,empty:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i};var cache=[];var current_gallery;var current;var optimal_height=options.initialHeight;var optimal_width=options.initialWidth;var current_height=0;var current_width=0;var preloader;var initialized=false;var activated=false;var drag;var draggable;var overlay_img_needed;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isIE=ua.indexOf("msie")>-1,isIE7=ua.indexOf("msie 7")>-1,isBorderBox=isIE&&!isStrict,isSafari=(/webkit|khtml/).test(ua),isSafari3=isSafari&&!!(document.evaluate),isGecko=!isSafari&&ua.indexOf("gecko")>-1,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1);var absolute_pos=isIE&&!isIE7;var plugins=null;if(navigator.plugins&&navigator.plugins.length){var detectPlugin=function(plugin_name){var detected=false;for(var i=0,len=navigator.plugins.length;i<len;++i){if(navigator.plugins[i].name.indexOf(plugin_name)>-1){detected=true;break}}return detected};var f4m=detectPlugin("Flip4Mac");var plugins={fla:detectPlugin("Shockwave Flash"),qt:detectPlugin("QuickTime"),wmp:!f4m&&detectPlugin("Windows Media"),f4m:f4m}}else{var detectPlugin=function(plugin_name){var detected=false;try{var axo=new ActiveXObject(plugin_name);if(axo){detected=true}}catch(e){}return detected};var plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}var apply=function(o,e){for(var p in e){o[p]=e[p]}return o};var isLink=function(el){return typeof el.tagName=="string"&&(el.tagName.toUpperCase()=="A"||el.tagName.toUpperCase()=="AREA")};SL.getViewportHeight=function(){var height=window.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=isStrict?document.documentElement.clientHeight:document.body.clientHeight}return height};SL.getViewportWidth=function(){var width=window.innerWidth;var mode=document.compatMode;if(mode||isIE){width=isStrict?document.documentElement.clientWidth:document.body.clientWidth}return width};SL.getDocumentHeight=function(){var scrollHeight=isStrict?document.documentElement.scrollHeight:document.body.scrollHeight;return Math.max(scrollHeight,SL.getViewportHeight())};SL.getDocumentWidth=function(){var scrollWidth=isStrict?document.documentElement.scrollWidth:document.body.scrollWidth;return Math.max(scrollWidth,SL.getViewportWidth())};var clearOpacity=function(el){if(isIE){if(typeof el.style.filter=="string"&&(/alpha/i).test(el.style.filter)){el.style.filter=""}}else{el.style.opacity="";el.style["-moz-opacity"]="";el.style["-khtml-opacity"]=""}};var fadeIn=function(el,endingOpacity,duration,callback){if(options.animate){SL.setStyle(el,"opacity",0);el.style.visibility="visible";SL.animate(el,{opacity:{to:endingOpacity}},duration,function(){if(endingOpacity==1){clearOpacity(el)}if(typeof callback=="function"){callback()}})}else{if(endingOpacity==1){clearOpacity(el)}else{SL.setStyle(el,"opacity",endingOpacity)}el.style.visibility="visible";if(typeof callback=="function"){callback()}}};var fadeOut=function(el,duration,callback){var cb=function(){el.style.visibility="hidden";clearOpacity(el);if(typeof callback=="function"){callback()}};if(options.animate){SL.animate(el,{opacity:{to:0}},duration,cb)}else{cb()}};var appendHTML=function(el,html){el=SL.get(el);if(el.insertAdjacentHTML){el.insertAdjacentHTML("BeforeEnd",html);return el.lastChild}if(el.lastChild){var range=el.ownerDocument.createRange();range.setStartAfter(el.lastChild);var frag=range.createContextualFragment(html);el.appendChild(frag);return el.lastChild}else{el.innerHTML=html;return el.lastChild}};var overwriteHTML=function(el,html){el=SL.get(el);el.innerHTML=html;return el.firstChild};var getComputedHeight=function(el){var h=Math.max(el.offsetHeight,el.clientHeight);if(!h){h=parseInt(SL.getStyle(el,"height"),10)||0;if(!isBorderBox){h+=parseInt(SL.getStyle(el,"padding-top"),10)+parseInt(SL.getStyle(el,"padding-bottom"),10)+parseInt(SL.getStyle(el,"border-top-width"),10)+parseInt(SL.getStyle(el,"border-bottom-width"),10)}}return h};var getComputedWidth=function(el){var w=Math.max(el.offsetWidth,el.clientWidth);if(!w){w=parseInt(SL.getStyle(el,"width"),10)||0;if(!isBorderBox){w+=parseInt(SL.getStyle(el,"padding-left"),10)+parseInt(SL.getStyle(el,"padding-right"),10)+parseInt(SL.getStyle(el,"border-left-width"),10)+parseInt(SL.getStyle(el,"border-right-width"),10)}}return w};var getPlayerType=function(url){if(RE.img.test(url)){return"img"}var match=url.match(RE.domain);var this_domain=match?document.domain==match[1]:false;if(url.indexOf("#")>-1&&this_domain){return"inline"}var q_index=url.indexOf("?");if(q_index>-1){url=url.substring(0,q_index)}if(RE.swf.test(url)){return plugins.fla?"swf":"unsupported-swf"}if(RE.flv.test(url)){return plugins.fla?"flv":"unsupported-flv"}if(RE.qt.test(url)){return plugins.qt?"qt":"unsupported-qt"}if(RE.wmp.test(url)){if(plugins.wmp){return"wmp"}else{if(plugins.f4m){return"qt"}else{return isMac?(plugins.qt?"unsupported-f4m":"unsupported-qtf4m"):"unsupported-wmp"}}}else{if(RE.qtwmp.test(url)){if(plugins.qt){return"qt"}else{if(plugins.wmp){return"wmp"}else{return isMac?"unsupported-qt":"unsupported-qtwmp"}}}else{if(!this_domain||RE.iframe.test(url)){return"iframe"}}}return"unsupported"};var handleClick=function(ev){var link;if(isLink(this)){link=this}else{link=SL.getTarget(ev);while(!isLink(link)&&link.parentNode){link=link.parentNode}}Shadowbox.open(link);if(current_gallery.length){SL.preventDefault(ev)}};var setupGallery=function(obj){var copy=apply({},obj);if(!obj.gallery){current_gallery=[copy];current=0}else{current_gallery=[];var index,ci;for(var i=0,len=cache.length;i<len;++i){ci=cache[i];if(ci.gallery){if(ci.content==obj.content&&ci.gallery==obj.gallery&&ci.title==obj.title){index=current_gallery.length}if(ci.gallery==obj.gallery){current_gallery.push(apply({},ci))}}}if(index==null){current_gallery.unshift(copy);index=0}current=index}var match,r;for(var i=0,len=current_gallery.length;i<len;++i){r=false;if(current_gallery[i].type=="unsupported"){r=true}else{if(match=RE.unsupported.exec(current_gallery[i].type)){if(options.handleUnsupported=="link"){current_gallery[i].type="html";var m;switch(match[1]){case"qtwmp":m=String.format(options.text.errors.either,options.errors.qt.url,options.errors.qt.name,options.errors.wmp.url,options.errors.wmp.name);break;case"qtf4m":m=String.format(options.text.errors.shared,options.errors.qt.url,options.errors.qt.name,options.errors.f4m.url,options.errors.f4m.name);break;default:if(match[1]=="swf"||match[1]=="flv"){match[1]="fla"}m=String.format(options.text.errors.single,options.errors[match[1]].url,options.errors[match[1]].name)}current_gallery[i]=apply(current_gallery[i],{height:160,width:320,content:'<div class="shadowbox_message">'+m+"</div>"})}else{r=true}}else{if(current_gallery[i].type=="inline"){var match=RE.inline.exec(current_gallery[i].content);if(match){var el;if(el=SL.get(match[1])){current_gallery[i].content=el.innerHTML}else{throw"No element found with id "+match[1]}}else{throw"No element id found for inline content"}}}}if(r){current_gallery.splice(i,1);if(i<current){--current}--i}}};var buildBars=function(){var link=current_gallery[current];if(!link){return}var title_i=SL.get("shadowbox_title_inner");title_i.innerHTML=(link.title)?link.title:"";var tool_i=SL.get("shadowbox_toolbar_inner");tool_i.innerHTML="";if(options.displayNav){tool_i.innerHTML=String.format(options.skin.close,options.text.close);if(current_gallery.length>1){if(options.continuous){appendHTML(tool_i,String.format(options.skin.next,options.text.next));appendHTML(tool_i,String.format(options.skin.prev,options.text.prev))}else{if((current_gallery.length-1)>current){appendHTML(tool_i,String.format(options.skin.next,options.text.next))}if(current>0){appendHTML(tool_i,String.format(options.skin.prev,options.text.prev))}}}}if(current_gallery.length>1&&options.displayCounter){var counter="";if(options.counterType=="skip"){for(var i=0,len=current_gallery.length;i<len;++i){counter+='<a href="javascript:Shadowbox.change('+i+');"';if(i==current){counter+=' class="shadowbox_counter_current"'}counter+=">"+(i+1)+"</a>"}}else{counter=(current+1)+" of "+current_gallery.length}appendHTML(tool_i,String.format(options.skin.counter,counter))}};var hideBars=function(callback){var title_m=getComputedHeight(SL.get("shadowbox_title"));var tool_m=0-getComputedHeight(SL.get("shadowbox_toolbar"));var title_i=SL.get("shadowbox_title_inner");var tool_i=SL.get("shadowbox_toolbar_inner");if(options.animate&&callback){SL.animate(title_i,{marginTop:{to:title_m}},0.2);SL.animate(tool_i,{marginTop:{to:tool_m}},0.2,callback)}else{SL.setStyle(title_i,"marginTop",title_m+"px");SL.setStyle(tool_i,"marginTop",tool_m+"px")}};var showBars=function(callback){var title_i=SL.get("shadowbox_title_inner");if(options.animate){if(title_i.innerHTML!=""){SL.animate(title_i,{marginTop:{to:0}},0.35)}SL.animate(SL.get("shadowbox_toolbar_inner"),{marginTop:{to:0}},0.35,callback)}else{if(title_i.innerHTML!=""){SL.setStyle(title_i,"margin-top","0px")}SL.setStyle(SL.get("shadowbox_toolbar_inner"),"margin-top","0px");callback()}};var resetDrag=function(){drag={x:0,y:0,start_x:null,start_y:null}};var toggleDrag=function(on){if(on){resetDrag();var styles=["position:absolute","cursor:"+(isGecko?"-moz-grab":"move")];styles.push(isIE?"background-color:#fff;filter:alpha(opacity=0)":"background-color:transparent");appendHTML("shadowbox_body_inner",'<div id="shadowbox_drag_layer" style="'+styles.join(";")+'"></div>');SL.addEvent(SL.get("shadowbox_drag_layer"),"mousedown",listenDrag)}else{var d=SL.get("shadowbox_drag_layer");if(d){SL.removeEvent(d,"mousedown",listenDrag);SL.remove(d)}}};var listenDrag=function(ev){drag.start_x=ev.clientX;drag.start_y=ev.clientY;draggable=SL.get("shadowbox_content");SL.addEvent(document,"mousemove",positionDrag);SL.addEvent(document,"mouseup",unlistenDrag);if(isGecko){SL.setStyle(SL.get("shadowbox_drag_layer"),"cursor","-moz-grabbing")}};var unlistenDrag=function(){SL.removeEvent(document,"mousemove",positionDrag);SL.removeEvent(document,"mouseup",unlistenDrag);if(isGecko){SL.setStyle(SL.get("shadowbox_drag_layer"),"cursor","-moz-grab")}};var positionDrag=function(ev){var move_y=ev.clientY-drag.start_y;drag.start_y=drag.start_y+move_y;drag.y=Math.max(Math.min(0,drag.y+move_y),current_height-optimal_height);SL.setStyle(draggable,"top",drag.y+"px");var move_x=ev.clientX-drag.start_x;drag.start_x=drag.start_x+move_x;drag.x=Math.max(Math.min(0,drag.x+move_x),current_width-optimal_width);SL.setStyle(draggable,"left",drag.x+"px")};var loadContent=function(){var obj=current_gallery[current];if(!obj){return}buildBars();switch(obj.type){case"img":preloader=new Image();preloader.onload=function(){var h=obj.height?parseInt(obj.height,10):preloader.height;var w=obj.width?parseInt(obj.width,10):preloader.width;resizeContent(h,w,function(dims){showBars(function(){setContent({tag:"img",height:dims.i_height,width:dims.i_width,src:obj.content,style:"position:absolute"});if(dims.enableDrag&&options.handleLgImages=="drag"){toggleDrag(true);SL.setStyle(SL.get("shadowbox_drag_layer"),{height:dims.i_height+"px",width:dims.i_width+"px"})}finishContent()})});preloader.onload=function(){}};preloader.src=obj.content;break;case"swf":case"flv":case"qt":case"wmp":var markup=Shadowbox.movieMarkup(obj);resizeContent(markup.height,markup.width,function(){showBars(function(){setContent(markup);finishContent()})});break;case"iframe":var h=obj.height?parseInt(obj.height,10):SL.getViewportHeight();var w=obj.width?parseInt(obj.width,10):SL.getViewportWidth();var content={tag:"iframe",name:"shadowbox_content",height:"100%",width:"100%",frameborder:"0",marginwidth:"0",marginheight:"0",scrolling:"auto"};resizeContent(h,w,function(dims){showBars(function(){setContent(content);var win=(isIE)?SL.get("shadowbox_content").contentWindow:window.frames["shadowbox_content"];win.location=obj.content;finishContent()})});break;case"html":case"inline":var h=obj.height?parseInt(obj.height,10):SL.getViewportHeight();var w=obj.width?parseInt(obj.width,10):SL.getViewportWidth();var content={tag:"div",cls:"html",html:obj.content};resizeContent(h,w,function(){showBars(function(){setContent(content);finishContent()})});break;default:throw"Shadowbox cannot open content of type "+obj.type}if(current_gallery.length>0){var next=current_gallery[current+1];if(!next){next=current_gallery[0]}if(next.type=="img"){var preload_next=new Image();preload_next.src=next.href}var prev=current_gallery[current-1];if(!prev){prev=current_gallery[current_gallery.length-1]}if(prev.type=="img"){var preload_prev=new Image();preload_prev.src=prev.href}}};var setContent=function(obj){var id="shadowbox_content";var content=SL.get(id);if(content){switch(content.tagName.toUpperCase()){case"OBJECT":var link=current_gallery[(obj?current-1:current)];if(link.type=="wmp"&&isIE){try{shadowbox_content.controls.stop();shadowbox_content.URL="non-existent.wmv";window.shadowbox_content=function(){}}catch(e){}}else{if(link.type=="qt"&&isSafari){try{document.shadowbox_content.Stop()}catch(e){}content.innerHTML=""}}setTimeout(function(){SL.remove(content)},10);break;case"IFRAME":SL.remove(content);if(isGecko){delete window.frames[id]}break;default:SL.remove(content)}}if(obj){if(!obj.id){obj.id=id}return appendHTML("shadowbox_body_inner",Shadowbox.createHTML(obj))}return null};var finishContent=function(){var obj=current_gallery[current];if(!obj){return}hideLoading(function(){listenKeyboard(true);if(options.onFinish&&typeof options.onFinish=="function"){options.onFinish(obj)}})};var resizeContent=function(height,width,callback){optimal_height=height;optimal_width=width;var resizable=RE.resize.test(current_gallery[current].type);var dims=getDimensions(optimal_height,optimal_width,resizable);if(callback){var cb=function(){callback(dims)};switch(options.animSequence){case"hw":adjustHeight(dims.height,dims.top,true,function(){adjustWidth(dims.width,true,cb)});break;case"wh":adjustWidth(dims.width,true,function(){adjustHeight(dims.height,dims.top,true,cb)});break;default:adjustWidth(dims.width,true);adjustHeight(dims.height,dims.top,true,cb)}}else{adjustWidth(dims.width,false);adjustHeight(dims.height,dims.top,false);if(options.handleLgImages=="resize"&&resizable){var content=SL.get("shadowbox_content");if(content){content.height=dims.i_height;content.width=dims.i_width}}}};var getDimensions=function(o_height,o_width,resizable){if(typeof resizable=="undefined"){resizable=false}var height=o_height=parseInt(o_height);var width=o_width=parseInt(o_width);var shadowbox_b=SL.get("shadowbox_body");var view_height=SL.getViewportHeight();var extra_height=parseInt(SL.getStyle(shadowbox_b,"border-top-width"),10)+parseInt(SL.getStyle(shadowbox_b,"border-bottom-width"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-top"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-bottom"),10)+getComputedHeight(SL.get("shadowbox_title"))+getComputedHeight(SL.get("shadowbox_toolbar"))+(2*options.viewportPadding);if((height+extra_height)>=view_height){height=view_height-extra_height}var view_width=SL.getViewportWidth();var extra_body_width=parseInt(SL.getStyle(shadowbox_b,"border-left-width"),10)+parseInt(SL.getStyle(shadowbox_b,"border-right-width"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-left"),10)+parseInt(SL.getStyle(shadowbox_b,"margin-right"),10);var extra_width=extra_body_width+(2*options.viewportPadding);if((width+extra_width)>=view_width){width=view_width-extra_width}var enableDrag=false;var i_height=o_height;var i_width=o_width;var handle=options.handleLgImages;if(resizable&&(handle=="resize"||handle=="drag")){var change_h=(o_height-height)/o_height;var change_w=(o_width-width)/o_width;if(handle=="resize"){if(change_h>change_w){width=Math.round((o_width/o_height)*height)}else{if(change_w>change_h){height=Math.round((o_height/o_width)*width)}}i_width=width;i_height=height}else{var link=current_gallery[current];if(link){enableDrag=link.type=="img"&&(change_h>0||change_w>0)}}}return{height:height,width:width+extra_body_width,i_height:i_height,i_width:i_width,top:((view_height-(height+extra_height))/2)+options.viewportPadding,enableDrag:enableDrag}};var centerVertically=function(){var shadowbox=SL.get("shadowbox");var scroll=document.documentElement.scrollTop;var s_top=scroll+Math.round((SL.getViewportHeight()-(shadowbox.offsetHeight||0))/2);SL.setStyle(shadowbox,"top",s_top+"px")};var adjustHeight=function(height,top,animate,callback){height=parseInt(height);current_height=height;var sbi=SL.get("shadowbox_body_inner");if(animate&&options.animate){SL.animate(sbi,{height:{to:height}},options.resizeDuration,callback)}else{SL.setStyle(sbi,"height",height+"px");if(typeof callback=="function"){callback()}}if(absolute_pos){centerVertically();SL.addEvent(window,"scroll",centerVertically);top+=document.documentElement.scrollTop}var shadowbox=SL.get("shadowbox");if(animate&&options.animate){SL.animate(shadowbox,{top:{to:top}},options.resizeDuration)}else{SL.setStyle(shadowbox,"top",top+"px")}};var adjustWidth=function(width,animate,callback){width=parseInt(width);current_width=width;var shadowbox=SL.get("shadowbox");if(animate&&options.animate){SL.animate(shadowbox,{width:{to:width}},options.resizeDuration,callback)}else{SL.setStyle(shadowbox,"width",width+"px");if(typeof callback=="function"){callback()}}};var listenKeyboard=function(on){if(!options.enableKeys){return}if(on){document.onkeydown=handleKey}else{document.onkeydown=""}};var assertKey=function(valid,key,code){return(valid.indexOf(key)!=-1||valid.indexOf(code)!=-1)};var handleKey=function(e){var code=e?e.which:event.keyCode;var key=String.fromCharCode(code).toLowerCase();if(assertKey(options.keysClose,key,code)){Shadowbox.close()}else{if(assertKey(options.keysPrev,key,code)){Shadowbox.previous()}else{if(assertKey(options.keysNext,key,code)){Shadowbox.next()}}}};var toggleTroubleElements=function(on){var vis=(on?"visible":"hidden");var selects=document.getElementsByTagName("select");for(i=0,len=selects.length;i<len;++i){selects[i].style.visibility=vis}var objects=document.getElementsByTagName("object");for(i=0,len=objects.length;i<len;++i){objects[i].style.visibility=vis}var embeds=document.getElementsByTagName("embed");for(i=0,len=embeds.length;i<len;++i){embeds[i].style.visibility=vis}};var showLoading=function(){var loading=SL.get("shadowbox_loading");overwriteHTML(loading,String.format(options.skin.loading,options.assetURL+options.loadingImage,options.text.loading,options.text.cancel));loading.style.visibility="visible"};var hideLoading=function(callback){var t=current_gallery[current].type;var anim=(t=="img"||t=="html");var loading=SL.get("shadowbox_loading");if(anim){fadeOut(loading,0.35,callback)}else{loading.style.visibility="hidden";callback()}};var resizeOverlay=function(){var overlay=SL.get("shadowbox_overlay");SL.setStyle(overlay,{height:"100%",width:"100%"});SL.setStyle(overlay,"height",SL.getDocumentHeight()+"px");if(!isSafari3){SL.setStyle(overlay,"width",SL.getDocumentWidth()+"px")}};var checkOverlayImgNeeded=function(){if(!(isGecko&&isMac)){return false}for(var i=0,len=current_gallery.length;i<len;++i){if(!RE.overlay.exec(current_gallery[i].type)){return true}}return false};var toggleOverlay=function(callback){var overlay=SL.get("shadowbox_overlay");if(overlay_img_needed==null){overlay_img_needed=checkOverlayImgNeeded()}if(callback){resizeOverlay();if(overlay_img_needed){SL.setStyle(overlay,{visibility:"visible",backgroundColor:"transparent",backgroundImage:"url("+options.assetURL+options.overlayBgImage+")",backgroundRepeat:"repeat",opacity:1});callback()}else{SL.setStyle(overlay,{visibility:"visible",backgroundColor:options.overlayColor,backgroundImage:"none"});fadeIn(overlay,options.overlayOpacity,options.fadeDuration,callback)}}else{if(overlay_img_needed){SL.setStyle(overlay,"visibility","hidden")}else{fadeOut(overlay,options.fadeDuration)}overlay_img_needed=null}};Shadowbox.init=function(opts){if(initialized){return}options=apply(options,opts||{});appendHTML(document.body,options.skin.main);RE.img=new RegExp(".("+options.ext.img.join("|")+")s*$","i");RE.qt=new RegExp(".("+options.ext.qt.join("|")+")s*$","i");RE.wmp=new RegExp(".("+options.ext.wmp.join("|")+")s*$","i");RE.qtwmp=new RegExp(".("+options.ext.qtwmp.join("|")+")s*$","i");RE.iframe=new RegExp(".("+options.ext.iframe.join("|")+")s*$","i");var id=null;var resize=function(){clearInterval(id);id=null;resizeOverlay();resizeContent(optimal_height,optimal_width)};SL.addEvent(window,"resize",function(){if(activated){if(id){clearInterval(id);id=null}if(!id){id=setInterval(resize,50)}}});if(options.listenOverlay){SL.addEvent(SL.get("shadowbox_overlay"),"click",Shadowbox.close)}if(absolute_pos){SL.setStyle(SL.get("shadowbox_container"),"position","absolute");SL.setStyle("shadowbox_body","zoom",1);SL.addEvent(SL.get("shadowbox_container"),"click",function(e){var target=SL.getTarget(e);if(target.id&&target.id=="shadowbox_container"){Shadowbox.close()}})}if(!options.skipSetup){Shadowbox.setup()}initialized=true};Shadowbox.setup=function(links,opts){if(!links){var links=[];var a=document.getElementsByTagName("a"),rel;for(var i=0,len=a.length;i<len;++i){rel=a[i].getAttribute("rel");if(rel&&RE.rel.test(rel)){links[links.length]=a[i]}}}else{if(!links.length){links=[links]}}var link;for(var i=0,len=links.length;i<len;++i){link=links[i];if(typeof link.shadowboxCacheKey=="undefined"){link.shadowboxCacheKey=cache.length;SL.addEvent(link,"click",handleClick)}cache[link.shadowboxCacheKey]=this.buildCacheObj(link,opts)}};Shadowbox.buildCacheObj=function(link,opts){var href=link.href;var o={el:link,title:link.getAttribute("title"),type:getPlayerType(href),options:apply({},opts||{}),content:href};var opt,l_opts=["title","type","height","width","gallery"];for(var i=0,len=l_opts.length;i<len;++i){opt=l_opts[i];if(typeof o.options[opt]!="undefined"){o[opt]=o.options[opt];delete o.options[opt]}}var rel=link.getAttribute("rel");if(rel){var match=rel.match(RE.gallery);if(match){o.gallery=escape(match[2])}var params=rel.split(";");for(var i=0,len=params.length;i<len;++i){match=params[i].match(RE.param);if(match){if(match[1]=="options"){eval("o.options = apply(o.options, "+match[2]+")")}else{o[match[1]]=match[2]}}}}return o};Shadowbox.applyOptions=function(opts){if(opts){default_options=apply({},options);options=apply(options,opts)}};Shadowbox.revertOptions=function(){if(default_options){options=default_options;default_options=null}};Shadowbox.open=function(obj,opts){if(activated){return}activated=true;if(isLink(obj)){if(typeof obj.shadowboxCacheKey=="undefined"||typeof cache[obj.shadowboxCacheKey]=="undefined"){obj=this.buildCacheObj(obj,opts)}else{obj=cache[obj.shadowboxCacheKey]}}this.revertOptions();if(obj.options||opts){this.applyOptions(apply(apply({},obj.options||{}),opts||{}))}setupGallery(obj);if(current_gallery.length){if(options.onOpen&&typeof options.onOpen=="function"){options.onOpen(obj)}SL.setStyle(SL.get("shadowbox"),"display","block");toggleTroubleElements(false);var dims=getDimensions(options.initialHeight,options.initialWidth);adjustHeight(dims.height,dims.top);adjustWidth(dims.width);hideBars(false);toggleOverlay(function(){SL.setStyle(SL.get("shadowbox"),"visibility","visible");showLoading();loadContent()})}};Shadowbox.change=function(num){if(!current_gallery){return}if(!current_gallery[num]){if(!options.continuous){return}else{num=(num<0)?(current_gallery.length-1):0}}current=num;toggleDrag(false);setContent(null);listenKeyboard(false);if(options.onChange&&typeof options.onChange=="function"){options.onChange(current_gallery[current])}showLoading();hideBars(loadContent)};Shadowbox.next=function(){return this.change(current+1)};Shadowbox.previous=function(){return this.change(current-1)};Shadowbox.close=function(){if(!activated){return}listenKeyboard(false);SL.setStyle(SL.get("shadowbox"),{display:"none",visibility:"hidden"});if(absolute_pos){SL.removeEvent(window,"scroll",centerVertically)}toggleDrag(false);setContent(null);if(preloader){preloader.onload=function(){};preloader=null}toggleOverlay(false);toggleTroubleElements(true);if(options.onClose&&typeof options.onClose=="function"){options.onClose(current_gallery[current])}activated=false};Shadowbox.clearCache=function(){for(var i=0,len=cache.length;i<len;++i){if(cache[i].el){SL.removeEvent(cache[i].el,"click",handleClick);delete cache[i].shadowboxCacheKey}}cache=[]};Shadowbox.movieMarkup=function(obj){var h=obj.height?parseInt(obj.height,10):300;var w=obj.width?parseInt(obj.width,10):300;var autoplay=options.autoplayMovies;var controls=options.showMovieControls;if(obj.options){if(obj.options.autoplayMovies!=null){autoplay=obj.options.autoplayMovies}if(obj.options.showMovieControls!=null){controls=obj.options.showMovieControls}}var markup={tag:"object",name:"shadowbox_content"};switch(obj.type){case"swf":var dims=getDimensions(h,w,true);h=dims.height;w=dims.width;markup.type="application/x-shockwave-flash";markup.data=obj.content;markup.children=[{tag:"param",name:"movie",value:obj.content}];break;case"flv":autoplay=autoplay?"true":"false";var showicons="false";var a=h/w;if(controls){showicons="true";h+=20}var dims=getDimensions(h,h/a,true);h=dims.height;w=(h-(controls?20:0))/a;var flashvars=["file="+obj.content,"height="+h,"width="+w,"autostart="+autoplay,"displayheight="+(h-(controls?20:0)),"showicons="+showicons,"backcolor=0x000000&amp;frontcolor=0xCCCCCC&amp;lightcolor=0x557722"];markup.type="application/x-shockwave-flash";markup.data=options.assetURL+options.flvPlayer;markup.children=[{tag:"param",name:"movie",value:options.assetURL+options.flvPlayer},{tag:"param",name:"flashvars",value:flashvars.join("&amp;")},{tag:"param",name:"allowfullscreen",value:"true"}];break;case"qt":autoplay=autoplay?"true":"false";if(controls){controls="true";h+=16}else{controls="false"}markup.children=[{tag:"param",name:"src",value:obj.content},{tag:"param",name:"scale",value:"aspect"},{tag:"param",name:"controller",value:controls},{tag:"param",name:"autoplay",value:autoplay}];if(isIE){markup.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";markup.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"}else{markup.type="video/quicktime";markup.data=obj.content}break;case"wmp":autoplay=autoplay?1:0;markup.children=[{tag:"param",name:"autostart",value:autoplay}];if(isIE){if(controls){controls="full";h+=70}else{controls="none"}markup.classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6";markup.children[markup.children.length]={tag:"param",name:"url",value:obj.content};markup.children[markup.children.length]={tag:"param",name:"uimode",value:controls}}else{if(controls){controls=1;h+=45}else{controls=0}markup.type="video/x-ms-wmv";markup.data=obj.content;markup.children[markup.children.length]={tag:"param",name:"showcontrols",value:controls}}break}markup.height=h;markup.width=w;return markup};Shadowbox.createHTML=function(obj){var html="<"+obj.tag;for(var attr in obj){if(attr=="tag"||attr=="html"||attr=="children"){continue}if(attr=="cls"){html+=' class="'+obj["cls"]+'"'}else{html+=" "+attr+'="'+obj[attr]+'"'}}if(RE.empty.test(obj.tag)){html+="/>\n"}else{html+=">\n";var cn=obj.children;if(cn){for(var i=0,len=cn.length;i<len;++i){html+=this.createHTML(cn[i])}}if(obj.html){html+=obj.html}html+="</"+obj.tag+">\n"}return html};Shadowbox.getPlugins=function(){return plugins};Shadowbox.getOptions=function(){return options};Shadowbox.getCurrent=function(){return current_gallery[current]};Shadowbox.getVersion=function(){return version}})();Array.prototype.indexOf=Array.prototype.indexOf||function(C){for(var B=0,A=this.length;B<A;++B){if(this[B]==C){return B}}return-1};String.format=String.format||function(B){var A=Array.prototype.slice.call(arguments,1);return B.replace(/\{(\d+)\}/g,function(C,D){return A[D]})};function hexa(dec){var Char_hexadecimales="0123456789ABCDEF";var low1=dec%16;var low2=(dec-low1)/16%16;var low3=dec/(16*16)%16;var low4=dec/(16*16*16)%16;var low5=dec/(16*16*16*16)%16;var low6=dec/(16*16*16*16*16)%16;hex=""+Char_hexadecimales.charAt(low6)+Char_hexadecimales.charAt(low5)+Char_hexadecimales.charAt(low4)+Char_hexadecimales.charAt(low3)+Char_hexadecimales.charAt(low2)+Char_hexadecimales.charAt(low1);return hex;}
var bkExtend=function(){var A=arguments;if(A.length==1){A=[this,A[0]]}for(var B in A[1]){A[0][B]=A[1][B]}return A[0]};function bkClass(){}bkClass.prototype.construct=function(){};bkClass.extend=function(C){var A=function(){if(arguments[0]!==bkClass){return this.construct.apply(this,arguments)}};var B=new this(bkClass);bkExtend(B,C);A.prototype=B;A.extend=this.extend;return A};var bkElement=bkClass.extend({construct:function(A){if(typeof(A)=="string"){A=document.createElement(A)}A=$BK(A);return A},appendTo:function(A){A.appendChild(this);return this},appendBefore:function(A){A.parentNode.insertBefore(this,A);return this},addEvent:function(B,A){bkLib.addEvent(this,B,A);return this},setContent:function(A){this.innerHTML=A;return this},pos:function(){var C=curtop=0;var B=obj=this;if(obj.offsetParent){do{C+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}var A=(!window.opera)?parseInt(this.getStyle("border-width")||this.style.border)||0:0;return[C+A,curtop+A+this.offsetHeight]},noSelect:function(){bkLib.noSelect(this);return this},parentTag:function(A){var B=this;do{if(B&&B.nodeName&&B.nodeName.toUpperCase()==A){return B}B=B.parentNode}while(B);return false},hasClass:function(A){return this.className.match(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)"))},addClass:function(A){if(!this.hasClass(A)){this.className+=" nicEdit-"+A}return this},removeClass:function(A){if(this.hasClass(A)){this.className=this.className.replace(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)")," ")}return this},setStyle:function(A){var B=this.style;for(var C in A){switch(C){case"float":B.cssFloat=B.styleFloat=A[C];break;case"opacity":B.opacity=A[C];B.filter="alpha(opacity="+Math.round(A[C]*100)+")";break;case"className":this.className=A[C];break;default:B[C]=A[C]}}return this},getStyle:function(A,C){var B=(!C)?document.defaultView:C;if(this.nodeType==1){return(B&&B.getComputedStyle)?B.getComputedStyle(this,null).getPropertyValue(A):this.currentStyle[bkLib.camelize(A)]}},remove:function(){this.parentNode.removeChild(this);return this},setAttributes:function(A){for(var B in A){this[B]=A[B]}return this}});var bkLib={isMSIE:(navigator.appVersion.indexOf("MSIE")!=-1),addEvent:function(C,B,A){(C.addEventListener)?C.addEventListener(B,A,false):C.attachEvent("on"+B,A)},toArray:function(C){var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A},noSelect:function(B){if(B.setAttribute&&B.nodeName.toLowerCase()!="input"&&B.nodeName.toLowerCase()!="textarea"){B.setAttribute("unselectable","on")}for(var A=0;A<B.childNodes.length;A++){bkLib.noSelect(B.childNodes[A])}},camelize:function(A){return A.replace(/\-(.)/g,function(B,C){return C.toUpperCase()})},inArray:function(A,B){return(bkLib.search(A,B)!=null)},search:function(A,C){for(var B=0;B<A.length;B++){if(A[B]==C){return B}}return null},cancelEvent:function(A){A=A||window.event;if(A.preventDefault&&A.stopPropagation){A.preventDefault();A.stopPropagation()}return false},domLoad:[],domLoaded:function(){if(arguments.callee.done){return}arguments.callee.done=true;for(i=0;i<bkLib.domLoad.length;i++){bkLib.domLoad[i]()}},onDomLoaded:function(A){this.domLoad.push(A);if(document.addEventListener){document.addEventListener("DOMContentLoaded",bkLib.domLoaded,null)}else{if(bkLib.isMSIE){document.write("<script id=__ie_onload defer "+((location.protocol=="https:")?"src='javascript:void(0)'":"src=//0")+"><\/script>");$BK("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){bkLib.domLoaded()}}}}window.onload=bkLib.domLoaded}};function $BK(A){if(typeof(A)=="string"){A=document.getElementById(A)}return(A&&!A.appendTo)?bkExtend(A,bkElement.prototype):A}var bkEvent={addEvent:function(A,B){if(B){this.eventList=this.eventList||{};this.eventList[A]=this.eventList[A]||[];this.eventList[A].push(B)}return this},fireEvent:function(){var A=bkLib.toArray(arguments),C=A.shift();if(this.eventList&&this.eventList[C]){for(var B=0;B<this.eventList[C].length;B++){this.eventList[C][B].apply(this,A)}}}};function __(A){return A}Function.prototype.closure=function(){var A=this,B=bkLib.toArray(arguments),C=B.shift();return function(){if(typeof(bkLib)!="undefined"){return A.apply(C,B.concat(bkLib.toArray(arguments)))}}};Function.prototype.closureListener=function(){var A=this,C=bkLib.toArray(arguments),B=C.shift();return function(E){E=E||window.event;if(E.target){var D=E.target}else{var D=E.srcElement}return A.apply(B,[E,D].concat(C))}};var nicEditorConfig=bkClass.extend({buttons:{'bold':{name:__('Click para negrita'),command:'Bold',tags:['B','STRONG'],css:{'font-weight':'bold'},key:'b'},'italic':{name:__('Click para cursiva'),command:'Italic',tags:['EM','I'],css:{'font-style':'italic'},key:'i'},'underline':{name:__('Click to Underline'),command:'Underline',tags:['U'],css:{'text-decoration':'underline'},key:'u'},'left':{name:__('Izquierda'),command:'justifyleft',noActive:true},'center':{name:__('Centrado'),command:'justifycenter',noActive:true},'right':{name:__('Derecha'),command:'justifyright',noActive:true},'ol':{name:__('Insert Ordered List'),command:'insertorderedlist',tags:['OL']},'ul':{name:__('Insert Unordered List'),command:'insertunorderedlist',tags:['UL']},'subscript':{name:__('Click to Subscript'),command:'subscript',tags:['SUB']},'superscript':{name:__('Click to Superscript'),command:'superscript',tags:['SUP']},'strikethrough':{name:__('Click to Strike Through'),command:'strikeThrough',css:{'text-decoration':'line-through'}},'indent':{name:__('Indent Text'),command:'indent',noActive:true},'outdent':{name:__('Remove Indent'),command:'outdent',noActive:true},'hr':{name:__('Horizontal Rule'),command:'insertHorizontalRule',noActive:true}},iconsPath:'/WEBS/GLOBAL/FUNCIONES/js/nicedit/nicEditorIcons.gif',buttonList:['bold','italic','underline','left','center','right','ol','ul','fontSize','fontFamily','fontFormat','indent','outdent','link','image'],iconList:{"bgcolor":1,"forecolor":2,"bold":3,"center":4,"hr":5,"indent":6,"italic":7,"justify":8,"left":9,"ol":10,"outdent":11,"right":12,"save":13,"strikethrough":14,"subscript":15,"superscript":16,"ul":17,"underline":18,"image":19,"link":20,"unlink":21,"close":22,"arrow":23}});;var nicEditors={nicPlugins:[],editors:[],registerPlugin:function(B,A){this.nicPlugins.push({p:B,o:A})},allTextAreas:function(C){var A=document.getElementsByTagName("textarea");for(var B=0;B<A.length;B++){nicEditors.editors.push(new nicEditor(C).panelInstance(A[B]))}return nicEditors.editors},findEditor:function(C){var B=nicEditors.editors;for(var A=0;A<B.length;A++){if(B[A].instanceById(C)){return B[A]}}}};var nicEditor=bkClass.extend({construct:function(C){this.options=new nicEditorConfig();bkExtend(this.options,C);this.nicInstances=new Array();this.loadedPlugins=new Array();var A=nicEditors.nicPlugins;for(var B=0;B<A.length;B++){this.loadedPlugins.push(new A[B].p(this,A[B].o))}nicEditors.editors.push(this);bkLib.addEvent(document.body,"mousedown",this.selectCheck.closureListener(this))},panelInstance:function(B,C){B=this.checkReplace($BK(B));var A=new bkElement("DIV").setStyle({width:(parseInt(B.getStyle("width"))||B.clientWidth)+"px"}).appendBefore(B);this.setPanel(A);return this.addInstance(B,C)},checkReplace:function(B){var A=nicEditors.findEditor(B);if(A){A.removeInstance(B);A.removePanel()}return B},addInstance:function(B,C){B=this.checkReplace($BK(B));if(B.contentEditable||!!window.opera){var A=new nicEditorInstance(B,C,this)}else{var A=new nicEditorIFrameInstance(B,C,this)}this.nicInstances.push(A);this.fireEvent("add",A);return this},removeInstance:function(C){C=$BK(C);var B=this.nicInstances;for(var A=0;A<B.length;A++){if(B[A].e==C){B[A].remove();this.nicInstances.splice(A,1)}}},removePanel:function(A){if(this.nicPanel){this.nicPanel.remove();this.nicPanel=null}},instanceById:function(C){C=$BK(C);var B=this.nicInstances;for(var A=0;A<B.length;A++){if(B[A].e==C){return B[A]}}},setPanel:function(A){this.nicPanel=new nicEditorPanel($BK(A),this.options,this);this.fireEvent("panel",this.nicPanel);return this},nicCommand:function(B,A){if(this.selectedInstance){this.selectedInstance.nicCommand(B,A)}},getIcon:function(D,A){var C=this.options.iconList[D];var B=(A.iconFiles)?A.iconFiles[D]:"";return{backgroundImage:"url('"+((C)?this.options.iconsPath:B)+"')",backgroundPosition:((C)?((C-1)*-18):0)+"px 0px"}},selectCheck:function(C,A){var B=false;do{if(A.className&&A.className.indexOf("nicEdit")!=-1){return false}}while(A=A.parentNode);this.fireEvent("blur",this.selectedInstance,A);this.lastSelectedInstance=this.selectedInstance;this.selectedInstance=null;return false}});nicEditor=nicEditor.extend(bkEvent);var nicEditorInstance=bkClass.extend({isSelected:false,construct:function(F,D,C){this.ne=C;this.elm=this.e=F;this.options=D||{};newX=parseInt(F.getStyle("width"))||F.clientWidth;newY=parseInt(F.getStyle("height"))||F.clientHeight;this.initialHeight=newY-8;var G=(F.nodeName.toLowerCase()=="textarea");if(G||this.options.hasPanel){this.editorContain=new bkElement("DIV").setStyle({width:newX+"px",border:"1px solid #ccc",borderTop:0,overflowY:"auto",overflowX:"hidden",maxHeight:(this.ne.options.maxHeight)?this.ne.options.maxHeight+"px":null}).appendBefore(F);var A=new bkElement("DIV").setStyle({width:(newX-8)+"px",margin:"4px",minHeight:newY+"px"}).addClass("main").appendTo(this.editorContain);F.setStyle({display:"none"});if(G){A.setContent(F.value);this.copyElm=F;while(F=F.parentNode){if(F.nodeName=="FORM"){bkLib.addEvent(F,"submit",this.saveContent.closure(this))}}}else{A.innerHTML=F.innerHTML}var B=(bkLib.isMSIE&&!((typeof document.body.style.maxHeight!="undefined")&&document.compatMode=="CSS1Compat"));A.setStyle((B)?{height:newY+"px"}:{overflow:"hidden"});this.elm=A}this.ne.addEvent("blur",this.blur.closure(this));this.init();this.blur();try{this.nicCommand("styleWithCSS",true)}catch(E){}},init:function(){this.elm.setAttribute("contentEditable","true");if(this.getContent()==""){this.setContent("<br />")}this.instanceDoc=document.defaultView;this.elm.addEvent("mousedown",this.selected.closureListener(this)).addEvent("keypress",this.keyDown.closureListener(this)).addEvent("focus",this.selected.closure(this)).addEvent("blur",this.blur.closure(this)).addEvent("keyup",this.selected.closure(this))},remove:function(){this.saveContent();if(this.copyElm||this.options.hasPanel){this.editorContain.remove();this.e.setStyle({display:"block"});this.ne.removePanel()}this.disable();this.ne.fireEvent("removeInstance",this)},disable:function(){this.elm.setAttribute("contentEditable","false")},getSel:function(){return(window.getSelection)?window.getSelection():document.selection},getRng:function(){var A=this.getSel();if(!A){return null}return(A.rangeCount>0)?A.getRangeAt(0):A.createRange()},selRng:function(A,B){if(window.getSelection){B.removeAllRanges();B.addRange(A)}else{A.select()}},selElm:function(){var C=this.getRng();if(C.startContainer){var D=C.startContainer;if(C.cloneContents().childNodes.length==1){for(var B=0;B<D.childNodes.length;B++){var A=D.childNodes[B].ownerDocument.createRange();A.selectNode(D.childNodes[B]);if(C.compareBoundaryPoints(Range.START_TO_START,A)!=1&&C.compareBoundaryPoints(Range.END_TO_END,A)!=-1){return $BK(D.childNodes[B])}}}return $BK(D)}else{return $BK((this.getSel().type=="Control")?C.item(0):C.parentElement())}},saveRng:function(){this.savedRange=this.getRng();this.savedSel=this.getSel()},restoreRng:function(){if(this.savedRange){this.selRng(this.savedRange,this.savedSel)}},keyDown:function(C,B){if(C.keyCode==13){if(bkLib.isMSIE){var A=this.getRng();A.pasteHTML("<br />");A.collapse(false);A.select();return false}}if(C.ctrlKey){this.ne.fireEvent("key",this,C);if(C.preventDefault){C.preventDefault()}return false}},selected:function(C,A){if(!A){A=this.selElm()}if(!C.ctrlKey){var B=this.ne.selectedInstance;if(B!=this){if(B){this.ne.fireEvent("blur",B,A)}this.ne.selectedInstance=this;this.ne.fireEvent("focus",B,A)}this.ne.fireEvent("selected",B,A);this.isFocused=true;this.elm.addClass("selected")}return false},blur:function(){this.isFocused=false;this.elm.removeClass("selected")},saveContent:function(){if(this.copyElm||this.options.hasPanel){this.ne.fireEvent("save",this);(this.copyElm)?this.copyElm.value=this.getContent():this.e.innerHTML=this.getContent()}},getElm:function(){return this.elm},getContent:function(){this.content=this.getElm().innerHTML;this.ne.fireEvent("get",this);return this.content},setContent:function(A){this.content=A;this.ne.fireEvent("set",this);this.elm.innerHTML=this.content},nicCommand:function(B,A){document.execCommand(B,false,A)}});var nicEditorIFrameInstance=nicEditorInstance.extend({savedStyles:[],init:function(){var B=this.elm.innerHTML.replace(/^\s+|\s+$/g,"");this.elm.innerHTML="";(!B)?B="<br />":B;this.initialContent=B;this.elmFrame=new bkElement("iframe").setAttributes({src:"javascript:;",frameBorder:0,allowTransparency:"true",scrolling:"no"}).setStyle({height:"100px",width:"100%"}).addClass("frame").appendTo(this.elm);if(this.copyElm){this.elmFrame.setStyle({width:(this.elm.offsetWidth-4)+"px"})}var A={fontSize:"font-size",fontFamily:"font-family",fontWeight:"font-weight",color:"color"};for(itm in A){this.savedStyles[itm]=this.elm.getStyle(A[itm])}setTimeout(this.initFrame.closure(this),50)},disable:function(){this.elm.innerHTML=this.getContent()},initFrame:function(){this.frameDoc=$BK(this.elmFrame.contentWindow.document);this.frameDoc.designMode="on";this.frameDoc.open();this.frameDoc.write('<html><head></head><body id="nicEditContent" style="margin: 0 !important; background-color: transparent !important;">'+this.initialContent+"</body></html>");this.frameDoc.close();this.frameWin=$BK(this.elmFrame.contentWindow);this.frameContent=$BK(this.frameWin.document.body).setStyle(this.savedStyles);this.instanceDoc=this.frameWin.document.defaultView;this.heightUpdate();this.frameDoc.addEvent("mousedown",this.selected.closureListener(this)).addEvent("keyup",this.heightUpdate.closureListener(this)).addEvent("keydown",this.keyDown.closureListener(this)).addEvent("keyup",this.selected.closure(this))},getElm:function(){return this.frameContent},setContent:function(A){this.content=A;this.ne.fireEvent("set",this);this.frameContent.innerHTML=this.content;this.heightUpdate()},getSel:function(){return(this.frameWin)?this.frameWin.getSelection():this.frameDoc.selection},heightUpdate:function(){var A=this.frameContent.offsetHeight;this.elmFrame.style.height=Math.max(A,this.initialHeight)+"px"},nicCommand:function(B,A){this.frameDoc.execCommand(B,false,A);setTimeout(this.heightUpdate.closure(this),100)}});var nicEditorPanel=bkClass.extend({construct:function(E,B,A){this.elm=E;this.options=B;this.ne=A;this.panelButtons=new Array();this.buttonList=bkExtend([],this.ne.options.buttonList);this.panelContain=new bkElement("DIV").setStyle({overflow:"hidden",width:"100%",border:"1px solid #cccccc",backgroundColor:"#efefef"}).addClass("panelContain");this.panelElm=new bkElement("DIV").setStyle({margin:"2px",marginTop:"0px",zoom:1,overflow:"hidden"}).addClass("panel").appendTo(this.panelContain);this.panelContain.appendTo(E);var C=this.ne.options;var D=C.buttons;for(button in D){this.addButton(button,C,true)}this.reorder();E.noSelect()},addButton:function(buttonName,options,noOrder){var button=options.buttons[buttonName];var type=(button.type)?eval("(typeof("+button.type+') == "undefined") ? null : '+button.type+";"):nicEditorButton;var hasButton=bkLib.inArray(this.buttonList,buttonName);if(type&&(hasButton||this.ne.options.fullPanel)){this.panelButtons.push(new type(this.panelElm,buttonName,options,this.ne));if(!hasButton){this.buttonList.push(buttonName)}}},findButton:function(B){for(var A=0;A<this.panelButtons.length;A++){if(this.panelButtons[A].name==B){return this.panelButtons[A]}}},reorder:function(){var C=this.buttonList;for(var B=0;B<C.length;B++){var A=this.findButton(C[B]);if(A){this.panelElm.appendChild(A.margin)}}},remove:function(){this.elm.remove()}});var nicEditorButton=bkClass.extend({isDisabled:false,isHover:false,isActive:false,construct:function(D,A,C,B){this.options=C.buttons[A];this.name=A;this.ne=B;this.elm=D;this.margin=new bkElement("DIV").setStyle({"float":"left",marginTop:"2px"}).appendTo(D);this.contain=new bkElement("DIV").setStyle({width:"20px",height:"20px"}).addClass("buttonContain").appendTo(this.margin);this.border=new bkElement("DIV").setStyle({backgroundColor:"#efefef",border:"1px solid #efefef"}).appendTo(this.contain);this.button=new bkElement("DIV").setStyle({width:"18px",height:"18px",overflow:"hidden",zoom:1,cursor:"pointer"}).addClass("button").setStyle(this.ne.getIcon(A,C)).appendTo(this.border);this.button.addEvent("mouseover",this.hoverOn.closure(this)).addEvent("mouseout",this.hoverOff.closure(this)).addEvent("mousedown",this.mouseClick.closure(this)).noSelect();if(!window.opera){this.button.onmousedown=bkLib.cancelEvent;this.button.onclick=bkLib.cancelEvent}B.addEvent("selected",this.enable.closure(this)).addEvent("blur",this.disable.closure(this)).addEvent("key",this.key.closure(this));this.disable();this.init()},init:function(){},hide:function(){this.contain.setStyle({display:"none"})},updateState:function(){if(this.isDisabled){this.setBg()}else{if(this.isHover){this.setBg("hover")}else{if(this.isActive){this.setBg("active")}else{this.setBg()}}}},setBg:function(A){switch(A){case"hover":var B={border:"1px solid #666",backgroundColor:"#ddd"};break;case"active":var B={border:"1px solid #666",backgroundColor:"#ccc"};break;default:var B={border:"1px solid #efefef",backgroundColor:"#efefef"}}this.border.setStyle(B).addClass("button-"+A)},checkNodes:function(A){var B=A;do{if(this.options.tags&&bkLib.inArray(this.options.tags,B.nodeName)){this.activate();return true}}while(B=B.parentNode&&B.className!="nicEdit");B=$BK(A);while(B.nodeType==3){B=$BK(B.parentNode)}if(this.options.css){for(itm in this.options.css){if(B.getStyle(itm,this.ne.selectedInstance.instanceDoc)==this.options.css[itm]){this.activate();return true}}}this.deactivate();return false},activate:function(){if(!this.isDisabled){this.isActive=true;this.updateState();this.ne.fireEvent("buttonActivate",this)}},deactivate:function(){this.isActive=false;this.updateState();if(!this.isDisabled){this.ne.fireEvent("buttonDeactivate",this)}},enable:function(A,B){this.isDisabled=false;this.contain.setStyle({opacity:1}).addClass("buttonEnabled");this.updateState();this.checkNodes(B)},disable:function(A,B){this.isDisabled=true;this.contain.setStyle({opacity:0.6}).removeClass("buttonEnabled");this.updateState()},toggleActive:function(){(this.isActive)?this.deactivate():this.activate()},hoverOn:function(){if(!this.isDisabled){this.isHover=true;this.updateState();this.ne.fireEvent("buttonOver",this)}},hoverOff:function(){this.isHover=false;this.updateState();this.ne.fireEvent("buttonOut",this)},mouseClick:function(){if(this.options.command){this.ne.nicCommand(this.options.command,this.options.commandArgs);if(!this.options.noActive){this.toggleActive()}}this.ne.fireEvent("buttonClick",this)},key:function(A,B){if(this.options.key&&B.ctrlKey&&String.fromCharCode(B.keyCode).toLowerCase()==this.options.key){this.mouseClick()}}});var nicPlugin=bkClass.extend({construct:function(B,A){this.options=A;this.ne=B;this.ne.addEvent("panel",this.loadPanel.closure(this));this.init()},loadPanel:function(C){var B=this.options.buttons;for(var A in B){C.addButton(A,this.options)}C.reorder()},init:function(){}});var nicPaneOptions={};var nicEditorPane=bkClass.extend({construct:function(D,C,B,A){this.ne=C;this.elm=D;this.pos=D.pos();this.contain=new bkElement("div").setStyle({zIndex:"99999",overflow:"hidden",position:"absolute",left:this.pos[0]+"px",top:this.pos[1]+"px"});this.pane=new bkElement("div").setStyle({fontSize:"12px",border:"1px solid #ccc",overflow:"hidden",padding:"4px",textAlign:"left",backgroundColor:"#ffffc9"}).addClass("pane").setStyle(B).appendTo(this.contain);if(A&&!A.options.noClose){this.close=new bkElement("div").setStyle({"float":"right",height:"16px",width:"16px",cursor:"pointer"}).setStyle(this.ne.getIcon("close",nicPaneOptions)).addEvent("mousedown",A.removePane.closure(this)).appendTo(this.pane)}this.contain.noSelect().appendTo(document.body);this.position();this.init()},init:function(){},position:function(){if(this.ne.nicPanel){var B=this.ne.nicPanel.elm;var A=B.pos();var C=A[0]+parseInt(B.getStyle("width"))-(parseInt(this.pane.getStyle("width"))+8);if(C<this.pos[0]){this.contain.setStyle({left:C+"px"})}}},toggle:function(){this.isVisible=!this.isVisible;this.contain.setStyle({display:((this.isVisible)?"block":"none")})},remove:function(){if(this.contain){this.contain.remove();this.contain=null}},append:function(A){A.appendTo(this.pane)},setContent:function(A){this.pane.setContent(A)}});var nicEditorAdvancedButton=nicEditorButton.extend({init:function(){this.ne.addEvent("selected",this.removePane.closure(this)).addEvent("blur",this.removePane.closure(this))},mouseClick:function(){if(!this.isDisabled){if(this.pane&&this.pane.pane){this.removePane()}else{this.pane=new nicEditorPane(this.contain,this.ne,{width:(this.width||"270px"),backgroundColor:"#fff"},this);this.addPane();this.ne.selectedInstance.saveRng()}}},addForm:function(C,G){this.form=new bkElement("form").addEvent("submit",this.submit.closureListener(this));this.pane.append(this.form);this.inputs={};for(itm in C){var D=C[itm];var F="";if(G){F=G.getAttribute(itm)}if(!F){F=D.value||""}var A=C[itm].type;if(A=="title"){new bkElement("div").setContent(D.txt).setStyle({fontSize:"14px",fontWeight:"bold",padding:"0px",margin:"2px 0"}).appendTo(this.form)}else{var B=new bkElement("div").setStyle({overflow:"hidden",clear:"both"}).appendTo(this.form);if(D.txt){new bkElement("label").setAttributes({"for":itm}).setContent(D.txt).setStyle({margin:"2px 4px",fontSize:"13px",width:"50px",lineHeight:"20px",textAlign:"right","float":"left"}).appendTo(B)}switch(A){case"text":this.inputs[itm]=new bkElement("input").setAttributes({id:itm,value:F,type:"text"}).setStyle({margin:"2px 0",fontSize:"13px","float":"left",height:"20px",border:"1px solid #ccc",overflow:"hidden"}).setStyle(D.style).appendTo(B);break;case"select":this.inputs[itm]=new bkElement("select").setAttributes({id:itm}).setStyle({border:"1px solid #ccc","float":"left",margin:"2px 0"}).appendTo(B);for(opt in D.options){var E=new bkElement("option").setAttributes({value:opt,selected:(opt==F)?"selected":""}).setContent(D.options[opt]).appendTo(this.inputs[itm])}break;case"content":this.inputs[itm]=new bkElement("textarea").setAttributes({id:itm}).setStyle({border:"1px solid #ccc","float":"left"}).setStyle(D.style).appendTo(B);this.inputs[itm].value=F}}}new bkElement("input").setAttributes({type:"submit"}).setStyle({backgroundColor:"#efefef",border:"1px solid #ccc",margin:"3px 0","float":"left",clear:"both"}).appendTo(this.form);this.form.onsubmit=bkLib.cancelEvent},submit:function(){},findElm:function(B,A,E){var D=this.ne.selectedInstance.getElm().getElementsByTagName(B);for(var C=0;C<D.length;C++){if(D[C].getAttribute(A)==E){return $BK(D[C])}}},removePane:function(){if(this.pane){this.pane.remove();this.pane=null;this.ne.selectedInstance.restoreRng()}}});var nicButtonTips=bkClass.extend({construct:function(A){this.ne=A;A.addEvent("buttonOver",this.show.closure(this)).addEvent("buttonOut",this.hide.closure(this))},show:function(A){this.timer=setTimeout(this.create.closure(this,A),400)},create:function(A){this.timer=null;if(!this.pane){this.pane=new nicEditorPane(A.button,this.ne,{fontSize:"12px",marginTop:"5px"});this.pane.setContent(A.options.name)}},hide:function(A){if(this.timer){clearTimeout(this.timer)}if(this.pane){this.pane=this.pane.remove()}}});nicEditors.registerPlugin(nicButtonTips);var nicSelectOptions={buttons:{'fontSize':{name:__('Select tamao fuente'),type:'nicEditorFontSizeSelect',command:'fontsize'},'fontFamily':{name:__('Select tipo fuente'),type:'nicEditorFontFamilySelect',command:'fontname'},'fontFormat':{name:__('Select formato fuente'),type:'nicEditorFontFormatSelect',command:'formatBlock'}}};var nicEditorSelect=bkClass.extend({construct:function(D,A,C,B){this.options=C.buttons[A];this.elm=D;this.ne=B;this.name=A;this.selOptions=new Array();this.margin=new bkElement("div").setStyle({"float":"left",margin:"2px 1px 0 1px"}).appendTo(this.elm);this.contain=new bkElement("div").setStyle({width:"90px",height:"20px",cursor:"pointer",overflow:"hidden"}).addClass("selectContain").addEvent("click",this.toggle.closure(this)).appendTo(this.margin);this.items=new bkElement("div").setStyle({overflow:"hidden",zoom:1,border:"1px solid #ccc",paddingLeft:"3px",backgroundColor:"#fff"}).appendTo(this.contain);this.control=new bkElement("div").setStyle({overflow:"hidden","float":"right",height:"18px",width:"16px"}).addClass("selectControl").setStyle(this.ne.getIcon("arrow",C)).appendTo(this.items);this.txt=new bkElement("div").setStyle({overflow:"hidden","float":"left",width:"66px",height:"14px",marginTop:"1px",fontFamily:"sans-serif",textAlign:"center",fontSize:"12px"}).addClass("selectTxt").appendTo(this.items);if(!window.opera){this.contain.onmousedown=this.control.onmousedown=this.txt.onmousedown=bkLib.cancelEvent}this.margin.noSelect();this.ne.addEvent("selected",this.enable.closure(this)).addEvent("blur",this.disable.closure(this));this.disable();this.init()},disable:function(){this.isDisabled=true;this.close();this.contain.setStyle({opacity:0.6})},enable:function(A){this.isDisabled=false;this.close();this.contain.setStyle({opacity:1})},setDisplay:function(A){this.txt.setContent(A)},toggle:function(){if(!this.isDisabled){(this.pane)?this.close():this.open()}},open:function(){this.pane=new nicEditorPane(this.items,this.ne,{width:"88px",padding:"0px",borderTop:0,borderLeft:"1px solid #ccc",borderRight:"1px solid #ccc",borderBottom:"0px",backgroundColor:"#fff"});for(var C=0;C<this.selOptions.length;C++){var B=this.selOptions[C];var A=new bkElement("div").setStyle({overflow:"hidden",borderBottom:"1px solid #ccc",width:"88px",textAlign:"left",overflow:"hidden",cursor:"pointer"});var D=new bkElement("div").setStyle({padding:"0px 4px"}).setContent(B[1]).appendTo(A).noSelect();D.addEvent("click",this.update.closure(this,B[0])).addEvent("mouseover",this.over.closure(this,D)).addEvent("mouseout",this.out.closure(this,D)).setAttributes("id",B[0]);this.pane.append(A);if(!window.opera){D.onmousedown=bkLib.cancelEvent}}},close:function(){if(this.pane){this.pane=this.pane.remove()}},over:function(A){A.setStyle({backgroundColor:"#ccc"})},out:function(A){A.setStyle({backgroundColor:"#fff"})},add:function(B,A){this.selOptions.push(new Array(B,A))},update:function(A){this.ne.nicCommand(this.options.command,A);this.close()}});var nicEditorFontSizeSelect=nicEditorSelect.extend({sel:{1:"1&nbsp;(8pt)",2:"2&nbsp;(10pt)",3:"3&nbsp;(12pt)",4:"4&nbsp;(14pt)",5:"5&nbsp;(18pt)",6:"6&nbsp;(24pt)"},init:function(){this.setDisplay("Font&nbsp;Size...");for(itm in this.sel){this.add(itm,'<font size="'+itm+'">'+this.sel[itm]+"</font>")}}});var nicEditorFontFamilySelect=nicEditorSelect.extend({sel:{arial:"Arial","comic sans ms":"Comic Sans","courier new":"Courier New",georgia:"Georgia",helvetica:"Helvetica",impact:"Impact","times new roman":"Times","trebuchet ms":"Trebuchet",verdana:"Verdana"},init:function(){this.setDisplay("Font&nbsp;Family...");for(itm in this.sel){this.add(itm,'<font face="'+itm+'">'+this.sel[itm]+"</font>")}}});var nicEditorFontFormatSelect=nicEditorSelect.extend({sel:{p:"Paragraph",pre:"Pre",h6:"Heading&nbsp;6",h5:"Heading&nbsp;5",h4:"Heading&nbsp;4",h3:"Heading&nbsp;3",h2:"Heading&nbsp;2",h1:"Heading&nbsp;1"},init:function(){this.setDisplay("Font&nbsp;Format...");for(itm in this.sel){var A=itm.toUpperCase();this.add("<"+A+">","<"+itm+' style="padding: 0px; margin: 0px;">'+this.sel[itm]+"</"+A+">")}}});nicEditors.registerPlugin(nicPlugin,nicSelectOptions);var nicLinkOptions={buttons:{'link':{name:'Add Link',type:'nicLinkButton',tags:['A']},'unlink':{name:'Remove Link',command:'unlink',noActive:true}}};var nicLinkButton=nicEditorAdvancedButton.extend({addPane:function(){this.ln=this.ne.selectedInstance.selElm().parentTag("A");this.addForm({"":{type:"title",txt:"Add/Edit Link"},href:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},title:{type:"text",txt:"Title"},target:{type:"select",txt:"Open In",options:{"":"Current Window",_blank:"New Window"},style:{width:"100px"}}},this.ln)},submit:function(C){var A=this.inputs.href.value;if(A=="http://"||A==""){alert("You must enter a URL to Create a Link");return false}this.removePane();if(!this.ln){var B="javascript:nicTemp();";this.ne.nicCommand("createlink",B);this.ln=this.findElm("A","href",B)}if(this.ln){this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})}}});nicEditors.registerPlugin(nicPlugin,nicLinkOptions);var nicColorOptions={buttons:{'forecolor':{name:__('Cambia color texto'),type:'nicEditorColorButton',noClose:true},'bgcolor':{name:__('Change Background Color'),type:'nicEditorBgColorButton',noClose:true}}};var nicEditorColorButton=nicEditorAdvancedButton.extend({addPane:function(){var H=new bkElement("DIV").setStyle({width:"270px"});var cont=0;var cont2=0;var cont3=0;var suma2=0;var suma=932067.5/18;for(cont=0;cont<18;cont=cont+1){{if(cont>0)suma2=suma2+suma;for(cont2=0;cont2<18;cont2=cont2+1){var I="#"+hexa(((cont*932067.5)+(cont2*932067.5))+suma2);var C=new bkElement("DIV").setStyle({cursor:"pointer",height:"15px","float":"left"}).appendTo(H);var G=new bkElement("DIV").setStyle({border:"2px solid "+I}).appendTo(C);var B=new bkElement("DIV").setStyle({backgroundColor:I,overflow:"hidden",width:"11px",height:"11px"}).addEvent("click",this.colorSelect.closure(this,I)).addEvent("mouseover",this.on.closure(this,G)).addEvent("mouseout",this.off.closure(this,G,I)).appendTo(G);if(!window.opera){C.onmousedown=B.onmousedown=bkLib.cancelEvent}}}}this.pane.append(H.noSelect())},colorSelect:function(A){this.ne.nicCommand("foreColor",A);this.removePane()},on:function(A){A.setStyle({border:"2px solid #000"})},off:function(A,B){A.setStyle({border:"2px solid "+B})}});var nicEditorBgColorButton=nicEditorColorButton.extend({colorSelect:function(A){this.ne.nicCommand("hiliteColor",A);this.removePane()}});nicEditors.registerPlugin(nicPlugin,nicColorOptions);var nicImageOptions={buttons:{'image':{name:'Add Image',type:'nicImageButton',tags:['IMG']}}};var nicImageButton=nicEditorAdvancedButton.extend({addPane:function(){this.im=this.ne.selectedInstance.selElm().parentTag("IMG");this.addForm({"":{type:"title",txt:"Add/Edit Image"},src:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},alt:{type:"text",txt:"Alt Text",style:{width:"100px"}},align:{type:"select",txt:"Align",options:{left:"Left",right:"Right"}}},this.im)},submit:function(B){var C=this.inputs.src.value;if(C==""||C=="http://"){alert("You must enter a Image URL to insert");return false}this.removePane();if(!this.im){var A="javascript:nicImTemp();";this.ne.nicCommand("insertImage",A);this.im=this.findElm("IMG","src",A)}if(this.im){this.im.setAttributes({src:this.inputs.src.value,alt:this.inputs.alt.value,align:this.inputs.align.value})}}});nicEditors.registerPlugin(nicPlugin,nicImageOptions);