|
|
<html> <head> #include "header.inc" #include "debug_js.inc"
// My local status #define MISTATUS_UNKNOWN 0x0000 #define MISTATUS_OFFLINE 0x0001 #define MISTATUS_ONLINE 0x0002 #define MISTATUS_INVISIBLE 0x0006 #define MISTATUS_BUSY 0x000A #define MISTATUS_BE_RIGHT_BACK 0x000E #define MISTATUS_IDLE 0x0012 #define MISTATUS_AWAY 0x0022 #define MISTATUS_ON_THE_PHONE 0x0032 #define MISTATUS_OUT_TO_LUNCH 0x0042 #define MISTATUS_LOCAL_FINDING_SERVER 0x0100 #define MISTATUS_LOCAL_CONNECTING_TO_SERVER 0x0200 #define MISTATUS_LOCAL_SYNCHRONIZING_WITH_SERVER 0x0300 #define MISTATUS_LOCAL_DISCONNECTING_FROM_SERVER 0x0400
<TITLE id="idTitle" name="idTitle">REMOTE_ASSISTANCE_INVITE</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="MSThemeCompatible" content="Yes"> <LINK id="UI_StyleSheet1" REL="STYLESHEET" TYPE="text/css" HREF="../../Css/rcBuddy.css" > <LINK id="UI_StyleSheet2" REL="stylesheet" TYPE="text/css" HREF="hcp://system/css/shared.css"> <OBJECT classid=clsid:B69003B3-C55E-4b48-836C-BC5946FC3B28 codeType=application/x-oleobject id=MsgrObj width=1 height=1></OBJECT>
<SCRIPT> var g_bSignIn = false;
// Timer stuff used for buffering Messenger Events var g_timeLastMessengerEventOccurred = 0;
#define MESSENGER_EVENT_CALLBACK_TIME_NEEDED 200 #define MESSENGER_EVENT_CALLBACK_TIME_LATER 1000
var g_bSetMessengerEventCallback = false; </SCRIPT>
<SCRIPT FOR="MsgrObj" EVENT="OnSignin" LANGUAGE="JavaScript"> if (arguments[0] == 0) g_bSignIn = true; </SCRIPT>
<SCRIPT FOR="MsgrObj" EVENT="OnMyStatusChange" LANGUAGE="JavaScript">
DebugTrace("OnMyStatusChange"); var state;
try { state=MsgrObj.MyStatus; if(state == MISTATUS_LOCAL_FINDING_SERVER || state == MISTATUS_LOCAL_CONNECTING_TO_SERVER || state == MISTATUS_LOCAL_SYNCHRONIZING_WITH_SERVER ) { value=MISTATUS_LOCAL_CONNECTING_TO_SERVER; idDivMSNConnected.className="MaxWidth height14 DisplayNone"; idDivMSNSetup.className="MaxWidth valignmiddle height14 DisplayNone"; idDivMSNSignIn.className="MaxWidth valigntop height14 DisplayNone"; idDivMSNSigning.className="MaxWidth height14 Display valigntop"; idEmailInput.focus(); } else if (state&MISTATUS_ONLINE && value==MISTATUS_LOCAL_CONNECTING_TO_SERVER) { value=0; idDivMSNConnected.className="MaxWidth height14 Display"; idDivMSNSetup.className="MaxWidth valignmiddle height14 DisplayNone"; idDivMSNSignIn.className="MaxWidth valigntop height14 DisplayNone"; idDivMSNSigning.className="MaxWidth height14 DisplayNone valigntop"; getContactList(); idLink1Container.innerHTML="<img class='valignbottom borderNone' src='../common/dis_arrow.bmp'></img> <Span id='idLink1' name='idLink1' class='sys-font-body' disabled>"+ L_Invite_Text + "</span>"; idEmailInput.focus(); } else if (state==MISTATUS_LOCAL_DISCONNECTING_FROM_SERVER) { g_bSignIn = false; value=0; idDivMSNConnected.className="MaxWidth height14 DisplayNone"; idDivMSNSetup.className="MaxWidth valignmiddle height14 DisplayNone"; idDivMSNSignIn.className="MaxWidth valigntop height14 Display"; idDivMSNSigning.className="MaxWidth height14 DisplayNone valigntop"; if (idDivMSNSetup.className=="MaxWidth valignmiddle height14 Display") { idLink3.focus(); } if (idDivMSNSignIn.className=="MaxWidth valigntop height14 Display") { idbtnMSNSignIn.focus(); } } else if(state==MISTATUS_OFFLINE && value==MISTATUS_LOCAL_CONNECTING_TO_SERVER) { value=0; idDivMSNConnected.className="MaxWidth height14 DisplayNone"; idDivMSNSetup.className="MaxWidth valignmiddle height14 DisplayNone"; idDivMSNSignIn.className="MaxWidth valigntop height14 Display"; idDivMSNSigning.className="MaxWidth height14 DisplayNone valigntop"; if (idDivMSNSetup.className=="MaxWidth valignmiddle height14 Display") { idLink3.focus(); } if (idDivMSNSignIn.className=="MaxWidth valigntop height14 Display") { idbtnMSNSignIn.focus(); } } else { if (0 == arguments[0]) { getContactList(); idLink1Container.innerHTML="<img class='valignbottom borderNone' src='../common/dis_arrow.bmp'></img> <Span id='idLink1' name='idLink1' class='sys-font-body' disabled>"+L_Invite_Text+"</span>"; } } } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } </SCRIPT> <SCRIPT FOR="MsgrObj" EVENT="OnContactStatusChange" LANGUAGE="JavaScript"> DebugTrace("OnContactStatusChange"); if (g_bSignIn) { HandleMessengerEvent(); } </SCRIPT>
<SCRIPT FOR="MsgrObj" EVENT="OnContactListRemove" LANGUAGE="JavaScript"> DebugTrace("OnContactListRemote"); if (0 == arguments[0] && g_bSignIn) { HandleMessengerEvent(); } </SCRIPT> <SCRIPT FOR="MsgrObj" EVENT="OnContactListAdd" LANGUAGE="JavaScript"> DebugTrace("OnContactListAdd"); if (0 == arguments[0] && g_bSignIn) { HandleMessengerEvent(); } </SCRIPT>
<Script Language="VBScript"> Function VBMessageBox(sPrompt, iBtn, sTitle) MsgBox sPrompt, iBtn, sTitle End Function </Script>
<Script id="idScript1" name="idScript1" language="javascript"> /* * Localizable constants, text and messages */
var L_NOTO_Text = "Please provide a friendly name."; //var L_MSNNOTINSTALLED_Text ="Messenger is not installed."
var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. "; var L_MSOUTLOOK_Text ="Microsoft Outlook"; var L_OUTLOOKEXPRESS_Text ="Outlook Express"; var L_OUTLOOK_Text ="Outlook"; var L_MICROSOFT_Text ="Microsoft"; var L_EXPRESS_Text ="Express"; var L_UNKNOWN_Text ="(Unknown)"; var L_BUSY_Text ="(Busy)"; var L_ONTHEPHONE_Text ="(On The Phone)"; var L_BERIGHTBACK_Text ="(Be Right Back)"; var L_AWAY_Text ="(Away)"; var L_OUTTOLUNCH_Text ="(Out To Lunch)"; var L_LOGON_Text ="Logging On..."; var L_LOGOFF_Text ="Logging Off..."; var L_SignInFailed_Text = "Sign in failed: "; var L_Invite_Text = "Invite this person"; var L_None_Text = "None"; var L_CONTINUE_Text ="Continue";
var value; var oSmapi; var flag=0; var g_wshShell = null;
function HandleMessengerEvent() { TraceFunctEnter("MessengerEventCallback"); try { var timeObj; timeObj = new Date(); // Mark the time this event got handles g_timeLastMessengerEventOccurred = timeObj.getTime(); DebugTrace("Got event at : "+g_timeLastMessengerEventOccurred); // Check to see if we can set the callback function if (!g_bSetMessengerEventCallback) { DebugTrace("Setting Callback at : "+g_timeLastMessengerEventOccurred); g_bSetMessengerEventCallback = true; setTimeout( "MessengerEventCallback()", MESSENGER_EVENT_CALLBACK_TIME_LATER); } timeObj = null; // Free the Date object } catch (e) { alert("Error :"+e.description); } TraceFunctLeave(); }
function MessengerEventCallback() { TraceFunctEnter("MessengerEventCallback"); var timeObj; var timemsNow = 0;
timeObj = new Date(); timemsNow = timeObj.getTime(); DebugTrace("In Callback at : "+timemsNow);
if (timemsNow - g_timeLastMessengerEventOccurred < MESSENGER_EVENT_CALLBACK_TIME_NEEDED) { DebugTrace("Not enough time passed since last callback!"); // The last Messenger callback happened in less that MESSENGER_EVENT_CALLBACK_TIME_NEEDED ago // Set the callback for another MESSENGER_EVENT_CALLBACK_TIME_LATER setTimeout( "MessengerEventCallback()", MESSENGER_EVENT_CALLBACK_TIME_LATER); } else { DebugTrace("Updating the list!"); // Update the UI getContactList(); idLink1Container.innerHTML="<img class='valignbottom borderNone' src='../common/dis_arrow.bmp'></img> <Span id='idLink1' name='idLink1' class='sys-font-body' disabled>"+L_Invite_Text+"</span>"; g_bSetMessengerEventCallback = false; } timeObj = null; // Free the Date object TraceFunctLeave(); }
function onLoadHelper() { TraceFunctEnter("onLoadHelper"); try { if ( "object" != typeof( parent.idframeset ) ) { // // Connection.htm needs some more time // setTimeout( "onLoad()", 5000 ); } else { onLoad(); } } catch (e) { alert(ERROR_STRING(parent.parent.L_RCCTL_Text, e)); } TraceFunctLeave(); }
function onLoad() {
TraceFunctEnter("onLoad");
//check for the status of the MSN Messenger try { parent.idframeset.rows = "0%;*";
if( null == parent.parent.OnLoad || parent.parent.g_bRAStart == null) { idBody.style.visibility = "hidden"; parent.window.navigate( "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Common/rcscreen1.htm" ); return; } // check to see if Messenger is allowed to run var wshShell = new ActiveXObject("WScript.Shell"); var iNoMessenger = 0; try { // check policy iNoMessenger = wshShell.RegRead("HKLM\\Software\\policies\\Microsoft\\Messenger\\Client\\PreventRun"); } catch (e) { // do nothing } if (iNoMessenger == 0) { try { // check local policy iNoMessenger = wshShell.RegRead("HKCU\\Software\\policies\\Microsoft\\Messenger\\Client\\PreventRun"); } catch (e) { // do nothing } } if (iNoMessenger == 1) { idDivNoMSN.className="MaxWidth height14 Display"; } else { var MSNState; MSNState = MsgrObj.MyStatus; switch(MSNState) { case MISTATUS_OFFLINE: case MISTATUS_LOCAL_DISCONNECTING_FROM_SERVER: idDivMSNConnected.className="MaxWidth height14 DisplayNone"; idDivMSNSetup.className="MaxWidth valignmiddle height14 DisplayNone"; idDivMSNSignIn.className="MaxWidth valigntop height14 Display"; idDivMSNSigning.className="MaxWidth height14 DisplayNone valigntop"; idbtnMSNSignIn.focus(); break; case MISTATUS_LOCAL_FINDING_SERVER: case MISTATUS_LOCAL_CONNECTING_TO_SERVER: case MISTATUS_LOCAL_SYNCHRONIZING_WITH_SERVER: idDivMSNConnected.className="MaxWidth height14 DisplayNone"; idDivMSNSetup.className="MaxWidth valignmiddle height14 DisplayNone"; idDivMSNSignIn.className="MaxWidth valigntop height14 DisplayNone"; idDivMSNSigning.className="MaxWidth height14 Display valigntop"; break; case MISTATUS_INVISIBLE: case MISTATUS_BUSY: case MISTATUS_BE_RIGHT_BACK: case MISTATUS_IDLE: case MISTATUS_AWAY: case MISTATUS_ON_THE_PHONE: case MISTATUS_OUT_TO_LUNCH: case MISTATUS_ONLINE: g_bSignIn = true; idDivMSNConnected.className="MaxWidth height14 Display"; idDivMSNSetup.className="MaxWidth valignmiddle height14 DisplayNone"; idDivMSNSignIn.className="MaxWidth valigntop height14 DisplayNone"; idDivMSNSigning.className="MaxWidth height14 DisplayNone valigntop"; getContactList(); break; case MISTATUS_UNKNOWN: // Doesn't know if we've MSN setup. default: idDivMSNConnected.className="MaxWidth height14 DisplayNone"; idDivMSNSetup.className="MaxWidth valignmiddle height14 Display"; idDivMSNSignIn.className="MaxWidth valigntop height14 DisplayNone"; idDivMSNSigning.className="MaxWidth height14 DisplayNone valigntop"; idLink3.focus(); break; } } } catch(error) { // Couldn't get state idDivMSNConnected.className="MaxWidth height14 DisplayNone"; idDivMSNSetup.className="MaxWidth valignmiddle height14 Display"; idDivMSNSignIn.className="MaxWidth valigntop height14 DisplayNone"; idDivMSNSigning.className="MaxWidth height14 DisplayNone valigntop"; idLink3.focus(); return; } // #ifndef RA_PROTOTYPE // try // { // oSmapi = parent.parent.GetMapi(); // oSmapi.Reload; // } // catch (error) // { // // Couldn't get mapi object; // alert(parent.parent.L_RCCTL_Text); // return; // }
// // ShowEmailDiv(); // #endif TraceFunctLeave(); }
// function ShowEmailDiv() // { // TraceFunctEnter("ShowEmailDiv"); // try // { // switch(oSmapi.SMAPIClientName) // { // default: // idEmailGif.innerHTML="<Img src='../common/generic_mail.gif'>"; // idEmail.innerHTML=oSmapi.SMAPIClientName; // break; // } // } // catch(error) // { // alert(parent.parent.L_RCCTL_Text); // return; // } // TraceFunctLeave(); // }
// Print a list of online contacts on the web page function getContactList() { TraceFunctEnter("getContactList"); var txtOnline = ""; var txtOnline1 = ""; var txtOnline2 = ""; var txtOnline3 = ""; var txtOnline4 = ""; var txtOnline5 = ""; var txtOnline6 = ""; var txtOnline7 = ""; var txtOnline8 = ""; var txtOffline = ""; var nUser = 0; var User=""; var list=""; try { // Get the contact list list = MsgrObj.MyContacts; } catch(error) { alert(parent.parent.L_RCCTL_Text); return; }
try { // Calculate the number of online contacts for (nUser=0; nUser<list.Count; nUser++) { User=list.Item(nUser); /*if (isStateOnline(User.Status)) { txtOnline += "<BR>"+getUserWithState(User); } else { txtOffline += "<BR>"+getUserWithState(User); } */ switch(User.Status) { case 0: case MISTATUS_OFFLINE: case MISTATUS_LOCAL_FINDING_SERVER: case 512: case 768: case 1024: txtOffline =getUserWithState(User)+txtOffline; break; case MISTATUS_ONLINE: txtOnline1 =getUserWithState(User)+txtOnline1; break; case MISTATUS_BUSY: txtOnline2 =getUserWithState(User)+txtOnline2; break; case MISTATUS_BE_RIGHT_BACK: txtOnline3 =getUserWithState(User)+txtOnline3; break; case MISTATUS_IDLE: txtOnline4 =getUserWithState(User)+txtOnline4; break; case MISTATUS_AWAY: txtOnline5 =getUserWithState(User)+txtOnline5; break; case MISTATUS_ON_THE_PHONE: txtOnline6 =getUserWithState(User)+txtOnline6; break; case MISTATUS_OUT_TO_LUNCH: txtOnline7 =getUserWithState(User)+txtOnline7; break; case MISTATUS_INVISIBLE: txtOnline8 =getUserWithState(User)+txtOnline8; break; } txtOnline=txtOnline1+txtOnline2+txtOnline5+txtOnline7+txtOnline6+txtOnline3+txtOnline4+txtOnline8; } if (txtOnline.length == 0) { txtOnline = "<BR><Span class='MaxWidth' id='idNoneOnline' name='idNoneOnline'><IMG alt='' src='../common/buddy_none.gif'> "+L_None_Text+"</span>"; } if (txtOffline.length == 0) { txtOffline = "<BR><Span class='MaxWidth' id='idNoneOffline' name='idNoneOffline'><IMG alt='' src='../common/buddy_none.gif'> "+L_None_Text+"</span>"; }
document.all.mContactsOnline.innerHTML = txtOnline; document.all.mContactsOffline.innerHTML = txtOffline; } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } TraceFunctLeave(); }
// Tell if the given state is an online state. /*function isStateOnline(state) { var ret; switch (state) { case 0: case MISTATUS_OFFLINE: case MISTATUS_LOCAL_FINDING_SERVER: case 512: case 768: case 1024: ret = 0; break; case MISTATUS_ONLINE: ret= 1; break; case MISTATUS_INVISIBLE: ret =8; break; case MISTATUS_BUSY: ret=2; break; case MISTATUS_BE_RIGHT_BACK: ret=3; break; case MISTATUS_IDLE: ret=4; break; case MISTATUS_AWAY: ret=5; break; case MISTATUS_ON_THE_PHONE: ret= 6; break; case MISTATUS_OUT_TO_LUNCH: ret =7 break; } return ret; }*/
function getUserWithState(pUser) { TraceFunctEnter("getUserWithState"); var ret; var state; try { state=pUser.Status; switch (state) { case 0: statusImg ="<IMG alt='' src='../common/buddy_Offline.gif'>"; statusText =L_UNKNOWN_Text; break; case MISTATUS_ONLINE: statusImg = "<IMG alt='' src='../common/buddy.gif'>"; statusText=""; break; case MISTATUS_OFFLINE: case MISTATUS_INVISIBLE: statusImg ="<IMG alt='' src='../common/buddy_Offline.gif'>"; statusText=""; break; case MISTATUS_BUSY: statusImg="<IMG alt='' src='../common/buddy_busy.gif'>"; statusText=L_BUSY_Text; break; case MISTATUS_ON_THE_PHONE: statusImg = "<IMG alt='' src='../common/buddy_busy.gif'>"; statusText=L_ONTHEPHONE_Text; break; case MISTATUS_BE_RIGHT_BACK: statusImg = "<IMG alt='' src='../common/buddy_away.gif'>"; statusText=L_BERIGHTBACK_Text; break; case MISTATUS_IDLE: case MISTATUS_AWAY: statusImg ="<IMG alt='' src='../common/buddy_away.gif'>"; statusText=L_AWAY_Text; break; case MISTATUS_OUT_TO_LUNCH: statusImg = "<IMG alt='' src='../common/buddy_away.gif'>"; statusText=L_OUTTOLUNCH_Text; break; case MISTATUS_LOCAL_FINDING_SERVER: case 512: case 768: ret = L_LOGON_Text; break; case 1024: ret = L_LOGOFF_Text; break; } var sName = EscapeName(pUser.FriendlyName); var sSigninName = pUser.SigninName; if (state==MISTATUS_OFFLINE || state==MISTATUS_INVISIBLE) { ret="<BR><Span class='MaxWidth' name='idOfflineItem' id='idOfflineItem' onclick='EnableMSNInvite(\"" + sSigninName +"\");' ondblclick='EnableMSNInvite(\"" + sSigninName + "\");DoInvite(\"" + sSigninName +"\");'> "+statusImg+" "+ sName +statusText+"</span>"; } else { ret="<BR><Span class='MaxWidth' name='idOnlineItem' id='idOnlineItem' onclick='EnableMSNInvite(\"" + sSigninName +"\");' ondblclick='EnableMSNInvite(\"" + sSigninName + "\");DoInvite(\"" + sSigninName +"\");'> "+statusImg+" "+sName+statusText+"</span>"; } return ret; } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } TraceFunctLeave(); }
function document.onclick() { TraceFunctEnter("document.onclick"); try { if (event.srcElement.id!="idLink1") { var e=new Enumerator(mContactsOffline.all.tags("span")); for (;!e.atEnd();e.moveNext()) { x = e.item(); x.className="MaxWidth"; } var e=new Enumerator(mContactsOnline.all.tags("span")); for (;!e.atEnd();e.moveNext()) { x = e.item(); x.className="MaxWidth"; } idLink1Container.innerHTML="<img class='valignbottom borderNone' src='../common/dis_arrow.bmp'></img> <Span id='idLink1' name='idLink1' class='sys-font-body' disabled>" + L_Invite_Text + "</span>"; } } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } TraceFunctLeave(); }
function EnableMSNInvite(sName) { TraceFunctEnter("EnableMSNInvite"); try { var e=new Enumerator(mContactsOffline.all.tags("span")); for (;!e.atEnd();e.moveNext()) { x = e.item(); x.className="MaxWidth"; } var e=new Enumerator(mContactsOnline.all.tags("span")); for (;!e.atEnd();e.moveNext()) { x = e.item(); x.className="MaxWidth"; } if (event.srcElement.tagName=="IMG") { event.srcElement.parentElement.className="MaxWidth sys-table-cell-bgcolor3"; } else { event.srcElement.className="MaxWidth sys-table-cell-bgcolor3"; } idLink1Container.innerHTML="<Img id='idimgLink1' name='idimgLink1' onclick='DoInvite(\"" + sName + "\");return false;' class='valignbottom borderNone' ondragstart='return false;' src='../common/green_rest_16x.bmp' onmouseover='this.style.cursor=\"hand\";document.getElementById(\"idLink1\").style.textDecorationUnderline=true' onmouseout='document.getElementById(\"idLink1\").style.textDecorationUnderline=false'></Img> <A href='' id='idLink1' name='idLink1' ondragstart='return false;' tabindex='1' class='valignmiddle sys-font-body sys-link-normal' onclick='DoInvite(\"" + sName + "\");return false;'>" +L_Invite_Text+"</A>";
event.cancelBubble=true; } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } TraceFunctLeave(); }
function EnableEmailInvite() { TraceFunctEnter("EnableEmailInvite"); try { if(idEmailInput.value.length == 0) { if (window.event.keyCode == 13) { alert(L_NOTO_Text); idEmailInput.focus(); window.event.returnValue=false; } else { idLink2Container.innerHTML = "<img class='valignbottom borderNone' src='../common/dis_arrow.bmp'></img> <Span id='idLink2' name='idLink2' class='sys-font-body' disabled>" + L_CONTINUE_Text + "</span>"; } } else { if (window.event.keyCode == 13) { GotoEmail(); window.event.returnValue=false; } else { idLink2Container.innerHTML ="<Img id='idimgLink2' name='idimgLink2' onclick='GotoEmail();return false;' class='valignbottom borderNone' ondragstart='return false;' src='../common/green_rest_16x.bmp' onmouseover='idimgLink2.style.cursor=\"hand\";document.getElementById(\"idLink2\").style.textDecorationUnderline=true;' onmouseout='document.getElementById(\"idLink2\").style.textDecorationUnderline=false;'></Img> <A href='' id='idLink2' name='idLink2' ondragstart='return false;' tabindex='4' class='valignmiddle sys-font-body sys-link-normal' onclick='GotoEmail();return false;'>" +L_CONTINUE_Text+"</A>"; } } } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } TraceFunctLeave(); }
function GotoEmail() { TraceFunctEnter("GotoEmail"); try { parent.parent.sTo = idEmailInput.value; parent.navigate("rcScreen5.htm"); } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } TraceFunctLeave(); }
function SignIn() { TraceFunctEnter("SignIn");
try { var oMsgrUI = new ActiveXObject("Messenger.MessengerApp"); oMsgrUI.LaunchLogonUI(); } catch(error) { alert(L_SignInFailed_Text + error.description); return; }
TraceFunctLeave(); }
function DoInvite(sName) { TraceFunctEnter("DoInvite"); var list, nUser; try { list = MsgrObj.MyContacts; for (nUser=0; nUser<list.Count; nUser++) { User=list.Item(nUser); if (User.SigninName==sName) { if (User.Status==MISTATUS_IDLE || User.Status==MISTATUS_AWAY) { var L_CONFIRMAWAYUSER_Text=" is away from the computer, do you still want to send the invitation?"; if (confirm(User.FriendlyName + L_CONFIRMAWAYUSER_Text)) { //alert("Start RA using IM for user: " + sName); // continue. // Fix for Bug 437527. - Check if the Messenger is ONLINE or not. // Fix for Bug 469656 - Check if the Messenger is ONLINE by doing a bitwise AND of status and MISTATUS_ONLINE. // MISTATUS_ONLINE, MISTATUS_INVISIBLE, MISTATUS_BUSY, MISTATUS_BE_RIGHT_BACK, MISTATUS_IDLE, // MISTATUS_AWAY, MISTATUS_ON_THE_PHONE, MISTATUS_OUT_TO_LUNCH all these denote ONLINE state. var EffectiveStatus = User.Status & MISTATUS_ONLINE; if(EffectiveStatus != MISTATUS_ONLINE) { var L_SessionStatusAppShutDown_Text = "The Windows Messenger server has stopped responding. Please try to connect again."; var L_RA_Text = "Remote Assistance"; VBMessageBox(L_SessionStatusAppShutDown_Text, 48, L_RA_Text); return; } } else return; } else if (User.Status==MISTATUS_OFFLINE||User.Status==MISTATUS_INVISIBLE) { var L_ConfirmOfflineUser_Text =" is offline. Do you want to send an e-mail invitation?"; if (confirm(User.FriendlyName + L_ConfirmOfflineUser_Text)) { // if (oSmapi == null) // { // oSmapi = parent.parent.GetMapi(); // } // oSmapi.ClearRecipList(); // oSmapi.AddRecipient(User.EmailAddress); parent.parent.sTo = User.FriendlyName; parent.navigate("rcScreen5.htm"); } return; } else { //alert("Start RA using IM for user: " + sName); } break; } } } catch(error) { alert(parent.parent.L_RCCTL_Text); return; }
if (nUser >= list.Count) { alert(parent.parent.L_RCCTL_Text); return; }
// If the process goes to here, we know we've found the User object. // invite the user try { #if 0 // 1. might need to filter out NONE-.NET service users if (User.ServiceId != "{9b017612-c9f1-11d2-8d9f-0000f875c541}") { var UseExchangeIM = 0; if (g_wshShell == null) g_wshShell = new ActiveXObject("WScript.Shell");
try { UseExchangeIM = g_wshShell.RegRead("HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\UseExchangeIM"); } catch(e) {} // legal failure; do nothing if ((UseExchangeIM & 0x1) != 1) // filter out none .NET buddy invitation { var L_NoExchangeIM_Text = "Your corporate network configuration does not support using Windows Messenger with Remote Assistance."; var L_RA_Text = "Remote Assistance";
VBMessageBox(L_NoExchangeIM_Text, 48, L_RA_Text); return; } } #endif var vArgs = new Array(2);
oSession = new ActiveXObject("rcbdyctl.IMSession"); // vArgs[0] = oSession; // vArgs[1] = User; // window.showModalDialog("rcInviteStatus.htm", // vArgs, "DialogWidth:405px;DialogHeight:168px;Status:no;"); oSession.HSC_Invite(User); oSession = null; } catch (e) { var L_IMSessionFailed_Text = "Send Invitation failed: "; alert(L_IMSessionFailed_Text + e.description); }
TraceFunctLeave(); }
// function EmailChange() // { // TraceFunctEnter("EmailChange"); // try // { // if (oSmapi == null) // { // oSmapi = parent.parent.GetMapi(); // } // oSmapi.ClearRecipList(); // oSmapi.AddRecipient(idEmailInput.value); // } // catch(error) // { // alert(parent.parent.L_RCCTL_Text); // return; // } // TraceFunctLeave(); // } // function DoAddressBox() // { // TraceFunctEnter("DoAddressBox"); // var i = 0; // var s = ""; // try // { // if (oSmapi == null) // { // oSmapi = parent.parent.GetMapi(); // } // oSmapi.Logon();
// oSmapi.OpenAddressBox(); // for (i =0; i< oSmapi.Recipients.Count ; i++) // { // if (i>0) // { // s += "; "; // } // s += oSmapi.Recipients.item(i).Name; // } // idEmailInput.focus(); // idEmailInput.value = s; // if (idEmailInput.value!="") // { // idLink2Container.innerHTML = "<A class='valignmiddle sys-font-body sys-link-normal' ondragstart='return false;' id='idLink2' name='idLink2' href='' onclick='GotoEmail();return false;' tabindex='4'><img class='valignbottom borderNone' src='../common/green_rest_16x.bmp'></img> " + L_CONTINUE_Text + "</A>"; // } // } // catch(error) // { // if (parent.parent.L_RCCTL_Text != null) // user switch to another page // { // alert(parent.parent.L_RCCTL_Text); // } // return; // } // TraceFunctLeave(); // }
/* * NOTE: This function should always be the last function defined for * localization reasons. If you have script with localizable strings * defined below this routine, then it would not get localized */ function EscapeName( szName ) { TraceFunctEnter(""); try { var szTmp = new String( szName ); var re = /\'/g; var szEscapedName = szTmp.replace( re, "′" ); re = /\"/g; szEscapedName = szEscapedName.replace( re, "″" ); szEscapedName = parent.parent.EscapedName( szName ); } catch(error) { alert(parent.parent.L_RCCTL_Text); return; } TraceFunctLeave(); return szEscapedName; } </Script> <Style> .Height2 { height:20px; } .height14 { height:150px; } .Width9 { width:80%; } .width16 { width:20%; } .PositionR { position:relative; } .ZIndex1 { Z-index:1; } .OverflowyScroll { overflow-y:auto; } .cellpadding3 { padding-right:0px; } </Style> </head>
<Body id="idBody" name="idBody" class="margin sys-rhp-bgcolor" scroll="auto" onload="onLoadHelper();"> <Table id="idTableFrame" name="idTableFrame" cellpadding="16px" cellspacing="0" class="Maxwidth"> <TR> <TD> <Table id="RA_Invite" name="RA_Invite" border="0" cellspacing="0" cellpadding="0" class="MaxWidth"> <TR> <TD id="idTd1" name="idTd1"> <Span id="idMainTitle" name="idMainTitle" class="sys-font-heading3 sys-rhp-color-title">Remote Assistance</span> </TD> </TR> <TR> <TD class="height9"> </TD> </TR> <TR> <TD id="idTd2" name="idTd2"> <span id="idSubTitle" name="idSubTitle" class="sys-font-body-bold sys-color-body">Pick how you want to contact your assistant</span> </TD> </TR> <TR> <TD class="height4"> </TD> </TR> <TR> <TD id="idTd3" name="idTd3"> <span id="idMethod1" name="idMethod1" class="sys-font-body-bold sys-color-body"><span id="idMethod1Status">Use Windows Messenger ...</span></span> </TD> </TR> <TR> <TD class="Height5"> </TD> </TR> <TR> <TD> <table border="0" cellspacing="0" cellpadding="0" class="Maxwidth sys-toppane-color-border sys-table-cell-bgcolor5 bordertype1"> <TR> <TD id="MSNCell1" name="MSNCell1" align="center" class="valigntop sys-table-cell-bgcolor3 width1"> <BR> <Img id="idimg1" name="idimg1" src="../common/messenger_big.gif"></Img> <BR> <span id="idMSN" name="idMSN" class="sys-font-body sys-color-body">Windows Messenger<BR></span> <BR> </TD> <TD> <!--Already signed into MSN --> <Div id="idDivMSNConnected" name="idDivMSNConnected" class="MaxWidth height14 DisplayNone" > <Table cellpadding="6px" cellspacing="0" border="0" class="MaxLayout PositionR ZIndex1"> <TR> <TD> <table cellspacing="6px" cellpadding="0" border="0" class="MaxWidth"> <TR> <TD id="idTd4" name="idTd4" class="cellpadding3"> <Div id="idMSNList" name="idMSNList" class=" sys-toppane-color-border bordertype1 sys-table-cell-bgcolor1 OverflowyScroll sys-font-body height1"> <Span id="idOnline" name="idOnline" class="sys-font-body-bold sys-color-body">Online</Span> <Span id="mContactsOnline" class="sys-font-body sys-color-body"></span><BR> <span id="idOffline" name="idOffline" class="sys-font-body-bold sys-color-body">Not online</Span> <span id="mContactsOffline" class="sys-font-body sys-color-body"></Span></BR> </Div> </TD> </TR> <TR> <TD id="idTd15" name="idTd15" nowrap> <Span id="idLink1Container" name="idLink1Container"> <img id="idimg2" name="idimg2" class="valignbottom borderNone" src="../common/dis_arrow.bmp"></img> <Span id="idLink1" name="idLink1" class="sys-font-body" disabled> Invite this person</span> </Span> </TD> </TR> </table> </TD> </TR> </Table> </Div> <!--Setup for MSN --> <Div id="idDivMSNSetup" name="idDivMSNSetup" class="MaxWidth valignmiddle height14 DisplayNone"> <Table cellpadding="16px" cellspacing="0" border="0" class="MaxLayout PositionR ZIndex1"> <TR> <TD id="idTd5" name="idTd5" class="valigntop"> <span id="idText1" name="idText" class="sys-font-body-bold sys-color-body">Windows Messenger is not installed</Span> <P id="idP1" name="idP1"> <A href="http://messenger.microsoft.com/" name="idLink3" id="idLink3" class="sys-font-body sys-link-normal" target="_blank" tabindex="1">Download Windows Messenger</A> </TD> </TR> </Table> </Div> <!--Sign-in for MSN --> <Div id="idDivMSNSignIn" name="idDivMSNSignIn" class="MaxWidth valigntop height14 DisplayNone"> <table cellpadding="16px" cellspacing="0" border="0" class="MaxLayout PositionR Zindex1"> <TR> <TD id="idTd6" name="idTd6" class="valignTop"> <Span id="Text1" name="Text1" class="sys-font-body sys-color-body">To send an invitation to a Windows Messenger contact, you must sign in.</span> <P id="idP2" name="idP2"> <Button id="idbtnMSNSignIn" name="idbtnMSNSignIn" class="sys-font-body sys-color-body" onclick="SignIn();" tabindex="1"> Sign In </Button> </TD> </TR> </Table> </Div> <!--Signing intoMSN --> <Div id="idDivMSNSigning" name="idDivMSNSigning" class="MaxWidth height14 DisplayNone valigntop" > <Table cellpadding="16px" cellspacing="0" border="0" class="MaxLayout PositionR ZIndex1"> <TR> <TD class="width16"> </TD> <TD class="valignTop"> <img id="idimg6" name="idimg6" src="../common/logon_anim.gif"></img> <P id="idP3" name="idP3"> <Span id="idMSNSigning" name="idMSNSigning" class="MaxWidth sys-font-body-bold sys-color-body " > Signing in .... </span> </TD> </TR> </Table> </Div> <!--No Messenger allowed --> <Div id="idDivNoMSN" name="idDivNoMSN" class="MaxWidth height14 DisplayNone valigntop" > <Table cellpadding="16px" cellspacing="0" border="0" class="MaxLayout PositionR ZIndex1"> <TR> <TD class="width16"> </TD> <TD class="valignTop"> <P id="idP4" name="idP4"> <Span id="idNoMSN" name="idNoMSN" class="MaxWidth sys-font-body-bold sys-color-body " > An administrator has denied permission to use Windows Messenger. For information, contact your administrator. </span> </TD> </TR> </Table> </Div> </TD> </TR> </table> </TD> </TR> <TR> <TD class="height7"> </TD> </TR> <TR> <TD id="idTd8" name="idTd8"> <span id="idMethod2" name="idMethod2" class="sys-font-body-bold sys-color-body">or prepare an e-mail invitation</span> </TD> </TR>
<TR> <TD class="Height5"> </TD> </TR> <TR> <TD> <table border="0" cellspacing="0" cellpadding="0" class="Maxwidth sys-toppane-color-border sys-table-cell-bgcolor5 bordertype1"> <TR> <TD id="EmailCell1" name="EmailCell1" align="center" class="sys-table-cell-bgcolor3 valigntop width1" nowrap> <BR> <Span id="idEmailGif" name="idEmailGif"><Img src='../common/generic_mail.gif'></span> <BR> <span id="idEmail" name="idEmail" class="sys-font-body sys-color-body">E-mail</span> <BR><BR> </TD> <TD class="height6"> <!-- Email client already setup --> <Div id="idDivEmailConnected" name="idDivEmailConnected" class="MaxLayout height1 valignmiddle"> <Table cellpadding="6px" cellspacing="0" border="0" class="MaxLayout PositionR ZIndex1"> <TR> <TD> <table cellspacing="6px" cellpadding="0" border="0" class="MaxLayout"> <TR> <TD id="idSpanTd" name="idSpanTd" colspan=3> <Span id="idSpanTitle" name="idSpanTitle" class="sys-font-body sys-color-body">Type your assistant's first name:</Span> </TD> </TR> <TR> <TD id="idInputCell" name="idInputCell" class="Height2 width9"> <Input id="idEmailInput" name="idEmailInput" type="text" class="valignTop MaxWidth" onpaste="EnableEmailInvite();" onkeyup="EnableEmailInvite();" tabindex="2"> </TD> </TR> <TR> <TD id="idTd10" name="idTd10" class="valigntop" nowrap colspan=3> <Span id="idLink2Container" name="idLink2Container"> <img id="idimg4" name="idimg4" class="valignbottom borderNone" src="../common/dis_arrow.bmp"></img> <Span id="idLink2" name="idLink2" class="sys-font-body" disabled> Continue</span> </span> </TD> </TR> </table> </TD> </TR> </Table> </Div> </TD> </TR> </table> </TD> </TR> <TR> <TD class="Height10"> </TD> </TR> <TR> <TD class="Height10"> </TD> </TR> <TR> <TD id="idTd13" name="idTd13"> <Img id="idimg5" name="idimg5" onclick="parent.window.navigate('rcScreen8.htm');return false;" class="valignbottom borderNone" ondragstart="return false;" src="../common/green_rest_16x.bmp" onmouseover="this.style.cursor='hand';document.getElementById('idLinkMethod3').style.textDecorationUnderline=true" onmouseout="document.getElementById('idLinkMethod3').style.textDecorationUnderline=false"> </Img> <A href="" id="idLinkMethod3" name="idLinkMethod3" ondragstart="return false;" tabindex="5" class="valignmiddle sys-font-body sys-link-normal" onclick="parent.window.navigate('rcScreen8.htm');return false;"> Save invitation as a file (Advanced) </A> </TD> </TR> </Table> </TD> </TR> </Table> </Body> </HTML>
|