Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2506 lines
83 KiB

<HTML>
<HEAD>
#include "header.inc"
#include "debug_decl.inc"
#include "debug_js.inc"
#include "common.inc"
#include "constants.inc"
<TITLE id="idTitle" name="idTitle">Remote Assistance</TITLE>
<meta http-equiv="MSThemeCompatible" content="Yes">
<LINK id="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
<LINK id="UI_StyleSheet1" REL="stylesheet" TYPE="text/css" HREF="hcp://system/css/shared.css">
<script id="LocalScript" name="LocalScript" language="JavaScript">
/*
* Localizable constants, text and messages
*/
var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
var L_ConnectTo_Text = "Attempting to connect to ";
var L_ConnectToURA_Text = "Starting Remote Assistance";
var L_ConnectionSuccess_Text = "You are now connected to ";
var L_ERRRDSCLIENT_Text = c_szError2;
var L_ERRRDSCLIENTHOST_Text = c_szError2;
var L_ERRPWD_Text = "The password you entered is incorrect. Please try again. ";
var L_ERRGETRDC_Text = c_szError2;
var L_ERRBINDINGEVTS_Text = c_szError2;
var L_ERRCONNECTION_Text = "Cannot connect to the other computer. Please try again.";
var L_EXPIRYMESSAGE_Text = "This invitation seems to be expired. You can attempt to contact ";
var L_EXPIRYMESSAGE1_Text = " anyway. If you cannot establish a connection, please contact ";
var L_DOYOUCONNECT1_Text = "Do you want to connect to ";
var L_DOYOUCONNECT2_Text = "'s computer now?";
var L_NOVICESCOMPUTER_Text = "'s computer.";
var L_PASSWORD_Text = "Password:";
var L_CONTACT_Text = "If you do not know the password, contact ";
//
// Error codes on Disconnect
//
var L_SAFError0_Text = "Connection successfully established."; // SAFERROR_NOERROR
var L_SAFError1_Text = "Remote Assistance connection disconnected. Please try again."; // SAFERROR_NOINFO
var L_SAFError2_Text = "Remote Assistance connection disconnected. Please try again.";
var L_SAFError3_Text = "Remote Assistance connection disconnected. Please try again."; // SAFERROR_LOCALNOTERROR
var L_SAFError4_Text = " has closed connection to your computer."; // SAFERROR_REMOTEBYUSER
var L_SAFError5_Text = "Remote Assistance connection could not be established because the invitation has either expired or was canceled."; // SAFERROR_BYSERVER
var L_SAFError6_Text = "A Remote Assistance connection could not be established because the DNS name of the remote computer could not be resolved."; // SAFERROR_DNSLOOKUPFAILED
var L_SAFError7_Text = "Remote Assistance connection could not be established because your computer is out of memory. Close some programs, and try again."; // SAFERROR_OUTOFMEMORY
var L_SAFError8_Text = "Remote Assistance connection could not be established because of a network connection timeout. Please try again."; // SAFERROR_CONNECTIONTIMEDOUT
var L_SAFError9_Text = "A Remote Assistance connection could not be established. You may want to check for network issues or determine if the invitation expired or was cancelled by the person who sent it."; // SAFERROR_SOCKETCONNECTFAILED
var L_SAFError10_Text = "Remote Assistance connection could not be established. Please try again.";
var L_SAFError11_Text = "Remote Assistance connection could not be established because the remote host name could not be resolved. Please try again."; // SAFERROR_HOSTNOTFOUND
var L_SAFError12_Text = "Remote Assistance is unable to send the connection request. Please try again."; // SAFERROR_WINSOCKSENDFAILED
var L_SAFError13_Text = "Remote Assistance connection could not be established. Please try again.";
var L_SAFError14_Text = "Remote Assistance cannot connect because the IP address of the remote computer is not valid."; // SAFERROR_INVALIDIPADDR
var L_SAFError15_Text = "Remote Assistance is unable to send the connection request. Please try again."; // SAFERROR_SOCKETRECVFAILED
var L_SAFError16_Text = "Remote Assistance connection disconnected. ";
var L_SAFError17_Text = "Remote Assistance connection disconnected. ";
var L_SAFError18_Text = "Remote Assistance stopped responding because the invitatation is invalid. Please ask the person who sent you the invitation to send you a new Remote Assistance invitation."; // SAFERROR_INVALIDENCRYPTION
var L_SAFError19_Text = "Remote Assistance connection disconnected. ";
var L_SAFError20_Text = "Remote Assistance disconnected because the name of the computer could not be resolved. The DNS server may have failed. Please try again."; // SAFERROR_GETHOSTBYNAMEFAILED
var L_SAFError21_Text = "A Remote Assistance connection could not be made because there is a licensing error.";// SAFERROR_LICENSINGFAILED
var L_SAFError22_Text = c_szError1; // SAFERROR_ENCRYPTIONERROR
var L_SAFError23_Text = c_szError1; // SAFERROR_DECRYPTIONERROR
var L_SAFError24_Text = "Remote Assistance connection could not be established because the connection request data is invalid. The operating system version on your computer may not be compatible with that of the operating system version on the computer of "; // SAFERROR_INVALIDPARAMETERSTRING
var L_SAFError25_Text = c_szError1; // SAFERROR_HELPSESSIONNOTFOUND
var L_SAFError26_Text = "Remote Assistance cannot connect because the password is not valid. Please check the password and try again."; // SAFERROR_INVALIDPASSWORD
var L_SAFError27_Text = "Remote Assistance cannot connect because this invitation has expired. Please try again. "; // SAFERROR_HELPSESSIONEXPIRED
var L_SAFError28_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_CANTOPENRESOLVER
var L_SAFError29_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_UNKNOWNSESSMGRERROR
var L_SAFError30_Text = "Remote Assistance connection cannot be established. Please try to connect again."; // SAFERROR_CANTFORMLINKTOUSERSESSION
var L_SAFError31_Text = "Remote Assistance connection could not be established because novice's screen could not be displayed. Please try to connect again."; // SAFERROR_SHADOWFAILED
var L_SAFError32_Text = "Remote Assistance cannot connect because of a protocol failure. Please try again."; // SAFERROR_RCPROTOCOLERROR
var L_SAFError33_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_RCUNKNOWNERROR
var L_SAFError34_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_INTERNALERROR
var L_SAFError35_Text = "Novice is responding..."; // SAFERROR_HELPEERESPONSEPENDING
var L_SAFError36_Text = "Novice has accepted your connection request."; // SAFERROR_HELPEESAIDYES
var L_SAFError37_Text = "Remote Assistance cannot connect to the remote computer because another Remote Assistance session is currently in progress. For more information, contact the person who sent you the invitation or try again later."; // SAFERROR_HELPEEALREADYBEINGHELPED
var L_SAFError38_Text = "Remote Assistance cannot connect because the novice is currently being helped by an expert. Only one expert can provide help at a time."; // SAFERROR_HELPEECONSIDERINGHELP
var L_SAFError39_Text = "Remote Assistance cannot connect because the novice is not logged on."; // SAFERROR_HELPEENOTFOUND
var L_SAFError40_Text = "Remote Assistance cannot connect because the request timed out. The novice did not respond within the given time frame."; // SAFERROR_HELPEENEVERRESPONDED - TODO
var L_SAFError41_Text = "Remote Assistance cannot connect because "; // SAFERROR_HELPEESAIDNO
var L_SAFError41b_Text = " denied the request for help. "; // SAFERROR_HELPEESAIDNO
var L_SAFError42_Text = "Remote Assistance cannot connect because the help user account on novice's computer has changed."; // SAFERROR_HELPSESSIONACCESSDENIED
var L_SAFError43_Text = "Remote Assistance cannot connect because the remote user is not currently logged on."; // SAFERROR_USERNOTFOUND
var L_SAFError44_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_SESSMGRERRORNOTINIT
var L_SAFError45_Text = "You cannot connect to your local logon session. Please try connecting from another computer or login session."; // SAFERROR_SELFHELPNOTSUPPORTED
var L_SAFError47_Text = "Remote Assistance cannot connect because of incompatible operating system versions."; // SAFERROR_INCOMPATIBLEVERSION
var L_SAFError48_Text = "Remote Assistance session is not connected."; // SAFERROR_SESSIONNOTCONNECTED
var L_SAFError50_Text = "Remote Assistance connection disconnected because the remote computer shutdown."; //SAFERROR_SYSTEMSHUTDOWN
var L_SAFError51_Text = "Remote Assistance listen mode has stopped."; // SAFERROR_STOPLISTENBYUSER
var L_SAFError52_Text = "Remote Assistance reverse connection could not be established due to network failure."; // SAFERROR_WINSOCK_FAILED
var L_SAFError53_Text = "Remote Assistance connection could not be established because the public key provided in this connection request did not match."; // SAFERROR_MISMATCHPARMS
var L_EXPIRED_Text= "Expired";
var SAFDisconnectError = new Array(54);
SAFDisconnectError[0] = L_SAFError0_Text;
SAFDisconnectError[1] = L_SAFError1_Text;
SAFDisconnectError[2] = L_SAFError2_Text;
SAFDisconnectError[3] = L_SAFError3_Text;
SAFDisconnectError[4] = L_SAFError4_Text;
SAFDisconnectError[5] = L_SAFError5_Text;
SAFDisconnectError[6] = L_SAFError6_Text;
SAFDisconnectError[7] = L_SAFError7_Text;
SAFDisconnectError[8] = L_SAFError8_Text;
SAFDisconnectError[9] = L_SAFError9_Text;
SAFDisconnectError[10] = L_SAFError10_Text;
SAFDisconnectError[11] = L_SAFError11_Text;
SAFDisconnectError[12] = L_SAFError12_Text;
SAFDisconnectError[13] = L_SAFError13_Text;
SAFDisconnectError[14] = L_SAFError14_Text;
SAFDisconnectError[15] = L_SAFError15_Text;
SAFDisconnectError[16] = L_SAFError16_Text;
SAFDisconnectError[17] = L_SAFError17_Text;
SAFDisconnectError[18] = L_SAFError18_Text;
SAFDisconnectError[19] = L_SAFError19_Text;
SAFDisconnectError[20] = L_SAFError20_Text;
SAFDisconnectError[21] = L_SAFError21_Text;
SAFDisconnectError[22] = L_SAFError22_Text;
SAFDisconnectError[23] = L_SAFError23_Text;
SAFDisconnectError[24] = L_SAFError24_Text;
SAFDisconnectError[25] = L_SAFError25_Text;
SAFDisconnectError[26] = L_SAFError26_Text;
SAFDisconnectError[27] = L_SAFError27_Text;
SAFDisconnectError[28] = L_SAFError28_Text;
SAFDisconnectError[29] = L_SAFError29_Text;
SAFDisconnectError[30] = L_SAFError30_Text;
SAFDisconnectError[31] = L_SAFError31_Text;
SAFDisconnectError[32] = L_SAFError32_Text;
SAFDisconnectError[33] = L_SAFError33_Text;
SAFDisconnectError[34] = L_SAFError34_Text;
SAFDisconnectError[35] = L_SAFError35_Text;
SAFDisconnectError[36] = L_SAFError36_Text;
SAFDisconnectError[37] = L_SAFError37_Text;
SAFDisconnectError[38] = L_SAFError38_Text;
SAFDisconnectError[39] = L_SAFError39_Text;
SAFDisconnectError[40] = L_SAFError40_Text;
SAFDisconnectError[41] = L_SAFError41_Text;
SAFDisconnectError[42] = L_SAFError42_Text;
SAFDisconnectError[43] = L_SAFError43_Text;
SAFDisconnectError[44] = L_SAFError44_Text;
SAFDisconnectError[45] = L_SAFError45_Text;
SAFDisconnectError[47] = L_SAFError47_Text;
SAFDisconnectError[48] = L_SAFError48_Text;
SAFDisconnectError[50] = L_SAFError50_Text;
SAFDisconnectError[51] = L_SAFError51_Text;
SAFDisconnectError[52] = L_SAFError52_Text;
SAFDisconnectError[53] = L_SAFError53_Text;
//
// Globals
//
//
// Progress bar stuff
//
var g_iTimerID = -1;
//
// HelpCenter context
//
var idCtx = parent.idCtx;
//
// SAF Class Factory object
//
var oSAFClassFactory = parent.oSAFClassFactory;
//
// SAFRemoteAssistanceHelper object stores the state of the Helper UI
//
var g_oSAFRemoteAssistanceHelper = parent.g_oSAFRemoteAssistanceHelper;
//
// Show or Hide Progess bar
//
var g_bProgessBar = false;
//
// IM Session
//
var g_oSession = null;
//
// Transition flag
//
var g_bTransitioned = false;
/*++
Control handling routines
--*/
#define RA_IM_COMPLETE 0x1
#define RA_IM_WAITFORCONNECT 0x2
#define RA_IM_CONNECTTOSERVER 0x3
#define RA_IM_APPSHUTDOWN 0x4
#define RA_IM_SENDINVITE 0x5
#define RA_IM_ACCEPTED 0x6
#define RA_IM_DECLINED 0x7
#define RA_IM_NOAPP 0x8
#define RA_IM_TERMINATED 0x9
#define RA_IM_CANCELLED 0xA
#define RA_IM_UNLOCK_WAIT 0xB
#define RA_IM_UNLOCK_FAILED 0xC
#define RA_IM_UNLOCK_SUCCEED 0xD
#define RA_IM_UNLOCK_TIMEOUT 0xE
#define RA_IM_CONNECTTOEXPERT 0xF
#define RA_IM_EXPERT_TICKET_OUT 0x10
#define RA_IM_FAILED 0x11
var g_bReverseConnectReady = false;
//
// Security Check
//
function DoLoad()
{
MAC_IF_DIRECTLAUNCH_CLIENT
{
idBody.style.visibility = "hidden";
alert( L_ERRACCESSDENIED_Text );
return;
}
}
function DoUnLoad()
{
TraceFunctEnter("DoUnLoad");
try
{
DebugTrace("Calling parent.RCDisconnect...");
parent.RCDisconnect();
DebugTrace("parent.RCDisconnect completed successfully.");
try
{
if (g_oSession) // Error happens, need to notify the waiting party.
{
DebugTrace("Calling g_oSession.Notify with Argument=RA_IM_TERMINATED");
g_oSession.Notify(RA_IM_TERMINATED);
DebugTrace("g_oSession.Notify completed successfully");
g_oSession.UninitObjects();
g_oSession = null;
}
}
catch(e)
{
// do nothing.
}
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
//
// InitializeRAClient: Stuff done when the RCTool page is loaded in the helpctr
//
function InitializeRAClient()
{
MAC_IF_DIRECTLAUNCH_CLIENT
{
return;
}
try
{
//
// Initialize tracing
//
InitTrace();
TraceFunctEnter("InitializeRAClient");
#ifdef _STRUCT_ERR
var szRetVal = null;
var bRetVal = true;
#endif
DebugTrace("Setting size of idRemoteControlObject to be 1x1");
idRemoteControlObject.style.width = "1px";
idRemoteControlObject.style.height = "1px";
//
// Set the SAF Factory object
//
g_oSAFRemoteAssistanceHelper.m_oSAFClassFactory = oSAFClassFactory;
//
// Parse the document URL to Get the location of the Incident file
//
#ifndef _STRUCT_ERR
parent.ParseURL();
#else
szRetVal = parent.ParseURL();
if( null == szRetVal )
{
//
// This is the end of world. So perish
//
oSAFClassFactory.Close();
return;
}
#endif
if ( true == g_oSAFRemoteAssistanceHelper.m_bIsIM )
{
DebugTrace("g_oSAFRemoteAssistanceHelper.m_bIsIM is true");
// goto ticket switch page..
#ifdef _PROGRESS
parent.idFrameSet3.rows="0%,0%,*";
#endif
DebugTrace("Calling Helper_InitIMScreen2");
Helper_InitIMScreen2();
TraceFunctLeave();
return;
}
if( true == g_oSAFRemoteAssistanceHelper.m_bListen )
{
DebugTrace("g_oSAFRemoteAssistanceHelper.m_bListen is true");
//
// Listen mode
//
//idLayer2.style.visibility = "hidden";
#ifdef _PROGRESS
parent.idFrameSet3.rows="0%,0%,*";
#endif
idLayer2.className="PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
idLayer1.style.visibility = "visible";
idLayer1.className="styLayer1 Display";
}
else
{
DebugTrace("g_oSAFRemoteAssistanceHelper.m_bListen is false");
//
// Normal mode
//
//
// Create a SAF Incident object and populate the incident object from the XML
// representation of the incident (call LoadXML)
//
DebugTrace("Calling LoadIncidentFromFile");
if (parent.LoadIncidentFromFile() == null)
{
#ifndef _STRUCT_ERR
btnYES.disabled = true;
return;
#else
//
// This is the end of world. So perish
//
oSAFClassFactory.Close();
return;
#endif
}
//
// Depending on configuration, show the 1st screen or not
//
if( (true == g_oSAFRemoteAssistanceHelper.m_bNoPrompt ) || ( true == g_oSAFRemoteAssistanceHelper.m_bURA ))
{
//
// This assumes ticket to be in clear text
//
DebugTrace("true = g_oSAFRemoteAssistanceHelper.m_bNoPrompt || true = g_oSAFRemoteAssistanceHelper.m_bURA ");
g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_szRCTicketEncrypted;
//
// Straightaway go to the send screen
//
DebugTrace("Calling Helper_InitScreen2");
#ifdef _PROGRESS
parent.idFrameSet3.rows="0%,0%,*";
#endif
#ifdef _STRUCT_ERR
bRetVal = Helper_InitScreen2();
if( -1 == bRetVal)
{
//
// End of the world. Abort
//
oSAFClassFactory.Close();
return false;
}
else if( false == bRetVal)
{
return true;
}
#else
Helper_InitScreen2();
#endif
}
else
{
//
// Set the UI elements to be displayed from the data
// contained in the incident object
//
idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
btnYES.disabled = true;
//idPasswordBox.disabled = true;
var szTmp = g_oSAFRemoteAssistanceHelper.m_szUserName;
if( szTmp.length < 20 )
{
window.S1TD1TR1EntryPoint.innerText = szTmp;
}
else
{
window.S1TD1TR1EntryPoint.innerText = szTmp.slice(0, 20) + "...";
g_oSAFRemoteAssistanceHelper.m_szUserName = window.S1TD1TR1EntryPoint.innerText;
}
// window.idSender1.innerText=window.S1TD1TR1EntryPoint.innerText;
var szAskMsg = null;
if( false == g_oSAFRemoteAssistanceHelper.m_bExpired )
{
window.idInviteExpires.innerText = g_oSAFRemoteAssistanceHelper.m_szExpiryTime;
}
else
{
window.S0TD1TR2EntryPoint.innerHTML="&nbsp;&nbsp;"+L_EXPIRED_Text+"&nbsp;";
window.idInviteExpires.innerHTML = g_oSAFRemoteAssistanceHelper.m_szExpiryTime;
szAskMsg = L_EXPIRYMESSAGE_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_EXPIRYMESSAGE1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName;
}
if( null != szAskMsg )
{
window.idRow5.innerHTML = szAskMsg + ".<BR><BR>" + L_DOYOUCONNECT1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_DOYOUCONNECT2_Text + "<P>";
}
else
{
window.idRow5.innerHTML = L_DOYOUCONNECT1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_DOYOUCONNECT2_Text+"<P>";
}
//
// Check to see if we need to ask for password
//
if(true == g_oSAFRemoteAssistanceHelper.m_oCurrentIncident.RCTicketEncrypted)
{
//
// RCTicket is encrypted. We need to ask for the password
//
/* addition of row for Password */
var oRow=EntryPoint.insertRow(3);
oRow.name="TR3EntryPoint";
oRow.id="TR3EntryPoint";
oRow.insertCell(0);
oRow.cells(0).name="TD0TR3EntryPoint";
oRow.cells(0).id="TD0TR3EntryPoint";
oRow.cells(0).className="sys-table-cell-bgcolor3 width3";
oRow.cells(0).innerHTML="<Div align='right' class='sys-font-body sys-color-body MaxLayout' id='idRow41' name='idRow41'><BR id='idBr'>" + L_PASSWORD_Text + "&nbsp;&nbsp;</Div>";
oRow.insertCell(1);
oRow.cells(1).name="TD1TR3EntryPoint";
oRow.cells(1).id="TD1TR3EntryPoint";
oRow.cells(1).className="sys-inlineform-bgcolor1 Maxwidth";
oRow.cells(1).innerHTML="<table id='T0TD1TR3EntryPoint' name='T0TD1TR3EntryPoint' border='0' cellspacing='6px' cellpadding='0px' class='MaxLayout'><tr id='idtr1'><td id='idtr1td1'><input type='password' id='idPasswordBox' name='idPasswordBox' class='MaxWidth' onkeypress='Helper_PasswordSet();' onkeyup='OnPassWrdKeyUp();' onpaste='Helper_PasswordSet();' tabindex=1></td></tr><tr id='idtr2'><td id='idtr2td1'><span id='idRow4' name='idRow4' class='sys-font-body sys-color-body'>"+ L_CONTACT_Text + "<span id='idSender1' name='idSender1'>&nbsp;</span>.</span></td></tr></table>";
/********************************/
window.idSender1.innerText=window.S1TD1TR1EntryPoint.innerText;
idPasswordBox.disabled = false;
if( false == g_oSAFRemoteAssistanceHelper.m_bExpired )
{
DebugTrace("Calling setWindowDimensions with arguments: " + idCtx.x + "," + idCtx.y + ",410,293");
idCtx.setWindowDimensions(idCtx.x,idCtx.y,425,280);
}
else
{
DebugTrace("Calling setWindowDimensions with arguments: " + idCtx.x + "," + idCtx.y + ",410, 333");
idCtx.setWindowDimensions(idCtx.x,idCtx.y,425,320);
}
window.setTimeout('idPasswordBox.focus()',500);
}
else
{
//
// RCTicket is not encrypted. Dont need to ask for the password
//
//
// Delete the password row
//
//EntryPoint.deleteRow(3);
if( true == g_oSAFRemoteAssistanceHelper.m_bExpired )
{
idCtx.setWindowDimensions(100,100,425,270);
}
btnYES.disabled = false;
btnYES.focus();
//
// Ticket is in clear text
//
g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_szRCTicketEncrypted;
}
}
} // Else Listen
#ifdef _PROGRESS
parent.idFrameSet3.rows="0%,0%,*";
#endif
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
return;
}
var g_iLoopCnt = 0;
//
// InitRemoteConnection: Initializes the various SAF Objects needed for network connectivity
// Return Values: Returns TRUE on sucess and
// FALSE on failure
function InitRemoteConnection()
{
TraceFunctEnter("InitRemoteConnection");
#if 0
//
// Minimize the remote control object and make it visibile since it is required
// to be visible for the connection to go through
//
try
{
if( idRemoteControlObject.style.visibility == "hidden")
{
idRemoteControlObject.style.visibility = "visible";
}
DebugTrace("idRemoteControlObject.style.visibility = " + idRemoteControlObject.style.visibility);
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
return;
}
#endif
//
// If RDCHost object is correctly instantiated
//
if(null != idRemoteDesktopClientHost)
{
if( null == g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient )
{
try
{
//
// Obtain the RDSClient object
//
DebugTrace("Calling idRemoteDesktopClientHost.GetRemoteDesktopClient");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient = idRemoteDesktopClientHost.GetRemoteDesktopClient();
}
catch(error)
{
parent.FatalError( L_ERRGETRDC_Text, error );
#ifdef _STRUCT_ERR
return false;
#else
return;
#endif
}
try
{
//
// Bind the event handlers for SAFRemoteDesktopClient object.
//
DebugTrace("Calling SAFRemoteDesktopClient.OnConnected");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnConnected = function()
{ Helper_ConnectedHandler(); }
DebugTrace("Calling SAFRemoteDesktopClient.OnDisconnected");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnDisconnected = function(reason)
{ Helper_DisconnectedHandler(reason); }
DebugTrace("Calling OnConnectRemoteDesktopComplete");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnConnectRemoteDesktopComplete = function(status)
{ Helper_RemoteDesktopCompleteHandler(status); }
#ifdef _ONBEFORE_CONNECT
DebugTrace("Calling SAFRemoteDesktopClient.OnBeginConnect");
try
{
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnBeginConnect = function()
{ DebugTrace("SAFRemoteDesktopClient.OnBeginConnect"); Helper_EnableChatAndTools(); }
}
catch(error)
{
if ( -2146827850 != error.number )
{
parent.FatalError( L_ERRBINDINGEVTS_Text, error);
#ifdef _STRUCT_ERR
return false;
#else
return;
#endif
}
//
// else: This is for backward compatibility
//
}
#endif
//
// Hide the RDCHost control
//
DebugTrace("Hiding idRemoteControlObject");
idRemoteControlObject.style.visibility = "hidden";
}
catch(error)
{
parent.FatalError( L_ERRBINDINGEVTS_Text, error);
#ifdef _STRUCT_ERR
return false;
#else
return;
#endif
}
}
}
else
{
//
// Fatal Error
//
parent.FatalError( L_ERRRDSCLIENTHOST_Text );
#ifdef _STRUCT_ERR
return false;
#endif
}
TraceFunctLeave();
#ifdef _STRUCT_ERR
return true;
#else
return;
#endif
}
//
// Helper_ConnectedHandler: Handles onConnected Event on RDCHost
//
function Helper_ConnectedHandler()
{
TraceFunctEnter("Helper_ConnectedHandler");
try
{
if (g_oSAFRemoteAssistanceHelper.m_bIsIM)
{
g_oSAFRemoteAssistanceHelper.m_IMListening = false;
}
try
{
if (g_oSession)
{
g_oSession.Notify(RA_IM_COMPLETE);
g_oSession.UninitObjects();
g_oSession = null;
}
}
catch(e)
{
// Not a fatal error. do nothing.
}
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
return;
}
try
{
parent.SoundBeep();
parent.g_oSAFRemoteAssistanceHelper.m_szHelpeeIP = g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectedServer;
#ifdef _ONCONNECT_INIT
DebugTrace("Calling Helper_CompleteConnectionStatus");
Helper_CompleteConnectionStatus();
//
// Launch the Remote Assistance control panel + chat windows after a few moments
//
setTimeout(Helper_EnableChatAndTools, 2000);
#else
g_oSAFRemoteAssistanceHelper.m_bConnected = true;
Helper_InitChatAndTools();
#endif
#ifdef _BVT
if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
{
parent.ReportBVTResult( c_szBVTPASS );
}
#endif
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
return;
}
function SetChatFocus()
{
try
{
parent.frames.idFrameChat.idchatText.focus();
}
catch(error)
{
// Ignore
}
}
function Helper_InitChatAndTools()
{
TraceFunctEnter("Helper_InitChatAndTools");
try
{
DebugTrace("Calling Helper_InitializeRAChatClient");
parent.frames.idFrameChat.Helper_InitializeRAChatClient();
parent.frames.idFrameChat.idchatText.readOnly = false;
parent.frames.idFrameChat.idchatText.disabled = false;
parent.frames.idFrameChat.btnSendChat.disabled = false;
DebugTrace("Calling Helper_InitializeStatus");
parent.frames.idFrameStatus.Helper_InitializeStatus();
DebugTrace("Calling Helper_InitializeTools");
parent.frames.idFrameTools.Helper_InitializeTools();
parent.frames.idFrameTools.idTB.SetState( "btnTakeControl", true );
parent.frames.idFrameTools.idTB.SetState( "btnSendFile_1", true );
parent.frames.idFrameTools.idTB.SetState( "btnOptions", true );
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
//
// Helper_EnableChatAndTools: Launches control panel + chat window modules
//
function Helper_EnableChatAndTools()
{
TraceFunctEnter("Helper_EnableChatAndTools");
var L_PRECONNECTSTATUS0_Text = "<strong>Status:&nbsp;</strong> ";
var L_PRECONNECTSTATUS_Text = "Waiting for ";
var L_PRECONNECTSTATUS1_Text = " to accept your offer of Remote Assistance...";
var L_PRECONNECTSTATUSNEW_Text="Waiting for an answer...";
try
{
//
// Show the chat frame...
//
idBody.scroll="no";
idRemoteControlObject.style.width = "100%";
idRemoteControlObject.style.height = "100%";
parent.idFrameSet2.cols="235px,*";
//
// Display the toolbar...
//
parent.idFrameSet1.rows="30px,3px,*";
//
// Display the statusbar...
//
#ifdef _PROGRESS
parent.idFrameSet3.rows="0%,33px,*";
#else
parent.idFrameSet3.rows="33px,*";
#endif
#ifdef _ONCONNECT_INIT
DebugTrace("Calling Helper_InitializeRAChatClient");
parent.frames.idFrameChat.Helper_InitializeRAChatClient();
DebugTrace("Calling Helper_InitializeStatus");
parent.frames.idFrameStatus.Helper_InitializeStatus();
DebugTrace("Calling Helper_InitializeTools");
parent.frames.idFrameTools.Helper_InitializeTools();
#else
//var szStatus = L_PRECONNECTSTATUS0_Text + L_PRECONNECTSTATUS_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_PRECONNECTSTATUS1_Text;
var szStatus= L_PRECONNECTSTATUS0_Text+L_PRECONNECTSTATUSNEW_Text;
parent.frames.idFrameStatus.idStatus.innerHTML = "&nbsp;&nbsp;" + szStatus;
parent.frames.idFrameTools.DisableToolbar();
parent.frames.idFrameTools.idTB.SetState( "btnQuit_1", true );
parent.frames.idFrameTools.idTB.SetState( "btnHelp", true );
parent.frames.idFrameChat.idchatText.readOnly = true;
parent.frames.idFrameChat.idchatText.disabled = true;
parent.frames.idFrameChat.btnSendChat.disabled = true;
parent.frames.idFrameChat.idIncomingChatText.disabled = false;
szStatus = "----------\n\n" + L_PRECONNECTSTATUSNEW_Text + "\n\n----------\n\n";
parent.frames.idFrameChat.Helper_UpdateChatHistory( szStatus );
g_bTransitioned = true;
#endif
//
// Hide the helpee chat if necessary
//
if( true == g_oSAFRemoteAssistanceHelper.m_bNoChat )
{
DebugTrace("Calling Helper_HideChat");
parent.frames.idFrameStatus.Helper_HideChat();
}
idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
idRemoteControlObject.style.visibility = "visible";
g_oSAFRemoteAssistanceHelper.m_idCtx.maximized = true;
#ifdef _ONCONNECT_INIT
g_oSAFRemoteAssistanceHelper.m_bConnected = true;
#endif
// parent.frames.idFrameScreen.idBody.className = "styclientBody";
DebugTrace("Instantiating m_oFso");
parent.g_oSAFRemoteAssistanceHelper.m_oFso = new ActiveXObject("Scripting.FileSystemObject"); // File system object
DebugTrace("Instantiating m_oRCFileDlg");
parent.g_oSAFRemoteAssistanceHelper.m_oRCFileDlg = new ActiveXObject("SAFRCFileDlg.FileSave"); // File SaveAs dialog object
DebugTrace("Calling ToggleSmartScaling");
ToggleSmartScaling();
if( false == g_oSAFRemoteAssistanceHelper.m_bNoChat )
{
DebugTrace("Calling parent.frames.idFrameChat.SetFocus");
parent.frames.idFrameChat.SetFocus();
}
DebugTrace("Connection established...");
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text , error);
}
TraceFunctLeave();
return;
}
//
// ToggleSmartScaling: Toggles between smartscaled mode and real size mode
//
function ToggleSmartScaling()
{
TraceFunctEnter("EnableSmartScaling");
try
{
DebugTrace("Instantiating " + szProgIDSetting );
var obj = new ActiveXObject( szProgIDSetting );
DebugTrace("Calling GetProfileString with parameter = Scaling");
g_oSAFRemoteAssistanceHelper.m_bEnableSmartScaling = obj.GetProfileString("Scaling");
if(true == g_oSAFRemoteAssistanceHelper.m_bEnableSmartScaling)
{
DebugTrace("Setting SAFRemoteDesktopClient.EnableSmartSizing = true");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = true;
parent.frames.idFrameStatus.Helper_UpdateMode( true );
}
else
{
DebugTrace("Setting SAFRemoteDesktopClient.EnableSmartSizing = false");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = false;
parent.frames.idFrameStatus.Helper_UpdateMode( false );
}
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
//
// DisplayConnectionDisconnectMessage:
//
function DisplayConnectionDisconnectMessage( reason )
{
TraceFunctEnter("DisplayConnectionDisconnectMessage");
try
{
var szErrMsg = null;
DebugTrace("reason: " + reason);
switch( reason ) {
case 4:
case 37:
//szErrMsg = g_oSAFRemoteAssistanceHelper.m_szUserName + SAFDisconnectError[ reason ];
szErrMsg = SAFDisconnectError[ reason ];
break;
case 24:
szErrMsg = SAFDisconnectError[ reason ] + g_oSAFRemoteAssistanceHelper.m_szUserName;
break;
case 41:
szErrMsg = SAFDisconnectError[ reason ] + g_oSAFRemoteAssistanceHelper.m_szUserName + L_SAFError41b_Text;
break;
default:
szErrMsg = SAFDisconnectError[ reason ];
break;
}
#if _ONCONNECT_INIT
I0TD0TR0t0idEnunciator.src = "../../Common/icon_warning_32x.gif";
S0TD2TR0t0idEnunciator.innerText = szErrMsg;
idCancel.value = "OK";
idBody.focus();
idCancel.focus();
#else
if( true == g_bTransitioned )
{
parent.frames.idFrameStatus.Helper_UpdateStatus( parent.L_DISCONNECTED_Text );
parent.frames.idFrameChat.Helper_UpdateChatHistory( szErrMsg );
parent.DisplayMessage( szErrMsg );
}
else
{
I0TD0TR0t0idEnunciator.src = "../../Common/icon_warning_32x.gif";
S0TD2TR0t0idEnunciator.innerText = szErrMsg;
idCancel.value = "OK";
idBody.focus();
idCancel.focus();
}
#endif
DebugTrace("szErrMsg: " + szErrMsg);
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
}
function ShutdownUI( reason )
{
TraceFunctEnter("ShutdownUI");
try
{
//
// Close down RC Connection. Graceful termination.
//
parent.SoundBeep();
g_oSAFRemoteAssistanceHelper.m_bConnected = false;
//
// Disconnected
//
parent.frames.idFrameChat.idBody.onmouseover = "function{ }";
parent.frames.idFrameChat.idchatText.readOnly = true;
parent.frames.idFrameChat.idchatText.disabled = true;
parent.frames.idFrameChat.btnSendChat.disabled = true;
parent.frames.idFrameChat.idIncomingChatText.disabled = false;
parent.frames.idFrameScreen.idBody.disabled = true;
parent.frames.idFrameTools.DisableToolbar();
parent.frames.idFrameStatus.Helper_UpdateStatus( parent.L_DISCONNECTED_Text );
parent.frames.idFrameStatus.idBody.disabled = true;
parent.CloseOpenSubWin();
}
catch(error)
{
// Ignore
}
TraceFunctLeave();
}
//
// Helper_DisconnectedHandler: Handles onDisconnected Event on RDCHost
//
function Helper_DisconnectedHandler(reason)
{
TraceFunctEnter("Helper_DisconnectedHandler");
try
{
DebugTrace("Reason: " + reason + " Description: " + SAFDisconnectError[ reason ] + " g_oSAFRemoteAssistanceHelper.m_bConnected: " + g_oSAFRemoteAssistanceHelper.m_bConnected);
// Disconnect the voice session if active
if (parent.g_bVoipConnected == true)
{
if( null != g_oSAFRemoteAssistanceHelper.m_oSAFIntercomClient )
{
g_oSAFRemoteAssistanceHelper.m_oSAFIntercomClient.Disconnect();
}
}
switch ( reason ) {
case 0:
// SAFERROR_NOERROR
case 3:
// SAFERROR_LOCALNOTERROR
case 5:
// SAFERROR_BYSERVER
//
// Disconnect or other Action Initiated by Application (Helpee disconnected)
//
//
// Delete the current timer, if necessary
//
if( 0 <= g_iTimerID )
{
clearTimeout( g_iTimerID );
g_iTimerID = -1;
}
if( g_oSAFRemoteAssistanceHelper.m_bConnected == false )
{
//
// Display Connection Disconnect Message
//
DisplayConnectionDisconnectMessage( reason );
}
else
{
ShutdownUI( reason );
if( 5 == reason )
{
parent.UserDisconnect();
}
}
#ifdef _BVT
if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
{
parent.frames.idFrameChat.Helper_UpdateChatHistory( c_szBVTPASS );
parent.ReportBVTResult( c_szBVTPASS );
parent.ShutDownBVT();
g_oSAFRemoteAssistanceHelper.m_oSAFClassFactory.Close();
}
#endif
break;
default:
//
// All other messages go here...
//
#ifdef _BVT
if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
{
parent.ReportBVTResult( c_szBVTFAIL );
parent.ShutDownBVT();
g_oSAFRemoteAssistanceHelper.m_oSAFClassFactory.Close();
}
#endif
if( g_oSAFRemoteAssistanceHelper.m_bConnected == false )
{
//
// Delete the current timer, if necessary
//
if( 0 <= g_iTimerID )
{
clearTimeout( g_iTimerID );
g_iTimerID = -1;
}
//
// Display Connection Disconnect Message
//
DisplayConnectionDisconnectMessage( reason );
//
// End Tracing
//
TraceFunctLeave();
EndTrace();
}
else
{
ShutdownUI( reason );
}
break;
}
parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected = false;
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
return;
}
//
// Helper_RemoteDesktopCompleteHandler: Fired on receiving the OnRemoteControl event
//
function Helper_RemoteDesktopCompleteHandler(status)
{
TraceFunctEnter("Helper_RemoteDesktopCompleteHandler");
var bDisconnect = false;
var L_ERRSHADOW1_Text = "Your connection to the ";
var L_ERRSHADOW2_Text = " has closed. This might be because ";
var L_ERRSHADOW3_Text = "'s screen resolution changed. To reconnect, reopen the invitation.";
var L_ERRTAKECONTROL1_Text = "The screen resolution has been changed, which caused you to lose keyboard and mouse control of ";
var L_ERRTAKECONTROL2_Text = "'s computer. To request control again, click \"Take Control\".";
try
{
DebugTrace("status: " + status );
switch ( status ) {
case 300:
// SAFERROR_SHADOWEND_BASE
DebugTrace("SAFERROR_SHADOWEND_BASE");
break;
case 301:
// SAFERROR_SHADOWEND_CONFIGCHANGE
DebugTrace("SAFERROR_SHADOWEND_CONFIGCHANGE");
try
{
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectRemoteDesktop();
//
// If we are in control mode, revert back to view mode
//
if( true == parent.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bRCEnabled )
{
parent.idFrameTools.Helper_TakeControl();
var szMsg = L_ERRTAKECONTROL1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_ERRTAKECONTROL2_Text;
parent.DisplayMessage( szMsg );
parent.Helper_SendControlCommand( c_szAbortRC );
}
}
catch(error)
{
bDisconnect = true;
}
break;
case 302:
// SAFERROR_SHADOWEND_UNKNOWN
DebugTrace("SAFERROR_SHADOWEND_UNKNOWN");
bDisconnect = true;
break;
}
if( true == bDisconnect )
{
if( 301 == status )
{
var szMsg = L_ERRSHADOW1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_ERRSHADOW2_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_ERRSHADOW3_Text;
parent.DisplayMessage( szMsg );
}
parent.UserDisconnect();
parent.frames.idFrameTools.Helper_QuitMethod();
TraceFunctLeave();
return;
}
}
catch(error)
{
// Ignore
}
TraceFunctLeave();
return;
}
//
// Helper_PasswordSet: Use password as key to decrypt RCTicket on data entry.
//
function Helper_PasswordSet()
{
TraceFunctEnter("Helper_PasswordSet");
try
{
if( true == btnYES.disabled)
{
btnYES.disabled = false;
}
if (window.event.keyCode == 13)
{
//
// Decrypt the RCTicket
//
#ifdef _STRUCT_ERR
var bRetVal = true;
bRetVal = Helper_InitScreen2();
if( -1 == bRetVal )
{
//
// End of the world. Abort
//
oSAFClassFactory.Close();
return false;
}
else if( false == bRetVal )
{
return true;
}
#else
Helper_InitScreen2();
#endif
}
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
#ifdef _STRUCT_ERR
return false;
#endif
}
TraceFunctLeave();
return;
}
#ifdef _STRUCT_ERR
function onYes()
{
try
{
var bRetVal = Helper_InitScreen2();
if( -1 == bRetVal )
{
//
// End of the world. Abort
//
oSAFClassFactory.Close();
return false;
}
else if ( false == bRetVal )
{
return true;
}
}
catch(error)
{
//
// End of the world. Abort. This though is an overkill. There should not be
// any exceptions at this level
//
oSAFClassFactory.Close();
return;
}
}
#endif
function OnPassWrdKeyUp()
{
if((idPasswordBox.value=="")&&(btnYES.disabled==false))
btnYES.disabled = true;
}
// Get PassStub
function GetPassStub()
{
TraceFunctEnter("GetPassStub");
try
{
if (false == g_oSAFRemoteAssistanceHelper.m_bPasswordSet)
{
//
// Get the passStub
//
g_oSAFRemoteAssistanceHelper.m_szPassword = idPasswordBox.value;
DebugTrace("Calling oEncryption.EncryptString");
g_oSAFRemoteAssistanceHelper.m_szPassStub = g_oSAFRemoteAssistanceHelper.m_oEncryption.EncryptString(idPasswordBox.value, g_oSAFRemoteAssistanceHelper.m_oDict.Item("PassStub"));
g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_oCurrentIncident.RCTicket;
g_oSAFRemoteAssistanceHelper.m_bPasswordSet = true;
}
}
catch (error)
{
idPasswordBox.value = "";
btnYES.disabled = true;
alert( L_ERRPWD_Text );
idPasswordBox.focus();
}
TraceFunctLeave();
return g_oSAFRemoteAssistanceHelper.m_bPasswordSet;
}
function DoReverseConnect(bHasBeenCalled)
{
TraceFunctEnter("DoReverseConnect");
if (g_bReverseConnectReady)
{
//DoConnectToServer();
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.AcceptListenConnection(
g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
}
else if (bHasBeenCalled != 1) // wait for 5 seconds.
{ //It happens only when direct connect is slower than MSN server.
setTimeout("DoReverseConnect(1)", 5000);
}
else // Looks like ReverseConnect failed.
{
DoConnectToServer();
}
TraceFunctLeave();
}
function DoConnectToServer()
{
TraceFunctEnter("DoConnectToServer");
if (g_oSAFRemoteAssistanceHelper.m_IMListening) // Reverse connect failed.
{
g_oSAFRemoteAssistanceHelper.m_IMListening = false;
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectToServer(g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
}
TraceFunctLeave();
}
function OnIMConnectTimeout()
{
try
{
TraceFunctEnter("OnIMConnectTimeout");
if (g_oSession != null) // Timeout. Connection channel broken or.
// Novice doesn't click 'yes/no' dialog
{
g_oSession.UninitObjects();
g_oSession = null;
Helper_DisconnectedHandler(8); // SAFERROR_CONNECTIONTIMEDOUT
}
TraceFunctLeave();
}
catch (error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
TraceFunctLeave();
}
}
function OnSessionStatus(Status)
{
TraceFunctEnter("OnSessionStatus");
try
{
// Expert blob stuff
switch (Status)
{
case RA_IM_CONNECTTOSERVER:
var s = g_oSession.ReceivedUserTicket;
if (g_oSession.ContextDataProperty("L") == 1 || // User is using modem.
oSAFClassFactory.Connectivity.IsAModem)
{
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 8;
}
else
{
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 16;
}
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectParms = s;
DoReverseConnect();
break;
case RA_IM_EXPERT_TICKET_OUT:
// Start to listen.
// goto listen mode
g_oSAFRemoteAssistanceHelper.m_IMListening = true;
//alert('Start Listening...');
// Then we wait for user to do reverse-connect back for test.
// Setup connection point for reverse connection.
DebugTrace("Calling StartListening with parameter = 120");
StartListening( 120 );
//alert('Start Listening...');
break;
case RA_IM_FAILED:
g_oSession.UninitObjects();
g_oSession = null;
Helper_DisconnectedHandler(1); // SAFERROR_NOINFO
break;
default:
// Do nothing for now.
break;
}
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
#define SAFERROR_STOPLISTENBYUSER 51
function OnListenConnect_IM(ErrorCode)
{
TraceFunctEnter("OnListenConnect_IM");
try
{
if( false == g_oSAFRemoteAssistanceHelper.m_bListen )
{
//
// IM case
//
if (ErrorCode == SAFERROR_STOPLISTENBYUSER)
{
return;
}
g_bReverseConnectReady = true;
}
else
{
//
// PSS case
//
TR2T0idLayer1.style.visibility = "visible";
}
}
catch( error )
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
return;
}
function OnListenConnect(ErrorCode)
{
TraceFunctEnter("OnListenConnect");
try
{
if( false == g_oSAFRemoteAssistanceHelper.m_bListen )
{
//
// IM case
//
if (g_oSAFRemoteAssistanceHelper.m_IMListening == false)
return;
g_oSAFRemoteAssistanceHelper.m_IMListening = false; // this event should happen only once.
if (ErrorCode == SAFERROR_STOPLISTENBYUSER)
{
return;
}
DebugTrace("Calling AcceptListenConnection");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.AcceptListenConnection(
g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
}
else
{
//
// PSS case
//
TR2T0idLayer1.style.visibility = "visible";
}
}
catch( error )
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
return;
}
function InitListenMode()
{
TraceFunctEnter("InitListenMode");
var sExpertTicket = null;
try
{
InitRemoteConnection();
// 2. Get expert ticket
DebugTrace("Calling SAFRemoteDesktopClient.CreateListenEndpoint");
g_oSAFRemoteAssistanceHelper.m_szExpertTicket = g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.CreateListenEndpoint(0); // use dynamic port
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
return g_oSAFRemoteAssistanceHelper.m_szExpertTicket;
}
function StartListening( iTimeout )
{
TraceFunctEnter("StartListening");
try
{
DebugTrace("Calling SAFRemoteDesktopClient.OnListenConnect");
if (g_oSAFRemoteAssistanceHelper.m_bIsIM)
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnListenConnect = OnListenConnect_IM;
else
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnListenConnect = OnListenConnect;
DebugTrace("Calling oSAFRemoteDesktopClient.StartListen with parameter = " + iTimeout );
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.StartListen(iTimeout);
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
function Helper_InitIMScreen2()
{
TraceFunctEnter("Helper_InitIMScreen2");
var sExpertTicket = null;
try
{
//
// Provide UI first. Hide all the divs, except the one that displays connection status
//
idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 Display";
//idLayer2.style.visibility = "hidden";
idLayer2.className="PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
idConnectionProgressLayer.focus();
ConnectStarted=0;
DebugTrace("Instantiating rcbdyctl.IMSession");
// Exchange ticket here.
// Load Session Object
g_oSession = new ActiveXObject("rcbdyctl.IMSession");
// set callback function
DebugTrace("Setting oSession.OnSessionStatus");
g_oSession.OnSessionStatus = OnSessionStatus;
// connect to session
DebugTrace("Calling GetLaunchingSession with parameter = " + g_oSAFRemoteAssistanceHelper.m_SessionID );
g_oSession.GetLaunchingSession( g_oSAFRemoteAssistanceHelper.m_SessionID );
DebugTrace("Calling InitListenMode");
sExpertTicket = InitListenMode();
g_oSAFRemoteAssistanceHelper.m_szUserName = g_oSession.User.FriendlyName;
Helper_UpdateConnectionStatus();
// create blob
DebugTrace("Calling GetLocalUser");
var oMsgr = new ActiveXObject("Messenger.UIAutomation");
g_oSAFRemoteAssistanceHelper.m_szLocalUser = parent.EscapedName(oMsgr.MyFriendlyName);
//g_oSAFRemoteAssistanceHelper.m_szLocalUser = parent.GetLocalUser();
#ifdef _PERFOPTIMIZE
g_oSAFRemoteAssistanceHelper.m_szExpertBlob = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) +
";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser + "6;MSRA=114;PERFOPTIMIZE=" +
((g_oSAFRemoteAssistanceHelper.m_bPerfOptimize)?"1":"0");
#else
g_oSAFRemoteAssistanceHelper.m_szExpertBlob = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) +
";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser +
((g_oSAFRemoteAssistanceHelper.m_bPerfOptimize)?"1":"0");
#endif
// Test only. Wait until inviter give me data.
DebugTrace("Calling SendOutExpertTicket");
setTimeout("OnIMConnectTimeout()", 900000); // set timeout in 15 minutes.
g_oSession.SendOutExpertTicket(sExpertTicket);
} catch (error)
{
g_oSession.UninitObjects();
g_oSession = null; // fatal error: release IM session.
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
return;
}
//
// Helper_InitScreen2: Initializes Screen 2
// Return Values: true on SUCCESS
// false and -1 on FAILURE. This function and it's children in the call tree would have
// displayed the error to the user. Hence the calling routines should just
// check for the return value and cleanup
// -1: close helpctr
// 0: dont close helpctr
function Helper_InitScreen2()
{
TraceFunctEnter("Helper_InitScreen2");
try
{
//
// Initialize the remote network connection objects
//
#ifdef _STRUCT_ERR
if ( false == InitRemoteConnection())
{
//
// InitRemoteConnection failed. So we can not connect
// to the novice. So we abort and return to caller
//
return -1;
}
#else
InitRemoteConnection();
#endif
//
// Decrypt RCTicket if necessary
//
if(true == g_oSAFRemoteAssistanceHelper.m_oCurrentIncident.RCTicketEncrypted)
{
if (idPasswordBox.value=="")
{
parent.DisplayMessage(L_ERRPWD_Text);
idPasswordBox.focus();
#ifdef _STRUCT_ERR
return true;
#else
return;
#endif
}
else
{
//
// Decrypt RCTicket
//
if(false == GetPassStub())
{
//
// Invalid password. Re-enter
//
#ifdef _STRUCT_ERR
return true;
#else
return;
#endif
}
}
}
//
// Hide all the divs, except the one that displays connection status
//
idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 Display";
//idLayer2.style.visibility = "hidden";
idLayer2.className="positionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
ConnectStarted=0;
//
// Make the remote connection
//
#ifdef _BVT
if ( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
{
parent.g_oBVT[ parent.g_iTest ].TEST = "Test " + parent.g_iTest + " Session Connect";
var oDate = new Date();
parent.g_oBVT[ parent.g_iTest ].START_TIME = oDate.toLocaleString();
}
#endif
#ifdef _STRUCT_ERR
if( false == RAEstablishConnection())
{
//
// Connection request has failed. Morph UI to error dialog and display error
//
DisplayConnectionDisconnectMessage( 28 );
//
// Since we have handled the error in a useful manner here, we dont want to propagate this higher.
return false;
}
#else
RAEstablishConnection();
#endif
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
#ifdef _STRUCT_ERR
return -1;
#endif
}
TraceFunctLeave();
#ifdef _STRUCT_ERR
return true;
#else
return;
#endif
}
function CreateExpertBlob()
{
TraceFunctEnter( "CreateExpertBlob" );
var sTemp = null;
try
{
g_oSAFRemoteAssistanceHelper.m_szLocalUser = parent.GetLocalUser();
#ifdef _BVT
var szBVTTester = c_szBVTTESTER;
if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
{
sTemp = ( 5 + szBVTTester.length) + ";NAME=" + szBVTTester;
}
else
{
sTemp = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) + ";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser;
}
#else
sTemp = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) + ";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser;
#endif
if ( g_oSAFRemoteAssistanceHelper.m_szPassStub != "" )
{
sTemp += (5 + g_oSAFRemoteAssistanceHelper.m_szPassStub.length) + ";PASS=" + g_oSAFRemoteAssistanceHelper.m_szPassStub;
}
//
// Performance Optimization information passed via userblob
//
#ifdef _PERFOPTIMIZE
if( true == g_oSAFRemoteAssistanceHelper.m_bMSRA )
{
sTemp += 6 + ";MSRA=1";
}
else
{
sTemp += 6 + ";MSRA=0";
}
#endif
#if 0
if( true == g_oSAFRemoteAssistanceHelper.m_bURA )
{
sTemp += 5 + ";URA=1";
}
else
{
sTemp += 5 + ";URA=0";
}
sTemp += ( 6 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length ) + ";BUDDY=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser; // TODO: This should not be hard coded
sTemp += 6 + ";FILE=0"; // TODO: This should not be hard coded
#endif
//alert("sTemp: " + sTemp );
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
return;
}
g_oSAFRemoteAssistanceHelper.m_szExpertBlob = sTemp;
TraceFunctLeave();
return sTemp;
}
//
// RAEstablishConnection connects to the user's terminal
// Return Values: TRUE on SUCCESS
// FALSE on FAILURE. Callers should look at return value for error cleanup
//
function RAEstablishConnection()
{
TraceFunctEnter("RAEstablishConnection");
var sTemp = ""
g_iTimerID = -1;
//
// If RDCHost object is correctly instantiated
//
if(null != idRemoteDesktopClientHost )
{
if(null != g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient)
{
try
{
//
// Update connection status
//
#ifdef _STRUCT_ERR
if( false == Helper_UpdateConnectionStatus())
{
return false;
}
#else
Helper_UpdateConnectionStatus();
#endif
//
// Set the connection parameters
//
DebugTrace("setting SAFRemoteDesktopClient.ConnectParms");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectParms = g_oSAFRemoteAssistanceHelper.m_szRCTicket;
g_oSAFRemoteAssistanceHelper.m_szCurrentIP = g_oSAFRemoteAssistanceHelper.m_szHelpeeIP;
//
// User blob stuff
//
sTemp = CreateExpertBlob();
//
// Make the connection
//
DebugTrace("Calling SAFRemoteDesktopClient.ConnectToServer");
if( true == g_oSAFRemoteAssistanceHelper.m_bPerfOptimize )
{
try
{
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 8;
}
catch(error)
{
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 16;
}
}
else
{
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 16;
}
DebugTrace("g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth: " + g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth);
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectToServer( sTemp );
}
catch(error)
{
parent.FatalError( L_ERRCONNECTION_Text, error);
return;
}
}
else
{
//
// Fatal Error
//
parent.FatalError( L_ERRRDSCLIENT_Text );
return;
}
}
else
{
//
// Fatal Error
//
parent.FatalError( L_ERRRDSCLIENTHOST_Text );
}
TraceFunctLeave();
return;
}
//
// Helper_UpdateConnectionStatus: Updates the connection progress status
// Return Values: TRUE on Sucess
// FALSE on Failure. Callers should look at return value for error cleanup
//
function Helper_UpdateConnectionStatus()
{
TraceFunctEnter("Helper_UpdateConnectionStatus");
try
{
if( false == g_oSAFRemoteAssistanceHelper.m_bURA )
{
I0TD0TR0t0idEnunciator.src = "animation.gif";
S0TD2TR0t0idEnunciator.innerText = L_ConnectTo_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + "...";
}
else
{
I0TD0TR0t0idEnunciator.src = "animation.gif";
S0TD2TR0t0idEnunciator.innerText = L_ConnectToURA_Text + "...";
}
idCtx.setWindowDimensions(idCtx.x,idCtx.y,425,145);
#ifndef _ONBEFORE_CONNECT
setTimeout(Helper_EnableChatAndTools, 2000);
#endif
}
catch(error)
{
parent.FatalError( parent.L_ERRFATAL_Text, error );
#ifdef _STRUCT_ERR
return false;
#endif
}
TraceFunctLeave();
#ifdef _STRUCT_ERR
return true;
#else
return;
#endif
}
//
// Helper_CompleteConnectionStatus: Completes the progress bar and dismisses the timer
//
function Helper_CompleteConnectionStatus()
{
TraceFunctEnter("Helper_CompleteConnectionStatus");
try
{
I0TD0TR0t0idEnunciator.src = "connected.gif";
S0TD2TR0t0idEnunciator.innerText = L_ConnectionSuccess_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_NOVICESCOMPUTER_Text;
}
catch(error)
{
parent.FatalError( parent.L_ERRFATAL_Text, error );
}
TraceFunctLeave();
return;
}
function document.onkeydown()
{
try
{
switch( window.event.keyCode ) {
case 0x8:
if ( window.event.srcElement.id != "idPasswordBox")
{
window.event.returnValue=false;
}
break;
case 0x9:
if( window.event.srcElement.id == "btnNO" )
{
if ( (btnYES.disabled == false ) && ( idPasswordBox.disabled == true ))
{
btnYES.focus();
window.event.returnValue = false;
}
else
{
idPasswordBox.focus();
window.event.returnValue = false;
}
}
if (g_oSAFRemoteAssistanceHelper.m_bConnected == false)
{
if( (window.event.srcElement.id != "idPasswordBox" ) && (window.event.srcElement.id != "btnYES" ))
{
window.event.returnValue = false;
}
}
break;
case 0x1B:
if((idConnectionProgressLayer.className=="PositionA zindex2 sys-inlineform-bgcolor1 Display")||(idLayer2.className=="PositionA zindex2 sys-inlineform-bgcolor1 Display"))
{
oSAFClassFactory.Close();
window.event.returnValue=false;
}
break;
}
}
catch(error)
{
btnYES.focus();// problem
window.event.returnValue = false;
}
}
function PSSStartListen()
{
TraceFunctEnter("PSSStartListen");
try
{
InitListenMode();
TR1T0idLayer1.style.visibility = "visible";
B0idLayer1.disabled = true;
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
#define c_iTimeout 3600 // 1 hour timeout
function SaveExpertTicket()
{
TraceFunctEnter("SaveExpertTicket");
try
{
//
// Save Expert ticket to File
//
DebugTrace("Instantiating Scripting.FileSystemObject");
var oFS = new ActiveXObject("Scripting.FileSystemObject");
DebugTrace("Calling OpenTextFile with params = " + InputSaveExpertTix.value + ",2, true");
var oFile = oFS.OpenTextFile( InputSaveExpertTix.value, 2, true );
DebugTrace("Calling Write");
oFile.Write( g_oSAFRemoteAssistanceHelper.m_szExpertTicket );
DebugTrace("Calling Close");
oFile.Close();
//
// Start Listening
//
DebugTrace("Calling StartListening");
StartListening( c_iTimeout );
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
function OpenNoviceTicket()
{
TraceFunctEnter("OpenNoviceTicket");
try
{
//
// Hide all the divs, except the one that displays connection status
//
TR2T0idLayer1.style.visibility = "hidden";
TR1T0idLayer1.style.visibility = "hidden";
TR0T0idLayer1.style.visibility = "hidden";
//idLayer1.style.visibility = "hidden";
idLayer1.className="styLayer1 DisplayNone";
idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 Display";
ConnectStarted=0;
DebugTrace("Changing to Kioskmode");
idCtx.ChangeContext( "kioskmode", "");
DebugTrace("Calling Helper_UpdateConnectionStatus");
//
// Read the novice ticket from File
//
g_oSAFRemoteAssistanceHelper.m_bLoadFromFile = true;
g_oSAFRemoteAssistanceHelper.m_szIncidentFile = InputReadNoviceTix.value;
parent.LoadIncidentFromFile();
g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_szRCTicketEncrypted; // TODO: Deal with Pwd encrypted file
DebugTrace("ConnectParms: " + parent.g_oSAFRemoteAssistanceHelper.m_szRCTicket);
Helper_UpdateConnectionStatus();
//
// Establish connection
//
DebugTrace("Calling CreateExpertBlob...");
CreateExpertBlob();
DebugTrace("Setting ConnectParms...");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectParms = parent.g_oSAFRemoteAssistanceHelper.m_szRCTicket;
DebugTrace("Calling AcceptListenConnection");
g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.AcceptListenConnection(
g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
function OnClickSaveAs()
{
TraceFunctEnter("OnClickSaveAs");
try
{
DebugTrace("Instantiating SAFRCFileDlg.FileSave");
var obj = new ActiveXObject("SAFRCFileDlg.FileSave");
var x;
DebugTrace("Calling OpenFileSaveDlg");
x = obj.OpenFileSaveDlg();
if (x)
{
InputSaveExpertTix.value = obj.FileName;
}
InputSaveExpertTix.focus();
SaveButton.disabled = false;
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
function OnClickOpenAs()
{
TraceFunctEnter("OnClickOpenAs");
try
{
DebugTrace("Instantiating SAFRCFileDlg.FileOpen");
var obj = new ActiveXObject("SAFRCFileDlg.FileOpen");
var x;
x=obj.OpenFileOpenDlg();
if (x)
{
InputReadNoviceTix.value = obj.FileName;
}
InputReadNoviceTix.focus();
}
catch(error)
{
parent.FatalError( parent.L_RCCTL_Text, error);
}
TraceFunctLeave();
}
//handling "arrow keys"
function TabOrder(id)
{
TraceFunctEnter("TabOrder");
try
{
if ((event.keyCode==39) || (event.keyCode==37))
{
if (id==0)
{
btnNO.focus();
event.returnValue=false;
}
else
{
btnYES.focus();
event.returnValue=false;
}
}
}
catch(error)
{
event.srcElement.focus();
window.event.returnValue = false;
}
TraceFunctLeave();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<STYLE id="LocalStyles" name="LocalStyles">
.styLayer1
{
position: absolute;
z-index: 2;
visibility: hidden;
}
.height7
{
height:18px;
}
.width3
{
width:72px;
}
.zindex1
{
z-index:1;
}
.zindex2
{
z-index:2;
}
.PositionA
{
position:absolute;
}
.padding9
{
padding-bottom:6px;
}
.rdchostcontainerbackground
{
border: 2px solid #CBD7F1;
}
</STYLE>
<body id="idBody" name="idBody" class="sys-inlineform-bgcolor1" tabindex=-1 onunload="DoUnLoad();"
onload="DoLoad();InitializeRAClient()">
<div id="idLayer1" name="idLayer1" class="styLayer1 DisplayNone" >
<table id="T0idLayer1" name="T0idLayer1">
<TR id="TR0T0idLayer1" name="TR0T0idLayer1">
<TD id="TD0T0idLayer1" name="TD0T0idLayer1" colspan=2>
1. To initiate listen mode, click on the "Listen button" &nbsp;&nbsp;&nbsp;&nbsp;
<BUTTON id="B0idLayer1" name="B0idLayer1" class="styButton Border" onclick="PSSStartListen()" tabindex=1 accesskey="L">
<u>L</u>isten
</BUTTON>
</TD>
</TR>
<TR id="TR1T0idLayer1" name="TR1T0idLayer1" style="visibility:hidden">
<TD id="TD0TR1T0idLayer1" name="TD0TR1T0idLayer1">
2. Enter Filename to save the Expert side ticket:
<input tabindex=2 id="InputSaveExpertTix" name="InputSaveExpertTix" type="Text" class="Border" style="width:295px;" onkeypress=SaveExpertTicket()>
</input>
</TD>
<TD id="TD1TR1T0idLayer1" name="TD1TR1T0idLayer1">
<span id="S0TD1TR1T0idLayer1" name="S0TD1TR1T0idLayer1" class="valignbottom">
<button tabindex=3 class="styButton Border" id="BrowseButton" name="BrowseButton" onclick="OnClickSaveAs()" accesskey="B">
<u>B</u>rowse...
</button>
<button tabindex=4 class="styButton Border" id="SaveButton" name="SaveButton" onclick="SaveExpertTicket()" accesskey="S" disabled>
&nbsp;<u>S</u>ave
</button>
</span>
</TD>
</TR>
<TR id="TR2T0idLayer1" name="TR2T0idLayer1" style="visibility:hidden">
<TD id="TD0TR2T0idLayer1" name="TD0TR2T0idLayer1">
3. Enter Filename containing the ticket from novice:
<input tabindex=5 id="InputReadNoviceTix" name="InputReadNoviceTix" type="Text" class="Border" style="width:295px;" onkeypress="OpenNoviceTicket()"></input>
</TD>
<TD id="TD1TR2T0idLayer1" name="TD1TR2T0idLayer1">
<span id="S0TD1TR2T0idLayer1" name="S0TD1TR2T0idLayer1" class="valignbottom">
<button tabindex=6 class="styButton Border" id="BrowseButton2" name="BrowseButton2" onclick="OnClickOpenAs()" accesskey="B">
<u>B</u>rowse...
</button>
<button tabindex=7 class="styButton Border" id="ConnectButton" name="ConnectButton" onclick="OpenNoviceTicket()" accesskey="C">
&nbsp;<u>C</u>onnect
</button>
</span>
</TD>
</TR>
</Table>
</div>
<div id="idLayer2" name="idLayer2" class="PositionA zindex2 sys-inlineform-bgcolor1 Display">
<table id="idMainTable" name="idMainTable" cellspacing="0px" cellpadding="0px" class="MaxLayout">
<TR>
<TD class="padding6 padding4 padding3">
<Table id="T0" name="T0" cellpadding="0px" cellspacing="0px" border=0 class="Maxlayout">
<TR id="TR0T0" name="TR0T0">
<TD id="TD0TR0T0" name="TD0TR0T0" class="padding5 padding8 padding9">
<table name="EntryPoint" id="EntryPoint" cellspacing="1px" class="MaxLayout sys-table-header-bgcolor2">
<tr name="TR0EntryPoint" id="TR0EntryPoint"> <!-- start of row 1 -->
<td name="TD0TR0EntryPoint" id="TD0TR0EntryPoint" colspan="2" class="sys-table-cell-bgcolor1 height7" >
<span name="S0TD0TR0EntryPoint" id="S0TD0TR0EntryPoint" align="left" class="sys-font-body sys-color-body" id="idTitle">
&nbsp;&nbsp;Remote Assistance Invitation
</span>
</td>
</tr> <!-- End of row 1 -->
<tr name="TR1EntryPoint" id="TR1EntryPoint"> <!-- Start of row 2 -->
<td name="TD0TR1EntryPoint" id="TD0TR1EntryPoint" class="sys-table-cell-bgcolor3 height7 width3">
<div name="D0TD0TR1EntryPoint" id="D0TD0TR1EntryPoint" align="right" class="sys-font-body sys-color-body">
From:&nbsp;&nbsp;
</div>
</td>
<td name="TD1TR1EntryPoint" id="TD1TR1EntryPoint" class="sys-inlineform-bgcolor1 height7 MaxWidth">
<span name="S0TD1TR1EntryPoint" id="S0TD1TR1EntryPoint">
&nbsp;
</span>
<span id="S1TD1TR1EntryPoint" name="S1TD1TR1EntryPoint" class="sys-font-body sys-color-body">
&nbsp;
</span>
</td>
</tr> <!-- End of row 2 -->
<tr name="TR2EntryPoint" id="TR2EntryPoint"> <!-- start of row 3 -->
<td name="TD0TR2EntryPoint" id="TD0TR2EntryPoint" class="sys-table-cell-bgcolor3 height7 width3" nowrap>
<div name="D0TD0TR2EntryPoint" id="D0TD0TR2EntryPoint" class="sys-font-body sys-color-body" align="right">
Expires on:&nbsp;&nbsp;
</div>
</td>
<td name="TD1TR2EntryPoint" id="TD1TR2EntryPoint" class="sys-inlineform-bgcolor1 height7 MaxWidth">
<Span name="S0TD1TR2EntryPoint" id="S0TD1TR2EntryPoint" class="sys-font-body-bold sys-color-body">
&nbsp;
</span>
<span id="idInviteExpires" name="idInviteExpires" class="sys-font-body sys-color-body">
&nbsp;
</span>
</td>
</tr> <!-- end of row 3 -->
<!-- <tr name="TR3EntryPoint" id="TR3EntryPoint">--> <!-- start of row 4 -->
<!--<td name="TD0TR3EntryPoint" id="TD0TR3EntryPoint" class="sys-table-cell-bgcolor3 width3">
<Div align="right" class="sys-font-body sys-color-body MaxLayout" id="idRow41" name="idRow41">
<BR id="idBr2" name="idBr2">
Password:&nbsp;&nbsp;
</Div>
</td>
<td name="TD1TR3EntryPoint" id="TD1TR3EntryPoint" class="sys-inlineform-bgcolor1">
<table id="T0TD1TR3EntryPoint" name="T0TD1TR3EntryPoint" border=0 cellspacing="6px" cellpadding="0px" class="MaxLayout">
<tr>
<td>
<input type="password" id="idPasswordBox" name="idPasswordBox" class="MaxWidth" onkeypress=Helper_PasswordSet() onkeyup=OnPassWrdKeyUp() tabindex=1>
</td>
</tr>
<tr>
<td id="idtdText" name="idtdText">
<span id="idRow4" name="idRow4" class="sys-font-body sys-color-body">
If you do not know the password, contact <span id="idSender1" name="idSender1">&nbsp;</span>.
</span>
</td>
</tr>
</table>
</td>
</tr>--> <!-- End of row 4 -->
</table>
</TD>
</TR>
<TR name="TR0btnRow" id="TR0btnRow"> <!-- start of row 5 -->
<TD name="TD1TR0btnRow" id="TD1TR0btnRow" class="padding5 padding8">
<span class="sys-font-body sys-color-body" id="idRow5" name="idRow5">
&nbsp;
</span>
</td>
</tr> <!-- end of row 5 -->
<tr>
<td class="Height8">
</td>
</Tr>
<tr name="TR1btnRow" id="TR1btnRow"> <!-- start of row 6 -->
<td name="TD0TR1btnRow" id="TD0TR1btnRow" colspan=2 align="right" class="valignbottom padding5">
<BUTTON align=center class="styBtnWidth sys-font-body sys-color-body" id="btnYES" onkeydown="TabOrder(0);" name="btnYES" onclick="onYes()" tabindex=2 accesskey="Y"> <u>Y</u>es </BUTTON>
<Span id="idblankSpace" name="idblankSpace" class="width8"></Span>
<BUTTON align=center class="styBtnWidth sys-font-body sys-color-body" id="btnNO" onkeydown="TabOrder(1);" onClick="oSAFClassFactory.Close()" tabindex=3 accesskey="N"><u>N</u>o</BUTTON>
</td>
</tr> <!-- end of row 6 -->
</table>
</TD>
</TR>
</Table>
</div> <!-- end of layer 2 -->
<div id="idConnectionProgressLayer" name="idConnectionProgressLayer" class="PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone">
<Table id="T0idConnectionProgressLayer" name="T0idConnectionProgressLayer" class="MaxLayout" cellspacing="0px" cellpadding="0px" border=0>
<TR>
<TD class="padding6 padding4 padding3">
<Table class="MaxLayout" cellspacing="0px" cellpadding="0px" border=0>
<TR>
<TD id="TD0TR0t0idEnunciator" name="TD0TR0t0idEnunciator" class="width8 height8 padding1">
<img id="I0TD0TR0t0idEnunciator" name="I0TD0TR0t0idEnunciator" src="connected.gif" ALT="Connecting to remote computer image">
</TD>
<TD><Span id="idblankSpace" name="idblankSpace" class="width8"></Span></TD>
<TD id="TD2TR0t0idEnunciator" name="TD2TR0t0idEnunciator" class="height8 padding1">
<span class="sys-font-body sys-color-body" align="left" id="S0TD2TR0t0idEnunciator" name="S0TD2TR0t0idEnunciator">
&nbsp;
</span>
</TD>
</TR>
<TR>
<TD class="height5" colspan="3">
</TD>
</TR>
<TR>
<TD id="idbtnContainer" name="idbtnContainer" align="center" colspan="3" class="valignbottom">
<BUTTON class="styBtnWidth sys-font-body sys-color-body" id="idCancel" name="idCancel" onClick="oSAFClassFactory.Close()" onkeypress="oSAFClassFactory.Close()" tabindex=0 accesskey="C"> <u>C</u>ancel </button>
</TD>
</TR>
</Table>
</TD>
</TR>
</Table>
</div>
<div id="idRemoteControlObject" name="idRemoteControlObject" class="PositionA zindex1 MaxLayout padding3 padding7 sys-homepage-bgcolor">
<OBJECT classid=clsid:299BE050-E83E-4DB7-A7DA-D86FDEBFE6D0
data=data:application/x-oleobject;base64,UOCbKT7ot02n2thv3r/m0AADAAAlQgAAnDEAAA==
id="idRemoteDesktopClientHost" name="idRemoteDesktopClientHost"
class="MaxLayout rdchostcontainerbackground"
VIEWASTEXT>
</OBJECT>
</div>
</body>
</html>