/*
* Copyright 2006 Google, Inc.
* All Rights Reserved.
*/


var Oa="action";
var Ye="details";
var mb="dates";
var Yb="rstart";
var Kb="recur";
var Ze="location";
var Ig="user_prefs";
var Lb="event";
var wd="editcallist";
var qi="caldetails";
var Fl="addcalendarfromurl";
var gh="goo.distributeNotifications";
var Bf="EventReminderAdvanceNotice";
var $i="HowCreated";
var xc="INVITE";
var Cd="REQUEST";
var me="CREATE";
var Oi="myresponse";
var zj="formatDateBeforeMonth";
var Hc="dtFldOrdr";
var Sb="format24HourTime";
var jb="firstDay";
var fd="weekView5";
var oh="defaultCalMode";
var Je=
"customCalMode";
var ph="hideInvitations";
var Rd="showDeclined";
var Ke="smsPhoneNumber";
var Aj="smsCarrier";
var qh="smsVerificationCode";
var ed="false";
var nh="custom,4";
var Ln="America/Los_Angeles";

var qd=["day","week","month","list","compact","custom","search"];

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;
var 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 Ma;
var Ic;
(function()
{
var a=
{

}
;
var b=0;
function c(f)
{
if(!f.ke)
{
f.ke=++b
}
return f.ke
}

function d(f,g,h,i)
{
var j=c(f);
var k=c(h);
i=!(!i);
var l=j+"_"+g+"_"+k+"_"+i;
return l
}

Ma=function(f,g,h,i)
{
var j=d(f,g,h,i);
if(j in a)
{
return j
}
var k=e.bind(null,j);
a[j]=
{
listener:h,proxy:k
}
;
if(f.addEventListener)
{
f.addEventListener(g,k,i)
}
else if(f.attachEvent)
{
f.attachEvent("on"+g,k)
}
else
{
throw new Error("Node
{
"+f+"
}
does not support event listeners.");

}
return j
}

;
Ic=function(f,g,h,i)
{
var j=d(f,g,h,i);
if(!(j in a))
{
return false
}
var k=a[j].proxy;
if(f.removeEventListener)
{
f.removeEventListener(g,k,i)
}
else if(f.detachEvent)
{
f.detachEvent("on"+g,k)
}
delete a[j];
return true
}

;
function e(f)
{
var g=Array.prototype.splice.call(arguments,1,arguments.length);
return a[f].listener.apply(null,g)
}


}

)();

var Ui="more details";
var Ri="edit event details";
var Xi="Created By:";
var Am="Please specify a start and end date";
var Zg="&nbsp;
&nbsp;
&nbsp;
Yes&nbsp;
&nbsp;
&nbsp;
";
var Vi="&nbsp;
&nbsp;
&nbsp;
No&nbsp;
&nbsp;
&nbsp;
";
var ac="Cancel";
var Wi="&nbsp;
&nbsp;
&nbsp;
OK&nbsp;
&nbsp;
&nbsp;
";
var Qi="Search public calendars";
var Cm="e.g., Breakfast at Tiffany's";
var Gm="Showing events until";
var rm="Your changes have not been saved.";
var Pi="&laquo;
Edit";
var om="Calendar Time Zone:";
function ue(a)
{
return"Next "+
a+" Days"
}

function Yi(a)
{
return"Next "+a+" Weeks"
}

;
var pm="Share this calendar";
function qm(a)
{
return""+a+" Details"
}

;
var Ti="Calendar View Event";
var Wg="Learn more";
var Em="All Other Calendars";
var Yg="Invalid search - Please enter a query.";
var Fm="Invalid search - Please specify at least one calendar to search.";
var Xg="Loading...";
var Dm="remove this person from the guest list";
var Vg="Your Event";
var sm="Failed to create event";
var um="Failed to load event";
var vm="Failed to respond to event";
var tm="Failed to load details for calendars";
var wm="Failed to save changes";
var Si="Failed to remove calendar";
var Ug=
"Edit Recurring Event";
var Tg="Would you like to change only this instance of the event, or all events in this series?";
var zm="Would you like to change only this event, all events in the series, or this and all future events in the series?";
var re="All events in the series";
var se="Only this instance";
var xm="All events in the series";
var ym="Only this instance";

var qg=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
var Fk=["Su","M","Tu","W","Th","F","Sa"];
var Qc=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
var ic=[,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
var xd=[,"January","February","March","April","May","June","July","August","September","October","November","December"];
var Bm=[,"first","second","third"];
function Fb(a,b)
{
if(1==a.length)
{
return Qc[a[0]]
}
var c=0;
for(var d=0;
d<a.length;
++d)
{
c|=1<<a[
d]
}
switch(c)
{
case 127:return b?"all days":"day";
case 62:return b?"weekdays":"weekday";
default:break
}
var e=[];
for(var d=0;
d<a.length;
++d)
{
if(d)
{
e.push(d+1!=a.length?", ":" & ")
}
e.push((b?["Sundays","Mondays","Tuesdays","Wednesdays","Thursdays","Fridays","Saturdays"]:Qc)[a[d]])
}
return e.join("")
}

function Fd(a)
{
var b=[];
for(var c=0;
c<a.length;
++c)
{
if(c)
{
b.push(c+1!=a.length?", ":" & ")
}
b.push(xd[a[c]])
}
return b.join("")
}

function zc(a)
{
return Bm[a]||a+Zi(a)
}

function te(a)
{
var b=[];
for(var c=0;
c<a.length;
++c)
{
if(c)
{
b.push(c+1!=a.length?", ":" & ")
}
var d=a[c];
b.push(Bm[d]||d+Zi(d))
}
return b.join("")
}

;

function Ja(a,b,c)
{
this.x=a;
this.y=b;
this.coordinateFrame=c
}

Ja.prototype.toString=function()
{
return"[P "+this.x+","+this.y+"]"
}

;
Ja.prototype.clone=function()
{
return new Ja(this.x,this.y,this.coordinateFrame)
}

;
function je(a,b)
{
this.dx=a;
this.dy=b
}

je.prototype.toString=function()
{
return"[D "+this.dx+","+this.dy+"]"
}

;
function tb(a,b,c,d,e)
{
this.x=a;
this.y=b;
this.w=c;
this.h=d;
this.coordinateFrame=e
}

tb.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
}

;
tb.prototype.toString=function()
{
return"[R "+this.w+"x"+this.h+"+"+this.x+"+"+this.y+"]"
}

;
tb.prototype.clone=function()
{
return new tb(this.x,this.y,this.w,this.h,this.coordinateFrame)
}

;

var ag=[];
var $d=
{

}
;
var Yd=
{

}
;
var Sj=true;
function ab()
{
ag.push(new Date())
}

function Va(a)
{
ld(a);
ag.pop()
}

function ld(a)
{
a=a.replace(/\W/g,"_");
var b=new Date();
var c=ag.length-1;
var d=b-ag[c];
ag[c]=b;
var e;
if(!(a in $d))
{
e=[];
$d[a]=e
}
else
{
e=$d[a]
}
e.push(d);
Sj=false;
if(!(a in Yd))
{
e=[];
Yd[a]=e
}
else
{
e=Yd[a]
}
e.push(d)
}

function _LogExplicit(a,b)
{
$d[a]=[b];
Yd[a]=[b]
}

function Lt()
{
$d=
{

}
;
Sj=true
}

function Xt()
{
var a=[];
for(var b in $d)
{
a.push(b+":"+$d[b].join("#"))
}
return a.join(":")
}

function Kt(a)
{
if(arguments.length==0||a==1)
{
Yd=
{

}

}

}

function _ShowPerf()
{
var a=['<font size="-1">'];
a.push("Most recent measurements appear at the end of the list, followed by the total time for that measurement.<br>");
a.push("<ul>");
for(var b in Yd)
{
var c=Yd[b];
var d=0;
for(var e=0;
e<c.length;
++e)d+=c[e];
if(d==0)continue;
a.push("<li>",b,": ",c.join(",")," <b>",d,"</b>");
c=[].concat(c).sort(function(g,h)
{
return g-h
}

);
if(c.length>=3)
{
var f=(c.length+1)/2-1;
c[Math.floor(f)]='<font color="red">'+c[Math.floor(f)];
c[Math.ceil(f)]+="</font>"
}
a.push("<li><i>sorted:</i> ",c,"<p>")
}
a.push("</ul>");
a.push("</font>");
Xa(Kt,"<h3>Performance Data</h3>",a.join(""),[F("Continue"),F("Delete Performance Data")])
}

function Zi(a)
{
var b=Math.abs(a)%100;
if(b>10&&b<20)
{
return"th"
}
else
{
switch(b%10)
{
case 1:return"st";
case 2:return"nd";
case 3:return"rd";
default:return"th"
}

}

}

function uh(a)
{
var b=[];
if(a)
{
for(var c=Math.ceil(a+31>>5);
--c>=0;
)
{
b[c]=0
}

}
return b
}

function Ne(a,b)
{
var c=b>>>5;
while(c>=a.length)
{
a[a.length]=0
}
a[c]|=1<<(b&31)
}

function th(a,b)
{
var c=b>>>5;
if(c<a.length)
{
a[c]&=~(1<<(b&31))
}

}

function Ft(a)
{
for(var b=a.length;
--b>=0;
)
{
a[b]=0
}

}

function $n(a,b)
{
var c=b>>>5;
if(c>=a.length)
{
return b
}
var d=b&31;
do
{
var e=~(a[c]>>>d)&4294967295;
if(e)
{
return(c<<5)+d+Jo(e)
}
d=0
}
while((c+=1)<a.length);
return a.length<<5
}

function Fj(a,b)
{
var c=b>>>5;
var d=b&31;
while(c<a.length)
{
var e=a[c]>>>d;
if(e)
{
return(c<<5)+d+Jo(e)
}
d=0;
c+=1
}
return-1
}

var eg=[];
(function()
{
var a=[];
a[0]=-1;
for(var b=0;
b<8;
b++)
{
var c=1<<b;
for(var d=c;
d<256;
d+=c)
{
a[d]=b
}

}
eg=a
}

)();
function Jo(a)
{
return a&255?eg[a&255]:(a&65280?8+eg[a>>8&255]:(a&16711680?16+eg[a>>16&255]:(a&4278190080?24+eg[a>>24&255]:-1)))
}

;
function oa(a)
{
return function()
{

}


}

function qv(a,b)
{
var c=[];
for(var d=0;
d<a.length;
++d)
{
var e=a[d];
if(b(e))
{
c.push(e)
}

}
return c
}

function Vf(a,b)
{
var c=
{

}
;
for(var d=0;
d<b.length;
++d)
{
c[b[d]]=true
}
var e=[];
for(var d=0;
d<a.length;
++d)
{
if(!c[a[d]])
{
e.push(a[d])
}

}
return e
}

function Zn(a,b)
{
return a.concat(Vf(b,a))
}

function Et(a,b)
{
for(var c=0;
c<a.length;
++c)
{
if(a[c]===b)
{
return true
}

}
return false
}

function xa(a,b)
{
return function(c)
{
var d=true;
var e=zd(c);
if(e!==200&&e!==204)
{
if(!yi("CAL"))
{
alert("Sorry, you have been logged out [probably in another window]. Please log in again.");
window.location.href="http://www.google.com/calendar/logout";
return false
}
ob(a);
d=false
}
if(b)
{
if(false===b(c))
{
d=false
}

}
return d
}


}

;

function G(a)
{
var b=a.ownerDocument;
if(Ba&&b)
{
var c=b.getBoxObjectFor(a);
return new tb(c.x,c.y,c.width,c.height,window)
}
var d=0;
var e=0;
for(var f=a;
f.offsetParent;
f=f.offsetParent)
{
d+=f.offsetLeft;
e+=f.offsetTop
}
return new tb(d,e,a.offsetWidth,a.offsetHeight,window)
}

function dg(a)
{
var b=a.ownerDocument;
if(Ba&&b)
{
var c=b.getBoxObjectFor(a);
return c.height
}
else
{
return a.offsetHeight
}

}

function Ko(a)
{
var b=a.ownerDocument;
if(Ba&&b)
{
var c=b.getBoxObjectFor(a);
return c.width
}
else
{
return a.offsetWidth
}

}

function ra(a)
{
var b=a.ownerDocument;
if(Ba&&b)
{
var c=b.getBoxObjectFor(a);
return new Ja(c.x,c.y,window)
}
var d=0;
var e=0;
while(a.offsetParent)
{
d+=a.offsetLeft;
e+=a.offsetTop;
a=a.offsetParent
}
return new Ja(d,e,window)
}

function ii(a,b)
{
var c=a.x-b.x;
var d=a.y-b.y;
return Math.sqrt(c*c+d*d)
}

function na(a)
{
var b=0;
var 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 Ja(b,c,window)
}

;

var On=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","MICROSOFT.XMLHTTP.1.0","MICROSOFT.XMLHTTP.1","MICROSOFT.XMLHTTP"];
var Rh=undefined;
function xt()
{
if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined")
{
for(var a=0;
a<On.length;
a++)
{
var b=On[a];
try
{
new ActiveXObject(b);
Rh=b;
break
}
catch(c)
{

}

}
if(undefined===Rh)
{
throw"Could not create ActiveXObject. ActiveX might be disabled, or msxml might not be installed";

}

}

}

xt();
function Pn()
{
if(Rh!==undefined)
{
return new ActiveXObject(Rh)
}
else
{
return new XMLHttpRequest()
}

}

function wt(a,b,c)
{
a.onreadystatechange=c;
a.open("GET",b,true);
Rn(a,null)
}

function Qn(a,b,c,d)
{
a.onreadystatechange=d;
a.open("POST",b,true);
a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
a.setRequestHeader("Content-Length",c.length);
Rn(a,c)
}

function Rn(a,b)
{
try
{
a.send(b)
}
catch(c)
{
S("XMLHttpSend failed "+c.toString()+"<br>"+c.stack);
throw c;

}

}

;

var vo=0;
if("undefined"==typeof S)
{
S=function()
{

}


}
function zd(a)
{
var b=-1;
try
{
b=a.status
}
catch(c)
{

}
return b
}

function fr(a)
{
var b=null;
try
{
b=a.statusText
}
catch(c)
{

}
return b
}

function Sl(a,b,c,d)
{
if(a.readyState==4)
{
var e=true;
if(d)
{
try
{
e=!(false===d(a))
}
catch(f)
{
S("Message ("+b+") handling failed: "+f);
throw f;

}

}
var g=zd(a);
if(200===g)
{
S("Message ("+b+") received after "+((new Date()).getTime()-c)+" ms");
try
{
var h=(new Date()).getTime();
if(e&&a.responseText.length)
{
var i=eval(a.responseText);
if(i instanceof Array&&i.length)
{
Cg(i)
}

}
S("Message ("+b+") processing took "+((new Date()).getTime()-h)+" ms")
}
catch(f)
{
S("Message ("+b+") processing failed: "+f);
alert(f+"\n"+f.stack+
"\n\n"+a.responseText);
throw f;

}

}
else if(204==g)
{
S("Message ("+b+") received after "+((new Date()).getTime()-c)+" ms")
}
else
{
S("Message ("+b+") failed with response "+g+" "+fr(a)+" after "+((new Date()).getTime()-c)+" ms.")
}

}

}

function wc(a,b,c,d)
{
var e="";
if(b)
{
var f="";
for(var g=0;
g<b.length;
)
{
var h=b[g++],i=b[g++];
e+=f+encodeURIComponent(h);
f="&";
if(null!==i&&undefined!==i)
{
e+="="+encodeURIComponent(i.toString())
}

}

}
var j=++vo;
var k=Pn();
var l=(new Date()).getTime();
var n=function()
{
Sl(k,j,l,d)
}

;
var o=a.indexOf("?")>=0?"&":"?";
var p=e.length?a+o+e:a;
var q=p;
for(var r=q.length+1;
(r=q.lastIndexOf("&",r-1))>=0;
)
{
q=q.substring(0,r)+"&amp;
"+q.substring(r+1)
}
var s;
if(c!==undefined)
{
Qn(k,p,c.toString(),n);
s="POST"
}
else
{
wt(k,p,n);
s="GET"
}
S("Message ("+j+") sent: "+s+" <tt>"+q+"</tt>.")
}

function aa(a,b,c)
{
var d="";
if(b)
{
var e="";
for(var f=0;
f<b.length;
)
{
var g=b[f++],h=b[f++];
d+=e+encodeURIComponent(g);
e="&";
if(null!==h&&undefined!==h)
{
d+="="+encodeURIComponent(h.toString())
}

}

}
var i=++vo;
var j=Pn();
var k=(new Date()).getTime();
var l=function()
{
Sl(j,i,k,c)
}

;
var n=a;
for(var o=n.length+1;
(o=n.lastIndexOf("&",o-1))>=0;
)
{
n=n.substring(0,o)+"&amp;
"+n.substring(o+1)
}
S("Message ("+i+") sent: POST <tt>"+n+"</tt>.");
Qn(j,a,d,l)
}

;

var gr=aa;
aa=function(a,b,c)
{
var d=b?b.slice(0,b.length):[];
var e=yi("secid");
if(e)
{
d.push("secid",e)
}
gr.call(this,a,d,c)
}

;

var M;
var hu;
var Bo;
var Hh;
var Ba;
var Do;
var Co;
(function()
{
var a=navigator.userAgent.toLowerCase();
M=a.indexOf("msie")!=-1;
hu=a.indexOf("msie 5")!=-1&&document.all;
Bo=a.indexOf("konqueror")!=-1;
Hh=a.indexOf("safari")!=-1||Bo;
Ba=!M&&!Hh&&a.indexOf("mozilla")!=-1;
Do=a.indexOf("win")!=-1;
Co=!(!window.opera)
}

)();
function of(a)
{

}

function pb(a,b)
{

}

function Bk(a,b,c)
{

}

;
function yi(a)
{
var b=a+"=";
var c=String(document.cookie);
for(var d=-1;
(d=c.indexOf(b,d+1))>=0;
)
{
var e=d;
while(--e>=0)
{
var f=c.charAt(e);
if(f==";
")
{
e=-1;
break
}
else if(" \t".indexOf(f)<0)
{
break
}

}
if(-1===e)
{
var g=c.indexOf(";
",d);
if(g<0)
{
g=c.length
}
return c.substring(d+b.length,g)
}

}
return""
}

function Im(a,b)
{
return a.document.getElementById(b)
}

function br(a,b)
{
var c=a.document.getElementById(b);
if(!c)
{
pl("Element "+b+" not found.")
}
return c
}

function Ql(a)
{
try
{
return a.parentNode
}
catch(b)
{
return a
}

}

function Li(a,b)
{
do
{
if(a===b)return true;
b=Ql(b)
}
while(b&&b!==document.body);
return false
}

function Ak(a,b,c)
{
var d=a.document.createElement(c);
b.appendChild(d);
return d
}

function Mk(a,b)
{
var c=Im(a,b);
if(!c)
{
c=Ak(a,a.document.body,"div");
c.id=b
}
return c
}

function Xh(a,b,c)
{
var d=Im(a,b);
if(!d)
{
var e=Ak(a,a.document.body,"div");
e.innerHTML="<iframe id="+b+" name="+b+" src="+c+"></iframe>";
d=br(a,b)
}
return d
}

function sa(a,b)
{
var c;
if(a==null||!(c=a.className))return false;
c=" "+c+" ";
var d=c.indexOf(" "+b+" ");
return d>=0
}

function Wa(a,b)
{
if(sa(a,b))return;
a.className+=" "+b
}

function Ra(a,b)
{
if(a.className==null)return;
var c=a.className.split(" ");
var d=[];
var e=false;
for(var f=0;
f<c.length;
f++)
{
if(c[f]!=b)
{
if(c[f])
{
d.push(c[f])
}

}
else
{
e=true
}

}
if(e)
{
a.className=d.join(" ")
}

}

function Ml(a,b)
{
var c=[];
for(var d=a.firstChild;
d;
d=d.nextSibling)
{
zk(d,b,c)
}
return c
}

function zk(a,b,c)
{
if(b.select(a))
{
c.push(a)
}
for(var d=a.firstChild;
d;
d=d.nextSibling)
{
zk(d,b,c)
}

}

;
function rf(a)
{
if("innerWidth" in a)
{
return a.innerWidth
}
else if("documentElement" in a.document&&"clientWidth" in a.document.documentElement)
{
return a.document.documentElement.clientWidth
}
else if("clientWidth" in a.document.body)
{
return a.document.body.clientWidth
}
return 0
}

function Rl(a)
{
if("innerHeight" in a)
{
return a.innerHeight
}
else if("documentElement" in a.document&&"clientHeight" in a.document.documentElement)
{
return a.document.documentElement.clientHeight
}
else if("clientHeight" in a.document.body)
{
return a.document.body.clientHeight
}
return 0
}

var Dt=/&/g;
var pu=/</g;
var au=/>/g;
function H(a)
{
if(!a)return"";
return a.replace(Dt,"&amp;
").replace(pu,"&lt;
").replace(au,"&gt;
").replace(zu,"&quot;
")
}

function sf(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 sf.unesc?sf.unesc[c]:"?"
}

)
}

sf.unesc=
{
lt:"<",gt:">",quot:'"',nbsp:" ",amp:"&"
}
;
var zu=/\"/g;
function Pg(a)
{
return Pg.ie[a]
}

function K(a)
{
if(!Pg.ie)
{
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";
Pg.ie=b
}
return"'"+a.toString().replace(/[\'\\\r\n\b\"<>&\u0085\u2028\u2029]/g,Pg)+"'"
}

function Ib(a)
{
if(!a)return"";
return a.replace(/^\s+/,"").replace(/\s+$/,"")
}

function ar(a,b)
{
try
{
if(uf(b.selectionEnd))
{
return b.selectionEnd
}
else if(a.document.selection&&a.document.selection.createRange)
{
var c=a.document.selection.createRange();
if(c.parentElement()!=b)
{
return-1
}
var d=c.duplicate();
d.moveToElementText(b);
d.setEndPoint("EndToStart",c);
var e=d.text.length;
if(e>b.value.length)
{
return-1
}
return e
}
else
{
xq("Unable to get cursor position for: "+navigator.userAgent);
return b.value.length
}

}
catch(f)
{
ki(f,"Cannot get cursor pos")
}

}

function Cn(a,b,c)
{
if(uf(b.selectionEnd)&&uf(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 Lk(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 Ai(a)
{
return a.srcElement||a.target
}

function Dp(a)
{
if(M)
{
a.cancelBubble=true
}
else if(a.stopPropagation)
{
a.stopPropagation()
}

}

var Ru=/[()<>@,;
:\\\".\[\]]/;
function Kk(a,b)
{
if(a.indexOf('"')==-1)
{
var c=Ru.test(a);
if(c)
{
a='"'+a+'"'
}

}
if(a=="")return b;
else if(b=="")return a;
else return a+" <"+b+">"
}

function uf(a)
{
return typeof a!="undefined"
}

function oe(a)
{
var b;
if(a.type==="keypress")
{
if(M)
{
b=a.keyCode
}
else if(Ba)
{
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 Vt(a)
{
return document.getElementById(a)
}

function Wt(a)
{
return document.all[a]
}

var m=document.getElementById?Vt:Wt;
function fa(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 S(a)
{

}

function nc(a)
{
var b=typeof a==="string"?m(a):a;
if(b)
{
try
{
b.focus();
if(b.tagName=="INPUT"&&(b.type=="text"||b.type=="password"))
{
Cn(window,b,0)
}

}
catch(c)
{

}

}

}

;

function R(a)
{
a=a.replace(/>(\s+)</g,"><");
a=a.replace(/\s
{
2,
}
/g," ");
this.C=[];
this.re=0;
this.Pa=
{

}
;
var b=a.match(/\$\
{
\w+\
}
/g)||[];
var c=0;
for(var d=0;
d<b.length;
++d)
{
var e=b[d];
var f=a.indexOf(e,c);
if(c!=f)
{
this.C.push(a.substring(c,f))
}
c=f+e.length;
e=e.substring(2,e.length-1);
var g=this.Pa[e];
if(!g)
{
g=[];
this.Pa[e]=g;
++this.re;
this["put_"+e]=this.rf(this,e)
}
g.push(this.C.length);
this.C.push(undefined)
}
if(c!=a.length)
{
this.C.push(a.substring(c))
}
this.$c=0
}

R.prototype.rf=function(a,b)
{
return function(c)
{
return a.put(b,c)
}


}

;
R.prototype.put=function(a,b)
{
var c=this.Pa[a];
if(this.C[c[0]]===undefined)++this.$c;
if(c.length===1)
{
this.C[c[0]]=b
}
else
{
for(var d=0;
d<c.length;
++d)
{
this.C[c[d]]=b
}

}

}

;
R.prototype.toString=function()
{
if(!this.Q())
{
pb(false,"some keys are missing values: "+this.$f())
}
return this.C.join("")
}

;
R.prototype.$f=function()
{
var a=[];
for(var b in this.Pf())a.push(b);
return a.join()
}

;
R.prototype.Fg=function(a)
{
return a&&a in this.Pa
}

;
R.prototype.Mg=function()
{
return this.$c
}

;
R.prototype.Q=function()
{
return this.$c==this.re
}

;
R.prototype.Jg=function()
{
var a=
{

}
;
for(var b in this.Pa)a[b]=null;
return a
}

;
R.prototype.Pf=function()
{
var a=
{

}
;
for(var b in this.Pa)
{
if(this.C[this.Pa[b][0]]===undefined)
{
a[b]=null
}

}
return a
}

;
function vj(a)
{
R.call(this,a)
}

vj.prototype=new R("$
{
x
}
");
vj.prototype.constructor=R;
vj.prototype.put=function(a,b)
{
R.prototype.put.call(this,a,b);
return this
}

;

var Sk=false;
function xq(a)
{
Rk(a,0)
}

function pl(a)
{
try
{
throw a;

}
catch(b)
{
ki(b)
}

}

function ki(a,b)
{
var c="Javascript exception: "+(b?b:"")+" "+a;
if(M)
{
c+=" "+a.name+": "+a.message+" ("+a.number+")"
}
var d="";
if(typeof a=="string")
{
d=a+"\n"
}
else
{
for(var e in a)
{
try
{
d+=e+": "+a[e]+"\n"
}
catch(f)
{

}

}

}
d+=Pk(ki.caller);
Rk(c+"\n"+d,1)
}

var Yt=/function (\w+)/;
function Op(a)
{
var b=Yt.exec(String(a));
if(b)
{
return b[1]
}
return""
}

function Pk(a)
{
try
{
if(Ba)
{
return Error().stack
}
if(!a)return"";
var b="- "+Op(a)+"(";
for(var c=0;
c<a.arguments.length;
c++)
{
if(c>0)b+=", ";
var d=String(a.arguments[c]);
if(d.length>40)
{
d=d.substr(0,40)+"..."
}
b+=d
}
b+=")\n";
b+=Pk(a.caller);
return b
}
catch(e)
{
return"[Cannot get stack trace]: "+e+"\n"
}

}

var Qp;
var Nc=null;
var Yh=false;
function Pp()
{
if((Nc==null||Nc.closed)&&!Yh)
{
try
{
Yh=true;
Nc=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");
Nc.blur();
Nc.document.open();
Yh=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>";
Qk(a)
}
catch(b)
{

}

}

}

function Rk(a,b)
{
if(!Sk)
{
if(typeof S!="undefined")
{
S(H(a))
}
return
}
try
{
var c=(new Date()).getTime()-Qp;
var d="["+c+"] "+H(a).replace(/\n/g,"<br>")+"<br>";
if(b==1)
{
d="<font color=#ff0000><b>Error: "+d+"</b></font>";
Nc.focus()
}
Qk(d)
}
catch(e)
{

}

}

function Qk(a)
{
if(!Sk)
{
return
}
try
{
Pp();
Nc.document.write(a);
Nc.dd(0,1000000)
}
catch(b)
{

}

}

;

function pe(a)
{
return a<0?-1:1
}

function Ng(a)
{
return a|0
}

function Mg(a)
{
pl(a);
throw a;

}

function ia(a,b)
{
var c=a.toString();
while(c.length<b)
{
c="0"+c
}
return c
}

function Bb(a,b,c)
{
return parseInt(a.substring(b,c),10)
}

var Gi=[undefined,31,undefined,31,30,31,30,31,31,30,31,30,31];
function Ab(a,b)
{
if(2!==b)
{
return Gi[b]
}
var c=a<<4;
var d=Gi[c];
if(!d)
{
d=Math.round((Date.UTC(a,2,1)-Date.UTC(a,1,1))/86400000);
Gi[c]=d
}
return d
}

var Xl=new Object();
function Hi(a,b)
{
var c=a<<4|b;
var d=Xl[c];
if(!d)
{
d=(new Date(a,b-1,1,0,0,0,0)).getDay();
Xl[c]=d
}
return d
}

function Bd(a)
{
return(a.date-1+Hi(a.year,a.month))%7
}

function Wl(a,b,c,d,e,f)
{
var g;
if(a===d)
{
if((g=b-e)===0)
{
return c-f
}
else if(g<0)
{
g=c-f;
do
{
g-=Ab(a,b++)
}
while(b<e);
return g
}
else
{
g=c-f;
do
{
g+=Ab(d,e++)
}
while(e<b);
return g
}

}
else
{
return Math.round((Date.UTC(a,b-1,c)-Date.UTC(d,e-1,f))/86400000)
}

}

function sb(a,b)
{
return Wl(a.year,a.month,a.date,b.year,b.month,b.date)
}

function Yl(a,b)
{
var c=sb(ya,a);
return c>=0&&c<b
}

function eb(a,b,c,d,e,f)
{
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(f))
{
this.second=f
}

}

eb.prototype.year=NaN;
eb.prototype.month=NaN;
eb.prototype.date=NaN;
eb.prototype.hour=NaN;
eb.prototype.minute=NaN;
eb.prototype.second=NaN;
eb.prototype.O=function()
{
return Bd(this)
}

;
eb.prototype.toString=function()
{
if(this.la!==undefined)return this.la;
this.la=this.Va();
return this.la
}

;
function Ad()
{

}

Ad.prototype=new eb();
Ad.prototype.constructor=Ad;
function N(a,b,c)
{
eb.call(this,a,b,c,NaN,NaN,NaN)
}

N.prototype=new Ad();
N.prototype.constructor=N;
N.now=function()
{
var a=new Date();
return N.create(a.getFullYear(),a.getMonth()+1,a.getDate())
}

;
N.prototype.type="Date";
N.prototype.g=function()
{
return this
}

;
N.prototype.k=function()
{
return new O(this.year,this.month,this.date,0,0,0)
}

;
N.prototype.b=function()
{
if(undefined===this.M)
{
this.M=N.Pd(this.year,this.month,this.date)
}
return this.M
}

;
N.Pd=function(a,b,c)
{
return this.M=(((a-1970)*12+b<<5)+c)*86400
}

;
N.prototype.Q=function()
{
return true
}

;
N.prototype.Va=function()
{
return ia(this.year,4)+ia(this.month,2)+ia(this.date,2)
}

;
N.prototype.equals=function(a)
{
return this.constructor===a.constructor&&this.date===a.date&&this.month===a.month&&this.year===a.year
}

;
N.tc=
{

}
;
N.mf=0;
N.$e=200;
N.create=function(a,b,c)
{
var d=N.Pd(a,b,c);
if(d in N.tc)
{
return N.tc[d]
}
else
{
var e=new N(a,b,c);
e.M=d;
if(N.mf<N.$e)
{
N.tc[d]=e
}
return e
}

}

;
function O(a,b,c,d,e,f)
{
eb.call(this,a,b,c,d,e,f)
}

O.prototype=new Ad();
O.prototype.constructor=O;
O.now=function()
{
var a=new Date();
return new O(a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())
}

;
O.prototype.type="DateTime";
O.prototype.g=function()
{
return N.create(this.year,this.month,this.date)
}

;
O.prototype.k=function()
{
return this
}

;
O.prototype.bc=function()
{
return new $b(this.hour,this.minute,this.second)
}

;
O.prototype.b=function()
{
if(undefined===this.M)
{
this.M=(((((this.year-1970)*12+this.month<<5)+this.date)*24+this.hour)*60+this.minute)*60+this.second
}
return this.M
}

;
O.prototype.Q=function()
{
return true
}

;
O.prototype.Va=function()
{
return ia(this.year,4)+ia(this.month,2)+ia(this.date,2)+"T"+ia(this.hour,2)+ia(this.minute,2)+ia(this.second,2)
}

;
O.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
}

;
O.prototype.clone=function()
{
var a=new O(this.year,this.month,this.date,this.hour,this.minute,this.second);
if(this.la!==undefined)a.la=this.la;
return a
}

;
function $b(a,b,c)
{
eb.call(this,NaN,NaN,NaN,a,b,c)
}

$b.prototype=new eb();
$b.prototype.constructor=$b;
$b.prototype.type="Time";
$b.prototype.bc=function()
{
return this
}

;
$b.prototype.Va=function()
{
return"T"+ia(this.hour,2)+ia(this.minute,2)+ia(this.second,2)
}

;
$b.prototype.equals=function(a)
{
return this.constructor===a.constructor&&this.hour===a.hour&&this.minute===a.minute&&this.second===a.second
}

;
function db(a,b,c,d)
{
var e=d+60*(c+60*(b+24*a));
var f=Ng(e/86400);
e-=f*86400;
var g=Ng(e/3600);
e-=g*3600;
var h=Ng(e/60);
e-=h*60;
var i=Ng(e);
eb.call(this,NaN,NaN,f,g,h,i)
}

db.prototype=new eb();
db.prototype.constructor=db;
db.prototype.type="Duration";
db.prototype.qd=function()
{
return this.date
}

;
db.prototype.ah=function()
{
return this.date*24+this.hour
}

;
db.prototype.rd=function()
{
return 1440*this.date+this.hour*60+this.minute
}

;
db.prototype.bh=function()
{
return this.second+this.minute*60+this.hour*3600+86400*this.date
}

;
db.prototype.b=function()
{
if(undefined===this.M)
{
this.M=((this.date*24+this.hour)*60+this.minute)*60+this.second
}
return this.M
}

;
db.prototype.Va=function()
{
var a=this.year?pe(this.year):(this.month?pe(this.month):(this.date?pe(this.date):(this.hour?pe(this.hour):(this.minute?pe(this.minute):(this.second?pe(this.second):0)))));
var 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
}

;
db.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 ca();
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 Xb(a)
{
var b=new ca();
b.year=a.year;
b.month=a.month;
b.date=a.date;
b.hour=a.hour;
b.minute=a.minute;
b.second=a.second;
return b
}

function be(a,b,c)
{
pb(!(isNaN(a)|isNaN(b)|isNaN(c)));
var d=new ca();
d.year=a||0;
d.month=b||0;
d.date=c||0;
return d
}

function Zj(a,b,c,d,e,f)
{
pb(!(isNaN(a)|isNaN(b)|isNaN(c)|isNaN(d)|isNaN(e)|isNaN(f)));
var g=new ca();
g.year=a||0;
g.month=b||0;
g.date=c||0;
g.hour=d||0;
g.minute=e||0;
g.second=f||0;
return g
}

function ca()
{

}

ca.prototype=new eb();
ca.prototype.constructor=ca;
ca.prototype.type="DTBuilder";
ca.prototype.year=(ca.prototype.month=(ca.prototype.date=(ca.prototype.hour=(ca.prototype.minute=(ca.prototype.second=0)))));
ca.prototype.b=function()
{
this.normalize()
}

;
ca.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
}

}

;
ca.prototype.normalize=function()
{
this.ag();
this.Zc();
var a=Ab(this.year,this.month);
while(this.date<1)
{
this.month-=1;
this.Zc();
a=Ab(this.year,this.month);
this.date+=a
}
while(this.date>a)
{
this.date-=a;
this.month+=1;
this.Zc();
a=Ab(this.year,this.month)
}

}

;
ca.prototype.ag=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
}

}

;
ca.prototype.Zc=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.ceil((this.month-1)/12);
this.month-=12*a;
this.year+=a
}

}

;
ca.prototype.g=function()
{
this.normalize();
return N.create(this.year,this.month,this.date)
}

;
ca.prototype.k=function()
{
this.normalize();
return new O(this.year,this.month,this.date,this.hour,this.minute,this.second)
}

;
ca.prototype.z=function()
{
this.normalize();
return new Ya(isFinite(this.year)?this.year:undefined,isFinite(this.month)?this.month:undefined,isFinite(this.date)?this.date:undefined)
}

;
ca.prototype.X=function()
{
this.normalize();
return new Ca(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)
}

;
ca.prototype.bc=function()
{
this.normalize();
return new $b(this.hour,this.minute,this.second)
}

;
ca.prototype.Qe=function()
{
if(this.year||this.month)
{
Mg("Can't convert months or years to ICAL_Duration");
return undefined
}
else
{
return new db(this.date,this.hour,this.minute,this.second)
}

}

;
ca.prototype.wg=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
}

;
ca.prototype.xg=function()
{
return this.wg()&&this.yg()
}

;
ca.prototype.yg=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
}

;
ca.prototype.toString=function()
{
return"["+(undefined!==this.year?ia(this.year,4):"????")+"/"+(undefined!==this.month?ia(this.month,2):"??")+"/"+(undefined!==this.date?ia(this.date,2):"??")+" "+(undefined!==this.hour?ia(this.hour,2):"??")+" "+(undefined!==this.minute?ia(this.minute,2):"??")+" "+(undefined!==this.second?ia(this.second,2):"??")+"]"
}

;
ca.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 Mb(a,b)
{
this.start=a;
if(b.constructor==db)
{
var c=D(a);
c.advance(b);
this.end=this.start instanceof O?c.k():c.g()
}
else
{
this.end=b
}
this.duration=gc(this.end,this.start)
}

Mb.prototype.type="PeriodOfTime";
Mb.prototype.toString=function()
{
if(this.la!==undefined)return this.la;
this.la=this.start+"/"+this.end;
return this.la
}

;
Mb.prototype.equals=function(a)
{
return this.constructor===a.constructor&&this.start.equals(a.start)&&this.end.equals(a.end)
}

;
Mb.prototype.overlaps=function(a)
{
return a.end.b()>this.start.b()&&a.start.b()<this.end.b()
}

;
Mb.prototype.dg=function(a,b)
{
return b.b()>this.start.b()&&a.b()<this.end.b()
}

;
Mb.prototype.contains=function(a)
{
return this.start.b()<=a.start.b()&&this.end.b()>=a.end.b()
}

;
function tf(a,b)
{
this.start=a;
this.end=b;
try
{
this.duration=gc(this.end,this.start)
}
catch(c)
{
this.duration=null
}

}

tf.prototype.type="PartialPeriodOfTime";
tf.prototype.Va=function()
{
return this.start+"/"+this.end
}

;
tf.prototype.equals=function(a)
{
return this.constructor===a.constructor&&this.start.equals(a.start)&&this.end.equals(a.end)
}

;
function gc(a,b)
{
if(isNaN(a.year)!=isNaN(b.year)||isNaN(a.hour)!=isNaN(b.hour))
{
Mg("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=Wl(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.Qe()
}

function Ya(a,b,c)
{
this.year=a;
this.month=b;
this.date=c
}

Ya.prototype=new Ad();
Ya.prototype.constructor=Ya;
Ya.prototype.type="PartialDate";
Ya.prototype.g=function()
{
return N.create(this.year||0,this.month||1,this.date||1)
}

;
Ya.prototype.k=function()
{
return new O(this.year||0,this.month||1,this.date||1,0,0,0)
}

;
Ya.prototype.z=function()
{
return this
}

;
Ya.prototype.X=function()
{
return new Ca(this.year,this.month,this.date,0,0,0)
}

;
Ya.prototype.Q=function()
{
return!isNaN(this.b())
}

;
Ya.prototype.b=function()
{
if(undefined===this.M)
{
this.M=(((this.year-1970)*12+this.month<<5)+this.date)*86400
}
return this.M
}

;
Ya.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))
}

;
Ya.prototype.Va=function()
{
return(undefined!==this.year?ia(this.year,4):"????")+(undefined!==this.month?ia(this.month,2):"??")+(undefined!==this.date?ia(this.date,2):"??")
}

;
function Ca(a,b,c,d,e,f)
{
this.year=a;
this.month=b;
this.date=c;
this.hour=d;
this.minute=e;
this.second=f
}

Ca.prototype=new Ad();
Ca.prototype.constructor=Ca;
Ca.prototype.type="PartialDateTime";
Ca.prototype.g=function()
{
return N.create(this.year||0,this.month||1,this.date||1)
}

;
Ca.prototype.k=function()
{
return new O(this.year||0,this.month||1,this.date||1,this.hour||0,this.minute||0,this.second||0)
}

;
Ca.prototype.z=function()
{
return new Ya(this.year,this.month,this.date)
}

;
Ca.prototype.X=function()
{
return this
}

;
Ca.prototype.Q=function()
{
return!isNaN(this.b())
}

;
Ca.prototype.b=function()
{
if(undefined===this.M)
{
this.M=(((((this.year-1970)*12+this.month<<5)+this.date)*24+this.hour)*60+this.minute)*60+this.second
}
return this.M
}

;
Ca.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))
}

