var lb=false;function qa(a){try{throw a;}catch(b){pb(b)}}function pb(a,b){var c="Javascript exception: "+(b?b:"")+" "+a;if(aa()){c+=" "+a.name+": "+a.message+" ("+a.number+")"}var e="";if(typeof a=="string"){e=a+"\n"}else{for(var d in a){try{e+=d+": "+a[d]+"\n"}catch(f){}}}e+=jb(pb.caller);Vb(c+"\n"+e,1)}var Dc=/function (\w+)/;function Tb(a){var b=Dc.exec(String(a));if(b){return b[1]}return""}function jb(a){try{if(!aa()&&!(Ca("safari")||Ca("konqueror"))&&Ca("mozilla")){return Error().stack}if(!a)return"";
var b="- "+Tb(a)+"(";for(var c=0;c<a.arguments.length;c++){if(c>0)b+=", ";var e=String(a.arguments[c]);if(e.length>40){e=e.substr(0,40)+"..."}b+=e}b+=")\n";b+=jb(a.caller);return b}catch(d){return"[Cannot get stack trace]: "+d+"\n"}}var Wb;var ba=null,Ra=false;function Ub(){if((ba==null||ba.closed)&&!Ra){try{Ra=true;ba=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");ba.blur();ba.document.open();Ra=false;var a="<font color=#ff0000><b>To turn off this debugging window,hit 'D' inside the main caribou window, then close this window.</b></font><br>";
kb(a)}catch(b){}}}function Vb(a,b){if(!lb){if(typeof Nb!="undefined"){Nb(tb(a))}return}try{var c=(new Date).getTime()-Wb,e="["+c+"] "+tb(a).replace(/\n/g,"<br>")+"<br>";if(b==1){e="<font color=#ff0000><b>Error: "+e+"</b></font>";ba.focus()}}catch(d){}kb(e)}function kb(a){if(!lb){return}try{Ub();ba.document.write(a);ba.scrollTo(0,1000000)}catch(b){}};function Ca(a){if(a in Pa){return Pa[a]}return Pa[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var Pa={};function aa(){return Ca("msie")&&!window.opera};function gb(a){if(typeof Error!="undefined"){throw new Error(a||"Assertion Failed");}else{throw a;}}function xa(a){if(a===undefined)a="Assertion failed";if(Bb(qa))qa(a+"\n");gb(a)}function F(a,b){if(!a){if(b===undefined)b="Assertion failed";xa(b)}}function hb(a,b,c){if(a!=b){if(c===undefined){c="AssertEquals failed: <"+a+"> != <"+b+">"}xa(c)}}
function V(a,b,c){if(typeof a==b)return;if(a||a==""){try{if(b==Rb[typeof a]||a instanceof b)return}catch(e){}}if(c===undefined){if(typeof b=="function"){var d=b.toString().match(/^\s*function\s+([^\s\{]+)/);if(d)b=d[1]}c="AssertType failed: <"+a+"> not typeof "+b}xa(c)}var Rb={string:String,number:Number,"boolean":Boolean};function jc(a,b){var c=a.document.getElementById(b);if(!c){qa("Element "+b+" not found.")}return c}function kc(a){try{return a.parentNode}catch(b){return a}}function mc(a,b){do{if(a===
b)return true;b=kc(b)}while(b&&b!==document.body);return false}function Qb(a,b,c){var e=a.document.createElement(c);b.appendChild(e);return e}function Sb(a,b,c){var e=a.document.getElementById(b);if(!e){var d=Qb(a,a.document.body,"div");d.innerHTML="<iframe id="+b+" name="+b+" src="+c+"></iframe>";e=jc(a,b)}return e}function rb(a){return sb(a,Fc)}var Fc={Va:function(a){return a.document.body.scrollTop},Wa:function(a){return a.document.documentElement.scrollTop},Na:function(a){return a.pageYOffset}};
function qb(a){return sb(a,Ec)}var Ec={Va:function(a){return a.document.body.scrollLeft},Wa:function(a){return a.document.documentElement.scrollLeft},Na:function(a){return a.pageXOffset}};function sb(a,b){try{if(!window.opera&&"compatMode"in a.document&&a.document.compatMode=="CSS1Compat"){return b.Wa(a)}else if(aa()){return b.Va(a)}}catch(c){}return b.Na(a)}var Ac=/&/g,Ic=/</g,Gc=/>/g;function tb(a){if(!a)return"";return a.replace(Ac,"&amp;").replace(Ic,"&lt;").replace(Gc,"&gt;").replace(Jc,"&quot;")}
var Jc=/\"/g;function Ia(a){return Ia.ab[a]}function Hb(a){if(!Ia.ab){var b={};b["\\"]="\\\\";b["'"]="\\047";b["\u0008"]="\\b";b['"']="\\042";b["<"]="\\074";b[">"]="\\076";b["&"]="\\046";b["\n"]="\\n";b["\r"]="\\r";b["\u0085"]="\\205";b["\u2028"]="\\u2028";b["\u2029"]="\\u2029";Ia.ab=b}return"'"+a.toString().replace(/[\'\\\r\n\b\"<>&\u0085\u2028\u2029]/g,Ia)+"'"}function ib(a){var b={};b.clientX=a.clientX;b.clientY=a.clientY;b.pageX=a.pageX;b.pageY=a.pageY;b.type=a.type;b.srcElement=a.srcElement;
b.target=a.target;b.cancelBubble=a.cancelBubble;b.explicitOriginalTarget=a.explicitOriginalTarget;b.button=a.button;b.shiftKey=a.shiftKey;b.ctrlKey=a.ctrlKey;return b}function Bb(a){return typeof a!="undefined"}function Bc(a){return document.getElementById(a)}function Cc(a){return document.all[a]}var x=document.getElementById?Bc:Cc;function Ua(a){F(a,"func passed to GetFnName() is undefined");var b;if(!("name"in a)){var c=/\W*function\s+([\w\$]+)\(/.exec(a);if(!c){throw new Error("Cannot extract name from function: "+
a);}b=c[1];a.name=b}else{b=a.name}if(!b||b=="anonymous"){throw new Error("Anonymous function has no name: "+a);}return a.name}function Nb(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=x("log");if(c){var e="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>";c.innerHTML=e+c.innerHTML}else{window.status=a}};function D(){}D.raise=function(a){if(typeof Error!="undefined"){throw new Error(a||"Assertion Failed");}else{throw a;}};D.fail=function(a){if(a===undefined)a="Assertion failed";if(!(qa===undefined))qa(a+"\n");D.raise(a)};D.isTrue=function(a,b){if(!a){if(b===undefined)b="Assertion failed";D.fail(b)}};D.equals=function(a,b,c){if(a!=b){if(c===undefined){c="AS_Assert.equals failed: <"+a+"> != <"+b+">"}D.fail(c)}};D.typeOf=function(a,b,c){if(typeof a==b)return;if(a||a==""){try{if(b==D.TYPE_MAP[typeof a]||
a instanceof b){return}}catch(e){}}if(c===undefined){if(typeof b=="function"){var d=b.toString().match(/^\s*function\s+([^\s\{]+)/);if(d)b=d[1]}c="AS_Assert.typeOf failed: <"+a+"> not typeof "+b}D.fail(c)};D.TYPE_MAP={string:String,number:Number,"boolean":Boolean};D.numArgs=function(a,b){var c=D.numArgs.caller;if(c&&c.arguments.length!=a){if(b===undefined){b=c.name+" expected "+a+" arguments  but received "+c.arguments.length}D.fail(b)}};function ra(a){return a<0?-1:1}function Ha(a){return a|0}function yb(a){qa(a);throw a;}function v(a,b){var c=a.toString();while(c.length<b){c="0"+c}return c}var Xa=[undefined,31,undefined,31,30,31,30,31,31,30,31,30,31];function X(a,b){if(2!==b){return Xa[b]}var c=a<<4,e=Xa[c];if(!e){e=Math.round((Date.UTC(a,2,1)-Date.UTC(a,1,1))/86400000);Xa[c]=e}return e}var zb={};function lc(a,b){var c=a<<4|b,e=zb[c];if(!e){e=(new Date(a,b-1,1,0,0,0,0)).getDay();zb[c]=e}return e}function Ya(a){return(a.date-1+lc(a.year,
a.month))%7}function wb(a,b,c,e,d,f){var g;if(a===e){if((g=b-d)===0){return c-f}else if(g<0){g=c-f;do{g-=X(a,b++)}while(b<d);return g}else{g=c-f;do{g+=X(e,d++)}while(d<b);return g}}else{return Math.round((Date.UTC(a,b-1,c)-Date.UTC(e,d-1,f))/86400000)}}function xb(a,b){return wb(a.year,a.month,a.date,b.year,b.month,b.date)}function G(a,b,c,e,d,f){if(!isNaN(a)){this.year=a}if(!isNaN(b)){this.month=b}if(!isNaN(c)){this.date=c}if(!isNaN(e)){this.hour=e}if(!isNaN(d)){this.minute=d}if(!isNaN(f)){this.second=
f}}G.prototype.year=NaN;G.prototype.month=NaN;G.prototype.date=NaN;G.prototype.hour=NaN;G.prototype.minute=NaN;G.prototype.second=NaN;G.prototype.Sa=function(){return Ya(this)};G.prototype.toString=function(){if(this.m!==undefined)return this.m;this.m=this.i();return this.m};function ha(){}ha.prototype=new G;ha.prototype.constructor=ha;function o(a,b,c){F(b&&c,"invalid date params: "+b+" "+c);G.call(this,a,b,c,NaN,NaN,NaN)}o.prototype=new ha;o.prototype.constructor=o;o.now=function(){var a=new Date;
return o.create(a.getFullYear(),a.getMonth()+1,a.getDate())};o.prototype.type="Date";o.prototype.e=function(){return this};o.prototype.n=function(){return new A(this.year,this.month,this.date,0,0,0)};o.prototype.a=function(){if(undefined===this.f){this.f=Va(this.year,this.month,this.date)}return this.f};function Va(a,b,c){return(((a-1970)*12+b<<5)+c)*86400};o.prototype.i=function(){return v(this.year,4)+v(this.month,2)+v(this.date,2)};o.prototype.equals=function(a){return this.constructor===a.constructor&&
this.date===a.date&&this.month===a.month&&this.year===a.year};o.qa={};o.Fb=0;o.Db=200;o.create=function(a,b,c){var e=Va(a,b,c);if(e in o.qa){return o.qa[e]}else{var d=new o(a,b,c);d.f=e;if(o.Fb<o.Db){o.qa[e]=d}return d}};function A(a,b,c,e,d,f){G.call(this,a,b,c,e,d,f)}A.prototype=new ha;A.prototype.constructor=A;A.now=function(){var a=new Date;return new A(a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())};A.prototype.type="DateTime";A.prototype.e=function(){return o.create(this.year,
this.month,this.date)};A.prototype.n=function(){return this};A.prototype.a=function(){if(undefined===this.f){this.f=(((((this.year-1970)*12+this.month<<5)+this.date)*24+this.hour)*60+this.minute)*60+this.second}return this.f};A.prototype.i=function(){return v(this.year,4)+v(this.month,2)+v(this.date,2)+"T"+v(this.hour,2)+v(this.minute,2)+v(this.second,2)};A.prototype.equals=function(a){return this.constructor===a.constructor&&this.date===a.date&&this.month===a.month&&this.year===a.year&&this.hour===
a.hour&&this.minute===a.minute&&this.second===a.second};A.prototype.clone=function(){var a=new A(this.year,this.month,this.date,this.hour,this.minute,this.second);if(this.m!==undefined)a.m=this.m;return a};function ja(a,b,c){G.call(this,NaN,NaN,NaN,a,b,c)}ja.prototype=new G;ja.prototype.constructor=ja;ja.prototype.type="Time";ja.prototype.i=function(){return"T"+v(this.hour,2)+v(this.minute,2)+v(this.second,2)};ja.prototype.equals=function(a){return this.constructor===a.constructor&&this.hour===a.hour&&
this.minute===a.minute&&this.second===a.second};ja.prototype.a=function(){return(this.hour*60+this.minute)*60+this.second};function W(a,b,c,e){var d=e+60*(c+60*(b+24*a)),f=Ha(d/86400);d-=f*86400;var g=Ha(d/3600);d-=g*3600;var h=Ha(d/60);d-=h*60;var l=Ha(d);G.call(this,NaN,NaN,f,g,h,l)}W.prototype=new G;W.prototype.constructor=W;W.prototype.type="Duration";W.prototype.a=function(){if(undefined===this.f){this.f=((this.date*24+this.hour)*60+this.minute)*60+this.second}return this.f};W.prototype.i=function(){var a=
this.year?ra(this.year):(this.month?ra(this.month):(this.date?ra(this.date):(this.hour?ra(this.hour):(this.minute?ra(this.minute):(this.second?ra(this.second):0))))),b=a<0?"-P":"P";if(this.year){b+=a*this.year+"Y"}if(this.month){b+=a*this.month+"N"}if(this.date){b+=this.date%7?a*this.date+"D":a*this.date/7+"W"}if(this.hour||this.minute||this.second){b+="T"}if(this.hour){b+=a*this.hour+"H"}if(this.minute){b+=a*this.minute+"M"}if(this.second){b+=a*this.second+"S"}if(!a){b+="0D"}return b};W.prototype.equals=
function(a){return this.constructor===a.constructor&&this.date===a.date&&this.hour===a.hour&&this.minute===a.minute&&this.second===a.second};function Ba(a){V(a,G);var b=new y;b.year=a.year||0;b.month=a.month||0;b.date=a.date||0;b.hour=a.hour||0;b.minute=a.minute||0;b.second=a.second||0;return b}function Oa(a,b,c){F(!(isNaN(a)|isNaN(b)|isNaN(c)));var e=new y;e.year=a||0;e.month=b||0;e.date=c||0;return e}function y(){}y.prototype=new G;y.prototype.constructor=y;y.prototype.type="DTBuilder";y.prototype.year=
(y.prototype.month=(y.prototype.date=(y.prototype.hour=(y.prototype.minute=(y.prototype.second=0)))));y.prototype.a=function(){this.normalize();var a;if(isNaN(this.hour)){a=Va(this.year,this.month,this.date)}else{a=(((((this.year-1970)*12+this.month<<5)+this.date)*24+this.hour)*60+this.minute)*60+this.second}return a};y.prototype.advance=function(a){if(a.date){this.date+=a.date}if(a.hour){this.hour+=a.hour}if(a.minute){this.minute+=a.minute}if(a.second){this.second+=a.second}};y.prototype.normalize=
function(){this.fb();this.ga();var a=X(this.year,this.month);while(this.date<1){this.month-=1;this.ga();a=X(this.year,this.month);this.date+=a}while(this.date>a){this.date-=a;this.month+=1;this.ga();a=X(this.year,this.month)}};y.prototype.fb=function(){var a;if(this.second<0){a=Math.ceil(this.second/-60);this.second+=60*a;this.minute-=a}else if(this.second>=60){a=Math.floor(this.second/60);this.second-=60*a;this.minute+=a}if(this.minute<0){a=Math.ceil(this.minute/-60);this.minute+=60*a;this.hour-=
a}else if(this.minute>=60){a=Math.floor(this.minute/60);this.minute-=60*a;this.hour+=a}if(this.hour<0){a=Math.ceil(this.hour/-24);this.hour+=24*a;this.date-=a}else if(this.hour>=24){a=Math.floor(this.hour/24);this.hour-=24*a;this.date+=a}};y.prototype.ga=function(){var a;if(this.month<1){a=Math.ceil((this.month-1)/-12);this.month+=12*a;this.year-=a}else if(this.month>12){a=Math.floor((this.month-1)/12);this.month-=12*a;this.year+=a}};y.prototype.e=function(){this.normalize();return o.create(this.year,
this.month,this.date)};y.prototype.n=function(){this.normalize();return new A(this.year,this.month,this.date,this.hour,this.minute,this.second)};y.prototype.zb=function(){if(this.year||this.month){yb("Can't convert months or years to ICAL_Duration");return undefined}else{return new W(this.date,this.hour,this.minute,this.second)}};y.prototype.toString=function(){return"["+(undefined!==this.year?v(this.year,4):"????")+"/"+(undefined!==this.month?v(this.month,2):"??")+"/"+(undefined!==this.date?v(this.date,
2):"??")+" "+(undefined!==this.hour?v(this.hour,2):"??")+" "+(undefined!==this.minute?v(this.minute,2):"??")+" "+(undefined!==this.second?v(this.second,2):"??")+"]"};y.prototype.equals=function(a){return this.constructor===a.constructor&&this.date===a.date&&this.month===a.month&&this.year===a.year&&this.hour===a.hour&&this.minute===a.minute&&this.second===a.second};function ia(a,b){F(a instanceof A||a instanceof o);this.start=a;if(b.constructor==W){var c=Ba(a);c.advance(b);this.end=this.start instanceof
A?c.n():c.e()}else{hb(b.constructor,a.constructor);this.end=b}this.duration=ub(this.end,this.start)}ia.prototype.type="PeriodOfTime";ia.prototype.toString=function(){if(this.m!==undefined)return this.m;this.m=this.start+"/"+this.end;return this.m};ia.prototype.equals=function(a){return this.constructor===a.constructor&&this.start.equals(a.start)&&this.end.equals(a.end)};ia.prototype.contains=function(a){return this.start.a()<=a.start.a()&&this.end.a()>=a.end.a()};function Wa(a,b){F(a instanceof U||
a instanceof T);this.start=a;hb(b.constructor,a.constructor);this.end=b;try{this.duration=ub(this.end,this.start)}catch(c){this.duration=null}}Wa.prototype.type="PartialPeriodOfTime";Wa.prototype.i=function(){return this.start+"/"+this.end};Wa.prototype.equals=function(a){return this.constructor===a.constructor&&this.start.equals(a.start)&&this.end.equals(a.end)};function ub(a,b){if(isNaN(a.year)!=isNaN(b.year)||isNaN(a.hour)!=isNaN(b.hour)){yb("diff("+a+", "+b+")");return undefined}var c=Ba(a);if(isNaN(a.year)){c.hour-=
b.hour;c.minute-=b.minute;c.second-=b.second}else{c.year=NaN;c.month=NaN;c.date=wb(a.year,a.month,a.date,b.year,b.month,b.date);if(!isNaN(a.hour)){c.hour-=b.hour;c.minute-=b.minute;c.second-=b.second}}return c.zb()}function T(a,b,c){this.year=a;this.month=b;this.date=c}T.prototype=new ha;T.prototype.constructor=T;T.prototype.type="PartialDate";T.prototype.e=function(){return o.create(this.year||0,this.month||1,this.date||1)};T.prototype.n=function(){return new A(this.year||0,this.month||1,this.date||
1,0,0,0)};T.prototype.a=function(){if(undefined===this.f){this.f=(((this.year-1970)*12+this.month<<5)+this.date)*86400}return this.f};T.prototype.equals=function(a){return this.constructor===a.constructor&&(this.date===a.date||isNaN(this.date)&&isNaN(a.date))&&(this.month===a.month||isNaN(this.month)&&isNaN(a.month))&&(this.year===a.year||isNaN(this.year)&&isNaN(a.year))};T.prototype.i=function(){return(undefined!==this.year?v(this.year,4):"????")+(undefined!==this.month?v(this.month,2):"??")+(undefined!==
this.date?v(this.date,2):"??")};function U(a,b,c,e,d,f){this.year=a;this.month=b;this.date=c;this.hour=e;this.minute=d;this.second=f}U.prototype=new ha;U.prototype.constructor=U;U.prototype.type="PartialDateTime";U.prototype.e=function(){return o.create(this.year||0,this.month||1,this.date||1)};U.prototype.n=function(){return new A(this.year||0,this.month||1,this.date||1,this.hour||0,this.minute||0,this.second||0)};U.prototype.a=function(){if(undefined===this.f){this.f=(((((this.year-1970)*12+this.month<<
5)+this.date)*24+this.hour)*60+this.minute)*60+this.second}return this.f};U.prototype.equals=function(a){return this.constructor===a.constructor&&(this.date===a.date||isNaN(this.date)&&isNaN(a.date))&&(this.month===a.month||isNaN(this.month)&&isNaN(a.month))&&(this.year===a.year||isNaN(this.year)&&isNaN(a.year))&&(this.hour===a.hour||isNaN(this.hour)&&isNaN(a.hour))&&(this.minute===a.minute||isNaN(this.minute)&&isNaN(a.minute))&&(this.second===a.second||isNaN(this.second)&&isNaN(a.second))};U.prototype.i=
function(){return(undefined!==this.year?v(this.year,4):"????")+(undefined!==this.month?v(this.month,2):"??")+(undefined!==this.date?v(this.date,2):"??")+"T"+(undefined!==this.hour?v(this.hour,2):"??")+(undefined!==this.minute?v(this.minute,2):"??")+(undefined!==this.second?v(this.second,2):"??")};var sa=undefined,Ab=[];function vb(a,b,c){var e=b>2&&29===X(a,2);return vb.Eb[b]+e+c-1}vb.Eb=[undefined,0,31,59,90,120,151,181,212,243,273,304,334];function Pb(){var a=new Date,b=sa;sa=o.create(a.getFullYear(),
a.getMonth()+1,a.getDate());if(b&&!b.equals(sa)){for(var c=0;c<Ab.length;++c){var e=Ab[c];try{e(sa)}catch(d){}}}var f=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);f.setDate(f.getDate()+1);var g=f.getTime()-a.getTime();if(g<0||g>=1800000){g=1800000}window.setTimeout(Pb,g)}Pb();;function oc(a){a=a.replace(/^\s+/,"").replace(/\s+$/,"").replace(/([0-9]+)([a-zA-Z]+)/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2");var b=a.split(/\b|_/),c=[],e=[];for(var d=0;d<b.length;++d){b[d]=b[d].replace(/^\s+|\s+$/,"");c[d]=b[d].length;e[d]=0;if(b[d].match(/^[0-9]+/)){var f=parseInt(b[d],10);b[d]=f;if(0===f){if(c[d]==2){e[d]|=1}}else if(f>12&&f<=31){e[d]|=4}else if(f<=12){e[d]|=6}else if(f<100||f>=1900){e[d]|=1}}else{var f=pc(b[d]);if(f){b[d]=f[0];e[d]|=10}}}var g=0,h=0,l=0,j=0,k=0;for(var d=
0;d<e.length;++d){if(!e[d]&&/\w/.test(b[d])){++k}if(6===(e[d]&6)){++l}else{if(e[d]&4){++g}if(e[d]&2){++h}}if(e[d]&1){++j}}if(l){var z=false,s=false;if(!g||!h){if(g){z=true}else if(h){s=true}else if(1===l){z=true}else{for(var d=0;d<e.length;++d){var t=false;if(e[0]===1&&b[1]&&/^\s*-\s*$/.test(b[1])&&e[2]===6&&b[3]&&/^\s*-\s*$/.test(b[3])){t=true}if(6==(e[d]&6)){if(t||!Fb||Fb()){e[d]&=-5;++h;--l;s=true}else{e[d]&=-3;++g;--l;z=true}break}}}}if(z){for(var d=0;d<e.length;++d){if(6==(e[d]&6)){e[d]&=-5;
++h;--l}}}else if(s){for(var d=0;d<e.length;++d){if(6==(e[d]&6)){e[d]&=-3;++g;--l}}}}var n,q,r,p=0,P=7;if(g){for(var d=0;d<e.length;++d){if(e[d]&4){n=b[d];e[d]=0;--g;break}}F(n)}else{n=null;P&=-5}if(h){var Y=false,d;for(d=0;d<e.length;++d){if(e[d]&2){q=b[d];e[d]&=-3;--h;Y=0!==(e[d]&8);break}}if(Y){var B=c[d];for(var L=d+1;L<e.length;++L){if(e[L]&8){if(c[L]>B){e[d]|=2;e[L]&=-3;q=b[L];B=c[L];d=L}}}}}else{q=null;P&=-3}var H=!(!j);if(H){for(var d=0;d<e.length;++d){if(e[d]&1){r=b[d];e[d]=0;--j;break}}}else{r=
null;if(g|h|l){var Z=-1,Q=0;for(var d=0;d<e.length;++d){if(e[d]&&!(e[d]&8)){if(b[d]>Q){Z=d;Q=b[d]}}}if(Z>=0){r=Q;switch(e[Z]){case 4:--g;break;case 2:--h;break;case 6:--l;break}e[Z]=0}}if(null==r){p-=1;r=sa.year+(q&&q<sa.month?1:0);P&=-2}}if(null==n){n=1;p-=0.5}if(null==q){if(H){q=1}else{return null}}if(r<100){r+=r<50?2000:1900}p-=g+h+j+l+(k>>2);return new Eb(o.create(r,q,n),p,P)}function Eb(a,b,c){this.date=a;this.confidence=b;this.specified=c}Eb.prototype.toString=function(){return this.date.toString()};
function pc(a){var b=-1,c=-1;for(var e=0;e<Ga.length;++e){var d=Ga[e];if(!d){continue}var f=za[e],g=Math.max(Db(d,a),Db(f,a));if(g&&g>c){b=e;c=g}}return c>=a.length+1>>1?[b,c]:null}function Db(a,b){a=a.toLowerCase();b=b.toLowerCase();var c=Math.min(a.length,b.length),e;for(e=0;e<c;++e){if(a.charAt(e)!=b.charAt(e)){break}}return e};var Qa=["Su","M","Tu","W","Th","F","Sa"];var za=[,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ga=[,"January","February","March","April","May","June","July","August","September","October","November","December"],Kc=[,"first","second","third"];function ta(a,b,c){this.x=a;this.y=b;this.coordinateFrame=c||null}ta.prototype.toString=function(){return"[P "+this.x+","+this.y+"]"};ta.prototype.clone=function(){return new ta(this.x,this.y,this.coordinateFrame)};function pa(a,b){this.dx=a;this.dy=b}pa.prototype.toString=function(){return"[D "+this.dx+","+this.dy+"]"};function ea(a,b,c,e,d){this.x=a;this.y=b;this.w=c;this.h=e;this.coordinateFrame=d||null}ea.prototype.contains=function(a){return this.x<=a.x&&a.x<this.x+this.w&&this.y<=a.y&&a.y<this.y+
this.h};ea.prototype.toString=function(){return"[R "+this.w+"x"+this.h+"+"+this.x+"+"+this.y+"]"};ea.prototype.clone=function(){return new ea(this.x,this.y,this.w,this.h,this.coordinateFrame)};function K(a){function b(j){for(var k=a.offsetParent;k&&k.offsetParent;k=k.offsetParent){if(k.scrollLeft){j.x-=k.scrollLeft}if(k.scrollTop){j.y-=k.scrollTop}}}var c;if(a.ownerDocument&&a.ownerDocument.parentWindow){c=a.ownerDocument.parentWindow}else{c=window}if(a.ownerDocument&&a.ownerDocument.getBoxObjectFor){var e=a.ownerDocument.getBoxObjectFor(a),d=new ea(e.x,e.y,e.width,e.height,c);b(d);return d}if(a.getBoundingClientRect){var f=a.getBoundingClientRect();return new ea(f.left+qb(c),f.top+rb(c),
f.right-f.left,f.bottom-f.top,c)}var g=0,h=0;for(var l=a;l.offsetParent;l=l.offsetParent){g+=l.offsetLeft;h+=l.offsetTop}var d=new ea(g,h,a.offsetWidth,a.offsetHeight,c);b(d);return d}function fb(a){var b=K(a);return new ta(b.x,b.y,b.coordinateFrame)}function ic(a,b){F(a,"p1 passed to Distance is undefined");F(b,"p2 passed to Distance is undefined");F(a.coordinateFrame==b.coordinateFrame);var c=a.x-b.x,e=a.y-b.y;return Math.sqrt(c*c+e*e)}function da(a){var b=0,c=0;if(a.pageX||a.pageY){b=a.pageX;c=
a.pageY}else if(a.clientX||a.clientY){var e=a.target?a.target:a.srcElement,d;if(e.ownerDocument&&e.ownerDocument.parentWindow){d=e.ownerDocument.parentWindow}else{d=window}b=a.clientX+qb(d);c=a.clientY+rb(d)}return new ta(b,c,window)};Function.prototype.bind=function(a){if(typeof this!="function"){throw new Error("Bind must be called as a method of a function object.");}var b=this,c=Array.prototype.splice.call(arguments,1,arguments.length);return function(){var e=c.concat();for(var d=0;d<arguments.length;d++){e.push(arguments[d])}return b.apply(a,e)}};var O,oa,Ob;(function(){var a={},b=0;function c(f){if(f.cb==null){f.cb=++b}return f.cb}function e(f,g,h,l){var j=c(f),k=c(h);l=!(!l);var z=j+"_"+g+"_"+k+"_"+l;return z}O=function(f,g,h,l){var j=e(f,g,h,l);if(j in a){return j}var k=d.bind(null,j);a[j]={listener:h,proxy:k,event:g,node:f,useCapture:l};if(f.addEventListener){f.addEventListener(g,k,l)}else if(f.attachEvent){f.attachEvent("on"+g,k)}else{throw new Error("Node {"+f+"} does not support event listeners.");}return j};oa=function(f,g,h,l){var j=
e(f,g,h,l);return Ob(j)};Ob=function(f){if(!(f in a)){return false}var g=a[f],h=g.proxy,l=g.event,j=g.node,k=g.useCapture;if(j.removeEventListener){j.removeEventListener(l,h,k)}else if(j.detachEvent){j.detachEvent("on"+l,h)}delete a[f];return true};function d(f){var g=Array.prototype.splice.call(arguments,1,arguments.length);return a[f].listener.apply(null,g)}})();function Xb(a){return function(b,c,e,d){var f=K(c),g=fb(c.offsetParent),h;switch(e){case 1:if(undefined!==d){if(u&1){f.x+=d.dx}if(u&2){f.y+=d.dy}}h=a(f);if(!h){return false}if(u&1){if(undefined!==d){d.dx+=h.x-f.x+g.x}else{c.style.left=h.x+"px"}}if(u&2){if(undefined!==d){d.dy+=h.y-f.y+g.y}else{c.style.top=h.y+"px"}}break;case 2:if(undefined!==d){if(u&1){f.w+=d.dx}if(u&2){f.h+=d.dy}}if(undefined===d){var l=new ta(f.x+f.w,f.y+f.h,window);h=a(l);if(!h){return false}if(u&1){var j=h.x-c.offsetLeft;if(j<=
0){return false}c.style.width=j+"px"}if(u&2){var k=h.y-c.offsetTop;if(k<=0){return false}c.style.height=k+"px"}}break;case 5:if(d){var h=a(C);if(!h){return false}if(u&1){if(C.x-h.x<h.w/2){d.dx-=h.x-C.x}else{d.dx-=h.x+h.w-C.x}}if(u&2){if(C.y-h.y<h.h/2){d.dy-=h.y-C.y}else{d.dy-=h.y+h.h-C.y}}}break}return true}}var Zb=2*Math.PI/16,i=undefined,w=0,S=undefined,C=undefined,Aa=undefined,va=undefined,ga=undefined,u=undefined,N=undefined,fa=undefined,Lb=false,Na=undefined,J=undefined;function _DD_Install(a){if(!a){a=
document}J=a;O(J.body,"mousedown",$b)}var cb=[];function bc(a){cb.push(a)}function nb(a,b){for(var c=cb.length-1;c>=0;--c){var e=cb[c](a,b);if(e){return e}}return undefined}var ua;function $b(a){ua=ib(a||window.event);O(J.body,"mousemove",Sa);O(J.body,"mouseup",Ta);return false}function ac(a){var b=undefined;for(var c=a.srcElement||a.target;c;c=c.parentNode){b=nb(c,a);if(!b)continue;C=da(a);if(b.l(a,c)){if(!(i&&w>=0&&w<6&&1===1+w%1&&u&&0===(u&-4))){var e="Bogus drag: el="+i+", type="+w+", axis mask="+
u;Ea();gb(e)}a.cancelBubble=true;S=b;Aa=C;va={x:i.offsetLeft,y:i.offsetTop,w:i.offsetWidth,h:i.offsetHeight};if(w===4){ga=[C]}N=new pa(0,0);fa=new pa(0,0);if(w===1||w===2||w===5){if(w!==2&&S.useUserDefinedAlpha&&!S.useUserDefinedAlpha()){mb(i,true)}Na=i.style.zIndex;i.style.zIndex=2000}if(aa()){O(J.body,"mouseleave",Fa)}else{O(J.body,"mouseout",Fa)}}else{Ea()}return false}return true}function Ta(a){if(ua){ua=null;oa(J.body,"mousemove",Sa);oa(J.body,"mouseup",Ta);var b=undefined;for(var c=a.srcElement||
a.target;c;c=c.parentNode){b=nb(c,a);if(b&&b.handleClick){b.handleClick(c,a);return false}}return}var e=a||J.parentWindow.event;if(!S.I(e,i,w)){Da()}else{Ea()}}function Sa(a){if(ua){var b=ac(ua);ua=null;if(b){Da();return true}}if(!i){return true}if(!S){return true}var c=a||J.parentWindow.event;c.cancelBubble=true;var e=da(c),d=new pa(e.x-C.x+N.dx,e.y-C.y+N.dy);if(!(d.dx|d.dy)){return false}var f=new pa(d.dx,d.dy);C=e;Lb=true;var g=fb(i);if(u&1){fa.dx+=f.dx}if(u&2){fa.dy+=f.dy}if(S.k(c,i,w,f,fa)){var h=
fb(i);fa.dx-=h.x-g.x;fa.dy-=h.y-g.y;switch(w){case 1:case 2:case 5:N.dx=d.dx-f.dx;N.dy=d.dy-f.dy;break}switch(w){case 1:if(!(u&1)){f.dx=0}if(!(u&2)){f.dy=0}var l=i.currentStyle?i.currentStyle:i.ownerDocument.defaultView.getComputedStyle(i,"");if(l&&l.position=="relative"){i.style.left=fa.dx+"px";i.style.top=fa.dy+"px"}else{var j=i.offsetLeft+f.dx,k=i.offsetTop+f.dy;if(f.dx){i.style.left=j+"px"}if(f.dy){i.style.top=k+"px"}if(f.dx&&j!==i.offsetLeft){i.style.left=j+j-i.offsetLeft+"px"}if(f.dy&&k!==i.offsetTop){i.style.top=
k+k-i.offsetTop+"px"}}break;case 5:var z=K(i);if(u&1){var s=C.x+N.dx,t=Math.min(s,Aa.x),n=Math.abs(s-Aa.x);if(t!==z.x){var j=t;i.style.left=j+"px";if(j!==i.offsetLeft){i.style.left=j+j-i.offsetLeft+"px"}}if(n!==z.w){i.style.width=n+"px";if(n!=i.offsetWidth){n=Math.max(0,n+n-i.offsetWidth);i.style.width=n+"px"}}}if(u&2){var q=C.y+N.dy,r=Math.min(q,Aa.y),p=Math.abs(q-Aa.y);if(r!==z.y){var k=r;i.style.top=k+"px";if(k!==i.offsetTop){i.style.top=k+k-i.offsetTop+"px"}}if(p!==z.h){i.style.height=p+"px";
if(p!=i.offsetHeight){p=Math.max(0,p+p-i.offsetHeight);i.style.height=p+"px"}}}break;case 2:if(f.dx&&u&1){var P=i.offsetWidth,n=P+f.dx;if(n<0){N.dx+=n;n=0}if(n<1){N.dx+=n-1;n=1}i.style.width=n+"px";if(n!=i.offsetWidth){n+=n-i.offsetWidth;if(n<1){n=1}i.style.width=n+"px"}}if(f.dy&&u&2){var Y=i.offsetHeight,p=Y+f.dy;if(p<0){N.dy+=p;p=0}if(p<1){N.dy+=p-1;p=1}i.style.height=p+"px";if(p!=i.offsetHeight){p+=p-i.offsetHeight;if(p<1){p=1}i.style.height=p+"px"}}break;case 3:if(!(u&1)){f.dx=0}if(!(u&2)){f.dy=
0}if(i.scrollBy){i.scrollBy(f.dx,f.dy)}else{f.dx*=-1;f.dy*=-1;var B=i.scrollLeft,L=i.scrollLeft+i.scrollWidth-i.offsetWidth,H=i.scrollTop,Z=i.scrollTop+i.scrollHeight-i.offsetHeight;f.dx=Math.max(Math.min(f.dx,L),-B);f.dy=Math.max(Math.min(f.dy,Z),-H);if(f.dx){i.scrollLeft=i.scrollLeft+f.dx}if(f.dy){i.scrollTop=i.scrollTop+f.dy}}break;case 4:if(f.dx|f.dy){if(ga.length>=1){var Q=f,$=ga[ga.length-1],M=new pa(Q.dx+$.dx,Q.dy+$.dy),ka=false;if(M.dx*M.dx+M.dy*M.dy<=25){ka=true}else{var Ja=Math.atan2(Q.dx,
Q.dy),ya=Math.atan2($.dx,$.dy),Ka=Math.abs((Ja-ya+2*Math.PI)%(2*Math.PI));ka=Ka<Zb}if(ka){$.dx=M.dx;$.dy=M.dy}else{ga.push(f)}}else{ga.push(f)}ob(ga)}break}}else{Da()}return false}function Fa(a){a=a||window.event;var b=a.relatedTarget||a.toElement;if(!b){Da()}}function Ea(){if(w!==0){if(i){if(w===4){ob([])}S.Oa(i,w)}if(w===1||w===2||w===5){if(w!==2&&S.useUserDefinedAlpha&&!S.useUserDefinedAlpha()){mb(i,false)}if(undefined!==Na){i.style.zIndex=Na;Na=undefined}else{delete i.style.zIndex}}}i=undefined;
w=0;C=undefined;va=undefined;u=0;N=undefined;Lb=false;if(S){if(aa()){oa(J.body,"mouseleave",Fa)}else{oa(J.body,"mouseout",Fa)}}S=undefined;oa(J.body,"mousemove",Sa);oa(J.body,"mouseup",Ta)}function Da(){switch(w){case 1:var a=i.currentStyle?i.currentStyle:window.getComputedStyle(i,"");if(a&&a.position=="relative"){i.style.left="0px";i.style.top="0px"}else{i.style.left=va.x+"px";i.style.top=va.y+"px"}break;case 2:i.style.width=va.w+"px";i.style.height=va.h+"px";break;case 3:break;case 4:ga=[];break;
case 0:break;case 5:break;default:gb("failed to cancel drag with dd_dragType="+w)}Ea()}function mb(a,b){if(aa()){a.style.filter=b?"alpha(opacity=50)":"alpha(opacity=100)"}else{a.style.MozOpacity=b?0.5:1}}var db=false,eb=undefined;function ob(a){eb=a;if(!db){db=true;window.setTimeout(Yb,100)}}function Yb(){var a=eb;eb=undefined;db=false;if(!a){return}var b="";if(a.length){var c=a[0].x,e=a[0].y,d=0,f=0;for(var g=1;g<a.length;g++){var h=a[g];if(!(h.dx|h.dy)){continue}if(g!=0){b+="<img class=gestimg src=images/joiner.png width=5 height=5 style=left:"+
(c-2)+"px;top:"+(e-2)+"px>"}var l=Math.atan2(h.dx,h.dy),j,k=Math.floor(l/(Math.PI/6));switch(k){case 0:case 6:case -6:j="vert.png";break;case 1:case -4:j="negslope.png";break;case 2:case -2:case 3:case -3:j="horz.png";break;case 4:case -1:j="posslope.png";break;case 5:case -5:j="vert.png";break}var z=Math.max(1,Math.abs(h.dx)),s=Math.max(1,Math.abs(h.dy));b+="<img class=gestimg src=images/"+j+" width="+z+" height="+s+" style=left:"+(c+Math.min(h.dx,0))+"px;top:"+(e+Math.min(h.dy,0))+"px>";c+=h.dx;
e+=h.dy;d=Math.max(c,d);f=Math.max(e,f)}}var t=x("gesture");t.style.display="none";t.innerHTML=b;t.style.display="inline"}function uc(){}uc.prototype.k=function(a,b,c,e,d){throw new Error("Unimplemented");};function E(a){this.mb=a;this.ob=a?E.getSelection(a):undefined;this.Qa=false;this.Jb=null;this.oa=3}E.getSelection=function(a,b){b=b||[];if(a.className&&a.className.match(/\bddSelected\b/)){b.push(a)}else{for(var c=a.firstChild;c;c=c.nextSibling){E.getSelection(c,b)}}return b};E.clearSelection=function(a){var b=E.getSelection(a);for(var c=b.length;--c>=0;){var e=b[c];e.className=e.className.replace(/\s*\bddSelected\b/g,"")}return b};E.prototype.Ya=function(a,b){a.style.left=b.x+"px";a.style.top=b.y+
"px";if(this.oa&1){a.style.width="0px"}if(this.oa&2){a.style.height="0px"}};E.prototype.Za=function(a){a.style.display="block"};E.prototype.l=function(a,b){var c=x("ddLasso");if(!c){c=document.createElement("div");c.id="ddLasso";c.style.position="absolute";c.style.display="none";document.body.appendChild(c)}var e=da(a);this.Ya(c,e);this.Za(c);w=5;u=this.oa;i=c;this.Jb=c;var d=this;window.setTimeout(function(){if(!d.finished){d.$(c)}},200);return true};E.prototype.I=function(a,b,c){return true};E.prototype.$a=
function(a){return a.className&&a.className.match(/\bddSelectable\b/)};E.prototype.sa=function(a,b,c){if(this.$a(a)){var e=K(a);if(!(b.x+b.w<e.x||e.x+e.w<b.x||b.y+b.h<e.y||e.y+e.h<b.y)){c.push(a)}return}else{for(var d=a.firstChild;d;d=d.nextSibling){this.sa(d,b,c)}}};E.prototype.$=function(a){if(!this.mb)return;var b=[];this.sa(this.mb,K(a),b);this.v(b);if(!this.Qa){var c=this;window.setTimeout(function(){if(!c.finished){c.$(a)}},200)}};E.prototype.v=function(a){var b=this.ob;for(var c=a.length;--c>=
0;){a[c].dd_newSelection=true}for(var c=b.length;--c>=0;){var e=b[c];e.dd_oldSelection=true;if(!e.dd_newSelection){e.className=e.className.replace(/\s*\bddSelected\b/g,"")}}for(var c=a.length;--c>=0;){var e=a[c];if(!e.dd_oldSelection){e.className=(e.className||" ")+" ddSelected"}e.dd_newSelection=false}for(var c=b.length;--c>=0;){b[c].dd_oldSelection=false}this.ob=a};E.prototype.k=function(a,b,c,e){return true};E.prototype.Oa=function(a,b){this.Qa=true;this.$(a);a.style.display="none"};function wa(a,
b){E.call(this,a);this.Qb=Xb(b);this.gridFn=b}wa.prototype=new E(undefined);wa.prototype.constructor=wa;wa.prototype.k=function(a,b,c,e){return E.prototype.k(a,b,c,e)&&this.Qb(a,b,c,e)};wa.prototype.l=function(a,b){if(E.prototype.l.call(this,a,b)){var c=this.gridFn(C,true);if(u&1){C.x=C.x-c.x<c.w>>1?c.x:c.x+c.w}if(u&2){C.y=C.y-c.y<c.h>>1?c.y:c.y+c.h}return true}else{return false}};function tc(){this.A=[]}function _PC_Install(a){if(Mb)return false;Mb=true;var b=a?a:document;O(b.body,"mousedown",sc);return true}function sc(a){if(na.A.length==0)return false;var a=a||window.event;for(var b=na.A.length-1;b>=0;--b){var c=na.A[b];Gb(c);if(c.deactivate(a)){na.A.splice(b,1)}}return true}function rc(a){Gb(a);for(var b=0;b<na.A.length;++b){if(a===na.A[b])return false}na.A.push(a);return true}function Gb(a){V(a.deactivate,Function,"popup missing deactivate function")}var na=new tc,Mb=
false;function m(a,b,c,e,d){F(a,"element passed to DP_DatePicker constructor is null");this.ba=a;this.j=c?c:this.ba.id+"_";this.c=e?e:"DP_";m.P[this.j]=this;if(d){V(d,o,"opt_today is not an ICAL_Date");this.z=d}else{this.z=o.now()}this.D=o.create(this.z.year,this.z.month,1);this.R=0;this.Hb=!(!b);this.Ia=false;this.hb=null;this.db=null;this.O={};this.G={};this.U={};this.b={};this.F=null;this.X=null;this.nb=new la(this);this.Nb=new la(this);this.Ga=false;this.ea=false;this.g=new ca;this.H=0;this.aa=null;
this.va=null;this.Pb=true;this.Ba=null;this.ta=null;this.Aa=null;this.J();this.Rb=false;this.Ea(0);this.pb(0);this.ya=false;this.S=null;this.d=null;this.o=null;this.L=null;this.K=null;this.bb=null;this.V=false;this.Cb=null;this.Bb=null;var f=this,g=function(h){var l=h.startDate,j=h.endDate,k;if(!l){k=m.MSG_DATE_SELECTION[this.M]}else if(!j||l.equals(j)){k="Selected: "+f.ca(l,true)}else{k="Selected: "+f.ca(l)+" - "+f.ca(j)}f.jb(k)};if(this.Ga)this.ma(g);this.Mb=new la(this)};m.MSG_DATE_SELECTION={};
m.MSG_DATE_SELECTION[0]="Select a date";m.MSG_DATE_SELECTION[1]="Select a range of dates";m.MSG_DATE_SELECTION[2]="Select dates";m.MSG_DATE_SELECTION[3]="&nbsp;";m.prototype.pb=function(a,b){if(a!=0&&a!=1&&a!=7&&a!=30&&a!=-1&&!(b instanceof Function)){throw new Error("Invalid click mode: "+a);}this.Gb=a;this.Ma=b};m.prototype.xb=function(a){if(a!=this.Ia){this.Ia=a;this.J()}};m.prototype.Ra=function(){return this.Gb};m.prototype.Ea=function(a){if(!(0<=a&&a<=3)){xa("Invalid selection mode: "+a)}if(this.M==
a){return}this.M=a;this.B()};m.prototype.da=function(){return this.M};m.prototype.show=function(){this.ea=true;this.J()};m.prototype.hide=function(){this.ba.innerHTML="";this.ea=false};m.prototype.za=function(){return this.ea};m.prototype.T=function(){return x(this.j+"tbl")};m.prototype.sb=function(a){F(0<=a&&a<=6,a+" not a valid first day of week");this.R=a;this.J()};m.prototype.xa=function(){return this.R};m.prototype.rb=function(a){if(a)V(a,Function);this.va=a};m.prototype.vb=function(a){V(a,Function);
this.Ba=a};m.prototype.qb=function(a){V(a,Function);this.ta=a};m.prototype.ub=function(a){V(a,Function);this.Aa=a};m.prototype.Ta=function(){return za};m.prototype.J=function(){if(!this.ea){return}var a=this.j,b,c=this.D.month,e=this.D.year,d=[c==1?12:c-1,c,c==12?1:c+1],f=o.create(this.z.year,this.z.month,1),g=Oa(e,c-1,1).e(),h=Oa(e,c+1,1).e();if(this.Ba){d[0]=this.Ba(g)}else{var l=g.a()>=f.a()?"&laquo;":"&lsaquo;&nbsp;";d[0]=l+za[d[0]]}if(this.ta){d[1]=this.ta(this.D)}else{d[1]=Ga[d[1]]+" "+e}if(this.Aa){d[2]=
this.Aa(h)}else{var j=h.a()-f.a()<=0?"&raquo;":"&nbsp;&rsaquo;";d[2]=za[d[2]]+j}var k=X(e,c),z=X(g.year,g.month),s=new Array(49),t=this.D.Sa()-this.R;if(t<0)t+=7;if(k<30||t<5)t+=7;for(var n=0;n<t;++n){s[n]=o.create(g.year,g.month,z-t+n+1)}for(var n=t,q=0;q<k;++n){s[n]=o.create(e,c,++q)}for(var n=t+k,q=0;n<s.length;++n){s[n]=o.create(h.year,h.month,++q)}this.Cb=s[0];this.Bb=s[s.length-1];var r=[],p=this.Hb?[2,3,2]:[1,5,1];r.push('<table cols=7 cellspacing="0" cellpadding="3" id="',a,'tbl"',' class="',
this.c,'monthtable" ',' style="-moz-user-select:none; cursor:pointer;">','<tr class="',this.c,'heading" id="',a,'header">',"<td colspan=",p[0]," unselectable=on",' onmousedown="'+Ua(hc)+"(",Hb(this.j),')"',' id="',a,'mhl" class="',this.c,'prev">',d[0],"</td>","<td colspan=",p[1],' unselectable="on"',' id="',a,'mhc" class="',this.c,'cur">',d[1],"</td>","<td colspan=",p[2],' unselectable="on"',' onmousedown="'+Ua(gc)+"(",Hb(this.j),')"',' id="',a,'mhr" class="',this.c,'next">',d[2],"</td>","</tr>");
if(this.Ia){r.push('<tr class="',this.c,'days" id="',a,'dow">');for(var n=0;n<Qa.length;++n){r.push('<td unselectable="on"',' class="',this.c,'dayh" id="',a,"day_",n,'">',Qa[(n+this.R)%7],"</td>")}r.push("</tr>")}var P=(7-this.R)%7,Y=(P+6)%7;this.O={};var b=null,B=null,L=Ua(fc);for(var n=0,q=-1;n<7;++n){r.push('<tr id="',a,"week_",n,'">');for(var H=0;H<Qa.length;++H){++q;var Z=this.g.contains(s[q]);B=[];if(n==0)B.push(this.c+"day_top");if(H==0)B.push(this.c+"day_left");else if(H==6)B.push(this.c+
"day_right");B.push(this.c+"week"+(H==P||H==Y?"end":"day")+(Z?"_selected":""));if(q<t||q>=t+k){B.push(this.c+"offmonth");if(s[q].date<=7){B.push(this.c+"month_top");if(s[q].date==1&&H!=0){B.push(this.c+"month_left")}}}else{B.push(this.c+"onmonth");if(s[q].date<=7){B.push(this.c+"month_top");if(s[q].date==1&&H!=0){B.push(this.c+"month_left")}}if(s[q].date==this.z.date&&c==this.z.month&&e==this.z.year){B.push(this.c+"today"+(Z?"_selected":""))}}var Q="";if(this.va){var $=this.va(s[q]);if($){Q=' style="'+
$+'"'}}r.push('<td id="',a,"day_",n,"_",H,'"',' class="',B.join(" "),'"',Q,' onclick="',L,'(this)"',' unselectable="on">',s[q].date,"</td>")}r.push("</tr>")}if(this.Ga){r.push('<tr class="',this.c,'months">','<td colspan="7" id="',a,'sel"></td></tr>')}r.push("</table>");this.ba.innerHTML=r.join("");this.F=x(a+"day_0_0");this.X=x(a+"day_6_6");var b=this.F,M=b.parentNode,ka=null,Ja=null,q=-1,ya=-1;while(M!=null){++ya;if(ya==7)break;var Ka=-1;while(b!=null){++q;++Ka;var Za=a+"day_"+ya+"_"+Ka;this.b[Za]=
s[q];this.O[s[q].toString()]=b;this.U[Za]=ka;if(ka)this.G[Ja]=b;ka=b;Ja=Za;b=b.nextSibling}M=M.nextSibling;if(M!=null){b=M.firstChild}}this.H=7;if(!this.Pb){var nc=x(a+"week_4"),Cb=x(a+"week_5"),$a=x(a+"week_6");if(this.b[a+"day_4_0"].month!=c){nc.style.display="none";Cb.style.display="none";$a.style.display="none";this.H=4}else if(this.b[a+"day_5_0"].month!=c){Cb.style.display="none";$a.style.display="none";this.H=5}else if(this.b[a+"day_6_0"].month!=c){$a.style.display="none";this.H=6}}this.hb=
g;this.db=h;if(this.aa){this.aa.call(null,this)}this.Ja()};m.prototype.refresh=function(){if(this.aa){this.aa.call(null,this)}};m.prototype.ma=function(a){return this.nb.add(a)};m.prototype.B=function(a){a=arguments.length===0||a;var b=this.g.Z();for(var c=0;c<b.length;++c){var e=this.O[b[c].toString()];this.q(e,false)}this.g.clear();if(!this.V){this.Da(null);this.ia(null)}if(a)this.s()};m.prototype.ra=function(a){if(this.Ma){this.Ma.call(null,a);return}var b=x(a),c=this.g;switch(this.M){case 1:var e=
this.Ra();if(e==0)break;if(e!=1&&(e!=-1||!c.contains(this.b[a]))){var d=this.b[b.id],f;switch(e){case -1:if(c.t()>7&&this.W()){var g=b.id.substr(b.id.length-3,1);d=this.b[this.j+"day_"+g+"_0"]}f=c.t()-1;break;case 7:var g=b.id.substr(b.id.length-3,1);d=this.b[this.j+"day_"+g+"_0"];f=6;break;case 30:d=this.b[b.id];d=o.create(d.year,d.month,1);var h=Ba(d);f=X(d.year,d.month)-1;break;default:xa("Invalid click mode: "+e)}F(f!==undefined,"duration should have been defined");var h=Ba(d);h.date+=f;var l=
h.e();this.v(d,l);return}F(e==1||e==-1&&c.contains(this.b[a]),"not a case for single date selection");this.B(false);case 0:if(c.t()>0){var j=c.Z()[0];c.remove(j);var k=this.O[j.toString()];if(k)this.q(k,false)}c.add(this.b[b.id]);this.q(b);this.s(this.b[b.id]);break;case 2:break;case 3:default:break}};m.prototype.Da=function(a){this.d=a;this.L=a?this.b[a.id]:null};m.prototype.ia=function(a){this.o=a;this.K=a?this.b[a.id]:null};m.prototype.Xa=function(){return this.V};m.prototype.l=function(a,b){this.B(false);
this.V=true;this.Da(this.Q(a));var c=this.b[this.d.id];this.g.add(c);this.q(this.d);this.v(c);this.ia(this.d)};m.prototype.I=function(a,b,c){this.V=false;this.o=this.Q(a);if(this.W()){this.s(this.L,this.K,false);return}var e,d;if(this.b[this.o.id].a()<this.b[this.d.id].a()){e=this.b[this.o.id];d=this.b[this.d.id]}else{e=this.b[this.d.id];d=this.b[this.o.id]}this.s(e,d,false)};m.prototype.k=function(a,b,c,e){this.bb=ib(a);if(this.M!=1||this.ya)return;this.ya=true;var d=this;window.setTimeout(function(){try{if(d.V){d.Pa.call(d,
b,c,e)}}finally{d.ya=false}},50)};m.prototype.W=function(){return this.Rb};m.prototype.Pa=function(a,b,c){var e=this.bb,d=this.Q(e);if(d===this.o)return;var f=this.o;this.ia(d);F(f!=d);var g=this.b,h=g[f.id].a()<g[d.id].a(),l=g[f.id].a()<g[this.d.id].a(),j=g[d.id].a()<g[this.d.id].a(),k=g[this.d.id].a()<g[d.id].a(),z=g[this.d.id].a()<g[f.id].a(),s,t,n,q,r=j?this.o:this.d,p=j?this.d:this.o;if(this.W()){var P=xb(g[p.id],g[r.id]);if(P>=7){var Y,B;Y=parseInt(r.id.charAt(r.id.length-3),10);B=parseInt(p.id.charAt(p.id.length-
3),10);r=x(this.j+"day_"+Y+"_0");p=x(this.j+"day_"+B+"_6")}this.u(this.F,r,false);this.u(p,this.X,false);this.u(r,p,true);this.L=g[r.id];this.K=g[p.id]}else{if(h){if(l){t=j?this.U[d.id]:this.U[this.d.id];this.u(f,t,false)}if(k){s=z?this.G[f.id]:this.G[this.d.id];this.u(s,d,true)}}else{if(z){s=k?this.G[d.id]:this.G[this.d.id];this.u(s,f,false)}if(j){t=j?this.U[this.d.id]:this.U[f.id];this.u(d,t,true)}}}n=g[r.id];q=g[p.id];this.s(n,q,true)};m.prototype.u=function(a,b,c){F(a);F(b);V(c,Boolean);var e=
false;while(a){if(c){e=this.g.add(this.b[a.id])}else{e=this.g.remove(this.b[a.id])}if(e){this.q(a,c)}if(a.id===b.id)break;a=this.G[a.id];F(a,"did not find endCell: "+b.id)}};m.LAST_DAY_OF_WEEK={4:"day_3_6",5:"day_4_6",6:"day_5_6",7:"day_6_6"};m.prototype.Ka=function(a,b){if(!this.S)return;if(b){a.x-=this.S.x;a.y-=this.S.y}else{a.x+=this.S.x;a.y+=this.S.y}};m.prototype.Q=function(a){var b=K(this.F),c=this.Ua(),e=da(a);this.Ka(e);var d=7,f=this.wa(c.x,b.w,d,e.x),g=this.wa(c.y,b.h,this.H,e.y);return x(this.j+
"day_"+g+"_"+f)};m.prototype.wa=function(a,b,c,e){if(e<a)return 0;var d=Math.floor((e-a)/b);return d>=c?c-1:d};m.prototype.Ua=function(){var a=this.j,b=this.H,c=K(this.F),e=K(x(a+m.LAST_DAY_OF_WEEK[b]));return new ea(c.x,c.y,e.x+e.w-c.x,e.y+e.h-c.y,c.coordinateFrame)};m.prototype.ca=function(a,b){var c=b?Ga:za;return c[a.month]+" "+a.date};m.prototype.s=function(a,b,c){var e={};e.startDate=a;e.endDate=b||a;e.Xa=!(!c);e.mode=this.da();this.nb.fireEvent(e)};m.prototype.na=function(a){if(a instanceof
o)return a;if(a instanceof A){return o.create(a.year,a.month,a.date)}else{F(false,"Invalid arg: "+a)}};m.prototype.v=function(a,b,c){var e=this.da();c=c!==false;if(a)a=this.na(a);if(b)b=this.na(b);if(a)this.Fa(a);if(!a||e==3){this.B(c);return}if(e==0){this.B(false);var d=this.O[a.toString()];this.g.add(a);this.q(d);if(c)this.s(a)}else if(e==1){if(!b)b=a;var f=xb(b,a),g=false;if(this.W()&&f>=7){var h=Ya(a)+7,l=Ya(b)+7;h=(h-this.xa())%7;l=(l-this.xa())%7;var j;j=Oa(a.year,a.month,a.date-h);a=j.e();
j=Oa(b.year,b.month,b.date+(6-l));b=j.e();g=this.Fa(a)}if(g){this.B(false)}var d=this.F;this.L=a;this.K=b;var k=this.X,z=a.a(),s=b.a();for(;d;d=this.G[d.id]){var t=this.b[d.id],n=this.g.contains(t),q=t.a()>=z&&t.a()<=s;if(n!=q){if(q){this.g.add(t);this.q(d)}else{this.g.remove(t);this.q(d,false)}}if(d===k)break}if(!d){k=this.X;var j=Ba(this.b[this.X.id]),r=null;do{j.date+=1;r=j.e();this.g.add(r)}while(!r.equals(b))}if(c)this.s(a,b)}};m.prototype.ja=function(a,b){if(this.D.month==a.month&&this.D.year==
a.year)return false;b=arguments.length==1||b;this.D=o.create(a.year,a.month,1);this.J();if(b)this.Nb.fireEvent();return true};m.prototype.Fa=function(a,b){if(a.a()>=this.Cb.a()&&a.a()<=this.Bb.a()){return false}return this.ja(a,b)};m.prototype.getSelection=function(){switch(this.da()){case 0:if(this.g.t()){return this.g.Z()[0]}else{return null}case 1:var a=this.L?this.L:null,b=this.K?this.K:null;if(!a||!b)return null;return[a,b];case 2:return null;case 3:default:return null}};m.prototype.jb=function(a){if(this.Ga){x(this.j+
"sel").innerHTML=a}};m.prototype.q=function(a,b){if(!a)return;if(!Bb(b))b=true;var c=[],e=[],d=" "+a.className+" ",f=" "+this.c;if(b){if(-1!=d.indexOf(f+"today ")){c.push(f+"today ");e.push(f+"today_selected ")}if(-1!=d.indexOf(f+"weekday ")){c.push(f+"weekday ");e.push(f+"weekday_selected ")}else if(-1!=d.indexOf(f+"weekend ")){c.push(f+"weekend ");e.push(f+"weekend_selected ")}}else{if(-1!=d.indexOf(f+"today_selected ")){e.push(f+"today ");c.push(f+"today_selected ")}if(-1!=d.indexOf(f+"weekday_selected ")){e.push(f+
"weekday ");c.push(f+"weekday_selected ")}else if(-1!=d.indexOf(f+"weekend_selected ")){e.push(f+"weekend ");c.push(f+"weekend_selected ")}}for(var g=0;g<c.length;++g){d=d.replace(c[g],e[g])}if(c.length!=0){a.className=d}};m.P={};m.staticGetPickerById=function(a){return m.P[a]};function hc(a){var b=m.P[a];return b.ja(b.hb)}function gc(a){var b=m.P[a];return b.ja(b.db)}function fc(a){var b=a.id,c=b.match(/(.*)day_\d+_\d+/),e=m.P[c[1]];return e.ra(b)};m.prototype.Ja=function(){if(this.Lb===true)return;
this.Lb=true;var a=this.j,b=this,c=this.ba;bc(function(e){if(b.M==1&&e===c){var d=new E(e);d.escapedStartPoint=false;d.l=function(f,g){var h=da(f),l=K(b.F),j=K(x(a+m.LAST_DAY_OF_WEEK[b.H]));if(h.x<l.x||h.x>=j.x+j.w||h.y<l.y||h.y>=j.y+j.h)return false;this.startPoint=h.clone();this.startEvent=f;var k=x(a+"lasso");if(!k){k=document.createElement("div");k.id=a+"lasso";k.style.position="absolute";k.style.display="none";document.body.appendChild(k)}w=5;u=3;i=k;return true};d.k=function(f,g,h,l){if(!this.escapedStartPoint){var j=
ic(this.startPoint,da(f));if(j>5){this.escapedStartPoint=true;b.l.call(b,this.startEvent,g)}else{return true}}b.k.apply(b,arguments);return true};d.I=function(f,g,h){if(this.escapedStartPoint){b.I.apply(b,arguments)}else{if(this.startPoint){var l=b.Q(this.startEvent).id;b.ra.call(b,l)}}return true};return d}else{return undefined}})};m.prototype.log=function(){this.Mb.fireEvent(arguments)};function ca(){this.r={};this.ka=0}ca.prototype.t=function(){return this.ka};ca.prototype.add=function(a){var b=
this.la(a);if(b in this.r)return false;this.r[b]=a.e();++this.ka;return true};ca.prototype.remove=function(a){var b=this.la(a);if(!(b in this.r))return false;delete this.r[b];--this.ka;return true};ca.prototype.clear=function(a){this.r={};this.ka=0};ca.prototype.contains=function(a){var b=this.la(a);return b in this.r};ca.prototype.Z=function(){var a=new Array(this.t()),b=-1;for(var c in this.r)a[++b]=this.r[c];return a};ca.prototype.la=function(a){F(a instanceof o||a instanceof A,"expected a date or datetime: "+
a);return a.toString().substr(0,9)};function la(a){this.Ob=a;this.p=[]}la.prototype.add=function(a){V(a,Function);if(!a)return false;for(var b=0;b<this.p.length;++b){if(a===this.p[b])return false}this.p.push(a);return true};la.prototype.remove=function(a){if(!a)return false;for(var b=0;b<this.p.length;++b){if(a===this.p[b]){this.p.splice(b,1);return true}}return false};la.prototype.fireEvent=function(){for(var a=0;a<this.p.length;++a){this.p[a].apply(this.Ob,arguments)}};la.prototype.t=function(){return this.p.length};
function qc(a){this.Kb=a;this.Ib=0;this.ua=null};qc.prototype.remove=function(){if(!this.ua)throw new Error("no current element!");this.Kb.remove(this.ua);this.ua=null;--this.Ib};var Kb=null;function ec(a){return function(b){return"&laquo;"}}function cc(a){return function(b){return a.Ta()[b.month]+" "+b.year}}function dc(a){return function(b){return"&raquo;"}}function Hc(a){return function(b){if(!a.za()){return true}var b=b||window.event,c;if(aa()){var e=K(a.T());c=e.contains(da(b))}else{var d=b.explicitOriginalTarget;c=mc(a.T(),d)}if(!c){a.hide();if(Kb){Kb.parentNode.style.display="none"}}return true}};function Fb(){return true}var I=null,Ib="",Ma=null,La=null,ab=null,ma=null;function zc(a){return function(){var b=a.getSelection();if(!b||!Ma||!La){Jb(a);return}var c=new ia(b,b);if(!ab.contains(c)){Jb(a);return}window.location.href=wc(b)}}function wc(a){var b=Ib;if(document.getElementById("graph_type").value=="entirelist"){b=b+"?sa=X"}else{b=b+"?q=*&sa=X"}b=b+"&date="+a.year+"-"+a.month+"-"+a.date;return b}function bb(a){var b=oc(a);if(!b)return null;if(!(b.confidence>
-2)){return null}return b.date}function Jb(a){if(!ma){return}a.v(ma,ma,false)}function xc(a){if(!a||!Ma||!La){return null}var b=new ia(a,a);if(!ab.contains(b)){return"color: #CCCCCC;"}return null}function vc(a,b,c,e,d){Ib=b;Ma=bb(c);La=bb(e);ma=bb(d);ab=new ia(Ma,La);if(aa()&&I==null){I=Sb(window,"DP_Iframe","javascript:false");I.parentNode.style.display="none";I.style.position="absolute"}var f=document.createElement("div");f.id=a+"dp_div";f.style.position="absolute";f.style.display="none";f.style.width=
"10em";document.body.appendChild(f);var g=new m(f,false,undefined,"DP_popup_");g.Ea(0);g.vb(ec(g));g.qb(cc(g));g.ub(dc(g));g.xb(true);g.sb(0);g.rb(xc);g.ma(zc(g));g.deactivate=function(j){if(!g.za())return true;var k=K(g.T()),z=da(j);if(!k.contains(z)){g.hide();if(I){I.parentNode.style.display="none"}return true}return false};var h=yc(f.id,a,g),l=x(a);O(l,"focus",h,false);O(l,"click",h,false);O(l,"blur",Hc(g),false);return g}function yc(a,b,c){return function(){var e=x(b),d=K(e),f=x(a);f.style.left=
d.x+"px";f.style.top=d.y+d.h+"px";f.className="DP_popup_div";f.style.display="";var g=e.currentStyle?e.currentStyle:e.ownerDocument.defaultView.getComputedStyle(e,"");f.style.zIndex=(g.zIndex||0)+1;c.show();if(I){var h=K(c.T());I.parentNode.style.display="";I.style.left=h.x+"px";I.style.top=h.y+"px";I.style.width=h.w+"px";I.style.height=h.h+"px";I.style.zIndex=f.style.zIndex-1;I.style.display=""}if(ma){c.v(ma,ma,false)}rc(c);return true}}var _addDatePickerToLink=vc;function R(a,b,c,e,d,f){D.isTrue(e,"Div is null.");this.Y=x(e);D.isTrue(this.Y);D.isTrue(d.length==f.length,"Number of terms and urls does not match.");this.N=[];this.yb=[];for(var g=0;g<d.length;g++){this.N[g]=d[g];this.yb[g]=f[g]}this.Ha=b;this.tb(a);this.gb=Math.ceil(this.N.length/this.fa);this.Ca=-1;this.wb(c);this.C=Math.floor(Math.max(this.Ca,0)/this.fa);this.ha()};R.prototype.wb=function(a){D.isTrue(a<this.N.length,"Selected item is beyond the length of the array.");D.isTrue(a>=-1,"Selected item is less than -1.");
this.Ca=a};R.prototype.tb=function(a){D.isTrue(a>0,"itemsPerPage <= 0.");this.fa=a};R.prototype.Ab=function(a){var b=a;if(this.Ha>0&&a.length>this.Ha){b=a.substring(0,this.Ha)+"..."}return b};R.prototype.eb=function(){if(this.C+1>=this.gb)return;this.C++;this.ha()};R.prototype.ib=function(){if(this.C<=0)return;this.C--;this.ha()};R.prototype.La=function(){while(this.Y.firstChild){this.Y.removeChild(this.Y.firstChild)}};R.prototype.ha=function(){this.La();var a=document.createElement("table");this.Y.appendChild(a);
a.className="Z2_list";a.setAttribute("id","Z2_list");var b=document.createElement("tbody");a.appendChild(b);var c=this.C*this.fa,e=Math.min(this.N.length,c+this.fa);for(var d=c;d<e;d++){this.kb(d,b)}var f=document.createElement("tr");b.appendChild(f);var g=document.createElement("tr"),h=document.createElement("td");h.colSpan=2;h.appendChild(document.createTextNode("Showing "+(c+1)+" - "+e));g.appendChild(h);b.appendChild(g);this.lb(b)};R.prototype.lb=function(a){var b=document.createElement("tr");
a.appendChild(b);var c=document.createElement("td");c.colSpan=2;b.appendChild(c);if(this.C>0){var e=this.pa("Z2_prev","&laquo; Previous");c.appendChild(e);c.appendChild(document.createTextNode("   "));O(x("Z2_prev"),"click",this.ib.bind(this),false)}if(this.C+1<this.gb){var d=this.pa("Z2_next","Next &raquo;");c.appendChild(d);O(x("Z2_next"),"click",this.eb.bind(this),false)}};R.prototype.pa=function(a,b){var c=document.createElement("a");c.setAttribute("href","#");c.setAttribute("id",a);c.setAttribute("name",
a);c.className="u";c.innerHTML=b;return c};R.prototype.kb=function(a,b){if(a<0||a>=this.N.length)return;var c=this.Ab(this.N[a]),e=document.createElement("tr"),d=document.createElement("td");d.className="num";d.appendChild(document.createTextNode(a+1+"."));var f=document.createElement("td");if(a==this.Ca){f.className="selected";f.appendChild(document.createTextNode(c))}else{var g=document.createElement("a");g.setAttribute("href",this.yb[a]);g.appendChild(document.createTextNode(c));f.appendChild(g)}e.appendChild(d);
e.appendChild(f);b.appendChild(e)};function _Z2_addListRenderer(a,b,c,e,d,f){new R(a,b,c,e,d,f)};
