(function(){YAHOO.util.Config=function(A){if(A){this.init(A)}};var F=YAHOO.lang,E=YAHOO.util.CustomEvent,D=YAHOO.util.Config;D.CONFIG_CHANGED_EVENT="configChanged";D.BOOLEAN_TYPE="boolean";D.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(A){this.owner=A;this.configChangedEvent=this.createEvent(D.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=E.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(A){return(typeof A==D.BOOLEAN_TYPE)},checkNumber:function(A){return(!isNaN(A))},fireEvent:function(C,A){var B=this.config[C];if(B&&B.event){B.event.fire(A)}},addProperty:function(A,B){A=A.toLowerCase();this.config[A]=B;B.event=this.createEvent(A,{scope:this.owner});B.event.signature=E.LIST;B.key=A;if(B.handler){B.event.subscribe(B.handler,this.owner)}this.setProperty(A,B.value,true);if(!B.suppressEvent){this.queueProperty(A,B.value)}},getConfig:function(){var H={},B=this.config,A,C;for(A in B){if(F.hasOwnProperty(B,A)){C=B[A];if(C&&C.event){H[A]=C.value}}}return H},getProperty:function(B){var A=this.config[B.toLowerCase()];if(A&&A.event){return A.value}else{return undefined}},resetProperty:function(B){B=B.toLowerCase();var A=this.config[B];if(A&&A.event){if(this.initialConfig[B]&&!F.isUndefined(this.initialConfig[B])){this.setProperty(B,this.initialConfig[B]);return true}}else{return false}},setProperty:function(C,A,H){var B;C=C.toLowerCase();if(this.queueInProgress&&!H){this.queueProperty(C,A);return true}else{B=this.config[C];if(B&&B.event){if(B.validator&&!B.validator(A)){return false}else{B.value=A;if(!H){this.fireEvent(C,A);this.configChangedEvent.fire([C,A])}return true}}else{return false}}},queueProperty:function(C,W){C=C.toLowerCase();var U=this.config[C],b=false,c,f,e,d,X,V,g,Z,Y,A,a,B,h;if(U&&U.event){if(!F.isUndefined(W)&&U.validator&&!U.validator(W)){return false}else{if(!F.isUndefined(W)){U.value=W}else{W=U.value}b=false;c=this.eventQueue.length;for(a=0;a<c;a++){f=this.eventQueue[a];if(f){e=f[0];d=f[1];if(e==C){this.eventQueue[a]=null;this.eventQueue.push([C,(!F.isUndefined(W)?W:d)]);b=true;break}}}if(!b&&!F.isUndefined(W)){this.eventQueue.push([C,W])}}if(U.supercedes){X=U.supercedes.length;for(B=0;B<X;B++){V=U.supercedes[B];g=this.eventQueue.length;for(h=0;h<g;h++){Z=this.eventQueue[h];if(Z){Y=Z[0];A=Z[1];if(Y==V.toLowerCase()){this.eventQueue.push([Y,A]);this.eventQueue[h]=null;break}}}}}return true}else{return false}},refireEvent:function(B){B=B.toLowerCase();var A=this.config[B];if(A&&A.event&&!F.isUndefined(A.value)){if(this.queueInProgress){this.queueProperty(B)}else{this.fireEvent(B,A.value)}}},applyConfig:function(H,A){var B,C;if(A){C={};for(B in H){if(F.hasOwnProperty(H,B)){C[B.toLowerCase()]=H[B]}}this.initialConfig=C}for(B in H){if(F.hasOwnProperty(H,B)){this.queueProperty(B,H[B])}}},refresh:function(){var A;for(A in this.config){if(F.hasOwnProperty(this.config,A)){this.refireEvent(A)}}},fireQueue:function(){var I,A,J,B,C;this.queueInProgress=true;for(I=0;I<this.eventQueue.length;I++){A=this.eventQueue[I];if(A){J=A[0];B=A[1];C=this.config[J];C.value=B;this.fireEvent(J,B)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(I,C,A,J){var B=this.config[I.toLowerCase()];if(B&&B.event){if(!D.alreadySubscribed(B.event,C,A)){B.event.subscribe(C,A,J)}return true}else{return false}},unsubscribeFromConfigEvent:function(H,C,A){var B=this.config[H.toLowerCase()];if(B&&B.event){return B.event.unsubscribe(C,A)}else{return false}},toString:function(){var A="Config";if(this.owner){A+=" ["+this.owner.toString()+"]"}return A},outputEventQueue:function(){var H="",A,C,B=this.eventQueue.length;for(C=0;C<B;C++){A=this.eventQueue[C];if(A){H+=A[0]+"="+A[1]+", "}}return H},destroy:function(){var B=this.config,C,A;for(C in B){if(F.hasOwnProperty(B,C)){A=B[C];A.event.unsubscribeAll();A.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};D.alreadySubscribed=function(K,B,A){var J=K.subscribers.length,L,C;if(J>0){C=J-1;do{L=K.subscribers[C];if(L&&L.obj==A&&L.fn==B){return true}}while(C--)}return false};YAHOO.lang.augmentProto(D,YAHOO.util.EventProvider)}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,WEEK_ONE_JAN_DATE:1,add:function(G,J,K){var H=new Date(G.getTime());switch(J){case this.MONTH:var I=G.getMonth()+K;var L=0;if(I<0){while(I<0){I+=12;L-=1}}else{if(I>11){while(I>11){I-=12;L+=1}}}H.setMonth(I);H.setFullYear(G.getFullYear()+L);break;case this.DAY:this._addDays(H,K);break;case this.YEAR:H.setFullYear(G.getFullYear()+K);break;case this.WEEK:this._addDays(H,(K*7));break}return H},_addDays:function(F,G){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){if(G<0){for(var H=-128;G<H;G-=H){F.setDate(F.getDate()+H)}}else{for(var E=96;G>E;G-=E){F.setDate(F.getDate()+E)}}}F.setDate(F.getDate()+G)},subtract:function(D,E,F){return this.add(D,E,(F*-1))},before:function(E,F){var D=F.getTime();if(E.getTime()<D){return true}else{return false}},after:function(E,F){var D=F.getTime();if(E.getTime()>D){return true}else{return false}},between:function(F,D,E){if(this.after(F,D)&&this.before(F,E)){return true}else{return false}},getJan1:function(B){return this.getDate(B,0,1)},getDayOffset:function(H,F){var G=this.getJan1(F);var E=Math.ceil((H.getTime()-G.getTime())/this.ONE_DAY_MS);return E},getWeekNumber:function(b,Q,Y){Q=Q||0;Y=Y||this.WEEK_ONE_JAN_DATE;var X=this.clearTime(b),T,S;if(X.getDay()===Q){T=X}else{T=this.getFirstDayOfWeek(X,Q)}var W=T.getFullYear(),P=T.getTime();S=new Date(T.getTime()+6*this.ONE_DAY_MS);var Z;if(W!==S.getFullYear()&&S.getDate()>=Y){Z=1}else{var a=this.clearTime(this.getDate(W,0,Y)),R=this.getFirstDayOfWeek(a,Q);var V=Math.round((X.getTime()-R.getTime())/this.ONE_DAY_MS);var U=V%7;var O=(V-U)/7;Z=O+1}return Z},getFirstDayOfWeek:function(F,E){E=E||0;var H=F.getDay(),G=(H-E+7)%7;return this.subtract(F,this.DAY,G)},isYearOverlapWeek:function(D){var E=false;var F=this.add(D,this.DAY,6);if(F.getFullYear()!=D.getFullYear()){E=true}return E},isMonthOverlapWeek:function(D){var E=false;var F=this.add(D,this.DAY,6);if(F.getMonth()!=D.getMonth()){E=true}return E},findMonthStart:function(C){var D=this.getDate(C.getFullYear(),C.getMonth(),1);return D},findMonthEnd:function(H){var F=this.findMonthStart(H);var G=this.add(F,this.MONTH,1);var E=this.subtract(G,this.DAY,1);return E},clearTime:function(B){B.setHours(12,0,0,0);return B},getDate:function(F,E,G){var H=null;if(YAHOO.lang.isUndefined(G)){G=1}if(F>=100){H=new Date(F,E,G)}else{H=new Date();H.setFullYear(F);H.setMonth(E);H.setDate(G);H.setHours(0,0,0,0)}return H}};(function(){var K=YAHOO.util.Dom,G=YAHOO.util.Event,I=YAHOO.lang,J=YAHOO.widget.DateMath;function H(A,C,B){this.init.apply(this,arguments)}H.IMG_ROOT=null;H.DATE="D";H.MONTH_DAY="MD";H.WEEKDAY="WD";H.RANGE="R";H.MONTH="M";H.DISPLAY_DAYS=42;H.STOP_RENDER="S";H.SHORT="short";H.LONG="long";H.MEDIUM="medium";H.ONE_CHAR="1char";H._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null},STRINGS:{key:"strings",value:{previousMonth:"Previous Month",nextMonth:"Next Month",close:"Close"},supercedes:["close","title"]}};
var L=H._DEFAULT_CONFIG;H._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",BEFORE_DESTROY:"beforeDestroy",DESTROY:"destroy",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};H._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};H.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(A){var B={id:null,container:null,config:null};if(A&&A.length&&A.length>0){switch(A.length){case 1:B.id=null;B.container=A[0];B.config=null;break;case 2:if(I.isObject(A[1])&&!A[1].tagName&&!(A[1] instanceof String)){B.id=null;B.container=A[0];B.config=A[1]}else{B.id=A[0];B.container=A[1];B.config=null}break;default:B.id=A[0];B.container=A[1];B.config=A[2];break}}else{}return B},init:function(A,C,B){var D=this._parseArgs(arguments);A=D.id;C=D.container;B=D.config;this.oDomContainer=K.get(C);if(!this.oDomContainer.id){this.oDomContainer.id=K.generateId()}if(!A){A=this.oDomContainer.id+"_t"}this.id=A;this.containerId=this.oDomContainer.id;this.initEvents();this.today=new Date();J.clearTime(this.today);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();K.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);K.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue()},configIframe:function(C,D,B){var E=D[0];if(!this.parent){if(K.inDocument(this.oDomContainer)){if(E){var A=K.getStyle(this.oDomContainer,"position");if(A=="absolute"||A=="relative"){if(!K.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";K.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){K.addClass(this.iframe,"fixedsize")}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild)}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null}}}}},configTitle:function(D,E,C){var A=E[0];if(A){this.createTitleBar(A)}else{var B=this.cfg.getProperty(L.CLOSE.key);if(!B){this.removeTitleBar()}else{this.createTitleBar("&#160;")}}},configClose:function(D,E,C){var A=E[0],B=this.cfg.getProperty(L.TITLE.key);if(A){if(!B){this.createTitleBar("&#160;")}this.createCloseButton()}else{this.removeCloseButton();if(!B){this.removeTitleBar()}}},initEvents:function(){var C=H._EVENT_TYPES,A=YAHOO.util.CustomEvent,B=this;B.beforeSelectEvent=new A(C.BEFORE_SELECT);B.selectEvent=new A(C.SELECT);B.beforeDeselectEvent=new A(C.BEFORE_DESELECT);B.deselectEvent=new A(C.DESELECT);B.changePageEvent=new A(C.CHANGE_PAGE);B.beforeRenderEvent=new A(C.BEFORE_RENDER);B.renderEvent=new A(C.RENDER);B.beforeDestroyEvent=new A(C.BEFORE_DESTROY);B.destroyEvent=new A(C.DESTROY);B.resetEvent=new A(C.RESET);B.clearEvent=new A(C.CLEAR);B.beforeShowEvent=new A(C.BEFORE_SHOW);B.showEvent=new A(C.SHOW);B.beforeHideEvent=new A(C.BEFORE_HIDE);B.hideEvent=new A(C.HIDE);B.beforeShowNavEvent=new A(C.BEFORE_SHOW_NAV);B.showNavEvent=new A(C.SHOW_NAV);B.beforeHideNavEvent=new A(C.BEFORE_HIDE_NAV);B.hideNavEvent=new A(C.HIDE_NAV);B.beforeRenderNavEvent=new A(C.BEFORE_RENDER_NAV);B.renderNavEvent=new A(C.RENDER_NAV);B.beforeSelectEvent.subscribe(B.onBeforeSelect,this,true);B.selectEvent.subscribe(B.onSelect,this,true);B.beforeDeselectEvent.subscribe(B.onBeforeDeselect,this,true);B.deselectEvent.subscribe(B.onDeselect,this,true);B.changePageEvent.subscribe(B.onChangePage,this,true);B.renderEvent.subscribe(B.onRender,this,true);B.resetEvent.subscribe(B.onReset,this,true);B.clearEvent.subscribe(B.onClear,this,true)},doPreviousMonthNav:function(A,B){G.preventDefault(A);setTimeout(function(){B.previousMonth();var D=K.getElementsByClassName(B.Style.CSS_NAV_LEFT,"a",B.oDomContainer);if(D&&D[0]){try{D[0].focus()}catch(C){}}},0)},doNextMonthNav:function(A,B){G.preventDefault(A);setTimeout(function(){B.nextMonth();var D=K.getElementsByClassName(B.Style.CSS_NAV_RIGHT,"a",B.oDomContainer);if(D&&D[0]){try{D[0].focus()}catch(C){}}},0)},doSelectCell:function(F,X){var A,D,V,S;var E=G.getTarget(F),W=E.tagName.toLowerCase(),T=false;while(W!="td"&&!K.hasClass(E,X.Style.CSS_CELL_SELECTABLE)){if(!T&&W=="a"&&K.hasClass(E,X.Style.CSS_CELL_SELECTOR)){T=true}E=E.parentNode;W=E.tagName.toLowerCase();if(E==this.oDomContainer||W=="html"){return }}if(T){G.preventDefault(F)}A=E;if(K.hasClass(A,X.Style.CSS_CELL_SELECTABLE)){S=X.getIndexFromId(A.id);if(S>-1){D=X.cellDates[S];if(D){V=J.getDate(D[0],D[1]-1,D[2]);var B;if(X.Options.MULTI_SELECT){B=A.getElementsByTagName("a")[0];if(B){B.blur()}var U=X.cellDates[S];var C=X._indexOfSelectedFieldArray(U);if(C>-1){X.deselectCell(S)}else{X.selectCell(S)}}else{B=A.getElementsByTagName("a")[0];if(B){B.blur()}X.selectCell(S)}}}}},doCellMouseOver:function(A,B){var C;if(A){C=G.getTarget(A)}else{C=this}while(C.tagName&&C.tagName.toLowerCase()!="td"){C=C.parentNode;if(!C.tagName||C.tagName.toLowerCase()=="html"){return }}if(K.hasClass(C,B.Style.CSS_CELL_SELECTABLE)){K.addClass(C,B.Style.CSS_CELL_HOVER)}},doCellMouseOut:function(A,B){var C;if(A){C=G.getTarget(A)}else{C=this}while(C.tagName&&C.tagName.toLowerCase()!="td"){C=C.parentNode;if(!C.tagName||C.tagName.toLowerCase()=="html"){return }}if(K.hasClass(C,B.Style.CSS_CELL_SELECTABLE)){K.removeClass(C,B.Style.CSS_CELL_HOVER)}},setupConfig:function(){var B=this.cfg;B.addProperty(L.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});B.addProperty(L.SELECTED.key,{value:[],handler:this.configSelected});B.addProperty(L.TITLE.key,{value:L.TITLE.value,handler:this.configTitle});B.addProperty(L.CLOSE.key,{value:L.CLOSE.value,handler:this.configClose});B.addProperty(L.IFRAME.key,{value:L.IFRAME.value,handler:this.configIframe,validator:B.checkBoolean});B.addProperty(L.MINDATE.key,{value:L.MINDATE.value,handler:this.configMinDate});B.addProperty(L.MAXDATE.key,{value:L.MAXDATE.value,handler:this.configMaxDate});B.addProperty(L.MULTI_SELECT.key,{value:L.MULTI_SELECT.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.START_WEEKDAY.key,{value:L.START_WEEKDAY.value,handler:this.configOptions,validator:B.checkNumber});B.addProperty(L.SHOW_WEEKDAYS.key,{value:L.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.SHOW_WEEK_HEADER.key,{value:L.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.SHOW_WEEK_FOOTER.key,{value:L.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.HIDE_BLANK_WEEKS.key,{value:L.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.NAV_ARROW_LEFT.key,{value:L.NAV_ARROW_LEFT.value,handler:this.configOptions});
B.addProperty(L.NAV_ARROW_RIGHT.key,{value:L.NAV_ARROW_RIGHT.value,handler:this.configOptions});B.addProperty(L.MONTHS_SHORT.key,{value:L.MONTHS_SHORT.value,handler:this.configLocale});B.addProperty(L.MONTHS_LONG.key,{value:L.MONTHS_LONG.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_1CHAR.key,{value:L.WEEKDAYS_1CHAR.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_SHORT.key,{value:L.WEEKDAYS_SHORT.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_MEDIUM.key,{value:L.WEEKDAYS_MEDIUM.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_LONG.key,{value:L.WEEKDAYS_LONG.value,handler:this.configLocale});var A=function(){B.refireEvent(L.LOCALE_MONTHS.key);B.refireEvent(L.LOCALE_WEEKDAYS.key)};B.subscribeToConfigEvent(L.START_WEEKDAY.key,A,this,true);B.subscribeToConfigEvent(L.MONTHS_SHORT.key,A,this,true);B.subscribeToConfigEvent(L.MONTHS_LONG.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_1CHAR.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_SHORT.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_MEDIUM.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_LONG.key,A,this,true);B.addProperty(L.LOCALE_MONTHS.key,{value:L.LOCALE_MONTHS.value,handler:this.configLocaleValues});B.addProperty(L.LOCALE_WEEKDAYS.key,{value:L.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});B.addProperty(L.DATE_DELIMITER.key,{value:L.DATE_DELIMITER.value,handler:this.configLocale});B.addProperty(L.DATE_FIELD_DELIMITER.key,{value:L.DATE_FIELD_DELIMITER.value,handler:this.configLocale});B.addProperty(L.DATE_RANGE_DELIMITER.key,{value:L.DATE_RANGE_DELIMITER.value,handler:this.configLocale});B.addProperty(L.MY_MONTH_POSITION.key,{value:L.MY_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_YEAR_POSITION.key,{value:L.MY_YEAR_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MD_MONTH_POSITION.key,{value:L.MD_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MD_DAY_POSITION.key,{value:L.MD_DAY_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MDY_MONTH_POSITION.key,{value:L.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MDY_DAY_POSITION.key,{value:L.MDY_DAY_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MDY_YEAR_POSITION.key,{value:L.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_LABEL_MONTH_POSITION.key,{value:L.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_LABEL_YEAR_POSITION.key,{value:L.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_LABEL_MONTH_SUFFIX.key,{value:L.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});B.addProperty(L.MY_LABEL_YEAR_SUFFIX.key,{value:L.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});B.addProperty(L.NAV.key,{value:L.NAV.value,handler:this.configNavigator});B.addProperty(L.STRINGS.key,{value:L.STRINGS.value,handler:this.configStrings,validator:function(C){return I.isObject(C)},supercedes:L.STRINGS.supercedes})},configStrings:function(C,D,B){var A=I.merge(L.STRINGS.value,D[0]);this.cfg.setProperty(L.STRINGS.key,A,true)},configPageDate:function(B,C,A){this.cfg.setProperty(L.PAGEDATE.key,this._parsePageDate(C[0]),true)},configMinDate:function(C,D,B){var A=D[0];if(I.isString(A)){A=this._parseDate(A);this.cfg.setProperty(L.MINDATE.key,J.getDate(A[0],(A[1]-1),A[2]))}},configMaxDate:function(C,D,B){var A=D[0];if(I.isString(A)){A=this._parseDate(A);this.cfg.setProperty(L.MAXDATE.key,J.getDate(A[0],(A[1]-1),A[2]))}},configSelected:function(C,E,A){var D=E[0],B=L.SELECTED.key;if(D){if(I.isString(D)){this.cfg.setProperty(B,this._parseDates(D),true)}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(B)}},configOptions:function(B,C,A){this.Options[B.toUpperCase()]=C[0]},configLocale:function(B,C,A){this.Locale[B.toUpperCase()]=C[0];this.cfg.refireEvent(L.LOCALE_MONTHS.key);this.cfg.refireEvent(L.LOCALE_WEEKDAYS.key)},configLocaleValues:function(C,D,B){C=C.toLowerCase();var P=D[0],E=this.cfg,O=this.Locale;switch(C){case L.LOCALE_MONTHS.key:switch(P){case H.SHORT:O.LOCALE_MONTHS=E.getProperty(L.MONTHS_SHORT.key).concat();break;case H.LONG:O.LOCALE_MONTHS=E.getProperty(L.MONTHS_LONG.key).concat();break}break;case L.LOCALE_WEEKDAYS.key:switch(P){case H.ONE_CHAR:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_1CHAR.key).concat();break;case H.SHORT:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_SHORT.key).concat();break;case H.MEDIUM:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_MEDIUM.key).concat();break;case H.LONG:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_LONG.key).concat();break}var A=E.getProperty(L.START_WEEKDAY.key);if(A>0){for(var F=0;F<A;++F){O.LOCALE_WEEKDAYS.push(O.LOCALE_WEEKDAYS.shift())}}break}},configNavigator:function(C,D,B){var A=D[0];if(YAHOO.widget.CalendarNavigator&&(A===true||I.isObject(A))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator(this);this.beforeRenderEvent.subscribe(function(){if(!this.pages){this.oNavigator.erase()}},this,true)}}else{if(this.oNavigator){this.oNavigator.destroy();this.oNavigator=null}}},initStyles:function(){var A=H._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_NAV:A.CSS_NAV,CSS_CLOSE:A.CSS_CLOSE,CSS_CELL_TOP:A.CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4}},buildMonthLabel:function(){return this._buildMonthLabel(this.cfg.getProperty(L.PAGEDATE.key))},_buildMonthLabel:function(C){var A=this.Locale.LOCALE_MONTHS[C.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX,B=C.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+A}else{return A+B}},buildDayLabel:function(A){return A.getDate()},createTitleBar:function(B){var A=K.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");A.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;A.innerHTML=B;this.oDomContainer.insertBefore(A,this.oDomContainer.firstChild);K.addClass(this.oDomContainer,"withtitle");return A},removeTitleBar:function(){var A=K.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){G.purgeElement(A);this.oDomContainer.removeChild(A)}K.removeClass(this.oDomContainer,"withtitle")},createCloseButton:function(){var C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,A="us/my/bn/x_d.gif",B=K.getElementsByClassName("link-close","a",this.oDomContainer)[0],F=this.cfg.getProperty(L.STRINGS.key),E=(F&&F.close)?F.close:"";if(!B){B=document.createElement("a");G.addListener(B,"click",function(O,P){P.hide();G.preventDefault(O)},this)}B.href="#";B.className="link-close";if(H.IMG_ROOT!==null){var D=K.getElementsByClassName(C,"img",B)[0]||document.createElement("img");D.src=H.IMG_ROOT+A;D.className=C;B.appendChild(D)}else{B.innerHTML='<span class="'+C+" "+this.Style.CSS_CLOSE+'">'+E+"</span>"}this.oDomContainer.appendChild(B);return B},removeCloseButton:function(){var A=K.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;
if(A){G.purgeElement(A);this.oDomContainer.removeChild(A)}},renderHeader:function(Z){var a=7,b="us/tr/callt.gif",l="us/tr/calrt.gif",c=this.cfg,f=c.getProperty(L.PAGEDATE.key),e=c.getProperty(L.STRINGS.key),C=(e&&e.previousMonth)?e.previousMonth:"",k=(e&&e.nextMonth)?e.nextMonth:"",d;if(c.getProperty(L.SHOW_WEEK_HEADER.key)){a+=1}if(c.getProperty(L.SHOW_WEEK_FOOTER.key)){a+=1}Z[Z.length]="<thead>";Z[Z.length]="<tr>";Z[Z.length]='<th colspan="'+a+'" class="'+this.Style.CSS_HEADER_TEXT+'">';Z[Z.length]='<div class="'+this.Style.CSS_HEADER+'">';var A,D=false;if(this.parent){if(this.index===0){A=true}if(this.index==(this.parent.cfg.getProperty("pages")-1)){D=true}}else{A=true;D=true}if(A){d=this._buildMonthLabel(J.subtract(f,J.MONTH,1));var Y=c.getProperty(L.NAV_ARROW_LEFT.key);if(Y===null&&H.IMG_ROOT!==null){Y=H.IMG_ROOT+b}var h=(Y===null)?"":' style="background-image:url('+Y+')"';Z[Z.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+h+' href="#">'+C+" ("+d+")</a>"}var B=this.buildMonthLabel();var F=this.parent||this;if(F.cfg.getProperty("navigator")){B='<a class="'+this.Style.CSS_NAV+'" href="#">'+B+"</a>"}Z[Z.length]=B;if(D){d=this._buildMonthLabel(J.add(f,J.MONTH,1));var E=c.getProperty(L.NAV_ARROW_RIGHT.key);if(E===null&&H.IMG_ROOT!==null){E=H.IMG_ROOT+l}var g=(E===null)?"":' style="background-image:url('+E+')"';Z[Z.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+g+' href="#">'+k+" ("+d+")</a>"}Z[Z.length]="</div>\n</th>\n</tr>";if(c.getProperty(L.SHOW_WEEKDAYS.key)){Z=this.buildWeekdays(Z)}Z[Z.length]="</thead>";return Z},buildWeekdays:function(A){A[A.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(L.SHOW_WEEK_HEADER.key)){A[A.length]="<th>&#160;</th>"}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){A[A.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[B]+"</th>"}if(this.cfg.getProperty(L.SHOW_WEEK_FOOTER.key)){A[A.length]="<th>&#160;</th>"}A[A.length]="</tr>";return A},renderBody:function(Ag,Ai){var A=this.cfg.getProperty(L.START_WEEKDAY.key);this.preMonthDays=Ag.getDay();if(A>0){this.preMonthDays-=A}if(this.preMonthDays<0){this.preMonthDays+=7}this.monthDays=J.findMonthEnd(Ag).getDate();this.postMonthDays=H.DISPLAY_DAYS-this.preMonthDays-this.monthDays;Ag=J.subtract(Ag,J.DAY,this.preMonthDays);var t,AP,AQ="w",Am="_cell",Ao="wd",Aa="d",AN,Ac,AE=this.today,AO=this.cfg,AF=AE.getFullYear(),Ab=AE.getMonth(),AT=AE.getDate(),AH=AO.getProperty(L.PAGEDATE.key),AU=AO.getProperty(L.HIDE_BLANK_WEEKS.key),Aj=AO.getProperty(L.SHOW_WEEK_FOOTER.key),Ap=AO.getProperty(L.SHOW_WEEK_HEADER.key),AI=AO.getProperty(L.MINDATE.key),F=AO.getProperty(L.MAXDATE.key);if(AI){AI=J.clearTime(AI)}if(F){F=J.clearTime(F)}Ai[Ai.length]='<tbody class="m'+(AH.getMonth()+1)+" "+this.Style.CSS_BODY+'">';var C=0,AM=document.createElement("div"),Ah=document.createElement("td");AM.appendChild(Ah);var AX=this.parent||this;for(var r=0;r<6;r++){t=J.getWeekNumber(Ag,A);AP=AQ+t;if(r!==0&&AU===true&&Ag.getMonth()!=AH.getMonth()){break}else{Ai[Ai.length]='<tr class="'+AP+'">';if(Ap){Ai=this.renderRowHeader(t,Ai)}for(var B=0;B<7;B++){AN=[];this.clearElement(Ah);Ah.className=this.Style.CSS_CELL;Ah.id=this.id+Am+C;if(Ag.getDate()==AT&&Ag.getMonth()==Ab&&Ag.getFullYear()==AF){AN[AN.length]=AX.renderCellStyleToday}var p=[Ag.getFullYear(),Ag.getMonth()+1,Ag.getDate()];this.cellDates[this.cellDates.length]=p;if(Ag.getMonth()!=AH.getMonth()){AN[AN.length]=AX.renderCellNotThisMonth}else{K.addClass(Ah,Ao+Ag.getDay());K.addClass(Ah,Aa+Ag.getDate());for(var AD=0;AD<this.renderStack.length;++AD){Ac=null;var AZ=this.renderStack[AD],Aq=AZ[0],AV,An,AR;switch(Aq){case H.DATE:AV=AZ[1][1];An=AZ[1][2];AR=AZ[1][0];if(Ag.getMonth()+1==AV&&Ag.getDate()==An&&Ag.getFullYear()==AR){Ac=AZ[2];this.renderStack.splice(AD,1)}break;case H.MONTH_DAY:AV=AZ[1][0];An=AZ[1][1];if(Ag.getMonth()+1==AV&&Ag.getDate()==An){Ac=AZ[2];this.renderStack.splice(AD,1)}break;case H.RANGE:var Ak=AZ[1][0],Al=AZ[1][1],Af=Ak[1],AJ=Ak[2],x=Ak[0],D=J.getDate(x,Af-1,AJ),AS=Al[1],Ad=Al[2],AW=Al[0],E=J.getDate(AW,AS-1,Ad);if(Ag.getTime()>=D.getTime()&&Ag.getTime()<=E.getTime()){Ac=AZ[2];if(Ag.getTime()==E.getTime()){this.renderStack.splice(AD,1)}}break;case H.WEEKDAY:var AL=AZ[1][0];if(Ag.getDay()+1==AL){Ac=AZ[2]}break;case H.MONTH:AV=AZ[1][0];if(Ag.getMonth()+1==AV){Ac=AZ[2]}break}if(Ac){AN[AN.length]=Ac}}}if(this._indexOfSelectedFieldArray(p)>-1){AN[AN.length]=AX.renderCellStyleSelected}if((AI&&(Ag.getTime()<AI.getTime()))||(F&&(Ag.getTime()>F.getTime()))){AN[AN.length]=AX.renderOutOfBoundsDate}else{AN[AN.length]=AX.styleCellDefault;AN[AN.length]=AX.renderCellDefault}for(var AY=0;AY<AN.length;++AY){if(AN[AY].call(AX,Ag,Ah)==H.STOP_RENDER){break}}Ag.setTime(Ag.getTime()+J.ONE_DAY_MS);Ag=J.clearTime(Ag);if(C>=0&&C<=6){K.addClass(Ah,this.Style.CSS_CELL_TOP)}if((C%7)===0){K.addClass(Ah,this.Style.CSS_CELL_LEFT)}if(((C+1)%7)===0){K.addClass(Ah,this.Style.CSS_CELL_RIGHT)}var Ae=this.postMonthDays;if(AU&&Ae>=7){var AG=Math.floor(Ae/7);for(var d=0;d<AG;++d){Ae-=7}}if(C>=((this.preMonthDays+Ae+this.monthDays)-7)){K.addClass(Ah,this.Style.CSS_CELL_BOTTOM)}Ai[Ai.length]=AM.innerHTML;C++}if(Aj){Ai=this.renderRowFooter(t,Ai)}Ai[Ai.length]="</tr>"}}Ai[Ai.length]="</tbody>";return Ai},renderFooter:function(A){return A},render:function(){this.beforeRenderEvent.fire();var A=J.findMonthStart(this.cfg.getProperty(L.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;G.purgeElement(this.oDomContainer,true);var B=[];B[B.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+A.getFullYear()+'" id="'+this.id+'">';B=this.renderHeader(B);B=this.renderBody(A,B);B=this.renderFooter(B);B[B.length]="</table>";this.oDomContainer.innerHTML=B.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(L.TITLE.key);this.cfg.refireEvent(L.CLOSE.key);this.cfg.refireEvent(L.IFRAME.key);this.renderEvent.fire()},applyListeners:function(){var D=this.oDomContainer,Y=this.parent||this,U="a",A="click";var T=K.getElementsByClassName(this.Style.CSS_NAV_LEFT,U,D),X=K.getElementsByClassName(this.Style.CSS_NAV_RIGHT,U,D);if(T&&T.length>0){this.linkLeft=T[0];G.addListener(this.linkLeft,A,this.doPreviousMonthNav,Y,true)}if(X&&X.length>0){this.linkRight=X[0];G.addListener(this.linkRight,A,this.doNextMonthNav,Y,true)}if(Y.cfg.getProperty("navigator")!==null){this.applyNavListeners()}if(this.domEventMap){var W,Z;for(var B in this.domEventMap){if(I.hasOwnProperty(this.domEventMap,B)){var F=this.domEventMap[B];if(!(F instanceof Array)){F=[F]}for(var V=0;V<F.length;V++){var C=F[V];Z=K.getElementsByClassName(B,C.tag,this.oDomContainer);for(var E=0;E<Z.length;E++){W=Z[E];G.addListener(W,C.event,C.handler,C.scope,C.correct)}}}}}G.addListener(this.oDomContainer,"click",this.doSelectCell,this);G.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);G.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this)},applyNavListeners:function(){var B=this.parent||this,A=this,C=K.getElementsByClassName(this.Style.CSS_NAV,"a",this.oDomContainer);if(C.length>0){G.addListener(C,"click",function(O,P){var D=G.getTarget(O);if(this===D||K.isAncestor(this,D)){G.preventDefault(O)}var F=B.oNavigator;if(F){var E=A.cfg.getProperty("pagedate");F.setYear(E.getFullYear());F.setMonth(E.getMonth());F.show()}})}},getDateByCellId:function(A){var B=this.getDateFieldsByCellId(A);return(B)?J.getDate(B[0],B[1]-1,B[2]):null},getDateFieldsByCellId:function(A){A=this.getIndexFromId(A);return(A>-1)?this.cellDates[A]:null},getCellIndex:function(D){var E=-1;if(D){var F=D.getMonth(),O=D.getFullYear(),P=D.getDate(),B=this.cellDates;for(var C=0;C<B.length;++C){var A=B[C];if(A[0]===O&&A[1]===F+1&&A[2]===P){E=C;break}}}return E},getIndexFromId:function(A){var B=-1,C=A.lastIndexOf("_cell");if(C>-1){B=parseInt(A.substring(C+5),10)}return B},renderOutOfBoundsDate:function(A,B){K.addClass(B,this.Style.CSS_CELL_OOB);B.innerHTML=A.getDate();return H.STOP_RENDER},renderRowHeader:function(A,B){B[B.length]='<th class="calrowhead">'+A+"</th>";
return B},renderRowFooter:function(A,B){B[B.length]='<th class="calrowfoot">'+A+"</th>";return B},renderCellDefault:function(A,B){B.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(A)+"</a>"},styleCellDefault:function(A,B){K.addClass(B,this.Style.CSS_CELL_SELECTABLE)},renderCellStyleHighlight1:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT1)},renderCellStyleHighlight2:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT2)},renderCellStyleHighlight3:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT3)},renderCellStyleHighlight4:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT4)},renderCellStyleToday:function(A,B){K.addClass(B,this.Style.CSS_CELL_TODAY)},renderCellStyleSelected:function(A,B){K.addClass(B,this.Style.CSS_CELL_SELECTED)},renderCellNotThisMonth:function(A,B){K.addClass(B,this.Style.CSS_CELL_OOM);B.innerHTML=A.getDate();return H.STOP_RENDER},renderBodyCellRestricted:function(A,B){K.addClass(B,this.Style.CSS_CELL);K.addClass(B,this.Style.CSS_CELL_RESTRICTED);B.innerHTML=A.getDate();return H.STOP_RENDER},addMonths:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.add(this.cfg.getProperty(B),J.MONTH,A));this.resetRenderers();this.changePageEvent.fire()},subtractMonths:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.subtract(this.cfg.getProperty(B),J.MONTH,A));this.resetRenderers();this.changePageEvent.fire()},addYears:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.add(this.cfg.getProperty(B),J.YEAR,A));this.resetRenderers();this.changePageEvent.fire()},subtractYears:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.subtract(this.cfg.getProperty(B),J.YEAR,A));this.resetRenderers();this.changePageEvent.fire()},nextMonth:function(){this.addMonths(1)},previousMonth:function(){this.subtractMonths(1)},nextYear:function(){this.addYears(1)},previousYear:function(){this.subtractYears(1)},reset:function(){this.cfg.resetProperty(L.SELECTED.key);this.cfg.resetProperty(L.PAGEDATE.key);this.resetEvent.fire()},clear:function(){this.cfg.setProperty(L.SELECTED.key,[]);this.cfg.setProperty(L.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire()},select:function(D){var A=this._toFieldArray(D),E=[],B=[],N=L.SELECTED.key;for(var F=0;F<A.length;++F){var C=A[F];if(!this.isDateOOB(this._toDate(C))){if(E.length===0){this.beforeSelectEvent.fire();B=this.cfg.getProperty(N)}E.push(C);if(this._indexOfSelectedFieldArray(C)==-1){B[B.length]=C}}}if(E.length>0){if(this.parent){this.parent.cfg.setProperty(N,B)}else{this.cfg.setProperty(N,B)}this.selectEvent.fire(E)}return this.getSelectedDates()},selectCell:function(C){var E=this.cells[C],O=this.cellDates[C],P=this._toDate(O),D=K.hasClass(E,this.Style.CSS_CELL_SELECTABLE);if(D){this.beforeSelectEvent.fire();var A=L.SELECTED.key;var B=this.cfg.getProperty(A);var F=O.concat();if(this._indexOfSelectedFieldArray(F)==-1){B[B.length]=F}if(this.parent){this.parent.cfg.setProperty(A,B)}else{this.cfg.setProperty(A,B)}this.renderCellStyleSelected(P,E);this.selectEvent.fire([F]);this.doCellMouseOut.call(E,null,this)}return this.getSelectedDates()},deselect:function(B){var F=this._toFieldArray(B),C=[],P=[],O=L.SELECTED.key;for(var E=0;E<F.length;++E){var A=F[E];if(!this.isDateOOB(this._toDate(A))){if(C.length===0){this.beforeDeselectEvent.fire();P=this.cfg.getProperty(O)}C.push(A);var D=this._indexOfSelectedFieldArray(A);if(D!=-1){P.splice(D,1)}}}if(C.length>0){if(this.parent){this.parent.cfg.setProperty(O,P)}else{this.cfg.setProperty(O,P)}this.deselectEvent.fire(C)}return this.getSelectedDates()},deselectCell:function(B){var E=this.cells[B],O=this.cellDates[B],D=this._indexOfSelectedFieldArray(O);var C=K.hasClass(E,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeDeselectEvent.fire();var A=this.cfg.getProperty(L.SELECTED.key),P=this._toDate(O),F=O.concat();if(D>-1){if(this.cfg.getProperty(L.PAGEDATE.key).getMonth()==P.getMonth()&&this.cfg.getProperty(L.PAGEDATE.key).getFullYear()==P.getFullYear()){K.removeClass(E,this.Style.CSS_CELL_SELECTED)}A.splice(D,1)}if(this.parent){this.parent.cfg.setProperty(L.SELECTED.key,A)}else{this.cfg.setProperty(L.SELECTED.key,A)}this.deselectEvent.fire(F)}return this.getSelectedDates()},deselectAll:function(){this.beforeDeselectEvent.fire();var A=L.SELECTED.key,D=this.cfg.getProperty(A),C=D.length,B=D.concat();if(this.parent){this.parent.cfg.setProperty(A,[])}else{this.cfg.setProperty(A,[])}if(C>0){this.deselectEvent.fire(B)}return this.getSelectedDates()},_toFieldArray:function(C){var D=[];if(C instanceof Date){D=[[C.getFullYear(),C.getMonth()+1,C.getDate()]]}else{if(I.isString(C)){D=this._parseDates(C)}else{if(I.isArray(C)){for(var B=0;B<C.length;++B){var A=C[B];D[D.length]=[A.getFullYear(),A.getMonth()+1,A.getDate()]}}}}return D},toDate:function(A){return this._toDate(A)},_toDate:function(A){if(A instanceof Date){return A}else{return J.getDate(A[0],A[1]-1,A[2])}},_fieldArraysAreEqual:function(A,B){var C=false;if(A[0]==B[0]&&A[1]==B[1]&&A[2]==B[2]){C=true}return C},_indexOfSelectedFieldArray:function(A){var B=-1,E=this.cfg.getProperty(L.SELECTED.key);for(var C=0;C<E.length;++C){var D=E[C];if(A[0]==D[0]&&A[1]==D[1]&&A[2]==D[2]){B=C;break}}return B},isDateOOM:function(A){return(A.getMonth()!=this.cfg.getProperty(L.PAGEDATE.key).getMonth())},isDateOOB:function(C){var B=this.cfg.getProperty(L.MINDATE.key),A=this.cfg.getProperty(L.MAXDATE.key),D=J;if(B){B=D.clearTime(B)}if(A){A=D.clearTime(A)}var E=new Date(C.getTime());E=D.clearTime(E);return((B&&E.getTime()<B.getTime())||(A&&E.getTime()>A.getTime()))},_parsePageDate:function(E){var B;if(E){if(E instanceof Date){B=J.findMonthStart(E)}else{var A,C,D;D=E.split(this.cfg.getProperty(L.DATE_FIELD_DELIMITER.key));A=parseInt(D[this.cfg.getProperty(L.MY_MONTH_POSITION.key)-1],10)-1;C=parseInt(D[this.cfg.getProperty(L.MY_YEAR_POSITION.key)-1],10);B=J.getDate(C,A,1)}}else{B=J.getDate(this.today.getFullYear(),this.today.getMonth(),1)}return B},onBeforeSelect:function(){if(this.cfg.getProperty(L.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll()}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll()}}},onSelect:function(A){},onBeforeDeselect:function(){},onDeselect:function(A){},onChangePage:function(){this.render()},onRender:function(){},onReset:function(){this.render()},onClear:function(){this.render()},validate:function(){return true},_parseDate:function(B){var A=B.split(this.Locale.DATE_FIELD_DELIMITER),D;if(A.length==2){D=[A[this.Locale.MD_MONTH_POSITION-1],A[this.Locale.MD_DAY_POSITION-1]];D.type=H.MONTH_DAY}else{D=[A[this.Locale.MDY_YEAR_POSITION-1],A[this.Locale.MDY_MONTH_POSITION-1],A[this.Locale.MDY_DAY_POSITION-1]];D.type=H.DATE}for(var C=0;C<D.length;C++){D[C]=parseInt(D[C],10)}return D},_parseDates:function(S){var B=[],C=S.split(this.Locale.DATE_DELIMITER);for(var D=0;D<C.length;++D){var E=C[D];if(E.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var T=E.split(this.Locale.DATE_RANGE_DELIMITER),F=this._parseDate(T[0]),A=this._parseDate(T[1]),Q=this._parseRange(F,A);B=B.concat(Q)}else{var R=this._parseDate(E);B.push(R)}}return B},_parseRange:function(E,A){var D=J.add(J.getDate(E[0],E[1]-1,E[2]),J.DAY,1),B=J.getDate(A[0],A[1]-1,A[2]),C=[];C.push(E);while(D.getTime()<=B.getTime()){C.push([D.getFullYear(),D.getMonth()+1,D.getDate()]);D=J.add(D,J.DAY,1)}return C},resetRenderers:function(){this.renderStack=this._renderStack.concat()},removeRenderers:function(){this._renderStack=[];this.renderStack=[]},clearElement:function(A){A.innerHTML="&#160;";A.className=""},addRenderer:function(E,D){var B=this._parseDates(E);for(var C=0;C<B.length;++C){var A=B[C];if(A.length==2){if(A[0] instanceof Array){this._addRenderer(H.RANGE,A,D)}else{this._addRenderer(H.MONTH_DAY,A,D)}}else{if(A.length==3){this._addRenderer(H.DATE,A,D)}}}},_addRenderer:function(C,B,D){var A=[C,B,D];this.renderStack.unshift(A);this._renderStack=this.renderStack.concat()
},addMonthRenderer:function(A,B){this._addRenderer(H.MONTH,[A],B)},addWeekdayRenderer:function(A,B){this._addRenderer(H.WEEKDAY,[A],B)},clearAllBodyCellStyles:function(B){for(var A=0;A<this.cells.length;++A){K.removeClass(this.cells[A],B)}},setMonth:function(A){var C=L.PAGEDATE.key,B=this.cfg.getProperty(C);B.setMonth(parseInt(A,10));this.cfg.setProperty(C,B)},setYear:function(B){var C=L.PAGEDATE.key,A=this.cfg.getProperty(C);A.setFullYear(parseInt(B,10));this.cfg.setProperty(C,A)},getSelectedDates:function(){var C=[],D=this.cfg.getProperty(L.SELECTED.key);for(var A=0;A<D.length;++A){var B=D[A];var E=J.getDate(B[0],B[1]-1,B[2]);C.push(E)}C.sort(function(N,F){return N-F});return C},hide:function(){if(this.beforeHideEvent.fire()){this.oDomContainer.style.display="none";this.hideEvent.fire()}},show:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display="block";this.showEvent.fire()}},browser:(function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera"}else{if(A.indexOf("msie 7")!=-1){return"ie7"}else{if(A.indexOf("msie")!=-1){return"ie"}else{if(A.indexOf("safari")!=-1){return"safari"}else{if(A.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}})(),toString:function(){return"Calendar "+this.id},destroy:function(){if(this.beforeDestroyEvent.fire()){var A=this;if(A.navigator){A.navigator.destroy()}if(A.cfg){A.cfg.destroy()}G.purgeElement(A.oDomContainer,true);K.removeClass(A.oDomContainer,"withtitle");K.removeClass(A.oDomContainer,A.Style.CSS_CONTAINER);K.removeClass(A.oDomContainer,A.Style.CSS_SINGLE);A.oDomContainer.innerHTML="";A.oDomContainer=null;A.cells=null;this.destroyEvent.fire()}}};YAHOO.widget.Calendar=H;YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar})();(function(){var L=YAHOO.util.Dom,J=YAHOO.widget.DateMath,H=YAHOO.util.Event,K=YAHOO.lang,I=YAHOO.widget.Calendar;function N(A,C,B){if(arguments.length>0){this.init.apply(this,arguments)}}N._DEFAULT_CONFIG=I._DEFAULT_CONFIG;N._DEFAULT_CONFIG.PAGES={key:"pages",value:2};var M=N._DEFAULT_CONFIG;N.prototype={init:function(A,C,B){var D=this._parseArgs(arguments);A=D.id;C=D.container;B=D.config;this.oDomContainer=L.get(C);if(!this.oDomContainer.id){this.oDomContainer.id=L.generateId()}if(!A){A=this.oDomContainer.id+"_t"}this.id=A;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];L.addClass(this.oDomContainer,N.CSS_CONTAINER);L.addClass(this.oDomContainer,N.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true)}},setupConfig:function(){var A=this.cfg;A.addProperty(M.PAGES.key,{value:M.PAGES.value,validator:A.checkNumber,handler:this.configPages});A.addProperty(M.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});A.addProperty(M.SELECTED.key,{value:[],handler:this.configSelected});A.addProperty(M.TITLE.key,{value:M.TITLE.value,handler:this.configTitle});A.addProperty(M.CLOSE.key,{value:M.CLOSE.value,handler:this.configClose});A.addProperty(M.IFRAME.key,{value:M.IFRAME.value,handler:this.configIframe,validator:A.checkBoolean});A.addProperty(M.MINDATE.key,{value:M.MINDATE.value,handler:this.delegateConfig});A.addProperty(M.MAXDATE.key,{value:M.MAXDATE.value,handler:this.delegateConfig});A.addProperty(M.MULTI_SELECT.key,{value:M.MULTI_SELECT.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.START_WEEKDAY.key,{value:M.START_WEEKDAY.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.SHOW_WEEKDAYS.key,{value:M.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.SHOW_WEEK_HEADER.key,{value:M.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.SHOW_WEEK_FOOTER.key,{value:M.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.HIDE_BLANK_WEEKS.key,{value:M.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.NAV_ARROW_LEFT.key,{value:M.NAV_ARROW_LEFT.value,handler:this.delegateConfig});A.addProperty(M.NAV_ARROW_RIGHT.key,{value:M.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});A.addProperty(M.MONTHS_SHORT.key,{value:M.MONTHS_SHORT.value,handler:this.delegateConfig});A.addProperty(M.MONTHS_LONG.key,{value:M.MONTHS_LONG.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_1CHAR.key,{value:M.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_SHORT.key,{value:M.WEEKDAYS_SHORT.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_MEDIUM.key,{value:M.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_LONG.key,{value:M.WEEKDAYS_LONG.value,handler:this.delegateConfig});A.addProperty(M.LOCALE_MONTHS.key,{value:M.LOCALE_MONTHS.value,handler:this.delegateConfig});A.addProperty(M.LOCALE_WEEKDAYS.key,{value:M.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});A.addProperty(M.DATE_DELIMITER.key,{value:M.DATE_DELIMITER.value,handler:this.delegateConfig});A.addProperty(M.DATE_FIELD_DELIMITER.key,{value:M.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});A.addProperty(M.DATE_RANGE_DELIMITER.key,{value:M.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});A.addProperty(M.MY_MONTH_POSITION.key,{value:M.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_YEAR_POSITION.key,{value:M.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MD_MONTH_POSITION.key,{value:M.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MD_DAY_POSITION.key,{value:M.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MDY_MONTH_POSITION.key,{value:M.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MDY_DAY_POSITION.key,{value:M.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MDY_YEAR_POSITION.key,{value:M.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_LABEL_MONTH_POSITION.key,{value:M.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_LABEL_YEAR_POSITION.key,{value:M.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_LABEL_MONTH_SUFFIX.key,{value:M.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});A.addProperty(M.MY_LABEL_YEAR_SUFFIX.key,{value:M.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});A.addProperty(M.NAV.key,{value:M.NAV.value,handler:this.configNavigator});A.addProperty(M.STRINGS.key,{value:M.STRINGS.value,handler:this.configStrings,validator:function(B){return K.isObject(B)},supercedes:M.STRINGS.supercedes})},initEvents:function(){var C=this,A="Event",F=YAHOO.util.CustomEvent;var D=function(U,G,V){for(var S=0;S<C.pages.length;++S){var T=C.pages[S];T[this.type+A].subscribe(U,G,V)}};var E=function(T,G){for(var R=0;R<C.pages.length;++R){var S=C.pages[R];S[this.type+A].unsubscribe(T,G)}};var B=I._EVENT_TYPES;C.beforeSelectEvent=new F(B.BEFORE_SELECT);C.beforeSelectEvent.subscribe=D;C.beforeSelectEvent.unsubscribe=E;C.selectEvent=new F(B.SELECT);C.selectEvent.subscribe=D;C.selectEvent.unsubscribe=E;C.beforeDeselectEvent=new F(B.BEFORE_DESELECT);C.beforeDeselectEvent.subscribe=D;C.beforeDeselectEvent.unsubscribe=E;C.deselectEvent=new F(B.DESELECT);C.deselectEvent.subscribe=D;C.deselectEvent.unsubscribe=E;C.changePageEvent=new F(B.CHANGE_PAGE);C.changePageEvent.subscribe=D;C.changePageEvent.unsubscribe=E;C.beforeRenderEvent=new F(B.BEFORE_RENDER);C.beforeRenderEvent.subscribe=D;C.beforeRenderEvent.unsubscribe=E;C.renderEvent=new F(B.RENDER);C.renderEvent.subscribe=D;
C.renderEvent.unsubscribe=E;C.resetEvent=new F(B.RESET);C.resetEvent.subscribe=D;C.resetEvent.unsubscribe=E;C.clearEvent=new F(B.CLEAR);C.clearEvent.subscribe=D;C.clearEvent.unsubscribe=E;C.beforeShowEvent=new F(B.BEFORE_SHOW);C.showEvent=new F(B.SHOW);C.beforeHideEvent=new F(B.BEFORE_HIDE);C.hideEvent=new F(B.HIDE);C.beforeShowNavEvent=new F(B.BEFORE_SHOW_NAV);C.showNavEvent=new F(B.SHOW_NAV);C.beforeHideNavEvent=new F(B.BEFORE_HIDE_NAV);C.hideNavEvent=new F(B.HIDE_NAV);C.beforeRenderNavEvent=new F(B.BEFORE_RENDER_NAV);C.renderNavEvent=new F(B.RENDER_NAV);C.beforeDestroyEvent=new F(B.BEFORE_DESTROY);C.destroyEvent=new F(B.DESTROY)},configPages:function(E,F,X){var Z=F[0],b=M.PAGEDATE.key,A="_",D="groupcal",B="first-of-type",a="last-of-type";for(var c=0;c<Z;++c){var C=this.id+A+c,G=this.containerId+A+c,W=this.cfg.getConfig();W.close=false;W.title=false;W.navigator=null;var d=this.constructChild(C,G,W);var Y=d.cfg.getProperty(b);this._setMonthOnDate(Y,Y.getMonth()+c);d.cfg.setProperty(b,Y);L.removeClass(d.oDomContainer,this.Style.CSS_SINGLE);L.addClass(d.oDomContainer,D);if(c===0){L.addClass(d.oDomContainer,B)}if(c==(Z-1)){L.addClass(d.oDomContainer,a)}d.parent=this;d.index=c;this.pages[this.pages.length]=d}},configPageDate:function(B,C,E){var G=C[0],D;var F=M.PAGEDATE.key;for(var Q=0;Q<this.pages.length;++Q){var R=this.pages[Q];if(Q===0){D=R._parsePageDate(G);R.cfg.setProperty(F,D)}else{var A=new Date(D);this._setMonthOnDate(A,A.getMonth()+Q);R.cfg.setProperty(F,A)}}},configSelected:function(C,E,A){var B=M.SELECTED.key;this.delegateConfig(C,E,A);var D=(this.pages.length>0)?this.pages[0].cfg.getProperty(B):[];this.cfg.setProperty(B,D,true)},delegateConfig:function(D,E,A){var F=E[0];var B;for(var C=0;C<this.pages.length;C++){B=this.pages[C];B.cfg.setProperty(D,F)}},setChildFunction:function(A,C){var D=this.cfg.getProperty(M.PAGES.key);for(var B=0;B<D;++B){this.pages[B][A]=C}},callChildFunction:function(F,D){var E=this.cfg.getProperty(M.PAGES.key);for(var A=0;A<E;++A){var B=this.pages[A];if(B[F]){var C=B[F];C.call(B,D)}}},constructChild:function(A,C,B){var D=document.getElementById(C);if(!D){D=document.createElement("div");D.id=C;this.oDomContainer.appendChild(D)}return new I(A,C,B)},setMonth:function(A){A=parseInt(A,10);var F;var D=M.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var C=this.pages[B];var E=C.cfg.getProperty(D);if(B===0){F=E.getFullYear()}else{E.setFullYear(F)}this._setMonthOnDate(E,A+B);C.cfg.setProperty(D,E)}},setYear:function(C){var D=M.PAGEDATE.key;C=parseInt(C,10);for(var A=0;A<this.pages.length;++A){var B=this.pages[A];var E=B.cfg.getProperty(D);if((E.getMonth()+1)==1&&A>0){C+=1}B.setYear(C)}},render:function(){this.renderHeader();for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.render()}this.renderFooter()},select:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.select(C)}return this.getSelectedDates()},selectCell:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.selectCell(C)}return this.getSelectedDates()},deselect:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.deselect(C)}return this.getSelectedDates()},deselectAll:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.deselectAll()}return this.getSelectedDates()},deselectCell:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.deselectCell(C)}return this.getSelectedDates()},reset:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.reset()}},clear:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.clear()}this.cfg.setProperty(M.SELECTED.key,[]);this.cfg.setProperty(M.PAGEDATE.key,new Date(this.pages[0].today.getTime()));this.render()},nextMonth:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.nextMonth()}},previousMonth:function(){for(var A=this.pages.length-1;A>=0;--A){var B=this.pages[A];B.previousMonth()}},nextYear:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.nextYear()}},previousYear:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.previousYear()}},getSelectedDates:function(){var C=[];var D=this.cfg.getProperty(M.SELECTED.key);for(var A=0;A<D.length;++A){var B=D[A];var E=J.getDate(B[0],B[1]-1,B[2]);C.push(E)}C.sort(function(F,G){return F-G});return C},addRenderer:function(D,C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.addRenderer(D,C)}},addMonthRenderer:function(A,D){for(var B=0;B<this.pages.length;++B){var C=this.pages[B];C.addMonthRenderer(A,D)}},addWeekdayRenderer:function(C,D){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.addWeekdayRenderer(C,D)}},removeRenderers:function(){this.callChildFunction("removeRenderers")},renderHeader:function(){},renderFooter:function(){},addMonths:function(A){this.callChildFunction("addMonths",A)},subtractMonths:function(A){this.callChildFunction("subtractMonths",A)},addYears:function(A){this.callChildFunction("addYears",A)},subtractYears:function(A){this.callChildFunction("subtractYears",A)},getCalendarPage:function(B){var G=null;if(B){var F=B.getFullYear(),C=B.getMonth();var D=this.pages;for(var A=0;A<D.length;++A){var E=D[A].cfg.getProperty("pagedate");if(E.getFullYear()===F&&E.getMonth()===C){G=D[A];break}}}return G},_setMonthOnDate:function(B,A){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(A<0||A>11)){var C=J.add(B,J.MONTH,A-B.getMonth());B.setTime(C.getTime())}else{B.setMonth(A)}},_fixWidth:function(){var C=0;for(var A=0;A<this.pages.length;++A){var B=this.pages[A];C+=B.oDomContainer.offsetWidth}if(C>0){this.oDomContainer.style.width=C+"px"}},toString:function(){return"CalendarGroup "+this.id},destroy:function(){if(this.beforeDestroyEvent.fire()){var A=this;if(A.navigator){A.navigator.destroy()}if(A.cfg){A.cfg.destroy()}H.purgeElement(A.oDomContainer,true);L.removeClass(A.oDomContainer,N.CSS_CONTAINER);L.removeClass(A.oDomContainer,N.CSS_MULTI_UP);for(var B=0,C=A.pages.length;B<C;B++){A.pages[B].destroy();A.pages[B]=null}A.oDomContainer.innerHTML="";A.oDomContainer=null;this.destroyEvent.fire()}}};N.CSS_CONTAINER="yui-calcontainer";N.CSS_MULTI_UP="multi";N.CSS_2UPTITLE="title";N.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(N,I,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","configStrings","configNavigator","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","show","toDate","_toDate","_parseArgs","browser");YAHOO.widget.CalGrp=N;YAHOO.widget.CalendarGroup=N;YAHOO.widget.Calendar2up=function(A,C,B){this.init(A,C,B)};YAHOO.extend(YAHOO.widget.Calendar2up,N);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up})();YAHOO.widget.CalendarNavigator=function(B){this.init(B)};(function(){var B=YAHOO.widget.CalendarNavigator;B.CLASSES={NAV:"yui-cal-nav",NAV_VISIBLE:"yui-cal-nav-visible",MASK:"yui-cal-nav-mask",YEAR:"yui-cal-nav-y",MONTH:"yui-cal-nav-m",BUTTONS:"yui-cal-nav-b",BUTTON:"yui-cal-nav-btn",ERROR:"yui-cal-nav-e",YEAR_CTRL:"yui-cal-nav-yc",MONTH_CTRL:"yui-cal-nav-mc",INVALID:"yui-invalid",DEFAULT:"yui-default"};B._DEFAULT_CFG={strings:{month:"Month",year:"Year",submit:"Okay",cancel:"Cancel",invalidYear:"Year needs to be a number"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"year"};B.ID_SUFFIX="_nav";B.MONTH_SUFFIX="_month";B.YEAR_SUFFIX="_year";B.ERROR_SUFFIX="_error";B.CANCEL_SUFFIX="_cancel";B.SUBMIT_SUFFIX="_submit";B.YR_MAX_DIGITS=4;B.YR_MINOR_INC=1;B.YR_MAJOR_INC=10;B.UPDATE_DELAY=50;B.YR_PATTERN=/^\d+$/;B.TRIM=/^\s*(.*?)\s*$/})();YAHOO.widget.CalendarNavigator.prototype={id:null,cal:null,navEl:null,maskEl:null,yearEl:null,monthEl:null,errorEl:null,submitEl:null,cancelEl:null,firstCtrl:null,lastCtrl:null,_doc:null,_year:null,_month:0,__rendered:false,init:function(D){var E=D.oDomContainer;
this.cal=D;this.id=E.id+YAHOO.widget.CalendarNavigator.ID_SUFFIX;this._doc=E.ownerDocument;var F=YAHOO.env.ua.ie;this.__isIEQuirks=(F&&((F<=6)||(F===7&&this._doc.compatMode=="BackCompat")))},show:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeShowNavEvent.fire()){if(!this.__rendered){this.render()}this.clearErrors();this._updateMonthUI();this._updateYearUI();this._show(this.navEl,true);this.setInitialFocus();this.showMask();YAHOO.util.Dom.addClass(this.cal.oDomContainer,B.NAV_VISIBLE);this.cal.showNavEvent.fire()}},hide:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false);this.hideMask();YAHOO.util.Dom.removeClass(this.cal.oDomContainer,B.NAV_VISIBLE);this.cal.hideNavEvent.fire()}},showMask:function(){this._show(this.maskEl,true);if(this.__isIEQuirks){this._syncMask()}},hideMask:function(){this._show(this.maskEl,false)},getMonth:function(){return this._month},getYear:function(){return this._year},setMonth:function(B){if(B>=0&&B<12){this._month=B}this._updateMonthUI()},setYear:function(D){var C=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(D)&&C.test(D+"")){this._year=D}this._updateYearUI()},render:function(){this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();this.createMask();this.applyListeners();this.__rendered=true}this.cal.renderNavEvent.fire()},createNav:function(){var H=YAHOO.widget.CalendarNavigator;var G=this._doc;var F=G.createElement("div");F.className=H.CLASSES.NAV;var E=this.renderNavContents([]);F.innerHTML=E.join("");this.cal.oDomContainer.appendChild(F);this.navEl=F;this.yearEl=G.getElementById(this.id+H.YEAR_SUFFIX);this.monthEl=G.getElementById(this.id+H.MONTH_SUFFIX);this.errorEl=G.getElementById(this.id+H.ERROR_SUFFIX);this.submitEl=G.getElementById(this.id+H.SUBMIT_SUFFIX);this.cancelEl=G.getElementById(this.id+H.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off")}this._setFirstLastElements()},createMask:function(){var D=YAHOO.widget.CalendarNavigator.CLASSES;var C=this._doc.createElement("div");C.className=D.MASK;this.cal.oDomContainer.appendChild(C);this.maskEl=C},_syncMask:function(){var D=this.cal.oDomContainer;if(D&&this.maskEl){var C=YAHOO.util.Dom.getRegion(D);YAHOO.util.Dom.setStyle(this.maskEl,"width",C.right-C.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",C.bottom-C.top+"px")}},renderNavContents:function(C){var G=YAHOO.widget.CalendarNavigator,F=G.CLASSES,H=C;H[H.length]='<div class="'+F.MONTH+'">';this.renderMonth(H);H[H.length]="</div>";H[H.length]='<div class="'+F.YEAR+'">';this.renderYear(H);H[H.length]="</div>";H[H.length]='<div class="'+F.BUTTONS+'">';this.renderButtons(H);H[H.length]="</div>";H[H.length]='<div class="'+F.ERROR+'" id="'+this.id+G.ERROR_SUFFIX+'"></div>';return H},renderMonth:function(O){var L=YAHOO.widget.CalendarNavigator,K=L.CLASSES;var J=this.id+L.MONTH_SUFFIX,M=this.__getCfg("monthFormat"),C=this.cal.cfg.getProperty((M==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),N=O;if(C&&C.length>0){N[N.length]='<label for="'+J+'">';N[N.length]=this.__getCfg("month",true);N[N.length]="</label>";N[N.length]='<select name="'+J+'" id="'+J+'" class="'+K.MONTH_CTRL+'">';for(var P=0;P<C.length;P++){N[N.length]='<option value="'+P+'">';N[N.length]=C[P];N[N.length]="</option>"}N[N.length]="</select>"}return N},renderYear:function(L){var J=YAHOO.widget.CalendarNavigator,I=J.CLASSES;var H=this.id+J.YEAR_SUFFIX,C=J.YR_MAX_DIGITS,K=L;K[K.length]='<label for="'+H+'">';K[K.length]=this.__getCfg("year",true);K[K.length]="</label>";K[K.length]='<input type="text" name="'+H+'" id="'+H+'" class="'+I.YEAR_CTRL+'" maxlength="'+C+'"/>';return K},renderButtons:function(C){var E=YAHOO.widget.CalendarNavigator.CLASSES;var F=C;F[F.length]='<span class="'+E.BUTTON+" "+E.DEFAULT+'">';F[F.length]='<button type="button" id="'+this.id+'_submit">';F[F.length]=this.__getCfg("submit",true);F[F.length]="</button>";F[F.length]="</span>";F[F.length]='<span class="'+E.BUTTON+'">';F[F.length]='<button type="button" id="'+this.id+'_cancel">';F[F.length]=this.__getCfg("cancel",true);F[F.length]="</button>";F[F.length]="</span>";return F},applyListeners:function(){var F=YAHOO.util.Event;function D(){if(this.validate()){this.setYear(this._getYearFromUI())}}function E(){this.setMonth(this._getMonthFromUI())}F.on(this.submitEl,"click",this.submit,this,true);F.on(this.cancelEl,"click",this.cancel,this,true);F.on(this.yearEl,"blur",D,this,true);F.on(this.monthEl,"change",E,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true)}this.applyKeyListeners()},purgeListeners:function(){var B=YAHOO.util.Event;B.removeListener(this.submitEl,"click",this.submit);B.removeListener(this.cancelEl,"click",this.cancel);B.removeListener(this.yearEl,"blur");B.removeListener(this.monthEl,"change");if(this.__isIEQuirks){B.removeListener(this.cal.oDomContainer,"resize",this._syncMask)}this.purgeKeyListeners()},applyKeyListeners:function(){var F=YAHOO.util.Event,E=YAHOO.env.ua;var G=(E.ie||E.webkit)?"keydown":"keypress";var H=(E.ie||E.opera||E.webkit)?"keydown":"keypress";F.on(this.yearEl,"keypress",this._handleEnterKey,this,true);F.on(this.yearEl,G,this._handleDirectionKeys,this,true);F.on(this.lastCtrl,H,this._handleTabKey,this,true);F.on(this.firstCtrl,H,this._handleShiftTabKey,this,true)},purgeKeyListeners:function(){var F=YAHOO.util.Event,E=YAHOO.env.ua;var G=(E.ie||E.webkit)?"keydown":"keypress";var H=(E.ie||E.opera||E.webkit)?"keydown":"keypress";F.removeListener(this.yearEl,"keypress",this._handleEnterKey);F.removeListener(this.yearEl,G,this._handleDirectionKeys);F.removeListener(this.lastCtrl,H,this._handleTabKey);F.removeListener(this.firstCtrl,H,this._handleShiftTabKey)},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var F=this.cal;var D=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(D>0){var E=this;window.setTimeout(function(){E._update(F)},D)}else{this._update(F)}}},_update:function(B){B.setYear(this.getYear());B.setMonth(this.getMonth());B.render()},cancel:function(){this.hide()},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false}},setError:function(B){if(this.errorEl){this.errorEl.innerHTML=B;this._show(this.errorEl,true)}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false)}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID)},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID)},clearErrors:function(){this.clearError();this.clearYearError()},setInitialFocus:function(){var E=this.submitEl,G=this.__getCfg("initialFocus");if(G&&G.toLowerCase){G=G.toLowerCase();if(G=="year"){E=this.yearEl;try{this.yearEl.select()}catch(H){}}else{if(G=="month"){E=this.monthEl}}}if(E&&YAHOO.lang.isFunction(E.focus)){try{E.focus()}catch(F){}}},erase:function(){if(this.__rendered){this.purgeListeners();this.yearEl=null;this.monthEl=null;this.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.lastCtrl=null;if(this.navEl){this.navEl.innerHTML=""}var D=this.navEl.parentNode;if(D){D.removeChild(this.navEl)}this.navEl=null;var C=this.maskEl.parentNode;if(C){C.removeChild(this.maskEl)}this.maskEl=null;this.__rendered=false}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null},_show:function(D,C){if(D){YAHOO.util.Dom.setStyle(D,"display",(C)?"block":"none")}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex}else{return 0}},_getYearFromUI:function(){var F=YAHOO.widget.CalendarNavigator;var D=null;if(this.yearEl){var E=this.yearEl.value;E=E.replace(F.TRIM,"$1");if(F.YR_PATTERN.test(E)){D=parseInt(E,10)
}}return D},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl}}},_handleEnterKey:function(D){var C=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(D)==C.ENTER){YAHOO.util.Event.preventDefault(D);this.submit()}},_handleDirectionKeys:function(I){var J=YAHOO.util.Event,E=YAHOO.util.KeyListener.KEY,L=YAHOO.widget.CalendarNavigator;var K=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(K)){var N=false;switch(J.getCharCode(I)){case E.UP:this.yearEl.value=K+L.YR_MINOR_INC;N=true;break;case E.DOWN:this.yearEl.value=Math.max(K-L.YR_MINOR_INC,0);N=true;break;case E.PAGE_UP:this.yearEl.value=K+L.YR_MAJOR_INC;N=true;break;case E.PAGE_DOWN:this.yearEl.value=Math.max(K-L.YR_MAJOR_INC,0);N=true;break;default:break}if(N){J.preventDefault(I);try{this.yearEl.select()}catch(M){}}}},_handleTabKey:function(F){var G=YAHOO.util.Event,E=YAHOO.util.KeyListener.KEY;if(G.getCharCode(F)==E.TAB&&!F.shiftKey){try{G.preventDefault(F);this.firstCtrl.focus()}catch(H){}}},_handleShiftTabKey:function(F){var G=YAHOO.util.Event,E=YAHOO.util.KeyListener.KEY;if(F.shiftKey&&G.getCharCode(F)==E.TAB){try{G.preventDefault(F);this.lastCtrl.focus()}catch(H){}}},__getCfg:function(F,H){var G=YAHOO.widget.CalendarNavigator._DEFAULT_CFG;var E=this.cal.cfg.getProperty("navigator");if(H){return(E!==true&&E.strings&&E.strings[F])?E.strings[F]:G.strings[F]}else{return(E!==true&&E[F])?E[F]:G[F]}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.6.0",build:"1321"});var SWFUpload=function(A){this.initSWFUpload(A)};SWFUpload.prototype.initSWFUpload=function(B){try{this.customSettings={};this.settings=B;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(A){delete SWFUpload.instances[this.movieName];throw A}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 Alpha";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(B,A){this.settings[B]=(this.settings[B]==undefined)?A:this.settings[B]};this.ensureDefault("upload_url","");this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id",null);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+"?swfuploadrnd="+Math.floor(Math.random()*999999999)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){if(this.settings.button_placeholder_id!==""){this.replaceWithFlash()}else{this.appendFlash()}};SWFUpload.prototype.appendFlash=function(){var B,A;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}B=document.getElementsByTagName("body")[0];if(B==undefined){throw"Could not find the 'body' element."}A=document.createElement("div");A.style.width="1px";A.style.height="1px";A.style.overflow="hidden";B.appendChild(A);A.innerHTML=this.getFlashHTML()};SWFUpload.prototype.replaceWithFlash=function(){var A,B;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}A=document.getElementById(this.settings.button_placeholder_id);if(A==undefined){throw"Could not find the placeholder element."}B=document.createElement("div");B.innerHTML=this.getFlashHTML();A.parentNode.replaceChild(B.firstChild,A)};SWFUpload.prototype.getFlashHTML=function(){var A=this.settings.button_image_url===""?true:false;return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',A?"transparent":"window",'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var A=this.buildParamString();return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;params=",encodeURIComponent(A),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled)].join("")
};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var C=this.settings.post_params;var B=[];if(typeof (C)==="object"){for(var A in C){if(C.hasOwnProperty(A)){B.push(encodeURIComponent(A.toString())+"="+encodeURIComponent(C[A].toString()))}}}return B.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.stopUpload();var B=null;try{B=this.getMovieElement()}catch(C){}if(B!=undefined&&B.parentNode!=undefined&&typeof B.parentNode.removeChild==="function"){var A=B.parentNode;if(A!=undefined){A.removeChild(B);if(A.parentNode!=undefined&&typeof A.parentNode.removeChild==="function"){A.parentNode.removeChild(A)}}}SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];delete this.movieElement;delete this.settings;delete this.customSettings;delete this.eventQueue;delete this.movieName;delete window[this.movieName];return true}catch(D){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(B,C,A){if(C==undefined){return(this.settings[B]=A)}else{return(this.settings[B]=C)}};SWFUpload.prototype.getSetting=function(A){if(this.settings[A]!=undefined){return this.settings[A]}return""};SWFUpload.prototype.callFlash=function(C,D){D=D||[];var A=this.getMovieElement();var B;if(typeof A[C]==="function"){if(D.length===0){B=A[C]()}else{if(D.length===1){B=A[C](D[0])}else{if(D.length===2){B=A[C](D[0],D[1])}else{if(D.length===3){B=A[C](D[0],D[1],D[2])}else{throw"Too many arguments"}}}}if(B!=undefined&&typeof B.post==="object"){B=this.unescapeFilePostParams(B)}return B}else{throw"Invalid function name: "+C}};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(A){this.callFlash("StartUpload",[A])};SWFUpload.prototype.cancelUpload=function(A){this.callFlash("CancelUpload",[A])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(A){this.callFlash("SetStats",[A])};SWFUpload.prototype.getFile=function(A){if(typeof (A)==="number"){return this.callFlash("GetFileByIndex",[A])}else{return this.callFlash("GetFile",[A])}};SWFUpload.prototype.addFileParam=function(A,B,C){return this.callFlash("AddFileParam",[A,B,C])};SWFUpload.prototype.removeFileParam=function(A,B){this.callFlash("RemoveFileParam",[A,B])};SWFUpload.prototype.setUploadURL=function(A){this.settings.upload_url=A.toString();this.callFlash("SetUploadURL",[A])};SWFUpload.prototype.setPostParams=function(A){this.settings.post_params=A;this.callFlash("SetPostParams",[A])};SWFUpload.prototype.addPostParam=function(A,B){this.settings.post_params[A]=B;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(A){delete this.settings.post_params[A];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(A,B){this.settings.file_types=A;this.settings.file_types_description=B;this.callFlash("SetFileTypes",[A,B])};SWFUpload.prototype.setFileSizeLimit=function(A){this.settings.file_size_limit=A;this.callFlash("SetFileSizeLimit",[A])};SWFUpload.prototype.setFileUploadLimit=function(A){this.settings.file_upload_limit=A;this.callFlash("SetFileUploadLimit",[A])};SWFUpload.prototype.setFileQueueLimit=function(A){this.settings.file_queue_limit=A;this.callFlash("SetFileQueueLimit",[A])};SWFUpload.prototype.setFilePostName=function(A){this.settings.file_post_name=A;this.callFlash("SetFilePostName",[A])};SWFUpload.prototype.setUseQueryString=function(A){this.settings.use_query_string=A;this.callFlash("SetUseQueryString",[A])};SWFUpload.prototype.setRequeueOnError=function(A){this.settings.requeue_on_error=A;this.callFlash("SetRequeueOnError",[A])};SWFUpload.prototype.setDebugEnabled=function(A){this.settings.debug_enabled=A;this.callFlash("SetDebugEnabled",[A])};SWFUpload.prototype.setButtonImageURL=function(A){if(A==undefined){A=""}this.settings.button_image_url=A;this.callFlash("SetButtonImageURL",[A])};SWFUpload.prototype.setButtonDimensions=function(C,A){this.settings.button_width=C;this.settings.button_height=A;var B=this.getMovieElement();if(B!=undefined){B.style.width=C+"px";B.style.height=A+"px"}this.callFlash("SetButtonDimensions",[C,A])};SWFUpload.prototype.setButtonText=function(A){this.settings.button_text=A;this.callFlash("SetButtonText",[A])};SWFUpload.prototype.setButtonTextPadding=function(B,A){this.settings.button_text_top_padding=A;this.settings.button_text_left_padding=B;this.callFlash("SetButtonTextPadding",[B,A])};SWFUpload.prototype.setButtonTextStyle=function(A){this.settings.button_text_style=A;
this.callFlash("SetButtonTextStyle",[A])};SWFUpload.prototype.setButtonDisabled=function(A){this.settings.button_disabled=A;this.callFlash("SetButtonDisabled",[A])};SWFUpload.prototype.setButtonAction=function(A){this.settings.button_action=A;this.callFlash("SetButtonAction",[A])};SWFUpload.prototype.queueEvent=function(B,C){if(C==undefined){C=[]}else{if(!(C instanceof Array)){C=[C]}}var A=this;if(typeof this.settings[B]==="function"){this.eventQueue.push(function(){this.settings[B].apply(this,C)});setTimeout(function(){A.executeNextEvent()},0)}else{if(this.settings[B]!==null){throw"Event handler "+B+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var A=this.eventQueue?this.eventQueue.shift():null;if(typeof (A)==="function"){A.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(C){var E=/[$]([0-9a-f]{4})/i;var F={};var D;if(C!=undefined){for(var A in C.post){if(C.post.hasOwnProperty(A)){D=A;var B;while((B=E.exec(D))!==null){D=D.replace(B[0],String.fromCharCode(parseInt("0x"+B[1],16)))}F[D]=C.post[A]}}C.post=F}return C};SWFUpload.prototype.flashReady=function(){var A=this.getMovieElement();if(typeof A.StartUpload!=="function"){throw"ExternalInterface methods failed to initialize."}if(window[this.movieName]==undefined){window[this.movieName]=A}this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(A){A=this.unescapeFilePostParams(A);this.queueEvent("file_queued_handler",A)};SWFUpload.prototype.fileQueueError=function(A,C,B){A=this.unescapeFilePostParams(A);this.queueEvent("file_queue_error_handler",[A,C,B])};SWFUpload.prototype.fileDialogComplete=function(A,B){this.queueEvent("file_dialog_complete_handler",[A,B])};SWFUpload.prototype.uploadStart=function(A){A=this.unescapeFilePostParams(A);this.queueEvent("return_upload_start_handler",A)};SWFUpload.prototype.returnUploadStart=function(A){var B;if(typeof this.settings.upload_start_handler==="function"){A=this.unescapeFilePostParams(A);B=this.settings.upload_start_handler.call(this,A)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(B===undefined){B=true}B=!!B;this.callFlash("ReturnUploadStart",[B])};SWFUpload.prototype.uploadProgress=function(A,C,B){A=this.unescapeFilePostParams(A);this.queueEvent("upload_progress_handler",[A,C,B])};SWFUpload.prototype.uploadError=function(A,C,B){A=this.unescapeFilePostParams(A);this.queueEvent("upload_error_handler",[A,C,B])};SWFUpload.prototype.uploadSuccess=function(B,A){B=this.unescapeFilePostParams(B);this.queueEvent("upload_success_handler",[B,A])};SWFUpload.prototype.uploadComplete=function(A){A=this.unescapeFilePostParams(A);this.queueEvent("upload_complete_handler",A)};SWFUpload.prototype.debug=function(A){this.queueEvent("debug_handler",A)};SWFUpload.prototype.debugMessage=function(C){if(this.settings.debug){var A,D=[];if(typeof C==="object"&&typeof C.name==="string"&&typeof C.message==="string"){for(var B in C){if(C.hasOwnProperty(B)){D.push(B+": "+C[B])}}A=D.join("\n")||"";D=A.split("\n");A="EXCEPTION: "+D.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(A)}else{SWFUpload.Console.writeLine(C)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(D){var B,A;try{B=document.getElementById("SWFUpload_Console");if(!B){A=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(A);B=document.createElement("textarea");B.id="SWFUpload_Console";B.style.fontFamily="monospace";B.setAttribute("wrap","off");B.wrap="off";B.style.overflow="auto";B.style.width="700px";B.style.height="350px";B.style.margin="5px";A.appendChild(B)}B.value+=D+"\n";B.scrollTop=B.scrollHeight-B.clientHeight}catch(C){alert("Exception: "+C.name+" Message: "+C.message)}};DynamicMap=function(A){if(window.GBrowserIsCompatible&&GBrowserIsCompatible()){if(typeof (A)=="string"){A=document.getElementById(A)}DynamicMap.superclass.constructor.call(this,A);this.addControl(new GSmallMapControl())}};YAHOO.lang.extend(DynamicMap,GMap2);function NumericMarker(A,B,C){this.point=A;this.num=B;this.iconClassName=C}NumericMarker.prototype=new GOverlay();NumericMarker.prototype.setMode=function(A){if(A){this.marker.className=this.iconClassName+"-selected";this.marker.style.zIndex="100"}else{this.marker.className=this.iconClassName;this.marker.style.zIndex="90"}};NumericMarker.prototype.initialize=function(A){this.map=A;this.marker=document.createElement("div");this.marker.style.position="absolute";this.marker.className="poi-icon-2";this.marker.offsetX=11;this.marker.offsetY=22;this.setMode(false);this.marker.innerHTML=this.num;var B=A.getPane(G_MAP_MARKER_PANE);B.appendChild(this.marker);return this.marker};NumericMarker.prototype.setEventHandlers=function(D,C,A){var B=this;GEvent.addDomListener(this.marker,"click",function(){D(B.num)});GEvent.addDomListener(this.marker,"mouseover",function(){C(B.num)});GEvent.addDomListener(this.marker,"mouseout",function(){A(B.num)})};NumericMarker.prototype.remove=function(){this.marker.parentNode.removeChild(this.marker)};NumericMarker.prototype.copy=function(){return new NumericMarker(this.point,this.num)};NumericMarker.prototype.redraw=function(A){var B=this.map.fromLatLngToDivPixel(this.point);B.x-=this.marker.offsetX;B.y-=this.marker.offsetY;this.marker.style.left=B.x+"px";this.marker.style.top=B.y+"px"};NumericMarker.prototype.getX=function(){return parseInt(this.marker.style.left)};NumericMarker.prototype.getY=function(){return parseInt(this.marker.style.top)};NumericMarker.prototype.getPoint=function(){return this.point};NumericMarker.prototype.getDiv=function(){return this.marker};function IconMarker(B,C,A,D){this.point=B;this.html=C;this.offsetX=A;this.offsetY=D}IconMarker.prototype=new GOverlay();IconMarker.prototype.initialize=function(A){this.map=A;this.marker=document.createElement("div");this.marker.style.position="absolute";this.marker.style.zIndex="1000";this.marker.innerHTML=this.html;var B=A.getPane(G_MAP_MARKER_PANE);B.appendChild(this.marker);return this.marker};IconMarker.prototype.remove=function(){this.marker.parentNode.removeChild(this.marker)};IconMarker.prototype.copy=function(){return new IconMarker(this.point,this.html,this.offsetX,this.offsetY)};IconMarker.prototype.redraw=function(A){var B=this.map.fromLatLngToDivPixel(this.point);this.marker.style.left=(B.x-this.offsetX)+"px";this.marker.style.top=(B.y-this.offsetY)+"px"};IconMarker.prototype.getX=function(){return parseInt(this.marker.style.left)};IconMarker.prototype.getY=function(){return parseInt(this.marker.style.top)};IconMarker.prototype.getPoint=function(){return this.point};IconMarker.prototype.getDiv=function(){return this.marker};window.onunload=function(){if(window.GUnload){try{GUnload()}catch(A){}}};function WYSIWYG_Editor(F,B,E,G,D,A,C){this.isIE=navigator.userAgent.indexOf("MSIE")>=0;if(typeof (F)=="undefined"){alert("ERROR: No instance name was passed for the editor.");return false}else{this.instance_name=F}this.editor_area=B;this.field_name=F;if(typeof (E)=="undefined"){this.content=""}else{this.content=E}if(typeof (G)=="undefined"){this.wysiwyg_path="."}else{this.wysiwyg_path=G}if(D&&D>0){this.frame_width=D}else{this.frame_width=548}if(A&&A>0){this.frame_height=A}else{this.frame_height=150}this.minimal=C;this.allowsAnchors=false;this.wysiwyg_content=this.instance_name+"_WYSIWYG_Editor";this.wysiwyg_hidden=this.field_name;this.ta_rows=Math.round(this.frame_height/15);this.ta_cols=Math.round(this.frame_width/8);this.viewMode=1;this._X=this._Y=0;this.allow_mode_toggle=false;this.allow_speller=true;this.table_border=1;this.table_cell_padding=3;this.table_cell_spacing=0;this.isSpelling=false;this.isHtml=false;this.rteReady=false;this.wantsFocus=false}WYSIWYG_Editor.prototype.setAllowAnchors=function(A){this.allowsAnchors=A};WYSIWYG_Editor.prototype.setModeToggle=function(A){this.allow_mode_toggle=A};WYSIWYG_Editor.prototype.setSpellCheck=function(A){this.allow_speller=A
};WYSIWYG_Editor.prototype.getFrameName=function(){return this.instance_name+"_WYSIWYG_Editor"};WYSIWYG_Editor.prototype.getFrameElement=function(){var A=window.document.getElementById(this.getFrameName());if(A==null){A=document.getElementbyId(this.wysiwyg_hidden)}return A};WYSIWYG_Editor.prototype.inHtmlMode=function(){return(this.viewMode==2)};WYSIWYG_Editor.prototype.getContentWindow=function(){var A=document.getElementById(this.wysiwyg_content);if(A==null){return null}else{return A.contentWindow}};WYSIWYG_Editor.prototype.getContent=function(){if(this.isSpelling){this.checkSpelling()}if(this.isHtml){this.toggleMode()}var A=this.getContentData();A=A.replace(/\n/g," ");A=this.replaceLinks(A);if(A.match(/^ *<br> *$/i)){A=""}return A};WYSIWYG_Editor.prototype.replaceLinks=function(A){if(!this.allowsAnchors){A=A.replace(/<A HREF=['"]HTTP:\/\/(.*?)['"]>(.*?)<\/A>/ig,"$2 ($1)");A=A.replace(/<A HREF=['"](.*?)['"]>(.*?)<\/A>/ig,"$2 ($1)");A=A.replace(/(.*?) \(\1\)/ig,"$1")}return A};WYSIWYG_Editor.prototype.getContentData=function(){var A=this.getContentWindow();if(A==null){return document.getElementById(this.wysiwyg_hidden).value}else{return A.document.body.innerHTML}};WYSIWYG_Editor.prototype.setContent=function(A){var B=this.getContentWindow();if(B==null){document.getElementById(this.wysiwyg_hidden).value=A}else{B.document.body.innerHTML=A}};function autoURLInsert(A){var C=A.keyCode?A.keyCode:A.which?A.which:A.charCode;if(C==34){var B=document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerHTML;alert(B)}}WYSIWYG_Editor.prototype.applySetupQuirk=function(){var A=this.getContentWindow().document;A.body.style.fontSize="16px"};WYSIWYG_Editor.prototype.checkPaste=function(A){var B=YAHOO.util.Event.getCharCode(A);setTimeout(delegateCallback(this,this.preparePasteText),800)};WYSIWYG_Editor.prototype.doPaste=function(){this.doTextFormat("paste","");this.preparePasteText()};WYSIWYG_Editor.prototype.preparePasteText=function(){var A=this.getContent();var B=false;if(this.isIE){B=A.match(/schemas-microsoft-com:office:office/i)}else{B=A.match(/<meta name="ProgId" content="Word.Document">/i)}A=A.replace(/<BR>/ig,"-BREAK-");A=A.replace(/<style>.*?<\/style>/ig,"");if(B){A=A.replace(/<o:p>&nbsp;<\/o:p>/g,"-BREAK-&nbsp;-BREAK-");A=A.replace(/<w:.*?>.*?<\/w:.*?>/ig,"")}else{A=A.replace(/<\/P>/ig,"-BREAK-")}A=A.replace(/<SPAN .*?font-weight: ?bold.*?>(.*?)<\/SPAN>/ig,"-B-$1-B-");A=A.replace(/<SPAN .*?font-style: ?italic.*?>(.*?)<\/SPAN>/ig,"-I-$1-I-");A=A.replace(/<I>(.*?)<\/I>/ig,"-I-$1-I-");A=A.replace(/<EM>(.*?)<\/EM>/ig,"-I-$1-I-");A=A.replace(/<STRONG>(.*?)<\/STRONG>/ig,"-B-$1-B-");A=A.replace(/<B>(.*?)<\/B>/ig,"-B-$1-B-");A=A.replace(/<LI>(.*?)<\/LI>/ig,"-LI-$1-LI-");A=A.replace(/<UL>(.*?)<\/UL>/ig,"-UL-$1-UL-");A=A.replace(/<OL>(.*?)<\/OL>/ig,"-OL-$1-OL-");A=A.replace(/<SUP>(.*?)<\/SUP>/ig,"-SUP-$1-SUP-");A=A.replace(/<A HREF=['"](.*?)['"]>(.*?)<\/A>/ig,"-A-$1-$2-A-");A=A.replace(/<\/?.*?>/g," ");A=A.replace(/-B-(.*?)-B-/g,"<B>$1</B>");A=A.replace(/-I-(.*?)-I-/g,"<I>$1</I>");A=A.replace(/-LI-(.*?)-LI-/g,"<LI>$1</LI>");A=A.replace(/-UL-(.*?)-UL-/g,"<UL>$1</UL>");A=A.replace(/-OL-(.*?)-OL-/g,"<OL>$1</OL>");A=A.replace(/-SUP-(.*?)-SUP-/g,"<SUP>$1</SUP>");A=A.replace(/-A-(.*?)-(.*?)-A-/g,"<A HREF='$1'>$2</A>");A=A.replace(/-BREAK-/g,"<BR>");A=A.replace(/<BR>\s*<BR>/ig,"<BR>");A=A.replace(/<BR>&nbsp;<BR>\s*$/ig,"");A=A.replace(/<BR>\s*$/ig,"");A=A.replace(/\n/g," ");this.setContent(A)};WYSIWYG_Editor.prototype.autoExpand=function(){var A=document.getElementById(this.wysiwyg_content);var B;if(this.isIE){B=A.contentWindow.document.body.scrollHeight}else{if(webBrowser.isSafari){B=A.contentWindow.document.body.scrollHeight}else{B=A.contentWindow.document.documentElement.clientHeight+20}}if(B>60&&(B-this.frame_height)>5){if(B>400){B=400}A.style.height=B+"px";this.frame_height=B}};WYSIWYG_Editor.prototype.display=function(){if(this.isSupported()){this._display_editor();var B=this.getContentWindow().document;B.open();B.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>');B.write('<body onload="document.body.rteLoaded = true;">');B.write(this.content);B.write("</body></html>");B.close();this.applySetupQuirk();if(this.isIE){B.onkeypress=rteKeyPress;window.wysiwyg_content=this.wysiwyg_content}var A=this;setTimeout(function(){YAHOO.util.Event.addListener(B,"keypress",A.autoExpand,A,true);YAHOO.util.Event.addListener(B.body,"paste",A.checkPaste,A,true);A.focus()},500)}else{this._display_textarea();this.content=this.content.replace(/<BR>/ig,"\n");this._load_content()}this.autoExpand();this.recount=0;this.activateDesignMode()};WYSIWYG_Editor.prototype.activateDesignMode=function(){var A=this.getContentWindow();if(A.document.body.rteLoaded){this.rteReady=true;A.document.designMode="On";if(this.wantsFocus){this.focusNow()}}else{this.recount++;if(this.recount>200){alert("Can't load RTE")}else{setTimeout(delegateCallback(this,this.activateDesignMode),50)}}};WYSIWYG_Editor.prototype.focus=function(){if(this.rteReady){this.focusNow()}else{this.wantsFocus=true}};WYSIWYG_Editor.prototype.focusNow=function(){var A=this;setTimeout(function(){var B=A.getContentWindow();window.focus();B.focus()},100)};function rteKeyPress(){var B=document.getElementById(window.wysiwyg_content).contentWindow;if(B.event.keyCode==13){var A=B.document.selection.createRange();B.event.returnValue=false;A.pasteHTML("<br>");A.select()}}WYSIWYG_Editor.prototype._display_textarea=function(){var A="";A+='<input type="hidden" name="editorMode" value="textarea">';A+='<textarea name="'+this.wysiwyg_hidden+'" id="'+this.wysiwyg_hidden+'" rows="'+this.ta_rows+'" cols="'+this.ta_cols+'"></textarea><br>';A+='<div style="font-size:10; padding: 3px;">(WARNING: Your browser does not support the Rich Text Editor.  Please use Firefox or Internet Explorer to edit text style and insert images.)</div>';this.editor_area.innerHTML=A};WYSIWYG_Editor.prototype._display_editor=function(){var A="";A+='<input type="hidden" name="editorMode" value="rte">';A+='   <table cellpadding="0" cellspacing="0" id="'+this.instance_name+'_table" class="editorArea">';A+="    <tr>";A+="     <td>";if(!this.minimal){A+='      <table onselectstart="return false" style="-moz-user-select:none" width="100%" border="0" cellspacing="0" cellpadding="0">';A+='       <tr valign="top">';A+='        <td height="25" valign="middle" colspan="2" id="'+this.instance_name+'_spellbar" style="display:none">';A+='        <table cellspacing="0" cellpadding="0" style="padding-left:20px"><tr><td>';A+='            Spelling Mistakes: <span id="mistakeCount"></span>';A+="        </td></tr></table>";A+="        </td>";A+='        <td valign="top" colspan="2" id="'+this.instance_name+'_toolbars"><nobr>';A+='          <img alt="Bold" title="Bold" class="editorButton imgbold" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+".doTextFormat('bold','')\">";A+='          <img alt="Italic" title="Italic" class="editorButton imgitalic" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+".doTextFormat('italic','')\">";A+='         <img class="editorSeparator" alt="| imgseparator" src="http://ui.geckogo.com/ui/media/spacer.gif">';A+='          <img alt="Ordered List" title="Ordered List" class="editorButton imgordlist" src="http://ui.geckogo.com/ui/media/spacer.gif"  onClick="'+this.instance_name+".doTextFormat('insertorderedlist','')\">";A+='          <img alt="Bulleted List" title="Bulleted List" class="editorButton imgbullist" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+".doTextFormat('insertunorderedlist','')\">";A+='          <img alt="Indent" title="Indent imgindent" src="http://ui.geckogo.com/ui/media/spacer.gif" class=editorButton onClick="'+this.instance_name+".doTextFormat('indent','')\">";A+='          <img alt="Outdent" title="Outdent imgoutdent" src="http://ui.geckogo.com/ui/media/spacer.gif" class=editorButton onClick="'+this.instance_name+".doTextFormat('outdent','')\">";A+='         <img class="editorSeparator" alt="| imgseparator" src="http://ui.geckogo.com/ui/media/spacer.gif">';if(this.allowsAnchors){A+='          <img alt="Hyperlink" title="Hyperlink" class="editorButton imglink" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+".doTextFormat('createlink','')\">"
}A+='          <img alt="Remove Formatting" title="Remove Formatting" class="editorButton imgunformat" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+".doTextFormat('removeformat','')\">";A+='         <img class="editorSeparator" alt="| imgseparator" src="http://ui.geckogo.com/ui/media/spacer.gif">';A+='          <img alt="Undo" title="Undo" class="editorButton imgundo" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+".doTextFormat('undo','')\">";A+='          <img alt="Redo" title="Redo" class="editorButton imgredo" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+".doTextFormat('redo','')\">";A+="        </nobr></td>";A+='<td id="'+this.instance_name+'_extra_controls" align="right">';if(this.allow_mode_toggle){A+='          <img id="htmlMode" alt="Toggle Mode" title="Toggle Mode" class="editorButton" src="http://ui.geckogo.com/ui/editor/images/editor-html.png" onClick="'+this.instance_name+'.toggleMode()">'}A+='<img id="checkSpelling" alt="Check Spelling" onclick="'+this.instance_name+'.checkSpelling()" class="editorButton imgeditor-spelling" src="http://ui.geckogo.com/ui/media/spacer.gif" </td>';A+='<td id="'+this.instance_name+'_extra_controls_spelling" style="display:none" align="right">';A+='Click to resume editing: <img id="checkSpelling" alt="Check Spelling" onclick="'+this.instance_name+'.checkSpelling()" class="editorButton imgeditor-spelling" src="http://ui.geckogo.com/ui/media/spacer.gif" </td>';if(this.allow_mode_toggle){A+='<td id="'+this.instance_name+'_extra_controls_mode" align="right" style="display:none">';A+='Click to return to normal view: <img id="htmlMode" alt="Toggle Mode" title="Toggle Mode" class="editorButton imgeditor-html" src="http://ui.geckogo.com/ui/media/spacer.gif" onClick="'+this.instance_name+'.toggleMode()">'}A+="     </tr></table>";A+='       <div id="matchList" style="position:absolute; display:none; background-color:#fff; padding: 5px; border: solid 1px #000; z-index:1000"></div>'}A+='      <iframe id="'+this.wysiwyg_content+'" name="'+this.wysiwyg_content+'" class="editorFrame" style="width:'+this.frame_width+"px; height:"+this.frame_height+'px;" frameborder="0"></iframe>';A+="     </td>";A+="    </tr>";A+="   </table>";this.editor_area.innerHTML=A};WYSIWYG_Editor.prototype.doTextFormat=function(D,A,E){if((D=="forecolor")||(D=="hilitecolor")){this.getPalette(D,A,E)}else{if(D=="createlink"){var C=prompt("Enter a URL:","");if(document.getElementById(this.wysiwyg_content).contentWindow.document.queryCommandEnabled(D)){document.getElementById(this.wysiwyg_content).contentWindow.document.execCommand("CreateLink",false,C);this.getContentWindow().focus();return true}else{return false}}else{if(D=="removeformat"){var B=this.getContentData();B=B.replace(/<\/p>/gi,"<br>");B=B.replace(/<br>/gi,"\n");B=B.replace(/<p .*?>/gi,"");B=B.replace(/<\/?.+?>/gi,"");B=B.replace(/\n/gi,"<br>");this.setContent(B)}if(document.getElementById(this.wysiwyg_content).contentWindow.document.queryCommandEnabled(D)){document.getElementById(this.wysiwyg_content).contentWindow.document.execCommand(D,false,A);this.getContentWindow().focus();return true}else{return false}}}};WYSIWYG_Editor.prototype._load_content=function(){document.getElementById(this.wysiwyg_hidden).value=this.content};WYSIWYG_Editor.prototype.toggleMode=function(){if(this.isMSIE()){this._toggle_mode_ie()}else{this._toggle_mode_gecko()}this.isHtml=!this.isHtml;var A=document.getElementById(this.instance_name+"_toolbars");if(A){if(this.isHtml){A.style.display="none";document.getElementById(this.instance_name+"_extra_controls").style.display="none";document.getElementById(this.instance_name+"_extra_controls_mode").style.display=""}else{A.style.display="";document.getElementById(this.instance_name+"_extra_controls").style.display="";document.getElementById(this.instance_name+"_extra_controls_mode").style.display="none"}}};WYSIWYG_Editor.prototype._toggle_mode_ie=function(){if(this.viewMode==2){document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerHTML=document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerText;document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontFamily="";document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontSize="";document.getElementById(this.instance_name+"_toolbars").style.display="";document.getElementById(this.wysiwyg_content).contentWindow.focus();this.applySetupQuirk();this.viewMode=1}else{document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerText=document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerHTML;document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontFamily="monospace";document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontSize="10pt";document.getElementById(this.wysiwyg_content).contentWindow.focus();this.viewMode=2}};WYSIWYG_Editor.prototype._toggle_mode_gecko=function(){if(this.viewMode==2){var A=document.getElementById(this.wysiwyg_content).contentWindow.document.body.ownerDocument.createRange();A.selectNodeContents(document.getElementById(this.wysiwyg_content).contentWindow.document.body);document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerHTML=A.toString();document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontFamily="";document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontSize="";document.getElementById(this.instance_name+"_toolbars").style.display="";document.getElementById(this.wysiwyg_content).contentWindow.focus();this.viewMode=1}else{var A=document.createTextNode(document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerHTML);document.getElementById(this.wysiwyg_content).contentWindow.document.body.innerHTML="";document.getElementById(this.wysiwyg_content).contentWindow.document.body.appendChild(A);document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontFamily="monospace";document.getElementById(this.wysiwyg_content).contentWindow.document.body.style.fontSize="10pt";document.getElementById(this.wysiwyg_content).contentWindow.focus();this.viewMode=2}};WYSIWYG_Editor.prototype.insertTable=function(){colstext=prompt("Enter the number of columns per row.");rowstext=prompt("Enter the number of rows to create.");rows=parseInt(rowstext,"0");cols=parseInt(colstext,"0");if(this.isMSIE()){return this._insert_table_ie(cols,rows)}else{return this._insert_table_gecko(cols,rows)}};WYSIWYG_Editor.prototype._insert_table_ie=function(D,B){document.getElementById(this.wysiwyg_content).contentWindow.focus();var E=document.getElementById(this.wysiwyg_content).contentWindow.document.selection.createRange();if((B>0)&&(D>0)){var A='<table border="'+this.table_border+'" cellpadding="'+this.table_cell_padding+'" cellspacing="'+this.table_cell_spacing+'">';while(B>0){B--;var C=D;A=A+"<tr>";while(parseInt(C)>0){C--;A=A+"<td>&nbsp;</td>"}A=A+"</tr>"}A=A+"</table>";E.pasteHTML(A);document.getElementById(this.wysiwyg_content).contentWindow.focus()}return true};WYSIWYG_Editor.prototype._insert_table_gecko=function(B,A){contentWin=document.getElementById(this.wysiwyg_content).contentWindow;if((A>0)&&(B>0)){table=contentWin.document.createElement("table");table.setAttribute("border",this.table_border);table.setAttribute("cellpadding",this.table_cell_padding);table.setAttribute("cellspacing",this.table_cell_spacing);tbody=contentWin.document.createElement("tbody");for(i=0;i<A;i++){tr=contentWin.document.createElement("tr");for(j=0;j<B;j++){td=contentWin.document.createElement("td");br=contentWin.document.createElement("br");td.appendChild(br);tr.appendChild(td)}tbody.appendChild(tr)}table.appendChild(tbody);this._insert_element_gecko(contentWin,table)}return true};WYSIWYG_Editor.prototype._insert_element_gecko=function(G,D){var B=G.getSelection();var F=B.getRangeAt(0);B.removeAllRanges();F.deleteContents();var A=F.startContainer;var K=F.startOffset;F=document.createRange();if(A.nodeType==3&&D.nodeType==3){A.insertData(K,D.nodeValue);
F.setEnd(A,K+D.length);F.setStart(A,K+D.length)}else{var C;if(A.nodeType==3){var E=A;A=E.parentNode;var L=E.nodeValue;var I=L.substr(0,K);var H=L.substr(K);var J=document.createTextNode(I);var C=document.createTextNode(H);A.insertBefore(C,E);A.insertBefore(D,C);A.insertBefore(J,D);A.removeChild(E)}else{C=A.childNodes[K];A.insertBefore(D,C)}}};WYSIWYG_Editor.prototype.setColor=function(A,C){if(typeof (pwin)=="object"){if(!pwin.closed){pwin.close()}}if(this.isMSIE()&&C=="hilitecolor"){C="backcolor"}var B=document.getElementById(this.wysiwyg_content).contentWindow.document.selection;if(B!=null){rng=B.createRange()}document.getElementById(this.wysiwyg_content).contentWindow.focus();if(document.getElementById(this.wysiwyg_content).contentWindow.document.queryCommandEnabled(C)){document.getElementById(this.wysiwyg_content).contentWindow.document.execCommand(C,false,A)}else{return false}document.getElementById(this.wysiwyg_content).contentWindow.focus();return true};WYSIWYG_Editor.prototype.getPalette=function(B,A,C){html=this._get_palette_html(B);if(typeof (pwin)=="object"){if(!pwin.closed){pwin.close()}}pwin=window.open("","colorPalette","dependent=yes, directories=no, fullscreen=no,hotkeys=no,height=125,width=192,left="+C.screenX+",top="+C.screenY+",locatoin=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no");pwin.document.write(html);pwin.document.close();pwin.focus()};WYSIWYG_Editor.prototype.isSupported=function(){return true};WYSIWYG_Editor.prototype.isMSIE=function(){return this.isIE};WYSIWYG_Editor.prototype._get_palette_html=function(D){s='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';s=s+"<html>";s=s+" <head>";s=s+'  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">';s=s+"  <title>Color Palette</title>";s=s+'  <style type="text/css">';s=s+"   <!--";s=s+"    html,body{margin: 0px; padding: 0px; color: black; background-color: white;}";s=s+"    td{border: black solid 1px;}";s=s+"    td:hover{border: white solid 1px;}";s=s+"   -->";s=s+"  </style>";s=s+" </head>";s=s+"";s=s+" <body>";s=s+'  <table border="0" cellpadding="0" cellspacing="2">';for(var C=0;C<7;C++){s=s+"   <tr>";for(var A=0;A<10;A++){var B=colors[C*10+A];s=s+'    <td id="c'+B+'" bgcolor="#'+B+'" width="15" height="15" onclick="str=this.id;color=str.replace(\'c\',\'#\');opener.'+this.instance_name+".setColor(color,'"+D+"');window.close();\"></td>"}}s=s+"  </table>";s=s+" </body>";s=s+"</html>";return s};var colors=new Array("FFFFFF","FFCCCC","FFCC99","FFFF99","FFFFCC","99FF99","99FFFF","CCFFFF","CCCCFF","FFCCFF","CCCCCC","FF6666","FF9966","FFFF66","FFFF33","66FF99","33FFFF","66FFFF","9999FF","FF99FF","C0C0C0","FF0000","FF9900","FFCC66","FFFF00","33FF33","66CCCC","33CCFF","6666CC","CC66CC","999999","CC0000","FF6600","FFCC33","FFCC00","33CC00","00CCCC","3366FF","6633FF","CC33CC","666666","990000","CC6600","CC9933","999900","009900","339999","3333FF","6600CC","993399","333333","660000","993300","996633","666600","006600","336666","000099","333399","663366","000000","330000","663300","663333","333300","003300","003333","000066","330099","330033");WYSIWYG_Editor.prototype.setMediaSelectHandler=function(A){this.mediaSelectHandler=A};WYSIWYG_Editor.prototype.setActivitySelectHandler=function(A){this.activitySelectHandler=A};WYSIWYG_Editor.prototype.insertMedia=function(){this.mediaSelectHandler();var A=document.getElementById(this.wysiwyg_content).contentWindow.document.selection;if(A!=null){rng=A.createRange()}};WYSIWYG_Editor.prototype.insertActivity=function(){this.activitySelectHandler();var A=document.getElementById(this.wysiwyg_content).contentWindow.document.selection;if(A!=null){rng=A.createRange()}};WYSIWYG_Editor.prototype.addMedia=function(B,C){var A=document.getElementById(this.wysiwyg_content).contentWindow;A.focus();if(this.viewMode==1){A.document.execCommand("insertimage",false,B)}};WYSIWYG_Editor.prototype.selectText=function(F){var E=document.getElementById(this.wysiwyg_content);var C=E.contentWindow;C.focus();if(C.document.selection!=null){var A=C.document.selection.createRange();if(A.text==""){A.text=activityName;A=C.document.body.createTextRange();A.findText(activityName);A.select()}}else{var D=C.getSelection();var B=D.getRangeAt(D.rangeCount-1);if(B==""){B.selectNode(C.document.body);D.addRange(B)}}};WYSIWYG_Editor.prototype.addActivity=function(A,H){var G=document.getElementById(this.wysiwyg_content);var D=G.contentWindow;D.focus();if(D.document.selection!=null){var B=D.document.selection.createRange();if(B.text==""){B.text=H;B=D.document.body.createTextRange();B.findText(H);B.select()}}else{var F=D.getSelection();var C=F.getRangeAt(F.rangeCount-1);if(C==""){C=C.cloneRange();var E=G.contentDocument.createTextNode(H);C.insertNode(E);C.selectNode(E);F.addRange(C)}}if(this.viewMode==1){D.document.execCommand("CreateLink",false,A)}if(D.document.selection!=null){var B=D.document.body.createTextRange();B.collapse(false);B.select()}else{var F=D.getSelection();F.collapseToEnd()}};WYSIWYG_Editor.prototype.insertHTML=function(G){var F=document.getElementById(this.wysiwyg_content);var C=F.contentWindow;C.focus();if(C.document.selection!=null){var A=C.document.selection.createRange();if(A.text==""){A.text="MAGIC_MARKER"}}else{var E=C.getSelection();var B=E.getRangeAt(E.rangeCount-1);if(B==""){B=B.cloneRange();var D=F.contentDocument.createTextNode("MAGIC_MARKER");B.insertNode(D);B.selectNode(D);E.addRange(B)}}if(C.document.selection!=null){var A=C.document.selection.createRange();A.collapse(false);body=C.document.body}else{var E=C.getSelection();E.collapseToEnd();body=F.contentDocument.body}body.innerHTML=body.innerHTML.replace(/MAGIC_MARKER/,G)};WYSIWYG_Editor.prototype.checkSpelling=function(){if(window.openSpellingCheck){this.isSpelling=!this.isSpelling;this.renderSpellMode();if(this.isSpelling){window.openSpellingCheck(this)}else{window.closeSpellingCheck(this)}}};WYSIWYG_Editor.prototype.renderSpellMode=function(){var A=document.getElementById(this.instance_name+"_toolbars");if(A){var B=document.getElementById(this.instance_name+"_spellbar");if(this.isSpelling){A.style.display="none";B.style.display="";document.getElementById(this.instance_name+"_extra_controls").style.display="none";document.getElementById(this.instance_name+"_extra_controls_spelling").style.display=""}else{A.style.display="";B.style.display="none";document.getElementById(this.instance_name+"_extra_controls").style.display="";document.getElementById(this.instance_name+"_extra_controls_spelling").style.display="none";this.getContentWindow().focus()}}};WYSIWYG_Editor.prototype.setMistakes=function(A,B){document.getElementById("mistakeCount").innerHTML=B};function Photo(N,A,M,F,G,C,O,D,B,K,I,E,H,J,L){this.caption=N;this.smallPath=M;this.mediumPath=F;this.largePath=G;this.thumbnail=A;this.id=C;this.tags=O;this.locationName=D;this.width=B;this.height=K;this.blog=I;this.dateAdded=E;this.dateTaken=H;this.guideId=J;this.guideName=L}function Blog(B,C,A){this.blogId=B;this.blogName=C;this.entries=A}function BlogEntry(A,B){this.entryId=A;this.entryName=B}var photoSlideshow=null;var currentSlideshowPhotoIndex=0;var memberPhotos=[];var candidPhotos=[];function openSlideshow(B){if(!B){B=currentSlideshowPhotoIndex}YAHOO.util.Event.addListener(window,"resize",resizeCallback);var A=candidPhotos.length>0?candidPhotos:memberPhotos;photoSlideshow=new PhotoSlideshow("PhotoSlideshowBody",A,60,0);photoSlideshow.startSlide(B)}function resizeCallback(){if(!photoSlideshow.isOpen()){return }var A=candidPhotos.length>0?candidPhotos:memberPhotos;photoSlideshow=new PhotoSlideshow("PhotoSlideshowBody",A,60,0);photoSlideshow.startSlide(currentSlideshowPhotoIndex)}function setCurrentSlideshowPhotoIndex(A){currentSlideshowPhotoIndex=A}var elem=null;var photos=[];var previousIndex;var maxThumbnails=9;var fixedHeight=0;var maxHeight=700;var maxWidth=500;var currentEndIndex=0;var currentStartIndex=0;var vpWidth;var infoGap=30;var overlayElem;PhotoSlideshow.prototype.open;
function PhotoSlideshow(B,D,C,A){this.open=false;elem=document.getElementById(B);photos=D;previousIndex=-1;photoSlideshow=this;vpWidth=getViewportWidth();overlayElem=document.getElementById("PhotoSlideshowOverlay");YAHOO.util.Dom.setStyle(overlayElem,"width",(vpWidth-A)+"px");vpWidth-=C;YAHOO.util.Dom.setStyle(elem,"width",vpWidth+"px");fixedHeight=Math.min(maxHeight,getViewportHeight()-250)}PhotoSlideshow.prototype.startSlide=function(B){this.open=true;YAHOO.util.Dom.setStyle("contentArea","opacity",0.3);B=B>photos.length?0:B;if(previousIndex>=0){YAHOO.util.Dom.setStyle("photo"+previousIndex,"border","none")}previousIndex=B;var A=photos[B];var C="";C+="<div class='clear_fix' style='width:100%'>";C+="<div class='logo'><a class='fake-link' onclick='closePhotoSlideShow(); return false;'><img src='http://ui.geckogo.com/ui/media/geckogo-gray-logo-black-bg.gif'></a></div>";C+="<div class='right'><a href='#' onclick='closePhotoSlideShow(); return false;'><img src='http://ui.geckogo.com/ui/media/close-gallery.gif'></a><span style='padding-left:6px; position:relative; bottom:6px'><a href='#' onclick='closePhotoSlideShow(); return false;' style='color:#888888; text-decoration:none'>CLOSE</a></span></div>";C+="</div>";C+="<div style='width:100%; margin:0 auto; text-align:center'>";C+="<div id='slideMainInfo' class='clear_fix' style='height:"+(fixedHeight)+"px; width:"+(maxThumbnails*70+275)+"px'>"+renderSlideImageInfo(B)+"</div>";C+="<div class='thumb-row clear_fix' id='slideShowThumbnails' style='width:"+(maxThumbnails*70+180)+"px'>"+renderSlideThumbnails(B)+"</div>";C+="<div id='slideSocialInfo' class='clear_fix'>"+renderSlideSocialInfo(B)+"</div>";C+="</div>";elem.innerHTML=C;overlayElem.style.display="";YAHOO.util.Dom.setXY(overlayElem,new Array(0,0));elem.style.display="";YAHOO.util.Dom.setXY(elem,new Array(0,0));scrollToTop();if(B==0||photos.length<maxThumbnails){document.getElementById("photoSlideLeftArrow").style.display="none";document.getElementById("photoSlideLeftArrowEmpty").style.display=""}if(B>photos.length-maxThumbnails||photos.length<maxThumbnails){document.getElementById("photoSlideRightArrow").style.display="none";document.getElementById("photoSlideRightArrowEmpty").style.display=""}};function getCommentsHtml(D,C,A){var B="<a name='info"+D+"'></a><div class='info-box' id='success"+D+"' style='display:none'>Woot! Your comment was posted successfully</div>";B+="<div id='input"+D+"' class='comment-area'>";B+="<div class='comment-header'>Leave a comment</div>";B+="<div class='comment-body'><textarea id='commentText"+D+"'></textarea></div>";B+="<div class='comment-buttons'>";B+="<button type='button' onclick=\"addComment("+D+", '"+C+"', this, commentAdded)\">Send</button>";B+="</div></div>";if(!A){A=""}B+="<div id='commentArea'>"+A+"</div>";return B}function commentAdded(A){var B=photos[previousIndex];if(B.commentHtml){B.commentHtml+=A}else{B.commentHtml=A}}PhotoSlideshow.prototype.isOpen=function(){return this.open};function showSlidePhoto(A){if(A<currentStartIndex){shiftSlideLeft(A);return }else{if(A>=currentEndIndex){shiftSlideRight(A);return }}if(previousIndex>=0){YAHOO.util.Dom.setStyle("photo"+previousIndex,"border","none")}YAHOO.util.Dom.setStyle("photo"+A,"border","2px solid #FFFFFF");previousIndex=A;document.getElementById("slideMainInfo").innerHTML=renderSlideImageInfo(A);document.getElementById("slideSocialInfo").innerHTML=renderSlideSocialInfo(A)}function renderSlideThumbnails(B){var F=Math.min(photos.length,B+maxThumbnails);currentStartIndex=photos.length>maxThumbnails?B:0;currentEndIndex=F;var D="";D+="<div class='left-arrow' id='photoSlideLeftArrow'><a href='#' onclick='shiftSlideLeft("+Math.max(0,B-maxThumbnails)+"); return false;'><img src='http://ui.geckogo.com/ui/media/slide-small-left.gif'></a></div>";D+="<div class='left-arrow' id='photoSlideLeftArrowEmpty' style='display:none'>&nbsp;</div>";D+="<div class='thumbnail-content'><div class='clear_fix' style='width:100%; text-align:center; margin:0 auto'>";for(var C=currentStartIndex;C<F;C++){var A=B==C?"thumbnail-selected":"thumbnail";var E=photos[C];D+="<div class='"+A+"' id='photo"+C+"'>";D+="<a href='#' onclick='showSlidePhoto("+C+"); return false;'><img src='"+E.thumbnail+"' width='60' height='60'></a>";D+="</div>"}D+="</div></div>";D+="<div class='right-arrow' id='photoSlideRightArrowEmpty' style='display:none'>&nbsp;</div>";D+="<div class='right-arrow' id='photoSlideRightArrow'><a href='#' onclick='shiftSlideRight("+Math.min(photos.length,B+maxThumbnails)+"); return false;'><img src='http://ui.geckogo.com/ui/media/slide-small-right.gif'></a></div>";return D}function closePhotoSlideShow(){this.open=false;photoSlideshow.open=false;overlayElem.style.display="none";elem.style.display="none";YAHOO.util.Dom.setStyle("contentArea","opacity",1)}function shiftSlideLeft(A){previousIndex=A;var B=renderSlideThumbnails(A);document.getElementById("slideShowThumbnails").innerHTML=B;if(A==0){document.getElementById("photoSlideLeftArrow").style.display="none";document.getElementById("photoSlideLeftArrowEmpty").style.display=""}document.getElementById("photoSlideRightArrow").style.display="";document.getElementById("photoSlideRightArrowEmpty").style.display="none";showSlidePhoto(A)}function shiftSlideRight(A){previousIndex=A;var B=renderSlideThumbnails(A);document.getElementById("slideShowThumbnails").innerHTML=B;document.getElementById("photoSlideLeftArrow").style.display="";document.getElementById("photoSlideLeftArrowEmpty").style.display="none";if(A>photos.length-maxThumbnails){document.getElementById("photoSlideRightArrow").style.display="none";document.getElementById("photoSlideRightArrowEmpty").style.display=""}showSlidePhoto(A)}function toggleSlideInfoBox(A){var B=A?"":"none";document.getElementById("slideInfoBox").style.display=B;if(A){var D=YAHOO.util.Dom.getXY("slideBigPhoto");var C=document.getElementById("bigImage").offsetWidth;D[0]+=(C/2)+124;D[1]+=(fixedHeight/2)-30;YAHOO.util.Dom.setXY("slideInfoBox",D)}}function displaySlideFullInfo(B){var A=photos[B];var C="";var D=A.caption?A.caption:"&nbsp;";C+="<div class='clear_fix' style='width:100%'>";C+="<div class='full-caption'>"+D+"</div>";C+="<div class='right'><a href='#' onclick='closeSlideFullInfo(); return false;'><img src='http://ui.geckogo.com/ui/media/close-gallery.gif'></a></div>";C+="</div>";if(A.locationName){C+="<div class='location'>"+A.locationName+"</div>"}if(A.dateAdded||A.dateTaken){C+="<div class='dates'>";if(A.dateTaken){C+="<div><span class='bold'>Date taken:</span> "+A.dateTaken+"</div>"}if(A.dateAdded){C+="<div><span class='bold'>Date added:</span> "+A.dateAdded+"</div>"}C+="</div>"}var E=YAHOO.util.Dom.getXY("bigImage");E[1]-=15;document.getElementById("slideFullInfo").innerHTML=C;document.getElementById("slideFullInfo").style.display="";YAHOO.util.Dom.setXY("slideFullInfo",E)}function closeSlideFullInfo(){document.getElementById("slideFullInfo").style.display="none"}function renderSlideSocialInfo(B){var A=photos[B];var C=getCommentsHtml(A.id,"media-comment",A.commentHtml);return C}function renderSlideImageInfo(F){var E="";var B=photos[F];setCurrentSlideshowPhotoIndex(F);var C=B.width,L=B.height;var I=null;var H=null;if(C>maxWidth&&L>fixedHeight){var K=Math.ceil(L/fixedHeight);I=fixedHeight;H=Math.floor(C/K);if(H>maxWidth){K=Math.ceil((C*1)/maxWidth);H=maxWidth;I=Math.floor((L*1)/K)}}else{if(L>fixedHeight){var J=Math.ceil((L*1)/fixedHeight);I=fixedHeight;H=Math.floor((C*1)/J)}else{if(C>maxWidth){var J=Math.ceil((C*1)/maxWidth);I=Math.floor((L*1)/J);H=maxWidth}else{H=C;I=L}}}if(!I){I=fixedHeight/2}var G="margin:"+((fixedHeight-I)/2)+"px 0px "+((fixedHeight-I)/2)+"px 0px";var A="width:"+maxWidth+"px; height:"+fixedHeight+"px; text-align:center";var M=B.caption?prepareText(B.caption,150):"&nbsp;";E+="<div style='width:100%'>"+M+"</div>";E+="<div class='big-img clear_fix' id='slideBigPhoto' style='width:100%'>";E+="<div id='slideInfoBox' style='display:none; position:absolute; z-index:95'><a href='#' onclick='displaySlideFullInfo("+F+"); return false;'><img src='http://ui.geckogo.com/ui/media/MoreInfoGalleryButton.png' onmouseover='this.parentNode.parentNode.style.display=\"\";'></a></div>";
var D="padding-top:"+((fixedHeight/2)-100)+"px";if(F!=0){E+="<div style='"+D+"' class='left-large-arrow' id='photoSlideLargeLeftArrow'><a herf='#' onclick='showSlidePhoto("+(F-1)+"); return false;'><img style='cursor:pointer' src='http://ui.geckogo.com/ui/media/slide-large-left.gif'></a></div>"}else{E+="<div class='left-large-arrow'>&nbsp;</div>"}E+="<div class='left' style='"+A+"' id='bigImage'><img style='"+G+"' height='"+I+"' onmouseover='toggleSlideInfoBox(true)' onmouseout='toggleSlideInfoBox(false)' src='"+B.largePath+"'></div>";if(F!=photos.length-1){E+="<div style='"+D+"' class='right-large-arrow' id='photoSlideLargeRightArrow'><a herf='#' onclick='showSlidePhoto("+(F+1)+"); return false;'><img style='cursor:pointer' src='http://ui.geckogo.com/ui/media/slide-large-right.gif'></a></div>"}else{E+="<div class='right-large-arrow'>&nbsp;</div>"}E+="</div>";E+="<div class='full-info' id='slideFullInfo' style='display:none; width:"+(maxWidth-infoGap)+"px'></div>";return E}var photoUploaderPopup=null;function uploadPhoto(A){return new PhotoUpload({uploadCallback:A})}function PhotoUpload(A){this.uploadCallback=A.uploadCallback;this.cancelCallback=A.cancelCallback;this.selectPlace=A.selectPlace;this.placeRequired=A.placeRequired;this.contest=A.contest;this.inlineMode=A.inlineMode;if(photoUploaderPopup){return }if(A.cancelButtonText){$("cancelPhotoUpload").innerHTML="<span>"+A.cancelButtonText+"</span>"}this.PHOTOS_SERVICE_URL="/services/Photos";if(window.WIDGET_MODE){this.PHOTOS_SERVICE_URL+=".php"}var B=document.getElementById("addPhotoArea");if(this.inlineMode){B.style.display="block"}else{photoUploaderPopup=makePopup(B,"Add Some Photos...")}YAHOO.util.Event.addListener("submitPhotoUpload","click",this.submitPhotoUpload,this,true);YAHOO.util.Event.addListener("cancelPhotoUpload","click",this.cancelPhotoUpload,this,true);YAHOO.util.Event.addListener("cancelPhotoUpload2","click",this.cancelPhotoUpload,this,true);var C=document.postForm;var D=this;if(this.selectPlace){$("photoGuideArea").style.display="";this.photoGuideSelector=new GuideSelector(C.guide,C.guideName,"suggestedGuideAreaDisc",null,function(){D.displayListingBox()})}if(this.contest){$("contestArea").style.display=""}return this}PhotoUpload.prototype.displayListingBox=function(){var A=document.postForm;if(!this.photoListingSelector){$("photoListingArea").style.display="";this.photoListingSelector=new ListingSelector(A.listing,A.listingName,"suggestedListingAreaDisc","",function(){})}this.photoListingSelector.updateLocation(A.guide.value)};PhotoUpload.prototype.cancelPhotoUpload=function(){if(photoUploaderPopup){closePopup(photoUploaderPopup)}photoUploaderPopup=null;if(this.cancelCallback){this.cancelCallback()}};PhotoUpload.prototype.submitPhotoUpload=function(A){if(this.selectPlace&&this.placeRequired&&document.postForm.guide.value==""){this.showError("Please select a city, region, or country.");return }if(this.contest&&getRadioValue(document.postForm.category)==""){this.showError("Please select a category to enter the contest.");return }var B=this;requireActiveUser(function(){var C=document.getElementById("uploadPhotoControls");startSpinner(C);B.submitPhotoUploadNow(A)},"Please login or sign-up to edit this item.")};PhotoUpload.prototype.showError=function(A){$("photoErrors").innerHTML=A;$("photoErrors").style.display="block"};PhotoUpload.prototype.submitPhotoUploadNow=function(A){YAHOO.util.Event.stopEvent(A);var C=this;var B=document.postForm;YAHOO.util.Connect.setForm(B,true);YAHOO.util.Connect.asyncRequest("POST",this.PHOTOS_SERVICE_URL,{upload:function(E){var F=E.responseText;F=F.replace(/<\/?.*?>/g,"");var D=JSON.parse(F);endSpinner();if(D.error=="MISSING_PHOTO"){C.showError("Please select a photo to upload.");return }else{if(D.error){C.showError("Please select a photo to upload.");return }}if(C.uploadCallback){C.uploadCallback(D.id)}else{doReload()}}})};var swfu;switchStandardUpload=function(A){document.getElementById("singleUploadArea").style.display="";document.getElementById("multiUploadArea").style.display="none"};function initUploadMany(){var F="";var D=document.postForm;var C=D.guide.value;if(C){F+="&guide="+C}var E=D.listing.value;if(E){F+="&listing="+E}var B=D.blogEntry.value;if(B){F+="&blogEntry="+B}var A=getUserId();if(A){F+="&userId="+A}swfu=new SWFUpload({debug:false,file_size_limit:"30 MB",flash_url:"/ui/SWFUpload/swfupload.swf",upload_url:"/services/Photos?event=upload"+F,button_placeholder_id:"selectFiles",button_width:94,button_height:21,button_image_url:"http://ui.geckogo.com/ui/SWFUpload/select-files.png",button_action:SWFUpload.BUTTON_ACTION.SELECT_FILES,button_disable:false,file_types:"*.jpg;*.jpeg;*.png;*.gif",file_queued_handler:fileQueuedHandler,file_dialog_complete_handler:fileDialogComplete,upload_progress_handler:uploadProgressHandler,upload_error_handler:uploadErrorHandler,upload_complete_handler:uploadFileCompleteHandler})}function fileDialogComplete(A,C){try{if(C>0){document.getElementById("uploadList").style.visibility="visible";swfu.startUpload()}}catch(B){this.debug(B)}}function fileQueuedHandler(B,A){var D=document.getElementById("uploadList");var C=document.createElement("span");D.appendChild(C);C.innerHTML="<span class='queue-name'>"+B.name+"&nbsp;</span> <a id='"+B.id+"deletebtn' class='cancel-button' href='#' onclick='cancelFile(\""+B.id+"\");return false'><img src='http://ui.geckogo.com/ui/media/delete-plan.png'></a> &nbsp; &nbsp;";C.id=B.id;document.getElementById("uploadStatus").style.visibility="visible"}function uploadFileCompleteHandler(){if(swfu.getStats().files_queued>0){var A=document.getElementById(lastFile);A.parentNode.removeChild(A);swfu.startUpload()}else{document.getElementById("uploadList").innerHTML="";document.getElementById("uploadList").style.visibility="hidden";document.getElementById("uploadStatus").style.visibility="hidden";closePopup(photoUploaderPopup);photoUploaderPopup=null}}function uploadProgressHandler(C,E,A){lastFile=C.id;var D=E/A;var B=document.getElementById("statusBar");B.style.backgroundColor="#ffbb00";B.style.cssFloat="left";B.style.height="15px";B.style.width=(D*300)+"px"}function uploadErrorHandler(B,A,C){alert(B+", "+A.name+", "+C)}function cancelFile(B){var A=document.getElementById(B);A.parentNode.removeChild(A);swfu.cancelUpload(B)}function CancelUpload(){}var SLIDESHOW_SIZE=320;function slideshowSetup(){SITE_BASE_URL="";PHOTOS_SERVICE_URL="/services/Photos";if(window.WIDGET_MODE){SITE_BASE_URL=geckoHome;PHOTOS_SERVICE_URL+=".php"}}function Slideshow(B,D,A){window.slideshow=this;slideshowSetup();this.area=D;this.queryUrl=B;this.itemIndex=0;this.results=new Array();this.showName=(A.showName)?A.showName:false;this.showLocation=(A.showLocation)?A.showLocation:false;this.showCaption=(A.showCaption)?A.showCaption:false;this.showFlag=(A.showFlag)?A.showFlag:false;this.showUpload=(A.showUpload)?A.showUpload:false;this.showCredit=(A.showCredit)?A.showCredit:false;this.showMakeCover=(A.showMakeCover)?A.showMakeCover:false;this.showInfoOnMouseOver=(A.showInfoOnMouseOver)?A.showInfoOnMouseOver:false;this.randomize=(A.randomize)?A.randomize:false;this.onEmptyResults=A.onEmptyResults;if(B&&D){var C=document.postForm;if(this.queryUrl.match(/guide=(\d+)/)){C.guide.value=RegExp.$1}if(this.queryUrl.match(/listing=(\d+)/)){C.listing.value=RegExp.$1}this.loadData()}}Slideshow.prototype.renderFrame=function(I,G,F,H){var E="<div class='slideshow-main'>";E+="<div class='slideshow-image'><img src='"+I.image+"' width='320' height='320'></div>";E+="<div class='slideshow-box-controls'>";if(G>0){E+="   <div class='pager-box' onclick='navSlideshowLeft()'>&lt;</div>"}else{E+="<div class='pager-box'></div>"}var B=5*Math.floor(G/5);for(var D=B;D<Math.min(B+5,F);D++){var A=(D==G)?"selected":"";E+="   <div class='pager-box "+A+"' onclick='navSlideshowIndex("+D+")'>"+(D+1)+"</div>"}if(G<F-1){E+="   <div class='pager-box' onclick='navSlideshowRight()'>&gt;</div>"}else{E+="<div class='pager-box'></div>"}if(this.showUpload){E+="<div class='photo-upload-box' onclick='uploadPhoto()'></div>"}E+="</div>";var C=(this.showInfoOnMouseOver)?"none":"block";
E+="<div class='slideshow-popup' style='display:"+C+"'>";E+=this.getInfo(I,H);E+="</div>";E+="</div>";E+="</div>";E+="<div class='slideshow-extra-controls'>";if(this.showMakeCover){E+="<div class='slideshow-make-cover'><a href='#' onclick='return false' title='Make Cover'>Make cover</a></div>"}E+="</div>";return E};Slideshow.prototype.loadData=function(){var B=this;var A=this.queryUrl;YAHOO.util.Connect.asyncRequest("GET",A,{success:B.processResults,failure:function(C){},scope:B})};Slideshow.prototype.processResults=function(A){try{var C=JSON.parse(A.responseText);bbox=C.boundaries;this.results=C.results;if(this.results.length==0){if(this.onEmptyResults){this.onEmptyResults()}else{this.area.innerHTML="<div style='slideshow-none-available'>No photos available</div><div>Be first to upload a photo.  <div class='link' onclick='uploadPhoto()'>Upload Photo</div></div>"}return }if(this.randomize){this.results.sort(function(G,F){return 0.5-Math.random()})}memberPhotos=[];for(var D=0;D<this.results.length;D++){var B=this.results[D];memberPhotos.push(new Photo(B.caption,B.squareThumb,null,null,B.largePath,B.id,null,B.location,parseInt(B.width),parseInt(B.height),null,B.dateAdded,B.dateTaken))}this.renderItem()}catch(E){alert(E)}};Slideshow.prototype.renderItem=function(){var C=this.results[this.itemIndex];var A=(C.canRate=="true"||window.WIDGET_MODE);this.area.innerHTML=this.renderFrame(C,this.itemIndex,this.results.length,A);this.infoPopup=getFirstElementByClassName("slideshow-popup",this.area);this.setupInfo(C,A);if(this.showInfoOnMouseOver){var D=getFirstElementByClassName("slideshow-image",this.area);YAHOO.util.Event.addListener(D,"mouseover",this.showInfo,this,true);YAHOO.util.Event.addListener(D,"mouseout",this.hideInfo,this,true);YAHOO.util.Event.addListener(this.infoPopup,"mouseover",this.showInfo,this,true);YAHOO.util.Event.addListener(this.infoPopup,"mouseout",this.hideInfo,this,true)}if(this.showMakeCover){var B=getFirstElementByClassName("slideshow-make-cover",this.area);YAHOO.util.Event.addListener(B,"click",this.makeCoverPhoto,this,true)}};Slideshow.prototype.setupInfo=function(E,D){if(D){this.photoRating=new StarRating(E.userRating,5,"stars/rating-star-photo",14,14);var C=getFirstElementByClassName("photo-rating",this.area);this.photoRating.renderSelector(C);var B=getFirstElementByClassName("rate-photo-button",this.area);YAHOO.util.Event.addListener(B,"click",this.ratePhoto,this,true)}if(!E.userFlagged){var A=getFirstElementByClassName("flag-photo-button",this.area);YAHOO.util.Event.addListener(A,"click",this.flagPhoto,this,true)}};function navSlideshowLeft(){slideshow.moveLeft()}function navSlideshowRight(){slideshow.moveRight()}function navSlideshowIndex(A){slideshow.moveIndex(A)}Slideshow.prototype.moveIndex=function(A){if(A>=0&&A<this.results.length){this.itemIndex=A;this.renderItem()}};Slideshow.prototype.moveLeft=function(A){if(this.itemIndex-1>=0){this.itemIndex--;this.renderItem()}};Slideshow.prototype.moveRight=function(A){if(this.itemIndex+1<this.results.length){this.itemIndex++;this.renderItem()}};Slideshow.prototype.getInfo=function(B,A){var D=(B.url)?"onclick='slideshowClicked(\""+B.url+"\")'":"";var E="";E+="<div class='slideshow-box-info-bg'></div>";E+="<div class='slideshow-box-info clear_fix' "+D+"><div class='slideshow-name-info'>";if(this.showCaption){var C="";if(B.caption){C=B.caption;if(C.length>35){C=C.substring(0,35)+"..."}C="&quot;"+C+"&quot;"}E+="   <div class='slideshow-caption'>"+C+"</div>"}if(this.showName){E+="   <div class='slideshow-name'>"+B.name+"</div>"}if(this.showLocation){E+="   <div class='slideshow-guide-name'>"+B.guideName+"</div>"}if(this.showCredit&&B.userName){if(window.WIDGET_MODE){E+="<div class='slideshow-author'>By: "+B.userName+"</div>"}else{E+="<div class='slideshow-author'>By: <a target='_top' href='"+B.userLink+"'>"+B.userName+"</a></div>"}}E+="</div><div class='slideshow-rating-info'>";E+="   <div class='slideshow-rating'>"+new StarRating(B.rating,5,"stars/rating-star-photo",14,14).getHtml()+"</div>";var F=(B.reviewCount==1)?"1 review":B.reviewCount+" reviews";E+="   <div class='slideshow-reviews'>"+F+"</div>";E+="</div>";if(A){E+="<div class='slideshow-rating-controls'><div class='rating-label'>Rate this photo:</div><div class='photo-rating'></div><div class='link rate-photo-button'>Save</a></div></div>"}if(this.showFlag){if(B.userFlagged){E+="<div class='slideshow-flag'>Photo Flagged</div>"}else{E+="<div class='slideshow-flag flag-photo-button link' title='Flag inappropriate or irrelevant photos'>Flag</div>"}}E+="</div>";return E};Slideshow.prototype.showInfo=function(){this.cancelHide=true;if(this.infoPopupShown){return }var A=this.results[this.itemIndex];if(!A){return }this.infoPopupShown=true;this.infoPopup.style.display="block"};Slideshow.prototype.hideInfo=function(){this.cancelHide=false;setTimeout(delegateCallback(this,this.hideInfoSoon),300)};Slideshow.prototype.hideInfoSoon=function(){if(!this.cancelHide){this.infoPopup.style.display="none";this.infoPopupShown=false}};Slideshow.prototype.flagPhoto=function(){var B=this.results[this.itemIndex];var D="event=flagPhoto";if(B.id!=null){D+="&media="+B.id}var A=null;if(B.flickrId!=null){A=B.flickrId}else{if(B.flickr_id!=null){A=B.flickr_id}}if(A!=null){D+="&flickr_id="+A;if(document.form.guide!=null){D+="&guide="+document.form.guide.value}if(document.form.item!=null){D+="&listing="+document.form.item.value}}B.userFlagged=true;var C=this;D+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",PHOTOS_SERVICE_URL,{success:C.flagHandler,failure:function(E){},scope:C},D)};Slideshow.prototype.flagHandler=function(){var A=getFirstElementByClassName("slideshow-flag",this.area);A.style.display="none";this.infoPopupShown=false};Slideshow.prototype.ratePhoto=function(){var A=this.results[this.itemIndex];var C="event=ratePhoto";if(A.id!=null){C+="&media="+A.id}if(A.flickr_id!=null){C+="&flickr_id="+A.flickr_id;if(document.form.guide!=null){C+="&guide="+document.form.guide.value}if(document.form.item!=null){C+="&listing="+document.form.item.value}}rating=this.photoRating.getRating();C+="&rating="+rating;A.userRating=rating;var B=this;C+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",PHOTOS_SERVICE_URL,{success:B.ratingHandler,failure:function(D){},scope:B},C)};Slideshow.prototype.ratingHandler=function(){var A=getFirstElementByClassName("slideshow-rating-controls",this.area);A.style.display="none"};Slideshow.prototype.makeCoverPhoto=function(){var A=this.results[this.itemIndex];var C="event=makeCoverPhoto";if(A.id!=null){C+="&media="+A.id}if(document.form.guide){C+="&guide="+document.form.guide.value}if(document.form.listing){C+="&listing="+document.form.listing.value}if(A.flickr_id){C+="&flickr_id="+A.flickr_id}var B=this;C+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",PHOTOS_SERVICE_URL,{success:B.makeCoverPhotoHandler,scope:B},C)};Slideshow.prototype.makeCoverPhotoHandler=function(){alert("new cover applied!")};function viewAsSlideshow(){slideshow.viewAsSlideshow()}Slideshow.prototype.viewAsSlideshow=function(){if($("photoImage").src.indexOf("blank.gif")>0){return }openSlideshow(this.itemIndex)};function slideshowClicked(A){window.location=A}var slideshow;var map;var editorArea;var rteAdd,rteEdit;YAHOO.util.Event.onDOMReady(initBlog);function initBlog(){if(window.isBlog){initBlogPage()}else{initBlogPost()}}function initBlogPost(){var A=document.getElementById("rteArea");rteAdd=new WYSIWYG_Editor("rteAdd",A,"","http://ui.geckogo.com/ui/editor",400,150);rteAdd.setModeToggle(hasUserPriv());rteAdd.setAllowAnchors(hasUserPriv());rteAdd.display();var B=document.postBlogForm;guideSelector=new GuideSelector(B.guide,B.guideName,"guideOptionArea");blogSelected();initUploadManyPostUpdate()}function initBlogPage(){renderMap();renderPhotos();var B=document.getElementById("addBlogEntry");if(B){initBlogPost()}var A=document.body.getElementsByClassName("blog-entry");if(!document.form.thisBlog.value||A.length==0){togglePostUpdate()}}function renderMap(){if(!map){if(window.GBrowserIsCompatible&&GBrowserIsCompatible()){map=new DynamicMap("map");
var E;var I;var H=document.form.geo.value.split(",");if(H.length<2){E=20;I=0;Q=1}else{E=parseFloat(H[0]);I=parseFloat(H[1]);Q=10}map.setCenter(new GLatLng(E,I),Q);var B=E,D=I,G=E,J=I;var P=[];var M=Math.floor(H.length/2);for(var C=0;C<M;C++){var K=parseFloat(H[2*C]);var L=parseFloat(H[2*C+1]);var O=new GLatLng(K,L);P.push(O);var F=new NumericMarker(O,(M-C),"poi-icon-2");map.addOverlay(F);if(K<B){B=K}if(K>G){G=K}if(L<D){D=L}if(L>J){J=L}}if(M>=2){var N=new GLatLng(B,D);var A=new GLatLng(G,J);var Q=map.getBoundsZoomLevel(new GLatLngBounds(N,A));var K=(B+G)/2;var L=(D+J)/2;map.setCenter(new GLatLng(K,L),Q);map.addOverlay(new GPolyline(P))}}}}function renderPhotos(){if(!slideshow){initSlideshow()}}function initSlideshow(){var B=document.getElementById("slideshowArea");var A="/services/Photos?event=getList&blog="+document.form.thisBlog.value;slideshow=new Slideshow(A,B,{showCaption:true,showUpload:(document.form.owner.value=="true"),showFlag:true,showInfoOnMouseOver:true,onEmptyResults:function(){}})}window.onunload=function cleanup(){if(window.GUnload){GUnload()}};function openEditor(){if(editorArea){saveEditor()}if(!editorArea){editorArea=document.createElement("div");editorArea.style.clear="both";var F=$("textArea");F.parentNode.insertBefore(editorArea,F);F.style.display="none";var C="";C+="<div>Title:<input type='text' name='name' size='50'></div>";C+="<div>Location:<input type='hidden' name='guide'><input type='text' name='guideName' size='30'></div>";C+="<div>Date: </span><input type='text' id='date' name='date' size='8'>";C+='<a href="javascript:openCalendar(\'date\')">&nbsp;<img style="vertical-align:-4px" src="http://ui.geckogo.com/ui/media/calendar.png"></a>';C+="</div><div style='padding-top:5px' id='rteEditArea'></div>";C+="<div style='padding:5px'><a class='main-button' href='javascript:saveEditor()'><span>Save</span></a><a class='main-button' href='javascript:closeEditor()'><span>Cancel</span></a></div>";editorArea.innerHTML=C;oldName=$("entryName").innerHTML;document.form.name.value=oldName;var B=$("infoTitle").innerHTML;if(B.match(/in <a.*?>(.*?)<\/a>/)){guide=RegExp.$1;document.form.guideName.value=guide}document.getElementById("date").value=document.form.entryDate.value;var A=YAHOO.util.Dom.get("rteEditArea");rteEdit=new WYSIWYG_Editor("rteEdit",A,$("textContent").innerHTML,"http://ui.geckogo.com/ui/editor",400,150);rteEdit.setModeToggle(hasUserPriv());rteEdit.setAllowAnchors(hasUserPriv());rteEdit.display();var G=YAHOO.util.Dom.getY(editorArea);var E=YAHOO.util.Dom.getDocumentScrollTop();var D=YAHOO.util.Dom.getClientHeight();if(G<E||G>(E+D)){window.scrollTo(0,G)}editGuideSelector=new GuideSelector(document.form.guide,document.form.guideName,"sectionGuideOptionArea")}}function openCalendar(A){var B=document.getElementById("blogCalContainer");B.style.display="";var D=YAHOO.util.Dom.getXY(A);D[1]+=5;YAHOO.util.Dom.setXY(B,D);var C=new YAHOO.widget.Calendar("cal","blogCalContainer",{title:"Select a date:",close:true,navigator:true});C.render();C.selectEvent.subscribe(function(F,G){var H=G[0].toString().split(",");var E=H[0].substring(2);H=H[1]+"/"+H[2]+"/"+E;C.hide();document.getElementById(A).value=H})}function saveEditor(){var C=rteEdit.getContent();var B="event=save&item="+document.form.entryId.value;B+="&name="+encode(document.form.name.value);B+="&text="+encode(C);B+="&date="+encode(document.form.date.value);B+="&guide="+document.form.guide.value;YAHOO.util.Connect.asyncRequest("POST","/Blogs/",saveEditorHandler,B);$("entryName").innerHTML=document.form.name.value;var A="";if(document.form.guideName.value){A+=" (in "+document.form.guideName.value+")"}$("infoTitle").innerHTML=A;$("textContent").innerHTML=C}var saveEditorHandler={success:function(A){closeEditor();var B=(oldName!=document.form.name.value);if(B){window.location="/Blogs?entry="+document.form.entryId.value}},failure:function(A){alert("Your changes could not be saved.  Please try again.  If the problem continues, we may be experiencing technical difficulties.  Please save your work and add it later.")}};function renameBlog(B){var A=prompt("Please enter a new name for this blog:");if(A){var C=document.postBlogForm.blog.value;var D="event=rename&blog="+C+"&name="+encode(A);YAHOO.util.Connect.asyncRequest("POST","/Blogs/",renameBlogHandler,D)}}var renameBlogHandler={success:function(A){window.top.location="/Blogs?blog="+document.postBlogForm.blog.value},failure:function(A){}};function deleteBlog(A){if(confirm("Are you sure you want to delete this blog?")){var B=document.postBlogForm.blog.value;var C="event=delete&item="+B;YAHOO.util.Connect.asyncRequest("POST","/Blogs/",deleteBlogHandler,C)}}var deleteBlogHandler={success:function(A){window.top.location="/Blogs?user="+getUserId()},failure:function(A){}};function addPhotos(A,B){document.postForm.blogEntry.value=B;uploadPhoto()}function deleteEntry(A,C){if(confirm("Are you sure you want to delete this entry?")){var B="event=delete&item="+C;YAHOO.util.Connect.asyncRequest("POST","/Blogs/",deleteHandler,B)}}var deleteHandler={success:function(A){window.top.location="/Blogs?blog="+document.postBlogForm.blog.value},failure:function(A){}};function closeEditor(){$("textArea").style.display="";editorArea.parentNode.removeChild(editorArea);editorArea=null}function postUpdate(G){var B=document.postBlogForm;var I=B.blog.value;if(I==""){var F=B.blogName.value;if(F==""||F.indexOf("<")==0){alert("Please set a name for your new blog.");return }}startSpinner(G);var J=rteAdd.getContent();var A=B.name.value;var C=B.guide.value;var D=B.postDate.value;var H=B.sendUpdates.checked;var E="event=postUpdate&blog="+I+"&blogName="+encode(F)+"&guide="+C+"&text="+encode(J)+"&date="+encode(D)+"&name="+encode(A)+"&sendUpdates="+H;YAHOO.util.Connect.asyncRequest("POST","/Blogs/",postUpdateHandler,E)}var postUpdateHandler={success:function(B){var A=JSON.parse(B.responseText);thisBlog=A.blog;var D=A.blogEntry;var E="&blogEntry="+D;var C=getUserId();if(C){E+="&userId="+C}if(swfuPostUpdate.getStats().files_queued==0){window.location="/Blogs?blog="+thisBlog}else{swfuPostUpdate.setUploadURL("/services/Photos?event=upload"+E);swfuPostUpdate.startUpload()}},failure:function(A){alert("Your changes could not be saved.  Please try again.  If the problem continues, we may be experiencing technical difficulties.  Please save your work and add it later.")}};function blogSelected(){var A=document.postBlogForm.blog.value;if(A==""){document.getElementById("blogName").style.display=""}else{document.getElementById("blogName").style.display="none"}}var postAreaOpen=false;function togglePostUpdate(){var A=document.getElementById("postUpdateArea");postAreaOpen=!postAreaOpen;if(postAreaOpen){A.style.display=""}}var swfuPostUpdate;function initUploadManyPostUpdate(){swfuPostUpdate=new SWFUpload({debug:false,file_size_limit:"30 MB",flash_url:"/ui/SWFUpload/swfupload.swf",button_placeholder_id:"selectFilesPost",button_width:94,button_height:21,button_image_url:"http://ui.geckogo.com/ui/SWFUpload/select-files.png",button_action:SWFUpload.BUTTON_ACTION.SELECT_FILES,button_disable:false,file_queued_handler:fileQueuedHandlerPostUpdate,upload_progress_handler:uploadProgressHandlerPostUpdate,upload_error_handler:uploadErrorHandlerPostUpdate,upload_complete_handler:uploadFileCompleteHandlerPostUpdate})}function fileQueuedHandlerPostUpdate(B,A){var D=document.getElementById("uploadListPostUpdate");var C=document.createElement("span");D.appendChild(C);C.innerHTML="<span class='queue-name'>"+B.name+"&nbsp;</span> <a id='"+B.id+"deletebtn' class='cancel-button' href='#' onclick='cancelFilePostUpdate(\""+B.id+"\");return false'><img src='http://ui.geckogo.com/ui/media/delete-plan.png'></a> &nbsp; &nbsp;";C.id=B.id}function uploadFileCompleteHandlerPostUpdate(){if(swfuPostUpdate.getStats().files_queued>0){var A=document.getElementById(lastFile);A.parentNode.removeChild(A);swfuPostUpdate.startUpload()}else{document.getElementById("uploadListPostUpdate").innerHTML="";window.location="/Blogs?blog="+thisBlog}}function uploadProgressHandlerPostUpdate(C,E,A){lastFile=C.id;document.getElementById("uploadStatusPostUpdate").style.display="";
var D=E/A;var B=document.getElementById("statusBarPostUpdate");B.style.backgroundColor="#ffbb00";B.style.cssFloat="left";B.style.height="15px";B.style.width=(D*300)+"px"}function uploadErrorHandlerPostUpdate(B,A,C){}function cancelFilePostUpdate(B){var A=document.getElementById(B);A.parentNode.removeChild(A);swfuPostUpdate.cancelUpload(B)}var bookingPage="blogs";YAHOO.util.Event.onAvailable("bookingWidgetLodging",function(){new BookingWidget("bookingWidgetLodging",bookingCityName,bookingPage+"-side","calendar-travelers")});YAHOO.util.Event.onAvailable("bookingWidgetCombo",function(){var A="";if(!window.destAirport){destAirport=""}if(originAirports){A=originAirports.split(/,/)[0]}new BookingWidget("bookingWidgetCombo",bookingCityName,bookingPage+"-sideCombo","combo",A,destAirport)});YAHOO.util.Event.onContentReady("sideDealArea",function(){new BookingDeals("sideDealArea",bookingCityName,bookingGuideId,bookingPage+"-side","combined")});function showEmailShare(){var A="Share your blog.  Enter your friends' email addresses:<br>";A+="<form name='shareForm'><textarea rows='5' cols='40' name='emails'></textarea><br>";A+="<button type='button' onclick='shareEmails()'>Share</button><button type='button' onclick='closeEmailShare()'>Cancel</button></form><div id='popupError' class='error' style='margin-top:10px; display:none'></div>";makePopup(A,"Share your blog with friends!")}function shareEmails(){var B=document.shareForm.emails.value;if(!B){$("popupError").innerHTML="Please enter at least one email address.";$("popupError").style.display="";return }var A="/services/Contacts?event=sendBlogInvites&blog="+document.form.thisBlog.value;A+="&emails="+encode(B);YAHOO.util.Connect.asyncRequest("GET",A,{success:function(C){closeEmailShare()},failure:function(C){}})}function closeEmailShare(){closePopup()}GuideSelector.SERVICE_NAME="/services/Guides";if(window.WIDGET_MODE){GuideSelector.SERVICE_NAME+=".php"}function GuideSelector(C,A,E,B,G,D){this.valueField=C;this.textField=A;this.optionArea=E;this.serverParam=B;this.selectionCallback=G;this.invalidationCallback=D;this.validGuide=(this.valueField&&this.valueField.value!="");this.guideQuery=new YAHOO.widget.DS_XHR(GuideSelector.SERVICE_NAME,["results","name","regionName","countryName","id","lat","lng","zoom"]);this.guideQuery.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;this.guideQuery.scriptQueryParam="name";this.prepareQuery();this.selector=new YAHOO.widget.AutoComplete(A,E,this.guideQuery);this.selector.useShadow=true;this.selector.maxResultsDisplayed=20;this.selector.minQueryLength=2;var F=this;this.selector.formatResult=function(H,I){return F.getFullName(H)};this.selector.doBeforeExpandContainer=function(H,I,L,K){var J=YAHOO.util.Dom.getXY(H);J[1]+=YAHOO.util.Dom.get(H).offsetHeight;YAHOO.util.Dom.setXY(I,J);return true};YAHOO.util.Event.addListener(this.textField,"blur",this.validateEntry,this,true);this.selector.guideSelector=this;this.selector.textboxKeyEvent.subscribe(function(K,J){var H=J[0];var I=H.guideSelector;I.markEntryInvalid()});this.selector.itemSelectEvent.subscribe(function(K,J){var H=J[0];var I=H.guideSelector;I.id=J[2][3];I.lat=J[2][4];I.lng=J[2][5];I.zoom=J[2][6];I.fullName=I.getFullName(J[2]);if(I.valueField){I.valueField.value=I.id}I.markEntryValid(I.id)})}GuideSelector.prototype.getFullName=function(A){var B=A[0];return B};GuideSelector.prototype.validateEntry=function(){var A=this;setTimeout(function(){if(!A.validGuide){A.checkNameMatch()}},500)};GuideSelector.prototype.markEntryValid=function(A){this.validGuide=true;this.textField.style.backgroundColor="#fff";if(this.selectionCallback){this.selectionCallback(A)}};GuideSelector.prototype.markEntryInvalid=function(A){this.validGuide=false;this.textField.style.backgroundColor="#fab327";if(this.invalidationCallback){this.invalidationCallback()}};GuideSelector.prototype.updateParent=function(A){this.parentId=A;this.prepareQuery()};GuideSelector.prototype.prepareQuery=function(){var A="event=getSimilarNames";if(this.serverParam){A+="&"+this.serverParam}else{A+="&max=20"}if(this.parentId){A+="&parent="+this.parentId}else{A+="&getParentNames=true"}this.guideQuery.scriptQueryAppend=A};GuideSelector.prototype.checkNameMatch=function(){var B=this.guideQuery.scriptQueryAppend+"&name="+encode(this.textField.value);var A=this;YAHOO.util.Connect.asyncRequest("GET",GuideSelector.SERVICE_NAME+"?"+B,{success:A.checkMatch,failure:function(C){},scope:A})};GuideSelector.prototype.checkMatch=function(A){};var tagQuery=new YAHOO.widget.DS_XHR("/services/Tags",["results","name","id"]);tagQuery.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;tagQuery.scriptQueryParam="name";function TagSelector(A,D,C,B){this.tagField=A;this.optionalTagArea=C;this.entityType=B;this.selector=new YAHOO.widget.AutoComplete(A,D,tagQuery);this.selector.useShadow=true;this.selector.delimChar=",";this.selector.queryDelay=0.3;this.selector.maxResultsDisplayed=20;this.selector.tagSelector=this;this.selectedTags=new Array();this.selector.formatResult=function(E,F){return E[0]};this.selector.doBeforeExpandContainer=function(E,F,I,H){var G=YAHOO.util.Dom.getXY(E);G[1]+=YAHOO.util.Dom.get(E).offsetHeight;YAHOO.util.Dom.setXY(F,G);return true};this.selector.itemSelectEvent.subscribe(function(H,G){var E=G[0];var F=E.tagSelector;if(F.autoSubmit){F.autoSubmit();return }if(F.isSingleSelect){return }F.lastTagCount++;if(F.optionalTagArea){F.loadOptionalRelatedTags()}});this.selector.dataReturnEvent.subscribe(function(H,G){var E=G[0];var F=E.tagSelector;F.resultCount=G[2].length;if(F.matchCallback){F.matchCallback(F.resultCount)}});if(this.entityType!=11){this.updateListingType()}YAHOO.util.Event.addListener(this.tagField,"keypress",this.checkTagsKeyed,this,true);this.lastTagCount=this.tagField.value.split(/,/).length}TagSelector.prototype.setSingleSelect=function(A){this.isSingleSelect=A;if(this.isSingleSelect){this.selector.delimChar=""}};TagSelector.prototype.useShortlist=function(){tagQuery.scriptQueryAppend+="&shortlist=true"};TagSelector.prototype.setAutoSubmit=function(A){this.autoSubmit=A};TagSelector.prototype.setMatchCallback=function(A){this.matchCallback=A};TagSelector.prototype.checkTagsKeyed=function(){if(this.isSingleSelect){return }var A=this.tagField.value;A=A.replace(/\n/,",");A=A.replace(/, *,/,",");this.tagField.value=A;var B=this.tagField.value.split(/,/).length;if(B!=this.lastTagCount){this.lastTagCount=B;if(this.optionalTagArea){this.loadOptionalRelatedTags()}}};TagSelector.prototype.updateListingType=function(B){this.listingType=B;var A="event=getTagsWithSimilarName&entityType="+this.entityType;if(B){A+="&listingType="+B}tagQuery.scriptQueryAppend=A};TagSelector.prototype.loadOptionalRelatedTags=function(){var B=this;var A="/services/Tags?event=getRelatedTags&entityType="+this.entityType+"&listingType="+this.listingType+"&tags="+this.tagField.value;YAHOO.util.Connect.asyncRequest("GET",A,{success:B.renderOptionalRelatedTags,failure:function(C){},scope:B})};TagSelector.prototype.renderOptionalRelatedTags=function(B){var G=", "+this.tagField.value.toLowerCase()+", ";var E=JSON.parse(B.responseText);var L=new Array();for(var D=0;D<E.length;D++){var M=E[D];var K=RegExp(", "+M.name+", ");if(G.indexOf(", "+M.name.toLowerCase()+", ")>=0){continue}for(var C=0;C<L.length;C++){if(L[C].name==M.name){break}}if(C==L.length){L.push(M)}}var H=this.tagField.value;L.sort(function(O,N){if(O.mainName!=N.mainName){return H.indexOf(O.mainName)-H.indexOf(N.mainName)}else{if(O.name<N.name){return -1}else{if(O.name>N.name){return 1}else{return 0}}}});var F="<div style='font-weight:bold'>Related Tags:</div><div>";var I=null;for(var D=0;D<L.length;D++){var M=L[D];if(I!=null&&I!=M.mainName){F+="<div style='width:100px;height:1px;background-color:#000;margin:5px 0px;'></div>"}F+="<input type='checkbox' name='tag"+encode(M.name)+"' value='"+encode(M.name)+"' class='radioCheck'>"+M.name+"<BR>";I=M.mainName}F+="</div>";var A=document.getElementById(this.optionalTagArea);A.innerHTML=F;if(L.length==0){A.style.display="none"
}else{A.style.display="";var J=YAHOO.util.Dom.getXY(this.tagField);J[0]+=this.tagField.offsetWidth+20;YAHOO.util.Dom.setXY(A,J);for(var D=0;D<L.length;D++){YAHOO.util.Event.addListener(A.childNodes[D+1],"click",this.selectRelatedTag,this,true)}}};TagSelector.prototype.selectRelatedTag=function(A){var C=YAHOO.util.Event.getTarget(A);if(!C.checked){return }var D=C.name.substring(3);var B=decode(C.value);if(!this.tagField.value.match(/, *$/)){this.tagField.value+=", "}this.tagField.value+=B+", ";this.loadOptionalRelatedTags();this.tagField.focus()};TagSelector.prototype.toggleTag=function(B){var C=this.tagField.value;var A=(C.indexOf(B)<0);if(A){tagSelector.addTag(B)}else{tagSelector.removeTag(B)}return A};TagSelector.prototype.addTag=function(B){var A=this.tagField.value;if(A.length>0){if(!this.tagField.value.match(/, *$/)){A+=", "}}A+=B;this.tagField.value=A+", ";this.tagField.focus();this.loadOptionalRelatedTags()};TagSelector.prototype.removeTag=function(B){var A=this.tagField.value;A=A.replace(B,"");A=A.replace(/,\s*,/,",");A=A.replace(/^,\s*/,"");A=A.replace(/,\s*$/,"");this.tagField.value=A;this.tagField.focus();this.loadOptionalRelatedTags()};var COMMENT_SERVICE="/services/Comments";var SOCIAL_SERVICE="/services/Social";var working=false;function flagItem(C,B,A){establishActiveUser(function(){if(working){return }working=true;var D="event=saveFlag&item="+C+"&type="+B;YAHOO.util.Connect.asyncRequest("POST",SOCIAL_SERVICE,{success:function(E){var F=JSON.parse(E.responseText);if(F.result&&F.result=="OK"){A.innerHTML="Flagged!";A.style.backgroundImage="none"}working=false},failure:function(E){}},D)})}function voteThumbsUp(D,C,B,A){establishActiveUser(function(){if(working){return }working=true;var E="event=voteThumbsUp&item="+D+"&type="+C+"&vote="+A;E+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",SOCIAL_SERVICE,{success:function(F){var G=JSON.parse(F.responseText);if(G.result&&G.result=="OK"){B.parentNode.innerHTML="Voted!"}else{if(G.error){var H=G.error.replace(/-/," ");showPrompt("Voting Failed",H)}}working=false},failure:function(F){}},E)})}function addComment(D,B,A,F){var C=document.getElementById("commentText"+D)||document.getElementById("commentText");var E=C.value;if(!E||E.length<3){showPrompt("Please type something longer");return }A.disabled=true;saveComment(D,B,E,function(H){var G=JSON.parse(H.responseText);var J=$("commentCount");if(J){J.innerHTML=parseInt(J.innerHTML)+1;J.parentNode.style.display=""}var I=document.createElement("DIV");$("commentArea").appendChild(I);I.innerHTML=G.html;displaySuccessBox(D);A.disabled=false;if(F){F(G.html)}})}function saveComment(B,A,C,D){establishActiveUser(function(){if(working){return }working=true;var E="event=addComment&text="+encode(C)+"&type="+A+"&item="+B;E+="&forGecko=true";E+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",COMMENT_SERVICE,{success:function(F){if(D){D(F)}working=false},failure:function(F){}},E)},"Please login to comment")}function deleteComment(C,A,B,D){establishActiveUser(function(){if(working){return }working=true;var E="event=deleteComment&type="+A+"&item="+C;E+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",COMMENT_SERVICE,{success:function(F){if(F.responseText.indexOf("OK")>=0){var G=$("commentCount");if(G){G.innerHTML=parseInt(G.innerHTML)-1}B=YAHOO.util.Dom.getAncestorByClassName(B,"comment");if(B){B.style.display="none"}}working=false},failure:function(F){}},E)})}var rtes=[];var tempRte;var iconText=new Array("Random note","I like!...","Muchos appreciation","Keep'em coming","Great writing","I like your thinking","You helped a brother out","You cracked me up","Holy street cred!","You're hardcore","Scary stuff","What the...?");var iconBody=new Array("","You very good for make information.  Tzequi!","Danke. Thank-you. Merci. Gracias. Arigato!","Just keep writing, just keep writing, I`ll keep reading. :)","Your writing is a work of art.","I find myself strangely attracted to your brain.","If it weren`t for you I would have fallen into a pit of snakes and died a slow horrible death.  Instead I got all my travel expenses paid for, found the love of my life and lived happily ever after.","You so funny when you say stuff.","Thugs and gang leaders from around the world wish they were you right now.","Holy moly you`re one tough cookie!","How`d you keep it together?  I would`ve peed myself silly if I`d been in your boots!","?...");var iconImages=new Array("compliment_random.png","compliment_like.png","compliment_appreciation.png","compliment_coming.png","compliment_great.png","compliment_thinking.png","compliment_helped.png","compliment_crackup.png","compliment_street.png","compliment_hardcore.png","compliment_scary.png","compliment_whatthe.png");function isNewText(B){if(B=="<br>"){return false}for(var A=0;A<iconBody.length;A++){if(iconBody[A]==B){return false}}return true}function displayComplimentBox(D){var C=document.getElementById("rte"+D);document.getElementById("box"+D).style.display="";tempRte=new WYSIWYG_Editor("tempRte",C,"","http://ui.geckogo.com/ui/editor",392,100);tempRte.setModeToggle(hasUserPriv());tempRte.setAllowAnchors(hasUserPriv());rtes[D]=tempRte;rtes[D].display();var B="<form name='form"+D+"'>";for(var A=0;A<iconText.length;A++){if(A%2==0){B+="<div>"}B+="<div class='compliment-box'><input type='radio' class='compliment-radio' name='icons' value='"+A+"' onclick='if(!isNewText(rtes["+D+"].getContent().toString())) { rtes["+D+'].setContent("'+iconBody[A]+"\") }'><img src='http://ui.geckogo.com/ui/media/"+iconImages[A]+"'><span class='compliment-text'>"+iconText[A]+"</span></div>";if((A+1)%2==0||A==iconText.length-1){B+="</div>"}}B+="</form>";document.getElementById("icons"+D).innerHTML=B}function closeComplimentBox(A){document.getElementById("box"+A).style.display="none"}var reviewId=null;function sendItemCompliment(H){reviewId=H;if(!loggedIn){establishActiveUser(complimentCallback);return }var F=null;var B=document.forms;var D=0;for(var C=0;!F&&C<B.length;C++){if(B[C].name.indexOf(H+"")>0){F=B[C]}}for(var C=0;C<F.icons.length;C++){if(F.icons[C].checked){D=F.icons[C].value}}var E=document.getElementById("box"+H);var A=rtes[H].getContent();while(A.indexOf("<br>")==0){A=A.replace("<br>","")}for(var C=A.toString().length-4;C>0;C-=4){if(A.substring(C,C+4)=="<br>"){A=A.substring(0,C)}else{break}}A=encode(A)||"";var G="event=addCompliment&relatedId="+H+"&text="+A+"&type="+D;YAHOO.util.Connect.asyncRequest("POST","/services/Compliments",{success:function(I){var J=I.responseText;if(J=="OK"){E.innerHTML="<b>Thank you, your compliment is posted!</b>";setTimeout("location.reload(true);",3000)}else{alert(J)}},failure:function(I){reportAjaxFailure()}},G)}function complimentCallback(A){if(A!="cancel"){loggedIn=true;sendItemCompliment(reviewId)}}function toggleCompliments(B){var A=document.getElementById("comments"+B);A.style.display=(A.style.display=="none")?"":"none"}function toggleInputBox(B){var A=document.getElementById("input"+B);A.style.display=(A.style.display=="none")?"":"none"}function displaySuccessBox(A){inputElem=document.getElementById("input"+A)||document.getElementById("inputBox");inputElem.style.display="none";succElem=document.getElementById("success"+A)||document.getElementById("successBox");succElem.style.display="";setTimeout("succElem.style.display='none';",4000)}function toggleCommentBox(D){var B=document.getElementById("comments"+D);var C=(B.style.display=="none")?"":"none";B.style.display=C;var A=document.getElementById("link"+D);if(A){A.style.display=C}};