;
Ca.prototype.Va=function()
{
return(undefined!==this.year?ia(this.year,4):"????")+(undefined!==this.month?ia(this.month,2):"??")+(undefined!==this.date?ia(this.date,2):"??")+"T"+(undefined!==this.hour?ia(this.hour,2):"??")+(undefined!==this.minute?ia(this.minute,2):"??")+(undefined!==this.second?ia(this.second,2):"??")
}

;
function $(a)
{
var b=a.indexOf("/");
var c=a.length;
if(b>=0)
{
return new Mb($(a.substring(0,b)),$(a.substring(b+1,c)))
}
else
{
var d=1;
var e=0;
switch(a.charAt(0))
{
case "T":return Zj(0,0,0,Bb(a,1,3),Bb(a,3,5),Bb(a,5,7)).bc();
case "P":return Ul(a.substring(1,c),1);
case "-":d=-1;
case "+":e=1;
if("P"==a.charAt(1))
{
return Ul(a.substring(2,c),d)
}
default:var f=a.indexOf("T");
if(f===-1)
{
return be(Bb(a,e,c-4),Bb(a,c-4,c-2),Bb(a,c-2,c)).g()
}
return Zj(Bb(a,e,f-4),Bb(a,f-4,f-2),Bb(a,f-2,f),Bb(a,f+1,f+3),Bb(a,f+3,f+
5),Bb(a,f+5,f+7)).k()
}

}

}

function Ul(a,b)
{
var c=a.length;
var d=new ca();
for(var e=0;
e<c;
e+=1)
{
var f=0;
do
{
var g=a.charAt(e);
if(g<"0"||g>"9")
{
break
}
f+=1
}
while((e+=1)<c);
if(f===0)
{
Bk("T",a.charAt(e));
continue
}
var h=Bb(a,e-f,e);
switch(a.charAt(e))
{
case "W":d.date+=b*7*h;
break;
case "D":d.date+=b*h;
break;
case "H":d.hour+=b*h;
break;
case "M":d.minute+=b*h;
break;
case "S":d.second+=b*h;
break;
default:Mg("Bad Duration "+a);
return undefined
}

}
return d.Qe()
}

