

//----------------------------------------------função calendário --------------------------------------
function _CalendarModule(__MODULE_ID__){
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 d=c.concat();for(var e=0;e<arguments.length;e++){d.push(arguments[e])}return b.apply(a,d)}};var ib,ve;(function(){var a={},b=0;function c(g){if(!g.gc){g.gc=++b}return g.gc}function d(g,h,i,j){var l=c(g),n=c(i);j=!(!j);var q=l+"_"+h+"_"+n+"_"+
j;return q}ib=function(g,h,i,j){var l=d(g,h,i,j);if(l in a){return l}var n=e.bind(null,l);a[l]={listener:i,proxy:n};if(g.addEventListener){g.addEventListener(h,n,j)}else if(g.attachEvent){g.attachEvent("on"+h,n)}else{throw new Error("Node {"+g+"} does not support event listeners.");}return l};ve=function(g,h,i,j){var l=d(g,h,i,j);if(!(l in a)){return false}var n=a[l].proxy;if(g.removeEventListener){g.removeEventListener(h,n,j)}else if(g.detachEvent){g.detachEvent("on"+h,n)}delete a[l];return true};
function e(g){var h=Array.prototype.splice.call(arguments,1,arguments.length);return a[g].listener.apply(null,h)}})();var f={};f.util={};f.client={};f.data={};f.data.calendar={};f.data.extensions={};f.util.Utils={};f.util.Utils.fb=undefined;(function(){if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){var a=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","MICROSOFT.XMLHTTP.1.0","MICROSOFT.XMLHTTP.1","MICROSOFT.XMLHTTP"];for(var b=0;b<a.length;++b){var c=
a[b];try{new ActiveXObject(c);f.util.Utils.fb=c;return}catch(d){}}throw"Could not create ActiveXObject. ActiveX might be disabled, or msxml might not be installed";}})();f.util.Utils.getHttpRequest=function(){if(f.util.Utils.fb!==undefined){return new ActiveXObject(f.util.Utils.fb)}else{return new XMLHttpRequest}};f.util.Utils.getXmlDomFromRequest=function(a){var b=a.responseXML;if((!b||!b.documentElement)&&typeof ActiveXObject!="undefined"){b=new ActiveXObject("Microsoft.XMLDOM");b.loadXML(a.responseText)}return b};
f.util.Utils.convertXmlDomToJson=function(a){var b=f.util.Utils.convertElementToJson(a);if(a.xmlVersion){b.version=a.xmlVersion}else{var c=a.firstChild.attributes;for(var d=0;d<c.length;++d){var e=c[d];if(e.nodeName=="version"){b.version=e.nodeValue;break}}}if(a.xmlEncoding){b.encoding=a.xmlEncoding}else{var c=a.firstChild.attributes;for(var d=0;d<c.length;++d){var e=c[d];if(e.nodeName=="encoding"){b.encoding=e.nodeValue;break}}}return b};f.util.Utils.convertElementToJson=function(a){var b={};if(a.attributes){for(var c=
0;c<a.attributes.length;++c){var d=a.attributes[c],e=d.nodeName.replace(/:/g,"$"),g=d.nodeValue;b[e]=g;if(e.indexOf("xmlns")==0){var h=e=="xmlns"?"_":e.substring("xmlns:".length);if(!b.$ns)b.$ns={};b.$ns[h]=g;if(!b.$rns)b.$rns={};b.$rns[g]=h=="_"?"":h}}}if(a.childNodes.length==1&&(a.childNodes[0].nodeType==3||a.childNodes[0].nodeType==4)){b.$t=a.childNodes[0].nodeValue}else if("getAttribute"in a&&a.getAttribute("type")=="application/xhtml+xml"&&a.getAttribute("mode")!="escaped"){b.$t=f.util.Utils.asXhtml(a)}else{for(var c=
0;c<a.childNodes.length;++c){var i=a.childNodes[c];if(i.nodeType!=1)continue;var e=i.tagName.replace(/:/g,"$");if(e in b){if(!(b[e]instanceof Array)){b[e]=[b[e]]}b[e].push(f.util.Utils.convertElementToJson(i))}else{b[e]=f.util.Utils.convertElementToJson(i)}}}return b};f.util.Utils.convertJsonToXml=function(a,b){var c=['<?xml version="'+(a.version||"1.0")+'" encoding="'+(a.encoding||"UTF-8")+'" ?>'];f.util.Utils.Nb(a,b,c);return c.join("")};f.util.Utils.Nb=function(a,b,c){var d=[],e=[];for(var g in a){var h=
a[g];g=g.replace(/\$/g,":");var i=false;if(g.charAt(0)==":"){if(g==":t"){e.push(f.util.Utils.escapeXml(h))}}else if((i=f.util.Utils.isArray(h))||typeof h=="object"){var j=[],l=i?h:[h];for(var n=0;n<l.length;++n){f.util.Utils.Nb(l[n],g,j)}e.push(j.join(""))}else{d.push(g+'="'+f.util.Utils.escapeXml(h)+'"')}}c.push("<"+b);if(d.length){c.push(" "+d.join(" "))}if(e.length){c.push(">"+e.join("")+"</"+b,">\n")}else{c.push("/>\n")}};f.util.Utils.escapeXml=function(a){if(!a)return"";return a.replace(/&/g,
"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/>/g,"&gt;")};f.util.Utils.asXhtml=function(a){function b(c,d){var e=d||[];if(c.nodeType==1){var g=c.firstChild;if(d){e.push("<",c.tagName);var h=c.attributes;for(var i=0;i<h.length;++i){var j=h[i],l=j.nodeName,n=j.nodeValue.toString();e.push(" ",l,'="',f.util.Utils.escapeXml(n),'"')}}if(g){if(d)e.push(">");while(g){b(g,e);g=g.nextSibling}if(d)e.push("</",c.tagName,">")}else{if(d)e.push("/>")}}else if(c.nodeType==3){e.push(c.nodeValue)}return e}
return b(a).join("")};f.util.Utils.isArray=function(a){return a instanceof Array||a&&typeof a=="object"&&typeof a.join=="function"&&typeof a.reverse=="function"};f.util.Utils.o=function(a){if(!a)return[];return f.util.Utils.isArray(a)?a:[a]};f.util.Template=function(a,b){if(!b){a=a.replace(/>(\s+)</g,"><");a=a.replace(/\s{2,}/g," ")}this.F=[];this.jc=0;this.S={};var c=a.match(/\$\{\w+\}/g)||[],d=0;for(var e=0;e<c.length;++e){var g=c[e],h=a.indexOf(g,d);if(d!=h){this.F.push(a.substring(d,h))}d=h+g.length;
g=g.substring(2,g.length-1);var i=this.S[g];if(!i){i=[];this.S[g]=i;++this.jc}i.push(this.F.length);this.F.push(undefined)}if(d!=a.length){this.F.push(a.substring(d))}this.ob=0};f.util.Template.prototype.put=function(a,b){var c=this.S[a];if(this.F[c[0]]===undefined)++this.ob;if(c.length===1){this.F[c[0]]=b}else{for(var d=0;d<c.length;++d){this.F[c[d]]=b}}};f.util.Template.prototype.U=function(a,b,c){if(b==null){this.put(a,"")}else{var d=c||a;this.put(a," "+d+'="'+f.util.Utils.escapeXml(b)+'"')}};
f.util.Template.prototype.N=function(a,b,c){var d=c||a;if(b==null){this.put(a,"")}else{this.put(a,"<"+d+">"+f.util.Utils.escapeXml(b)+"</"+d+">")}};f.util.Template.prototype.toString=function(){if(!this.s()){throw new Error("Some keys are missing values: "+this.pd());}return this.F.join("")};f.util.Template.prototype.pd=function(){var a=[];for(var b in this.jd())a.push(b);return a.join()};f.util.Template.prototype.Kd=function(a){return a&&a in this.S};f.util.Template.prototype.Wd=function(){return this.ob};
f.util.Template.prototype.s=function(){return this.ob==this.jc};f.util.Template.prototype.Ud=function(){var a={};for(var b in this.S)a[b]=null;return a};f.util.Template.prototype.jd=function(){var a={};for(var b in this.S){if(this.F[this.S[b][0]]===undefined){a[b]=null}}return a};var Wb=["Do","Se","Tr","Qa","Qi","Sx","Sa"],Xa=[,"Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],Qa=[,"Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro",
"Dezembro"],xa,ee,Ic,ba,na,ge,fe;(function(){var a=navigator.userAgent.toLowerCase();xa=a.indexOf("msie")!=-1;ee=a.indexOf("msie 5")!=-1&&document.all;Ic=a.indexOf("konqueror")!=-1;ba=a.indexOf("safari")!=-1||Ic;na=!xa&&!ba&&a.indexOf("mozilla")!=-1;ge=a.indexOf("win")!=-1;fe=!(!window.opera)})();function mb(a,b){}function ed(a,b,c){};var Fd=/&/g,ke=/</g,Zd=/\>/g;function da(a){if(!a)return"";return a.replace(Fd,"&amp;").replace(ke,"&lt;").replace(Zd,"&gt;").replace(se,"&quot;")}function ob(a){if(!a)return"";
return a.replace(/&#(\d+);/g,function(b,c){return String.fromCharCode(parseInt(c,10))}).replace(/&#x([a-f0-9]+);/gi,function(b,c){return String.fromCharCode(parseInt(c,16))}).replace(/&(\w+);/g,function(b,c){c=c.toLowerCase();return c in ob.unesc?ob.unesc[c]:"?"})}ob.unesc={lt:"<",gt:">",quot:'"',nbsp:" ",amp:"&"};var se=/\"/g;var rd=new RegExp(String("[\\\\'\r\n\u0008\"<>&\u0085\u2028\u2029]"),"g");function Wa(a){return Wa.dc[a]}function Eb(a){if(!Wa.dc){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";Wa.dc=b}return"'"+a.toString().replace(rd,Wa)+"'"}function Ga(a){if(!a)return"";return a.replace(/^\s+/,"").replace(/\s+$/,"")}function zd(a,b,c){if(ub(b.selectionEnd)&&ub(b.selectionStart)){b.selectionStart=c;b.selectionEnd=c}else if(a.document.selection&&b.createTextRange){var d=b.createTextRange();d.collapse(true);d.move("character",c);d.select()}}
function gd(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;return b}function ub(a){return typeof a!="undefined"}function od(a){var b;if(a.type==="keypress"){if(xa){b=a.keyCode}else if(na){b=a.which;if(b){}else{b=a.keyCode}}else{return a.keyCode||a.which}}else{if(a.keyCode){b=a.keyCode}else if(a.which){b=a.which}}return b}function Qd(a){return document.getElementById(a)}
function Rd(a){return document.all[a]}var m=document.getElementById?Qd:Rd;function nb(a){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 _showLogWindow(){}function Db(a){var b=typeof a==="string"?m(a):a;if(b){try{b.focus();if(b.tagName=="INPUT"&&(b.type=="text"||b.type=="password")){zd(window,
b,0)}}catch(c){}}}function pa(a){return a<0?-1:1}function Ua(a){return a|0}function Ta(a){throw a;}function z(a,b){var c=a.toString();while(c.length<b){c="0"+c}return c}function L(a,b,c){return parseInt(a.substring(b,c),10)}var tb=[undefined,31,undefined,31,30,31,30,31,31,30,31,30,31];function U(a,b){if(2!==b){return tb[b]}var c=a<<4,d=tb[c];if(!d){d=Math.round((Date.UTC(a,2,1)-Date.UTC(a,1,1))/86400000);tb[c]=d}return d}var gc={};function qd(a,b){var c=a<<4|b,d=gc[c];if(!d){d=(new Date(a,b-1,1,0,
0,0,0)).getDay();gc[c]=d}return d}function Ca(a){return(a.date-1+qd(a.year,a.month))%7}function fc(a,b,c,d,e,g){var h;if(a===d){if((h=b-e)===0){return c-g}else if(h<0){h=c-g;do{h-=U(a,b++)}while(b<e);return h}else{h=c-g;do{h+=U(d,e++)}while(e<b);return h}}else{return Math.round((Date.UTC(a,b-1,c)-Date.UTC(d,e-1,g))/86400000)}}function sb(a,b){return fc(a.year,a.month,a.date,b.year,b.month,b.date)}function G(a,b,c,d,e,g){if(!isNaN(a)){this.year=a}if(!isNaN(b)){this.month=b}if(!isNaN(c)){this.date=
c}if(!isNaN(d)){this.hour=d}if(!isNaN(e)){this.minute=e}if(!isNaN(g)){this.second=g}}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.Vc=function(){return Ca(this)};G.prototype.toString=function(){if(this.A!==undefined)return this.A;this.A=this.X();return this.A};function ea(){}ea.prototype=new G;ea.prototype.constructor=ea;function t(a,b,c){G.call(this,a,b,c,NaN,NaN,NaN)}t.prototype=new ea;t.prototype.constructor=
t;t.now=function(){var a=new Date;return t.create(a.getFullYear(),a.getMonth()+1,a.getDate())};t.prototype.type="Date";t.prototype.b=function(){return this};t.prototype.B=function(){return new A(this.year,this.month,this.date,0,0,0)};t.prototype.a=function(){if(undefined===this.i){this.i=rb(this.year,this.month,this.date)}return this.i};function rb(a,b,c){return(((a-1970)*12+b<<5)+c)*86400}t.prototype.s=function(){return true};t.prototype.X=function(){return z(this.year,4)+z(this.month,2)+z(this.date,
2)};t.prototype.equals=function(a){return this.constructor===a.constructor&&this.date===a.date&&this.month===a.month&&this.year===a.year};t.Qa={};t.Jc=0;t.Bc=200;t.create=function(a,b,c){var d=rb(a,b,c);if(d in t.Qa){return t.Qa[d]}else{var e=new t(a,b,c);e.i=d;if(t.Jc<t.Bc){t.Qa[d]=e}return e}};function A(a,b,c,d,e,g){G.call(this,a,b,c,d,e,g)}A.prototype=new ea;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.b=function(){return t.create(this.year,this.month,this.date)};A.prototype.B=function(){return this};A.prototype.zb=function(){return new P(this.hour,this.minute,this.second)};A.prototype.a=function(){if(undefined===this.i){this.i=(((((this.year-1970)*12+this.month<<5)+this.date)*24+this.hour)*60+this.minute)*60+this.second}return this.i};A.prototype.s=function(){return true};A.prototype.X=function(){return z(this.year,4)+z(this.month,2)+z(this.date,
2)+"T"+z(this.hour,2)+z(this.minute,2)+z(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.A!==undefined)a.A=this.A;return a};function P(a,b,c){G.call(this,NaN,NaN,NaN,a,b,c)}P.prototype=new G;P.prototype.constructor=P;
P.prototype.type="Time";P.prototype.zb=function(){return this};P.prototype.X=function(){return"T"+z(this.hour,2)+z(this.minute,2)+z(this.second,2)};P.prototype.equals=function(a){return this.constructor===a.constructor&&this.hour===a.hour&&this.minute===a.minute&&this.second===a.second};P.prototype.a=function(){return(this.hour*60+this.minute)*60+this.second};function K(a,b,c,d){var e=d+60*(c+60*(b+24*a)),g=Ua(e/86400);e-=g*86400;var h=Ua(e/3600);e-=h*3600;var i=Ua(e/60);e-=i*60;var j=Ua(e);G.call(this,
NaN,NaN,g,h,i,j)}K.prototype=new G;K.prototype.constructor=K;K.prototype.type="Duration";K.prototype.Se=function(){return this.date};K.prototype.Te=function(){return this.date*24+this.hour};K.prototype.Ue=function(){return 1440*this.date+this.hour*60+this.minute};K.prototype.Ve=function(){return this.second+this.minute*60+this.hour*3600+86400*this.date};K.prototype.a=function(){if(undefined===this.i){this.i=((this.date*24+this.hour)*60+this.minute)*60+this.second}return this.i};K.prototype.X=function(){var a=
this.year?pa(this.year):(this.month?pa(this.month):(this.date?pa(this.date):(this.hour?pa(this.hour):(this.minute?pa(this.minute):(this.second?pa(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};K.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 D(a){var b=new x;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 Ka(a,b,c){mb(!(isNaN(a)|isNaN(b)|isNaN(c)));var d=new x;d.year=a||0;d.month=b||0;d.date=c||0;return d}function Gc(a,b,c,d,e,g){mb(!(isNaN(a)|isNaN(b)|isNaN(c)|isNaN(d)|isNaN(e)|isNaN(g)));var h=new x;h.year=
a||0;h.month=b||0;h.date=c||0;h.hour=d||0;h.minute=e||0;h.second=g||0;return h}function x(){}x.prototype=new G;x.prototype.constructor=x;x.prototype.type="DTBuilder";x.prototype.year=(x.prototype.month=(x.prototype.date=(x.prototype.hour=(x.prototype.minute=(x.prototype.second=0)))));x.prototype.a=function(){this.normalize();var a;if(isNaN(this.hour)){a=rb(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};
x.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}};x.prototype.normalize=function(){this.qd();this.nb();var a=U(this.year,this.month);while(this.date<1){this.month-=1;this.nb();a=U(this.year,this.month);this.date+=a}while(this.date>a){this.date-=a;this.month+=1;this.nb();a=U(this.year,this.month)}};x.prototype.qd=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}};x.prototype.nb=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}};x.prototype.b=function(){this.normalize();return t.create(this.year,this.month,this.date)};x.prototype.B=function(){this.normalize();return new A(this.year,this.month,this.date,this.hour,this.minute,this.second)};x.prototype.va=function(){this.normalize();return new I(isFinite(this.year)?this.year:undefined,isFinite(this.month)?this.month:undefined,isFinite(this.date)?this.date:undefined)};
x.prototype.yc=function(){this.normalize();return new F(isFinite(this.year)?this.year:undefined,isFinite(this.month)?this.month:undefined,isFinite(this.date)?this.date:undefined,isFinite(this.hour)?this.hour:undefined,isFinite(this.minute)?this.minute:undefined,isFinite(this.second)?this.second:undefined)};x.prototype.zb=function(){this.normalize();return new P(this.hour,this.minute,this.second)};x.prototype.xc=function(){if(this.year||this.month){Ta("Can't convert months or years to ICAL_Duration");
return undefined}else{return new K(this.date,this.hour,this.minute,this.second)}};x.prototype.Gd=function(){return"number"==typeof this.year&&1+this.year%1===1&&"number"==typeof this.month&&1+this.month%1===1&&"number"==typeof this.date&&1+this.date%1===1};x.prototype.We=function(){return this.Gd()&&this.Hd()};x.prototype.Hd=function(){return"number"==typeof this.hour&&1+this.hour%1===1&&"number"==typeof this.minute&&1+this.minute%1===1&&"number"==typeof this.second&&1+this.second%1===1};x.prototype.toString=
function(){return"["+(undefined!==this.year?z(this.year,4):"????")+"/"+(undefined!==this.month?z(this.month,2):"??")+"/"+(undefined!==this.date?z(this.date,2):"??")+" "+(undefined!==this.hour?z(this.hour,2):"??")+" "+(undefined!==this.minute?z(this.minute,2):"??")+" "+(undefined!==this.second?z(this.second,2):"??")+"]"};x.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 fa(a,b){this.start=a;if(b.constructor==K){var c=D(a);c.advance(b);this.end=this.start instanceof A?c.B():c.b()}else{this.end=b}this.duration=cc(this.end,this.start)}fa.prototype.type="PeriodOfTime";fa.prototype.toString=function(){if(this.A!==undefined)return this.A;this.A=this.start+"/"+this.end;return this.A};fa.prototype.equals=function(a){return this.constructor===a.constructor&&this.start.equals(a.start)&&this.end.equals(a.end)};fa.prototype.overlaps=function(a){return a.end.a()>
this.start.a()&&a.start.a()<this.end.a()};fa.prototype.ke=function(a,b){return b.a()>this.start.a()&&a.a()<this.end.a()};fa.prototype.contains=function(a){return this.start.a()<=a.start.a()&&this.end.a()>=a.end.a()};function Sa(a,b){this.start=a;this.end=b;try{this.duration=cc(this.end,this.start)}catch(c){this.duration=null}}Sa.prototype.type="PartialPeriodOfTime";Sa.prototype.X=function(){return this.start+"/"+this.end};Sa.prototype.equals=function(a){return this.constructor===a.constructor&&this.start.equals(a.start)&&
this.end.equals(a.end)};function cc(a,b){if(isNaN(a.year)!=isNaN(b.year)||isNaN(a.hour)!=isNaN(b.hour)){Ta("diff("+a+", "+b+")");return undefined}var c=D(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=fc(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.xc()}function I(a,b,c){this.year=a;this.month=b;this.date=c}I.prototype=new ea;I.prototype.constructor=I;I.prototype.type=
"PartialDate";I.prototype.b=function(){return t.create(this.year||0,this.month||1,this.date||1)};I.prototype.B=function(){return new A(this.year||0,this.month||1,this.date||1,0,0,0)};I.prototype.va=function(){return this};I.prototype.yc=function(){return new F(this.year,this.month,this.date,0,0,0)};I.prototype.s=function(){return!isNaN(this.a())};I.prototype.a=function(){if(undefined===this.i){this.i=(((this.year-1970)*12+this.month<<5)+this.date)*86400}return this.i};I.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))};I.prototype.X=function(){return(undefined!==this.year?z(this.year,4):"????")+(undefined!==this.month?z(this.month,2):"??")+(undefined!==this.date?z(this.date,2):"??")};function F(a,b,c,d,e,g){this.year=a;this.month=b;this.date=c;this.hour=d;this.minute=e;this.second=g}F.prototype=new ea;F.prototype.constructor=F;F.prototype.type=
"PartialDateTime";F.prototype.b=function(){return t.create(this.year||0,this.month||1,this.date||1)};F.prototype.B=function(){return new A(this.year||0,this.month||1,this.date||1,this.hour||0,this.minute||0,this.second||0)};F.prototype.va=function(){return new I(this.year,this.month,this.date)};F.prototype.yc=function(){return this};F.prototype.s=function(){return!isNaN(this.a())};F.prototype.a=function(){if(undefined===this.i){this.i=(((((this.year-1970)*12+this.month<<5)+this.date)*24+this.hour)*
60+this.minute)*60+this.second}return this.i};F.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))};F.prototype.X=function(){return(undefined!==
this.year?z(this.year,4):"????")+(undefined!==this.month?z(this.month,2):"??")+(undefined!==this.date?z(this.date,2):"??")+"T"+(undefined!==this.hour?z(this.hour,2):"??")+(undefined!==this.minute?z(this.minute,2):"??")+(undefined!==this.second?z(this.second,2):"??")};function T(a){var b=a.indexOf("/"),c=a.length;if(b>=0){return new fa(T(a.substring(0,b)),T(a.substring(b+1,c)))}else{var d=1,e=0;switch(a.charAt(0)){case "T":return Gc(0,0,0,L(a,1,3),L(a,3,5),L(a,5,7)).zb();case "P":return dc(a.substring(1,
c),1);case "-":d=-1;case "+":e=1;if("P"==a.charAt(1)){return dc(a.substring(2,c),d)}default:var g=a.indexOf("T");if(g===-1){return Ka(L(a,e,c-4),L(a,c-4,c-2),L(a,c-2,c)).b()}return Gc(L(a,e,g-4),L(a,g-4,g-2),L(a,g-2,g),L(a,g+1,g+3),L(a,g+3,g+5),L(a,g+5,g+7)).B()}}}function dc(a,b){var c=a.length,d=new x;for(var e=0;e<c;e+=1){var g=0;do{var h=a.charAt(e);if(h<"0"||h>"9"){break}g+=1}while((e+=1)<c);if(g===0){ed("T",a.charAt(e));continue}var i=L(a,e-g,e);switch(a.charAt(e)){case "W":d.date+=b*7*i;break;
case "D":d.date+=b*i;break;case "H":d.hour+=b*i;break;case "M":d.minute+=b*i;break;case "S":d.second+=b*i;break;default:Ta("Bad Duration "+a);return undefined}}return d.xc()}var ac="(?:([0-9]{4,})|\\?{4})",ha="(?:([0-9]{2})|\\?{2})",vd=new RegExp("^"+ac+ha+ha+"$"),wd=new RegExp("^"+ac+ha+ha+"T"+ha+ha+ha+"$");function Ra(a){var b=a.indexOf("/"),c=a.length;if(b>=0){return new Sa(Ra(a.substring(0,b)),Ra(a.substring(b+1,c)))}var d=a.match(wd);if(!d){d=a.match(vd);if(!d){Ta("Failed to parse partial date "+
a)}}for(var e=d.length;--e>=1;){if(!d[e]){d[e]=undefined}else{d[e]=parseInt(d[e],10)}}if(7==d.length){return new F(d[1],d[2],d[3],d[4],d[5],d[6])}else{return new I(d[1],d[2],d[3])}}var H=undefined,hc=[];function ec(a,b,c){var d=b>2&&29===U(a,2);return ec.Cc[b]+d+c-1}ec.Cc=[undefined,0,31,59,90,120,151,181,212,243,273,304,334];function ad(){var a=new Date,b=H;H=t.create(a.getFullYear(),a.getMonth()+1,a.getDate());if(b&&!b.equals(H)){for(var c=0;c<hc.length;++c){var d=hc[c];try{d(H)}catch(e){}}}var g=
new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);g.setDate(g.getDate()+1);var h=g.getTime()-a.getTime();if(h<0||h>=1800000){h=1800000}setTimeout(ad,h)}ad();function ra(a,b,c){this.x=a;this.y=b;this.coordinateFrame=c}ra.prototype.toString=function(){return"[P "+this.x+","+this.y+"]"};ra.prototype.clone=function(){return new ra(this.x,this.y,this.coordinateFrame)};function kd(a,b){this.dx=a;this.dy=b}kd.prototype.toString=function(){return"[D "+this.dx+","+this.dy+"]"};function ga(a,b,c,d,
e){this.x=a;this.y=b;this.w=c;this.h=d;this.coordinateFrame=e}ga.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};ga.prototype.toString=function(){return"[R "+this.w+"x"+this.h+"+"+this.x+"+"+this.y+"]"};ga.prototype.clone=function(){return new ga(this.x,this.y,this.w,this.h,this.coordinateFrame)};function X(a){var b=a.ownerDocument;if(na&&b){var c=b.getBoxObjectFor(a);return new ga(c.x,c.y,c.width,c.height,window)}var d=0,e=0;for(var g=a;g.offsetParent;g=
g.offsetParent){d+=g.offsetLeft;e+=g.offsetTop}return new ga(d,e,a.offsetWidth,a.offsetHeight,window)}function ne(a){var b=a.ownerDocument;if(na&&b){var c=b.getBoxObjectFor(a);return c.height}else{return a.offsetHeight}}function oe(a){var b=a.ownerDocument;if(na&&b){var c=b.getBoxObjectFor(a);return c.width}else{return a.offsetWidth}}function Tb(a){var b=a.ownerDocument;if(na&&b){var c=b.getBoxObjectFor(a);return new ra(c.x,c.y,window)}var d=0,e=0;while(a.offsetParent){d+=a.offsetLeft;e+=a.offsetTop;
a=a.offsetParent}return new ra(d,e,window)}function ca(a){var b=0,c=0;if(a.pageX||a.pageY){b=a.pageX;c=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft;c=a.clientY+document.body.scrollTop}return new ra(b,c,window)}var ka=new xd,yc=false;function xd(){this.P=[]}function _PC_Install(a){if(yc)return false;yc=true;var b=a?a:document;ib(b.body,"mousedown",nc);ib(b,"keydown",function(c){nc(c);return true});return true}function nc(a){var a=a||window.event;if(a.type=="keydown"&&
od(a)!=27)return false;if(ka.P.length==0)return false;for(var b=ka.P.length-1;b>=0;--b){var c=ka.P[b];if(c.deactivate(a)){ka.P.splice(b,1)}}return true}function Fa(a){for(var b=0;b<ka.P.length;++b){if(a===ka.P[b])return false}ka.P.push(a);return true}var ta=f.util.Template,Ia;function sa(){this.qaBox=document.createElement("DIV");this.qaBox.className="pbox quick";this.qaBox.style.display="none";this.qaBox.style.position="absolute";document.body.appendChild(this.qaBox);this.ba=false;this.template=
sa.HTML_TEMPLATE;this.template.put("Quick_Add","Quick Add");this.template.put("Quick_Add_Example","e.g., Hawaiian shirt day on Friday");var a=da("Submit new event to Quick Add");this.template.put("Quick_Add_Button_Alt_Text",a);this.template.put("s",__MODULE_ID__);this.qaBox.innerHTML=this.template.toString()}function ud(){if(!Ia)Ia=new sa;var a=m("quickadd"+__MODULE_ID__);a.value="";Ia.show();setTimeout(function(){Db(a)},0)}function hd(){if(!Ia)return;Ia.hide()}sa.HTML_TEMPLATE=new ta('<div class="t2">&nbsp;</div><div class="offset">  <div class="boxbody">    <form style="display: block;" id=quickAddForm${s}           onsubmit="_QuickAdd(this); _CloseQuickAdd(); return false;">      <div>        <label for="quickadd${s}">${Quick_Add}</label>        <input type="text" name="quickadd" id="quickadd${s}" class="txt">        <input type="image" src="http'+
(document.location.toString().match(/^https/)?"s":"")+'://www.google.com/calendar/images/btn_add_quick.gif"                class="imgbtn"                alt="${Quick_Add_Button_Alt_Text}"                title="${Quick_Add_Button_Alt_Text}">      </div>      <p>${Quick_Add_Example}</p>    </form>    <div class="reset">&nbsp;</div>  </div></div><div class="b2">&nbsp;</div><div class="sb2">&nbsp;</div>');sa.prototype.show=function(){var a=m("open-quick-add"+__MODULE_ID__),b=Tb(a);this.qaBox.style.left=
b.x+"px";this.qaBox.style.top=b.y+"px";this.qaBox.style.display="";this.ba=true;Fa(this)};sa.prototype.hide=function(){m("quickadd"+__MODULE_ID__).blur();this.qaBox.style.display="none";this.ba=false};sa.prototype.deactivate=function(a){if(this.ba){var b=ca(a);if(X(this.qaBox).contains(b)){return false}else{this.hide();return true}}else{return true}};function md(a){if(200!==bc(a))return null;var b=a.responseText,c="while(1);";if(b.substring(0,c.length)==c){b=b.substring(c.length)}var d=eval(b)[0],
e={summary:d[1],details:d[2],location:d[3],start:d[4],end:d[5],att_names:d[6],querystring:d[7],url:d[8],sharedprops:d[9],privprops:d[10]};if(e.summary)e.summary=Ga(e.summary);if(e.details)e.details=Ga(e.details);return e}function yd(a,b,c){if(!Ga(a)||!b||!c){return undefined}var d=Ra(b.toString()),e=Ra(c.toString()),g,h,i;if(d.s()){if(!e.s()){if((h=e.va()).s()&&h.b().a()>d.a()){if(d instanceof F){c=h.B()}else{c=h.b()}}else{i=D(d);if(d instanceof F){i.hour+=1;c=i.B()}else{i.date+=1;c=i.b()}}}}else if((g=
d.va()).s()){b=g.b();h=e.va();if(h.s()){c=h.b();i=D(c);i.date+=1;c=i.b()}else{i=D(b);i.date+=1;c=i.b()}}else{return undefined}return{start:b.toString(),end:c.toString()}}function k(a,b,c,d,e){this.n=a;this.e=c?c:this.n.id+"_";this.d=d?d:"DP_";this.Ic();k.ia[this.e]=this;if(e){this.r=e}else{this.r=t.now()}this.J=t.create(this.r.year,this.r.month,1);this.ja=0;this.Pc=!(!b);this.Na=false;this.kc=null;this.ic=null;this.ha={};this.M={};this.aa={};this.c={};this.D=null;this.oa=null;this.tb=new Z(this);
this.lb=new Z(this);this.xb=false;this.j=false;this.l=new S;this.Ob=false;this.T=0;this.Z=null;this.Ta=null;this.wb=true;this.pb=null;this.Sa=null;this.mb=null;this.Cb=true;this.v();this.yb=false;this.rc(0);this.ub(0);this.gb=false;this.E=null;this.g=null;this.C=null;this.da=null;this.ca=null;this.fc=null;this.na=false;this.Fb=null;this.Eb=null;var g=this,h=function(i){var j=i.startDate,l=i.endDate,n;if(!j){n=Aa[this.ra]}else if(!l||j.equals(l)){n="Selected: "+g.Xa(j,true)}else{n="Selected: "+g.Xa(j)+
" - "+g.Xa(l)}g.rd(n)};if(this.xb)this.Ib(h);this.kb=new Z(this)};k.prototype.Ic=function(){var a=this.d+"day_top ",b=this.d+"day_left ",c=this.d+"day_right ",d=this.d+"onmonth ",e=this.d+"offmonth ",g=this.d+"month_top ",h=this.d+"month_left ",i=this.d+"weekend ",j=this.d+"weekday ",l=this.d+"weekend_selected ",n=this.d+"weekday_selected ",q={};q[0]="";q[1]=a;q[3]=a+b;q[5]=a+c;q[2]=b;q[4]=c;var u={};for(var o in q){u[o|16|256]=q[o]+d+i;u[o|16|512]=q[o]+d+j;u[o|32|256]=q[o]+e+i;u[o|32|512]=q[o]+e+
j;u[o|16|1024]=q[o]+d+l;u[o|16|2048]=q[o]+d+n;u[o|32|1024]=q[o]+e+l;u[o|32|2048]=q[o]+e+n}var w={};for(var o in u){w[o]=u[o];w[o|64]=u[o]+g;w[o|64|128]=u[o]+g+h}this._classMap=w};var Aa={};Aa[0]="Select a date";Aa[1]="Select a range of dates";Aa[2]="Select dates";Aa[3]="&nbsp;";k.prototype.ub=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.Mc=a;this.Lb=b};k.prototype.ge=function(){return this.Na};k.prototype.Dd=function(a){if(a!=
this.Na){this.Na=a;this.v()}};k.prototype.Sc=function(){return this.Mc};k.prototype.rc=function(a){if(this.ra==a){return}this.ra=a;this.H()};k.prototype.$a=function(){return this.ra};k.prototype.show=function(){this.j=true;this.v()};k.prototype.hide=function(){this.n.innerHTML="";this.j=false};k.prototype.ba=function(){return this.j};k.prototype.Vd=function(a){return this.M[a.id]};k.prototype.Yd=function(a){return this.aa[a.id]};k.prototype.Uc=function(a){return this.c[a.id]};k.prototype.ae=function(){return m(this.e+
"tbl")};k.prototype.wd=function(a){this.ja=a;this.v()};k.prototype.Tb=function(){return this.ja};k.prototype.re=function(a){this.Z=a;this.v();return true};k.prototype.pc=function(a){this.Ta=a};k.prototype.Od=function(){return this.Z};k.prototype.Sd=function(){return this.D};k.prototype.Ha=function(){if(!this.j)return null;return this.c[this.D.id]};k.prototype.Ia=function(){if(!this.j)return null;var a=m(this.e+"day_"+(this.T-1)+"_6");return this.c[a.id]};k.prototype.Qe=function(a){if(a!=this.wb){this.wb=
a;this.v()}};k.prototype.Ad=function(a){this.pb=a};k.prototype.qe=function(a){this.Sa=a};k.prototype.zd=function(a){this.mb=a};k.prototype.ad=function(){return Xa};k.prototype.Td=function(){return Qa};k.prototype.v=function(){if(!this.j){return}var a=this.e,b,c=this.J.month,d=this.J.year,e=Wb.length,g=[c==1?12:c-1,c,c==12?1:c+1],h=t.create(this.r.year,this.r.month,1),i=Ka(d,c-1,1).b(),j=Ka(d,c+1,1).b();if(this.pb){g[0]=this.pb(i)}else{var l=i.a()>=h.a()?"&laquo;":"&lsaquo;&nbsp;";g[0]=l+Xa[g[0]]}if(this.Sa){g[1]=
this.Sa(this.J)}else{g[1]=Qa[g[1]]+" "+d}if(this.mb){g[2]=this.mb(j)}else{var n=j.a()-h.a()<=0?"&raquo;":"&nbsp;&rsaquo;";g[2]=Xa[g[2]]+n}var q=U(d,c),u=U(i.year,i.month),o=new Array(49),w=this.J.Vc()-this.ja;if(w<0)w+=7;if(q<30||w<5)w+=7;for(var r=0;r<w;++r){o[r]=t.create(i.year,i.month,u-w+r+1)}for(var r=w,p=0;p<q;++r){o[r]=t.create(d,c,++p)}var y=w+q;for(var r=y,p=0;r<o.length;++r){o[r]=t.create(j.year,j.month,++p)}this.Fb=o[0];this.Eb=o[o.length-1];var B=[],Q=this.Pc?[2,3,2]:[1,5,1],qa,vb,wb;
if(this.Cb){qa=' onmousedown="'+nb($b)+"("+Eb(a)+')"';vb=' onmousedown="'+nb(Zb)+"("+Eb(a)+')"';wb=' onclick="'+nb(Yb)+'(this)" '}else{qa=" ";vb=" ";wb=" "}B.push('<table cols=7 cellspacing="0" cellpadding="3" id="',a,'tbl"',' class="',this.d,'monthtable" ',' style="-moz-user-select:none; cursor:pointer;">','<tr class="',this.d,'heading" id="',a,'header">',"<td colspan=",Q[0]," unselectable=on",qa,' id="',a,'mhl" class="',this.d,'prev">',g[0],"</td>","<td colspan=",Q[1],' unselectable="on"',' id="',
a,'mhc" class="',this.d,'cur">',g[1],"</td>","<td colspan=",Q[2],' unselectable="on"',vb,' id="',a,'mhr" class="',this.d,'next">',g[2],"</td>","</tr>");if(this.Na){B.push('<tr class="',this.d,'days" id="',a,'dow">');for(var r=0;r<e;++r){B.push('<td unselectable="on"',' class="',this.d,'dayh" id="',a,"day_",r,'">',Wb[(r+this.ja)%7],"</td>")}B.push("</tr>")}var ic=(7-this.ja)%7,sd=(ic+6)%7;this.ha={};var b=null,C=null,jc,C,xb=null;if(this.Ta){xb=this.Ta.call(null,this.Fb,this.Eb)}for(var r=0,p=-1;r<
7;++r){B.push('<tr id="',a,"week_",r,'">');for(var V=0;V<e;++V){++p;var yb=this.l.contains(o[p]);C=0;if(r==0)C|=1;if(V==0)C|=2;else if(V==6)C|=4;C|=V==ic||V==sd?(yb?1024:256):(yb?2048:512);if(p<w||p>=y){C|=32;if(o[p].date<=7){C|=64;if(o[p].date==1&&V!=0){C|=128}}C=this._classMap[C]}else{C|=16;if(o[p].date<=7){C|=64;if(o[p].date==1&&V!=0){C|=128}}if(o[p].date==this.r.date&&c==this.r.month&&d==this.r.year){C=this._classMap[C]+(this.d+"today"+(yb?"_selected ":" "))}else{C=this._classMap[C]}}B.push('<td id="',
a,"day_",r,"_",V,'"',' class="',C,'"');if(xb&&(jc=xb[o[p]])){B.push(' style="',jc,'"')}B.push(wb,'unselectable="on">',o[p].date,"</td>")}B.push("</tr>")}if(this.xb){B.push('<tr class="',this.d,'months">','<td colspan="7" id="',a,'sel"></td></tr>')}B.push("</table>");this.n.innerHTML=B.join("");this.D=m(a+"day_0_0");this.oa=m(a+"day_6_6");var b=this.D,Da=b.parentNode,zb=null,kc=null,p=-1,Ab=-1;if(!this.Cb){m(a+"mhl").onmousedown=Xb(a,true);m(a+"mhr").onmousedown=Xb(a,false);m(a+"tbl").onclick=jd(this)}while(Da!=
null){++Ab;if(Ab==7)break;var lc=-1;while(b!=null){++p;++lc;var Bb=a+"day_"+Ab+"_"+lc;this.c[Bb]=o[p];this.ha[o[p].toString()]=b;this.aa[Bb]=zb;if(zb)this.M[kc]=b;zb=b;kc=Bb;b=b.nextSibling}Da=Da.nextSibling;if(Da!=null){b=Da.firstChild}}this.T=7;if(!this.wb){var td=m(a+"week_4"),mc=m(a+"week_5"),Cb=m(a+"week_6");if(this.c[a+"day_4_0"].month!=c){td.style.display="none";mc.style.display="none";Cb.style.display="none";this.T=4}else if(this.c[a+"day_5_0"].month!=c){mc.style.display="none";Cb.style.display=
"none";this.T=5}else if(this.c[a+"day_6_0"].month!=c){Cb.style.display="none";this.T=6}}this.kc=i;this.ic=j;if(this.Z){this.Z.call(null,this)}this.Ec()};k.prototype.refresh=function(){if(this.Z){this.Z.call(null,this)}};k.prototype.Ed=function(a){this.Cb=!(!a)};function Xb(a,b){if(b){return function(){$b(a)}}else{return function(){Zb(a)}}}function jd(a){return function(b){if(!b)b=window.event;var c=a.$b(),d=ca(b);a.Jb(d);if(!c.contains(d))return;var e=a.Ea(b);if(e)Yb(e)}}k.prototype.Ib=function(a){return this.tb.add(a)};
k.prototype.ne=function(a){return this.tb.remove(a)};k.prototype.H=function(a){a=arguments.length===0||a;var b=this.l.o();for(var c=0;c<b.length;++c){var d=this.ha[b[c].toString()];this.W(d,false)}this.l.clear();if(!this.na){this.qc(null);this.vb(null)}if(a)this.R()};k.prototype.je=function(a){return this.l.contains(a)};k.prototype.Kc=function(a){if(this.Lb){this.Lb.call(null,a);return}var b=m(a),c=this.l;switch(this.ra){case 1:var d=this.Sc();if(d==0)break;if(d!=1&&(d!=-1||!c.contains(this.c[a]))){var e=
this.c[b.id],g;switch(d){case -1:if(c.L()>7&&this.Ka()){var h=b.id.substr(b.id.length-3,1);e=this.c[this.e+"day_"+h+"_0"]}g=c.L()-1;break;case 7:var h=b.id.substr(b.id.length-3,1);e=this.c[this.e+"day_"+h+"_0"];g=6;break;case 30:e=this.c[b.id];e=t.create(e.year,e.month,1);var i=D(e);g=U(e.year,e.month)-1;break;default:}var i=D(e);i.date+=g;var j=i.b();this.sa(e,j);return}mb(d==1||d==-1&&c.contains(this.c[a]),"not a case for single date selection");this.H(false);case 0:if(c.L()>0){var l=c.o()[0];c.remove(l);
var n=this.ha[l.toString()];if(n)this.W(n,false)}c.add(this.c[b.id]);this.W(b);this.R(this.c[b.id]);break;case 2:break;case 3:default:break}};k.prototype.qc=function(a){this.g=a;this.da=a?this.c[a.id]:null};k.prototype.vb=function(a){this.C=a;this.ca=a?this.c[a.id]:null};k.prototype.nd=function(){return this.na};k.prototype.Re=function(a,b){this.H(false);this.na=true;this.qc(this.Ea(a));var c=this.c[this.g.id];this.l.add(c);this.W(this.g);this.sa(c);this.vb(this.g)};k.prototype.Ld=function(a,b,c){this.na=
false;this.C=this.Ea(a);if(this.Ka()){this.R(this.da,this.ca,false);return}var d,e;if(this.c[this.C.id].a()<this.c[this.g.id].a()){d=this.c[this.C.id];e=this.c[this.g.id]}else{d=this.c[this.g.id];e=this.c[this.C.id]}this.R(d,e,false)};k.prototype.ie=function(a,b,c,d){this.fc=gd(a);if(this.ra!=1||this.gb)return;this.gb=true;var e=this;setTimeout(function(){try{if(e.na){e.Qc.call(e,b,c,d)}}finally{e.gb=false}},50)};k.prototype.Fe=function(a){if(this.yb==a)return;this.yb=!(!a);this.H()};k.prototype.Ka=
function(){return this.yb};k.prototype.Qc=function(a,b,c){var d=this.fc,e=this.Ea(d);if(e===this.C)return;var g=this.C;this.vb(e);var h=this.c,i=h[g.id].a()<h[e.id].a(),j=h[g.id].a()<h[this.g.id].a(),l=h[e.id].a()<h[this.g.id].a(),n=h[this.g.id].a()<h[e.id].a(),q=h[this.g.id].a()<h[g.id].a(),u,o,w,r,p=l?this.C:this.g,y=l?this.g:this.C;if(this.Ka()){var B=sb(h[y.id],h[p.id]);if(B>=7){var Q,qa;Q=parseInt(p.id.charAt(p.id.length-3),10);qa=parseInt(y.id.charAt(y.id.length-3),10);p=m(this.e+"day_"+Q+"_0");
y=m(this.e+"day_"+qa+"_6")}this.V(this.D,p,false);this.V(y,this.oa,false);this.V(p,y,true);this.da=h[p.id];this.ca=h[y.id]}else{if(i){if(j){o=l?this.aa[e.id]:this.aa[this.g.id];this.V(g,o,false)}if(n){u=q?this.M[g.id]:this.M[this.g.id];this.V(u,e,true)}}else{if(q){u=n?this.M[e.id]:this.M[this.g.id];this.V(u,g,false)}if(l){o=l?this.aa[this.g.id]:this.aa[g.id];this.V(e,o,true)}}}w=h[p.id];r=h[y.id];this.R(w,r,true)};k.prototype.V=function(a,b,c){var d=false;while(a){if(c){d=this.l.add(this.c[a.id])}else{d=
this.l.remove(this.c[a.id])}if(d){this.W(a,c)}if(a.id===b.id)break;a=this.M[a.id]}};k.LAST_DAY_OF_WEEK={4:"day_3_6",5:"day_4_6",6:"day_5_6",7:"day_6_6"};k.prototype.ve=function(a){if(a){this.E={};this.E.x=a.x;this.E.y=a.y}else{this.E=null}};k.prototype.Jb=function(a,b){if(!this.E)return;if(b){a.x-=this.E.x;a.y-=this.E.y}else{a.x+=this.E.x;a.y+=this.E.y}};k.prototype.Ea=function(a){var b=oe(this.D),c=ne(this.D),d=this.$b(),e=ca(a);this.Jb(e);var g=7,h=this.Sb(d.x,b,g,e.x),i=this.Sb(d.y,c,this.T,e.y);
return m(this.e+"day_"+i+"_"+h)};k.prototype.Sb=function(a,b,c,d){if(d<a)return 0;var e=Math.floor((d-a)/b);return e>=c?c-1:e};k.prototype.$b=function(){var a=this.e,b=this.T,c=Tb(this.D),d=X(m(a+k.LAST_DAY_OF_WEEK[b]));return new ga(c.x,c.y,d.x+d.w-c.x,d.y+d.h-c.y,c.coordinateFrame)};k.prototype.Xa=function(a,b){var c=b?Qa:Xa;return c[a.month]+" "+a.date};k.prototype.R=function(a,b,c){var d={};d.startDate=a;d.endDate=b||a;d.nd=!(!c);d.mode=this.$a();this.tb.Wa(d)};k.prototype.ce=function(){return this.r};
k.prototype.Je=function(a){if(a.equals(this.r))return;this.r=a;this.v()};k.prototype.Kb=function(a){if(a instanceof t)return a;if(a instanceof A){return t.create(a.year,a.month,a.date)}};k.prototype.se=function(a){this.Ob=!(!a)};k.prototype.sa=function(a,b,c){var d=this.$a();c=c!==false;if(a)a=this.Kb(a);if(b)b=this.Kb(b);if(a)this.tc(a);if(!a||d==3){this.H(c);return}if(d==0){this.H(false);var e=this.ha[a.toString()];this.l.add(a);this.W(e);if(c)this.R(a)}else if(d==1){if(!b)b=a;var g=sb(b,a),h=false;
if(this.Ka()&&g>=7){var i=Ca(a)+7,j=Ca(b)+7;i=(i-this.Tb())%7;j=(j-this.Tb())%7;var l;l=Ka(a.year,a.month,a.date-i);a=l.b();l=Ka(b.year,b.month,b.date+(6-j));b=l.b();h=this.tc(a)}if(h){this.H(false)}var e=this.D;this.da=a;this.ca=b;var n=this.oa,q=a.a(),u=b.a(),o=new S;for(;e;e=this.M[e.id]){var w=this.c[e.id],r=this.l.contains(w),p=w.a()>=q&&w.a()<=u;if(r!=p){this.W(e,p)}if(p){o.add(w)}}this.l=o;if(this.c[n.id].a()<u){n=this.oa;var l=D(this.c[this.oa.id]),y=null;do{l.date+=1;y=l.b();this.l.add(y)}while(!y.equals(b))}if(c)this.R(a,
b)}};k.prototype.ta=function(a,b,c){if(this.J.month==a.month&&this.J.year==a.year&&!c)return false;b=arguments.length==1||b;this.J=t.create(a.year,a.month,1);this.v();if(b)this.lb.Wa();return true};k.prototype.Wc=function(){return this.J};k.prototype.tc=function(a,b){if(a.a()>=this.Fb.a()&&a.a()<=this.Eb.a()){return false}return this.ta(a,b)};k.prototype.Zb=function(){switch(this.$a()){case 0:if(this.l.L()){return this.l.o()[0]}else{return null}case 1:var a=this.da?this.da:null,b=this.ca?this.ca:
null;if(!a||!b)return null;return[a,b];case 2:return null;case 3:default:return null}};k.prototype.Xd=function(){return this.l.L()};k.prototype.rd=function(a){if(this.xb){m(this.e+"sel").innerHTML=a}};k.prototype.W=function(a,b){if(this.Ob||!a)return;if(!ub(b))b=true;var c=[],d=[],e=" "+a.className+" ",g=" "+this.d;if(b){if(-1!=e.indexOf(g+"today ")){c.push(g+"today ");d.push(g+"today_selected ")}if(-1!=e.indexOf(g+"weekday ")){c.push(g+"weekday ");d.push(g+"weekday_selected ")}else if(-1!=e.indexOf(g+
"weekend ")){c.push(g+"weekend ");d.push(g+"weekend_selected ")}}else{if(-1!=e.indexOf(g+"today_selected ")){d.push(g+"today ");c.push(g+"today_selected ")}if(-1!=e.indexOf(g+"weekday_selected ")){d.push(g+"weekday ");c.push(g+"weekday_selected ")}else if(-1!=e.indexOf(g+"weekend_selected ")){d.push(g+"weekend ");c.push(g+"weekend_selected ")}}for(var h=0;h<c.length;++h){e=e.replace(c[h],d[h])}if(c.length!=0){a.className=e}};k.prototype.Fc=function(a){this.lb.add(a)};k.prototype.me=function(a){this.lb.remove(a)};
k.ia={};k.prototype.Id=function(){return this.e};k.staticGetPickerById=function(a){return k.ia[a]};function $b(a){var b=k.ia[a];return b.ta(b.kc)}function Zb(a){var b=k.ia[a];return b.ta(b.ic)}function Yb(a){var b=a.id,c=b.match(/(.*)day_\d+_\d+/),d=k.ia[c[1]];return d.Kc(b)}k.prototype.Ec=function(){};k.prototype.Jd=function(a){return this.kb.add(a)};k.prototype.le=function(a){return this.kb.remove(a)};k.prototype.log=function(){this.kb.Wa(arguments)};k.prototype.Pd=function(){return this.n};function S(){this.I=
{};this.La=0}S.prototype.L=function(){return this.La};S.prototype.add=function(a){var b=this.Db(a);if(b in this.I)return false;this.I[b]=a.b();++this.La;return true};S.prototype.remove=function(a){var b=this.Db(a);if(!(b in this.I))return false;delete this.I[b];--this.La;return true};S.prototype.clear=function(){this.I={};this.La=0};S.prototype.contains=function(a){var b=this.Db(a);return b in this.I};S.prototype.o=function(){var a=new Array(this.L()),b=-1;for(var c in this.I)a[++b]=this.I[c];return a};
S.prototype.Db=function(a){return a.toString().substr(0,9)};function Z(a){this.sd=a;this.t=[]}Z.prototype.add=function(a){if(!a)return false;for(var b=0;b<this.t.length;++b){if(a===this.t[b])return false}this.t.push(a);return true};Z.prototype.remove=function(a){if(!a)return false;for(var b=0;b<this.t.length;++b){if(a===this.t[b]){this.t.splice(b,1);return true}}return false};Z.prototype.Wa=function(){for(var a=0;a<this.t.length;++a){this.t[a].apply(this.sd,arguments)}};Z.prototype.L=function(){return this.t.length};
Z.prototype.iterator=function(){return new Ea(this)};function Ea(a){this.jb=a;this.hb=0;this.Q=null}Ea.prototype.md=function(){return this.hb<this.jb.L()};Ea.prototype.next=function(){if(this.md()){this.Q=this.jb.t[this.hb++]}else{this.Q=null}return this.Q};Ea.prototype.current=function(){return this.Q};Ea.prototype.remove=function(){if(!this.Q)throw new Error("no current element!");this.jb.remove(this.Q);this.Q=null;--this.hb};f.client.Service=function(a,b){this.td=a;this.Hc=b};f.client.Service.prototype.authenticate=
function(a){a()};f.client.Service.prototype.pa=function(){return false};f.client.Service.prototype.cb=function(a,b,c,d){if(this.pa()){var e=this;this.authenticate(function(){e.Ga(b,c,d)})}else{this.ld(b,function(g){var h=new c;h.init(a?g.feed:g.entry);d.call(null,h)})}};f.client.Service.prototype.Ga=function(a,b,c){this.cb(true,a,b,c)};f.client.Service.prototype.Rd=function(a,b,c){this.cb(false,a,b,c)};f.client.Service.prototype.query=function(a,b,c){this.cb(true,a.ab(),b,c)};f.client.Service.prototype.insert=
function(a,b,c){var d=c||function(){};if(this.pa()){var e=this;this.authenticate(function(){e.insert(a,b,d)})}else{this.nc("POST",a,b,d)}};f.client.Service.prototype.update=function(a,b,c){var d=c||function(){};if(this.pa()){var e=this;this.authenticate(function(){e.update(a,b,d)})}else{this.nc("PUT",a,b,d)}};f.client.Service.prototype.remove=function(a,b){var c=b||function(){};if(this.pa()){var d=this;this.authenticate(function(){d.remove(a,c)})}else{var e=f.util.Utils.getHttpRequest();this.Da(e,
function(g){c.call(null)});e.open("DELETE",a,true);e.setRequestHeader("Content-Type","application/atom+xml; charset=utf-8");this.Ba(e);this.Ca(e);e.send(null)}};f.client.Service.prototype.nc=function(a,b,c,d){var e=f.util.Utils.getHttpRequest();this.Da(e,function(h){var i=new c.constructor,j=f.util.Utils.getXmlDomFromRequest(h);i.init(f.util.Utils.convertXmlDomToJson(j).entry);d.call(null,i)});e.open(a,b,true);e.setRequestHeader("Content-Type","application/atom+xml; charset=utf-8");var g=c.p();e.setRequestHeader("Content-Length",
g.length);this.Ba(e);this.Ca(e);e.send(g)};f.client.Service.prototype.Nc=function(a){var b=this;return function(c){if(c.status>299){throw new Error("Bad server response during authentication operation: "+c.status);}var d=c.responseText;if(!d){throw new Error("Server failed to provide authentication token.");}var e=d.match(/^Auth=(.*)/m);if(!e||!e[1]){throw new Error("Malformed authentication token: "+d);}b.oc(e[1]);a.call(null)}};f.client.Service.prototype.Da=function(a,b){var c=a,d=this;a.onreadystatechange=
function(){if(c.readyState!=4)return;var e=parseInt(c.status,10);if(e>=400){if(d.Rb){d.Rb.call(null,c)}else{throw new Error(e+": "+c.statusText);}}else{b.call(null,c)}}};f.client.Service.prototype.vd=function(a){this.Rb=a};f.client.Service.prototype.ld=function(a,b){var c=f.util.Utils.getHttpRequest();this.Da(c,function(d){var e=f.util.Utils.getXmlDomFromRequest(d);b.call(null,f.util.Utils.convertXmlDomToJson(e))});c.open("GET",a,true);c.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT");
c.setRequestHeader("X-If-No-Redirect","1");this.Ba(c);this.Ca(c);c.send(null)};f.client.Service.prototype.Ca=function(a){var b="JavaScript-V1.0-"+(this.Hc||"");a.setRequestHeader("X-GData-Client",b)};f.client.Service.prototype.Ba=function(a){};f.client.GoogleService=function(a,b){f.client.Service.call(this,a,b);this.wa=null;this.ya=null;this.qa=null};f.client.GoogleService.prototype=new f.client.Service;f.client.GoogleService.prototype.constructor=f.client.GoogleService;f.client.GoogleService.prototype.oc=
function(a){this.wa=a};f.client.GoogleService.prototype.pa=function(){return(this.ya||this.qa)&&!this.wa};f.client.GoogleService.prototype.Ne=function(a,b){if(this.ya!=a||this.qa!=b){this.wa=null}this.ya=a;this.qa=b};f.client.GoogleService.prototype.$c=function(){return"https://www.google.com/accounts/ClientLogin"};f.client.GoogleService.prototype.authenticate=function(a){if(!this.ya||!this.qa){throw new Error("need to set username and password to authenticate");}var b="Email="+encodeURIComponent(this.ya)+
"&Passwd="+encodeURIComponent(this.qa)+"&source=desktop_Feed_reader&service="+encodeURIComponent(this.td),c=f.util.Utils.getHttpRequest();this.Da(c,this.Nc(a));c.open("POST",this.$c(),true);c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.Ca(c);c.send(b)};f.client.GoogleService.prototype.Ba=function(a){if(this.wa){var b="GoogleLogin auth="+this.wa;a.setRequestHeader("Authorization",b)}};f.data.Person=function(a,b,c){this.hc=a;this.zc=b;this.Pb=c};f.data.Person.prototype.Xb=
function(){return this.hc};f.data.Person.prototype.fe=function(){return this.zc};f.data.Person.prototype.Xc=function(){return this.Pb};f.data.Person.prototype.ze=function(a){return this.hc=a};f.data.Person.prototype.Me=function(a){return this.zc=a};f.data.Person.prototype.ue=function(a){return this.Pb=a};f.data.Person.Dc=new f.util.Template("<author>${name}${email}</author>");f.data.Person.prototype.p=function(){var a=f.data.Person.Dc;a.N("name",this.Xb());a.N("email",this.Xc());return a.toString()};
f.data.Person.prototype.toString=function(){return this.Xb()};f.data.Category=function(a,b,c){this.lc=a;this.vc=b;this.ec=c};f.data.Category.prototype.cd=function(){return this.lc};f.data.Category.prototype.gd=function(){return this.vc};f.data.Category.prototype.Wb=function(){return this.ec};f.data.Category.prototype.De=function(a){return this.lc=a};f.data.Category.prototype.Ie=function(a){return this.vc=a};f.data.Category.prototype.ye=function(a){return this.ec=a};f.data.Category.prototype.toString=
function(){return this.cd()+"/"+this.gd()+(this.Wb()?"/"+this.Wb():"")};f.data.Link=function(a,b,c){this.sb=a;this.Y=b;this.Ja=c;this.m=null};f.data.Link.prototype.$d=function(){return this.sb};f.data.Link.prototype.ac=function(){return this.Y};f.data.Link.prototype.Vb=function(){return this.Ja};f.data.Link.prototype.f=function(){return this.m};f.data.Link.prototype.Ce=function(a){return this.sb=a};f.data.Link.prototype.sc=function(a){return this.Y=a};f.data.Link.prototype.we=function(a){return this.Ja=
a};f.data.Link.prototype.O=function(a){return this.m=a};f.data.Link.Oa=new f.util.Template("<link${rel}${type}${href}${title}/>");f.data.Link.prototype.u=function(a){a.U("rel",this.sb);a.U("type",this.Y);a.U("href",this.Ja);a.U("title",this.m)};f.data.Link.prototype.p=function(){var a=f.data.Link.Oa;this.u(a);return a.toString()};f.data.Link.prototype.toString=function(){return this.Ja};f.data.Entry=function(){this.k=null;this.e=null;this.m=null;this.Ra=null;this.Ma=null;this.Ab=null;this.qb=null;
this.Ma=null;this.ib=[];this.Pa=null;this.z=null;this.Ua=null;this.fa=null;this.ga=null};f.data.Entry.prototype.init=function(a){this.k=a;a.link=f.util.Utils.o(a.link);a.author=f.util.Utils.o(a.author);a.category=f.util.Utils.o(a.category);if(a.id)this.e=a.id.$t;if(a.title)this.m=a.title.$t;if(a.content)this.Ra=a.content.$t;if(a.summary)this.Ma=a.summary.$t;if(a.updated)this.Ab=a.updated.$t;if(a.published)this.qb=a.published.$t;var b=a.link;for(var c=0;c<b.length;++c){var d=b[c],e=new f.data.Link(d.rel,
d.type,d.href);if(d.rel=="alternate"){this.Pa=e}else if(d.rel=="self"){this.z=e}else if(d.rel=="edit"){this.Ua=e}this.ib.push(e)}};f.data.Entry.prototype.ma=function(){return this.k};f.data.Entry.prototype.la=function(){return this.e};f.data.Entry.prototype.f=function(){return this.m};f.data.Entry.prototype.Tc=function(){return this.Ra};f.data.Entry.prototype.fd=function(){return this.Ma};f.data.Entry.prototype.kd=function(){return this.Ab};f.data.Entry.prototype.bd=function(){return this.qb};f.data.Entry.prototype.Ya=
function(){return this.Pa};f.data.Entry.prototype.dd=function(){return this.z};f.data.Entry.prototype.Qd=function(){return this.Ua};f.data.Entry.prototype.Md=function(){if(this.ga!=null)return this.ga;this.ga=[];if(this.k){var a=this.k.category;for(var b=0;b<a.length;++b){var c=a[b];this.ga.push(new f.data.Category(c.scheme,c.term,c.label))}}return this.ga};f.data.Entry.prototype.Rc=function(){if(this.fa!=null)return this.fa;this.fa=[];if(this.k){var a=this.k.author;for(var b=0;b<a.length;++b){var c=
a[b],d=c.name?c.name.$t:null,e=c.email?c.email.$t:null;this.fa.push(new f.data.Person(d,null,e))}}return this.fa};f.data.Entry.prototype.xe=function(a){this.e=a};f.data.Entry.prototype.O=function(a){this.m=a};f.data.Entry.prototype.pe=function(a){this.Ra=a};f.data.Entry.prototype.He=function(a){this.Ma=a};f.data.Entry.prototype.Le=function(a){this.Ab=a};f.data.Entry.prototype.Ae=function(a){this.qb=a};f.data.Entry.prototype.oe=function(a){this.Pa=a};f.data.Entry.prototype.Ee=function(a){this.z=a};
f.data.Entry.prototype.te=function(a){this.Ua=a};f.data.Entry.prototype.toString=function(){return this.f()};f.data.Entry.ea=new f.util.Template('<entry xmlns="http://www.w3.org/2005/Atom">${id}${published}${updated}${categories}${title}${summary}${content}${links}${authors}</entry>');f.data.Entry.prototype.u=function(a){a.N("id",this.la());a.N("published",this.bd());a.N("updated",this.kd());a.put("categories",'<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#event" />');
a.N("title",this.f());a.N("summary",this.fd());a.N("content",this.Tc());var b=[];for(var c=0;c<this.ib.length;++c){b.push(this.ib[c].p())}a.put("links",b.join(""));var d=[],e=this.Rc();for(var c=0;c<e.length;++c){d.push(e[c].p())}a.put("authors",d.join(""))};f.data.Entry.prototype.p=function(){var a=f.data.Entry.ea;this.u(a);return a.toString()};f.data.Feed=function(){this.k=null;this.e=null;this.m=null;this.Va=null;this.z=null};f.data.Feed.prototype.init=function(a){this.k=a;a.entry=f.util.Utils.o(a.entry);
a.link=f.util.Utils.o(a.link);if(a.id)this.e=a.id.$t;if(a.title)this.m=a.title.$t};f.data.Feed.prototype.ka=function(){return f.data.Entry};f.data.Feed.prototype.Oc=function(){var a=this.ka();return new a};f.data.Feed.prototype.la=function(){return this.e};f.data.Feed.prototype.f=function(){return this.m};f.data.Feed.prototype.Za=function(){if(this.Va!=null)return this.Va;var a=[];if(this.k&&this.k.entry){var b=this.k.entry;for(var c=0;c<b.length;++c){var d=this.Oc();d.init(b[c]);a.push(d)}}this.Va=
a;return a};f.data.Feed.prototype.dd=function(){if(this.z!=null)return this.z;if(this.k&&this.k.link){var a=this.k.link;for(var b=0;b<a.length;++b){var c=a[b];if(c.rel=="self"){this.z=new f.data.Link(c.rel,c.type,c.href);return this.z}}}this.z=undefined;return this.z};f.data.Feed.prototype.de=function(){return this.Za().length};f.data.Feed.prototype.ma=function(){return this.k};f.data.Feed.prototype.toString=function(){return this.f()};f.data.extensions.When=function(a,b){this.uc=a;this.Qb=b};f.data.extensions.When.prototype.q=
function(){return this.uc};f.data.extensions.When.prototype.K=function(){return this.Qb};f.data.extensions.When.prototype.Bd=function(a){return this.uc=a};f.data.extensions.When.prototype.ud=function(a){return this.Qb=a};f.data.extensions.When.prototype.p=function(){return'<gd:when startTime="'+this.q()+'" endTime="'+this.K()+'" xmlns:gd="http://schemas.google.com/g/2005"/>'};f.data.extensions.When.prototype.toString=function(){return this.q()+"/"+this.K()};f.data.extensions.EventEntry=function(){f.data.Entry.call(this);
this.ua=null;this.xa=null;this.za=null;this.G=[]};f.data.extensions.EventEntry.prototype=new f.data.Entry;f.data.extensions.EventEntry.prototype.constructor=f.data.extensions.EventEntry;f.data.extensions.EventEntry.EventStatus={CANCELED:"http://schemas.google.com/g/2005#event.canceled",CONFIRMED:"http://schemas.google.com/g/2005#event.confirmed",TENTATIVE:"http://schemas.google.com/g/2005#event.tentative"};f.data.extensions.EventEntry.Transparency={OPAQUE:"http://schemas.google.com/g/2005#event.opaque",
TRANSPARENT:"http://schemas.google.com/g/2005#event.transparent"};f.data.extensions.EventEntry.Visibility={CONFIDENTIAL:"http://schemas.google.com/g/2005#event.confidential",DEFAULT:"http://schemas.google.com/g/2005#event.default",PRIVATE:"http://schemas.google.com/g/2005#event.private",PUBLIC:"http://schemas.google.com/g/2005#event.public"};f.data.extensions.EventEntry.prototype.init=function(a){f.data.Entry.prototype.init.call(this,a);var b=f.util.Utils.o(a["gd$when"]);if(a["gd$eventstatus"])this.ua=
a["gd$eventstatus"].value;if(a["gd$transparency"])this.xa=a["gd$transparency"].value;if(a["gd$visibility"])this.za=a["gd$visibility"].value;for(var c=0;c<b.length;++c){var d=b[c];this.G.push(new f.data.extensions.When(d.startTime,d.endTime))}};f.data.extensions.EventEntry.prototype.ed=function(){return this.ua};f.data.extensions.EventEntry.prototype.ee=function(){return this.xa};f.data.extensions.EventEntry.prototype.he=function(){return this.za};f.data.extensions.EventEntry.prototype.hd=function(){return this.G};
f.data.extensions.EventEntry.prototype.Ge=function(a){this.ua=a};f.data.extensions.EventEntry.prototype.Ke=function(a){this.xa=a};f.data.extensions.EventEntry.prototype.Oe=function(a){this.za=a};f.data.extensions.EventEntry.prototype.Gc=function(a){this.G.push(a)};f.data.extensions.EventEntry.prototype.q=function(){if(this.G.length!=1){throw new Error("Entry has more than one When associated with it");}return this.G[0].q()};f.data.extensions.EventEntry.prototype.K=function(){if(this.G.length!=1){throw new Error("Entry has more than one When associated with it");
}return this.G[0].K()};f.data.extensions.EventEntry.ea=new f.util.Template('<entry xmlns="http://www.w3.org/2005/Atom"        xmlns:gd="http://schemas.google.com/g/2005"        xmlns:gCal="http://schemas.google.com/gCal/2005">${id}${published}${updated}${categories}${title}${summary}${content}${links}${authors}${times}${status}${transparency}${visibility}</entry>');f.data.extensions.EventEntry.prototype.u=function(a){f.data.Entry.prototype.u.call(this,a);var b="";for(var c=0;c<this.G.length;++c){var d=
this.G[c];b+=d.p()}a.put("times",b);a.put("status",this.ua?'<gd:eventStatus value="'+this.ua+'" xmlns:gd="http://schemas.google.com/g/2005"/>':"");a.put("transparency",this.xa?'<gd:transparency value="'+this.xa+'" xmlns:gd="http://schemas.google.com/g/2005"/>':"");a.put("visibility",this.za?'<gd:visibility value="'+this.za+'" xmlns:gd="http://schemas.google.com/g/2005"/>':"")};f.data.extensions.EventEntry.prototype.p=function(){var a=f.data.extensions.EventEntry.ea;this.u(a);return a.toString()};
f.data.extensions.EventFeed=function(){f.data.Feed.call(this)};f.data.extensions.EventFeed.prototype=new f.data.Feed;f.data.extensions.EventFeed.prototype.constructor=f.data.extensions.EventFeed;f.data.extensions.EventFeed.prototype.ka=function(){return f.data.extensions.EventEntry};f.data.calendar.CalendarEntry=function(){f.data.Entry.call(this);this.Hb=null;this.cc=null;this.wc=null;this.mc=null;this.Mb=null};f.data.calendar.CalendarEntry.prototype=new f.data.Entry;f.data.calendar.CalendarEntry.prototype.constructor=
f.data.calendar.CalendarEntry;f.data.calendar.CalendarEntry.prototype.init=function(a){f.data.Entry.prototype.init.call(this,a);if(a["gCal$accesslevel"]){this.Hb=a["gCal$accesslevel"].value}if(a["gCal$hidden"]){this.cc=a["gCal$hidden"].value=="true"}if(a["gCal$timezone"])this.wc=a["gCal$timezone"].value;if(a["gCal$selected"]){this.mc=a["gCal$selected"].value=="true"}if(a["gCal$color"])this.Mb=a["gCal$color"].value};f.data.calendar.CalendarEntry.prototype.$=function(){return this.Hb};f.data.calendar.CalendarEntry.prototype.Ub=
function(){return this.cc};f.data.calendar.CalendarEntry.prototype.be=function(){return this.wc};f.data.calendar.CalendarEntry.prototype.Yb=function(){return this.mc};f.data.calendar.CalendarEntry.prototype.Fa=function(){return this.Mb};f.data.calendar.CalendarFeed=function(){f.data.Feed.call(this)};f.data.calendar.CalendarFeed.prototype=new f.data.Feed;f.data.calendar.CalendarFeed.prototype.constructor=f.data.calendar.CalendarFeed;f.data.calendar.CalendarFeed.prototype.ka=function(){return f.data.calendar.CalendarEntry};
f.data.calendar.CalendarFeed.prototype.init=function(a){f.data.Feed.prototype.init.call(this,a)};f.data.calendar.WebContent=function(){this.eb=null;this.m=null;this.Y=null;this.Bb=null;this.Gb=null;this.db=null};f.data.calendar.WebContent.Oa=new f.util.Template("<link${rel}${type}${href}${title}><gCal:webContent${url}${width}${height}/></link>");f.data.calendar.WebContent.prototype.p=function(){var a=new f.data.Link("http://schemas.google.com/gCal/2005/webContent",this.Y,this.eb);a.O(this.m);var b=
f.data.calendar.WebContent.Oa;a.u(b);b.U("width",this.Gb);b.U("height",this.db);b.U("url",this.Bb);return b.toString()};f.data.calendar.WebContent.prototype.Zc=function(){return this.eb};f.data.calendar.WebContent.prototype.f=function(){return this.m};f.data.calendar.WebContent.prototype.ab=function(){return this.Bb};f.data.calendar.WebContent.prototype.bc=function(){return this.Gb};f.data.calendar.WebContent.prototype.Yc=function(){return this.db};f.data.calendar.WebContent.prototype.ac=function(){return this.Y};
f.data.calendar.WebContent.prototype.yd=function(a){this.eb=a};f.data.calendar.WebContent.prototype.O=function(a){this.m=a};f.data.calendar.WebContent.prototype.Cd=function(a){this.Bb=a};f.data.calendar.WebContent.prototype.Fd=function(a){this.Gb=a};f.data.calendar.WebContent.prototype.xd=function(a){this.db=a};f.data.calendar.WebContent.prototype.sc=function(a){this.Y=a};f.data.calendar.CalendarEventEntry=function(){f.data.extensions.EventEntry.call(this);this.rb=false;this.Ac=null;this.Aa=null};
f.data.calendar.CalendarEventEntry.prototype=new f.data.extensions.EventEntry;f.data.calendar.CalendarEventEntry.prototype.constructor=f.data.calendar.CalendarEventEntry;f.data.calendar.CalendarEventEntry.prototype.init=function(a){f.data.extensions.EventEntry.prototype.init.call(this,a);var b=f.util.Utils.o(a.link);for(var c=0;c<b.length;++c){var d=b[c];if(d.rel=="http://schemas.google.com/gCal/2005/webContent"){this.Ac=new f.data.Link(d.rel,d.type,d.href);if(d.title!=null)this.Ac.O(d.title);var e=
new f.data.calendar.WebContent;e.yd(d.href);e.O(d.title);e.sc(d.type);if("gCal$webContent"in d){var g=d["gCal$webContent"];e.Cd(g.url);e.Fd(g.width);e.xd(g.height)}this.Aa=e;break}}};f.data.calendar.CalendarEventEntry.prototype.ka=function(){return f.data.calendar.CalendarEventEntry};f.data.calendar.CalendarEventEntry.prototype.Zd=function(){return this.rb};f.data.calendar.CalendarEventEntry.prototype.bb=function(){return this.Aa};f.data.calendar.CalendarEventEntry.prototype.Be=function(a){this.rb=
a};f.data.calendar.CalendarEventEntry.prototype.Pe=function(a){this.Aa=a};f.data.calendar.CalendarEventEntry.ea=new f.util.Template('<entry xmlns="http://www.w3.org/2005/Atom"        xmlns:gd="http://schemas.google.com/g/2005"        xmlns:gCal="http://schemas.google.com/gCal/2005">${id}${published}${updated}${categories}${title}${summary}${content}${links}${authors}${times}${status}${transparency}${visibility}${quickAdd}${webContent}</entry>');f.data.calendar.CalendarEventEntry.prototype.u=function(a){f.data.extensions.EventEntry.prototype.u.call(this,
a);var b=this.rb?'<gCal:quickadd value="true"/>':"";a.put("quickAdd",b);a.put("webContent",this.Aa?this.Aa.p():"")};f.data.calendar.CalendarEventEntry.prototype.p=function(){var a=f.data.calendar.CalendarEventEntry.ea;this.u(a);return a.toString()};f.data.calendar.CalendarEventFeed=function(){f.data.extensions.EventFeed.call(this);this.tzName=null};f.data.calendar.CalendarEventFeed.prototype=new f.data.extensions.EventFeed;f.data.calendar.CalendarEventFeed.prototype.constructor=f.data.calendar.CalendarEventFeed;
f.data.calendar.CalendarEventFeed.prototype.ka=function(){return f.data.calendar.CalendarEventEntry};var s=__MODULE_ID__,bb=!(!window._IS_EMBEDDED),hb=false,W=false,aa=false,E=new _IG_Prefs(s),La=E.getString("syndicatable")=="true",Vc=false;if(La){var Xc=E.getString(Xc);Vc=E.getBool("sub");if(Xc){var Sb=document.createElement("link");Sb.setAttribute("rel","STYLESHEET");Sb.setAttribute("href","stylesheet");document.getElementsByTagName("head")[0].appendChild(Sb)}}var ma=bb||La;new function(){if(ma)return;
var a=document.cookie.split(/;?\s/);try{if(window._pid){aa=true;for(var b=0;b<a.length;++b){var c=a[b];if(c.match(/^IGAT=/)){W=true}}}else{var a=document.cookie.split(/;?\s/);for(var b=0;b<a.length;++b){if(a[b].match(/^SID=/)){W=true;break}}}if(!W){if(document.location.toString().match(/^https?:\/\/www\.google\.com\/calendar\//)){W=true}else{return}}hb=!(!document.location.toString().match(/^https?:\/\/www\.google\.com\//))}catch(d){return}};var ia,O,Oa,bd,J;new function(){var a={Sunday:0,Monday:1,
Saturday:6};ia=E.getString("firstDay");if(ia in a){ia=a[ia]}else{ia=0}O=La?E.getBool("showAgenda"):E.getString("showAgenda")=="true";Oa=E.getBool("showCalendar2");bd=E.getString("timeFormat")=="13:00";J=eval(E.getString("calendarFeeds"))};var $a={};if(ba){m("picker"+s).style.margin="-7px 0 -5px"}var v=new k(m("picker"+s),false);v.Dd(true);v.Ad(function(){return"&laquo;"});v.zd(function(){return"&raquo;"});v.pc(Hd);v.ub(1,re);v.wd(ia);v.Ib($d);v.Fc(ae);v.Ed(false);if(Oa){m("pickerContainer"+s).style.display=
""}v.show();_PC_Install();function Qb(a,b){var c=$a[a],d=[];for(var e in c){var g=c[e].owner.url,h=g.indexOf("?");if(h>=0)g=g.substring(0,h);if(g.match(/^https/))g=g.replace("https","http");if(!La&&!aa&&!(g in J)){continue}d.push(c[e])}d.sort(Jd);if(b){var i=b.length;d.unshift(i);d.unshift(i);b.splice.apply(b,d);return b}else{return d}}function Jd(a,b){var c=Va(b)-Va(a);if(c)return c;c=jb(a.q()).a()-jb(b.q()).a();if(c)return c;return uc(a,b)}var rc="agendaDiv"+s;function Pa(){document.body.appendChild(m(rc));
this.n=m(rc);this.j=false}var ab="datedQuickAdd"+s;Pa.prototype.show=function(a,b){v.sa(a);if(O)return;R=a;var c=['<table cellpadding=0 width="100%">'];if(hb||aa&&W||ma){var d=Qb(a),e=d.length;if(!e){c.push("<I class=eventChip>         ");c.push(a.date,Cc(a.date),".</I>")}else{for(var g=0;g<e;++g){pc(a,d[g],c)}}}else if(W){return}else{c.push("<span class=eventChip>","You can use Google Calendar to manage your events. ",'<a href="',"https://www.google.com/accounts/NewAccount?continue=",
"http%3A%2F%2Fwww.google.com%2Fcalendar&service=cl",'">Sign up.</a></span>')}m(ab).style.display=hb?"":"none";var h=pb(a);m("agendaDivTitle"+s).innerHTML=h;c.push("</table>");m("agendaDivBody"+s).innerHTML=c.join("");m(ab).date.value=a.toString();var i=X(b),j=this.n,l=i.x,n=i.y+i.h;if(xa){--n;--l}else if(ba){n+=3;l+=8}j.style.left=l+"px";j.style.top=n+"px";j.style.display="";this.j=true;Fa(this);setTimeout(function(){Db("datedInput"+s)},0)};function Cc(a){switch(a){case 1:case 21:case 31:return"st";
case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}}var cd=new ta('<TR>  <TD class="eventCell timeSlot">All day  <TD style="width:100%" colspan=3>    <A href="${href}" target=_BLANK class=eventCell style="color:${color}">${title}</A>'),Bd=new ta('<TR>  <TD class="eventCell timeSlot">${time}  <TD style="width:100%" colspan=3>    <A href="${href}" target=_BLANK class=eventCell style="color:${color}">${title}</A>'),ld=new ta('<TR>  <TD class="eventCell timeSlot">&nbsp;  <TD style="width:100%" colspan=3>    <A href="${href}" target=_BLANK class=eventCell style="color:${color}">${title}   (ends at ${time})</A>'),
Cd=new ta('<TR id="${id}">  <TD align="right" class="eventCell"><IMG src="${icon}"       style="height:16px;width:16px;cursor:pointer;margin-right:5px">  <TD colspan=3><SPAN class=eventCell     onmouseover="this.style.textDecoration=\'underline\'"     onmouseout="this.style.textDecoration=\'none\'"     style="color:${color};cursor:pointer"     >${title}</SPAN>'),Dd=new ta('<TR>  <TD align="right" class="eventCell">    <IMG src="${icon}" height="16" width="16">  <TD class=eventCell colspan=3 style="color:${color}">${title}');
function pc(a,b,c){if(b.bb()){Ed(a,b,c);return}var d=b.f(),e=Dc(b),g,h=false,i=Va(b)||!(g=Na(b.q())).b().equals(a)&&!(h=Na(b.K()).b().equals(a)),j;if(i){j=cd}else{if(h){j=ld;j.put("time",qb(Na(b.K())))}else{j=Bd;j.put("time",qb(g))}}j.put("color",b.owner.color);j.put("title",da(d||"(No Subject)"));j.put("href",e);c.push(j.toString())}function Sc(a){if(!a.match(/^https?:\/\//))return"about:blank";return window.escape(a).replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%3D/g,"=").replace(/%26/g,"&").replace(/%3F/g,
"?").replace(/%23/g,"#")}var xc={};function Ed(a,b,c){var d=b.bb(),e=Sc(d.Zc()),g=da(d.f()),h;if(d.ab()){h=Cd;var i=b.la();h.put("id",s+"-cal-"+i);xc[i]=b}else{h=Dd}h.put("color",b.owner.color);h.put("icon",e);h.put("title",g);c.push(h.toString())}var Xd=new RegExp("^"+s+"-cal-(.*)$");function Hc(a){if(a.nodeName!="SPAN"&&a.nodeName!="IMG")return null;var b=document.body;while(a&&a!=b){var c=null;if(a.id&&(c=a.id.match(Xd))){var d=c[1],e=xc[d];return e}a=a.parentNode}return null}var Wd={deactivate:function(a){if(Hc(a.target||
a.srcElement))return false;var b=m("webContentDiv"+s);if(b.style.display==""){var c=ca(a);if(X(b).contains(c)){return false}else{b.style.display="none";return true}}else{return true}}};function te(a){var b=m(s+"-cal-"+a.la());if(!b)return;var c=a.bb(),d=c.ac(),e=m("webContentDiv"+s);if(e.parentNode!=document.body){document.body.appendChild(e)}e.style.display="none";m("webContentDivTitle"+s).innerHTML=da(c.f());var g=[];g.push(d&&d.match(/^image/g)?'<img src="':'<iframe src="');g.push(Sc(c.ab()));
g.push('" width="',c.bc(),'" height="',c.Yc(),'"',' style="border:0">');m("webContentDivBody"+s).innerHTML=g.join("");var h=b.getElementsByTagName("img")[0],i=X(h),j=i.x,l=i.y+i.h;if(xa){--l;--j}else if(ba){l+=3;j+=8}e.style.left=j+"px";e.style.top=l+"px";e.style.width=c.bc()+"px";e.style.display="";Fa(Wd)}Pa.prototype.hide=function(){if(!O)v.H();this.n.style.display="none";this.j=false;m("datedInput"+s).value=""};Pa.prototype.deactivate=function(a){if(this.j){var b=ca(a);if(X(this.n).contains(b)){return false}else{this.hide();
return true}}else{return true}};var Jb;function Ba(){if(!Jb)Jb=new Pa;return Jb}function re(a){var b=m(a),c=v.Uc(b);Ba().show(c,b)}var za,N=document.location.toString().match(/http:/)?"http":"https";N=N+"://www.google.com/calendar/";function Pb(){var a=aa?"http://www.google.com/calendar/hosted/"+window._pid+"/":N;return a+"event?action=TEMPLATE"}function we(a){if(N.match(/^https/)){a=a.replace("http","https")}return a}function Hd(a,b){var c={},d=D(a);for(var e=d.b();e.a()<=b.a();d.date+=1,e=d.b()){if(Qb(e).length)c[e]=
"font-weight:bold"}return c}function va(a){var b=a.month;if(b<10)b="0"+b;var c=a.date;if(c<10)c="0"+c;return a.year+"-"+b+"-"+c}var Ja,zc,Vd={};function Yd(){if(Ja)return Ja;var a=new Date,b=new Date(a.getFullYear(),a.getMonth(),a.getDate()),c=b.toGMTString(),d=new Date(c.substring(0,c.lastIndexOf(" ")-1)),e=(b-d)/3600000;zc=e;var g=e|0,h=g<0?"-":"+";g=Math.abs(g);g=g<10?"0"+g:""+g;var i=Math.abs(e%1)*60|0;if(i<10)i="0"+i;Ja=h+g+":"+i;Vd[Ja]=zc;return Ja}function Sd(a){var b=va(a),c=a.hour;if(c<10)c=
"0"+c;var d=a.minute;if(d<10)d="0"+d;var e=a.second;if(e<10)e="0"+e;return b+"T"+c+":"+d+":"+e+Yd()}function wc(a){if(a instanceof A)return Sd(a);return va(a)}function pb(a){var b=v.ad()[a.month]+" "+a.date;if(H.year!==a.year){b+=", "+a.year}return b}function qb(a){var b=a.hour,c=a.minute;if(c<10)c="0"+c;var d;if(!bd){d=b<12?"am":"pm";if(b>12){b-=12}else if(b===0){b=12}}else{d=""}return b+":"+c+d};function Rc(a){var b=/^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)\.\d+(\+|-)(\d\d):(\d\d)$/.exec(a);
if(!b){b=/^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)\.\d+Z$/.exec(a)}var c;if(b&&b.length>0){c=new Date;c.setUTCFullYear(b[1],parseInt(b[2],10)-1,b[3]);c.setUTCHours(b[4]);c.setUTCMinutes(b[5]);c.setUTCSeconds(b[6]);var d=0;if(b.length>7){d=parseInt(b[8],10)*60+parseInt(b[9],10);if(b[7]!="-"){d=-d}}c=new Date(c.getTime()+d*60*1000);return new A(c.getFullYear(),c.getMonth()+1,c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds())}b=/^(\d\d\d\d)-(\d\d)-(\d\d)$/.exec(a);if(b&&b.length>0){c=new Date(b[1],
parseInt(b[2],10)-1,b[3]);return t.create(c.getFullYear(),c.getMonth()+1,c.getDate())}return null}function Na(a){return Rc(a)}function Pc(a){return Rc(a)}function jb(a){if(a.length===10)return Pc(a);return Na(a)}var M={start:H,end:H};function Kc(a,b){var c=D(a);c.date-=14;var d=c.b();c.date+=59;var e=c.b();Ma(d,e,b)}function Ma(a,b,c){if(a.a()>=M.start.a()){if(M.end.a()>=b.a())return;a=M.end;M.end=b}else{if(b.a()<=M.end.a()){b=M.start}else{M.end=b}M.start=a}Lc(va(a),va(b),c)}function Va(a){if("allday"in
a)return a.allday;var b=a.q().length==10;return a.allday=b}var wa=new f.client.GoogleService("cl","google.com-ig"),Ud=0;if(La){var tc={};window._callbackMap=tc;window._callbackFn=function(a,b){var c=window._callbackMap[b];c.call(null,a)};wa.Ga=function(a,b,c){var d=++Ud;tc[d]=function(h){var i=new b;i.init(h.feed);c.call(null,i)};var e=a.indexOf("?")<0?"?":"&";a+=e+"alt=json-in-script&reqid="+d+"&callback=_callbackFn";var g=document.createElement("script");g.src=a;document.body.appendChild(g)}}wa.vd(function(a){});
function Rb(a){if(a.Ya){return a.Ya().Vb()}else{return a.feedUrl}}function Dc(a){return a.Ya().Vb()}function Lc(a,b,c,d){var e=d?[{feedUrl:d}]:$;for(var g=0;g<e.length;++g){var h=e[g],i=Rb(h);if(!(i in J))continue;var j=i.indexOf("?")<0?"?":"&",l=i+j+"singleevents=true&start-min="+a+"&start-max="+b+"&max-results=4000";l=we(l);if(aa)l=Id(l);var n=Ha[i],q=Kd(n,c);wa.Ga(l,f.data.calendar.CalendarEventFeed,q)}}var Gb=null;function Id(a){if(Gb==null){var b=window.location;Gb=b.protocol+"//"+b.host+"/"+
window._pid+"/default/calproxy?url=http%3A%2F%2Fwww.google.com%2Fcalendar"}a=a.substring("http://www.google.com/calendar".length);return Gb+encodeURIComponent(a)+"&et="+window._et}function Kd(a,b){return function(c){c.color=a;var d=c.ma().link,e={color:a};for(var g=0;g<d.length;++g){if(d[g].rel=="http://schemas.google.com/g/2005#feed"){e.url=d[g].href;if(ma&&Vc){var h=Ac[e.url];if(h.f()===null){var i=c.ma().title.$t;h.O(i);var j=m("subscribe"+s),l=j.innerHTML;l+='<a style="color:'+a+'" target="_BLANK" href="http://www.google.com/calendar/render?cid='+
e.url+'">Subscribe to '+da(h.f())+" calendar</a><br>";j.innerHTML=l;j.style.display=""}}}}Jc(c.Za(),e);if(b)b.call(null)}}var fd=f.data.extensions.EventEntry.EventStatus.CANCELED;function Jc(a,b){var c=false,d=v.Ha(),e=v.Ia();for(var g=0;g<a.length;++g){var h=a[g];h.owner=b;var i=h.ed();if(i==fd)continue;var j=ba&&!ma;if(j){var l=h.ma()["gd$when"].starttime;h.q=function(){return l};var n=h.ma()["gd$when"].endtime;h.K=function(){return n}}var q=h.q(),u=h.K();if(!q)continue;var o=jb(q),w,r;if(Va(h)){w=
Pc(u).a()}else{u=Na(u);r=D(u.b());if(u.hour||u.minute||u.second){r.date+=1}w=r.b().a()}r=D(o);for(var p=r.b();p.a()<w;r.date+=1,p=r.b()){var y;if(p in $a){y=$a[p]}else{y={};$a[p]=y}var B=h.la();if(!(B in y)){y[B]=h;if(!c){c=p.a()>=d.a()&&p.a()<=e.a()}}}}if(c)v.v()}function ie(){window.open(Pb(),"_BLANK")}var Bc={"#A32929":["#D96666","#CC3333"],"#B1365F":["#E67399","#DD4477"],"#7A367A":["#B373B3","#994499"],"#5229A3":["#8C66D9","#6633CC"],"#29527A":["#668CB3","#336699"],"#2952A3":["#668CD9","#3366CC"],
"#1B887A":["#59BFB3","#22AA99"],"#28754E":["#65AD89","#329262"],"#0D7813":["#4CB052","#109618"],"#528800":["#8CBF40","#66AA00"],"#88880E":["#BFBF4D","#AAAA11"],"#AB8B00":["#E0C240","#D6AE00"],"#BE6D00":["#F2A640","#EE8800"],"#B1440E":["#E6804D","#DD5511"],"#865A5A":["#BE9494","#A87070"],"#705770":["#A992A9","#8C6D8C"],"#4E5D6C":["#8997A5","#627487"],"#5A6986":["#94A2BE","#7083A8"],"#4A716C":["#85AAA5","#5C8D87"],"#6E6E41":["#A7A77D","#898951"],"#8D6F47":["#C4A883","#B08B59"]},$=[];function oa(){var a=
document.createElement("DIV");document.body.appendChild(a);a.style.display="none";a.style.position="absolute";a.style.backgroundColor="white";a.style.fontSize="83%";a.style.border="1px solid gray";a.style.width="150px";this.n=a;this.j=false}oa.prototype.show=function(){var a="calListForm"+s,b=["<FORM id=",a,'><table style="font-size:92%;border:0">'];b.push('<tr><td colspan="2">My Calendars</td></tr>');var c=[];this.Lc={};var d=" onmouseover=\"this.style.textDecoration='underline'\" onmouseout=\"this.style.textDecoration='none'\"";
for(var e=0;e<$.length;++e){if(e===Ob){b.push('<tr><td colspan="2">Other Calendars</td></tr>')}var g=$[e],h=Rb(g),i=h in J?"CHECKED":"";c.push(h);var j=g.Fa();if(j in Bc){j=Bc[j][Y[g.$()]<Y.read?0:1]}var l=g.f();l=da(l.replace(/([\W_])([^\W_])/g,"$1\u00ad$2")).replace(/\255/g,"<WBR>");var n="cid"+s+"Temp"+e;b.push('<tr><td style="vertical-align:top">',"<input type=CHECKBOX ",i," id=",n,"></td>",'<td style="width:100%; padding-right: 4px">','<div class="t2" style="background-color:',j,'">&nbsp;</div>');
b.push('<div class=calChip style="cursor:pointer;background-color:',j,'; font-family:Verdana; font-size:93%; padding:2px">','<label style="cursor:pointer" for=',n,d,">",l,"</label></div>");b.push('<div class="t2" style="background-color:',j,'">&nbsp;</div></td></tr>')}b.push("</table>");this.n.innerHTML=b.join("");var q=m(a),u=q.elements;for(var e=0;e<u.length;++e){var o=u[e];o.onchange=le(c[e])}var w=Tb(m(Za)),r=this.n,p=w.y+14+2,y=w.x+15-150;if(ba){p+=3;y+=6}else if(xa){--y}else if(na){y-=2}r.style.top=
p+"px";r.style.left=y+"px";r.style.display="";this.j=true;Fa(this)};oa.prototype.Nd=function(){return this.Lc};function le(a){return function(){Gd(a)}}function Ub(){ya(R);v.v()}function Tc(){var a=[];for(var b in J){a.push(Eb(b)+":1")}E.set("calendarFeeds","({"+a.join()+"})")}function Gd(a){var b=null;if(a in J){delete J[a]}else{J[a]=1;b=a}Tc();Lc(va(M.start),va(M.end),Ub,b);Ub()}oa.prototype.hide=function(){this.n.style.display="none";this.j=false};oa.prototype.ba=function(){return this.j};oa.prototype.deactivate=
function(a){if(this.j){var b=ca(a);if(X(this.n).contains(b)||X(m(Za)).contains(b)){return false}else{this.hide();return true}}else{return true}};var Kb;function nd(){if(!Kb)Kb=new oa;return Kb}var Y={owner:0,editor:1,read:2},Ha={},Ac={},Ob=0,la=undefined;function qe(a){var b=a.Za(),c=E.getString("calendarFeedsImported");c=c!="0";var d;for(var e=0;e<b.length;++e){var g=b[e],h=Rb(g);if(g.Ub()||g.$()=="freebusy"){c[h]=0;continue}Ha[h]=g.Fa();var i=Y[g.$()];if(i<Y.editor){++Ob}if(!la&&i==Y.owner&&!h.match(/calendar\.google\.com\/private\/full$/)){la=
h;d=g}else{$.push(g)}if(!c){if(g.Yb())J[h]=1}}var j=false;for(var l in J){j=true;break}if(!j&&la){J[la]=1;j=true}if(!c){E.set("calendarFeedsImported","1");Tc()}$.sort(Nd);if(d)$.unshift(d);if(j){var n=v.Ha(),q=v.Ia();Ma(n,q,Hb)}else{Hb()}}function Nd(a,b){var c=Y[a.$()]-Y[b.$()];if(c)return c;return uc(a,b)}function uc(a,b){if(String.prototype.od){return a.f().od(b.f())}else{var c=a.f().toLowerCase(),d=b.f().toLowerCase();return c<d?-1:(c==d?0:1)}}function vc(){wa.oc(za);var a=N+"feeds/default";if(aa){a=
N+"feeds/default/private/full";var b="#316AC5",c=new oc(a,b);Ha[a]=b;$.push(c);la=a;J={};J[a]=1;Ob=1;var d=v.Ha(),e=v.Ia();Ma(d,e,Hb)}else if(!bb){var g;try{g=m("guser").getElementsByTagName("b")[0].innerHTML}catch(h){}if(g)a=N+"feeds/"+g+"/"}wa.Ga(a,f.data.calendar.CalendarFeed,qe)}function Hb(){me();ya();var a=m("createEventLinks"+s);if(!Oa){a.style.marginTop="1ex"}Uc();m(Za).src=N+"images/btn_menu6.gif";if(!bb)a.style.display=""}var lb=null;function Ec(a){if(lb){a(lb);return}var b="GoogleCalendarFrame"+
s;if(ba){var c=document.getElementsByTagName("IFRAME");for(var d=0;d<c.length;++d){var e=c[d];if(e.name==b){e.style.display="block";break}}}setTimeout(function(){lb=frames[b];a(lb)},0)}function Od(a){try{var b=a.document,c=b.cookie.split(/;?\s/);for(var d=0;d<c.length;++d){var e=c[d];if(e.match(/^CAL=/)){a.location="about:blank";za=e.substring(4);setTimeout(vc,0);return}}}catch(g){}}var Oc=0;function $c(){if(za)return;if(Oc>40){Nc();return}try{Ec(Od)}finally{if(!za){++Oc;setTimeout($c,100)}}}var Fb=
"agenda"+s;function Nc(){if(W){var a=m(Fb);a.innerHTML='<center>      <a href="'+Pb()+'" id="createEvent"        target="_BLANK" style="color:rgb(0,0,204); font-size: 72%"        title="Opens the Create Event form in Google Calendar in a new window"      >Add Event</a></center>';a.style.display="";v.rc(3);v.ub(0)}if(O)E.set("showAgenda","false");v.pc(null)}function me(a){var b;if(!a){b=H}else{var c=v.Zb()||R,d=D(c);d.date+=a;b=d.b()}v.sa(b);v.ta(b)}function $d(a){if(!(za||W&&aa)&&!ma)return;if(!a.startDate)return;
ya(a.startDate)}function ae(){if(!za&&!ma)return;var a=v.Wc();Kc(a);var b=D(a),c=a.a()<H.a()?-1:1;b.month+=c;var d=b.b();Kc(d)}var Ib=false;function ce(){if(!O)return false;if(!Ib){var a=m(Fb);a.style.paddingTop="1ex";a.style.display="";Ib=true}return true}var R;function ya(a){R=a||H;if(!ce())return;var b=Oa?4:8;try{var c=E.getString("min");c=parseInt(c,10);if(c>0&&c<50){b=c}}catch(d){}var e=0,g=366,h=0,i=[],j=D(R),l=true,n=['<table cellspacing="1" style="width:100%">'];n.push('<tr><td width=0><td width="50%"><td width="25%"><td width="25%">');
var q=qc(R,n);while(e<b&&h<g){var u=j.b();if(u.a()>M.end.a()){var o=u;j.date+=366;var w=j.b();setTimeout(function(){Ma(o,w,Ub)},0);break}i.push(u);var r=i.length;Qb(u,i);var p=i.length-r;e+=p;if(l){l=false;if(p==0){n.push("<tr><td colspan=4 align=center>","<I class=eventChip>No events on the ",R.date,Cc(R.date),".</I>")}}else if(p==0){i.pop()}j.date+=1;++h}var y=R;for(var B=1;B<i.length;++B){var Q=i[B];if(Q instanceof t){y=Q;q=qc(y,n,q)}else{pc(y,Q,n)}}if(!Oa){n.push("<tr><td colspan=4 class=agendaLine>&nbsp;")}n.push("</table>");
m("agendaTable"+s).innerHTML=n.join("")}var ja={},Lb,Nb,Mb;new function(){ja[H.a()]=["Today",0];var a=D(H);a.date-=1;ja[a.b().a()]=["Yesterday",-1];a.date+=2;ja[a.b().a()]=["Tomorrow",1];var b=H,c=Ca(b);Lb=(14-c+ia)%7||7;a.date-=1;a.month+=1;Nb=a.b();a.month-=2;Mb=a.b()};function qc(a,b,c){var d,e=a.a(),g,h;if(e in ja){var i=ja[e];d=i[0];h=i[1]}else{g=sb(a,H);var j=g>0,l=j?Lb:8-Lb,n=Math.abs(g);if(n<l){h=g;if(j){d="In "+n+" days"}else{d=n+" days ago"}}else if(n<l+7){if(j){h=7;d="Next week"}else{h=
-7;d="Last week"}}else if(a.year===H.year&&a.month===H.month){if(n<l+14){h=14;d=j?"In two weeks":"Two weeks ago"}else if(n<l+21){h=21;d=j?"In three weeks":"Three weeks ago"}else if(n<l+28){d=j?"In four weeks":"Four weeks ago";h=28}else{d=j?"In five weeks":"Five weeks ago";h=35}if(!j)h*=-1}else if(a.year===Nb.year&&a.month===Nb.month){h=50;d="Next month"}else if(a.year===Mb.year&&a.month===Mb.month){h=-50;d="Last month"}else{d=Qa[a.month]+" "+a.year;h=a.year*100+a.month}}if(!(e in ja)){ja[e]=[d,h]}if(h===
c)d=undefined;if(!d)d="&nbsp;";b.push("<tr><td colspan=4 class=agendaLine>&nbsp;");b.push('<tr><td colspan=2 class="dateDescription eventCell">',d,"<td class=eventCell colspan=2 ",'style="text-align:right"><b>',je(a),"</b>");return h}function je(a){var b=Ca(a);return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][b]+", "+pb(a)}function bc(a){var b=-1;try{b=a.status}catch(c){}return b}var Mc="msgtable"+s;function Ya(a){m("msgarea"+s).innerHTML=a;m(Mc).style.display="";Fa({deactivate:Ld})}function Ld(a){var b=
ca(a);if(X(m("msgarea"+s)).contains(b)){return false}else{pd();return true}}function pd(){m(Mc).style.display="none";return true};function id(a,b,c){return function(){if(a.readyState!=4)return;if(200===bc(a)){var d=md(a);if(d==null){Ya("Quick Add could not understand: "+b)}else{dd(d,c)}}else{Ya("Calendar did not respond -- please try again later.")}}}function _QuickAdd(a,b){var c=N+"compose",d=a.quickadd.value,e="ctext="+encodeURIComponent(d),g=f.util.Utils.getHttpRequest();g.onreadystatechange=id(g,
d,b);g.open("POST",c,true);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.setRequestHeader("Content-Length",e.length);g.send(e);if(Ba())Ba().hide()}function Ad(a){var b=undefined;if(a.date)b=a.date.value;_QuickAdd(a,b);if(b)Ba().hide()}function be(a,b){var c=a.start,d=a.end,e,g;if(d&&d.indexOf("?")<0){var h=[c,d],i=h[0].match(/(.*)T([^\?].*)/),j=h[1].match(/(.*)T([^\?].*)/);if(i)e=T(h[0]);if(j)g=T(h[1]);if(e){var l=g&&(g.hour>e.hour||g.hour===e.hour&&g.minute>=e.minute),
n=b;e=n+"T"+i[2];if(l){g=n+"T"+j[2]}else{g=D(T(e));g.hour+=1;g=g.B().toString()}}}else{var i=c.match(/(.*)T([^\?].*)/);if(i){e=b+"T"+i[2];g=D(T(e));g.hour+=1;g=g.B().toString()}}if(e)return{start:e,end:g};var q=D(T(b));q.date+=1;return{start:b,end:q.b().toString()}}function dd(a,b){var c;if(b){c=be(a,b)}else{c=yd(a.summary,a.start,a.end)}if(!c){Ya("QuickAdd could not determine the details of your event.");return}var d=new f.data.calendar.CalendarEventEntry,e=new f.data.extensions.When;e.Bd(wc(T(c.start)));
e.ud(wc(T(c.end)));d.Gc(e);d.O(Ga(a.summary));var g=N+"feeds/default/private/full";wa.insert(g,d,Md)}function Md(a){var b=jb(a.hd()[0].q()),c='<a href="'+Dc(a)+'" target="_BLANK">'+da(a.f()||"(No Subject)")+"</a>",d="Added <b>"+c+"</b> on "+pb(b);if(b instanceof A){d+=" at "+qb(b)}Ya(d);var e={color:Ha[la],url:la};Jc([a],e);ya(b.b())}m("createEvent"+s).onclick=function(){ie();return false};m("open-quick-add"+s).onmousedown=function(){ud();var a="quickAddForm"+s;m(a).onsubmit=function(){_QuickAdd(m(a));
hd();return false};Db("quickadd"+s);return false};m("agendaCloseBox"+s).onmousedown=function(){Ba().hide()};m("webContentDivCloseBox"+s).onmousedown=function(){m("webContentDiv"+s).style.display="none"};ib(document.body,"mousedown",function(a){if(!a)a=window.event;var b=a.target||a.srcElement,c=Hc(b);if(c)te(c)});m(ab).onsubmit=function(){Ad(m(ab));return false};var Zc="toggleA"+s,Za="calListPopup"+s;m(Za).onclick=function(){var a=nd();if(a.ba()){a.hide()}else{a.show()}};function pe(){O=!O;E.set("showAgenda",
""+O);if(O){Ib=false;ya(v.Zb()||R)}else{m(Fb).style.display="none"}Uc()}function Uc(){var a=O?"Hide Agenda":"Show Agenda";m(Zc).innerHTML=a}m(Zc).onclick=pe;function oc(a,b){this.title=null;this.Fa=function(){return b};this.$=function(){return Y.read};this.feedUrl=a;this.f=function(){return this.title};this.Yb=function(){return true};this.Ub=function(){return false};this.O=function(c){this.title=c}}var fb,Td={black:1,silver:1,gray:1,white:1,maroon:1,red:1,purple:1,fuchsia:1,green:1,lime:1,olive:1,
yellow:1,navy:1,blue:1,teal:1,aqua:1,orange:1,cyan:1};function de(a){if(!a)return false;a=Ga(a).toLowerCase();if(a.match(/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/))return true;if(a.match(/^#[0-9A-F]{3,6}$/i))return true;return a in Td}if(aa){var ue="m_"+s+"_url",Yc=m(ue),Qc=window._pid;Yc.innerHTML="Calendar";Yc.href="http://www.google.com/calendar/hosted/"+Qc+"/";m("createEventLinks"+s).href="http://www.google.com/calendar/hosted/"+Qc+"/event?action=TEMPLATE";m("open-quick-add"+s).style.display="none";
m("createEvent"+s).href=Pb();m("calListPopup"+s).style.display="none";if(W)vc()}else if(hb||bb){Ec(function(a){a.location=N+"hello";$c()})}else if(ma){var ua,eb={},Fc=true;for(var gb=0;gb<4;++gb){var db=E.getString("c"+gb+"u"),sc=db.match(/(.*\/)basic/);if(sc){db=sc[1]+"full"}if(db){ua=E.getString("c"+gb+"c");if(!de(ua)){ua="rgb(17,42,187)"}eb[db]=ua;Fc=false}}if(Fc)O=false;J=eb;for(var cb in eb){ua=eb[cb];var Vb=new oc(cb,ua);Ha[cb]=Vb.Fa();Ac[cb]=Vb;$.push(Vb)}var Wc=E.getString("start");if(Wc){var kb=
Wc.match(/^\s*(\d{4})-(\d{1,2})-(\d{1,2})\s*$/);if(kb){fb=t.create(kb[1],parseInt(kb[2],10),parseInt(kb[3],10));v.sa(fb);v.ta(fb)}}var Pd=v.Ha(),he=v.Ia();Ma(Pd,he,function(){ya(fb)})}else{Nc()};

}
//------------------------------------------------------------------fim da função calendário -------------------------

//-----------------rotina para esconder quando coloca show image na tela-----------------------
function hidebox(){
if (document.all)
showimage.style.visibility="hidden"
else if (document.layers)
document.showimage.visibility="hide"
}
//----------------------fim da rotina de esconder imagem------------------
//----------------colocar botao de favotito------
var bookmarkurl="http://www.portalguaratiba.com"
var bookmarktitle="portalguaratiba"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

//   <!-- Passo 2 - Cole este código entre o <BODY></BODY> da página.
//  <!--
//  <a href="javascript:addbookmark()">Clique aqui para colocar este site aos seus favoritos!</a>

//-----------------------------------roina para apresentação de janela -------------------->

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//-->
//--------------linha a ser colocada para link---------------------------------------------------------->
//----<a href="FIGURA OU TEXTO" onclick="NewWindow(this.href,'name','400','400','no');return false;">
//----------------------------------------------------------------------------------------------------->
//-------------------fim da rotina de apresentação de janela------------------------->


//------------------rotinas necessarias ao formulario de fale conosco----------------------------->

function getCookie(name){
var cname = name + "=";               
var dc = document.cookie;             
if (dc.length > 0) {              
begin = dc.indexOf(cname);       
if (begin != -1) {           
begin += cname.length;       
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
} 
}
return null;
}
function setCookie(name, value) {
var now = new Date();
var then = new Date(now.getTime() + 31536000000);
document.cookie = name + "=" + escape(value) + "; expires=" + then.toGMTString() + "; path=/";
}
function getInfo(form) {
form.info.value = "Browser Information: " + navigator.userAgent;
}
function getValue(element) {
var value = getCookie(element.name);
if (value != null) element.value = value;
}
function setValue(element) {
setCookie(element.name, element.value);
}
function fixElement(element, message) {
alert(message);
element.focus();
}
function isMailReady(form) {
var passed = false;
if (form.fullname.value == "") {
fixElement(form.fullname, "coloque seu nome.");
}
else if (form.email.value.indexOf("@") == -1 ||
form.email.value.indexOf(".") == -1) {
fixElement(form.email, "coloque um e-mail válido.");
}
else if (form.message.value == "") {
fixElement(form.message, "coloque uma mensagem.");
}
else {
getInfo(form);
passed = true;
}
return passed;
}
// End -->
//----------------------------------------------------final da rotina de formulario---------------------------
//--------------------------------------------rotina usada na agenda de telefone-----------------------------
 
    function seleccionar(){	  
//		document.selecao.codigo.select();    
		return true;
    }
//--------------------------------------------------instrução de uso-------------------------------------
// --colocar na tag BODY o comando --     <body onload="seleccionar(); return true" >
//--------------------------------------------fim da rotina usada na agenda de telefone-----------------------------

//--------------------------------------rotina usada na inserção do telefone------------------------------

function valid(f) {
if (!/^\d*$/.test(f.value)) {
alert("Somente Números são permitidos !");
f.value = f.value.replace(/[^\d]/g,"");
}
} 

//----------------------------------------------------fim da rotina de inserção telefone------------------------------

