var _ads;var _adctr=0;var _adlist={};function createAds(D,C,A,B){_ads=new Ads(D,C,A,B);_adctr++}function handleAdClick(A,B){if(_adlist[A]._url!=null){window.open(_adlist[A]._url,_adlist[A]._target)}}function Ads(D,C,A,B){this._div=D;this._url=A;this._target=B;this._adid="ad"+String(_adctr);_adlist[this._adid]=this;if(C==null){this._dims={width:"100%",height:"600px"}}else{this._dims=C}}Ads.prototype.getInstance=function(){return _ads};Ads.prototype.show=function(A,B){if(A.substring(A.length-3).toLowerCase()=="swf"){var C=new SWFObject("/ads/"+A,this._adid,this._dims.width,this._dims.height,"8","#ffffff",true);C.addParam("scale","exactfit");C.addParam("salign","LT");C.addParam("wmode","transparent");C.addParam("allowScriptAccess","always");C.addParam("allowFullScreen","false");C.addParam("swLiveConnect","false");C.addVariable("_adid",this._adid);C.useExpressInstall("res/flash/expressinstall.swf");C.write(this._div)}else{dojo.byId(this._div).innerHTML="'}};var _blogs;function createBlogs(){_blogs=new Blogs()}function Blogs(){this._comm=new Comm("/ai")}Blogs.prototype.getInstance=function(){return _blogs};Blogs.prototype.postBlogConversation=function(F,E,C,D,B,A){if(C==null){this._comm.postBlogConversation(function(G){F(G)},E,D,B,A)}else{this._comm.postBlogConversationWithImage(function(G){F(G)},E,C,D,B,A)}};Blogs.prototype.postBlogConversationComment=function(E,B,C,D,A){this._comm.postBlogConversationComment(function(F){E(F)},B,C,D,A)};Blogs.prototype.postBlogPost=function(D,B,A,C){this._comm.postBlogPost(function(E){D(E)},B,A,C)};Blogs.prototype.deleteBlogPost=function(C,A,B){this._comm.deleteBlogPost(function(D){C(D)},A,B)};function CalDate(A){this._toffset=Number(USER_TIMEZONE_OFFSET);this._time=this.adjustForTimezone(A)}CalDate.prototype.getDate=function(){var A=new Date();A.setTime(this._time);return A.getUTCDate()};CalDate.prototype.getDay=function(){var A=new Date();A.setTime(this._time);return A.getUTCDay()};CalDate.prototype.getHours=function(){var A=new Date();A.setTime(this._time);return A.getUTCHours()};CalDate.prototype.getMinutes=function(){var A=new Date();A.setTime(this._time);return A.getUTCMinutes()};CalDate.prototype.setHours=function(A){var B=new Date();B.setTime(this._time);B.setUTCHours(A);this._time=B.getTime()};CalDate.prototype.setMinutes=function(B){var A=new Date();A.setTime(this._time);A.setUTCMinutes(B);this._time=A.getTime()};CalDate.prototype.today=function(){var A=new CalDate(new Date().getTime());A.setHours(12);A.setMinutes(0);return A};CalDate.prototype.dayOf=function(){var A=new CalDate(this.normalizeTime(this._time));A.setHours(12);A.setMinutes(0);return A};CalDate.prototype.value=function(){return this.normalizeTime(this._time)};CalDate.prototype.getFirstDayOfWeek=function(){var A=new Date();A.setTime(this._time);var B=A.getUTCDay();A.setTime(this._time-B*CalDate.prototype.TIME_ONE_DAY);return new CalDate(this.normalizeTime(A.getTime()))};CalDate.prototype.prevDay=function(){return new CalDate(this.normalizeTime(this._time-CalDate.prototype.TIME_ONE_DAY))};CalDate.prototype.nextDay=function(){return new CalDate(this.normalizeTime(this._time+CalDate.prototype.TIME_ONE_DAY))};CalDate.prototype.addDays=function(A){return new CalDate(this.normalizeTime(this._time+A*CalDate.prototype.TIME_ONE_DAY))};CalDate.prototype.prevWeek=function(){return new CalDate(this.normalizeTime(this._time-CalDate.prototype.TIME_ONE_WEEK))};CalDate.prototype.nextWeek=function(){return new CalDate(this.normalizeTime(this._time+CalDate.prototype.TIME_ONE_WEEK))};CalDate.prototype.prevMonth=function(){var A=new Date();A.setTime(this._time);var B=A.getUTCFullYear();var C=A.getUTCMonth();C--;if(C<0){C=11;B--}A.setUTCDate(1);A.setUTCFullYear(B);A.setUTCMonth(C);return new CalDate(this.normalizeTime(A.getTime()))};CalDate.prototype.nextMonth=function(){var A=new Date();A.setTime(this._time);var B=A.getUTCFullYear();var C=A.getUTCMonth();C++;if(C>11){C=0;B++}A.setUTCDate(1);A.setUTCFullYear(B);A.setUTCMonth(C);return new CalDate(this.normalizeTime(A.getTime()))};CalDate.prototype.prevYear=function(){var A=new Date();A.setTime(this._time);var B=A.getUTCFullYear();A.setUTCFullYear(B-1);return new CalDate(this.normalizeTime(A.getTime()))};CalDate.prototype.nextYear=function(){var A=new Date();A.setTime(this._time);var B=A.getUTCFullYear();A.setUTCFullYear(B+1);return new CalDate(this.normalizeTime(A.getTime()))};CalDate.prototype.formatTimeAMPM=function(){var C=new Date();C.setTime(this._time);var A=C.getUTCHours();var D=C.getUTCMinutes();if(D<10){D="0"+D}var B;if(A==0||A==24){A=12;B="am"}else{if(A==12){B="pm"}else{if(A<12){B="am"}else{A=A-12;B="pm"}}}return A+":"+D+B};CalDate.prototype.formatTimeHHMM=function(){var B=new Date();B.setTime(this._time);var A=B.getUTCHours();if(A<10){A="0"+A}var C=B.getUTCMinutes();if(C<10){C="0"+C}return A+":"+C};CalDate.prototype.formatDateMMDDYYYY=function(){var B=new Date();B.setTime(this._time);var A;if(B.getUTCDate()<10){A="0"+String(B.getUTCDate())}else{A=String(B.getUTCDate())}var C;if(B.getUTCMonth()+1<10){C="0"+String(B.getUTCMonth()+1)}else{C=String(B.getUTCMonth()+1)}return C+"."+A+"."+String(B.getUTCFullYear())};CalDate.prototype.formatDateMonthDDYYYY=function(){var A=new Date();A.setTime(this._time);return this.months[A.getUTCMonth()]+" "+A.getUTCDate()+", "+A.getUTCFullYear()};CalDate.prototype.formatTodayString=function(){var A=new Date();A.setTime(this.adjustForTimezone(A.getTime()));var C=CalDate.prototype.days[A.getUTCDay()];var B=A.getUTCDate();return"Today is "+C+" the "+B+this.getDayPostfix(B)};CalDate.prototype.formatWeekString=function(){var A=new Date();A.setTime(this._time);var C=CalDate.prototype.monthsex[A.getMonth()];var B=A.getDate();return"Week of "+C+" "+B};CalDate.prototype.getDayPostfix=function(A){pfx="th";if(A==1||A==21||A==31){pfx="st"}else{if(A==2||A==22){pfx="nd"}else{if(A==3||A==23){pfx="rd"}}}return pfx};CalDate.prototype.formatDateDayMonth=function(){var B=new Date();B.setTime(this._time);var A=CalDate.prototype.days[B.getUTCDay()];var D=CalDate.prototype.months[B.getUTCMonth()];var C=B.getUTCDate();return A+", "+D+" "+C};CalDate.prototype.formatDateMonthDay=function(){var A=new Date();A.setTime(this._time);var C=CalDate.prototype.months[A.getUTCMonth()];var B=A.getDate();return C+" "+B};CalDate.prototype.formatDateMonthYear=function(){var A=new Date();A.setTime(this._time);var C=CalDate.prototype.months[A.getUTCMonth()];var B=A.getUTCFullYear();return C+" "+B};CalDate.prototype.formatDateMonth=function(){var A=new Date();A.setTime(this._time);var B=CalDate.prototype.months[A.getUTCMonth()];return B};CalDate.prototype.formatDateYear=function(){var A=new Date();A.setTime(this._time);var B=A.getUTCFullYear();return B};CalDate.prototype.getDaysInMonth=function(){var C=new Date();var H=[];C.setTime(this._time);var J=new Date();J.setTime(new CalDate().today()._time);var I=C.getUTCMonth();C.setTime(this._time-(C.getUTCDate()-1)*CalDate.prototype.TIME_ONE_DAY);var A=C.getTime();var E=C.getUTCDay();for(var F=0;F0){for(var F=E;F<7;F++){var D=C.getUTCDate();H.push({date:D,time:this.normalizeTime(B),currentmonth:false,istoday:false});B=B+CalDate.prototype.TIME_ONE_DAY;C.setTime(B)}}return H};CalDate.prototype.getDaysInWeek=function(){var B=new Date();var H=[];B.setTime(this._time);var E=B.getTime();var A=new Date();A.setTime(new CalDate().today()._time);var G=B.getUTCDay();for(var D=0;D<7;D++){var F=E+(D-G)*CalDate.prototype.TIME_ONE_DAY;B.setTime(F);var C=B.getUTCDate();istoday=false;if(B.getUTCDate()==A.getUTCDate()&&B.getUTCMonth()==A.getUTCMonth()&&B.getUTCFullYear()==A.getUTCFullYear()){istoday=true}H.push({day:C,time:this.normalizeTime(F),istoday:istoday,month:CalDate.prototype.months[B.getUTCMonth()],dayofweek:CalDate.prototype.days[D]})}return H};CalDate.prototype.isWithinDay=function(H,E){var D=new Date();D.setTime(this._time);H=this.adjustForTimezone(H);E=this.adjustForTimezone(E);var C=new Date();var A=new Date();C.setTime(H);A.setTime(E);var B=D.getUTCFullYear()*1000+D.getUTCMonth()*50+D.getUTCDate();var G=C.getUTCFullYear()*1000+C.getUTCMonth()*50+C.getUTCDate();var F=A.getUTCFullYear()*1000+A.getUTCMonth()*50+A.getUTCDate();if(B>=G&&B<=F){return true}return false};Calendar.prototype.isWithinHour=function(C){var B=new Date();B.setTime(this._time);C=this.adjustForTimezone(C);var A=new Date();if(C-this._timeB.getUTCFullYear()){return -1}if(C.getUTCFullYear()B.getUTCMonth()){return -1}if(C.getUTCMonth()B.getUTCDate()){return -1}if(C.getUTCDate()this._cacheendtime){A=true}}if(A==false){D();return }this._comm.getCalendar(function(E){if(E.status==Comm.prototype.SUCCESS){_calendar._cachestarttime=C;_calendar._cacheendtime=B;_calendar._cache=_calendar.expandData(E.data,C,B)}D()},C,B)};Calendar.prototype.updateSummary=function(C){if(this._summary!=null){C();return }var B;var A;B=new CalDate(new Date().getTime()).value();A=B+3*CalDate.prototype.TIME_ONE_MONTH;this._comm.getCalendar(function(D){if(D.status==Comm.prototype.SUCCESS){_calendar._summary=_calendar.expandData(D.data,B,A)}C()},B,A)};Calendar.prototype.updateSearch=function(A){if(this._search!=null){A();return }this._comm.searchCalendar(function(B){if(B.status==Comm.prototype.SUCCESS){_calendar._search=B.data}else{_calendar._search=[]}A()},this._searchstr)};Calendar.prototype.getFilters=function(A){if(this._filters!=null){A();return }this._comm.getCalendarFilters(function(C){_calendar._filters=[{user_id:_calendar._uid,filter_name:"My Calendar",id:-1,message_status:1}];if(C.status==Comm.prototype.SUCCESS){for(var B=0;B0){while((Math.pow(2,B.getDay())&Number(F.event.recurrence_sub_pattern))==0){B=B.addDays(-1)}}this.setRecurrentEventTime(F,B.value())}else{if(F.event.recurrence_pattern==Number("3")){E=E-E%F.event.recurrence_skip_pattern+F.event.recurrence_skip_pattern;B=B.addDays(E);while(B.getDay()==0||B.getDay()==6){B=B.addDays(-1)}this.setRecurrentEventTime(F,B.value())}else{if(F.event.recurrence_pattern==Number("4")){}else{if(F.event.recurrence_pattern==Number("5")){}}}}}return F};Calendar.prototype.getPreviousRecurrence=function(B){var C=dojo.clone(B);var A=new CalDate(C.start_date);if(C.event.recurrence_pattern==Number("1")){var A=A.addDays(-C.event.recurrence_skip_pattern);this.setRecurrentEventTime(C,A.value())}else{if(C.event.recurrence_pattern==Number("2")){A=A.addDays(-1);if(C.event.recurrence_sub_pattern>0){while((Math.pow(2,A.getDay())&Number(C.event.recurrence_sub_pattern))==0){A=A.addDays(-1)}}else{A=A.addDays(-1)}this.setRecurrentEventTime(C,A.value())}else{if(C.event.recurrence_pattern==Number("3")){A=A.addDays(-1);while(A.getDay()==0||A.getDay()==6){A=A.addDays(-1)}this.setRecurrentEventTime(C,A.value())}else{if(C.event.recurrence_pattern==Number("4")){}else{if(C.event.recurrence_pattern==Number("5")){}}}}}return C};Calendar.prototype.setRecurrentEventTime=function(A,C){var B=A.end_date-A.start_date;A.start_date=C;A.end_date=C+B;A.event.start_time=A.start_date;A.event.end_time=A.end_date};Calendar.prototype.checkRecurrence=function(E,F,D){var C=new CalDate(E.start_date);var A=new CalDate(E.end_date);var B=new CalDate(F);var G=new CalDate(D);if(A.compareDays(B)==-1){return false}if(C.compareDays(G)==-1){return false}return true};Calendar.prototype.checkFilter=function(B,A){if(A==null||A==""){return false}try{if(String(A).concat(",").indexOf(String(B.id)+",")>-1){return true}}catch(C){}return false};Calendar.prototype.applyFilter=function(A){if(this._filter==null){return true}if(this._cache[A].filters==null||this._cache[A].filters==""){return false}try{if(String(this._cache[A].filters).concat(",").indexOf(String(this._filter)+",")>-1){return true}}catch(B){}return false};Calendar.prototype.getFilterIcons=function(B){if(B.filters==null||B.filters==""){return""}var D=B.filters.split(",");var E="";for(var C=0;C';break}}}return E};Calendar.prototype.getEventsForDay=function(D){var C=[];var A=new CalDate(D);for(var B=0;B-1;B--){if(new CalDate(C[A].event.start_time).value()1){F[B].count=F[B].count+1;F[B].pos=F[E].pos+F[E].spread*(1*(F[E].index+1)/F[E].count);F[B].spread=1-F[B].pos;A=F[B]}else{var C=this.pushEvent(F,D,B-1);F[B].spread=C.spread;F[B].count=C.count;F[B].index=C.index+1;F[B].pos=C.pos;A=F[B]}}}return A};Calendar.prototype.resolveConflicts=function(B){var C=[];for(var A=0;A'+Calendar.prototype.markers[A]+''+this._filters[A].filter_name+""}if(this._filters.length>1){B="";if(this._filter==null){B='class="on"'}C+="
  • all calendars
  • '}C+="";return C};Calendar.prototype.getCalendarMenu=function(){var A="";A+='
    ';A+="
    ";A+=' ";A+="
    ";A+="
    ";return A};Calendar.prototype.handleCalendarAction=function(){var A=dojo.byId("cal_actions").options[dojo.byId("cal_actions").selectedIndex].value;if(A=="addevent"){this.showAddEditEvent()}else{if(A=="edittab"){this.showAddTab()}else{if(A=="schools"){this.showImportSchoolCalendar()}else{if(A=="upcoming"){this.showSummaryInfo()}}}}};Calendar.prototype.getEventGuestStatus=function(C){var A="";for(var B=0;BATTENDING'}else{if(C.event_guest_lists[B].guest_status==Number("1")){A='MAYBE'}}}}return A};Calendar.prototype.getRSVPBar=function(B){var A="Your RSVP: "+this.getEventGuestStatus(B)+'acceptmaybedecline';return A};Calendar.prototype.updateRSVPBar=function(B,C){var A="";if(C==Number("0")){A='ATTENDING'}else{if(C==Number("1")){A='MAYBE'}}var D="Your RSVP: "+A+'acceptmaybedecline';dojo.byId("stat"+B).innerHTML=D};Calendar.prototype.showInfoView=function(){if(this._infoview==Calendar.prototype.INFO_VIEW_SUMMARY){this.showSummaryInfo()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_DETAIL){this.showEventDetail(this._infoid)}else{if(this._infoview==Calendar.prototype.INFO_VIEW_SEARCH){this.showSearchResults()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_ADDTAB){this.showAddTab()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_ADDEVENT){this.showAddEditEvent()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_EVENT_ADDED){this.showEventAdded()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_EVENT_UPDATED){this.showEventUpdated()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_EVENT_DELETED){this.showEventDeleted()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_RSVP_UPDATED){this.showRSVPUpdated()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_SCHOOL_UPDATED){this.showSchoolUpdated()}else{if(this._infoview==Calendar.prototype.INFO_VIEW_ADDSCHOOL){this.showImportSchoolCalendar()}}}}}}}}}}}};Calendar.prototype.showSummaryInfo=function(){this.updateSummary(function(){_calendar.doShowSummaryInfo()})};Calendar.prototype.doShowSummaryInfo=function(){var C="";this._infoview=Calendar.prototype.INFO_VIEW_SUMMARY;C+='
    Upcoming Events
    ';for(var B=0;B';var E=new CalDate(this._summary[B].start_date).formatDateDayMonth();var D=new CalDate(this._summary[B].end_date).formatDateDayMonth();var A="";if(E==D){D="";E=""}else{D=" ("+D+")";E=" ("+E+")";A="
    "}C+=' '+new CalDate(this._summary[B].start_date).formatDateDayMonth()+"";if(this._summary[B].event.all_day==Number("1")){C+=' all day event'}else{C+=' '+new CalDate(this._summary[B].start_date).formatTimeAMPM()+E+" to "+A+new CalDate(this._summary[B].end_date).formatTimeAMPM()+D+""}if(this._summary[B].event.event_type=="school"){C+='

    '+this._summary[B].event.event_name+"

    "}else{C+='

    '+this._summary[B].event.event_name+"

    "}C+='
      ';if(this._summary[B].event.location){C+="
    • Where:"+this._summary[B].event.location+"
    • "}if(this._summary[B].event.event_type!="personal"&&this._summary[B].event.event_type!="school"){if(this._summary[B].event.owner.id!=this._uid){C+='
    • '+this.getRSVPBar(this._summary[B].event)+"
    • "}}C+="
    "}if(this._summary.length==0){C+='

    You have no upcoming events

    '}dojo.byId("divcalinfo").innerHTML=C};Calendar.prototype.doSearch=function(){this._search=null;this._searchstr=dojo.byId("calsearch").value;this.showSearchResults()};Calendar.prototype.showSearchResults=function(){this.updateSearch(function(A){_calendar.doShowSearchResults()})};Calendar.prototype.doShowSearchResults=function(){var C="";this._infoview=Calendar.prototype.INFO_VIEW_SEARCH;this._infoid=this._searchstr;C+='
    Search Results for "'+this._searchstr+'"
    ';for(var B=0;B';var E=new CalDate(this._search[B].start_date).formatDateDayMonth();var D=new CalDate(this._search[B].end_date).formatDateDayMonth();var A="";if(E==D){D="";E=""}else{D=" ("+D+")";E=" ("+E+")";A="
    "}C+=' '+new CalDate(this._search[B].start_date).formatDateDayMonth()+"";if(this._search[B].event.all_day==Number("1")){C+=' all day event'}else{C+=' '+new CalDate(this._search[B].start_date).formatTimeAMPM()+E+" to "+A+new CalDate(this._search[B].end_date).formatTimeAMPM()+D+""}C+='

    '+this._search[B].event.event_name+"

    ";C+='
      ';C+="
    • Where:"+this._search[B].event.location+"
    • ";if(this._search[B].event.event_type!="personal"){if(this._search[B].event.owner.id!=this._uid){C+='
    • '+this.getRSVPBar(this._search[B].event)+"
    • "}}C+="
    "}if(this._search.length==0){C+='

    there were no events found for this search.

    '}dojo.byId("divcalinfo").innerHTML=C};Calendar.prototype.editTabs=function(){var A=[];var B=false;for(var C=0;Cdelete cancel

    ';dojo.byId("divcalinfo").innerHTML=B};Calendar.prototype.showUpdateRSVP=function(B,A){var C="";if(A==Number("2")){C+='
    Update RSVP
    ';C+='

    changing your status to NOT ATTENDING will remove this event from your calendar. you will still be able to see this event on your events page. are you sure you want to change your RSVP?

    change cancel

    ';dojo.byId("divcalinfo").innerHTML=C;return }this.updateRSVP(B,A)};Calendar.prototype.showEventAdded=function(){var A="";this._infoview=Calendar.prototype.INFO_VIEW_EVENT_ADDED;A+='
    Add Event
    ';A+='

    your event has been added.

    ';dojo.byId("divcalinfo").innerHTML=A};Calendar.prototype.showEventUpdated=function(){var A="";this._infoview=Calendar.prototype.INFO_VIEW_EVENT_UPDATED;A+='
    Edit Event
    ';A+='

    your event has been updated.

    ';dojo.byId("divcalinfo").innerHTML=A};Calendar.prototype.showEventDeleted=function(){var A="";this._infoview=Calendar.prototype.INFO_VIEW_EVENT_DELETED;A+='
    Delete Event
    ';A+='

    your event has been deleted.

    ';dojo.byId("divcalinfo").innerHTML=A};Calendar.prototype.showRSVPDeleted=function(){var A="";this._infoview=Calendar.prototype.INFO_VIEW_RSVP_UPDATED;A+='
    Delete Event
    ';A+='

    your rsvp has been updated.

    ';dojo.byId("divcalinfo").innerHTML=A};Calendar.prototype.showSchoolUpdated=function(){var A="";this._infoview=Calendar.prototype.INFO_VIEW_SCHOOL_UPDATED;A+='
    School Calendars
    ';A+='

    your school calendars have been updated.

    ';dojo.byId("divcalinfo").innerHTML=A};Calendar.prototype.showDay=function(){var N="";var A=this.getEventsForDay(this._time);N+='
    ';N+='
    ';N+='
    ';N+=this.getFilterTabs();N+="
    ";N+='
    ';N+="
    ";N+='
    ';N+='
    ';N+=this.getCalendarMenu();N+='
    ';N+='
    ';N+=' «»'+new CalDate(this._time).formatDateMonthDay()+"
    ";N+=' '+new CalDate(this._today).formatTodayString()+"";N+="
    ";N+='
    ';N+='
    ';N+='
    ';N+="
    ";N+=' ';N+="
    ";N+='
    ';N+=' ';N+='
    ';N+='
    ';N+='
    ';N+='
    Time
    ';var J="";var E=[];for(var O=0;O"+Y+""}if(A[O].event.event_type=="school"){J+=''+A[O].event.event_name+""}else{J+=''+A[O].event.event_name+""}}A=E;N+='
    '+J+"
    ";N+="
    ";N+="
    ";N+='
    ';N+=' ';N+='
    ';var F=this.resolveConflicts(A);for(var P=0;P<24;P++){N+='
    '}var X=620;for(var O=0;O';N+='
    ';N+=' '+G+"";var Y=this.getFilterIcons(A[O]);if(Y!=""){N+=" "+Y+""}if(A[O].event.event_type=="school"){N+=' '+A[O].event.event_name+""}else{N+=' '+A[O].event.event_name+""}N+="
    ";N+="
    "}N+="
    ";N+="
    ";N+="
    ";N+="
    ";N+='
    ';N+="
    ";N+='
    ';N+="
    ";N+="";dojo.byId(this._div).innerHTML=N;dojo.byId("divdaygrid").scrollTop=28*Math.min(7,this._houroffset);initSearchField("calsearch","search calendar")};Calendar.prototype.showWeek=function(){var G="";G+='
    ';G+='
    ';G+='
    ';G+=this.getFilterTabs();G+="
    ";G+='
    ';G+="
    ";G+='
    ';G+='
    ';G+=this.getCalendarMenu();G+='
    ';G+='
    ';G+=' «»'+new CalDate(this._time).getFirstDayOfWeek().formatWeekString()+"
    ";G+=' '+new CalDate(this._today).formatTodayString()+"";G+="
    ";G+='
    ';G+='
    ';G+='
    ';G+="
    ";G+=' ';G+="
    ";G+='
    ';G+=' ';G+='
    ';G+=' ';G+='';var M=new CalDate(this._time).getDaysInWeek();var B=0;for(var F=0;F<7;F++){G+='
    ';G+='";G+='
    ";G+="
    "}G+="
    ";G+="
    ";G+='
    ';G+="
    ";G+='
    ';G+="
    ";G+="
    ";dojo.byId(this._div).innerHTML=G;initSearchField("calsearch","search calendar")};Calendar.prototype.showMonth=function(){var F="";F+='
    ';F+='
    ';F+='
    ';F+=this.getFilterTabs();F+="
    ";F+='
    ';F+="
    ";F+='
    ';F+='
    ';F+=this.getCalendarMenu();F+='
    ';F+='
    ';F+=' «»'+new CalDate(this._time).formatDateMonthYear()+"
    ";F+=' '+new CalDate(this._today).formatTodayString()+"";F+="
    ";F+='
    ';F+='
    ';F+='
    ';F+="
    ";F+=' ';F+="
    ";F+='
    ';F+=' ';F+='
    ';F+='
    ';F+='
    SUNDAY
    ';F+='
    MONDAY
    ';F+='
    TUESDAY
    ';F+='
    WEDNESDAY
    ';F+='
    THURSDAY
    ';F+='
    FRIDAY
    ';F+='
    SATURDAY
    ';F+='
    ';F+="
    ";F+=' ';F+="
    ";var H=new CalDate(this._time).getDaysInMonth();for(var C=0;C"+H[C].date+"";var B=this.getEventsForDay(H[C].time);F+="
      ";for(var A=0;A10){G=G.substring(0,10)+"..."}if(B[A].event.event_type=="school"){F+='
    • '+G+"
    • "}else{F+='
    • '+G+"
    • "}}F+="
    "}F+='
    ';F+="
    ";F+="
    ";F+="
    ";F+='
    ';F+="
    ";F+='
    ';F+="
    ";F+=" ";dojo.byId(this._div).innerHTML=F;initSearchField("calsearch","search calendar")};Calendar.prototype.hideAddEditEvent=function(){dojo.byId("div_cal_content").style.display="block";dojo.byId("div_cal_form").style.display="none"};Calendar.prototype.cancelShowAddEvent=function(){clearTimeout(this._formtout);this._formdisable=true;clearTimeout(this._formtout2);this._formtout2=setTimeout("Calendar.prototype.getInstance()._formdisable=false",200)};Calendar.prototype.showAddEventToMonth=function(F,A){if(this._formdisable==true){return }var B=new CalDate(F);var C=B.value();B.setHours(9);B.setMinutes(0);var E=B.value();B.setHours(10);B.setMinutes(0);var D=B.value();this._formtout=setTimeout("Calendar.prototype.getInstance().showAddEditPopup("+Math.min((A%7)*95,4*95)+","+Math.floor(A/7)*95+","+C+","+E+","+D+")",100)};Calendar.prototype.showAddEventToDay=function(E,F){if(this._formdisable==true){return }var A=new CalDate(E);var B=A.value();A.setHours(9);A.setMinutes(0);var D=A.value();A.setHours(10);A.setMinutes(0);var C=A.value();this._formtout=setTimeout("Calendar.prototype.getInstance().showAddEditPopup(175,"+(dojo.byId("dayrow"+F).offsetTop-50)+","+B+","+D+","+C+")",100)};Calendar.prototype.showAddEventToHour=function(A){if(this._formdisable==true){return }var B=new CalDate(this._time);var C=B.value();B.setHours(A);B.setMinutes(0);var E=B.value();B.setHours(A+1);B.setMinutes(0);var D=B.value();this._formtout=setTimeout("Calendar.prototype.getInstance().showAddEditPopup(175,"+Math.min(A*28,20*28)+","+C+","+E+","+D+")",100)};Calendar.prototype.showUpdateEventTabsError=function(){dojo.byId("errupdatetab").style.display="inline"};Calendar.prototype.setUnsetAllDay=function(){if(document.getElementById("all_day").checked==true){var A="none"}else{var A="block"}document.getElementById("start_time_li").style.display=A;document.getElementById("end_date_li").style.display=A;document.getElementById("end_time_li").style.display=A};Calendar.prototype.setRecurrenceOptions=function(){var G="none";var H="none";var F="none";var B="none";var D="none";var C="none";var E="none";var A="none";if(document.getElementById("recurrence_none").checked==true){}else{if(document.getElementById("recurrence_day").checked==true){G="block";F="block"}else{if(document.getElementById("recurrence_week").checked==true){G="block";B="block";E="block"}else{if(document.getElementById("recurrence_weekday").checked==true){G="block";B="block"}else{if(document.getElementById("recurrence_month").checked==true){G="block";D="block";A="block"}else{if(document.getElementById("recurrence_year").checked==true){G="block"}}}}}}if(document.getElementById("repeat_end_never_val").checked==false&&G!="none"){H="block"}document.getElementById("repeat_end_never_li").style.display=G;document.getElementById("repeat_end_date_li").style.display=H;document.getElementById("skippattern_daily").style.display=F;document.getElementById("skippattern_weekly").style.display=B;document.getElementById("skippattern_monthly").style.display=D;document.getElementById("skippattern_yearly").style.display=C;document.getElementById("subpattern_weekly").style.display=E;document.getElementById("subpattern_monthly").style.display=A};Calendar.prototype.hidePopup=function(){dojo.byId("calpopup").style.display="none"};Calendar.prototype.hideNotification=function(A){dojo.byId(A).style.display="none"};Calendar.prototype.showPopupError=function(A){dojo.byId("popup_err").innerHTML='"};Calendar.prototype.showAddEditPopup=function(A,H,C,F,D){var B;var E="";var G="";E+='
    ';E+=' dismissadd quick event: '+(new CalDate(C).formatDateDayMonth())+" @ "+(new CalDate(F).formatTimeAMPM())+" ";E+="
    ";E+='
    ';E+='
    ';E+="
    ";E+="
      ";E+=' ';E+="
    1. ";E+=" ";E+='
      ';E+="
    2. ";E+="
    ";E+=' add event | add more information ';E+="
    ";E+="
    ";E+="
    ";E+='
    ';dojo.byId("calpopup").innerHTML=E;dojo.byId("calpopup").style.display="block";dojo.byId("calpopup").style.margin=H+"px 0px 0px "+A+"px"};Calendar.prototype.showAddEditEventError=function(A){dojo.byId("div_addedit_err").style.display="block";dojo.byId("div_addedit_err").innerHTML='dismiss'+A};Calendar.prototype.showAddEditEvent=function(A,D,K,B,F){var G;var H="";var C="";this.hidePopup();if(A){for(var E=0;Edismiss';H+='';H+='
    ';H+="
    ";H+='
    ';H+='
      ';H+='
    1. Event Details
    2. ';C="";if(A){C=this._cache[G].event.event_name}if(F){C=dojo.byId("addevent_name").value}H+='
    3. ';H+='
    4. ';C="";if(A){C=this._cache[G].event.location}H+="
    5. ";H+='
    6. ';C="";if(A){C=this._cache[G].event.event_message}H+="
    7. ";H+='
    8. ";H+="
    ";H+='
      ';H+='
    1. Date and Time
    2. ';C="";if(A&&this._cache[G].event.all_day==Number("1")){C='checked="checked"'}H+='
    3. ';C="";if(A){C=new CalDate(this._cache[G].event.start_time).value()}else{if(D){C=new CalDate(D).value()}}H+='
    4. ';H+=" ";H+=' ';H+='
      ';H+=' ';H+="
    5. ";C="";if(A){C=new CalDate(this._cache[G].event.start_time).value()}else{if(K){C=new CalDate(K).value()}}H+='
    6. ';H+=" ";H+=' ';H+='
      ';H+=' ';H+="
    7. ";C="";if(A){C=new CalDate(this._cache[G].event.end_time).value()}else{if(D){C=new CalDate(D).value()}}H+='
    8. ';H+=" ";H+=' ';H+='
      ';H+=' ';H+="
    9. ";C="";if(A){C=new CalDate(this._cache[G].event.end_time).value()}else{if(B){C=new CalDate(B).value()}}H+='
    10. ';H+=" ";H+=' ';H+='
      ';H+=' ';H+="
    11. ";H+='
    12. ';H+='
    13. Add to Calendar
    14. ';for(var E=0;E
      "+this._filters[E].filter_name+"
      "}H+="
    ";H+="
    ";H+='
    ';if(A){H+=''}else{H+=''}H+='';H+="
    ";H+="
    ";H+="
    ";H+="";dojo.byId("div_cal_form").innerHTML=H;dojo.byId("div_cal_content").style.display="none";dojo.byId("div_cal_form").style.display="block";initCalendarField("start_date","diveventdate","start_date_val",function(L){CalendarControl.prototype.setCalendarValue("end_date","end_date_val",L)});initCalendarField("end_date","diveventenddate","end_date_val");initTimeField("start_time","divstarttime","start_time_val");initTimeField("end_time","divendtime","end_time_val");this.setUnsetAllDay()};Calendar.prototype.showAddTab=function(){var B="";this._infoview=Calendar.prototype.INFO_VIEW_ADDTAB;B+='
    Add/Remove Tab
    ';B+='
    ';B+=" Add a new calendar tab:";B+=' ';B+=' ';if(this._filters.length>0){B+=" Remove a calendar tab:";B+='
      ';for(var A=0;A'+this._filters[A].filter_name+""}}B+="
    "}B+=' ';B+="
    ";dojo.byId("divcalinfo").innerHTML=B};Calendar.prototype.showImportSchoolCalendar=function(){this.getSchools(function(){_calendar.doShowImportSchoolCalendar()})};Calendar.prototype.doShowImportSchoolCalendar=function(){var B="";this._infoview=Calendar.prototype.INFO_VIEW_ADDSCHOOL;B+='
    School Calendars
    ';if(this._calschools.length>0){B+='
    ';B+=" School calendars you've added:";B+='
      ';for(var A=0;A'+this._calschools[A].school_calendar.name+""}B+="
    ";B+=' ';B+="

    "}B+='
    ';B+=' ';B+=" Add a school calendar:";B+=' ";B+=' ';B+=" Select tabs to add to:";B+='
      ';for(var A=0;A'+this._filters[A].filter_name+""}B+="
    ";B+=' ';B+="
    ";dojo.byId("divcalinfo").innerHTML=B;this.showSchoolsSubList()};Calendar.prototype.showSchoolsSubList=function(){var E=-1;try{dojo.byId("school_list2ctr").innerHTML="";E=dojo.byId("school_list").options[dojo.byId("school_list").selectedIndex].value;var A="";for(var B=0;B'+this._schools[B].name+""}}var C="block";if(A==""){C="none"}dojo.byId("school_list2ctr").innerHTML='"}catch(D){}};Calendar.prototype.showEventDetail=function(B){var A=B;this.updateCache(function(){_calendar.doShowEventDetail(A)})};Calendar.prototype.doShowEventDetail=function(A){var E="";var D;this._infoview=Calendar.prototype.INFO_VIEW_DETAIL;this._infoid=A;for(var C=0;C';if(this._cache[D].event.event_type=="personal"){E+='delete eventedit event'}E+="Event Detail";if(this._cache[D].event.event_type=="playdate"){E+=' '}else{if(this._cache[D].event.event_type=="date"){E+=' '}else{if(this._cache[D].event.event_type=="birthday"){E+=' '}else{if(this._cache[D].event.event_type=="event"){E+=' '}}}}var F=new CalDate(this._cache[D].start_date).formatDateDayMonth();E+=' '+F+"";var H="";if(this._cache[D].event.event_type!="personal"){H='event.bl?e='+this._cache[D].event.id}else{H="javascript:_calendar.showAddEditEvent("+this._cache[D].event.id+");"}E+='

    '+this._cache[D].event.event_name+"

    ";var B=new CalDate(this._cache[D].end_date).formatDateDayMonth();var I="";if(F==B){B="";F=""}else{B=" ("+B+")";F=" ("+F+")";I="
    "}if(this._cache[D].event.all_day==Number("1")){E+=' all day event'}else{E+=' '+new CalDate(this._cache[D].start_date).formatTimeAMPM()+F+" to "+I+new CalDate(this._cache[D].end_date).formatTimeAMPM()+B+""}E+='
      ';if(this._cache[D].event.location.split(" ").join("")!=""){E+="
    • Location:"+this._cache[D].event.location+"
    • "}if(this._cache[D].event.event_type!="personal"){if(this._cache[D].event.owner.id!=this._uid){E+='
    • '+this.getRSVPBar(this._cache[D].event)+"
    • "}E+='
    • Hosted by:'+this._cache[D].event.owner.name+"
    • "}E+="
    ";if(this._cache[D].event.event_type=="personal"){E+="

    "+this._cache[D].event.event_message+"

    "}E+='
    ';E+=" Add to Calendar Tabs:";E+=' ';E+='
      ';for(var C=0;C"+this._filters[C].filter_name+""}E+="
    ";E+=' ';E+="
    ";dojo.byId("divcalinfo").innerHTML=E};Calendar.prototype.showSchoolEventDetail=function(B,H,E,G){var C="";var A;this._infoview=Calendar.prototype.INFO_VIEW_DETAIL;this._infoid=0;C+='
    ';C+="Event Detail
    ";var F=new CalDate(E).formatDateDayMonth();var D=new CalDate(G).formatDateDayMonth();if(F!=D){F=F+" to "+D}C+=' '+F+"";C+='

    '+B+"

    ";if(H){C+="

    "+H+"

    "}dojo.byId("divcalinfo").innerHTML=C};var _calendarctrl;function createCalendarControl(A){_calendarctrl=new CalendarControl(A)}function initCalendarField(B,H,F,E){if(dojo.byId(F).value==""){dojo.byId(B).value="click to set date"}else{CalendarControl.prototype.getInstance().presetDayValue(B,Number(dojo.byId(F).value))}var A=B;var C=H;var G=F;var D=E;dojo.byId(B).onfocus=function(){if(CalendarControl.prototype.getInstance().isFocusReset()){return }CalendarControl.prototype.getInstance().hide();CalendarControl.prototype.getInstance().showCalendarControl(C,A,G,D)};dojo.byId(B).onblur=function(){CalendarControl.prototype.getInstance().scheduleHide()}}CalendarControl.prototype.setCalendarValue=function(A,C,B){dojo.byId(A).value=new CalDate(B).dayOf().formatDateMonthDDYYYY();dojo.byId(C).value=B};function initCalendarExField(B,F,D){if(dojo.byId(D).value==""){dojo.byId(B).value="click to set date"}else{CalendarControl.prototype.getInstance().presetDayValue(B,Number(dojo.byId(D).value))}var A=B;var C=F;var E=D;dojo.byId(B).onfocus=function(){if(CalendarControl.prototype.getInstance().isFocusReset()){return }CalendarControl.prototype.getInstance().hide();CalendarControl.prototype.getInstance().showCalendarExControl(C,A,E)};dojo.byId(B).onblur=function(){CalendarControl.prototype.getInstance().scheduleHide()}}function initTimeField(B,F,D){if(dojo.byId(D).value==""){dojo.byId(B).value="click to set time"}else{CalendarControl.prototype.getInstance().presetTimeValue(B,Number(dojo.byId(D).value))}var A=B;var C=F;var E=D;dojo.byId(B).onfocus=function(){if(CalendarControl.prototype.getInstance().isFocusReset()){return }CalendarControl.prototype.getInstance().hide();CalendarControl.prototype.getInstance().showTimeControl(C,A,E)};dojo.byId(B).onblur=function(){CalendarControl.prototype.getInstance().scheduleHide()}}function CalendarControl(A){this._showevents=A;this._div=null;this._target=null;this._targetval=null;this._hide=false;this._focus=false;this._hidetout;this._comm=new Comm("/ai");this._today=CalDate.prototype.today().value();this._time=this._today;this._calview=CalendarControl.prototype.CALENDAR_VIEW_MONTH;this._cachestarttime=null;this._cacheendtime=null;this._cache=null}CalendarControl.prototype.CALENDAR_VIEW_DAY=1;CalendarControl.prototype.CALENDAR_VIEW_MONTH=2;CalendarControl.prototype.CALENDAR_VIEW_MONTH_EX=3;CalendarControl.prototype.getInstance=function(){return _calendarctrl};CalendarControl.prototype.showCalendarControl=function(E,D,A,B){this._div=E;dojo.byId(this._div).style.display="block";this._calview=CalendarControl.prototype.CALENDAR_VIEW_MONTH;this._target=D;this._targetval=A;this._listener=null;if(B){this._listener=B}var C=this._today;if(dojo.byId(this._targetval).value!=""){C=dojo.byId(this._targetval).value;C=new CalDate(C).dayOf().value()}this.showTime(C)};CalendarControl.prototype.showCalendarExControl=function(D,C,A){this._div=D;dojo.byId(this._div).style.display="block";this._calview=CalendarControl.prototype.CALENDAR_VIEW_MONTH_EX;this._target=C;this._targetval=A;this._listener=null;var B=-5*365*24*60*60*1000;if(dojo.byId(this._targetval).value!=""){B=dojo.byId(this._targetval).value;B=new CalDate(B).dayOf().value()}this.showTime(B)};CalendarControl.prototype.showTimeControl=function(D,C,A){this._div=D;dojo.byId(this._div).style.display="block";this._calview=CalendarControl.prototype.CALENDAR_VIEW_DAY;this._target=C;this._targetval=A;this._listener=null;var B=this._today;if(dojo.byId(this._targetval).value!=""){B=dojo.byId(this._targetval).value}this.showTime(B)};CalendarControl.prototype.hide=function(){this._hide=false;if(this._div==null){return }dojo.byId(this._div).style.display="none";dojo.byId(this._div).innerHTML=""};CalendarControl.prototype.hideDelayed=function(){return ;if(this._hide==false){return }this.hide()};CalendarControl.prototype.scheduleHide=function(){return ;this._hide=true;clearTimeout(this._hidetout);this._hidetout=setTimeout("CalendarControl.prototype.getInstance().hideDelayed()",100)};CalendarControl.prototype.resetFocus=function(){return ;this._hide=false;clearTimeout(this._hidetout);this._focus=true;dojo.byId(this._target).focus()};CalendarControl.prototype.closeControl=function(){this.hide()};CalendarControl.prototype.isFocusReset=function(){return false;if(this._focus==true){this._focus=false;return true}return false};CalendarControl.prototype.presetDayValue=function(A,B){dojo.byId(A).value=new CalDate(B).dayOf().formatDateMonthDDYYYY()};CalendarControl.prototype.setDayValue=function(B){var A=new CalDate(B);dojo.byId(this._target).value=A.formatDateMonthDDYYYY();dojo.byId(this._targetval).value=A.value();if(this._listener){this._listener(A.value())}this.closeControl()};CalendarControl.prototype.presetTimeValue=function(A,B){dojo.byId(A).value=new CalDate(B).formatTimeAMPM()};CalendarControl.prototype.setTimeValue=function(A,C){var B=new CalDate(this._time);B.setHours(A);B.setMinutes(C);dojo.byId(this._target).value=B.formatTimeAMPM();dojo.byId(this._targetval).value=B.value();if(this._listener){this._listener(B.value())}this.closeControl()};CalendarControl.prototype.updateCache=function(D){if(this._showevents==false){this._cache=[];D();return }var C;var B;if(this._calview==CalendarControl.prototype.CALENDAR_VIEW_DAY){C=this._time-CalDate.prototype.TIME_ONE_DAY;B=this._time+CalDate.prototype.TIME_ONE_DAY}else{if(this._calview==CalendarControl.prototype.CALENDAR_VIEW_MONTH){C=this._time-CalDate.prototype.TIME_ONE_MONTH;B=this._time+CalDate.prototype.TIME_ONE_MONTH}}var A=false;if(this._cache==null){A=true}else{if(Cthis._cacheendtime){A=true}}if(A==false){D();return }this._comm.getCalendar(function(E){_calendarctrl._cachestarttime=C;_calendarctrl._cacheendtime=B;_calendarctrl._cache=E;D()},C,B)};CalendarControl.prototype.getEventsForDay=function(E,D){var C=[];var A=new CalDate(E);for(var B=0;B12){C=(F-12)+"pm"}}}var G="";var K="";var E="";var J="";for(var D=0;DB){G='class="booked"'}if(IB+15){K='class="booked"'}if(IB+30){E='class="booked"'}if(IB+45){J='class="booked"'}}H+="";H+=''+C+"";H+='';H+='';H+="';H+="';H+="';H+="
    15min30min45min
    ";H+=""}H+="";dojo.byId(this._div).innerHTML=H;dojo.byId(this._div).scrollTop=310};CalendarControl.prototype.showMonth=function(){var D="";D+='
    ';D+='';D+='";D+='";D+='';D+=" ";D+=" ";D+=" ";D+=" ";D+=" ";D+=" ";D+=" ";D+="";var F=new CalDate(this._time).getDaysInMonth();var E=0;for(var B=0;B0){C='class="booked"'}if(E==0){D+=''}if(F[B].currentmonth==true){D+='"}else{D+=""}E++;if(E==7){E=0;D+=""}}D+="
    ';D+=' «»'+new CalDate(this._time).formatDateMonthYear();D+="
    ';D+=' today';D+="
    SunMonTueWedThuFriSat
    "+F[B].date+" 
    ";dojo.byId(this._div).innerHTML=D};CalendarControl.prototype.showMonthEx=function(){var D="";D+='
    ';D+='';D+='";D+='";D+='';D+=" ";D+=" ";D+=" ";D+=" ";D+=" ";D+=" ";D+=" ";D+="";var F=new CalDate(this._time).getDaysInMonth();var E=0;for(var B=0;B0){C='class="booked"'}if(E==0){D+=''}if(F[B].currentmonth==true){D+='"}else{D+=""}E++;if(E==7){E=0;D+=""}}D+="
    ';D+=' «»'+new CalDate(this._time).formatDateYear();D+="
    ';D+=' «»'+new CalDate(this._time).formatDateMonth();D+="
    SunMonTueWedThuFriSat
    "+F[B].date+" 
    ";dojo.byId(this._div).innerHTML=D};function Foo(){}Foo.prototype.getFoo=function(){app.comm.getFoo(function(D){var C='';for(var B=0;B";C+="";C+="
    id:"+D[B].id+" type:"+D[B].type+" value:"+D[B].value+" desc:"+D[B].desc+"items:";for(var A=0;Aremove')}var A="";if(C.length==0){}else{A=C.join(", ")}dojo.byId(this._divrecipients).innerHTML="To: "+A};MsgRecipientsControl.prototype.findSuggestions=function(){var A=dojo.byId(this._txt).value;if(A==""){this.hideSuggestions();return }var D=[];if(this._friends==null){return }for(var C=0;C'+A+""+String(this._friends[C].name).substr(B+String(A).length)+"")}}if(D.length==0){this.hideSuggestions()}else{this.showSuggestions(D)}};MsgRecipientsControl.prototype.hideSuggestions=function(){this._suggestion=null;dojo.byId(this._divlist).style.display="none"};MsgRecipientsControl.prototype.showSuggestions=function(B){var A="";A=B.join("");dojo.byId(this._divlist).innerHTML="
      "+A+"
    ";dojo.byId(this._divlist).style.display="block"};MsgRecipientsControl.prototype.resetControl=function(){this.hideSuggestions();dojo.byId(this._txt).value=this._msg};MsgRecipientsControl.prototype.updateCache=function(A){if(this._friends!=null){A();return }this._comm.getFriends(function(B){if(B.status==Comm.prototype.ERROR){return }_toboxctrl._friends=B.data;A()})};var app=null;function createApp(){if(app==null){app=new App()}}function App(){this.comm=new Comm("/ai");this.foo=new Foo()}var _news;function createNews(){_news=new News()}function News(){this._comm=new Comm("/ai")}News.prototype.getInstance=function(){return _news};News.prototype.postNewsAlertResp=function(C,B,A){this._comm.postNewsAlertResp(function(D){C(D)},B,A)};var _notification;function createNotification(){_notification=new Notification()}function Notification(){this._comm=new Comm("/ai")}Notification.prototype.getInstance=function(){return _notification};Notification.prototype.postNotificationResp=function(D,A,C,B){this._comm.postNotificationResp(function(E){D(E)},A,C,B)};var _popup;function createPopup(){_popup=new Popup()}function Popup(){this._handler;this.showConfirmation=function(B,A){_popup._set_popup_handler(A);html="";html=html+'
    '+B+"

    ";html=html+'cancel ';html=html+'ok';html=html+"
    ";$.colorbox({html:html,transition:"none",opacity:0.5,scrolling:false})};this.showError=function(B,A){_popup._set_popup_handler(A);html="";html=html+'
    '+B+"

    ";html=html+'ok';html=html+"
    ";$.colorbox({html:html,transition:"none",opacity:0.5,scrolling:false})};this.showMsg=function(B,A){_popup._set_popup_handler(A);html="";html=html+'
    '+B+"

    ";html=html+'ok';html=html+"
    ";$.colorbox({html:html,transition:"none",opacity:0.5,scrolling:false})};this.showProgress=function(A){html="";html=html+'
    '+A+"

    ";html=html+'
    ';html=html+"
    ";$.colorbox({html:html,transition:"none",opacity:0.5,escKey:false,overlayClose:false,scrolling:false})};this.showPopupHtml=function(B,C){var A={html:B,transition:"none",opacity:0.5,scrolling:false};if(C){A.overlayClose=false}$.colorbox(A)};this.showPopupUrl=function(B,C){var A={href:B,opacity:0.5,scrolling:false};if(C){A.overlayClose=false}$.colorbox(A)};this.closePopup=function(){$.colorbox.close()};this._set_popup_handler=function(A){if(!A){A={handleok:function(){return true}}}_popup._handler=A;_popup._handler._handleok=function(){var B=this.handleok();if(B){$.colorbox.close()}}}}var _preferences;function createPreferences(){_preferences=new Preferences()}function Preferences(){this._comm=new Comm("/ai")}Preferences.prototype.getInstance=function(){return _preferences};Preferences.prototype.showMore=function(B,A){this._comm.preferencesShowMore(function(C){B(C)},A)};Preferences.prototype.showLess=function(B,A){this._comm.preferencesShowLess(function(C){B(C)},A)};var _reg;function createRegistration(){_reg=new Registration()}function Registration(){this._comm=new Comm("/ai")}Registration.prototype.getInstance=function(){return _reg};Registration.prototype.submitEmail=function(B,A){this._comm.submitEmail(function(C){B(C)},A)};var _resource;function createResource(){_resource=new Resource()}function Resource(){this._comm=new Comm("/ai")}Resource.prototype.getInstance=function(){return _resource};Resource.prototype.getCategoryTree=function(A){this._comm.getCategoryTree(function(B){A(B)})};Resource.prototype.getResourceList=function(C,A,B){this._comm.getResourceList(function(D){C(D)},A,B)};Resource.prototype.getResource=function(B,A){this._comm.getResource(function(C){B(C)},A)};Resource.prototype.searchResources=function(C,B,A){this._comm.searchResources(function(D){C(D)},B,A)};var _status;function createStatus(){_status=new Status()}function Status(){this._comm=new Comm("/ai")}Status.prototype.getInstance=function(){return _status};Status.prototype.postStatusUpdate=function(D,C,A,B){if(A==null){this._comm.postStatusUpdate(function(E){D(E)},C,B)}else{this._comm.postStatusUpdateWithImage(function(E){D(E)},C,A,B)}};Status.prototype.postFriendStatusUpdate=function(E,D,A,C,B){if(A==null){this._comm.postFriendStatusUpdate(function(F){E(F)},D,C,B)}else{this._comm.postFriendStatusUpdateWithImage(function(F){E(F)},D,A,C,B)}};Status.prototype.postStatusUpdateResp=function(D,A,C,B){this._comm.postStatusUpdateResp(function(E){D(E)},A,C,B)};var _user;function createUser(){_user=new User()}function User(){this._comm=new Comm("/ai")}User.prototype.getInstance=function(){return _user};User.prototype.sendFriendRequest=function(C,B,A){this._comm.sendFriendRequest(function(D){C(D)},B,A)};User.prototype.uploadImage=function(C,A,B){this._comm.uploadUserImage(function(D){C(D)},B)};User.prototype.removeImage=function(B,A){this._comm.removeUserImage(function(C){B(C)},A)};var msgbox=false;var newlayer1;var newlayer2;function getScrollOffset(){var A=0;if(typeof (window.pageYOffset)=="number"){A=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){A=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){A=document.documentElement.scrollTop}}}return A}function msginit(){var A=Math.max(document.body.clientHeight,document.documentElement.clientHeight)+10;document.body.innerHTML+='';msginit=true}function hidecomboboxes(){var B;var A;for(B=0;B
    OK Cancel
    ';document.getElementById("divmsg").style.visibility="visible";var B=Math.min(250,Math.round(Math.min(document.body.clientHeight,document.documentElement.clientHeight)/2))+"px";document.getElementById("divmsg").style.top=B;msgbox=true}function msgokalert(B){if(msgbox){return }hidecomboboxes();document.getElementById("divmsgbg").style.visibility="visible";document.getElementById("divmsg").innerHTML='
    * '+B+'
    OK
    ';document.getElementById("divmsg").style.visibility="visible";var A=Math.min(250,Math.round(Math.min(document.body.clientHeight,document.documentElement.clientHeight)/2))+"px";document.getElementById("divmsg").style.top=A;msgbox=true}function msgclose(){resetcomboboxes();document.getElementById("divmsgbg").style.visibility="hidden";document.getElementById("divmsg").innerHTML="";document.getElementById("divmsg").style.visibility="hidden";msgbox=false}function showoverlay(A){if(msgbox){return }hidecomboboxes();document.getElementById("divmsgbg").style.visibility="visible";document.getElementById("divmsg").innerHTML='
    click to close
    '+A+"
     
    ";document.getElementById("divmsg").style.visibility="visible";var B=Math.min(175,Math.round(Math.min(document.body.clientHeight,document.documentElement.clientHeight)/2))+"px";document.getElementById("divmsg").style.top=B;msgbox=true}function initSearchField(B,C){var A=B;var D=false;var E=C;dojo.byId(B).value=C;dojo.byId(B).onfocus=function(){if(D==false){dojo.byId(B).value=""}};dojo.byId(B).onblur=function(){var F=dojo.byId(B).value;if(F==""){D=false}else{D=true}if(D==false){dojo.byId(B).value=C}}}if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(K,B,L,D,H,I,F,E,C,J){if(!document.getElementById){return }this.DETECT_KEY=J?J:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(K){this.setAttribute("swf",K)}if(B){this.setAttribute("id",B)}if(L){this.setAttribute("width",L)}if(D){this.setAttribute("height",D)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(I){this.addParam("bgcolor",I)}var A=F?F:"high";this.addParam("quality",A);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var G=(E)?E:window.location;this.setAttribute("xiRedirectUrl",G);this.setAttribute("redirectUrl","");if(C){this.setAttribute("redirectUrl",C)}};deconcept.SWFObject.prototype={useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true)},setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]},addParam:function(B,A){this.params[B]=A},getParams:function(){return this.params},addVariable:function(B,A){this.variables[B]=A},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var C=new Array();var B;var A=this.getVariables();for(B in A){C.push(B+"="+A[B])}return C},getSWFHTML:function(){var B="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}B='0){B+='flashvars="'+D+'"'}B+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}B='';B+='';var C=this.getParams();for(var E in C){B+=''}var A=this.getVariablePairs().join("&");if(A.length>0){B+=''}B+=""}return B},write:function(B){if(this.getAttribute("useExpressInstall")){var A=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(A)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof B=="string")?document.getElementById(B):B;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var D=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){D=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(C){try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");D=new deconcept.PlayerVersion([6,0,21]);B.AllowScriptAccess="always"}catch(C){if(D.major==6){return D}}try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(C){}}if(B!=null){D=new deconcept.PlayerVersion(B.GetVariable("$version").split(" ")[1].split(","))}}return D};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.majorA.major){return true}if(this.minorA.minor){return true}if(this.rev0;B--){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload)}if(Array.prototype.push==null){Array.prototype.push=function(A){this[this.length]=A;return this.length}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;