var El="(?:([0-9]
{
4,
}
)|\\?
{
4
}
)";
var Qd="(?:([0-9]
{
2
}
)|\\?
{
2
}
)";
var Mr=new RegExp("^"+El+Qd+Qd+"$");
var Nr=new RegExp("^"+El+Qd+Qd+"T"+Qd+Qd+Qd+"$");
function rb(a)
{
var b=a.indexOf("/");
var c=a.length;
if(b>=0)
{
return new tf(rb(a.substring(0,b)),rb(a.substring(b+1,c)))
}
var d=a.match(Nr);
if(!d)
{
d=a.match(Mr);
if(!d)
{
Mg("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 Ca(d[1],d[2],d[3],d[4],d[5],d[6])
}
else
{
return new Ya(
d[1],d[2],d[3])
}

}

var ya=undefined;
var Ii=[];
function Vl(a,b,c)
{
var d=b>2&&29===Ab(a,2);
return Vl.af[b]+d+c-1
}

Vl.af=[undefined,0,31,59,90,120,151,181,212,243,273,304,334];
function Yo()
{
var a=new Date();
var b=ya;
ya=N.create(a.getFullYear(),a.getMonth()+1,a.getDate());
if(b&&!b.equals(ya))
{
for(var c=0;
c<Ii.length;
++c)
{
var d=Ii[c];
try
{
d(ya)
}
catch(e)
{

}

}

}
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
}
setTimeout(Yo,g)
}

Yo();
function kp(a)
{
Ii.push(a)
}

;

function cb()
{
this.ab=
{

}
;
this.J=null;
this.Ia=
{

}
;
this.m=[];
this.Ya=false;
this.rc=false;
this.locationSet=
{

}
;
this.locationSetCount=0
}

cb.prototype._byEid=function(a)
{
return this.ab[a]
}

;
cb.prototype._allEids=function()
{
return this.ab
}

;
cb.prototype._eventsInRange=function(a,b)
{
var c=a.toString()+":"+b.toCacheKey();
var d;
if(this.J)
{
d=this.J[c];
if(undefined!==d)
{
return d
}

}
this.yb();
var e=this.xa(a.start.g());
var f=this.xa(Vd(a.end));
d=[];
var g=
{

}
;
for(var h=e;
h<f;
++h)
{
var i=this.La(h);
for(var j=0;
j<i.length;
++j)
{
var k=i[j];
if(g[k.eid])
{
continue
}
g[k.eid]=true;
if(a.dg(k.start.k(),k.end.k()))
{
if(b(k))
{
d.push(k)
}

}

}

}
this.Bb(c,d);
return d
}

;
cb.prototype._eventsAfter=function(a,b,c,d)
{
var e=a.toString()+" +"+b+":"+c.toCacheKey();
var f;
if(this.J)
{
f=this.J[e];
if(undefined!==f)
{
return f
}

}
this.yb();
var g=a.g();
var h=this.xa(g);
var i=h<this.m.length&&this.m[h].D.equals(g);
f=[];
var j=b;
var k=
{

}
;
for(var l=h;
l<this.m.length;
++l)
{
var n=this.La(l);
var o=false;
for(var p=0;
p<n.length;
++p)
{
var q=n[p];
if(!d)
{
if(k[q.eid])
{
continue
}
k[q.eid]=true
}
if((!i||q.end.b()>a.b())&&c(q))
{
if(!o)
{
if(d)
{
f.push(n.D)
}
o=true
}
f.push(q);
if(--j<=0)
{
l=this.m.length;
break
}


}

}
i=false
}
this.Bb(e,f);
return f
}

;
cb.prototype._eventsBefore=function(a,b,c,d)
{
var e=a.toString()+" -"+b+":"+c.toCacheKey();
var f;
if(this.J)
{
f=this.J[e];
if(undefined!==f)
{
return f
}

}
this.yb();
var g=Tt(a);
var h=this.xa(g);
var i=h>0&&1===sb(g,this.m[h-1].D);
f=[];
var j=b;
var k=
{

}
;
for(var l=h;
--l>=0;
)
{
var n=this.La(l);
var o=false;
for(var p=n.length;
--p>=0;
)
{
var q=n[p];
if(!d)
{
if(k[q.eid])
{
continue
}
k[q.eid]=true
}
if((!i||q.start.b()<a.b())&&c(q))
{
f.push(q);
o=true;
if(--j<=0)
{
l=-1;
break
}

}

}
if(o&&d)
{
f.push(n.D)
}
i=false
}
f.reverse();
this.Bb(e,
f);
return f
}

;
cb.prototype._eventsAfterEventOnDay=function(a,b,c,d)
{
var e=a.toString()+":"+b+" ++"+c+":"+d.toCacheKey();
var f;
if(this.J)
{
f=this.J[e];
if(undefined!==f)
{
return f
}

}
this.yb();
var g=this.xa(a);
var h=g<this.m.length&&this.m[g].D.equals(a);
f=[];
var i=0;
if(h)
{
var j=this.La(g);
for(var k=i;
k<j.length;
++k)
{
var l=j[k];
if(l.eid==b)
{
i=k;
break
}

}

}
var n=c;
for(var o=g;
o<this.m.length;
++o)
{
var j=this.La(o);
var p=false;
for(var k=i;
k<j.length;
++k)
{
var l=j[k];
if(d(l))
{
if(!p)
{
f.push(j.D);
p=true
}
f.push(l);
if(--n<=0)
{

o=this.m.length;
break
}

}

}
i=0
}
this.Bb(e,f);
return f
}

;
cb.prototype._eventsBeforeEventOnDay=function(a,b,c,d)
{
var e=a.toString()+":"+b+" --"+c+":"+d.toCacheKey();
var f;
if(this.J)
{
f=this.J[e];
if(undefined!==f)
{
return f
}

}
this.yb();
var g=a;
var h=this.xa(g);
var i=h>0&&0===sb(g,this.m[h].D);
f=[];
var j=0;
if(i)
{
var k=this.La(h);
for(var l=k.length;
--l>=0;
)
{
var n=k[l];
if(n.eid==b)
{
j=k.length-l-1;
break
}

}

}
var o=c;
for(var p=h;
p>=0;
--p)
{
var k=this.La(p);
var q=false;
for(var l=k.length-j;
--l>=0;
)
{
var n=k[l];
if(d(n))
{
f.push(n);
q=true;
if(--o<=0)
{
p=-1;
break
}

}

}
if(q)
{
f.push(
k.D)
}
j=0
}
f.reverse();
this.Bb(e,f);
return f
}

;
cb.prototype.xa=function(a)
{
var b=a.b();
var c=this.Ia[b];
if(undefined!==c)
{
return c<0?~c:c
}
c=0;
var d=0;
var e=this.m.length-1;
var f=false;
while(e>=d)
{
c=e+d>>1;
var g=this.m[c].D.b()-b;
if(0===g)
{
f=true;
break
}
else if(g<0)
{
d=c+1
}
else
{
e=c-1
}

}
if(c<this.m.length&&b>this.m[c].D.b())
{
c+=1
}
this.Ia[b]=f?c:~c;
return c
}

;
cb.prototype.yb=function()
{
if(this.Ya)
{
this.m.sort(Rt)
}
if(this.rc||this.Ya)
{
this.Ia=
{

}
;
for(var a=this.m.length;
--a>=0;
)
{
this.Ia[this.m[a].D.b()]=a
}
this.rc=false
}
if(this.Ya)
{
this.Ya=false
}

}

;
cb.prototype.Bb=function(a,b)
{
if(!this.J||this.J.size>10)
{
this.J=
{

}
;
this.J.size=0
}
this.J[a]=b;
++this.J.size
}

;
cb.prototype.La=function(a)
{
var b=this.m[a];
if(b.Yd)
{
b.sort(St);
b.Yd=false
}
return b
}

;
cb.prototype.sd=function(a,b,c)
{
var d=b.g();
var e=Vd(c);
var f=D(d);
for(var g;
(g=f.g()).b()<e.b();
f.date+=1)
{
var h=this.Ia[g.b()];
if(h!==undefined&&h>=0)
{
var i=this.m[h];
for(var j=0;
j<i.length;
++j)
{
if(i[j].eid==a)
{
i.splice(j,1);
this.Lb();
break
}

}

}

}

}

;
cb.prototype.sc=function(a)
{
var b=a.start.g();
var c=Vd(a.end);
var d=D(b);
for(var e;
(e=d.g()).b()<c.b();
d.date+=1)
{
var f=this.Ia[e.b()];
var g;
if(f!==undefined&&f>=0)
{
g=this.m[f]
}
else
{
g=[];
g.D=e;
this.Ya=this.Ya||this.m.length&&g.D.b()<this.m[this.m.length-1].D.b();
this.rc=true;
this.Ia[e.b()]=this.m.length;
this.m.push(g)
}
g.push(a);
g.Yd=g.length>1
}
this.Lb()
}

;
cb.prototype._anyEventsInDateRange=function(a,b,c)
{
var d=this.xa(a);
var e=this.xa(b);
var f=
{

}
;
for(var g=d;
g<=e;
++g)
{
var h=this.m[g];
if(!h)continue;
for(var i=0;
i<h.length;
++i)
{
if(!c||c(h[i]))
{
f[h.D]=true;
break
}

}

}
return f
}

;
cb.prototype.Lb=function()
{
this.J=null
}

;
var Y=new cb();
Y.bucketCounts=function()
{
var a=[];
for(var b=0;
b<this.m.length;
++b)
{
var c=this.m[b];
a.push(c.D.toString()+": "+c.length)
}
return a.join("\n")
}

;
Y.bucketContent=function()
{
var a=[];
for(var b=0;
b<this.m.length;
++b)
{
var c=this.m[b];
var d=[];
for(var e=0;
e<c.length;
++e)
{
d.push(c[e].eid)
}
a.push(c.D.toString()+": "+d.join(","))
}
return a.join("\n")
}

;
function mi(a,b,c,d,e,f,g,h,i,j,k,l,n,o)
{
if(typeof c=="string")
{
c=$(c)
}
if(typeof d=="string")
{
if(d=="")
{
d=c;
var p=D(c);
p.hour+=1;
d=p.k()
}
else
{
d=$(d)
}

}
var q=Y._byEid(a);
if(q===undefined)
{
q=new Aa(a,b,c,d,e,f,g,h,i,j,k,l,n,o);
Y.sc(q)
}
else
{
var r=q.att[q.src];
var s=q.start;
var t=q.end;
q.update(a,b,c,d,e,f,g,h,i,j,k,l,n,o);
if(r!==q.att[q.src]||!s.g().equals(c.g())||!Vd(t).equals(Vd(d)))
{
Y.sd(a,s,t);
Y.sc(q)
}

}
Y.ab[q.eid]=q;
dd();
return q
}

function Eq()
{
var a=ni();
E.hide();
rl(a)
}

function zl(a)
{
var b=u.Gb();
var c=N.now();
var d;
if(b[1].b()<=c.b())
{
d=b[1]
}
else if(c.b()<=b[0].b())
{
d=b[0]
}
else
{
d=c
}
var e=Gq(d);
var f=D(e);
f.minute+=60;
f=f.k();
var g=[];
if(a!==null)
{
g.push("src",a)
}
g.push(mb,e+"/"+f);
g.push("pprop",$i+":BUTTON");
kf(g)
}

function Gq(a)
{
var b=D(a);
var c=O.now();
b.hour=c.hour;
b.minute=c.minute<30?30:60;
b.second=0;
return b.k()
}

function Iq()
{
var a=ni();
E.hide();
kf(a)
}

function ni()
{
var a=E.summary||Kg().value;
var b=E.start;
var c=E.end;
var d;
var e=m("dragEventCalendar");
if(e)
{
d=e.value
}
else
{
d=B
}
if(b)
{
if(!c)
{
if("string"==typeof b)
{
b=$(b)
}
c=D(b);
if(b instanceof O)
{
c.hour+=1;
c=c.k()
}
else
{
c.date+=1;
c=c.g()
}

}

}
var f=ql(a,E.details,E.location,b,c,E.att_names,E.querystring,E.url,E.sharedprops,E.privprops,"DRAG");
f.push("src",d);
return f
}

function xl(a)
{
var b=Y._byEid(a);
if(b)
{
Y.sd(a,b.start,b.end);
delete Y.ab[a];
Gn(a)
}
dd()
}

function Hq(a,b)
{
var c=Y._byEid(a);
if(c)
{
c.eid=b;
delete Y.ab[a];
Y.ab[b]=c;
c.flags&=~65
}
dd()
}

function Al(a,b,c)
{
S("Updating Status for "+a+", "+c);
var d=Y._byEid(a);
if(d)
{
d.att[b]=c;
Y.Lb();
dd()
}
else
{
S("No Such Event")
}

}

function Kq(a,b,c)
{
if(typeof b=="string")
{
b=$(b)
}
if(typeof c=="string")
{
c=$(c)
}
var d=Y._byEid(a);
if(d)
{
var e=d.start;
var f=d.end;
d.start=b.k();
d.end=c.k();
Mn(b,d);
if(!e.g().equals(d.start.g())||!Vd(f).equals(Vd(d.end)))
{
Y.sd(a,e,f);
Y.sc(d)
}
dd()
}
else
{
S("No Such Event")
}

}

function lf(a,b,c)
{
S("Updating field "+b+" for "+a);
var d=Y._byEid(a);
if(d)
{
d[b]=c;
dd()
}
else
{
S("No Such Event")
}

}

function Jq(a,b)
{
S("Updating attendees for "+a);
var c=Y._byEid(a);
if(c)
{
c.att=
{

}
;
var d=b.split(/[;
:]/);
for(var e=0;
e<d.length;
e+=2)
{
var f=d[e];
if(f.length)
{
c.att[f]=parseInt(d[e+1],10)
}

}
dd()
}
else
{
S("No Such Event")
}

}

function Vd(a)
{
if(a.hour||a.minute||a.second)
{
var b=D(a);
b.date+=1;
return b.g()
}
else
{
return a.g()
}

}

function Tt(a)
{
if(undefined===a.hour||a.hour||a.minute||a.second)
{
var b=D(a);
b.date+=1;
return b.g()
}
else
{
return a.g()
}

}

function Rt(a,b)
{
return a.D.b()-b.D.b()
}

function St(a,b)
{
var c=a.start.b()-b.start.b();
if(c)
{
return c
}
c=a.end.b()-b.end.b();
if(c)
{
return c
}
var d=a.eid;
var e=b.eid;
return d==e?0:(d<e?-1:1)
}

function Lq(a,b,c)
{
S("Updating field "+b+" for "+a);
var d=Y._byEid(a);
if(d)
{
d[b]=c
}
else
{
S("No Such Event")
}

}

function le(a)
{
if(La)
{
for(var b=0;
b<La.length;
++b)
{
a.push("lef",La[b])
}

}

}

function ke(a)
{
if(la)
{
a.push("droi",la.toString())
}

}

;

var la=undefined;
var La=[];
var jd=undefined;
function _es_setDisplayTz(a)
{
jd=a
}

function Mq(a,b,c,d,e)
{
var f=Vf(d,La);
var g=Vf(La,d);
if(f.length)
{
S("expanding LEF by "+f);
for(var h=0;
h<f.length;
h++)
{
La.push(f[h])
}
La.sort()
}
if(undefined===la||b.contains(la))
{
if(0==g.length)
{
la=b
}
else
{
Fg(b.start,b.end,g,d,false)
}

}
else
{
var i=(b.start.b()<la.start.b()?b:la).start;
var j=(b.end.b()>la.end.b()?b:la).end;
Fg(i,j,g,La,false)
}
Cp(e)
}

function Fq(a)
{
if(!La)
{
return
}
La=Vf(La,a)
}

function pi(a,b,c)
{
yl(a,b,[],c)
}

function yl(a,b,c,d)
{
pb(b.b()>=a.b(),"end must not precede start");
var e,f;
if(undefined===la)
{
e=a;
f=b
}
else
{
if(a.b()<la.start.b())
{
e=a;
f=la.start
}
if(b.b()>la.end.b())
{
if(e===undefined)e=la.end;
f=b
}
if(e===undefined)
{
if(d)d();
return
}

}
var g=Zn(La,c);
var h=g.length>La.length;
Fg(e,f,g,La,h,d)
}

function oi(a,b)
{
var c=Vf(a,La);
if(c.length==0)
{
if(b)b();
return
}
if(undefined!==la)
{
Fg(la.start,la.end,c,La,true,b)
}
else
{
if(b)b()
}

}

function Fg(a,b,c,d,e,f)
{
var g=la?la:new Mb(a,a);
var h=new Mb(a,b);
var i=["droi",g,"droiP",h,"lrt",vh,"ctz",jd];
for(var j=0;
j<d.length;
++j)
{
i.push("lef",d[j])
}
for(var j=0;
j<c.length;
++j)
{
i.push("lefP",c[j])
}
if(e)
{
i.push("nusr","true")
}
aa("load",i,xa("Failed to load events from the server",f))
}

function Aa(a,b,c,d,e,f,g,h,i,j,k,l,n,o)
{
this.update(a,b,c,d,e,f,g,h,i,j,k,l,n,o)
}

Aa.prototype.eid=undefined;
Aa.prototype.text=undefined;
Aa.prototype.start=undefined;
Aa.prototype.end=undefined;
Aa.prototype.owner=undefined;
Aa.prototype.src=undefined;
Aa.prototype.creator=undefined;
Aa.prototype.flags=undefined;
Aa.prototype.location=undefined;
Aa.prototype.url=undefined;
Aa.prototype.gb=undefined;
Aa.prototype.att=undefined;
Aa.prototype.sharedprops=undefined;
Aa.prototype.privprops=undefined;
Aa.prototype.details=undefined;
Aa.prototype.update=function(a,b,c,d,e,f,g,h,i,j,k,l,n,o)
{
this.eid=
a;
this.text=b||"";
this.start=c.k();
this.end=d.k();
this.owner=e;
this.src=f;
this.creator=g;
this.flags=h;
Mn(c,this);
if(i&&this.location!=i)
{
var p=i.replace(/\W+/g,"");
if(p in Y.locationSet)
{
++Y.locationSet[p].count
}
else
{
Y.locationSet[p]=
{
count:1,location:i
}
;
++Y.locationSetCount
}

}
this.location=i||"";
this.url=l||"";
this.gb=j;
this.att=
{

}
;
if("string"==typeof k)
{
var q=k.split(/[;
:]/);
for(var r=0;
r<q.length;
r+=2)
{
var s=q[r];
if(s.length)
{
var t=parseInt(q[r+1],10);
this.att[s]=t
}

}

}
else
{
for(var w in k)
{
var t=
k[w];
this[w]=t
}

}
if(n!==null)
{
this.sharedprops=n
}
else
{
this.sharedprops=[]
}
if(o!==null)
{
this.privprops=o
}
else
{
this.privprops=[]
}

}

;
Aa.prototype.cb=function()
{
return A[this.src].color
}

;
Aa.prototype.Pc=function()
{
return!(!(this.flags&32))
}

;
Aa.prototype.toString=function()
{
var a=this.text;
if(a.length>16)
{
a=a.substring(0,13)+"..."
}
return"[Event "+this.eid+": "+a+" on "+this.src+"]"
}

;
function Nb(a)
{
return!(!(a.flags&16))
}

function Ia(a)
{
return!(!(a.flags&16384))
}

function Ei(a)
{
return false
}

function Di(a)
{
if(a.gb==0)
{
return false
}
if(a.gb>1)
{
return true
}
if(B in a.att)
{
return false
}
return true
}

var dd=function()
{

}

;
var Gn=function(a)
{

}

;
function Mn(a,b)
{
if(a.type=="Date")
{
b.flags|=16;
b.flags|=16384
}
else
{
var c=D(b.start);
c.date+=1;
var d=c.g();
if(b.end.b()>d.b())
{
b.flags|=16384
}
else
{
b.flags&=~16384
}

}

}

;

var Zd=new Wr();
var oo=false;
function Wr()
{
this.Fa=[]
}

function _PC_Install(a)
{
if(oo)return false;
oo=true;
var b=a?a:document;
Ma(b.body,"mousedown",Or);
return true
}

function Or(a)
{
if(Zd.Fa.length==0)return false;
var a=a||window.event;
for(var b=Zd.Fa.length-1;
b>=0;
--b)
{
var c=Zd.Fa[b];
if(c.deactivate(a))
{
Zd.Fa.splice(b,1)
}

}
return true
}

function Af(a)
{
for(var b=0;
b<Zd.Fa.length;
++b)
{
if(a===Zd.Fa[b])return false
}
Zd.Fa.push(a);
return true
}

;

var $f;
function ve()
{
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.Y=false;
this.template=ve.HTML_TEMPLATE;
this.template.put("Quick_Add","Quick Add");
this.template.put("Quick_Add_Example","e.g., Dinner with Michael 7pm tomorrow");
var a=H("Add now");
this.template.put("Quick_Add_Button_Alt_Text",a);
this.qaBox.innerHTML=this.template.toString()
}

function Jm()
{
if(!$f)$f=new ve();
$f.show();
var a=m("quickadd");
setTimeout(function()
{
a.value="";
nc(a)
}

,0)
}

function Lp()
{
if(!$f)return;
$f.hide()
}

ve.HTML_TEMPLATE=new R('<div class="t2">&nbsp;
</div><div class="offset"> <div class="boxbody"> <form style="display: block;
" onsubmit="_QuickAdd();
_CloseQuickAdd();
return false;
"> <div> <label for="quickadd">$
{
Quick_Add
}
</label> <input type="text" name="quickadd" id="quickadd" class="txt"> <input type="image" src="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>'
);
ve.prototype.show=function()
{
var a=m("open-quick-add");
var b=ra(a);
this.qaBox.style.left=b.x+"px";
this.qaBox.style.top=b.y+"px";
this.qaBox.style.display="";
m("quickadd").focus();
this.Y=true;
Af(this)
}

;
ve.prototype.hide=function()
{
this.qaBox.style.display="none";
this.Y=false
}

;
ve.prototype.deactivate=function(a)
{
if(this.Y)
{
var b=na(a);
if(G(this.qaBox).contains(b))
{
return false
}
else
{
this.hide();
return true
}

}
else
{
return true
}

}

;
function Xr(a)
{
var b=a||m("quickadd").value;
if(/\S/.test(b))
{
aa("compose",["ctext",b],xa("Failed to quick add event",Mp))
}

}

function Mp(a)
{
var b=Dl(a);
Hn(b.summary,b.details,b.location,b.start,b.end,b.att_names,b.querystring,b.url,b.sharedprops,b.privprops);
return false
}

function Dl(a)
{
if(200!==zd(a))return null;
var b=eval(a.responseText)[0];
var c=
{
summary:b[1],details:b[2],location:b[3],start:b[4],end:b[5],att_names:b[6],querystring:b[7],url:b[8],sharedprops:b[9],privprops:b[10]
}
;
if(c.summary)c.summary=Ib(c.summary);
if(c.details)c.details=Ib(c.details);
return c
}

function Hn(a,b,c,d,e,f,g,h,i,j)
{
var k=ir(a,d,e);
if(k)
{
d=k.start;
e=k.end
}
var l=ql(a,b,c,d,e,f,g,h,i,j,"QUICKADD");
if(k)
{
l.push("src",B);
rl(l)
}
else
{
kf(l)
}

}

function ir(a,b,c)
{
if(!Ib(a)||!b||!c)return undefined;
var d=rb(b.toString());
var e=rb(c.toString());
var f,g,h;
if(d.Q())
{
if(!e.Q())
{
if((g=e.z()).Q()&&g.g().b()>d.b())
{
c=g.k()
}
else
{
h=D(d);
h.hour+=1;
c=h.k()
}

}

}
else if((f=d.z()).Q())
{
b=f.g();
g=e.z();
if(g.Q())
{
c=g.g();
h=D(c);
h.date+=1;
c=h.g()
}
else
{
h=D(b);
h.date+=1;
c=h.g()
}

}
else
{
return undefined
}
return
{
start:b.toString(),end:c.toString()
}

}

;

var vb=null;
function _initcp()
{
mo=new $e()
}

function $e()
{
this.U=document.createElement("DIV");
this.U.style.display="none";
this.U.style.position="absolute";
this.U.className="pbox";
document.body.appendChild(this.U);
this.C=new R(Uh);
this.E=false
}

$e.prototype.show=function(a)
{
if(Ba&&vb==null)
{
vb=Xh(window,"CP_Iframe","javascript:false");
vb.parentNode.style.display="none";
vb.style.position="absolute"
}
var b=wa(a);
var c=b?b.al:0;
if(c>=60)
{
var d="javascript:_gCalPopup().hide();
";
d+="_ES_ShowEventFormFromCalPopup('"+a+"')";
var e='<li><a href="'+d+'">Create event on this calendar</a></li>';
this.C.put("createEvent",e)
}
else
{
this.C.put("createEvent","")
}
var f="_UncheckAllCalendarsExcept("+K(a)+");
_gCalPopup().hide();
";
this.C.put("showOnlyFn",f);
this.C.put(
"showOnlyMsg","Display only this Calendar");
var g=A[a].color;
this.C.put("color",g);
var h="_ShowDetails('"+a+"')";
var i="";
if(c>=70)
{
i='<li><a href="javascript:_ShowDetails('+K(a)+',1);
_gCalPopup().hide()">'+pm+"</a></li>"
}
this.C.put("sharing",i);
this.C.put("settingsFn",h);
for(var j=Zb.length-1;
j>0;
--j)
{
var k="setcolor"+j;
var l="javascript:_AlterCalendarColor('"+a+"', "+j+")";
l+=";
_gCalPopup().hide()";
this.C.put(k,l)
}
this.U.innerHTML=this.C.toString();
var n=G(m(a+"-popup-img"));
this.U.style.left=n.x+
"px";
this.U.style.top="0px";
this.U.style.zIndex=20;
this.U.style.display="";
var o=G(this.U);
var p=o.h;
var q=n.y-m("calendars").scrollTop;
if(q+p>=document.body.clientHeight)
{
q+=n.h-p;
q+=M?9:3
}
this.U.style.top=q+"px";
if(vb)
{
vb.parentNode.style.display="";
vb.style.left=n.x+"px";
vb.style.top=q+"px";
vb.style.width=o.w-8+"px";
vb.style.height=p-8+"px";
vb.style.zIndex=this.U.style.zIndex-1;
vb.style.display=""
}
this.E=true;
Af(this)
}

;
$e.prototype.hide=function()
{
this.U.style.display="none";
if(vb)
{
vb.parentNode.style.display="none"
}
this.E=false
}

;
$e.prototype.deactivate=function(a)
{
if(this.E)
{
var b=na(a);
if(G(this.U).contains(b))
{
return false
}
else
{
this.hide();
return true
}

}
else
{
return true
}

}

;
$e.prototype.Sg=function()
{
return this.E
}

;
var Uh='<div class="cal$
{
color
}
"> <div class="t2">&nbsp;
</div> <div class="offset"> <div class="boxbody"> <ul class="caloptions"> <li><a href="javascript:$
{
showOnlyFn
}
">$
{
showOnlyMsg
}
</a></li> <li><a href="javascript:$
{
settingsFn
}
;
_gCalPopup().hide()">Calendar settings</a></li> $
{
createEvent
}
$
{
sharing
}
</ul> <div class="calcolor"> <ul>';
for(var Fh=1;
Fh<=21;
++Fh)
{
Uh+='<li><a href="$
{
setcolor'+Fh+'
}
" class="cal'+Fh+'-b">&nbsp;
</a></li>'
}
Uh+=' </ul> </div> <div class="reset">&nbsp;
</div> </div> </div> <div class="b2">&nbsp;
</div> <div class="sb2">&nbsp;
</div></div>'
;

var B;
var Kj;
function _setUid(a)
{
B=a
}

function Dn(a)
{
Kj=a
}

function mp(a,b)
{
var c=A[b];
if(c.type==a)
{
return
}
c.type=a;
Ac();
ol("ext_fav","tri_fav")
}

function mh(a,b)
{
var c=A[a];
c.hidden=!c.hidden;
var d=W(B);
d.set(a+"/hidden",c.hidden==true?"true":"false");
d.commit();
pg(!c.hidden,a);
if(!b)
{
Ac();
Sh()
}

}

function jm(a)
{
if(a.length==0)
{
return
}
var b=[];
for(var c=0;
c<a.length;
++c)
{
b.push("dtid",a[c])
}
aa(qi,b,xa(tm))
}

function Bl(a,b,c)
{
if(a&&a in A&&b!=A[a].hidden)
{
mh(a,c)
}

}

function st(a)
{
for(var b in A)
{
He(b,b==a)
}

}

function He(a,b)
{
ab();
try
{
if(!(a&&a in A&&b!=A[a].on))
{
return
}
var c=m(xi(a));
c.checked=b;
fc();
pg(c.checked,a);
var d=W(B);
d.set(a+"/off",c.checked?"false":"true");
d.commit();
if(sj)
{
zn()
}

}
finally
{
Va("SetCalendarCheckboxState")
}

}

function lp(a,b)
{
var c=A[a];
if(c.color==b)return;
c.color=b;
var d=W(B);
d.set(a+"/color",b.toString());
d.commit();
Ac();
yc();
Qa()
}

function pg(a,b)
{
var c=A[b];
c.on=!(!a);
if(a&&!Et(La,b))
{
$a(true);
oi([b],yj);
var d=wa(b);
if(!d)
{
jm([b])
}
Ac()
}
if(J.type===6)
{
Dd()
}
yc();
Zl();
Qa();
fh()
}

var A=
{

}
;
function sd(a,b)
{
if(a.id===b.id)return 0;
if(a.id===B)return-1;
if(b.id===B)return 1;
var c=b.type-a.type;
if(c)return c;
if(a.name<b.name)return-1;
if(a.name==b.name)return 0;
return 1
}

function $m(a)
{
var b=wa(a);
var c=b&&b.cn?b.cn:A[a].name;
var d=H(c);
var e=a!=B;
var f=b&&(a==B&&b.type==0||b.al>=70&&b.type==2);
var g=[];
var h=-1;
var i=-1;
if(e)
{
h=0;
g.push(F("Remove"))
}
if(f)
{
i=h+1;
g.push(F("Delete"))
}
g.push(F(ac));
var j;
var k;
if(f)
{
if(e)
{
j="Remove or Delete Calendar";
k="You can choose to remove <b>"+d+"</b> from your list of calendars,<BR>\n or permanently delete the <b>"+d+"</b> calendar."
}
else
{
j="Delete Calendar";
k="Are you sure you want to permanently delete your primary calendar <b>"
+d+"</b>?\n Deleting this calendar will cancel your calendar account and permanently delete all of your calendar data."
}

}
else
{
j="Remove Calendar";
k="Are you sure you want to remove <b>"+d+"</b>\n from your list of calendars?"
}
var l=function(n)
{
if(n!==i&&n!==h)
{
return
}
if(a==B)
{
if(confirm("Are you sure you want to delete all information on your primary calendar?\n This will delete your Google Calendar account and log you out.\n You will have to sign up for Google Calendar again to continue using the product."
))
{
aa(wd,["cid",a,"ltyp",A[a].type,"lact","DELETE"],hr)
}
return
}
if(n==h)
{
an(a)
}
else if(n==i)
{
aa(wd,["cid",a,"ltyp",A[a].type,"lact","DELETE"],xa(Si));
_RemoveCalFromClient(a)
}

}

;
Xa(l,j,k,g)
}

function an(a)
{
aa(wd,["cid",a,"ltyp",A[a].type,"lact","REMOVE"],xa(Si))
}

function hr()
{
window.location="http://www.google.com/accounts/";
return false
}

function _HandleRemoveCalendarResult(a,b)
{
if(typeof b=="string")
{
b=b=="true"
}
if(b)
{
_RemoveCalFromClient(a)
}
else
{
var c=function(g)
{
if(g==0)
{
aa(wd,["cid",a,"ltyp",A[a].type,"lact","DELETE"],xa(Si));
_RemoveCalFromClient(a)
}

}

;
var d=wa(a);
var e=d&&d.cn?d.cn:A[a].name;
var f=H(e);
Xa(c,"Remove failed","You were not able to remove <B>"+f+"</B> from your\nlist of calendars because you are the only person left with full access to the calendar.<BR>\nYou may either grant full access to another user to carry on the legacy of this calendar,\nor you may delete it altogether.",[F("Delete"),F(ac)])
}

}

function _RemoveCalFromClient(a)
{
pg(false,a);
delete A[a];
gi(a);
Ac();
bc();
Jg(1)
}

function rs(a)
{
var b=null;
if(jl(a))
{
b=Ag(a)
}
else
{
b=hi(a)
}
if(b)
{
$m(b)
}

}

function Bi(a)
{
var b=a.name;
var c=wa(a.id);
if(c&&c.cn)b=c.cn;
return b
}

function Ac()
{
var a=[];
for(var b in A)
{
if(!A[b].hidden)
{
a.push(A[b])
}

}
a.sort(sd);
var c="";
var d="";
var e="";
var f="";
for(var b=0;
b<a.length;
++b)
{
var g="";
var h=a[b];
var i=Bi(h);
i=H(i.replace(/([\W_])([^\W_])/g,"$1\u00ad$2")).replace(/\255/g,"<WBR>");
g+=si(h,i);
if(h.id==B)
{
c+=g
}
else if(2==h.type)
{
d+=g
}
else if(1==h.type)
{
f+=g
}
else if(0==h.type)
{
e+=g
}

}
var j='<font size=-1>My Calendars</font> <img src="images/btn_add.gif" width=14 height=14 onclick="_newCalendar()" style="cursor:pointer"><br>'+c+d;
j+=
'<div style="padding-top:4px"><font size=-1>Other Calendars</font> <img src="images/btn_add.gif" width=14 height=14 onclick="_AddCalendar(0)" style="cursor:pointer"></div>'+f+e;
m("todrawfav").innerHTML=j
}

function vs()
{
var a=m("searchAddCal");
var b=Ib(a.value);
if(b=="")
{
a.value=Qi;
a.style.color="gray"
}

}

function Qu()
{
var a='<table width="100%" cellpadding="0" cellspacing="0" style="margin-top:3px;
"><tr><td colspan="3"><input value="'+Qi+'" id="searchAddCal" onblur="'+fa(vs)+'()" style="width: 95%;
font-size: 90%;
color: gray;
"></td></tr></table>';
m("bottomfav").innerHTML=a;
m("searchAddCal").onfocus=function()
{
var e=m("searchAddCal");
if(Qi==e.value)
{
e.value="";
e.style.color="black"
}

}

;
var b=new uc();
b.oncomplete=function(e,f,g,h)
{
var i=g.value;
if(e)
{
var j=Fa[i];
if(j)
{
Rg(j,false);
g.value="";
return
}

}
if(!Ib(i))
{
return
}
var k;
var l;
if(!(!(l=i.match(gm))))
{
k=l[0];
if(".?".indexOf(k.charAt(k.length-1))>=0)
{
k=k.substring(0,k.length-1)
}
var n=Fo(k);
if(!n)
{
if(k.match(Cr))
{
Ho(i);
g.value="";
return
}
else
{
if(k.indexOf(":")<0)
{
k="http://"+k
}
$j(i,false);
g.value="";
return
}

}

}
on(i,0);
g.value=""
}

;
var c=new uc();
c.oncomplete=function(e,f,g,h)
{
if(e)
{
_addPersonLevel(h,m("newAccessLevel").value)
}

}

;
var d=new uc();
d.oncomplete=function(e,f,g,h)
{
if(e)
{
_loadCalendarByName(h)
}

}

;
_ac_register(function(e,f)
{
if(e.id=="newAccessPerson")return c;
if(e.id=="searchAddCal")return b;
if(e.id=="addcalbox")return d
}

)
}

function _initCccBar()
{

}

function kt(a)
{
var b=["curl",a,"cimp","false","cpub","true"];
aa(Fl,b,undefined)
}

function Rg(a,b)
{
if(a in A)
{
Bl(a,false);
He(a,true);
return
}
var c=["cid",a,"ltyp",0,"lact","ADD","cpub",b?"true":"false"];
aa(wd,c,xa("Failed to load calendar"))
}

var mo;
function xi(a)
{
return"checkbox-"+a
}

function si(a,b)
{
var c=a.id;
var d=xi(c);
var e=a.color;
var f=a.on;
var g="if (_GoToMain())
{
this.checked = !this.checked;
return;

}
_SetCalendarCheckboxState("+K(c)+", (_$(_GetCalListingCboxId("+K(c)+")).checked));
";
var h;
if(wa(c))
{
h=wa(c).al>=60
}
else
{
h=c==B||2==a.type
}
var i=si.HTML_TEMPLATE;
i.put("cboxId",d);
i.put("onclick",g);
i.put("ondblclick",g);
i.put("CHECKED",f?"CHECKED":"");
i.put("color",e);
i.put("bgcolor",Zb[e][h?2:1]);
i.put("cboxId",d);
i.put("name",b);
i.put("itemId",c);
i.put("escapedItemId"
,K(c));
return i.toString()
}

si.HTML_TEMPLATE=new R('<table cellspacing="0" cellpadding="0" style="margin-top: 3px;
width: 100%"><tr> <td style="width: 20px;
background:white;
vertical-align:top;
"> <input type="CHECKBOX" id="$
{
cboxId
}
" onclick="$
{
onclick
}
" ondblclick="$
{
ondblclick
}
" $
{
CHECKED
}
> </td> <td class="chip cal$
{
color
}
" style="width:95%"> <div style="background-color: $
{
bgcolor
}
;
border-color: $
{
bgcolor
}
" class="t2">&nbsp;
</div> <div style="padding-left: 3px;
background-color: $
{
bgcolor
}
;
padding-bottom: 1px;
white-space: normal;
"> <label for="$
{
cboxId
}
" class="calMenuLabel" style="text-overflow:ellipsis;
margin:0;
" onmouseout="this.style.textDecoration=\'none\'" onmouseover="this.style.textDecoration=\'underline\'"> $
{
name
}
</label> </div> <div class="b2" style="background-color: $
{
bgcolor
}
;
border-color: $
{
bgcolor
}
" >&nbsp;
</div> </td> <td style="width:19px" class="calMenuImgCell" id="$
{
itemId
}
-popup" onmousedown="if (!_GoToMain()) _gCalPopup().show($
{
escapedItemId
}
)"> <img width=15 height=15 style="padding-top:1px;
margin-left: -1px;
" src="images/btn_menu$
{
color
}
.gif" id="$
{
itemId
}
-popup-img"> </td></tr></table>'
);
var Qj=false;
var Pj=null;
var Oj=false;
function bc(a)
{
Qj=true;
if(a)
{
if(typeof a=="string")
{
a=
{
type:a
}

}
Pj=a
}

}

var no=false;
function _RefreshCalendarWhenDisplayedNext()
{
if(Ki())
{
if(Vb)
{
Qa()
}
else
{
Qa()
}

}
else
{
bc()
}
fh()
}

function qb()
{
if(!Ki()&&rd())
{
if(no)
{
Uo();
return
}
if(Qj)
{
Qj=false;
var a=Pj;
Pj=null;
var b=Oj;
Oj=false;
if(a||b)
{
if(!a)a=
{
type:qd[J.type],extent:J.extent
}
;
if(a.type.match(/^custom/))
{
af()
}
else
{
Od(a.type,a.extent,b)
}

}
else
{
xj();
Dd();
Qa()
}

}
else
{
xj()
}
return true
}
return false
}

function Vq(a,b,c,d,e,f)
{
var g=
{

}
;
g.name=a;
g.id=b;
g.color=c;
g.type=d;
g.on=!e;
g.hidden=f;
A[b]=g
}

var Uj=new Date();
var po=100;
var qo=40;
var gg=false;
var bg=false;
function vi()
{
if(bg)
{
return function()
{

}


}
var a=pc.resizeId;
return function()
{
pc(a)
}


}

Ma(window,"resize",function()
{
if(bg)
{
return
}
var a=new Date();
if(a.getTime()-Uj.getTime()>=po)
{
setTimeout(vi(),po)
}
Uj=a;
if(Cc())
{
at()
}

}

);
function pc(a)
{
if(bg)
{
return
}
if(a<pc.resizeId)
{
return
}
var b=new Date();
if(b.getTime()-Uj.getTime()<qo)
{
setTimeout(vi(),qo);
return
}
var c=m("gridcontainer");
if(c.offsetHeight==0)
{
gg=true;
return
}
bg=true;
++pc.resizeId;
try
{
var d=m("gridcontainer");
var e=d.scrollTop;
if(!ze()&&!(M&&u.l))
{
return
}
S("Invalidate in window.resize");
Dd();
Qa();
d.scrollTop=e
}
finally
{
bg=false
}

}

pc.resizeId=0;
function Kc(a)
{
ab();
try
{
Og();
u.ob(a);
Qa()
}
finally
{
Va(u.toString()+".AlterPeriod("+a+")")
}

}

var Wd;
function ri(a)
{
if(!A[a.src]||!A[a.src].on)
{
return false
}
if(a.flags&1)
{
return false
}
var b=a.att[a.src];
if(undefined===b||3!=b||Kj||J.type==6)
{
return true
}
else
{
return false
}

}

ri.toCacheKey=function()
{
return"att:"+ce.join(" ")+"/"+Kj
}

;
function Qq(a)
{
return true
}

Qq.toCacheKey=function()
{
return"pass"
}

;
var Zb=[,["#A32929","#CC3333","#D96666","#E69999","#F0C2C2"],["#B1365F","#DD4477","#E67399","#EEA2BB","#F5C7D6"],["#7A367A","#994499","#B373B3","#CCA2CC","#E1C7E1"],["#5229A3","#6633CC","#8C66D9","#B399E6","#D1C2F0"],["#29527A","#336699","#668CB3","#99B3CC","#C2D1E1"],["#2952A3","#3366CC","#668CD9","#99B3E6","#C2D1F0"],["#1B887A","#22AA99","#59BFB3","#91D5CC","#BDE6E1"],["#28754E","#329262","#65AD89","#99C9B1","#C2DFD0"],["#0D7813","#109618","#4CB052","#88CB8C","#B8E0BA"],["#528800","#66AA00","#8CBF40"
,"#B3D580","#D1E6B3"],["#88880E","#AAAA11","#BFBF4D","#D5D588","#E6E6B8"],["#AB8B00","#D6AE00","#E0C240","#EBD780","#F3E7B3"],["#BE6D00","#EE8800","#F2A640","#F7C480","#FADCB3"],["#B1440E","#DD5511","#E6804D","#EEAA88","#F5CCB8"],["#865A5A","#A87070","#BE9494","#D4B8B8","#E5D4D4"],["#705770","#8C6D8C","#A992A9","#C6B6C6","#DDD3DD"],["#4E5D6C","#627487","#8997A5","#B1BAC3","#D0D6DB"],["#5A6986","#7083A8","#94A2BE","#B8C1D4","#D4DAE5"],["#4A716C","#5C8D87","#85AAA5","#AEC6C3","#CEDDDB"],["#6E6E41",
"#898951","#A7A77D","#C4C4A8","#DCDCCB"],["#8D6F47","#B08B59","#C4A883","#D8C5AC","#E7DCCE"]];
var Ud="#c3d9ff";
var bo="#74DD82";
var Jt="#FAD163";
var fg=6;
function er()
{
var a=fg;
fg+=4;
if(fg>=Zb.length)
{
fg=fg%(Zb.length-1)
}
return a
}

function Xe(a,b,c)
{
Vj.jf(a,b,c);
if(Xe.Ld)
{
Vj.Ne()
}

}

Xe.Ld=false;
Xe._SetAddImmediately=function(a)
{
Xe.Ld=a
}

;
function Cf()
{
this.people=[]
}

var Vj=new Cf();
Cf.prototype.jf=function(a,b,c)
{
if(A[b])
{
if(c!=A[b].type)
{
mp(c,b);
return
}
if(!A[b].on)
{
pg(true,b)
}
return
}
var d=
{

}
;
d.name=a;
d.id=b;
d.type=c;
var e=W(B);
d.hidden=e.get(b+"/hidden","false")=="true";
if(d.hidden)
{
d.off=true
}
else
{
d.off=e.get(b+"/off","false")=="true"
}
this.people.push(d)
}

;
Cf.prototype.Ne=function()
{
var a=[];
var b=[];
var c=W(B);
for(var d=0;
d<this.people.length;
++d)
{
var e=this.people[d];
var f=e.id;
if(A[f])
{
continue
}
if(!e.hidden||e.type==2)
{
b.push(f);
if(!e.off)
{
a.push(f)
}

}
var g=undefined;
if(!(g=c.ia(f+"/color",0)))
{
var h=
{

}
;
for(var i in A)
{
h[A[i].color]=true
}
var j=4;
while(j>0)
{
g=er();
if(!h[g])
{
break
}
--j
}

}
pb(uf(g));
c.set(f+"/color",g.toString());
Vq(e.name,f,g,e.type,!(!e.off),!(!e.hidden))
}
c.commit();
jm(b);
ps(a);
ol("ext_fav","tri_fav");
Ac();
if(u)
{
Zl();
yc();
Qa()
}
this.people=
[]
}

;
function ol(a,b)
{
var c=m(a);
var d=m(b);
c.style.display="";
if(a in Ie.Ib)
{
var e=Ie.Ib[a];
for(var f=0;
f<e.length;
++f)
{
m(e[f]).style.display=""
}

}
d.src="images/opentriangle.gif"
}

function Ie(a,b)
{
var c=m(a);
var d=m(b);
var e=c.style.display=="none";
var f=e?"":"none";
c.style.display=f;
if(a in Ie.Ib)
{
var g=Ie.Ib[a];
for(var h=0;
h<g.length;
++h)
{
m(g[h]).style.display=f
}

}
if(e)
{
d.src="images/opentriangle.gif"
}
else
{
d.src="images/triangle.gif"
}

}

Ie.Ib=
{
ext_fav:["calendars","calendarsBottomChrome"]
}
;
var uu=30;
function Wh(a)
{
if(!a)
{
var b="";
var c=O.now().b();
for(var d in Y._allEids())
{
var e=Y._byEid(d);
var f=Nl(e.privprops,"eventAlert","undef");
if(f=="false")
{
continue
}
if(f=="undef"&&!W(B).Z("eventAlert",true))
{
continue
}
if(B!=e.src||e.att[B]==3||(e.flags&1)==1||(e.flags&8)==8)
{
continue
}
var g=hn(e)*60;
if(g<0)
{
continue
}
var h=e.start.b();
if(h>c&&h-c<g)
{
e.flags|=8;
b+=lo(e.text)+" is starting at "+ub(e.start);
if(!(!e.location))
{
b+=" in "+H(e.location)

}
b+="\n"
}

}
if(b.length>0)
{
alert(lh(b))
}

}
setTimeout(Gp,uu*1000)
}

function Gp()
{
Wh(false)
}

Wh(true);
function ze()
{
if(E)
{
E.hide()
}
var a=m("gridcontainer");
var b=ra(a);
var c=document.documentElement.clientHeight;
var d=Math.max(250,c-b.y-ze.zd);
var e=u&&(u.l||fb());
if(e)
{
tt()
}
var f=Math.abs(d-a.offsetHeight)>=5;
if(f)
{
a.style.height=d+"px"
}
Sh();
return f
}

ze.zd=M?18:16;
function tt()
{
fj(true);
var a=ra(m("grid")).x;
for(var b in Wb)
{
var c=Wb[b];
if(Ia(c.e)||fb())
{
var d=m(b);
var e=ej(c,a);
d.style.left=Math.max(e.left,0)+"px";
d.style.width=Math.max(e.width,0)+"px"
}

}

}

function Sh()
{
var a=G(m("nt_0"));
var b=a.y+a.h;
var c=m("ext_fav");
var d=dg(c);
var e=document.documentElement.clientHeight-b;
e-=ze.zd;
e-=dg(m("calendarsBottomChrome"));
var f=Ko(m("nt_0"));
e=Math.max(e,40);
var g=m("calendars");
if(d>e)
{
g.style.height=e+"px";
if(Ba)
{
g.style.overflow="-moz-scrollbars-vertical"
}
else
{
g.style.overflowX="hidden";
g.style.overflowY="scroll";
c.style.width=f-16+"px";
g.style.width=f+"px"
}

}
else
{
g.style.height="";
if(Ba)
{
g.style.overflow=""
}
else
{
g.style.overflowX="";
g.style.overflowY=
"";
c.style.width="";
g.style.width=""
}

}

}

var zh=true;
var rc=null;
function rd()
{
if(rc&&rc())
{
return false
}
rc=null;
return true
}

function jh(a,b)
{
if(!rd())
{
return false
}
var c=m("cover");
var d=m("mainbody");
if(E)E.hide();
zq();
if(!b)
{
b=Jt
}
Mc("cover",b);
d.style.display="none";
c.style.display="";
document.body.scroll="auto";
var e=m("coverinner");
e.innerHTML=a;
if(zh)
{
gg=true;
zh=false
}
return true
}

function zq()
{
if(Q)
{
Q.sa(false);
Q.Ab(0,qb)
}

}

function Mc(a,b)
{
Mc.Qc=b;
Ik(b);
if(a=="main")return;
for(var c=1;
c<7;
++c)
{
var d=m("chrome_"+a+c);
if(d)
{
d.style.backgroundColor=b;
d.style.borderColor=b
}

}

}

Mc.Qc=Ud;
function Ik(a,b)
{
var c=Mc.Qc!==a;
if(!b&&c)return;
var d=m("dp_0_header");
if(d)
{
d.style.background=a;
var e=["","_t1","_t2","_b2","_b1","_dow"];
for(var f=0;
f<e.length;
++f)
{
m("dp_0"+e[f]).style.background=a
}

}

}

function Ki()
{
var a=m("mainbody");
return a.style.display!="none"
}

function Fn(a,b)
{
if(!rd())
{
return false
}
var c=m("cover");
var d=m("mainbody");
if(a)
{
if(E)
{
E.hide()
}
if(Bc())
{
Mc("cover",bo)
}
else
{
Mc("cover",Ud)
}
d.style.display="none";
c.style.display="";
document.body.scroll="auto";
Eg(b);
if(zh)
{
gg=true;
zh=false
}

}
else
{
c.style.display="none";
d.style.display="";
if(u&&!Q.Oa())
{
var e=D(I);
var f=e.g();
e.date+=u.I-1;
var g=e.g();
Q.ca(f,g,false)
}
if(Q)Q.Ab(null,Nj);
document.body.scroll="no";
if(gg)
{
gg=false;
pc(vi())
}

}
return true
}

function fc()
{
Fi();
if(E)
{
E.hide()
}

}

function Og()
{
fc();
qb()
}

var jk=false;
function Hf()
{
if(jk)
{
return
}
$a(true);
var a=function()
{
window.setTimeout(function()
{
jk=false;
$a(false)
}

,0)
}

;
jk=true;
var b=ao.getPingData();
wc("ping",undefined,bj(b),xa("Failed to refresh with the server",a))
}

function xj()
{
bb(function()
{
qb()
}

,"Calendar Main View","ShowMainView");
Mc("main",Ud);
if(!(Q&&Q.changingMode&&Cc()))
{
Fn(false,"")
}

}

function Yq()
{
return'<div id=colheaders></div><div class="inset grid" id=allDayGrid onmousedown="_HideBubble(event)" onclick='+fa(Hm)+"(event)></div><div id=gridcontainer><div id=calowner></div></div>"
}

function yd(a)
{
var b=yd.MAIN_TEMPATE;
b.put("prefix",a);
if(a=="cover")
{
b.put("NAVIGATION_TEMPLATE","")
}
else
{
var c=yd.NAVIGATION_TEMPLATE;
c.put("prefix",a);
c.put("dateNavigationTable",wi());
c.put("modeLinkTable",Zq());
b.put("NAVIGATION_TEMPLATE",c.toString())
}
var d=yd.ROUND_TOP_CORNERS;
d.put("prefix",a);
d.put("chrome_blue",Ud);
b.put("ROUND_TOP_CORNERS",d.toString());
return b.toString()
}

yd.MAIN_TEMPATE=new R('<DIV class="printAlignLeft" id="co">$
{
NAVIGATION_TEMPLATE
}
$
{
ROUND_TOP_CORNERS
}
<DIV id="chrome_$
{
prefix
}
2" style="background: '+Ud+' none repeat scroll 0%;
" class="printborder">');
yd.NAVIGATION_TEMPLATE=new R('<DIV id="tc_top"><TABLE id="chrome_$
{
prefix
}
1" cellpadding="0" cellspacing="0" style="background: white;
vertical-align: bottom;
width: 100%;
"><TR> <TD>$
{
dateNavigationTable
}
</TD> <TD style="float: right;
text-align: right;
">$
{
modeLinkTable
}
</TD></TR></TABLE></DIV>'
);
yd.ROUND_TOP_CORNERS=new R('<div style="width: 100%;
height: 2px;
"> <div style="background: $
{
chrome_blue
}
" class="t1" id="chrome_$
{
prefix
}
4">&nbsp;
</div> <div style="background: $
{
chrome_blue
}
" class="t2" id="chrome_$
{
prefix
}
5">&nbsp;
</div></div>');
function wi()
{
var a=wi.rb;
var b=fa(Kc);
var c=M?' ondblclick="'+b+'(-1);
return false;
"':"";
a.put("ondblclick_prev",c);
var d=M?' ondblclick="'+b+'(1);
return false;
"':"";
a.put("ondblclick_next",d);
a.put("today_button_label","Today");
a.put(
"loading","(loading)");
a.put("advfunc",b);
return a.toString()
}

wi.rb=new R('<table cellpadding=0 cellspacing=0 id=t1> <tr> <td class=noprint> <img class="navbutton" src="images/btn_prev.gif" style="vertical-align: middle;
padding-left: 2px;
" height=17 width=33 onmousedown="$
{
advfunc
}
(-1);
return false;
" $
{
ondblclick_prev
}
> </td> <td class=noprint> <img class="navbutton" src="images/btn_next.gif" style="vertical-align: middle;
padding-left:2px;
padding-right:2px;
" height=17 width=33 onmousedown="$
{
advfunc
}
(1);
return false;
" $
{
ondblclick_next
}
> </td> <td class=noprint> <button onclick="$
{
advfunc
}
(0);
return false;
" id="todayButton" style="font-size:85%;
vertical-align:middle;
padding:0px 1px;
"> $
{
today_button_label
}
</button> </td> <td><nobr>&nbsp;
<span id="dateunderlay">$
{
loading
}
</span>&nbsp;
</nobr></td> </tr></table>'
);
var rg=["custom,2",ue(2),"custom,3",ue(3),"custom,4",ue(4),"custom,5",ue(5),"custom,6",ue(6),"custom,7",ue(7),"custom,14",Yi(2),"custom,21",Yi(3),"custom,28",Yi(4)];
var Mj=
{

}
;
for(var Yj=0;
Yj<rg.length;
)
{
var su=rg[Yj++];
var ru=rg[Yj++];
Mj[su]=ru
}
function zi(a)
{
if(!a)
{
a=W(B).get(Je,nh)
}
return Mj[a]
}

function _SetCustomModeLabel(a)
{
var b=zi(a);
var c=m("customModeLabel");
if(c)c.innerHTML=H(b)
}

function Zq()
{
var a=W(B).get(Je,nh);
var b=Mj[a];
return'<table cellpadding=0 cellspacing=0><tr><td id=printlink><img src=images/icon_print.gif onclick=_cal_print() title="Print my calendar (shows preview)" width=16 height=16><div id=printmsg class=printonly>To see a more concise version of your calendar, optimized for printing, click\nthe printer icon to the left (Acrobat Reader req\'d)</div></td>'+Rc("Search Results","search")+Rc("Day","day")+Rc("Week","week")+Rc("Month","month")+Rc(b,a)+Rc("Agenda"
,"list")+"</tr></table>"
}

function ui(a,b)
{
var c=ui.rb;
c.put("bottomchrome",a);
c.put("prefix",b);
return c.toString()
}

ui.rb=new R('</DIV><TABLE id="chrome_$
{
prefix
}
3" width="100%" cellspacing="0" cellpadding="0" style="background: '+Ud+' none repeat scroll 0%;
"> <TR height=2> <TD></TD> </TR> <TR> <TD width=8></TD> <TD>$
{
bottomchrome
}
</TD> </TR> <TR height="4"><TD></TD></TR> <TR height="2"><TD class="bl"></TD><TD class="br"></TD></TR></TABLE></DIV>');
function Fi()
{
var a=m("nt1");
if(a&&a.style.visibility!="hidden")
{
a.style.visibility="hidden"
}

}

function ob(a)
{
if(typeof a=="object")
{
a=a.join("<br>")
}
var b=m("nt1");
if(b&&b.style.visibility!="")
{
b.style.visibility=""
}
var c=m("nt2");
if(c)
{
c.innerHTML=a
}

}

function Xq()
{
return'<div id=lo style="position:absolute;
z-index:3;
display:none;
background:#c44;
color:white;
font-size:75%;
top:1px;
right:16px;
padding:2px">'+Xg+"</div>"
}

function $a(a)
{
m("lo").style.display=a?"":"none"
}

;
var nr=65;
var or=67;
var pr=68;
var qr=74;
var rr=75;
var sr=77;
var tr=78;
var ur=80;
var vr=81;
var wr=83;
var xr=84;
var yr=85;
var zr=87;
var Ar=88;
function Oq(a)
{
var b=a.srcElement?a.srcElement:a.target;
if(Hh&&b&&b.nodeType==3)
{
b=b.parentNode
}
return b
}

function Nq(a,b)
{
if(b.blur)
{
b.blur()
}
a.focus()
}

function io(a)
{
var b=
{

}
;
b.finishedProcessing=false;
if(!a)
{
a=window.event
}
var c=oe(a);
if(a.altKey||a.ctrlKey||a.metaKey)
{
b.finishedProcessing=true;
return b
}
var d=Oq(a);
var e=d.tagName;
if(e=="TEXTAREA"||e=="SELECT"||e=="INPUT"&&d.type!="checkbox"||e=="BUTTON")
{
if(c==27)
{
if(!(e=="TEXTAREA"||e=="INPUT"&&(d.type=="text"||d.type=="password")))
{
Nq(window,d);
b.finishedProcessing=true;
b.returnValue=false;
return b
}

}
else
{
b.finishedProcessing=true;
return b
}

}
b.keycode=c;
return b
}

function Gt(a)
{
var b=io(a);
if(b.finishedProcessing)
{
return b.returnValue
}
var c=false;
if(Bc())
{
if(cd)
{
if(cd.handleKeyDown(a))
{
return
}

}

}
switch(b.keycode)
{
case vr:
{
if(Bc())
{
pj()
}
Jm();
c=true
}
break;
case 191:
{
if(Bc())
{
pj()
}
nc("maininput");
c=true
}
break;
case qr:case ur:if(Cc())
{
Pf(-1)
}
else
{
Kc(-1);
c=true
}
break;
case rr:case tr:if(Cc())
{
Pf(1)
}
else
{
Kc(1);
c=true
}
break;
case xr:if(Cc())
{
Pf(0)
}
else
{
Kc(0);
c=true
}
break;
case pr:if(Cc())
{
Ec(false)
}
oc("day");
c=true;
break;
case nr:if(Cc())
{
Ec(false)
}
oc("list");
c=true;
break;

case sr:if(Cc())
{
Ec(false)
}
oc("month");
c=true;
break;
case zr:if(Cc())
{
Ec(false)
}
oc("week");
c=true;
break;
case Ar:af();
c=true;
break;
case or:if(Bc())
{
Ec(false)
}
Ok();
c=true;
break;
case wr:if(Bc())
{
Ec(false)
}
Jg(false);
c=true;
break;
case 8:case 27:case yr:if(Bc())
{
Ec(false)
}
bf();
Og();
c=true;
break
}
return!c
}

function Ht(a)
{
var b=io(a);
if(b.finishedProcessing)
{
return b.returnValue
}
else
{
return true
}

}

function Fp(a)
{
var b=D(I);
b.date+=a;
I=(ha=b.k());
oc("day")
}

function af()
{
var a=W(B).get(Je,nh);
var b=parseInt(a.match(/custom,(\d+)/)[1],10);
var c=ya;
if(b>7)
{
var d=W(B).ia(jb,md("0"));
var e=Bd(c)+7;
e=(e-d)%7;
var f=be(c.year,c.month,c.date-e);
c=f.g()
}
I=(ha=c);
oc("compact,"+b,true);
_SetTodayButton(true);
In(a)
}

function Nu(a)
{
if(u.T()&4)
{
var b=a.currentTarget.scrollTop+a.detail*12;
a.currentTarget.scrollTop=b<0?0:b;
a.preventDefault();
Qm()
}

}

function cu(a)
{
mt();
if(document.body.addEventListener)
{
try
{
a.addEventListener("DOMMouseScroll",Nu,false)
}
catch(b)
{
alert("failed to add FF scrolling")
}

}

}

var Dh=[];
var kd=-1;
var Xj=false;
var yo=false;
function $t(a)
{
if(a===kd)
{
return
}
if(!Dh[a])
{
return
}
var b=a;
kd=a;
Xj=true;
var c=a<b;
Dh[b].closure(c);
Xj=false
}

function bb(a,b,c)
{
if(Xj)
{
return
}
if(kd>=0&&Dh[kd].id==c)
{
return
}
if(!yo)
{
yo=true;
bb(Jl(J.type,J.extent,undefined),"Welcome to Calendar","Welcome to Calendar")
}
++kd;
Dh[kd]=
{
id:c,name:b,closure:a
}
;
if(document.frames)
{
var d=document.frames["historyFrame"].document;
d.open();
d.write("<html><head><title>"+b+"</title></head>");
d.write('<body onload="window.parent._goHist('+kd+')">'+b+"</body></html>");
d.close()
}
else
{
m("historyFrame").src="echo.html#"+kd
}

}

function Cb(a)
{
if(a.flags&64)
{
return false
}
else if(a.flags&257)
{
return true
}
else
{
return false
}

}

function $l(a)
{
return!(!(a.flags&512))
}

function Nl(a,b,c)
{
if(!a)
{
return c
}
for(var d=1;
d<a.length;
d+=2)
{
if(a[d-1]==b)
{
return a[d]
}

}
return c
}

function _SetInputBox(a,b)
{
var c=m(a);
if(c)
{
c.value=b
}

}

;

var Le=[];
var Fa=new Object();
var Gg=
{

}
;
function Pr(a)
{
for(var b=0;
b<a.length;
b++)
{
var c=a[b][0];
if(c in Fa)
{
continue
}
var d=parseInt(a[b][1],10);
var e=a[b][2];
var f=a[b][3];
if(mr(d))
{
Le.push([f,e,c]);
Gg[f]=c
}
zt(Kk(e,f),c)
}

}

function zt(a,b)
{
if(!(b in Fa))
{
Fa[b]=a;
Fa[a]=b
}

}

function Pq(a)
{
var b=/^([^\(\|<]*)/;
var c=b.exec(a);
if(c)return c[1];
else return a
}

function Cl(a)
{
var b=/[\<\(](.*)[\>\)]/;
var c=b.exec(a);
if(c)return c[1];
else return null
}

function mr(a)
{
if(0==a||1==a||3==a)
{
return true
}
return false
}

;

var Mh=
{

}
;
function Gc(a)
{
this.Tc=false;
this.vg=a;
this.N=
{

}
;
this.td=
{

}
;
this.$=
{

}

}

Gc.prototype.get=function(a,b)
{
var c=this.N[a];
return undefined!==c?c:b
}

;
Gc.prototype.Z=function(a,b)
{
var c=this.N[a];
return undefined!==c?yb(c):b
}

;
Gc.prototype.ia=function(a,b)
{
var c=this.N[a];
return undefined!==c?md(c):b
}

;
Gc.prototype.set=function(a,b,c)
{
var d=this.N[a]!=b;
if(d)
{
this.N[a]=b;
if(this.Tc)
{
this.td[a]=0
}
S("Set user preference <tt>"+a+"</tt> to <tt>"+H(b)+"</tt>")
}
this.$[a]=!(!c);
return d
}

;
Gc.prototype.imply=function(a,b)
{
if(this.N[a]===undefined||this.$[a])
{
this.set(a,b,true)
}

}

;
Gc.prototype.he=function(a)
{
return!(!this.$[a])
}

;
function yb(a)
{
return"true"==a
}

function md(a)
{
return parseFloat(a)
}

function Kn(a,b)
{
var c=[];
if(!a.Tc)
{
for(var d in a.N)
{
if(a.$[d])
{
continue
}
var e=a.N[d];
c.push("eup",d+":"+e);
if(b)
{
b.N[d]=e;
b.$[d]=false;
delete b.uncommited[d]
}

}
if(c.length)
{
c.push("lstor");
c.push("true")
}

}
else
{
for(var d in a.td)
{
var e=a.N[d],f=a.$[d];
c.push(f?"iup":"eup",d+":"+e);
if(b&&(!f||b.$[d]))
{
b.N[d]=e;
b.$[d]=f;
delete b.td[d]
}

}

}
return c
}

Gc.prototype.commit=function(a,b)
{
var c=Kn(this,a);
if(c.length)
{
aa(Ig,c,xa("Failed to save preferences",b))
}

}

;
Gc.prototype.load=function()
{
if(undefined!==Mh[this.vg])
{
return
}
aa(Ig,["lstor","true"],xa("Failed to load preferences"))
}

;
var Tu=
{
uid:-1,loaded:false,get:function(a,b)
{
return b
}

,Z:function(a,b)
{
return b
}

,ia:function(a,b)
{
return b
}

,set:function()
{
return false
}

,imply:function()
{

}

,commit:function()
{

}

,load:function()
{

}

,he:function()
{
return false
}


}
;
function W(a)
{
var b=Mh[a];
return b!==undefined?b:Tu
}

function rt(a,b)
{
var c=new Gc(a);
c.Tc=true;
for(var d=0;
d<b.length;
d++)
{
var e=b[d];
var f=e[0],g=e[1],h="true"==e[2];
c.N[f]=g;
c.$[f]=h
}
var i=Mh[a];
if(undefined!==i)
{
for(var j in i.N)
{
if(undefined===c.N[j])
{
c.N[j]=i.N[j];
c.$[j]=i.$[j]
}

}

}
Mh[a]=c
}

function dm()
{
return W(B).Z(Sb,yb(ed))
}

function Ni()
{
switch(W(B).get(Hc,"MDY"))
{
case "YMD":case "MDY":return true;
default:return false
}

}

function _inferPrefs(a)
{
var b=W(a);
var c=new Date(1970,12,29,13,0,0,0);
if(Do&&Ba)
{
b.imply(Sb,ed)
}
else
{
var d=c.toLocaleTimeString();
b.imply(Sb,d.indexOf("13")>=0?"true":"false")
}
var e=c.toLocaleDateString();
var f=e.indexOf("12"),g=e.indexOf("29"),h=e.indexOf("70");
if(f<0&&g>=0)
{
var i=(new Date(1970,11,29,13,0,0,0)).toLocaleDateString();
var j=Math.min(e.length,i.length);
for(var k=0;
k<j;
k++)
{
if(e.charCodeAt(k)!=i.charCodeAt(k))
{
f=k;
break
}

}

}
if((f|g)>=0)
{
b.imply(zj,g<f?"true":"false");
var l="MDY";
if(f<
g)
{
if(h>=0&&h<f)
{
l="YMD"
}
else
{
l="MDY"
}

}
else
{
l="DMY"
}
b.imply(Hc,l)
}
if(!b.he(zj))
{
b.imply(Hc,b.Z(zj)?"DMY":"MDY")
}
b.imply(fd,"false");
b.imply(oh,"week");
b.imply(Rd,"true");
b.imply("eventAlert","true");
b.imply("EMAIL.EventInvite","true");
b.imply("EMAIL.EventChange","true");
b.imply("EMAIL.EventCancellation","true")
}

;

var ck=false;
var Mo=0;
var wu=0;
var ig=new Array();
var jg=new Array();
var bk=180000;
var No=undefined;
function Lm(a)
{
ig.push(a);
jg.push(-1)
}

function Tr(a)
{
bk=a
}

function Ur(a)
{
No=a
}

function Vr()
{
if(!ck)
{
var a=++Mo;
var b=function()
{
if(!(ck&&Mo===a))
{
return
}
var c=++wu;
var d="";
for(var e=ig.length;
--e>=0;
)
{
if(jg[e]===-1)
{
jg[e]=c;
var f=ig[e];
try
{
var g=f.getPingData();
if(g)
{
if(d.length)
{
d+=","
}
d+=bj(g)
}

}
catch(h)
{
S("Piggy "+(f.name?f.name:e)+" failed: "+h.toString()+": "+h.stack)
}

}

}
try
{
var i=function()
{
Mm(c,200==this.status-this.status%100)
}

;
wc(No,undefined,d,i)
}
catch(h)
{
Mm(c,false)
}
setTimeout(b,bk)
}

;
ck=true;
setTimeout(b,bk)
}

}

function Mm(a,b)
{
for(var c=ig.length;
--c>=0;
)
{
if(jg[c]==a)
{
if(b)
{
var d=ig[c];
if(undefined!==d.consumePingData)
{
d.consumePingData()
}

}
jg[c]=-1
}

}

}

function bj(a)
{
if("object"==typeof a)
{
var b="(";
for(var c=0;
c<a.length;
c++)
{
if(c)
{
b+=","
}
b+=bj(a[c])
}
return b+")"
}
else
{
return a.toString?a.toString().replace(/[!@#$%^&\*\(\)\
{
\
}
\[\]=:\/;
\?\+\'\"]/g,Sr):""
}

}

function Sr(a)
{
var b=a.charCodeAt(0);
return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)
}

;

var vh="19700101T000000Z";
var ao=
{
getPingData:function()
{
var a=La;
var b=la;
if(a&&b)
{
var c=["FETCH_EVENTS","lrt",vh.toString(),"droi",b.toString(),"droiP",b.toString(),"ctz",jd];
for(var d=0;
d<a.length;
++d)
{
c.push("lef",a[d]);
c.push("lefP",a[d])
}
return c
}
else
{
return undefined
}

}

,consumePingData:undefined
}
;
var np=M?"INTERNET_EXPLORER":(Ba?"NAVIGATOR":(Hh?"SAFARI":"UNKNOWN"));
var vu=
{
getPingData:function()
{
if(Sj)return undefined;
var a=["RECORD_PERF","perf",Xt(),"browser",np];
Lt();
return a
}

,consumePingData:undefined
}
;
function Bp()
{
Tr(600000);
Ur("ping");
Lm(ao);
Lm(vu);
Vr()
}

function Cp(a)
{
vh=a
}

function Rr(a)
{
setTimeout(function()
{
var b=La;
var c=la;
var d=["lrt",vh.toString(),"droi",c.toString(),"droiP",c.toString(),"ctz",jd];
for(var e=0;
e<b.length;
++e)
{
d.push("lef",b[e],"lefP",b[e])
}
aa("load",d)
}

,a)
}

;

function Tk(a,b)
{
return Rp([a],b)
}

function Rp(a,b)
{
if(!b)b=3;
return function(c,d,e,f)
{
var g=null;
for(var h=0;
h<a.length;
++h)
{
var i=m(a[h]);
var j=G(i);
if(!g)
{
g=j
}
else
{
g.w=Math.max(g.x+g.w,j.x+j.w);
g.h=Math.max(g.y+g.h,j.y+j.h);
g.x=Math.min(g.x,j.x);
g.y=Math.min(g.y,j.y);
g.w-=g.x;
g.h-=g.y
}

}
if(g)
{
var k=G(d);
var l,n,o,p;
switch(e)
{
case 1:l=k.x+f.dx;
n=k.y+f.dy;
break;
case 2:l=k.x;
n=k.y;
break;
default:return true
}
o=k.x+f.dx+k.w;
p=k.y+f.dy+k.h;
var q=g.x-l,r=o-(g.x+g.w),s=g.y-n,t=p-(g.y+g.h);
switch(e)
{
case 1:if(b&1)
{
if(q>0)
{
f.dx+=q
}
else if(
r>0)
{
f.dx-=r
}

}
if(b&2)
{
if(s>0)
{
f.dy+=s
}
else if(t>0)
{
f.dy-=t
}

}
break;
case 2:if(r>0&&b&1)
{
f.dx-=r
}
if(t>0&&b&2)
{
f.dy-=t
}
break
}

}
return true
}


}

function Sp(a)
{
return function(b,c,d,e)
{
var f=G(c);
var g=ra(c.offsetParent);
var h;
switch(d)
{
case 1:if(undefined!==e)
{
if(da&1)
{
f.x+=e.dx
}
if(da&2)
{
f.y+=e.dy
}

}
h=a(f);
if(!h)
{
return false
}
if(da&1)
{
if(undefined!==e)
{
e.dx+=h.x-f.x+g.x
}
else
{
c.style.left=h.x+"px"
}

}
if(da&2)
{
if(undefined!==e)
{
e.dy+=h.y-f.y+g.y
}
else
{
c.style.top=h.y+"px"
}

}
break;
case 2:if(undefined!==e)
{
if(da&1)
{
f.w+=e.dx
}
if(da&2)
{
f.h+=e.dy
}

}
if(undefined===e)
{
var i=new Ja(f.x+f.w,f.y+f.h,window);
h=a(i);
if(!h)
{
return false
}
if(da&1)
{
var j=h.x-c.offsetLeft;

if(j<=0)
{
return false
}
c.style.width=j+"px"
}
if(da&2)
{
var k=h.y-c.offsetTop;
if(k<=0)
{
return false
}
c.style.height=k+"px"
}

}
break;
case 5:if(e)
{
var h=a(qa);
if(!h)
{
return false
}
if(da&1)
{
if(qa.x-h.x<h.w/2)
{
e.dx-=h.x-qa.x
}
else
{
e.dx-=h.x+h.w-qa.x
}

}
if(da&2)
{
if(qa.y-h.y<h.h/2)
{
e.dy-=h.y-qa.y
}
else
{
e.dy-=h.y+h.h-qa.y
}

}

}
break
}
return true
}


}

;
var Up=2*Math.PI/16;
var v=undefined;
var ka=0;
var Vb=undefined;
var qa=undefined;
var Yf=undefined;
var Pe=undefined;
var id=undefined;
var da=undefined;
var Tb=undefined;
var hd=undefined;
var eo=false;
var yh=undefined;
var Ub=undefined;
function Zh(a,b)
{
return function()
{
return a.apply(this,arguments)&&b.apply(this,arguments)
}


}

function _DD_Install(a)
{
if(!a)
{
a=document
}
Ub=a;
Ma(Ub.body,"mousedown",Vp)
}

var Hj=[];
function td(a)
{
Hj.push(a)
}

function Uk(a,b)
{
for(var c=Hj.length-1;
c>=0;
--c)
{
var d=Hj[c](a,b);
if(d)
{
return d
}

}
return undefined
}

var Oe;
function Vp(a)
{
Oe=Lk(a||window.event);
Ma(Ub.body,"mousemove",$h);
Ma(Ub.body,"mouseup",ai);
return false
}

function Wp(a)
{
var b=undefined;
for(var c=a.srcElement||a.target;
c;
c=c.parentNode)
{
b=Uk(c,a);
if(!b)continue;
qa=na(a);
if(b.ka(a,c))
{
if(!(v&&ka>=0&&ka<6&&1===1+ka%1&&da&&0===(da&~3)))
{
cf()
}
a.cancelBubble=true;
Vb=b;
Yf=qa;
Pe=
{
x:v.offsetLeft,y:v.offsetTop,w:v.offsetWidth,h:v.offsetHeight
}
;
if(ka===4)
{
id=[qa]
}
Tb=new je(0,0);
hd=new je(0,0);
if(ka===1||ka===2||ka===5)
{
if(ka!==2&&Vb.useUserDefinedAlpha&&!Vb.useUserDefinedAlpha())
{
tg(v,true)
}
yh=v.style.zIndex;
v.style.zIndex=2000
}
if(M)
{
Ma(Ub.body,"mouseleave",
ug)
}
else
{
Ma(Ub.body,"mouseout",ug)
}

}
else
{
cf()
}
return false
}
return true
}

function ai(a)
{
if(Oe)
{
Oe=null;
Ic(Ub.body,"mousemove",$h);
Ic(Ub.body,"mouseup",ai);
var b=undefined;
for(var c=a.srcElement||a.target;
c;
c=c.parentNode)
{
b=Uk(c,a);
if(b&&b.Pb)
{
b.Pb(c)
}

}
return
}
var d=a||window.event;
if(!Vb.ya(d,v,ka))
{
bf()
}
else
{
cf()
}

}

function $h(a)
{
if(Oe)
{
var b=Wp(Oe);
Oe=null;
if(b)
{
bf();
return true
}

}
if(!v)
{
return true
}
if(!Vb)
{
return true
}
var c=a||window.event;
c.cancelBubble=true;
var d=na(c);
var e=new je(d.x-qa.x+Tb.dx,d.y-qa.y+Tb.dy);
if(!(e.dx|e.dy))
{
return false
}
var f=new je(e.dx,e.dy);
qa=d;
eo=true;
var g;
try
{
g=ra(v)
}
catch(a)
{
cf();
return
}
if(da&1)
{
hd.dx+=f.dx
}
if(da&2)
{
hd.dy+=f.dy
}
if(Vb.A(c,v,ka,f,hd))
{
var h=ra(v);
hd.dx-=h.x-g.x;
hd.dy-=h.y-g.y;
switch(ka)
{
case 1:case 2:case 5:Tb.dx=e.dx-f.dx;
Tb.dy=e.dy-f.dy;
break
}
switch(ka)
{
case 1:
if(!(da&1))
{
f.dx=0
}
if(!(da&2))
{
f.dy=0
}
var i=v.currentStyle?v.currentStyle:v.ownerDocument.defaultView.getComputedStyle(v,"");
if(i&&i.position=="relative")
{
v.style.left=hd.dx+"px";
v.style.top=hd.dy+"px"
}
else
{
var j=v.offsetLeft+f.dx,k=v.offsetTop+f.dy;
if(f.dx)
{
v.style.left=j+"px"
}
if(f.dy)
{
v.style.top=k+"px"
}
if(f.dx&&j!==v.offsetLeft)
{
v.style.left=j+j-v.offsetLeft+"px"
}
if(f.dy&&k!==v.offsetTop)
{
v.style.top=k+k-v.offsetTop+"px"
}

}
break;
case 5:var l=G(v);
if(da&1)
{
var n=qa.x+Tb.dx;
var o=Math.min(n,Yf.x)
;
var p=Math.abs(n-Yf.x);
if(o!==l.x)
{
var j=o;
v.style.left=j+"px";
if(j!==v.offsetLeft)
{
v.style.left=j+j-v.offsetLeft+"px"
}

}
if(p!==l.w)
{
v.style.width=p+"px";
if(p!=v.offsetWidth)
{
p=Math.max(0,p+p-v.offsetWidth);
v.style.width=p+"px"
}

}

}
if(da&2)
{
var q=qa.y+Tb.dy;
var r=Math.min(q,Yf.y);
var s=Math.abs(q-Yf.y);
if(r!==l.y)
{
var k=r;
v.style.top=k+"px";
if(k!==v.offsetTop)
{
v.style.top=k+k-v.offsetTop+"px"
}

}
if(s!==l.h)
{
v.style.height=s+"px";
if(s!=v.offsetHeight)
{
s=Math.max(0,s+s-v.offsetHeight);
v.style.height=s+
"px"
}

}

}
break;
case 2:if(f.dx&&da&1)
{
var t=v.offsetWidth;
var p=t+f.dx;
if(p<0)
{
Tb.dx+=p;
p=0
}
if(p<1)
{
Tb.dx+=p-1;
p=1
}
v.style.width=p+"px";
if(p!=v.offsetWidth)
{
p+=p-v.offsetWidth;
if(p<1)
{
p=1
}
v.style.width=p+"px"
}

}
if(f.dy&&da&2)
{
var w=v.offsetHeight;
var s=w+f.dy;
if(s<0)
{
Tb.dy+=s;
s=0
}
if(s<1)
{
Tb.dy+=s-1;
s=1
}
v.style.height=s+"px";
if(s!=v.offsetHeight)
{
s+=s-v.offsetHeight;
if(s<1)
{
s=1
}
v.style.height=s+"px"
}

}
break;
case 3:if(!(da&1))
{
f.dx=0
}
if(!(da&2))
{
f.dy=0
}
if(v.Ra)
{
v.Ra(f.dx,f.dy)
}
else
{
f.dx*=-1;
f.dy*=-1;
var z=
v.scrollLeft;
var x=v.scrollLeft+v.scrollWidth-v.offsetWidth;
var C=v.scrollTop;
var T=v.scrollTop+v.scrollHeight-v.offsetHeight;
f.dx=Math.max(Math.min(f.dx,x),-z);
f.dy=Math.max(Math.min(f.dy,T),-C);
if(f.dx)
{
v.scrollLeft=v.scrollLeft+f.dx
}
if(f.dy)
{
v.scrollTop=v.scrollTop+f.dy
}

}
break;
case 4:if(f.dx|f.dy)
{
if(id.length>=1)
{
var L=f;
var U=id[id.length-1];
var X=new je(L.dx+U.dx,L.dy+U.dy);
var ta=false;
if(X.dx*X.dx+X.dy*X.dy<=25)
{
ta=true
}
else
{
var ga=Math.atan2(L.dx,L.dy);
var ua=Math.atan2(U.dx,U.dy);
var ba=
Math.abs((ga-ua+2*Math.PI)%(2*Math.PI));
ta=ba<Up
}
if(ta)
{
U.dx=X.dx;
U.dy=X.dy
}
else
{
id.push(f)
}

}
else
{
id.push(f)
}
Vk(id)
}
break
}

}
else
{
bf()
}
return false
}

function ug(a)
{
a=a||window.event;
var b=a.relatedTarget||a.toElement;
if(!b)
{
bf()
}

}

function cf()
{
if(ka!==0)
{
if(v)
{
if(ka===4)
{
Vk([])
}
Vb.va(v,ka)
}
if(ka===1||ka===2||ka===5)
{
if(ka!==2&&Vb.useUserDefinedAlpha&&!Vb.useUserDefinedAlpha())
{
tg(v,false)
}
if(undefined!==yh)
{
v.style.zIndex=yh;
yh=undefined
}
else
{
delete v.style.zIndex
}

}

}
v=undefined;
ka=0;
qa=undefined;
Pe=undefined;
da=0;
Tb=undefined;
eo=false;
if(Vb)
{
if(M)
{
Ic(Ub.body,"mouseleave",ug)
}
else
{
Ic(Ub.body,"mouseout",ug)
}

}
Vb=undefined;
Ic(Ub.body,"mousemove",$h);
Ic(Ub.body,"mouseup",ai)
}

function bf()
{
switch(ka)
{
case 1:var a=v.currentStyle?v.currentStyle:window.getComputedStyle(v,"");
if(a&&a.position=="relative")
{
v.style.left="0px";
v.style.top="0px"
}
else
{
v.style.left=Pe.x+"px";
v.style.top=Pe.y+"px"
}
break;
case 2:v.style.width=Pe.w+"px";
v.style.height=Pe.h+"px";
break;
case 3:break;
case 4:id=[];
break;
case 0:break;
case 5:break;
default:
}
cf()
}

function tg(a,b)
{
if("filter" in a.style)
{
a.style.filter=b?"alpha(opacity=50)":"alpha(opacity=100)"
}
else if("opacity" in a.style)
{
a.style.opacity=b?0.5:1
}
else if("MozOpacity" in a.style)
{
a.style.MozOpacity=b?0.5:1
}

}

var Ij=false;
var Jj=undefined;
function Vk(a)
{
Jj=a;
if(!Ij)
{
Ij=true;
setTimeout(Tp,100)
}

}

function Tp()
{
var a=Jj;
Jj=undefined;
Ij=false;
if(!a)
{
return
}
var b="";
if(a.length)
{
var c=a[0].x,d=a[0].y;
var e=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:"+(d-2)+"px>"
}
var i=Math.atan2(h.dx,h.dy);
var j;
var k=Math.floor(i/(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 l=Math.max(1,Math.abs(h.dx));
var n=Math.max(1,Math.abs(h.dy));
b+="<img class=gestimg src=images/"+j+" width="+l+" height="+n+" style=left:"+(c+Math.min(h.dx,0))+"px;
top:"+(d+Math.min(h.dy,0))+"px>";
c+=h.dx;
d+=h.dy;
e=Math.max(c,e);
f=Math.max(d,f)
}

}
var o=m("gesture");
o.style.display="none";
o.innerHTML=b;
o.style.display="inline"
}

;

function ma(a)
{
this.Be=a;
this.Ce=a?ma.db(a):undefined;
this.be=false;
this.Vf=null;
this.qc=3
}

ma.db=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)
{
ma.db(c,b)
}

}
return b
}

;
ma.clearSelection=function(a)
{
var b=ma.db(a);
for(var c=b.length;
--c>=0;
)
{
var d=b[c];
d.className=d.className.replace(/\s*\bddSelected\b/g,"")
}
return b
}

;
ma.prototype.Mc=function(a,b)
{
a.style.left=b.x+"px";
a.style.top=b.y+"px";
if(this.qc&1)
{
a.style.width="0px"
}
if(this.qc&2)
{
a.style.height="0px"
}

}

;
ma.prototype.Qb=function(a)
{
a.style.display="block"
}

;
ma.prototype.ka=function(a,b)
{
var c=m("ddLasso");
if(!c)
{
c=document.createElement("div");
c.id="ddLasso";
c.style.position="absolute";
c.style.display="none";
document.body.appendChild(c)
}
var d=na(a);
this.Mc(c,d);
this.Qb(c);
ka=5;
da=this.qc;
v=c;
this.Vf=c;
var e=this;
setTimeout(function()
{
if(!e.finished)
{
e.vc(c)
}

}

,200);
return true
}

;
ma.prototype.ya=function(a,b,c)
{
return true
}

;
ma.prototype.Tf=function(a)
{
return a.className&&a.className.match(/\bddSelectable\b/)
}

;
ma.prototype.Wd=function(a,b,c)
{
if(this.Tf(a))
{
var d=G(a);
if(!(b.x+b.w<d.x||d.x+d.w<b.x||b.y+b.h<d.y||d.y+d.h<b.y))
{
c.push(a)
}
return
}
else
{
for(var e=a.firstChild;
e;
e=e.nextSibling)
{
this.Wd(e,b,c)
}

}

}

;
ma.prototype.vc=function(a)
{
if(!this.Be)return;
var b=[];
this.Wd(this.Be,G(a),b);
this.ca(b);
if(!this.be)
{
var c=this;
setTimeout(function()
{
if(!c.finished)
{
c.vc(a)
}

}

,200)
}

}

;
ma.prototype.ca=function(a)
{
var b=this.Ce;
for(var c=a.length;
--c>=0;
)
{
a[c].dd_newSelection=true
}
for(var c=b.length;
--c>=0;
)
{
var d=b[c];
d.dd_oldSelection=true;
if(!d.dd_newSelection)
{
d.className=d.className.replace(/\s*\bddSelected\b/g,"")
}

}
for(var c=a.length;
--c>=0;
)
{
var d=a[c];
if(!d.dd_oldSelection)
{
d.className=(d.className||" ")+" ddSelected"
}
d["dd_newSelection"]=false
}
for(var c=b.length;
--c>=0;
)
{
b[c].dd_oldSelection=false
}
this.Ce=a
}

;
ma.prototype.A=function(a,b,c,d)
{
return true
}

;
ma.prototype.va=function(a,b)
{
this.be=true;
this.vc(a);
a.style.display="none"
}

;
function df(a,b)
{
ma.call(this,a);
this.ug=Sp(b);
this.gridFn=b
}

df.prototype=new ma(undefined);
df.prototype.constructor=df;
df.prototype.A=function(a,b,c,d)
{
return ma.prototype.A(a,b,c,d)&&this.ug(a,b,c,d)
}

;
df.prototype.ka=function(a,b)
{
if(ma.prototype.ka.call(this,a,b))
{
var c=this.gridFn(qa,true);
if(da&1)
{
qa.x=qa.x-c.x<c.w>>1?c.x:c.x+c.w
}
if(da&2)
{
qa.y=qa.y-c.y<c.h>>1?c.y:c.y+c.h
}
return true
}
else
{
return false
}

}

;

function ji(a,b,c,d)
{
if(M)a.y=a.y+1;
var e;
if(d)
{
e=d
}
else if(b.id in Wb)
{
e=Wb[b.id]
}
else if(b.id in xh)
{
e=xh[b.id]
}
if(!e)
{
return
{
event:f
}

}
var f=e.e;
if(undefined===e)
{
return
{
event:f
}

}
var g=Rb(a,true);
var h=g.col;
var i=g.row;
var j=Rb(new Ja(a.x,a.y+a.h,a.coordinateFrame),c===1).row;
var k=false;
var l=false;
switch(c)
{
case 1:k=!((Math.abs(e.x-b.offsetLeft)|Math.abs(e.y-b.offsetTop))<16||f.start.equals(u.S(h,i)));
l=i>Ua||!u.l&&Ia(f);
break;
case 2:k=!(Math.abs(e.h-b.offsetHeight)<16||f.end.equals(u.S(h,j)
));
break
}
if(!k)
{
return
{
event:f,overlay:e
}

}
else
{
return
{
col:h,K:i,V:j,event:f,overlay:e,isOvernight:l
}

}

}

function Ci(a,b,c)
{
var d=undefined;
try
{
d=ji(G(a),a,b,c)
}
catch(e)
{

}
if(undefined===d||undefined===d.col)
{
return true
}
return Tl(d,a,b)
}

function Tl(a,b,c)
{
var d;
switch(a.overlay.coordinateFrame)
{
case 1:d=m("gridcontainercell")||m("gridcontainer");
break;
case 2:d=m("allDayGrid");
break;
default:break
}
var e=a.event,f=a.col,g=a.K,h=a.V;
var i=a.isOvernight;
var j=e.start,k=e.end;
var l=j,n=k;
if(c===1)
{
var o=ge(f,Math.floor(g));
if(undefined===o)
{
alert("col="+f+", row="+g)
}
var p=ra(d);
b.style.left=o.x-p.x+"px";
b.style.top=o.y+o.h*(g%1)-p.y+"px";
var q;
l=u.S(f,g,e.start);
if(i!=Ia(e))
{
if(Nb(e))
{
l=l.g().k();
q=new db(1,0,0,0)
}
else
{
q=new db(0,1,0,
0)
}

}
else
{
q=gc(e.end,e.start)
}
if(i)
{
if(Nb(e))
{
l=l.g()
}
else
{
l=l.k();
l.hour=e.start.hour;
l.minute=e.start.minute;
l.second=e.start.second
}

}
else
{
l=l.k()
}
n=D(l);
n.advance(q);
n=Nb(e)?n.g():n.k();
if(Nb(e)&&j.g().equals(l)&&k.g().equals(n))
{
return false
}

}
else if(c===2)
{
var r=ge(f,Math.floor(g));
var s=ge(f,Math.floor(h));
b.style.height=s.y+s.h*(h%1)-(r.y+r.h*(g%1))+"px";
n=u.S(f,h,e.end)
}
else
{
return false
}
if(!(j.equals(l)&&k.equals(n)))
{
var t=e.owner==e.src;
if((e.flags&10240)===2048&&e.src===e.owner)
{
var w;

var z;
var x;
if(t)
{
x=["ONE","ALL","TAIL"];
z=[F(se),F(re),F("All following"),F(ac)];
w=zm
}
else
{
x=["ONE","ALL"];
z=[F(se),F(re),F(ac)];
w=Tg
}
if(j.equals(l))
{
Xa(mm(e,l,n,true,x),Ug,w,z);
return true
}

}
mm(e,l,n,false,["ONE"])(0);
return true
}
else
{
return false
}

}

function mm(a,b,c,d,e)
{
return function(f)
{
var g=e[f];
if(!g)
{
yc();
Qa();
return false
}
if(Di(a)&&a.src===a.owner)
{
Xa(nm(a,b,c,d,g),"Send Notification?","Would you like to notify guests of your changes?",[F("Send"),F("Don't send"),F(ac)])
}
else
{
nm(a,b,c,d,g)(1)
}
return false
}


}

function nm(a,b,c,d,e)
{
var f=[];
if(d&&e!=="ONE")
{
var g=gc(c,b).toString();
if(Nb(a))
{
g=g.replace(/T.*/,"")
}
else
{
if(!/T/.test(g))
{
g+="T0H"
}

}
f.push("rdur",g)
}
else
{
f.push(mb,Nb(a)?b.g().toString()+"/"+c.g().toString():b.toString()+"/"+c.toString())
}
if(e!=="ONE")
{
f.push("scp",e)
}
return function(h)
{
switch(h)
{
case 0:f.push("sprop",gh+":true");
sl(a,f);
break;
case 1:f.push("sprop",gh+":false");
sl(a,f);
break;
case 2:break
}
yc();
Qa();
return false
}


}

var Xd;
function dk(a,b)
{
if(Xd==null)
{
Xd=document.createElement("DIV");
document.body.appendChild(Xd);
Xd.style.display="none"
}
Xd.innerHTML=a;
var c=Xd.childNodes;
var d=[];
var e=[];
for(var f=0;
f<c.length;
++f)
{
var g=c[f];
(g.nodeType==1?d:e).push(g)
}
if(!b)b=document.body;
b.appendChild(d[0]);
for(var f=0;
f<e.length;
++f)
{
Xd.removeChild(e[f])
}
return d[0]
}

function xu(a,b)
{
var c=Wb[a.id];
var d=c.e;
var e=G(a);
var f;
if(u.l)
{
f=G(m("allDayGrid")).w/J.extent
}
else
{
f=G(m("grid")).w/kb
}
f=f|0;
var g=gc(d.end,d.start);
if(g.qd()==1)
{
g=""
}
else
{
g="("+g.qd()+" days) "
}
var h=Wc.RG_ALLDAY_TEMPLATE;
h.put("left",e.x+"px");
if(u.l)
{
var i=G(m("allDayGrid"));
var j=i.h-G(a).h-2;
h.put("top",j+"px")
}
else
{
h.put("top",e.y+"px")
}
h.put("width",f+"px");
h.put("divID","");
h.put("title","<nobr>"+g+d.text+"</nobr>");
h.put("moreright","");
h.put("moreleft","");
var k=Zb[d.cb()][d.Pc()?
4:2];
h.put("bgColor",k);
h.put("onclick","");
return dk(h.toString(),b)
}

function yu(a,b,c)
{
var d=ch.Jd;
var e=G(a);
d.put("divID","");
d.put("calColor",c.e.cb());
d.put("top",e.y+"px");
d.put("left",e.x+"px");
d.put("width",e.w+"px");
d.put("height",e.h+"px");
d.put("cursor","pointer");
d.put("onclick","");
d.put("icon","");
d.put("time",ub(c.e.start,true));
d.put("title",c.e.text);
return dk(d.toString(),b)
}

function Hd(a,b)
{
this.G=a;
this.overlay=b
}

Hd.prototype.Pb=function()
{

}

;
Hd.prototype.ka=function(a,b)
{
var c=this.G;
var d=this.overlay;
var e=na(a);
this.cd=u.l?m("allDayGrid"):document.body;
this.Tb=Ia(d.e)?xu(c,this.cd):yu(c,this.cd,d);
if(Ia(d.e)||!M)Th(this.G,40);
if(!u.l)
{
this.Tb.style.left=e.x+"px";
this.Tb.style.top=e.y+"px"
}
var f=u.l?"allDayGrid":"grid";
this.A=Tk(f);
if(u.l)
{
var g=Gj();
var h=G(m(f));
var i=new Ja(h.x+3,h.y+3,h.coordinateFrame);
var j=new Ja(h.x+h.w-5,h.y+3,h.coordinateFrame);
var k=g(i);
this.Tb.style.width=k.w+"px";
var l=k.x;
var n=g(j).x;
this.A=Zh(this.A,
function(o,p,q,r)
{
var s=g(na(o));
if(s.x<l)
{
s.x=l
}
else if(s.x>n)
{
s.x=n
}
if(M)--s.x;
r.dx=s.x-G(p).x;
return true
}

)
}
else
{
this.aa=Rb(e,true);
this.Ob=Nk();
this.W=document.createElement("DIV");
this.W.style.position="absolute";
this.W.style.display="";
this.W.style.background="rgb(170, 204, 238)";
document.body.appendChild(this.W);
Th(this.W,30);
this.A=Zh(this.A,this.Sf)
}
v=this.Tb;
ka=1;
da=u.l?1:3;
return true
}

;
Hd.prototype.Sf=function(a,b,c,d)
{
var e=na(a);
var f=Rb(e,true);
if(!f)return this.fe();
f.row|=0;
if(f.row<0)
{
f.row=0
}
else if(f.row>=Ua)
{
f.row=Ua-1
}
if(f.col<0)
{
f.col=0
}
else if(f.col>=kb)
{
f.col=kb-1
}
this.aa=f;
var g=ge(f.col,f.row);
var h=new Ja(g.x+g.w/2,g.y+g.h/2,g.coordinateFrame);
var g=this.Ob(h);
if(!g)return this.fe();
this.W.style.left=g.x+"px";
this.W.style.top=g.y+"px";
this.W.style.width=g.w+"px";
this.W.style.height=g.h+"px";
this.W.style.display="";
return true
}

;
Hd.prototype.fe=function()
{
this.W.style.display="none";
return true
}

;
function Th(a,b)
{
b|=0;
if("filter" in a.style)
{
a.style.filter="alpha(opacity="+b+")"
}
else if("opacity" in a.style)
{
a.style.opacity=b/100
}
else if("MozOpacity" in a.style)
{
a.style.MozOpacity=b/100
}

}

function ss(a)
{
if("filter" in a.style)
{
a.style.filter=""
}
else if("opacity" in a.style)
{
a.style.opacity=""
}
else if("MozOpacity" in a.style)
{
a.style.MozOpacity=""
}

}

Hd.prototype.ya=function(a,b,c)
{
if(u.l)
{
return Ci(b,c,this.overlay)
}
else
{
if(!this.aa)return false;
var d=
{
col:this.aa.col,K:this.aa.row,V:this.aa.row,event:this.overlay.e,overlay:this.overlay,isOvernight:Ia(this.overlay.e)
}
;
return Tl(d,b,c)
}

}

;
Hd.prototype.va=function(a,b)
{
ss(this.G);
this.cd.removeChild(a);
if(this.W)document.body.removeChild(this.W)
}

;
function nf()
{

}

nf.prototype.ka=function()
{
this.Oc=document.createElement("DIV");
document.body.appendChild(this.Oc);
v=this.Oc;
ka=1;
da=1;
return true
}

;
nf.prototype.A=function()
{
return true
}

;
nf.prototype.ya=function()
{
return true
}

;
nf.prototype.va=function(a,b)
{
document.body.removeChild(this.Oc)
}

;
td(function(a,b)
{
if(!a||!a.id)return undefined;
var c=Wb[a.id];
if(c&&(Ia(c.e)||!u.l))
{
if(Cb(c.e))
{
return new Hd(a,c)
}
else
{
return new nf()
}

}
return undefined
}

);
function Nk()
{
var a=Xf(m("grid"));
if(M)
{
return function(b)
{
var c=a(b);
--c.x;
++c.y;
return c
}


}
else
{
return a
}

}

function Gd(a,b)
{
ma.call(this,undefined);
this.Ob=Nk();
this.gridBounds=G(a);
this.gridBounds.right=this.gridBounds.x+this.gridBounds.w;
var c=na(b);
this.Ha=this.Rd(c);
this.Md=this.Td(this.Ha);
this.Ga=this.Ob(c);
this.Ec=
{
col:this.Ha.col,row:this.Ha.row
}
;
this.ce=this.Ga.clone();
var d=["month_row_0","month_row_1","month_row_2"];
if(!m(d[0]))
{
for(var e=0;
e<d.length;
++e)
{
var f=Mk(window,d[e]);
Gh(f)
}

}
this.jb=m(d[0]);
this.Ae=m(d[1]);
this.Ub=m(d[2]);
this.Fc=-1
}

Gd.prototype=new ma(undefined);
Gd.prototype.Rd=function(a)
{
var b=Rb(a,false);
if(!b)return undefined;
if(b.row<0||b.col<0)return undefined;
b.row|=0;
b.col|=0;
if(b.row>=u.nRows||b.col>=u.nCols)return undefined;
return b
}

;
Gd.prototype.Td=function(a)
{
return u.nCols*a.row+a.col
}

;
Gd.prototype.Qb=function(a)
{
a.style.display="none"
}

;
Gd.prototype.A=function(a,b,c,d)
{
var e=na(a);
var f=this.Ob(e);
var g=this.Rd(e);
if(!g)return true;
var h=this.Td(g);
if(h==this.Fc)return true;
var i=h<this.Md;
var j=i?g:this.Ha;
var k=i?f:this.Ga;
var l=i?this.Ha:g;
var n=i?this.Ga:f;
var o=Math.min(2,l.row-j.row);
var p=this.jb.style,q=this.Ae.style,r=this.Ub.style;
switch(o)
{
case 0:p.left=k.x+"px";
p.top=k.y+"px";
p.width=n.x+n.w-k.x+"px";
p.height=k.h+"px";
p.display="";
q.display="none";
r.display="none";
break;
case 1:case 2:p.left=k.x+"px";
p.top=k.y+"px";
p.width=
this.gridBounds.right-k.x+"px";
p.height=k.h+"px";
q.left=this.gridBounds.x+"px";
q.top=n.y+"px";
q.width=n.x+n.w-this.gridBounds.x+"px";
q.height=n.h+"px";
p.display="";
q.display="";
if(o==1)
{
r.display="none";
break
}
r.left=this.gridBounds.x+"px";
r.top=k.y+k.h+"px";
r.width=this.gridBounds.w+"px";
r.height=n.y-k.y-k.h+"px";
r.display="";
break;
default:
}
this.Fc=h;
this.Ec=g;
this.ce=f;
return true
}

;
Gd.prototype.va=function(a,b)
{
if(this.jb.style.display=="none")
{
var c=this.jb.style;
c.left=this.Ga.x+"px";
c.top=this.Ga.y+"px";
c.width=this.Ga.w+"px";
c.height=this.Ga.h+"px";
c.display="";
a=this.jb
}
else if(this.Ub.style.display!="none")
{
a=this.Ub
}
else
{
a=this.jb
}
var d=this.Fc<this.Md;
var e=d?this.Ec:this.Ha;
var f=d?this.Ha:this.Ec;
var g=u.S(e.col,e.row).g();
var h=u.S(f.col,f.row);
var i=D(h);
i.date+=1;
h=i.g();
var j=
{
start:g,end:h,flags:16
}
;
var k=function()
{
return j
}

;
var l=[this.jb,this.Ae,this.Ub];
var n=Se(k,Lr(h,g)===1,l,this.ce);
n(a,undefined,l)
}

;
td(function(a,b)
{
if(!fb())return undefined;
return a.id=="grid"?new Gd(a,b):undefined
}

);
var Ah;
function Ch()
{
if(Ah)return Ah;
Ah=dk('<div id="backuplasso"></div>');
return Ah
}

function Lc(a,b,c,d)
{
ma.call(this,undefined);
this.gridFn=a;
this.t=Ch();
this.nb=d.clone();
this.oa=false;
this.A=Zh(Tk("allDayGrid",3),this.A)
}

Lc.prototype=new ma(undefined);
Lc.prototype.Qb=function(a)
{
a.style.display="none"
}

;
Lc.fc=5;
Lc.prototype.A=function(a,b,c,d)
{
if(!this.oa)
{
var e=ii(this.nb,na(a));
if(e>Lc.fc)
{
this.oa=true;
Gh(this.t);
this.F=this.gridFn(this.nb);
this.t.style.left=this.F.x+"px";
this.t.style.top=this.F.y+"px";
this.t.style.width=this.F.w+"px";
this.t.style.height=this.F.h+"px"
}
else
{
return true
}

}
var f=this.gridFn(qa);
var g,h;
if(f.x<this.F.x)
{
g=f.x;
h=this.F.x+this.F.w-g
}
else if(f.x>this.F.x)
{
g=this.F.x;
h=f.x+f.w-g
}
else
{
g=f.x;
h=f.w
}
this.t.style.left=g+"px";
this.cg=this.F.w===h;
this.t.style.width=h+"px";
return true
}


;
Lc.prototype.va=function(a,b)
{
if(!this.oa)
{
this.t.style.display="none"
}
else
{
var c=!this.oa||this.cg;
var d=Se(to,c);
d(this.t)
}

}

;
Lc.prototype.Pb=function()
{
this.t.style.display="none"
}

;
td(function(a,b)
{
if(a.id=="allDayGrid"&&u.l)
{
var c=na(b);
var d=G(a);
var e=d.h;
var f=d.y;
return new Lc(Gj(),f,e,c)
}
return undefined
}

);
function to(a)
{
var b=G(a);
var c=new Ja(b.x+3,b.y+3,window);
var d=new Ja(b.x+b.w-3,b.y+b.h-3,window);
if(d.x<=c.x)return null;
var e=Rb(c,false);
var f=Rb(d,false);
var g=u.S(e.col,e.row).g();
var h=u.S(f.col,f.row).g();
h=D(h);
h.date+=1;
h=h.g();
return
{
start:g.g(),end:h,flags:16
}

}

function Gj()
{
var a=m("allDayGrid");
var b=G(a);
var c=b.y+(M?1:0);
var d=b.h+(M?-2:-2);
var e=b.x+b.w+(M?-1:-2);
var f=b.coordinateFrame;
var g=[];
var h=M?1:-3;
var i=u.ra();
for(var j=0;
j<i;
++j)
{
g.push(ra(m("allDay"+j)).x+h)
}
return function(k)
{
var l=Wf(g,k.x);
if(l<0)
{
l=0
}
else if(l>=g.length)
{
l=g.length-1
}
var n=g[l]+3;
var o=l==g.length-1?e:g[l+1];
var p=o-n;
return new tb(n,c,p,d,f)
}


}

function vc(a,b,c)
{
ma.call(this,undefined);
this.gridFn=b;
this.nb=c.clone();
this.useUserDefinedAlpha=function()
{
return true
}

;
this.t=Ch();
this.oa=false
}

vc.prototype=new ma(undefined);
vc.prototype.Qb=function(a)
{
a.style.display="none"
}

;
vc.fc=5;
vc.prototype.A=function(a,b,c,d)
{
if(!this.oa)
{
var e=ii(this.nb,na(a));
if(e>vc.fc)
{
this.oa=true;
Gh(this.t);
this.Mc(this.t,this.nb);
this.F=this.gridFn(this.nb);
this.t.style.top=this.F.y+"px";
this.t.style.height=this.F.h+"px";
var f=G(m("gridcontainer"));
this.ee=f.y;
if(Ba)--this.ee;
this.Jc=f.y+f.h
}
else
{
return true
}

}
var g=this.gridFn(qa);
var h,i;
if(g.y<this.F.y)
{
h=g.y;
i=this.F.y+this.F.h-h
}
else if(g.y>this.F.y)
{
h=this.F.y;
i=g.y+g.h-h
}
else
{
h=g.y;
i=g.h
}
if(M)h+=2;
if(h<this.ee||h+i>this.Jc)return true;

this.t.style.top=h+"px";
this.t.style.height=i+"px";
return true
}

;
vc.prototype.va=function(a,b)
{
if(!this.oa)
{
this.t.style.display="none"
}
else
{
Se(uo,!this.oa)(this.t)
}

}

;
vc.prototype.Pb=function()
{
this.t.style.display="none"
}

;
vc.prototype.Mc=function(a,b)
{
var c=this.gridFn(b);
a.style.left=c.x+"px";
a.style.width=c.w-2+"px"
}

;
td(function(a,b)
{
if(a.id=="grid"&&u.l)
{
var c=na(b);
return new vc(a,Xf(a),c)
}
return undefined
}

);
function Se(a,b,c,d)
{
return function(e,f,g)
{
var h=a(e);
if(h==null)
{
if(!g)
{
e.style.display="none"
}
else
{
for(var i=0;
i<g.length;
++i)
{
g[i].style.display="none"
}

}
return
}
var j=Se.Ve;
j.put("usertime",b?"true":"false");
j.put("time",ti(h));
j.put("MSG_WHAT","What:");
j.put("MSG_MORE_DETAILS",Ri);
var k;
if(b)
{
if(fb())
{
k="e.g., 7pm Dinner at Pancho's"
}
else if(h.flags&16)
{
k="e.g., Mom's birthday"
}
else
{
k=Cm
}

}
else if(h.flags&16)
{
k="e.g., Visiting in NYC"
}
else
{
k=Cm
}
j.put("sampleInput",k);
var l=[];
for(var n in A)

{
var o=A[n];
var p=wa(n);
if(!o.hidden&&p&&p.al>=60)
{
l.push(o)
}

}
l.sort(sd);
var q=Xo();
var r;
if(l.length>1)
{
var s=[];
for(var i=0;
i<l.length;
++i)
{
var o=l[i];
s.push('<option value="',H(o.id),'"');
if(o.id==q)
{
s.push(" selected")
}
s.push(">",H(Bi(o)),"</option>")
}
r='<p><nobr><label forid="dragEventCalendar">Which Calendar:</label> <select style="width:182px" id="dragEventCalendar">'+s.join("")+"</select></nobr>"
}
else
{
r='<input type=hidden id=dragEventCalendar value="'+B+'">'
}
j.put("calendar_select",r);
j.put(
"MSG_CREATE_EVENT","Create Event");
Hp();
E.start=h.start;
E.end=h.end;
var t=j.toString();
wj(null,d||G(e),true,t,6);
E.De(Nt(e,g));
if(M)
{
setTimeout(function()
{
ab();
nc(Kg());
Va("SetFocus() for bubble")
}

,0)
}
else
{
ab();
nc(Kg());
Va("SetFocus() for bubble")
}

}


}

Se.Ve=new R('<form onsubmit="_ExtractDatesThenCall(_ES_AddEventFromBubble, $
{
usertime
}
);
return false;
" style="display:block"> <font size="-1"> $
{
time
}
<p> <table><tr> <td><label forid="b_subject">$
{
MSG_WHAT
}
</label> <td id="bubble_input">'+(Ba?'<div style="overflow:auto"><div style="overflow:hidden">':"")+' <input name="b_subject" size="35" id="dragEventSubject">'+(Ba?"</div></div>":"")+' </tr> <tr><td>&nbsp;
</td><td style="font-size:86%">$
{
sampleInput
}
</td></tr> <table> $
{
calendar_select
}
<p> <span> <input type="button" value="$
{
MSG_CREATE_EVENT
}
" onclick="javascript: _ExtractDatesThenCall(_ES_AddEventFromBubble, $
{
usertime
}
)">&nbsp;
<a href="javascript: _ExtractDatesThenCall(_ES_ShowEventFormFromBubble, $
{
usertime
}
)" >$
{
MSG_MORE_DETAILS
}
<STRONG>&raquo;
</STRONG> </a> </span> </font></form>'
);
function Kg()
{
return m("dragEventSubject")
}

function _ExtractDatesThenCall(a,b)
{
var c=Kg().value;
aa("compose",["ctext",c],_ExtractDatesThenCall.Xf(a,b))
}

function Lr(a,b)
{
if(typeof a==="string")a=$(a);
if(typeof b==="string")b=$(b);
return gc(a,b).qd()
}

_ExtractDatesThenCall.Xf=function(a,b)
{
return function(c)
{
var d=zd(c);
if(d!==200)
{
setTimeout(new function()
{
var r=ni();
E.hide();
kf(r)
}

(),0);
return false
}
var e=c.responseText;
if(e&&e!=="null")
{
var f=Dl(c);
var g=f.start;
var h=f.end;
if(f.summary)E.summary=f.summary;
if(b)
{
var i,j;
if(h&&h.indexOf("?")<0)
{
var k=[g,h];
var l=k[0].match(/(.*)T([^\?].*)/);
var n=k[1].match(/(.*)T([^\?].*)/);
if(l)i=$(k[0]);
if(n)j=$(k[1]);
if(i)
{
var o=j&&(j.hour>i.hour||j.hour===i.hour&&j.minute>=i.minute);
var p=E.start.toString().substring(0,8);
i=p+"T"+l[2];
if(o)
{
j=p+"T"+n[2]
}
else
{
j=D($(i));
j.hour+=1;
j=j.k().toString()
}
E.start=i;
E.end=j;
E.flags&=~16
}

}
else
{
var l=
g.match(/(.*)T([^\?].*)/);
if(l)
{
i=E.start.toString().substring(0,8)+"T"+l[2];
j=D($(i));
j.hour+=1;
j=j.k().toString();
E.start=i;
E.end=j;
E.flags&=~16
}

}

}
for(var q in f)
{
if(f[q]&&!E[q])
{
E[q]=f[q]
}

}

}
a();
return false
}


}

;
function Nt(a,b)
{
return function(c)
{
if(!b)b=[a];
for(var d=0;
d<b.length;
++d)
{
b[d].style.display="none"
}
E.De(null);
return true
}


}

function Gh(a)
{
a.style.position="absolute";
a.style.backgroundColor="rgb(204, 204, 204)";
a.style.display="block";
a.style.zIndex="10";
Th(a,66)
}

function qu(a,b,c,d)
{
return function(e)
{
var f=fb()?0:d.scrollTop;
var g=Wf(a,e.x);
var h=Wf(b,e.y+f);
if(g<0)
{
g=0
}
else if(g>=a.length-1)
{
g=a.length-2
}
if(h<0)
{
h=0
}
else if(h>=b.length-1)
{
h=b.length-2
}
var i=new tb(a[g],b[h]-f,a[g+1]-a[g],b[h+1]-b[h],e.coordinateFrame);
if(c)
{
i.x+=c.x;
i.y+=c.y
}
if(M)i.x+=3;
return i
}


}

function Wf(a,b)
{
var c=a.length,d=-1;
while(c-1>d)
{
var e=c+d>>1;
if(a[e]<=b)
{
d=e
}
else
{
c=e
}

}
return d
}

function Lo(a,b)
{
return a-b
}

function Xf(a,b)
{
var c=G(a);
var d=[];
var e=[];
d.push(c.x,c.x+c.w);
e.push(c.y,c.y+c.h);
for(var f=a.firstChild;
f;
f=f.nextSibling)
{
if(!f.className)
{
continue
}
if(f.className.match(/\bhrule\b/))
{
var g=ra(f);
e.push(g.y)
}
else if(f.className.match(/\bvrule\b/))
{
var g=ra(f);
d.push(g.x)
}

}
d.sort(Lo);
e.sort(Lo);
var h;
if(b)
{
var c=G(m(b));
h=new Ja(-c.x,-c.y,c.coordinateFrame)
}
return qu(d,e,h,m("gridcontainer"))
}

function zf(a,b)
{
this.G=a;
this.vf=b;
this.gridFn=Xf(m("grid"));
this.ig=m("gridcontainer").scrollTop;
var c=G(a);
this.zf=c.h-G(b).h;
c.y+=1-this.ig;
this.Cc=this.gridFn(c);
var d=G(m("gridcontainer"));
this.Jc=d.y+d.h;
this.me=this.gridFn(new Ja(G(b).x,this.Jc-1,d.coordinateFrame)).y
}

zf.prototype.ka=function(a,b)
{
var c=G(this.G);
var d=ji(c,this.G,2);
if(undefined!==d.event&&0===Cb(d.event))
{
return false
}
v=Ch();
ka=2;
da=2;
return true
}

;
zf.prototype.A=function(a,b,c,d)
{
var e=null;
if(qa.y>this.me)
{
e=this.me
}
else
{
var f=this.gridFn(qa);
e=f.y+f.h
}
var g=e-this.Cc.y;
if(g<this.Cc.h)g=this.Cc.h;
g-=this.zf;
this.vf.style.height=g+"px";
d.dy=0;
d.dx=0;
return true
}

;
zf.prototype.ya=function(a,b,c)
{
Ci(this.G,c)
}

;
zf.prototype.va=function(a,b)
{

}

;
var gu=
{
select:function(a)
{
return a.tagName=="DL"
}


}
;
td(function(a)
{
if(!/\b(b1|b2|resize)\b/.test(a.className))return undefined;
var b=a;
do
{
b=b.parentNode
}
while(b.id.substring(0,"reldiv".length)!="reldiv");
var c=Wb[b.id];
if(!c)return undefined;
if(!Cb(c.e))return undefined;
var d=Ml(b,gu);
return new zf(b,d[0])
}

);
function he(a)
{
this.G=a;
this.ub=null;
this.gridFn=Xf(m("grid"));
this.Xc=true;
this.te=null;
var b=this.G.getElementsByTagName("SPAN");
var c=null;
for(var d=0;
d<b.length;
++d)
{
if(sa(b[d],"timelabel"))
{
var c=b[d];
break
}

}
this.wf=c;
var e=Wb[a.id].e;
var f=gc(e.end,e.start).rd()>30;
this.additionalTitleText=f?"":" - "+e.text
}

he.prototype.ka=function(a,b)
{
var c=G(b);
var d=ji(c,b,1);
if(undefined!==d.event&&0===(d.event.flags&256))
{
return false
}
var e=this.gridFn(na(a));
var f=G(b);
this.ub=e.y-f.y;
this.Rc=na(a);
this.lb=false;
this.kb=false;
var g=m("gridcontainer");
this.od=b.offsetTop<g.scrollTop;
this.pd=b.offsetTop+b.offsetHeight>g.scrollTop+g.offsetHeight;
this.jg=window.setInterval(Np(this,g),10);
v=b;
ka=1;
da=3;
return true
}

;
he.prototype.A=function(a,b,c,d)
{
var e=na(a);
var f=this.gridFn(e);
f.y-=this.ub;
if(this.Xc)
{
this.te=G(b)
}
var g=this.te;
d.dx=f.x-g.x;
d.dy=f.y-g.y;
var h=this.Rc.y<e.y;
var i=this.Rc.y>e.y;
this.Rc=e;
if(this.lb&&h)
{
this.lb=false
}
else if(this.kb&&i)
{
this.kb=false
}
var j=m("gridcontainer");
var k=j.scrollTop;
var l=j.offsetHeight;
var n=k+l;
var o=b.offsetTop;
var p=o+d.dy;
var q=b.offsetHeight;
var r=o+q;
var s=r+d.dy;
if(this.od&&o>=k)
{
this.od=false
}
if(this.pd&&r<=n)
{
this.pd=false
}
if(p<=k)
{
if(!this.lb&&i)
{
if(o!=
k)
{
var t=Math.max(0,p);
this.ub-=t-k;
j.scrollTop=t
}
this.lb=true
}
if(!this.od)
{
d.dy=j.scrollTop-o
}

}
else if(s>=n)
{
var w=Ll();
if(!this.kb&&h)
{
if(r!=n)
{
var t=Math.min(w-l,s-l);
this.ub-=t-k;
j.scrollTop=t
}
this.kb=true
}
if(!this.pd)
{
d.dy=j.scrollTop+l-q-o
}

}
this.Xc=d.dx||d.dy;
this.Re();
return true
}

;
he.prototype.ya=function(a,b,c)
{
var d=Ci(b,c);
b.onclick=bu(b,b.onclick);
return d
}

;
he.prototype.Re=function()
{
var a=G(this.G);
var b=Rb(a,false);
var c=u.S(b.col,b.row);
var d=ub(c);
if(this.additionalTitleText)d+=this.additionalTitleText;
this.wf.innerHTML=d
}

;
function bu(a,b)
{
return function()
{
a.onclick=b
}


}

he.prototype.va=function(a,b)
{
window.clearInterval(this.jg)
}

;
function Np(a,b)
{
return function()
{
if(!a.lb&&!a.kb)
{
return
}
var c=a.G;
var d=c.offsetTop;
var e=c.offsetHeight;
var f=d+e;
var g=va[1]-va[0];
var h=Ll();
var i=b.scrollTop;
var j=b.offsetHeight;
var k=i+j;
var l=i;
var n=d;
if(a.lb)
{
if(d==i)
{
n=Math.max(0,d-g);
l=Math.max(0,i-g)
}

}
else if(a.kb)
{
if(f==k)
{
n=Math.min(h-e,d+g);
l=Math.min(h-j,i+g)
}

}
var o=l-i;
if(o!=0)
{
b.scrollTop=l;
c.style.top=n+"px";
a.ub-=o;
a.Xc=true;
a.Re()
}

}


}

td(function(a)
{
if(!a||!a.id)return undefined;
var b=Wb[a.id];
if(b&&!Ia(b.e)&&Cb(b.e)&&u.l)
{
return new he(a)
}
return undefined
}

);
function uo(a)
{
var b=G(a);
b.y+=m("gridcontainer").scrollTop;
var c=new Ja(b.x+b.w/2,b.y,b.coordinateFrame);
var d=Rb(c,false);
d.row=Math.round(d.row);
var e=new Ja(c.x,b.y+b.h-3,b.coordinateFrame);
var f=Rb(e,false);
f.col=d.col;
f.row=Math.round(f.row);
if(d.row==f.row)return null;
var g=u.S(d.col,d.row);
var h=u.S(d.col,f.row);
var i=
{
start:g,end:h
}
;
return i
}

;

function y(a,b,c,d,e)
{
this.G=a;
this.P=c?c:this.G.id+"_";
this.s=d?d:"DP_";
this.lf();
y.tb[this.P]=this;
if(e)
{
this.da=e
}
else
{
this.da=N.now()
}
this.ua=N.create(this.da.year,this.da.month,1);
this.wb=0;
this.xf=!(!b);
this.cc=false;
this.ze=null;
this.qe=null;
this.sb=
{

}
;
this.Ba=
{

}
;
this.eb=
{

}
;
this.o=
{

}
;
this.ga=null;
this.aa=null;
this.ed=new Tc(this);
this.Vc=new Tc(this);
this.md=false;
this.E=false;
this.R=new sc();
this.Xd=false;
this.Ca=0;
this.$a=null;
this.xc=null;
this.ld=true;
this.bd=null;
this.wc=null;
this.Yc=null;

this.Da();
this.nd=false;
this.hd(0);
this.Ab(0);
this.Kc=false;
this.pa=null;
this.H=null;
this.na=null;
this.ib=null;
this.hb=null;
this.je=null;
this.xb=false;
this.wd=null;
this.vd=null;
var f=this;
var g=function(h)
{
var i=h.startDate;
var j=h.endDate;
var k;
if(!i)
{
k=ff[this.mb]
}
else if(!j||i.equals(j))
{
k="Selected: "+f.Dc(i,true)
}
else
{
k="Selected: "+f.Dc(i)+" - "+f.Dc(j)
}
f.fg(k)
}

;
if(this.md)this.oc(g);
this.Uc=new Tc(this)
}

;
y.prototype.lf=function()
{
var a=this.s+"day_top ",b=this.s+"day_left ",c=this.s+"day_right ",d=this.s+"onmonth ",e=this.s+"onmonth ",f=this.s+"month_top ",g=this.s+"month_left ",h=this.s+"weekend ",i=this.s+"weekday ",j=this.s+"weekend_selected ",k=this.s+"weekday_selected ";
var l=
{

}
;
l[0]="";
l[1]=a;
l[3]=a+b;
l[5]=a+c;
l[2]=b;
l[4]=c;
var n=
{

}
;
for(var o in l)
{
n[o|16|256]=l[o]+d+h;
n[o|16|512]=l[o]+d+i;
n[o|32|256]=l[o]+e+h;
n[o|32|512]=l[o]+e+i;
n[o|16|1024]=l[o]+d+j;
n[o|16|2048]=l[o]+d+k;
n[o|32|1024]=l[
o]+e+j;
n[o|32|2048]=l[o]+e+k
}
var p=
{

}
;
for(var o in n)
{
p[o]=n[o];
p[o|64]=n[o]+f;
p[o|64|128]=n[o]+f+g
}
this._classMap=p
}

;
var ff=
{

}
;
ff[0]="Select a date";
ff[1]="Select a range of dates";
ff[2]="Select dates";
ff[3]="&nbsp;
";
y.prototype.Ab=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.nf=a;
this.Vd=b
}

