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.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);};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.messages.thread=function(B){var A=this;this.dataSource=B||null;this.container=null;this.sender=null;this.threadId=-1;this.subject="";this.hasHiddenMessages=false;this.recipients=[];this.messages=[];this.loadProperties();};perfUI.messages.thread.prototype.loadProperties=function(A){A=A||this.dataSource;if(A==null||A==undefined){return;}this.dataSource=A;if(perfUI.content.user){this.sender=new perfUI.content.user(-1,A);}this.threadId=PERF.parseNodeNumeric(A,"threadId");this.subject=PERF.parseNode(A,"subject");this.hasHiddenMessages=PERF.parseNodeBool(A,"hiddenMessages");this.loadSender();this.loadRecipients();this.loadMessages();};perfUI.messages.thread.prototype.loadSender=function(){this.sender=null;var A=this.dataSource.getElementsByTagName("sender");if(A.length!=1){return;}var A=A[0];var B=A.getElementsByTagName("user")[0];this.sender=new perfUI.content.user(-1,B);};perfUI.messages.thread.prototype.loadRecipients=function(){this.recipients=[];var C=this.dataSource.getElementsByTagName("recipients");if(C.length!=1){return;}var C=C[0];var D=C.getElementsByTagName("user");for(var B=0;B<D.length;B++){var A=new perfUI.content.user(-1,D[B]);this.recipients.push(A);}};perfUI.messages.thread.prototype.loadMessages=function(){this.messages=[];var C=this.dataSource.getElementsByTagName("messages");if(C.length!=1){return;}var C=C[0];var D=C.getElementsByTagName("message");for(var B=0;B<D.length;B++){var A=new perfUI.messages.message(D[B]);A.threadId=this.threadId;if(A.messageId<=0){A.messageId=A.threadId;}A.subject=this.subject;this.messages.push(A);}};perfUI.messages.message=function(C,A){var B=this;this.dataSource=C||null;this.container=null;this.user=null;this.messageId=-1;this.threadId=-1;this.subject="";this.body="";this.totalCount=1;this.otherCount=0;this.isRead=false;this.isReplied=false;this.dateSubmitted="";this.dateDiffSubmitted="";this.loadProperties();};perfUI.messages.message.prototype.loadProperties=function(A){A=A||this.dataSource;if(perfUI.content.user){this.user=new perfUI.content.user(-1,A);}if(A==null||A==undefined){return;}this.dataSource=A;this.messageId=PERF.parseNodeNumeric(A,"messageId");this.threadId=PERF.parseNodeNumeric(A,"threadId");if(this.messageId<=0){this.messageId=this.threadId;}this.subject=PERF.parseNode(A,"subject");this.body=PERF.parseNode(A,"body");this.totalCount=PERF.parseNodeNumeric(A,"counts");this.otherCount=PERF.parseNodeNumeric(A,"otherCount");this.totalRecipients=PERF.parseNodeNumeric(A,"recipients");this.isRead=PERF.parseNodeBool(A,"read");this.isReplied=PERF.parseNodeBool(A,"replied");this.dateSubmitted=PERF.parseNode(A,"dateSubmitted");this.dateDiffSubmitted=PERF.parseNode(A,"dateSubmitted2");};perfUI.messages.exception={dataError:{"id":1,"msg":""},timeout:{"id":2,"msg":""},custom:{"id":3,"msg":""}};perfUI.messages.exceptionHandler={parseDataSource:function(A,F){var D={"hasErrors":false,"error":null,"dataSource":A};var E=null;if(!A||A.getElementsByTagName("parsererror").length>0){D={"hasErrors":true,"error":perfUI.messages.exception.dataError,"dataSource":A};}if(!D.hasErrors){var C=A.getElementsByTagName("errors");if(C.length==1){var B=perfUI.messages.exception.custom;B.msg=PERF.parseNode(C[0],"error");D={"hasErrors":true,"error":B,"dataSource":E};}}if(!D.hasErrors){E=perfUI.util.getNode(A,F);if(E==null||E.length==0){D={"hasErrors":true,"error":perfUI.messages.exception.dataError,"dataSource":A};}}switch(D.error){case perfUI.messages.exception.dataError:this.handleXmlParsingError();break;case perfUI.messages.exception.timeout:this.handleFailure();break;}return D;},handleXmlParsingError:function(A){A=A||"This page can not be displayed due to invalid data.";alert(A);},handleFailure:function(A){A=A||"This page is currently unavailable.";alert(A);}};perfUI.messages.config={"INBOX":{"url":"inbox.asp","viewUrl":"view.asp","cfgParam":"INBOX","viewThreadParam":"","removeMethod":"HideInbox","removeProperty":"","optionsMenu":{"markUnread":0,"markRead":1,"delete":2,"block":3}},"SENTBOX":{"url":"outbox.asp","viewUrl":"view.asp","cfgParam":"SENTBOX","viewThreadParam":"o=1","removeMethod":"HideOutbox","removeProperty":"messages","optionsMenu":{"markUnread":-1,"markRead":-1,"delete":0,"block":-1}}};perfUI.messages.manager=function(D,B){var C=this;var G=perfUI.util.addEl;var F=YAHOO.util.Dom;var A=YAHOO.util.Event;var E="messages";this.userId=D||0;this.dataSource=null;this.container=B||null;this.containerCss=E;this.applications=[];this.sections=[];this.buildLayout=function(){this.sections["panels"]=G(this.container,"div",{"class":"alertbox"});this.sections["main"]=G(this.container,"div",{"class":this.containerCss});this.sections["activity"]=G(this.sections["main"],"div",{"class":"activityIndicatorLoadModule","innerHTML":"<p>"+perfTranslator.getValue(1864).toLowerCase()+"...</p>"});this.hideContentActivity();if(!F.hasClass(this.container,E)){F.addClass(this.container,E);}};this.render=function(){this.buildLayout();this.loadApplications();};this.load=function(){this.render();};this.loadApplications=function(){var H=this.sections["main"];var I=this.sections["panels"];for(var J=0;J<this.applications.length;J++){var K=this.applications[J];var L=G(H,"div",{"class":"msg_app clear"});K.dataSource=this.dataSource;K.container=L;K.sections["panels"]=I;K.load();}};this.showContentActivity=function(){var H=this.sections["activity"];if(!H){return;}H.style.display="block";};this.hideContentActivity=function(){var H=this.sections["activity"];if(!H){return;}H.style.display="none";};};perfUI.messages.application=function(D,F,B){var C=this;var G=perfUI.util.addEl;var E=YAHOO.util.Dom;var A=YAHOO.util.Event;this.moduleName="";this.initialState=this.getCurrentState();this.breadcrumb="";this.config=perfUI.messages.config.INBOX;this.userId=D||-1;this.dataSource=F||null;this.container=B||null;this.containerActivity=null;this.pager=typeof(MediaPagerControl)=="undefined"?null:new MediaPagerControl(5,5);this.results=[];this.pagers=[];this.sections=[];this.checkBoxSelector=null;this.persistedSelections=[];this.dataSourceNodeName="messages";this.applicationCss="";this.containerCss="";this.caption="";this.allowCaption=true;this.allowPager=true;this.messageEditorSrcUrl="";this.alertDialog=null;this.messageEditor=null;this.afterRenderComplete=new YAHOO.util.CustomEvent("afterRenderComplete",this);this.syncPagers=function(H){if(this!=C.pager){C.pager.CurrentPage=this.CurrentPage;C.pager.Render();this.Render(null,null,true);}};};perfUI.messages.application.prototype.getCurrentState=function(){var A=10;var B=1;if(this.pager){A=this.pager.PageSize;B=this.pager.CurrentPage;}return"numrecords="+A+"&page="+B;};perfUI.messages.application.prototype.showContentActivity=function(){var A=this.sections["content"];if(!A){return;}A.innerHTML="";perfUI.util.addEl(A,"div",{"class":"activity","innerHTML":'<div class="activityIndicatorLoadModule"><p>'+perfTranslator.getValue(1864).toLowerCase()+"...</p></div>"});};perfUI.messages.application.prototype.buildComposeLink=function(A){var E=perfUI.util.addEl;var D=E(A,"span",{"class":"submit right"});var C=function(F){this.showMessageEditor(true);};var B=new YAHOO.widget.Button({label:perfTranslator.getValue(2781),onclick:{fn:C,obj:null,scope:this},container:D});return B;};perfUI.messages.application.prototype.buildSectionCaption=function(){if(!this.allowCaption){return null;}var C=null;var B=perfUI.util.addEl;var A=YAHOO.util.Dom;var C=this.sections["caption"];A.addClass(C,"bggr caption bordergray");if(!C){return null;}C.innerHTML="";if(this.caption.trim().length>0){B(C,"h2",{"class":"txtdkblue left","innerHTML":this.caption});}return C;};perfUI.messages.application.prototype.buildSectionOptionsContainer=function(A){this.sections["options"]=perfUI.util.addEl(A,"div",{"class":"options bordergray"});};perfUI.messages.application.prototype.buildSectionOptions=function(C){var M=perfUI.util.addEl;var O=YAHOO.util.Event;var K=YAHOO.util.Dom;this.buildSectionOptionsContainer(C);C=this.sections["options"];if(!C){return;}var E=M(C,"checkbox",{"class":"left checkbox","title":perfTranslator.getValue(824)});this.checkBoxSelector=E;var B=function(){if(E.checked){E.title=perfTranslator.getValue(1641);this.selectAllRows();}else{E.title=perfTranslator.getValue(824);this.selectNoRows();}};O.addListener(E,"click",B,this,true);var N=function(R){if(K.hasClass(R,"disabled")){return false;}return true;};var D=M(C,"ul",{"class":"options_menu"});this.sections["options_menu"]=D;if(this.config.optionsMenu["markUnread"]>=0){var Q=M(D,"li");var J=M(Q,"a",{"innerHTML":perfTranslator.getValue(2788)});var A=function(R){if(N(Q)){this.setIsReadStatusPersistedSelections(false);}};O.addListener(J,"click",A,this,true);}if(this.config.optionsMenu["markRead"]>=0){var I=M(D,"li");var L=M(I,"a",{"innerHTML":perfTranslator.getValue(2787)});var H=function(R){if(N(I)){this.setIsReadStatusPersistedSelections(true);}};O.addListener(L,"click",H,this,true);}if(this.config.optionsMenu["delete"]>=0){var P=M(D,"li");var G=M(P,"a",{"innerHTML":perfTranslator.getValue(316)});var F=function(R){if(N(P)){this.showDeleteDialog();}};O.addListener(G,"click",F,this,true);}this.setAvailableOptionsMenuItems();};perfUI.messages.application.prototype.buildLayout=function(){var G=perfUI.util.addEl;var B=YAHOO.util.Dom;var A=this.container;if(this.containerCss.trim().length>0){YAHOO.util.Dom.addClass(A,this.containerCss);}this.sections["main"]=A;this.sections["caption"]=G(A,"div");var F=this.buildSectionCaption();this.buildComposeLink(F);this.loadPagers();if(this.allowPager){this.sections["pager_top"]=G(A,"div",{"class":"pagerSection bordergray"});var E=this.sections["pager_top"];this.pager.Container=G(E,"div",{"class":"right"});this.pager.pagerDescrContainer=G(E,"div");this.pager.onPageLoad.subscribe(this.navigateHistory,this,true);}this.buildSectionOptions(A);this.sections["content"]=G(A,"div",{"class":"content bordergray"});if(this.allowPager){this.sections["pager_bottom"]=G(A,"div",{"class":"pagerSection pagerBottom bordergray"});var D=this.sections["pager_bottom"];var C=this.pagers[1];C.Container=G(D,"div",{"class":"right"});C.pagerDescrContainer=G(D,"div");C.onPageLoad.subscribe(this.syncPagers,C,true);}};perfUI.messages.application.prototype.navigateHistory=function(){YAHOO.util.History.navigate(this.moduleName,this.getCurrentState());};perfUI.messages.application.prototype.load=function(){var A=YAHOO.util.Dom;if(this.allowPager){YAHOO.util.History.register(this.moduleName,this.initialState,this.getMessages,this,true);try{YAHOO.util.History.initialize("yui-history-field","yui-history-iframe");}catch(B){}}if(this.applicationCss.trim().length>0){A.addClass(this.container,this.applicationCss);}this.render();};perfUI.messages.application.prototype.render=function(){this.buildLayout();};perfUI.messages.application.prototype.loadDataSource=function(A){if(!A){return;}this.dataSource=A;};perfUI.messages.application.prototype.loadRequestedResponse=function(A){var B=A.responseXML;var C=perfUI.messages.exceptionHandler.parseDataSource(B,this.dataSourceNodeName);switch(C.error){case perfUI.messages.exception.dataError:this.loadDataSource(this.dataSource);break;case perfUI.messages.exception.timeout:break;default:this.loadDataSource(C.dataSource);break;}this.loadMessages();this.loadPage();};perfUI.messages.application.prototype.loadPagers=function(){if(!this.pager){return;}for(var A=0;A<2;A++){var B=this.pager;if(A>0){B=new MediaPagerControl(this.pager.PageSize,this.pager.Step);}B.NoRecordDescription=this.pager.NoRecordDescription;B.ShowDescription=true;this.pagers.push(B);}};perfUI.messages.application.prototype.loadMessages=function(F,C){F=F||"message";C=C||perfUI.messages.message;var A=this.dataSource.getElementsByTagName(F);this.results=[];for(var B=0;B<A.length;B++){var E=A[B];var D=new C(E);this.results.push(D);}};perfUI.messages.application.prototype.loadPage=function(){for(var A=0;A<this.pagers.length;A++){var B=this.pagers[A];B.ParseXmlProperties(this.dataSource);if(this.allowPager){B.Render(null,null,true);if((A>0&&B.Pages.length<=0)||(!B.ShowDescription&&B.Pages.length<=0)){B.Container.parentNode.style.display="none";}else{B.Container.parentNode.style.display="block";}}}this.loadCurrentView();};perfUI.messages.application.prototype.buildNoResultsView=function(A){};perfUI.messages.application.prototype.buildContentTable=function(A){A=A||this.sections["content"];var B=perfUI.util.addEl(A,"table",{"class":"msg_rows","cellSpacing":"0"});this.sections["contentTable"]=B;return B;};perfUI.messages.application.prototype.buildContentTableRow=function(A){A=A||this.sections["contentTable"];return perfUI.util.addEl(A,"tr",{"class":"row"});};perfUI.messages.application.prototype.loadCurrentView=function(B){B=B||this.results;var F=perfUI.util.addEl;var C=YAHOO.util.Dom;this.sections["content"].innerHTML="";if(B.length>0){if(this.checkBoxSelector){this.checkBoxSelector.checked=true;this.checkBoxSelector.title=perfTranslator.getValue(1641);}C.removeClass(this.container,"nodata");var E=this.buildContentTable();for(var A=0;A<B.length;A++){var D=this.buildContentTableRow();this.buildListItem(B[A],D,A);}}else{C.addClass(this.container,"nodata");this.buildNoResultsView();}};perfUI.messages.application.prototype.setReadStatusIndication=function(A){};perfUI.messages.application.prototype.buildListItem=function(K,H,I){var F=perfUI.util.addEl;var B=YAHOO.util.Dom;var U=YAHOO.util.Event;K.rowElement=H;var A=F(H,"td",{"class":"msg_status_icon"});K.iconElement=F(A,"div");this.setReadStatusIndication(K);var T=F(H,"td",{"class":"msg_select"});var N=F(T,"checkbox",{"class":"checkbox"});var G=function(V){if(N.checked){this.selectRow(K);}else{this.deSelectRow(K);}};U.addListener(N,"click",G,this,true);K.selectItemElement=N;if(this.getPersistedSelectionIndex(K)>=0){this.selectRow(K);}else{if(this.checkBoxSelector){this.checkBoxSelector.checked=false;this.checkBoxSelector.title=perfTranslator.getValue(824);}}var D=F(H,"td",{"class":"msg_profile"});var E=K.user.getProfileUrl();this.buildUserThumbnail(K,D,E);var J=F(H,"td",{"class":"msg_who_when"});this.buildUserLink(K,J);F(J,"span",{"innerHTML":K.dateSubmitted,"class":"when"});F(J,"span",{"innerHTML":K.dateDiffSubmitted,"class":"when"});var S=this.config.viewUrl+"?t="+K.threadId+"&cfg="+this.config.cfgParam;var J=F(H,"td",{"class":"msg_subject"});var Q=F(J,"div",{"class":"msg_subject_txt"});var P=F(Q,"a",{"href":S,"innerHTML":perfTranslator.getValue(749)+":&nbsp; "+K.subject});if(K.totalRecipients>1){var L=F(J,"div",{"class":"msg_subject_to"});var R=F(L,"a",{"href":S,"innerHTML":perfTranslator.getValue(2778)+":&nbsp;"+perfTranslator.parseValue(perfTranslator.getValue(2794),[String(Number(K.totalRecipients))])});}var O=F(J,"div",{"class":"msg_subject_body"});var C=F(O,"a",{"href":S,"innerHTML":K.body});PERF.makeLink(C);var M=F(H,"td",{"class":"msg_delete"});this.buildRowDeleteOptions(K,M);};perfUI.messages.application.prototype.buildUserLink=function(E,A,B){B=B||"";var H=perfUI.util.addEl;var D=E.user.getProfileUrl();var F=this.config.viewUrl+"?t="+E.threadId+"&cfg="+this.config.cfgParam;var C=H(A,"span",{"class":"who"});if(E.otherCount>0){var G=H(C,"a",{"innerHTML":perfTranslator.getValue(2778)+":&nbsp;"+perfTranslator.parseValue(perfTranslator.getValue(2794),[String(Number(E.otherCount+1))]),"href":F});}else{if(B.trim().length>0){C.innerHTML=B;}var G=H(C,"a",{"innerHTML":E.user.displayName,"href":D,"target":"_blank"});}return C;};perfUI.messages.application.prototype.buildRowDeleteOptions=function(G,C){var H=perfUI.util.addEl;var I=YAHOO.util.Event;var J=this;var E=this.config.optionsMenu["delete"];var A=this.config.optionsMenu["block"];if(E<0&&A<0){return;}var B=function(L,K){J.showDeleteDialog([K]);};var F=H(C,"div",{"title":perfTranslator.getValue(316),"class":"iconRemove"});var D=H(F,"div",{"class":"deleteImg"});I.addListener(D,"click",B,G,true);};perfUI.messages.application.prototype.buildUserThumbnail=function(E,B,A){var J=YAHOO.util.Event;var G=perfUI.util.addEl;A=A||E.user.getProfileUrl();var D=G(B,"a",{"href":A,"target":"_blank"});var H=G(D,"img",{"class":"thumbnail"});var I=function(){if(this.height>100){this.style.height="100px";}};J.addListener(H,"load",I,H,true);H.src=E.user.thumbUrl;if(E.user.online){var C=G(B,"div",{"class":"online left"});var F=G(C,"span",{"class":"onlineIcon left"});G(C,"span",{"class":"txtorange left","innerHTML":"&nbsp;"+perfTranslator.getValue(1882)});}};perfUI.messages.application.prototype.selectRow=function(B){var A=this.getPersistedSelectionIndex(B);if(A<0){this.persistedSelections.push(B);}else{this.persistedSelections[A]=B;}if(B.selectItemElement){B.selectItemElement.checked=true;}this.setAvailableOptionsMenuItems();};perfUI.messages.application.prototype.deSelectRow=function(B){this.checkBoxSelector.checked=false;this.checkBoxSelector.title=perfTranslator.getValue(824);var A=this.getPersistedSelectionIndex(B);if(A>=0){this.persistedSelections.splice(A,1);}if(B.selectItemElement){B.selectItemElement.checked=false;}this.setAvailableOptionsMenuItems();};perfUI.messages.application.prototype.selectAllRows=function(){for(var A=0;A<this.results.length;A++){var B=this.results[A];this.selectRow(B);}};perfUI.messages.application.prototype.selectNoRows=function(){for(var A=0;A<this.results.length;A++){var B=this.results[A];this.deSelectRow(B);}};perfUI.messages.application.prototype.getPersistedSelectionIndex=function(C){for(var B=0;B<this.persistedSelections.length;B++){var A=this.persistedSelections[B];if(C.messageId==A.messageId){return B;}}return -1;};perfUI.messages.application.prototype.hasUnreadPersistedSelections=function(){for(var A=0;A<this.persistedSelections.length;A++){var B=this.persistedSelections[A];if(!B.isRead){return true;}}return false;};perfUI.messages.application.prototype.hasReadPersistedSelections=function(){for(var A=0;A<this.persistedSelections.length;A++){var B=this.persistedSelections[A];if(B.isRead){return true;}}return false;};perfUI.messages.application.prototype.enableOptionsMenuItem=function(D,C){var B=YAHOO.util.Dom;var A="disabled";if(C){B.removeClass(D,A);}else{B.addClass(D,A);}};perfUI.messages.application.prototype.setAvailableOptionsMenuItems=function(){var B=this.sections["options_menu"];if(!B){return;}var G=B.getElementsByTagName("li");if(G.length<=0){return;}if(this.persistedSelections.length==0){for(var D=0;D<G.length;D++){this.enableOptionsMenuItem(G[D],false);}return;}var H=this.config.optionsMenu["markUnread"];var F=this.config.optionsMenu["markRead"];var C=this.config.optionsMenu["delete"];var A=this.config.optionsMenu["block"];var I=this.hasReadPersistedSelections();var E=this.hasUnreadPersistedSelections();if(H>=0){if(I){this.enableOptionsMenuItem(G[H],true);}else{this.enableOptionsMenuItem(G[H],false);}}if(F>=0){if(E){this.enableOptionsMenuItem(G[F],true);}else{this.enableOptionsMenuItem(G[F],false);}}if(C>=0){this.enableOptionsMenuItem(G[C],true);}if(A>=0){this.enableOptionsMenuItem(G[A],true);}};perfUI.messages.application.prototype.getRequestIdQueryString=function(C,F){var B="";var E="&ids=";for(var A=0;A<C.length;A++){var D=C[A];if(!F){B+=E+D.messageId;}else{B+=E+D.threadId;}}return B;};perfUI.messages.application.prototype.removeMessageOnSuccess=function(){if(this.alertDialog){this.alertDialog.buttonSubmit.set("disabled",false);this.alertDialog.hide();}this.getMessages(this.getCurrentState());};perfUI.messages.application.prototype.removeMessage=function(F,D,H){var J=this;var C=false;F=F||this.persistedSelections;if(F.length<=0){return;}if(typeof(F[0].messageId)=="undefined"){C=true;}var A=this.getRequestIdQueryString(F,C);var G={url:"/api/call.asp",params:"?Function=Messages."+H+"&userid="+this.userId+A+"&block="+(D?"1":"0")};var E=function(K){perfUI.messages.exceptionHandler.handleFailure();};var I={success:J.removeMessageOnSuccess,failure:E,scope:J};var B=G.url+G.params;YAHOO.util.Connect.asyncRequest("POST",B,I,null);};perfUI.messages.application.prototype.getMessages=function(){};perfUI.messages.application.prototype.showMessageEditor=function(E,B){var C=this;if(!this.messageEditor){var A=function(){tinymce.dom.Event._pageInit();var F=E?perfUI.messages.modalEditor:perfUI.messages.inlineEditor;C.renderMessageEditor(F,B);};if(typeof(perfUI.messages.composer)=="undefined"){var C=this;perfUI.util.insertClientScript('var tinyMCE_GZ = {loaded:true}; var tinyMCEPreInit = {suffix:"",base : "/includes/js/tinymce/jscripts/tiny_mce"};');var D=perfUI.util.loadClientResource(this.messageEditorSrcUrl,"js",{"fn":A,"obj":C,"scope":true});}else{A();}}else{this.messageEditor.show();this.messageEditor.focus();}};perfUI.messages.application.prototype.onHideAlertDialog=function(){var C=YAHOO.util.Dom;if(this.messageEditor&&this.messageEditor.getElement().style.display=="block"){if(this.messageEditor.modal){var A=this.messageEditor.getMask();if(A){var B=A.getElement();if(B.style.display=="none"){B.style.display="block";}}}}var D=this.alertDialog.getElement();var E=C.getStyle(D,"opacity");if(E!=1){C.setStyle(D,"opacity",1);}};perfUI.messages.application.prototype.renderAlertDialog=function(){var C=perfUI.util.addEl;var J=YAHOO.util.Event;var B=YAHOO.util.Dom;var G=C(this.sections["panels"].parentNode,"div",{"class":"denybox"});this.alertDialog=new perfUI.widgets.panel(G,"345px");this.alertDialog.setHeader();this.alertDialog.setBody();this.alertDialog.render();B.setStyle(this.alertDialog.container,"zIndex","2000");B.setStyle(this.alertDialog.getMask().getElement(),"zIndex","1000");var K=function(){if(this.messageEditor&&this.messageEditor.getMask()&&this.messageEditor.getMask().getElement()){this.messageEditor.getMask().getElement().style.display="none";}};this.alertDialog.onHideEvent.subscribe(this.onHideAlertDialog,this,true);this.alertDialog.onShowEvent.subscribe(K,this,true);var D=this.alertDialog.getHeader();B.addClass(D,"bgblue3");C(D,"div",{"class":"icon_deny left"});this.alertDialog.caption=C(D,"div",{"class":"txtdkblue left"});var H=C(D,"div",{"class":"txtdkblue right close","innerHTML":"x"});J.addListener(H,"click",this.alertDialog.hide,this.alertDialog,true);var F=this.alertDialog.getBody();this.alertDialog.bodyMessage=C(F,"div");var A=C(F,"center",{"class":"buttonbox clear"});var I=C(A,"span",{"class":"submit"});this.alertDialog.buttonSubmit=new YAHOO.widget.Button({container:I});var E=C(A,"span",{"class":"cancel"});this.alertDialog.buttonCancel=new YAHOO.widget.Button({label:perfTranslator.getValue(701),onclick:{fn:this.alertDialog.hide,obj:null,scope:this.alertDialog},container:E});};perfUI.messages.application.prototype.showDeleteDialog=function(F){var H=perfUI.util.addEl;var J=YAHOO.util.Event;var G=YAHOO.util.Dom;F=F||this.persistedSelections;if(!this.alertDialog){this.renderAlertDialog();}this.alertDialog.caption.innerHTML=perfTranslator.getValue(316);var B=this.alertDialog.bodyMessage;B.innerHTML="";var K=perfTranslator.getValue(2784);if(F.length>1){K=perfTranslator.parseValue(perfTranslator.getValue(2785),[String(F.length)]);}H(B,"p",{"innerHTML":K});if(this.config.optionsMenu["block"]>=0&&F.length==1&&F[0].totalRecipients>1){var C=H(B,"div",{"class":"options"});var I=H(C,"div",{"class":"checkbox"});var D=H(I,"checkbox");this.alertDialog.checkBlockUser=D;var A=H(I,"label",{"class":"txtdkblue","innerHTML":perfTranslator.getValue(2786)});J.addListener(A,"click",function(){D.checked=true;});}if(this.alertDialog.checkBlockUser){this.alertDialog.checkBlockUser.checked=false;}var E=function(N,M){this.alertDialog.buttonSubmit.set("disabled",true);var L=false;if(this.alertDialog.checkBlockUser&&this.alertDialog.checkBlockUser.checked){L=true;}this.removeMessage(M,L);};this.alertDialog.buttonSubmit.set("label",perfTranslator.getValue(316));this.alertDialog.buttonSubmit.set("onclick",{fn:E,obj:F,scope:this});this.alertDialog.buttonCancel.get("container").style.display="inline";this.alertDialog.show();this.alertDialog.center();};perfUI.messages.application.prototype.showErrorDialog=function(F,B){var G=perfUI.util.addEl;var A=YAHOO.util.Event;var D=YAHOO.util.Dom;var E=B[0];if(!this.alertDialog){this.renderAlertDialog();}this.alertDialog.caption.innerHTML=perfTranslator.getValue(1868);var C=this.alertDialog.bodyMessage;C.innerHTML="";G(C,"p",{"style":"text-align:center","innerHTML":E.error.msg});this.alertDialog.buttonSubmit.set("label","ok");this.alertDialog.buttonSubmit.set("onclick",{fn:this.alertDialog.hide,obj:null,scope:this.alertDialog});this.alertDialog.buttonCancel.get("container").style.display="none";this.alertDialog.show();this.alertDialog.center();};perfUI.messages.application.prototype.onFadeMessageEditorSubmitDialog=function(B,A){this.alertDialog.hide();};perfUI.messages.application.prototype.showMessageEditorSubmitDialog=function(F,C){var G=perfUI.util.addEl;var B=YAHOO.util.Event;var E=YAHOO.util.Dom;if(!this.alertDialog){this.renderAlertDialog();}this.alertDialog.caption.innerHTML=perfTranslator.getValue(2625);var D=this.alertDialog.bodyMessage;D.innerHTML="";G(D,"p",{"style":"text-align:center","innerHTML":perfTranslator.getValue(2792)});this.alertDialog.buttonSubmit.set("label","ok");this.alertDialog.buttonSubmit.set("onclick",{fn:this.alertDialog.hide,obj:null,scope:this.alertDialog});this.alertDialog.buttonCancel.get("container").style.display="none";var A=new YAHOO.util.Anim(this.alertDialog.getElement(),{opacity:{to:0}},5,YAHOO.util.Easing.easeIn);A.onComplete.subscribe(this.onFadeMessageEditorSubmitDialog,this,true);this.alertDialog.show();this.alertDialog.center();A.animate();};perfUI.messages.application.prototype.renderMessageEditor=function(D,B,A,C){B=B||this.sections["panels"];this.messageEditor=new D(this.userId,B,A,C);this.messageEditor.afterRenderComplete.subscribe(this.onAfterRenderMessageEditor,this,true);this.messageEditor.onSubmitContent.subscribe(this.onAfterSubmitContent,this,true);this.messageEditor.onSubmitError.subscribe(this.showErrorDialog,this,true);this.messageEditor.render();};perfUI.messages.application.prototype.onAfterRenderMessageEditor=function(){};perfUI.messages.application.prototype.onAfterSubmitContent=function(){this.messageEditor.hide();this.showMessageEditorSubmitDialog();};perfUI.messages.standalone=function(B,C,A){perfUI.messages.standalone.superclass.constructor.call(this,B,C,A);this.allowPager=false;this.applicationCss="msg_standalone";};YAHOO.extend(perfUI.messages.standalone,perfUI.messages.application);perfUI.messages.standalone.prototype.buildSectionOptions=function(A){};perfUI.messages.standalone.prototype.buildSectionCaption=function(){};perfUI.messages.standalone.prototype.buildComposeLink=function(A){};perfUI.messages.standalone.prototype.buildListItem=function(B,C,A){};perfUI.messages.standalone.prototype.loadCurrentView=function(A){};perfUI.messages.standalone.prototype.getMessages=function(){};perfUI.messages.standalone.prototype.load=function(){var A=YAHOO.util.Dom;if(this.applicationCss.trim().length>0){A.addClass(this.container,this.applicationCss);}};perfUI.messages.standalone.prototype.setMessage=function(A){this.results=[];this.results.push(A);};perfUI.messages.standalone.prototype.showMessageEditor=function(E,B,F){var C=this;E=E==undefined?true:E;if(F){this.setMessage(F);}if(!this.messageEditor){var A=function(){tinymce.dom.Event._pageInit();var G=E?perfUI.messages.modalEditor:perfUI.messages.inlineEditor;C.renderMessageEditor(G,B);};if(typeof(perfUI.messages.composer)=="undefined"){var C=this;perfUI.util.insertClientScript('var tinyMCE_GZ = {loaded:true}; var tinyMCEPreInit = {suffix:"",base : "/includes/js/tinymce/jscripts/tiny_mce"};');var D=perfUI.util.loadClientResource(this.messageEditorSrcUrl,"js",{"fn":A,"obj":C,"scope":true});}else{A();}}else{this.messageEditor.show();}};perfUI.messages.standalone.prototype.preloadMessageEditor=function(){var C=YAHOO.util.Dom;var A=this.messageEditor;if(this.results.length>0){for(var B=0;B<this.results.length;B++){var D=this.results[B];A.recipientWidget.addRecipient(D.user);if(A.txtSubject.tagName.toLowerCase()=="input"){A.txtSubject.value=D.subject;}else{A.txtSubject.innerHTML=D.subject;}}if(!A.lockedRecipients&&A.recipientWidget.collapseContainer){A.recipientWidget.collapseContainer();}var E="breakpoint here";}};perfUI.messages.standalone.prototype.renderMessageEditor=function(D,B,A,C){perfUI.messages.standalone.superclass.renderMessageEditor.call(this,D,B,A,C);this.messageEditor.onShowEvent.subscribers=[];this.messageEditor.onShowEvent.subscribe(this.preloadMessageEditor,this,true);};if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var B=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(H,I){for(var G in this.ids){for(var J in this.ids[G]){var A=this.ids[G][J];if(!this.isTypeOfDD(A)){continue;}A[H].apply(A,I);}}},_onLoad:function(){this.init();B.on(document,"mouseup",this.handleMouseUp,this,true);B.on(document,"mousemove",this.handleMouseMove,this,true);B.on(window,"unload",this._onUnload,this,true);B.on(window,"resize",this._onResize,this,true);},_onResize:function(A){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(A,D){if(!this.initialized){this.init();}if(!this.ids[D]){this.ids[D]={};}this.ids[D][A.id]=A;},removeDDFromGroup:function(A,F){if(!this.ids[F]){this.ids[F]={};}var E=this.ids[F];if(E&&E[A.id]){delete E[A.id];}},_remove:function(A){for(var D in A.groups){if(D&&this.ids[D][A.id]){delete this.ids[D][A.id];}}delete this.handleIds[A.id];},regHandle:function(A,D){if(!this.handleIds[A]){this.handleIds[A]={};}this.handleIds[A][D]=D;},isDragDrop:function(A){return(this.getDDById(A))?true:false;},getRelated:function(A,K){var H=[];for(var I in A.groups){for(var J in this.ids[I]){var L=this.ids[I][J];if(!this.isTypeOfDD(L)){continue;}if(!K||L.isTarget){H[H.length]=L;}}}return H;},isLegalTarget:function(A,G){var I=this.getRelated(A,true);for(var H=0,J=I.length;H<J;++H){if(I[H].id==G.id){return true;}}return false;},isTypeOfDD:function(A){return(A&&A.__ygDragDrop);},isHandle:function(A,D){return(this.handleIds[A]&&this.handleIds[A][D]);},getDDById:function(A){for(var D in this.ids){if(this.ids[D][A]){return this.ids[D][A];}}return null;},handleMouseDown:function(A,E){this.currentTarget=YAHOO.util.Event.getTarget(A);this.dragCurrent=E;var F=E.getEl();this.startX=YAHOO.util.Event.getPageX(A);this.startY=YAHOO.util.Event.getPageY(A);this.deltaX=this.startX-F.offsetLeft;this.deltaY=this.startY-F.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var C=YAHOO.util.DDM;C.startDrag(C.startX,C.startY);C.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(F,A){clearTimeout(this.clickTimeout);var E=this.dragCurrent;if(E&&E.events.b4StartDrag){E.b4StartDrag(F,A);E.fireEvent("b4StartDragEvent",{x:F,y:A});}if(E&&E.events.startDrag){E.startDrag(F,A);E.fireEvent("startDragEvent",{x:F,y:A});}this.dragThreshMet=true;},handleMouseUp:function(A){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(A);}this.fromTimeout=false;this.fireEvents(A,true);}else{}this.stopDrag(A);this.stopEvent(A);}},stopEvent:function(A){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(A);}if(this.preventDefault){YAHOO.util.Event.preventDefault(A);}},stopDrag:function(A,E){var F=this.dragCurrent;if(F&&!E){if(this.dragThreshMet){if(F.events.b4EndDrag){F.b4EndDrag(A);F.fireEvent("b4EndDragEvent",{e:A});}if(F.events.endDrag){F.endDrag(A);F.fireEvent("endDragEvent",{e:A});}}if(F.events.mouseUp){F.onMouseUp(A);F.fireEvent("mouseUpEvent",{e:A});}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(A){var H=this.dragCurrent;if(H){if(YAHOO.util.Event.isIE&&!A.button){this.stopEvent(A);return this.handleMouseUp(A);}else{if(A.clientX<0||A.clientY<0){}}if(!this.dragThreshMet){var F=Math.abs(this.startX-YAHOO.util.Event.getPageX(A));var G=Math.abs(this.startY-YAHOO.util.Event.getPageY(A));if(F>this.clickPixelThresh||G>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(H&&H.events.b4Drag){H.b4Drag(A);H.fireEvent("b4DragEvent",{e:A});}if(H&&H.events.drag){H.onDrag(A);H.fireEvent("dragEvent",{e:A});}if(H){this.fireEvents(A,false);}}this.stopEvent(A);}},fireEvents:function(g,q){var A=this.dragCurrent;if(!A||A.isLocked()||A.dragOnly){return;}var o=YAHOO.util.Event.getPageX(g),p=YAHOO.util.Event.getPageY(g),m=new YAHOO.util.Point(o,p),r=A.getTargetCoord(m.x,m.y),w=A.getDragEl(),x=["out","over","drop","enter"],h=new YAHOO.util.Region(r.y,r.x+w.offsetWidth,r.y+w.offsetHeight,r.x),t=[],y={},l=[],AB={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var j in this.dragOvers){var AA=this.dragOvers[j];if(!this.isTypeOfDD(AA)){continue;}if(!this.isOverTarget(m,AA,this.mode,h)){AB.outEvts.push(AA);}t[j]=true;delete this.dragOvers[j];}for(var k in A.groups){if("string"!=typeof k){continue;}for(j in this.ids[k]){var v=this.ids[k][j];if(!this.isTypeOfDD(v)){continue;}if(v.isTarget&&!v.isLocked()&&v!=A){if(this.isOverTarget(m,v,this.mode,h)){y[k]=true;if(q){AB.dropEvts.push(v);}else{if(!t[v.id]){AB.enterEvts.push(v);}else{AB.overEvts.push(v);}this.dragOvers[v.id]=v;}}}}}this.interactionInfo={out:AB.outEvts,enter:AB.enterEvts,over:AB.overEvts,drop:AB.dropEvts,point:m,draggedRegion:h,sourceRegion:this.locationCache[A.id],validDrop:q};for(var z in y){l.push(z);}if(q&&!AB.dropEvts.length){this.interactionInfo.validDrop=false;if(A.events.invalidDrop){A.onInvalidDrop(g);A.fireEvent("invalidDropEvent",{e:g});}}for(j=0;j<x.length;j++){var d=null;if(AB[x[j]+"Evts"]){d=AB[x[j]+"Evts"];}if(d&&d.length){var u=x[j].charAt(0).toUpperCase()+x[j].substr(1),e="onDrag"+u,s="b4Drag"+u,n="drag"+u+"Event",f="drag"+u;if(this.mode){if(A.events[s]){A[s](g,d,l);A.fireEvent(s+"Event",{event:g,info:d,group:l});}if(A.events[f]){A[e](g,d,l);A.fireEvent(n,{event:g,info:d,group:l});}}else{for(var b=0,i=d.length;b<i;++b){if(A.events[s]){A[s](g,d[b].id,l[0]);A.fireEvent(s+"Event",{event:g,info:d[b].id,group:l[0]});}if(A.events[f]){A[e](g,d[b].id,l[0]);A.fireEvent(n,{event:g,info:d[b].id,group:l[0]});}}}}}},getBestMatch:function(H){var A=null;var I=H.length;if(I==1){A=H[0];}else{for(var G=0;G<I;++G){var J=H[G];if(this.mode==this.INTERSECT&&J.cursorIsOver){A=J;break;}else{if(!A||!A.overlap||(J.overlap&&A.overlap.getArea()<J.overlap.getArea())){A=J;}}}}return A;},refreshCache:function(K){var I=K||this.ids;for(var L in I){if("string"!=typeof L){continue;}for(var J in this.ids[L]){var H=this.ids[L][J];if(this.isTypeOfDD(H)){var A=this.getLocation(H);if(A){this.locationCache[H.id]=A;}else{delete this.locationCache[H.id];}}}}},verifyEl:function(E){try{if(E){var F=E.offsetParent;if(F){return true;}}}catch(A){}return false;},getLocation:function(V){if(!this.isTypeOfDD(V)){return null;}var X=V.getEl(),S,A,N,Q,R,P,O,T,W;try{S=YAHOO.util.Dom.getXY(X);}catch(U){}if(!S){return null;}A=S[0];N=A+X.offsetWidth;Q=S[1];R=Q+X.offsetHeight;P=Q-V.padding[0];O=N+V.padding[1];T=R+V.padding[2];W=A-V.padding[3];return new YAHOO.util.Region(P,O,T,W);},isOverTarget:function(M,L,A,R){var Q=this.locationCache[L.id];if(!Q||!this.useCache){Q=this.getLocation(L);this.locationCache[L.id]=Q;}if(!Q){return false;}L.cursorIsOver=Q.contains(M);var N=this.dragCurrent;if(!N||(!A&&!N.constrainX&&!N.constrainY)){return L.cursorIsOver;}L.overlap=null;if(!R){var P=N.getTargetCoord(M.x,M.y);var K=N.getDragEl();R=new YAHOO.util.Region(P.y,P.x+K.offsetWidth,P.y+K.offsetHeight,P.x);}var O=R.intersect(Q);if(O){L.overlap=O;return(A)?true:L.cursorIsOver;}else{return false;}},_onUnload:function(A,D){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(A){var D=this.elementCache[A];if(!D||!D.el){D=this.elementCache[A]=new this.ElementWrapper(YAHOO.util.Dom.get(A));}return D;},getElement:function(A){return YAHOO.util.Dom.get(A);},getCss:function(A){var D=YAHOO.util.Dom.get(A);return(D)?D.style:null;},ElementWrapper:function(A){this.el=A||null;this.id=this.el&&A.id;this.css=this.el&&A.style;},getPosX:function(A){return YAHOO.util.Dom.getX(A);},getPosY:function(A){return YAHOO.util.Dom.getY(A);},swapNode:function(F,H){if(F.swapNode){F.swapNode(H);}else{var A=H.parentNode;var G=H.nextSibling;if(G==F){A.insertBefore(F,H);}else{if(H==F.nextSibling){A.insertBefore(H,F);}else{F.parentNode.replaceChild(H,F);A.insertBefore(F,G);}}}},getScroll:function(){var F,H,A=document.documentElement,G=document.body;if(A&&(A.scrollTop||A.scrollLeft)){F=A.scrollTop;H=A.scrollLeft;}else{if(G){F=G.scrollTop;H=G.scrollLeft;}else{}}return{top:F,left:H};},getStyle:function(A,D){return YAHOO.util.Dom.getStyle(A,D);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(F,A){var E=YAHOO.util.Dom.getXY(A);YAHOO.util.Dom.setXY(F,E);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(A,D){return(A-D);},_timeoutCount:0,_addListeners:function(){var A=YAHOO.util.DDM;if(YAHOO.util.Event&&document){A._onLoad();}else{if(A._timeoutCount>2000){}else{setTimeout(A._addListeners,10);if(document&&document.body){A._timeoutCount+=1;}}}},handleWasClicked:function(F,A){if(this.isHandle(A,F.id)){return true;}else{var E=F.parentNode;while(E){if(this.isHandle(A,E.id)){return true;}else{E=E.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var C=YAHOO.util.Event;var D=YAHOO.util.Dom;YAHOO.util.DragDrop=function(A,F,B){if(A){this.init(A,F,B);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(B,A){},startDrag:function(B,A){},b4Drag:function(A){},onDrag:function(A){},onDragEnter:function(B,A){},b4DragOver:function(A){},onDragOver:function(B,A){},b4DragOut:function(A){},onDragOut:function(B,A){},b4DragDrop:function(A){},onDragDrop:function(B,A){},onInvalidDrop:function(A){},b4EndDrag:function(A){},endDrag:function(A){},b4MouseDown:function(A){},onMouseDown:function(A){},onMouseUp:function(A){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=D.get(this.id);}return this._domRef;},getDragEl:function(){return D.get(this.dragElId);},init:function(A,H,G){this.initTarget(A,H,G);C.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var B in this.events){this.createEvent(B+"Event");}},initTarget:function(A,F,B){this.config=B||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof A!=="string"){this._domRef=A;A=D.generateId(A);}this.id=A;this.addToGroup((F)?F:"default");this.handleElId=A;C.onAvailable(A,this.handleOnAvailable,this,true);this.setDragElId(A);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var A in this.config.events){if(this.config.events[A]===false){this.events[A]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(B,H,A,G){if(!H&&0!==H){this.padding=[B,B,B,B];}else{if(!A&&0!==A){this.padding=[B,H,B,H];}else{this.padding=[B,H,A,G];}}},setInitPosition:function(I,J){var B=this.getEl();if(!this.DDM.verifyEl(B)){if(B&&B.style&&(B.style.display=="none")){}else{}return;}var K=I||0;var L=J||0;var A=D.getXY(B);this.initPageX=A[0]-K;this.initPageY=A[1]-L;this.lastPageX=A[0];this.lastPageY=A[1];this.setStartPosition(A);},setStartPosition:function(A){var B=A||D.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=B[0];this.startPageY=B[1];},addToGroup:function(A){this.groups[A]=true;this.DDM.regDragDrop(this,A);},removeFromGroup:function(A){if(this.groups[A]){delete this.groups[A];}this.DDM.removeDDFromGroup(this,A);},setDragElId:function(A){this.dragElId=A;},setHandleElId:function(A){if(typeof A!=="string"){A=D.generateId(A);}this.handleElId=A;this.DDM.regHandle(this.id,A);},setOuterHandleElId:function(A){if(typeof A!=="string"){A=D.generateId(A);}C.on(A,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(A);this.hasOuterHandles=true;},unreg:function(){C.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(A,B){var K=A.which||A.button;if(this.primaryButtonOnly&&K>1){return;}if(this.isLocked()){return;}var L=this.b4MouseDown(A);if(this.events.b4MouseDown){L=this.fireEvent("b4MouseDownEvent",A);}var J=this.onMouseDown(A);if(this.events.mouseDown){J=this.fireEvent("mouseDownEvent",A);}if((L===false)||(J===false)){return;}this.DDM.refreshCache(this.groups);var I=new YAHOO.util.Point(C.getPageX(A),C.getPageY(A));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(I,this)){}else{if(this.clickValidator(A)){this.setStartPosition();this.DDM.handleMouseDown(A,this);this.DDM.stopEvent(A);}else{}}},clickValidator:function(A){var B=YAHOO.util.Event.getTarget(A);return(this.isValidHandleChild(B)&&(this.id==this.handleElId||this.DDM.handleWasClicked(B,this.id)));},getTargetCoord:function(B,G){var H=B-this.deltaX;var A=G-this.deltaY;if(this.constrainX){if(H<this.minX){H=this.minX;}if(H>this.maxX){H=this.maxX;}}if(this.constrainY){if(A<this.minY){A=this.minY;}if(A>this.maxY){A=this.maxY;}}H=this.getTick(H,this.xTicks);A=this.getTick(A,this.yTicks);return{x:H,y:A};},addInvalidHandleType:function(B){var A=B.toUpperCase();this.invalidHandleTypes[A]=A;},addInvalidHandleId:function(A){if(typeof A!=="string"){A=D.generateId(A);}this.invalidHandleIds[A]=A;},addInvalidHandleClass:function(A){this.invalidHandleClasses.push(A);},removeInvalidHandleType:function(B){var A=B.toUpperCase();delete this.invalidHandleTypes[A];},removeInvalidHandleId:function(A){if(typeof A!=="string"){A=D.generateId(A);}delete this.invalidHandleIds[A];},removeInvalidHandleClass:function(B){for(var A=0,F=this.invalidHandleClasses.length;A<F;++A){if(this.invalidHandleClasses[A]==B){delete this.invalidHandleClasses[A];}}},isValidHandleChild:function(I){var J=true;var A;try{A=I.nodeName.toUpperCase();}catch(B){A=I.nodeName;}J=J&&!this.invalidHandleTypes[A];J=J&&!this.invalidHandleIds[I.id];for(var K=0,L=this.invalidHandleClasses.length;J&&K<L;++K){J=!D.hasClass(I,this.invalidHandleClasses[K]);}return J;},setXTicks:function(A,H){this.xTicks=[];this.xTickSize=H;var B={};for(var G=this.initPageX;G>=this.minX;G=G-H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true;}}for(G=this.initPageX;G<=this.maxX;G=G+H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(A,H){this.yTicks=[];this.yTickSize=H;var B={};for(var G=this.initPageY;G>=this.minY;G=G-H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true;}}for(G=this.initPageY;G<=this.maxY;G=G+H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(A,B,F){this.leftConstraint=parseInt(A,10);this.rightConstraint=parseInt(B,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(F){this.setXTicks(this.initPageX,F);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(F,A,B){this.topConstraint=parseInt(F,10);this.bottomConstraint=parseInt(A,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(B){this.setYTicks(this.initPageY,B);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var A=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var B=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(A,B);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(A,K){if(!K){return A;}else{if(K[0]>=A){return K[0];}else{for(var M=0,N=K.length;M<N;++M){var L=M+1;if(K[L]&&K[L]>=A){var B=A-K[M];var J=K[L]-A;return(J>B)?K[M]:K[L];}}return K[K.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(E,D,F){if(E){this.init(E,D,F);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(G,H){var E=G-this.startPageX;var F=H-this.startPageY;this.setDelta(E,F);},setDelta:function(D,C){this.deltaX=D;this.deltaY=C;},setDragElPos:function(E,F){var D=this.getDragEl();this.alignElWithMouse(D,E,F);},alignElWithMouse:function(O,K,L){var M=this.getTargetCoord(K,L);if(!this.deltaSetXY){var J=[M.x,M.y];YAHOO.util.Dom.setXY(O,J);var N=parseInt(YAHOO.util.Dom.getStyle(O,"left"),10);var P=parseInt(YAHOO.util.Dom.getStyle(O,"top"),10);this.deltaSetXY=[N-M.x,P-M.y];}else{YAHOO.util.Dom.setStyle(O,"left",(M.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(O,"top",(M.y+this.deltaSetXY[1])+"px");}this.cachePosition(M.x,M.y);var I=this;setTimeout(function(){I.autoScroll.call(I,M.x,M.y,O.offsetHeight,O.offsetWidth);},0);},cachePosition:function(F,D){if(F){this.lastPageX=F;this.lastPageY=D;}else{var E=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=E[0];this.lastPageY=E[1];}},autoScroll:function(W,X,b,V){if(this.scroll){var U=this.DDM.getClientHeight();var Q=this.DDM.getClientWidth();var S=this.DDM.getScrollTop();var O=this.DDM.getScrollLeft();var Y=b+X;var T=V+W;var Z=(U+S-X-this.deltaY);var a=(Q+O-W-this.deltaX);var P=40;var R=(document.all)?80:30;if(Y>U&&Z<P){window.scrollTo(O,S+R);}if(X<S&&S>0&&X-S<P){window.scrollTo(O,S-R);}if(T>Q&&a<P){window.scrollTo(O+R,S);}if(W<O&&O>0&&W-O<P){window.scrollTo(O-R,S);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(B){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(B),YAHOO.util.Event.getPageY(B));},b4Drag:function(B){this.setDragElPos(YAHOO.util.Event.getPageX(B),YAHOO.util.Event.getPageY(B));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(E,D,F){if(E){this.init(E,D,F);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var N=this,H=document.body;if(!H||!H.firstChild){setTimeout(function(){N.createFrame();},50);return;}var I=this.getDragEl(),K=YAHOO.util.Dom;if(!I){I=document.createElement("div");I.id=this.dragElId;var L=I.style;L.position="absolute";L.visibility="hidden";L.cursor="move";L.border="2px solid #aaa";L.zIndex=999;L.height="25px";L.width="25px";var M=document.createElement("div");K.setStyle(M,"height","100%");K.setStyle(M,"width","100%");K.setStyle(M,"background-color","#ccc");K.setStyle(M,"opacity","0");I.appendChild(M);if(YAHOO.env.ua.ie){var J=document.createElement("iframe");J.setAttribute("src","javascript:");J.setAttribute("scrolling","no");J.setAttribute("frameborder","0");I.insertBefore(J,I.firstChild);K.setStyle(J,"height","100%");K.setStyle(J,"width","100%");K.setStyle(J,"position","absolute");K.setStyle(J,"top","0");K.setStyle(J,"left","0");K.setStyle(J,"opacity","0");K.setStyle(J,"zIndex","-1");K.setStyle(J.nextSibling,"zIndex","2");}H.insertBefore(I,H.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(G,H){var I=this.getEl();var F=this.getDragEl();var J=F.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(J.width,10)/2),Math.round(parseInt(J.height,10)/2));}this.setDragElPos(G,H);YAHOO.util.Dom.setStyle(F,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var O=YAHOO.util.Dom;var L=this.getEl();var K=this.getDragEl();var P=parseInt(O.getStyle(K,"borderTopWidth"),10);var N=parseInt(O.getStyle(K,"borderRightWidth"),10);var Q=parseInt(O.getStyle(K,"borderBottomWidth"),10);var J=parseInt(O.getStyle(K,"borderLeftWidth"),10);if(isNaN(P)){P=0;}if(isNaN(N)){N=0;}if(isNaN(Q)){Q=0;}if(isNaN(J)){J=0;}var R=Math.max(0,L.offsetWidth-N-J);var M=Math.max(0,L.offsetHeight-P-Q);O.setStyle(K,"width",R+"px");O.setStyle(K,"height",M+"px");}},b4MouseDown:function(F){this.setStartPosition();var D=YAHOO.util.Event.getPageX(F);var E=YAHOO.util.Event.getPageY(F);this.autoOffset(D,E);},b4StartDrag:function(C,D){this.showFrame(C,D);},b4EndDrag:function(B){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(F){var G=YAHOO.util.Dom;var H=this.getEl();var E=this.getDragEl();G.setStyle(E,"visibility","");G.setStyle(H,"visibility","hidden");YAHOO.util.DDM.moveToEl(H,E);G.setStyle(E,"visibility","hidden");G.setStyle(H,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(E,D,F){if(E){this.initTarget(E,D,F);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.5.2",build:"1076"});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.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="auto";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 F=this;var G=perfUI.util.addEl;var E=YAHOO.util.Dom;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 C=A;var D="";this.onRender=new YAHOO.util.CustomEvent("onRender",this);this.getContainer=function(){return B;};this.getSelectedValue=function(){return D;};this.clearSelectedValue=function(){var J=this.getOptions();for(var I=0;I<J.length;I++){var H=J[I].control;if(H){H.checked=false;}}this.setSelectedValue("");};this.setSelectedValue=function(H){D=H;};this.setOptions=function(H){C=H;};this.getOptions=function(){return C;};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.render=function(){var M=G(B,"div",{"class":"optionlist"});var K=this.getOptions();for(var J=0;J<K.length;J++){var L=G(M,"div",{"class":"radio"});var I=G(L,"radio",{"value":K[J].value,"name":"reason"});var H=function(O,N){N.checked=true;F.setSelectedValue(N.value);};G(L,"label",{"innerHTML":K[J].text});YAHOO.util.Event.addListener(L,"click",H,I);K[J].control=I;}this.onRender.fire();};this.renderButtons=function(){var I=G(B,"center",{"class":"buttonbox clear"});var H=G(I,"span",{"class":"submit"});this.buttonSubmit=new YAHOO.widget.Button({label:perfTranslator.getValue(320),container:H});var J=G(I,"span",{"class":"cancel"});this.buttonCancel=new YAHOO.widget.Button({label:perfTranslator.getValue(701),onclick:{fn:this.hide,obj:null,scope:this},container:J});};};perfUI.widgets.reportAbuse.prototype.send=function(B,G,F,A){F=F||this.getSelectedValue();var D="/report.asp?s="+G+"&b="+B+"&r="+F;if(A){D+="&e="+A;}try{var C=getHttpRequestObj();C.open("GET",D,true);C.send(null);}catch(E){alert("Unable to Report Abuse at this time");}};perfUI.widgets.reportAbuseMenu=function(container){var addEl=perfUI.util.addEl;var Dom=YAHOO.util.Dom;var Event=YAHOO.util.Event;perfUI.widgets.reportAbuseMenu.superclass.constructor.call(this,container);var container=this.getContainer();Dom.addClass(container,"report_abuse");addEl(container,"strong",{"class":"txtdblue","innerHTML":perfTranslator.getValue(1189)});this.orientation=this.hide=function(){container.style.display="none";Event.removeListener(window,"resize",this.hide,this,true);};this.show=function(e,context){context=context||"tl";var xy=YAHOO.util.Event.getXY(e);var x=xy[0];var y=xy[1];with(container.style){position="absolute";zIndex="2";top=y+"px";left=x+"px";display="block";}var reg=YAHOO.util.Region.getRegion(container);var w=reg.right-reg.left;var view=Dom.getViewportWidth();if(x+w>view||context=="tr"){container.style.left=(x-w)+"px";}Event.addListener(window,"resize",this.hide,this,true);};};YAHOO.extend(perfUI.widgets.reportAbuseMenu,perfUI.widgets.reportAbuse);perfUI.widgets.reportAbuseMenu.prototype.send=function(B,A){if(this.buttonSubmit&&this.buttonSubmit.set){this.buttonSubmit.set("disabled",true);}perfUI.widgets.reportAbuseMenu.superclass.send.call(this,A.userId,A.section,null,A.optional);this.buttonSubmit.set("disabled",false);this.hide();};var _=perfUI.util.addEl;var pfFriendsPager=null;function pfShowMessageEditor(C,B){var A=g_perf_allfriends_messages_standalone;var D=new perfUI.messages.message();D.user=new perfUI.content.user();D.user.userId=B.id;D.user.displayName=B.name;A.showMessageEditor(true,null,D);}function removeFriend(A){YAHOO.util.Connect.asyncRequest("GET","/api/call.asp?Function=Members.RemoveFriend&UserID="+theUsr+"&fUserId="+A+"&f="+(new Date()).getTime(),{success:function(B){if(B.responseXML.getElementsByTagName("error").length){alert(PERF.parseNode(B.responseXML,"error"));return;}loadFriends(theUsr,theFri,pageNum,totaNum);},failure:function(){},scope:function(){}},null);}function getNetworks(A,C){if(A.set&&A.set==1){return;}A.set=1;var B=[perfTranslator.getValue(1484),perfTranslator.getValue(1485),perfTranslator.getValue(1486),perfTranslator.getValue(1458)];var D={cache:false,success:function(F){if(F.responseXML.getElementsByTagName("error").length){alert(PERF.parseNode(F.responseXML,"error"));return;}var H=F.responseXML.getElementsByTagName("network"),K=null,E="",J=null,G,L;for(var I=0;I<H.length;I++){nlastID=PERF.parseNodeNumeric(H[I],"networkTypeId");L=PERF.parseNodeNumeric(H[I],"networkId");if(K==null||nlastID!=K){if(J!=null){J.removeChild(J.lastChild);}J=_(A,"TR").c("TD",{"vAlign":"top","nowrap":true,"text":B[nlastID-1]+":"})._("TD");}_(J,"A",{"target":"blank","href":"/networks/members.asp?i="+L+"&u="+C,"text":PERF.parseNode(H[I],"name")});if(nlastID!=3){_(J,"SPAN",{"text":" "+PERF.parseNode(H[I],"years")});}else{_(J,"SPAN",{"text":" "+PERF.parseNode(H[I],"year1")+" - "+(PERF.parseNode(H[I],"year2")=="9999"?perfTranslator.getValue(2373):PERF.parseNodeNumeric(H[I],"year2"))});}if(I!=H.length-1){_(J,"SPAN",{"text":", "});}K=nlastID;}if(H.length==0){_(A,"TR").c("TD",{"text":perfTranslator.getValue(2374)});}},failure:function(){},scope:function(){}};YAHOO.util.Connect.asyncRequest("GET","/api/callna.asp?function=GetNetWorks&userid="+C+"&f="+(new Date()).getTime(),D,null);}function changePrivacy(A,C){var B=YAHOO.util.Connect.createXhrObject(1);B.conn.open("GET","/api/call.asp?Function=Members.SetAccess&UserID="+theUsr+"&fUserID="+C+"&Access="+A+"&f="+(new Date()).getTime(),false);B.conn.send(null);if(B.conn.responseXML.getElementsByTagName("error").length){alert(PERF.parseNode(B.conn.responseXML,"error"));return;}}function loadFriends(F,D,C,B,A){vt=document.getElementById("view_type").value;pfFriendsPager.PageSize=vt=="0"?15:30;PERF.setCookie("afvt",vt,pfFriendsPager.PageSize);theqs=typeof theqs=="undefined"?(A||""):(A||theqs);totaNum=B;theUsr=F;theFri=D;pageNum=C;isYou=F==D?true:false;if(typeof pullFriends!="undefined"&&YAHOO.util.Connect.isCallInProgress(pullFriends)){YAHOO.util.Connect.abort(pullFriends);}removeFriends();_(document.getElementById("friend_table").rows[0].cells[0].firstChild.insertRow(1),"TD",{"style":"height:300px;padding:5px","colSpan":3,"vAlign":"middle","align":"center"}).c("IMG",{"src":"/images/v2/indicator_pinwheel_blue.gif"})._("SPAN",{"style":"vertical-align:90%;font-size:10pt;font-weight:bold","text":perfTranslator.getValue(1864)+"..."});if(!isYou&&access_level.parentNode&&access_level.parentNode.parentNode){access_level.parentNode.parentNode.removeChild(access_level.parentNode);access_level.a.parentNode.parentNode.removeChild(access_level.a.parentNode);access_level.b.parentNode.parentNode.removeChild(access_level.b.parentNode);access_level.c.parentNode.parentNode.removeChild(access_level.c.parentNode);}var E={success:function(G){if(G.responseXML.getElementsByTagName("error").length){alert(PERF.parseNode(G.responseXML,"error"));return;}pager.ParseXmlProperties(G.responseXML);pager.copy.ParseXmlProperties(G.responseXML);pager.copy.Render(null,null,true);pager.Render(null,null,true);var H=G.responseXML.getElementsByTagName("user");removeFriends();if(vt==1){_(document.getElementById("friend_table").rows[0].cells[0].firstChild.insertRow(1),"TD",{"colSpan":2,"align":"center","style":"background-color:#F2F5FA"}).c("TABLE",{"cellSpacing":5}).c("TR");}for(var I=0;I<H.length;I++){if(vt==0){addDFriend(PERF.parseNode(H[I],"displayName"),PERF.parseNode(H[I],"status"),PERF.parseNode(H[I],"thumbnailUrl"),PERF.parseNode(H[I],"pictureUrl"),PERF.parseNode(H[I],"gender"),PERF.parseNodeNumeric(H[I],"age"),PERF.parseNodeBool(H[I],"online"),PERF.parseNode(H[I],"lastlogin"),PERF.parseNode(H[I],"location1"),PERF.parseNodeNumeric(H[I],"location3"),PERF.parseNode(H[I],"userCode"),PERF.parseNodeBool(H[I],"person"),PERF.parseNodeNumeric(H[I],"userId"),PERF.parseNodeNumeric(H[I],"access")+" - "+PERF.parseNode(H[I],"accessName"),PERF.parseNode(H[I],"userName"),PERF.parseNodeBool(H[I],"allowChat"));}else{addGFriend(PERF.parseNode(H[I],"displayName"),PERF.parseNode(H[I],"thumbnailUrl"),PERF.parseNode(H[I],"pictureUrl"),PERF.parseNodeBool(H[I],"online"),PERF.parseNode(H[I],"userCode"),PERF.parseNodeNumeric(H[I],"userId"),PERF.parseNode(H[I],"userName"),PERF.parseNodeBool(H[I],"allowChat"));}}if(H.length==0){_(document.getElementById("friend_table").rows[0].cells[0].firstChild.insertRow(1),"TD",{"style":"height:300px;vertical-align:middle;font-size:12pt;font-weight:bold;padding:5px","colSpan":3,"align":"center","text":perfTranslator.getValue(2307)});document.getElementById("total_count_row").cells[0].firstChild.innerHTML="&nbsp;";}else{document.getElementById("total_count_row").cells[0].firstChild.innerHTML=perfTranslator.parseValue(perfTranslator.getValue(765),[String(pfFriendsPager.Pages[pfFriendsPager.CurrentPage-1].DataFrom),String(pfFriendsPager.Pages[pfFriendsPager.CurrentPage-1].DataTo),String(pfFriendsPager.TotalRecords)]);}},failure:function(){},scope:function(){}};pullFriends=YAHOO.util.Connect.asyncRequest("GET","/api/call.asp?Function=Members.GetFriends&UserID="+F+"&v="+vt+"&fuserid="+D+"&page="+C+"&numrecords="+(pfFriendsPager.PageSize)+theqs+"&z="+(new Date()).getTime(),E,null);}function removeFriends(){var A=document.getElementById("friend_table").rows[0].cells[0].firstChild;while(A.rows.length>2){while(A.rows[1].childNodes.length){A.rows[1].removeChild(A.rows[1].firstChild);}A.deleteRow(1);}}function loadPage(F){var E=document.getElementById("friend_table");E.style.emptyCells="show";_(E,"TR").c("TD",{"style":"background-color:#FAFAFA","vAlign":"top"}).c("TABLE",{"style":"width:650px","cellPadding":0,"cellSpacing":0}).c("TR",{"id":"total_count_row"}).c("TD").c("B",{"style":"color:RGB(227,91,3)"});_(E.rows[0],"TD",{"style":"background-color:RGB(212,225,234);border-left:1px solid RGB(204,204,204)","vAlign":"top"});_(E.rows[0].cells[0].firstChild.rows[0],"TD");pager=new MediaPagerControl();pfFriendsPager=pager;pager.PageSize=15;pager.Step=5;pager.Container=E.rows[0].cells[0].firstChild.rows[0].cells[1];pager.onPageLoad.subscribe(function(){loadFriends(theUsr,theFri,pager.CurrentPage,totaNum,theqs);},this,true);_(E.rows[0].cells[0].firstChild,"TR",{"style":"background-color:#FAFAFA"}).c("TD",{"text":" "})._("TD",{"style":"padding:5px;padding-right:5px","align":"right"});pager.copy=new MediaPagerControl();pager.copy.Step=5;pager.copy.Container=E.rows[0].cells[0].firstChild.rows[1].cells[1];pager.copy.onPageLoad.subscribe(function(){loadFriends(theUsr,theFri,pager.copy.CurrentPage,totaNum,theqs);},this,true);var E=_(E.rows[0].cells[1],"TABLE",{"style":"width:160px;background-color:RGB(242,245,250)","cellPadding":0,"cellSpacing":0});_(E,"TR").c("td",{"style":"background-color:RGB(250,250,250);font-weight:bold;padding:5px;color:RGB(227,91,3);border-bottom:1px solid RGB(231,235,238)","text":perfTranslator.getValue(2371)});var C=_(E,"TR").c("td",{"style":"padding:5px","innerHTML":"<b>"+perfTranslator.getValue(216)+":</b><br/><input style='width:97%;font-family:tahoma;font-size:8pt' type='text'/>"}).lastChild;_(E,"TR").c("td",{"align":"center","style":"padding-bottom:10px;border-bottom:1px solid #CCC","innerHTML":"<input class='fbut' type='button' value='"+perfTranslator.getValue(242)+"'/>"}).onclick=function(){loadFriends(theUsr,theFri,1,totaNum,"&q="+escape(C.value));};C.onkeydown=function(I){if((I||event).keyCode==13){loadFriends(theUsr,theFri,1,totaNum,"&q="+escape(C.value));}};_(E,"TR").c("td",{"style":"background-color:RGB(212,225,234);height:5px"});_(E,"TR").c("td",{"style":"background-color:RGB(250,250,250);font-weight:bold;padding:5px;color:RGB(227,91,3);border-bottom:1px solid RGB(231,235,238)","text":perfTranslator.getValue(2368)});_(E,"TR").c("td",{"style":"padding:5px;border-bottom:1px solid RGB(204,204,204);padding-bottom:8px"}).c("SELECT",{"id":"view_type","onchange":toggleView,"style":"width:100%;font-family:Tahoma;font-size:8pt"}).c("OPTION",{"text":perfTranslator.getValue(2367),"value":0})._("OPTION",{"text":perfTranslator.getValue(2366),"value":1});_(E,"TR").c("td",{"style":"background-color:RGB(212,225,234);height:5px"});_(E,"TR").c("td",{"style":"background-color:RGB(250,250,250);font-weight:bold;padding:5px;color:RGB(227,91,3);border-bottom:1px solid RGB(231,235,238)","text":perfTranslator.getValue(2365)});var H=_(E,"TR").c("td",{"style":"padding:5px;padding-bottom:6px;border-bottom:1px solid RGB(210,224,233)","innerHTML":"<div style='padding-bottom:6px;font-weight:bold'>"+perfTranslator.getValue(903)+":</div><select id='countrydrop' style='width:100%;font-family:Tahoma;font-size:8pt' name='country'><option value=''>"+perfTranslator.getValue(186)+"</select>"}).lastChild;loadCountries(H);H.onchange=G;_(E,"TR").c("td",{"style":"border-top:1px solid white","innerHTML":"<div style='font-weight:bold;padding:5px'>"+perfTranslator.getValue(1521)+":</div><input checked type='radio' name='s' id='chk4'/><label for='chk4'>"+perfTranslator.getValue(802)+"</label>"});_(E,"TR").c("td",{"innerHTML":"<input name='s' type='radio' id='chk0'/><label for='chk0' style='width:30px'>"+perfTranslator.getValue(149)+"</label>"});_(E,"TR").c("td",{"innerHTML":"<input name='s' type='radio' id='chk1'/><nowrap><label for='chk1' nowrap>"+perfTranslator.getValue(150)+"</label></nowrap>"});_(E,"TR").c("td",{"innerHTML":"<input name='s' type='radio' id='chk2'/><label for='chk2' nowrap>"+perfTranslator.getValue(1659)+"</label>"});_(E,"TR").c("td",{"style":"border-bottom:1px solid RGB(210,224,233);padding-bottom:5px","innerHTML":"<input name='s' type='radio' id='chk3'/><label for='chk3'>"+perfTranslator.getValue(1660)+"</label>"});_(E,"tr").c("td",{"style":"padding:5px;padding-bottom:0px;border-top:1px solid white;font-weight:bold","text":perfTranslator.getValue(1880)+":"});for(var D=0;D<5;D++){document.getElementById("chk"+D).onclick=G;}var A=_(E,"tr").c("td",{"style":"padding:5px","innerHTML":"<input type='checkbox'><span style='vertical-align:20%'>"+perfTranslator.getValue(1881)+"</span>"}).firstChild;A.onclick=G;var B=_(E,"tr").c("td",{"style":"padding:5px;padding-top:0px;border-bottom:1px solid RGB(204,204,204);","innerHTML":"<input type='checkbox'><span style='vertical-align:20%'>"+perfTranslator.getValue(613)+"</span>"}).firstChild;B.onclick=G;if(typeof(F)!="undefined"){B.checked=true;theqs="&o=1";}access_level=_(E,"tr",{"display":"none"}).c("td",{"style":"font-weight:bold;border-top:1px solid white;padding:5px","text":perfTranslator.getValue(1770)+":"});access_level.a=_(E,"tr",{"display":"none"}).c("td",{"style":"padding:5px;padding-top:0px","innerHTML":"<input checked type='checkbox'><span style='vertical-align:20%'>"+perfTranslator.getValue(1130)+"</span>"});access_level.b=_(E,"tr",{"display":"none"}).c("td",{"style":"padding:5px;padding-top:0px","innerHTML":"<input checked type='checkbox'><span style='vertical-align:20%'>"+perfTranslator.getValue(1131)+"</span>"});access_level.c=_(E,"tr",{"display":"none"}).c("td",{"style":"padding:5px;padding-top:0px;border-bottom:1px solid RGB(204,204,204);padding-bottom:5px;","innerHTML":"<input checked type='checkbox'><span style='vertical-align:20%'>"+perfTranslator.getValue(1132)+"</span>"});access_level.a.firstChild.onclick=G;access_level.b.firstChild.onclick=G;access_level.c.firstChild.onclick=G;function G(){C.value="";var I="";I+="&o="+(B.checked?1:0);I+="&p="+(A.checked?1:0);I+="&t="+(document.getElementById("chk4").checked?"1%2C2%2C3%2C4":(document.getElementById("chk0").checked?"1":(document.getElementById("chk1").checked?"2":(document.getElementById("chk2").checked?"3":(document.getElementById("chk3").checked?"4":"0")))));var J="";if(access_level.a.firstChild.checked){J+="1";}if(access_level.b.firstChild.checked){J+=(J?"%2C":"")+"2";}if(access_level.c.firstChild.checked){J+=(J?"%2C":"")+"3";}if(J){I+="&a="+J;}if(H.value){I+="&c="+H.value;}loadFriends(theUsr,theFri,1,totaNum,I);}document.getElementById("view_type").selectedIndex=PERF.getCookie("afvt");}function loadCountries(C){var D=YAHOO.util.Connect.createXhrObject(1);D.conn.open("GET","/api/callna.asp?Function=GetCountries&rid="+(new Date()).getTime(),false);D.conn.send(null);var A=D.conn.responseXML.getElementsByTagName("country");for(var B=0;B<A.length;B++){C.options[C.options.length]=new Option(PERF.parseNode(A[B],"name"),PERF.parseNode(A[B],"id"));}}function getCountryById(B){var C=document.getElementById("countrydrop");for(var A=0;A<C.options.length;A++){if(C[A].value==B){return C[A].text;}}return null;}function toggleView(){switch(this.value){case"0":pfFriendsPager.PageSize=15;break;case"1":pfFriendsPager.PageSize=30;break;}pfFriendsPager.CurrentPage=1;loadFriends(theUsr,theFri,pfFriendsPager.CurrentPage,totaNum,theqs,this.value);}function anyAncestorHasAttribute(B,A,C){if(B[A]==C){return true;}else{if(B.parentNode){return anyAncestorHasAttribute(B.parentNode,A,C);}else{return false;}}}function addDFriend(a,e,A,E,k,C,D,G,Z,Y,F,g,H,R,K,Q){var i=document.getElementById("friend_table").rows[0].cells[0].firstChild;var d=i.insertRow(i.rows.length-1);d.style.backgroundColor="white";d.style.cursor="default";var B=function(m){var n=YAHOO.util.Event.getTarget(YAHOO.util.Event.getEvent(YAHOO.util.Event.getEvent(m)));if(!anyAncestorHasAttribute(n,"dontToggle",true)&&n.tagName!="A"&&n.tagName!="IMG"&&n.tagName!="SELECT"&&n.tagName!="OPTION"){O(d.cells[0].firstChild.rows[0].cells[1].firstChild);}};d.onclick=B;var b;var c=_(d.insertCell(0),"TABLE",{"cellPadding":0,"cellSpacing":0,"style":"width:100%"});d.cells[0].colSpan=2;var M=_(c,"TR");_(M,"TD",{"vAlign":"top","width":120,"rowSpan":document.all?3:2,"style":"padding-left:20px;padding-top:10px;padding-bottom:10px"}).c("A",{"class":"link","style":"font-weight:bold","target":"blank","href":"/profile.asp?uid="+F}).c("IMG",{"border":0,"style":"height:auto","src":A})._("IMG",{"border":0,"src":E,"style":"display:none"});_(M,"TD",{"vAlign":"top","style":"padding-top:20px;padding-right:10px"});_(M.cells[1],"DIV",{"className":"closeBut","style":"background-position:-9px 0px"});_(M.cells[1],"A",{"class":"link","text":a,"style":"font-weight:bold","target":"blank","href":"/profile.asp?uid="+F});_(M.cells[1],"SPAN",{"style":"padding-left:5px","text":e});_(M.cells[1],"TABLE");if(g){_(M.cells[1].lastChild,"TR").c("TD",{"style":"font-weight:bold","text":perfTranslator.getValue(121)})._("TD",{"text":k});if(C){_(M.cells[1].lastChild,"TR").c("TD",{"style":"font-weight:bold","text":perfTranslator.getValue(1830)+":"})._("TD",{"text":C});}}else{_(M.cells[1].lastChild,"TR").c("TD",{"style":"font-weight:bold","text":perfTranslator.getValue(1521)+":"})._("TD",{"text":k});}_(M.cells[1].lastChild,"TR").c("TD",{"style":"font-weight:bold","vAlign":"top","text":perfTranslator.getValue(738)+":"})._("TD",{"innerHTML":(Z?Z+"<br/>":"")+getCountryById(Y)});if(D){_(M.cells[1].lastChild,"TR").c("TD",{"colSpan":2}).c("IMG",{"width":9,"height":8,"src":"/images/v2/online.gif"})._("span",{"class":"txtorange","style":"padding-left:4px;font-size:7pt","text":perfTranslator.getValue(613)});}else{if(G){_(M.cells[1].lastChild,"TR").c("TD",{"style":"font-weight:bold","text":perfTranslator.getValue(768)})._("TD",{"text":G});}}var L=_(c,"TR",{"style":"display:none"});_(L,"TD",{"vAlign":"top","style":"padding-right:5px"});var j=_(L.cells[0],"DIV",{"dontToggle":true,"style":"border-top:1px dotted RGB(125,161,195);border-bottom:1px dotted RGB(125,161,195);padding:10px;margin-right:10px;background-color:RGB(242,245,250)"});if(isYou){function X(){l.show();W.style.display="none";h.style.display="none";T.style.display="";N.style.visibility="visible";}function S(){changePrivacy(l.getValue(),H);N.onclick();V(l.getValue());h.style.display="";}function U(){l.hide();h.style.display="";W.style.display="";T.style.display="none";N.style.visibility="hidden";}_(j,"B",{"dontToggle":true,"class":"txtdblue left","text":perfTranslator.getValue(1770)+":"});var h=_(j,"DIV",{"dontToggle":true,"class":"left perf_privacy","style":"display:inline;padding-left:4px;margin-top:-4px"}).addChild("DIV",{"dontToggle":true});var V=function(m){if(m==1){h.className="lock";}else{if(m==2){h.className="lock lockt2";}else{if(m==3){h.className="lock t3";}}}};V(parseInt(R.charAt(0)));var W=_(j,"A",{"text":perfTranslator.getValue(1797),"class":"link","style":"cursor:pointer;padding-left:5px;padding-right:5px","onclick":X});var P=_(j,"DIV",{"dontToggle":true,"style":"margin-left:150px","class":"perf_privacy"});var l=new perfUI.dashboard.editprivacy.lSlider(P,2,parseInt(R.charAt(0)));var T=_(P,"A",{"text":perfTranslator.getValue(795),"style":"position:relative;cursor:pointer;color:RGB(2,180,0)","class":"link","onclick":S});var N=_(P,"A",{"text":perfTranslator.getValue(701),"class":"link","style":"position:relative;left:9px;cursor:pointer;visibility:hidden","onclick":U});U();}_(j,"b",{"dontToggle":true,"class":"txtdblue","text":perfTranslator.getValue(1099),"style":"padding-right:10px"});_(j,"br");b=_(j,"table",{"dontToggle":true});var J=c.insertRow(2);_(J,"TD",{"align":"right","style":"padding:10px 10px"});if(isYou){_(J.cells[0],"A",{"class":"link","title":perfTranslator.getValue(307)}).addChild("div",{"dontToggle":true,"class":"PH_headerMenu_img PH_headerMenu_img_removeFriend right","style":"cursor:pointer;margin-right:15px;"}).parentNode.onclick=function(){if(confirm(perfTranslator.parseValue(perfTranslator.getValue(803),[a]))){removeFriend(H);}return false;};_(J.cells[0],"A",{"class":"link","title":perfTranslator.getValue(2235),"target":"blank","href":"/topfriends.asp?q="+escape(a)}).addChild("div",{"dontToggle":true,"class":"PH_headerMenu_img PH_headerMenu_img_setTopFriends right","style":"cursor:pointer;overflow:hidden;margin-right:15px;"});_(J.cells[0],"A",{"class":"link","title":perfTranslator.getValue(2372),"href":"javascript:void(0)"}).addChild("div",{"dontToggle":true,"class":"PH_headerMenu_img PH_headerMenu_img_comments right","style":"cursor:pointer;overflow:hidden;margin-right:15px;"}).onclick=function(){return window.open("/profile.asp?uid="+F+"&post=1","_blank");};var f=_(J.cells[0],"A",{"class":"link","title":perfTranslator.getValue(2370)});YAHOO.util.Event.addListener(f,"click",pfShowMessageEditor,{"id":H,"name":a});f.addChild("div",{"dontToggle":true,"class":"PH_headerMenu_img PH_headerMenu_img_incomingMail right","style":"cursor:pointer;overflow:hidden;margin-right:15px;"});}else{if(H!=theUsr){_(J.cells[0],"A",{"class":"link","title":perfTranslator.getValue(569)}).addChild("div",{"dontToggle":true,"class":"PH_headerMenu_img PH_headerMenu_img_inviteFriends right","style":"cursor:pointer;overflow:hidden;margin-right:15px;"}).onclick=function(){var m=new perfUI.widgets.requestFriend(H,theUsr);m.render();m.show();};}}_(J.cells[0],"A",{"class":"link","title":perfTranslator.getValue(2369),"target":"blank","href":"/allfriends.asp?id="+H}).addChild("div",{"dontToggle":true,"class":"PH_headerMenu_img PH_headerMenu_img_friends right","style":"cursor:pointer;overflow:hidden;margin-right:15px;"});if(!isYou){_(J.cells[0],"div",{"class":"PH_headerMenu_img PH_headerMenu_img_networks right","style":"cursor:pointer;overflow:hidden;margin-right:15px;","title":perfTranslator.getValue(1099)});}if(isYou){_(J.cells[0],"div",{"class":"right","style":"cursor:pointer;overflow:hidden;margin-right:15px;background-position:0px -80px;height:17px;width:11px;background-image:url('/images/v3/lock.gif')","title":perfTranslator.getValue(1770)});}if(isYou&&Q){_(J.cells[0],"A",{"class":"link","title":perfTranslator.getValue(1044)}).addChild("div",{"dontToggle":true,"class":"right","style":"cursor:pointer;overflow:hidden;margin-right:15px;background-position:0px -13px;height:13px;width:13px;background-image:url('/images/v5/chat.gif');margin-top:4px"}).onclick=function(){up_launchWM(theUsr,H,K);};}var I=c.insertRow(3);_(I,"TD",{"colSpan":2,"class":"fspace"});M=M.cells[0];function O(n){if(n.style.backgroundPosition=="-9px 0px"){getNetworks(b,H);n.style.backgroundPosition="0px 0px";M.firstChild.firstChild.style.display="none";M.lastChild.lastChild.style.display="";M.width="170";L.style.display="";M.rowSpan=3;for(var m=0;m<3;m++){c.rows[m].style.backgroundColor="RGB(248,252,255)";}}else{n.style.backgroundPosition="-9px 0px";M.firstChild.firstChild.style.display="";M.lastChild.lastChild.style.display="none";M.width="120";L.style.display="none";M.rowSpan=document.all?3:2;for(var m=0;m<3;m++){c.rows[m].style.backgroundColor="white";}}}}function addGFriend(D,N,Q,G,B,O,A,L){var E=document.getElementById("friend_table").rows[0].cells[0].firstChild.rows[1].cells[0].firstChild,H,C;if(E.rows[E.rows.length-1].cells.length>5){H=E.insertRow(E.rows.length);}else{H=E.rows[E.rows.length-1];}H.style.cursor="default";var F=_(H,"TD",{"style":"padding:0px","vAlign":"top"}).c("TABLE",{"style":"width:100px","cellPadding":0,"cellSpacing":0,"class":"gal_im search_results_item"});_(F,"TR",{"style":"visibility:hidden"}).c("TD",{"width":80,"style":"width:80px"})._("TD",{"width":20,"style":"width:20px"});_(F,"TR").c("TD",{"colSpan":2,"vAlign":"top","style":"text-align:left;padding-top:5px;padding-left:5px"}).c("A",{"class":"link","text":D,"style":"font-weight:bold","target":"blank","href":"/profile.asp?uid="+B});_(F,"TR").c("TD",{"vAlign":"top","align":"center","style":"padding-left:5px;padding-top:5px;padding-bottom:5px"}).c("A",{"class":"link","style":"font-weight:bold","target":"blank","href":"/profile.asp?uid="+B});var M=new Image();M.onload=function(){this.border=0;this.height=50*this.height/this.width;this.width=50;var T=new Image();T.i=this;F.rows[2].cells[0].firstChild.appendChild(this);T.onload=function(){var X=new perfUI.widgets.ToolTip(this.i,this);X.tipobj.style.width=this.width+"px";X.tipobj.style.backgroundColor="#FFF";};T.src=Q;var S=0;for(var V=0;V<H.cells.length;V++){var U=H.cells[V].firstChild;if((U.offsetHeight)>S){S=(U.offsetHeight);}}for(var V=0;V<H.cells.length;V++){var W=H.cells[V].firstChild;if(S>(W.offsetHeight)){W.style.height=S+"px";}}};M.src=N;if(G){F.rows[2].cells[0].style.background="url('/images/v2/online.gif') no-repeat scroll 3px 98%";F.style.background="url('/images/v3/cor.PNG') no-repeat scroll bottom left";}var K,J,R,P,I;if(isYou){var K=_(F.rows[2],"TD",{"vAlign":"top","align":"center","style":"padding:3px;padding-right:5px"}).c("DIV",{"title":perfTranslator.getValue(2370),"style":"cursor:pointer;font-size:1px;width:12px;height:9px;background-position:0px 0px;background-image:url('/images/v3/smd.PNG');background-repeat:no-repeat"})._("BR").previousSibling;YAHOO.util.Event.addListener(K,"click",pfShowMessageEditor,{"id":O,"name":D});var J=_(F.rows[2].cells[1],"DIV",{"title":perfTranslator.getValue(2372),"style":"cursor:pointer;font-size:1px;width:12px;height:11px;background-position:0px 0px;background-image:url('/images/v3/pbd.PNG');background-repeat:no-repeat"})._("BR").previousSibling;J.onclick=function(){return window.open("/profile.asp?uid="+B+"&post=1","_blank");};var R=(L)?_(F.rows[2].cells[1],"DIV",{"title":perfTranslator.getValue(1044),"style":"cursor:pointer;font-size:1px;width:13px;height:13px;background-position:0px 0px;background-image:url('/images/v3/chat.png');background-repeat:no-repeat"})._("BR").previousSibling:null;if(R){R.onclick=function(){if(isYou&&L){up_launchWM(theUsr,O,A);}else{window.open("/request2.asp?id="+B);}};}var P=_(F.rows[2].cells[1],"DIV",{"title":perfTranslator.getValue(307),"style":"cursor:pointer;font-size:1px;width:11px;height:11px;background-position:0px 0px;background-image:url('/images/v3/red.PNG');background-repeat:no-repeat"})._("BR").previousSibling;P.onclick=function(){if(confirm(perfTranslator.parseValue(perfTranslator.getValue(803),[D]))){removeFriend(O);}};}else{if(O!=theUsr){var I=_(F.rows[2],"TD",{"vAlign":"top","align":"center","style":"padding:3px;padding-right:5px"}).c("DIV",{"title":perfTranslator.getValue(569),"style":"cursor:pointer;font-size:1px;width:11px;height:11px;background-position:0px 0px;background-image:url('/images/i/add2.gif');background-repeat:no-repeat"})._("BR").previousSibling;I.onclick=function(){var S=new perfUI.widgets.requestFriend(O,theUsr);S.render();S.show();};}}F.style.backgroundColor="#FFF";F.onmouseover=function(){if(K){K.style.backgroundPosition="0px -9px";}if(J){J.style.backgroundPosition="0px -11px";}if(R){R.style.backgroundPosition="0px -13px";}if(P){P.style.backgroundPosition="0px -11px";}};F.onmouseout=function(){if(K){K.style.backgroundPosition="0px 0px";}if(J){J.style.backgroundPosition="0px 0px";}if(R){R.style.backgroundPosition="0px 0px";}if(P){P.style.backgroundPosition="0px 0px";}};}perfUI.dashboard.exception={dataError:{"id":1,"msg":""},timeout:{"id":2,"msg":""},custom:{"id":3,"msg":""}};perfUI.dashboard.manager=function(C,A){var B=this;this.userId=C||0;this.dataSource=null;this.container=A||null;this.sections=[];this.loadProperties=function(D){D=D||this.dataSource;if(D==null||D==undefined){return;}this.dataSource=D;};this.loadSections=function(){var D=this.dataSource.getElementsByTagName("sections");var F=D.getElementsByTagName("section");for(var E=0;E<F.length;E++){var G=new perfUI.dashboard.section(F[E]);this.sections.push(G);G.loadApplications();}};this.init=function(){this.loadProperties(this.dataSource);};this.init();};perfUI.dashboard.manager.prototype.load=function(){if(this.dataSource==null){return;}};perfUI.dashboard.section=function(C,A){var B=this;var D=perfUI.util.addEl;this.dataSource=C||null;this.container=A||null;this.containerApps=null;this.applications=[];this.buildApplicationContainer=function(E){var F=D(this.containerApps,"div");return F;};this.loadApplications=function(){if(this.dataSource==null){return;}var E=this.dataSource.getElementsByTagName("applications");var J=E.getElementsByTagName("application");for(var F=0;F<J.length;F++){var H=J[F];var G=PERF.parseNode(H,"type");var I=perfUI.dashboard[G];var K=new I(J[F]);K.container=this.buildApplicationContainer(K);this.applications.push(K);K.load();}};};perfUI.dashboard.application=function(B,D,A,E){var C=this;this.dataSource=D||null;this.applicationCss="";this.container=A||null;this.containerActivity=null;this.containerContent=null;this.isExpanded=true;this.showHideContainer=null;this.allowSkin=false;this.skin=perfUI.skin.UI?new perfUI.skin.UI:null;this.applicationId=0;this.title="Application";this.caption="";this.orderIndex=0;this.type="";this.dataSourceNodeName="application";this.applicationCss="app";this.containerCss="container";this.breadcrumb=E||"";this.isRendered=false;this.afterRenderComplete=new YAHOO.util.CustomEvent("afterRenderComplete",this);this.loadProperties=function(){this.applicationId=PERF.parseNodeNumeric(this.dataSource,"applicationId");this.caption=PERF.parseNode(this.dataSource,"caption");this.type=PERF.parseNode(this.dataSource,"objectType");};this.init=function(){if(this.dataSource){this.loadProperties();}};this.init();};perfUI.dashboard.application.prototype.load=function(){var C=YAHOO.util.Dom;if(this.allowSkin&&this.skin){C.addClass(this.container,"perfSkin");var B=new perfUI.skin.styleSheetManager("dashboard");if(B.getSheet()!=null){B.setStyleSheetRuleProperty(this.skin.controls.boxes.controlCss,{"color":this.skin.controls.boxes.color,"backgroundColor":this.skin.controls.boxes.backgroundColor,"border":this.skin.controls.boxes.border});B.setStyleSheetRuleProperty(this.skin.controls.alternatingRow.controlCss,{"backgroundColor":this.skin.controls.alternatingRow.backgroundColor,"border":this.skin.controls.alternatingRow.border});B.setStyleSheetRuleProperty(this.skin.controls.links.controlCss,{"color":this.skin.controls.links.color});var D=this.skin.controls.links.controlCss+":hover";var A=new perfUI.skin.control(D,this.skin.controls.links.color);B.setStyleSheetRuleProperty(A.controlCss,{"color":A.color});}}if(!C.hasClass(this.container,this.applicationCss)){C.addClass(this.container,this.applicationCss);}};perfUI.dashboard.application.prototype.render=function(){var A=YAHOO.util.Dom;if(!A.hasClass(this.container.parentNode,"dashboard")){A.addClass(this.container.parentNode,"dashboard");}if(!A.hasClass(this.container,"app")){A.addClass(this.container,"app");}};perfUI.dashboard.application.prototype.loadDataSource=function(A){if(!A){return;}this.dataSource=A;this.loadProperties();};perfUI.dashboard.application.prototype.loadRequestedResponse=function(A){var B=A.responseXML;if(!B||B.getElementsByTagName("parsererror").length>0){return perfUI.dashboard.exception.dataError;}var C=perfUI.util.getNode(B.documentElement,"errors");if(C!=null&&C.length==1){var D=perfUI.dashboard.exception.custom;D.msg=PERF.parseNode(C[0],"error");return D;}var E=perfUI.util.getNode(B,this.dataSourceNodeName);if(E==null||E.length==0){return perfUI.dashboard.exception.dataError;}this.loadDataSource(E[0]);};perfUI.dashboard.application.prototype.handleXmlParsingError=function(A){A=A||"This page can not be displayed due to invalid data.";alert(A);};perfUI.dashboard.application.prototype.handleFailure=function(C){var A=this.title+" is currently unavailable.";C=C||A;var B="";if(typeof C=="string"){if(B.trim().length>0){B=C;}else{B=A;}}else{if(typeof C=="object"){if(!this.hasErrors(C)){return;}}}alert(B);};perfUI.dashboard.application.prototype.hasErrors=function(A){var B=null;try{B=A.responseXML;}catch(D){return false;}var C=B.getElementsByTagName("errors");if(C.length==1){var E=PERF.parseNode(C[0],"error");alert(E);return true;}return false;};perfUI.dashboard.peopleList=function(C,A,B){this.container=A;this.userID=C;this.numPeopleToShow=5;this.preload=B||false;this.peopleObjects=[];this.element=null;this.xmlParsed=false;this.onBeforeRequestXML=new YAHOO.util.CustomEvent("onBeforeRequestXML");this.onXMLParsed=new YAHOO.util.CustomEvent("onXMLParsed");this.rendered=false;this.onRendered=new YAHOO.util.CustomEvent("onRendered");this.onBeforeRendered=new YAHOO.util.CustomEvent("onBeforeRendered");this.error=false;this.elementClassName="peopleList";this.xmlURL=null;this.userXMLFormat=[];this.showIfZeroResults=false;this.resetXMLParsedEvent();this.resetRenderedEvent();if(this.preload){this.loadXML();}};perfUI.dashboard.peopleList.prototype.resetXMLParsedEvent=function(){this.xmlParsed=false;this.onXMLParsed.unsubscribe();this.onXMLParsed.subscribe(function(){this.xmlParsed=true;},this,true);};perfUI.dashboard.peopleList.prototype.resetRenderedEvent=function(){this.rendered=false;this.onRendered.unsubscribe();this.onRendered.subscribe(function(){this.rendered=true;},this,true);};perfUI.dashboard.peopleList.prototype.setElement=function(A){this.element=A;};perfUI.dashboard.peopleList.prototype.getElement=function(){return this.element;};perfUI.dashboard.peopleList.prototype.getURL=function(){return this.xmlURL;};perfUI.dashboard.peopleList.prototype.loadXML=function(){this.onBeforeRequestXML.fire();var A={success:this.loadXMLSuccess,failure:this.loadXMLFailure,scope:this,cache:false};YAHOO.util.Connect.asyncRequest("GET",this.getURL(),A,null);};perfUI.dashboard.peopleList.prototype.loadXMLSuccess=function(A){this.dataSource=A.responseXML;this.parseXML();this.onXMLParsed.fire();};perfUI.dashboard.peopleList.prototype.loadXMLFailure=function(A){this.error="Error retrieving people list";this.onXMLParsed.fire();};perfUI.dashboard.peopleList.prototype.parseXML=function(){var E=perfUI.util.getNode;var C=this.dataSource;var A;if(A=E(C,"error")[0]){this.error=A.childNodes[0].nodeValue;return;}var D=E(C,"user");for(var B=0;B<D.length;B++){this.parseUser(D[B]);}};perfUI.dashboard.peopleList.prototype.parseUser=function(D){var E=perfUI.util.getNode;var B={};for(var A=0;A<this.userXMLFormat.length;A++){var C;if(C=E(D,this.userXMLFormat[A])[0]){if(C.childNodes.length==1){if(C.childNodes[0].childNodes.length>0){B[this.userXMLFormat[A]]=C;}else{B[this.userXMLFormat[A]]=C.childNodes[0].nodeValue;}}}}if(!this.userExists(B)){this.peopleObjects.push(B);}};perfUI.dashboard.peopleList.prototype.userExists=function(B){for(var A=0;A<this.peopleObjects.length;A++){if(B["userId"]==this.peopleObjects[A]["userId"]){return true;}}return false;};perfUI.dashboard.peopleList.prototype.render=function(){if(!this.preload){this.onXMLParsed.subscribe(this.renderPeople,this,true);this.loadXML();}else{if(!this.xmlParsed){this.onXMLParsed.subscribe(this.renderPeople,this,true);}else{this.renderPeople();}}};perfUI.dashboard.peopleList.prototype.renderPeople=function(){this.element=perfUI.util.addEl(this.container,"DIV",{"class":this.elementClassName,"style":"display:none;padding:5px;overflow:hidden;"});this.onBeforeRendered.fire();if(this.error){this.element.addChild("DIV",{"innerHTML":"ERROR: "+this.error});}else{for(var A=0;A<Math.min(this.numPeopleToShow,this.peopleObjects.length);A++){this.renderPerson(this.peopleObjects[A]);}}this.onRendered.fire();};perfUI.dashboard.peopleList.prototype.renderPerson=function(A){};perfUI.dashboard.peopleList.prototype.show=function(){if(this.rendered){this.showPeople();}else{this.onRendered.subscribe(this.showPeople,this,true);}};perfUI.dashboard.peopleList.prototype.showPeople=function(){var A=this.getElement();if(A&&(this.peopleObjects.length>0||this.showIfZeroResults)){A.style.display=(document.all?"inline-block":"block");}};perfUI.dashboard.peopleList.prototype.hide=function(){var A=this.getElement();if(A){A.style.display="none";}};perfUI.dashboard.peopleList.prototype.destroy=function(){var A=this.getElement();if(A){this.container.removeChild(A);this.element=null;}this.rendered=false;this.xmlParsed=false;this.peopleObjects=[];this.resetXMLParsedEvent();this.resetRenderedEvent();};perfUI.dashboard.editprivacy=function(userId,ds,container,breadcrumb){var self=this;var getNode=perfUI.util.getNode;var addEl=perfUI.util.addEl;var Dom=YAHOO.util.Dom;perfUI.dashboard.editprivacy.superclass.constructor.call(this,userId,ds,container,breadcrumb);this.userId=userId||0;this.container=container;this.containerCss="privacy";var cookieData=PERF.getCookie("editprivacy")||"00";var toggleControls=[];this.buildContainer=function(){var Spacer=function(c){addEl(c,"div",{"class":"spacer"});};Spacer(this.container);PrivacyOptions(this.container);Spacer(this.container);SecuritySettingsDefined(this.container);Spacer(this.container);CustomizeSettings(this.container);Spacer(this.container);AllowedCountries(this.container);};this.load=function(){if(!Dom.hasClass(this.container,this.applicationCss)){Dom.addClass(this.container,this.applicationCss);}perfUI.dashboard.editprivacy.superclass.load.call(this);this.buildContainer();};function PrivacyOptions(container){var header=new DrawHeader(container,perfTranslator.getValue(364),cookieData.charAt(0));var body=addEl(container,"div",{"class":"bddkbluegray colbody"});addEl(body,"DIV",{"class":"po_pad","text":perfTranslator.getValue(2339)});addEl(body,"DIV",{"class":"po_pad","text":perfTranslator.getValue(2341)});addEl(body,"DIV",{"class":"po_pad","text":perfTranslator.getValue(2344)});header.loadToggle(body);}function bSlider(con,txt1,txt2,def){if(typeof def=="undefined"){def=false;}var middle=con.addChild("DIV",{"class":"left slider t1"}).addChild("DIV",{"class":"left lcaption","text":txt1}).addSibling("DIV",{"class":"left main"});middle.addSibling("DIV",{"style":(def?"color:RGB(10,72,142);font-weight:bold":""),"class":"right rcaption","text":txt2});var leftCaption=middle.previousSibling;var rightCaption=middle.nextSibling;sel(def?rightCaption:leftCaption);leftCaption.onclick=function(){sel(this);mover.style.top="-1px";mover.style.left="-2px";};rightCaption.onclick=function(){sel(this);mover.style.top="-1px";mover.style.left="71px";};function sel(t){var o=(t==leftCaption?rightCaption:leftCaption);with(t.style){fontWeight="bold";color="#0A488E";}with(o.style){fontWeight="normal";color="#BDCEE0";}}middle.onclick=function(e){var e=YAHOO.util.Event.getEvent(e);if((e.offsetX||e.layerX)>40){rightCaption.onclick();}else{leftCaption.onclick();}};this.getValue=function(){return mover.offsetLeft<40?true:false;};middle.addChild("DIV",{"class":"bar"});middle.addChild("DIV",{"class":"borderLeft"});middle.addChild("DIV",{"class":"borderRight"});middle.addChild("DIV",{"class":"bottomBar"});var mover=middle.addChild("DIV",{"class":"grab"});var mover_dd=new YAHOO.util.DD(mover);mover_dd.dragOnly=true;if(def){mover.style.left="73px";}mover_dd.onDrag=function(){mover.offsetLeft>40?rightCaption.onclick():leftCaption.onclick();};}function CustomizeSettings(container){var rowCount=0;var header=new DrawHeader(container,perfTranslator.getValue(2331));var body=addEl(container,"div",{"class":"bddkbluegray colbody","style":"padding:0px"});var privacy=getPrivacy();var sliders={};leftSide(perfTranslator.getValue(175),perfTranslator.getValue(2351));sliders.isprivate=new bSlider(body.lastChild,perfTranslator.getValue(335),perfTranslator.getValue(334),privacy.isprivate);leftSide(perfTranslator.getValue(613),perfTranslator.getValue(2352));sliders.invisible=new bSlider(body.lastChild,perfTranslator.getValue(599),perfTranslator.getValue(600),privacy.invisible);leftSide(perfTranslator.getValue(614)+":",perfTranslator.getValue(2356));sliders.showLast=new bSlider(body.lastChild,perfTranslator.getValue(599),perfTranslator.getValue(600),!privacy.showLast);leftSide(perfTranslator.getValue(615)+":",perfTranslator.getValue(2355));sliders.showAge=new bSlider(body.lastChild,perfTranslator.getValue(599),perfTranslator.getValue(600),!privacy.showAge);leftSide(perfTranslator.getValue(1087)+":",perfTranslator.getValue(2359));sliders.ignoreVisitHistory=new bSlider(body.lastChild,perfTranslator.getValue(599),perfTranslator.getValue(600),privacy.ignoreVisitHistory);leftSide(perfTranslator.getValue(1086),perfTranslator.getValue(2360));sliders.autoFriends=new bSlider(body.lastChild,perfTranslator.getValue(601),perfTranslator.getValue(602),!privacy.autoFriends);leftSide(perfTranslator.getValue(616)+":",perfTranslator.getValue(2357));sliders.autoComments=new bSlider(body.lastChild,perfTranslator.getValue(601),perfTranslator.getValue(602),!privacy.autoComments);leftSide(perfTranslator.getValue(2343)+":",perfTranslator.getValue(2358));sliders.requestComments=new bSlider(body.lastChild,perfTranslator.getValue(2336),perfTranslator.getValue(2337),!privacy.requestComments);leftSide(perfTranslator.getValue(618)+":",perfTranslator.getValue(2354));sliders.accessComments=new perfUI.dashboard.editprivacy.lSlider(body.lastChild,1,privacy.accessComment);leftSide(perfTranslator.getValue(1092),perfTranslator.getValue(2353));sliders.commentControl=new perfUI.dashboard.editprivacy.lSlider(body.lastChild,0,privacy.commentControl);leftSide(perfTranslator.getValue(620)+":",perfTranslator.getValue(2362));addEl(body.lastChild,"A",{"class":"link helplink","text":perfTranslator.getValue(607),"href":"http://www.perfspot.com/allfriends.asp?id="+self.userId});leftSide(perfTranslator.getValue(621)+":",perfTranslator.getValue(2361));addEl(body.lastChild,"A",{"class":"link helplink","text":perfTranslator.getValue(608),"href":"http://www.perfspot.com/pics/myalbums.asp?id="+self.userId});addEl(body,"CENTER").addChild("BUTTON",{"onclick":saveChanges,"class":"customsave","value":perfTranslator.getValue(1862)});function saveChanges(){var postURL="/api/call.asp?function=Members.UpdatePrivacy&userid="+self.userId;var xhr=YAHOO.util.Connect.createXhrObject(1);postURL+="&accessComment="+sliders.accessComments.getValue();postURL+="&CommentControl="+([0,2,3,1][sliders.commentControl.getValue()-1]);postURL+="&private="+(!sliders.isprivate.getValue()?1:0);postURL+="&invisible="+(!sliders.invisible.getValue()?1:0);postURL+="&showlast="+(sliders.showLast.getValue()?1:0);postURL+="&showage="+(sliders.showAge.getValue()?1:0);postURL+="&AutoComments="+(sliders.autoComments.getValue()?1:0);postURL+="&RequestComments="+(sliders.requestComments.getValue()?1:0);postURL+="&AutoFriends="+(sliders.autoFriends.getValue()?1:0);postURL+="&IgnoreVisitHistory="+(!sliders.ignoreVisitHistory.getValue()?1:0);xhr.conn.open("GET",postURL+"&rid="+(new Date()).getTime(),false);xhr.conn.send(null);if(xhr.conn.responseXML.getElementsByTagName("error").length>0){alert(PERF.parseNode(xhr.conn.responseXML,"error"));}else{alert(perfTranslator.getValue(2340));}}function leftSide(cap,tip){addEl(body,"DIV",{"class":"drow"+((rowCount++)%2?" drow2":"")}).addChild("DIV",{"style":"background-position:center center;height:100%;background-repeat:no-repeat","class":"left info"}).addSibling("DIV",{"class":"left cap","text":cap});perfUI.widgets.ToolTip(body.lastChild.firstChild,tip);}function getPrivacy(){var xhr=YAHOO.util.Connect.createXhrObject(1);xhr.conn.open("GET","/api/call.asp?function=Members.GetPrivacy&userid="+self.userId+"&rid="+(new Date()).getTime(),false);xhr.conn.send(null);return{"isprivate":PERF.parseNodeBool(xhr.conn.responseXML,"private"),"invisible":PERF.parseNodeBool(xhr.conn.responseXML,"invisible"),"showLast":PERF.parseNodeBool(xhr.conn.responseXML,"showLast"),"showAge":PERF.parseNodeBool(xhr.conn.responseXML,"showAge"),"autoComments":PERF.parseNodeBool(xhr.conn.responseXML,"autoComments"),"requestComments":PERF.parseNodeBool(xhr.conn.responseXML,"requestComments"),"accessComment":PERF.parseNodeNumeric(xhr.conn.responseXML,"accessComment"),"commentControl":[1,4,2,3][PERF.parseNodeNumeric(xhr.conn.responseXML,"commentControl")],"autoFriends":PERF.parseNodeBool(xhr.conn.responseXML,"autoFriends"),"ignoreVisitHistory":PERF.parseNodeBool(xhr.conn.responseXML,"ignoreVisitHistory")};}}function AllowedCountries(container){var header=new DrawHeader(container,perfTranslator.getValue(1081));var body=addEl(container,"div",{"class":"bddkbluegray colbody allowedcountries"});addEl(body,"TABLE",{"cellPadding":0,"cellSpacing":0,"class":"ptable"});var leftSide=addEl(body.lastChild,"TR").addChild("TD",{"class":"leftSide"});addEl(leftSide,"DIV",{"class":"world"});addEl(leftSide,"DIV",{"class":"caption","text":perfTranslator.getValue(2333)});addEl(leftSide,"BUTTON",{"class":"saveBut","style":"background-color:white;border:1px solid RGB(165,221,12);color:RGB(0,179,0);width:134px;margin-left:8px;margin-top:15px","onclick":acceptAll,"value":perfTranslator.getValue(2332)});addEl(leftSide,"BUTTON",{"class":"saveBut","onclick":saveChanges,"value":perfTranslator.getValue(1862)});var rightSide=leftSide.addSibling("TD",{"class":"rightSide"});var ttable=rightSide.addChild("TABLE",{"cellPadding":0,"cellSpacing":0,"class":"tab"});ttable.addChild("TR").addChild("TD",{"width":"45%"}).addSibling("TD",{"width":"10%"}).addSibling("TD",{"width":"45%"});ttable.addChild("TR",{"class":"row2"}).addChild("TD",{"colSpan":2,"style":"padding:5px;padding-left:12px"}).addSibling("TD",{"align":"center","vAlign":"bottom","text":perfTranslator.getValue(2329),"style":"color:RGB(124,160,196);font-weight:bold;padding:5px"});ttable.addChild("TR",{"style":"background-color:RGB(242,245,250)","vAlign":"top"}).addChild("TD",{"style":"padding-left:10px"}).addSibling("TD",{"align":"center","vAlign":"middle"}).addSibling("TD",{"align":"left"});var acceptLabel=addEl(ttable.rows[1].cells[0],"RADIO",{"id":"perf_privacy_accept","style":"vertical-align:-15%","onclick":typeChange,"value":0,"name":"perf_privacy_1"}).addSibling("LABEL",{"for":"perf_privacy_accept","style":"color:RGB(3,177,0);font-weight:bold;font-size:12px","text":perfTranslator.getValue(2336)});acceptLabel.addSibling("SPAN",{"style":"padding-left:5px","text":"  "+perfTranslator.getValue(140)+" "});var blockLabel=acceptLabel.addSibling("RADIO",{"id":"perf_privacy_block","style":"vertical-align:-15%","onclick":typeChange,"value":1,"name":"perf_privacy_1"}).addSibling("LABEL",{"for":"perf_privacy_block","style":"font-size:11px;font-weight:bold;color:RGB(124,160,196)","text":perfTranslator.getValue(2337)});blockLabel.addSibling("SPAN",{"text":" "+perfTranslator.getValue(2338)});ttable.rows[1].cells[0].firstChild.checked=true;function acceptAll(){acceptList.selectAll();underLay.innerHTML=perfTranslator.getValue(2334);bringRight();setCurList(0);saveChanges();}function saveChanges(){var postURL="/api/call.asp?function=Members.UpdatePrivacyCountries&userid="+self.userId+"&CountryAllowed="+Math.abs(curList-1);var sendData="";var xhr=YAHOO.util.Connect.createXhrObject(1);var listItems=acceptList.getListItems();for(var i=0;i<listItems.length;i++){sendData+=(sendData!=""?",":"")+listItems[i].obj.id;}xhr.conn.open("POST",postURL+"&rid="+(new Date()).getTime(),false);xhr.conn.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.conn.send(sendData);if(xhr.conn.responseXML.getElementsByTagName("error").length>0){alert(PERF.parseNode(xhr.conn.responseXML,"error"));}else{alert(perfTranslator.getValue(2340));}}function setCurList(t){var listItems=acceptList.getListItems();if(t==1){blockLabel.style.color="RGB(203,1,0)";blockLabel.previousSibling.checked=true;underLay.innerHTML=perfTranslator.getValue(2335);blockLabel.style.fontSize="12px";acceptLabel.style.color="RGB(124,160,196)";acceptLabel.style.fontSize="11px";curList=1;}else{blockLabel.style.color="RGB(124,160,196)";blockLabel.style.fontSize="11px";underLay.innerHTML=perfTranslator.getValue(2334);acceptLabel.style.color="RGB(3,177,0)";acceptLabel.style.fontSize="12px";acceptLabel.previousSibling.checked=true;curList=acceptList;curList=0;}for(var i=0;i<listItems.length;i++){listItems[i].className="biglistitem big"+(curList+1);}}function typeChange(){setCurList(this.value);}var underLay=addEl(ttable.rows[2].cells[0],"DIV",{"class":"acceptListUnderlay","text":perfTranslator.getValue(2334)});var acceptList=new perfUI.widgets.listbox(ttable.rows[2].cells[0],{"height":"350px","width":"250px"});var p=acceptList.getContainer();p.style.position="absolute";acceptList.onEmptyList=function(){p.style.background="transparent";};acceptList.onEmptyList();acceptList.onNonEmptyList=function(){p.style.backgroundColor="white";};var curList=0;addEl(ttable.rows[2].cells[1],"DIV",{"style":"cursor:pointer;background-image:url('/images/v3/par.PNG');height:37px;width:35px","onclick":bringLeft}).addSibling("BR").addSibling("BR").addSibling("DIV",{"style":"cursor:pointer;background-image:url('/images/v3/par.PNG');background-position:0px -37px;height:37px;width:35px","onclick":bringRight});var countryList=new perfUI.widgets.listbox(ttable.rows[2].cells[2],{"width":"90%","height":"350px"});countryList.setMultiple(true);var countries=loadCountries();var numCountries=countries.length;for(var i=0;i<numCountries;i++){addCountry(countries[i]);}getPrivacyCountries();function getPrivacyCountries(){var xhr=YAHOO.util.Connect.createXhrObject(1);var countryAllowed;var countries;var xml;xhr.conn.open("GET","/api/call.asp?function=Members.GetPrivacyCountries&userid="+self.userId+"&rid="+(new Date()).getTime(),false);xhr.conn.send(null);xml=xhr.conn.responseXML;countryAllowed=PERF.parseNodeBool(xml,"countryAllowed");if(!countryAllowed){setCurList(1);}countries=xml.getElementsByTagName("country");for(var i=0;i<countries.length;i++){addLeftCountry(PERF.parseNode(countries[i],"name"));}}function addLeftCountry(name){var t=document.createElement("DIV");var selItems=countryList.getListItems();for(var i=0;i<selItems.length;i++){if(selItems[i].obj.name==name){break;}}t.obj=selItems[i].obj;countryList.removeListItem(i);t.className="biglistitem big"+(curList+1);t.innerHTML=t.obj.name;acceptList.insertListItemBefore(t,findInsertIndex(acceptList,t));}function bringLeft(){var selected=countryList.getSelectedItems();for(var i=0;i<selected.length;i++){var t=document.createElement("DIV");t.obj=selected[i].lastChild.obj;t.className="biglistitem big"+(curList+1);t.innerHTML=t.obj.name;acceptList.insertListItemBefore(t,findInsertIndex(acceptList,t));}countryList.removeSelected();}function bringRight(){var selected=acceptList.getSelectedItems();for(var i=0;i<selected.length;i++){var t=document.createElement("DIV");t.obj=selected[i].lastChild.obj;t.innerHTML=t.obj.name;countryList.insertListItemBefore(t,findInsertIndex(countryList,t));}acceptList.removeSelected();}function findInsertIndex(list,item){var listItems=list.getListItems();for(var i=0;i<listItems.length;i++){if(parseInt(listItems[i].obj.rank)>parseInt(item.obj.rank)){return list.getItemNumber(listItems[i]);}}return listItems.length;}function addCountry(obj){var t=document.createElement("DIV");t.obj=obj;t.innerHTML=t.obj.name;countryList.addListItem(t);}function loadCountries(){var xhr=YAHOO.util.Connect.createXhrObject(1);xhr.conn.open("GET","/api/callna.asp?Function=GetCountries",false);xhr.conn.send(null);var countries=xhr.conn.responseXML.getElementsByTagName("country");var res=[];for(var i=0;i<countries.length;i++){res.push({"rank":i,"id":PERF.parseNodeNumeric(countries[i],"id"),"name":PERF.parseNode(countries[i],"name")});}return res;}}function SecuritySettingsDefined(container){var header=new DrawHeader(container,perfTranslator.getValue(2330),cookieData.charAt(1));var body=addEl(container,"div",{"class":"bddkbluegray colbody ssd"});header.loadToggle(body);var bodyTable=addEl(body,"TABLE",{"class":"sst"});addEl(bodyTable,"TR",{"vAlign":"top"});addEl(bodyTable,"TR").addChild("TD",{"class":"space"});addEl(bodyTable,"TR",{"vAlign":"top"});for(var i=0;i<5;i++){bodyTable.rows[0].insertCell(0);bodyTable.rows[2].insertCell(0);}addEl(bodyTable.rows[0].cells[0],"DIV",{"class":"lock"});addEl(bodyTable.rows[0].cells[1],"DIV",{"class":"head t1","text":perfTranslator.getValue(1130)});addEl(bodyTable.rows[0].cells[1],"DIV",{"text":perfTranslator.getValue(2345)});addEl(bodyTable.rows[0].cells[3],"DIV",{"class":"lock lockt2"});addEl(bodyTable.rows[0].cells[4],"DIV",{"class":"headt2","text":perfTranslator.getValue(1131)});addEl(bodyTable.rows[0].cells[4],"DIV",{"text":perfTranslator.getValue(2346)});addEl(bodyTable.rows[2].cells[0],"DIV",{"class":"lock t3"});addEl(bodyTable.rows[2].cells[1],"DIV",{"class":"head t3","text":perfTranslator.getValue(1132)});addEl(bodyTable.rows[2].cells[1],"DIV",{"text":perfTranslator.getValue(2347)});addEl(bodyTable.rows[2].cells[3],"DIV",{"class":"lock t4"});addEl(bodyTable.rows[2].cells[4],"DIV",{"class":"head t4","text":perfTranslator.getValue(1133)});addEl(bodyTable.rows[2].cells[4],"DIV",{"text":perfTranslator.getValue(2348)});}function DrawHeader(container,txt,col){var header=addEl(container,"div",{"class":"bdbluegray bgltgray thead"});var toggleLabel=addEl(header,"div",{"class":"left txtdkpeach tlabel","text":txt});var toggleButton=addEl(header,"div",{"class":"right headermt"});if(txt==perfTranslator.getValue(364)){addEl(header,"div",{"class":"right","style":"padding-right:40px","innerHTML":breadcrumb});}this.loadToggle=function(hide){this.toggle=new perfUI.widgets.showHideContainer(toggleButton,hide,col=="1"?true:false);toggleControls.push(this.toggle);YAHOO.util.Event.addListener(toggleLabel,"click",this.toggle.toggle,this.toggle,true);this.toggle.onExpandClick.subscribe(setCookie,this.toggle,true);this.toggle.onCollapseClick.subscribe(setCookie,this.toggle,true);};}function setCookie(){var cok="";for(var i=0;i<toggleControls.length;i++){if(this==toggleControls[i]){cok+=(toggleControls[i].isCollapsed?"0":"1");}else{cok+=(toggleControls[i].isCollapsed?"1":"0");}}PERF.setCookie("editprivacy",cok,365);}};perfUI.dashboard.editprivacy.lSlider=function(B,D,C){if(typeof C=="undefined"||C<1||C>4){C=1;}var K=B.addChild("DIV",{"class":"left slider t2"});K.addChild("DIV",{"class":"main"});K.addChild("DIV",{"class":"borderLeft"});K.addChild("DIV",{"class":"borderRight"});K.addChild("DIV",{"class":"split1"});K.addChild("DIV",{"class":"split2"});K.addChild("DIV",{"class":"bottomBar"});var I,H,G,E;if(D==1){I=K.addChild("DIV",{"title":perfTranslator.getValue(1130),"class":"slider1 slider_icon5"});H=K.addChild("DIV",{"title":perfTranslator.getValue(1131),"class":"slider1 slider_icon6"});G=K.addChild("DIV",{"title":perfTranslator.getValue(1132),"class":"slider1 slider_icon7"});E=K.addChild("DIV",{"title":perfTranslator.getValue(1133),"class":"slider1 slider_icon8"});}else{if(D==0){I=K.addChild("DIV",{"title":perfTranslator.getValue(773),"class":"slider slider_icon1"});H=K.addChild("DIV",{"title":perfTranslator.getValue(2349),"class":"slider slider_icon2"});G=K.addChild("DIV",{"title":perfTranslator.getValue(1090),"class":"slider slider_icon3"});E=K.addChild("DIV",{"title":perfTranslator.getValue(2350),"class":"slider slider_icon4"});}else{if(D==2){I=K.addChild("DIV",{"title":perfTranslator.getValue(1130),"class":"slider1 slider_icon5"});H=K.addChild("DIV",{"title":perfTranslator.getValue(1131),"class":"slider1 slider_icon6"});G=K.addChild("DIV",{"title":perfTranslator.getValue(1132),"class":"slider1 slider_icon7"});K.firstChild.style.width="131px";K.childNodes[2].style.display="none";K.childNodes[5].style.width="133px";K.style.width="150px";}}}K.onclick=function(M){var M=YAHOO.util.Event.getEvent(M);var L=M.offsetX||M.layerX;if(L<25){I.onclick();}else{if(L>=25&&L<100){H.onclick();}else{if(L>=100&&L<175){G.onclick();}else{E.onclick();}}}};var A=K.addChild("DIV",{"class":"grab"});var F=new YAHOO.util.DD(A);F.maintainOffset=true;A.style.left=[-2,62,126,191][C-1]+"px";F.onDrag=function(){A.style.top="3px";var L=A.offsetLeft;if(L<25){I.onclick();}else{if(L>=25&&L<100){H.onclick();}else{if(L>=100&&L<175){G.onclick();}else{if(E){E.onclick();}else{G.onclick();}}}}};this.hide=function(){K.style.display="none";};this.show=function(){K.style.display="";};this.getValue=function(){if(A.style.left=="-2px"){return 1;}else{if(A.style.left=="62px"){return 2;}else{if(A.style.left=="126px"){return 3;}else{return 4;}}}};function J(L){YAHOO.util.Event.stopPropagation(YAHOO.util.Event.getEvent(L));}if(I){I.onclick=function(L){A.style.left="-2px";J(L);};}if(H){H.onclick=function(L){A.style.left="62px";J(L);};}if(G){G.onclick=function(L){A.style.left="126px";J(L);};}if(E){E.onclick=function(L){A.style.left="191px";J(L);};}B.style.height="40px";B.style.lineHeight="40px";};YAHOO.extend(perfUI.dashboard.editprivacy,perfUI.dashboard.application);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();};perfUI.widgets.requestFriend=function(B,D,A,E,F,C){if(typeof A=="string"){A=document.getElementById(A);}else{if(A==null){A=perfUI.util.addEl(document.body,"DIV",{"class":"yui-skin-sam"});}}A=perfUI.util.addEl(A,"DIV",{"class":"RFpopup"});perfUI.widgets.requestFriend.superclass.constructor.call(this,A,475);this.userId=D||0;this.watchedId=B||0;this.dontPreload=F||0;this.re=E||0;this.showMutual=C||0;this.textarea=null;this.leftButton=null;this.rightButton=null;this.rightDIV=null;this.onFailEvent=new YAHOO.util.CustomEvent("onFailEvent",this);this.onSuccessEvent=new YAHOO.util.CustomEvent("onSuccessEvent",this);this.xmlData={redLink:null,autoFriends:null,status:null,statusDesc:null,statusHtml1:"",statusHtml2:"",statusHtml3:"",user:{userId:null,userCode:null,thumbUrl:null,displayName:null,online:null}};this.xmlParsed=false;this.onXMLParsed=new YAHOO.util.CustomEvent("onXMLParsed");this.onXMLParsed.subscribe(function(){this.xmlParsed=true;},this,true);this.rendered=false;this.onRendered=new YAHOO.util.CustomEvent("onRendered");this.onRendered.subscribe(function(){this.rendered=true;},this,true);if(!this.dontPreload){this.getRequestXML();}};YAHOO.extend(perfUI.widgets.requestFriend,perfUI.widgets.panel);perfUI.widgets.requestFriend.quickPopup=function(A,C,D){var B=new perfUI.widgets.requestFriend(A,C,null,D);B.render();B.show();};perfUI.widgets.requestFriend.prototype.getRequestXML=function(){var A={success:this.getRequestXMLSuccess,failure:this.getRequestXMLFailure,scope:this,cache:false};YAHOO.util.Connect.asyncRequest("GET","/api/call.asp?function=Members.FriendRequest&WatchedID="+this.watchedId+"&userId="+this.userId+(this.showMutual?"&m=1":""),A,null);};perfUI.widgets.requestFriend.prototype.getRequestXMLSuccess=function(B){var A=perfUI.util.getNode;var J=B.responseXML;try{var I;if(I=A(J,"error")[0]){this.xmlData.status="101";this.xmlData.statusHtml1="<b>ERROR</b>: "+I.childNodes[0].nodeValue;}else{var K,H,G,F;if(K=A(J,"redLink")[0].childNodes[0]){this.xmlData.redLink=K.nodeValue;}if(this.xmlData.redLink!=null){document.location.href=this.xmlData.redLink;return;}this.xmlData.autoFriends=A(J,"autoFriends")[0].childNodes[0].nodeValue;this.xmlData.status=A(J,"status")[0].childNodes[0].nodeValue;this.xmlData.statusDesc=A(J,"statusDesc")[0].childNodes[0].nodeValue;if(H=A(J,"statusHtml1")[0].childNodes[0]){this.xmlData.statusHtml1=H.nodeValue;}if(H=A(J,"statusHtml2")[0].childNodes[0]){this.xmlData.statusHtml2=H.nodeValue;}if(H=A(J,"statusHtml3")[0].childNodes[0]){this.xmlData.statusHtml3=H.nodeValue;}var C=A(J,"user")[0];this.xmlData.user.userId=A(C,"userId")[0].childNodes[0].nodeValue;this.xmlData.user.userCode=A(C,"userCode")[0].childNodes[0].nodeValue;this.xmlData.user.thumbUrl=A(C,"thumbUrl")[0].childNodes[0].nodeValue;this.xmlData.user.displayName=A(C,"displayName")[0].childNodes[0].nodeValue;this.xmlData.user.online=A(C,"online")[0].childNodes[0].nodeValue;var E;if(E=A(C,"mutualFriends")[0]){this.xmlData.user.mutualFriends=parseInt(E.childNodes[0].nodeValue);}}}catch(D){this.xmlData.status="102";this.xmlData.statusHtml1="<b>ERROR</b>: Unable to process request";}this.onXMLParsed.fire();};perfUI.widgets.requestFriend.prototype.getRequestXMLFailure=function(){this.xmlData.status="103";this.xmlData.statusHtml1="<b>ERROR</b>: Unable to process request";this.onXMLParsed.fire();};perfUI.widgets.requestFriend.prototype.render=function(){if(this.dontPreload){this.getRequestXML();this.onXMLParsed.subscribe(this.renderPopup,this,true);}else{if(!this.xmlParsed){this.onXMLParsed.subscribe(this.renderPopup,this,true);}else{this.renderPeople();}}};perfUI.widgets.requestFriend.prototype.renderPopup=function(){var F=document.createElement("DIV");F.className="hd bgltblue";var G=perfUI.util.addEl(F,"DIV");var B=G.c("DIV",{"class":"PH_headerMenu_img PH_headerMenu_img_inviteFriends"});var M=G.c("H2",{"class":"txtdkblue left","innerHTML":perfTranslator.getValue(569)});this.setHeader(F);var C=this.destroyFailure;var H=document.createElement("DIV");H.className="bd";if(parseInt(this.xmlData.status)<100){var D=perfUI.util.addEl(H,"DIV",{"class":"left rfProfile"});var A=D.addChild("A",{"href":"/profile.asp?uid="+this.xmlData.user.userCode,"target":"_BLANK"});A.addChild("DIV",{"class":"rfProfileName","innerHTML":this.xmlData.user.displayName});A.addChild("IMG",{"class":"rfProfileImage","src":this.xmlData.user.thumbUrl});if(this.xmlData.user.online=="true"){var E=D.addChild("DIV",{"class":"onlineNow"});E.addChild("IMG",{"src":"/images/v2/online.gif","height":"8","width":"9"});E.addChild("SPAN",{"class":"txtorange","innerHTML":perfTranslator.getValue(1882)});}}this.rightDIV=perfUI.util.addEl(H,"DIV",{"class":"left rfMessage"});if(parseInt(this.xmlData.status)!=0){if(parseInt(this.xmlData.status)==2||parseInt(this.xmlData.status)==3){C=this.destroySuccess;}this.rightDIV.addChild("DIV",{"class":"statusHtml1","innerHTML":this.xmlData.statusHtml1});this.rightDIV.addChild("DIV",{"class":"statusHtml2","innerHTML":this.xmlData.statusHtml2});this.rightDIV.addChild("DIV",{"class":"statusHtml3","innerHTML":this.xmlData.statusHtml3});}if(parseInt(this.xmlData.status)==0||parseInt(this.xmlData.status)==4){this.rightDIV.addChild("DIV",{"class":"rfMessageTitle","innerHTML":perfTranslator.parseValue(perfTranslator.getValue(702),["<b>"+this.xmlData.user.displayName+"</b>"])+"<br><br><b>"+perfTranslator.getValue(699)+":</b>"});this.textarea=this.rightDIV.addChild("TEXTAREA",{"class":"rfMessageTA","src":this.xmlData.user.thumbUrl});this.mutualFriends=this.rightDIV.addChild("DIV",{"class":"rfMutualFriends"});if(this.showMutual&&this.xmlData.user.mutualFriends){this.drawMutualFriends();}if(this.xmlData.autoFriends=="True"){this.onRendered.subscribe(this.sendRequest,this,true);}}this.setBody(H);var J=document.createElement("DIV");J.className="ft buttonStyle1";var L=perfUI.util.addEl(J,"DIV",{"class":"buttonbox right"});var K=L.c("SPAN",{"class":"submit"});if(parseInt(this.xmlData.status)==0||parseInt(this.xmlData.status)==4){this.leftButton=new YAHOO.widget.Button({label:perfTranslator.getValue(759),onclick:{fn:this.sendRequest,obj:null,scope:this},container:K});}var I=L.c("SPAN",{"class":"cancel"});this.rightButton=new YAHOO.widget.Button({label:perfTranslator.getValue(701),onclick:{fn:C,obj:null,scope:this},container:I});this.setFooter(J);perfUI.widgets.requestFriend.superclass.render.call(this);this.onRendered.fire();};perfUI.widgets.requestFriend.prototype.drawMutualFriends=function(){var A=this.mutualFriends.addChild("A",{"class":"rfMutualFriendsTXT","innerHTML":perfTranslator.getValue(1661)+": "+this.xmlData.user.mutualFriends,"href":"javascript:void(0)"});var B=this.mutualFriends.addChild("DIV");B.setAttribute("drawn",0);B.setAttribute("showing",0);YAHOO.util.Event.addListener(A,"click",function(){var C=this.mutualFriends.childNodes[1];if(C.getAttribute("drawn")=="0"){var D=new perfUI.dashboard.mutualFriendList(this.userId,this.xmlData.user.userId,null,B);D.pager.PageSize=4;D.allowCaption=false;D.load();C.setAttribute("drawn",1);C.setAttribute("showing",1);}else{if(C.getAttribute("showing")=="0"){C.style.display="block";C.setAttribute("showing",1);}else{C.style.display="none";C.setAttribute("showing",0);}}},this,true);};perfUI.widgets.requestFriend.prototype.show=function(){if(this.rendered){this.showPopup();}else{this.onRendered.subscribe(this.showPopup,this,true);}};perfUI.widgets.requestFriend.prototype.showPopup=function(){perfUI.widgets.requestFriend.superclass.show.call(this);this.center();};perfUI.widgets.requestFriend.prototype.showLoading=function(){this.cleanRightDIV();this.textarea.disabled=true;this.textarea.className="rfloading";this.hideButtons();};perfUI.widgets.requestFriend.prototype.hideLoading=function(A){this.cleanRightDIV();this.textarea.disabled=false;this.textarea.className="rfMessageTA";this.showButtons();};perfUI.widgets.requestFriend.prototype.hideButtons=function(){this.getFooter().childNodes[0].style.visibility="hidden";};perfUI.widgets.requestFriend.prototype.showButtons=function(){this.getFooter().childNodes[0].style.visibility="visible";};perfUI.widgets.requestFriend.prototype.sendRequest=function(){this.showLoading();this.sendRequestXML(escape(this.textarea.value));};perfUI.widgets.requestFriend.prototype.sendRequestXML=function(A){A=A||"";var B={success:this.submitRequestXMLSuccess,failure:this.submitRequestXMLFailure,scope:this,cache:false};YAHOO.util.Connect.asyncRequest("GET","/api/call.asp?function=Members.FriendRequestSend&WatchedID="+this.watchedId+"&UserID="+this.userId+"&m="+A+"&re="+this.re,B,null);};perfUI.widgets.requestFriend.prototype.submitRequestXMLSuccess=function(A){var E=A.responseXML;try{var B;if(B=perfUI.util.getNode(E,"error")[0]){this.submitError("Error, "+B.childNodes[0].nodeValue);return;}var D=perfUI.util.getNode(E,"success")[0].childNodes[0].nodeValue;}catch(C){this.submitError("Error submitting friend request, please try again");return;}if(D=="true"){this.drawSuccessMessage();}else{this.submitError("Error submitting friend request, please try again");return;}};perfUI.widgets.requestFriend.prototype.drawSuccessMessage=function(){this.rightDIV.innerHTML="";if(this.xmlData.autoFriends=="True"){var B=this.rightDIV.addChild("DIV",{"class":"successAutoFriend"});B.addChild("DIV",{"class":"PH_headerMenu_img PH_headerMenu_img_incomingFriendRequest"});B.addChild("DIV",{"class":"RFsuccessline1","innerHTML":perfTranslator.getValue(2632)});B.addChild("DIV",{"class":"RFsuccessline2 txtorange","innerHTML":"<b>"+perfTranslator.getValue(1856)+"</b>: "+perfTranslator.parseValue(perfTranslator.getValue(2685),[this.xmlData.user.displayName])});if(this.showMutual&&this.xmlData.user.mutualFriends){this.mutualFriends=B.addChild("DIV",{"class":"rfMutualFriends"});this.drawMutualFriends();}}else{var B=this.rightDIV.addChild("DIV",{"class":"successRequestFriend"});B.addChild("DIV",{"class":"PH_headerMenu_img PH_headerMenu_img_friends"});B.addChild("DIV",{"class":"RFsuccessline1","innerHTML":perfTranslator.getValue(1647)});}this.rightButton.destroy();var A={fn:this.destroySuccess,obj:null,scope:this};this.leftButton.setAttributes({"onclick":A,"label":perfTranslator.getValue(1729)});this.showButtons();};perfUI.widgets.requestFriend.prototype.submitRequestXMLFailure=function(){this.submitError("Error submitting friend request, please try again");};perfUI.widgets.requestFriend.prototype.cleanRightDIV=function(){if(this.rightDIV.childNodes.length>=5){for(var A=0;A<3;A++){this.rightDIV.removeChild(this.rightDIV.childNodes[0]);}}for(var A=0;A<this.rightDIV.childNodes.length-3;A++){this.rightDIV.removeChild(this.rightDIV.childNodes[3]);}};perfUI.widgets.requestFriend.prototype.submitError=function(A){this.hideLoading();this.rightDIV.addChild("DIV",{"class":"submitError","innerHTML":A});};perfUI.widgets.requestFriend.prototype.destroySuccess=function(){this.onSuccessEvent.fire();this.destroy();};perfUI.widgets.requestFriend.prototype.destroyFailure=function(){this.onFailEvent.fire();this.destroy();};perfUI.widgets.requestFriend.prototype.destroy=function(){perfUI.widgets.requestFriend.superclass.hide.call(this);var B;if(B=this.getMask()){B.destroy();}var A=this.container;if(A&&A.parentNode&&A.parentNode.parentNode){A.parentNode.parentNode.removeChild(A.parentNode);}for(i in this){if(typeof this[i]=="function"){this[i]=null;delete this[i];}else{delete this[i];}}YAHOO.util.Event.removeListener(window,"resize",this.center);};