YAHOO.util.Attribute=function(D,C){if(C){this.owner=C;this.configure(D,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(H,L){var I;var G=this.owner;var K=this.name;var J={type:K,prevValue:this.getValue(),newValue:H};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(G,H)){return false;}if(!L){I=G.fireBeforeChangeEvent(J);if(I===false){return false;}}if(this.method){this.method.call(G,H);}this.value=H;this._written=true;J.type=K;if(!L){this.owner.fireChangeEvent(J);}return true;},configure:function(F,E){F=F||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var D in F){if(D&&YAHOO.lang.hasOwnProperty(F,D)){this[D]=F[D];if(E){this._initialConfig[D]=F[D];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(B){this.setValue(this.value,B);}};(function(){var B=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(A){this._configs=this._configs||{};var D=this._configs[A];if(!D){return undefined;}return D.value;},set:function(F,A,H){this._configs=this._configs||{};var G=this._configs[F];if(!G){return false;}return G.setValue(A,H);},getAttributeKeys:function(){this._configs=this._configs;var A=[];var F;for(var E in this._configs){F=this._configs[E];if(B.hasOwnProperty(this._configs,E)&&!B.isUndefined(F)){A[A.length]=E;}}return A;},setAttributes:function(A,F){for(var E in A){if(B.hasOwnProperty(A,E)){this.set(E,A[E],F);}}},resetValue:function(A,D){this._configs=this._configs||{};if(this._configs[A]){this.set(A,this._configs[A]._initialConfig.value,D);return true;}return false;},refresh:function(A,G){this._configs=this._configs;A=((B.isString(A))?[A]:A)||this.getAttributeKeys();for(var F=0,H=A.length;F<H;++F){if(this._configs[A[F]]&&!B.isUndefined(this._configs[A[F]].value)&&!B.isNull(this._configs[A[F]].value)){this._configs[A[F]].refresh(G);}}},register:function(D,A){this.setAttributeConfig(D,A);},getAttributeConfig:function(E){this._configs=this._configs||{};var F=this._configs[E]||{};var A={};for(E in F){if(B.hasOwnProperty(F,E)){A[E]=F[E];}}return A;},setAttributeConfig:function(F,E,A){this._configs=this._configs||{};E=E||{};if(!this._configs[F]){E.name=F;this._configs[F]=this.createAttribute(E);}else{this._configs[F].configure(E,A);}},configureAttribute:function(F,E,A){this.setAttributeConfig(F,E,A);},resetAttributeConfig:function(A){this._configs=this._configs||{};this._configs[A].resetConfig();},subscribe:function(D,A){this._events=this._events||{};if(!(D in this._events)){this._events[D]=this.createEvent(D);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(A){var D="before";D+=A.type.charAt(0).toUpperCase()+A.type.substr(1)+"Change";A.type=D;return this.fireEvent(A.type,A);},fireChangeEvent:function(A){A.type+="Change";return this.fireEvent(A.type,A);},createAttribute:function(A){return new YAHOO.util.Attribute(A,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var J=YAHOO.util.Dom,H=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(B,A){if(arguments.length){this.init(B,A);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(A){A=A.get?A.get("element"):A;this.get("element").appendChild(A);},getElementsByTagName:function(A){return this.get("element").getElementsByTagName(A);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(B,A){B=B.get?B.get("element"):B;A=(A&&A.get)?A.get("element"):A;this.get("element").insertBefore(B,A);},removeChild:function(A){A=A.get?A.get("element"):A;this.get("element").removeChild(A);return true;},replaceChild:function(B,A){B=B.get?B.get("element"):B;A=A.get?A.get("element"):A;return this.get("element").replaceChild(B,A);},initAttributes:function(A){},addListener:function(B,C,A,D){var E=this.get("element");D=D||this;E=this.get("id")||E;var F=this;if(!this._events[B]){if(this.DOM_EVENTS[B]){YAHOO.util.Event.addListener(E,B,function(N){if(N.srcElement&&!N.target){N.target=N.srcElement;}F.fireEvent(B,N);},A,D);}this.createEvent(B,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(A,B){this.unsubscribe.apply(this,arguments);},addClass:function(A){J.addClass(this.get("element"),A);},getElementsByClassName:function(A,B){return J.getElementsByClassName(A,B,this.get("element"));},hasClass:function(A){return J.hasClass(this.get("element"),A);},removeClass:function(A){return J.removeClass(this.get("element"),A);},replaceClass:function(A,B){return J.replaceClass(this.get("element"),A,B);},setStyle:function(A,B){var C=this.get("element");if(!C){return this._queue[this._queue.length]=["setStyle",arguments];}return J.setStyle(C,A,B);},getStyle:function(A){return J.getStyle(this.get("element"),A);},fireQueue:function(){var B=this._queue;for(var A=0,C=B.length;A<C;++A){this[B[A][0]].apply(this,B[A][1]);}},appendTo:function(B,A){B=(B.get)?B.get("element"):J.get(B);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:B});A=(A&&A.get)?A.get("element"):J.get(A);var C=this.get("element");if(!C){return false;}if(!B){return false;}if(C.parent!=B){if(A){B.insertBefore(C,A);}else{B.appendChild(C);}}this.fireEvent("appendTo",{type:"appendTo",target:B});},get:function(C){var A=this._configs||{};var B=A.element;if(B&&!A[C]&&!YAHOO.lang.isUndefined(B.value[C])){return B.value[C];}return H.prototype.get.call(this,C);},setAttributes:function(A,E){var B=this.get("element");for(var C in A){if(!this._configs[C]&&!YAHOO.lang.isUndefined(B[C])){this.setAttributeConfig(C);}}for(var D=0,F=this._configOrder.length;D<F;++D){if(A[this._configOrder[D]]!==undefined){this.set(this._configOrder[D],A[this._configOrder[D]],E);}}},set:function(C,A,D){var B=this.get("element");if(!B){this._queue[this._queue.length]=["set",arguments];if(this._configs[C]){this._configs[C].value=A;}return;}if(!this._configs[C]&&!YAHOO.lang.isUndefined(B[C])){K.call(this,C);}return H.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,B,A){var C=this.get("element");if(C&&!this._configs[D]&&!YAHOO.lang.isUndefined(C[D])){K.call(this,D,B);}else{H.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(D);},getAttributeKeys:function(){var B=this.get("element");var A=H.prototype.getAttributeKeys.call(this);for(var C in B){if(!this._configs[C]){A[C]=A[C]||B[C];}}return A;},createEvent:function(A,B){this._events[A]=true;H.prototype.createEvent.apply(this,arguments);},init:function(A,B){G.apply(this,arguments);}};var G=function(B,C){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];C=C||{};C.element=C.element||B||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var A=false;if(YAHOO.lang.isString(B)){K.call(this,"id",{value:C.element});}if(J.get(B)){A=true;I.call(this,C);L.call(this,C);}YAHOO.util.Event.onAvailable(C.element,function(){if(!A){I.call(this,C);}this.fireEvent("available",{type:"available",target:C.element});},this,true);YAHOO.util.Event.onContentReady(C.element,function(){if(!A){L.call(this,C);}this.fireEvent("contentReady",{type:"contentReady",target:C.element});},this,true);};var I=function(A){this.setAttributeConfig("element",{value:J.get(A.element),readOnly:true});};var L=function(A){this.initAttributes(A);this.setAttributes(A,true);this.fireQueue();};var K=function(C,A){var B=this.get("element");A=A||{};A.name=C;A.method=A.method||function(D){B[C]=D;};A.value=A.value||B[C];this._configs[C]=new YAHOO.util.Attribute(A,this);};YAHOO.augment(YAHOO.util.Element,H);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.5.2",build:"1076"});(function(){var X=YAHOO.util.Dom,R=YAHOO.util.Event,V=YAHOO.lang,S=YAHOO.env.ua,P=YAHOO.widget.Overlay,U=YAHOO.widget.Menu,N={},T=null,Z=null,O=null;function Y(E,F,B,D){var A,C;if(V.isString(E)&&V.isString(F)){if(S.ie){C='<input type="'+E+'" name="'+F+'"';if(D){C+=" checked";}C+=">";A=document.createElement(C);}else{A=document.createElement("input");A.name=F;A.type=E;if(D){A.checked=true;}}A.value=B;return A;}}function W(H,B){var I=H.nodeName.toUpperCase(),D=this,C,G,F;function A(J){if(!(J in B)){C=H.getAttributeNode(J);if(C&&("value" in C)){B[J]=C.value;}}}function E(){A("type");if(B.type=="button"){B.type="push";}if(!("disabled" in B)){B.disabled=H.disabled;}A("name");A("value");A("title");}switch(I){case"A":B.type="link";A("href");A("target");break;case"INPUT":E();if(!("checked" in B)){B.checked=H.checked;}break;case"BUTTON":E();G=H.parentNode.parentNode;if(X.hasClass(G,this.CSS_CLASS_NAME+"-checked")){B.checked=true;}if(X.hasClass(G,this.CSS_CLASS_NAME+"-disabled")){B.disabled=true;}H.removeAttribute("value");H.setAttribute("type","button");break;}H.removeAttribute("id");H.removeAttribute("name");if(!("tabindex" in B)){B.tabindex=H.tabIndex;}if(!("label" in B)){F=I=="INPUT"?H.value:H.innerHTML;if(F&&F.length>0){B.label=F;}}}function Q(C){var D=C.attributes,E=D.srcelement,A=E.nodeName.toUpperCase(),B=this;if(A==this.NODE_NAME){C.element=E;C.id=E.id;X.getElementsBy(function(F){switch(F.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":W.call(B,F,D);break;}},"*",E);}else{switch(A){case"BUTTON":case"A":case"INPUT":W.call(this,E,D);break;}}}YAHOO.widget.Button=function(A,D){if(!P&&YAHOO.widget.Overlay){P=YAHOO.widget.Overlay;}if(!U&&YAHOO.widget.Menu){U=YAHOO.widget.Menu;}var B=YAHOO.widget.Button.superclass.constructor,C,E;if(arguments.length==1&&!V.isString(A)&&!A.nodeName){if(!A.id){A.id=X.generateId();}B.call(this,(this.createButtonElement(A.type)),A);}else{C={element:null,attributes:(D||{})};if(V.isString(A)){E=X.get(A);if(E){if(!C.attributes.id){C.attributes.id=A;}C.attributes.srcelement=E;Q.call(this,C);if(!C.element){C.element=this.createButtonElement(C.attributes.type);}B.call(this,C.element,C.attributes);}}else{if(A.nodeName){if(!C.attributes.id){if(A.id){C.attributes.id=A.id;}else{C.attributes.id=X.generateId();}}C.attributes.srcelement=A;Q.call(this,C);if(!C.element){C.element=this.createButtonElement(C.attributes.type);}B.call(this,C.element,C.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked.  Click to check.",RADIO_CHECKED_TITLE:"Checked.  Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked.  Click to check.",CHECKBOX_CHECKED_TITLE:"Checked.  Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed.  Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded.  Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed.  Click inside option region or press Ctrl + Shift + M to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(A){if(A=="split"){this.on("option",this._onOption);}},_setLabel:function(B){this._button.innerHTML=B;var A,C=S.gecko;if(C&&C<1.9&&X.inDocument(this.get("element"))){A=this.CSS_CLASS_NAME;this.removeClass(A);V.later(0,this,this.addClass,A);}},_setTabIndex:function(A){this._button.tabIndex=A;},_setTitle:function(A){var B=A;if(this.get("type")!="link"){if(!B){switch(this.get("type")){case"radio":B=this.RADIO_DEFAULT_TITLE;break;case"checkbox":B=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":B=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":B=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":B=this.SUBMIT_TITLE;break;}}this._button.title=B;}},_setDisabled:function(A){if(this.get("type")!="link"){if(A){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(A){if(this.get("type")=="link"){this._button.href=A;}},_setTarget:function(A){if(this.get("type")=="link"){this._button.setAttribute("target",A);}},_setChecked:function(B){var A=this.get("type"),C;if(A=="checkbox"||A=="radio"){if(B){this.addStateCSSClasses("checked");C=(A=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{this.removeStateCSSClasses("checked");C=(A=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",C);}},_setMenu:function(C){var I=this.get("lazyloadmenu"),F=this.get("element"),M,A=false,b,J,G,K,L,D,H;if(!P){return false;}if(U){M=U.prototype.CSS_CLASS_NAME;}function B(){b.render(F.parentNode);this.removeListener("appendTo",B);}function E(){if(b){X.addClass(b.element,this.get("menuclassname"));X.addClass(b.element,"yui-"+this.get("type")+"-button-menu");b.showEvent.subscribe(this._onMenuShow,null,this);b.hideEvent.subscribe(this._onMenuHide,null,this);b.renderEvent.subscribe(this._onMenuRender,null,this);if(U&&b instanceof U){b.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);b.subscribe("click",this._onMenuClick,this,true);b.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);G=b.srcElement;if(G&&G.nodeName.toUpperCase()=="SELECT"){G.style.display="none";G.parentNode.removeChild(G);}}else{if(P&&b instanceof P){if(!T){T=new YAHOO.widget.OverlayManager();}T.register(b);}}this._menu=b;if(!A){if(I&&U&&!(b instanceof U)){b.beforeShowEvent.subscribe(this._onOverlayBeforeShow,null,this);}else{if(!I){if(X.inDocument(F)){b.render(F.parentNode);}else{this.on("appendTo",B);}}}}}}if(C&&U&&(C instanceof U)){b=C;K=b.getItems();L=K.length;A=true;if(L>0){H=L-1;do{D=K[H];if(D){D.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,D,this);}}while(H--);}E.call(this);}else{if(P&&C&&(C instanceof P)){b=C;A=true;b.cfg.setProperty("visible",false);b.cfg.setProperty("context",[F,"tl","bl"]);E.call(this);}else{if(U&&V.isArray(C)){this.on("appendTo",function(){b=new U(X.generateId(),{lazyload:I,itemdata:C});E.call(this);});}else{if(V.isString(C)){J=X.get(C);if(J){if(U&&X.hasClass(J,M)||J.nodeName.toUpperCase()=="SELECT"){b=new U(C,{lazyload:I});E.call(this);}else{if(P){b=new P(C,{visible:false,context:[F,"tl","bl"]});E.call(this);}}}}else{if(C&&C.nodeName){if(U&&X.hasClass(C,M)||C.nodeName.toUpperCase()=="SELECT"){b=new U(C,{lazyload:I});E.call(this);}else{if(P){if(!C.id){X.generateId(C);}b=new P(C,{visible:false,context:[F,"tl","bl"]});E.call(this);}}}}}}}},_setOnClick:function(A){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=A)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&V.isObject(A)&&V.isFunction(A.fn)){this.on("click",A.fn,A.obj,A.scope);this._onclickAttributeValue=A;}},_setSelectedMenuItem:function(B){var C=this._menu,A;if(U&&C&&C instanceof U){A=C.getItem(B);if(A&&!A.cfg.getProperty("selected")){A.cfg.setProperty("selected",true);}}},_isActivationKey:function(E){var A=this.get("type"),D=(A=="checkbox"||A=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,B=D.length,C;if(B>0){C=B-1;do{if(E==D[C]){return true;}}while(C--);}},_isSplitButtonOptionKey:function(A){var B=(A.ctrlKey&&A.shiftKey&&R.getCharCode(A)==77);function C(D){R.preventDefault(D);this.removeListener("keypress",C);}if(B&&S.opera){this.on("keypress",C);}return B;},_addListenersToForm:function(){var A=this.getForm(),B=YAHOO.widget.Button.onFormKeyPress,C,G,D,E,F;if(A){R.on(A,"reset",this._onFormReset,null,this);R.on(A,"submit",this.createHiddenFields,null,this);G=this.get("srcelement");if(this.get("type")=="submit"||(G&&G.type=="submit")){D=R.getListeners(A,"keypress");C=false;if(D){E=D.length;if(E>0){F=E-1;do{if(D[F].fn==B){C=true;break;}}while(F--);}}if(!C){R.on(A,"keypress",B);}}}},_showMenu:function(H){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(T){T.hideAll();}var J=P.VIEWPORT_OFFSET,A=this._menu,C=this,f=C.get("element"),F=false,D=X.getY(f),E=X.getDocumentScrollTop(),M,I,d;if(E){D=D-E;}var K=D,L=(X.getViewportHeight()-(D+f.offsetHeight));function G(){if(F){return(K-J);}else{return(L-J);}}function e(){var a=G();if(I>a){M=A.cfg.getProperty("minscrollheight");if(a>M){A.cfg.setProperty("maxheight",a);if(F){A.align("bl","tl");}else{A.align("tl","bl");}}if(a<M){if(F){A.cfg.setProperty("context",[f,"tl","bl"],true);A.align("tl","bl");}else{A.cfg.setProperty("context",[f,"bl","tl"],true);A.align("bl","tl");F=true;return e();}}}}if(U&&A&&(A instanceof U)){A.cfg.applyConfig({context:[f,"tl","bl"],clicktohide:false});A.cfg.fireQueue();A.show();A.cfg.setProperty("maxheight",0);A.align("tl","bl");if(H.type=="mousedown"){R.stopPropagation(H);}I=A.element.offsetHeight;d=A.element.lastChild;e();if(this.get("focusmenu")){this._menu.focus();}}else{if(P&&A&&(A instanceof P)){A.show();A.align("tl","bl");var B=G();I=A.element.offsetHeight;if(B<I){A.align("bl","tl");F=true;B=G();if(B<I){A.align("tl","bl");}}}}},_hideMenu:function(){var A=this._menu;if(A){A.hide();}},_onMouseOver:function(A){if(!this._hasMouseEventHandlers){this.on("mouseout",this._onMouseOut);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){R.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseOut:function(A){this.removeStateCSSClasses("hover");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){R.on(document,"mouseup",this._onDocumentMouseUp,null,this);}},_onDocumentMouseUp:function(B){this._activationButtonPressed=false;this._bOptionPressed=false;var A=this.get("type"),D,C;if(A=="menu"||A=="split"){D=R.getTarget(B);C=this._menu.element;if(D!=C&&!X.isAncestor(C,D)){this.removeStateCSSClasses((A=="menu"?"active":"activeoption"));this._hideMenu();}}R.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(C){var A,E,B,D;function F(){this._hideMenu();this.removeListener("mouseup",F);}if((C.which||C.button)==1){if(!this.hasFocus()){this.focus();}A=this.get("type");if(A=="split"){E=this.get("element");B=R.getPageX(C)-X.getX(E);if((E.offsetWidth-this.OPTION_AREA_WIDTH)<B){this.fireEvent("option",C);}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(A=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(C);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(A=="split"||A=="menu"){D=this;this._hideMenuTimerId=window.setTimeout(function(){D.on("mouseup",F);},250);}}},_onMouseUp:function(B){var A=this.get("type");if(this._hideMenuTimerId){window.clearTimeout(this._hideMenuTimerId);}if(A=="checkbox"||A=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}},_onFocus:function(A){var B;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}O=this;if(!this._hasKeyEventHandlers){B=this._button;R.on(B,"blur",this._onBlur,null,this);R.on(B,"keydown",this._onKeyDown,null,this);R.on(B,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",A);},_onBlur:function(A){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){R.on(document,"keyup",this._onDocumentKeyUp,null,this);}O=null;this.fireEvent("blur",A);},_onDocumentKeyUp:function(A){if(this._isActivationKey(R.getCharCode(A))){this._activationKeyPressed=false;R.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(A){var B=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(A)){this.fireEvent("option",A);}else{if(this._isActivationKey(R.getCharCode(A))){if(this.get("type")=="menu"){this._showMenu(A);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(B&&B.cfg.getProperty("visible")&&R.getCharCode(A)==27){B.hide();this.focus();}},_onKeyUp:function(B){var A;if(this._isActivationKey(R.getCharCode(B))){A=this.get("type");if(A=="checkbox"||A=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(D){var A=this.get("type"),G,C,F,E,B;switch(A){case"radio":case"checkbox":if(this.get("checked")){G=(A=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{G=(A=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",G);break;case"submit":this.submitForm();break;case"reset":C=this.getForm();if(C){C.reset();}break;case"menu":G=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",G);break;case"split":E=this.get("element");B=R.getPageX(D)-X.getX(E);if((E.offsetWidth-this.OPTION_AREA_WIDTH)<B){return false;}else{this._hideMenu();F=this.get("srcelement");if(F&&F.type=="submit"){this.submitForm();}}G=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",G);break;}},_onAppendTo:function(A){var B=this;window.setTimeout(function(){B._addListenersToForm();},0);},_onFormReset:function(B){var A=this.get("type"),C=this._menu;if(A=="checkbox"||A=="radio"){this.resetValue("checked");}if(U&&C&&(C instanceof U)){this.resetValue("selectedMenuItem");}},_onDocumentMouseDown:function(A){var D=R.getTarget(A),B=this.get("element"),C=this._menu.element;if(D!=B&&!X.isAncestor(B,D)&&D!=C&&!X.isAncestor(C,D)){this._hideMenu();R.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(A){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(A);this._bOptionPressed=true;}},_onOverlayBeforeShow:function(A){var B=this._menu;B.render(this.get("element").parentNode);B.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);},_onMenuShow:function(B){R.on(document,"mousedown",this._onDocumentMouseDown,null,this);var C,A;if(this.get("type")=="split"){C=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;A="activeoption";}else{C=this.MENUBUTTON_MENU_VISIBLE_TITLE;A="active";}this.addStateCSSClasses(A);this.set("title",C);},_onMenuHide:function(B){var C=this._menu,D,A;if(this.get("type")=="split"){D=this.SPLITBUTTON_DEFAULT_TITLE;A="activeoption";}else{D=this.MENUBUTTON_DEFAULT_TITLE;A="active";}this.removeStateCSSClasses(A);this.set("title",D);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(A,B){var C=B[0];if(R.getCharCode(C)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(C){var A=this.get("element"),D=A.parentNode,B=this._menu.element;if(D!=B.parentNode){D.appendChild(B);}this.set("selectedMenuItem",this.get("selectedMenuItem"));},_onMenuItemSelected:function(B,C,D){var A=C[0];if(A){this.set("selectedMenuItem",D);}},_onMenuItemAdded:function(B,C,D){var A=C[0];A.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,A,this);},_onMenuClick:function(C,D){var A=D[1],B;if(A){B=this.get("srcelement");if(B&&B.type=="submit"){this.submitForm();}this._hideMenu();}},createButtonElement:function(C){var A=this.NODE_NAME,B=document.createElement(A);B.innerHTML="<"+A+' class="first-child">'+(C=="link"?"<a></a>":'<button type="button"></button>')+"</"+A+">";return B;},addStateCSSClasses:function(B){var A=this.get("type");if(V.isString(B)){if(B!="activeoption"){this.addClass(this.CSS_CLASS_NAME+("-"+B));}this.addClass("yui-"+A+("-button-"+B));}},removeStateCSSClasses:function(B){var A=this.get("type");if(V.isString(B)){this.removeClass(this.CSS_CLASS_NAME+("-"+B));this.removeClass("yui-"+A+("-button-"+B));}},createHiddenFields:function(){this.removeHiddenFields();var D=this.getForm(),A,H,F,C,B,G,E,I;if(D&&!this.get("disabled")){H=this.get("type");F=(H=="checkbox"||H=="radio");if(F||(Z==this)){A=Y((F?H:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(A){if(F){A.style.display="none";}D.appendChild(A);}}C=this._menu;if(U&&C&&(C instanceof U)){I=C.srcElement;B=this.get("selectedMenuItem");if(B){if(I&&I.nodeName.toUpperCase()=="SELECT"){D.appendChild(I);I.selectedIndex=B.index;}else{E=(B.value===null||B.value==="")?B.cfg.getProperty("text"):B.value;G=this.get("name");if(E&&G){I=Y("hidden",(G+"_options"),E);D.appendChild(I);}}}}if(A&&I){this._hiddenFields=[A,I];}else{if(!A&&I){this._hiddenFields=I;}else{if(A&&!I){this._hiddenFields=A;}}}return this._hiddenFields;}},removeHiddenFields:function(){var A=this._hiddenFields,C,B;function D(E){if(X.inDocument(E)){E.parentNode.removeChild(E);}}if(A){if(V.isArray(A)){C=A.length;if(C>0){B=C-1;do{D(A[B]);}while(B--);}}else{D(A);}this._hiddenFields=null;}},submitForm:function(){var A=this.getForm(),B=this.get("srcelement"),C=false,D;if(A){if(this.get("type")=="submit"||(B&&B.type=="submit")){Z=this;}if(S.ie){C=A.fireEvent("onsubmit");}else{D=document.createEvent("HTMLEvents");D.initEvent("submit",true,true);C=A.dispatchEvent(D);}if((S.ie||S.webkit)&&C){A.submit();}}return C;},init:function(J,C){var H=C.type=="link"?"a":"button",F=C.srcelement,D=J.getElementsByTagName(H)[0],E;if(!D){E=J.getElementsByTagName("input")[0];if(E){D=document.createElement("button");D.setAttribute("type","button");E.parentNode.replaceChild(D,E);}}this._button=D;YAHOO.widget.Button.superclass.init.call(this,J,C);N[this.get("id")]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");R.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("click",this._onClick);this.on("appendTo",this._onAppendTo);var A=this.get("container"),I=this.get("element"),B=X.inDocument(I),G;if(A){if(F&&F!=I){G=F.parentNode;if(G){G.removeChild(F);}}if(V.isString(A)){R.onContentReady(A,function(){this.appendTo(A);},null,this);}else{this.appendTo(A);}}else{if(!B&&F&&F!=I){G=F.parentNode;if(G){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:G});G.replaceChild(I,F);this.fireEvent("appendTo",{type:"appendTo",target:G});}}else{if(this.get("type")!="link"&&B&&F&&F==I){this._addListenersToForm();}}}},initAttributes:function(A){var B=A||{};YAHOO.widget.Button.superclass.initAttributes.call(this,B);this.setAttributeConfig("type",{value:(B.type||"push"),validator:V.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:B.label,validator:V.isString,method:this._setLabel});this.setAttributeConfig("value",{value:B.value});this.setAttributeConfig("name",{value:B.name,validator:V.isString});this.setAttributeConfig("tabindex",{value:B.tabindex,validator:V.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:B.title,validator:V.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(B.disabled||false),validator:V.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:B.href,validator:V.isString,method:this._setHref});this.setAttributeConfig("target",{value:B.target,validator:V.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(B.checked||false),validator:V.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:B.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:B.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(B.lazyloadmenu===false?false:true),validator:V.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(B.menuclassname||"yui-button-menu"),validator:V.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("selectedMenuItem",{value:null,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:B.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(B.focusmenu===false?false:true),validator:V.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(O==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){return this._button.form;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var C=this.get("element"),D=C.parentNode,E=this._menu,A;if(E){if(T&&T.find(E)){T.remove(E);}E.destroy();}R.purgeElement(C);R.purgeElement(this._button);R.removeListener(document,"mouseup",this._onDocumentMouseUp);R.removeListener(document,"keyup",this._onDocumentKeyUp);R.removeListener(document,"mousedown",this._onDocumentMouseDown);var B=this.getForm();if(B){R.removeListener(B,"reset",this._onFormReset);R.removeListener(B,"submit",this.createHiddenFields);}this.unsubscribeAll();if(D){D.removeChild(C);}delete N[this.get("id")];A=X.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,B);if(V.isArray(A)&&A.length===0){R.removeListener(B,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(B,C){var A=arguments[0];if(this.DOM_EVENTS[A]&&this.get("disabled")){return;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(G){var I=R.getTarget(G),F=R.getCharCode(G),H=I.nodeName&&I.nodeName.toUpperCase(),K=I.type,E=false,C,B,J,A;function D(L){var M,b;switch(L.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(L.type=="submit"&&!L.disabled){if(!E&&!J){J=L;}if(B&&!A){A=L;}}break;default:M=L.id;if(M){C=N[M];if(C){E=true;if(!C.get("disabled")){b=C.get("srcelement");if(!B&&(C.get("type")=="submit"||(b&&b.type=="submit"))){B=C;}}}}break;}}if(F==13&&((H=="INPUT"&&(K=="text"||K=="password"||K=="checkbox"||K=="radio"||K=="file"))||H=="SELECT")){X.getElementsBy(D,"*",this);if(J){J.focus();}else{if(!J&&B){if(A){R.preventDefault(G);}B.submitForm();}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(F){var A=X.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",F),C=A.length,B,E,D;if(C>0){for(D=0;D<C;D++){E=A[D].id;if(E){B=N[E];if(B){B.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(B){var A=N[B];if(A){return A;}};})();(function(){var I=YAHOO.util.Dom,J=YAHOO.util.Event,H=YAHOO.lang,F=YAHOO.widget.Button,G={};YAHOO.widget.ButtonGroup=function(B,D){var C=YAHOO.widget.ButtonGroup.superclass.constructor,A,E,L;if(arguments.length==1&&!H.isString(B)&&!B.nodeName){if(!B.id){L=I.generateId();B.id=L;}C.call(this,(this._createGroupElement()),B);}else{if(H.isString(B)){E=I.get(B);if(E){if(E.nodeName.toUpperCase()==this.NODE_NAME){C.call(this,E,D);}}}else{A=B.nodeName.toUpperCase();if(A&&A==this.NODE_NAME){if(!B.id){B.id=I.generateId();}C.call(this,B,D);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var A=document.createElement(this.NODE_NAME);return A;},_setDisabled:function(B){var A=this.getCount(),C;if(A>0){C=A-1;do{this._buttons[C].set("disabled",B);}while(C--);}},_onKeyDown:function(A){var E=J.getTarget(A),C=J.getCharCode(A),D=E.parentNode.parentNode.id,B=G[D],L=-1;if(C==37||C==38){L=(B.index===0)?(this._buttons.length-1):(B.index-1);}else{if(C==39||C==40){L=(B.index===(this._buttons.length-1))?0:(B.index+1);}}if(L>-1){this.check(L);this.getButton(L).focus();}},_onAppendTo:function(B){var A=this._buttons,C=A.length,D;for(D=0;D<C;D++){A[D].appendTo(this.get("element"));}},_onButtonCheckedChange:function(C,D){var A=C.newValue,B=this.get("checkedButton");if(A&&B!=D){if(B){B.set("checked",false,true);}this.set("checkedButton",D);this.set("value",D.get("value"));}else{if(B&&!B.set("checked")){B.set("checked",true,true);}}},init:function(B,C){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,B,C);this.addClass(this.CSS_CLASS_NAME);var A=this.getElementsByClassName("yui-radio-button");if(A.length>0){this.addButtons(A);}function E(L){return(L.type=="radio");}A=I.getElementsBy(E,"input",this.get("element"));if(A.length>0){this.addButtons(A);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var D=this.get("container");if(D){if(H.isString(D)){J.onContentReady(D,function(){this.appendTo(D);},null,this);}else{this.appendTo(D);}}},initAttributes:function(A){var B=A||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,B);this.setAttributeConfig("name",{value:B.name,validator:H.isString});this.setAttributeConfig("disabled",{value:(B.disabled||false),validator:H.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:B.value});this.setAttributeConfig("container",{value:B.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(C){var A,B,M,N,E,D;if(C instanceof F&&C.get("type")=="radio"){A=C;}else{if(!H.isString(C)&&!C.nodeName){C.type="radio";A=new F(C);}else{A=new F(C,{type:"radio"});}}if(A){N=this._buttons.length;E=A.get("name");D=this.get("name");A.index=N;this._buttons[N]=A;G[A.get("id")]=A;if(E!=D){A.set("name",D);}if(this.get("disabled")){A.set("disabled",true);}if(A.get("checked")){this.set("checkedButton",A);}B=A.get("element");M=this.get("element");if(B.parentNode!=M){M.appendChild(B);}A.on("checkedChange",this._onButtonCheckedChange,A,this);return A;}},addButtons:function(D){var C,B,A,E;if(H.isArray(D)){C=D.length;A=[];if(C>0){for(E=0;E<C;E++){B=this.addButton(D[E]);if(B){A[A.length]=B;}}if(A.length>0){return A;}}}},removeButton:function(B){var A=this.getButton(B),C,D;if(A){this._buttons.splice(B,1);delete G[A.get("id")];A.removeListener("checkedChange",this._onButtonCheckedChange);A.destroy();C=this._buttons.length;if(C>0){D=this._buttons.length-1;do{this._buttons[D].index=D;}while(D--);}}},getButton:function(A){if(H.isNumber(A)){return this._buttons[A];}},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(B){var A,C,D;if(H.isNumber(B)){A=this._buttons[B];if(A){A.focus();}}else{C=this.getCount();for(D=0;D<C;D++){A=this._buttons[D];if(!A.get("disabled")){A.focus();break;}}}},check:function(B){var A=this.getButton(B);if(A){A.set("checked",true);}},destroy:function(){var A=this._buttons.length,B=this.get("element"),D=B.parentNode,C;if(A>0){C=this._buttons.length-1;do{this._buttons[C].destroy();}while(C--);}J.purgeElement(B);D.removeChild(B);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.5.2",build:"1076"});perfUI.widgets.languages=function(){var B=this;var A=function(D,E,C){this.id=E||"";this.name=C||"";this.init=function(){if(D){this.id=PERF.parseNodeNumeric(D,"id");this.name=PERF.parseNode(D,"name");}};this.init();};this.loadLanguagesDropDown=function(E,D){D=D||"0";var C=function(I){for(var H=0;H<I.length;H++){var F=I[H];var G=addNode(E,"option");G.value=String(F.id);G.innerHTML="&nbsp;"+F.name;}if(String(D).trim().length>0){E.value=String(D).trim();}};this.getLanguagesCollection(C);};this.getLanguagesCollection=function(H){var E=[];var F={url:"/api/callna.asp",params:"?Function=GetLanguages"};var D=function(I){H(E);};var C=function(I){var J=I.responseXML;var L=J.getElementsByTagName("languages")[0];if(L!=null){var M=L.getElementsByTagName("language");for(var K=0;K<M.length;K++){E.push(new A(M[K]));}}H(E);};var G={success:C,failure:D,scope:B};YAHOO.util.Connect.asyncRequest("GET",F.url+F.params,G,null);};};perfUI.widgets.splitButton=function(B){var E=YAHOO.util.Dom;var F=perfUI.util.addEl;var C;var A=new perfUI.widgets.menu(B);var D="";this.containerCss="yui-skin-sam";this.getMenu=function(){return A;};this.getType=function(){return D;};this.destroy=function(){C=null;A=null;};this.setType=function(H,G){D=H;switch(H){case"delete":C=F(B,"DIV",{"class":"deleteImg"});break;case"link":C=F(B,"a",{"innerHTML":G,"class":"splitButtonLink"});break;case"dropDownList":C=F(B,"div",{"class":"pullDown left"});break;default:C=B;break;}};this.setEl=function(G){C=G;};this.addMenuItem=function(G){A.addItems([G]);};this.addMenuItems=function(G){A.addItems(G);};this.toggleMenu=function(G){YAHOO.util.Event.purgeElement(C,false,"click");if(A.menuClosed){A.show(G);}else{A.closeMenu(G);}YAHOO.util.Event.addListener(C,"click",this.toggleMenu,this,true);};this.render=function(){if(!E.hasClass(B,this.containerCss)){}E.addClass(B,this.containerCss);A.render(B);switch(D){case"dropDownList":YAHOO.util.Event.addListener(C,"click",this.toggleMenu,this,true);break;default:YAHOO.util.Event.addListener(C,"click",A.show,A,true);break;}};};perfUI.widgets.showHideContainer=function(I,A,C,K){var L=this;this.autoEvents=K==undefined?true:K;this.isCollapsed=C==undefined?false:C;this.onExpandClick=new YAHOO.util.CustomEvent("onExpandClick",this);this.onCollapseClick=new YAHOO.util.CustomEvent("onCollapseClick",this);this.onExpand=new YAHOO.util.CustomEvent("onExpand",this);this.onCollapse=new YAHOO.util.CustomEvent("onCollapse",this);var E="showHideIcon";var H=I.className+" "+E+" "+E+"Collapse";var D=I.className+" "+E+" "+E+"Expand";var B="Hover";var G=I.className+" showHideIconLoading";this.setLoadingIconCss=function(){I.className=G;};this.doCollapse=function(){A.style.display="none";this.isCollapsed=true;I.className=D;I.title="Click to Expand";this.onCollapse.fire();};this.doExpand=function(M){A.style.display="block";this.isCollapsed=false;I.className=H;I.title="Click to Collapse";this.onExpand.fire();};this.toggle=function(){if(I.className.indexOf(H.trim())>=0){this.onCollapseClick.fire();if(this.autoEvents){this.doCollapse();}}else{this.onExpandClick.fire();if(this.autoEvents){this.doExpand();}}};var J=function(){I.className+=B;};var F=function(){I.className=I.className.replace(B,"");};I.className=E;if(this.isCollapsed){this.doCollapse();}else{this.doExpand();}YAHOO.util.Event.addListener(I,"click",this.toggle,this,true);YAHOO.util.Event.addListener(I,"mouseover",J,this,true);YAHOO.util.Event.addListener(I,"mouseout",F,this,true);};perfUI.widgets.ToolTip=function(B,A){if(typeof(tipobj)=="undefined"){tipobj=document.createElement("DIV");tipobj.id="dhtmltooltip";}if(typeof(pointerobj)=="undefined"){pointerobj=document.createElement("DIV");pointerobj.id="dhtmlpointer";pointerobj.appendChild(document.createElement("DIV"));}this.tipobj=tipobj;tipobj.style.width="200px";B.txt=A;B.onmouseover=perfUI.widgets.ToolTip.mouseover;this.setBackgroundColor=function(C){pointerobj.firstChild.style.borderTopColor=C;pointerobj.firstChild.style.borderBottomColor=C;tipobj.style.backgroundColor=C;};this.setBackgroundColor("lightyellow");};perfUI.widgets.ToolTip.mouseout=function(){this.onmousemove=null;this.onmouseout=null;tipobj.parentNode.removeChild(tipobj);pointerobj.parentNode.removeChild(pointerobj);};perfUI.widgets.ToolTip.mouseover=function(){if(document.all&&document.readyState!="complete"){return;}tipobj.style.visibility="hidden";tipobj.style.top="0px";tipobj.style.left="0px";document.body.appendChild(tipobj);if(typeof this.txt=="object"){while(tipobj.childNodes.length){tipobj.removeChild(tipobj.firstChild);}tipobj.appendChild(this.txt);}else{tipobj.innerHTML=this.txt;}document.body.appendChild(pointerobj);this.onmousemove=perfUI.widgets.ToolTip.mousemove;this.onmouseout=perfUI.widgets.ToolTip.mouseout;};perfUI.widgets.ToolTip.mousemove=function(G){var G=YAHOO.util.Event.getEvent(G);var C=YAHOO.util.Event.getPageX(G);var A=YAHOO.util.Event.getPageY(G);var D=12;var B=10;var K=10;var J=14;var F=YAHOO.util.Dom.getViewportWidth()-G.clientX-D;var E=YAHOO.util.Dom.getViewportHeight()-G.clientY-B;var I=F>=tipobj.offsetWidth;var H=E>=tipobj.offsetHeight;tipobj.style.left=C+(!I?0-tipobj.offsetWidth:D-K)+"px";tipobj.style.top=A+(!H?0-tipobj.offsetHeight-B:B+J)+"px";tipobj.style.visibility="visible";pointerobj.style.top=A+B+(H?0:-21)+"px";pointerobj.style.left=C+(I?D:0-D-15)+"px";pointerobj.className="pointerobj"+(H?"Up":"Bottom")+(I?"Right":"Left");};perfUI.widgets.activityIndicator=function(B){B=B||document.body;var A=null;var C=function(){A=new YAHOO.widget.Panel("pageActivityIndicator",{width:"200px",fixedcenter:false,close:false,draggable:false,zindex:4,modal:true,visible:false});A.setBody('<div class="activityLoadingDialog"><p>loading, please wait...</p></div>');A.render(B);};C();this.show=function(){A.show();};this.hide=function(){A.hide();};this.center=function(){A.center();};};perfUI.widgets.reportAbuse=function(B){var C=this;var F=perfUI.util.addEl;var A=[{"value":"1","text":perfTranslator.getValue(1191),"control":null},{"value":"2","text":perfTranslator.getValue(1192),"control":null},{"value":"3","text":perfTranslator.getValue(1193),"control":null},{"value":"4","text":perfTranslator.getValue(1194),"control":null},{"value":"5","text":perfTranslator.getValue(1195),"control":null},{"value":"6","text":perfTranslator.getValue(1196),"control":null},{"value":"7","text":perfTranslator.getValue(1197),"control":null},{"value":"8","text":perfTranslator.getValue(413),"control":null}];var D=A;var E="";this.getSelectedValue=function(){return E;};this.clearSelectedValue=function(){var I=this.getOptions();for(var H=0;H<I.length;H++){var G=I[H].control;if(G){G.checked=false;}}this.setSelectedValue("");};this.setSelectedValue=function(G){E=G;};this.setOptions=function(G){D=G;};this.getOptions=function(){return D;};this.isHidden=function(){if(B.style.display=="none"){return true;}else{return false;}};this.toggle=function(){if(this.isHidden()){this.show();}else{this.hide();}};this.hide=function(){B.style.display="none";};this.show=function(){B.style.display="block";};this.send=function(G,L,K){K||this.getSelectedValue();var I="/report.asp?s="+L+"&b="+G+"&r="+K;try{var H=getHttpRequestObj();H.open("GET",I,true);H.send(null);}catch(J){}};this.render=function(){var L=F(B,"div",{"class":"optionlist"});var J=this.getOptions();for(var I=0;I<J.length;I++){var K=F(L,"div",{"class":"radio"});var H=F(K,"radio",{"value":J[I].value,"name":"reason"});var G=function(N,M){M.checked=true;C.setSelectedValue(M.value);};F(K,"label",{"innerHTML":J[I].text});YAHOO.util.Event.addListener(K,"click",G,H);J[I].control=H;}};};function SpottingWidget(E,D,B,F){var G=this;var A=null;var C=D||null;this.UserId=E||0;this.BatchUpdates=F||true;this.buildSpotsList=function(){if(this.SpotsListContainer==null){return;}this.SpotsListContainer.innerHTML="";var I=addNode(this.SpotsListContainer,"p");var N=addNode(I,"div","","toolTipInfoIcon");var P=perfUI.widgets.ToolTip;if(!P){return;}var L="<center>Spotting is the best way to share your pictures with other PerfSpot members. After you have uploaded a picture, just click on it to place the marker on a friend. Once you have Spotted a friend the picture will show up on their PerfSpot page.  Give it a shot, you are going to fall in love with this feature!</center>";var O=new P(N,L);O.tipobj.style.backgroundColor="lightyellow";addNode(I,"strong","","","Spots:&nbsp;");if(this.Spots.length==0){addNode(I,"span","","","Click anywhere on the image to start Spotting.");}for(var K=0;K<this.Spots.length;K++){var Q=this.Spots[K];var J=null;if(this.AllowViewAllSpots){J=addNode(I,"a","","txtdblue",Q.FullName);J.href="/profile.asp?uid="+Q.UserGUID;addNode(I,"span","","","&nbsp;(");var H=addNode(I,"a","","","View All");H.href="/pics/allspots.asp?id="+Q.UserGUID;addNode(I,"span","","",")");}else{J=addNode(I,"label","","txtdblue",Q.FullName);}YAHOO.util.Event.addListener(J,"mouseover",this.ShowSpot,Q);YAHOO.util.Event.addListener(J,"mouseout",this.HideShowSpot,Q);if(Q.AllowRemoveSpots){addNode(I,"span","","","&nbsp;(");var M=addNode(I,"a","","","Remove");PERF.makeLink(M);YAHOO.util.Event.addListener(M,"click",this.RemoveSpot,Q);addNode(I,"span","","",")");}if(K<(this.Spots.length-1)){addNode(I,"span","","",",&nbsp; ");}}this.onSpotsListContainerDirty.fire();};this.getSpotClickXY=function(H){return YAHOO.util.Event.getXY(H);};this.getSpotClickRelativeXY=function(K){var J=new Array(2);var I=YAHOO.util.Event.getTarget(K);var L=YAHOO.util.Dom.getXY(I);var H=this.getSpotClickXY(K);J[0]=H[0]-L[0];J[1]=H[1]-L[1];return J;};this.displaySpot=function(H,M,J){if(J==undefined){J=A.Container;}var I=Number(A.Container.style.paddingLeft.replace("px",""));var K=Number(A.Container.style.paddingTop.replace("px",""));if(this.IsModalContainer){J.style.left=(H+I)-5+"px";J.style.top=(M+K)+"px";}else{var L=YAHOO.util.Dom.getXY(C);J.style.left=((L[0]+H)+(I/2))-15+"px";J.style.top=((L[1]+M)+(K/2))-10+"px";}J.style.display="block";if(A.Container.style.display=="block"){if(this.UserId<=0&&this.LoginRedirectUrl.trim().length>0){location.href=this.LoginRedirectUrl;}A.Input.focus();A.AutoComp.textboxFocusEvent.fire(A.AutoComp);}};this.selectionTool=function(H){this.Container=H;this.ShowSpotContainer=null;this.ListContainer=null;this.ButtonCancel=null;this.ButtonSubmit=null;this.Input=null;this.ResultsContainer=null;this.AutoComp=null;this.SpotClickXY=null;this.SpotXY=null;this.SelectedItem=null;this.defaultValue="Enter friend's first or last name above";};this.autoCompleteSearchFriends=function(){var I="/api/call.asp";var J=new YAHOO.widget.DS_XHR(I,["user","displayName","isMe","thumbnailUrl","userCode","userId"]);J.responseType=YAHOO.widget.DS_XHR.TYPE_XML;J.queryMatchContains=true;J.scriptQueryAppend="Function=Media.Pictures.GetFriendsAuto&UserID="+E;this.formatResultXml=function(R,V){var X=R[0];var T=R[1];var W=R[2];var S=R[3];var U=R[4];var Q=["<label>",X,"</label>",T.toLowerCase()=="true"?"<strong class='txtdblue'>*me</strong>":""];return(Q.join(""));};var P=new YAHOO.widget.AutoComplete(A.Input,A.ResultsContainer,J);P.appendItems=[];P.formatResult=this.formatResultXml;P.autoHighlight=false;P.animVert=true;var M=function(){var Q="<ul><li>"+A.defaultValue+"</li></ul>";P.setBody(Q);A.ResultsContainer.childNodes[0].style.height="19px";};var L=function(Q){if(A.Input.value.trim().length==0){M();}};P.textboxFocusEvent.subscribe(L);var O=function(Q,R){if(A.Input.value.trim().length==0){M();}};P.textboxKeyEvent.subscribe(O);var H=function(R,Q){P.setBody("<ul><li>Loading...</li></ul>");P.alwaysShowContainer=true;};P.dataRequestEvent.subscribe(H);var K=function(R,Q){if(Q[2].length==0){P.alwaysShowContainer=true;P.setBody("<ul><li>No matches found</li></ul>");A.ButtonSubmit.className="buttonnewDisabled";}else{P.alwaysShowContainer=false;}};P.dataReturnEvent.subscribe(K);var N=function(R,Q){P.alwaysShowContainer=false;A.ButtonSubmit.className="buttonnew txtred";A.ButtonSubmit.disabled=false;A.SelectedItem=Q;};P.itemSelectEvent.subscribe(N);return P;};this.captureSpots=function(L){var I=YAHOO.env.ua.ie>0?260:280;var J=YAHOO.env.ua.ie>0?330:305;if(B==undefined){B="click";}var K=function(M){A.ShowSpotContainer.style.display="none";A.SpotXY=this.getSpotClickRelativeXY(M);A.Input.value="";this.displaySpot(A.SpotXY[0],A.SpotXY[1]);};var H=function(){A=new G.selectionTool();A.ShowSpotContainer=addNode(L,"div","","spotWindow");A.ShowSpotContainer.style.display="none";A.Container=addNode(L,"div","","spotWindow");A.Container.style.display="none";A.Container.style.width=I+"px";A.Container.style.padding="28px 0pt 0pt 29px";var N=addNode(A.Container,"div","","dialogMain borderdarkgray");A.ListContainer=N;var T=addNode(N,"div","","bglb");addNode(T,"label","","txtdblue","Spot This");var M=addNode(N,"div","","dialogBody");addNode(M,"label","","","Search");var Q=addNode(M,"textbox","","textbox");var P=addNode(M,"div");A.Input=Q;A.ResultsContainer=P;A.AutoComp=G.autoCompleteSearchFriends();var S=addNode(M,"div","","buttonbox");var R=addNode(S,"button","","buttonnew","Cancel");YAHOO.util.Event.addListener(R,"click",G.Hide,G,true);var O=addNode(S,"button","","buttonnewDisabled","Spot It!");O.disabled=true;YAHOO.util.Event.addListener(O,"click",G.SaveSpot,G,true);A.ButtonCancel=R;A.ButtonSubmit=O;};B=B==undefined?"click":B;YAHOO.util.Event.addListener(C,B,K,this,true);H();};this.Render=function(I,H){C=I;this.captureSpots(H);};this.IsModalContainer=true;this.Container=null;this.SpotsListContainer=null;this.AllowViewAllSpots=true;this.AllowRemoveSpots=true;this.Spots=new Array();this.onSaveSpot=new YAHOO.util.CustomEvent("spotSave",this);this.onRemoveSpot=new YAHOO.util.CustomEvent("spotRemove",this);this.onSpotsListContainerDirty=new YAHOO.util.CustomEvent("spotListContainerDirty",this);this.Spot=function(J,O,N){var H=0;var I=0;var K="";var M="";var P=true;try{if(J instanceof Array){I=Number(J[J.length-1]);K=J[0];M=J[3];}else{H=PERF.parseNodeNumeric(J,"spotId");I=Number(J.getElementsByTagName("userId")[0].childNodes[0].nodeValue);K=J.getElementsByTagName("name")[0].childNodes[0].nodeValue;M=J.getElementsByTagName("userCode")[0].childNodes[0].nodeValue;O=Number(J.getElementsByTagName("x")[0].childNodes[0].nodeValue);N=Number(J.getElementsByTagName("y")[0].childNodes[0].nodeValue);P=PERF.parseNodeBool(J,"allowRemove");}}catch(L){return null;}this.SpotId=H;this.UserId=I;this.FullName=K;this.DisplayName=K;this.UserGUID=M;this.CoordinateX=O;this.CoordinateY=N;this.AllowRemoveSpots=P;this.LoginRedirectUrl="";};this.HideShowSpot=function(I,H){A.ShowSpotContainer.style.display="none";};this.ShowSpot=function(I,H){A.Container.style.display="none";G.displaySpot(H.CoordinateX,H.CoordinateY,A.ShowSpotContainer);};this.DeleteSavedSpot=function(K,J){var L={url:"/api/call.asp",params:"?Function=Media.Pictures.RemoveSpot&UserID="+this.UserId+"&SpotID="+J.SpotId};var I=function(N){};var H=function(N){};var M={success:H,failure:I,scope:G};YAHOO.util.Connect.asyncRequest("GET",L.url+L.params,M,null);};this.RemoveSpot=function(K,J){A.ShowSpotContainer.style.display="none";for(var H=0;H<G.Spots.length;H++){var I=G.Spots[H];if(I.UserId==J.UserId){G.Spots.splice(H,1);G.onRemoveSpot.fire(J);}}if(!G.BatchUpdates&&J.SpotId>0){G.DeleteSavedSpot(K,J);}};this.Hide=function(H){A.Container.style.display="none";};this.SaveSpot=function(M){var N=-1;var I=A.SelectedItem[0];var O=A.SelectedItem[1];var H=A.SelectedItem[2];var K=H[H.length-1];var J=new G.Spot(H,A.SpotXY[0],A.SpotXY[1]);for(var L=0;L<G.Spots.length;L++){var Q=G.Spots[L];if(Q.UserId==Number(H[H.length-1])){Q=J;N=L;break;}}if(N>=0){var P=G.Spots[N];P.CoordinateX=J.CoordinateX;P.CoordinateY=J.CoordinateY;}else{G.Spots.push(J);}G.onSaveSpot.fire(J);this.Hide();};}perfUI.content.userContentType={Album:0,Picture:1,Video:2,User:3,Blog:4};perfUI.content.userContentTag=function(B,C,A){this.tagId=C||0;this.tagName=A||"";this.dataSource=B||null;this.init=function(){if(!this.dataSource){return;}this.tagId=PERF.parseNodeNumeric(this.dataSource,"tagId");this.tagName=PERF.parseNode(this.dataSource,"tagName");};this.init();};perfUI.content.userContent=function(B,C){var A=this;this.UserId=B;this.DataSource=C||null;this.Container=null;this.AlbumId=0;this.Subject="";this.Description="";this.AccessId=0;this.AccessDescr="";this.DateCreated="";this.DateModified="";this.IsOwner=false;this.CategoryId=0;this.CategoryDescr="";this.ThumbUrl="";this.ThumbLinkUrl="";this.AllowComments=0;this.AllowCommentsDescr="";this.Comments=[];this.Tags=[];this.TotalComments=0;this.TotalCommentsNew=0;this.TotalFavored=0;this.IsFavorite=false;this.PercentApproval=0;this.PerfCount=0;this.AllowApproval=0;this.AllowApprovalDescr="";this.TotalViews=0;this.TotalViewCurrent=0;this.SubmittedBy="";this.SubmittedByGUID="";this.DateSubmitted="";this.DateDiffSubmitted="";this.getTagsLinks=function(G){var F="";for(var E=0;E<this.Tags.length;E++){var D=this.Tags[E];perfUI.util.addEl(G,"a",{"href":this.getTagUrl(D),"text":D.tagName+" "});}};this.getTagsString=function(){var E="";for(var D=0;D<this.Tags.length;D++){E+=(this.Tags[D].tagName+" ");}return E.trim();};this.loadTags=function(G){G=G||this.DataSource;if(!G){return;}var H=G.getElementsByTagName("tags");if(H.length>0){H=H[0].getElementsByTagName("tag");if(H.length==0){var D=new perfUI.content.userContentTag(null,0,PERF.parseNode(G,"tags"));this.Tags.push(D);return;}for(var F=0;F<H.length;F++){var E=H[F];var D=new perfUI.content.userContentTag(E);this.Tags.push(D);}}};this.loadComments=function(F){if(!perfUI.content.userComment){return;}F=F||this.DataSource;if(!F){return;}var H=F.getElementsByTagName("comment");if(H.length>0){for(var E=0;E<H.length;E++){var D=H[E];var G=new perfUI.content.userComment(D);G.ContentTypeId=this.getContentId();this.Comments.push(G);}}};this.loadRating=function(D){this.AllowApproval=PERF.parseNodeNumeric(D,"allowApproval");this.AllowApprovalDescr=PERF.parseNode(D,"allowApprovalReason");this.PercentApproval=PERF.parseNode(D,"approvalPercent");this.PerfsCount=PERF.parseNode(D,"perfs");};this.loadIsFavorite=function(D){this.IsFavorite=PERF.parseNodeBool(D,"myFavorite");};this.loadFavoredBy=function(D){this.TotalFavored=PERF.parseNodeNumeric(D,"favoredBy");};};perfUI.content.userContent.prototype.loadProperties=function(A){A=A||this.DataSource;if(A==null||A==undefined){return;}this.DataSource=A;this.AlbumId=PERF.parseNodeNumeric(A,"albumId");this.ThumbUrl=PERF.parseNode(A,"thumbUrl");this.ThumbLinkUrl=PERF.parseNode(A,"link");this.Subject=PERF.parseNode(A,"subject");this.Description=PERF.parseNode(A,"description");this.AccessId=PERF.parseNodeNumeric(A,"access");this.AccessDescr=PERF.parseNode(A,"accessName");this.DateCreated=PERF.parseNode(A,"dateCreated");this.DateModified=PERF.parseNode(A,"dateLastUpdated");this.TotalComments=PERF.parseNodeNumeric(A,"totalComments");this.TotalCommentsNew=PERF.parseNodeNumeric(A,"newComments");this.IsOwner=PERF.parseNodeBool(A,"isOwner");this.CategoryId=PERF.parseNodeNumeric(A,"categoryId");this.CategoryDescr=PERF.parseNode(A,"categoryName");this.loadRating(A);this.TotalViews=PERF.parseNodeNumeric(A,"views");this.TotalViewsCurrent=PERF.parseNodeNumeric(A,"viewsToday");this.SubmittedBy=PERF.parseNode(A,"submitterName");this.SubmittedByGUID=PERF.parseNode(A,"submitterId");this.DateSubmitted=PERF.parseNode(A,"dateSubmitted");this.DateDiffSubmitted=PERF.parseNode(A,"dateSubmitted2");this.loadFavoredBy(A);this.loadIsFavorite(A);this.loadTags(A);this.AllowComments=PERF.parseNodeNumeric(A,"allowComments");this.AllowCommentsDescr=PERF.parseNode(A,"allowCommentsReason");this.loadComments(this.DataSource.getElementsByTagName("comments")[0]);};perfUI.content.userContent.prototype.buildSocialBookmark=function(C,H,B){var F=perfUI.util.addEl;var E=this;H=H||"Perfspot.com - "+E.Subject;B=B||E.getViewDetailsUrl();var I=F(C,"a",{"href":"http://www.addthis.com/bookmark.php"});var D=function(){addthis_url=B;addthis_title=H;return addthis_open(this,"",B,H);};var A=function(){return addthis_close();};var G=function(){return addthis_sendto();};YAHOO.util.Event.addListener(I,"click",G);YAHOO.util.Event.addListener(I,"mouseover",D);YAHOO.util.Event.addListener(I,"mouseout",A);var J=addNode(I,"img");J.src="http://s9.addthis.com/button1-bm.gif";J.alt="AddThis Social Bookmark Button";J.style.width="125px";J.style.height="16px";J.style.border="0";return J;};perfUI.content.user=function(B,C){var A=this;this.userId=B;this.userGUID="";this.isPerson=false;this.dataSource=C;this.displayName="";this.status="";this.thumbUrl="";this.pictureUrl="";this.gender="";this.age=0;this.online=false;this.dateLastLogin="";this.location1="";this.location2="";this.location3="";this.mutualFriendsCount=0;this.AllowComments=0;this.AllowCommentsDescr="";this.Comments=[];this.getContentType=function(){return perfUI.content.userContentType.User;};this.getContentId=function(){return this.userId;};this.attachToolTip=function(E){var D=perfUI.widgets.ToolTip;if(!D){return;}var G=new Image();G.src=this.thumbUrl;var F='<div class="tooltip"><img src="'+G.src+'" border=0></div>';var H=new D(E,F);H.tipobj.style.width="100px";H.tipobj.style.backgroundColor="#FFF";};this.getMutualFriendsUrl=function(){return"http://www.perfspot.com/mutualfriends.asp?id="+this.userGUID;};this.getAllFriendsUrl=function(){return"http://www.perfspot.com/allfriends.asp?id="+this.userGUID;};this.getSuggestFriendsUrl=function(){return"http://www.perfspot.com/suggest.asp?id="+this.userGUID;};this.getSendMessageUrl=function(){return"http://www.perfspot.com/messagepost.asp?id="+this.userGUID;};this.getProfileUrl=function(){return"http://www.perfspot.com/profile.asp?uid="+this.userGUID;};this.getPostMessageUrl=function(){return"http://www.perfspot.com/profile.asp?uid="+this.userGUID+"&post=1";};this.loadComments=function(F){if(!perfUI.content.userComment){return;}F=F||this.dataSource;if(F==null||F==undefined){return;}var H=F.getElementsByTagName("comment");if(H.length>0){for(var E=0;E<H.length;E++){var D=H[E];var G=new perfUI.content.userComment(D);G.ContentTypeId=G.user.userId;this.Comments.push(G);}}};this.initUser=function(){if(this.dataSource!=null){this.loadProperties();}};this.initUser();};perfUI.content.user.prototype.loadProperties=function(B){B=B||this.dataSource;if(B==null||B==undefined){return;}this.dataSource=B;var A=PERF.parseNodeNumeric(B,"userId");this.userId=A>0?A:this.userId;this.displayName=PERF.parseNode(B,"displayName");this.status=PERF.parseNode(B,"status");this.thumbUrl=PERF.parseNode(B,"thumbUrl");if(this.thumbUrl.trim().length==0){this.thumbUrl=PERF.parseNode(B,"thumbnailUrl");}this.pictureUrl=PERF.parseNode(B,"pictureUrl");this.gender=PERF.parseNode(B,"gender");this.age=PERF.parseNodeNumeric(B,"age");this.online=PERF.parseNodeBool(B,"online");this.dateLastLogin=PERF.parseNode(B,"lastlogin");this.location1=PERF.parseNode(B,"location1");this.location2=PERF.parseNode(B,"location2");this.location3=PERF.parseNode(B,"location3");this.userGUID=PERF.parseNode(B,"userCode");this.isPerson=PERF.parseNodeBool(B,"person");this.AllowComments=PERF.parseNodeNumeric(B,"allowComments");this.AllowCommentsDescr=PERF.parseNode(B,"allowCommentsReason");this.mutualFriendsCount=PERF.parseNodeNumeric(B,"mutualFriends");this.loadComments();};perfUI.content.userPhoto=function(C,D,B){var A=this;perfUI.content.userPhoto.superclass.constructor.call(this,C,D);this.AllowSpotting=B||false;this.Spots=new Array();this.Spotting=this.AllowSpotting?new SpottingWidget(this.UserId):null;this.onDirtySpots=new YAHOO.util.CustomEvent("spotsDirty",this);this.onLoadImage=new YAHOO.util.CustomEvent("onLoadImage",this);this.ContainerSelectBox=null;this.PictureId=0;this.PictureUrl="";this.OriginalSizeUrl="";this.IsPerfPicture=false;this.viewDetailsUrl="";this.getCategoryUrl=function(){return"/pics/cat.asp?c="+String(this.CategoryId);};this.getFavoritesUrl=function(E){E=E?E:this.SubmittedByGUID;return"/favorites.asp?t=0&id="+E;};this.getContentType=function(){return perfUI.content.userContentType.Picture;};this.getContentId=function(){return this.PictureId;};this.getUrl=function(E,F){F=F||this.PictureId;E=E||PERF.getAbsoluteUrlPathName();return E+F;};this.getEmbeddedUrl=function(){return'<img src="'+this.PictureUrl+'" />';};this.getViewDetailsUrl=function(F){F=F||this.PictureId;var E=PERF.getRelativeUrlPathName();return E+"view.asp?id="+F;};this.loadProperties=function(F){F=F||this.DataSource;if(F==null||F==undefined){return;}this.DataSource=F;this.PictureId=PERF.parseNodeNumeric(F,"pictureId");if(this.PictureId>0){this.viewDetailsUrl=this.getViewDetailsUrl();}this.PictureUrl=PERF.parseNode(F,"pictureUrl");this.OriginalSizeUrl=PERF.parseNode(F,"highUrl");this.IsPerfPicture=PERF.parseNodeBool(F,"submitToPerf");perfUI.content.userPhoto.superclass.loadProperties.call(this);if(this.AllowSpotting){var E=this.DataSource.getElementsByTagName("spots")[0];if(E!=undefined){this.loadSpots(E);}}};this.savePictureSpot=function(G){var H={url:"/api/call.asp",params:"?Function=Media.Pictures.AddSpot&UserID="+this.UserId+"&PictureID="+this.PictureId+"&SpotUserID="+G.UserId+"&x="+G.CoordinateX+"&y="+G.CoordinateY};var F=function(J){};var E=function(J){var K=J.responseXML;var L=PERF.parseNode(K,"error");if(L!=null&&L.trim().length>0){alert(L);A.Spotting.RemoveSpot(null,G);}};var I={success:E,failure:F,scope:A};YAHOO.util.Connect.asyncRequest("GET",H.url+H.params,I,null);};this.saveSpotsListCB=function(G,E){var F=E[0];A.Spots=A.Spotting.Spots;A.Spotting.buildSpotsList();A.onDirtySpots.fire();if(G=="spotSave"){if(!A.Spotting.BatchUpdates){A.savePictureSpot(F);}}};this.attachSpottingTool=function(E,F){this.Spotting.IsModalContainer=false;this.Container=addNode(E,"img","","centerX");var G=function(H){this.onLoadImage.fire();this.Spotting.buildSpotsList();this.Spotting.onSaveSpot.subscribe(this.saveSpotsListCB);this.Spotting.onRemoveSpot.subscribe(this.saveSpotsListCB);this.Spotting.Render(this.Container,E.parentNode);};YAHOO.util.Event.addListener(this.Container,"load",G,this,true);this.Container.title="Click anywhere on the image to start Spotting.";this.Container.src=this.PictureUrl;};this.spotModal=function(K){var I=null;if(this.Spotting.Container.getBody()){I=this.Spotting.Container.getBody();}else{if(this.Spotting.Container.body){I=this.Spotting.Container.body;}}I.innerHTML="";var E=I;var H=this.DataSource.getElementsByTagName("pictureUrl")[0].childNodes[0].nodeValue;var F=document.createElement("img");F.title="Click anywhere on the image to start Spotting.";var J=function(){A.Spotting.Container.hide();};var G=function(O){this.onLoadImage.fire();var N=null;if(this.Spotting.Container.getElement()){N=this.Spotting.Container.getElement();}else{if(this.Spotting.Container.element){N=this.Spotting.Container.element;}}N.style.width=String(F.width+20)+"px";E.appendChild(F);var P=addNode(E,"div","","footer");var M=addNode(P,"div","","spotting");this.Spotting.SpotsListContainer=addNode(M,"div");var L=addNode(P,"button","","buttonnew","Close");YAHOO.util.Event.addListener(L,"click",J);this.Spotting.buildSpotsList();this.Spotting.onSaveSpot.subscribe(this.saveSpotsListCB);this.Spotting.onRemoveSpot.subscribe(this.saveSpotsListCB);this.Spotting.Container.show();this.Spotting.Container.center();this.Spotting.Render(F,F.parentNode);};YAHOO.util.Event.addListener(F,"load",G,this,true);F.src=H;};this.loadSpots=function(I){if(I==null){return;}var E=I.getElementsByTagName("spot");if(I!=null&&E.length>0){if(SpottingWidget!=undefined){for(var G=0;G<E.length;G++){var F=E[G];var H=new this.Spotting.Spot(F);this.Spots.push(H);this.Spotting.Spots.push(H);}}}};this.initPhoto=function(){if(this.DataSource!=null){this.loadProperties();}};this.initPhoto();};YAHOO.extend(perfUI.content.userPhoto,perfUI.content.userContent);userAlbumType={UserAlbum:0,Nights:1,Lights:2};perfUI.content.userAlbum=function(B,C,A){var D=this;perfUI.content.userAlbum.superclass.constructor.call(this,B,C,true);this.TopAlbumIndex=0;this.CoverImageId=0;this.CoverImageUrl="";this.LogoInnerHtml="";this.TotalContents=0;this.AlbumType=0;this.Pictures=[];this.Videos=[];this.Blogs=[];this.getContentType=function(){return perfUI.content.userContentType.Album;};this.getContentId=function(){return this.AlbumId;};this.setCover=function(E){this.CoverImageId=E.PictureId;this.CoverImageUrl=E.ThumbUrl;if(this.Container!=null&&this.Container.tagName=="IMG"){this.Container.src=this.CoverImageUrl;}};this.deleteAlbum=function(E){var F={url:"/api/call.asp",params:"?Function=Media.Pictures.DeleteAlbum&UserID="+this.UserId+"&AlbumID="+this.AlbumId};this.saveChanges(F.url+F.params,E);};this.updateTopAlbum=function(E){this.TopAlbumIndex=E;var F={url:"/api/call.asp",params:"?Function=Media.Pictures.UpdateAlbumTop3&UserID="+this.UserId+"&AlbumID="+this.AlbumId+"&Top3="+this.TopAlbumIndex};this.saveChanges(F.url+F.params);};this.updateAccess=function(E){this.AccessId=E;var F={url:"/api/call.asp",params:"?Function=Media.Pictures.UpdateAlbumAccess&UserID="+this.UserId+"&AlbumID="+this.AlbumId+"&Access="+this.AccessId};this.saveChanges(F.url+F.params);};this.saveChanges=function(G,F){var H=function(J){this.throwErrorGeneral("Unable to save changes.");};var E=function(J){if(F){F();}return;};var I={success:E,failure:H,scope:D};YAHOO.util.Connect.asyncRequest("POST",G,I,null);};this.throwErrorMsg=function(E){alert(E);};this.loadProperties=function(E){E=E||this.DataSource;if(E==null||E==undefined){return;}this.DataSource=E;this.TopAlbumIndex=PERF.parseNodeNumeric(E,"top3");this.CoverImageId=PERF.parseNodeNumeric(E,"coverId");this.CoverImageUrl=PERF.parseNode(E,"coverPictureUrl");this.TotalContents=PERF.parseNodeNumeric(E,"counts");this.LogoInnerHtml=PERF.parseNode(E,"logo");this.AlbumType=PERF.parseNodeNumeric(E,"nightsType");perfUI.content.userAlbum.superclass.loadProperties.call(this);};this.loadPictures=function(G){if(G!=null&&G.getElementsByTagName("picture").length>0){if(A==undefined){if(perfUI.content.userPhoto!=undefined){A=perfUI.content.userPhoto;}}if(A!=undefined){var I=G.getElementsByTagName("picture");for(var H=0;H<I.length;H++){var E=I[H];var F=new A(this.UserId,E);F.AlbumId=this.AlbumId;this.Pictures.push(F);}}}};this.loadVideos=function(H){if(H!=null&&H.getElementsByTagName("video").length>0){var G=H.getElementsByTagName("video");for(var I=0;I<G.length;I++){var E=G[I];var F=new perfUI.content.userVideo(this.UserId,E);F.AlbumId=this.AlbumId;this.Videos.push(F);}}};this.loadBlogs=function(G){if(G!=null&&G.getElementsByTagName("blog").length>0){var I=G.getElementsByTagName("blog");for(var H=0;H<I.length;H++){var F=I[H];var E=new perfUI.content.userBlog(this.UserId,F);E.AlbumId=this.AlbumId;this.Blogs.push(E);}}};this.init=function(){if(this.DataSource!=null){this.loadProperties();var F=this.DataSource.getElementsByTagName("pictures")[0];this.loadPictures(F);var G=this.DataSource.getElementsByTagName("videos")[0];this.loadVideos(G);var E=this.DataSource.getElementsByTagName("blogs")[0];this.loadBlogs(E);}};this.init();};YAHOO.extend(perfUI.content.userAlbum,perfUI.content.userContent);perfUI.content.eventsAlbum=function(A,B){var C=this;perfUI.content.eventsAlbum.superclass.constructor.call(this,A,B);this.Venue="";this.VenueAddress="";this.VenueCity="";this.VenueState="";this.VenueZip="";this.VenueCountry="";this.EventDate="";this.loadProperties=function(D){this.Venue=PERF.parseNode(D,"venue");this.VenueAddress=PERF.parseNode(D,"address");this.VenueCity=PERF.parseNode(D,"city");this.VenueState=PERF.parseNode(D,"state");this.VenueZip=PERF.parseNode(D,"zip");this.VenueCountry=PERF.parseNode(D,"country");this.EventDate=PERF.parseNode(D,"eventDate");};this.initEvents=function(){if(this.DataSource!=null){this.loadProperties(this.DataSource);}};this.initEvents();};YAHOO.extend(perfUI.content.eventsAlbum,perfUI.content.userAlbum);perfUI.content.userAlbumAdvanced=function(A,B){var C=this;perfUI.content.userAlbumAdvanced.superclass.constructor.call(this,A,B);this.DragDropPlayer=null;};YAHOO.extend(perfUI.content.userAlbumAdvanced,perfUI.content.userAlbum);function PagerSimple(A,B){var D=this;var C=perfUI.util.addEl;this.pagerContainer=null;this.pagerDescrContainer=null;this.headerContainer=null;this.pagesContainer=null;this.footerContainer=null;this.Container=A||null;this.CurrentPage=1;this.TotalRecords=0;this.PageSize=1;this.Step=1;this.PagerCss="";this.DataSourceDescription="";this.DataSource=B||null;this.NoRecordDescription="There are 0 "+this.DataSourceDescription;this.Page=function(E,G,F){this.DataSource=E||null;this.DataFrom=G||0;this.DataTo=F||0;};this.Pages=[];this.AlwaysShow=false;this.AlwaysCycle=false;this.ShowDescription=false;this.onPageLoad=new YAHOO.util.CustomEvent("onPageLoad",this);this.ParseXmlProperties=function(E){if(!E){return;}var F=E.getElementsByTagName("paging")[0];if(F==null){return;}this.PageSize=PERF.parseNodeNumeric(F,"pageSize");this.CurrentPage=PERF.parseNodeNumeric(F,"pageNumber");this.TotalRecords=PERF.parseNodeNumeric(F,"totalRecords");};this.pageDisableCss="pageDisable";this.pageHoverCss="pageHover";this.pageCss="page";this.addPageRollOver=function(E){YAHOO.util.Event.addListener(E,"mouseover",this.pageHoverOn);YAHOO.util.Event.addListener(E,"mouseout",this.pageHoverOff);};this.pageHoverOff=function(E){this.className=this.className.replace(D.pageHoverCss,"");};this.pageHoverOn=function(E){if(this.className.indexOf("selectedPage")<0&&this.className.indexOf(D.pageDisableCss)<0){this.className+=" "+D.pageHoverCss;}};this.buildTotalsDescription=function(){if(this.DataSourceDescription.trim().length>0){var E=addNode(this.pagercontainer,"span","","totals");addNode(E,"strong","","",String(this.TotalRecords));addNode(E,"label","","","&nbsp;"+this.DataSourceDescription);}};this.buildPagerFiringObjectsBase=function(){this.Container.innerHTML="";this.pagercontainer=C(this.Container,"ul",{"class":"pager"});if(this.Pages.length>1||this.AlwaysShow){this.headerContainer=C(this.pagercontainer,"li");this.pagesContainer=C(this.pagercontainer,"li");this.footerContainer=addNode(this.pagercontainer,"li");}};this.buildPagerFiringObjects=function(){var F="Previous";var H=perfTranslator.getValue(1784);if(H.trim().length>0){F=H;}this.buildPagerFiringObjectsBase();if(this.Pages.length>1||this.AlwaysShow){var G=addNode(this.headerContainer,"div");var F="Previous";var H=perfTranslator.getValue(1784);if(H.trim().length>0){F=H;}this.buildGoToPreviousPage(G,F);var F="Next";var H=perfTranslator.getValue(1783);if(H.trim().length>0){F=H;}var E=this.buildGoToNextPage(F);this.buildGoToLastPage(E);}};this.buildPagerPages=function(J){if(J!=null){this.DataSource=J;}this.TotalRecords=(this.TotalRecords<=0&&this.DataSource!=null)?this.DataSource.length:this.TotalRecords;var I=this.TotalRecords;if(this.DataSource==null&&I<=0){return;}var G=1;var E=0;var L=0;for(var F=0;F<I;){G=this.Pages.length>0?(this.Pages[this.Pages.length-1].DataTo+1):1;L=G+(this.PageSize-1);E=L<I?L:I;var H=this.DataSource!=null?this.DataSource.slice(F,E):[];var K=new this.Page(H,G,E);this.Pages.push(K);F=E;}};this.buildGoToFirstPage=function(){};this.buildGoToLastPage=function(E){};this.buildPageLinks=function(E){if(E==undefined){E=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var F=addNode(this.pagesContainer,"strong","","",String(this.CurrentPage)+" of "+this.Pages.length);}if(!E){this.onPageLoad.fire(this);}};this.loadPreviousPage=function(E){D.loadPage(E,D.CurrentPage-1);};this.loadNextPage=function(E){D.loadPage(E,D.CurrentPage+1);};this.loadPage=function(G,E){var F=Number(E);if(F==D.CurrentPage){return;}if(D.AlwaysCycle){if(F<=0){D.CurrentPage=D.Pages.length;}else{if(F>D.Pages.length){D.CurrentPage=1;}else{D.CurrentPage=Number(E);}}}else{if(F<=0||F>D.Pages.length){return;}else{D.CurrentPage=Number(E);}}D.buildPageLinks();};}PagerSimple.prototype.Render=function(C,B,A){this.Container.innerHTML="";this.Pages=[];if(C){this.TotalRecords=C.length;}else{this.TotalRecords=B||this.TotalRecords;}this.buildPagerPages(C);this.buildPagerFiringObjects();this.buildTotalsDescription();this.buildPageLinks(A);};PagerSimple.prototype.buildGoToPreviousPage=function(B,C){var F="Go to Previous Page";var A=perfTranslator.getValue(1785);if(A.trim().length>0){F=A;}var E=addNode(B,"div","","pagePrevious");E.title=F;YAHOO.util.Event.addListener(E,"click",this.loadPreviousPage);if(C!=undefined){var D=addNode(B,"a","","pagePrevious",C);D.title=F;PERF.makeLink(D);YAHOO.util.Event.addListener(D,"click",this.loadPreviousPage);}};PagerSimple.prototype.buildGoToNextPage=function(C){var F="Go to Next Page";var B=perfTranslator.getValue(1786);if(B.trim().length>0){F=B;}var A=addNode(this.footerContainer,"div");if(C!=undefined){var E=addNode(A,"a","","pageNext",C);var F=F;var B=perfTranslator.getValue(1786);if(B.trim().length>0){F=B;}E.title=F;PERF.makeLink(E);YAHOO.util.Event.addListener(E,"click",this.loadNextPage);}var D=addNode(A,"div","","pageNext");D.title=F;YAHOO.util.Event.addListener(D,"click",this.loadNextPage);return A;};function PagerControl(B,C,A,D){var E=this;PagerControl.superclass.constructor.call(this,A,D);this.PageSize=B;this.Step=C;this.Render=function(H,G,F){if(this.Container.className.indexOf("pagerAdvanced")<0){this.Container.className+=" pagerAdvanced";}PagerControl.superclass.Render.call(this,H,G,F);};this.buildPagerFiringObjects=function(){this.buildPagerFiringObjectsBase();if(this.Pages.length>1||this.AlwaysShow){var F=addNode(this.headerContainer,"div","","left");this.buildGoToPreviousPage(F);var G=this.buildGoToNextPage();this.buildGoToLastPage(G);}};this.buildGoToFirstPage=function(){var F=addNode(this.headerContainer,"div");var G=addNode(F,"a","","left","First");G.title="Go to First Page";PERF.makeLink(G);YAHOO.util.Event.addListener(G,"click",this.loadPage,1);return F;};this.buildGoToLastPage=function(F){var G=addNode(F,"a","","","Last");G.title="Go to Last Page";PERF.makeLink(G);YAHOO.util.Event.addListener(G,"click",this.loadPage,this.Pages.length);};this.buildGoToNextPage=function(){return PagerControl.superclass.buildGoToNextPage.call(this);};this.buildPageLinks=function(F){if(F==undefined){F=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var H=Math.floor((this.CurrentPage/this.Step))*this.Step;if((this.CurrentPage%this.Step)==0){H-=this.Step;}for(var J=H+1;J<=this.Pages.length&&J<=(H+this.Step);J++){var G=J==this.CurrentPage?"selectedPage":"";var I=addNode(this.pagesContainer,"a","",G,String(J));PERF.makeLink(I);YAHOO.util.Event.addListener(I,"click",this.loadPage,J);}}if(!F){this.onPageLoad.fire(this);}};}YAHOO.extend(PagerControl,PagerSimple);function CommentsPagerControl(B,A){var C=this;CommentsPagerControl.superclass.constructor.call(this,A,null);this.DataSourceDescription="discussions";this.buildTotalsDescription=function(){};this.buildPageLinks=function(F){if(F==undefined){F=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var E=perfTranslator.getValue(765);var D="";if(E.trim().length>0){D=new String(perfTranslator.parseValue(E,[String(this.Pages[this.CurrentPage-1].DataFrom),String(this.Pages[this.CurrentPage-1].DataTo),String(this.TotalRecords)]));}else{D="Showing "+String(this.Pages[this.CurrentPage-1].DataFrom)+" - "+String(this.Pages[this.CurrentPage-1].DataTo)+' of <span class="peachDarkText">'+String(this.TotalRecords)+" "+this.DataSourceDescription+"</span>";}var G=addNode(this.pagesContainer,"strong","","",D);this.pagercontainer.style.width="auto";}if(!F){this.onPageLoad.fire(this);}};}YAHOO.extend(CommentsPagerControl,PagerSimple);function MediaPagerControl(B,C,A,D){var E=this;MediaPagerControl.superclass.constructor.call(this,A,D);this.PageSize=B;this.Step=C;this.Render=function(H,G,F){if(this.Container.className.indexOf("pagerMedia")<0){this.Container.className+=" pagerMedia";}MediaPagerControl.superclass.Render.call(this,H,G,F);};this.containerPrevious=null;this.containerNext=null;this.buildPagerFiringObjects=function(){this.buildPagerFiringObjectsBase();if(this.Pages.length>1||this.AlwaysShow){var G="Previous";var H=perfTranslator.getValue(1784);if(H.trim().length>0){G=H;}this.buildGoToPreviousPage(this.headerContainer,G);this.pagesContainer=addNode(this.pagesContainer,"span");var G="Next";var H=perfTranslator.getValue(1783);if(H.trim().length>0){G=H;}var F=this.buildGoToNextPage(G);}};this.buildGoToPreviousPage=function(G,H){var I="Go to Previous Page";var F=perfTranslator.getValue(1785);if(F.trim().length>0){I=F;}this.containerPrevious=addNode(G,"span","",this.pageCss,"&lt;&nbsp;"+(H?H:""));this.containerPrevious.title=I;YAHOO.util.Event.addListener(this.containerPrevious,"click",this.loadPreviousPage);this.addPageRollOver(this.containerPrevious);};this.buildGoToNextPage=function(G){var H="Go to Next Page";var F=perfTranslator.getValue(1786);if(F.trim().length>0){H=F;}this.containerNext=addNode(this.footerContainer,"span","",this.pageCss,(G?G:"")+"&nbsp;&gt;");this.containerNext.title=H;YAHOO.util.Event.addListener(this.containerNext,"click",this.loadNextPage);this.addPageRollOver(this.containerNext);};this.buildPage=function(F){var G=this.pageCss;G+=F==this.CurrentPage?" selectedPage":"";var H=addNode(this.pagesContainer,"span","",G,String(F));YAHOO.util.Event.addListener(H,"click",this.loadPage,F);this.addPageRollOver(H);};this.buildTotalsDescription=function(){if(this.ShowDescription){var G="pagerDescription";if(this.pagerDescrContainer!=null){this.pagerDescrContainer.innerHTML="";if(!YAHOO.util.Dom.hasClass(this.pagerDescrContainer,G)){YAHOO.util.Dom.addClass(this.pagerDescrContainer,G);}}else{this.pagerDescrContainer=addNode(this.pagercontainer,"div","",G);}var H="";if(this.Pages.length>0){var F=perfTranslator.getValue(765);if(F.trim().length>0){H=new String(perfTranslator.parseValue(F,[String(this.Pages[this.CurrentPage-1].DataFrom),String(this.Pages[this.CurrentPage-1].DataTo),String(this.TotalRecords)]));}else{H=new String("Displaying&nbsp;<strong>"+this.Pages[this.CurrentPage-1].DataFrom)+"-"+String(this.Pages[this.CurrentPage-1].DataTo)+"</strong>&nbsp;of&nbsp;"+String(this.TotalRecords)+"&nbsp;"+this.DataSourceDescription;}}else{H=this.NoRecordDescription;}this.pagerDescrContainer.innerHTML=H;}};this.buildPageLinks=function(F){if(F==undefined){F=false;}if(this.pagesContainer!=null){if(this.CurrentPage>this.Pages.length){this.CurrentPage=this.Pages.length;}this.pagesContainer.innerHTML="";var H=Math.floor((this.CurrentPage/this.Step))*this.Step;if((this.CurrentPage%this.Step)==0){H-=this.Step;}var G=H+this.Step;if(this.Pages.length<G){G=this.Pages.length;}this.buildPage(1);if(this.CurrentPage>this.Step){addNode(this.pagesContainer,"span","","ellipse","...");}for(var I=H+1;I<=G;I++){if(I>1){this.buildPage(I);if(I==G&&I<this.Pages.length){addNode(this.pagesContainer,"span","","ellipse","...");this.buildPage(this.Pages.length);}}}if(this.CurrentPage==1){this.containerPrevious.className+=" "+this.pageDisableCss;}else{this.containerPrevious.className=this.containerPrevious.className.replace(this.pageDisableCss,"");}if(this.CurrentPage==this.Pages.length){this.containerNext.className+=" "+this.pageDisableCss;}else{this.containerNext.className=this.containerNext.className.replace(this.pageDisableCss,"");}}if(!F){this.onPageLoad.fire(this);}};}YAHOO.extend(MediaPagerControl,PagerSimple);perfUI.content.userComment=function(B){var A=this;this.DataSource=B;this.CommentId=0;this.user=null;this.DateCreated="";this.Body="";this.TotalReplies=0;this.LanguageId=0;this.ParentId=0;this.ContentType=null;this.ContentTypeId=0;this.AllowDelete=0;this.AllowReportAbuse=0;this.AllowReplyMessage=0;this.AllowReplyComment=1;this.loadProperties=function(D){D=D||this.DataSource;if(D==null||D==undefined){return;}this.DataSource=D;this.DateCreated=PERF.parseNode(D,"date");this.Body=PERF.parseNode(D,"message");this.CommentId=PERF.parseNode(D,"commentId");this.UserId=PERF.parseNodeNumeric(D,"userId");this.TotalReplies=PERF.parseNodeNumeric(D,"replies");this.LanguageId=PERF.parseNodeNumeric(D,"languageId");this.ParentId=PERF.parseNodeNumeric(D,"parentId");this.UserGUID=PERF.parseNode(D,"userCode");this.AllowDelete=PERF.parseNodeNumeric(D,"allowDelete");this.AllowReportAbuse=PERF.parseNodeNumeric(D,"allowAbuse");var C=D.getElementsByTagName("allowReply");if(C!=null&&C.length==1){this.AllowReplyComment=PERF.parseNodeNumeric(D,"allowReply");}this.AllowReplyMessage=PERF.parseNodeNumeric(D,"allowMessage");this.user=new perfUI.content.user(0,D);};this.init=function(){if(this.DataSource!=null){this.loadProperties();}};this.init();};perfUI.widgets.userCommentsWidget=function(B,C,A,E){scopeWidget=this;var D=perfUI.util.addEl;this.UserId=B||0;this.ContentType=C||0;this.ContentObject=null;this.Container=A||null;this.CurrentLanguageId=0;this.Caption=perfTranslator.getValue(285).trim().length==0?"Comments":perfTranslator.getValue(285);this.Languages=null;this.Tree=null;this.LoginRedirectUrl="";this.AllowComments=0;this.languageFilter=null;this.commentEditor=null;this.commentEditorPanelContainer=A||null;this.commentEditorPanel=null;this.commentEditorPreviewContainer=null;this.headerContainer=null;this.totalCommentsLabel=null;this.commentEditorSubmitMethod=E||null;this.afterRenderComplete=new YAHOO.util.CustomEvent("afterRenderComplete",this);this.treeObject=!this.treeObject?perfUI.widgets.userCommentsWidgetCommentTree:this.treeObject;this.loadNodeComments=function(I){I.children=new Array();for(var G=0;G<this.ContentObject.Comments.length;G++){var L=this.ContentObject.Comments[G];var F=new this.Tree.nodeObject(L,I);if(L.TotalReplies>0){var K=new perfUI.widgets.userCommentsWidgetCommentReplyNode(F,false);}}if(I.pagers==undefined){I.pager.ParseXmlProperties(this.ContentObject.DataSource);}else{for(var G=0;G<I.pagers.length;G++){var H=I.pagers[G];var J=this.ContentObject.DataSource?this.ContentObject.DataSource:this.ContentObject.dataSource;H.ParseXmlProperties(J);}}I.loadComplete();};this.loadLanguageFilter=function(){if(!this.Languages){return;}var G=this.headerContainer;this.languageFilter=addNode(G,"select","","textbox right");var L=this.Languages.getElementsByTagName("language");for(var N=0;N<L.length;N++){var J=L[N];var H=J.getElementsByTagName("id")[0].childNodes[0].nodeValue;var F=J.getElementsByTagName("name")[0].childNodes[0].nodeValue;var I=addNode(this.languageFilter,"option");I.innerHTML=F;I.value=H;}this.languageFilter.value=this.CurrentLanguageId;var K=perfTranslator.getValue(2490);addNode(G,"label","","right",(K.trim().length>0?K:"Select Language")+":");var M=function(O){this.CurrentLanguageId=Number(this.languageFilter.value);this.loadRootComments();};YAHOO.util.Event.addListener(this.languageFilter,"change",M,this,true);};this.getCommentEditorBodyContainer=function(){return this.commentEditor.get("textarea");};this.getCommentEditorBodyHtml=function(){return this.commentEditor.getContent();};this.buildCommentEditorFooter=function(L,J){var O="toggleSelected";var S=this.commentEditor;var N=this.commentEditorPanel.getFooter();N.innerHTML="";var P=S.getContainer();P.style.display="block";var K=this.commentEditorPreviewContainer;K.style.display="none";var R=addNode(N,"center");var F=perfTranslator.getValue(808);var G=addNode(R,"button","","buttonnew",F.trim().length>0?F:"Post Comment");YAHOO.util.Event.addListener(G,"click",L,J);var Q=perfTranslator.getValue(701);var M=addNode(R,"button","","buttonnew",Q.trim().length>0?Q:"Cancel");YAHOO.util.Event.addListener(M,"click",this.HideCommentEditor,this,true);var H=perfTranslator.getValue(809);var U=addNode(R,"a","","",H.trim().length>0?H:"Preview Comment");PERF.makeLink(U);var T=function(){var W=scopeWidget.getCommentEditorBodyHtml();var Y={url:"/api/callna.asp",params:"?function=CustomEncode"};var X=function(a){};var V=function(a){var b=a.responseXML;var f="";try{f=b.getElementsByTagName("response")[0].childNodes[0].nodeValue;}catch(d){}K.innerHTML=f;var c=perfTranslator.getValue(784);M.value=c.trim().length>0?c:"Edit";YAHOO.util.Event.removeListener(M,"click");YAHOO.util.Event.addListener(M,"click",I);U.style.display="none";P.style.display="none";K.style.display="block";};var Z={success:V,failure:X,scope:scopeWidget};W="html="+Url.encode(W);YAHOO.util.Connect.asyncRequest("POST",Y.url+Y.params,Z,W);};var I=function(){M.value=Q.trim().length>0?Q:"Cancel";YAHOO.util.Event.addListener(M,"click",scopeWidget.HideCommentEditor,scopeWidget,true);U.style.display="inline";K.style.display="none";P.style.display="block";};YAHOO.util.Event.addListener(U,"click",T,this,true);};this.buildCommentEditorPanel=function(H){this.commentEditorPanelContainer=addNode(this.commentEditorPanelContainer,"div","","postCommentEditor");this.commentEditorPanel=new perfUI.widgets.panel(this.commentEditorPanelContainer,"540px");this.commentEditorPanel.setBody();this.commentEditorPanel.setFooter();this.commentEditorPanel.render();var K=this.commentEditorPanel.getBody();this.commentEditorPanel.activityIndicator=D(K,"div",{"class":"activityIndicatorLoadModule","innerHTML":"<p>"+perfTranslator.getValue(1864).toLowerCase()+"...</p>"});this.commentEditorPanel.show();this.commentEditorPanel.center();if(!perfUI.widgets.perfEditor){var G=this;var J="";perfUI.util.insertClientScript('var tinyMCE_GZ = {loaded:true}; var tinyMCEPreInit = {suffix:"",base : "'+J+'/includes/js/tinymce/jscripts/tiny_mce"};');var I=function(){tinymce.dom.Event._pageInit();var L=function(){G.buildCommentEditor(H);};var M=perfUI.util.loadClientResource("/includes/js/perfUI/build/perfEditor.js","js",{"fn":L,"obj":G,"scope":true});};var F=perfUI.util.loadClientResource("/includes/js/tinymce/jscripts/tiny_mce/tiny_mce.js","js",{"fn":I,"obj":this,"scope":true});}};this.buildCommentEditor=function(F){if(this.commentEditor){return;}if(document.body.className.indexOf("yui-skin-sam")<0){document.body.className+=" yui-skin-sam";}var H=this.commentEditorPanel.getBody();var G=D(H,"textarea",{"id":"postCommentEditor"+this.UserId,"style":"display:none"});this.commentEditor=new perfUI.widgets.perfEditor(G.id);this.commentEditor.onPostRender.add(F);this.commentEditorPreviewContainer=addNode(H,"div");this.commentEditorPreviewContainer.style.display="none";this.commentEditorPreviewContainer.className="previewPost";this.commentEditor.render();};this.onSuccessDeleteComment=function(F){var G=F.responseXML;var H=this.Tree.hasErrors(F);if(!H){this.loadResponseContentObject(G);this.Render();this.HideCommentEditor();}};this.onSuccessAddNewComment=function(I,G,M,K){M=M||null;var H=G.responseXML;var J=this.Tree.hasErrors(G);if(!J){var L=this.Tree.getResponseResult(G,this.addCommentsParam);if(L.trim().length>0){alert(L);}if(K){this.loadResponseContentObject(H);if(M!=null){this.buildHeaderContents();var F=null;if(M.children.length>0){M.removeChildren();}M.appendCommentReplyBoxContainer();F=new perfUI.widgets.userCommentsWidgetCommentReplyNode(M,true);F.comment.TotalReplies=this.ContentObject.Comments.length;M.renderChildren();this.loadNodeComments(F);}else{this.Render();}}this.HideCommentEditor();}I.value="Post Comment";I.disabled=false;};this.attachShowCommentEditorEvent=function(F){scopeWidget.ShowCommentEditor(F);};this.getContentIdParam=function(){return this.ContentObject.getContentId();};};perfUI.widgets.userCommentsWidget.prototype.ShowCommentEditor=function(B){switch(this.AllowComments){case 0:location.href=this.LoginRedirectUrl;return;case 1:break;case 2:if(this.ContentObject.AllowCommentsDescr.trim().length>0){alert(this.ContentObject.AllowCommentsDescr);}else{var C=perfTranslator.getValue(2492);alert(C.trim().length==0?"You do not have the necessary permission to post comments.":C);}return;}var A=function(){scopeWidget.buildCommentEditorFooter(scopeWidget.commentEditorSubmitMethod,B);scopeWidget.commentEditorPanel.show();if(scopeWidget.commentEditorPanel.activityIndicator){scopeWidget.commentEditorPanel.activityIndicator.style.display="none";}scopeWidget.commentEditor.show();scopeWidget.commentEditorPanel.center();scopeWidget.commentEditor.focus();};if(this.commentEditorPanel==null){this.buildCommentEditorPanel(A);}else{A();}};perfUI.widgets.userCommentsWidget.prototype.HideCommentEditor=function(){if(this.commentEditor!=null){this.commentEditor.setContent("");this.commentEditor.hideAll();}if(this.commentEditorPanel!=null){this.commentEditorPanel.hide();}};perfUI.widgets.userCommentsWidget.prototype.LoadLanguagesXml=function(A){var C=null;if(typeof(A)=="string"){if(YAHOO.env.ua.ie>0){C=new ActiveXObject("Microsoft.XMLDOM");}else{if(document.implementation&&document.implementation.createDocument){C=document.implementation.createDocument("","",null);if(DOMParser){Document.prototype.loadXML=function(H){var F=new DOMParser();var D=F.parseFromString(H,"text/xml");while(this.hasChildNodes()){this.removeChild(this.lastChild);}for(var E=0;E<D.childNodes.length;E++){var G=this.importNode(D.childNodes[E],true);this.appendChild(G);}};}}}C.loadXML(A);}else{var B=A.getElementsByTagName("languages");if(B!=null&&B.length==1){C=B[0];}}this.Languages=C;};perfUI.widgets.userCommentsWidget.prototype.buildHeaderContents=function(A){this.headerContainer.innerHTML="";var F=addNode(this.headerContainer,"div","","left");addNode(F,"strong","","left peachDarkText",this.Caption);var C=addNode(F,"div","","left");addNode(C,"div","","postComment");var E=perfTranslator.getValue(808);var B=addNode(C,"a","","left",E.trim().length>0?E:"Post Comment");PERF.makeLink(B);var D=function(){scopeWidget.ShowCommentEditor();};YAHOO.util.Event.addListener(C,"click",D);this.loadLanguageFilter();};perfUI.widgets.userCommentsWidget.prototype.renderTree=function(C,F,D,A){this.Container=C||this.Container;if(this.Container==null){return;}this.Container.innerHTML="";var E=addNode(this.Container,"div","","separator");this.headerContainer=addNode(this.Container,"div","","caption bgSection left");this.buildHeaderContents();var C=addNode(this.Container,"div","","bgContainer bglb clear");this.Tree=new this.treeObject(C);this.Tree.loadNodeDataMethod=F;this.Tree.postCommentMethod=D;this.Tree.deleteCommentMethod=A;var B=this.Tree.getRoot();this.loadNodeComments(B);};perfUI.widgets.userCommentsWidget.prototype.addNewComment=function(H,D,K,J){J=J==undefined?true:J;var B=YAHOO.util.Event.getTarget(H);var E=this.getCommentEditorBodyHtml();var I=D?D.comment.ContentTypeId:this.getContentIdParam();var G=(D?D.pager:(this.Tree?this.Tree.getRoot().pager:null));if(E.trim().length==0){var A=perfTranslator.getValue(2488);alert(A.trim().length>0?A:"You have not entered any text.");return;}E=E.replace(new RegExp("&lt;embed ","g"),"&lt;embed wmode=opaque ");var N={url:"/api/call.asp",params:"?Function="+this.addCommentsParam+"&UserID="+this.UserId+"&"+this.contentIdParam+"="+I+"&page="+(G?G.CurrentPage:"1")+"&numrecords="+(G?G.PageSize:"10")+"&lid="+this.CurrentLanguageId+"&ParentID="+(D?D.comment.CommentId:"0")+"&refresh="+(J?"1":"0")+"&sid="+Math.random()};var F=function(Q){this.handleFailure(Q);};var C=function(Q){this.onSuccessAddNewComment(B,Q,D,J);};var P={success:C,failure:F,scope:scopeWidget};B.disabled=true;var M=perfTranslator.getValue(2487);B.value=M.trim().length>0?M:"Submitting ...";var O=this.AlbumType==1?"perfnights":"";var L=this.ContentObject.CategoryId>0?this.ContentObject.CategoryId:"";LOTCC.bcpw("act","posting comments","int",K,"med",K,"int",L,"med",O);E="m="+Url.encode(E);YAHOO.util.Connect.asyncRequest("POST",N.url+N.params,P,E);};perfUI.widgets.userCommentsWidget.prototype.loadRootComments=function(B){var C=this;var G=this.ContentObject.getContentId();var E={url:"/api/call.asp",params:"?Function="+this.loadRootCommentsParam+"&UserID="+this.UserId+"&"+this.contentIdParam+"="+G+"&page="+(this.Tree?this.Tree.getRoot().pager.CurrentPage:"1")+"&lid="+this.CurrentLanguageId+"&ParentID=0&sid="+Math.random()};var D=function(H){this.handleFailure(H);};var A=function(H){var I=H.responseXML;this.loadResponseContentObject(I);if(B){B();}else{this.Render();}this.Tree.root.containerActivity.style.display="none";};var F={success:A,failure:D,scope:C};YAHOO.util.Connect.asyncRequest("GET",E.url+E.params,F,null);};perfUI.widgets.userCommentsWidget.prototype.loadNodeData=function(A,E){var J=this;var D=this.ContentObject.getContentId();var G={url:"/api/call.asp",params:"?Function="+this.loadRootCommentsParam+"&UserID="+scopeWidget.UserId+"&"+this.contentIdParam+"="+D+"&page="+A.pager.CurrentPage+"&lid="+scopeWidget.CurrentLanguageId+"&ParentID="+(A.comment?A.comment.CommentId:"0")+"&sid="+Math.random()};var C=function(K){this.handleFailure(K);};var B=function(K){var L=K.responseXML;this.loadResponseContentObject(L);this.loadNodeComments(A);};var I={success:B,failure:C,scope:J};var H=this.AlbumType==1?"perfnights":"";var F=this.ContentObject.CategoryId>0?this.ContentObject.CategoryId:"";LOTCC.bcpw("act","checking comments","int",E,"med",E,"int",F,"med",H);YAHOO.util.Connect.asyncRequest("GET",G.url+G.params,I,null);};perfUI.widgets.userCommentsWidget.prototype.deleteNodeData=function(A){var I=this;var F=this.getContentIdParam();var E=this.Tree?this.Tree.getRoot().pager:null;var C=perfTranslator.getValue(482);if(!confirm(C.trim().length==0?"Are you sure you want to delete this comment?":C)){return;}var G={url:"/api/call.asp",params:"?Function="+this.deleteCommentsParam+"&UserID="+this.UserId+"&"+this.contentIdParam+"="+F+"&lid="+this.CurrentLanguageId+"&ParentID="+A.comment.CommentId+"&page="+(E?E.CurrentPage:"1")+"&numrecords="+(E?E.PageSize:"10")+"&sid="+Math.random()};var D=function(J){this.handleFailure(J);};var B=function(J){this.onSuccessDeleteComment(J);};var H={success:B,failure:D,scope:I};YAHOO.util.Connect.asyncRequest("GET",G.url+G.params,H,null);};perfUI.widgets.blogCommentsWidget=function(B,A){var D=this;var C=function(F,E){D.addNewComment(F,E);};perfUI.widgets.blogCommentsWidget.superclass.constructor.call(this,B,perfUI.content.userContentType.Blog,A,C);this.AlbumType=0;this.contentIdParam="blogid";this.loadRootCommentsParam="Media.Blogs.GetBlogComments";this.deleteCommentsParam="Media.Blogs.DeleteBlogComment";this.addCommentsParam="Media.Blogs.InsertBlogComment";this.loadResponseContentObject=function(F){this.LoadLanguagesXml(F);var E=new perfUI.content.userAlbum(this.UserId,F.getElementsByTagName("album")[0]);this.ContentObject=E.Blogs[0];};this.addNewComment=function(F,E){perfUI.widgets.blogCommentsWidget.superclass.addNewComment.call(D,F,E,"blogs");};this.loadRootComments=function(){perfUI.widgets.blogCommentsWidget.superclass.loadRootComments.call(D);};this.loadNodeData=function(E){perfUI.widgets.blogCommentsWidget.superclass.loadNodeData.call(D,E,"blogs");};this.deleteNodeData=function(E){perfUI.widgets.blogCommentsWidget.superclass.deleteNodeData.call(D,E);};this.Render=function(F){var G=this.loadNodeData;var E=this.attachShowCommentEditorEvent;var H=this.deleteNodeData;perfUI.widgets.blogCommentsWidget.superclass.renderTree.call(this,F,G,E,H);D.afterRenderComplete.fire();};};YAHOO.extend(perfUI.widgets.blogCommentsWidget,perfUI.widgets.userCommentsWidget);perfUI.widgets.pictureCommentsWidget=function(B,A){var D=this;var C=function(F,E){D.addNewComment(F,E);};perfUI.widgets.pictureCommentsWidget.superclass.constructor.call(this,B,perfUI.content.userContentType.Picture,A,C);this.AlbumType=0;this.contentIdParam="pictureid";this.loadRootCommentsParam="Media.Pictures.GetPictureComments";this.deleteCommentsParam="Media.Pictures.DeletePictureComment";this.addCommentsParam="Media.Pictures.InsertPictureComment";this.loadResponseContentObject=function(F){this.LoadLanguagesXml(F);var E=new perfUI.content.userAlbum(this.UserId,F.getElementsByTagName("album")[0]);this.ContentObject=E.Pictures[0];};this.addNewComment=function(F,E){perfUI.widgets.pictureCommentsWidget.superclass.addNewComment.call(D,F,E,"pictures");};this.loadRootComments=function(){perfUI.widgets.pictureCommentsWidget.superclass.loadRootComments.call(D);};this.loadNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.loadNodeData.call(D,E,"pictures");};this.deleteNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.deleteNodeData.call(D,E);};this.Render=function(F){var G=this.loadNodeData;var E=this.attachShowCommentEditorEvent;var H=this.deleteNodeData;perfUI.widgets.pictureCommentsWidget.superclass.renderTree.call(this,F,G,E,H);D.afterRenderComplete.fire();};};YAHOO.extend(perfUI.widgets.pictureCommentsWidget,perfUI.widgets.userCommentsWidget);perfUI.widgets.videoCommentsWidget=function(B,A){var D=this;var C=function(F,E){D.addNewComment(F,E);};perfUI.widgets.videoCommentsWidget.superclass.constructor.call(this,B,perfUI.content.userContentType.Video,A,C);this.contentIdParam="videoid";this.loadRootCommentsParam="Media.Videos.GetVideoComments";this.deleteCommentsParam="Media.Videos.DeleteVideoComment";this.addCommentsParam="Media.Videos.InsertVideoComment";this.loadResponseContentObject=function(F){this.LoadLanguagesXml(F);var E=new perfUI.content.userAlbum(this.UserId,F.getElementsByTagName("album")[0]);this.ContentObject=E.Videos[0];};this.addNewComment=function(F,E){perfUI.widgets.pictureCommentsWidget.superclass.addNewComment.call(D,F,E,"videos");};this.loadRootComments=function(E){perfUI.widgets.pictureCommentsWidget.superclass.loadRootComments.call(D,E);};this.loadNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.loadNodeData.call(D,E,"videos");};this.deleteNodeData=function(E){perfUI.widgets.pictureCommentsWidget.superclass.deleteNodeData.call(D,E);};this.Render=function(F){var E=function(){var H=D.loadNodeData;var G=D.attachShowCommentEditorEvent;var I=D.deleteNodeData;perfUI.widgets.videoCommentsWidget.superclass.renderTree.call(D,F,H,G,I);D.afterRenderComplete.fire();};if(this.Tree==null){this.loadRootComments(E);}else{E();}};};YAHOO.extend(perfUI.widgets.videoCommentsWidget,perfUI.widgets.userCommentsWidget);perfUI.widgets.userCommentsWidgetCommentTree=function(A){this.container=A;this.loadNodeDataMethod=null;this.postCommentMethod=null;this.deleteCommentMethod=null;this.root=null;this.nodeCount=0;this.nodeObject=!this.nodeObject?perfUI.widgets.userCommentsWidgetCommentNode:this.nodeObject;this.hasErrors=function(B){var C=B.responseXML;var D=C.getElementsByTagName("errors");if(D.length==1){var E=PERF.parseNode(D[0],"error");alert(E);return true;}return false;};this.getResponseResult=function(B,F){var C=B.responseXML;var E=C.getElementsByTagName("function");for(var D=0;D<E.length;D++){if(E[D].getAttribute("id")==F){return result=PERF.parseNode(E[D],"result");}}return"";};this.getRoot=function(){return this.root;};this.init=function(){this.root=new this.nodeObject();this.root.tree=this;this.root.depth=-1;this.root.container=this.container;this.root.containerBody=this.container;var B=perfTranslator.getValue(1864);this.root.containerActivity=perfUI.util.addEl(this.container,"div",{"class":"activityIndicator","innerHTML":"<p>"+(B.trim().length==0?"loading":B)+"...</p>"});this.root.containerActivity.style.display="none";this.root.childNodesContainer=addNode(this.container,"div");};this.init();};perfUI.widgets.userCommentsWidgetCommentNode=function(C,A,B){this.container=null;this.containerBody=null;this.comment=C;this.isExpanded=B==undefined?true:B;this.showThumbnail=this.showThumbnail?this.showThumbnail:false;this.pager=new CommentsPagerControl();this.toggle=null;this.toggleLabel=null;this.parent=A;this.children=new Array();this.childNodesContainer=null;this.containerActivity=null;this.tree=null;this.depth=-1;this.commentEditorSubmitMethod=null;this.renderChildren=function(){for(var E=0;E<this.children.length;E++){var D=this.children[E];D.buildContainer();if(D.children.length>0){D.children[0].buildContainer();}}};this.removeChildren=function(){this.childNodesContainer.parentNode.removeChild(this.childNodesContainer);this.childNodesContainer=null;this.children=new Array();};this.appendCommentBoxContainer=function(D){return addNode(D,"div","","commentBox");};this.appendCommentReplyBoxContainer=function(){this.childNodesContainer=this.appendCommentBoxContainer(this.containerBody);this.childNodesContainer.className+=" rpl";};this.appendHeader=function(D){return addNode(D,"div","","hdr");};this.appendShowHideIcon=function(D){return addNode(D,"div");};this.postCommentMethodEvent=function(D){this.tree.postCommentMethod(this);};this.deleteCommentMethodEvent=function(D){this.tree.deleteCommentMethod(this);};this.renderPager=function(D){if(this.pager.Container==null){var F=D||this.containerBody;var E=addNode(F,"div");this.pager.Container=E;this.pager.Render(null,this.pager.TotalRecords,true);this.pager.onPageLoad.subscribe(this.pagerFireEvent,this,true);addNode(this.containerBody,"br");}};this.buildContainer=function(){var T=C.TotalReplies>0?true:false;var K=this.appendCommentBoxContainer(this.parent.childNodesContainer);var E=this.appendHeader(K);if(this.comment.AllowReportAbuse==1){var O=addNode(E,"span","r"+this.comment.CommentId,"reportIcon");var J=perfTranslator.getValue(1189);O.title=J.trim().length==0?"Report Abuse":J;var M=function(){reportit(3,this.comment.user.userId,"",this.comment.CommentId);};YAHOO.util.Event.addListener(O,"click",M,this,true);}if(this.comment.AllowDelete==1){var P=addNode(E,"span","","deleteCommentIcon");var R=perfTranslator.getValue(316);P.title=R.trim().length==0?"Delete Comment":R;YAHOO.util.Event.addListener(P,"click",this.deleteCommentMethodEvent,this,true);}if(this.comment.AllowReplyMessage==1){var D=addNode(E,"span","","replyMessage");var Q=perfTranslator.getValue(2485);D.title=Q.trim().length==0?"Reply with Message":Q;var N=function(){location.href="http://www.perfspot.com/messagepost.asp?id="+this.comment.user.userGUID+"&cid="+this.comment.CommentId;};YAHOO.util.Event.addListener(D,"click",N,this,true);}if(this.comment.AllowReplyComment==1){var F=addNode(E,"span","","replyComment");var S=perfTranslator.getValue(2484);F.title=S.trim().length==0?"Reply with Comment":S;YAHOO.util.Event.addListener(F,"click",this.postCommentMethodEvent,this,true);}if(this.showThumbnail){var I=function(){location.href=this.comment.user.getProfileUrl();};var H=addNode(E,"img","","thumbnailSmall");H.src=this.comment.user.thumbUrl;YAHOO.util.Event.addListener(H,"click",I,this,true);}var G=addNode(E,"a","","displayName",this.comment.user.displayName);G.href=this.comment.user.getProfileUrl();this.comment.user.attachToolTip(G);if(this.showThumbnail){addNode(E,"br");}var U=perfTranslator.getValue(217).trim().length==0?"Date":perfTranslator.getValue(217);addNode(E,"span","","datePosted",U+":&nbsp;"+C.DateCreated);var L=this.appendBody(K);addNode(L,"div","","commentBody",this.comment.Body);if(T){this.appendCommentReplyBoxContainer();}this.container=K;};this.init=function(){if(this.parent!=null){this.tree=this.parent.tree;this.parent.children.push(this);this.depth=this.parent.depth+1;}this.commentEditorSubmitMethod=this.addNewComment;};this.init();};perfUI.widgets.userCommentsWidgetCommentNode.prototype.pagerFireEvent=function(A){if(this.containerActivity){this.containerActivity.style.display="block";}this.containerActivity.style.display="block";this.tree.loadNodeDataMethod(this);};perfUI.widgets.userCommentsWidgetCommentNode.prototype.loadComplete=function(){if(this.childNodesContainer!=null){this.childNodesContainer.innerHTML="";}this.renderChildren();if(this.pager.TotalRecords>this.pager.PageSize){this.renderPager();}if(this.toggle!=null){this.buildHideRepliesLabel();this.toggle.doExpand();}if(this.containerActivity){this.containerActivity.style.display="none";}};perfUI.widgets.userCommentsWidgetCommentNode.prototype.appendBody=function(B){var A=addNode(B,"div","","bdy");this.containerBody=A;return A;};perfUI.widgets.userCommentsWidgetCommentReplyNode=function(A,B){perfUI.widgets.userCommentsWidgetCommentReplyNode.superclass.constructor.call(this,A.comment,A,B);this.pager.DataSourceDescription="replies";this.buildHeaderContents=function(){};this.buildContainer=function(){this.container=this.parent.childNodesContainer;this.container.innerHTML="";var E=this.appendHeader(this.container);E.className+=" rplhdr";var D=this.appendShowHideIcon(E);this.toggleLabel=addNode(E,"a");PERF.makeLink(this.toggleLabel);if(this.isExpanded){this.buildHideRepliesLabel();}else{this.buildShowRepliesLabel();}var C=this.appendBody(this.container);this.toggle=new perfUI.widgets.showHideContainer(D,C,!this.isExpanded);this.toggle.autoEvents=false;YAHOO.util.Event.addListener(this.toggleLabel,"click",this.toggle.toggle,this.toggle,true);this.toggle.onExpandClick.subscribe(this.expand,this,true);this.toggle.onCollapseClick.subscribe(this.collapse,this,true);this.childNodesContainer=addNode(C,"div");};this.expand=function(){if(this.children.length==0){this.buildLoadingRepliesLabel();this.toggle.setLoadingIconCss();this.tree.loadNodeDataMethod(this);}else{this.buildHideRepliesLabel();this.toggle.doExpand();}};this.collapse=function(){this.buildShowRepliesLabel();this.toggle.doCollapse();};this.buildHideRepliesLabel=function(){var C=perfTranslator.getValue(2494);if(C.trim().length==0){this.toggleLabel.innerHTML="Hide "+String(this.comment.TotalReplies)+" Replies to this Comment";}else{this.toggleLabel.innerHTML=perfTranslator.parseValue(C,[String(this.comment.TotalReplies)]);}};this.buildShowRepliesLabel=function(){var C=perfTranslator.getValue(2493);if(C.trim().length==0){this.toggleLabel.innerHTML="View "+String(this.comment.TotalReplies)+" Replies to this Comment";}else{this.toggleLabel.innerHTML=perfTranslator.parseValue(C,[String(this.comment.TotalReplies)]);}};this.buildLoadingRepliesLabel=function(){var C=perfTranslator.getValue(1864);this.toggleLabel.innerHTML=(C.trim().length==0?"Loading":C)+"...";};};YAHOO.extend(perfUI.widgets.userCommentsWidgetCommentReplyNode,perfUI.widgets.userCommentsWidgetCommentNode);function ContentSharingWidget(C,B,A){var E=this;var D=null;this.maxAllowedRecipients=30;this.selectionTool=function(F){this.Container=F;this.BodyContainer=null;this.ButtonCancel=null;this.ButtonSubmit=null;this.Input=null;this.ResultsContainer=null;this.AutoComp=null;this.MessageContainer=null;this.SelectedItems=[];this.SelectedArrowToItems=[];this.LanguageFilter=null;this.defaultValue="Enter friend's name or email address above.";};this.loadLanguagesFilter=function(){var F=new perfUI.widgets.languages();F.loadLanguagesDropDown(this.LanguageFilter,B);};this.autoCompleteSearchFriends=function(){var G="/api/call.asp";var I=new YAHOO.util.XHRDataSource(G,["user","displayName","isMe","thumbnailUrl","userId"]);I.responseType=YAHOO.util.XHRDataSource.TYPE_XML;I.responseSchema={resultNode:"user",fields:["displayName","userId","isMe","thumbnailUrl","userCode"]};I.scriptQueryAppend="Function=Media.Pictures.GetFriendsAuto&UserID="+this.UserId;var Q=function(S,W){var V=[];var Y=S.displayName.split(" ");var X=false;for(var U=0;U<Y.length;U++){var T=Y[U];if(!X){var Z=T.toLowerCase().indexOf(W.toLowerCase());if(Z>=0){if(Z>0){V.push(T.substr(0,Z));}V.push(" ","<strong>",T.substr(Z,W.length),"</strong>",T.substr(Z+W.length));X=true;}else{V.push(" ",T);}}else{V.push(" ",T);}}return V.join("").trim();};var H=function(W,V,U){var T=Q(W,V);var S=['<img class="thumbnail" src="',W.thumbnailUrl,'"></img><span class="displayName">',T,(W.isMe.toLowerCase()=="true"?'<em class="txtdblue">&nbsp;*me</em>':""),"</span>"];return(S.join(""));};var J={autoHighlight:true,useShadow:false,resultTypeList:false,formatResult:H,minQueryLength:0,animVert:true,queryMatchContains:true,delimChar:new Array(";",","),typeAhead:true};var R=new YAHOO.widget.AutoComplete(D.Input,D.ResultsContainer,I,J);R.appendItems=[];var M=function(){R.setBody("<ul><li>"+D.defaultValue+"</li></ul>");D.ResultsContainer.childNodes[0].style.height="19px";};var L=function(S){if(D.Input.value.trim().length==0){M();}};R.textboxFocusEvent.subscribe(L);var O=function(S,T){if(D.Input.value.trim().length==0){M();}};R.textboxKeyEvent.subscribe(O);var F=function(U,T){var S=perfTranslator.getValue(1864);S=(S.trim().length<=0?"loading":S)+"...";this.setBody('<ul class="noData"><li>'+S+"</li></ul>");this.alwaysShowContainer=true;this._toggleContainer(true);};R.dataRequestEvent.subscribe(F);var K=function(T,S){if(S[2].length==0){R.alwaysShowContainer=true;R.setBody("<ul><li>You can type an email address... </li></ul>");}else{R.alwaysShowContainer=false;}};R.dataReturnEvent.subscribe(K);var N=function(T,S){R.alwaysShowContainer=false;D.SelectedItems.push(S[2]);};R.itemSelectEvent.subscribe(N);var P=function(U,T){var S=T[1];var V=this.getListItemData(S);D.SelectedArrowToItems.push(V);};R.itemArrowToEvent.subscribe(P);return R;};this.buildWidget=function(){var N=YAHOO.env.ua.ie>0?280:250;var V=YAHOO.env.ua.ie>0?330:305;this.Recipients=new Array();this.Container.getBody().innerHTML="";D=new E.selectionTool();D.Container=addNode(this.Container.getBody(),"div","","sharingWidget");D.Container.style.display="none";var G=addNode(D.Container,"div","","header");addNode(G,"strong","","peachDarkText left","Share With Friends");var L=addNode(G,"div","","closeIcon");YAHOO.util.Event.addListener(L,"click",E.Close,E,true);var O=addNode(D.Container,"div","","dialogBody clear");D.ContainerBody=O;var I=addNode(O,"div","","albumFrameIcon_dragDrop");var b=addNode(I,"img","","dragDropPlayer_albumsEditor");var M="";var P="";var R="";var J=this.ContentObj.getContentType();switch(J){case perfUI.content.userContentType.Album:M=this.ContentObj.CoverImageUrl;P=this.ContentObj.Subject;R=this.ContentObj.Description;break;case perfUI.content.userContentType.Picture:M=this.ContentObj.PictureUrl;P=this.ContentObj.Subject;R=this.ContentObj.Description;break;case perfUI.content.userContentType.Video:var Z=this.ContentObj;M=Z.ThumbUrl;P=Z.Subject;R="";break;case perfUI.content.userContentType.Blog:var H=this.ContentObj;M=H.getIconUrl();P=H.Subject;R="";break;}b.src=M;var X=addNode(O,"p","","left");addNode(X,"strong","","txtdblue",P);addNode(X,"br");addNode(X,"span","","txtdblue",R);var a=addNode(O,"div","","formz");var W=addNode(a,"div","","row");addNode(W,"label","","left","To:");var F=addNode(W,"textarea","","textbox");F.title="Maximum "+this.maxAllowedRecipients+" recipients.";F.style.height="40px";var T=addNode(W,"div");D.Input=F;D.ResultsContainer=T;D.AutoComp=E.autoCompleteSearchFriends();var K=addNode(a,"div","","row");addNode(K,"label","","left","Message:");D.MessageContainer=addNode(K,"textarea","","textbox");var U=addNode(a,"div","","row");addNode(U,"label","","left","Language:");this.LanguageFilter=addNode(U,"select","","textbox");this.loadLanguagesFilter();var S=addNode(O,"div","","footer clear");var Y=addNode(S,"button","","buttonnew","Submit");YAHOO.util.Event.addListener(Y,"click",this.submitRecipients,this,true);var Q=addNode(S,"button","","buttonnew","Cancel");YAHOO.util.Event.addListener(Q,"click",this.Close,this,true);D.ButtonCancel=Q;D.ButtonSubmit=Y;D.Container.style.display="block";};this.UserId=C;this.ContentObj=null;this.Container=A||null;this.Recipients=new Array();this.onSubmitRecipients=new YAHOO.util.CustomEvent("recipientsSubmit",this);this.Render=function(F){if(F!=undefined&&this.Container==null){YAHOO.util.Dom.addClass(F,"yui-skin-sam");this.Container=new perfUI.widgets.panel(F);this.Container.setBody();this.Container.render();}};this.Load=function(F){this.ContentObj=F;this.buildWidget();this.Container.center();this.Container.show();this.Container.center();};this.Close=function(F){this.Container.hide();};this.displaySubmitStatus=function(G){D.ContainerBody.innerHTML="";var F=addNode(D.ContainerBody,"div","","statusMsg");addNode(F,"p","","",G);var H=addNode(F,"button","","buttonnew","Close");YAHOO.util.Event.addListener(H,"click",E.Close,E,true);};this.submitRecipients=function(J){var M="";if(D.Input.value.trim().length==0){alert("Please enter your friend's name or email in the list.");D.Input.focus();return;}var F=[];F=D.Input.value.split(/[;,]/);var P=F.clean(" ");if(F.length==0){this.displayUnableToSubmit("Unable to share at this time. Please try again.");return;}if(F.length>this.maxAllowedRecipients){alert("You have included "+F.length+" recipients. You may not exceed "+this.maxAllowedRecipients+" recipients.");D.Input.focus();return;}D.ButtonSubmit.value="Sending...";var O=function(){var b=null;if(YAHOO.env.ua.ie>0){b=new ActiveXObject("Microsoft.XMLDOM");}else{if(document.implementation&&document.implementation.createDocument){b=document.implementation.createDocument("","",null);}}if(b==null){scopeEditor.throwErrorGeneral(msgBrowserNotCompatible);}var h=b.createElement("functions");b.appendChild(h);var R=b.createElement("function");h.appendChild(R);var Q=b.createAttribute("id");var V=E.ContentObj.getContentType();switch(V){case perfUI.content.userContentType.Album:case perfUI.content.userContentType.Picture:M="Media.Pictures.ShareAlbum";break;case perfUI.content.userContentType.Video:M="Media.Videos.ShareVideo";break;case perfUI.content.userContentType.Blog:M="Media.Blogs.ShareBlog";break;}Q.nodeValue=M;var U=b.createElement("album");R.appendChild(U);var c=b.createElement("albumId");U.appendChild(c);c.appendChild(b.createTextNode(E.ContentObj.AlbumId));var f="";switch(V){case perfUI.content.userContentType.Album:f="album";break;case perfUI.content.userContentType.Picture:f="picture";break;case perfUI.content.userContentType.Video:f="video";break;case perfUI.content.userContentType.Blog:f="blog";break;}var p=b.createElement(f+"s");U.appendChild(p);var Z=b.createElement(f);p.appendChild(Z);var S=b.createElement(f+"Id");Z.appendChild(S);S.appendChild(b.createTextNode(E.ContentObj.getContentId()));var Y=b.createElement("message");R.appendChild(Y);Y.appendChild(b.createCDATASection(Url.encode(D.MessageContainer.value)));var o=b.createElement("recipients");R.appendChild(o);var n=b.createElement("friends");o.appendChild(n);var W=b.createElement("emails");o.appendChild(W);for(var e=0;e<F.length;e++){var X=F[e].trim().toLowerCase();var g=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(g.test(X)){var T=b.createElement("emailAddress");T.appendChild(b.createCDATASection(Url.encode(X)));W.appendChild(T);}else{var d=false;for(var m=0;m<D.SelectedItems.length;m++){if(K(b,n,X,D.SelectedItems[m])){d=true;break;}}if(!d){for(var l=0;l<D.SelectedArrowToItems.length;l++){if(K(b,n,X,D.SelectedArrowToItems[l])){break;}}}}}var a="";if(YAHOO.env.ua.ie>0){a=b.xml;}else{if(XMLSerializer){var k=new XMLSerializer();a=k.serializeToString(b);}}return a;};var K=function(U,Q,T,S){if(T==S.displayName.toLowerCase()){var R=U.createElement("userId");R.appendChild(U.createTextNode(S.userId));Q.appendChild(R);return true;}};var G="xml="+O();var L={url:"/api/call.asp",params:"?Function="+M+"&UserID="+this.UserId+"&lid="+this.LanguageFilter.value};var I=function(Q){this.throwErrorGeneral(msgGeneric);};var H=function(R){var Q=PERF.parseNodeBool(R.responseXML,"success");var S="";if(Q){S="A message has been successfully sent to your friends.";}else{S="Unable to share at this time. Please try again.";}this.displaySubmitStatus(S);};var N={success:H,failure:I,scope:E};YAHOO.util.Connect.asyncRequest("POST",L.url+L.params,N,G);};}perfUI.widgets.panel=function(A,K,F,L){var D=YAHOO.util.Dom;var H=perfUI.util.addEl;var M=YAHOO.util.Event;var Q=null;var C=null;var E=null;var G=null;var J=null;var N=null;var I=null;var O=null;var P=false;var B=false;this.container=A||null;this.width=K||"auto";this.height=F||"auto";this.panelCss="";this.elementCss="yui-panel";this.headerCss="hd";this.bodyCss="bd";this.footerCss="ft";this.modal=L==undefined?true:L;this.afterRenderComplete=new YAHOO.util.CustomEvent("afterRenderComplete",this);this.onShowEvent=new YAHOO.util.CustomEvent("onShowEvent",this);this.onHideEvent=new YAHOO.util.CustomEvent("onHideEvent",this);this.afterRenderComplete.subscribe(function(){B=true;},this);this.isRendered=function(){return B;};this.setMask=function(R){Q=R;};this.getMask=function(){return Q;};this.setElement=function(R){C=R;};this.getElement=function(){return C;};this.setHeader=function(R){if(!R||(typeof R=="string"&&R.trim().length==0)){N="";}else{E=R;}};this.setDraggable=function(R){R=(R==null?true:R);if(!this.isRendered()){P=R;}else{if(R){if(this.getHeader()){if(!this.dragDrop){this.dragDrop=new YAHOO.util.DD(this.container);}this.dragDrop.setHandleElId(this.getHeader());}}else{if(this.dragDrop&&this.getHeader()){this.dragDrop.unreg();}}}};this.getHeader=function(){return E;};this.setHeaderTemplate=function(R){N=R;};this.getHeaderTemplate=function(){return N;};this.setBodyTemplate=function(R){I=R;};this.getBodyTemplate=function(){return I;};this.setFooterTemplate=function(R){O=R;};this.getFooterTemplate=function(){return O;};this.setBody=function(R){if(!R||(typeof R=="string"&&R.trim().length==0)){I="";}else{G=R;}};this.getBody=function(){return G;};this.setFooter=function(R){if(!R||(typeof R=="string"&&R.trim().length==0)){O="";}else{J=R;}};this.getFooter=function(){return J;};this.isDraggable=function(){return P;};this.makeModal=function(){var R=this.getMask();var S=this.getElement();D.setStyle(this.container,"position","absolute");if(!R){var R=new perfUI.widgets.panelMask();this.setMask(R);R.stack(this.container);}var T=function(){var U=this.getMask();if(U){U.destroy();}U=null;};M.addListener(window,"resize",this.center,this,true);};};perfUI.widgets.panel.prototype.center=function(){var C=YAHOO.util.Dom;var I=10;var A=this.container;var G=A.offsetWidth,D=A.offsetHeight,F=C.getViewportWidth(),B=C.getViewportHeight(),H,E;if(G<F){H=(F/2)-(G/2)+C.getDocumentScrollLeft();}else{H=I+C.getDocumentScrollLeft();}if(D<B){E=(B/2)-(D/2)+C.getDocumentScrollTop();}else{E=I+C.getDocumentScrollTop();}C.setXY(A,[parseInt(H,10),parseInt(E,10)]);};perfUI.widgets.panel.prototype.render=function(){var H=perfUI.util.addEl;if(typeof this.container=="string"){this.container=document.getElementById(this.container);}var G=this.getHeaderTemplate();var F=this.getBodyTemplate();var B=this.getFooterTemplate();var E=this.getElement();if(!E){E=H(this.container,"div",{"class":this.elementCss});E.style.display="none";E.style.width=this.width;E.style.height=this.height;this.setElement(E);if(this.getHeader()){E.appendChild(this.getHeader());}else{if(G!=null){var C=H(E,"div",{"class":this.headerCss,"innerHTML":G});this.setHeader(C);}}if(this.getHeader()==null&&this.isDraggable()){var C=H(E,"div",{"class":this.headerCss,"innerHTML":"&nbsp;","style":"background-color:#023F8F;width:100%"});this.setHeader(C);}if(this.isDraggable()){this.dragDrop=new YAHOO.util.DD(this.container);this.dragDrop.setHandleElId(this.getHeader());}if(this.getBody()){E.appendChild(this.getBody());}else{if(F!=null){var A=H(E,"div",{"class":this.bodyCss,"innerHTML":F});this.setBody(A);}}if(this.getFooter()){E.appendChild(this.getFooter());}else{if(B!=null){var D=H(E,"div",{"class":this.footerCss,"innerHTML":B});this.setFooter(D);}}if(this.modal){this.makeModal();}this.afterRenderComplete.fire();}};perfUI.widgets.panel.prototype.hide=function(){var A=this.getMask();if(A){A.hide();}var B=this.getElement();B.style.display="none";this.onHideEvent.fire();};perfUI.widgets.panel.prototype.show=function(){if(this.modal){this.center();}var A=this.getMask();if(A){A.show();}var B=this.getElement();B.style.display="block";B.style.visibility="inherit";this.onShowEvent.fire();};perfUI.widgets.panelMask=function(){var B=YAHOO.util.Dom;var E=perfUI.util.addEl;var A=null;var D="mask";var C="masked";this.useOpaqueEmbed=true;this.getElement=function(){return A;};this.setOpaqueEmbed=function(G){if(!G){G=document.body;}var H=G.getElementsByTagName("embed");for(var F=0;F<H.length;F++){H[F].setAttribute("wmode","opaque");}var I=G.getElementsByTagName("object");for(var F=0;F<I.length;F++){if(!B.hasClass(I[F],"hide-object-tag")){B.addClass(I[F],"hide-object-tag");}}};this.showObjectTags=function(G){if(!G){G=document.body;}var H=G.getElementsByTagName("object");for(var F=0;F<H.length;F++){B.removeClass(H[F],"hide-object-tag");}};this.hide=function(){A.style.display="none";B.removeClass(document.body,C);this.showObjectTags();};this.show=function(){if(this.useOpaqueEmbed){this.setOpaqueEmbed();}B.addClass(document.body,C);this.size();A.style.display="block";};this.size=function(){A.style.height=B.getDocumentHeight()+"px";A.style.width=B.getDocumentWidth()+"px";A.innerHTML="";this.divToMask(A);};this.stack=function(G){var H=B.getStyle(G,"zIndex");var F=B.getStyle(A,"zIndex");if(YAHOO.lang.isUndefined(H)||isNaN(H)||H<=0){H=999;B.setStyle(G,"zIndex",String(H));}if(YAHOO.lang.isUndefined(F)||isNaN(F)){F=998;B.setStyle(A,"zIndex",String(F));}if(H<F){B.setStyle(G,"zIndex",String(F+1));}else{B.setStyle(A,"zIndex",String(H-1));}};this.destroy=function(){document.body.removeChild(A);};this.init=function(){var F=null;F=document.createElement("div");F.innerHTML="&#160;";A=F.cloneNode(true);this.divToMask(A);A.style.display="none";document.body.insertBefore(A,document.body.firstChild);if(YAHOO.env.ua.gecko&&this.platform=="mac"){B.addClass(A,"block-scrollbars");}YAHOO.util.Event.addListener(window,"resize",this.size,this,true);};this.divToMask=function(K){var J,I,H;var F=document.body.scrollWidth;F=F>2000?2000:F;var G=document.body.scrollHeight;K.style.position="absolute";K.style.top="0";K.style.left="0";if(YAHOO.env.ua.ie==0){K.style.opacity="0.7";K.style.backgroundColor="black";}else{K.style.overflow="hidden";for(I=0;I<F;I+=500){for(H=0;H<G;H+=500){if(YAHOO.env.ua.ie>=7){J=K.appendChild(document.createElement("IMG"));J.src="/images/v3/dov.png";}if(YAHOO.env.ua.ie==6){J=K.appendChild(document.createElement("DIV"));J.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/v3/dov.png',sizingMethod='scale')";}J.style.position="absolute";J.style.top=H+"px";J.style.left=I+"px";J.style.height="500px";J.style.width="500px";}}}};this.init();};perfUI.widgets.modalEditor=function(A,G,D,H){this.editorClass=perfUI.widgets.perfEditor;perfUI.widgets.modalEditor.superclass.constructor.call(this,A,G,D,H);var I=this;var E=perfUI.util.addEl;var C=YAHOO.util.Dom;var F=null;var B=function(){I.buildEditorFooter();I.afterRenderComplete.fire();};this.modal=H==undefined?true:H;this.editorPreviewContainer=null;this.buttonSubmit=null;this.buttonCancel=null;this.buttonPreview=null;this.editorWidth=G;this.editorHeight=D;this.onSubmitContent=new YAHOO.util.CustomEvent("onSubmitContent",this);this.onSubmitError=new YAHOO.util.CustomEvent("onSubmitError",this);this.getEditor=function(){return F;};this.setEditor=function(J){F=J;};this.hideEditor=function(){var J=this.getEditor();if(J!=null){J.setContent("");J.hideAll();}};this.showEditor=function(){var J=this.getEditor();if(J!=null){J.show();}};this.getContent=function(){var J=this.getEditor();if(J){return J.getContent({format:"raw"});}};this.setContent=function(J){var K=this.getEditor();if(K){K.setContent(J,{format:"raw"});}};this.render=function(){var J=this.getEditor();if(J!=null){J.render();}};this.init=function(){if(!C.hasClass(this.container,"postCommentEditor")){C.addClass(this.container,"postCommentEditor");}if(!C.hasClass(document.body,"yui-skin-sam")){C.addClass(document.body,"yui-skin-sam");}this.setBody();this.setFooter();perfUI.widgets.modalEditor.superclass.render.call(this);this.initPerfEditor();};this.initPerfEditor=function(){var M=this.getBody();var L=E(M,"textarea",{"id":"perfEditor"});var J=String(this.width).indexOf("px")>0?this.width.substr(0,this.width.indexOf("px")):this.width;if(!this.editorClass){this.editorClass=perfUI.widgets.perfEditor;}var K=new this.editorClass(L.id,null,this.editorWidth,this.editorHeight);this.setEditor(K);K.onInit.add(B);this.editorPreviewContainer=E(M,"div");this.editorPreviewContainer.style.display="none";this.editorPreviewContainer.className="previewPost";};this.init();};YAHOO.extend(perfUI.widgets.modalEditor,perfUI.widgets.panel);perfUI.widgets.modalEditor.prototype.show=function(){perfUI.widgets.modalEditor.superclass.show.call(this);this.showEditor();if(this.modal){this.center();}};perfUI.widgets.modalEditor.prototype.hide=function(){this.hideEditor();perfUI.widgets.modalEditor.superclass.hide.call(this);};perfUI.widgets.modalEditor.prototype.previewContent=function(){var C=this;var B=this.getContent();var E=this.getEditor().getContainer();var F={url:"/api/callna.asp",params:"?function=CustomEncode"};var D=function(H){};var A=function(H){var I=H.responseXML;var M="";try{M=I.getElementsByTagName("response")[0].childNodes[0].nodeValue;}catch(L){}this.editorPreviewContainer.innerHTML=M;if(this.buttonCancel.get&&this.buttonCancel.get("container")&&this.buttonCancel.get("container").style.display=="none"){this.buttonCancel.get("container").style.display="inline";}this.setFooterButtonText(this.buttonCancel,this.getEditButtonText());this.setFooterButtonEvent(this.buttonCancel,"click",null);this.setFooterButtonEvent(this.buttonCancel,"click","cancelPreview");this.buttonPreview.style.display="none";E.style.display="none";var K=E.getElementsByTagName("table")[0];var J=Number(K.style.height.replace("px",""))-12;this.editorPreviewContainer.style.height=J+"px";this.editorPreviewContainer.style.display="block";};var G={success:A,failure:D,scope:C};B="html="+Url.encode(B);YAHOO.util.Connect.asyncRequest("POST",F.url+F.params,G,B);};perfUI.widgets.modalEditor.prototype.setFooterButtonText=function(A,B){switch(A.tagName){case"INPUT":A.value=B;break;case"A":A.innerHTML=B;break;default:if(typeof A=="object"&&A.set){A.set("label",B);}}};perfUI.widgets.modalEditor.prototype.setFooterButtonEvent=function(D,C,A){var B=YAHOO.util.Event;switch(D.tagName){case"INPUT":case"A":if(A){B.addListener(D,"click",this[A],this,true);}else{B.removeListener(D,"click");}break;default:if(typeof D=="object"&&D.set){if(A){D.addListener(C,this[A],null,this,true);}else{D.removeListener(C);}}}};perfUI.widgets.modalEditor.prototype.cancelPreview=function(){this.setFooterButtonText(this.buttonCancel,this.getCancelButtonText());this.setFooterButtonEvent(this.buttonCancel,"click","hide");this.buttonPreview.style.display="inline";this.editorPreviewContainer.style.display="none";var A=this.getEditor().getContainer();A.style.display="block";};perfUI.widgets.modalEditor.prototype.getCancelButtonText=function(){var A=perfTranslator.getValue(701);return A.trim().length>0?A:"Cancel";};perfUI.widgets.modalEditor.prototype.getEditButtonText=function(){var A=perfTranslator.getValue(784);return A.trim().length>0?A:"Edit";};perfUI.widgets.modalEditor.prototype.buildEditorFooter=function(){var I=perfUI.util.addEl;var Q=this;var J=this.getBody();var H=this.getFooter();H.innerHTML="";var O=this.getEditor();var K=O.getContainer();K.style.display="block";var F=this.editorPreviewContainer;F.style.display="none";var M=I(H,"center");var B=perfTranslator.getValue(320);var D=I(M,"span",{"class":"submit"});var C=I(D,"button",{"id":"modalEditor_submit","class":"buttonnew","value":(B.trim().length>0?B:"Submit")});this.buttonSubmit=C;var A=function(){this.cancelPreview();this.submitContent();};YAHOO.util.Event.addListener(C,"click",A,this,true);var L=this.getCancelButtonText();var N=I(M,"span",{"class":"cancel"});var G=I(N,"button",{"id":"modalEditor_cancel","class":"buttonnew","value":L});this.buttonCancel=G;YAHOO.util.Event.addListener(G,"click",this.hide,this,true);var E=perfTranslator.getValue(434);var P=I(M,"a",{"innerHTML":(E.trim().length>0?E:"Preview")});this.buttonPreview=P;PERF.makeLink(P);YAHOO.util.Event.addListener(P,"click",this.previewContent,this,true);};perfUI.widgets.modalEditor.prototype.submitContent=function(){this.onSubmitContent.fire();};function VariableContentsLoader(A,E,G,F,J,H){var I=this;var C=YAHOO.util.Dom;var D="Your albums are currently unavailable.";var B="Your browser does not support this action.";this.UserId=E||0;this.UserGUID=J||"";this.DataSource=null;this.Container=A||null;this.ContainerEditor=null;this.ContainerFooter=null;this.ContainerLeftColumn=null;this.ContainerContent=null;this.ContainerContentDescr=null;this.ContainerRightColumn=null;this.ContainerRating=null;this.ContainerFavoredBy=null;this.CurrentLoadedRequestedIndex=-1;this.CurrentLoadedAlbum=null;this.Breadcrumb=G;this.Pager=new PagerSimple();this.Pager.AlwaysCycle=true;this.SharingWidget=null;this.LoginRedirectUrl=F||"";this.LanguageId=H||0;this.HomeDirectory="";this.bannerRightCol=null;this.containerCss="viewContents";this.containerWidget=null;this.requestedContent=[];this.moduleName="VariableContentsLoader";this.buildSubmittedDate=function(K,M){var L=addNode(K,"div","","spacer");addNode(L,"strong","","","Submitted on:");addNode(L,"br");addNode(L,"label","","",M);};this.buildFavoredBy=function(K){addNode(this.ContainerFavoredBy,"strong","","","Favored by:");addNode(this.ContainerFavoredBy,"br");var M=String(K)+(K==1?" person":" people");if(K>0){var L=addNode(this.ContainerFavoredBy,"a","","",M);PERF.makeLink(L);}else{var L=addNode(this.ContainerFavoredBy,"label","","",M);}};this.scrollHeights=function(){var K=YAHOO.util.Region;var L=K.getRegion(this.ContainerLeftColumn).bottom;var M=K.getRegion(this.ContainerRightColumn).bottom;if(M>=L+5){this.ContainerLeftColumn.className=this.ContainerLeftColumn.className.replace("bordergrayRight","");this.ContainerRightColumn.className=this.ContainerRightColumn.className.replace("bordergrayLeft","");this.ContainerRightColumn.className+=" bordergrayLeft";}else{this.ContainerRightColumn.className=this.ContainerRightColumn.className.replace("bordergrayLeft","");this.ContainerLeftColumn.className=this.ContainerLeftColumn.className.replace("bordergrayRight","");this.ContainerLeftColumn.className+=" bordergrayRight";}};this.buildAddToFavorites=function(L){this.ContainerAddToFavorites.innerHTML="";YAHOO.util.Event.purgeElement(this.ContainerAddToFavorites);addNode(this.ContainerAddToFavorites,"div","","addToFavoritesIcon");if(L.IsFavorite){var K=L.getFavoritesUrl(this.UserGUID);var M=addNode(this.ContainerAddToFavorites,"a","","peachDarkText","Already Favored");M.href=K;var N=function(){location.href=K;};YAHOO.util.Event.addListener(this.ContainerAddToFavorites,"click",N,this,true);}else{var M=addNode(this.ContainerAddToFavorites,"a","","","Add to Favorites");PERF.makeLink(M);YAHOO.util.Event.addListener(this.ContainerAddToFavorites,"click",this.addToFavorites,this,true);}};this.displayRating=function(M,K,S){switch(M){default:var O=addNode(this.ContainerRating,"div","","clear");var R=addNode(O,"div","","left");addNode(R,"strong","","","Rate Now");var Q=addNode(O,"div","","rateIcons right");var N=addNode(Q,"div","","left ratePositiveIcon");var L=addNode(Q,"div","","right rateNegativeIcon");N.title="Give this picture a thumbs up!";L.title="Give this picture a thumbs down!";addNode(this.ContainerRating,"br");var P=function(T,U){if(M==0){location.href=K;}else{S(U);}};YAHOO.util.Event.addListener(N,"click",P,"1");YAHOO.util.Event.addListener(L,"click",P,"0");break;}};this.buildRating=function(){};this.buildSectionHeader=function(O,M){var N=addNode(this.ContainerRightColumn,"div","","sectionHeader");var L=addNode(N,"div","","separator");if(M){L.style.borderTop="none";}var K=addNode(N,"div","","bordergray bgSection");addNode(K,"strong","","peachDarkText",O);};this.buildDetailsColumn=function(){this.ContainerRightColumn=addNode(this.ContainerEditor,"div","","rightColumn left");this.buildSectionHeader("Perf Rating&nbsp;",true);this.ContainerRating=addNode(this.ContainerRightColumn,"div","","rating bordergray");this.buildRating();this.buildContentActions();this.buildAdditionalInfo();};this.getRequestedIndex=function(L){for(var K=0;K<this.requestedContent.length;K++){if(L==this.requestedContent[K]){return K;}}return -1;};this.loadRequestedResponse=function(K){var L=K.responseXML;var N=L.getElementsByTagName("functions")[0];if(N==null){I.throwErrorGeneral();return;}this.DataSource=N.getElementsByTagName("function")[0];var M=this.DataSource.getElementsByTagName("errors");if(M.length==1){return;}};this.throwErrorGeneral=function(){alert(D);};this.handleFailure=function(K){this.throwErrorGeneral(D);};this.postComment=function(){this.CommentsWidget.ShowCommentEditor();};this.init=function(){var L=perfUI.util.addEl;C.addClass(this.Container,this.containerCss);C.addClass(this.Container,"left");C.addClass(this.Container,"yui-skin-sam");this.activityContainer=L(this.Container,"div");this.sharingContainer=L(this.Container,"div");this.popUpContainer=L(this.Container,"div");this.containerWidget=new perfUI.widgets.panel(this.popUpContainer);this.containerWidget.setBody("");this.containerWidget.render();var K=function(){this.navigateHistory();};this.Pager.onPageLoad.subscribe(K,this,true);this.SharingWidget=new ContentSharingWidget(this.UserId,this.LanguageId);this.SharingWidget.Render(this.sharingContainer);};this.init();}VariableContentsLoader.prototype.requestContent=function(A){};VariableContentsLoader.prototype.navigateHistory=function(A){YAHOO.util.History.navigate(this.moduleName,this.getCurrentState(A));};VariableContentsLoader.prototype.getCurrentState=function(B){if(this.requestedContent.length==0){return"";}var C=B||0;if(C<=0){var A=0;if(this.Pager&&this.Pager.CurrentPage>0){A=this.Pager.CurrentPage-1;}C=this.requestedContent[A];}return C;};VariableContentsLoader.prototype.shareContent=function(A){if(this.UserId<=0){location.href=this.CommentsWidget.LoginRedirectUrl;return;}if(this.CurrentLoadedAlbum.AccessId!=1){alert("You can only share Level 1 (Everyone) Content.");return;}this.SharingWidget.Load(A);};VariableContentsLoader.prototype.refreshBannerRightCol=function(F){this.bannerRightCol=document.getElementById("b160600");if(this.bannerRightCol!=null){var D=function(I){var J=I.src;I.src="about:blank";I.src=J;};var H=this.bannerRightCol.src;var E=H.toLowerCase().indexOf("section_code");if(E>0){var C="";var G="section_code";var B=PERF.getQueryStringParameterValue(G,H).trim();if(B.length==0){D(this.bannerRightCol);}else{var A=String(F);if(A!=B){this.bannerRightCol.src=H.replace((G+"="+B),(G+"="+A));}else{D(this.bannerRightCol);}}}}};VariableContentsLoader.prototype.buildContentActionsFullView=function(B,C){C=C||"Full View";var E=addNode(B,"div","","left");addNode(E,"div","","displayFullScreenIcon");var D=addNode(E,"a","","",C);PERF.makeLink(D);var A=function(){this.displaySlideshow();};YAHOO.util.Event.addListener(E,"click",A,this,true);};VariableContentsLoader.prototype.buildContentActions=function(D){var I=this;var C=this.CurrentLoadedAlbum;this.buildSectionHeader("Actions");var A=addNode(this.ContainerRightColumn,"div","","options bordergray");this.buildContentActionsFullView(A);addNode(A,"br").clear="all";var G=addNode(A,"div","","left");addNode(G,"div","","shareAlbumIcon");var H=addNode(G,"a","","","Share with Friends");PERF.makeLink(H);YAHOO.util.Event.addListener(G,"click",this.shareContent,this,true);addNode(A,"br");this.ContainerAddToFavorites=addNode(A,"div","","left");this.buildAddToFavorites(D);addNode(A,"br");var F=addNode(A,"div","","left");if(YAHOO.env.ua.ie<=0){F.style.paddingBottom="0";}addNode(F,"div","","postComment");var E=addNode(F,"a","","","Post a Comment");PERF.makeLink(E);YAHOO.util.Event.addListener(F,"click",this.postComment,this,true);addNode(A,"br");var B=addNode(A,"div","","left");D.buildSocialBookmark(B,"Perfspot.com - "+C.Subject+(D.Subject.length>0?(": "+D.Subject):""),D.getUrl(I.HomeDirectory));if(YAHOO.env.ua.ie>0){addNode(A,"br").clear="all";}else{B.style.margin="10px 0 -10px 0";}};VariableContentsLoader.prototype.buildAdditionalInfo=function(C){this.buildSectionHeader("Additional Info");var A=addNode(this.ContainerRightColumn,"div","","bordergray");var G=addNode(A,"div","","spacer");addNode(G,"strong","","","Category:");addNode(G,"br");if(C.CategoryDescr.trim().length>0){var E=addNode(G,"a","","",C.CategoryDescr);E.href=C.getCategoryUrl();}else{addNode(G,"label","","","None");}var K=addNode(A,"div","","spacer");addNode(K,"strong","","","Submitted by:");addNode(K,"br");var H=addNode(K,"a","","",C.SubmittedBy);H.href="/profile.asp?uid="+C.SubmittedByGUID;this.buildSubmittedDate(A,C.DateSubmitted);if(this.CurrentLoadedAlbum.LogoInnerHtml.trim().length>0){var B=addNode(A,"div","","spacer",this.CurrentLoadedAlbum.LogoInnerHtml);}var D=C.getEmbeddedUrl();if(D.trim().length>0){var J=addNode(A,"div","","spacer");addNode(J,"strong","","","Embed:");addNode(J,"br");var F=addNode(J,"textbox","","textbox txtgr");F.value=D;}var M=function(){this.select();};YAHOO.util.Event.addListener(F,"focus",M);var I=addNode(A,"div","","spacer");addNode(I,"strong","","","Url:");addNode(I,"br");var L=addNode(I,"textbox","","textbox txtgr");YAHOO.util.Event.addListener(L,"focus",M);L.value=C.getUrl(this.HomeDirectory);};VariableContentsLoader.prototype.loadFullView=false;VariableContentsLoader.prototype.parseBookmarkedId=function(A){if(A&&A.trim().length>0){A=Number(A.trim());return A;}return 0;};VariableContentsLoader.prototype.getBookmarkedId=function(A){A=A||YAHOO.util.History.getBookmarkedState(this.moduleName);return this.parseBookmarkedId(A);};VariableContentsLoader.prototype.LoadRequestedContent=function(A,B){var E=A;this.requestedContent=B.split(",");A=this.getBookmarkedId();if(A<=0){A=E;}var C=this.getRequestedIndex(A);if(C<0){C=this.getRequestedIndex(E);if(C<0){this.throwErrorGeneral();return;}}YAHOO.util.History.register(this.moduleName,String(A),this.requestContent,this,true);try{YAHOO.util.History.initialize("yui-history-field","yui-history-iframe");}catch(D){}this.requestContent(A);if(this.ContainerActivity!=null){this.ContainerActivity.style.display="none";}};VariableContentsLoader.prototype.BuildComments=function(A){var B=addNode(this.ContainerEditor,"div","","comments left clear");this.CommentsWidget.AllowComments=A.AllowComments;this.CommentsWidget.ContentObject=A;this.CommentsWidget.Container=B;this.CommentsWidget.Render();};VariableContentsLoader.prototype.buildEditor=function(D){var C=this.ContainerEditor==null?false:true;this.Container.style.visibility="hidden";this.ContainerLeftColumn=null;this.ContainerRightColumn=null;if(!C){this.ContainerEditor=addNode(this.Container,"div","","left bordergray");}this.ContainerEditor.innerHTML="";this.ContainerLeftColumn=addNode(this.ContainerEditor,"div","","mediumPictureView left");this.ContainerLeftColumn.style.width="620px";var A=addNode(this.ContainerLeftColumn,"div","","caption");var F=addNode(A,"div","","left");var B=this.CurrentLoadedAlbum.Subject.trim().length>45?(this.CurrentLoadedAlbum.Subject.substr(0,45)+"..."):this.CurrentLoadedAlbum.Subject;addNode(F,"strong","","peachDarkText",B);if(this.Breadcrumb.trim().length>0){var E=addNode(F,"span","","breadcrumb");E.innerHTML=this.Breadcrumb;}this.Pager.Container=addNode(A,"div","","pagerSection right");this.Pager.Render(null,this.requestedContent.length,true);this.ContainerContent=addNode(this.ContainerLeftColumn,"p","","centerX");var G=addNode(this.ContainerLeftColumn,"div");this.ContainerFooter=G;this.ContainerContentDescr=addNode(G,"p","","description");this.buildDetailsColumn();this.buildComments();if(C){this.refreshBannerRightCol(D.CategoryId);}};function VariablePicturesLoader(A,E,G,B,D,C){var F=this;this.contentType=perfUI.content.userContentType.Picture;VariablePicturesLoader.superclass.constructor.call(this,A,E,G,B,D,C);this.moduleName="VariablePicturesLoader";this.HomeDirectory="http://www.perfspot.com/pics/";this.CurrentLoadedPicture=null;this.CommentsWidget=new perfUI.widgets.pictureCommentsWidget(this.UserId,this.Container);this.LoadRequestedPictures=function(H,I){VariablePicturesLoader.superclass.LoadRequestedContent.call(this,H,I);};this.shareContent=function(){VariablePicturesLoader.superclass.shareContent.call(this,this.CurrentLoadedPicture);};this.buildEditor=function(){var H=this.CurrentLoadedPicture;VariablePicturesLoader.superclass.buildEditor.call(this,H);H.onLoadImage.subscribe(this.scrollHeights,this,true);this.buildPictureDescription();H.Spotting.SpotsListContainer=addNode(this.ContainerFooter,"div","","spotting");H.Spotting.LoginRedirectUrl=this.LoginRedirectUrl+String(H.PictureId);H.attachSpottingTool(this.ContainerContent);this.Container.style.visibility="visible";YAHOO.util.Event.onContentReady(this.Container.id,this.scrollHeights,this,true);this.CurrentLoadedPicture.Spotting.onSpotsListContainerDirty.subscribe(this.scrollHeights,this,true);};this.requestContent=function(L){var J={url:"/api/call.asp",params:"?Function=Media.Pictures.GetFullPictureByID&UserID="+E+"&PictureID="+L+"&lid="+this.CommentsWidget.CurrentLanguageId+"&sid="+Math.random()};var I=function(M){this.handleFailure(M);};var H=function(O){this.loadRequestedResponse(O);if(this.DataSource==null){this.throwErrorGeneral();return;}this.CurrentLoadedAlbum=new perfUI.content.userAlbum(E,this.DataSource.getElementsByTagName("album")[0],this.picture);this.CurrentLoadedPicture=this.CurrentLoadedAlbum.Pictures[0];var N=this.CurrentLoadedAlbum.AlbumType==1?"perfnights":"";var M=this.CurrentLoadedPicture.CategoryId>0?this.CurrentLoadedPicture.CategoryId:"";LOTCC.bcpw("act","viewing pictures","int","pictures","med","pictures","int",M,"med",N);this.CurrentLoadedRequestedIndex=this.getRequestedIndex(this.CurrentLoadedPicture.PictureId);this.Pager.CurrentPage=this.CurrentLoadedRequestedIndex+1;this.buildEditor();};var K={success:H,failure:I,scope:F};YAHOO.util.Connect.asyncRequest("GET",J.url+J.params,K,null);};this.picture=function(J,K){J=J||F.UserId;var H=this;F.picture.superclass.constructor.call(this,J,K,true);this.Spotting.Container=null;this.Spotting.BatchUpdates=false;this.spotCountsLabel=null;this.showTotalSpotsLabel=function(L){this.spotCountLabel.innerHTML="";if(L>0){this.spotCountLabel.innerHTML="("+L+")";}};var I=function(L){this.showTotalSpotsLabel(this.Spots.length);};this.onDirtySpots.subscribe(I,this,true);};YAHOO.extend(F.picture,perfUI.content.userPhoto);this.displaySlideshow=function(){var K=this;var M=YAHOO.util.Dom;var O=this.CurrentLoadedPicture;var U=null;var N=null;var I=null;var J=null;var L=null;var R=null;var W=0;var V=0;var H=0;var P=0;var T=true;var S=180;var Q=this.CurrentLoadedRequestedIndex;this.imageDoubleClickEvent=function(X){this.close();F.requestContent(O.PictureId);};this.showActivity=function(){activityIndicator.show();var X=activityIndicator.getMask();activityIndicator.center();};this.loadImage=function(Y){this.showActivity();var X=null;var a=function(b){W=X.width;V=X.height;H=W/V;P=W<V?1:0;if(N!=null){U.removeChild(N);}N=addNode(U,"img","","left clear");N.style.visibility="hidden";YAHOO.util.Event.addListener(N,"load",Z,this,true);N.src=Y.OriginalSizeUrl;};var Z=function(b){N.style.visibility="visible";activityIndicator.hide();this.containerWidget.getElement().style.width=W+S;this.containerWidget.show();this.resizeImage();this.containerWidget.center();YAHOO.util.Event.addListener(window,"resize",this.resizeImage,this,true);YAHOO.util.Event.addListener(N,"click",this.imageDoubleClickEvent,this,true);};X=document.createElement("img");YAHOO.util.Event.addListener(X,"load",a,this,true);X.src=Y.OriginalSizeUrl;};this.scaleDownImage=function(X,a){var c=0,Z=0,b=W,Y=V;if(W<X&&V<a){this.resetImageOriginalSize();}if(W>X){b=X;}if(V>a){Y=a;}c=b;Z=Math.floor(b/H);if(Z>Y){c=Math.floor(Y*H);Z=Y;}this.setImageDimensions(c,Z);};this.setImageDimensions=function(X,Y){N.style.width=String(X)+"px";N.style.height=String(Y)+"px";};this.resetImageOriginalSize=function(){this.setImageDimensions(W,V);};this.resizeImage=function(c){if(N==null){return;}var a=T?55:38;var h=M.getViewportWidth()-10;var b=M.getViewportHeight();var X=h-S;var g=b-40;if(W>X||V>b){this.scaleDownImage(X,g);}else{this.resetImageOriginalSize();}this.containerWidget.getElement().style.width=String(h)+"px";var f=Number(N.style.width.replace("px",""));var d=Math.floor((h-f-S)/2);if(YAHOO.env.ua.ie<=0){d=d+3;}U.style.marginLeft=String(d)+"px";if(f<200){var Z=Math.floor((200-f)/2);N.style.padding="0 "+String(Z)+"px";}R.parentNode.style.width=f<200?"200px":N.style.width;var Y=String(Math.floor((N.height-a)/2))+"px";J.style.margin=Y+" 10px 0 10px";L.style.margin=Y+" 10px 0 10px";this.containerWidget.center();};this.goToPreviousPicture=function(){if(Q>0){Q--;}else{Q=this.Pager.Pages.length-1;}this.requestPictureUrl(this.requestedContent[Q]);};this.goToNextPicture=function(){if(Q<this.Pager.Pages.length-1){Q++;}else{Q=0;}this.requestPictureUrl(this.requestedContent[Q]);};this.requestPictureUrl=function(b){var Z={url:"/api/call.asp",params:"?Function=Media.Pictures.GetFullPictureByID&UserID="+E+"&PictureID="+b};var Y=function(c){F.handleFailure(c);};var X=function(f){this.buildPagesHeaderCaption();var e=f.responseXML.getElementsByTagName("picture")[0];O=new this.picture(this.UserId,e);var d=this.CurrentLoadedAlbum.AlbumType==1?"perfnights":"";var c=O.CategoryId>0?O.CategoryId:"";LOTCC.bcpw("act","viewing pictures","int","pictures","med","pictures","int",c,"med",d);this.loadImage(O);};var a={success:X,failure:Y,scope:K};YAHOO.util.Connect.asyncRequest("GET",Z.url+Z.params,a,null);};this.buildPagesHeaderCaption=function(){I.innerHTML="Viewing:&nbsp;"+String(Q+1)+"/"+String(this.Pager.Pages.length);};this.close=function(){this.containerWidget.hide();N.style.display="none";};this.init=function(){var Z=YAHOO.env.ua.ie>0;T=!Z||YAHOO.env.ua.ie>6?true:false;var X=this.containerWidget.getBody();X.innerHTML="";var b=addNode(X,"div");J=addNode(b,"div","","left");if(!T){J.className+=" modalNavigationPreviousOffIcon_ie6";S=S-54;}else{J.className+=" modalNavigationPreviousOffIcon";}J.title="Previous Picture";YAHOO.util.Event.addListener(J,"click",this.goToPreviousPicture,this,true);U=addNode(b,"div","","imageFrame");U.style.display="inline";var a=addNode(U,"div","","header left");I=addNode(a,"label","","");this.buildPagesHeaderCaption();var Y=addNode(a,"a","","right","Close");PERF.makeLink(Y);YAHOO.util.Event.addListener(Y,"click",this.close,this,true);R=addNode(a,"div","","closeIcon");R.title="Close";YAHOO.util.Event.addListener(R,"click",this.close,this,true);if(document.getElementById("activityIndicatorSlideshow")==null){activityIndicator=new perfUI.widgets.panel(F.activityContainer,"40px");activityIndicator.setBodyTemplate('<div class="activityIndicatorLoadImage" />');activityIndicator.render();YAHOO.util.Dom.setStyle(F.activityContainer,"zIndex","1000");}else{this.showActivity();}L=addNode(b,"div","","right");if(!T){L.className+=" modalNavigationNextOffIcon_ie6";}else{L.className+=" modalNavigationNextOffIcon";}L.title="Next Picture";YAHOO.util.Event.addListener(L,"click",this.goToNextPicture,this,true);this.loadImage(O);};this.init();};this.editPictureDetails=function(){var I=this.CurrentLoadedPicture;var J=this.containerWidget;var H=null;var L=null;var M=function(){var P=new RegExp("| ^([^<>`/@#}$%:;)(_^{&*=|'+]+$)");if((H.value.trim().length>0&&!P.test(H.value))||(L.value.trim().length>0&&!P.test(L.value))){alert("Please only enter alphanumeric characters.");return;}var O=function(T){};var N=function(T){I.Subject=H.value;I.Description=L.value;this.buildPictureDescription();J.hide();};var S={success:N,failure:O,scope:F};var R={url:"/api/call.asp",params:"?Function=Media.Pictures.UpdatePictureDetails&UserID="+E+"&PictureID="+I.PictureId};var Q="subject="+Url.encode(H.value)+"&description="+Url.encode(L.value);YAHOO.util.Connect.asyncRequest("POST",R.url+R.params,S,Q);};var K=function(){J.getBody().innerHTML="";var P=addNode(J.getBody(),"div","","sharingWidget bgwht");var V=addNode(P,"div","","header");addNode(V,"strong","","peachDarkText left","Edit Picture Details");var S=addNode(V,"div","","closeIcon");YAHOO.util.Event.addListener(S,"click",J.hide,J,true);var Q=addNode(P,"div","","dialogBody clear");var T=addNode(Q,"div","","formz");var W=addNode(T,"div","","left row");addNode(W,"strong","","left","Title:");H=addNode(W,"textbox","","textbox");H.value=I.Subject;var R=addNode(T,"div","","left row");addNode(R,"strong","","left","Description:");L=addNode(R,"textarea","","textbox");L.innerHTML=I.Description;var U=addNode(Q,"div","","footer clear");var N=addNode(U,"button","","buttonnew","Submit");YAHOO.util.Event.addListener(N,"click",M,F,true);var O=addNode(U,"button","","buttonnew","Cancel");YAHOO.util.Event.addListener(O,"click",J.hide,J,true);J.show();};K();};this.buildPictureDescription=function(){var I=this.CurrentLoadedPicture;this.ContainerContentDescr.innerHTML="";if(I.Subject.trim().length>0){addNode(this.ContainerContentDescr,"strong","","txtdblue",I.Subject);}if(I.Description.trim().length>0){addNode(this.ContainerContentDescr,"span","","","&nbsp;-&nbsp;"+I.Description);}if(I.IsOwner){var H=this.ContainerContentDescr.innerHTML.trim().length>0?"edit":"Add a Title and Description";var J=addNode(this.ContainerContentDescr,"a","","",H);PERF.makeLink(J);YAHOO.util.Event.addListener(J,"click",this.editPictureDetails,this,true);}};this.buildRating=function(){var I=this.CurrentLoadedPicture;this.ContainerRating.innerHTML="";var H=addNode(this.ContainerRating,"div");H.innerHTML='<strong class="txtgreen">'+String(I.PercentApproval)+"</strong> / 10 ("+String(I.PerfsCount)+" Perf"+(I.PerfsCount==1?"":"s")+")";this.displayRating(this.CurrentLoadedPicture.AllowApproval,F.LoginRedirectUrl+String(I.PictureId),F.ratePictureEvent);};this.buildComments=function(){this.CommentsWidget.LoginRedirectUrl=this.LoginRedirectUrl+String(this.CurrentLoadedPicture.PictureId);this.CommentsWidget.LoadLanguagesXml(this.DataSource);this.CommentsWidget.AlbumType=this.CurrentLoadedAlbum.AlbumType;VariablePicturesLoader.superclass.BuildComments.call(this,this.CurrentLoadedPicture);};this.ratePictureEvent=function(H){F.ratePicture(H);};this.ratePicture=function(L){var M={url:"/api/call.asp",params:"?Function=Media.Pictures.PerfPicture&userId="+this.UserId+"&PictureID="+this.CurrentLoadedPicture.PictureId+"&t="+L+"&sid="+Math.random()};var K=function(O){this.handleFailure(O);};var I=function(O){var P=O.responseXML;var Q=P.getElementsByTagName("picture")[0];this.CurrentLoadedPicture.loadRating(Q);this.Pager.loadNextPage();};var N={success:I,failure:K,scope:F};var J=this.CurrentLoadedAlbum.AlbumType==1?"perfnights":"";var H=this.CurrentLoadedPicture.CategoryId>0?this.CurrentLoadedPicture.CategoryId:"";LOTCC.bcpw("act","viewing pictures","int","pictures","med","pictures","act","rating","int",H,"med",J);if(this.CurrentLoadedPicture.AllowApproval==1){YAHOO.util.Connect.asyncRequest("GET",M.url+M.params,N,null);}else{this.Pager.loadNextPage();}};this.addToFavorites=function(){if(this.UserId<=0){location.href=this.LoginRedirectUrl+String(this.CurrentLoadedPicture.PictureId);return;}var J={url:"/api/call.asp",params:"?Function=Media.Pictures.AddFavorite&userId="+this.UserId+"&PictureID="+this.CurrentLoadedPicture.PictureId+"&sid="+Math.random()};var I=function(L){this.handleFailure(L);};var H=function(L){var M=L.responseXML;this.CurrentLoadedPicture.IsFavorite=PERF.parseNodeBool(M,"success");this.buildAddToFavorites(this.CurrentLoadedPicture);};var K={success:H,failure:I,scope:F};YAHOO.util.Connect.asyncRequest("GET",J.url+J.params,K,null);};this.buildContentActions=function(){VariablePicturesLoader.superclass.buildContentActions.call(this,this.CurrentLoadedPicture);};this.buildAdditionalInfo=function(){VariablePicturesLoader.superclass.buildAdditionalInfo.call(this,this.CurrentLoadedPicture);};this.initPhotos=function(){this.Container.className+=" photos";YAHOO.util.Dom.addClass(this.containerWidget.getElement(),"slideshow");};this.initPhotos();}YAHOO.extend(VariablePicturesLoader,VariableContentsLoader);function VariableEventPicturesLoader(A,E,G,B,D,C){var F=this;VariableEventPicturesLoader.superclass.constructor.call(this,A,E,G,B,D,C);this.initEvent=function(){this.Container.className+=" nights";};this.initEvent();}YAHOO.extend(VariableEventPicturesLoader,VariablePicturesLoader);