;
y.prototype.Rg=function()
{
return this.cc
}

;
y.prototype.Le=function(a)
{
if(a!=this.cc)
{
this.cc=a;
this.Da()
}

}

;
y.prototype.Ef=function()
{
return this.nf
}

;
y.prototype.hd=function(a)
{
if(this.mb==a)
{
return
}
this.mb=a;
this.sa()
}

;
y.prototype.Ic=function()
{
return this.mb
}

;
y.prototype.show=function()
{
this.E=true;
this.Da()
}

;
y.prototype.hide=function()
{
this.G.innerHTML="";
this.E=false
}

;
y.prototype.Y=function()
{
return this.E
}

;
y.prototype.Lg=function(a)
{
return this.Ba[a.id]
}

;
y.prototype.Og=function(a)
{
return this.eb[a.id]
}

;
y.prototype.Ff=function(a)
{
return this.o[a.id]
}

;
y.prototype.Nb=function()
{
return m(this.P+"tbl")
}

;
y.prototype.Xb=function(a)
{
this.wb=a;
this.Da()
}

;
y.prototype.Gc=function()
{
return this.wb
}

;
y.prototype.Wg=function(a)
{
this.$a=a;
this.Da();
return true
}

;
y.prototype.lg=function(a)
{
this.xc=a
}

