0){A7(K.childNodes[G],I);}if(L.length>0){j3(K.childNodes[G],L);}}H.cancelBubble=true;};Wy.prototype._avatarEventHandler=function(D){if(!Evt.C()){return
false;}if(RB.o7.length>0){if(!D){D=event;}var C=Evt.A(D);switch(D.type){case
RB.YC:A7(C,"_over");break;case RB.Gd:j3(C,"_over");break;default:break;}}D.cancelBubble=true;};Wy.prototype.isContact=function(){return
this._isContact;};Wy.prototype._blockBuddy=function(C){if(IMObject){IMObject.blockUser(this.getBuddyName(),this.getCloudId());
var D;switch(C){case"unknownSender":D="imBlockUnknown";break;default:D="imBlockSender";break;}KX.A(D);}};Wy.create=function(K,L,Q,O){var
P=document.body;var I=null;var M="im";if(O=="sms"){M="sms";}var
J="imStart";switch(L){case"radiobar:fromEmail":case"radiobar":J=M+"stComposeToolbar";break;case
RB.Lb:J=M+"stComposeMenu";break;case"menu":J=M+"stComposeMenu";break;case"autocomplete":J=M+"stAutocomplete";break;case"switchdlg":J="imstSwitchDlg";break;case"toastcompose":J="imstToastCompose";break;case"toastother":J="imstToastOther";break;case"dropdown":J="imstContactsOnline";break;case"contactlist":J="imstContactsList";
break;case"contactdetail":J=M+"stContactsDetail";break;case"mailheader":J="imstFromReadEmail";break;case"offline":J=M+"stFromOffline";break;case"receiveim":J="imReceive";break;case"receivesms":J="smsReceive";break;}if(K==null){if((O=="chat")&&(Wy._blankIMConversation!=null)){if(Q){Wy._blankIMConversation.show();}return
Wy._blankIMConversation;}else{if((O=="sms")&&(Wy._blankSMSConversation!=null)){if(Q){Wy._blankSMSConversation.show();}return
Wy._blankSMSConversation;}}GT();}var I=new Wy(K,P,O);I._viewed=Q;if(K==null){if((O=="chat")&&(Wy._blankIMConversation==null)){Wy._blankIMConversation=I;}else{if((O=="sms")&&(Wy._blankSMSConversation==null)){Wy._blankSMSConversation=I;
}}}I._tab=new Ta(I,J);LB.L(I._tab,Q);return I;};Wy.prototype.restoreStyles=function(J,I,H,G){if(!J.document.body){if(H==null){H=0;}if(H>30){return
;}setTimeout(EY(this,this.restoreStyles,J,I,H+1),100);return ;}var
F=J.document.body.style;if(!this._fontName){this._fontName=Wy._initFontName;}F.fontFamily=this._fontName;if(!this._fontSize){this._fontSize=Wy._initFontSize;}F.fontSize=this._getFontSize()+"pt";if(I){return
;}J.focus();if(this._boldStyle){J.document.execCommand("bold",false,null);}if(this._italicStyle){J.document.execCommand("italic",false,null);}if(this._underStyle){J.document.execCommand("underline",false,null);
}J.document.execCommand("ForeColor",false,this._foreColor);J.focus();if(G&&Cq.C){J.document.execCommand("SelectAll");}};Wy.prototype.handleCommand=function(y,AD,AB,AE,k){var
o=BV();if(y.match(/^im\:([\w\W]+)/)||y.match(/^im_ondemand\:([\w\W]+)/)){y=RegExp.$1;}switch(y){case"bold":case"italic":case"underline":if(this.getCloudId()==Ux){var
AC=new VM(""+Wy._msnTipText.toMessage(RB.Hj+this.getBuddyDisplayName())+RB.Ll);NS.A(AC);return
true;}if(y=="bold"){this._boldStyle=!this._boldStyle;}else{if(y=="italic"){this._italicStyle=!this._italicStyle;}else{if(y=="underline"){this._underStyle=!this._underStyle;
}}}this._input.contentWindow.focus();this._input.contentWindow.document.execCommand(y,false,null);this._input.contentWindow.focus();return
true;case"fontname":case"fontsize":if(this.getCloudId()==Ux){var AC=new
VM("
"+Wy._msnTipText.toMessage(RB.Hj+this.getBuddyDisplayName())+RB.Ll);NS.A(AC);return
true;}if(y=="fontname"){this._fontName=AD;Wy._initFontName=AD;}else{if(y=="fontsize"){this._fontSize=AD;Wy._initFontSize=AD;Wy._initFontSizePt=Wy.sizeMap[AD-1];}}this._input.contentWindow.focus();this._input.contentWindow.document.execCommand(y,false,AD);this._input.contentWindow.focus();return
true;
case"ForeColor":if(this.getCloudId()==Ux){var AC=new VM("
"+Wy._msnTipText.toMessage(RB.Hj+this.getBuddyDisplayName())+RB.Ll);NS.A(AC);return
true;}this._foreColor=AD;this._input.contentWindow.focus();this._input.contentWindow.document.execCommand(y,false,AD);this._input.contentWindow.focus();return
true;case"insert_emoticon":this._input.contentWindow.focus();ff(this._input.contentWindow,emoticonID2Text[AD]);this._input.contentWindow.focus();return
true;case"switch_send_mode_to_sms":case"switch_send_mode_to_chat":if(Component.A(Ox.A)){GL(null,null);Nd();}var
x;if(y=="switch_send_mode_to_sms"){x="sms";
}else{x="chat";}if(x=="sms"&&!hj()){var n=EY(this,this.handleCommand,y,AD,AB,AE,k);cx(n);return
true;}var s=false;if(AE=="radiobar"){s=true;}if(AE=="radiobar"){AE=AD?AE+":"+AD:AE;this._switchSource=AE;}if(s){var
r=A5(this.getInputHtml());if((x=="chat"&&(r.length>Qy))||(x=="sms"&&(r.length>this._smsMaxChars))){alert(RB.As0);return
true;}}if(s){var d;var j;if(this._type=="sms"){d=getSMSSenderFromContacts(this.getBuddyName(),true);j=d?Va(d)["id"]:"";}else{d=getIMSenderFromContacts(this.getBuddyName());j=d?eq(d,eP.H):"";}this._switchSource=AE;if((j&&(j.length>0))||(this.getBuddyName()=="")){if(this._type=="sms"){this.completeSMSToIMSwitch(j);
}else{this.completeIMToSMSSwitch(j);}this.deleteNotify();this._smsValidated=false;}else{var
AC;var i=(this._type=="sms")?this.verifySMSToIMSwitch:this.verifyIMToSMSSwitch;var
q=(this._type=="sms")?null:this.getCloudId();KU(this._type,x,this.getBuddyName(),this,i,q);}}return
true;case"switch_send_mode_to_email":if(Component.A(Ox.A)){GL(null,null);Nd();}if(AE=="radiobar"){AE=AD?AE+":"+AD:AE;}if(this.isBlankIM()){if(this._isDirty){aX=this;dk(RB.IC,AB,window,null,AE);}else{dk(RB.IC,AB,window,null,AE);this.closeTab();}return
true;}var s=false;if(AE=="statustip"||AE=="radiobar:fromChat"||AE=="radiobar:fromsms"){s=true;
}if(s){var d=this._contact;if(!d){d=(this._type=="sms")?getSMSSenderFromContacts(this.getBuddyName(),true):getIMSenderFromContacts(this.getBuddyName(),this.getCloudId());}var
g=dc.A(d);if(g.length==0&&this.getCloudId()==Ux){g=this.getBuddyName();}this._switchSource=AE;this.completeIMToEmailSwitch(g);}return
true;case"send_im":if(IMEnabled&&!IMEnabled.isIMLoggedIn()){Lb();}else{if(this._toField||this._session!=null){this._sendInput();}else{if(!this._toField&&this._session==null){Lb();}}}return
true;case"toggle_display_mode":var p=AB.srcElement;if(p.tagName=="LI"){var
u=p.childNodes[0];if(u){p=u;
}}p.innerText=(this._dispMode=="bubble")?RB.oj:RB.nM;this._switchDisplayMode();return
true;case"toggle_view_timestamps":var h=AB.srcElement;if(h){if(h.tagName=="LI"){var
u=h.childNodes[0];if(u){h=u;}}h.innerText=this._showTimestamps?RB.mW:RB.nh;this._showTimestamps=!this._showTimestamps;var
l=Rh.A();l.B(fI,this._showTimestamps,true);l.D();N7("timestamps");}var t;var
e;if(this._dispMode=="simple"){var v=this._showTimestamps?"":Mx;t=YAHOO.util.Dom.getElementsByClassName("imTimestamp","span",this._conversation);for(e=0;e0)){var
J=G.split(":");var K=J[0];var L=J[1];I.completeIMToEmailSwitch(L);}};Wy.prototype.completeIMToEmailSwitch=function(B){du=B;aX=this;dk("compose:imcontact",null,window,null,this._switchSource);};Wy.prototype.verifyIMToSMSSwitch=function(I,J,M){var
L;var H=(M&&M.value)?M.value:"";if((I=="Continue")&&J&&H&&(H.length>0)){var
K=H.split(":");var L=K[0];var O=K[1];J.completeIMToSMSSwitch(O);}};Wy.prototype.verifySMSToIMSwitch=function(J,K,O){var
M;
var I=(O&&O.value)?O.value:"";var Q=(O&&O.cloud)?O.cloud:HG;if((J=="Continue")&&K&&I&&(I.length>0)){var
L=I.split(":");var M=L[0];var P=L[1];K.completeSMSToIMSwitch(P,Q);}};Wy.prototype.fixIdAndAdjustMarker=function(G){var
F=Gu("lastMarker_"+this.getUniqueEltSuffix());var E=Gu("imConversationTip_"+this.getUniqueEltSuffix());this._buddyID=G;if(F){F.id="lastMarker_"+this.getUniqueEltSuffix();}if(E){var
H;if(this._type=="sms"){H=Wy._smsTipTemplate.replace(//,this.getUniqueEltSuffix()).toMessage(RB.Hj+this.getBuddyDisplayName());}else{H=Wy._imTipTemplate.replace(//,this.getUniqueEltSuffix()).toMessage(RB.Hj+this.getBuddyDisplayName());
}E.insertAdjacentHTML("afterEnd",H);E.parentNode.removeChild(E);}};Wy.prototype.completeSMSToIMSwitch=function(U,L){if((this==Wy._blankSMSConversation)&&(Wy._blankIMConversation)){dk(RB.Js,null,null,null,"radiobar:fromsms");return
;}var M=IMObject.getIMSessionIfExists(U,L,this.getProfileId());var
P=M?M.getIMView():null;if(P&&(M.getIMView()!=this)){var Q=Wv(escape(U),L);dk(RB.Gk,null,null,Q,"radiobar:fromsms");return
;}this._carryOverText=A5(this.getInputHtml());this._type="chat";this._cloudId=L;var
K;this.deleteNotify();if(this._toptoolbar){this._toptoolbar.innerHTML="";S=eE.B(imtoptoolbar.documentElement,this._toptoolbar,this._type+"top_"+(new
Date().getTime()),3,5);
S.style.position=d4;}var O=this._smsInput.parentNode;O.innerHTML="";O.innerHTML=Wy._imInputTemplate;K=this._smsInputCharCount.parentNode;K.removeChild(this._smsInputCharCount);K.innerHTML=Wy._imFormattingBar;this._input=Dom.firstChildByClass(this.element,"imcBody");this._smsInput=null;this._smsInputCharCount=null;this._smsInputImg=null;this._rtetoolbar=Dom.firstChildByClass(this.element,"imcFormatting");var
S=eE.B(imrtetoolbar.documentElement,this._rtetoolbar,"imrte_"+(new
Date().getTime()),10,5);S.className="imToolbar";if(this._session){IMObject.endSMSSession(this._session);this._session=null;
var R=IMObject.getSession(U,this.getCloudId(),this.getProfileId());R.setIMView(this);this._session=R;}var
T=this.updateBuddyContact(U,this.getCloudId(),true);if(!T){this._buddyDispName=U;this._iconClass=U?(getBuddyIcon(this.getBuddyName(),this.getCloudId(),"",true,"newIM")):"newIM";if(U){this._notifyRow=this.createNotify(this.element.firstChild.firstChild,Wy.NEW_CT);}If.A();}this.fixIdAndAdjustMarker(U);this.element.id="imcSession_"+this.getUniqueEltSuffix();this.moveSplitter("min");IMObject.registerAppListener(this);if(this._typingElt){this._typingElt.innerText=RB.lT.toMessage(RB.Hj+this._buddyDispName);
}this._input.contentWindow.document.yMsgrSessionID=this.getUniqueEltSuffix();setTimeout(EY(this,Wy.focusInput,this),0);if(this==Wy._blankSMSConversation){Wy._blankSMSConversation=null;Wy._blankIMConversation=this;this._toField._type=this._type;this._toLabel.innerText=RB.H;}else{this.handleNotification("switchNotify");}KX.A("imstSMSToolbar");return
true;};Wy.prototype.completeIMToSMSSwitch=function(O){if((this==Wy._blankIMConversation)&&(Wy._blankSMSConversation)){dk(RB.Sd,null,null,null,"radiobar:fromChat");return
;}if(O){O=EP(O);}var P=IMObject.getSMSSessionIfExists(O,this.getProfileId());var
I=P?P.getIMView():null;
if(I&&(P.getIMView()!=this)){dk("im:open_im_text_session",null,null,O,"radiobar:fromChat");return
;}var M=A5(this.getInputHtml());this._type="sms";this._iconClass="sms";var
Q;if(this._toptoolbar){this._toptoolbar.innerHTML="";bar=eE.B(smstoptoolbar.documentElement,this._toptoolbar,this._type+"top_"+(new
Date().getTime()),3,5);bar.style.position=d4;}var K=this._input.parentNode;K.innerHTML="";K.innerHTML=Wy._smsInputTemplate;Q=this._rtetoolbar.parentNode;Q.removeChild(this._rtetoolbar);Q.innerHTML=Wy._smsCharCount;this._input=null;this._smsInput=Gu("_smsInput_");this._smsInput.onkeydown=Wy._smsInputKeydown;
if(Cq.B){this._smsInput.addEventListener("input",Wy._smsInputPaste,true);}else{this._smsInput.onpaste=Wy._smsInputPaste;}this._smsMaxChars=parseInt(RB.ja)-this.getProfileId().length-2;this._smsInputCharCount=Gu("_smsCountChars_");this._smsInputImg=Gu("_smsCountImg_");if(this._session){IMObject.unregisterForAllEvents(this);IMObject.endSession(this._session,true);this._session=null;var
L=IMObject.getSMSSession(O,this.getProfileId());L.setIMView(this);this._session=L;}var
J=this.updateBuddyContact(O,this.getCloudId(),true);if(!J){this._buddyDispName=O;this._iconClass="sms";if(O){this._notifyRow=this.createNotify(this.element.firstChild.firstChild,Wy.NEW_CT);
}If.A();}this.fixIdAndAdjustMarker(O);this._smsInput.id="_smsInput_"+this.getUniqueEltSuffix();this._smsInputCharCount.id="_smsCountChars_"+this.getUniqueEltSuffix();this._smsInputCharCount.innerText=RB.Y.toMessage("num="+this._smsMaxChars);this._smsInputImg.id="_smsCountImg_"+this.getUniqueEltSuffix();this.element.id="imcSession_"+this.getUniqueEltSuffix();this.setInput(M);this.moveSplitter("min");setTimeout(EY(this,Wy.focusInput,this),0);if(this==Wy._blankIMConversation){Wy._blankIMConversation=null;Wy._blankSMSConversation=this;this._toField._type=this._type;this._toLabel.innerText=RB.ma+":";
}else{this.handleNotification("switchNotify");}KX.A("smsstComposeToolbar");return
true;};Wy.prototype.onSMSVerify=function(C){if(Wy._blankSMSConversation!=this){return
;}Dom.setDisplay(this._smsVerifyBusyIcon,false);if(C.status!=RB.HG){var
D=EY(this,Wy.focusInput,this);this._smsValidated=true;this.deleteNotify();this.continueOnToSetBuddy(C.phone,null,D,100,true);if(this._funcAfterSmsVerify){this._funcAfterSmsVerify();this._funcAfterSmsVerify=null;}}else{this._notifyRow=this.createNotify(this.element.firstChild.firstChild,Wy.INVALID_NUM);this._toField.disabled=false;this._toField.focus();this._toField.select();
}};Wy.prototype.onEvent=function(F,H){if(!IMObject||!IMObject.CONST){return
;}var G="";var E;switch(F){case IMObject.CONST.YES_USER_LOGOFF_ERR:case
IMObject.CONST.YES_CONNECTION_FAILED:case -1:this.onReceiveTypingNotification(false);this._session=null;IMObject.unregisterForAllEvents(this);this.handleNotification("disCd");break;case
-2:this.onReceiveTypingNotification(false);this._session=null;IMObject.unregisterForAllEvents(this);break;default:break;}};Wy.prototype.onBuddyStatusChange=function(C){var
D=getBuddyInfoStatus(C);this.handleNotification(D.icon,D.msg);};Wy.prototype.initPresenceNotification=function(){if(IMObject&&IMObject.isBuddy(this.getBuddyName(),this.getCloudId(),true)){var
D=Hv(this.getBuddyName(),this.getCloudId());
if(!D){return ;}var C=D.msg;switch(D.icon){case"online":break;case"offline":case"busy":case"idle":this.handleNotification(D.icon,C);break;default:break;}}};Wy.prototype.handleNotification=function(U,P,S){if(this._toField){return
;}var Q="";var L=null;var R;var O=(this._dispMode=="simple");if(P&&P.length>0){P="
- "+M2(P);}else{P="";}switch(U){case"online":R=O?Wy._simpleOnlineString:Wy._onlineString;Q=R.toMessage(RB.Hj+this.getBuddyDisplayName()).replace(//,P);this._iconClass="online";break;case"offline":R=O?Wy._simpleOfflineString:Wy._offlineString;var
V=("dk")+'( "im_ondemand:switch_send_mode_to_email", null, null,
"'+Wv(this.getBuddyName(),this.getCloudId())+'", "statustip" ); return false;';
Q=R.toMessage(RB.Hj+this.getBuddyDisplayName(),"buddy="+this.getBuddyDisplayName()).toMessage("clickaction="+V);L=O?"imSimpleOfflineStatus":"imOfflineStatus";this._iconClass="offline";break;case"busy":R=O?Wy._simpleBusyString:Wy._busyString;Q=R.toMessage(RB.Hj+this.getBuddyDisplayName()).replace(//,P);this._iconClass="busy";break;case"idle":R=O?Wy._simpleIdleString:Wy._idleString;Q=R.toMessage(RB.Hj+this.getBuddyDisplayName()).replace(//,P);this._iconClass="idle";break;case"reCd":R=O?Wy._simpleReconnectString:Wy._reconnectString;Q=R.toMessage(RB.Hj+this.getBuddyDisplayName());
L=O?"imSimpleReconnectedStatus":"imReconnectedStatus";break;case"disCd":var
M=true;if(this._type=="sms"){var W=this._contact?dc.A(this._contact):"";if(!W){M=false;}}if(!M){R=O?Wy._simpleSMSDiscString:Wy._smsDiscString;Q=R;}else{R=O?Wy._simpleDiscString:Wy._discString;var
T=("dk")+'( "im_ondemand:switch_send_mode_to_email", null, null,
"'+Wv(this.getBuddyName(),this.getCloudId(),this._type)+'", "statustip" );
return false;';Q=R.toMessage(RB.Hj+this.getBuddyDisplayName()).toMessage("sendemail="+T,"closechat="+("Wy.closeTab")+"()","buddy="+this.getBuddyDisplayName());}L=O?"imSimpleDisconnectedStatus":"imDisconnectedStatus";
this._iconClass="disCd";break;case"smsError":R=O?Wy._simpleSMSErrorString:Wy._smsErrorString;R=R.replace(//,S);Q=R.toMessage(RB.Hj+this.getBuddyDisplayName());L=O?"imSimpleDisconnectedStatus":"imDisconnectedStatus";this._iconClass="sms";break;case"switchNotify":R=(this._type=="sms")?(O?Wy._simpleSwitchToSMSString:Wy._switchToSMSString):(O?Wy._simpleSwitchToIMString:Wy._switchToIMString);Q=R.toMessage(RB.Hj+this.getBuddyDisplayName());L=O?"imSimpleReconnectedStatus":"imReconnectedStatus";break;default:break;}if(Q.length>0){this._addNotification(Q,L);}If.A();};Wy.prototype.onBuddyAuthorize=function(B){this._notifyRow=this.createNotify(this.element.firstChild.firstChild,Wy.AD_BDY,B.firstname,B.lastname,B.target_user);
};Wy.prototype.onSMSError=function(B){if(!B.error_code){return
;}switch(B.error_code){case"22":this.handleNotification("smsError",null,RB.tF);break;case"16":this.handleNotification("smsError",null,RB.yD);break;case"19":this.handleNotification("smsError",null,RB.AK1);break;case"15":default:this.handleNotification("smsError",null,RB.A92);break;}};Wy.prototype.onReceiveIM=function(O,L){if(!L){if(this._type=="chat"){this.onReceiveTypingNotification(false);}if(this._type=="sms"&&O&&O.msg){O.msg=M2(O.msg);}var
I=La.A();I.F(this.getBuddyDisplayName(),true,null,true);var J=LB.A();var
K=this._tab;if(J!=K){this._viewState="hilite";
K.v(true);}if(YAHOO.mail.soundControl&&Bq&&(I.D==false||J!=K)){YAHOO.mail.soundControl.play(Tw);}if(J!=K){If.A();}}this._addMessage(O,L);if(this._type=="chat"&&!L){var
M=Math.floor(Math.random()*140);var H;if((M>=14&&this._prevTypeIndex>=14)||(M==this._prevTypeIndex)){return
;}this._prevTypeIndex=M;if(kPartner.hasFunTyping&&M<14){H=funTypingNotifications[M].toMessage(RB.Hj+this.getBuddyDisplayName());if(H.charAt(0)=="+"){H=H.substr(1).toUpperCase();}}else{H=RB.lT.toMessage(RB.Hj+this.getBuddyDisplayName());}if(this._typingElt){this._typingElt.innerText=H;}}};Wy.prototype.onReceiveTypingNotification=function(C){if(!this._typingElt){return
;
}var D=this._typingElt;if((!this._typing||(this._typing=="stopped"))&&C){D.style.visibility=U5;}else{if(!C){D.style.visibility=jE;}}this._typing=C?"typing":"stopped";};Wy.prototype.getAvtUrl=function(I){var
J=BV();if(!IMObject||!this._showAvatars){return J.getSilhouetteUrl();}I=!!I;var
G=I?this.getProfileId():this.getBuddyName();var F=I?HG:this.getCloudId();if(this._type=="sms"&&this._isContact){var
H=Va(this._contact);G=H.id;F=H.cloud;}return IMObject.getAvtUrl(G,F,I);};Wy.prototype.getLastDateStamp=function(){if(!this._session){return
new Date();}else{return this._session.getLastDateStamp();}};
Wy.prototype.getMyDisplayName=function(){if(cC.B){return cC.B.split("
")[0];}else{return this._profileId;}};Wy.prototype.getProfileId=function(){var
B=BV();return this._profileId?this._profileId:B.getProfileId();};Wy.prototype.getCloudId=function(){return
this._cloudId;};Wy.prototype.getBuddyName=function(){return this._buddyID;};Wy.prototype.getBuddyDisplayName=function(){if(this._buddyDispName!=""){return
this._buddyDispName;}return this.getBuddyName();};Wy.prototype.getIcon=function(){return
this._iconClass;};Wy.prototype.getViewTooltip=function(){var
D=this.getBuddyName();if(D==""){if(this._type=="sms"){D=RB.wL;
}else{D=RB.Bx0;}}var C=this.getBuddyDisplayName();if(C==""){return D;}return C+"
("+D+")";};Wy.prototype.getViewTitle=function(){var B=this.getBuddyDisplayName();if(B==""){if(this._type=="sms"){B=RB.A00;}else{B=RB.A52;}}return
B;};Wy.prototype.getViewState=function(){var B=LB.A(true);if(B.C==this.element){this._viewState="";}return
this._viewState;};Wy.prototype.resize=function(K){var L=this.element.firstChild;if(L==null||L.rows==null){return
;}var Q=K.B;var J=-1;for(var O=0;O0){this._typingElt.style.top=L.rows[J].offsetTop+Q-this._typingElt.offsetHeight-1;}this.scrollWindow(I);}if(Cq.A){My(L,K);L.style.width="100%";}else{VO(L,K);}if(this._toLabel&&this._toField){this._toField.style.width=K.A-this._toLabel.offsetWidth-27;}};Wy.prototype.close=function(){a7();var
B=this._tab;B.C.parentNode.removeChild(B.C);this._tab=null;
if(this._session){IMObject.unregisterForAllEvents(this);if(this._type=="sms"){IMObject.endSMSSession(this._session);}else{this._session.sendTypingIndicator(false);IMObject.endSession(this._session);}}if(this==Wy._blankIMConversation){Wy._blankIMConversation=null;}else{if(this==Wy._blankSMSConversation){Wy._blankSMSConversation=null;}}};Wy.prototype.closeTab=function(){this._tab.v(false);this._tab.T();};Wy.prototype.show=function(){this._tab.lT();};Wy.prototype._switchDisplayMode=function(){var
H;var J=Gu("imConversationTip_"+this.getUniqueEltSuffix());var
I=this._dispMode=="simple";var G=(this._conversation.scrollHeight-this._conversation.scrollTop)<=this._conversation.clientHeight;
H=this._getHeaderText(I);this._conversation.innerHTML=[H,this.getConversation(I)].join("");var
K=Dom.firstChildByClass(this.element,"imTextAvatar");if(K){if(Cq.B){K.style.top=(this._conversation.parentNode.parentNode.offsetTop+10)+Sn;}if(!I){K.style.visibility=U5;}else{K.style.visibility=jE;}}if(Cq.C||(Cq.B&&Cq.D>=1.9)){this._addConversationPadding();}if(Cq.A&&!I){setTimeout(EY(this,this.scrollWindow,true),100);}else{this.scrollWindow(G);}this._dispMode=((this._dispMode=="bubble")?"simple":"bubble");var
L=Rh.A();L.B(di,this._dispMode,true);L.D();N7("dispmode");};Wy.prototype._getHeaderText=function(C){var
D="imBubbleHeader myimTimestampColor";
if(!C){D+=" imSimpleHeader";}return Wy._headerTemplate.replace(//,D).replace(//,Bu(new
Date(),RB.Bp2));};Wy.prototype.getConversation=function(W){var i="";var X;var
b;var U;var a;var e;var V;var d;if(this._dispMode=="simple"&&!W){U=YAHOO.util.Dom.getElementsByClassName("imcSimpleEntry","div",this._conversation);for(X=0;X/,d).replace(//,this._showTimestamps?"":RB.Pg).replace(//,e.getAttribute("ts")).replace(//,b?this.getMyDisplayName():this.getBuddyDisplayName()).replace(//,a.innerHTML);}}else{var
f;var g="";U=YAHOO.util.Dom.getElementsByClassName("imcSimpleEntry","div",this._conversation);for(X=0;X | )");if(g==d){if(b){V=Wy._toAppendMsgFull;}else{V=Wy._fromAppendMsgFull;}V=V.replace(//,d).replace(//,c).replace(//,j).replace(//,T).replace(//,a.innerHTML);if(h=i.match(Y)){i=i.replace(Y,V+h[1]);}}else{var
k;if(b){V=Wy._toMsgTemplate;f=Wy._toBubbleTemplate;k="0";}else{V=Wy._fromMsgTemplate;f=Wy._fromBubbleTemplate;
k="1";}i=i.replace(Y,"");V=V.replace(//,d).replace(//,c).replace(//,j).replace(//,T).replace(//,a.innerHTML);i+=f.replace(//,this.getUniqueEltSuffix()).replace(//,this.getAvtUrl(b)).replace(//,k).replace(//,V);g=d;}}}}return
i;};Wy.prototype.getInputHtml=function(){if(this._type=="sms"){return
this._smsInput.value;}else{return this._input.contentWindow.document.body.innerHTML;}};Wy.prototype._getInputWindowBody=function(){if(this._input){return
this._input.contentWindow.document.body;
}return null;};Wy.prototype.setInput=function(B){if(!B){return
;}this._isDirty=true;if(this._type=="sms"){this._smsInput.value=B;if(this._smsInputCharCount&&this._smsInput){Wy.updateSMSCharCount(this,this._smsInput);}return
;}if(Cq.B){this._input.contentWindow.document.execCommand("inserthtml",false,B);}else{this._input.contentWindow.document.body.innerHTML=B;}this._checkInputHeight();};Wy.prototype._checkInputHeight=function(E){if(!this._input||!this._input.contentWindow||!this._input.contentWindow.document.body){return
;}var D=parseInt(Cq.C?this._input.contentWindow.document.documentElement.clientHeight:this._input.contentWindow.document.body.clientHeight);
var F=parseInt(this._input.contentWindow.document.body.scrollHeight);this.moveSplitter("grow",F-D,E);};Wy.prototype._getFontSize=function(){if(!Wy.sizeMap||!this._fontSize){return
12;}return Wy.sizeMap[this._fontSize-1]-"0";};Wy.prototype.moveSplitter=function(M,O,I){var
H=(this._type=="sms")?this._smsInput:this._input;var K=Qh.C();var
L=(H.offsetHeight+this._conversation.offsetHeight)/2;var J=H.style.height;switch(M){case"max":H.style.height=L;break;case"min":H.style.height=Wy._minHeight;break;case"grow":if(O>0){H.style.height=Math.min(L,H.offsetHeight+O);}else{if(O<0){H.style.height=Math.max(Wy._minHeight,H.offsetHeight+O);
}}break;}if(I||(H.style.height!=J)){this.resize(K);}};Wy.focusInput=function(G,L){var
H=G;var K=LB.A(true);if(H==null||K!=H._tab){return ;}if(H._toField!=null&&!H._isDirty){H._toField.focus();if(H._type=="chat"){H.restoreStyles(H._input.contentWindow,true);}return
;}if(H._type=="sms"){if(H._smsInput){H._smsInput.focus();}return ;}var
I=H._input.contentWindow;if(!I.document.body){if(L==null){L=0;}if(L>30){return
;}setTimeout(EY(this,Wy.focusInput,G,L+1),100);return ;}H.restoreStyles(H._input.contentWindow,true);if(Cq.B||Cq.C){try{I.focus();if(Cq.C){I.document.execCommand("SelectAll");}}catch(J){}}else{Et(I,"end",true);
}};Wy.prototype.activate=function(){if(this._conversation){this._conversation.style.visibility=U5;}this._checkInputHeight(true);if(Cq.A&&this._dispMode=="simple"){this.scrollWindow(true);}if(this._rtetoolbar){this._rtetoolbar.id=RB.Dm;}if(this._input){this._input.id=RB.LP;}this._viewState="";var
B=La.A();B.C();setTimeout(EY(this,Wy.focusInput,this),0);};Wy.prototype.deactivate=function(){if(this._rtetoolbar){this._rtetoolbar.id=null;}if(this._input){this._input.id=null;}a7();};Wy.prototype._addInvisibleBreaks=function(L){var
J=L.split("");var K=new Array();var P;var M=0;var Q=false;var I=false;
var O="";for(P=0;P")){Q=false;}else{if(I&&(O==";")){I=false;}}}}K.push(O);if(Q||I){continue;}else{if(O.match(/[?#%-_=]/)){K.push("");M=0;}else{if(M==15){K.push("");M=0;}else{if(O=="
"){M=0;}else{M++;}}}}}return K.join("");};Wy.prototype._appendMessageRow=function(S,V,Y){var
W;var P;if(V){W=Wy._toAppendMsgTemplate;P=Wy._toAppendTSTemplate;}else{W=Wy._fromAppendMsgTemplate;P=Wy._fromAppendTSTemplate;}var
Q="0px";var a="";if(this._showTimestamps){Q=Wy._tsDefaultWidth;a=Y;}P=P.replace(//,Q).replace(//,Y);
var R=Gu("lastMarker_"+this.getUniqueEltSuffix());if(!R){return ;}var
Z=R.parentNode;var T=document.createElement("TR");T.className="imcBubbleEntry";T.setAttribute("yid",V?this.getProfileId():this.getBuddyName());Z.insertBefore(T,R);var
U=Vt(W,T);var O=Vt(P,T);U.insertAdjacentHTML(RB.Ty,S);O.insertAdjacentHTML(RB.Ty,a);var
X=document.createElement("TR");Z.insertBefore(X,T);Vt("",X);};Wy.prototype._addMessage=function(k,i){if(this._session==null){return
;}var n=cC.V();if(cC.B!=null&&cC.B.length>0){n=cC.B.split(" ")[0];}var
b=i?this.getMyDisplayName():this.getBuddyDisplayName();
var f=i?this.getProfileId():this.getBuddyName();var a="";if(k.time&&k.time!=0){a=Bu(new
Date(1000*k.time),RB.z);}else{a=Bu(this.getLastDateStamp()?this.getLastDateStamp():new
Date(),RB.z);}var h;k.msg=this._addInvisibleBreaks(k.msg);var o;var g;var
V=(this._conversation.scrollHeight-this._conversation.scrollTop)<=this._conversation.clientHeight;var
c=Gu("imConversationTip_"+this.getUniqueEltSuffix());if(c){if(this.getCloudId()==Ux){c.insertAdjacentHTML("afterEnd",Wy._msnTipTemplate.replace(/__CLASS__/,(this._dispMode=="simple"?"class='msnTipSimple'":"")).replace(//,this.getUniqueEltSuffix()).toMessage(RB.Hj+this.getBuddyDisplayName()));
}c.insertAdjacentHTML("afterEnd",this._getHeaderText(this._dispMode=="bubble"));c.parentNode.removeChild(c);if(this._dispMode=="simple"){var
j=Dom.firstChildByClass(this.element,"imTextAvatar");j.style.visibility=U5;}}if(this._dispMode=="simple"){var
Y;var Z=(this._type=="sms")?Wy._smsFromTemplate:Wy._imFromTemplate;o=i?Wy._toTemplate:Z;this._insertConversationHTML(o.replace(//,f).replace(//,this._showTimestamps?"":RB.Pg).replace(//,a).replace(//,b).replace(//,k.msg));}else{if(this._lastSender==f){this._appendMessageRow(k.msg,i,a);
}else{var d=Gu("lastMarker_"+this.getUniqueEltSuffix());var m;if(d){d.parentNode.removeChild(d);}if(i){o=Wy._toMsgTemplate;g=Wy._toBubbleTemplate;m="0";}else{o=Wy._fromMsgTemplate;g=Wy._fromBubbleTemplate;m="1";}var
e="0px";var W="";if(this._showTimestamps){e=Wy._tsDefaultWidth;W=a;}h=o.replace(//,f).replace(//,e).replace(//,a).replace(//,W).replace(//,k.msg);var
X=b+"( "+f+" )";var l=i?RB.vd:b;this._insertConversationHTML(g.replace(//,this.getUniqueEltSuffix()).replace(//,this.getAvtUrl(i)).replace(//,m).replace(//,h).replace(//,l).replace(//,X));
}}this.scrollWindow(V);this._lastSender=f;this._messageWaiting=true;};Wy.prototype.scrollWindow=function(B){if(B&&this._conversation){this._conversation.scrollTop=this._conversation.scrollHeight-this._conversation.clientHeight;}};Wy.prototype._insertConversationHTML=function(B){if(Cq.C||(Cq.B&&Cq.D>=1.9)){if(!this._conversationPadding){this._addConversationPadding();}this._conversationPadding.insertAdjacentHTML("beforeBegin",B);}else{this._conversation.insertAdjacentHTML(RB.Ty,B);}};Wy.prototype._addConversationPadding=function(){this._conversationPadding=document.createElement("DIV");this._conversationPadding.className="imcConversationPadding";
this._conversationPadding.setAttribute("style","height:20px;");this._conversation.insertAdjacentElement(RB.Ty,this._conversationPadding);};Wy.prototype._addNotification=function(T,K){var
O=Bu(new Date(),RB.z);var S="";if(K&&K.indexOf&&(K.indexOf("connectedStatus")>=0)){S="CS_";}var
U=Gu("imNotifyElt_"+S+this.getUniqueEltSuffix());if(U){if(this._lastSender==null){U.parentNode.removeChild(U);}else{U.id="imNotifyEltSticky";}}var
P=(this._conversation.scrollHeight-this._conversation.scrollTop)<=this._conversation.clientHeight;var
Q=(this._dispMode=="simple")?Wy._simpleNotificationTemplate:Wy._notificationTemplate;
Q=Q.replace(//,S).replace(//,this.getUniqueEltSuffix());if(!K){K="";}var
M="0px";var L="";if(this._showTimestamps){M=Wy._tsDefaultWidth;L="("+O+")";}var
R=Gu("imConversationTip_"+this.getUniqueEltSuffix());if(R){if(this.getCloudId()==Ux){R.insertAdjacentHTML("afterEnd",Wy._msnTipTemplate.replace(/__CLASS__/,(this._dispMode=="simple"?"class='msnTipSimple'":"")).replace(//,this.getUniqueEltSuffix()).toMessage(RB.Hj+this.getBuddyDisplayName()));}R.insertAdjacentHTML("afterEnd",this._getHeaderText(this._dispMode=="bubble"));R.parentNode.removeChild(R);}this._insertConversationHTML(Q.replace(//,T).replace(//g,K).replace(//,M).replace(//,O).replace(//,L));
this.scrollWindow(P);this._lastSender=null;};Wy.prototype.continueOnToSetBuddy=function(H,K,I,J,G){var
L=BV();if(this.setBuddy(H,K,null,L.getProfileId(),G)){this._viewState="";setTimeout(I,J);return
true;}return ;};Wy.prototype._sendInput=function(){if(this._type=="sms"&&!hj()){var
V=EY(this,this._sendInput);cx(V);return false;}if(this._session==null){var
S;if(this._type!="sms"){var M=HG;S=iH(this._toField.value);if(S==null){M=Ux;S=IE(this._toField.value);}if(S==null){alert(RB.kO);return
;}}else{S=this._toField.value;if(!S||Wy._stringHasAlphabets(S)||!Wy._stringHasEnoughDigits(S)){alert(RB.mF);
return ;}if(!this._smsValidated){var Q=EY(this,this._sendInput);this._smsValidate(S,Q);return
;}}var Q=EY(this,this._sendInput);var P=this.continueOnToSetBuddy(S,M,Q,50,true);return
P;}if(this._type!="sms"){var T=this.getCloudId();if(T==Ux&&!IMObject.isBuddy(this.getBuddyName(),T)){var
U=new VM(RB.ll);NS.A(U);return ;}}var R=this._getMessageToBeSent();if(R==""){return
;}var W;if(W=R.match(/^\/sound (.*?)$/)){switch(W[1]){case"on":Bq=true;break;case"off":Bq=false;break;case"mac":Tw="immac";break;case"win":Tw="imwin";break;}var
O=Rh.A();if((W[1]=="on")||(W[1]=="off")){O.B(MW,Bq?"yes":"no",true);}else{O.B(Gz,Tw,true);
}O.D();return ;}if(this._type=="sms"){this._session.sendSMS(R);this.onReceiveIM({msg:R},true);this._smsInput.value="";this._smsInputCharCount.innerText=RB.Y.toMessage("num="+this._smsMaxChars);this._smsInputImg.className="";this._smsInput.focus();KX.A("smsSend");}else{var
L=this._getInputWindowBody();this._session.sendTypingIndicator(false);this._session.sendIM(L,true,L.style);if(Cq.E){L.innerHTML=" ";}else{L.innerHTML="";}this.moveSplitter("min");this.restoreStyles(this._input.contentWindow,null,null,Cq.C);KX.A("imSend");}setTimeout("throbberHack()",100);
};Wy.prototype._getMessageToBeSent=function(){var B;if(this._type=="sms"){B=this._smsInput;return
M2(B.value);}else{B=this._input.contentWindow.document.body;return
B.innerHTML.stripTags();}};Wy.prototype.getUniqueEltSuffix=function(){return
this.getBuddyName()+"_"+this._initTime;};Wy.prototype.getFontSelection=function(B){if(this._rtetoolbar){return
this._rtetoolbar.getElementsByTagName(RB.bE)[B];}};Wy.prototype.getID=function(){return"imtab_tabopi_"+this.getBuddyName();};Wy.getSessionElement=function(C){var
D=C;while(D&&!he(D,"imcSession")){D=D.parentNode;}return D;};Wy.getSessionUID=function(E){var
F=Wy.getSessionElement(E);
if(F==null){return null;}var G=F.id;var H=G.indexOf("imcSession_");if(H==0){return
G.substring("imcSession_".length);}return null;};Wy.getSessionView=function(D){var
E=Wy.getSessionElement(D);var F=LB.I(E);return F.D;};Wy._inputLoad=function(J){var
I=null;if(J&&J.currentTarget){I=J.currentTarget;}else{if(J&&J.srcElement){I=J.srcElement;}}var
K=Wy.getSessionUID(I);var L=Wy._getView(K);if(L==null){if(J){J=Xc(J);}setTimeout(EY(Wy,Wy._inputLoad,J),100);return
;}var H=I.contentWindow.document;if(H.designMode.toLowerCase()=="on"){if(Cq.A){H.yMsgrSessionID=K;H.onkeydown=Wy._inputKeydown;H.onkeypress=Wy._inputKeypress;
H.ondeactivate=Wy.handleDeactivate;H.onactivate=Wy.handleActivate;H.onbeforedeactivate=Wy.handleBeforeDeactivate;H.onbeforeactivate=Wy.handleBeforeActivate;}}else{if(Cq.B){H.yMsgrSessionID=K;H.addEventListener("keydown",Wy._inputKeydown,true);H.addEventListener("keypress",Wy._inputKeypress,true);H.addEventListener(RB.Pl,Nf,true);H.addEventListener("blur",Tu,true);}H.designMode="on";if(Cq.B){H.execCommand("styleWithCSS",false,false);}}var
G=H.body;if(Cq.B){H.addEventListener("keyup",Wy._updateGUIforSelectionIM,true);H.addEventListener(RB.Dp,Wy._updateGUIforSelectionIM,true);H.addEventListener(RB.bE,Wy._updateGUIforSelectionIM,true);
}else{if(G){G.onselect=G.onmouseup=G.onkeyup=Wy._updateGUIforSelectionIM;}}if(G){if(Cq.C){G.innerHTML="";}if(L&&L._carryOverText){if(Cq.B){G.textContent+=L._carryOverText;}else{G.innerText+=L._carryOverText;}L._carryOverText="";}}setTimeout(EY(this,Wy.focusInput,I),100);};Wy.handleDeactivate=function(){var
C=Wy._getView(this.yMsgrSessionID);var D=C._input.contentWindow.event;Console.log("Deactivate");};Wy.handleBeforeDeactivate=function(){var
C=Wy._getView(this.yMsgrSessionID);var D=C._input.contentWindow.event;Console.log("Before
Deactivate");};Wy.handleActivate=function(){var C=Wy._getView(this.yMsgrSessionID);
var D=C._input.contentWindow.event;Console.log("Activate");};Wy.handleBeforeActivate=function(){var
C=Wy._getView(this.yMsgrSessionID);var D=C._input.contentWindow.event;Console.log("Before
Activate");};Wy._updateSelectElemIM=function(O,L,I){var J;var
H=Wy._getView(I);if(!H){return ;}var K=H._input.contentWindow.document;J=K.queryCommandValue(L);if(!J){J="null";}else{if(L=="FontName"){J=K5(J);}else{if(L=="FontSize"){J="size"+J;}}}var
M=NH(O,J);if(M&&Lang.isArray(M)){M=M[0];}if((M)&&(!M.selected)){M.selected=true;}};Wy._updateGUIforSelectionIM=function(){var
E=LB.A();var F=Cq.A?this.document.yMsgrSessionID:this.yMsgrSessionID;
var H=E.l4(0);if(H){Wy._updateSelectElemIM(H,"FontName",F);}var
G=E.l4(1);if(G){Wy._updateSelectElemIM(G,"FontSize",F);}};Wy._getView=function(D){var
F=Gu("imcSession_"+D);var E=LB.I(F);if(E==null){return null;}return
E.D;};Wy.allowedKeysAfterMaxChars=function(B){return Zd.B(B)||Zd.F(B)||Zd.E(B);};Wy.updateSMSCharCount=function(H,G,E){var
F=H._smsMaxChars-G.value.length;H._smsInputCharCount.innerText=RB.Y.toMessage("num="+F);if(F<=0){H._smsInputImg.className="cantTypeIcon";if(F<0){H._smsInputCharCount.innerText=RB.Y.toMessage("num=0");G.value=G.value.substring(0,H._smsMaxChars);}}else{H._smsInputImg.className="typingTypeIcon";
}};Wy._smsInputPaste=function(M){if(M==null){M=window.event;}var Q=Evt.A(M);var
L=Q.id;var J=L.indexOf("_smsInput_")==0?L.substring("_smsInput_".length):null;if(J==null){return
;}var P=Wy._getView(J);var K;if(Cq.A){K=window.clipboardData.getData("Text");var
S=P.getInputHtml();var O=S?S.length:0;if(K&&((O+K.length)>P._smsMaxChars)){var
R=P._smsMaxChars-O;K=K.substr(0,R);window.clipboardData.setData("Text",K);}}else{K=P.getInputHtml();if(K&&(K.length>P._smsMaxChars)){K=K.substr(0,P._smsMaxChars);P.setInput(K);}}return
true;};Wy._smsInputKeydown=function(K){if(K==null){K=window.event;}var
O=Evt.A(K);
var I=O.id;var M=I.indexOf("_smsInput_")==0?I.substring("_smsInput_".length):null;if(M==null){return
;}var H=Wy._getView(M);if(H){H._isDirty=true;var J=H._session;}switch(K.keyCode){case
KeyCodes.Enter:if(H._toField||J!=null){H._sendInput();}else{if(!H._toField&&J==null){Lb();}}Evt.B(K);return
false;default:var L=H._smsMaxChars-O.value.length;setTimeout(EY(Wy,Wy.updateSMSCharCount,H,O,K.keyCode),0);if((L<=0)&&!Wy.allowedKeysAfterMaxChars(K)){return
false;}break;}};Wy._inputKeydown=function(F){var D=Wy._getView(this.yMsgrSessionID);var
E;if(D){D._isDirty=true;E=D._session;}if(F==null){F=D._input.contentWindow.event;
}switch(F.keyCode){case KeyCodes.Enter:if(D._toField||E!=null){D._sendInput();}else{if(!D._toField&&E==null){Lb();}}Evt.B(F);return
false;default:VY(F);setTimeout(EY(D,D._checkInputHeight),0);if(E!=null){E.sendTypingIndicator(true);}break;}};Wy._inputKeypress=function(D){var
C=Wy._getView(this.yMsgrSessionID);if(D==null){D=C._input.contentWindow.event;}switch(D.keyCode){case
KeyCodes.Enter:Evt.B(D);return false;default:break;}};Wy._tsDefaultWidth="60px";Wy._uiTemplate="";
Wy._imToRow=" | |
";Wy._smsToRow=" |
";Wy._blankTemplate=" |
|
";
Wy._imInputTemplate="";Wy._smsInputTemplate="";Wy._imFormattingBar="";Wy._convTemplate=" |
"+Wy._imFormattingBar+" |
| "+Wy._imInputTemplate+" | | "," |
";
Wy._smsCharCount=""+RB.Y.toMessage("num="+RB.ja)+RB.Wa;Wy._smsConvTemplate=" |
"+Wy._smsCharCount+" |
| "+Wy._smsInputTemplate+" | | "," |
";
Wy._sendTemplate="";Wy._toMsgTemplate=" | |
";Wy._toAppendMsgFull=" |
| |
";
Wy._toAppendMsgTemplate="";Wy._toAppendTSTemplate=" | ";Wy._fromMsgTemplate=" | | |
";Wy._fromAppendMsgFull=" |
| |
";
Wy._fromAppendMsgTemplate="";Wy._fromAppendTSTemplate=" | ";Wy._avatarStylePrefix="background-image:
";Wy._imFromTemplate=" (): ";Wy._smsFromTemplate=" ():
";
Wy._toTemplate=" (): ";Wy._toBubbleTemplate=[""," | ","",""," | "," | "].join("");
Wy._fromBubbleTemplate=[""," | ","",""," | | "].join("");
Wy._notificationTemplate=[""].join("");Wy._simpleNotificationTemplate="";
Wy._discString="";Wy._smsErrorString="";Wy._smsDiscString="";
Wy._idleString="";Wy._reconnectString="";Wy._onlineString="";Wy._busyString="";
Wy._offlineString="";Wy._switchToSMSString="";Wy._switchToIMString="";Wy._simpleDiscString=""+RB.k9+"
"+RB.mI+RB.Wa;
Wy._simpleSMSDiscString=""+RB.k9+"
";Wy._simpleSMSErrorString="
";Wy._simpleReconnectString=""+RB.n8+" ";
Wy._simpleIdleString=""+RB.nT+" ";Wy._simpleOnlineString=""+RB.nd+" ";Wy._simpleBusyString=""+RB.nO+" ";
Wy._simpleOfflineString=""+RB.nB+" "+RB.o3+RB.Wa;Wy._simpleSwitchToSMSString=""+RB.mi+" ";Wy._simpleSwitchToIMString=""+RB.mu+" ";Wy._msnTipText="";
Wy._msnTipTemplate="";Wy._imTipTemplate="";Wy._smsTipTemplate="";
Wy._tipTemplateBlank="";Wy._headerTemplate="";Wy._textAvatarTemplate="";Component.B(Ox.Y,"cmd",("j1"));function
j1(J,K,L,H,I){var G=BV();
var F=cT(window);var M;var C=true;switch(J){case"im_ondemand:create_view":var
E=createIMView(H.imsession,H.source,H.showNow,H.type);if(H.ondone){H.ondone.call(H.scope,E,H.params);}break;case"im_ondemand:new_im":if(IMEnabled.isIMLoggedIn()){createIMView(null,I,true,"chat");}else{fnClosure=EY(window,j1,J,K,L,H,I);Fj.push(fnClosure);Lb();}break;case"im_ondemand:new_text_msg":if(IMEnabled.isIMLoggedIn()){if(!hj()){fnClosure=EY(window,j1,J,K,L,H,I);cx(fnClosure);break;}createIMView(null,I,true,"sms");}else{var
O=EY(window,j1,J,K,L,H,I);Fj.push(O);Lb();}break;case"im_ondemand:open_im_text_session":if(IMEnabled.isIMLoggedIn()){if(!hj()){O=EY(window,j1,J,K,L,H,I);
cx(O);break;}H=EP(H);IMObject.getSMSSessionWithView(H,I,true);}else{var
O=EY(window,j1,J,K,L,H,I);Fj.push(O);Lb();}break;case"im_ondemand:open_im_session":H=H.toLowerCase();var
B=bD(H);if(B.length<=1){B[1]=HG;}if(IMEnabled.isIMLoggedIn()){IMObject.getSessionWithView(B[0],B[1],I,true);}else{var
O=EY(window,j1,J,K,L,H,I);Fj.push(O);Lb();}break;case"im_ondemand:switch_send_mode_to_chat":M=LB.A();if(M&&M.A()==RB.aM){return
M.handleCommand(J,H,K,I,L);}XR(J,K,L,H,I,"chat");break;case"im_ondemand:switch_send_mode_to_sms":M=LB.A();if(M&&M.A()==RB.aM){return
M.handleCommand(J,H,K,I,L);}XR(J,K,L,H,I,"sms");
break;case"im_ondemand:im_new_status":var A=new KP(RB.sA,null,EY(Ac,Ac.E));NS.A(A);A.ju();break;case"im_ondemand:show_msn_add_dialog":if(NS.B){NS.B.cancelDialog();}var
D=dY();if(D==null){var A=new VM(RB.qX,RB.AR1,null,null,EY(Tq,Tq.F,2));NS.A(A);}else{var
A=new hq(dY());NS.A(A);}KX.A("imScanMSNContacts");break;default:C=false;}return
C;}function cx(A){if(!Mz){var B=new Ma(Rq,A);NS.A(B);}}function
KU(B,E,D,A,I,F){var G=Ox.B;if(!Component.A(G)){var C=TJ[G]?TJ[G]:G;var
J=EY(window,KU,B,E,D,A,I,F);Component.C(C,J);return ;}var H;H=new
D2(B,E,D,A,I,F);NS.A(H);H.ju();}iJ.z=" | "+RB.tg+" ."+RB.x7+"
"+RB.qU+" | ";
function iJ(O,P,M,A){var J=new jW("Spam",RB.nt,null,true);var K=new
jW("Block",RB.zp,null,true);var L=new jW("Show",RB.w3,null,false);L.A=M;L.B=true;K.B=false;J.B=false;var
Q=iJ.z;Q=Q.replace(//,O).replace(//,P);this.B(Q,"",[L,K,J],null,iJ.k0,A);}MA(iJ,VM);iJ.prototype.B=VM;iJ.k0=function(H,G){var
F;var I;if(H=="Spam"){G.reportSpam();F=RB.tJ;I=RB.qx;}else{if(H=="Block"){if(cX(G.getBuddyName(),G.getCloudId())){return
;}G._blockBuddy("unknownSender");F=RB.o0;I=RB.mP;}else{return
;}}F=F.toMessage("yid="+G.getBuddyName());G.closeTab();var J=new
VM(F,I);NS.A(J);};ij.z="";
ij.kk;ij.kh;ij.lL;ij.kI;function ij(A,C,S,O,K,Q,U){var R=new
jW("Continue",RB.k7,null,false);R.A=_setIMText;var P=new S3(RB.rs);P.B=true;A=A+ij.z;var
T;if(Q){T=function(D,E,B){Q(D=="Continue",E,B);};}ij.lL=S;ij.kh=O;ij.kk=K;ij.kI=null;this.$$$_SimpleInputDialog(A,C,[R,P],null,T,U);}MA(ij,Xm);ij.prototype.$$$_SimpleInputDialog=Xm;ij.ju=function(E,G){if(!E.document.body){if(G==null){G=0;}if(G>100){return
;}setTimeout(EY(this,ij.ju,E,G+1),100);return ;}ij.kI=E;E.document.body.style.fontSize=ij.kh;E.document.body.style.fontFamily=ij.kk;E.document.body.innerHTML=ij.lL;var
F=Gu("Continue",E.parent);if(F){F.disabled=true;
}if(Cq.B){try{E.focus();}catch(H){}}else{Et(E,"start",true);E.document.body.scrollTop=0;}};ij.prototype.n4=function(E){var
D=null;if(E&&E.currentTarget){D=E.currentTarget;}else{if(E&&E.srcElement){D=E.srcElement;}}D.style.overflow=RB.AC;var
F=D.contentWindow.document;if(F.designMode.toLowerCase()=="on"){if(Cq.A){F.onkeydown=ij._handleKeydown;}}else{if(Cq.B){F.addEventListener("keydown",ij._handleKeydown,true);}F.designMode="on";if(Cq.B){F.execCommand("styleWithCSS",false,true);}}setTimeout(EY(this,ij.ju,D.contentWindow),100);};ij.prototype._handleKeydown=function(D){var
E=ij.kI;if(!E){return ;}var F=Gu("Continue",E.parent);
if(E.document.body.innerHTML.length<2000){F.disabled=false;}else{F.disabled=true;}};ij.prototype._setIMText=function(){var
B=Gu("imText");if(B){B=B.contentWindow;}if(B&&B.document.body){this.jc=B.document.body.innerHTML;}};Ma.z=""+GH(RB.pV)+RB.Ll+RB.C31+":
";function
Ma(I,G){this.jc=G;var H=new jW(jW.C,RB.C,this._setHomeCountry,true);var A=new
S3();var J=Ma.z;this.B(J,RB.qb,[H,A],null,I);
}MA(Ma,VM);Ma.prototype.B=VM;Ma.prototype._setHomeCountry=function(){var
D=Gu("home_country_sel");if(D){var E=D.value;if(!E){return true;}Mz=E;var
F=Rh.A();F.B(Dx,E,true);F.D();}};KP.z=" ";
function KP(A,I,K){var J=new jW(jW.C,RB.C,this.kW,true);var C=new
S3();J.B=true;J.A=this.kW;C.B=false;var L=KP.z;this.B(L,A,[J,C],null,K,I);}MA(KP,VM);KP.prototype.B=VM;KP.prototype.kW=function(){var
B=Gu("newStatus");if(B.value==""){alert(RB.An1);return true;}Xo(Gu("bz").checked,Gu("newStatus").value.substr(0,255));return
false;};KP.prototype.d=function(C){this.B.prototype.d.call(this,C);if(C.keyCode==KeyCodes.Enter){var
D=this.kW();if(!D){NS.B.cancelDialog();}}return true;};KP.prototype.ju=function(){var
D=Gu("newStatus");var F=Gu("newStatusDiv");var E=Gu("customStatusColumn");F.style.width=D.offsetWidth+5;
F.style.height=D.offsetHeight+5;F.style.overflow=RB.AC;D.style.overflow=RB.AC;E.style.overflow="";setTimeout(this.m5,20);};KP.prototype.m5=function(){var
B=Gu("customStatusColumn");B.style.overflow=RB.AC;};hq.z=""+RB.Bq1+" "+RB.Ab0;hq.m1=" ";
function hq(J){this.jz=[];this.f=J.length;this.la=J;this.ku=false;var M=new
jW("dlgBtnAdd",RB.k2,null,true);var C=new S3();M.B=true;M.A=this.lV;C.B=false;var
K=this.lW();var A=RB.xJ.toMessage("num="+this.f);var O=hq.z;O=O.replace(//,K);O=O.replace(/\%num\%/,this.f);var
L=function(){if(this.ku){var B=this.f;var D=new VM(RB.xR.toMessage("num="+B),RB.BQ1.toMessage("num="+B));NS.A(D);}};this.B(O,A,[M,C],null,L,this.f);}MA(hq,VM);hq.prototype.B=VM;hq.md=function(F){var
D=Gu("msn_ct_"+F);var E=Gu("msn_select_all");if(D&&!D.checked&&E.checked){E.checked=false;}};hq.mn=function(){var
J=Gu("msn_ct_list");
var I=Gu("msn_select_all");var H=J.childNodes;var G;if(I.checked){this.f=H.length;G=true;}else{G=false;this.f=0;}for(var
F=0;F/,L).replace(//,J);}return
K;};GF.m7="";
GF.lX="";function
GF(c,b,K,U,a,W,V){this.G=a||"decline";var C;var A=GF.lX;var X;if(a==RB.bH){A=A.replace(//,RB.qs.toMessage("yid="+K)).replace(//g,K);C=RB.sy;X=RB.CN2;}else{if(typeof
IMObject!=RB.Qt&&IMObject&&!IMObject.isBuddy(c,b)){A=GF.m7;}A=A.replace(//,RB.CI0).replace(//g,K);
C=RB.Ba2;X=RB.l2;}var Z=function(D,E,B){GF.lT(D==jW.C,E,B);if(U){U(D==jW.C,B);}};var
S=new jW(jW.C,X,this.k0,true);var T=new S3();T.B=false;var Y={};Y.imid=c;Y.cloud=b;Y.dispName=K;Y.session=W;Y.profile=V;this.B(A,C,[S,T],null,Z,Y);}MA(GF,VM);GF.prototype.B=VM;GF.prototype.k0=function(){var
F=this.G;var E=Gu("imblock");var D=Gu("imspam");if(E&&E.checked){F+=RB.bH;}if(D&&D.checked){F+=RB.dd;}this.jc=F;};GF.lT=function(Z,R,V){if(!Z){return
;}var O=R.imid;var S=R.cloud;var U=R.profile;var P=R.dispName;var
a=R.session;var T=V.match(/decline/);var X=V.match(/block/);var
Y=V.match(/spam/);var Q=null;
if(T){if(IMObject){IMObject.sendBuddyAuthorize(U,O,S,false);}text=RB.BX0.toMessage("yid="+P);KX.A("imbrDeny");}if(X){if(cX(O,S)){return
;}if(IMEnabled.isIMLoggedIn()){IMObject.blockUser(O,S);Q="imBlockSender";}if(T){text=RB.vq.toMessage("yid="+P);}else{text=RB.o0.toMessage("yid="+P);}}if(Y){if(IMObject){IMObject.reportSpam(U,O,S);Q="imBlockAsSpam";}text+=RB.WL+RB.B11.toMessage("yid="+P);}if(Q){KX.A(Q);}var
W=new VM(text,T?RB.AQ1:RB.mP);NS.A(W);};D2.Z="";D2._emailRowTemplate=""+RB.ls+" | | ";
D2._imRowTemplate=""+RB.ny+" |
| ";D2._smsRowTemplate=""+RB.BD2+" | | ";D2._editSMSTemplate="";function D2(U,M,a,X,V,A){var c;var C;this.O=M;this.jd=U;this.G=U+"2"+M;this.D=a;this.ky=A;var
Z=new jW("Continue",RB.k7,null,false);Z.B=true;var S=new S3();S.B=false;var
Y=cQ.lG.replace(//,cQ.o);var T=cQ.l5.replace(//,cQ.o);var
W=D2._editSMSTemplate;switch(this.G){case"chat2sms":C=RB.pE;
c=cQ.X.replace(//,"quickContactAlertIcon").replace(//,RB.kc);c+=D2.Z.replace(//,D2._smsRowTemplate).replace(//,D2._imRowTemplate);T=this.D;c=c.replace(//,T).replace(//,W);this.ji="qc_smsid";break;case"sms2chat":C=RB.lq;c=cQ.X.replace(//,"quickContactAlertIcon").replace(//,RB.kt);c+=D2.Z.replace(//,D2._imRowTemplate).replace(//,D2._smsRowTemplate);W=this.D;T=T.replace(//,"0").replace(//,RB.m1).replace(//,"1").replace(//,cQ.u);
T=T.replace(//,"").replace(//,RB.FI);c=c.replace(//,W).replace(//,T);this.ji="qc_imid";break;case"chat2email":C=RB.nn;c=cQ.X.replace(//,"quickContactAlertIcon").replace(//,RB.lN);c+=D2.Z.replace(//,D2._emailRowTemplate).replace(//,D2._imRowTemplate);T=this.D;Y=Y.replace(//,"0").replace(//,RB.my).replace(//,"1").replace(//,cQ.u);c=c.replace(//,Y).replace(//,T);this.ji="qc_email";break;case"sms2email":C=RB.nn;c=cQ.X.replace(//,"quickContactAlertIcon").replace(//,RB.lN);
c+=D2.Z.replace(//,D2._emailRowTemplate).replace(//,D2._smsRowTemplate);W=this.D;Y=Y.replace(//,"0").replace(//,RB.my).replace(//,"1").replace(//,cQ.u);c=c.replace(//,Y).replace(//,W);this.ji="qc_email";break;case"email2chat":C=RB.lq;c=cQ.X.replace(//,"quickContactAlertIcon").replace(//,RB.kt);c+=D2.Z.replace(//,D2._imRowTemplate).replace(//,D2._emailRowTemplate);Y=this.D;T=T.replace(//,"0").replace(//,RB.m1).replace(//,"1").replace(//,cQ.u);
T=T.replace(//,"").replace(//,RB.FI);c=c.replace(//,Y).replace(//,T);this.ji="qc_imid";break;case"email2sms":C=RB.pE;c=cQ.X.replace(//,"quickContactAlertIcon").replace(//,RB.kc);c+=D2.Z.replace(//,D2._smsRowTemplate).replace(//,D2._emailRowTemplate);Y=this.D;c=c.replace(//,Y).replace(//,W);this.ji="qc_smsid";break;}Z.A=this.kG;var
b=[Z,S];this.$$$_SimpleInputDialog(c,C,b,null,V,X);}MA(D2,Xm);D2.prototype.$$$_SimpleInputDialog=Xm;D2.prototype.d=function(B){this.$$$_SimpleInputDialog.prototype.d.call(this,B);
if(B.keyCode==KeyCodes.Enter){this.lY(B,"Continue");}return true;};D2.prototype.ju=function(){var
B=Gu(this.ji);if(B){B.focus();B.blur();B.focus();}return ;};D2.prototype.kG=function(){var
U=Gu("qc_email");var m=Gu("qc_imid");var c=Gu("qc_smsid");var
Y=Gu("qc_imtype");var i;var g;var h;var f;var k;switch(this.G){case"chat2email":i=(U.getAttribute("changed")==1)?U.value.strip():"";g=this.D;k=this.ky;break;case"sms2email":i=(U.getAttribute("changed")==1)?U.value.strip():"";h=this.D;break;case"chat2sms":h=c.value.strip();g=this.D;k=this.ky;break;case"email2sms":h=c.value.strip();i=this.D;break;case"email2chat":g=(m.getAttribute("changed")==1)?m.value.strip():"";
i=this.D;k=Y.options[Y.selectedIndex].value;break;case"sms2chat":g=(m.getAttribute("changed")==1)?m.value.strip():"";h=this.D;k=Y.options[Y.selectedIndex].value;break;}if(g){g=M2(g);}if(i){i=M2(i);}if(h){h=M2(h);}if((this.O=="email")&&((i.length==0)||(!(/^[A-Z0-9._%-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}$/gi).test(i)))){alert(RB.lN);return
true;}else{if(this.O=="chat"){if(!g){alert(RB.kt);return true;}else{if((k=="2")&&!IMObject.isBuddy(g,k)){alert(RB.Bb0);return
true;}}}else{if((this.O=="sms")&&((h.length==0)||Wy._stringHasAlphabets(h))){alert(RB.kc);return
true;}}}var f;f=getContactFromIMID(g,k);if(!f){f=getSMSSenderFromContacts(h);
}if(!f){f=EO(i);}if(!f){var j=contacts.XMLDocument;var Z=j.createElement(eP.B);if((this.jd=="email")||(this.O=="email")){UX(Z,eP.A,i);}if((this.jd=="chat")||(this.O=="chat")){UX(Z,eP.E,g);}if((this.jd=="sms")||(this.O=="sms")){UX(Z,eP.H,h);}Ut(Z);}else{var
W={};var X=false;var e;var b;var a;var V;var d;e=dc.A(f);b=Va(f);a=b.id;existingIMCloudId=b.cloud;d=eq(f,eP.H);if(!e&&((this.jd=="email")||(this.O=="email"))){W[eP.A]=i;X=true;}if(((this.jd=="chat")||(this.O=="chat"))&&(!a||(a&&(existingIMCloudId!=k)))){if(k==HG){W[eP.E]=g;}else{if(k==Ux){W[eP.P]=g;}}X=true;}if(!d&&((this.jd=="sms")||(this.O=="sms"))){W[eP.H]=h;
X=true;}if(X===true){W.id=S2(f,eP.D);if(typeof MF!=RB.Qt){MF(W);}}}var
l={};if(this.O=="chat"){l.value=g;l.cloud=k;}else{if(this.O=="email"){l.value=i;l.cloud=null;}else{if(this.O=="sms"){l.value=h;l.cloud=null;}}}l.value=this.O+":"+l.value;this.jc=l;return
false;};D2.prototype.L=function(B){B.innerHTML=""+this.F+RB.bb;};function
XR(S,B,A,J,G,H){var I=BV();var P=false;if(!I.IMEnabled.isIMEnabled()||!I.IMEnabled.isIMLoggedIn()){var
Q=EY(window,XR,S,B,A,J,G,H);I.Fj.push(Q);I.Lb();return ;}if(H=="sms"&&!hj()){var
Q=EY(window,XR,S,B,A,J,G,H);cx(Q);return ;}var T=(H=="sms")?"im:open_im_text_session":RB.Gk;
var R=(H=="sms")?RB.Sd:RB.Js;if(G=="radiobar"){P=true;G=G+":"+J;}else{var
M=I.LB.A();var O=M.C.contentWindow;if(O&&(A!=O)){O.dk(S,null,O,J,G,H);return
;}var C=M.kd(H);if((G=="autocomplete")||(C==J)){P=true;}else{dk(T,null,null,J,G);return
;}}if(P){var F=TabInfoHelper.A(true);var E=RB.xb;var K=fi(G);var
L=TabInfoHelper.C(false);if(G=="radiobar:fromEmail"){if(K==null){Nk(H,RB.BI1,R);}else{if(K.length==0){var
M=I.LB.A();if(!M.z()){var D=I.LB.G.C;dk(R,null,null,null,G);Wk("discard",D);}else{iC(G,H,K);}}else{if(L&&L.G()){Nk(H,RB.AS1,R);}else{iC(G,H,K);}}}}else{if(K==null||(L&&L.G())){dk(T,null,null,J,G);
}else{if(G=="autocomplete"||H=="sms"){I.LB.O(J,H);}iC(G,H);}}}}function
TF(C,F,E){var G;var D=(E&&E.value)?E.value:"";var B=(E&&E.cloud)?E.cloud:HG;if(D){var
H=D.split(":");G=H[0];D=H[1];}if((C=="Continue")&&F&&D&&(D.length>0)){var
D=(G=="sms")?D:Wv(D.toLowerCase(),B);LB.O(D,G);var A=F.view;A.gu(F.shortText,F.source,F.type);}}function
iC(D,G,E){var C=BV();var I=TabInfoHelper.A(true);var B=window;var
F=I?(Cq.A?I.document.body.innerText:I.document.body.textContent):"";var A;var
H;if(G=="sms"){A=Wf;H=RB.Sd;}else{if(G=="chat"){A=Qy;H=RB.Js;}}if(F.length>A){if(window.parent==C){B=C;}B.Nk(G,RB.BE2,H);
}else{if(G=="chat"){F=M2(F);}gu(F,D,G,E);}}function gu(E,O,J,D){var K=BV();var
H=K.LB.Y(J);if(H==""&&D){var I={};I.shortText=E;I.source=O;I.type=J;I.view=this;K.KU("email",J,D,I,TF);return
;}var C=HG;if(J=="chat"){var B=bD(H);H=B[0];C=B[1];}if(K.IMObject){var
L=TabInfoHelper.A(true);var A=L&&L.document.body;var G=LB.G.C;if(H.length>0){var
M;if(J=="sms"){var F=EP(H);M=K.IMObject.getSMSSessionWithView(F,O,true);}else{M=K.IMObject.getSessionWithView(H,C,O,true);}}else{M=Wy.create(null,O,true,J);}setTimeout(EY(this,Fu,G,M,E,A?L.document.body.style.fontFamily:null,A?L.document.body.style.fontSize:null),100);
return ;}}function Fu(B,A,F,C,E,D){A.setInput(F);Wk("discard",B);}function
Ta(C,D){this.W=false;this.D=C;if(D){this.k1=D;}Lang.callSuper(this,[C.element]);}MA(Ta,V5);Ta.kE=function(C,D){if(C&&D){D.v(false);D.T();}};Ta.prototype.handleCommand=function(J,K,I,G,L){var
H=false;if(this.D&&this.D.handleCommand){H=this.D.handleCommand(J,K,I,G,L);}if(!H){V5.prototype.handleCommand.apply(this,arguments);}return
H;};Ta.prototype.kC=function(){return this.W==true;};Ta.prototype.v=function(B){this.W=B;};Ta.prototype.V=function(){return
this.D?this.D.getViewTitle():"";};Ta.prototype.jk=function(){return
this.D?this.D.getBuddyName():"";
};Ta.prototype.k0=function(){return this.D.getViewState();};Ta.prototype.g=function(){return
this.D.getIcon();};Ta.prototype.A=function(){return RB.aM;};Ta.prototype.R=function(){if(this.k1){var
B=this.k1;this.k1=null;return B;}if(this.D&&this.D._type=="sms"){return"smsConversation";}return"imConversation";};Ta.prototype.o=function(){V5.prototype.I.call(this);if(this.C){this.ji();}};Ta.prototype.ji=function(){if(this.U){this.U.E();}};Ta.prototype.jr=function(){if(this.U){this.U.D();}};Ta.prototype.l5=function(){};Ta.prototype.S=function(B){V5.prototype.S.call(this,B);if(this.D){this.D.resize(B);
}};Ta.prototype.T=function(){if(this.W){NS.L(RR(0,1),RB.lJ,Ta.kE,true,this);return
;}if(this.D){this.D.close();}V5.prototype.T.call(this);};Ta.prototype.M=function(){if(this.D){this.D.activate();this.jr();}V5.prototype.M.call(this);this.li="";if(!this.D.keepFocusOnTab){SU("");}};Ta.prototype.I=function(){if(this.D){this.D.deactivate();}if(Component.A(Ox.A)){GL(null,null);}V5.prototype.I.call(this);};Ta.prototype.jw=function(B){return(this.D)?this.D.getCompArea(B):null;};Ta.prototype.l4=function(B){return(this.D)?this.D.getFontSelection(B):null;};Ta.prototype.kh=function(){return(this.D)?this.D.getID():null;
};function jL(B){this.O=B;this.W=false;Lang.callSuper(this,[B.B]);}MA(jL,V5);jL.prototype.kC=function(){return
this.W==true;};jL.prototype.v=function(B){this.W=B;};jL.prototype.handleCommand=function(J,K,I,G,L){var
H=false;if(this.O&&this.O.H){H=this.O.H(J,K,I,G,L);}if(!H){V5.prototype.handleCommand.apply(this,arguments);}return
H;};jL.prototype.V=function(){return this.O?this.O.ji():"";};jL.prototype.jk=function(){return
this.O?this.O.jk():"";};jL.prototype.g=function(){return this.O?this.O.jm():"";};jL.prototype.A=function(){return
RB.ew;};jL.prototype.R=function(){return"imOfflineMessages";};
jL.prototype.k0=function(){return this.O.jg();};jL.prototype.S=function(B){V5.prototype.S.call(this,B);if(this.O&&this.O.X){this.O.X(B);}};jL.prototype.T=function(){if(this.W){NS.L(RR(0,1),RB.lJ,Ta.kE,true,this);return
;}if(this.O){this.O.u();}V5.prototype.T.call(this);};jL.prototype.M=function(){if(t
|