function $id(x){return {done:true,result:x};}$id.$isK=true;$id.$exHandlers=null;var $k=$id;function $lambda(fn){fn.$jw=true;return fn;}function $makeK(fn,handlerStack){fn.$isK=true;fn.$exHandlers=handlerStack;return fn;}function $makeArguments(origArgs){var newArgs=new Object;newArgs.callee=origArgs.callee;newArgs.caller=origArgs.caller;if(origArgs[0]&&origArgs[0].$isK){newArgs.continuation=origArgs[0];newArgs.length=origArgs.length-1;for(var i=1;i<origArgs.length;i++)newArgs[i-1]=origArgs[i];}else{newArgs.length=origArgs.length;for(var i=0;i<origArgs.length;i++)newArgs[i]=origArgs[i];}return newArgs;}function $isTransformed(f,thisObj){try{if(thisObj)return thisObj[f].$jw;return f.$jw;}catch(e){return false;}}function $call(f,k,thisObj,args){if($isTransformed(f))return f.apply(thisObj,[k].concat(args));else return k(f.apply(thisObj,args));}function $call0(f,k,thisObj,a1,a2,a3,a4,a5,a6,a7,a8){var r;if(thisObj){if($isTransformed(f,thisObj)){try{switch(arguments.length){case 3:return thisObj[f](k);case 4:return thisObj[f](k,a1);case 5:return thisObj[f](k,a1,a2);case 6:return thisObj[f](k,a1,a2,a3);case 7:return thisObj[f](k,a1,a2,a3,a4);case 8:return thisObj[f](k,a1,a2,a3,a4,a5);case 9:return thisObj[f](k,a1,a2,a3,a4,a5,a6);case 10:return thisObj[f](k,a1,a2,a3,a4,a5,a6,a7);case 11:return thisObj[f](k,a1,a2,a3,a4,a5,a6,a7,a8);default:throw "too many/few arguments to $call0";}}catch(e){throw new Error("during $call0 of "+thisObj+"."+f+": "+getExceptionDesc(e));}}else{try{switch(arguments.length){case 3:r=thisObj[f]();break;case 4:r=thisObj[f](a1);break;case 5:r=thisObj[f](a1,a2);break;case 6:r=thisObj[f](a1,a2,a3);break;case 7:r=thisObj[f](a1,a2,a3,a4);break;case 8:r=thisObj[f](a1,a2,a3,a4,a5);break;case 9:r=thisObj[f](a1,a2,a3,a4,a5,a6);break;case 10:r=thisObj[f](a1,a2,a3,a4,a5,a6,a7);break;case 11:r=thisObj[f](a1,a2,a3,a4,a5,a6,a7,a8);break;default:throw "too many/few arguments to $call0";}}catch(e){throw new Error("during $call0 of "+thisObj+"."+f+": "+getExceptionDesc(e));}return k(r);}}else{if($isTransformed(f)){try{switch(arguments.length){case 3:return f(k);case 4:return f(k,a1);case 5:return f(k,a1,a2);case 6:return f(k,a1,a2,a3);case 7:return f(k,a1,a2,a3,a4);case 8:return f(k,a1,a2,a3,a4,a5);case 9:return f(k,a1,a2,a3,a4,a5,a6);case 10:return f(k,a1,a2,a3,a4,a5,a6,a7);case 11:return f(k,a1,a2,a3,a4,a5,a6,a7,a8);default:throw "too many/few arguments to $call0";}}catch(e){throw new Error("during $call0 of "+f+": "+getExceptionDesc(e));}}else{try{switch(arguments.length){case 3:r=f();break;case 4:r=f(a1);break;case 5:r=f(a1,a2);break;case 6:r=f(a1,a2,a3);break;case 7:r=f(a1,a2,a3,a4);break;case 8:r=f(a1,a2,a3,a4,a5);break;case 9:r=f(a1,a2,a3,a4,a5,a6);break;case 10:r=f(a1,a2,a3,a4,a5,a6,a7);break;case 11:r=f(a1,a2,a3,a4,a5,a6,a7,a8);break;default:throw "too many/few arguments to $call0";}}catch(e){throw new Error("during $call0 of "+f+": "+getExceptionDesc(e));}return k(r);}}}function getExceptionDesc(e){try{if(e.description)return e.description;else return e;}catch(x){return e;}}function $makeBlank(ctor){var blank=function(){};blank.prototype=ctor.prototype;return blank;}function $new(ctor,k,args){if($isTransformed(ctor)){if(!ctor.$blank)ctor.$blank=$makeBlank(ctor);var obj=new ctor.$blank;var augmentedK=$makeK(function(x){if(x)return k(x);else return k(obj);});return ctor.apply(obj,[augmentedK].concat(args));}else{var privateCtor=function(){return ctor.apply(this,args);};privateCtor.prototype=ctor.prototype;return k(new privateCtor);}}function $new0(ctor,k,a1,a2,a3,a4,a5,a6,a7,a8){if($isTransformed(ctor)){if(!ctor.$blank)ctor.$blank=$makeBlank(ctor);var obj=new ctor.$blank;obj.$init=ctor;var augmentedK=$makeK(function(x){delete obj.$init;if(x)return k(x);else return k(obj);});switch(arguments.length){case 2:return obj.$init(augmentedK);break;case 3:return obj.$init(augmentedK,a1);break;case 4:return obj.$init(augmentedK,a1,a2);break;case 5:return obj.$init(augmentedK,a1,a2,a3);break;case 6:return obj.$init(augmentedK,a1,a2,a3,a4);break;case 7:return obj.$init(augmentedK,a1,a2,a3,a4,a5);break;case 8:return obj.$init(augmentedK,a1,a2,a3,a4,a5,a6);break;case 9:return obj.$init(augmentedK,a1,a2,a3,a4,a5,a6,a7);break;case 10:return obj.$init(augmentedK,a1,a2,a3,a4,a5,a6,a7,a8);break;default:throw "too many/few arguments to $new0";}}else{switch(arguments.length){case 2:return k(new ctor);break;case 3:return k(new ctor(a1));break;case 4:return k(new ctor(a1,a2));break;case 5:return k(new ctor(a1,a2,a3));break;case 6:return k(new ctor(a1,a2,a3,a4));break;case 7:return k(new ctor(a1,a2,a3,a4,a5));break;case 8:return k(new ctor(a1,a2,a3,a4,a5,a6));break;case 9:return k(new ctor(a1,a2,a3,a4,a5,a6,a7));break;case 10:return k(new ctor(a1,a2,a3,a4,a5,a6,a7,a8));break;default:throw "too many/few arguments to $new0";}}}function $callFromDirect(f,thisObj,args){var argArray=new Array;for(var idx=0;idx<args.length;idx++)argArray[idx]=args[idx];return $trampoline(function(){return f.apply(thisObj,[$id].concat(argArray));});}function HandlerStackEntry(k,next){this.k=k;this.next=next;}function $trampoline(origThunk,origStack){var handlerStack=origStack?origStack:null;var ret;if(typeof origThunk=="function")ret={done:false,thunk:origThunk};else if(typeof origThunk=="object")ret=origThunk;else throw "$trampoline: origThunk is neither a function nor an object";var latestResult=null;function popHandler(expected){var top=handlerStack;if(expected&&(!top||top.k!=expected))alert("assertion failure: expected handler "+expected+", got "+top);if(top){handlerStack=top.next;return top.k;}return null;}while(!ret.done){if(ret.addHandler)handlerStack=new HandlerStackEntry(ret.addHandler,handlerStack);else if(ret.removeHandler)popHandler(ret.removeHandler);else if(ret.replaceHandlers)handlerStack=ret.replaceHandlers;try{latestResult=ret;ret=ret.thunk(handlerStack);}catch(e){var latestStack=handlerStack;var handler=popHandler();if($exHook){var currentHook=$exHook;$exHook=null;var hookResult=currentHook(e,handler,handlerStack,latestStack,latestResult);$exHook=currentHook;return hookResult;}if(handler)ret={done:false,thunk:function(){return handler(e);}};else throw e;}}return ret.result;}function $globalEval($s){eval($s);}function $localEval(thunk,handlerStack,$s){var ret=thunk(handlerStack,$s);return ret.result;}function $invokeHandler(handler,e){return $trampoline(function(){return handler(e);});}var $exHook;
var Prototype={Version:"1.5.0_rc0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(x){return x;}};var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};var Abstract=new Object;Object.extend=function(destination,source){for(var property in source){destination[property]=source[property];}return destination;};Object.inspect=function(object){try{if(object==undefined)return "undefined";if(object==null)return "null";return object.inspect?object.inspect():object.toString();}catch(e){if(einstanceofRangeError)return "...";throw e;}};Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));};};Function.prototype.bindAsEventListener=function(object){var __method=this;return function(event){return __method.call(object,event||window.event);};};Object.extend(Number.prototype,{toColorPart:function(){var digits=this.toString(16);if(this<16)return "0"+digits;return digits;},succ:function(){return this+1;},times:function(iterator){$R(0,this,true).each(iterator);return this;}});var Try={these:function(){var returnValue;for(var i=0;i<arguments.length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}return returnValue;}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback();}finally{this.currentlyExecuting=false;}}}};Object.extend(String.prototype,{gsub:function(pattern,replacement){var result="",source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=(replacement(match)||"").toString();source=source.slice(match.index+match[0].length);}else{result+=source,source="";}}return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return this;},truncate:function(length,truncation){length=length||30;truncation=truncation===undefined?"...":truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation: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 matchAll=new RegExp(Prototype.ScriptFragment,"img");var matchOne=new RegExp(Prototype.ScriptFragment,"im");return (this.match(matchAll)||[]).map(function(scriptTag){return (scriptTag.match(matchOne)||["",""])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script);});},escapeHTML:function(){var div=document.createElement("div");var text=document.createTextNode(this);div.appendChild(text);return div.innerHTML;},unescapeHTML:function(){var div=document.createElement("div");div.innerHTML=this.stripTags();return div.childNodes[0]?div.childNodes[0].nodeValue:"";},toQueryParams:function(){var pairs=this.match(/^\??(.*)$/)[1].split("&");return pairs.inject({},function(params,pairString){var pair=pairString.split("=");params[pair[0]]=pair[1];return params;});},toArray:function(){return this.split("");},camelize:function(){var oStringList=this.split("-");if(oStringList.length==1)return oStringList[0];var camelizedString=this.indexOf("-")==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}return camelizedString;},inspect:function(){return "'"+this.replace(/\\/g,"\\\\").replace(/'/g,"\\\'")+"'";}});String.prototype.gsub.prepareReplacement=function(replacement){if(typeof replacement=="function")return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match);};};String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){return this.template.gsub(this.pattern,function(match){var before=match[1];if(before=="\\")return match[2];return before+(object[match[3]]||"").toString();});}};var $break=new Object;var $continue=new Object;var Enumerable={each:function(iterator){var index=0;try{this._each(function(value){try{iterator(value,index++);}catch(e){if(e!=$continue)throw e;}});}catch(e){if(e!=$break)throw e;}},all:function(iterator){var result=true;this.each(function(value,index){result=result&&!!(iterator||Prototype.K)(value,index);if(!result)throw $break;});return result;},any:function(iterator){var result=true;this.each(function(value,index){if(result=!!(iterator||Prototype.K)(value,index))throw $break;});return result;},collect:function(iterator){var results=[];this.each(function(value,index){results.push(iterator(value,index));});return results;},detect:function(iterator){var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw $break;}});return result;},findAll:function(iterator){var results=[];this.each(function(value,index){if(iterator(value,index))results.push(value);});return results;},grep:function(pattern,iterator){var results=[];this.each(function(value,index){var stringValue=value.toString();if(stringValue.match(pattern))results.push((iterator||Prototype.K)(value,index));});return results;},include:function(object){var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;},inject:function(memo,iterator){this.each(function(value,index){memo=iterator(memo,value,index);});return memo;},invoke:function(method){var args=$A(arguments).slice(1);return this.collect(function(value){return value[method].apply(value,args);});},max:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value>=result)result=value;});return result;},min:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value<result)result=value;});return result;},partition:function(iterator){var trues=[],falses=[];this.each(function(value,index){((iterator||Prototype.K)(value,index)?trues:falses).push(value);});return [trues,falses];},pluck:function(property){var results=[];this.each(function(value,index){results.push(value[property]);});return results;},reject:function(iterator){var results=[];this.each(function(value,index){if(!iterator(value,index))results.push(value);});return results;},sortBy:function(iterator){return this.collect(function(value,index){return {value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck("value");},toArray:function(){return this.collect(Prototype.K);},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(typeof args.last()=="function")iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});},inspect:function(){return "#<Enumerable:"+this.toArray().inspect()+">";}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(iterable){if(!iterable)return [];if(iterable.toArray){return iterable.toArray();}else{var results=[];for(var i=0;i<iterable.length;i++)results.push(iterable[i]);return results;}};Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0;i<this.length;i++)iterator(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(value){return value!=undefined||value!=null;});},flatten:function(){return this.inject([],function(array,value){return array.concat(value&&value.constructor==Array?value.flatten():[value]);});},without:function(){var values=$A(arguments);return this.select(function(value){return !values.include(value);});},indexOf:function(object){for(var i=0;i<this.length;i++)if(this[i]==object)return i;return -1;},reverse:function(inline){return (inline!==false?this:this.toArray())._reverse();},inspect:function(){return "["+this.map(Object.inspect).join(", ")+"]";}});var Hash={_each:function(iterator){for(var key in this){var value=this[key];if(typeof value=="function")continue;var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}},keys:function(){return this.pluck("key");},values:function(){return this.pluck("value");},merge:function(hash){return $H(hash).inject($H(this),function(mergedHash,pair){mergedHash[pair.key]=pair.value;return mergedHash;});},toQueryString:function(){return this.map(function(pair){return pair.map(encodeURIComponent).join("=");}).join("&");},inspect:function(){return "#<Hash:{"+this.map(function(pair){return pair.map(Object.inspect).join(": ");}).join(", ")+"}>";}};function $H(object){var hash=Object.extend({},object||{});Object.extend(hash,Enumerable);Object.extend(hash,Hash);return hash;}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;do{iterator(value);value=value.succ();}while(this.include(value));},include:function(value){if(value<this.start)return false;if(this.exclusive)return value<this.end;return value<=this.end;}});var $R=function(start,end,exclusive){return new ObjectRange(start,end,exclusive);};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(iterator){this.responders._each(iterator);},register:function(responderToAdd){if(!this.include(responderToAdd))this.responders.push(responderToAdd);},unregister:function(responderToRemove){this.responders=this.responders.without(responderToRemove);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(responder[callback]&&typeof responder[callback]=="function"){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++;},onComplete:function(){Ajax.activeRequestCount--;}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(options){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",parameters:""};Object.extend(this.options,options||{});},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||this.transport.status>=200&&this.transport.status<300;},responseIsFailure:function(){return !this.responseIsSuccess();}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base,{initialize:function(url,options){this.transport=Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var parameters=this.options.parameters||"";if(parameters.length>0)parameters+="&_=";try{this.url=url;if(this.options.method=="get"&&parameters.length>0)this.url+=(this.url.match(/\?/)?"&":"?")+parameters;Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1);}).bind(this),10);}this.setRequestHeaders();var body=this.options.postBody?this.options.postBody:parameters;this.transport.send(this.options.method=="post"?body:null);}catch(e){this.dispatchException(e);}},setRequestHeaders:function(){var requestHeaders=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version,"Accept","text/javascript, text/html, application/xml, text/xml, */*"];if(this.options.method=="post"){requestHeaders.push("Content-type",this.options.contentType);if(this.transport.overrideMimeType)requestHeaders.push("Connection","close");}if(this.options.requestHeaders)requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);for(var i=0;i<requestHeaders.length;i+=2)this.transport.setRequestHeader(requestHeaders[i],requestHeaders[i+1]);},onStateChange:function(){var readyState=this.transport.readyState;if(readyState!=1)this.respondToReadyState(this.transport.readyState);},header:function(name){try{return this.transport.getResponseHeader(name);}catch(e){}},evalJSON:function(){try{return eval("("+this.header("X-JSON")+")");}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},respondToReadyState:function(readyState){var event=Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(event=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(transport,json);}catch(e){this.dispatchException(e);}if((this.header("Content-type")||"").match(/^text\/javascript/i))this.evalResponse();}try{(this.options["on"+event]||Prototype.emptyFunction)(transport,json);Ajax.Responders.dispatch("on"+event,this,transport,json);}catch(e){this.dispatchException(e);}if(event=="Complete")this.transport.onreadystatechange=Prototype.emptyFunction;},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch("onException",this,exception);}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(container,url,options){this.containers={success:container.success?$(container.success):$(container),failure:container.failure?$(container.failure):container.success?null:$(container)};this.transport=Ajax.getTransport();this.setOptions(options);var onComplete=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(transport,object){this.updateContent();onComplete(transport,object);}).bind(this);this.request(url);},updateContent:function(){var receiver=this.responseIsSuccess()?this.containers.success:this.containers.failure;var response=this.transport.responseText;if(!this.options.evalScripts)response=response.stripScripts();if(receiver){if(this.options.insertion){new this.options.insertion(receiver,response);}else{Element.update(receiver,response);}}if(this.responseIsSuccess()){if(this.onComplete)setTimeout(this.onComplete.bind(this),10);}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base,{initialize:function(container,url,options){this.setOptions(options);this.onComplete=this.options.onComplete;this.frequency=this.options.frequency||2;this.decay=this.options.decay||1;this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(request){if(this.options.decay){this.decay=request.responseText==this.lastText?this.decay*this.options.decay:1;this.lastText=request.responseText;}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(){var results=[],element;for(var i=0;i<arguments.length;i++){element=arguments[i];if(typeof element=="string")element=document.getElementById(element);results.push(Element.extend(element));}return results.length<2?results[0]:results;}document.getElementsByClassName=function(className,parentElement){var children=($(parentElement)||document.body).getElementsByTagName("*");return $A(children).inject([],function(elements,child){if(child.className.match(new RegExp("(^|\\s)"+className+"(\\s|$)")))elements.push(Element.extend(child));return elements;});};if(!window.Element)var Element=new Object;Element.extend=function(element){if(!element)return;if(_nativeExtensions)return element;if(!element._extended&&element.tagName&&element!=window){var methods=Element.Methods,cache=Element.extend.cache;for(property in methods){var value=methods[property];if(typeof value=="function")element[property]=cache.findOrStore(value);}}element._extended=true;return element;};Element.extend.cache={findOrStore:function(value){return this[value]=this[value]||function(){return value.apply(null,[this].concat($A(arguments)));};}};Element.Methods={visible:function(element){return $(element).style.display!="none";},toggle:function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);Element[Element.visible(element)?"hide":"show"](element);}},hide:function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);element.style.display="none";}},show:function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);element.style.display="";}},remove:function(element){element=$(element);element.parentNode.removeChild(element);},update:function(element,html){$(element).innerHTML=html.stripScripts();setTimeout(function(){html.evalScripts();},10);},replace:function(element,html){element=$(element);if(element.outerHTML){element.outerHTML=html.stripScripts();}else{var range=element.ownerDocument.createRange();range.selectNodeContents(element);element.parentNode.replaceChild(range.createContextualFragment(html.stripScripts()),element);}setTimeout(function(){html.evalScripts();},10);},getHeight:function(element){element=$(element);return element.offsetHeight;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;return Element.classNames(element).include(className);},addClassName:function(element,className){if(!(element=$(element)))return;return Element.classNames(element).add(className);},removeClassName:function(element,className){if(!(element=$(element)))return;return Element.classNames(element).remove(className);},cleanWhitespace:function(element){element=$(element);for(var i=0;i<element.childNodes.length;i++){var node=element.childNodes[i];if(node.nodeType==3&&!/\S/.test(node.nodeValue))Element.remove(node);}},empty:function(element){return $(element).innerHTML.match(/^\s*$/);},childOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);while(element=element.parentNode)if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var x=element.x?element.x:element.offsetLeft,y=element.y?element.y:element.offsetTop;window.scrollTo(x,y);},getStyle:function(element,style){element=$(element);var value=element.style[style.camelize()];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[style.camelize()];}}if(window.opera&&["left","top","right","bottom"].include(style))if(Element.getStyle(element,"position")=="static")value="auto";return value=="auto"?null:value;},setStyle:function(element,style){element=$(element);for(var name in style)element.style[name.camelize()]=style[name];},getDimensions:function(element){element=$(element);if(Element.getStyle(element,"display")!="none")return {width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;els.visibility="hidden";els.position="absolute";els.display="";var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display="none";els.position=originalPosition;els.visibility=originalVisibility;return {width:originalWidth,height:originalHeight};},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,"position");if(pos=="static"||!pos){element._madePositioned=true;element.style.position="relative";if(window.opera){element.style.top=0;element.style.left=0;}}},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right="";}},makeClipping:function(element){element=$(element);if(element._overflow)return;element._overflow=element.style.overflow;if((Element.getStyle(element,"overflow")||"visible")!="hidden")element.style.overflow="hidden";},undoClipping:function(element){element=$(element);if(element._overflow)return;element.style.overflow=element._overflow;element._overflow=undefined;}};Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(!HTMLElement&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){var HTMLElement={};HTMLElement.prototype=document.createElement("div").__proto__;}Element.addMethods=function(methods){Object.extend(Element.Methods,methods||{});if(typeof HTMLElement!="undefined"){var methods=Element.Methods,cache=Element.extend.cache;for(property in methods){var value=methods[property];if(typeof value=="function")HTMLElement.prototype[property]=cache.findOrStore(value);}_nativeExtensions=true;}};Element.addMethods();var Toggle=new Object;Toggle.display=Element.toggle;Abstract.Insertion=function(adjacency){this.adjacency=adjacency;};Abstract.Insertion.prototype={initialize:function(element,content){this.element=$(element);this.content=content.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content);}catch(e){var tagName=this.element.tagName.toLowerCase();if(tagName=="tbody"||tagName=="tr"){this.insertContent(this.contentFromAnonymousTable());}else{throw e;}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange)this.initializeRange();this.insertContent([this.range.createContextualFragment(this.content)]);}setTimeout(function(){content.evalScripts();},10);},contentFromAnonymousTable:function(){var div=document.createElement("div");div.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(div.childNodes[0].childNodes[0].childNodes);}};var Insertion=new Object;Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element);}).bind(this));}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true);},insertContent:function(fragments){fragments.reverse(false).each((function(fragment){this.element.insertBefore(fragment,this.element.firstChild);}).bind(this));}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.appendChild(fragment);}).bind(this));}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element.nextSibling);}).bind(this));}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set(this.toArray().concat(classNameToAdd).join(" "));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set(this.select(function(className){return className!=classNameToRemove;}).join(" "));},toString:function(){return this.toArray().join(" ");}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(expression){this.params={classNames:[]};this.expression=expression.toString().strip();this.parseExpression();this.compileMatcher();},parseExpression:function(){function abort(message){throw "Parse error in selector: "+message;}if(this.expression=="")abort("empty expression");var params=this.params,expr=this.expression,match,modifier,clause,rest;while(match=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){params.attributes=params.attributes||[];params.attributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||""});expr=match[1];}if(expr=="*")return this.params.wildcard=true;while(match=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){modifier=match[1],clause=match[2],rest=match[3];switch(modifier){case "#":params.id=clause;break;case ".":params.classNames.push(clause);break;case "":case undefined:params.tagName=clause.toUpperCase();break;default:abort(expr.inspect());}expr=rest;}if(expr.length>0)abort(expr.inspect());},buildMatchExpression:function(){var params=this.params,conditions=[],clause;if(params.wildcard)conditions.push("true");if(clause=params.id)conditions.push("element.id == "+clause.inspect());if(clause=params.tagName)conditions.push("element.tagName.toUpperCase() == "+clause.inspect());if((clause=params.classNames).length>0)for(var i=0;i<clause.length;i++)conditions.push("Element.hasClassName(element, "+clause[i].inspect()+")");if(clause=params.attributes){clause.each(function(attribute){var value="element.getAttribute("+attribute.name.inspect()+")";var splitValueBy=function(delimiter){return value+" && "+value+".split("+delimiter.inspect()+")";};switch(attribute.operator){case "=":conditions.push(value+" == "+attribute.value.inspect());break;case "~=":conditions.push(splitValueBy(" ")+".include("+attribute.value.inspect()+")");break;case "|=":conditions.push(splitValueBy("-")+".first().toUpperCase() == "+attribute.value.toUpperCase().inspect());break;case "!=":conditions.push(value+" != "+attribute.value.inspect());break;case "":case undefined:conditions.push(value+" != null");break;default:throw "Unknown operator "+attribute.operator+" in selector";}});}return conditions.join(" && ");},compileMatcher:function(){this.match=new Function("element","if (!element.tagName) return false; \
      return "+this.buildMatchExpression());},findElements:function(scope){var element;if(element=$(this.params.id))if(this.match(element))if(!scope||Element.childOf(element,scope))return [element];scope=(scope||document).getElementsByTagName(this.params.tagName||"*");var results=[];for(var i=0;i<scope.length;i++)if(this.match(element=scope[i]))results.push(Element.extend(element));return results;},toString:function(){return this.expression;}};function $$(){return $A(arguments).map(function(expression){return expression.strip().split(/\s+/).inject([null],function(results,expr){var selector=new Selector(expr);return results.map(selector.findElements.bind(selector)).flatten();});}).flatten();}var Field={clear:function(){for(var i=0;i<arguments.length;i++)$(arguments[i]).value="";},focus:function(element){$(element).focus();},present:function(){for(var i=0;i<arguments.length;i++)if($(arguments[i]).value=="")return false;return true;},select:function(element){$(element).select();},activate:function(element){element=$(element);element.focus();if(element.select)element.select();}};var Form={serialize:function(form){var elements=Form.getElements($(form));var queryComponents=new Array;for(var i=0;i<elements.length;i++){var queryComponent=Form.Element.serialize(elements[i]);if(queryComponent)queryComponents.push(queryComponent);}return queryComponents.join("&");},getElements:function(form){form=$(form);var elements=new Array;for(var tagName in Form.Element.Serializers){var tagElements=form.getElementsByTagName(tagName);for(var j=0;j<tagElements.length;j++)elements.push(tagElements[j]);}return elements;},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName("input");if(!typeName&&!name)return inputs;var matchingInputs=new Array;for(var i=0;i<inputs.length;i++){var input=inputs[i];if(typeName&&input.type!=typeName||name&&input.name!=name)continue;matchingInputs.push(input);}return matchingInputs;},disable:function(form){var elements=Form.getElements(form);for(var i=0;i<elements.length;i++){var element=elements[i];element.blur();element.disabled="true";}},enable:function(form){var elements=Form.getElements(form);for(var i=0;i<elements.length;i++){var element=elements[i];element.disabled="";}},findFirstElement:function(form){return Form.getElements(form).find(function(element){return element.type!="hidden"&&!element.disabled&&["input","select","textarea"].include(element.tagName.toLowerCase());});},focusFirstElement:function(form){Field.activate(Form.findFirstElement(form));},reset:function(form){$(form).reset();}};Form.Element={serialize:function(element){element=$(element);var method=element.tagName.toLowerCase();var parameter=Form.Element.Serializers[method](element);if(parameter){var key=encodeURIComponent(parameter[0]);if(key.length==0)return;if(parameter[1].constructor!=Array)parameter[1]=[parameter[1]];return parameter[1].map(function(value){return key+"="+encodeURIComponent(value);}).join("&");}},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();var parameter=Form.Element.Serializers[method](element);if(parameter)return parameter[1];}};Form.Element.Serializers={input:function(element){switch(element.type.toLowerCase()){case "submit":case "hidden":case "password":case "text":return Form.Element.Serializers.textarea(element);case "checkbox":case "radio":return Form.Element.Serializers.inputSelector(element);}return false;},inputSelector:function(element){if(element.checked)return [element.name,element.value];},textarea:function(element){return [element.name,element.value];},select:function(element){return Form.Element.Serializers[element.type=="select-one"?"selectOne":"selectMany"](element);},selectOne:function(element){var value="",opt,index=element.selectedIndex;if(index>=0){opt=element.options[index];value=opt.value||opt.text;}return [element.name,value];},selectMany:function(element){var value=[];for(var i=0;i<element.length;i++){var opt=element.options[i];if(opt.selected)value.push(opt.value||opt.text);}return [element.name,value];}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(element,frequency,callback){this.frequency=frequency;this.element=$(element);this.callback=callback;this.lastValue=this.getValue();this.registerCallback();},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},onTimerEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form")this.registerFormCallbacks();else this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){var elements=Form.getElements(this.element);for(var i=0;i<elements.length;i++)this.registerCallback(elements[i]);},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case "checkbox":case "radio":Event.observe(element,"click",this.onElementEvent.bind(this));break;case "password":case "text":case "textarea":case "select-one":case "select-multiple":Event.observe(element,"change",this.onElementEvent.bind(this));break;}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element);}});if(!window.Event){var Event=new Object;}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,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return event.which&&event.which==1||event.button&&event.button==1;},pointerX:function(event){return event.pageX||event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft);},pointerY:function(event){return event.pageY||event.clientY+(document.documentElement.scrollTop||document.body.scrollTop);},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;event.cancelBubble=true;}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||element.tagName.toUpperCase()!=tagName.toUpperCase()))element=element.parentNode;return element;},observers:false,_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent("on"+name,observer);}},unloadCache:function(){if(!Event.observers)return;for(var i=0;i<Event.observers.length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null;}Event.observers=false;},observe:function(element,name,observer,useCapture){var element=$(element);useCapture=useCapture||false;if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))name="keydown";this._observeAndCache(element,name,observer,useCapture);},stopObserving:function(element,name,observer,useCapture){var element=$(element);useCapture=useCapture||false;if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))name="keydown";if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element.detachEvent){element.detachEvent("on"+name,observer);}}});if(navigator.appVersion.match(/\bMSIE\b/))Event.observe(window,"unload",Event.unloadCache,false);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;},realOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return [valueL,valueT];},cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return [valueL,valueT];},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){p=Element.getStyle(element,"position");if(p=="relative"||p=="absolute")break;}}while(element);return [valueL,valueT];},offsetParent:function(element){if(element.offsetParent)return element.offsetParent;if(element==document.body)return element;while((element=element.parentNode)&&element!=document.body)if(Element.getStyle(element,"position")!="static")return element;return document.body;},within:function(element,x,y){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=this.cumulativeOffset(element);return y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth;},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=this.realOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=this.cumulativeOffset(element);return this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth;},overlap:function(mode,element){if(!mode)return 0;if(mode=="vertical")return (this.offset[1]+element.offsetHeight-this.ycomp)/element.offsetHeight;if(mode=="horizontal")return (this.offset[0]+element.offsetWidth-this.xcomp)/element.offsetWidth;},clone:function(source,target){source=$(source);target=$(target);target.style.position="absolute";var offsets=this.cumulativeOffset(source);target.style.top=offsets[1]+"px";target.style.left=offsets[0]+"px";target.style.width=source.offsetWidth+"px";target.style.height=source.offsetHeight+"px";},page:function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)if(Element.getStyle(element,"position")=="absolute")break;}while(element=element.offsetParent);element=forElement;do{valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}while(element=element.parentNode);return [valueL,valueT];},clone:function(source,target){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});source=$(source);var p=Position.page(source);target=$(target);var delta=[0,0];var parent=null;if(Element.getStyle(target,"position")=="absolute"){parent=Position.offsetParent(target);delta=Position.page(parent);}if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;}if(options.setLeft)target.style.left=p[0]-delta[0]+options.offsetLeft+"px";if(options.setTop)target.style.top=p[1]-delta[1]+options.offsetTop+"px";if(options.setWidth)target.style.width=source.offsetWidth+"px";if(options.setHeight)target.style.height=source.offsetHeight+"px";},absolutize:function(element){element=$(element);if(element.style.position=="absolute")return;Position.prepare();var offsets=Position.positionedOffset(element);var top=offsets[1];var left=offsets[0];var width=element.clientWidth;var height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position="absolute";element.style.top=top+"px";element.style.left=left+"px";element.style.width=width+"px";element.style.height=height+"px";},relativize:function(element){element=$(element);if(element.style.position=="relative")return;Position.prepare();element.style.position="relative";var top=parseFloat(element.style.top||0)-(element._originalTop||0);var left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+"px";element.style.left=left+"px";element.style.height=element._originalHeight;element.style.width=element._originalWidth;}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)if(Element.getStyle(element,"position")=="absolute")break;element=element.offsetParent;}while(element);return [valueL,valueT];};}
String.prototype.parseColor=function(){var color="#";if(this.slice(0,4)=="rgb("){var cols=this.slice(4,this.length-1).split(",");var i=0;do{color+=parseInt(cols[i]).toColorPart();}while(++i<3);}else{if(this.slice(0,1)=="#"){if(this.length==4)for(var i=1;i<4;i++)color+=(this.charAt(i)+this.charAt(i)).toLowerCase();if(this.length==7)color=this.toLowerCase();}}return color.length==7?color:arguments[0]||this;};Element.collectTextNodes=function(element){return $A($(element).childNodes).collect(function(node){return node.nodeType==3?node.nodeValue:node.hasChildNodes()?Element.collectTextNodes(node):"";}).flatten().join("");};Element.collectTextNodesIgnoreClass=function(element,className){return $A($(element).childNodes).collect(function(node){return node.nodeType==3?node.nodeValue:node.hasChildNodes()&&!Element.hasClassName(node,className)?Element.collectTextNodesIgnoreClass(node,className):"";}).flatten().join("");};Element.setContentZoom=function(element,percent){element=$(element);Element.setStyle(element,{fontSize:percent/100+"em"});if(navigator.appVersion.indexOf("AppleWebKit")>0)window.scrollBy(0,0);};Element.getOpacity=function(element){var opacity;if(opacity=Element.getStyle(element,"opacity"))return parseFloat(opacity);if(opacity=(Element.getStyle(element,"filter")||"").match(/alpha\(opacity=(.*)\)/))if(opacity[1])return parseFloat(opacity[1])/100;return 1.0;};Element.setOpacity=function(element,value){element=$(element);if(value==1){Element.setStyle(element,{opacity:/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent)?0.999999:null});if(/MSIE/.test(navigator.userAgent))Element.setStyle(element,{filter:Element.getStyle(element,"filter").replace(/alpha\([^\)]*\)/gi,"")});}else{if(value<1.e-5)value=0;Element.setStyle(element,{opacity:value});if(/MSIE/.test(navigator.userAgent))Element.setStyle(element,{filter:Element.getStyle(element,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+value*100+")"});}};Element.getInlineOpacity=function(element){return $(element).style.opacity||"";};Element.childrenWithClassName=function(element,className,findFirst){var classNameRegExp=new RegExp("(^|\\s)"+className+"(\\s|$)");var results=$A($(element).getElementsByTagName("*"))[findFirst?"detect":"select"](function(c){return c.className&&c.className.match(classNameRegExp);});if(!results)results=[];return results;};Element.forceRerendering=function(element){try{element=$(element);var n=document.createTextNode(" ");element.appendChild(n);element.removeChild(n);}catch(e){}};Array.prototype.call=function(){var args=arguments;this.each(function(f){f.apply(this,args);});};var Effect={tagifyText:function(element){var tagifyStyle="position:relative";if(/MSIE/.test(navigator.userAgent))tagifyStyle+=";zoom:1";element=$(element);$A(element.childNodes).each(function(child){if(child.nodeType==3){child.nodeValue.toArray().each(function(character){element.insertBefore(Builder.node("span",{style:tagifyStyle},character==" "?String.fromCharCode(160):character),child);});Element.remove(child);}});},multiple:function(element,effect){var elements;if((typeof element=="object"||typeof element=="function")&&element.length)elements=element;else elements=$(element).childNodes;var options=Object.extend({speed:0.1,delay:0.0},arguments[2]||{});var masterDelay=options.delay;$A(elements).each(function(element,index){new effect(element,Object.extend(options,{delay:index*options.speed+masterDelay}));});},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(element,effect){element=$(element);effect=(effect||"appear").toLowerCase();var options=Object.extend({queue:{position:"end",scope:element.id||"global",limit:1}},arguments[2]||{});Effect[element.visible()?Effect.PAIRS[effect][1]:Effect.PAIRS[effect][0]](element,options);}};var Effect2=Effect;Effect.Transitions={};Effect.Transitions.linear=function(pos){return pos;};Effect.Transitions.sinoidal=function(pos){return -Math.cos(pos*Math.PI)/2+0.5;};Effect.Transitions.reverse=function(pos){return 1-pos;};Effect.Transitions.flicker=function(pos){return -Math.cos(pos*Math.PI)/4+0.75+Math.random()/4;};Effect.Transitions.wobble=function(pos){return -Math.cos(pos*Math.PI*(9*pos))/2+0.5;};Effect.Transitions.pulse=function(pos){return Math.floor(pos*10)%2==0?pos*10-Math.floor(pos*10):1-(pos*10-Math.floor(pos*10));};Effect.Transitions.none=function(pos){return 0;};Effect.Transitions.full=function(pos){return 1;};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null;},_each:function(iterator){this.effects._each(iterator);},add:function(effect){var timestamp=(new Date).getTime();var position=typeof effect.options.queue=="string"?effect.options.queue:effect.options.queue.position;switch(position){case "front":this.effects.findAll(function(e){return e.state=="idle";}).each(function(e){e.startOn+=effect.finishOn;e.finishOn+=effect.finishOn;});break;case "end":timestamp=this.effects.pluck("finishOn").max()||timestamp;break;}effect.startOn+=timestamp;effect.finishOn+=timestamp;if(!effect.options.queue.limit||this.effects.length<effect.options.queue.limit)this.effects.push(effect);if(!this.interval)this.interval=setInterval(this.loop.bind(this),40);},remove:function(effect){this.effects=this.effects.reject(function(e){return e==effect;});if(this.effects.length==0){clearInterval(this.interval);this.interval=null;}},loop:function(){var timePos=(new Date).getTime();this.effects.invoke("loop",timePos);}});Effect.Queues={instances:$H(),get:function(queueName){if(typeof queueName!="string")return queueName;if(!this.instances[queueName])this.instances[queueName]=new Effect.ScopedQueue;return this.instances[queueName];}};Effect.Queue=Effect.Queues.get("global");Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1.0,fps:25.0,sync:false,from:0.0,to:1.0,delay:0.0,queue:"parallel"};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(options){this.options=Object.extend(Object.extend({},Effect.DefaultOptions),options||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+this.options.duration*1000;this.event("beforeStart");if(!this.options.sync)Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this);},loop:function(timePos){if(timePos>=this.startOn){if(timePos>=this.finishOn){this.render(1.0);this.cancel();this.event("beforeFinish");if(this.finish)this.finish();this.event("afterFinish");return;}var pos=(timePos-this.startOn)/(this.finishOn-this.startOn);var frame=Math.round(pos*this.options.fps*this.options.duration);if(frame>this.currentFrame){this.render(pos);this.currentFrame=frame;}}},render:function(pos){if(this.state=="idle"){this.state="running";this.event("beforeSetup");if(this.setup)this.setup();this.event("afterSetup");}if(this.state=="running"){if(this.options.transition)pos=this.options.transition(pos);pos*=this.options.to-this.options.from;pos+=this.options.from;this.position=pos;this.event("beforeUpdate");if(this.update)this.update(pos);this.event("afterUpdate");}},cancel:function(){if(!this.options.sync)Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this);this.state="finished";},event:function(eventName){if(this.options[eventName+"Internal"])this.options[eventName+"Internal"](this);if(this.options[eventName])this.options[eventName](this);},inspect:function(){return "#<Effect:"+$H(this).inspect()+",options:"+$H(this.options).inspect()+">";}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(effects){this.effects=effects||[];this.start(arguments[1]);},update:function(position){this.effects.invoke("render",position);},finish:function(position){this.effects.each(function(effect){effect.render(1.0);effect.cancel();effect.event("beforeFinish");if(effect.finish)effect.finish(position);effect.event("afterFinish");});}});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(element){this.element=$(element);if(/MSIE/.test(navigator.userAgent)&&!this.element.hasLayout)this.element.setStyle({zoom:1});var options=Object.extend({from:this.element.getOpacity()||0.0,to:1.0},arguments[1]||{});this.start(options);},update:function(position){this.element.setOpacity(position);}});Effect.Move=Class.create();Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(element){this.element=$(element);var options=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(options);},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop;}},update:function(position){this.element.setStyle({left:this.options.x*position+this.originalLeft+"px",top:this.options.y*position+this.originalTop+"px"});}});Effect.MoveBy=function(element,toTop,toLeft){return new Effect.Move(element,Object.extend({x:toLeft,y:toTop},arguments[3]||{}));};Effect.Scale=Class.create();Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(element,percent){this.element=$(element);var options=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100.0,scaleTo:percent},arguments[2]||{});this.start(options);},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each((function(k){this.originalStyle[k]=this.element.style[k];}).bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var fontSize=this.element.getStyle("font-size")||"100%";["em","px","%"].each((function(fontSizeType){if(fontSize.indexOf(fontSizeType)>0){this.fontSize=parseFloat(fontSize);this.fontSizeType=fontSizeType;}}).bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box")this.dims=[this.element.offsetHeight,this.element.offsetWidth];if(/^content/.test(this.options.scaleMode))this.dims=[this.element.scrollHeight,this.element.scrollWidth];if(!this.dims)this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth];},update:function(position){var currentScale=this.options.scaleFrom/100.0+this.factor*position;if(this.options.scaleContent&&this.fontSize)this.element.setStyle({fontSize:this.fontSize*currentScale+this.fontSizeType});this.setDimensions(this.dims[0]*currentScale,this.dims[1]*currentScale);},finish:function(position){if(this.restoreAfterFinish)this.element.setStyle(this.originalStyle);},setDimensions:function(height,width){var d={};if(this.options.scaleX)d.width=width+"px";if(this.options.scaleY)d.height=height+"px";if(this.options.scaleFromCenter){var topd=(height-this.dims[0])/2;var leftd=(width-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY)d.top=this.originalTop-topd+"px";if(this.options.scaleX)d.left=this.originalLeft-leftd+"px";}else{if(this.options.scaleY)d.top=-topd+"px";if(this.options.scaleX)d.left=-leftd+"px";}}this.element.setStyle(d);}});Effect.Highlight=Class.create();Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(element){this.element=$(element);var options=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(options);},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return;}this.oldStyle={backgroundImage:this.element.getStyle("background-image")};this.element.setStyle({backgroundImage:"none"});if(!this.options.endcolor)this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff");if(!this.options.restorecolor)this.options.restorecolor=this.element.getStyle("background-color");this._base=$R(0,2).map((function(i){return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16);}).bind(this));this._delta=$R(0,2).map((function(i){return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i];}).bind(this));},update:function(position){this.element.setStyle({backgroundColor:$R(0,2).inject("#",(function(m,v,i){return m+Math.round(this._base[i]+this._delta[i]*position).toColorPart();}).bind(this))});},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}));}});Effect.ScrollTo=Class.create();Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(element){this.element=$(element);this.start(arguments[1]||{});},setup:function(){Position.prepare();var offsets=Position.cumulativeOffset(this.element);if(this.options.offset)offsets[1]+=this.options.offset;var max=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);this.scrollStart=Position.deltaY;this.delta=(offsets[1]>max?max:offsets[1])-this.scrollStart;},update:function(position){Position.prepare();window.scrollTo(Position.deltaX,this.scrollStart+position*this.delta);}});Effect.Fade=function(element){element=$(element);var oldOpacity=element.getInlineOpacity();var options=Object.extend({from:element.getOpacity()||1.0,to:0.0,afterFinishInternal:function(effect){if(effect.options.to!=0)return;effect.element.hide();effect.element.setStyle({opacity:oldOpacity});}},arguments[1]||{});return new Effect.Opacity(element,options);};Effect.Appear=function(element){element=$(element);var options=Object.extend({from:element.getStyle("display")=="none"?0.0:element.getOpacity()||0.0,to:1.0,afterFinishInternal:function(effect){effect.element.forceRerendering();},beforeSetup:function(effect){effect.element.setOpacity(effect.options.from);effect.element.show();}},arguments[1]||{});return new Effect.Opacity(element,options);};Effect.Puff=function(element){element=$(element);var oldStyle={opacity:element.getInlineOpacity(),position:element.getStyle("position")};return new Effect.Parallel([new Effect.Scale(element,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(element,{sync:true,to:0.0})],Object.extend({duration:1.0,beforeSetupInternal:function(effect){effect.effects[0].element.setStyle({position:"absolute"});},afterFinishInternal:function(effect){effect.effects[0].element.hide();effect.effects[0].element.setStyle(oldStyle);}},arguments[1]||{}));};Effect.BlindUp=function(element){element=$(element);element.makeClipping();return new Effect.Scale(element,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(effect){effect.element.hide();effect.element.undoClipping();}},arguments[1]||{}));};Effect.BlindDown=function(element){element=$(element);var elementDimensions=element.getDimensions();return new Effect.Scale(element,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:elementDimensions.height,originalWidth:elementDimensions.width},restoreAfterFinish:true,afterSetup:function(effect){effect.element.makeClipping();effect.element.setStyle({height:"0px"});effect.element.show();},afterFinishInternal:function(effect){effect.element.undoClipping();}},arguments[1]||{}));};Effect.SwitchOff=function(element){element=$(element);var oldOpacity=element.getInlineOpacity();return new Effect.Appear(element,{duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(effect){new Effect.Scale(effect.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(effect){effect.element.makePositioned();effect.element.makeClipping();},afterFinishInternal:function(effect){effect.element.hide();effect.element.undoClipping();effect.element.undoPositioned();effect.element.setStyle({opacity:oldOpacity});}});}});};Effect.DropOut=function(element){element=$(element);var oldStyle={top:element.getStyle("top"),left:element.getStyle("left"),opacity:element.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(element,{x:0,y:100,sync:true}),new Effect.Opacity(element,{sync:true,to:0.0})],Object.extend({duration:0.5,beforeSetup:function(effect){effect.effects[0].element.makePositioned();},afterFinishInternal:function(effect){effect.effects[0].element.hide();effect.effects[0].element.undoPositioned();effect.effects[0].element.setStyle(oldStyle);}},arguments[1]||{}));};Effect.Shake=function(element){element=$(element);var oldStyle={top:element.getStyle("top"),left:element.getStyle("left")};return new Effect.Move(element,{x:20,y:0,duration:0.05,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(effect){effect.element.undoPositioned();effect.element.setStyle(oldStyle);}});}});}});}});}});}});};Effect.SlideDown=function(element){element=$(element);element.cleanWhitespace();var oldInnerBottom=$(element.firstChild).getStyle("bottom");var elementDimensions=element.getDimensions();return new Effect.Scale(element,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:elementDimensions.height,originalWidth:elementDimensions.width},restoreAfterFinish:true,afterSetup:function(effect){effect.element.makePositioned();effect.element.firstChild.makePositioned();if(window.opera)effect.element.setStyle({top:""});effect.element.makeClipping();effect.element.setStyle({height:"0px"});effect.element.show();},afterUpdateInternal:function(effect){effect.element.firstChild.setStyle({bottom:effect.dims[0]-effect.element.clientHeight+"px"});},afterFinishInternal:function(effect){effect.element.undoClipping();if(/MSIE/.test(navigator.userAgent)){effect.element.undoPositioned();effect.element.firstChild.undoPositioned();}else{effect.element.firstChild.undoPositioned();effect.element.undoPositioned();}effect.element.firstChild.setStyle({bottom:oldInnerBottom});}},arguments[1]||{}));};Effect.SlideUp=function(element){element=$(element);element.cleanWhitespace();var oldInnerBottom=$(element.firstChild).getStyle("bottom");return new Effect.Scale(element,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(effect){effect.element.makePositioned();effect.element.firstChild.makePositioned();if(window.opera)effect.element.setStyle({top:""});effect.element.makeClipping();effect.element.show();},afterUpdateInternal:function(effect){effect.element.firstChild.setStyle({bottom:effect.dims[0]-effect.element.clientHeight+"px"});},afterFinishInternal:function(effect){effect.element.hide();effect.element.undoClipping();effect.element.firstChild.undoPositioned();effect.element.undoPositioned();effect.element.setStyle({bottom:oldInnerBottom});}},arguments[1]||{}));};Effect.Squish=function(element){return new Effect.Scale(element,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(effect){effect.element.makeClipping(effect.element);},afterFinishInternal:function(effect){effect.element.hide(effect.element);effect.element.undoClipping(effect.element);}});};Effect.Grow=function(element){element=$(element);var options=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var oldStyle={top:element.style.top,left:element.style.left,height:element.style.height,width:element.style.width,opacity:element.getInlineOpacity()};var dims=element.getDimensions();var initialMoveX,initialMoveY;var moveX,moveY;switch(options.direction){case "top-left":initialMoveX=initialMoveY=moveX=moveY=0;break;case "top-right":initialMoveX=dims.width;initialMoveY=moveY=0;moveX=-dims.width;break;case "bottom-left":initialMoveX=moveX=0;initialMoveY=dims.height;moveY=-dims.height;break;case "bottom-right":initialMoveX=dims.width;initialMoveY=dims.height;moveX=-dims.width;moveY=-dims.height;break;case "center":initialMoveX=dims.width/2;initialMoveY=dims.height/2;moveX=-dims.width/2;moveY=-dims.height/2;break;}return new Effect.Move(element,{x:initialMoveX,y:initialMoveY,duration:0.01,beforeSetup:function(effect){effect.element.hide();effect.element.makeClipping();effect.element.makePositioned();},afterFinishInternal:function(effect){new Effect.Parallel([new Effect.Opacity(effect.element,{sync:true,to:1.0,from:0.0,transition:options.opacityTransition}),new Effect.Move(effect.element,{x:moveX,y:moveY,sync:true,transition:options.moveTransition}),new Effect.Scale(effect.element,100,{scaleMode:{originalHeight:dims.height,originalWidth:dims.width},sync:true,scaleFrom:window.opera?1:0,transition:options.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(effect){effect.effects[0].element.setStyle({height:"0px"});effect.effects[0].element.show();},afterFinishInternal:function(effect){effect.effects[0].element.undoClipping();effect.effects[0].element.undoPositioned();effect.effects[0].element.setStyle(oldStyle);}},options));}});};Effect.Shrink=function(element){element=$(element);var options=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var oldStyle={top:element.style.top,left:element.style.left,height:element.style.height,width:element.style.width,opacity:element.getInlineOpacity()};var dims=element.getDimensions();var moveX,moveY;switch(options.direction){case "top-left":moveX=moveY=0;break;case "top-right":moveX=dims.width;moveY=0;break;case "bottom-left":moveX=0;moveY=dims.height;break;case "bottom-right":moveX=dims.width;moveY=dims.height;break;case "center":moveX=dims.width/2;moveY=dims.height/2;break;}return new Effect.Parallel([new Effect.Opacity(element,{sync:true,to:0.0,from:1.0,transition:options.opacityTransition}),new Effect.Scale(element,window.opera?1:0,{sync:true,transition:options.scaleTransition,restoreAfterFinish:true}),new Effect.Move(element,{x:moveX,y:moveY,sync:true,transition:options.moveTransition})],Object.extend({beforeStartInternal:function(effect){effect.effects[0].element.makePositioned();effect.effects[0].element.makeClipping();},afterFinishInternal:function(effect){effect.effects[0].element.hide();effect.effects[0].element.undoClipping();effect.effects[0].element.undoPositioned();effect.effects[0].element.setStyle(oldStyle);}},options));};Effect.Pulsate=function(element){element=$(element);var options=arguments[1]||{};var oldOpacity=element.getInlineOpacity();var transition=options.transition||Effect.Transitions.sinoidal;var reverser=function(pos){return transition(1-Effect.Transitions.pulse(pos));};reverser.bind(transition);return new Effect.Opacity(element,Object.extend(Object.extend({duration:3.0,from:0,afterFinishInternal:function(effect){effect.element.setStyle({opacity:oldOpacity});}},options),{transition:reverser}));};Effect.Fold=function(element){element=$(element);var oldStyle={top:element.style.top,left:element.style.left,width:element.style.width,height:element.style.height};Element.makeClipping(element);return new Effect.Scale(element,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(effect){new Effect.Scale(element,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(effect){effect.element.hide();effect.element.undoClipping();effect.element.setStyle(oldStyle);}});}},arguments[1]||{}));};["setOpacity","getOpacity","getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","childrenWithClassName"].each(function(f){Element.Methods[f]=Element[f];});Element.Methods.visualEffect=function(element,effect,options){s=effect.gsub(/_/,"-").camelize();effect_class=s.charAt(0).toUpperCase()+s.substring(1);new Effect[effect_class](element,options);return $(element);};Element.addMethods();
var Droppables={drops:[],remove:function(element){this.drops=this.drops.reject(function(d){return d.element==$(element);});},add:function(element){element=$(element);var options=Object.extend({greedy:true,hoverclass:null,tree:false},arguments[1]||{});if(options.containment){options._containers=[];var containment=options.containment;if(typeof containment=="object"&&containment.constructor==Array){containment.each(function(c){options._containers.push($(c));});}else{options._containers.push($(containment));}}if(options.accept)options.accept=[options.accept].flatten();Element.makePositioned(element);options.element=element;this.drops.push(options);},findDeepestChild:function(drops){deepest=drops[0];for(i=1;i<drops.length;++i)if(Element.isParent(drops[i].element,deepest.element))deepest=drops[i];return deepest;},isContained:function(element,drop){var containmentNode;if(drop.tree){containmentNode=element.treeNode;}else{containmentNode=element.parentNode;}return drop._containers.detect(function(c){return containmentNode==c;});},isAffected:function(point,element,drop){return drop.element!=element&&(!drop._containers||this.isContained(element,drop))&&(!drop.accept||Element.classNames(element).detect(function(v){return drop.accept.include(v);}))&&Position.within(drop.element,point[0],point[1]);},deactivate:function(drop){if(drop.hoverclass)Element.removeClassName(drop.element,drop.hoverclass);this.last_active=null;},activate:function(drop){if(drop.hoverclass)Element.addClassName(drop.element,drop.hoverclass);this.last_active=drop;},show:function(point,element){if(!this.drops.length)return;var affected=[];if(this.last_active)this.deactivate(this.last_active);this.drops.each(function(drop){if(Droppables.isAffected(point,element,drop))affected.push(drop);});if(affected.length>0){drop=Droppables.findDeepestChild(affected);Position.within(drop.element,point[0],point[1]);if(drop.onHover)drop.onHover(element,drop.element,Position.overlap(drop.overlap,drop.element));Droppables.activate(drop);}},fire:function(event,element){if(!this.last_active)return;Position.prepare();if(this.isAffected([Event.pointerX(event),Event.pointerY(event)],element,this.last_active))if(this.last_active.onDrop)this.last_active.onDrop(element,this.last_active.element,event);},reset:function(){if(this.last_active)this.deactivate(this.last_active);}};var Draggables={drags:[],observers:[],register:function(draggable){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress);}this.drags.push(draggable);},unregister:function(draggable){this.drags=this.drags.reject(function(d){return d==draggable;});if(this.drags.length==0){Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);Event.stopObserving(document,"keypress",this.eventKeypress);}},activate:function(draggable){window.focus();this.activeDraggable=draggable;},deactivate:function(){this.activeDraggable=null;},updateDrag:function(event){if(!this.activeDraggable)return;var pointer=[Event.pointerX(event),Event.pointerY(event)];if(this._lastPointer&&this._lastPointer.inspect()==pointer.inspect())return;this._lastPointer=pointer;this.activeDraggable.updateDrag(event,pointer);},endDrag:function(event){if(!this.activeDraggable)return;this._lastPointer=null;this.activeDraggable.endDrag(event);this.activeDraggable=null;},keyPress:function(event){if(this.activeDraggable)this.activeDraggable.keyPress(event);},addObserver:function(observer){this.observers.push(observer);this._cacheObserverCallbacks();},removeObserver:function(element){this.observers=this.observers.reject(function(o){return o.element==element;});this._cacheObserverCallbacks();},notify:function(eventName,draggable,event){if(this[eventName+"Count"]>0)this.observers.each(function(o){if(o[eventName])o[eventName](eventName,draggable,event);});},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(eventName){Draggables[eventName+"Count"]=Draggables.observers.select(function(o){return o[eventName];}).length;});}};var Draggable=Class.create();Draggable.prototype={initialize:function(element){var options=Object.extend({handle:false,starteffect:function(element){element._opacity=Element.getOpacity(element);new Effect.Opacity(element,{duration:0.2,from:element._opacity,to:0.7});},reverteffect:function(element,top_offset,left_offset){var dur=Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;element._revert=new Effect.Move(element,{x:-left_offset,y:-top_offset,duration:dur});},endeffect:function(element){var toOpacity=typeof element._opacity=="number"?element._opacity:1.0;new Effect.Opacity(element,{duration:0.2,from:0.7,to:toOpacity});},zindex:1000,revert:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false},arguments[1]||{});this.element=$(element);if(options.handle&&typeof options.handle=="string"){var h=Element.childrenWithClassName(this.element,options.handle,true);if(h.length>0)this.handle=h[0];}if(!this.handle)this.handle=$(options.handle);if(!this.handle)this.handle=this.element;if(options.scroll&&!options.scroll.scrollTo&&!options.scroll.outerHTML)options.scroll=$(options.scroll);Element.makePositioned(this.element);this.delta=this.currentDelta();this.options=options;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this);},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);Draggables.unregister(this);},currentDelta:function(){return [parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")];},initDrag:function(event){if(Event.isLeftClick(event)){var src=Event.element(event);if(src.tagName&&(src.tagName=="INPUT"||src.tagName=="SELECT"||src.tagName=="OPTION"||src.tagName=="BUTTON"||src.tagName=="TEXTAREA"))return;if(this.element._revert){this.element._revert.cancel();this.element._revert=null;}var pointer=[Event.pointerX(event),Event.pointerY(event)];var pos=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(i){return pointer[i]-pos[i];});Draggables.activate(this);Event.stop(event);}},startDrag:function(event){this.dragging=true;if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);this.element.style.zIndex=this.options.zindex;}if(this.options.ghosting){this._clone=this.element.cloneNode(true);Position.absolutize(this.element);this.element.parentNode.insertBefore(this._clone,this.element);}if(this.options.scroll){if(this.options.scroll==window){var where=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=where.left;this.originalScrollTop=where.top;}else{this.originalScrollLeft=this.options.scroll.scrollLeft;this.originalScrollTop=this.options.scroll.scrollTop;}}Draggables.notify("onStart",this,event);if(this.options.starteffect)this.options.starteffect(this.element);},updateDrag:function(event,pointer){if(!this.dragging)this.startDrag(event);Position.prepare();Droppables.show(pointer,this.element);Draggables.notify("onDrag",this,event);this.draw(pointer);if(this.options.change)this.options.change(this);if(this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){p=[left,top,left+width,top+height];}}else{p=Position.page(this.options.scroll);p[0]+=this.options.scroll.scrollLeft;p[1]+=this.options.scroll.scrollTop;p.push(p[0]+this.options.scroll.offsetWidth);p.push(p[1]+this.options.scroll.offsetHeight);}var speed=[0,0];if(pointer[0]<p[0]+this.options.scrollSensitivity)speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity);if(pointer[1]<p[1]+this.options.scrollSensitivity)speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity);if(pointer[0]>p[2]-this.options.scrollSensitivity)speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity);if(pointer[1]>p[3]-this.options.scrollSensitivity)speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity);this.startScrolling(speed);}if(navigator.appVersion.indexOf("AppleWebKit")>0)window.scrollBy(0,0);Event.stop(event);},finishDrag:function(event,success){this.dragging=false;if(this.options.ghosting){Position.relativize(this.element);Element.remove(this._clone);this._clone=null;}if(success)Droppables.fire(event,this.element);Draggables.notify("onEnd",this,event);var revert=this.options.revert;if(revert&&typeof revert=="function")revert=revert(this.element);var d=this.currentDelta();if(revert&&this.options.reverteffect){this.options.reverteffect(this.element,d[1]-this.delta[1],d[0]-this.delta[0]);}else{this.delta=d;}if(this.options.zindex)this.element.style.zIndex=this.originalZ;if(this.options.endeffect)this.options.endeffect(this.element);Draggables.deactivate(this);Droppables.reset();},keyPress:function(event){if(event.keyCode!=Event.KEY_ESC)return;this.finishDrag(event,false);Event.stop(event);},endDrag:function(event){if(!this.dragging)return;this.stopScrolling();this.finishDrag(event,true);Event.stop(event);},draw:function(point){var pos=Position.cumulativeOffset(this.element);var d=this.currentDelta();pos[0]-=d[0];pos[1]-=d[1];if(this.options.scroll&&this.options.scroll!=window){pos[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;pos[1]-=this.options.scroll.scrollTop-this.originalScrollTop;}var p=[0,1].map((function(i){return point[i]-pos[i]-this.offset[i];}).bind(this));if(this.options.snap){if(typeof this.options.snap=="function"){p=this.options.snap(p[0],p[1],this);}else{if(this.options.snapinstanceofArray){p=p.map((function(v,i){return Math.round(v/this.options.snap[i])*this.options.snap[i];}).bind(this));}else{p=p.map((function(v){return Math.round(v/this.options.snap)*this.options.snap;}).bind(this));}}}var style=this.element.style;if(!this.options.constraint||this.options.constraint=="horizontal")style.left=p[0]+"px";if(!this.options.constraint||this.options.constraint=="vertical")style.top=p[1]+"px";if(style.visibility=="hidden")style.visibility="";},stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);this.scrollInterval=null;Draggables._lastScrollPointer=null;}},startScrolling:function(speed){this.scrollSpeed=[speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];this.lastScrolled=new Date;this.scrollInterval=setInterval(this.scroll.bind(this),10);},scroll:function(){var current=new Date;var delta=current-this.lastScrolled;this.lastScrolled=current;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1000;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1]);}}}else{this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1000;this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1000;}Position.prepare();Droppables.show(Draggables._lastPointer,this.element);Draggables.notify("onDrag",this);Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer);Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1000;Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1000;if(Draggables._lastScrollPointer[0]<0)Draggables._lastScrollPointer[0]=0;if(Draggables._lastScrollPointer[1]<0)Draggables._lastScrollPointer[1]=0;this.draw(Draggables._lastScrollPointer);if(this.options.change)this.options.change(this);},_getWindowScroll:function(w){var T,L,W,H;with(w.document){if(w.document.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;L=documentElement.scrollLeft;}else if(w.document.body){T=body.scrollTop;L=body.scrollLeft;}if(w.innerWidth){W=w.innerWidth;H=w.innerHeight;}else if(w.document.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;H=documentElement.clientHeight;}else{W=body.offsetWidth;H=body.offsetHeight;}}return {top:T,left:L,width:W,height:H};}};var SortableObserver=Class.create();SortableObserver.prototype={initialize:function(element,observer){this.element=$(element);this.observer=observer;this.lastValue=Sortable.serialize(this.element);},onStart:function(){this.lastValue=Sortable.serialize(this.element);},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element))this.observer(this.element);}};var Sortable={sortables:{},_findRootElement:function(element){while(element.tagName!="BODY"){if(element.id&&Sortable.sortables[element.id])return element;element=element.parentNode;}},options:function(element){element=Sortable._findRootElement($(element));if(!element)return;return Sortable.sortables[element.id];},destroy:function(element){var s=Sortable.options(element);if(s){Draggables.removeObserver(s.element);s.droppables.each(function(d){Droppables.remove(d);});s.draggables.invoke("destroy");delete Sortable.sortables[s.element.id];}},create:function(element){element=$(element);var options=Object.extend({element:element,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:element,handle:false,only:false,hoverclass:null,ghosting:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:/^[^_]*_(.*)$/,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(element);var options_for_draggable={revert:true,scroll:options.scroll,scrollSpeed:options.scrollSpeed,scrollSensitivity:options.scrollSensitivity,ghosting:options.ghosting,constraint:options.constraint,handle:options.handle};if(options.starteffect)options_for_draggable.starteffect=options.starteffect;if(options.reverteffect)options_for_draggable.reverteffect=options.reverteffect;else if(options.ghosting)options_for_draggable.reverteffect=function(element){element.style.top=0;element.style.left=0;};if(options.endeffect)options_for_draggable.endeffect=options.endeffect;if(options.zindex)options_for_draggable.zindex=options.zindex;var options_for_droppable={overlap:options.overlap,containment:options.containment,tree:options.tree,hoverclass:options.hoverclass,onHover:Sortable.onHover};var options_for_tree={onHover:Sortable.onEmptyHover,overlap:options.overlap,containment:options.containment,hoverclass:options.hoverclass};Element.cleanWhitespace(element);options.draggables=[];options.droppables=[];if(options.dropOnEmpty||options.tree){Droppables.add(element,options_for_tree);options.droppables.push(element);}(this.findElements(element,options)||[]).each(function(e){var handle=options.handle?Element.childrenWithClassName(e,options.handle)[0]:e;options.draggables.push(new Draggable(e,Object.extend(options_for_draggable,{handle:handle})));Droppables.add(e,options_for_droppable);if(options.tree)e.treeNode=element;options.droppables.push(e);});if(options.tree){(Sortable.findTreeElements(element,options)||[]).each(function(e){Droppables.add(e,options_for_tree);e.treeNode=element;options.droppables.push(e);});}this.sortables[element.id]=options;Draggables.addObserver(new SortableObserver(element,options.onUpdate));},findElements:function(element,options){return Element.findChildren(element,options.only,options.tree?true:false,options.tag);},findTreeElements:function(element,options){return Element.findChildren(element,options.only,options.tree?true:false,options.treeTag);},onHover:function(element,dropon,overlap){if(Element.isParent(dropon,element))return;if(overlap>0.33&&overlap<0.66&&Sortable.options(dropon).tree){return;}else if(overlap>0.5){Sortable.mark(dropon,"before");if(dropon.previousSibling!=element){var oldParentNode=element.parentNode;element.style.visibility="hidden";dropon.parentNode.insertBefore(element,dropon);if(dropon.parentNode!=oldParentNode)Sortable.options(oldParentNode).onChange(element);Sortable.options(dropon.parentNode).onChange(element);}}else{Sortable.mark(dropon,"after");var nextElement=dropon.nextSibling||null;if(nextElement!=element){var oldParentNode=element.parentNode;element.style.visibility="hidden";dropon.parentNode.insertBefore(element,nextElement);if(dropon.parentNode!=oldParentNode)Sortable.options(oldParentNode).onChange(element);Sortable.options(dropon.parentNode).onChange(element);}}},onEmptyHover:function(element,dropon,overlap){var oldParentNode=element.parentNode;var droponOptions=Sortable.options(dropon);if(!Element.isParent(dropon,element)){var index;var children=Sortable.findElements(dropon,{tag:droponOptions.tag});var child=null;if(children){var offset=Element.offsetSize(dropon,droponOptions.overlap)*(1.0-overlap);for(index=0;index<children.length;index+=1){if(offset-Element.offsetSize(children[index],droponOptions.overlap)>=0){offset-=Element.offsetSize(children[index],droponOptions.overlap);}else if(offset-Element.offsetSize(children[index],droponOptions.overlap)/2>=0){child=index+1<children.length?children[index+1]:null;break;}else{child=children[index];break;}}}dropon.insertBefore(element,child);Sortable.options(oldParentNode).onChange(element);droponOptions.onChange(element);}},unmark:function(){if(Sortable._marker)Element.hide(Sortable._marker);},mark:function(dropon,position){var sortable=Sortable.options(dropon.parentNode);if(sortable&&!sortable.ghosting)return;if(!Sortable._marker){Sortable._marker=$("dropmarker")||document.createElement("DIV");Element.hide(Sortable._marker);Element.addClassName(Sortable._marker,"dropmarker");Sortable._marker.style.position="absolute";document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);}var offsets=Position.cumulativeOffset(dropon);Sortable._marker.style.left=offsets[0]+"px";Sortable._marker.style.top=offsets[1]+"px";if(position=="after")if(sortable.overlap=="horizontal")Sortable._marker.style.left=offsets[0]+dropon.clientWidth+"px";else Sortable._marker.style.top=offsets[1]+dropon.clientHeight+"px";Element.show(Sortable._marker);},_tree:function(element,options,parent){var children=Sortable.findElements(element,options)||[];for(var i=0;i<children.length;++i){var match=children[i].id.match(options.format);if(!match)continue;var child={id:encodeURIComponent(match?match[1]:null),element:element,parent:parent,children:new Array,position:parent.children.length,container:Sortable._findChildrenElement(children[i],options.treeTag.toUpperCase())};if(child.container)this._tree(child.container,options,child);parent.children.push(child);}return parent;},_findChildrenElement:function(element,containerTag){if(element&&element.hasChildNodes)for(var i=0;i<element.childNodes.length;++i)if(element.childNodes[i].tagName==containerTag)return element.childNodes[i];return null;},tree:function(element){element=$(element);var sortableOptions=this.options(element);var options=Object.extend({tag:sortableOptions.tag,treeTag:sortableOptions.treeTag,only:sortableOptions.only,name:element.id,format:sortableOptions.format},arguments[1]||{});var root={id:null,parent:null,children:new Array,container:element,position:0};return Sortable._tree(element,options,root);},_constructIndex:function(node){var index="";do{if(node.id)index="["+node.position+"]"+index;}while((node=node.parent)!=null);return index;},sequence:function(element){element=$(element);var options=Object.extend(this.options(element),arguments[1]||{});return $(this.findElements(element,options)||[]).map(function(item){return item.id.match(options.format)?item.id.match(options.format)[1]:"";});},setSequence:function(element,new_sequence){element=$(element);var options=Object.extend(this.options(element),arguments[2]||{});var nodeMap={};this.findElements(element,options).each(function(n){if(n.id.match(options.format))nodeMap[n.id.match(options.format)[1]]=[n,n.parentNode];n.parentNode.removeChild(n);});new_sequence.each(function(ident){var n=nodeMap[ident];if(n){n[1].appendChild(n[0]);delete nodeMap[ident];}});},serialize:function(element){element=$(element);var options=Object.extend(Sortable.options(element),arguments[1]||{});var name=encodeURIComponent(arguments[1]&&arguments[1].name?arguments[1].name:element.id);if(options.tree){return Sortable.tree(element,arguments[1]).children.map(function(item){return [name+Sortable._constructIndex(item)+"="+encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));}).flatten().join("&");}else{return Sortable.sequence(element,arguments[1]).map(function(item){return name+"[]="+encodeURIComponent(item);}).join("&");}}};Element.isParent=function(child,element){if(!child.parentNode||child==element)return false;if(child.parentNode==element)return true;return Element.isParent(child.parentNode,element);};Element.findChildren=function(element,only,recursive,tagName){if(!element.hasChildNodes())return null;tagName=tagName.toUpperCase();if(only)only=[only].flatten();var elements=[];$A(element.childNodes).each(function(e){if(e.tagName&&e.tagName.toUpperCase()==tagName&&(!only||Element.classNames(e).detect(function(v){return only.include(v);})))elements.push(e);if(recursive){var grandchildren=Element.findChildren(e,only,recursive,tagName);if(grandchildren)elements.push(grandchildren);}});return elements.length>0?elements.flatten():[];};Element.offsetSize=function(element,type){if(type=="vertical"||type=="height")return element.offsetHeight;else return element.offsetWidth;};
var JwacsLib;$trampoline(function($e){return {startPos:689,endPos:699,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Object,$makeK(function(JW82){return {startPos:1148,endPos:1158,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Object,$makeK(function(JW83){return {startPos:1249,endPos:1259,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Object,$makeK(function(JW84){JwacsLib={sleep:$lambda(function JW0($k,msec$1){if(!$k||!$k.$isK)return $callFromDirect(JW0,this,arguments);var k$2=$k;return {startPos:305,endPos:346,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(setTimeout,$makeK(function(){return {done:true};},$e),null,$lambda(function JW3($k){if(!$k||!$k.$isK)return $callFromDirect(JW3,this,arguments);return {replaceHandlers:k$2.$exHandlers,done:false,startPos:329,endPos:338,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return k$2();}};}),msec$1);}};}),yieldThread:$lambda(function JW4($k){if(!$k||!$k.$isK)return $callFromDirect(JW4,this,arguments);return {startPos:490,endPos:506,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("sleep",$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),JwacsLib,0);}};}),pageThunks:JW82,maxHistoryEntries:50,generatedHashes:JW83,nextToken:0,currentHash:JW84,initHistory:$lambda(function JW5($k,maxHistoryEntries$6){if(!$k||!$k.$isK)return $callFromDirect(JW5,this,arguments);return {startPos:1376,endPos:1399,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW85){var ifK$113=$makeK(function(){return {startPos:1468,endPos:1495,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("isInternetExplorer",$makeK(function(JW86){var ifK$114=$makeK(function(){var startTimerThunk$7=$lambda(function JW8($k){if(!$k||!$k.$isK)return $callFromDirect(JW8,this,arguments);return {startPos:1738,endPos:1777,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(setInterval,$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),null,JwacsLib.checkLocation,200);}};});var ifK$115=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);if(window.addEventListener)return {startPos:1827,endPos:1881,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("addEventListener",$makeK(function(){return {replaceHandlers:ifK$115.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$115();}};},$e),window,"load",startTimerThunk$7,false);}};else{var ifK$116=$makeK(function(){return {replaceHandlers:ifK$115.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$115();}};},$e);if(window.attachEvent)return {startPos:1923,endPos:1974,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("attachEvent",$makeK(function(){return {replaceHandlers:ifK$116.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$116();}};},$e),window,"onload",startTimerThunk$7,false);}};else return {replaceHandlers:ifK$116.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$116();}};}},$e);if(JW86)return {startPos:1511,endPos:1679,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("write",$makeK(function(){return {replaceHandlers:ifK$114.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$114();}};},$e),document,"<iframe style='position:absolute;top:-10000;left:-10000;width:1px;height:1px;'"+"id='HistoryIFrame' src='blank.html?0'></iframe>");}};else return {replaceHandlers:ifK$114.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$114();}};},$e),JwacsLib);}};},$e);if(!JW85){JwacsLib.maxHistoryEntries=maxHistoryEntries$6;return {replaceHandlers:ifK$113.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$113();}};}else return {replaceHandlers:ifK$113.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$113();}};},$e),null,maxHistoryEntries$6);}};}),newPage:$lambda(function JW9($k,title$10,hint$11){if(!$k||!$k.$isK)return $callFromDirect(JW9,this,arguments);function propertiesToString$16($k,obj$17){if(!$k||!$k.$isK)return $callFromDirect(propertiesToString$16,this,arguments);var nextChar$18="";var result$19="";var JW74=[];var JW75=0;var JW77=0;for(var JW76 in obj$17)JW74[JW75++]=JW76;var break$117=$makeK(function(){return {startPos:2390,endPos:2404,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(result$19);}};},$k.$exHandlers);var continue$118=$makeK(function(){if(!(JW77<JW74.length))return {replaceHandlers:break$117.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$117();}};field=JW74[JW77++];if(typeof obj$17[field]=="function")return {replaceHandlers:continue$118.$exHandlers,done:false,startPos:2197,endPos:2206,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$118();}};return {startPos:2303,endPos:2315,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(escape,$makeK(function(JW87){return {startPos:2325,endPos:2342,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(escape,$makeK(function(JW88){result$19+=nextChar$18+JW87+"="+JW88;nextChar$18="&";return {replaceHandlers:continue$118.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$118();}};},$e),null,obj$17[field]);}};},$e),null,field);}};},$k.$exHandlers);return {replaceHandlers:continue$118.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$118();}};}propertiesToString$16.$jw=true;return {startPos:2466,endPos:2490,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("prunePageThunks",$makeK(function(){var token$12=JwacsLib.nextToken++;var k$13=$k;return {startPos:2587,endPos:2610,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return propertiesToString$16($makeK(function(JW89){var hash$14=JW89+"|"+token$12;JwacsLib.generatedHashes[hash$14]=token$12;JwacsLib.pageThunks[hash$14]=$lambda(function JW20($k){if(!$k||!$k.$isK)return $callFromDirect(JW20,this,arguments);document.title=title$10;return {replaceHandlers:k$13.$exHandlers,done:false,startPos:2740,endPos:2749,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return k$13();}};});return {startPos:2995,endPos:3022,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("isInternetExplorer",$makeK(function(JW90){var ifK$119=$makeK(function(){return {done:true};},$e);if(JW90)return {startPos:3051,endPos:3090,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(iframe$15){return {startPos:3128,endPos:3139,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(escape,$makeK(function(JW91){iframe$15.src="blank.html?"+JW91;return {replaceHandlers:ifK$119.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$119();}};},$e),null,hash$14);}};},$e),document,"HistoryIFrame");}};else{window.location.hash="#"+hash$14;return {replaceHandlers:ifK$119.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$119();}};}},$e),JwacsLib);}};},$e),hint$11);}};},$e),JwacsLib);}};}),stripChar:$lambda(function JW21($k,str$22,ch$23){if(!$k||!$k.$isK)return $callFromDirect(JW21,this,arguments);var JW92;var ifK$120=$makeK(function(){if(str$22&&JW92==ch$23)return {startPos:3345,endPos:3366,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("substr",$k,str$22,1);}};return {startPos:3371,endPos:3382,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(str$22);}};},$k.$exHandlers);if(str$22)return {startPos:3318,endPos:3330,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("charAt",$makeK(function(JW121){JW92=JW121;return {replaceHandlers:ifK$120.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$120();}};},$e),str$22,0);}};else return {replaceHandlers:ifK$120.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$120();}};}),stripHash:$lambda(function JW24($k,str$25){if(!$k||!$k.$isK)return $callFromDirect(JW24,this,arguments);return {startPos:3426,endPos:3462,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stripChar",$k,JwacsLib,str$25,"#");}};}),stripToken:$lambda(function JW26($k,str$27){if(!$k||!$k.$isK)return $callFromDirect(JW26,this,arguments);if(!str$27||typeof str$27!="string")return {startPos:3546,endPos:3557,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(str$27);}};return {startPos:3562,endPos:3595,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("replace",$k,str$27,/\|\d+$/,"");}};}),getToken:$lambda(function JW28($k,str$29){if(!$k||!$k.$isK)return $callFromDirect(JW28,this,arguments);if(!str$29||typeof str$29!="string")return {startPos:3677,endPos:3686,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(0);}};return {startPos:3709,endPos:3729,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(aMatch$30){if(aMatch$30)return {startPos:3753,endPos:3782,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Number,$k,aMatch$30[1]);}};else return {startPos:3798,endPos:3807,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(0);}};},$e),str$29,/\|(\d+)$/);}};}),parsePageArgs:$lambda(function JW31($k){if(!$k||!$k.$isK)return $callFromDirect(JW31,this,arguments);return {startPos:3861,endPos:3905,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stripChar",$makeK(function(hash$32){var ifK$122=$makeK(function(){return {startPos:4048,endPos:4094,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stripChar",$makeK(function(query$33){var ifK$123=$makeK(function(){var result$34={};var i$35;var factor$37;i$35=0;var break$124=$makeK(function(){var factor$37;i$35=0;var break$126=$makeK(function(){return {startPos:4574,endPos:4588,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(result$34);}};},$e);var continue$127=$makeK(function(){if(!(i$35<hash$32.length))return {replaceHandlers:break$126.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$126();}};return {startPos:4486,endPos:4503,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(JW100){factor$37=JW100;return {startPos:4519,endPos:4537,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(unescape,$makeK(function(JW101){return {startPos:4542,endPos:4560,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(unescape,$makeK(function(JW102){result$34[JW101]=JW102;i$35++;return {replaceHandlers:continue$127.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$127();}};},$e),null,factor$37[1]);}};},$e),null,factor$37[0]);}};},$e),hash$32[i$35],"=");}};},$e);return {replaceHandlers:continue$127.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$127();}};},$e);var continue$125=$makeK(function(){if(!(i$35<query$33.length))return {replaceHandlers:break$124.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$124();}};return {startPos:4339,endPos:4357,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(JW97){factor$37=JW97;return {startPos:4373,endPos:4391,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(unescape,$makeK(function(JW98){return {startPos:4396,endPos:4414,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(unescape,$makeK(function(JW99){result$34[JW98]=JW99;i$35++;return {replaceHandlers:continue$125.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$125();}};},$e),null,factor$37[1]);}};},$e),null,factor$37[0]);}};},$e),query$33[i$35],"=");}};},$e);return {replaceHandlers:continue$125.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$125();}};},$e);if(query$33)return {startPos:4131,endPos:4156,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stripToken",$makeK(function(JW95){query$33=JW95;return {startPos:4192,endPos:4207,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(JW96){query$33=JW96;return {replaceHandlers:ifK$123.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$123();}};},$e),query$33,"&");}};},$e),JwacsLib,query$33);}};else{query$33=[];return {replaceHandlers:ifK$123.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$123();}};}},$e),JwacsLib,window.location.search,"?");}};},$e);if(hash$32)return {startPos:3940,endPos:3964,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stripToken",$makeK(function(JW93){hash$32=JW93;return {startPos:3980,endPos:3994,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(JW94){hash$32=JW94;return {replaceHandlers:ifK$122.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$122();}};},$e),hash$32,"&");}};},$e),JwacsLib,hash$32);}};else{hash$32=[];return {replaceHandlers:ifK$122.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$122();}};}},$e),JwacsLib,window.location.hash,"#");}};}),checkLocation:$lambda(function JW38($k){if(!$k||!$k.$isK)return $callFromDirect(JW38,this,arguments);return {startPos:4642,endPos:4683,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stripHash",$makeK(function(hash$39){if(hash$39==JwacsLib.currentHash)return {startPos:4729,endPos:4736,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};return {startPos:4754,endPos:4792,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getToken",$makeK(function(token$40){var ifK$128=$makeK(function(){JwacsLib.currentHash=hash$39;var ifK$129=$makeK(function(){return {startPos:5029,endPos:5054,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(hash$39,$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),JwacsLib.pageThunks);}};},$e);if(!JwacsLib.pageThunks[hash$39]){JwacsLib.pageThunks[hash$39]=$lambda(function JW41($k){if(!$k||!$k.$isK)return $callFromDirect(JW41,this,arguments);return {startPos:4990,endPos:5017,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("parsePageArgs",$makeK(function(JW103){return {startPos:4985,endPos:5017,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(main,$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),null,JW103);}};},$e),JwacsLib,hash$39);}};});return {replaceHandlers:ifK$129.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$129();}};}else return {replaceHandlers:ifK$129.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$129();}};},$e);if(token$40>JwacsLib.nextToken){JwacsLib.nextToken=token$40+1;return {replaceHandlers:ifK$128.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$128();}};}else return {replaceHandlers:ifK$128.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$128();}};},$e),JwacsLib,JwacsLib.currentHash);}};},$e),JwacsLib,document.location.hash);}};}),isInternetExplorer:$lambda(function JW42($k){if(!$k||!$k.$isK)return $callFromDirect(JW42,this,arguments);var JW104;return {startPos:5121,endPos:5152,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("toLowerCase",$makeK(function(userAgent$43){var JW105=document.all;var ifK$130=$makeK(function(){return {startPos:5160,endPos:5217,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(JW105&&JW104!=-1);}};},$e);if(JW105)return {startPos:5184,endPos:5208,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("indexOf",$makeK(function(JW131){JW104=JW131;return {replaceHandlers:ifK$130.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$130();}};},$e),userAgent$43,"msie");}};else return {replaceHandlers:ifK$130.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$130();}};},$e),navigator.userAgent);}};}),prunePageThunks:$lambda(function JW44($k){if(!$k||!$k.$isK)return $callFromDirect(JW44,this,arguments);return {startPos:5711,endPos:5749,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getToken",$makeK(function(currentToken$45){return {startPos:5771,endPos:5781,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Object,$makeK(function(dummyObj$46){return {startPos:5856,endPos:5865,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Array,$makeK(function(remainingHashes$47){var JW78=[];var JW79=0;var JW81=0;for(var JW80 in JwacsLib.pageThunks)JW78[JW79++]=JW80;var h$48;var break$132=$makeK(function(){var ifK$134=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);if(remainingHashes$47.length>JwacsLib.maxHistoryEntries)return {startPos:6550,endPos:7186,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("sort",$makeK(function(){var numberToPrune$49=remainingHashes$47.length-JwacsLib.maxHistoryEntries;var i$50=0;var break$135=$makeK(function(){return {replaceHandlers:ifK$134.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$134();}};},$e);var continue$136=$makeK(function(){if(!(i$50<numberToPrune$49))return {replaceHandlers:break$135.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$135();}};delete JwacsLib.pageThunks[remainingHashes$47[i$50]];delete JwacsLib.generatedHashes[remainingHashes$47[i$50]];i$50++;return {replaceHandlers:continue$136.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$136();}};},$e);return {replaceHandlers:continue$136.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$136();}};},$e),remainingHashes$47,$lambda(function JW51($k,l$52,r$53){if(!$k||!$k.$isK)return $callFromDirect(JW51,this,arguments);return {startPos:6657,endPos:6676,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getToken",$makeK(function(lToken$54){return {startPos:6721,endPos:6740,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getToken",$makeK(function(rToken$55){return {startPos:6775,endPos:6787,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW107){var ifK$137=$makeK(function(){return {startPos:6866,endPos:6878,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW108){var ifK$138=$makeK(function(){if(lToken$54<rToken$55)return {startPos:7006,endPos:7016,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(-1);}};else if(rToken$55<lToken$54)return {startPos:7102,endPos:7111,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(1);}};else return {startPos:7177,endPos:7186,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(0);}};},$e);if(JW108){rToken$55=-1;return {replaceHandlers:ifK$138.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$138();}};}else return {replaceHandlers:ifK$138.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$138();}};},$e),null,rToken$55);}};},$e);if(JW107){lToken$54=-1;return {replaceHandlers:ifK$137.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$137();}};}else return {replaceHandlers:ifK$137.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$137();}};},$e),null,lToken$54);}};},$e),JwacsLib,r$53);}};},$e),JwacsLib,l$52);}};}));}};else return {replaceHandlers:ifK$134.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$134();}};},$e);var continue$133=$makeK(function(){if(!(JW81<JW78.length))return {replaceHandlers:break$132.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$132();}};h$48=JW78[JW81++];if(dummyObj$46[h$48])return {replaceHandlers:continue$133.$exHandlers,done:false,startPos:5941,endPos:5950,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$133();}};return {startPos:5962,endPos:5980,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW106){var ifK$139=$makeK(function(){return {replaceHandlers:continue$133.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$133();}};},$e);if(!JW106&&JwacsLib.generatedHashes[h$48]&&JwacsLib.generatedHashes[h$48]>currentToken$45){delete JwacsLib.generatedHashes[h$48];delete JwacsLib.pageThunks[h$48];return {replaceHandlers:ifK$139.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$139();}};}else{remainingHashes$47[remainingHashes$47.length]=h$48;return {replaceHandlers:ifK$139.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$139();}};}},$e),null,currentToken$45);}};},$e);return {replaceHandlers:continue$133.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$133();}};},$e));}};},$e));}};},$e),JwacsLib,JwacsLib.currentHash);}};}),iframeLoaded:$lambda(function JW56($k,search$57){if(!$k||!$k.$isK)return $callFromDirect(JW56,this,arguments);return {startPos:7541,endPos:7571,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stripChar",$makeK(function(hash$58){return {startPos:7802,endPos:7815,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(unescape,$makeK(function(JW109){window.location.hash=JW109;return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),null,hash$58);}};},$e),JwacsLib,search$57,"?");}};}),getHttpObj:$lambda(function JW59($k){if(!$k||!$k.$isK)return $callFromDirect(JW59,this,arguments);var http$60=null;var tryK$141=$makeK(function(){var tryK$143=$makeK(function(){var tryK$145=$makeK(function(){return {startPos:8270,endPos:8323,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw "Cannot create a suitable http request object";}};},$k.$exHandlers);var catchK$144=$makeK(function(e){return {replaceHandlers:tryK$145.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return tryK$145();}};},$k.$exHandlers);return {addHandler:catchK$144,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:8170,endPos:8207,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(ActiveXObject,$makeK(function(JW112){http$60=JW112;if(http$60)return {removeHandler:catchK$144,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:8225,endPos:8237,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(http$60);}};}};return {removeHandler:catchK$144,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {replaceHandlers:tryK$145.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return tryK$145();}};}};},$e),"Microsoft.XMLHTTP");}};}};},$k.$exHandlers);var catchK$142=$makeK(function(e){return {replaceHandlers:tryK$143.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return tryK$143();}};},$k.$exHandlers);return {addHandler:catchK$142,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:8050,endPos:8084,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(ActiveXObject,$makeK(function(JW111){http$60=JW111;if(http$60)return {removeHandler:catchK$142,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:8102,endPos:8114,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(http$60);}};}};return {removeHandler:catchK$142,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {replaceHandlers:tryK$143.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return tryK$143();}};}};},$e),"Msxml2.XMLHTTP");}};}};},$k.$exHandlers);var catchK$140=$makeK(function(e){return {replaceHandlers:tryK$141.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return tryK$141();}};},$k.$exHandlers);return {addHandler:catchK$140,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:7947,endPos:7965,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(XMLHttpRequest,$makeK(function(JW110){http$60=JW110;if(http$60)return {removeHandler:catchK$140,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:7982,endPos:7994,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(http$60);}};}};return {removeHandler:catchK$140,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {replaceHandlers:tryK$141.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return tryK$141();}};}};},$e));}};}};}),emptyFunction:$lambda(function JW61($k){if(!$k||!$k.$isK)return $callFromDirect(JW61,this,arguments);return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};}),sendRequest:$lambda(function JW62($k,method$63,url$64,body$65){if(!$k||!$k.$isK)return $callFromDirect(JW62,this,arguments);return {startPos:8430,endPos:8449,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getHttpObj",$makeK(function(http$66){var k$67=$k;http$66.onreadystatechange=$lambda(function JW68($k){if(!$k||!$k.$isK)return $callFromDirect(JW68,this,arguments);var catchK$146=$makeK(function(e){http$66.onreadystatechange=JwacsLib.emptyFunction;return {replaceHandlers:k$67.$exHandlers,done:false,startPos:8975,endPos:8988,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw e;}};},$k.$exHandlers);return {addHandler:catchK$146,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));if(http$66.readyState==4){http$66.onreadystatechange=JwacsLib.emptyFunction;return {replaceHandlers:k$67.$exHandlers,done:false,startPos:8785,endPos:8802,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return k$67(http$66);}};}return {removeHandler:catchK$146,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};}};}};});return {startPos:9009,endPos:9030,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("open",$makeK(function(){return {startPos:9037,endPos:9051,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("send",$makeK(function(){return {done:true};},$e),http$66,body$65);}};},$e),http$66,method$63,url$64);}};},$e),JwacsLib);}};}),fetchData:$lambda(function JW69($k,method$70,url$71){if(!$k||!$k.$isK)return $callFromDirect(JW69,this,arguments);return {startPos:9127,endPos:9165,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("sendRequest",$makeK(function(http$72){if(!(http$72.status==undefined||http$72.status==0||http$72.status>=200&&http$72.status<300))return {startPos:9338,endPos:9380,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Error,$makeK(function(err$73){err$73.http=http$72;return {startPos:9412,endPos:9422,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw err$73;}};},$e),"Server returned "+http$72.status);}};return {startPos:9434,endPos:9459,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(http$72.responseText);}};},$e),JwacsLib,method$70,url$71,null);}};})};return {done:true};},$e));}};},$e));}};},$e));}};});

var dayNames;var monthNames;function main($k,args$0){if(!$k||!$k.$isK)return $callFromDirect(main,this,arguments);return {startPos:526,endPos:534,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(date$1){return {startPos:543,endPos:559,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW216){var ifK$371=$makeK(function(){return {startPos:603,endPos:618,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW217){var ifK$372=$makeK(function(){return {startPos:664,endPos:680,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(year$2){return {startPos:698,endPos:711,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(month$3){return {startPos:720,endPos:750,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showCalendarScreen($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),year$2,month$3);}};},$e),date$1);}};},$e),date$1);}};},$e);if(!JW217)return {startPos:625,endPos:647,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setYear",$makeK(function(){return {replaceHandlers:ifK$372.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$372();}};},$e),date$1,args$0.year);}};else return {replaceHandlers:ifK$372.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$372();}};},$e),null,args$0.year);}};},$e);if(!JW216)return {startPos:566,endPos:594,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setMonth",$makeK(function(){return {replaceHandlers:ifK$371.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$371();}};},$e),date$1,args$0.month-1);}};else return {replaceHandlers:ifK$371.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$371();}};},$e),null,args$0.month);}};},$e));}};}main.$jw=true;function showCalendarScreen($k,year$4,month$5){if(!$k||!$k.$isK)return $callFromDirect(showCalendarScreen,this,arguments);document.title=monthNames[month$5]+" "+year$4;return {startPos:870,endPos:898,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(contentDiv$6){contentDiv$6.id="contentDiv";contentDiv$6.innerHTML="<h2 id='monthTitle'>"+monthNames[month$5]+" "+year$4+"</h2>";return {startPos:1053,endPos:1091,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcNavigationLinksElement($makeK(function(JW218){return {startPos:1030,endPos:1091,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:1120,endPos:1148,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcMonthElement($makeK(function(JW219){return {startPos:1097,endPos:1148,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:1177,endPos:1215,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcNavigationLinksElement($makeK(function(JW220){return {startPos:1154,endPos:1215,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:1244,endPos:1281,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcBottomControlsElement($makeK(function(JW221){return {startPos:1221,endPos:1281,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:1303,endPos:1317,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(oldDiv$7){return {startPos:1322,endPos:1371,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("replaceChild",$makeK(function(){return {startPos:1388,endPos:1415,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return computeRectangle($makeK(function(rect$8){var s$9=rect$8.start;var e$10=rect$8.end;return {startPos:1480,endPos:1495,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return readEvents($makeK(function(events$11){var i$12=0;var break$373=$makeK(function(){var handlerSpec$13={onDrop:eventDropped};return {startPos:1679,endPos:1688,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getTime",$makeK(function(JW222){return {startPos:1670,endPos:1688,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(d$14){var break$375=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);var continue$376=$makeK(function(){return {startPos:1693,endPos:1702,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getTime",$makeK(function(JW223){return {startPos:1708,endPos:1717,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getTime",$makeK(function(JW224){if(!(JW223<=JW224))return {replaceHandlers:break$375.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$375();}};return {startPos:1768,endPos:1779,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return dateToStr($makeK(function(JW225){return {startPos:1753,endPos:1793,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("add",$makeK(function(){return {startPos:1731,endPos:1740,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW226){return {startPos:1721,endPos:1746,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setDate",$makeK(function(){return {replaceHandlers:continue$376.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$376();}};},$e),d$14,JW226+1);}};},$e),d$14);}};},$e),Droppables,JW225,handlerSpec$13);}};},$e),d$14);}};},$e),e$10);}};},$e),d$14);}};},$e);return {replaceHandlers:continue$376.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$376();}};},$e),JW222);}};},$e),s$9);}};},$e);var continue$374=$makeK(function(){if(!(i$12<events$11.length))return {replaceHandlers:break$373.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$373();}};return {startPos:1543,endPos:1568,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showEvent($makeK(function(){i$12++;return {replaceHandlers:continue$374.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$374();}};},$e),events$11[i$12],true);}};},$e);return {replaceHandlers:continue$374.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$374();}};},$e),s$9,e$10);}};},$e),year$4,month$5);}};},$e),oldDiv$7.parentNode,contentDiv$6,oldDiv$7);}};},$e),null,"contentDiv");}};},$e),contentDiv$6,JW221);}};},$e),year$4,month$5);}};},$e),contentDiv$6,JW220);}};},$e),year$4,month$5);}};},$e),contentDiv$6,JW219);}};},$e),year$4,month$5);}};},$e),contentDiv$6,JW218);}};},$e),year$4,month$5);}};},$e),document,"DIV");}};}showCalendarScreen.$jw=true;function computeRectangle($k,year$15,month$16){if(!$k||!$k.$isK)return $callFromDirect(computeRectangle,this,arguments);return {startPos:1914,endPos:1937,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(s$17){var break$377=$makeK(function(){return {startPos:2029,endPos:2048,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return lastDay($makeK(function(JW229){return {startPos:2007,endPos:2048,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(e$18){var break$379=$makeK(function(){return {startPos:2112,endPos:2138,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k({start:s$17,end:e$18});}};},$e);var continue$380=$makeK(function(){return {startPos:2060,endPos:2068,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDay",$makeK(function(JW230){if(!(JW230!=6))return {replaceHandlers:break$379.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$379();}};return {startPos:2091,endPos:2100,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW231){return {startPos:2081,endPos:2106,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setDate",$makeK(function(){return {replaceHandlers:continue$380.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$380();}};},$e),e$18,JW231+1);}};},$e),e$18);}};},$e),e$18);}};},$e);return {replaceHandlers:continue$380.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$380();}};},$e),year$15,month$16,JW229);}};},$e),year$15,month$16);}};},$e);var continue$378=$makeK(function(){return {startPos:1948,endPos:1956,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDay",$makeK(function(JW227){if(!(JW227!=0))return {replaceHandlers:break$377.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$377();}};return {startPos:1979,endPos:1988,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW228){return {startPos:1969,endPos:1994,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setDate",$makeK(function(){return {replaceHandlers:continue$378.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$378();}};},$e),s$17,JW228-1);}};},$e),s$17);}};},$e),s$17);}};},$e);return {replaceHandlers:continue$378.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$378();}};},$e),year$15,month$16,1);}};}computeRectangle.$jw=true;function unpackResponse($k,text$19){if(!$k||!$k.$isK)return $callFromDirect(unpackResponse,this,arguments);var JW232;var JW233=text$19==null||text$19==undefined||text$19.length==0;var ifK$381=$makeK(function(){if(JW233||JW232)return {startPos:2454,endPos:2489,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw "Empty response from server";}};return {startPos:2505,endPos:2523,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(lines$20){if(!lines$20||lines$20.length==0)return {startPos:2600,endPos:2611,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw text$19;}};return {startPos:2621,endPos:2646,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW234){if(!JW234)return {startPos:2653,endPos:2668,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw lines$20[0];}};return {startPos:2686,endPos:2695,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Array,$makeK(function(result$21){var ifK$382=$makeK(function(){return {startPos:3241,endPos:3255,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(result$21);}};},$e);if(lines$20.length>2)return {startPos:2795,endPos:2813,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(headings$22){var i$23;var line$24;var fields$25;var obj$26;var j$27;i$23=2;var break$383=$makeK(function(){return {replaceHandlers:ifK$382.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$382();}};},$e);var continue$384=$makeK(function(){if(!(i$23<lines$20.length))return {replaceHandlers:break$383.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$383();}};line$24=lines$20[i$23];return {startPos:2961,endPos:2975,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(JW235){fields$25=JW235;var ifK$385=$makeK(function(){i$23++;return {replaceHandlers:continue$384.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$384();}};},$e);if(fields$25&&fields$25.length>0)return {startPos:3042,endPos:3052,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Object,$makeK(function(JW236){obj$26=JW236;j$27=0;var break$386=$makeK(function(){result$21[result$21.length]=obj$26;return {replaceHandlers:ifK$385.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$385();}};},$e);var continue$387=$makeK(function(){if(!(j$27<fields$25.length))return {replaceHandlers:break$386.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$386();}};return {startPos:3125,endPos:3145,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(unescape,$makeK(function(JW237){return {startPos:3150,endPos:3168,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(unescape,$makeK(function(JW238){obj$26[JW237]=JW238;j$27++;return {replaceHandlers:continue$387.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$387();}};},$e),null,fields$25[j$27]);}};},$e),null,headings$22[j$27]);}};},$e);return {replaceHandlers:continue$387.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$387();}};},$e));}};else return {replaceHandlers:ifK$385.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$385();}};},$e),line$24,",");}};},$e);return {replaceHandlers:continue$384.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$384();}};},$e),lines$20[1],",");}};else return {replaceHandlers:ifK$382.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$382();}};},$e));}};},$e),lines$20[0],/\s*OK\s*/);}};},$e),text$19,/\r?\n/);}};},$k.$exHandlers);if(!JW233)return {startPos:2423,endPos:2447,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW388){JW232=JW388;return {replaceHandlers:ifK$381.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$381();}};},$e),text$19,/^[\s\r\n]*$/);}};else return {replaceHandlers:ifK$381.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$381();}};}unpackResponse.$jw=true;function pad($k,num$28,width$29){if(!$k||!$k.$isK)return $callFromDirect(pad,this,arguments);return {startPos:3297,endPos:3311,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(String,$makeK(function(ret$30){var break$389=$makeK(function(){return {startPos:3365,endPos:3376,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(ret$30);}};},$e);var continue$390=$makeK(function(){if(!(ret$30.length<width$29))return {replaceHandlers:break$389.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$389();}};ret$30="0"+ret$30;return {replaceHandlers:continue$390.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$390();}};},$e);return {replaceHandlers:continue$390.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$390();}};},$e),num$28);}};}pad.$jw=true;function strToDate($k,str$31){if(!$k||!$k.$isK)return $callFromDirect(strToDate,this,arguments);var catchK$391=$makeK(function(e){return {startPos:3978,endPos:4025,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw "error in strToDate("+str$31+"):\n"+e;}};},$k.$exHandlers);return {addHandler:catchK$391,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:3776,endPos:3789,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("split",$makeK(function(components$32){return {startPos:3807,endPos:3831,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Number,$makeK(function(yyyy$33){return {startPos:3847,endPos:3871,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Number,$makeK(function(mm$34){return {startPos:3887,endPos:3911,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Number,$makeK(function(dd$35){return {startPos:3920,endPos:3954,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(JW392){return {removeHandler:catchK$391,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(JW392);}};}};},$e),yyyy$33,mm$34-1,dd$35);}};},$e),components$32[2]);}};},$e),components$32[1]);}};},$e),components$32[0]);}};},$e),str$31,"-");}};}};}strToDate.$jw=true;function dateToStr($k,date$36){if(!$k||!$k.$isK)return $callFromDirect(dateToStr,this,arguments);return {startPos:4068,endPos:4084,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW239){return {startPos:4099,endPos:4112,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW240){return {startPos:4095,endPos:4121,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return pad($makeK(function(JW241){return {startPos:4135,endPos:4147,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW242){return {startPos:4131,endPos:4152,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return pad($makeK(function(JW243){return {startPos:4061,endPos:4154,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(JW239+"-"+JW241+"-"+JW243);}};},$e),JW242,2);}};},$e),date$36);}};},$e),JW240+1,2);}};},$e),date$36);}};},$e),date$36);}};}dateToStr.$jw=true;function equalDates($k,date1$37,date2$38){if(!$k||!$k.$isK)return $callFromDirect(equalDates,this,arguments);var JW249;var JW250;var JW246;var JW247;return {startPos:4202,endPos:4219,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW244){return {startPos:4225,endPos:4242,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW245){var JW248=JW244==JW245;var ifK$393=$makeK(function(){var JW251=JW248&&JW246==JW247;var ifK$394=$makeK(function(){return {startPos:4195,endPos:4333,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(JW251&&JW249==JW250);}};},$e);if(JW251)return {startPos:4298,endPos:4311,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW395){JW249=JW395;return {startPos:4317,endPos:4330,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW396){JW250=JW396;return {replaceHandlers:ifK$394.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$394();}};},$e),date2$38);}};},$e),date1$37);}};else return {replaceHandlers:ifK$394.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$394();}};},$e);if(JW248)return {startPos:4253,endPos:4267,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW397){JW246=JW397;return {startPos:4273,endPos:4287,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW398){JW247=JW398;return {replaceHandlers:ifK$393.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$393();}};},$e),date2$38);}};},$e),date1$37);}};else return {replaceHandlers:ifK$393.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$393();}};},$e),date2$38);}};},$e),date1$37);}};}equalDates.$jw=true;function lastDay($k,year$39,month$40){if(!$k||!$k.$isK)return $callFromDirect(lastDay,this,arguments);return {startPos:4469,endPos:4477,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(now$41){return {startPos:4491,endPos:4506,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Number,$makeK(function(yyyy$42){return {startPos:4519,endPos:4535,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Number,$makeK(function(mm$43){return {startPos:4544,endPos:4554,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW252){var ifK$399=$makeK(function(){return {startPos:4607,endPos:4615,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW254){var ifK$400=$makeK(function(){var dd$44=28;return {startPos:4696,endPos:4717,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(testDate$45){var break$401=$makeK(function(){return {startPos:4808,endPos:4822,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(dd$44-1);}};},$e);var continue$402=$makeK(function(){return {startPos:4727,endPos:4744,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW256){if(!(JW256==mm$43))return {replaceHandlers:break$401.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$401();}};dd$44++;return {startPos:4778,endPos:4799,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(JW257){testDate$45=JW257;return {replaceHandlers:continue$402.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$402();}};},$e),yyyy$42,mm$43,dd$44);}};},$e),testDate$45);}};},$e);return {replaceHandlers:continue$402.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$402();}};},$e),yyyy$42,mm$43,dd$44);}};},$e);if(JW254||mm$43<1||mm$43>12)return {startPos:4646,endPos:4658,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW255){mm$43=JW255;return {replaceHandlers:ifK$400.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$400();}};},$e),now$41);}};else return {replaceHandlers:ifK$400.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$400();}};},$e),null,mm$43);}};},$e);if(JW252||yyyy$42<1901)return {startPos:4581,endPos:4596,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW253){yyyy$42=JW253;return {replaceHandlers:ifK$399.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$399();}};},$e),now$41);}};else return {replaceHandlers:ifK$399.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$399();}};},$e),null,yyyy$42);}};},$e),month$40);}};},$e),year$39);}};},$e));}};}lastDay.$jw=true;function rowsRequired($k,year$46,month$47){if(!$k||!$k.$isK)return $callFromDirect(rowsRequired,this,arguments);var JW262;return {startPos:4920,endPos:4943,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(first$48){return {startPos:4966,endPos:4980,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW258){if(JW258==1)return {startPos:4994,endPos:5003,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(5);}};return {startPos:5030,endPos:5043,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getTime",$makeK(function(JW259){return {startPos:5021,endPos:5043,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(last$49){return {startPos:5049,endPos:5064,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setDate",$makeK(function(){return {startPos:5091,endPos:5103,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW260){if(JW260==31)return {startPos:5121,endPos:5133,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDay",$makeK(function(JW261){var JW263=JW261==5;var ifK$403=$makeK(function(){if(JW263||JW262==6)return {startPos:5168,endPos:5177,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(6);}};else return {startPos:5188,endPos:5197,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(5);}};},$e);if(!JW263)return {startPos:5144,endPos:5156,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDay",$makeK(function(JW404){JW262=JW404;return {replaceHandlers:ifK$403.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$403();}};},$e),first$48);}};else return {replaceHandlers:ifK$403.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$403();}};},$e),first$48);}};else return {startPos:5215,endPos:5227,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDay",$makeK(function(JW264){if(JW264==6)return {startPos:5239,endPos:5248,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(6);}};else return {startPos:5259,endPos:5268,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(5);}};},$e),first$48);}};},$e),last$49);}};},$e),last$49,31);}};},$e),JW259);}};},$e),first$48);}};},$e),first$48);}};},$e),year$46,month$47,1);}};}rowsRequired.$jw=true;function calcMonthNavigationCell($k,date$50,isRight$51){if(!$k||!$k.$isK)return $callFromDirect(calcMonthNavigationCell,this,arguments);return {startPos:5440,endPos:5467,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(cell$52){var ifK$405=$makeK(function(){return {startPos:5523,endPos:5549,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(link$53){return {startPos:5554,endPos:5575,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){link$53.className="navLink";return {startPos:5633,endPos:5649,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW265){return {startPos:5667,endPos:5680,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW266){link$53.href="#year="+JW265+"&month="+(JW266+1);link$53.onclick=$lambda(function JW55($k,evt$56){if(!$k||!$k.$isK)return $callFromDirect(JW55,this,arguments);var ifK$406=$makeK(function(){return {startPos:5767,endPos:5781,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stop",$makeK(function(){return {startPos:5793,endPos:5809,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW267){return {startPos:5813,endPos:5826,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW268){return {startPos:5788,endPos:5826,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return jump($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),JW267,JW268);}};},$e),date$50);}};},$e),date$50);}};},$e),Event,evt$56);}};},$k.$exHandlers);if(window.event){evt$56=window.event;return {replaceHandlers:ifK$406.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$406();}};}else return {replaceHandlers:ifK$406.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$406();}};});return {startPos:5861,endPos:5874,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW269){return {startPos:5886,endPos:5902,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW270){var text$54=monthNames[JW269]+" "+JW270;var ifK$407=$makeK(function(){link$53.innerHTML=text$54;return {startPos:6010,endPos:6022,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(cell$52);}};},$e);if(isRight$51){text$54+="---&gt;";return {replaceHandlers:ifK$407.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$407();}};}else{text$54="&lt;--- "+text$54;return {replaceHandlers:ifK$407.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$407();}};}},$e),date$50);}};},$e),date$50);}};},$e),date$50);}};},$e),date$50);}};},$e),cell$52,link$53);}};},$e),document,"A");}};},$e);if(isRight$51){cell$52.align="right";return {replaceHandlers:ifK$405.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$405();}};}else return {replaceHandlers:ifK$405.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$405();}};},$e),document,"TD");}};}calcMonthNavigationCell.$jw=true;function calcNavigationLinksElement($k,year$57,month$58){if(!$k||!$k.$isK)return $callFromDirect(calcNavigationLinksElement,this,arguments);return {startPos:6091,endPos:6121,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(table$59){table$59.width="90%";table$59.align="center";table$59.border="0px";return {startPos:6265,endPos:6295,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(tbody$60){return {startPos:6300,endPos:6323,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:6338,endPos:6365,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(row$61){return {startPos:6370,endPos:6391,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:6437,endPos:6464,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(JW271){return {startPos:6413,endPos:6464,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcMonthNavigationCell($makeK(function(JW272){return {startPos:6397,endPos:6464,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:6511,endPos:6538,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(JW273){return {startPos:6487,endPos:6545,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcMonthNavigationCell($makeK(function(JW274){return {startPos:6471,endPos:6545,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:6552,endPos:6565,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(table$59);}};},$e),row$61,JW274);}};},$e),JW273,true);}};},$e),year$57,month$58+1,1);}};},$e),row$61,JW272);}};},$e),JW271);}};},$e),year$57,month$58-1,1);}};},$e),tbody$60,row$61);}};},$e),document,"TR");}};},$e),table$59,tbody$60);}};},$e),document,"TBODY");}};},$e),document,"TABLE");}};}calcNavigationLinksElement.$jw=true;function calcBottomControlsElement($k,year$62,month$63){if(!$k||!$k.$isK)return $callFromDirect(calcBottomControlsElement,this,arguments);return {startPos:6633,endPos:6663,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(table$64){table$64.width="90%";table$64.align="center";table$64.border="0px";return {startPos:6754,endPos:6784,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(tbody$65){return {startPos:6789,endPos:6812,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:6827,endPos:6854,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(row$66){return {startPos:6859,endPos:6880,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:6903,endPos:6930,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(leftCell$67){return {startPos:6935,endPos:6959,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:6975,endPos:7001,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(link$68){return {startPos:7006,endPos:7031,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){link$68.className="navLink";link$68.onclick=$lambda(function JW75($k,evt$76){if(!$k||!$k.$isK)return $callFromDirect(JW75,this,arguments);var this$364=this;var ifK$408=$makeK(function(){return {startPos:7142,endPos:7156,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stop",$makeK(function(){return {startPos:7163,endPos:7177,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return eventEdit($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),this$364);}};},$e),Event,evt$76);}};},$k.$exHandlers);if(window.event){evt$76=window.event;return {replaceHandlers:ifK$408.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$408();}};}else return {replaceHandlers:ifK$408.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$408();}};});link$68.href="#op=addNewEvent&year="+year$62+"&month="+(month$63+1)+"&day=1";link$68.innerHTML="Add new event";return {startPos:7323,endPos:7350,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(rightCell$69){return {startPos:7355,endPos:7380,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){rightCell$69.align="right";return {startPos:7425,endPos:7454,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(form$70){return {startPos:7459,endPos:7485,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){form$70.id="jumpForm";form$70.onsubmit=jumpFormSubmitted;return {startPos:7573,endPos:7604,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(select$71){return {startPos:7609,endPos:7632,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){select$71.id="jumpMonth";select$71.onchange=jumpFormSubmitted;var option$73;var m$72=0;var break$409=$makeK(function(){return {startPos:7946,endPos:7976,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(input$74){return {startPos:7981,endPos:8003,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){input$74.id="jumpYear";input$74.size=4;input$74.value=year$62;return {startPos:8074,endPos:8087,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(table$64);}};},$e),form$70,input$74);}};},$e),document,"INPUT");}};},$e);var continue$410=$makeK(function(){if(!(m$72<12))return {replaceHandlers:break$409.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$409();}};return {startPos:7752,endPos:7783,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(JW275){option$73=JW275;return {startPos:7790,endPos:7815,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){option$73.value=m$72;var ifK$411=$makeK(function(){option$73.innerHTML=monthNames[m$72];m$72++;return {replaceHandlers:continue$410.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$410();}};},$e);if(m$72==month$63){option$73.selected=true;return {replaceHandlers:ifK$411.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$411();}};}else return {replaceHandlers:ifK$411.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$411();}};},$e),select$71,option$73);}};},$e),document,"OPTION");}};},$e);return {replaceHandlers:continue$410.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$410();}};},$e),form$70,select$71);}};},$e),document,"SELECT");}};},$e),rightCell$69,form$70);}};},$e),document,"FORM");}};},$e),row$66,rightCell$69);}};},$e),document,"TD");}};},$e),leftCell$67,link$68);}};},$e),document,"A");}};},$e),row$66,leftCell$67);}};},$e),document,"TD");}};},$e),tbody$65,row$66);}};},$e),document,"TR");}};},$e),table$64,tbody$65);}};},$e),document,"TBODY");}};},$e),document,"TABLE");}};}calcBottomControlsElement.$jw=true;function calcMonthElement($k,year$77,month$78){if(!$k||!$k.$isK)return $callFromDirect(calcMonthElement,this,arguments);return {startPos:8146,endPos:8176,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(table$79){table$79.align="center";table$79.id="monthTable";return {startPos:8247,endPos:8277,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(tbody$80){return {startPos:8282,endPos:8305,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){var row$81=0;var col$82=0;return {startPos:8375,endPos:8402,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(headerRow$83){return {startPos:8407,endPos:8434,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){var dayCell$84;col$82=0;var break$412=$makeK(function(){return {startPos:8680,endPos:8703,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(d$85){var break$414=$makeK(function(){return {startPos:8820,endPos:8844,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return rowsRequired($makeK(function(rowCount$86){var rowElm$87;row$81=0;var break$416=$makeK(function(){return {startPos:9134,endPos:9147,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(table$79);}};},$e);var continue$417=$makeK(function(){if(!(row$81<rowCount$86))return {replaceHandlers:break$416.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$416();}};return {startPos:8903,endPos:8930,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(JW279){rowElm$87=JW279;rowElm$87.className="dataRow";return {startPos:8971,endPos:8995,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){col$82=0;var break$418=$makeK(function(){row$81++;return {replaceHandlers:continue$417.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$417();}};},$e);var continue$419=$makeK(function(){if(!(col$82<7))return {replaceHandlers:break$418.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$418();}};return {startPos:9060,endPos:9083,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcDayElement($makeK(function(JW280){return {startPos:9041,endPos:9083,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:9103,endPos:9112,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW281){return {startPos:9093,endPos:9118,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setDate",$makeK(function(){col$82++;return {replaceHandlers:continue$419.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$419();}};},$e),d$85,JW281+1);}};},$e),d$85);}};},$e),rowElm$87,JW280);}};},$e),d$85,month$78);}};},$e);return {replaceHandlers:continue$419.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$419();}};},$e),tbody$80,rowElm$87);}};},$e),document,"TR");}};},$e);return {replaceHandlers:continue$417.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$417();}};},$e),year$77,month$78);}};},$e);var continue$415=$makeK(function(){return {startPos:8714,endPos:8722,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDay",$makeK(function(JW277){if(!(JW277!=0))return {replaceHandlers:break$414.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$414();}};return {startPos:8749,endPos:8758,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW278){return {startPos:8739,endPos:8764,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("setDate",$makeK(function(){return {replaceHandlers:continue$415.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$415();}};},$e),d$85,JW278-1);}};},$e),d$85);}};},$e),d$85);}};},$e);return {replaceHandlers:continue$415.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$415();}};},$e),year$77,month$78,1);}};},$e);var continue$413=$makeK(function(){if(!(col$82<7))return {replaceHandlers:break$412.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$412();}};return {startPos:8490,endPos:8517,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(JW276){dayCell$84=JW276;dayCell$84.innerHTML=dayNames[col$82];return {startPos:8563,endPos:8592,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){col$82++;return {replaceHandlers:continue$413.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$413();}};},$e),headerRow$83,dayCell$84);}};},$e),document,"TH");}};},$e);return {replaceHandlers:continue$413.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$413();}};},$e),tbody$80,headerRow$83);}};},$e),document,"TR");}};},$e),table$79,tbody$80);}};},$e),document,"TBODY");}};},$e),document,"TABLE");}};}calcMonthElement.$jw=true;function isMonthDay($k,elm$88){if(!$k||!$k.$isK)return $callFromDirect(isMonthDay,this,arguments);return {startPos:9182,endPos:9311,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(elm$88.className=="sameMonthDay"||elm$88.className=="otherMonthDay"||elm$88.className=="dayHeader");}};}isMonthDay.$jw=true;function dayCellDoubleClicked($k,evt$89){if(!$k||!$k.$isK)return $callFromDirect(dayCellDoubleClicked,this,arguments);var this$365=this;var ifK$420=$makeK(function(){return {startPos:9551,endPos:9568,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("element",$makeK(function(JW282){return {startPos:9540,endPos:9568,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return isMonthDay($makeK(function(JW283){var ifK$421=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);if(JW283)return {startPos:9576,endPos:9596,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return inPlaceAddEvent($makeK(function(){return {replaceHandlers:ifK$421.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$421();}};},$e),this$365);}};else return {replaceHandlers:ifK$421.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$421();}};},$e),JW282);}};},$e),Event,evt$89);}};},$k.$exHandlers);if(window.event){evt$89=window.event;return {replaceHandlers:ifK$420.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$420();}};}else return {replaceHandlers:ifK$420.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$420();}};}dayCellDoubleClicked.$jw=true;function calcDayElement($k,date$90,currentMonth$91){if(!$k||!$k.$isK)return $callFromDirect(calcDayElement,this,arguments);return {startPos:9733,endPos:9760,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(cell$92){return {startPos:9775,endPos:9789,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return dateToStr($makeK(function(JW284){cell$92.id=JW284;return {startPos:9813,endPos:9826,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW285){var ifK$422=$makeK(function(){cell$92.ondblclick=dayCellDoubleClicked;return {startPos:9974,endPos:10002,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(dayHeader$93){return {startPos:10007,endPos:10033,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){dayHeader$93.className="dayHeader";return {startPos:10095,endPos:10103,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(JW286){return {startPos:10078,endPos:10103,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return equalDates($makeK(function(JW287){var ifK$423=$makeK(function(){return {startPos:10312,endPos:10324,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(cell$92);}};},$e);if(JW287)return {startPos:10124,endPos:10153,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(box$94){return {startPos:10160,endPos:10185,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){box$94.className="todayDay";return {startPos:10240,endPos:10252,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW288){box$94.innerHTML=JW288;return {replaceHandlers:ifK$423.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$423();}};},$e),date$90);}};},$e),dayHeader$93,box$94);}};},$e),document,"SPAN");}};else return {startPos:10293,endPos:10305,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW289){dayHeader$93.innerHTML=JW289;return {replaceHandlers:ifK$423.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$423();}};},$e),date$90);}};},$e),date$90,JW286);}};},$e));}};},$e),cell$92,dayHeader$93);}};},$e),document,"DIV");}};},$e);if(currentMonth$91==JW285){cell$92.className="sameMonthDay";return {replaceHandlers:ifK$422.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$422();}};}else{cell$92.className="otherMonthDay";return {replaceHandlers:ifK$422.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$422();}};}},$e),date$90);}};},$e),date$90);}};},$e),document,"TD");}};}calcDayElement.$jw=true;function isDisplaced($k,element$95){if(!$k||!$k.$isK)return $callFromDirect(isDisplaced,this,arguments);var left$96=0;var top$97=0;var ifK$424=$makeK(function(){var ifK$425=$makeK(function(){return {startPos:10717,endPos:10748,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(left$96!=0||top$97!=0);}};},$k.$exHandlers);if(element$95.style.left)return {startPos:10633,endPos:10668,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(aMatch$99){var ifK$426=$makeK(function(){return {replaceHandlers:ifK$425.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$425();}};},$e);if(aMatch$99){left$96=aMatch$99[1];return {replaceHandlers:ifK$426.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$426();}};}else return {replaceHandlers:ifK$426.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$426();}};},$e),element$95.style.left,/^-?(\d*)/);}};else return {replaceHandlers:ifK$425.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$425();}};},$k.$exHandlers);if(element$95.style.top)return {startPos:10507,endPos:10541,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(aMatch$99){var ifK$427=$makeK(function(){return {replaceHandlers:ifK$424.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$424();}};},$e);if(aMatch$99){top$97=aMatch$99[1];return {replaceHandlers:ifK$427.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$427();}};}else return {replaceHandlers:ifK$427.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$427();}};},$e),element$95.style.top,/^-?(\d*)/);}};else return {replaceHandlers:ifK$424.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$424();}};}isDisplaced.$jw=true;function showEvent($k,event$100,quiet$101){if(!$k||!$k.$isK)return $callFromDirect(showEvent,this,arguments);var JW293;var eventID$102="event"+event$100.id;var cellID$103=event$100.date;return {startPos:10868,endPos:10877,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(existing$104){return {startPos:10895,endPos:10903,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(target$105){if(existing$104&&!target$105)return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Fade,$makeK(function(){return {startPos:11084,endPos:11102,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return waitForEffectQueue($makeK(function(){return {startPos:11110,endPos:11119,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(JW291){return {startPos:11144,endPos:11153,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(JW290){return {startPos:11110,endPos:11153,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {startPos:11161,endPos:11168,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),JW291.parentNode,JW290);}};},$e),null,eventID$102);}};},$e),null,eventID$102);}};},$e));}};},$e),existing$104);}};if(!target$105)return {startPos:11263,endPos:11270,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};return {startPos:11419,endPos:11447,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(eventBox$106){eventBox$106.className="eventBox";eventBox$106.id=eventID$102;var ifK$428=$makeK(function(){var JW294=event$100.notes;var ifK$429=$makeK(function(){var ifK$430=$makeK(function(){eventBox$106.ondblclick=$lambda(function JW109($k,evt$110){if(!$k||!$k.$isK)return $callFromDirect(JW109,this,arguments);var this$366=this;var ifK$431=$makeK(function(){return {startPos:11773,endPos:11787,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stop",$makeK(function(){this$366._doubleClicked=true;return {startPos:11826,endPos:11840,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return eventEdit($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),this$366);}};},$e),Event,evt$110);}};},$k.$exHandlers);if(window.event){evt$110=window.event;return {replaceHandlers:ifK$431.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$431();}};}else return {replaceHandlers:ifK$431.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$431();}};});eventBox$106.onclick=$lambda(function JW111($k,evt$112){if(!$k||!$k.$isK)return $callFromDirect(JW111,this,arguments);var this$367=this;return {startPos:11946,endPos:11962,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return isDisplaced($makeK(function(JW295){if(JW295)return {startPos:11971,endPos:11978,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};this$367._doubleClicked=false;return {startPos:12193,endPos:12211,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("sleep",$makeK(function(){var ifK$432=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);if(!this$367._doubleClicked)return {startPos:12249,endPos:12270,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return inPlaceEditEvent($makeK(function(){return {replaceHandlers:ifK$432.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$432();}};},$e),this$367);}};else return {replaceHandlers:ifK$432.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$432();}};},$e),JwacsLib,250);}};},$e),this$367);}};});var ifK$433=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Draggable,$makeK(function(){return {startPos:13637,endPos:13653,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(eventBox$106);}};},$e),eventID$102,{scroll:window,revert:revertPredicate,reverteffect:eventRevertEffect,starteffect:eventStartEffect,endeffect:eventEndEffect});}};},$e);if(existing$104){var ifK$434=$makeK(function(){return {replaceHandlers:ifK$433.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$433();}};},$e);if(existing$104.parentNode.id==cellID$103)return {startPos:12407,endPos:12458,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("replaceChild",$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Highlight,$makeK(function(){return {replaceHandlers:ifK$434.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$434();}};},$e),eventBox$106);}};},$e),existing$104.parentNode,eventBox$106,existing$104);}};else return {startPos:12575,endPos:12609,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("cumulativeOffset",$makeK(function(existingOffset$107){return {startPos:12637,endPos:12669,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("cumulativeOffset",$makeK(function(targetOffset$108){return {startPos:12685,endPos:12725,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {startPos:12734,endPos:12761,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:12771,endPos:12800,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("get",$makeK(function(){var ifK$435=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Highlight,$makeK(function(){return {replaceHandlers:ifK$434.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$434();}};},$e),eventBox$106,{queue:{scope:eventBox$106.id,position:"end"}});}};},$e);if(!quiet$101){eventBox$106.style.left=existingOffset$107[0]-targetOffset$108[0]+"px";eventBox$106.style.top=existingOffset$107[1]-targetOffset$108[1]+"px";return {startPos:13039,endPos:13078,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return eventRevertEffect($makeK(function(){return {replaceHandlers:ifK$435.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$435();}};},$e),eventBox$106,eventBox$106.id);}};}else return {replaceHandlers:ifK$435.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$435();}};},$e),Effect.Queues,eventBox$106.id);}};},$e),target$105,eventBox$106);}};},$e),existing$104.parentNode,existing$104);}};},$e),Position,target$105);}};},$e),Position,existing$104);}};}else return {startPos:13242,endPos:13263,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("hide",$makeK(function(){return {startPos:13270,endPos:13297,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){var ifK$436=$makeK(function(){return {replaceHandlers:ifK$433.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$433();}};},$e);if(quiet$101)return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Appear,$makeK(function(){return {replaceHandlers:ifK$436.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$436();}};},$e),eventBox$106);}};else return {startPos:13370,endPos:13391,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("show",$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Highlight,$makeK(function(){return {replaceHandlers:ifK$436.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$436();}};},$e),eventBox$106);}};},$e),Element,eventBox$106);}};},$e),target$105,eventBox$106);}};},$e),Element,eventBox$106);}};},$e);if(JW294&&JW293){eventBox$106.title=event$100.notes;return {replaceHandlers:ifK$430.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$430();}};}else return {replaceHandlers:ifK$430.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$430();}};},$e);if(JW294)return {startPos:11597,endPos:11619,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW437){JW293=JW437;return {replaceHandlers:ifK$429.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$429();}};},$e),event$100.notes,/\S/);}};else return {replaceHandlers:ifK$429.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$429();}};},$e);if(event$100.desc)return {startPos:11552,endPos:11573,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("escapeHTML",$makeK(function(JW292){eventBox$106.innerHTML=JW292;return {replaceHandlers:ifK$428.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$428();}};},$e),event$100.desc);}};else return {replaceHandlers:ifK$428.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$428();}};},$e),document,"DIV");}};},$e),null,cellID$103);}};},$e),null,eventID$102);}};}showEvent.$jw=true;function addStatus($k,str$113){if(!$k||!$k.$isK)return $callFromDirect(addStatus,this,arguments);return {startPos:13701,endPos:13718,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(statusDiv$114){if(!statusDiv$114)return {startPos:13742,endPos:13749,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};return {startPos:13777,endPos:13791,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("escapeHTML",$makeK(function(JW296){statusDiv$114.innerHTML=JW296;statusDiv$114.style.display="";return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),str$113);}};},$e),null,"StatusDisplay");}};}addStatus.$jw=true;function removeStatus($k,str$115){if(!$k||!$k.$isK)return $callFromDirect(removeStatus,this,arguments);return {startPos:13877,endPos:13894,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(statusDiv$116){if(!statusDiv$116)return {startPos:13918,endPos:13925,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};statusDiv$116.style.display="none";return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),null,"StatusDisplay");}};}removeStatus.$jw=true;function calcEventEditHtml($k,event$117){if(!$k||!$k.$isK)return $callFromDirect(calcEventEditHtml,this,arguments);return {startPos:14006,endPos:14071,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("fetchData",$k,JwacsLib,"GET","CalendarMark2-EventEdit.html");}};}calcEventEditHtml.$jw=true;function serverCall($k,method$118,url$119,params$120,status$121){if(!$k||!$k.$isK)return $callFromDirect(serverCall,this,arguments);var currentStatus$122=status$121;var q$123=url$119;var connector$124="?";var JW212=[];var JW213=0;var JW215=0;for(var JW214 in params$120)JW212[JW213++]=JW214;var field$125;var break$438=$makeK(function(){var catchK$440=$makeK(function(e){var ifK$441=$makeK(function(){return {startPos:14771,endPos:14825,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(alert,$makeK(function(){return {startPos:14832,endPos:14840,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw e;}};},$e),null,"Sorry, an error occurred while "+status$121+".");}};},$k.$exHandlers);if(currentStatus$122)return {startPos:14738,endPos:14764,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return removeStatus($makeK(function(){return {replaceHandlers:ifK$441.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$441();}};},$e),currentStatus$122);}};else return {replaceHandlers:ifK$441.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$441();}};},$k.$exHandlers);return {addHandler:catchK$440,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:14513,endPos:14529,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return addStatus($makeK(function(){return {startPos:14547,endPos:14575,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("fetchData",$makeK(function(text$126){currentStatus$122=null;return {startPos:14608,endPos:14627,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return removeStatus($makeK(function(){return {startPos:14634,endPos:14662,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return unpackResponse($makeK(function(JW442){return {removeHandler:catchK$440,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(JW442);}};}};},$e),text$126);}};},$e),status$121);}};},$e),JwacsLib,method$118,q$123);}};},$e),status$121);}};}};},$k.$exHandlers);var continue$439=$makeK(function(){if(!(JW215<JW212.length))return {replaceHandlers:break$438.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return break$438();}};field$125=JW212[JW215++];if(params$120[field$125]==undefined||typeof params$120[field$125]=="function")return {replaceHandlers:continue$439.$exHandlers,done:false,startPos:14405,endPos:14414,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$439();}};return {startPos:14450,endPos:14470,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(escape,$makeK(function(JW297){q$123+=connector$124+field$125+"="+JW297;connector$124="&";return {replaceHandlers:continue$439.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$439();}};},$e),null,params$120[field$125]);}};},$k.$exHandlers);return {replaceHandlers:continue$439.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return continue$439();}};}serverCall.$jw=true;function readEvents($k,s$127,e$128){if(!$k||!$k.$isK)return $callFromDirect(readEvents,this,arguments);return {startPos:14981,endPos:14992,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return dateToStr($makeK(function(JW298){return {startPos:14998,endPos:15009,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return dateToStr($makeK(function(JW299){return {startPos:14878,endPos:15052,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return serverCall($k,"GET",serviceRootPath+"/event-query",{s:JW298,e:JW299},"fetching events");}};},$e),e$128);}};},$e),s$127);}};}readEvents.$jw=true;function fetchEvent($k,eventID$129){if(!$k||!$k.$isK)return $callFromDirect(fetchEvent,this,arguments);return {startPos:15100,endPos:15267,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return serverCall($makeK(function(rows$130){return {startPos:15272,endPos:15287,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(rows$130[0]);}};},$e),"GET",serviceRootPath+"/event-query",{id:eventID$129},"fetching event #"+eventID$129);}};}fetchEvent.$jw=true;function addEvent($k,event$131){if(!$k||!$k.$isK)return $callFromDirect(addEvent,this,arguments);return {startPos:15331,endPos:15500,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return serverCall($makeK(function(rows$132){return {startPos:15505,endPos:15520,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(rows$132[0]);}};},$e),"POST",serviceRootPath+"/event-add",event$131,"saving new event '"+event$131.desc+"'");}};}addEvent.$jw=true;function updateEvent($k,event$133){if(!$k||!$k.$isK)return $callFromDirect(updateEvent,this,arguments);return {startPos:15567,endPos:15729,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return serverCall($makeK(function(rows$134){return {startPos:15734,endPos:15749,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(rows$134[0]);}};},$e),"POST",serviceRootPath+"/event-update",event$133,"updating event #"+event$133.id);}};}updateEvent.$jw=true;function deleteEvent($k,eventID$135){if(!$k||!$k.$isK)return $callFromDirect(deleteEvent,this,arguments);return {startPos:15787,endPos:15920,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return serverCall($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),"POST",serviceRootPath+"/event-del",{id:eventID$135},"deleting event #"+eventID$135);}};}deleteEvent.$jw=true;function jump($k,year$136,month$137){if(!$k||!$k.$isK)return $callFromDirect(jump,this,arguments);return {startPos:16065,endPos:16081,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Number,$makeK(function(m$138){return {startPos:16086,endPos:16157,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("newPage",$makeK(function(){return {startPos:16162,endPos:16188,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showCalendarScreen($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),year$136,m$138);}};},$e),JwacsLib,monthNames[m$138]+" "+year$136,{year:year$136,month:m$138+1});}};},$e),month$137);}};}jump.$jw=true;function jumpFormSubmitted($k,evt$139){if(!$k||!$k.$isK)return $callFromDirect(jumpFormSubmitted,this,arguments);return {startPos:16230,endPos:16274,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stop",$makeK(function(){return {startPos:16290,endPos:16303,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($F,$makeK(function(year$140){return {startPos:16320,endPos:16334,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($F,$makeK(function(month$141){var ifK$443=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);if(year$140<1901)return {startPos:16360,endPos:16425,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(alert,$makeK(function(){return {replaceHandlers:ifK$443.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$443();}};},$e),null,"Sorry, this calendar only supports years from 1901 onward");}};else return {startPos:16439,endPos:16455,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return jump($makeK(function(){return {replaceHandlers:ifK$443.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$443();}};},$e),year$140,month$141);}};},$e),null,"jumpMonth");}};},$e),null,"jumpYear");}};},$e),Event,window.event?window.event:evt$139);}};}jumpFormSubmitted.$jw=true;function eventEdit($k,elm$142){if(!$k||!$k.$isK)return $callFromDirect(eventEdit,this,arguments);return {startPos:16576,endPos:16584,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(JW300){return {startPos:16566,endPos:16584,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return dateToStr($makeK(function(JW301){var event$143={date:JW301};var ifK$444=$makeK(function(){return {startPos:17070,endPos:17159,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("open",$makeK(function(child$145){return {startPos:17173,endPos:17192,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("open",$makeK(function(doc$146){return {startPos:17208,endPos:17225,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return calcEventEditHtml($makeK(function(JW304){return {startPos:17198,endPos:17225,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("write",$makeK(function(){return {startPos:17232,endPos:17241,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("close",$makeK(function(){var ifK$445=$makeK(function(){var ifK$446=$makeK(function(){var ifK$447=$makeK(function(){var ifK$448=$makeK(function(){return {startPos:18085,endPos:18115,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW318){return {startPos:18085,endPos:18122,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("focus",$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),JW318);}};},$e),doc$146,"eventDesc");}};},$e);if(event$143.notes)return {startPos:18028,endPos:18059,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW317){JW317.value=event$143.notes;return {replaceHandlers:ifK$448.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$448();}};},$e),doc$146,"eventNotes");}};else return {replaceHandlers:ifK$448.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$448();}};},$e);if(event$143.date)return {startPos:17796,endPos:17816,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return strToDate($makeK(function(d$147){return {startPos:17823,endPos:17853,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW311){return {startPos:17863,endPos:17876,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getFullYear",$makeK(function(JW312){JW311.value=JW312;return {startPos:17884,endPos:17915,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW313){return {startPos:17926,endPos:17936,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getMonth",$makeK(function(JW314){JW313.value=JW314+1;return {startPos:17949,endPos:17978,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW315){return {startPos:17988,endPos:17997,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getDate",$makeK(function(JW316){JW315.value=JW316;return {replaceHandlers:ifK$447.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$447();}};},$e),d$147);}};},$e),doc$146,"eventDay");}};},$e),d$147);}};},$e),doc$146,"eventMonth");}};},$e),d$147);}};},$e),doc$146,"eventYear");}};},$e),event$143.date);}};else return {replaceHandlers:ifK$447.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$447();}};},$e);if(event$143.desc)return {startPos:17710,endPos:17740,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW310){JW310.value=event$143.desc;return {replaceHandlers:ifK$446.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$446();}};},$e),doc$146,"eventDesc");}};else return {replaceHandlers:ifK$446.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$446();}};},$e);if(event$143.id){doc$146.title="Edit event";return {startPos:17321,endPos:17358,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW305){JW305.innerHTML="Edit event";return {startPos:17390,endPos:17426,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW306){JW306.style.display="";return {startPos:17450,endPos:17478,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW307){JW307.value=event$143.id;return {replaceHandlers:ifK$445.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$445();}};},$e),doc$146,"eventID");}};},$e),doc$146,"eventDeleteLink");}};},$e),doc$146,"eventWindowTitle");}};}else{doc$146.title="Add new event";return {startPos:17550,endPos:17587,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW308){JW308.innerHTML="Add new event";return {startPos:17622,endPos:17658,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW309){JW309.style.display="none";return {replaceHandlers:ifK$445.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$445();}};},$e),doc$146,"eventDeleteLink");}};},$e),doc$146,"eventWindowTitle");}};}},$e),doc$146);}};},$e),doc$146,JW304);}};},$e));}};},$e),child$145.document);}};},$e),window,"about:blank","addEvent","width=400,height=500,toolbar=no,top=100,left=100");}};},$e);if(elm$142.id)return {startPos:16622,endPos:16648,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(aMatch$144){var ifK$449=$makeK(function(){return {replaceHandlers:ifK$444.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$444();}};},$e);if(aMatch$144)return {startPos:16706,endPos:16726,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return fetchEvent($makeK(function(JW302){event$143=JW302;var ifK$450=$makeK(function(){return {replaceHandlers:ifK$449.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$449();}};},$e);if(!event$143)return {startPos:16807,endPos:16833,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("unescapeHTML",$makeK(function(JW303){return {startPos:16762,endPos:16860,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(alert,$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Fade,$makeK(function(){return {startPos:16901,endPos:16919,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return waitForEffectQueue($makeK(function(){return {startPos:16931,endPos:16961,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {replaceHandlers:ifK$450.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$450();}};},$e),elm$142.parentNode,elm$142);}};},$e));}};},$e),elm$142);}};},$e),null,"Sorry, event #"+aMatch$144[1]+" ('"+JW303+"') no longer exists.");}};},$e),elm$142.innerHTML);}};else return {replaceHandlers:ifK$450.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$450();}};},$e),aMatch$144[1]);}};else{event$143={date:elm$142.id};return {replaceHandlers:ifK$449.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$449();}};}},$e),elm$142.id,/^event(\d+)/);}};else return {replaceHandlers:ifK$444.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$444();}};},$e),JW300);}};},$e));}};}eventEdit.$jw=true;function revertPredicate($k,elm$148){if(!$k||!$k.$isK)return $callFromDirect(revertPredicate,this,arguments);if(elm$148._successfulDrop){elm$148._successfulDrop=null;return {startPos:18229,endPos:18242,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(false);}};}return {startPos:18249,endPos:18261,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(true);}};}revertPredicate.$jw=true;function eventRevertEffect($k,eventElm$149,queue$150){if(!$k||!$k.$isK)return $callFromDirect(eventRevertEffect,this,arguments);var ifK$451=$makeK(function(){return {startPos:18596,endPos:18631,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(parseInt,$makeK(function(curX$151){return {startPos:18647,endPos:18681,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(parseInt,$makeK(function(curY$152){return {startPos:18706,endPos:18721,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("abs",$makeK(function(JW319){return {startPos:18723,endPos:18738,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("abs",$makeK(function(JW320){return {startPos:18696,endPos:18738,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("sqrt",$makeK(function(JW321){var dur$153=JW321*0.02;var ifK$452=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);if(queue$150)return {startPos:18784,endPos:18937,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Move,$makeK(function(JW322){eventElm$149._revert=JW322;return {replaceHandlers:ifK$452.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$452();}};},$e),eventElm$149,{x:-curX$151,y:-curY$152,duration:dur$153,queue:{scope:queue$150,position:"end"}});}};else return {startPos:18970,endPos:19032,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Move,$makeK(function(JW323){eventElm$149._revert=JW323;return {replaceHandlers:ifK$452.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$452();}};},$e),eventElm$149,{x:-curX$151,y:-curY$152,duration:dur$153});}};},$e),Math,JW319+JW320);}};},$e),Math,curX$151^2);}};},$e),Math,curY$152^2);}};},$e),null,eventElm$149.style.top||"0");}};},$e),null,eventElm$149.style.left||"0");}};},$k.$exHandlers);if(typeof queue$150!="string"){queue$150=null;return {replaceHandlers:ifK$451.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$451();}};}else return {replaceHandlers:ifK$451.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$451();}};}eventRevertEffect.$jw=true;function eventStartEffect($k,element$154){if(!$k||!$k.$isK)return $callFromDirect(eventStartEffect,this,arguments);return {startPos:19096,endPos:19122,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getOpacity",$makeK(function(JW324){element$154._opacity=JW324;return {startPos:19146,endPos:19180,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getStyle",$makeK(function(JW325){element$154._cursor=JW325;element$154.style.cursor="move";return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Opacity,$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),element$154,{duration:0.2,from:element$154._opacity,to:0.7});}};},$e),Element,element$154,"cursor");}};},$e),Element,element$154);}};}eventStartEffect.$jw=true;function eventEndEffect($k,element$155){if(!$k||!$k.$isK)return $callFromDirect(eventEndEffect,this,arguments);element$155.style.cursor=element$155._cursor;var toOpacity$156=typeof element$155._opacity=="number"?element$155._opacity:1.0;return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Opacity,$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),element$155,{duration:0.2,from:0.7,to:toOpacity$156});}};}eventEndEffect.$jw=true;function eventDropped($k,eventElm$157,dayElm$158){if(!$k||!$k.$isK)return $callFromDirect(eventDropped,this,arguments);if(eventElm$157.parentNode==dayElm$158)return {startPos:19633,endPos:19640,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};eventElm$157._successfulDrop=true;var catchK$453=$makeK(function(e){return {startPos:20384,endPos:20410,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return eventRevertEffect($makeK(function(){return {startPos:20417,endPos:20424,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),eventElm$157);}};},$k.$exHandlers);return {addHandler:catchK$453,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:20073,endPos:20104,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW326){var eventID$159=JW326[1];return {startPos:20183,endPos:20225,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return updateEvent($makeK(function(updatedEvent$160){if(!updatedEvent$160)return {startPos:20256,endPos:20311,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));throw "sorry, the attempt to update event data failed";}};return {removeHandler:catchK$453,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return {startPos:20452,endPos:20480,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showEvent($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),updatedEvent$160,true);}};}};},$e),{id:eventID$159,date:dayElm$158.id});}};},$e),eventElm$157.id,/^event(\d+)/);}};}};}eventDropped.$jw=true;function eventEditFormSubmitted($k,child$161,doc$162){if(!$k||!$k.$isK)return $callFromDirect(eventEditFormSubmitted,this,arguments);return {startPos:20548,endPos:20576,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW327){var eventID$163=JW327.value;return {startPos:20603,endPos:20633,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW328){var eventDesc$164=JW328.value;return {startPos:20665,endPos:20695,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW329){return {startPos:20715,endPos:20746,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW330){return {startPos:20766,endPos:20795,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW331){var eventDate$165=JW329.value+"-"+JW330.value+"-"+JW331.value;return {startPos:20824,endPos:20855,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW332){var eventNotes$166=JW332.value;return {startPos:20870,endPos:20895,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return validateEventEditForm($makeK(function(JW333){if(!JW333)return {startPos:20902,endPos:20909,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};var updatedEvent$167;var ifK$454=$makeK(function(){return {startPos:21575,endPos:21595,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("yieldThread",$makeK(function(){return {startPos:21601,endPos:21612,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("close",$makeK(function(){return {startPos:21621,endPos:21643,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showEvent($makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),updatedEvent$167);}};},$e),child$161);}};},$e),JwacsLib);}};},$e);if(eventID$163)return {startPos:20966,endPos:21044,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return updateEvent($makeK(function(JW334){updatedEvent$167=JW334;return {replaceHandlers:ifK$454.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$454();}};},$e),{id:eventID$163,date:eventDate$165,desc:eventDesc$164,notes:eventNotes$166});}};else return {startPos:21073,endPos:21135,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return addEvent($makeK(function(JW335){updatedEvent$167=JW335;return {replaceHandlers:ifK$454.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$454();}};},$e),{date:eventDate$165,desc:eventDesc$164,notes:eventNotes$166});}};},$e),doc$162);}};},$e),doc$162,"eventNotes");}};},$e),doc$162,"eventDay");}};},$e),doc$162,"eventMonth");}};},$e),doc$162,"eventYear");}};},$e),doc$162,"eventDesc");}};},$e),doc$162,"eventID");}};}eventEditFormSubmitted.$jw=true;function validateEventEditForm($k,doc$168){if(!$k||!$k.$isK)return $callFromDirect(validateEventEditForm,this,arguments);var JW349;var JW346;var JW345;function showError$177($k,elmName$179,errmsg$180){if(!$k||!$k.$isK)return $callFromDirect(showError$177,this,arguments);return {startPos:22077,endPos:22114,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(elm$181){elm$181.style.display="";return {startPos:22165,endPos:22182,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("escapeHTML",$makeK(function(JW336){elm$181.innerHTML=JW336;return {startPos:22190,endPos:22216,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW337){return {startPos:22190,endPos:22223,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("focus",$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),JW337);}};},$e),doc$168,elmName$179);}};},$e),errmsg$180);}};},$e),doc$168,elmName$179+"-error");}};}showError$177.$jw=true;function hideError$178($k,elmName$182){if(!$k||!$k.$isK)return $callFromDirect(hideError$178,this,arguments);return {startPos:22280,endPos:22317,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(elm$183){elm$183.style.display="none";elm$183.innerHTML="";return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),doc$168,elmName$182+"-error");}};}hideError$178.$jw=true;return {startPos:21823,endPos:21853,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW338){var year$169=JW338.value;return {startPos:21876,endPos:21907,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW339){var month$170=JW339.value;return {startPos:21928,endPos:21957,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW340){var day$171=JW340.value;return {startPos:21979,endPos:22009,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW341){var desc$172=JW341.value;var yearOK$173=false;var monthOK$174=false;var dayOK$175=false;var descOK$176=false;return {startPos:22479,endPos:22489,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW342){var ifK$455=$makeK(function(){return {startPos:22740,endPos:22751,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW343){var ifK$456=$makeK(function(){return {startPos:23004,endPos:23013,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(isNaN,$makeK(function(JW344){var ifK$457=$makeK(function(){var JW350=!desc$172;var ifK$458=$makeK(function(){var ifK$459=$makeK(function(){return {startPos:23480,endPos:23524,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k(descOK$176&&yearOK$173&&monthOK$174&&dayOK$175);}};},$e);if(JW350||JW349)return {startPos:23352,endPos:23410,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showError$177($makeK(function(){return {replaceHandlers:ifK$459.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$459();}};},$e),"eventDesc","Please enter an event description");}};else return {startPos:23428,endPos:23449,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return hideError$178($makeK(function(){descOK$176=true;return {replaceHandlers:ifK$459.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$459();}};},$e),"eventDesc");}};},$e);if(!JW350)return {startPos:23327,endPos:23345,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW460){JW349=JW460;return {replaceHandlers:ifK$458.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$458();}};},$e),desc$172,/^\s*$/);}};else return {replaceHandlers:ifK$458.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$458();}};},$e);if(JW344)return {startPos:23020,endPos:23076,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showError$177($makeK(function(){return {replaceHandlers:ifK$457.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$457();}};},$e),"eventDay","Please enter a numeric day value");}};else{var JW347=yearOK$173&&monthOK$174;var ifK$461=$makeK(function(){var ifK$462=$makeK(function(){return {replaceHandlers:ifK$457.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$457();}};},$e);if(JW347&&(JW346||day$171>JW345))return {startPos:23225,endPos:23248,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return lastDay($makeK(function(JW348){return {startPos:23159,endPos:23248,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showError$177($makeK(function(){return {replaceHandlers:ifK$462.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$462();}};},$e),"eventDay","Please enter a day value between 1 and "+JW348);}};},$e),year$169,month$170-1);}};else return {startPos:23267,endPos:23287,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return hideError$178($makeK(function(){dayOK$175=true;return {replaceHandlers:ifK$462.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$462();}};},$e),"eventDay");}};},$e);if(JW347){JW346=day$171<1;var ifK$464=$makeK(function(){return {replaceHandlers:ifK$461.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$461();}};},$e);if(!JW346)return {startPos:23128,endPos:23151,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return lastDay($makeK(function(JW465){JW345=JW465;return {replaceHandlers:ifK$464.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$464();}};},$e),year$169,month$170-1);}};else return {replaceHandlers:ifK$464.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$464();}};}else return {replaceHandlers:ifK$461.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$461();}};}},$e),null,day$171);}};},$e);if(JW343)return {startPos:22758,endPos:22818,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showError$177($makeK(function(){return {replaceHandlers:ifK$456.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$456();}};},$e),"eventMonth","Please enter a numeric month value");}};else{var ifK$466=$makeK(function(){return {replaceHandlers:ifK$456.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$456();}};},$e);if(month$170<1||month$170>12)return {startPos:22860,endPos:22929,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showError$177($makeK(function(){return {replaceHandlers:ifK$466.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$466();}};},$e),"eventMonth","Please enter a month value between 1 and 12");}};else return {startPos:22947,endPos:22969,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return hideError$178($makeK(function(){monthOK$174=true;return {replaceHandlers:ifK$466.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$466();}};},$e),"eventMonth");}};}},$e),null,month$170);}};},$e);if(JW342)return {startPos:22496,endPos:22554,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showError$177($makeK(function(){return {replaceHandlers:ifK$455.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$455();}};},$e),"eventYear","Please enter a numeric year value");}};else{var ifK$467=$makeK(function(){return {replaceHandlers:ifK$455.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$455();}};},$e);if(year$169<1901)return {startPos:22584,endPos:22667,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showError$177($makeK(function(){return {replaceHandlers:ifK$467.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$467();}};},$e),"eventYear","Sorry, this calendar only supports dates from 1901 onwards");}};else return {startPos:22685,endPos:22706,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return hideError$178($makeK(function(){yearOK$173=true;return {replaceHandlers:ifK$467.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$467();}};},$e),"eventYear");}};}},$e),null,year$169);}};},$e),doc$168,"eventDesc");}};},$e),doc$168,"eventDay");}};},$e),doc$168,"eventMonth");}};},$e),doc$168,"eventYear");}};}validateEventEditForm.$jw=true;function maybeDelete($k,child$184,doc$185){if(!$k||!$k.$isK)return $callFromDirect(maybeDelete,this,arguments);return {startPos:23576,endPos:23606,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW351){var desc$186=JW351.value;return {startPos:23631,endPos:23659,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW352){var eventID$187=JW352.value;return {startPos:23692,endPos:23731,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(confirm,$makeK(function(shouldDelete$188){var ifK$468=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e);if(shouldDelete$188)return {startPos:23757,endPos:23776,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return deleteEvent($makeK(function(){return {startPos:23784,endPos:23804,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("yieldThread",$makeK(function(){return {startPos:23812,endPos:23823,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("close",$makeK(function(){return {startPos:23847,endPos:23866,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0($,$makeK(function(eventElm$189){var ifK$469=$makeK(function(){return {replaceHandlers:ifK$468.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$468();}};},$e);if(eventElm$189)return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.Fade,$makeK(function(){return {startPos:23931,endPos:23949,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return waitForEffectQueue($makeK(function(){return {startPos:23959,endPos:23999,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {replaceHandlers:ifK$469.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$469();}};},$e),eventElm$189.parentNode,eventElm$189);}};},$e));}};},$e),eventElm$189);}};else return {replaceHandlers:ifK$469.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$469();}};},$e),null,"event"+eventID$187);}};},$e),child$184);}};},$e),JwacsLib);}};},$e),eventID$187);}};else return {startPos:24024,endPos:24035,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("focus",$makeK(function(){return {startPos:24041,endPos:24072,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getElementById",$makeK(function(JW353){return {startPos:24041,endPos:24079,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("focus",$makeK(function(){return {replaceHandlers:ifK$468.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$468();}};},$e),JW353);}};},$e),doc$185,"eventNotes");}};},$e),child$184);}};},$e),null,"Really delete '"+desc$186+"'?");}};},$e),doc$185,"eventID");}};},$e),doc$185,"eventDesc");}};}maybeDelete.$jw=true;function inPlaceEditEvent($k,eventElm$190){if(!$k||!$k.$isK)return $callFromDirect(inPlaceEditEvent,this,arguments);return {startPos:24414,endPos:24443,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(editForm$191){return {startPos:24463,endPos:24496,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(textarea$192){textarea$192.className="inplaceEditor";return {startPos:24558,endPos:24589,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("unescapeHTML",$makeK(function(JW354){textarea$192.value=JW354;return {startPos:24595,endPos:24624,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:24630,endPos:24651,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("hide",$makeK(function(){return {startPos:24656,endPos:24707,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("insertBefore",$makeK(function(){return {startPos:24712,endPos:24726,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("focus",$makeK(function(){textarea$192.onkeypress=$lambda(function JW193($k,evt$194){if(!$k||!$k.$isK)return $callFromDirect(JW193,this,arguments);var JW355;var ifK$470=$makeK(function(){var ifK$471=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$k.$exHandlers);if(evt$194.keyCode==Event.KEY_ESC)return {startPos:24906,endPos:24946,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {startPos:24955,endPos:24976,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("show",$makeK(function(){return {replaceHandlers:ifK$471.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$471();}};},$e),Element,eventElm$190);}};},$e),editForm$191.parentNode,editForm$191);}};else{var ifK$472=$makeK(function(){return {replaceHandlers:ifK$471.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$471();}};},$k.$exHandlers);if(evt$194.keyCode==Event.KEY_RETURN&&!evt$194.shiftKey)return {startPos:25130,endPos:25144,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stop",$makeK(function(){var JW356=!textarea$192.value;var ifK$473=$makeK(function(){if(JW356||JW355)return {startPos:25241,endPos:25285,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(alert,$makeK(function(){return {startPos:25296,endPos:25303,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),null,"Event descriptions must not be empty");}};return {startPos:25319,endPos:25359,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {startPos:25368,endPos:25389,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("show",$makeK(function(){return {startPos:25413,endPos:25445,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW357){var eventID$195=JW357[1];return {startPos:25476,endPos:25523,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return updateEvent($makeK(function(updatedEvent$196){var ifK$474=$makeK(function(){return {replaceHandlers:ifK$472.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$472();}};},$e);if(updatedEvent$196)return {startPos:25557,endPos:25579,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showEvent($makeK(function(){return {replaceHandlers:ifK$474.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$474();}};},$e),updatedEvent$196);}};else return {replaceHandlers:ifK$474.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$474();}};},$e),{id:eventID$195,desc:textarea$192.value});}};},$e),eventElm$190.id,/^event(\d+)$/);}};},$e),Element,eventElm$190);}};},$e),editForm$191.parentNode,editForm$191);}};},$e);if(!JW356)return {startPos:25194,endPos:25222,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW475){JW355=JW475;return {replaceHandlers:ifK$473.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$473();}};},$e),textarea$192.value,/^\s*$/);}};else return {replaceHandlers:ifK$473.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$473();}};},$e),Event,evt$194);}};else return {replaceHandlers:ifK$472.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$472();}};}},$k.$exHandlers);if(window.event){evt$194=window.event;return {replaceHandlers:ifK$470.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$470();}};}else return {replaceHandlers:ifK$470.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$470();}};});return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),textarea$192);}};},$e),eventElm$190.parentNode,editForm$191,eventElm$190);}};},$e),Element,eventElm$190);}};},$e),editForm$191,textarea$192);}};},$e),eventElm$190.innerHTML);}};},$e),document,"TEXTAREA");}};},$e),document,"FORM");}};}inPlaceEditEvent.$jw=true;function inPlaceAddEvent($k,dayElm$197){if(!$k||!$k.$isK)return $callFromDirect(inPlaceAddEvent,this,arguments);return {startPos:25648,endPos:25677,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(editForm$198){return {startPos:25697,endPos:25730,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("createElement",$makeK(function(textarea$199){textarea$199.className="inplaceEditor";return {startPos:25775,endPos:25804,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:25810,endPos:25837,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("appendChild",$makeK(function(){return {startPos:25842,endPos:25856,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("focus",$makeK(function(){textarea$199.onkeypress=$lambda(function JW200($k,evt$201){if(!$k||!$k.$isK)return $callFromDirect(JW200,this,arguments);var JW358;var ifK$476=$makeK(function(){if(evt$201.keyCode==Event.KEY_ESC)return {startPos:26036,endPos:26063,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {startPos:26072,endPos:26079,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),dayElm$197,editForm$198);}};else{var ifK$477=$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$k.$exHandlers);if(evt$201.keyCode==Event.KEY_RETURN&&!evt$201.shiftKey)return {startPos:26231,endPos:26245,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("stop",$makeK(function(){var JW359=!textarea$199.value;var ifK$478=$makeK(function(){if(JW359||JW358)return {startPos:26342,endPos:26386,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0(alert,$makeK(function(){return {startPos:26397,endPos:26404,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),null,"Event descriptions must not be empty");}};return {startPos:26420,endPos:26447,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){return {startPos:26477,endPos:26485,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Date,$makeK(function(JW360){return {startPos:26477,endPos:26494,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("getTime",$makeK(function(JW361){var eventID$202="new"+JW361;var event$203={id:eventID$202,desc:textarea$199.value,date:dayElm$197.id,notes:""};return {startPos:26602,endPos:26617,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showEvent($makeK(function(eventElm$204){return {startPos:26644,endPos:26658,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return addEvent($makeK(function(addedEvent$205){return {startPos:26667,endPos:26694,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("removeChild",$makeK(function(){var ifK$479=$makeK(function(){return {replaceHandlers:ifK$477.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$477();}};},$e);if(addedEvent$205)return {startPos:26726,endPos:26746,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return showEvent($makeK(function(){return {replaceHandlers:ifK$479.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$479();}};},$e),addedEvent$205);}};else return {replaceHandlers:ifK$479.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$479();}};},$e),dayElm$197,eventElm$204);}};},$e),event$203);}};},$e),event$203);}};},$e),JW360);}};},$e));}};},$e),dayElm$197,editForm$198);}};},$e);if(!JW359)return {startPos:26295,endPos:26323,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("match",$makeK(function(JW480){JW358=JW480;return {replaceHandlers:ifK$478.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$478();}};},$e),textarea$199.value,/^\s*$/);}};else return {replaceHandlers:ifK$478.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$478();}};},$e),Event,evt$201);}};else return {replaceHandlers:ifK$477.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$477();}};}},$k.$exHandlers);if(window.event){evt$201=window.event;return {replaceHandlers:ifK$476.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$476();}};}else return {replaceHandlers:ifK$476.$exHandlers,done:false,startPos:undefined,endPos:undefined,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return ifK$476();}};});return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),textarea$199);}};},$e),dayElm$197,editForm$198);}};},$e),editForm$198,textarea$199);}};},$e),document,"TEXTAREA");}};},$e),document,"FORM");}};}inPlaceAddEvent.$jw=true;function waitForEffectQueue($k,scopeName$206){if(!$k||!$k.$isK)return $callFromDirect(waitForEffectQueue,this,arguments);return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $new0(Effect.QueuedAction,$makeK(function(){return {done:true};},$e),$k,scopeName$206||"global");}};}waitForEffectQueue.$jw=true;$trampoline(function($e){return {startPos:364,endPos:384,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("initHistory",$makeK(function(){dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];return {startPos:26922,endPos:26934,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("create",$makeK(function(JW362){Effect.QueuedAction=JW362;return {startPos:26952,endPos:27018,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("extend",$makeK(function(JW363){return {startPos:26938,endPos:27355,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("extend",$makeK(function(){return {done:true};},$e),Object,JW363,{initialize:$lambda(function JW207($k,continuation$208,scopeName$209){if(!$k||!$k.$isK)return $callFromDirect(JW207,this,arguments);var arguments$368=$makeArguments(arguments);var this$369=this;return {startPos:27093,endPos:27195,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("extend",$makeK(function(options$210){this$369.continuation=continuation$208;return {startPos:27240,endPos:27258,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("start",$makeK(function(){return {startPos:undefined,endPos:undefined,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $k();}};},$e),this$369,options$210);}};},$e),Object,{queue:{position:"end",scope:scopeName$209||"global"}},arguments$368[2]||{});}};}),update:$lambda(function JW211($k){if(!$k||!$k.$isK)return $callFromDirect(JW211,this,arguments);var this$370=this;return {startPos:27296,endPos:27316,done:false,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return $call0("yieldThread",$makeK(function(){return {replaceHandlers:this$370.continuation.$exHandlers,done:false,startPos:27324,endPos:27349,thunk:function($e,$localEvalArg){if($localEvalArg)return $id(eval($localEvalArg));return this$370.continuation();}};},$e),JwacsLib);}};})});}};},$e),Object,Effect.QueuedAction.prototype,Effect.Base.prototype);}};},$e),Class);}};},$e),JwacsLib);}};});