;
y.prototype.Gg=function()
{
return this.$a
}

;
y.prototype.Hg=function()
{
return this.ga
}

;
y.prototype.Ig=function()
{
if(!this.E)return null;
return this.o[this.ga.id]
}

;
y.prototype.Kg=function()
{
if(!this.E)return null;
var a=m(this.P+"day_"+(this.Ca-1)+"_6");
return this.o[a.id]
}

;
y.prototype.Yg=function(a)
{
if(a!=this.ld)
{
this.ld=a;
this.Da()
}

}

;
y.prototype.Ke=function(a)
{
this.bd=a
}

;
y.prototype.Ee=function(a)
{
this.wc=a
}

;
y.prototype.Ie=function(a)
{
this.Yc=a
}

;
y.prototype.Kf=function()
{
return ic
}

;
y.prototype.If=function()
{
return xd
}

;
y.prototype.Da=function()
{
if(!this.E)
{
return
}
var a=this.P;
var b;
var c=this.ua.month;
var d=this.ua.year;
var e=Fk.length;
var f=[c==1?12:c-1,c,c==12?1:c+1];
var g=N.create(this.da.year,this.da.month,1);
var h=be(d,c-1,1).g();
var i=be(d,c+1,1).g();
if(this.bd)
{
f[0]=this.bd(h)
}
else
{
var j=h.b()>=g.b()?"&laquo;
":"&lsaquo;
&nbsp;
";
f[0]=j+ic[f[0]]
}
if(this.wc)
{
f[1]=this.wc(this.ua)
}
else
{
f[1]=xd[f[1]]+" "+d
}
if(this.Yc)
{
f[2]=this.Yc(i)
}
else
{
var k=i.b()-g.b()<=0?"&raquo;
":"&nbsp;
&rsaquo;
";
f[2]=ic[f[2]]+k
}
var l=Ab(
d,c);
var n=Ab(h.year,h.month);
var o=new Array(49);
var p=this.ua.O()-this.wb;
if(p<0)p+=7;
if(l<30||p<5)p+=7;
for(var q=0;
q<p;
++q)
{
o[q]=N.create(h.year,h.month,n-p+q+1)
}
for(var q=p,r=0;
r<l;
++q)
{
o[q]=N.create(d,c,++r)
}
var s=p+l;
for(var q=s,r=0;
q<o.length;
++q)
{
o[q]=N.create(i.year,i.month,++r)
}
this.wd=o[0];
this.vd=o[o.length-1];
var t=new Array();
var w=this.xf?[2,3,2]:[1,5,1];
t.push('<table cols=7 cellspacing="0" cellpadding="3" id="',a,'tbl"',' class="',this.s,'monthtable" ',' style="-moz-user-select:none;
cursor:pointer;
">'
,'<tr class="',this.s,'heading" id="',a,'header">',"<td colspan=",w[0]," unselectable=on",' onmousedown="'+fa(eq)+"(",K(this.P),')"',' id="',a,'mhl" class="',this.s,'prev">',f[0],"</td>","<td colspan=",w[1],' unselectable="on"',' id="',a,'mhc" class="',this.s,'cur">',f[1],"</td>","<td colspan=",w[2],' unselectable="on"',' onmousedown="'+fa(dq)+"(",K(this.P),')"',' id="',a,'mhr" class="',this.s,'next">',f[2],"</td>","</tr>");
if(this.cc)
{
t.push('<tr class="',this.s,'days" id="',a,'dow">');
for(var q=
0;
q<e;
++q)
{
t.push('<td unselectable="on"',' class="',this.s,'dayh" id="',a,"day_",q,'">',Fk[(q+this.wb)%7],"</td>")
}
t.push("</tr>")
}
var z=(7-this.wb)%7;
var x=(z+6)%7;
this.sb=
{

}
;
var b=null;
var C=null;
var T=fa(cq);
var L;
var C;
var U=null;
if(this.xc)
{
U=this.xc(this.wd,this.vd)
}
for(var q=0,r=-1;
q<7;
++q)
{
t.push('<tr id="',a,"week_",q,'">');
for(var X=0;
X<e;
++X)
{
++r;
var ta=this.R.contains(o[r]);
C=0;
if(q==0)C|=1;
if(X==0)C|=2;
else if(X==6)C|=4;
C|=X==z||X==x?(ta?1024:256):(ta?2048:512);
if(r<p||r>=s)
{
C|=32;
if(
o[r].date<=7)
{
C|=64;
if(o[r].date==1&&X!=0)
{
C|=128
}

}
C=this._classMap[C]
}
else
{
C|=16;
if(o[r].date<=7)
{
C|=64;
if(o[r].date==1&&X!=0)
{
C|=128
}

}
if(o[r].date==this.da.date&&c==this.da.month&&d==this.da.year)
{
C=this._classMap[C]+(this.s+"today"+(ta?"_selected ":" "))
}
else
{
C=this._classMap[C]
}

}
t.push('<td id="',a,"day_",q,"_",X,'"',' class="',C,'"');
if(U&&(L=U[o[r]]))
{
t.push(' style="',L,'"')
}
t.push(' onclick="',T,'(this)"',' unselectable="on">',o[r].date,"</td>")
}
t.push("</tr>")
}
if(this.md)
{
t.push('<tr class="'
,this.s,'months">','<td colspan="7" id="',a,'sel"></td></tr>')
}
t.push("</table>");
this.G.innerHTML=t.join("");
this.ga=m(a+"day_0_0");
this.aa=m(a+"day_6_6");
var b=this.ga;
var ga=b.parentNode;
var ua=null;
var ba=null;
var r=-1;
var Ob=-1;
while(ga!=null)
{
++Ob;
if(Ob==7)break;
var Db=-1;
while(b!=null)
{
++r;
++Db;
var gb=a+"day_"+Ob+"_"+Db;
this.o[gb]=o[r];
this.sb[o[r].toString()]=b;
this.eb[gb]=ua;
if(ua)this.Ba[ba]=b;
ua=b;
ba=gb;
b=b.nextSibling
}
ga=ga.nextSibling;
if(ga!=null)
{
b=ga.firstChild
}

}
this.Ca=7;
if(!this.ld)

{
var hb=m(a+"week_4");
var hc=m(a+"week_5");
var Ed=m(a+"week_6");
if(this.o[a+"day_4_0"].month!=c)
{
hb.style.display="none";
hc.style.display="none";
Ed.style.display="none";
this.Ca=4
}
else if(this.o[a+"day_5_0"].month!=c)
{
hc.style.display="none";
Ed.style.display="none";
this.Ca=5
}
else if(this.o[a+"day_6_0"].month!=c)
{
Ed.style.display="none";
this.Ca=6
}

}
this.ze=h;
this.qe=i;
if(this.$a)
{
this.$a.call(null,this)
}
this.hf()
}

;
y.prototype.refresh=function()
{
if(this.$a)
{
this.$a.call(null,this)
}

}

;
y.prototype.oc=function(a)
{
return this.ed.add(a)
}

;
y.prototype.Vg=function(a)
{
return this.ed.remove(a)
}

;
y.prototype.sa=function(a)
{
a=arguments.length===0||a;
var b=this.R.pc();
for(var c=0;
c<b.length;
++c)
{
var d=this.sb[b[c].toString()];
this.Ta(d,false)
}
this.R.clear();
if(!this.xb)
{
this.Ge(null);
this.fd(null)
}
if(a)this.Ma()
}

;
y.prototype.Uf=function(a)
{
return this.R.contains(a)
}

;
y.prototype.Sd=function(a)
{
if(this.Vd)
{
this.Vd.call(null,a);
return
}
var b=m(a);
var c=this.R;
switch(this.mb)
{
case 1:var d=this.Ef();
if(d==0)break;
if(d!=1&&(d!=-1||!c.contains(this.o[a])))
{
var e=this.o[b.id];
var f;
switch(d)
{
case -1:if(c.Aa()>7&&this.Rb())
{
var g=b.id.substr(b.id.length-3,1);
e=this.o[this.P+"day_"+g+"_0"]
}
f=c.Aa()-1;
break;
case 7:var g=b.id.substr(b.id.length-3,1);
e=this.o[this.P+"day_"+g+"_0"];
f=6;
break;
case 30:e=this.o[b.id];
e=N.create(e.year,e.month,1);
var h=D(e);
f=Ab(e.year,e.month)
-1;
break;
default:
}
var h=D(e);
h.date+=f;
var i=h.g();
this.ca(e,i);
return
}
pb(d==1||d==-1&&c.contains(this.o[a]),"not a case for single date selection");
this.sa(false);
case 0:if(c.Aa()>0)
{
var j=c.pc()[0];
c.remove(j);
var k=this.sb[j.toString()];
if(k)this.Ta(k,false)
}
c.add(this.o[b.id]);
this.Ta(b);
this.Ma(this.o[b.id]);
break;
case 2:break;
case 3:default:break
}

}

;
y.prototype.Ge=function(a)
{
this.H=a;
this.ib=a?this.o[a.id]:null
}

;
y.prototype.fd=function(a)
{
this.na=a;
this.hb=a?this.o[a.id]:null
}

;
y.prototype.Oa=function()
{
return this.xb
}

;
y.prototype.ka=function(a,b)
{
this.sa(false);
this.xb=true;
this.Ge(this.Kb(a));
var c=this.o[this.H.id];
this.R.add(c);
this.Ta(this.H);
this.ca(c);
this.fd(this.H)
}

;
y.prototype.ya=function(a,b,c)
{
this.xb=false;
this.na=this.Kb(a);
if(this.Rb())
{
this.Ma(this.ib,this.hb,false);
return
}
var d,e;
if(this.o[this.na.id].b()<this.o[this.H.id].b())
{
d=this.o[this.na.id];
e=this.o[this.H.id]
}
else
{
d=this.o[this.H.id];
e=this.o[this.na.id]
}
this.Ma(d,e,false)
}

;
y.prototype.A=function(a,b,c,d)
{
this.je=Lk(a);
if(this.mb!=1||this.Kc)return;
this.Kc=true;
var e=this;
setTimeout(function()
{
try
{
if(e.xb)
{
e.Bf.call(e,b,c,d)
}

}
finally
{
e.Kc=false
}

}

,50)
}

;
y.prototype.qg=function(a)
{
if(this.nd==a)return;
this.nd=!(!a);
this.sa()
}

;
y.prototype.Rb=function()
{
return this.nd
}

;
y.prototype.Bf=function(a,b,c)
{
var d=this.je;
var e=this.Kb(d);
if(e===this.na)return;
var f=this.na;
this.fd(e);
var g=this.o;
var h=g[f.id].b()<g[e.id].b();
var i=g[f.id].b()<g[this.H.id].b();
var j=g[e.id].b()<g[this.H.id].b();
var k=g[this.H.id].b()<g[e.id].b();
var l=g[this.H.id].b()<g[f.id].b();
var n,o;
var p,q;
var r=j?this.na:this.H;
var s=j?this.H:this.na;
if(this.Rb())
{
var t=sb(g[s.id],g[r.id]);
if(t>=7)
{
var w,z;
w=parseInt(r.id.charAt(r.id.length-3),10);
z=parseInt(s.id.charAt(s.id.length-3),10);
r=m(this.P+
"day_"+w+"_0");
s=m(this.P+"day_"+z+"_6")
}
this.Sa(this.ga,r,false);
this.Sa(s,this.aa,false);
this.Sa(r,s,true);
this.ib=g[r.id];
this.hb=g[s.id]
}
else
{
if(h)
{
if(i)
{
o=j?this.eb[e.id]:this.eb[this.H.id];
this.Sa(f,o,false)
}
if(k)
{
n=l?this.Ba[f.id]:this.Ba[this.H.id];
this.Sa(n,e,true)
}

}
else
{
if(l)
{
n=k?this.Ba[e.id]:this.Ba[this.H.id];
this.Sa(n,f,false)
}
if(j)
{
o=j?this.eb[this.H.id]:this.eb[f.id];
this.Sa(e,o,true)
}

}

}
p=g[r.id];
q=g[s.id];
this.Ma(p,q,true)
}

;
y.prototype.Sa=function(a,b,c)
{
var d=false;
while(a)
{
if(c)
{
d=this.R.add(this.o[a.id])
}
else
{
d=this.R.remove(this.o[a.id])
}
if(d)
{
this.Ta(a,c)
}
if(a.id===b.id)break;
a=this.Ba[a.id]
}

}

;
y.LAST_DAY_OF_WEEK=
{
4:"day_3_6",5:"day_4_6",6:"day_5_6",7:"day_6_6"
}
;
y.prototype.mg=function(a)
{
if(a)
{
this.pa=
{

}
;
this.pa.x=a.x;
this.pa.y=a.y
}
else
{
this.pa=null
}

}

;
y.prototype.kf=function(a,b)
{
if(!this.pa)return;
if(b)
{
a.x-=this.pa.x;
a.y-=this.pa.y
}
else
{
a.x+=this.pa.x;
a.y+=this.pa.y
}

}

;
y.prototype.Kb=function(a)
{
var b=Ko(this.ga);
var c=dg(this.ga);
var d=this.Mf();
var e=na(a);
this.kf(e);
var f=7;
var g=this.ae(d.x,b,f,e.x);
var h=this.ae(d.y,c,this.Ca,e.y);
return m(this.P+"day_"+h+"_"+g)
}

;
y.prototype.ae=function(a,b,c,d)
{
if(d<a)return 0;
var e=Math.floor((d-a)/b);
return e>=c?c-1:e
}

;
y.prototype.Mf=function()
{
var a=this.P;
var b=this.Ca;
var c=ra(this.ga);
var d=G(m(a+y.LAST_DAY_OF_WEEK[b]));
return new tb(c.x,c.y,d.x+d.w-c.x,d.y+d.h-c.y,c.coordinateFrame)
}

;
y.prototype.Dc=function(a,b)
{
var c=b?xd:ic;
return c[a.month]+" "+a.date
}

;
y.prototype.Ma=function(a,b,c)
{
var d=
{

}
;
d.startDate=a;
d.endDate=b||a;
d.Oa=!(!c);
d.mode=this.Ic();
this.ed.Ac(d)
}

;
y.prototype.Pg=function()
{
return this.da
}

;
y.prototype.rg=function(a)
{
if(a.equals(this.da))return;
this.da=a;
this.Da()
}

;
y.prototype.Od=function(a)
{
if(a instanceof N)return a;
if(a instanceof O)
{
return N.create(a.year,a.month,a.date)
}

}

;
y.prototype.Fe=function(a)
{
this.Xd=!(!a)
}

;
y.prototype.ca=function(a,b,c)
{
var d=this.Ic();
c=c!==false;
if(a)a=this.Od(a);
if(b)b=this.Od(b);
if(a)this.Me(a);
if(!a||d==3)
{
this.sa(c);
return
}
if(d==0)
{
this.sa(false);
var e=this.sb[a.toString()];
this.R.add(a);
this.Ta(e);
if(c)this.Ma(a)
}
else if(d==1)
{
if(!b)b=a;
var f=sb(b,a);
var g=false;
if(this.Rb()&&f>=7)
{
var h=Bd(a)+7;
var i=Bd(b)+7;
h=(h-this.Gc())%7;
i=(i-this.Gc())%7;
var j;
j=be(a.year,a.month,a.date-h);
a=j.g();
j=be(b.year,b.month,b.date+(6-i));
b=j.g();
g=this.Me(a)
}
if(g)
{
this.sa(false)
}
var e=this.ga;

this.ib=a;
this.hb=b;
var k=this.aa;
var l=a.b();
var n=b.b();
var o=new sc();
for(;
e;
e=this.Ba[e.id])
{
var p=this.o[e.id];
var q=this.R.contains(p);
var r=p.b()>=l&&p.b()<=n;
if(q!=r)
{
this.Ta(e,r)
}
if(r)
{
o.add(p)
}

}
this.R=o;
if(this.o[k.id].b()<n)
{
k=this.aa;
var j=D(this.o[this.aa.id]);
var s=null;
do
{
j.date+=1;
s=j.g();
this.R.add(s)
}
while(!s.equals(b))
}
if(c)this.Ma(a,b)
}

}

;
y.prototype.Ua=function(a,b,c)
{
if(this.ua.month==a.month&&this.ua.year==a.year&&!c)return false;
b=arguments.length==1||b;
this.ua=N.create(a.year,a.month,1);
this.Da();
if(b)this.Vc.Ac();
return true
}

;
y.prototype.Gf=function()
{
return this.ua
}

;
y.prototype.Me=function(a,b)
{
if(a.b()>=this.wd.b()&&a.b()<=this.vd.b())
{
return false
}
return this.Ua(a,b)
}

;
y.prototype.db=function()
{
switch(this.Ic())
{
case 0:if(this.R.Aa())
{
return this.R.pc()[0]
}
else
{
return null
}
case 1:var a=this.ib?this.ib:null;
var b=this.hb?this.hb:null;
if(!a||!b)return null;
return[a,b];
case 2:return null;
case 3:default:return null
}

}

;
y.prototype.Ng=function()
{
return this.R.Aa()
}

;
y.prototype.fg=function(a)
{
if(this.md)
{
m(this.P+"sel").innerHTML=a
}

}

;
y.prototype.Ta=function(a,b)
{
if(this.Xd||!a)return;
if(!uf(b))b=true;
var c=[];
var d=[];
var e=" "+a.className+" ";
var f=" "+this.s;
if(b)
{
if(-1!=e.indexOf(f+"today "))
{
c.push(f+"today ");
d.push(f+"today_selected ")
}
if(-1!=e.indexOf(f+"weekday "))
{
c.push(f+"weekday ");
d.push(f+"weekday_selected ")
}
else if(-1!=e.indexOf(f+"weekend "))
{
c.push(f+"weekend ");
d.push(f+"weekend_selected ")
}

}
else
{
if(-1!=e.indexOf(f+"today_selected "))
{
d.push(f+"today ");
c.push(f+"today_selected ")
}
if(-1!=e.indexOf(f+"weekday_selected "
))
{
d.push(f+"weekday ");
c.push(f+"weekday_selected ")
}
else if(-1!=e.indexOf(f+"weekend_selected "))
{
d.push(f+"weekend ");
c.push(f+"weekend_selected ")
}

}
for(var g=0;
g<c.length;
++g)
{
e=e.replace(c[g],d[g])
}
if(c.length!=0)
{
a.className=e
}

}

;
y.prototype.Eg=function(a)
{
this.Vc.add(a)
}

;
y.prototype.Ug=function(a)
{
this.Vc.remove(a)
}

;
y.tb=new Object();
y.prototype.Cg=function()
{
return this.P
}

;
y.staticGetPickerById=function(a)
{
return y.tb[a]
}

;
function eq(a)
{
var b=y.tb[a];
return b.Ua(b.ze)
}

function dq(a)
{
var b=y.tb[a];
return b.Ua(b.qe)
}

function cq(a)
{
var b=a.id;
var c=b.match(/(.*)day_\d+_\d+/);
var d=y.tb[c[1]];
return d.Sd(b)
}

;
y.prototype.hf=function()
{
if(this.Wf===true)return;
this.Wf=true;
var a=this.P;
var b=this;
var c=this.G;
td(function(d)
{
if(b.mb==1&&d===c)
{
var e=new ma(d);
e.escapedStartPoint=false;
e.ka=function(f,g)
{
var h=na(f);
var i=ra(b.ga);
var j=G(m(a+y.LAST_DAY_OF_WEEK[b.Ca]));
if(h.x<i.x||h.x>=j.x+j.w||h.y<i.y||h.y>=j.y+j.h)return false;
this.startPoint=h.clone();
this.startEvent=f;
var k=m(a+"lasso");
if(!k)
{
k=document.createElement("div");
k.id=a+"lasso";
k.style.position="absolute";
k.style.display="none";
document.body.appendChild(
k)
}
ka=5;
da=3;
v=k;
return true
}

;
e.A=function(f,g,h,i)
{
if(!this.escapedStartPoint)
{
var j=ii(this.startPoint,na(f));
if(j>5)
{
this.escapedStartPoint=true;
b.ka.call(b,this.startEvent,g)
}
else
{
return true
}

}
b.A.apply(b,arguments);
return true
}

;
e.ya=function(f,g,h)
{
if(this.escapedStartPoint)
{
b.ya.apply(b,arguments)
}
else
{
if(this.startPoint)
{
var i=b.Kb(this.startEvent).id;
b.Sd.call(b,i)
}

}
return true
}

;
return e
}
else
{
return undefined
}

}

)
}

;
y.prototype.Dg=function(a)
{
return this.Uc.add(a)
}

;
y.prototype.Tg=function(a)
{
return this.Uc.remove(a)
}

;
y.prototype.log=function()
{
this.Uc.Ac(arguments)
}

;
y.prototype.Hf=function()
{
return this.G
}

;
function sc()
{
this.ta=
{

}
;
this.Yb=0
}

sc.prototype.Aa=function()
{
return this.Yb
}

;
sc.prototype.add=function(a)
{
var b=this.ud(a);
if(b in this.ta)return false;
this.ta[b]=a.g();
++this.Yb;
return true
}

;
sc.prototype.remove=function(a)
{
var b=this.ud(a);
if(!(b in this.ta))return false;
delete this.ta[b];
--this.Yb;
return true
}

;
sc.prototype.clear=function(a)
{
this.ta=
{

}
;
this.Yb=0
}

;
sc.prototype.contains=function(a)
{
var b=this.ud(a);
return b in this.ta
}

;
sc.prototype.pc=function()
{
var a=new Array(this.Aa());
var b=-1;
for(var c in this.ta)a[++b]=this.ta[c];
return a
}

;
sc.prototype.ud=function(a)
{
return a.toString().substr(0,9)
}

;
function Tc(a)
{
this.hg=a;
this.ja=[]
}

Tc.prototype.add=function(a)
{
if(!a)return false;
for(var b=0;
b<this.ja.length;
++b)
{
if(a===this.ja[b])return false
}
this.ja.push(a);
return true
}

;
Tc.prototype.remove=function(a)
{
if(!a)return false;
for(var b=0;
b<this.ja.length;
++b)
{
if(a===this.ja[b])
{
this.ja.splice(b,1);
return true
}

}
return false
}

;
Tc.prototype.Ac=function()
{
for(var a=0;
a<this.ja.length;
++a)
{
this.ja[a].apply(this.hg,arguments)
}

}

;
Tc.prototype.Aa=function()
{
return this.ja.length
}

;
Tc.prototype.iterator=function()
{
return new yf(this)
}

;
function yf(a)
{
this.Sc=a;
this.Lc=0;
this.Ka=null
}

yf.prototype.Qf=function()
{
return this.Lc<this.Sc.Aa()
}

;
yf.prototype.next=function()
{
if(this.Qf())
{
this.Ka=this.Sc.ja[this.Lc++]
}
else
{
this.Ka=null
}
return this.Ka
}

;
yf.prototype.current=function()
{
return this.Ka
}

;
yf.prototype.remove=function()
{
if(!this.Ka)throw new Error("no current element!");
this.Sc.remove(this.Ka);
this.Ka=null;
--this.Lc
}

;

var co=false;
var Ta=null;
function al(a)
{
return function(b)
{
return"&laquo;
"
}


}

function aq(a)
{
return function(b)
{
return a.Kf()[b.month]+" "+b.year
}


}

function $k(a)
{
return function(b)
{
return"&raquo;
"
}


}

var cg=
{

}
;
function Td(a)
{
if(M&&Ta==null)
{
Ta=Xh(window,"DP_Iframe","about:blank");
Ta.parentNode.style.display="none";
Ta.style.position="absolute"
}
var b;
var c;
if(cg[a])
{
b=cg[a];
c=b.Hf()
}
else
{
c=document.createElement("div");
c.id=a+"dp_div";
c.style.position="absolute";
c.style.display="none";
c.style.width="12.5em";
document.body.appendChild(c);
b=new y(c,false,undefined,"DP_popup_");
b.hd(0);
b.Ke(al(b));
b.Ee(aq(b));
b.Ie($k(b));
b.Le(true);
b.Xb(W(B).ia(jb,md("0")));
cg[a]=b;
b.oc(ko(b,a));
b.deactivate=function(
f)
{
if(!b.Y())return true;
var g=G(b.Nb());
var h=na(f);
if(!g.contains(h))
{
b.hide();
if(Ta)
{
Ta.parentNode.style.display="none"
}
return true
}
return false
}


}
var d=eu(c.id,a,b);
var e=m(a);
Ma(e,"focus",d,false);
Ma(e,"click",d,false);
Ma(e,"blur",du(b),false);
Ma(e,"keydown",fu(b,a),false);
return b
}

function eu(a,b,c)
{
return function()
{
var d=m(b);
var e=G(d);
var f=m(a);
f.style.left=e.x+"px";
f.style.top=e.y+e.h+"px";
f.className="DP_popup_div";
f.style.display="";

{
f.style.zIndex=7
}
c.show();
if(Ta)
{
var g=G(c.Nb());
Ta.parentNode.style.display="";
Ta.style.left=g.x+"px";
Ta.style.top=g.y+"px";
Ta.style.width=g.w+"px";
Ta.style.height=g.h+"px";
Ta.style.zIndex=f.style.zIndex-1;
Ta.style.display=""
}
var h=vf(d.value);
if(h)
{
h=h.confidence>-2?h.date:null
}
if(h)
{
c.ca(h,h,false)
}
Af(c);
return true
}


}

function du(a)
{
return function(b)
{
if(!a.Y())
{
return true
}
var b=b||window.event;
var c;
if(M)
{
var d=G(a.Nb());
c=d.contains(na(b))
}
else
{
var e=b.explicitOriginalTarget;
c=Li(a.Nb(),e)
}
if(!c)
{
a.hide();
if(Ta)
{
Ta.parentNode.style.display="none"
}

}
return true
}


}

function ko(a,b)
{
return function()
{
var c=a.db();
if(!c)return;
var d=m(b);
d.value=tc(c);
a.hide();
if(Ta)
{
Ta.parentNode.style.display="none"
}
d.onchange(d)
}


}

function fu(a,b)
{
return function(c)
{
if(!a.Y())return;
c=c||window.event;
var d=oe(c);
if(d==38||d==40)
{
var e=a.db();
if(!e)return;
var f=d==38?-1:1;
var g=D(e);
g.date+=f;
a.ca(g.g(),undefined,false)
}
else if(d==13)
{
setTimeout(ko(a,b),0)
}

}


}

;

function Au(a)
{
ek(a,"x")
}

function ek(a,b,c,d,e,f,g)
{
e=e||c;
var h="x"==b?"y":"x";
var i="x"==b?"w":"h";
var j="x"==h?"w":"h";
d=d||0;
var k="x"==b?Bu:Cu;
if(g)
{
k=Pt(k,g)
}
a.sort(k);
var l;
for(var n=0;
n<a.length;
n+=1)
{
var o=-1;
var p=a[n][h]+a[n][j];
for(var q=n+1;
q<a.length;
q+=1)
{
l=a[q];
if(l[b]!==a[n][b]||p<=l[h])
{
break
}
o=q;
if(p<l[h]+l[j])
{
p=l[h]+l[j]
}

}
if(o>=0)
{
var r=o-n+1;
var s=0;
var t=uh(r);
var w=wk(r);
var z=uh(r);
var x,C,T;
var L;
var U;
for(x=0;
x<r;
++x)
{
l=a[n+x];
for(C=-1;
(C=Fj(z,C+1))>=0;
)
{
U=a[n+C];
if(l[h]>=U[h]+U[j])
{
th(z,C);
th(
t,w[C])
}

}
L=$n(t,d);
Ne(t,L);
w[x]=L;
s=Math.max(L+1,s);
Ne(z,x)
}
var X=wk(r);
if(s>2&&!c)
{
Ft(z);
var ta=wk(s);
var ga=uh(s*r);
for(x=0;
x<r;
++x)
{
l=a[n+x];
for(C=-1;
(C=Fj(z,C+1))>=0;
)
{
U=a[n+C];
if(l[h]>=U[h]+U[j])
{
th(z,C);
ta[w[C]]=0
}

}
L=w[x];
ta[L]=x+1;
Ne(z,x);
for(T=0;
T<s;
T++)
{
if(ta[T])
{
Ne(ga,L+(ta[T]-1)*s);
Ne(ga,T+x*s)
}

}

}
for(x=0;
x<r;
++x)
{
L=w[x];
while((L+=1)<s)
{
if(L+x*s>>>5<ga.length&&(ga[L+x*s>>>5]&1<<(L+x*s&31))!=0)
{
break
}

}
X[x]=L-w[x]-1
}

}
var ua=a[n][b];
var ba;
if(f)
{
ba=f
}
else
{
ba=a[n][i]/(c||s)
}
var Ob=c&&s>c?e:
Infinity;
for(x=0;
x<r;
++x)
{
L=w[x];
l=a[n+x];
if(L>=Ob)
{
l[i]=0;
l.culled=true;
continue
}
var Db=Math.round(L*ba);
var gb;
if(f)
{
gb=Db+f
}
else
{
gb=Math.round((L+X[x]+1)*ba)
}
l[b]=ua+Db;
l[i]=gb-Db
}
n=o
}
else if(c)
{
l=a[n];
var ba;
if(f)
{
ba=f
}
else
{
ba=l[i]/c
}
var Db=Math.round(d*ba),gb=Math.round((d+1)*ba);
l[b]+=Db;
l[i]=gb-Db
}

}

}

function Bu(a,b)
{
return a.x-b.x||a.y-b.y||a.h-b.h
}

function Cu(a,b)
{
return a.y-b.y||a.x-b.x||a.w-b.w
}

function Pt(a,b)
{
return function(c,d)
{
return a(c,d)||b(c,d)
}


}

function wk(a)
{
var b=[];
while(a)
{
b[--a]=0
}
return b
}

;

var Gk=[];
var Hk=[];
function Ap()
{
for(var a=0;
a<24;
a++)
{
for(var b=0;
b<2;
b++)
{
var c=a%12||12;
var d="";
var e=Math.round(b*60/2);
if(0!==e)
{
if(e<10)
{
e="0"+e
}
d="<small>:"+e+"</small>"
}
else
{
d=""
}
Gk.push(c+d+(a>=12?"pm":"am"));
if(a<10)a="0"+a;
Hk.push(a+":00")
}

}

}

Ap();
var kb=-1;
var Ua=-1;
var ae=-1;
var I=undefined;
var ha=undefined;
var u=undefined;
function sg(a,b,c,d,e,f)
{
this.html=a;
this.i=b;
this.j=c;
this.nCols=d;
this.nRows=e;
this.zIndex=f||0
}

function ib()
{

}

ib.prototype=new tb(0,0,0,0,null);
ib.prototype.constructor=ib;
ib.prototype.K=0;
ib.prototype.V=0;
ib.prototype.fa=0;
ib.prototype.Ja=0;
ib.prototype.e=null;
ib.prototype.bg=0;
ib.prototype.continuation=false;
ib.prototype.discontinuation=false;
ib.prototype.ad=false;
ib.prototype.$d=false;
ib.prototype.zc=false;
function ea()
{

}

ea.prototype.ea=oa("CalendarPolicy::GetEventStore");
ea.prototype.ra=oa("CalendarPolicy::GetXExtent");
ea.prototype.ma=oa("CalendarPolicy::GetYExtent");
ea.prototype.Hb=oa("CalendarPolicy::GetDayCount");
ea.prototype.Eb=oa("CalendarPolicy::GenerateDisplayRange");
ea.prototype.Gb=oa("CalendarPolicy::GetDateRange");
ea.prototype.Fb=oa("CalendarPolicy::GenerateRowHeadings");
ea.prototype.Xa=oa("CalendarPolicy::GenerateColumnHeadings");
ea.prototype.gc=oa("CalendarPolicy::DateToColumn");
ea.prototype.hc=oa("CalendarPolicy::DateToRow"
);
ea.prototype.pb=function(a)
{
var b=this.gc(a);
if(b<0)
{
return undefined
}
var c=this.hc(a);
return c>=0?
{
col:b,row:c
}
:undefined
}

;
ea.prototype.I=1;
ea.prototype.Cd=oa("CalendarPolicy::EventToCells");
ea.prototype.T=oa("CalendarPolicy::GetFlags");
ea.prototype.bf=function()
{

}

;
ea.prototype.S=oa("CalendarPolicy::CellToDate");
ea.prototype.ob=oa("CalendarPolicy::AlterPeriod");
ea.prototype.L=oa("CalendarPolicy::SetAnchorDate");
ea.prototype.Kd=Au;
ea.prototype.Ed=function(a)
{
var b=I.g().k();
var c=D(b);
c.date+=this.Hb();
c=c.k();
var d=b.b();
var e=c.b();
var f=u.ea()._eventsInRange(new Mb(b,c),Wd);
for(var g=0;
g<f.length;
++g)
{
var h=f[g];
var i=this.Cd(h);
var j=i.start;
var k=i.end;
if(j===undefined)j=
{
col:0,row:0
}
;
if(k===undefined)
{
if(u.l&&Ia(h))
{
k=
{
col:u.ra(),row:0
}

}
else
{
k=
{
col:u.ra(
),row:u.ma()
}

}

}
var l=d>h.start.b();
var n=e<h.end.b();
this.Fd(h,j,k,a,l,n)
}
this.yd(a)
}

;
ea.prototype.Fd=oa("CalendarPolicy::GenerateOverlaysForEvent");
ea.prototype.ic=oa("CalendarPolicy::GetDragTipText");
ea.prototype.mc=function()
{
return false
}

;
ea.prototype.jc=oa("CalendarPolicy::GetRowHeightEx");
ea.prototype.qb=oa("CalendarPolicy::DecorateGrid");
ea.prototype.l=true;
ea.prototype.yd=function(a)
{

}

;
var J=
{
type:-1,start:0,extent:1,toString:function()
{
var a=this.type>=0&&this.type<qd.length?qd[this.type]:this.type.toString();
return"[type: "+a+", start: "+this.start+", extent: "+this.extent+"]"
}


}
;
function _GetCgMode()
{
return J
}

function _initDts(a)
{
ha=(I=a)
}

function fe(a,b)
{
if(!Bh&&a.equals(ha)&&b.equals(I))
{
return
}
var c=I&&(Yl(I,J.extent)||Yl(b,J.extent));
I=b;
ha=a;
var d=u.T();
if(d&8)
{
yc();
if(u.mc()||c)
{
Dd()
}
else
{
Ji()
}
Qa(true)
}
_SetTodayButton();
kc.ScrollPolicy();
kc.FixUI(null,false);
Gr()
}

function _SetTodayButton(a)
{
var b=false;
if(a)
{
b=true
}
else
{
if(J.type==2)
{
b=ya.equals(ha.g())
}
else if(J.type==1)
{
if(I.g().b()<=ya.b())
{
var c=D(I);
c.date+=6;
b=ya.b()<=c.g().b()
}

}
else
{
if(J.type==4&&J.extent>7)
{
var d=sb(ya,I);
if(0<=d&&d<7)
{
b=true
}

}
else
{
b=ya.equals(I.g())
}

}

}
var e=m("todayButton");
if(e)e.disabled=b
}

var Bh=true;
var Rj=[];
function ps(a)
{
if(Bh)
{
Rj=Zn(Rj,a)
}
else
{
oi(a)
}

}

function Gr()
{
try
{
var a,b,c;
if(Bh)
{
Bh=false;
var d=ya;
var e=N.create(d.year,d.month,1);
c=D(e);
c.date-=42;
a=c.k();
c.date+=168;
b=c.k();
$a(true);
yl(a,b,Rj,yj)
}
else
{
var f;
switch(J.type)
{
case 0:f=1;
break;
case 1:f=7;
break;
case 2:f=42;
break;
case 4:f=J.extent;
break;
default:f=16;
break
}
c=D(I);
c.date-=f;
a=c.k();
c.date+=f*4;
b=c.k();
$a(true);
pi(a,b,yj)
}

}
catch(g)
{
alert(g+"\n\n"+g.stack)
}

}

function yj()
{
$a(false)
}

function Uu(a)
{
Q.changingMode=true;
try
{
var b=a.startDate;
var c=new O(b.year,b.month,b.date,0,0,0);
u.L(c);
lt(a.Oa?0:100);
var d=sb(a.endDate,a.startDate)+1;
var e;
if(a.Oa)
{
e=4
}
else if(d===1)
{
e=J.type;
if(e!=3&&e!=6)e=0
}
else if(d===7&&Bd(c)===W(B).ia(jb,md("0")))
{
e=1
}
else
{
e=J.type
}
Od(e,d,!a.Oa)
}
finally
{
Q.changingMode=false
}

}

function Nj(a)
{
var b=J.type;
var c=Q;
var d=m(a);
var e=c.Ff(d);
var f=c.Uf(e);
if(f)
{
c.ca(e,e);
return
}
var g,h;
switch(b)
{
case 3:case 6:case 0:g=e;
h=e;
break;
case 4:if(J.extent<=7)
{
g=e;
var i=D(e);
i.date+=J.extent-1;
var h=i.g();
break
}
case 1:var j=Bd(e);
var k=c.Gc();
if(j!==k)
{
var i=D(e);
i.date+=k-j;
if(j<k)i.date-=7;
g=i.g()
}
else
{
g=e
}
var i=D(g);
i.date+=J.extent-1;
h=i.g();
break;
case 2:u.L(e);
return;
default:
}
c.ca(g,h)
}

var Q;
function Ot()
{
if(co)return;
co=true;
Q=new y(m("dp_0"),false);
Q.Xb(W(B).ia(jb,md("0")));
Q.hd(1);
Q.Ab(null,Nj);
Q.Ke(al(Q));
Q.Ee(bq(Q));
Q.Ie($k(Q));
Q.Le(true);
Q.lg(It);
Q.qg(true);
if(M)Q.mg(
{
x:-7,y:-7
}
);
Q.show();
Wo();
Q.oc(Uu);
Sh();
kp(ot(Q))
}

function fh()
{
Q.Ua(Q.Gf(),false,true)
}

function bq(a)
{
return function(b)
{
var c=fa(Kr)+"("+K(b)+")";
var d=a.If()[b.month]+" "+b.year;
return'<span onmousedown="'+c+'">'+d+"</span>"
}


}

function Kr(a)
{
oc("month");
var b=$(a);
u.L(b)
}

function ot(a)
{
return function(b)
{
a.rg(b);
Dd();
Ji();
_RefreshCalendarWhenDisplayedNext();
_SetTodayButton()
}


}

function It(a,b)
{
var c=u.ea()._anyEventsInDateRange(a,b,Wd);
for(var d in c)
{
c[d]="font-weight:bold"
}
return c
}

function Wo()
{
if(!Q||Q.Oa())return;
ab();
try
{
var a;
if(J.type==2)
{
var b=D(I);
b.date+=7;
var c=b.g();
var d=u.ma();
var e=(d-1)*7-1;
b.date+=e;
a=b.g();
Q.Fe(true);
Q.ca(I,a,false);
Q.Fe(false);
Q.Ua(c,false,true)
}
else
{
var f=I.month;
var g=I.date+J.extent-1;
a=be(I.year,f,g).g();
if(a.month===I.month)
{
Q.Ua(I)
}
Q.ca(I,a,false)
}

}
finally
{
Va("selectToExtent/setSelection")
}

}

function kc()
{

}

kc.cf=function(a,b)
{
if(typeof a!="number"||a<0||a>=qd.length)
{
if(typeof a=="string"&&typeof b=="undefined")
{
var c=a.split(",",2);
if(c.length==2)
{
a=c[0];
b=parseInt(c[1],10);
pb(!isNaN(b),"NAN extent ["+c[1]+"]")
}

}
for(var d=0;
d<qd.length;
d++)
{
if(qd[d]==a)
{
a=d;
break
}

}

}
return
{
policy:a,extent:b
}

}

;
kc.Ze=function(a)
{
a.start=ha.date-1+Hi(ha.year,ha.month);
var b;
switch(a.policy)
{
case 0:b=new Pc();
a.extent=1;
break;
case 1:var c=W(B).Z(fd,yb("false"));
var d=W(B).ia(jb,md("0"));
b=new gd(d,c);
a.extent=b.ra();
a.start=I.date-1+Hi(I.year,I.month);
break;
case 2:
{
var c=W(B).Z(fd,yb("false"));
var d=W(B).ia(jb,md("0"));
b=new jc(d,c);
a.extent=Ab(ha.year,ha.month);
a.start=a.start-ha.date+1
}
break;
case 3:b=new ja();
a.extent=1;
break;
case 6:b=new Fc();
a.extent=1;
break;
case 4:b=new V(a.extent);
break;
default:
}
return b
}


;
kc.ScrollPolicy=function(a)
{
if(!u.l)
{
return
}
var b=6;
var c=24;
var d=Infinity;
if(lb)
{
for(var e=0;
e<lb.length;
e++)
{
var f=lb[e];
if(!f.continuation&&!(f.flags&16))
{
d=Math.min(d,f.K)
}

}

}
if(!isFinite(d))
{
d=Math.ceil((b+c)/2)
}
var g=Math.ceil(Math.max(b,Math.min(c,d)));
if(a&&isFinite(a.hour))
{
g=a.hour*2;
if(isFinite(a.minute)&&a.minute>=30)
{
++g
}

}
if(g!==undefined)
{
var h=0;
if(g>0)
{
h=m("r"+g).offsetTop
}
m("gridcontainer").scrollTop=h
}

}

;
kc.FixUI=function(a,b)
{
if(b||J.type==4)
{
if(!a)a=
{
policy:J.type,extent:J.extent
}
;
var c=qd[a.policy];
if(a.policy==4)
{
c+=","+a.extent
}
In(c)
}
Wo();
var d=m("dateunderlay");
if(d)
{
d.innerHTML=u.Eb()
}

}

;
function oc(a,b)
{
if(a.match(/^custom/))
{
af();
return
}
bb(Jl(J.type,J.extent,a),"Changing modes","SetModeWithHist"+a);
Od(a,undefined,b)
}

function Jl(a,b,c)
{
return function(d)
{
if(d||c==undefined)
{
Od(a,b)
}
else
{
Od(c,undefined)
}

}


}

function Od(a,b,c)
{
if(a=="custom")
{
af();
return
}
Og();
var d=kc.cf(a,b);
var e=kc.Ze(d);
var f=J.type!==d.policy||J.extent!==d.extent||d.policy===6;
if(c===true)
{
f=true
}
if(!(f||J.start!==d.start))
{
return
}
ab();
try
{
var g=J.type;
var h=g!==d.policy;
var i=h||undefined===u;
if(d.policy===6&&h)
{
Md=
{

}
;
Md.extent=J.extent;
Md.start=d.start;
Md.type=J.type
}
J.extent=d.extent;
J.start=d.start;
J.type=d.policy;
u=e;
f|=u.mc();
if(Q)
{
Q.Ab(null,Nj)
}
if(g===6||g===3&&h)
{
Er()
}
if(d.policy===6||d.policy===3&&h)
{
wf()
}
if(f)
{
S("Invalidate in SetMode"
);
Dd()
}
if(i)
{
u.L(ha)
}
Qa();
kc.ScrollPolicy();
kc.FixUI(d,h)
}
finally
{
Va("SetMode:"+a)
}

}

var Te=[];
var Io;
function Rc(a,b)
{
var c="mode_link"+Te.length;
var d=!(!b.match(/^custom/));
if(d)Io=Te.length;
Te.push(b);
var e=Rc.TEMPLATE;
var f;
var g="";
if(d)
{
f=fa(af)+"()";
a="";
g='id="customModeLabel"'
}
else
{
f=fa(oc)+"("+K(b)+")"
}
e.put("idval",c);
e.put("mousedown",f);
e.put("text",H(a));
e.put("optid",g);
return e.toString()
}

Rc.TEMPLATE=new R('<td id="$
{
idval
}
" onmousedown="$
{
mousedown
}
" class=noprint> <div style="background: #e8eef7" class="t1">&nbsp;
</div> <div style="background: #e8eef7" class="t2">&nbsp;
</div> <div class="modelinkOff"><nobr $
{
optid
}
>$
{
text
}
</nobr></div></td><td class=noprint>&nbsp;
</td>');
var Eo=undefined;
function _setJsVer(a)
{
Eo=a
}

function Mt(a)
{
if(Eo!=a)
{
if(Ki())
{
Uo()
}
else
{
no=true
}

}

}

function Uo()
{
ob("Google Calendar is out of date, reloading from the server now.");
Ut(0)
}

function Ut(a)
{
if(a==1)
{
window.location.reload(true)
}
else
{
window.location.href=window.location.href
}

}

function In(a)
{
if(a.match(/^custom/))
{
Te[Io]=a
}
for(var b=0;
b<Te.length;
++b)
{
var c="mode_link"+b;
var d=m(c);
var e=d.getElementsByTagName("DIV");
var f=Te[b]==a;
for(var g=0;
g<e.length;
++g)
{
var h=e.item(g);
if(h.className=="t1"||h.className=="t2")
{
h.style.background=f?"#c3d9ff":"#e8eef7"
}
else
{
h.className=f?"modelinkOn":"modelinkOff"
}

}

}

}

function jr(a)
{
if(!a)
{
a=window.event
}
for(var b=a.srcElement||a.target;
b;
b=b.parentNode)
{
if(sa(b,"overlay"))
{
return
}
else if(b.id=="grid")
{
Og();
return
}

}

}

function Ok()
{
zl(null)
}

function Hm(a)
{
ab();
try
{
if(!a)a=window.event;
if(E.Y())return;
Jp(a)
}
finally
{
Va("MaybeClickCreateEvent")
}

}

function Jp(a)
{
ab();
try
{
var b=false;
var c=false;
for(var d=Ai(a);
d;
d=d.parentNode)
{
if(sa(d,"chip"))
{
break
}
else if(d.id=="grid"||d.id=="allDayGrid")
{
b=true;
c=d.id=="allDayGrid";
break
}

}
if(!b)return;
var e=na(a);
e.coordinateFrame=window;
var f=c?Gj():Xf(m("grid"));
var g=f(e);
if(u.l)
{
if(!c)
{
e.y+=m("gridcontainer").scrollTop;
var h=Rb(e,false).row;
var i=h>=47||h<0;
if(!i)g.h*=2;
g.w-=M?2:3;
if(M)
{
g.y+=2
}

}
g.w=Math.max(0,g.w)
}
else
{
if(M)
{
g.y+=1;
g.x-=1
}

}
var j=fb()?m("month_row_0"):Ch();
Gh(j);
j.style.left=g.x+"px"
;
j.style.top=g.y+"px";
j.style.width=g.w+"px";
j.style.height=g.h+"px";
var k;
if(fb())
{
k=Ir
}
else
{
k=c?to:uo
}
var l=Se(k,true);
ld("create bubbleFn");
l(j);
ld("bubbleFn called")
}
finally
{
Va("end ClickCreateEvent")
}

}

function Ir(a)
{
var b=G(a);
var c=new Ja(b.x+b.w/2,b.y+b.h/2,window);
var d=Rb(c,false);
var e=u.S(d.col,d.row);
var f=D(e);
var g=f.g();
f.date+=1;
var h=f.g();
return
{
start:g,end:h,flags:16
}

}

function Il(a,b)
{
var c=a.year,d=a.month,e=a.date;
var f=b.year,g=b.month,h=b.date;
var i=ic[d]+" "+e;
if(c!=f)
{
i+=", "+c
}
if(c==f&&d==g&&e==h)
{
return i+", "+c
}
i+=" - ";
if(d!=g)
{
i+=" "+ic[g]
}
if(e!=h)
{
i+=" "+h
}
i+=", "+f;
return i
}

function Ao()
{
return J.type==3||J.type==6
}

function Po()
{
if(Ao())
{
var a=m("printlink");
a.style.display="none"
}

}

function Oo()
{
var a=m("printlink");
a.style.display=""
}

window.onbeforeprint=Po;
window.onafterprint=Oo;
function _cal_print()
{
if(Ao())
{
Po();
window.print();
if(!M)
{
window.setTimeout(Oo,15000)
}
return
}
var a=I.g();
var b=D(a);
b.date+=u.Hb();
b=b.g();
var c=[];
for(var d in A)
{
var e=A[d];
if(!e.on)
{
continue
}
c.push(e.id)
}
if(!c.length)
{
c.push(B)
}
var f=[mb,a+"/"+b,"ctz",jd,"pgsz","letter"];
for(var g=0;
g<c.length;
++g)
{
f.push("src",c[g])
}
var h=window.location.toString().replace(/^[\?\#].*/,"").replace(/\/?[^\/]*$/,"/printable");
var i="?";
for(var g=0;
g<f.length;
g+=2)
{
h+=
i+encodeURIComponent(f[g])+"="+encodeURIComponent(f[g+1]);
i="&"
}
var j="goocalprint";
var k="location=0,status=0,fullscreen=0,directories=0";
var l=true;
Vh.put("title","Calendar Print Preview");
Vh.put("pdfurl",H(h));
if(Ba)
{
var n=window.open(h,j,k,l)
}
else
{
var n=window.open("about:blank",j,k,l);
n.document.write(Vh.toString());
n.document.close()
}
n.focus()
}

var Vh=new R("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"><html><head><title>$
{
title
}
</title></head><body bgcolor=white onload=p(4) style=border:0;
padding:0><div style=text-align:right;
padding-bottom:1ex;
font-size:120% id=printbtn><button onclick=p(0)>Print</button></div><embed type=application/pdf height=100% id=printpreview style=\"display:block;
width:100%;
height:80ex\" src=\"$
{
pdfurl
}
\"></embed><script type=text/javascript>var printed = false;
function p(tries)
{
if (printed && tries)
{
return;

}
var plugin = document.getElementById('printpreview');
if ('print' in plugin)
{
try
{
plugin.print();
printed = true;

}
catch (e)
{

}

}
else if (tries > 0)
{
setTimeout(function ()
{
p(tries - 1);

}
, 250);

}
else
{
printed = true;
document.location = plugin.src;

}
if (printed)
{
document.getElementById('printbtn').style.visibility = 'hidden';

}

}
<\/script></body></html>"
);

function aj(a,b)
{
var c=qe(a,null);
if(!c)
{
return null
}
var d=D(b);
d.hour=c.hour;
d.minute=c.minute;
d.second=c.second;
return d.xg()?d.k():null
}

function ub(a,b)
{
if(a instanceof Ca)
{
return Vc(a,b)
}
var c=W(B).Z(Sb,yb(ed));
if(c)
{
return pf(a)
}
var d=a.hour;
var e;
if(b)
{
e=d>=12?"p":""
}
else
{
e=d>=12?"pm":"am"
}
if(d>12)
{
d-=12
}
else if(d===0)
{
d=12
}
var f=a.minute;
var g=d;
if(!b||f!==0)
{
g+=(f>=10?":":":0")+f
}
return g+e
}

function Vc(a,b)
{
var c=W(B).Z(Sb,yb(ed));
b=!(!b);
var d=a.hour;
var e="";
if(undefined!==d)
{
if(!c)
{
if(b)
{
e=d>=12?"p":""
}
else
{
e=d>=12?"pm":"am"
}
if(d>12)
{
d-=12
}
else if(d===0)
{
d=12
}

}

}
else
{
d="?"
}
var f=d;
var g=a.minute;
if(undefined!==g)
{
if(!b||g!==0)
{
f+=(g>=10?":":":0")+g
}

}
else
{
f+=":??"
}
return f+e
}

function tc(a)
{
switch(W(B).get(Hc))
{
case "DMY":return a.date+"/"+a.month+"/"+a.year;
case "YMD":return a.year+"-"+a.month+"-"+a.date;
default:return a.month+"/"+a.date+"/"+a.year
}

}

function Uc(a)
{
var b=a.date||"??";
var c=a.month||"??";
var d=undefined!==a.year?a.year:"????";
switch(W(B).get(Hc))
{
case "DMY":return b+"/"+c+"/"+d;
case "YMD":return d+"-"+c+"-"+b;
default:return c+"/"+b+"/"+d
}

}

function Rq(a,b)
{
var c=b?qg:Qc;
if(!Ni())
{
return c[a.O()]+" "+a.date+"/"+a.month
}
else
{
return c[a.O()]+" "+a.month+"/"+a.date
}

}

function Tq(a,b,c)
{
if(undefined==a||undefined==b)
{
return undefined
}
if(1===c)
{
return ub(a)
}
else if(2===c)
{
return ub(a)+"-"+ub(b)
}

}

function Sq(a,b,c,d)
{
if(undefined==a||undefined==b)
{
return undefined
}
switch(c)
{
case 1:return d?tc(a):ub(a);
case 2:return ub(b)
}

}

function pf(a)
{
var b=a.hour,c=a.minute;
var d=W(B).Z(Sb,yb(ed));
if(d)
{
if(b<10)b="0"+b;
if(c<10)c="0"+c;
return b+":"+c
}
else
{
var e=b<12?"am":"pm";
b=b%12||12;
if(c)
{
if(c<10)
{
c="0"+c
}
return b+":"+c+e
}
else
{
return b+e
}

}

}

function Hl(a,b,c,d)
{
var e=d?"":" "+a.year,f=a.month,g=a.date;
var h=b?"":Zi(g);
if(c)
{
return ic[f]+" "+g+h+e
}
else
{
return g+h+" "+ic[f]+e
}

}

;

var wb=null;
function Na(a,b)
{
if(M&&wb==null)
{
wb=Xh(window,"CB_Iframe","javascript:false");
wb.style.position="absolute";
wb.parentNode.style.display="none"
}
this.fb=a;
var c=this.Mb();
Ma(c,"keydown",up(this));
this.ng(b);
this.ye=null;
this.Zd=this.fb+"_combobox";
Mk(window,this.fb+"_combobox");
var d=this.ha();
d.className="CB_menu";
this.Zf=6;
this.Db=null;
this.Wa=null;
this.Vb=null;
this.ba=-1;
this.E=false;
Ma(d,"mousemove",rp(this));
Ma(d,"click",qp(this));
Ma(c,"focus",tp(this));
Ma(c,"blur",sp(this));
d.style.display=
"none";
d.style.position="absolute";
d.style.overflow="auto"
}

Na.prototype.Y=function()
{
return this.E
}

;
function up(a)
{
return function(b)
{
if(!a.Y())return;
b=b||window.event;
var c=oe(b);
if(c==38||c==40)
{
var d=a.ba;
d+=c==38?-1:1;
if(d<0||d>=a.Wa.length)return;
a.select(d,true)
}
else if(c==13)
{
Ck(a);
var e=a.Mb();
e.onchange(e);
a.hide()
}

}


}

Na.prototype.Mb=function()
{
return m(this.fb)
}

;
Na.prototype.ha=function()
{
return m(this.Zd)
}

;
Na.prototype.ng=function(a)
{
this.Cf=a
}

;
function tp(a)
{
return function()
{
a.show()
}


}

function sp(a)
{
return function(b)
{
b=b||window.event;
var c=false;
if(M)
{
var d=G(a.ha());
c=d.contains(na(b))
}
else
{
var e=b.explicitOriginalTarget;
c=Li(a.ha(),e)
}
if(!c)a.hide()
}


}

function rp(a)
{
return function(b)
{
var c=a.Df(b);
if(c)
{
a.select(a.Af(c))
}
else
{
a.yc(a.ba)
}

}


}

function lr(a,b)
{
var c=a[b];
if(c)
{
if(typeof c=="string")
{
eval(c)
}
else if(typeof c=="function")
{
c()
}

}

}

function Ck(a)
{
if(a.ba<0)return;
var b=a.Na(a.ba);
var c=m(b).innerHTML;
c=sf(c);
var d=a.Lf();
if(d)
{
c=d.call(null,c,a.ba)
}
a.Mb().value=c
}

function qp(a)
{
return function(b)
{
Ck(a);
lr(a.Mb(),"onchange");
a.hide()
}


}

Na.prototype.og=function(a)
{
this.ye=a
}

;
Na.prototype.Lf=function()
{
return this.ye
}

;
Na.prototype.Na=function(a)
{
return this.Zd+"_"+a
}

;
Na.prototype.Af=function(a)
{
return parseInt(a.id.match(/_(\d+)$/)[1],10)
}

;
Na.prototype.Df=function(a)
{
a=a||window.event;
var b=na(a);
var c=this.ha();
if(!G(c).contains(b))return null;
b.y+=c.scrollTop;
for(var d=0;
d<this.Wa.length;
++d)
{
var e=m(this.Na(d));
if(G(e).contains(b))
{
return e
}

}
return null
}

;
Na.prototype.sg=function(a)
{
this.yc(this.ba);
this.Wa=new Array(a.length);
var b="<div>";
for(var c=0;
c<this.Wa.length;
++c)
{
b+='<div id="'+this.Na(c)+'" class="CB_option">'+H(a[c])+"</div>";
this.Wa[c]=a[c].toString()
}
b+="</div>";
this.ha().innerHTML=b
}

;
Na.prototype.kd=function(a)
{
if(this.Db===a)
{
return
}
if(a)
{
a|=0
}
this.Db=a;
if(this.E)
{
var b=m(this.fb);
var c=G(b);
var d=this.ha();
d.style.left=c.x+"px";
d.style.width=this.Db+"px"
}

}

;
Na.prototype.show=function()
{
if(this.E)return;
var a=this.Cf.call(null,this);
var b=a[0];
var c=a[1];
this.sg(b);
var d=m(this.fb);
var e=G(d);
var f=this.ha();
var g=e.y+e.h;
f.style.top=g+"px";
if(this.Db)
{
f.style.left=e.x+"px";
f.style.width=this.Db+"px"
}
else
{
f.style.left=e.x+"px";
f.style.width=e.w+"px"
}
f.style.display="block";
var h=this.Na(0);
if(h)
{
this.Vb=dg(m(h))
}
else
{
this.Vb=0
}
var i=Math.min(this.Wa.length,this.Zf);
f.style.height=i*this.Vb+"px";
f.style.zIndex=d.style.zIndex+2;
this.E=true;
if(Ba)
{
this.Sb=
new Array(this.Wa.length);
this.Sb[0]=0;
var j=m(this.Na(0));
for(var k=1;
k<this.Sb.length;
++k)
{
j=j.nextSibling;
var l=ra(j);
this.Sb[k]=l.y-g
}

}
if(wb)
{
var n=G(f);
wb.parentNode.style.display="";
wb.style.left=n.x+"px";
wb.style.top=n.y+"px";
wb.style.width=n.w+"px";
wb.style.height=n.h+"px";
wb.style.zIndex=d.style.zIndex+1;
wb.style.display="block"
}
this.select(c,true);
Af(this)
}

;
Na.prototype.hide=function()
{
this.ha().style.display="none";
this.E=false;
if(wb)
{
wb.parentNode.style.display="none"
}

}

;
Na.prototype.select=function(a,b)
{
if(a==this.ba)return;
if(b)
{
var c;
if(Ba)
{
c=this.Sb[a]
}
else
{
c=this.Vb*a
}
var d=this.ha();
if(d.scrollTop!=c)d.scrollTop=c
}
if(this.ba>=0)this.yc(this.ba);
this.ba=a;
var e=m(this.Na(a));
Wa(e,"CB_selected")
}

;
Na.prototype.yc=function(a)
{
if(a<0)return;
this.ba=-1;
var b=m(this.Na(a));
Ra(b,"CB_selected")
}

;
Na.prototype.deactivate=function(a)
{
if(this.E)
{
var b=na(a);
if(G(this.ha()).contains(b)||G(this.fb).contains(b))
{
return false
}
else
{
this.hide();
return true
}

}
else
{
return true
}

}

;

var zo=
{

}
;
function vp(a,b,c,d)
{
var e=new Na(a,yp(a));
e.kd(80);
var f=new Na(b,xp(a,b,c,d));
f.kd(160);
f.og(zp);
zo[a]=e;
zo[b]=f
}

var wp=new db(0,0,30,0);
function yp(a)
{
return function()
{
var b=O.now();
var c=aj(m(a).value,b);
if(!c)
{
c=b
}
var d=Math.floor(c.hour)*2;
if(c.minute>=30)
{
++d
}
return[Dk(c,false),d]
}


}

function xp(a,b,c,d)
{
return function(e)
{
var f=O.now();
var g=aj(m(a).value,f);
var h=aj(m(b).value,f);
var i=m(c).value==m(d).value;
var j=g&&i;
var k;
var l;
if(j)
{
k=g;
if(!h)
{
var n=D(g);
n.hour+=1;
h=n.k()
}
var o=gc(h,g);
var p=o.rd();
l=p/30|0
}
else
{
k=h||g||f;
l=Math.floor(k.hour)*2;
if(k.minute>=30)
{
++l
}

}
e.kd(j?160:80);
return[Dk(k,j),l]
}


}

function zp(a)
{
var b=a.match(/(.*) \([^(]*\)$/);
if(b)
{
a=b[1]
}
return a
}

function Dk(a,b)
{
var c;
if(b)
{
c=D(a)
}
else
{
a=new O(a.year,a.month,a.date,0,0,0);
c=D(a)
}
var d=[];
var e;
for(var f=0;
f<48;
++f)
{
e=ub(c.k());
if(b)
{
if(f==0)
{
e+=" (0 minutes)"
}
else if(f==1)
{
e+=" (30 minutes)"
}
else
{
e+=" ("+f/2+" hour";
e+=f==2?")":"s)"
}

}
d.push(e);
c.advance(wp)
}
return d
}

;

function Ea(a)
{
this.id=a;
this.vb=
{

}
;
this.wa=[];
this.qa=[];
this.Qa=32;
this.oe=25;
this.Wc=5;
this.B=0;
if(!Ea.Zb)
{
Ea.Zb=
{

}

}
if(a)
{
Ea.Zb[a]=this
}

}

;
Ea.prototype.Hc=function()
{
return"lv_"+this.id
}

;
Ea.prototype.Ud=function()
{
this.B=0;
this.wa=[];
this.qa=[]
}

;
Ea.prototype.Jf=function()
{
return"<div id="+this.Hc()+"></div>"
}

;
Ea.prototype.Wb=function(a)
{
var b=[];
var c=[];
for(var d=0;
d<a.length;
++d)
{
var e=a[d];
if(Aa===e.constructor)
{
c.push(e)
}
else
{
b.push(
{
header:e,eventIndex:c.length
}
)
}

}
this.wa=c;
this.qa=b
}

;
Ea.prototype.Xg=function(a)
{
this.Wb(a);
this.render()
}

;
Ea.prototype.He=function(a)
{
this.Qa=a
}

;
Ea.prototype.Ra=oa("LV_ListView::scrollBy");
Ea.prototype.Oe=oa("LV_ListView::sourceForEvent");
Ea.prototype.za=oa("LV_ListView::getEventFilter");
Ea.prototype.render=function()
{
var a=m(this.Hc());
if(!a)
{
return
}
var b=dg(m("grid"));
var c=b/ye();
var d=['<table class="printFullHeight listv" cellspacing="0">'];
var e=this.wa;
var f=this.qa;
var g=0==(u.T()&128);
if(this.flags&1&&g)
{
this.Nc(d,"<i>Showing events after "+tc(la.start)+'. <span class=lk onmousedown="'+fa(km)+'()">Look for earlier events</span></i>'
)
}
var h=false;
var i=0;
var j=ya;
var k=f.length>0&&(j.year!=f[0].header.year||j.year!=f[f.length-1].header.year);
var l=null;
var n=null;
for(var o=0;
o<f.length;
++o)
{
h=!h;
var p=f[o];
var q=p.header;
var r=p.eventIndex;
var s=o+1<f.length?f[o+1].eventIndex:e.length;
if(this.B>s)
{
continue
}
if(this.B>r)
{
r=this.B
}
if(s>r&&q)
{
if(l===null)
{
l=q
}
var t=A[e[r].src].color;
this.dc(q,d,h,s-r,t,k);
n=q
}
var w=true;
for(var z=r;
z<s&&i<c;
++z,i++)
{
var x=s-r==1;
if(this.zg(e[z],q,d,w,x,h))
{
i+=5
}
w=false
}
if(i>c)
{
break
}

}
var g=0==(u.T(
)&128);
if(g)
{
if(this.flags&2)
{
this.Nc(d,"<i>"+Gm+" "+tc(la.end)+'. <span class=lk onmousedown="'+fa(lm)+'()">Look for more</span></i>')
}
else
{
this.Nc(d,"<i>"+Gm+" "+tc(n)+'. <span class=lk onmousedown="'+fa(Kc)+'(1)">Look for more</span></i>')
}

}
d.push("</table>");
a.innerHTML=d.join("");
if(l!=null)
{
fe(l,l)
}

}

;
function lm(a)
{
var b=la.start.k();
var c=D(la.end);
c.date+=61;
var d=c.k();
$a(true);
pi(b,d,function()
{
setTimeout(function()
{
if(a!==true)
{
Kc(1)
}
$a(false)
}

,0)
}

)
}

function km(a)
{
var b=la.end.k();
var c=D(la.start);
c.date-=61;
var d=c.k();
$a(true);
pi(d,b,function()
{
setTimeout(function()
{
if(a!==true)
{
Kc(-1)
}
$a(false)
}

,0)
}

)
}

Ea.prototype.yf=oa("LV_ListView::eventsForHeader");
Ea.prototype.Rf=oa("LV_ListView::headersForEvent");
Ea.prototype.$g=oa("LV_ListView::snippetTimeHtml");
Ea.prototype.dc=oa("LV_ListView::writeHeader");
function Da(a,b)
{
if(undefined===a&&undefined===b)
{
return
}
Ea.call(this,a);
this.eventStore=b;
this.anchorDateTime=ya.k()
}

Da.prototype=new Ea(undefined);
Da.prototype.constructor=Da;
Da.prototype.yf=function(a,b,c)
{
var d=D(b);
d.date+=1;
var e=d.g().b();
var f=b.b();
var g=[];
for(var h=0;
h<a.length;
++h)
{
var i=a[h];
if(i.start.b()>=e)
{
break
}
if(i.end.b()>=f)
{
g.push(i);
if(g.length>=c)
{
break
}

}

}
return g
}

;
Da.prototype.Rf=function(a)
{
var b=D(a.start);
var c=[];
var d=a.end.b();
var e;
do
{
e=b.g();
c.push(e);
b.date+=1
}
while(e.b()<d);
return c
}

;
Da.prototype.dc=function(a,b,c,d,e,f)
{
var g=c?" alt":"";
var h=d==1?"":" lastevent";
var i=ya.equals(a)?" lv_today":"";
b.push('<tr class="newdate firstevent cal',e,i,g,h,'"','><th class="day" rowspan="',d,'">',Qc[a.O()],"</th>");
b.push('<th class="datecell" rowspan="',d,'">','<a href="javascript:void(',hm,"(",K(a.toString()),'))">',Hl(a,true,true,!f),"</a></th>")
}

;
function Fr(a,b)
{
var c=$(a);
I=(ha=c);
oc("day")
}

var hm=fa(Fr);
Da.prototype.Nc=function(a,b)
{
a.push("<tr><td colspan=5><BLOCKQUOTE>",b,"</BLOCKQUOTE></td></tr>")
}

;
Da.prototype.zg=function(a,b,c,d,e,f)
{
var g=A[a.src].color;
var h=Nb(a);
var i=false;
if(!h&&Ia(a)&&!b.equals(a.start.g()))
{
if(b.equals(a.end.g()))
{
i=true
}
else
{
h=true
}

}
if(!d)
{
c.push('<tr class="cal',g);
if(f)c.push(" alt");
if(e)c.push(" lastevent");
if(ya.equals(b))c.push(" lv_today");
c.push('">')
}
var j=' onmousedown="'+Su+"("+K(this.id)+","+K(a.eid)+","+K(b.toString())+');
"';
var k;
var l=a.att[a.src];
if(l==4||l==1)
{
k="<img "+j+" src=images/icon_needs"+g+".gif width=14 height=14>"
}
else if(Ei(a))
{
k="<img "
+j+" src=images/icon_cmts"+g+".gif width=14 height=14>"
}
else
{
k="&nbsp;
"
}
c.push('<td class="status">',k,"</td>");
c.push('<td class="time"');
if(h)
{
c.push('align=right><div class="allday"',j,'><div class="t2">&nbsp;
</div><div class="chipbody">&nbsp;
</div><div class="b2">&nbsp;
</div></div>')
}
else
{
c.push('><a href="javascript:void(0)" ',j,' class="event-title" style="color:',Zb[g][1],';
">');
if(i)
{
c.push("&raquo;
",pf(a.end))
}
else
{
c.push(pf(a.start))
}
c.push("</a>")
}
c.push("</td>");
var n=a.text;
var o=a.location?
a.location:"";
if(u.T()&16)
{
n=un("title",n,"results","hiliteSearchKeywords");
o=un("location",o,"results","hiliteSearchKeywords")
}
c.push('<td class="titlecell">');
if(n)
{
c.push('<a href="javascript:void(0)" class="event-title" style="color:',Zb[g][1],';
"',j);
c.push(">",n,"</a>");
if(o)
{
c.push('<em class="location"> - ',o,"</em>")
}

}
c.push(" ");
if(Rm(a))
{
xe("alarm_dark",c)
}
if(Um(a))
{
xe("repeat_dark",c)
}
if(Vm(a))
{
xe("icon_repeat_broken",c)
}
if(Tm(a))
{
xe("private_dark",c)
}
if(Sm(a))
{
xe("people_dark",c)
}
var p=
this.Ag(c,a,b,g);
c.push("</td></tr>");
return p
}

;
function pt(a,b,c)
{
var d=Ea.Zb[a];
var e=m("li-"+b+"-"+c);
if(d.vb[b+"-"+c]===true)
{
e.style.display="none";
delete d.vb[b+"-"+c]
}
else
{
im(e,b,c,d)
}

}

var Su=fa(pt);
function im(a,b,c,d)
{
d.vb[b+"-"+c]=true;
if(a.innerHTML.length=="")
{
var e=[];
var f=d.eventStore._byEid(b);
var g=A[f.src].color;
d.de(e,f,c,g);
a.innerHTML=e.join("")
}
a.style.display=""
}

var Zt=
{
select:function(a)
{
return a.id&&a.id.substring(0,3)=="li-"
}


}
;
function nt(a,b)
{
var c=Ea.Zb[a];
if(!b)
{
c.vb=
{

}
;
c.render();
return
}
var d=m(c.Hc());
var e=Ml(d,Zt);
for(var f=0;
f<e.length;
++f)
{
var g=e[f].id.split("-");
im(e[f],g[1],g[2],c)
}

}

Da.prototype.Ag=function(a,b,c,d)
{
var e=b.eid+"-"+c.toString();
a.push('<div class="event-info" id="li-',e,'">');
var f=this.vb[e];
if(f)
{
this.de(a,b,c,d)
}
a.push("</div>");
return f
}

;
Da.prototype.de=function(a,b,c,d)
{
a.push('<ul><li class="when">');
if(Nb(b))
{
a.push(ti(b))
}
else
{
a.push(pf(b.start));
if(!b.start.equals(b.end))a.push(" - ",pf(b.end))
}
a.push("</li>");
var e=b.location?b.location:"";
if(e)
{
a.push("<li><strong>Where:</strong> ",e,"</li>")
}
var f=Ol(b);
if(f)
{
a.push("<li><strong>"+Xi+"</strong> ",f,"</li>")
}
var g=[];
var h=Kl(b,g);
if(h>0)
{
a.push("<li><strong>Who:</strong> ",g.join(""))
}
var i=!(b.flags&64)&&$l(b);
var j=!(b.flags&64)&&Cb(b);
if(i||j)
{
a.push('<li class="response">'
);
if(i)
{
a.push("<strong>Going?</strong>&nbsp;
&nbsp;
&nbsp;
");
var k=b.att[b.src];
if(k==4||k==1)
{
a.push("<img src=images/icon_needs",d,'.gif width=14 height=14 class="iconlg"> ')
}
var l=["Yes","No","Maybe"];
var n=[2,3,4];
for(var o=0;
o<l.length;
++o)
{
if(o)a.push("|&nbsp;
");
if(k==n[o])
{
a.push("<strong>",l[o],"</strong>&nbsp;
")
}
else
{
a.push('<a href="javascript:void(_setAcceptRejectWin(',K(b.eid),",",n[o],'))">',l[o],"</a>&nbsp;
")
}

}

}
if(j)
{
a.push('&nbsp;
<span class="delete">[<a href="javascript:void(_handleDeleteEvent('
,K(b.eid),'))">Delete</a>]</span>')
}
a.push("</li>")
}
a.push('<li class="more">');
var p=Cb(b)?Ri:Ui;
if(!b.Pc())
{
a.push('<a href="javascript:void(_EF_ShowEventDetails(',K(b.eid),'))">',p," <strong>&raquo;
</strong></a> &nbsp;
")
}
a.push('<a href="javascript:void(',hm,"(",K(c.toString()),",",K(b.eid),'))">view on my calendar <strong>&raquo;
</strong></a></li>');
a.push("</ul>")
}

;
Da.prototype.dd=function(a)
{
I=(ha=a);
this.Ud();
this.Ra(0)
}

;
Da.prototype.scroll=function(a)
{
var b=null,c=false;
var d=G(m("gridcontainer"));
if(a==1||a==-1)
{
var e=0;
var f=this.qa;
var g=this.wa;
var c=false;
for(var h=0;
h<f.length;
++h)
{
if(c)
{
break
}
var i=f[h];
var j=i.header;
var k=i.eventIndex;
var l=h+1<f.length?f[h+1].eventIndex:g.length;
if(this.B>l)
{
continue
}
if(this.B>k)
{
k=this.B
}
for(var n=k;
n<l;
++n)
{
var o=g[n].eid+"-"+j.toString();
var p=m("li-"+o);
if(p)
{
b=G(p.parentNode);
if(b.y+b.h>d.y+d.h)
{
c=true;
break
}
++e
}

}

}
if(a==1)
{
a=Math.max(e-1,1)
}
else
{
a=Math.min(-e+1,-5)

}

}
else if(a==2)
{
a=1
}
else if(a==-2)
{
a=-1
}
this.le(a);
this.render()
}

;
Da.prototype.Ra=function(a)
{
this.le(a);
this.render()
}

;
Da.prototype.le=function(a)
{
var b=D(I).g();
if(this.wa==null||this.wa.length===0)
{
this.ve(b)
}
else if(this.B+a<0)
{
var c=this.qa[0].header;
var d=this.eventStore._eventsBefore(c,this.Qa,this.za(),true);
if(d.length==0)
{
this.flags|=1;
this.B=0
}
else
{
var e=this.eventStore._eventsAfter(b,this.Qa,this.za(),true);
this.Wb(d.concat(e));
var f=xf(d);
this.B+=a+f;
if(this.B<0)
{
this.B=0;
this.flags|=1
}
else
{
this.flags&=~1
}

}

}
else
{
this.B+=a
}
if(this.B>0)
{
this.flags&=~1
}
if(this.wa.length-this.B<this.oe)
{
var g=-1;
for(var h=
0;
h<this.qa.length;
++h)
{
if(this.qa[h].eventIndex>=this.B+a)
{
break
}
g=h
}
var i=g==-1?I:this.qa[g].header;
var e=this.eventStore._eventsAfter(i,this.Qa,this.za(),true);
if(e.length>0)
{
var j=g==-1?0:this.qa[g].eventIndex;
var k=xf(e);
if(j+k>=this.wa.length)
{
if(k<this.oe)
{
this.ve(i)
}
else
{
this.B-=j;
var k=xf(e);
if(k<this.Qa)
{
this.flags|=2
}
else
{
this.flags&=~2
}
this.Wb(e)
}

}

}

}
var l=0==(u.T()&128);
if(l)
{
if(a>1&&this.flags&2)
{
lm(true)
}
else if(a<-1&&this.flags&1)
{
km(true)
}

}

}

;
Da.prototype.ve=function(a)
{
this.B=0;
var b=this.eventStore._eventsAfter(a,this.Qa,this.za(),true);
var c=xf(b);
if(c<this.Wc)
{
this.flags|=2;
var d=this.eventStore._eventsBefore(a,this.Qa,this.za(),true);
var e=xf(d);
b=d.concat(b);
if(c+e<this.Wc)
{
this.flags|=1
}
else
{
this.B=c+e-this.Wc
}

}
this.Wb(b)
}

;
function xf(a)
{
var b=0;
for(var c=a.length-1;
c>=0;
--c)
{
if(a[c]instanceof Aa)
{
++b
}

}
return b
}

;

function ja()
{

}

ja.prototype=new ea();
ja.prototype.constructor=ja;
ja.prototype.l=false;
ja.prototype.ea=function()
{
return Y
}

;
ja.prototype.ra=function()
{
return 1
}

;
ja.prototype.ma=function()
{
return 1
}

;
ja.prototype.Xa=function()
{
return undefined
}

;
ja.prototype.Fb=function()
{
return undefined
}

;
ja.prototype.gc=function(a,b)
{
return 0
}

;
ja.prototype.hc=function(a,b)
{
return I.g().equals(a.g())?0:-1
}

;
ja.prototype.S=function(a,b,c)
{
var d=D(I);
if(c)
{
d.hour=c.hour;
d.minute=c.minute;
d.second=c.second
}
return d.k()
}

;
ja.prototype.ob=function(a)
{
if(!a)
{
this.L(O.now())
}
else
{
xb.scroll(a)
}

}

;
ja.prototype.Bg=function(a)
{
xb.Ra(a);
fe(I,I)
}

;
ja.prototype.L=function(a)
{
fe(a,a);
xb.dd(a)
}

;
ja.prototype.Ed=function(a)
{

}

;
ja.prototype.jc=function()
{
return null
}

;
ja.prototype.qb=function()
{
return[new sg(xb.Jf(),0,0,1,1,0)]
}

;
ja.prototype.ic=function(a,b,c,d)
{
return undefined
}

;
ja.prototype.toString=function()
{
return"[ListPolicy]"
}

;
ja.prototype.Gb=function()
{
return[I,I]
}

;
ja.prototype.Eb=function()
{
return Il(I,I)
}

;
ja.prototype.T=function()
{
return 96
}

;
var xb=null;
function Sc(a)
{
Da.call(this,a,u.ea(),false);
this.He(32)
}

Sc.prototype=new Da(undefined,undefined);
Sc.prototype.constructor=Sc;
Sc.prototype.$b=Da.prototype;
Sc.prototype.za=function()
{
if(J.type===6)
{
return Bn
}
var a=Wd;
if(!a)
{
a=ri;
bh()
}
return a
}

;
Sc.prototype.Oe=function(a)
{
bh();
var b=gj(a);
var c=A[b].color;
return undefined!==c?c:-1
}

;
Sc.prototype.dc=function(a,b,c,d,e,f)
{
if(a)
{
this.$b.dc.call(this,a,b,c,d,e,f)
}

}

;
function wf()
{
if(!xb)
{
xb=new Sc(wf.LIST_VIEW_ID)
}

}

wf.LIST_VIEW_ID="listview";
function Er()
{
xb=null
}

;

function Fc()
{
ja.call(this)
}

Fc.prototype=new ja();
Fc.prototype.constructor=Fc;
Fc.prototype.$b=ja.prototype;
Fc.prototype.ea=function()
{
return Y
}

;
Fc.prototype.Xa=function()
{
return undefined
}

;
Fc.prototype.toString=function()
{
return"[SearchPolicy]"
}

;
Fc.prototype.T=function()
{
return this.$b.T()|16|128
}

;

function V(a)
{
ea.call(this,a);
this.kc(a)
}

V.prototype=new ea();
V.prototype.constructor=V;
V.prototype.kc=function(a)
{
this.I=a;
this.nCols=this.I>7?7:this.I;
this.nDaysPerCol=Math.ceil(this.I/this.nCols);
this.l=this.nDaysPerCol===1;
this.gradationsPerHour=this.l?Math.max(1,2/this.nDaysPerCol):0.041666666666666664;
this.nRowsPerDay=this.l?24*this.gradationsPerHour:1;
this.nRows=this.l?24*this.gradationsPerHour*this.nDaysPerCol:this.nDaysPerCol
}

;
V.prototype.ea=function()
{
return Y
}

;
V.prototype.T=function()
{
var a=10;
if(this.l)
{
a|=5
}
return a
}

;
V.prototype.ra=function()
{
return this.nCols-this.Ea()
}

;
V.prototype.ma=function()
{
return this.nRows
}

;
V.prototype.Hb=function()
{
return this.I
}

;
V.prototype.Ea=function()
{
return 0
}

;
V.prototype.Xa=function()
{
if(this.nDaysPerCol==1)
{
var a=this.nCols-this.Ea();
var b=new Array(a);
var c=D(I);
for(var d=0;
d<a;
d++)
{
var e=c.g();
b[d]=Rq(e,true);
b[d]='<a class=lkh href="javascript:void(_ChangeToDayMode('+d+'))">'+b[d]+"</a>";
c.date+=1
}
return b
}
else if(this.nCols==7)
{
var f=I.O();
var b=new Array(7);
for(var d=0;
d<7;
d++)
{
b[d]=qg[(d+f)%7]
}
return b
}
return undefined
}

;
V.prototype.Fb=function()
{
if(this.l)
{
var a=W(B).Z(Sb,yb(ed))?Hk:Gk;
var b=[];
for(var c=0;
c<this.nDaysPerCol;
c++)
{
for(var d=0;
d<24;
d++)
{
for(var e=0;
e<this.gradationsPerHour;
e++)
{
if(e==0)
{
b.push(a[d*2+e])
}
else
{
b.push("")
}

}

}

}
Bk(b.length,this.ma());
return b
}
return undefined
}

;
V.prototype.gc=function(a)
{
var b=this.pb(a);
return b!==undefined?b.col:-1
}

;
V.prototype.hc=function(a)
{
var b=this.pb(a);
return b!==undefined?b.row:-1
}

;
V.prototype.Cd=function(a)
{
var b=a.end;
if(!this.l)
{
if(!Nb(a)&&b.hour|b.minute|b.second)
{
var c=D(b);
c.date+=1;
b=c.g()
}
var d=Math.max(0,sb(a.start,I));
var e=Math.min(this.I,sb(b,I));
return
{
start:
{
col:d%this.nCols,row:this.nRowsPerDay*d/this.nCols|0
}
,end:
{
col:e%this.nCols,row:this.nRowsPerDay*e/this.nCols|0
}

}

}
else if(Ia(a))
{
var f=D(b);
if(!Nb(a)&&b.hour|b.minute|b.second)
{
f.date+=1
}
f=f.g();
var d=Math.max(0,sb(a.start,I));
var e=Math.min(this.I,sb(f,I));
return
{
start:
{
col:d,row:0
}
,end:
{
col:e,row:0
}

}

}
else
{

return
{
start:this.pb(a.start,false),end:this.pb(a.end,false)
}

}

}

;
V.prototype.pb=function(a,b)
{
var c=sb(a,I);
if(c>=0&&c<this.I)
{
var d=c%this.nCols;
var e=this.nRowsPerDay*Math.floor(c/this.nCols);
if(!b)
{
e+=(a.hour+a.minute/60)*this.gradationsPerHour
}
return
{
col:d,row:e
}

}
else if(c==this.I&&!(a.hour||a.minute||a.second))
{
return
{
col:this.nCols,row:0
}

}
return undefined
}

;
V.prototype.S=function(a,b,c)
{
var d=D(I);
if(this.l&&b>this.nRows)
{
b=0
}
d.date+=a;
if(!this.l)
{
d.date+=Math.floor(b/this.nRowsPerDay)*this.nCols
}
if(this.l)
{
d.hour=Math.floor(b/this.gradationsPerHour);
d.minute=Math.round(12*(b/this.gradationsPerHour%1))*5;
d.second=0
}
else if(c)
{
d.hour=c.hour;
d.minute=c.minute;
d.second=c.second
}
else
{
d.hour=(d.minute=(d.second=0))
}
return d.k()
}

;
V.prototype.ob=function(a)
{
var b;
if(a===0)
{
if(J.extent<7)
{
this.L(O.now());
return
}
b=O.now();
var c=b.O();
var d=W(B).ia(jb,md("0"));
if(c!==d)
{
var e=D(b);
e.date+=d-c;
if(c<d)
{
e.date-=7
}
b=e.g()
}
this.L(b)
}
else
{
b=D(ha);
b.date+=this.I*a;
this.L(b.k())
}

}

;
V.prototype.Kd=function(a,b)
{
if(!a.length)
{
return
}
if(this.l)
{
var c=[],d=[];
for(var e=0;
e<a.length;
++e)
{
var f=a[e];
(Ia(f.e)?c:d).push(f)
}
ab();
ek(d,"x");
Va("DayView/rearrangeStack()");
var g=d.concat(c);
for(var e=0;
e<a.length;
++e)
{
a[e]=g[e]
}

}
else
{
function h(l,n)
{
return!Ia(l.e)-!Ia(n.e)||l.e.start.b()-n.e.start.b()
}

;
var i=ye()+1;
var j=a[0].h-de[0];
var k=Math.max(1,Math.floor(j/i));
ab();
ek(a,"y",k,0,k-1,i,h);
Va("MonthView/rearrangeStack()")
}

}

;
V.prototype.Fd=function(a,b,c,d,e,f)
{
var g=b.col,h=c.col;
var i=b.row,j;
var k=true;
if(this.l&&!Ia(a))
{
for(var l=g;
l<=h;
l+=1)
{
j=l<h?this.ma():c.row;
if(j>i&&l+this.Ea()<this.nCols||a.start.equals(a.end))
{
var n=new ib();
n.fa=l;
n.Ja=l+1;
n.K=i;
n.V=j;
n.e=a;
n.continuation=!k;
d.push(n);
k=false
}
i=0
}
if(!k&&Cb(a))
{
d[d.length-1].ad=true
}

}
else
{
j=c.row;
for(var o=i;
o<=j;
o+=1)
{
var p=o==j?h:this.nCols;
p=Math.min(this.nCols-this.Ea(),p);
if(g<p)
{
var q=g+i*this.nCols;
var n=new ib();
n.fa=g;
n.Ja=p;
n.K=o;
n.V=o+1;
n.e=a;

n.bg=q;
n.continuation=!k;
n.$d=e||!k;
n.zc=f;
if(!k)
{
d[d.length-1].zc=true
}
d.push(n)
}
k=false;
g=0
}

}

}

;
V.prototype.yd=function(a)
{
if(!this.l)
{
return
}
var b=[],c=[];
for(var d=0;
d<a.length;
++d)
{
var e=a[d];
(Ia(e.e)?b:c).push(e)
}
if(b.length)
{
var f=this.nRows+1,g=this.nRows+2;
for(var d=0;
d<b.length;
++d)
{
b[d].K=f;
b[d].V=g;
b[d].ad=false
}
b.sort(function(p,q)
{
return p.e.start.b()-q.e.start.b()||q.e.end.b()-p.e.end.b()||(p.e.text<q.e.text?-1:Number(p.e.text>q.e.text))
}

);
var h=[];
var i=[];
var j=uh();
var k=b[0].fa;
for(var d=0;
d<b.length;
++d)
{
if(k<b[d].fa)
{
k=b[d].fa;
for(var l=-1;
(l=Fj(j,l+1))>=0;
)
{
if(i[l].Ja<=k)
{
th(j,l)
}

}

}
var n=$n(j,0);
h[d]=n;
i[n]=b[d];
Ne(j,n)
}
for(var d=0;
d<b.length;
++d)
{
b[d].K+=h[d];
b[d].V+=h[d]
}
var o=c.concat(b);
for(var d=0;
d<a.length;
++d)
{
a[d]=o[d]
}

}

}

;
V.prototype.L=function(a)
{
fe(a,a)
}

;
V.prototype.ic=function(a,b,c,d)
{
if(this.l)
{
return Sq(a,b,c,d)
}
else if(c===1)
{
if(undefined==a)
{
return undefined
}
return qg[a.O()]+" "+a.month+"/"+a.date
}
else
{
return undefined
}

}

;
V.prototype.jc=function()
{
if(this.l)
{
return Math.max(1,Math.floor(144/this.nRows)|0)
}
else
{
return null
}

}

;
V.prototype.qb=function()
{
var a=[];
var b=sb(ya,I);
if(b>=0&&b<this.I)
{
var c=this.nRowsPerDay*Math.floor(b/this.nCols);
var d=b%this.nCols;
a.push(new sg("<div class=currentDayDec ></div>",d,c,1,this.nRowsPerDay,0))
}
if(this.nDaysPerCol>1)
{
var e=D(I);
for(var f=0;
f<this.I;
f++)
{
var g="dayOfMonth ";
g+=e.month===ha.month?"dayInMonth":"dayNotInMonth";
if(e.date===ya.date&&e.month===ya.month&&e.year===ya.year)
{
g+=" currentDay"
}
var h=f%this.nCols;
if(h+this.Ea()<this.nCols)
{
var i=V.prototype.qb.rb;
i.put("clazz"
,g);
i.put("n",f);
i.put("date",e.date);
var j=h==0?'id="rg_rowy_h'+f/this.nCols+'"':"";
i.put("id",j);
a.push(new sg(i.toString(),h,Math.floor(f/this.nCols)*this.nRowsPerDay,1,1,1))
}
e.date+=1;
e.normalize()
}

}
var k=this.I-this.nCols*this.nDaysPerCol;
if(k>0)
{
a.push(new sg("<div class=unusedCompactCell></div>",this.nCols-k,this.nRows-this.nRowsPerDay,k,this.nRowsPerDay,1))
}
return a
}

;
V.prototype.qb.rb=new R('<div class="$
{
clazz
}
" $
{
id
}
onclick="_ChangeToDayMode($
{
n
}
)" onmouseout="this.firstChild.style.textDecoration=\'none\'" onmouseover="this.firstChild.style.textDecoration=\'underline\'" ><span id="dh$
{
n
}
">$
{
date
}
</span>&nbsp;
</div>');
V.prototype.toString=function()
{
return"[CompactPolicy "+this.I+"]"
}

;
V.prototype.mc=function()
{
return this.nDaysPerCol>1
}

;
V.prototype.Gb=function()
{
var a=D(I);
a.date+=this.I-1;
return[I,a.g()]
}

;
V.prototype.Eb=function()
{
var a=D(I);
a.date+=this.I-1;
return Il(I,a.g())
}

;
V.prototype.Dd=function(a,b)
{
var c=D(a);
if(b)
{
c.date=1
}
c.hour=(c.minute=(c.second=0));
var d=c.O();
var e=0;
if(this.noWeekends)
{
if(d===6)
{
e=2
}
else
{
e=1-d
}

}
else
{
e=this.nStartDow-d;
if(e>0)
{
e-=7
}

}
c.date+=e;
return c.k()
}

;

function Pc()
{
V.call(this,1)
}

Pc.prototype=new V(1);
Pc.prototype.constructor=Pc;
Pc.prototype.Hb=function()
{
return 1
}

;
Pc.prototype.Xa=function()
{
return[Qc[I.O()]]
}

;
Pc.prototype.ic=Tq;
Pc.prototype.toString=function()
{
return"[DayPolicy]"
}

;

function jc(a,b)
{
V.call(this,35);
this.nStartDow=a;
this.noWeekends=b;
this.nSkipCols=b?2:0
}

jc.prototype=new V(35);
jc.prototype.constructor=jc;
jc.prototype.Gb=function()
{
var a=D(ha);
a.date=1;
var b=a.k();
a.date=Ab(ha.year,ha.month);
var c=a.k();
return[b,c]
}

;
jc.prototype.Eb=function()
{
return xd[ha.month]+" "+ha.year
}

;
jc.prototype.ob=function(a)
{
if(a===0)
{
this.L(O.now())
}
else if(a===1||a===-1)
{
var b=ha.year;
var c=ha.month;
if(c===1&&a===-1)
{
--b;
c=12
}
else if(c===12&&a===1)
{
++b;
c=1
}
else
{
c+=a
}
var d=Ab(b,c);
var e=Math.min(ha.date,d);
this.L(N.create(b,c,e))
}

}

;
jc.prototype.Ea=function()
{
return this.noWeekends?2:0
}

;
jc.prototype.L=function(a)
{
var b=this.Dd(a,true);
var c=D(b);
c.date+=35;
c=c.k();
if(c.month==a.month)
{
this.kc(42)
}
else
{
this.kc(35)
}
fe(a,b)
}

;
jc.prototype.toString=function()
{
return"[MonthPolicy]"
}

;

function gd(a,b)
{
V.call(this,7);
this.nStartDow=a;
this.noWeekends=b;
this.nSkipCols=b?2:0
}

gd.prototype=new V(7);
gd.prototype.constructor=gd;
gd.prototype.ob=function(a)
{
if(a===0)
{
this.L(O.now())
}
else
{
var b=D(ha);
b.date+=a*7;
this.L(b.k())
}

}

;
gd.prototype.Ea=function()
{
return this.noWeekends?2:0
}

;
gd.prototype.L=function(a)
{
fe(a,this.Dd(a,false))
}

;
gd.prototype.toString=function()
{
return"[WeekPolicy]"
}

;

function Gl(a,b)
{
if(b!==undefined)
{
var c=wa(b);
if(c&&c.type!==0&&c.type!==6)
{
return a
}

}
var d=a.match(/^\"?([^\s\"]*)/);
return d?d[1]:a
}

function Ep(a,b)
{
var c="";
if(!b)
{
c+='<span class="candyChipText">';
c+=a.text;
c+="</span>"
}
return c
}

;

var Kh=false;
var Jh=false;
var lg=false;
var kk=false;
var lk=false;
var Wb;
var xh;
var lb;
function yc()
{
lg=false;
kk=false;
dc=null;
kr()
}

function kr()
{
lk=false
}

function Zl()
{
mk=
{

}
;
ce=undefined
}

function Dd()
{
Kh=false
}

function Ji()
{
Jh=false
}

var Lh=100;
function lt(a)
{
if(Lh<a)
{
yc()
}
S("setting refreshmode to "+a);
Lh=a
}

function Qa(a)
{
try
{
if(!Kh)
{
var b=m("eventowner");
if(b)
{
b.innerHTML=""
}
m("calowner").innerHTML="";
if((u.T()&1)==0)
{
m("allDayGrid").style.display="none"
}
yc();
Ji()
}
if(!lg)
{
Wb=[];
xh=[]
}
ye();
bs();
gs();
S("refreshMode = "+Lh);
if(Lh>=100)
{
fs()
}
if(!a)es();
ds();
Zr()
}
catch(c)
{
alert(c+"\n\n"+c.stack)
}

}

function Ll()
{
return va[Ua]-va[0]
}

function ds()
{
if(Jh)
{
return
}
ab();
try
{
var a;
var b=u.Xa();
if(b)
{
for(var c=0,d=u.ra();
c<d;
++c)
{
if(b[c].length==0)continue;
a=m("chead"+c);
a.innerHTML=b[c]
}

}
var e=u.Fb();
if(e)
{
for(var f=0,g=u.ma();
f<g;
++f)
{
if(e[f].length==0)continue;
a=m("rhead"+f);
a.innerHTML="<div class=rheadtext>"+e[f]+"</div>"
}

}
Jh=true
}
finally
{
Va("RG_RedoHeadings_()")
}

}

var Lu=0;
var Mu=0;
function fb()
{
return J.type==4&&J.extent>7||J.type==2
}

function gs()
{
var a=ae;
var b=0;
for(var c=0;
c<lb.length;
++c)
{
b=Math.max(b,lb[c].V)
}
var d=u.ma();
var e=u.ra();
Ua=d;
ae=Math.max(0,b-d-1);
kb=e;
if(Kh)
{
if(a!==ae)
{
fj();
Pm()
}
return
}
var f=(new Date()).getTime();
var g=u.Xa();
var h=u.Fb();
var i=u.qb();
var j=u.jc();
var k=j==null?100/d:null;
var l=j!=null?d*j+"ex":"100%";
var c,n;
var o=sb(O.now(),I);
var p=[];
if(g)
{
var q=100/e;
for(c=0;
c<e;
++c)
{
var r=c==o?"cheadToday":"cheadNotToday";
p.push('<div style="width: ',q,"%;
left: ",c/e*100,'%;
" class="chead ',r,'">');
p.push(
"<span id=chead",c,">",g[c],"</span>");
if(u.l)
{
p.push("<img src=images/blank.gif class=more-no id=morearr",c," onclick=return(",fa(hs),"(this,event,",c,')) title="show off-screen events">')
}
p.push("</div>")
}

}
else if(J.type==3)
{
var s=fa(nt);
p.push('<div class="chead cheadNotToday">');
p.push('<a href="javascript:void(0)" ','onclick="',s,"('"+wf.LIST_VIEW_ID+"', true)\">");
p.push("Expand All","</a>");
p.push("&nbsp;
&nbsp;
&nbsp;
");
p.push('<a href="javascript:void(0)" ','onclick="',s,"('"+wf.LIST_VIEW_ID+
"', false)\">");
p.push("Collapse All","</a>");
p.push("</div>");
var t=fa(Kc);
p.push('<div style="position:absolute;
right:0">','<img class="navbutton" src="images/btn_moreup.gif" ','onmousedown="',t,'(-2);
"> ','<img class="navbutton" src="images/btn_moredn.gif" ','onmousedown="',t,'(2);
" style="padding-right:1em">',"</div>")
}
else if(J.type==6)
{
p.push(Xs())
}
var w=m("colheaders");
w.innerHTML=p.join("");
if(h)
{
Wa(w,"colheadersmiddle")
}
else
{
Ra(w,"colheadersmiddle")
}
var z=u.T();
var x=m("allDayGrid");
if(z&
1)
{
p=[];
for(var c=0;
c<e;
++c)
{
p.push('<div id="allDay',c,'" class="allDayCell"></div>')
}
var C=m("allDayGrid");
C.innerHTML=p.join("")+'<div id="alldayeventowner"></div>';
x.style.display=""
}
else
{
x.style.display="none"
}
p=[];
var T=false;
if(h)
{
p.push("<table border=0 cellpadding=0 cellspacing=0 ",'style="table-layout:fixed;
width:100%;
">');
p.push('<tr><td id=rowheadcell style="width:40px">');
T=true;
p.push('<div id=rowheaders style="height:',l,";
top:0px;
left:0px;
");
if(Bc())
{
p.push("background-color:"+bo+
";
")
}
p.push('">');
for(n=0;
n<d;
n++)
{
var L,U;
if(j!=null)
{
L=n*j+"ex";
U=j+"ex"
}
else
{
L=Math.round(n*k)+"%";
U=Math.round((n+1)*k)-Math.round(n*k)+"%"
}
p.push('<div class="rhead ',n%2?"rheadodd":"rheadeven");
p.push('" id=rhead',n," style=height:",U);
p.push(";
top:",L,">");
if(h[n].length>0)
{
p.push("<div class=rheadtext>",h[n],"</div>")
}
p.push("</div>")
}
p.push("</div>")
}
if(T)
{
p.push('</td><td id=gridcontainercell style="width:auto;
">')
}
p.push('<div id="grid" class="grid" onmousedown="_HideBubble(event)" ');

if(z&2)
{
p.push('onclick="'+fa(Hm)+'(event)" ')
}
p.push("style=height:",l,">");
if(i&&i.length)
{
p.push("<div id=decowner></div>")
}
if((z&64)==0)
{
var X=0,ta;
var ga=fb();
var ua=ga?"nogutter":"gutter";
for(c=0;
c<e;
c++)
{
ta=100*((c+1)/e);
p.push('<div class="vrule ',ua,'" id=c',c," style=width:1px;
",";
left:",X,"%;
height:",l,"></div>");
X=ta
}
for(n=1;
n<d;
n++)
{
var L;
if(j!=null)
{
L=n*j+"ex"
}
else
{
L=Math.round(n*k)+"%"
}
p.push('<div class="hrule ',u.l?(n%2?"hruleodd":"hruleeven"):"hruleMonth",'" id=r',n," style=top:"
,L,"></div>")
}

}
if((z&32)==0)
{
if(ga)
{
p.push('<div id=eventowner style="font:small/1.2em Arial,Sans-serif;
"></div>')
}
else
{
p.push("<div id=eventowner></div>")
}

}
if(T)
{
p.push("</td></tr></table>")
}
m("calowner").innerHTML=p.join("");
p=[];
var ba=m("gridcontainer");
if(z&4)
{
if(Ba)
{
ba.style.overflow="-moz-scrollbars-vertical"
}
else
{
ba.style.overflow="scroll";
ba.style.overflowY="scroll";
ba.style.overflowX="visible";
ba.style.marginRight="16px"
}

}
else
{
if(Ba)
{
ba.style.overflow="hidden"
}
else
{
ba.style.overflow="hidden"
;
ba.style.overflowY="hidden";
ba.style.overflowX="hidden";
ba.style.marginRight="0px"
}

}
fj();
Pm();
if(i&&i.length)
{
var Ob=m("decowner");
var Db=ra(Ob);
var gb=Z[Z.length-1]-Z[0];
for(var c=0;
c<i.length;
c++)
{
var hb=i[c];
p.push('<div style="position:absolute;
');
var hc=ge(hb.i,hb.j);
var Ed=100*(hb.i/e);
p.push("left:",Ed,"%");
if(j!=null)
{
p.push(";
top:",hc.y-Db.y,"px")
}
else
{
p.push(";
top:",Math.round(hb.j*k),"%")
}
if(hb.nRows===1&&hb.nCols===1)
{
var Mi=100*hc.w/gb;
p.push(";
width:",Mi,"%;
height:",hc.h,"px")
}
else
{

var am=ge(hb.i+hb.nCols,hb.j+hb.nRows);
var Mi=100*(am.x-hc.x+1)/gb;
p.push(";
width:",Mi,"%;
height:",am.y-hc.y+1,"px")
}
p.push(";
z-index:",hb.zIndex,'">',hb.html,"</div>")
}
Ob.innerHTML=p.join("")
}
if(xb)
{
xb.render()
}
if(fb())as();
Kh=true;
Jh=true;
Mu+=(new Date()).getTime()-f;
++Lu;
if(J.type===6&&_SR_numResults()==0)
{
et()
}

}

function bs()
{
if(lg)
{
return
}
ab();
try
{
bh();
lb=[];
try
{
Wd=ri;
u.Ed(lb)
}
catch(a)
{
alert(a.toString()+"\n"+a.stack);
throw a;

}
lg=true;
if(xb)
{
xb.Ud();
xb.Ra(0)
}

}
finally
{
Va("RG_CreateOverlayList_()")
}

}

var Ku=0;
function es()
{
if(lk)return;
if(Q&&!Q.Oa())
{
ab();
try
{
Q.Ua(ha);
Ik(Mc.Qc,true);
lk=true
}
finally
{
Va("RG_RedrawDatePicker_()")
}

}

}

function fs()
{
if(kk)
{
return
}
if(xb&&lg)
{
xb.render()
}
var a=u.ma();
var b=m("gridcontainercell")||m("gridcontainer");
var c=
{

}
;
c[1]=ra(b);
c[2]=ra(m("allDayGrid"));
var d=ra(m("grid")).x;
for(var e in lb)
{
var f=lb[e];
f.x=Z[f.fa];
f.y=va[f.K|0];
var g=f.K%1;
if(g&&u.l)
{
f.y+=g*(va[(f.K|0)+1]-f.y)
}
f.w=Z[f.Ja]-f.x-3;
if(f.V<f.K+1)
{
f.V=Math.min(f.K+1,a)
}
var h=va[f.V|0];
g=f.V%1;
if(g)
{
h+=g*(va[(f.V|0)+1]-h)
}
f.h=h-f.y;
var i=f.K>Ua?2:1;
f.x-=c[i].x;
f.y-=c[i].y;
f.coordinateFrame=i;
pb(isFinite(f.y));
pb(isFinite(f.x))
}
u.Kd(
lb);
var j=fb();
var k=[],l=[];
if(j)
{
l=[].concat(lb)
}
else
{
for(var e=0;
e<lb.length;
++e)
{
var f=lb[e];
(f.K>Ua?k:l).push(f)
}

}
var n=[l,k];
var o=["eventowner","alldayeventowner"];
for(var p=0;
p<n.length;
++p)
{
ab();
try
{
var q=o[p];
var r=m(q);
if(!r)
{
continue
}
var s=
{

}
;
var t=[];
var w=n[p];
for(e=0;
e<w.length;
++e)
{
var f=w[e];
if(f.culled)
{
for(var z=f.fa;
z<f.Ja;
++z)
{
for(var x=f.K;
x<f.V;
++x)
{
var C=z+x*kb;
s[C]=(s[C]||0)+1
}

}
continue
}
var T=f.e;
if(T!==undefined&&mk[T.eid]===undefined)
{
mk[T.eid]=gj(T)
}
if(j)
{
f.y+=de[f.K];

if(M)--f.y
}
t.push(cs(f,d))
}
var L=100/(Z[Z.length-1]-Z[0]);
var U=va[1]-va[0];
if(j)U-=de[0];
var X=ye()+1;
var ta=Math.max(1,Math.floor(U/X));
for(var C in s)
{
var ga=s[C];
var ua=C%kb;
var ba=C/kb|0;
var i=ba>Ua?2:1;
var Ob=Z[ua];
var Db=Z[ua+1]-Ob;
var gb=va[ba]+(ta-1)*X;
var hb=X;
Ob-=c[i].x;
gb-=c[i].y;
gb+=de[C/7|0];
var hc=Ob*L;
t.push('<div class="moreevents lk" style="left:',hc,"%;
top:",gb,"px;
width:",Db,"px;
height:",hb,'px" onclick="_ChangeToDayMode(',C,');
">',"+"+ga+" more","</div>")
}
ld("RedrawEvents/EventHtmlArrayCreated"
);
var Ed=t.join("");
ld("RedrawEvents/EventHtmlJoined");
r.innerHTML=Ed;
ld("RedrawEvents/EventHtmlInserted")
}
finally
{
Va("end RG_RedrawEvents_()")
}

}
kk=true;
++Ku
}

function gj(a)
{
if(a.src!==undefined)
{
return a.src
}
for(var b=0;
b<ce.length;
b++)
{
if(a.att[ce[b]]!==undefined)
{
return ce[b]
}

}
return-1
}

function bh()
{
if(undefined===ce)
{
var a=[];
for(var b in A)
{
if(A[b].on)
{
a.push(b)
}

}
ce=a
}

}

var jo=3;
var ce=undefined;
var mk=
{

}
;
var dc=null;
function cs(a,b)
{
var c=a.e;
var d=Ia(c);
var e=u.l&&!d;
var f=false;
var g=false;
var h=c.att[c.src];
if(h!==undefined&&h===3)
{
g=true
}
else if(h!==undefined&&h!==2)
{
f=true
}
var i="reldiv"+ ++jo;
Wb[i]=a;
if(e)
{
var j=
{
overlay:a,divID:i,deleted:g,tentative:f,gridX:b
}
;
j.text=Ep(c,a.continuation);
var k="reldl"+jo;
xh[k]=a;
j.dListID=k;
var l=a.x;
var n=a.y;
var o=a.w*1.7+1;
var p=Z[a.Ja]-Z[0];
if(l+o+1>p)
{
var q=e&&M?3:0;
o=p-l-q
}
var r=Z[Z.length-1]-Z[0];
var s=100*a.x/r;
var t=
100*o/r;
j.leftPosPct=s;
j.widthPct=t;
j.topPos=n;
return dj(j)
}
else if(d)
{
return Wc(a,i,g,f,b)
}
else
{
return ch(a,i,g,f,b)
}

}

function lh(a)
{
return a.replace(/<\/?\w[^>]*>/g,"")
}

function qf(a,b)
{
var c=a.e;
var d=Ib(c.text);
var e=c.Pc();
if(d.length==0&&!e)d="(No Subject)";
d=lh(d);
if(Ia(c)&&!Nb(c))
{
var f=ub(c.start);
d="("+f+") "+d
}
var g=qf.HTML_TEMPLATE;
var h="onmouseover=\"this.style.textDecoration='underline'\" onmouseout=\"this.style.textDecoration='none'\"";
if(u.l)h+=' onclick="'+fa(Dp)+"(event);
_EF_ShowEventDetails("+K(c.eid)+')"';
if(!b)b="SPAN";
g.put("tag",b);
g.put("mouse",e?"":h);
g.put("text",d);
return g.toString()
}

qf.HTML_TEMPLATE=new R('<$
{
tag
}
style="cursor:pointer" $
{
mouse
}
>$
{
text
}
</$
{
tag
}
>');
function dj(a)
{
var b=a;
var c=b.overlay.e;
var d=dj.ef;
var e=Cb(c);
d.put("calColor",c.cb());
d.put("deleted",b.deleted?"no":"");
d.put("editable",e?"edit":"");
d.put("dListID",b.dListID);
d.put("top",b.topPos+"px");
d.put("left",b.leftPosPct+"%");
d.put("width",b.widthPct+"%");
d.put("divID",b.divID);
d.put("onclick",fa(En)+"('"+b.divID+"');
return false");
d.put("height",b.overlay.h-4+"px");
var f=gc(c.end,c.start).rd()>30;
var g,
h;
if(f)
{
h=ub(c.start);
g=qf(b.overlay)
}
else
{
h=ub(c.start)+" - "+c.text;
g=""
}
d.put("time",h);
d.put("title",g);
var i=Ei(c);
if(i||b.tentative)
{
d.put("open_status","");
d.put("close_status","");
var j=i?"icon_cmts_white":"icon_needs_white";
d.put("status_icon",j)
}
else
{
d.put("open_status","<!--");
d.put("close_status","--\>");
d.put("status_icon","")
}
d.put("time_id","time"+b.divID);
var k=
{
alarm:Rm,repeat:Um,"private":Tm,people:Sm,icon_repeat_broken:Vm
}
;
for(var l in k)
{
if(k[l](c))
{
d.put("img_"+l,xe(l+"_white"
,[]))
}
else
{
d.put("img_"+l,"")
}

}
if(b.overlay.ad&&e)
{
d.put("open_resize","");
d.put("resizeStyle",'style="cursor: s-resize;
"');
d.put("close_resize","")
}
else
{
d.put("open_resize","<!--");
d.put("resizeStyle","");
d.put("close_resize","--\>")
}
return d.toString()
}

dj.ef=new R('<div class="chip cal$
{
calColor
}
" style="position: absolute;
top: $
{
top
}
;
left: $
{
left
}
;
width: $
{
width
}
;
" id="$
{
divID
}
" onclick="$
{
onclick
}
" > <div class="$
{
deleted
}
$
{
editable
}
"> <div class="t1">&nbsp;
</div> <div class="t2">&nbsp;
</div> <div class="chipbody"> <dl style="height:$
{
height
}
" id="$
{
dListID
}
"> <dt> $
{
open_status
}
<i class="status"> <i class="statusicon"> <img src="images/$
{
status_icon
}
.gif" width="14" height="14"> </i> <i class="t2">&nbsp;
</i> <i class="t1">&nbsp;
</i> </i> $
{
close_status
}
<b unselectable="on" id="$
{
time_id
}
"> <span class="timelabel">$
{
time
}
</span> $
{
img_alarm
}
$
{
img_repeat
}
$
{
img_icon_repeat_broken
}
$
{
img_private
}
$
{
img_people
}
</b> </dt> <dd><div>$
{
title
}
</div></dd> $
{
open_resize
}
<dd class="resize" unselectable="on"></dd> $
{
close_resize
}
</dl> </div> <div class="b2" $
{
resizeStyle
}
>&nbsp;
</div> <div class="b1" $
{
resizeStyle
}
>&nbsp;
</div> </div></div>'
);
function ej(a,b)
{
var c=
{

}
;
c.top=a.y;
c.top+=M?2:1;
c.width=Z[a.Ja]-Z[a.fa];
c.left=Z[a.fa]-b;
if(Ia(a.e))
{
if(!u.l)
{
c.left+=M?2:1
}
else if(M)
{
c.left+=3
}
c.width+=-3
}
else
{
var d=M?3:2;
c.left+=d;
c.width-=d+4
}
return c
}

function Wc(a,b,c,d,e)
{
var f=a.e;
var g=Wc.RG_ALLDAY_TEMPLATE;
var h=Zb[f.cb()][c?4:2];
g.put("bgColor",h);
var i=a.zc?"moreright":"";
g.put("moreright",i);
var j=a.$d;
if(j)
{
j=d?"moreleft_maybe":"moreleft"
}
else
{
j=d?"adc_maybe":"noleft"
}
g.put("moreleft",j);
var k=ej(a,e);
g.put("top",k.top+"px");
g.put("left",k.left+"px");
g.put("width",k.width+"px");
g.put("divID",b);
g.put("onclick",Wc.Hd+b+"')");
var l=qf(a,"NOBR");
g.put("title",l);
return g.toString()
}

Wc.Hd="return "+fa(En)+"('";
function En(a)
{
var b=Wb[a];
var c=b.e;
wj(c.eid,new tb(b.x,b.y,b.w,b.h,b.coordinateFrame),false);
return false
}

Wc.RG_ALLDAY_TEMPLATE=new R('<div class="adc" style="left:$
{
left
}
;
top:$
{
top
}
;
width:$
{
width
}
;
" onclick="$
{
onclick
}
" id="$
{
divID
}
" > <div class="t3" style="background-color:$
{
bgColor
}
;
border-color:$
{
bgColor
}
">&nbsp;
</div> <div class="$
{
moreleft
}
" style="background-color:$
{
bgColor
}
;
"> <div class="$
{
moreright
}
" style="padding-bottom: 1px;
">$
{
title
}
</div> </div> <div class="b3" style="background-color:$
{
bgColor
}
;
border-color:$
{
bgColor
}
">&nbsp;
</div></div>'
);
var Lj=null;
function ye()
{
if(Lj==null)
{
var a=Wc.RG_ALLDAY_TEMPLATE;
a.put("top","0px");
a.put("left","0px");
a.put("width","100%");
a.put("divID","AllDayBeaker");
var b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
a.put("title",b);
a.put("moreright","");
a.put("moreleft","");
a.put("bgColor","black");
a.put("onclick","");
var c=m("AllDayBeakerParent");
c.innerHTML=a.toString();
c.style.width="1px";
c.style.height="";
c.style.visibility="visible";
var d=m("AllDayBeaker");
d.style.visibility=
"hidden";
Lj=d.offsetHeight;
c.parentNode.removeChild(c)
}
return Lj
}

function ch(a,b,c,d,e)
{
var f=a.e;
var g=ch.Jd;
g.put("divID",b);
g.put("calColor",f.cb());
var h=ej(a,e);
g.put("top",a.y+"px");
g.put("left",h.left+"px");
g.put("width",h.width+"px");
g.put("height",a.h+"px");
g.put("cursor",Cb(f)?"pointer":"default");
g.put("onclick",Wc.Hd+b+"')");
var i=f.cb();
var j=c?'style="color:'+Zb[i][4]+'"':"";
g.put("colorStyle",j);
if(d)
{
g.put("icon","<img src=images/icon_needs_sm"+i+".gif> ")
}
else if(Ei(f))
{
g.put("icon","<img src=images/icon_cmts_sm"+i+".gif> ")
}
else
{
g.put("icon",
"")
}
var k=ub(f.start,true);
g.put("time",k);
g.put("title",qf(a));
return g.toString()
}

ch.Jd=new R('<div id="$
{
divID
}
" class="month_event cal$
{
calColor
}
" style="top:$
{
top
}
;
left:$
{
left
}
;
width:$
{
width
}
;
height:$
{
height
}
;
cursor:$
{
cursor
}
" onclick="$
{
onclick
}
" > <em class="time" $
{
colorStyle
}
>$
{
icon
}
$
{
time
}
</em>&nbsp;
<span class="event-title" $
{
colorStyle
}
>$
{
title
}
</span></div>');
function xe(a,b)
{
var c='<img src="images/'+a+'.gif" width="9" height="7"> ';
b.push(c);
return c
}

function Rm(a)
{
if(!Cb(a))return false;
if(A[a.src].type!=2)
{
return false
}
return hn(a)!="-1"
}

function Um(a)
{
return(a.flags&10272)===2048
}

function Vm(a)
{
return(a.flags&8224)===8192
}

function Tm(a)
{
return(a.flags&4128)===4096
}

function Sm(a)
{
if(a.flags&32)
{
return false
}
return Di(a)
}

var Z=null;
var va=null;
function fj(a)
{
var b=m("allDayGrid");
var c=u.T()&1;
var d=(ae+1)*(ye()+1);
d+=u.l&&M?2:0;
b.style.height=d+"px";
b.style.display=d&&c?"":"none";
if(!a)ze();
var e=Z;
Z=new Array(kb+1);
var f=!(u.l||fb());
for(var g=f?1:0;
g<kb;
g++)
{
var h=m("c"+g);
var i=ra(h);
Z[g]=i.x;
if(g==2&&Z&&e&&Z.length==e.length&&Z[0]==e[0]&&Z[1]==e[1]&&Z[2]==e[2])
{
Z=e;
break
}

}
Z[kb]=m("grid").offsetWidth+Z[0];
if(c)
{
for(var g=0;
g<kb;
g++)
{
var j=m("allDay"+g);
j.style.left=Z[g]-Z[0]+"px";
j.style.height=b.style.height
}


}
else
{
m("allDayGrid").style.display="none"
}

}

function Pm()
{
var a=m("grid");
var b=ra(a);
var c=fb()?Ua+1:Ua+ae+2;
va=new Array(c);
va[0]=b.y;
va[Ua]=a.offsetHeight+va[0];
var d=a.offsetHeight/Ua;
var e=b.y;
for(var f=1;
f<Ua;
f++)
{
if(u.l)
{
e+=d
}
else
{
e+=Math.round(d)
}
va[f]=e
}
var g=m("allDayGrid");
var h=G(g);
var i=Ua;
if(!fb())va[++i]=h.y;
for(var f=1;
f<ae+1;
++f)
{
va[i+1]=va[i]+ye()+1;
++i
}
if(!fb())va[++i]=h.y+h.h
}

var de=[];
function as()
{
de=new Array(u.nRows);
for(var a=0;
a<de.length;
++a)
{
var b=m("rg_rowy_h"+a);
de[a]=b.clientHeight
}

}

function ge(a,b)
{
return new tb(Z[a],va[b],Z[a+1]-Z[a],va[b+1]-va[b],b<0||b>48?2:1)
}

function Rb(a,b)
{
var c=Jn(a,Ek);
var d=G(m("grid"));
if(c.y>=d.y-2||fb())
{
if(u.l)
{
var e=d.w/kb,f=d.h/Ua;
var g=b?e/5:0;
var h=a.x-d.x+g,i=a.y-d.y;
var j=i/f;
if(j>=Ua)j=-1;
return
{
col:Math.floor(h/e),row:j
}

}
else
{
var k=Wf(Z,a.x);
var j=Wf(va,a.y);
return
{
col:k,row:j
}

}

}
else
{
var l=m("allDayGrid");
var n=G(l);
var e=n.w/kb,f=n.h/ae;
var g=b?e/5:0;
var h=a.x-n.x+g,i=a.y-n.y;
var j=i/f+Ua+1;
if(j<=Ua)
{
j=-1
}
return
{
col:Math.floor(h/e),row:j
}

}

}

var Tj=new Date();
var ro=100;
var so=40;
function Xc()
{
var a=new Date();
if(a.getTime()-Tj.getTime()<so)
{
setTimeout(Xc,so);
return
}
Xc.pending=false;
if(!lb)
{
return
}
var b=m("gridcontainer");
var c=b.scrollTop;
var d=c+b.offsetHeight;
u.bf(b,c,d);
if(null==dc)
{
var e=new Array(kb*2);
for(var f=0;
f<kb;
f+=2)
{
e[f]=Infinity;
e[f+1]=-Infinity
}
for(var f=0;
f<lb.length;
++f)
{
var g=lb[f];
if(g.coordinateFrame!==1)
{
continue
}
var h=g.fa;
var i=e[h*2];
var j=e[h*2+1];
if(undefined===i||g.y<i)
{
e[h*2]=g.y
}
if(undefined===j||g.y+g.h>
j)
{
e[h*2+1]=g.y+g.h
}

}
dc=e
}
for(var f=kb;
--f>=0;
)
{
var e=m("morearr"+f);
if(e)
{
var k=dc[f*2]<c,l=dc[f*2+1]>d;
e.className=k?(l?"more-ud":"more-u"):(l?"more-d":"more-no")
}

}

}

function hs(a,b,c)
{
b=b||window.event;
var d=undefined;
if(a.className=="more-u")
{
d=-1
}
else if(a.className=="more-d")
{
d=1
}
else
{
var e=b.clientY-ra(a).y;
d=e*2<a.offsetHeight?-1:1
}
var f=m("gridcontainer");
var g;
if(d<0)
{
if(dc&&undefined!==dc[c*2])
{
g=dc[c*2]
}
else
{
g=0
}

}
else
{
if(dc&&undefined!==dc[c*2+1])
{
g=Math.max(0,dc[c*2+1]-f.offsetHeight)
}
else
{
g=Math.max(0,f.scrollHeight-f.offsetHeight)
}

}
$r(f,g)
}

function Zr()
{
if(Ba&&u&&!(u.T()&4))
{
var a=m("gridcontainer");
if(a&&a.scrollTop!=0)
{
a.scrollTop=0
}

}

}

function $r(a,b)
{
var c=a.scrollTop;
var d=b-c;
var e=new kh(Math.max(5,Math.abs(d)/20));
var f;
var g=function()
{
var h=e.next();
a.scrollTop=c+(b-c)*h;
if(!e.more())
{
a.scrollTop=b;
Xc();
window.clearInterval(f)
}

}

;
f=window.setInterval(g,10)
}

Xc.pending=false;
function Qm()
{
if(Xc.pending)return;
var a=new Date();
if(a.getTime()-Tj.getTime()>=ro)
{
fc();
Xc.pending=true;
setTimeout(Xc,ro)
}
Tj=a
}

function mt()
{
Xc();
m("gridcontainer").onscroll=Qm
}

var Ek=window;
function Jn(a,b)
{
var c=a.coordinateFrame;
if(b===c)
{
return a
}
var d=0,e=0;
switch(c)
{
case 1:var f=ra(m("grid")||m("gridcontainer"));
d=f.x;
e=f.y;
break;
case 2:var f=ra(m("allDayGrid"));
d=f.x;
e=f.y;
break;
default:break
}
switch(b)
{
case 1:var f=ra(m("grid")||m("gridcontainer"));
d-=f.x;
e-=f.y;
break;
case 2:var f=ra(m("allDayGrid"));
d-=f.x;
e-=f.y;
break;
default:break
}
if(a.constructor==tb)
{
return new tb(a.x+d,a.y+e,a.w,a.h,b)
}
else
{
return new Ja(a.x+d,a.y+e,b)
}

}

dd=function()
{
yc()
}

;
Gn=function(a)
{
if(mc&&a in mc)
{
$s(a);
if(J.type==6)
{
Dd()
}

}

}

;

function op(a,b,c)
{
this.type=a;
this.version=b;
this.os=c
}

;
var Me=new op(0,0,null);
var Uf=navigator.userAgent.toLowerCase();
if(Uf.indexOf("msie")!=-1&&document.all)
{
Me.type=1;
if(Uf.indexOf("msie 5"))Me.version=5
}
else if(Uf.indexOf("safari")!=-1)
{
Me.type=3
}
else if(Uf.indexOf("mozilla")!=-1)
{
Me.type=2
}
if(Uf.indexOf("X11;
"))
{
Me.os=1
}
function Pb()
{

}

Pb.create=function(a,b,c,d,e,f)
{
var g;
if(Me.type==1)
{
g=document.createElement("div");
g.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+a+'")';
if(b&&c)
{
g.style.width=b+"px";
g.style.height=c+"px";
g.width=b;
g.height=c
}

}
else
{
if(b&&c)
{
g=new Image(b,c)
}
else
{
g=new Image()
}
g.src=a
}
if(e||d||e==0||d==0)
{
g.style.position="absolute";
g.style.left=d+"px";
g.style.top=e+"px"
}
if(f||f==0)
{
g.style.zIndex=f
}
return g
}

;

function za(a)
{
this.we=0.25;
this.xe=true;
this.element=window.document.createElement("div");
this.element.style.position="absolute";
this.element.style.zIndex=180;
this.element.id="infowindow";
this.uf();
this.tf();
this.qf(a);
this.uc=null;
this.pf();
this.jd(208,69);
this.shown=true;
this.hide()
}

za.prototype.kg=function(a,b)
{
this.jd(a-(this.f.w.width-15)*2,b-(this.f.n.height-15)*2)
}

;
za.prototype.jd=function(a,b)
{
if(a<0)a=0;
if(b<0)b=0;
this.width=a;
this.height=b;
this.tg(a,b);
this.pg(a,b);
this.closeButton.style.left=this.Of()-this.closeButton.width-10-1+"px";
this.closeButton.style.top="10px"
}

;
za.prototype.Nf=function()
{
return this.height+this.f.pointer.height+this.f.n.height
}

;
za.prototype.Qg=function()
{
return 0
}

;
za.prototype.Of=function()
{
return this.width+this.f.w.width+this.f.e.width
}

;
za.prototype.tg=function(a,b)
{
this.f.nDiv.style.width=a+"px";
this.f.eDiv.style.height=b+"px";
this.f.cDiv.style.width=a+"px";
this.f.cDiv.style.height=b+"px";
this.f.wDiv.style.height=b+"px";
this.contentArea.style.height=b+25+"px";
var c=this.Qd(a);
if(this.xe)
{
this.f.s1Div.style.width=c+"px";
this.f.pointer.style.display="";
this.f.pointer.style.left=c+this.f.sw.width+"px";
this.f.s2Div.style.left=c+this.f.pointer.width+this.f.sw.width+"px";
this.f.s2Div.style.width=a-c-this.f.pointer.width+"px"
}
else
{
this.f.s1Div.style.width=
"0px";
this.f.pointer.style.display="none";
this.f.s2Div.style.left=this.f.sw.width+"px";
this.f.s2Div.style.width=a+"px"
}
var d=a+this.f.w.width+"px";
this.f.ne.style.left=d;
this.f.eDiv.style.left=d;
this.f.se.style.left=d;
var e=b+this.f.n.height+"px";
this.f.sw.style.top=e;
this.f.s1Div.style.top=e;
this.f.pointer.style.top=e;
this.f.s2Div.style.top=e;
this.f.se.style.top=e
}

;
za.prototype.pg=function(a,b)
{

}

;
za.prototype.hide=function()
{
if(!this.shown)
{
return
}
if(this.uc)
{
if(!this.uc.call(this))return
}
this.shown=false;
this.element.style.display="none"
}

;
za.prototype.show=function()
{
if(this.shown)
{
return
}
this.shown=true;
this.element.style.display="";
Af(this)
}

;
za.prototype.deactivate=function(a)
{
if(this.Y())
{
if(Li(this.element,Ai(a)))
{
return false
}
else
{
this.hide();
return true
}

}
else
{
return true
}

}