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

  1. <HTML>
  2. <HEAD>
  3. #include "header.inc"
  4. #include "debug_decl.inc"
  5. #include "debug_js.inc"
  6. #include "common.inc"
  7. #include "constants.inc"
  8. <TITLE id="idTitle" name="idTitle">Remote Assistance</TITLE>
  9. <meta http-equiv="MSThemeCompatible" content="Yes">
  10. <LINK id="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
  11. <LINK id="UI_StyleSheet1" REL="stylesheet" TYPE="text/css" HREF="hcp://system/css/shared.css">
  12. <script id="LocalScript" name="LocalScript" language="JavaScript">
  13. /*
  14. * Localizable constants, text and messages
  15. */
  16. var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
  17. var L_ConnectTo_Text = "Attempting to connect to ";
  18. var L_ConnectToURA_Text = "Starting Remote Assistance";
  19. var L_ConnectionSuccess_Text = "You are now connected to ";
  20. var L_ERRRDSCLIENT_Text = c_szError2;
  21. var L_ERRRDSCLIENTHOST_Text = c_szError2;
  22. var L_ERRPWD_Text = "The password you entered is incorrect. Please try again. ";
  23. var L_ERRGETRDC_Text = c_szError2;
  24. var L_ERRBINDINGEVTS_Text = c_szError2;
  25. var L_ERRCONNECTION_Text = "Cannot connect to the other computer. Please try again.";
  26. var L_EXPIRYMESSAGE_Text = "This invitation seems to be expired. You can attempt to contact ";
  27. var L_EXPIRYMESSAGE1_Text = " anyway. If you cannot establish a connection, please contact ";
  28. var L_DOYOUCONNECT1_Text = "Do you want to connect to ";
  29. var L_DOYOUCONNECT2_Text = "'s computer now?";
  30. var L_NOVICESCOMPUTER_Text = "'s computer.";
  31. var L_PASSWORD_Text = "Password:";
  32. var L_CONTACT_Text = "If you do not know the password, contact ";
  33. //
  34. // Error codes on Disconnect
  35. //
  36. var L_SAFError0_Text = "Connection successfully established."; // SAFERROR_NOERROR
  37. var L_SAFError1_Text = "Remote Assistance connection disconnected. Please try again."; // SAFERROR_NOINFO
  38. var L_SAFError2_Text = "Remote Assistance connection disconnected. Please try again.";
  39. var L_SAFError3_Text = "Remote Assistance connection disconnected. Please try again."; // SAFERROR_LOCALNOTERROR
  40. var L_SAFError4_Text = " has closed connection to your computer."; // SAFERROR_REMOTEBYUSER
  41. var L_SAFError5_Text = "Remote Assistance connection could not be established because the invitation has either expired or was canceled."; // SAFERROR_BYSERVER
  42. 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
  43. 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
  44. var L_SAFError8_Text = "Remote Assistance connection could not be established because of a network connection timeout. Please try again."; // SAFERROR_CONNECTIONTIMEDOUT
  45. 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
  46. var L_SAFError10_Text = "Remote Assistance connection could not be established. Please try again.";
  47. 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
  48. var L_SAFError12_Text = "Remote Assistance is unable to send the connection request. Please try again."; // SAFERROR_WINSOCKSENDFAILED
  49. var L_SAFError13_Text = "Remote Assistance connection could not be established. Please try again.";
  50. var L_SAFError14_Text = "Remote Assistance cannot connect because the IP address of the remote computer is not valid."; // SAFERROR_INVALIDIPADDR
  51. var L_SAFError15_Text = "Remote Assistance is unable to send the connection request. Please try again."; // SAFERROR_SOCKETRECVFAILED
  52. var L_SAFError16_Text = "Remote Assistance connection disconnected. ";
  53. var L_SAFError17_Text = "Remote Assistance connection disconnected. ";
  54. 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
  55. var L_SAFError19_Text = "Remote Assistance connection disconnected. ";
  56. 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
  57. var L_SAFError21_Text = "A Remote Assistance connection could not be made because there is a licensing error.";// SAFERROR_LICENSINGFAILED
  58. var L_SAFError22_Text = c_szError1; // SAFERROR_ENCRYPTIONERROR
  59. var L_SAFError23_Text = c_szError1; // SAFERROR_DECRYPTIONERROR
  60. 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
  61. var L_SAFError25_Text = c_szError1; // SAFERROR_HELPSESSIONNOTFOUND
  62. var L_SAFError26_Text = "Remote Assistance cannot connect because the password is not valid. Please check the password and try again."; // SAFERROR_INVALIDPASSWORD
  63. var L_SAFError27_Text = "Remote Assistance cannot connect because this invitation has expired. Please try again.�"; // SAFERROR_HELPSESSIONEXPIRED
  64. var L_SAFError28_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_CANTOPENRESOLVER
  65. var L_SAFError29_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_UNKNOWNSESSMGRERROR
  66. var L_SAFError30_Text = "Remote Assistance connection cannot be established. Please try to connect again."; // SAFERROR_CANTFORMLINKTOUSERSESSION
  67. 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
  68. var L_SAFError32_Text = "Remote Assistance cannot connect because of a protocol failure. Please try again."; // SAFERROR_RCPROTOCOLERROR
  69. var L_SAFError33_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_RCUNKNOWNERROR
  70. var L_SAFError34_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_INTERNALERROR
  71. var L_SAFError35_Text = "Novice is responding..."; // SAFERROR_HELPEERESPONSEPENDING
  72. var L_SAFError36_Text = "Novice has accepted your connection request."; // SAFERROR_HELPEESAIDYES
  73. 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
  74. 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
  75. var L_SAFError39_Text = "Remote Assistance cannot connect because the novice is not logged on."; // SAFERROR_HELPEENOTFOUND
  76. 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
  77. var L_SAFError41_Text = "Remote Assistance cannot connect because "; // SAFERROR_HELPEESAIDNO
  78. var L_SAFError41b_Text = " denied the request for help. "; // SAFERROR_HELPEESAIDNO
  79. var L_SAFError42_Text = "Remote Assistance cannot connect because the help user account on novice's computer has changed."; // SAFERROR_HELPSESSIONACCESSDENIED
  80. var L_SAFError43_Text = "Remote Assistance cannot connect because the remote user is not currently logged on."; // SAFERROR_USERNOTFOUND
  81. var L_SAFError44_Text = "Remote Assistance connection could not be established. Please try again."; // SAFERROR_SESSMGRERRORNOTINIT
  82. var L_SAFError45_Text = "You cannot connect to your local logon session. Please try connecting from another computer or login session."; // SAFERROR_SELFHELPNOTSUPPORTED
  83. var L_SAFError47_Text = "Remote Assistance cannot connect because of incompatible operating system versions."; // SAFERROR_INCOMPATIBLEVERSION
  84. var L_SAFError48_Text = "Remote Assistance session is not connected."; // SAFERROR_SESSIONNOTCONNECTED
  85. var L_SAFError50_Text = "Remote Assistance connection disconnected because the remote computer shutdown."; //SAFERROR_SYSTEMSHUTDOWN
  86. var L_SAFError51_Text = "Remote Assistance listen mode has stopped."; // SAFERROR_STOPLISTENBYUSER
  87. var L_SAFError52_Text = "Remote Assistance reverse connection could not be established due to network failure."; // SAFERROR_WINSOCK_FAILED
  88. 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
  89. var L_EXPIRED_Text= "Expired";
  90. var SAFDisconnectError = new Array(54);
  91. SAFDisconnectError[0] = L_SAFError0_Text;
  92. SAFDisconnectError[1] = L_SAFError1_Text;
  93. SAFDisconnectError[2] = L_SAFError2_Text;
  94. SAFDisconnectError[3] = L_SAFError3_Text;
  95. SAFDisconnectError[4] = L_SAFError4_Text;
  96. SAFDisconnectError[5] = L_SAFError5_Text;
  97. SAFDisconnectError[6] = L_SAFError6_Text;
  98. SAFDisconnectError[7] = L_SAFError7_Text;
  99. SAFDisconnectError[8] = L_SAFError8_Text;
  100. SAFDisconnectError[9] = L_SAFError9_Text;
  101. SAFDisconnectError[10] = L_SAFError10_Text;
  102. SAFDisconnectError[11] = L_SAFError11_Text;
  103. SAFDisconnectError[12] = L_SAFError12_Text;
  104. SAFDisconnectError[13] = L_SAFError13_Text;
  105. SAFDisconnectError[14] = L_SAFError14_Text;
  106. SAFDisconnectError[15] = L_SAFError15_Text;
  107. SAFDisconnectError[16] = L_SAFError16_Text;
  108. SAFDisconnectError[17] = L_SAFError17_Text;
  109. SAFDisconnectError[18] = L_SAFError18_Text;
  110. SAFDisconnectError[19] = L_SAFError19_Text;
  111. SAFDisconnectError[20] = L_SAFError20_Text;
  112. SAFDisconnectError[21] = L_SAFError21_Text;
  113. SAFDisconnectError[22] = L_SAFError22_Text;
  114. SAFDisconnectError[23] = L_SAFError23_Text;
  115. SAFDisconnectError[24] = L_SAFError24_Text;
  116. SAFDisconnectError[25] = L_SAFError25_Text;
  117. SAFDisconnectError[26] = L_SAFError26_Text;
  118. SAFDisconnectError[27] = L_SAFError27_Text;
  119. SAFDisconnectError[28] = L_SAFError28_Text;
  120. SAFDisconnectError[29] = L_SAFError29_Text;
  121. SAFDisconnectError[30] = L_SAFError30_Text;
  122. SAFDisconnectError[31] = L_SAFError31_Text;
  123. SAFDisconnectError[32] = L_SAFError32_Text;
  124. SAFDisconnectError[33] = L_SAFError33_Text;
  125. SAFDisconnectError[34] = L_SAFError34_Text;
  126. SAFDisconnectError[35] = L_SAFError35_Text;
  127. SAFDisconnectError[36] = L_SAFError36_Text;
  128. SAFDisconnectError[37] = L_SAFError37_Text;
  129. SAFDisconnectError[38] = L_SAFError38_Text;
  130. SAFDisconnectError[39] = L_SAFError39_Text;
  131. SAFDisconnectError[40] = L_SAFError40_Text;
  132. SAFDisconnectError[41] = L_SAFError41_Text;
  133. SAFDisconnectError[42] = L_SAFError42_Text;
  134. SAFDisconnectError[43] = L_SAFError43_Text;
  135. SAFDisconnectError[44] = L_SAFError44_Text;
  136. SAFDisconnectError[45] = L_SAFError45_Text;
  137. SAFDisconnectError[47] = L_SAFError47_Text;
  138. SAFDisconnectError[48] = L_SAFError48_Text;
  139. SAFDisconnectError[50] = L_SAFError50_Text;
  140. SAFDisconnectError[51] = L_SAFError51_Text;
  141. SAFDisconnectError[52] = L_SAFError52_Text;
  142. SAFDisconnectError[53] = L_SAFError53_Text;
  143. //
  144. // Globals
  145. //
  146. //
  147. // Progress bar stuff
  148. //
  149. var g_iTimerID = -1;
  150. //
  151. // HelpCenter context
  152. //
  153. var idCtx = parent.idCtx;
  154. //
  155. // SAF Class Factory object
  156. //
  157. var oSAFClassFactory = parent.oSAFClassFactory;
  158. //
  159. // SAFRemoteAssistanceHelper object stores the state of the Helper UI
  160. //
  161. var g_oSAFRemoteAssistanceHelper = parent.g_oSAFRemoteAssistanceHelper;
  162. //
  163. // Show or Hide Progess bar
  164. //
  165. var g_bProgessBar = false;
  166. //
  167. // IM Session
  168. //
  169. var g_oSession = null;
  170. //
  171. // Transition flag
  172. //
  173. var g_bTransitioned = false;
  174. /*++
  175. Control handling routines
  176. --*/
  177. #define RA_IM_COMPLETE 0x1
  178. #define RA_IM_WAITFORCONNECT 0x2
  179. #define RA_IM_CONNECTTOSERVER 0x3
  180. #define RA_IM_APPSHUTDOWN 0x4
  181. #define RA_IM_SENDINVITE 0x5
  182. #define RA_IM_ACCEPTED 0x6
  183. #define RA_IM_DECLINED 0x7
  184. #define RA_IM_NOAPP 0x8
  185. #define RA_IM_TERMINATED 0x9
  186. #define RA_IM_CANCELLED 0xA
  187. #define RA_IM_UNLOCK_WAIT 0xB
  188. #define RA_IM_UNLOCK_FAILED 0xC
  189. #define RA_IM_UNLOCK_SUCCEED 0xD
  190. #define RA_IM_UNLOCK_TIMEOUT 0xE
  191. #define RA_IM_CONNECTTOEXPERT 0xF
  192. #define RA_IM_EXPERT_TICKET_OUT 0x10
  193. #define RA_IM_FAILED 0x11
  194. var g_bReverseConnectReady = false;
  195. //
  196. // Security Check
  197. //
  198. function DoLoad()
  199. {
  200. MAC_IF_DIRECTLAUNCH_CLIENT
  201. {
  202. idBody.style.visibility = "hidden";
  203. alert( L_ERRACCESSDENIED_Text );
  204. return;
  205. }
  206. }
  207. function DoUnLoad()
  208. {
  209. TraceFunctEnter("DoUnLoad");
  210. try
  211. {
  212. DebugTrace("Calling parent.RCDisconnect...");
  213. parent.RCDisconnect();
  214. DebugTrace("parent.RCDisconnect completed successfully.");
  215. try
  216. {
  217. if (g_oSession) // Error happens, need to notify the waiting party.
  218. {
  219. DebugTrace("Calling g_oSession.Notify with Argument=RA_IM_TERMINATED");
  220. g_oSession.Notify(RA_IM_TERMINATED);
  221. DebugTrace("g_oSession.Notify completed successfully");
  222. g_oSession.UninitObjects();
  223. g_oSession = null;
  224. }
  225. }
  226. catch(e)
  227. {
  228. // do nothing.
  229. }
  230. }
  231. catch(error)
  232. {
  233. parent.FatalError( parent.L_RCCTL_Text, error);
  234. }
  235. TraceFunctLeave();
  236. }
  237. //
  238. // InitializeRAClient: Stuff done when the RCTool page is loaded in the helpctr
  239. //
  240. function InitializeRAClient()
  241. {
  242. MAC_IF_DIRECTLAUNCH_CLIENT
  243. {
  244. return;
  245. }
  246. try
  247. {
  248. //
  249. // Initialize tracing
  250. //
  251. InitTrace();
  252. TraceFunctEnter("InitializeRAClient");
  253. #ifdef _STRUCT_ERR
  254. var szRetVal = null;
  255. var bRetVal = true;
  256. #endif
  257. DebugTrace("Setting size of idRemoteControlObject to be 1x1");
  258. idRemoteControlObject.style.width = "1px";
  259. idRemoteControlObject.style.height = "1px";
  260. //
  261. // Set the SAF Factory object
  262. //
  263. g_oSAFRemoteAssistanceHelper.m_oSAFClassFactory = oSAFClassFactory;
  264. //
  265. // Parse the document URL to Get the location of the Incident file
  266. //
  267. #ifndef _STRUCT_ERR
  268. parent.ParseURL();
  269. #else
  270. szRetVal = parent.ParseURL();
  271. if( null == szRetVal )
  272. {
  273. //
  274. // This is the end of world. So perish
  275. //
  276. oSAFClassFactory.Close();
  277. return;
  278. }
  279. #endif
  280. if ( true == g_oSAFRemoteAssistanceHelper.m_bIsIM )
  281. {
  282. DebugTrace("g_oSAFRemoteAssistanceHelper.m_bIsIM is true");
  283. // goto ticket switch page..
  284. #ifdef _PROGRESS
  285. parent.idFrameSet3.rows="0%,0%,*";
  286. #endif
  287. DebugTrace("Calling Helper_InitIMScreen2");
  288. Helper_InitIMScreen2();
  289. TraceFunctLeave();
  290. return;
  291. }
  292. if( true == g_oSAFRemoteAssistanceHelper.m_bListen )
  293. {
  294. DebugTrace("g_oSAFRemoteAssistanceHelper.m_bListen is true");
  295. //
  296. // Listen mode
  297. //
  298. //idLayer2.style.visibility = "hidden";
  299. #ifdef _PROGRESS
  300. parent.idFrameSet3.rows="0%,0%,*";
  301. #endif
  302. idLayer2.className="PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
  303. idLayer1.style.visibility = "visible";
  304. idLayer1.className="styLayer1 Display";
  305. }
  306. else
  307. {
  308. DebugTrace("g_oSAFRemoteAssistanceHelper.m_bListen is false");
  309. //
  310. // Normal mode
  311. //
  312. //
  313. // Create a SAF Incident object and populate the incident object from the XML
  314. // representation of the incident (call LoadXML)
  315. //
  316. DebugTrace("Calling LoadIncidentFromFile");
  317. if (parent.LoadIncidentFromFile() == null)
  318. {
  319. #ifndef _STRUCT_ERR
  320. btnYES.disabled = true;
  321. return;
  322. #else
  323. //
  324. // This is the end of world. So perish
  325. //
  326. oSAFClassFactory.Close();
  327. return;
  328. #endif
  329. }
  330. //
  331. // Depending on configuration, show the 1st screen or not
  332. //
  333. if( (true == g_oSAFRemoteAssistanceHelper.m_bNoPrompt ) || ( true == g_oSAFRemoteAssistanceHelper.m_bURA ))
  334. {
  335. //
  336. // This assumes ticket to be in clear text
  337. //
  338. DebugTrace("true = g_oSAFRemoteAssistanceHelper.m_bNoPrompt || true = g_oSAFRemoteAssistanceHelper.m_bURA ");
  339. g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_szRCTicketEncrypted;
  340. //
  341. // Straightaway go to the send screen
  342. //
  343. DebugTrace("Calling Helper_InitScreen2");
  344. #ifdef _PROGRESS
  345. parent.idFrameSet3.rows="0%,0%,*";
  346. #endif
  347. #ifdef _STRUCT_ERR
  348. bRetVal = Helper_InitScreen2();
  349. if( -1 == bRetVal)
  350. {
  351. //
  352. // End of the world. Abort
  353. //
  354. oSAFClassFactory.Close();
  355. return false;
  356. }
  357. else if( false == bRetVal)
  358. {
  359. return true;
  360. }
  361. #else
  362. Helper_InitScreen2();
  363. #endif
  364. }
  365. else
  366. {
  367. //
  368. // Set the UI elements to be displayed from the data
  369. // contained in the incident object
  370. //
  371. idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
  372. btnYES.disabled = true;
  373. //idPasswordBox.disabled = true;
  374. var szTmp = g_oSAFRemoteAssistanceHelper.m_szUserName;
  375. if( szTmp.length < 20 )
  376. {
  377. window.S1TD1TR1EntryPoint.innerText = szTmp;
  378. }
  379. else
  380. {
  381. window.S1TD1TR1EntryPoint.innerText = szTmp.slice(0, 20) + "...";
  382. g_oSAFRemoteAssistanceHelper.m_szUserName = window.S1TD1TR1EntryPoint.innerText;
  383. }
  384. // window.idSender1.innerText=window.S1TD1TR1EntryPoint.innerText;
  385. var szAskMsg = null;
  386. if( false == g_oSAFRemoteAssistanceHelper.m_bExpired )
  387. {
  388. window.idInviteExpires.innerText = g_oSAFRemoteAssistanceHelper.m_szExpiryTime;
  389. }
  390. else
  391. {
  392. window.S0TD1TR2EntryPoint.innerHTML="&nbsp;&nbsp;"+L_EXPIRED_Text+"&nbsp;";
  393. window.idInviteExpires.innerHTML = g_oSAFRemoteAssistanceHelper.m_szExpiryTime;
  394. szAskMsg = L_EXPIRYMESSAGE_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_EXPIRYMESSAGE1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName;
  395. }
  396. if( null != szAskMsg )
  397. {
  398. window.idRow5.innerHTML = szAskMsg + ".<BR><BR>" + L_DOYOUCONNECT1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_DOYOUCONNECT2_Text + "<P>";
  399. }
  400. else
  401. {
  402. window.idRow5.innerHTML = L_DOYOUCONNECT1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_DOYOUCONNECT2_Text+"<P>";
  403. }
  404. //
  405. // Check to see if we need to ask for password
  406. //
  407. if(true == g_oSAFRemoteAssistanceHelper.m_oCurrentIncident.RCTicketEncrypted)
  408. {
  409. //
  410. // RCTicket is encrypted. We need to ask for the password
  411. //
  412. /* addition of row for Password */
  413. var oRow=EntryPoint.insertRow(3);
  414. oRow.name="TR3EntryPoint";
  415. oRow.id="TR3EntryPoint";
  416. oRow.insertCell(0);
  417. oRow.cells(0).name="TD0TR3EntryPoint";
  418. oRow.cells(0).id="TD0TR3EntryPoint";
  419. oRow.cells(0).className="sys-table-cell-bgcolor3 width3";
  420. 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>";
  421. oRow.insertCell(1);
  422. oRow.cells(1).name="TD1TR3EntryPoint";
  423. oRow.cells(1).id="TD1TR3EntryPoint";
  424. oRow.cells(1).className="sys-inlineform-bgcolor1 Maxwidth";
  425. 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>";
  426. /********************************/
  427. window.idSender1.innerText=window.S1TD1TR1EntryPoint.innerText;
  428. idPasswordBox.disabled = false;
  429. if( false == g_oSAFRemoteAssistanceHelper.m_bExpired )
  430. {
  431. DebugTrace("Calling setWindowDimensions with arguments: " + idCtx.x + "," + idCtx.y + ",410,293");
  432. idCtx.setWindowDimensions(idCtx.x,idCtx.y,425,280);
  433. }
  434. else
  435. {
  436. DebugTrace("Calling setWindowDimensions with arguments: " + idCtx.x + "," + idCtx.y + ",410, 333");
  437. idCtx.setWindowDimensions(idCtx.x,idCtx.y,425,320);
  438. }
  439. window.setTimeout('idPasswordBox.focus()',500);
  440. }
  441. else
  442. {
  443. //
  444. // RCTicket is not encrypted. Dont need to ask for the password
  445. //
  446. //
  447. // Delete the password row
  448. //
  449. //EntryPoint.deleteRow(3);
  450. if( true == g_oSAFRemoteAssistanceHelper.m_bExpired )
  451. {
  452. idCtx.setWindowDimensions(100,100,425,270);
  453. }
  454. btnYES.disabled = false;
  455. btnYES.focus();
  456. //
  457. // Ticket is in clear text
  458. //
  459. g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_szRCTicketEncrypted;
  460. }
  461. }
  462. } // Else Listen
  463. #ifdef _PROGRESS
  464. parent.idFrameSet3.rows="0%,0%,*";
  465. #endif
  466. }
  467. catch(error)
  468. {
  469. parent.FatalError( parent.L_RCCTL_Text, error);
  470. }
  471. TraceFunctLeave();
  472. return;
  473. }
  474. var g_iLoopCnt = 0;
  475. //
  476. // InitRemoteConnection: Initializes the various SAF Objects needed for network connectivity
  477. // Return Values: Returns TRUE on sucess and
  478. // FALSE on failure
  479. function InitRemoteConnection()
  480. {
  481. TraceFunctEnter("InitRemoteConnection");
  482. #if 0
  483. //
  484. // Minimize the remote control object and make it visibile since it is required
  485. // to be visible for the connection to go through
  486. //
  487. try
  488. {
  489. if( idRemoteControlObject.style.visibility == "hidden")
  490. {
  491. idRemoteControlObject.style.visibility = "visible";
  492. }
  493. DebugTrace("idRemoteControlObject.style.visibility = " + idRemoteControlObject.style.visibility);
  494. }
  495. catch(error)
  496. {
  497. parent.FatalError( parent.L_RCCTL_Text, error);
  498. return;
  499. }
  500. #endif
  501. //
  502. // If RDCHost object is correctly instantiated
  503. //
  504. if(null != idRemoteDesktopClientHost)
  505. {
  506. if( null == g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient )
  507. {
  508. try
  509. {
  510. //
  511. // Obtain the RDSClient object
  512. //
  513. DebugTrace("Calling idRemoteDesktopClientHost.GetRemoteDesktopClient");
  514. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient = idRemoteDesktopClientHost.GetRemoteDesktopClient();
  515. }
  516. catch(error)
  517. {
  518. parent.FatalError( L_ERRGETRDC_Text, error );
  519. #ifdef _STRUCT_ERR
  520. return false;
  521. #else
  522. return;
  523. #endif
  524. }
  525. try
  526. {
  527. //
  528. // Bind the event handlers for SAFRemoteDesktopClient object.
  529. //
  530. DebugTrace("Calling SAFRemoteDesktopClient.OnConnected");
  531. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnConnected = function()
  532. { Helper_ConnectedHandler(); }
  533. DebugTrace("Calling SAFRemoteDesktopClient.OnDisconnected");
  534. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnDisconnected = function(reason)
  535. { Helper_DisconnectedHandler(reason); }
  536. DebugTrace("Calling OnConnectRemoteDesktopComplete");
  537. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnConnectRemoteDesktopComplete = function(status)
  538. { Helper_RemoteDesktopCompleteHandler(status); }
  539. #ifdef _ONBEFORE_CONNECT
  540. DebugTrace("Calling SAFRemoteDesktopClient.OnBeginConnect");
  541. try
  542. {
  543. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnBeginConnect = function()
  544. { DebugTrace("SAFRemoteDesktopClient.OnBeginConnect"); Helper_EnableChatAndTools(); }
  545. }
  546. catch(error)
  547. {
  548. if ( -2146827850 != error.number )
  549. {
  550. parent.FatalError( L_ERRBINDINGEVTS_Text, error);
  551. #ifdef _STRUCT_ERR
  552. return false;
  553. #else
  554. return;
  555. #endif
  556. }
  557. //
  558. // else: This is for backward compatibility
  559. //
  560. }
  561. #endif
  562. //
  563. // Hide the RDCHost control
  564. //
  565. DebugTrace("Hiding idRemoteControlObject");
  566. idRemoteControlObject.style.visibility = "hidden";
  567. }
  568. catch(error)
  569. {
  570. parent.FatalError( L_ERRBINDINGEVTS_Text, error);
  571. #ifdef _STRUCT_ERR
  572. return false;
  573. #else
  574. return;
  575. #endif
  576. }
  577. }
  578. }
  579. else
  580. {
  581. //
  582. // Fatal Error
  583. //
  584. parent.FatalError( L_ERRRDSCLIENTHOST_Text );
  585. #ifdef _STRUCT_ERR
  586. return false;
  587. #endif
  588. }
  589. TraceFunctLeave();
  590. #ifdef _STRUCT_ERR
  591. return true;
  592. #else
  593. return;
  594. #endif
  595. }
  596. //
  597. // Helper_ConnectedHandler: Handles onConnected Event on RDCHost
  598. //
  599. function Helper_ConnectedHandler()
  600. {
  601. TraceFunctEnter("Helper_ConnectedHandler");
  602. try
  603. {
  604. if (g_oSAFRemoteAssistanceHelper.m_bIsIM)
  605. {
  606. g_oSAFRemoteAssistanceHelper.m_IMListening = false;
  607. }
  608. try
  609. {
  610. if (g_oSession)
  611. {
  612. g_oSession.Notify(RA_IM_COMPLETE);
  613. g_oSession.UninitObjects();
  614. g_oSession = null;
  615. }
  616. }
  617. catch(e)
  618. {
  619. // Not a fatal error. do nothing.
  620. }
  621. }
  622. catch(error)
  623. {
  624. parent.FatalError( parent.L_RCCTL_Text, error);
  625. return;
  626. }
  627. try
  628. {
  629. parent.SoundBeep();
  630. parent.g_oSAFRemoteAssistanceHelper.m_szHelpeeIP = g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectedServer;
  631. #ifdef _ONCONNECT_INIT
  632. DebugTrace("Calling Helper_CompleteConnectionStatus");
  633. Helper_CompleteConnectionStatus();
  634. //
  635. // Launch the Remote Assistance control panel + chat windows after a few moments
  636. //
  637. setTimeout(Helper_EnableChatAndTools, 2000);
  638. #else
  639. g_oSAFRemoteAssistanceHelper.m_bConnected = true;
  640. Helper_InitChatAndTools();
  641. #endif
  642. #ifdef _BVT
  643. if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
  644. {
  645. parent.ReportBVTResult( c_szBVTPASS );
  646. }
  647. #endif
  648. }
  649. catch(error)
  650. {
  651. parent.FatalError( parent.L_RCCTL_Text, error);
  652. }
  653. TraceFunctLeave();
  654. return;
  655. }
  656. function SetChatFocus()
  657. {
  658. try
  659. {
  660. parent.frames.idFrameChat.idchatText.focus();
  661. }
  662. catch(error)
  663. {
  664. // Ignore
  665. }
  666. }
  667. function Helper_InitChatAndTools()
  668. {
  669. TraceFunctEnter("Helper_InitChatAndTools");
  670. try
  671. {
  672. DebugTrace("Calling Helper_InitializeRAChatClient");
  673. parent.frames.idFrameChat.Helper_InitializeRAChatClient();
  674. parent.frames.idFrameChat.idchatText.readOnly = false;
  675. parent.frames.idFrameChat.idchatText.disabled = false;
  676. parent.frames.idFrameChat.btnSendChat.disabled = false;
  677. DebugTrace("Calling Helper_InitializeStatus");
  678. parent.frames.idFrameStatus.Helper_InitializeStatus();
  679. DebugTrace("Calling Helper_InitializeTools");
  680. parent.frames.idFrameTools.Helper_InitializeTools();
  681. parent.frames.idFrameTools.idTB.SetState( "btnTakeControl", true );
  682. parent.frames.idFrameTools.idTB.SetState( "btnSendFile_1", true );
  683. parent.frames.idFrameTools.idTB.SetState( "btnOptions", true );
  684. }
  685. catch(error)
  686. {
  687. parent.FatalError( parent.L_RCCTL_Text, error);
  688. }
  689. TraceFunctLeave();
  690. }
  691. //
  692. // Helper_EnableChatAndTools: Launches control panel + chat window modules
  693. //
  694. function Helper_EnableChatAndTools()
  695. {
  696. TraceFunctEnter("Helper_EnableChatAndTools");
  697. var L_PRECONNECTSTATUS0_Text = "<strong>Status:&nbsp;</strong> ";
  698. var L_PRECONNECTSTATUS_Text = "Waiting for ";
  699. var L_PRECONNECTSTATUS1_Text = " to accept your offer of Remote Assistance...";
  700. var L_PRECONNECTSTATUSNEW_Text="Waiting for an answer...";
  701. try
  702. {
  703. //
  704. // Show the chat frame...
  705. //
  706. idBody.scroll="no";
  707. idRemoteControlObject.style.width = "100%";
  708. idRemoteControlObject.style.height = "100%";
  709. parent.idFrameSet2.cols="235px,*";
  710. //
  711. // Display the toolbar...
  712. //
  713. parent.idFrameSet1.rows="30px,3px,*";
  714. //
  715. // Display the statusbar...
  716. //
  717. #ifdef _PROGRESS
  718. parent.idFrameSet3.rows="0%,33px,*";
  719. #else
  720. parent.idFrameSet3.rows="33px,*";
  721. #endif
  722. #ifdef _ONCONNECT_INIT
  723. DebugTrace("Calling Helper_InitializeRAChatClient");
  724. parent.frames.idFrameChat.Helper_InitializeRAChatClient();
  725. DebugTrace("Calling Helper_InitializeStatus");
  726. parent.frames.idFrameStatus.Helper_InitializeStatus();
  727. DebugTrace("Calling Helper_InitializeTools");
  728. parent.frames.idFrameTools.Helper_InitializeTools();
  729. #else
  730. //var szStatus = L_PRECONNECTSTATUS0_Text + L_PRECONNECTSTATUS_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_PRECONNECTSTATUS1_Text;
  731. var szStatus= L_PRECONNECTSTATUS0_Text+L_PRECONNECTSTATUSNEW_Text;
  732. parent.frames.idFrameStatus.idStatus.innerHTML = "&nbsp;&nbsp;" + szStatus;
  733. parent.frames.idFrameTools.DisableToolbar();
  734. parent.frames.idFrameTools.idTB.SetState( "btnQuit_1", true );
  735. parent.frames.idFrameTools.idTB.SetState( "btnHelp", true );
  736. parent.frames.idFrameChat.idchatText.readOnly = true;
  737. parent.frames.idFrameChat.idchatText.disabled = true;
  738. parent.frames.idFrameChat.btnSendChat.disabled = true;
  739. parent.frames.idFrameChat.idIncomingChatText.disabled = false;
  740. szStatus = "----------\n\n" + L_PRECONNECTSTATUSNEW_Text + "\n\n----------\n\n";
  741. parent.frames.idFrameChat.Helper_UpdateChatHistory( szStatus );
  742. g_bTransitioned = true;
  743. #endif
  744. //
  745. // Hide the helpee chat if necessary
  746. //
  747. if( true == g_oSAFRemoteAssistanceHelper.m_bNoChat )
  748. {
  749. DebugTrace("Calling Helper_HideChat");
  750. parent.frames.idFrameStatus.Helper_HideChat();
  751. }
  752. idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
  753. idRemoteControlObject.style.visibility = "visible";
  754. g_oSAFRemoteAssistanceHelper.m_idCtx.maximized = true;
  755. #ifdef _ONCONNECT_INIT
  756. g_oSAFRemoteAssistanceHelper.m_bConnected = true;
  757. #endif
  758. // parent.frames.idFrameScreen.idBody.className = "styclientBody";
  759. DebugTrace("Instantiating m_oFso");
  760. parent.g_oSAFRemoteAssistanceHelper.m_oFso = new ActiveXObject("Scripting.FileSystemObject"); // File system object
  761. DebugTrace("Instantiating m_oRCFileDlg");
  762. parent.g_oSAFRemoteAssistanceHelper.m_oRCFileDlg = new ActiveXObject("SAFRCFileDlg.FileSave"); // File SaveAs dialog object
  763. DebugTrace("Calling ToggleSmartScaling");
  764. ToggleSmartScaling();
  765. if( false == g_oSAFRemoteAssistanceHelper.m_bNoChat )
  766. {
  767. DebugTrace("Calling parent.frames.idFrameChat.SetFocus");
  768. parent.frames.idFrameChat.SetFocus();
  769. }
  770. DebugTrace("Connection established...");
  771. }
  772. catch(error)
  773. {
  774. parent.FatalError( parent.L_RCCTL_Text , error);
  775. }
  776. TraceFunctLeave();
  777. return;
  778. }
  779. //
  780. // ToggleSmartScaling: Toggles between smartscaled mode and real size mode
  781. //
  782. function ToggleSmartScaling()
  783. {
  784. TraceFunctEnter("EnableSmartScaling");
  785. try
  786. {
  787. DebugTrace("Instantiating " + szProgIDSetting );
  788. var obj = new ActiveXObject( szProgIDSetting );
  789. DebugTrace("Calling GetProfileString with parameter = Scaling");
  790. g_oSAFRemoteAssistanceHelper.m_bEnableSmartScaling = obj.GetProfileString("Scaling");
  791. if(true == g_oSAFRemoteAssistanceHelper.m_bEnableSmartScaling)
  792. {
  793. DebugTrace("Setting SAFRemoteDesktopClient.EnableSmartSizing = true");
  794. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = true;
  795. parent.frames.idFrameStatus.Helper_UpdateMode( true );
  796. }
  797. else
  798. {
  799. DebugTrace("Setting SAFRemoteDesktopClient.EnableSmartSizing = false");
  800. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.EnableSmartSizing = false;
  801. parent.frames.idFrameStatus.Helper_UpdateMode( false );
  802. }
  803. }
  804. catch(error)
  805. {
  806. parent.FatalError( parent.L_RCCTL_Text, error);
  807. }
  808. TraceFunctLeave();
  809. }
  810. //
  811. // DisplayConnectionDisconnectMessage:
  812. //
  813. function DisplayConnectionDisconnectMessage( reason )
  814. {
  815. TraceFunctEnter("DisplayConnectionDisconnectMessage");
  816. try
  817. {
  818. var szErrMsg = null;
  819. DebugTrace("reason: " + reason);
  820. switch( reason ) {
  821. case 4:
  822. case 37:
  823. //szErrMsg = g_oSAFRemoteAssistanceHelper.m_szUserName + SAFDisconnectError[ reason ];
  824. szErrMsg = SAFDisconnectError[ reason ];
  825. break;
  826. case 24:
  827. szErrMsg = SAFDisconnectError[ reason ] + g_oSAFRemoteAssistanceHelper.m_szUserName;
  828. break;
  829. case 41:
  830. szErrMsg = SAFDisconnectError[ reason ] + g_oSAFRemoteAssistanceHelper.m_szUserName + L_SAFError41b_Text;
  831. break;
  832. default:
  833. szErrMsg = SAFDisconnectError[ reason ];
  834. break;
  835. }
  836. #if _ONCONNECT_INIT
  837. I0TD0TR0t0idEnunciator.src = "../../Common/icon_warning_32x.gif";
  838. S0TD2TR0t0idEnunciator.innerText = szErrMsg;
  839. idCancel.value = "OK";
  840. idBody.focus();
  841. idCancel.focus();
  842. #else
  843. if( true == g_bTransitioned )
  844. {
  845. parent.frames.idFrameStatus.Helper_UpdateStatus( parent.L_DISCONNECTED_Text );
  846. parent.frames.idFrameChat.Helper_UpdateChatHistory( szErrMsg );
  847. parent.DisplayMessage( szErrMsg );
  848. }
  849. else
  850. {
  851. I0TD0TR0t0idEnunciator.src = "../../Common/icon_warning_32x.gif";
  852. S0TD2TR0t0idEnunciator.innerText = szErrMsg;
  853. idCancel.value = "OK";
  854. idBody.focus();
  855. idCancel.focus();
  856. }
  857. #endif
  858. DebugTrace("szErrMsg: " + szErrMsg);
  859. }
  860. catch(error)
  861. {
  862. parent.FatalError( parent.L_RCCTL_Text, error);
  863. }
  864. }
  865. function ShutdownUI( reason )
  866. {
  867. TraceFunctEnter("ShutdownUI");
  868. try
  869. {
  870. //
  871. // Close down RC Connection. Graceful termination.
  872. //
  873. parent.SoundBeep();
  874. g_oSAFRemoteAssistanceHelper.m_bConnected = false;
  875. //
  876. // Disconnected
  877. //
  878. parent.frames.idFrameChat.idBody.onmouseover = "function{ }";
  879. parent.frames.idFrameChat.idchatText.readOnly = true;
  880. parent.frames.idFrameChat.idchatText.disabled = true;
  881. parent.frames.idFrameChat.btnSendChat.disabled = true;
  882. parent.frames.idFrameChat.idIncomingChatText.disabled = false;
  883. parent.frames.idFrameScreen.idBody.disabled = true;
  884. parent.frames.idFrameTools.DisableToolbar();
  885. parent.frames.idFrameStatus.Helper_UpdateStatus( parent.L_DISCONNECTED_Text );
  886. parent.frames.idFrameStatus.idBody.disabled = true;
  887. parent.CloseOpenSubWin();
  888. }
  889. catch(error)
  890. {
  891. // Ignore
  892. }
  893. TraceFunctLeave();
  894. }
  895. //
  896. // Helper_DisconnectedHandler: Handles onDisconnected Event on RDCHost
  897. //
  898. function Helper_DisconnectedHandler(reason)
  899. {
  900. TraceFunctEnter("Helper_DisconnectedHandler");
  901. try
  902. {
  903. DebugTrace("Reason: " + reason + " Description: " + SAFDisconnectError[ reason ] + " g_oSAFRemoteAssistanceHelper.m_bConnected: " + g_oSAFRemoteAssistanceHelper.m_bConnected);
  904. // Disconnect the voice session if active
  905. if (parent.g_bVoipConnected == true)
  906. {
  907. if( null != g_oSAFRemoteAssistanceHelper.m_oSAFIntercomClient )
  908. {
  909. g_oSAFRemoteAssistanceHelper.m_oSAFIntercomClient.Disconnect();
  910. }
  911. }
  912. switch ( reason ) {
  913. case 0:
  914. // SAFERROR_NOERROR
  915. case 3:
  916. // SAFERROR_LOCALNOTERROR
  917. case 5:
  918. // SAFERROR_BYSERVER
  919. //
  920. // Disconnect or other Action Initiated by Application (Helpee disconnected)
  921. //
  922. //
  923. // Delete the current timer, if necessary
  924. //
  925. if( 0 <= g_iTimerID )
  926. {
  927. clearTimeout( g_iTimerID );
  928. g_iTimerID = -1;
  929. }
  930. if( g_oSAFRemoteAssistanceHelper.m_bConnected == false )
  931. {
  932. //
  933. // Display Connection Disconnect Message
  934. //
  935. DisplayConnectionDisconnectMessage( reason );
  936. }
  937. else
  938. {
  939. ShutdownUI( reason );
  940. if( 5 == reason )
  941. {
  942. parent.UserDisconnect();
  943. }
  944. }
  945. #ifdef _BVT
  946. if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
  947. {
  948. parent.frames.idFrameChat.Helper_UpdateChatHistory( c_szBVTPASS );
  949. parent.ReportBVTResult( c_szBVTPASS );
  950. parent.ShutDownBVT();
  951. g_oSAFRemoteAssistanceHelper.m_oSAFClassFactory.Close();
  952. }
  953. #endif
  954. break;
  955. default:
  956. //
  957. // All other messages go here...
  958. //
  959. #ifdef _BVT
  960. if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
  961. {
  962. parent.ReportBVTResult( c_szBVTFAIL );
  963. parent.ShutDownBVT();
  964. g_oSAFRemoteAssistanceHelper.m_oSAFClassFactory.Close();
  965. }
  966. #endif
  967. if( g_oSAFRemoteAssistanceHelper.m_bConnected == false )
  968. {
  969. //
  970. // Delete the current timer, if necessary
  971. //
  972. if( 0 <= g_iTimerID )
  973. {
  974. clearTimeout( g_iTimerID );
  975. g_iTimerID = -1;
  976. }
  977. //
  978. // Display Connection Disconnect Message
  979. //
  980. DisplayConnectionDisconnectMessage( reason );
  981. //
  982. // End Tracing
  983. //
  984. TraceFunctLeave();
  985. EndTrace();
  986. }
  987. else
  988. {
  989. ShutdownUI( reason );
  990. }
  991. break;
  992. }
  993. parent.frames.idFrameScreen.g_oSAFRemoteAssistanceHelper.m_bConnected = false;
  994. }
  995. catch(error)
  996. {
  997. parent.FatalError( parent.L_RCCTL_Text, error);
  998. }
  999. return;
  1000. }
  1001. //
  1002. // Helper_RemoteDesktopCompleteHandler: Fired on receiving the OnRemoteControl event
  1003. //
  1004. function Helper_RemoteDesktopCompleteHandler(status)
  1005. {
  1006. TraceFunctEnter("Helper_RemoteDesktopCompleteHandler");
  1007. var bDisconnect = false;
  1008. var L_ERRSHADOW1_Text = "Your connection to the ";
  1009. var L_ERRSHADOW2_Text = " has closed. This might be because ";
  1010. var L_ERRSHADOW3_Text = "'s screen resolution changed. To reconnect, reopen the invitation.";
  1011. var L_ERRTAKECONTROL1_Text = "The screen resolution has been changed, which caused you to lose keyboard and mouse control of ";
  1012. var L_ERRTAKECONTROL2_Text = "'s computer. To request control again, click \"Take Control\".";
  1013. try
  1014. {
  1015. DebugTrace("status: " + status );
  1016. switch ( status ) {
  1017. case 300:
  1018. // SAFERROR_SHADOWEND_BASE
  1019. DebugTrace("SAFERROR_SHADOWEND_BASE");
  1020. break;
  1021. case 301:
  1022. // SAFERROR_SHADOWEND_CONFIGCHANGE
  1023. DebugTrace("SAFERROR_SHADOWEND_CONFIGCHANGE");
  1024. try
  1025. {
  1026. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectRemoteDesktop();
  1027. //
  1028. // If we are in control mode, revert back to view mode
  1029. //
  1030. if( true == parent.idFrameTools.g_oSAFRemoteAssistanceHelper.m_bRCEnabled )
  1031. {
  1032. parent.idFrameTools.Helper_TakeControl();
  1033. var szMsg = L_ERRTAKECONTROL1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_ERRTAKECONTROL2_Text;
  1034. parent.DisplayMessage( szMsg );
  1035. parent.Helper_SendControlCommand( c_szAbortRC );
  1036. }
  1037. }
  1038. catch(error)
  1039. {
  1040. bDisconnect = true;
  1041. }
  1042. break;
  1043. case 302:
  1044. // SAFERROR_SHADOWEND_UNKNOWN
  1045. DebugTrace("SAFERROR_SHADOWEND_UNKNOWN");
  1046. bDisconnect = true;
  1047. break;
  1048. }
  1049. if( true == bDisconnect )
  1050. {
  1051. if( 301 == status )
  1052. {
  1053. var szMsg = L_ERRSHADOW1_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_ERRSHADOW2_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_ERRSHADOW3_Text;
  1054. parent.DisplayMessage( szMsg );
  1055. }
  1056. parent.UserDisconnect();
  1057. parent.frames.idFrameTools.Helper_QuitMethod();
  1058. TraceFunctLeave();
  1059. return;
  1060. }
  1061. }
  1062. catch(error)
  1063. {
  1064. // Ignore
  1065. }
  1066. TraceFunctLeave();
  1067. return;
  1068. }
  1069. //
  1070. // Helper_PasswordSet: Use password as key to decrypt RCTicket on data entry.
  1071. //
  1072. function Helper_PasswordSet()
  1073. {
  1074. TraceFunctEnter("Helper_PasswordSet");
  1075. try
  1076. {
  1077. if( true == btnYES.disabled)
  1078. {
  1079. btnYES.disabled = false;
  1080. }
  1081. if (window.event.keyCode == 13)
  1082. {
  1083. //
  1084. // Decrypt the RCTicket
  1085. //
  1086. #ifdef _STRUCT_ERR
  1087. var bRetVal = true;
  1088. bRetVal = Helper_InitScreen2();
  1089. if( -1 == bRetVal )
  1090. {
  1091. //
  1092. // End of the world. Abort
  1093. //
  1094. oSAFClassFactory.Close();
  1095. return false;
  1096. }
  1097. else if( false == bRetVal )
  1098. {
  1099. return true;
  1100. }
  1101. #else
  1102. Helper_InitScreen2();
  1103. #endif
  1104. }
  1105. }
  1106. catch(error)
  1107. {
  1108. parent.FatalError( parent.L_RCCTL_Text, error);
  1109. #ifdef _STRUCT_ERR
  1110. return false;
  1111. #endif
  1112. }
  1113. TraceFunctLeave();
  1114. return;
  1115. }
  1116. #ifdef _STRUCT_ERR
  1117. function onYes()
  1118. {
  1119. try
  1120. {
  1121. var bRetVal = Helper_InitScreen2();
  1122. if( -1 == bRetVal )
  1123. {
  1124. //
  1125. // End of the world. Abort
  1126. //
  1127. oSAFClassFactory.Close();
  1128. return false;
  1129. }
  1130. else if ( false == bRetVal )
  1131. {
  1132. return true;
  1133. }
  1134. }
  1135. catch(error)
  1136. {
  1137. //
  1138. // End of the world. Abort. This though is an overkill. There should not be
  1139. // any exceptions at this level
  1140. //
  1141. oSAFClassFactory.Close();
  1142. return;
  1143. }
  1144. }
  1145. #endif
  1146. function OnPassWrdKeyUp()
  1147. {
  1148. if((idPasswordBox.value=="")&&(btnYES.disabled==false))
  1149. btnYES.disabled = true;
  1150. }
  1151. // Get PassStub
  1152. function GetPassStub()
  1153. {
  1154. TraceFunctEnter("GetPassStub");
  1155. try
  1156. {
  1157. if (false == g_oSAFRemoteAssistanceHelper.m_bPasswordSet)
  1158. {
  1159. //
  1160. // Get the passStub
  1161. //
  1162. g_oSAFRemoteAssistanceHelper.m_szPassword = idPasswordBox.value;
  1163. DebugTrace("Calling oEncryption.EncryptString");
  1164. g_oSAFRemoteAssistanceHelper.m_szPassStub = g_oSAFRemoteAssistanceHelper.m_oEncryption.EncryptString(idPasswordBox.value, g_oSAFRemoteAssistanceHelper.m_oDict.Item("PassStub"));
  1165. g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_oCurrentIncident.RCTicket;
  1166. g_oSAFRemoteAssistanceHelper.m_bPasswordSet = true;
  1167. }
  1168. }
  1169. catch (error)
  1170. {
  1171. idPasswordBox.value = "";
  1172. btnYES.disabled = true;
  1173. alert( L_ERRPWD_Text );
  1174. idPasswordBox.focus();
  1175. }
  1176. TraceFunctLeave();
  1177. return g_oSAFRemoteAssistanceHelper.m_bPasswordSet;
  1178. }
  1179. function DoReverseConnect(bHasBeenCalled)
  1180. {
  1181. TraceFunctEnter("DoReverseConnect");
  1182. if (g_bReverseConnectReady)
  1183. {
  1184. //DoConnectToServer();
  1185. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.AcceptListenConnection(
  1186. g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
  1187. }
  1188. else if (bHasBeenCalled != 1) // wait for 5 seconds.
  1189. { //It happens only when direct connect is slower than MSN server.
  1190. setTimeout("DoReverseConnect(1)", 5000);
  1191. }
  1192. else // Looks like ReverseConnect failed.
  1193. {
  1194. DoConnectToServer();
  1195. }
  1196. TraceFunctLeave();
  1197. }
  1198. function DoConnectToServer()
  1199. {
  1200. TraceFunctEnter("DoConnectToServer");
  1201. if (g_oSAFRemoteAssistanceHelper.m_IMListening) // Reverse connect failed.
  1202. {
  1203. g_oSAFRemoteAssistanceHelper.m_IMListening = false;
  1204. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectToServer(g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
  1205. }
  1206. TraceFunctLeave();
  1207. }
  1208. function OnIMConnectTimeout()
  1209. {
  1210. try
  1211. {
  1212. TraceFunctEnter("OnIMConnectTimeout");
  1213. if (g_oSession != null) // Timeout. Connection channel broken or.
  1214. // Novice doesn't click 'yes/no' dialog
  1215. {
  1216. g_oSession.UninitObjects();
  1217. g_oSession = null;
  1218. Helper_DisconnectedHandler(8); // SAFERROR_CONNECTIONTIMEDOUT
  1219. }
  1220. TraceFunctLeave();
  1221. }
  1222. catch (error)
  1223. {
  1224. parent.FatalError( parent.L_RCCTL_Text, error);
  1225. TraceFunctLeave();
  1226. }
  1227. }
  1228. function OnSessionStatus(Status)
  1229. {
  1230. TraceFunctEnter("OnSessionStatus");
  1231. try
  1232. {
  1233. // Expert blob stuff
  1234. switch (Status)
  1235. {
  1236. case RA_IM_CONNECTTOSERVER:
  1237. var s = g_oSession.ReceivedUserTicket;
  1238. if (g_oSession.ContextDataProperty("L") == 1 || // User is using modem.
  1239. oSAFClassFactory.Connectivity.IsAModem)
  1240. {
  1241. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 8;
  1242. }
  1243. else
  1244. {
  1245. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 16;
  1246. }
  1247. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectParms = s;
  1248. DoReverseConnect();
  1249. break;
  1250. case RA_IM_EXPERT_TICKET_OUT:
  1251. // Start to listen.
  1252. // goto listen mode
  1253. g_oSAFRemoteAssistanceHelper.m_IMListening = true;
  1254. //alert('Start Listening...');
  1255. // Then we wait for user to do reverse-connect back for test.
  1256. // Setup connection point for reverse connection.
  1257. DebugTrace("Calling StartListening with parameter = 120");
  1258. StartListening( 120 );
  1259. //alert('Start Listening...');
  1260. break;
  1261. case RA_IM_FAILED:
  1262. g_oSession.UninitObjects();
  1263. g_oSession = null;
  1264. Helper_DisconnectedHandler(1); // SAFERROR_NOINFO
  1265. break;
  1266. default:
  1267. // Do nothing for now.
  1268. break;
  1269. }
  1270. }
  1271. catch(error)
  1272. {
  1273. parent.FatalError( parent.L_RCCTL_Text, error);
  1274. }
  1275. TraceFunctLeave();
  1276. }
  1277. #define SAFERROR_STOPLISTENBYUSER 51
  1278. function OnListenConnect_IM(ErrorCode)
  1279. {
  1280. TraceFunctEnter("OnListenConnect_IM");
  1281. try
  1282. {
  1283. if( false == g_oSAFRemoteAssistanceHelper.m_bListen )
  1284. {
  1285. //
  1286. // IM case
  1287. //
  1288. if (ErrorCode == SAFERROR_STOPLISTENBYUSER)
  1289. {
  1290. return;
  1291. }
  1292. g_bReverseConnectReady = true;
  1293. }
  1294. else
  1295. {
  1296. //
  1297. // PSS case
  1298. //
  1299. TR2T0idLayer1.style.visibility = "visible";
  1300. }
  1301. }
  1302. catch( error )
  1303. {
  1304. parent.FatalError( parent.L_RCCTL_Text, error);
  1305. }
  1306. TraceFunctLeave();
  1307. return;
  1308. }
  1309. function OnListenConnect(ErrorCode)
  1310. {
  1311. TraceFunctEnter("OnListenConnect");
  1312. try
  1313. {
  1314. if( false == g_oSAFRemoteAssistanceHelper.m_bListen )
  1315. {
  1316. //
  1317. // IM case
  1318. //
  1319. if (g_oSAFRemoteAssistanceHelper.m_IMListening == false)
  1320. return;
  1321. g_oSAFRemoteAssistanceHelper.m_IMListening = false; // this event should happen only once.
  1322. if (ErrorCode == SAFERROR_STOPLISTENBYUSER)
  1323. {
  1324. return;
  1325. }
  1326. DebugTrace("Calling AcceptListenConnection");
  1327. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.AcceptListenConnection(
  1328. g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
  1329. }
  1330. else
  1331. {
  1332. //
  1333. // PSS case
  1334. //
  1335. TR2T0idLayer1.style.visibility = "visible";
  1336. }
  1337. }
  1338. catch( error )
  1339. {
  1340. parent.FatalError( parent.L_RCCTL_Text, error);
  1341. }
  1342. TraceFunctLeave();
  1343. return;
  1344. }
  1345. function InitListenMode()
  1346. {
  1347. TraceFunctEnter("InitListenMode");
  1348. var sExpertTicket = null;
  1349. try
  1350. {
  1351. InitRemoteConnection();
  1352. // 2. Get expert ticket
  1353. DebugTrace("Calling SAFRemoteDesktopClient.CreateListenEndpoint");
  1354. g_oSAFRemoteAssistanceHelper.m_szExpertTicket = g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.CreateListenEndpoint(0); // use dynamic port
  1355. }
  1356. catch(error)
  1357. {
  1358. parent.FatalError( parent.L_RCCTL_Text, error);
  1359. }
  1360. TraceFunctLeave();
  1361. return g_oSAFRemoteAssistanceHelper.m_szExpertTicket;
  1362. }
  1363. function StartListening( iTimeout )
  1364. {
  1365. TraceFunctEnter("StartListening");
  1366. try
  1367. {
  1368. DebugTrace("Calling SAFRemoteDesktopClient.OnListenConnect");
  1369. if (g_oSAFRemoteAssistanceHelper.m_bIsIM)
  1370. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnListenConnect = OnListenConnect_IM;
  1371. else
  1372. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.OnListenConnect = OnListenConnect;
  1373. DebugTrace("Calling oSAFRemoteDesktopClient.StartListen with parameter = " + iTimeout );
  1374. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.StartListen(iTimeout);
  1375. }
  1376. catch(error)
  1377. {
  1378. parent.FatalError( parent.L_RCCTL_Text, error);
  1379. }
  1380. TraceFunctLeave();
  1381. }
  1382. function Helper_InitIMScreen2()
  1383. {
  1384. TraceFunctEnter("Helper_InitIMScreen2");
  1385. var sExpertTicket = null;
  1386. try
  1387. {
  1388. //
  1389. // Provide UI first. Hide all the divs, except the one that displays connection status
  1390. //
  1391. idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 Display";
  1392. //idLayer2.style.visibility = "hidden";
  1393. idLayer2.className="PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
  1394. idConnectionProgressLayer.focus();
  1395. ConnectStarted=0;
  1396. DebugTrace("Instantiating rcbdyctl.IMSession");
  1397. // Exchange ticket here.
  1398. // Load Session Object
  1399. g_oSession = new ActiveXObject("rcbdyctl.IMSession");
  1400. // set callback function
  1401. DebugTrace("Setting oSession.OnSessionStatus");
  1402. g_oSession.OnSessionStatus = OnSessionStatus;
  1403. // connect to session
  1404. DebugTrace("Calling GetLaunchingSession with parameter = " + g_oSAFRemoteAssistanceHelper.m_SessionID );
  1405. g_oSession.GetLaunchingSession( g_oSAFRemoteAssistanceHelper.m_SessionID );
  1406. DebugTrace("Calling InitListenMode");
  1407. sExpertTicket = InitListenMode();
  1408. g_oSAFRemoteAssistanceHelper.m_szUserName = g_oSession.User.FriendlyName;
  1409. Helper_UpdateConnectionStatus();
  1410. // create blob
  1411. DebugTrace("Calling GetLocalUser");
  1412. var oMsgr = new ActiveXObject("Messenger.UIAutomation");
  1413. g_oSAFRemoteAssistanceHelper.m_szLocalUser = parent.EscapedName(oMsgr.MyFriendlyName);
  1414. //g_oSAFRemoteAssistanceHelper.m_szLocalUser = parent.GetLocalUser();
  1415. #ifdef _PERFOPTIMIZE
  1416. g_oSAFRemoteAssistanceHelper.m_szExpertBlob = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) +
  1417. ";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser + "6;MSRA=114;PERFOPTIMIZE=" +
  1418. ((g_oSAFRemoteAssistanceHelper.m_bPerfOptimize)?"1":"0");
  1419. #else
  1420. g_oSAFRemoteAssistanceHelper.m_szExpertBlob = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) +
  1421. ";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser +
  1422. ((g_oSAFRemoteAssistanceHelper.m_bPerfOptimize)?"1":"0");
  1423. #endif
  1424. // Test only. Wait until inviter give me data.
  1425. DebugTrace("Calling SendOutExpertTicket");
  1426. setTimeout("OnIMConnectTimeout()", 900000); // set timeout in 15 minutes.
  1427. g_oSession.SendOutExpertTicket(sExpertTicket);
  1428. } catch (error)
  1429. {
  1430. g_oSession.UninitObjects();
  1431. g_oSession = null; // fatal error: release IM session.
  1432. parent.FatalError( parent.L_RCCTL_Text, error);
  1433. }
  1434. TraceFunctLeave();
  1435. return;
  1436. }
  1437. //
  1438. // Helper_InitScreen2: Initializes Screen 2
  1439. // Return Values: true on SUCCESS
  1440. // false and -1 on FAILURE. This function and it's children in the call tree would have
  1441. // displayed the error to the user. Hence the calling routines should just
  1442. // check for the return value and cleanup
  1443. // -1: close helpctr
  1444. // 0: dont close helpctr
  1445. function Helper_InitScreen2()
  1446. {
  1447. TraceFunctEnter("Helper_InitScreen2");
  1448. try
  1449. {
  1450. //
  1451. // Initialize the remote network connection objects
  1452. //
  1453. #ifdef _STRUCT_ERR
  1454. if ( false == InitRemoteConnection())
  1455. {
  1456. //
  1457. // InitRemoteConnection failed. So we can not connect
  1458. // to the novice. So we abort and return to caller
  1459. //
  1460. return -1;
  1461. }
  1462. #else
  1463. InitRemoteConnection();
  1464. #endif
  1465. //
  1466. // Decrypt RCTicket if necessary
  1467. //
  1468. if(true == g_oSAFRemoteAssistanceHelper.m_oCurrentIncident.RCTicketEncrypted)
  1469. {
  1470. if (idPasswordBox.value=="")
  1471. {
  1472. parent.DisplayMessage(L_ERRPWD_Text);
  1473. idPasswordBox.focus();
  1474. #ifdef _STRUCT_ERR
  1475. return true;
  1476. #else
  1477. return;
  1478. #endif
  1479. }
  1480. else
  1481. {
  1482. //
  1483. // Decrypt RCTicket
  1484. //
  1485. if(false == GetPassStub())
  1486. {
  1487. //
  1488. // Invalid password. Re-enter
  1489. //
  1490. #ifdef _STRUCT_ERR
  1491. return true;
  1492. #else
  1493. return;
  1494. #endif
  1495. }
  1496. }
  1497. }
  1498. //
  1499. // Hide all the divs, except the one that displays connection status
  1500. //
  1501. idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 Display";
  1502. //idLayer2.style.visibility = "hidden";
  1503. idLayer2.className="positionA zindex2 sys-inlineform-bgcolor1 DisplayNone";
  1504. ConnectStarted=0;
  1505. //
  1506. // Make the remote connection
  1507. //
  1508. #ifdef _BVT
  1509. if ( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
  1510. {
  1511. parent.g_oBVT[ parent.g_iTest ].TEST = "Test " + parent.g_iTest + " Session Connect";
  1512. var oDate = new Date();
  1513. parent.g_oBVT[ parent.g_iTest ].START_TIME = oDate.toLocaleString();
  1514. }
  1515. #endif
  1516. #ifdef _STRUCT_ERR
  1517. if( false == RAEstablishConnection())
  1518. {
  1519. //
  1520. // Connection request has failed. Morph UI to error dialog and display error
  1521. //
  1522. DisplayConnectionDisconnectMessage( 28 );
  1523. //
  1524. // Since we have handled the error in a useful manner here, we dont want to propagate this higher.
  1525. return false;
  1526. }
  1527. #else
  1528. RAEstablishConnection();
  1529. #endif
  1530. }
  1531. catch(error)
  1532. {
  1533. parent.FatalError( parent.L_RCCTL_Text, error);
  1534. #ifdef _STRUCT_ERR
  1535. return -1;
  1536. #endif
  1537. }
  1538. TraceFunctLeave();
  1539. #ifdef _STRUCT_ERR
  1540. return true;
  1541. #else
  1542. return;
  1543. #endif
  1544. }
  1545. function CreateExpertBlob()
  1546. {
  1547. TraceFunctEnter( "CreateExpertBlob" );
  1548. var sTemp = null;
  1549. try
  1550. {
  1551. g_oSAFRemoteAssistanceHelper.m_szLocalUser = parent.GetLocalUser();
  1552. #ifdef _BVT
  1553. var szBVTTester = c_szBVTTESTER;
  1554. if( true == g_oSAFRemoteAssistanceHelper.m_bBVT )
  1555. {
  1556. sTemp = ( 5 + szBVTTester.length) + ";NAME=" + szBVTTester;
  1557. }
  1558. else
  1559. {
  1560. sTemp = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) + ";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser;
  1561. }
  1562. #else
  1563. sTemp = ( 5 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length) + ";NAME=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser;
  1564. #endif
  1565. if ( g_oSAFRemoteAssistanceHelper.m_szPassStub != "" )
  1566. {
  1567. sTemp += (5 + g_oSAFRemoteAssistanceHelper.m_szPassStub.length) + ";PASS=" + g_oSAFRemoteAssistanceHelper.m_szPassStub;
  1568. }
  1569. //
  1570. // Performance Optimization information passed via userblob
  1571. //
  1572. #ifdef _PERFOPTIMIZE
  1573. if( true == g_oSAFRemoteAssistanceHelper.m_bMSRA )
  1574. {
  1575. sTemp += 6 + ";MSRA=1";
  1576. }
  1577. else
  1578. {
  1579. sTemp += 6 + ";MSRA=0";
  1580. }
  1581. #endif
  1582. #if 0
  1583. if( true == g_oSAFRemoteAssistanceHelper.m_bURA )
  1584. {
  1585. sTemp += 5 + ";URA=1";
  1586. }
  1587. else
  1588. {
  1589. sTemp += 5 + ";URA=0";
  1590. }
  1591. sTemp += ( 6 + g_oSAFRemoteAssistanceHelper.m_szLocalUser.length ) + ";BUDDY=" + g_oSAFRemoteAssistanceHelper.m_szLocalUser; // TODO: This should not be hard coded
  1592. sTemp += 6 + ";FILE=0"; // TODO: This should not be hard coded
  1593. #endif
  1594. //alert("sTemp: " + sTemp );
  1595. }
  1596. catch(error)
  1597. {
  1598. parent.FatalError( parent.L_RCCTL_Text, error);
  1599. return;
  1600. }
  1601. g_oSAFRemoteAssistanceHelper.m_szExpertBlob = sTemp;
  1602. TraceFunctLeave();
  1603. return sTemp;
  1604. }
  1605. //
  1606. // RAEstablishConnection connects to the user's terminal
  1607. // Return Values: TRUE on SUCCESS
  1608. // FALSE on FAILURE. Callers should look at return value for error cleanup
  1609. //
  1610. function RAEstablishConnection()
  1611. {
  1612. TraceFunctEnter("RAEstablishConnection");
  1613. var sTemp = ""
  1614. g_iTimerID = -1;
  1615. //
  1616. // If RDCHost object is correctly instantiated
  1617. //
  1618. if(null != idRemoteDesktopClientHost )
  1619. {
  1620. if(null != g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient)
  1621. {
  1622. try
  1623. {
  1624. //
  1625. // Update connection status
  1626. //
  1627. #ifdef _STRUCT_ERR
  1628. if( false == Helper_UpdateConnectionStatus())
  1629. {
  1630. return false;
  1631. }
  1632. #else
  1633. Helper_UpdateConnectionStatus();
  1634. #endif
  1635. //
  1636. // Set the connection parameters
  1637. //
  1638. DebugTrace("setting SAFRemoteDesktopClient.ConnectParms");
  1639. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectParms = g_oSAFRemoteAssistanceHelper.m_szRCTicket;
  1640. g_oSAFRemoteAssistanceHelper.m_szCurrentIP = g_oSAFRemoteAssistanceHelper.m_szHelpeeIP;
  1641. //
  1642. // User blob stuff
  1643. //
  1644. sTemp = CreateExpertBlob();
  1645. //
  1646. // Make the connection
  1647. //
  1648. DebugTrace("Calling SAFRemoteDesktopClient.ConnectToServer");
  1649. if( true == g_oSAFRemoteAssistanceHelper.m_bPerfOptimize )
  1650. {
  1651. try
  1652. {
  1653. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 8;
  1654. }
  1655. catch(error)
  1656. {
  1657. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 16;
  1658. }
  1659. }
  1660. else
  1661. {
  1662. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth = 16;
  1663. }
  1664. DebugTrace("g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth: " + g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ColorDepth);
  1665. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectToServer( sTemp );
  1666. }
  1667. catch(error)
  1668. {
  1669. parent.FatalError( L_ERRCONNECTION_Text, error);
  1670. return;
  1671. }
  1672. }
  1673. else
  1674. {
  1675. //
  1676. // Fatal Error
  1677. //
  1678. parent.FatalError( L_ERRRDSCLIENT_Text );
  1679. return;
  1680. }
  1681. }
  1682. else
  1683. {
  1684. //
  1685. // Fatal Error
  1686. //
  1687. parent.FatalError( L_ERRRDSCLIENTHOST_Text );
  1688. }
  1689. TraceFunctLeave();
  1690. return;
  1691. }
  1692. //
  1693. // Helper_UpdateConnectionStatus: Updates the connection progress status
  1694. // Return Values: TRUE on Sucess
  1695. // FALSE on Failure. Callers should look at return value for error cleanup
  1696. //
  1697. function Helper_UpdateConnectionStatus()
  1698. {
  1699. TraceFunctEnter("Helper_UpdateConnectionStatus");
  1700. try
  1701. {
  1702. if( false == g_oSAFRemoteAssistanceHelper.m_bURA )
  1703. {
  1704. I0TD0TR0t0idEnunciator.src = "animation.gif";
  1705. S0TD2TR0t0idEnunciator.innerText = L_ConnectTo_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + "...";
  1706. }
  1707. else
  1708. {
  1709. I0TD0TR0t0idEnunciator.src = "animation.gif";
  1710. S0TD2TR0t0idEnunciator.innerText = L_ConnectToURA_Text + "...";
  1711. }
  1712. idCtx.setWindowDimensions(idCtx.x,idCtx.y,425,145);
  1713. #ifndef _ONBEFORE_CONNECT
  1714. setTimeout(Helper_EnableChatAndTools, 2000);
  1715. #endif
  1716. }
  1717. catch(error)
  1718. {
  1719. parent.FatalError( parent.L_ERRFATAL_Text, error );
  1720. #ifdef _STRUCT_ERR
  1721. return false;
  1722. #endif
  1723. }
  1724. TraceFunctLeave();
  1725. #ifdef _STRUCT_ERR
  1726. return true;
  1727. #else
  1728. return;
  1729. #endif
  1730. }
  1731. //
  1732. // Helper_CompleteConnectionStatus: Completes the progress bar and dismisses the timer
  1733. //
  1734. function Helper_CompleteConnectionStatus()
  1735. {
  1736. TraceFunctEnter("Helper_CompleteConnectionStatus");
  1737. try
  1738. {
  1739. I0TD0TR0t0idEnunciator.src = "connected.gif";
  1740. S0TD2TR0t0idEnunciator.innerText = L_ConnectionSuccess_Text + g_oSAFRemoteAssistanceHelper.m_szUserName + L_NOVICESCOMPUTER_Text;
  1741. }
  1742. catch(error)
  1743. {
  1744. parent.FatalError( parent.L_ERRFATAL_Text, error );
  1745. }
  1746. TraceFunctLeave();
  1747. return;
  1748. }
  1749. function document.onkeydown()
  1750. {
  1751. try
  1752. {
  1753. switch( window.event.keyCode ) {
  1754. case 0x8:
  1755. if ( window.event.srcElement.id != "idPasswordBox")
  1756. {
  1757. window.event.returnValue=false;
  1758. }
  1759. break;
  1760. case 0x9:
  1761. if( window.event.srcElement.id == "btnNO" )
  1762. {
  1763. if ( (btnYES.disabled == false ) && ( idPasswordBox.disabled == true ))
  1764. {
  1765. btnYES.focus();
  1766. window.event.returnValue = false;
  1767. }
  1768. else
  1769. {
  1770. idPasswordBox.focus();
  1771. window.event.returnValue = false;
  1772. }
  1773. }
  1774. if (g_oSAFRemoteAssistanceHelper.m_bConnected == false)
  1775. {
  1776. if( (window.event.srcElement.id != "idPasswordBox" ) && (window.event.srcElement.id != "btnYES" ))
  1777. {
  1778. window.event.returnValue = false;
  1779. }
  1780. }
  1781. break;
  1782. case 0x1B:
  1783. if((idConnectionProgressLayer.className=="PositionA zindex2 sys-inlineform-bgcolor1 Display")||(idLayer2.className=="PositionA zindex2 sys-inlineform-bgcolor1 Display"))
  1784. {
  1785. oSAFClassFactory.Close();
  1786. window.event.returnValue=false;
  1787. }
  1788. break;
  1789. }
  1790. }
  1791. catch(error)
  1792. {
  1793. btnYES.focus();// problem
  1794. window.event.returnValue = false;
  1795. }
  1796. }
  1797. function PSSStartListen()
  1798. {
  1799. TraceFunctEnter("PSSStartListen");
  1800. try
  1801. {
  1802. InitListenMode();
  1803. TR1T0idLayer1.style.visibility = "visible";
  1804. B0idLayer1.disabled = true;
  1805. }
  1806. catch(error)
  1807. {
  1808. parent.FatalError( parent.L_RCCTL_Text, error);
  1809. }
  1810. TraceFunctLeave();
  1811. }
  1812. #define c_iTimeout 3600 // 1 hour timeout
  1813. function SaveExpertTicket()
  1814. {
  1815. TraceFunctEnter("SaveExpertTicket");
  1816. try
  1817. {
  1818. //
  1819. // Save Expert ticket to File
  1820. //
  1821. DebugTrace("Instantiating Scripting.FileSystemObject");
  1822. var oFS = new ActiveXObject("Scripting.FileSystemObject");
  1823. DebugTrace("Calling OpenTextFile with params = " + InputSaveExpertTix.value + ",2, true");
  1824. var oFile = oFS.OpenTextFile( InputSaveExpertTix.value, 2, true );
  1825. DebugTrace("Calling Write");
  1826. oFile.Write( g_oSAFRemoteAssistanceHelper.m_szExpertTicket );
  1827. DebugTrace("Calling Close");
  1828. oFile.Close();
  1829. //
  1830. // Start Listening
  1831. //
  1832. DebugTrace("Calling StartListening");
  1833. StartListening( c_iTimeout );
  1834. }
  1835. catch(error)
  1836. {
  1837. parent.FatalError( parent.L_RCCTL_Text, error);
  1838. }
  1839. TraceFunctLeave();
  1840. }
  1841. function OpenNoviceTicket()
  1842. {
  1843. TraceFunctEnter("OpenNoviceTicket");
  1844. try
  1845. {
  1846. //
  1847. // Hide all the divs, except the one that displays connection status
  1848. //
  1849. TR2T0idLayer1.style.visibility = "hidden";
  1850. TR1T0idLayer1.style.visibility = "hidden";
  1851. TR0T0idLayer1.style.visibility = "hidden";
  1852. //idLayer1.style.visibility = "hidden";
  1853. idLayer1.className="styLayer1 DisplayNone";
  1854. idConnectionProgressLayer.className = "PositionA zindex2 sys-inlineform-bgcolor1 Display";
  1855. ConnectStarted=0;
  1856. DebugTrace("Changing to Kioskmode");
  1857. idCtx.ChangeContext( "kioskmode", "");
  1858. DebugTrace("Calling Helper_UpdateConnectionStatus");
  1859. //
  1860. // Read the novice ticket from File
  1861. //
  1862. g_oSAFRemoteAssistanceHelper.m_bLoadFromFile = true;
  1863. g_oSAFRemoteAssistanceHelper.m_szIncidentFile = InputReadNoviceTix.value;
  1864. parent.LoadIncidentFromFile();
  1865. g_oSAFRemoteAssistanceHelper.m_szRCTicket = g_oSAFRemoteAssistanceHelper.m_szRCTicketEncrypted; // TODO: Deal with Pwd encrypted file
  1866. DebugTrace("ConnectParms: " + parent.g_oSAFRemoteAssistanceHelper.m_szRCTicket);
  1867. Helper_UpdateConnectionStatus();
  1868. //
  1869. // Establish connection
  1870. //
  1871. DebugTrace("Calling CreateExpertBlob...");
  1872. CreateExpertBlob();
  1873. DebugTrace("Setting ConnectParms...");
  1874. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.ConnectParms = parent.g_oSAFRemoteAssistanceHelper.m_szRCTicket;
  1875. DebugTrace("Calling AcceptListenConnection");
  1876. g_oSAFRemoteAssistanceHelper.m_oSAFRemoteDesktopClient.AcceptListenConnection(
  1877. g_oSAFRemoteAssistanceHelper.m_szExpertBlob);
  1878. }
  1879. catch(error)
  1880. {
  1881. parent.FatalError( parent.L_RCCTL_Text, error);
  1882. }
  1883. TraceFunctLeave();
  1884. }
  1885. function OnClickSaveAs()
  1886. {
  1887. TraceFunctEnter("OnClickSaveAs");
  1888. try
  1889. {
  1890. DebugTrace("Instantiating SAFRCFileDlg.FileSave");
  1891. var obj = new ActiveXObject("SAFRCFileDlg.FileSave");
  1892. var x;
  1893. DebugTrace("Calling OpenFileSaveDlg");
  1894. x = obj.OpenFileSaveDlg();
  1895. if (x)
  1896. {
  1897. InputSaveExpertTix.value = obj.FileName;
  1898. }
  1899. InputSaveExpertTix.focus();
  1900. SaveButton.disabled = false;
  1901. }
  1902. catch(error)
  1903. {
  1904. parent.FatalError( parent.L_RCCTL_Text, error);
  1905. }
  1906. TraceFunctLeave();
  1907. }
  1908. function OnClickOpenAs()
  1909. {
  1910. TraceFunctEnter("OnClickOpenAs");
  1911. try
  1912. {
  1913. DebugTrace("Instantiating SAFRCFileDlg.FileOpen");
  1914. var obj = new ActiveXObject("SAFRCFileDlg.FileOpen");
  1915. var x;
  1916. x=obj.OpenFileOpenDlg();
  1917. if (x)
  1918. {
  1919. InputReadNoviceTix.value = obj.FileName;
  1920. }
  1921. InputReadNoviceTix.focus();
  1922. }
  1923. catch(error)
  1924. {
  1925. parent.FatalError( parent.L_RCCTL_Text, error);
  1926. }
  1927. TraceFunctLeave();
  1928. }
  1929. //handling "arrow keys"
  1930. function TabOrder(id)
  1931. {
  1932. TraceFunctEnter("TabOrder");
  1933. try
  1934. {
  1935. if ((event.keyCode==39) || (event.keyCode==37))
  1936. {
  1937. if (id==0)
  1938. {
  1939. btnNO.focus();
  1940. event.returnValue=false;
  1941. }
  1942. else
  1943. {
  1944. btnYES.focus();
  1945. event.returnValue=false;
  1946. }
  1947. }
  1948. }
  1949. catch(error)
  1950. {
  1951. event.srcElement.focus();
  1952. window.event.returnValue = false;
  1953. }
  1954. TraceFunctLeave();
  1955. }
  1956. </script>
  1957. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  1958. </head>
  1959. <STYLE id="LocalStyles" name="LocalStyles">
  1960. .styLayer1
  1961. {
  1962. position: absolute;
  1963. z-index: 2;
  1964. visibility: hidden;
  1965. }
  1966. .height7
  1967. {
  1968. height:18px;
  1969. }
  1970. .width3
  1971. {
  1972. width:72px;
  1973. }
  1974. .zindex1
  1975. {
  1976. z-index:1;
  1977. }
  1978. .zindex2
  1979. {
  1980. z-index:2;
  1981. }
  1982. .PositionA
  1983. {
  1984. position:absolute;
  1985. }
  1986. .padding9
  1987. {
  1988. padding-bottom:6px;
  1989. }
  1990. .rdchostcontainerbackground
  1991. {
  1992. border: 2px solid #CBD7F1;
  1993. }
  1994. </STYLE>
  1995. <body id="idBody" name="idBody" class="sys-inlineform-bgcolor1" tabindex=-1 onunload="DoUnLoad();"
  1996. onload="DoLoad();InitializeRAClient()">
  1997. <div id="idLayer1" name="idLayer1" class="styLayer1 DisplayNone" >
  1998. <table id="T0idLayer1" name="T0idLayer1">
  1999. <TR id="TR0T0idLayer1" name="TR0T0idLayer1">
  2000. <TD id="TD0T0idLayer1" name="TD0T0idLayer1" colspan=2>
  2001. 1. To initiate listen mode, click on the "Listen button" &nbsp;&nbsp;&nbsp;&nbsp;
  2002. <BUTTON id="B0idLayer1" name="B0idLayer1" class="styButton Border" onclick="PSSStartListen()" tabindex=1 accesskey="L">
  2003. <u>L</u>isten
  2004. </BUTTON>
  2005. </TD>
  2006. </TR>
  2007. <TR id="TR1T0idLayer1" name="TR1T0idLayer1" style="visibility:hidden">
  2008. <TD id="TD0TR1T0idLayer1" name="TD0TR1T0idLayer1">
  2009. 2. Enter Filename to save the Expert side ticket:
  2010. <input tabindex=2 id="InputSaveExpertTix" name="InputSaveExpertTix" type="Text" class="Border" style="width:295px;" onkeypress=SaveExpertTicket()>
  2011. </input>
  2012. </TD>
  2013. <TD id="TD1TR1T0idLayer1" name="TD1TR1T0idLayer1">
  2014. <span id="S0TD1TR1T0idLayer1" name="S0TD1TR1T0idLayer1" class="valignbottom">
  2015. <button tabindex=3 class="styButton Border" id="BrowseButton" name="BrowseButton" onclick="OnClickSaveAs()" accesskey="B">
  2016. <u>B</u>rowse...
  2017. </button>
  2018. <button tabindex=4 class="styButton Border" id="SaveButton" name="SaveButton" onclick="SaveExpertTicket()" accesskey="S" disabled>
  2019. &nbsp;<u>S</u>ave
  2020. </button>
  2021. </span>
  2022. </TD>
  2023. </TR>
  2024. <TR id="TR2T0idLayer1" name="TR2T0idLayer1" style="visibility:hidden">
  2025. <TD id="TD0TR2T0idLayer1" name="TD0TR2T0idLayer1">
  2026. 3. Enter Filename containing the ticket from novice:
  2027. <input tabindex=5 id="InputReadNoviceTix" name="InputReadNoviceTix" type="Text" class="Border" style="width:295px;" onkeypress="OpenNoviceTicket()"></input>
  2028. </TD>
  2029. <TD id="TD1TR2T0idLayer1" name="TD1TR2T0idLayer1">
  2030. <span id="S0TD1TR2T0idLayer1" name="S0TD1TR2T0idLayer1" class="valignbottom">
  2031. <button tabindex=6 class="styButton Border" id="BrowseButton2" name="BrowseButton2" onclick="OnClickOpenAs()" accesskey="B">
  2032. <u>B</u>rowse...
  2033. </button>
  2034. <button tabindex=7 class="styButton Border" id="ConnectButton" name="ConnectButton" onclick="OpenNoviceTicket()" accesskey="C">
  2035. &nbsp;<u>C</u>onnect
  2036. </button>
  2037. </span>
  2038. </TD>
  2039. </TR>
  2040. </Table>
  2041. </div>
  2042. <div id="idLayer2" name="idLayer2" class="PositionA zindex2 sys-inlineform-bgcolor1 Display">
  2043. <table id="idMainTable" name="idMainTable" cellspacing="0px" cellpadding="0px" class="MaxLayout">
  2044. <TR>
  2045. <TD class="padding6 padding4 padding3">
  2046. <Table id="T0" name="T0" cellpadding="0px" cellspacing="0px" border=0 class="Maxlayout">
  2047. <TR id="TR0T0" name="TR0T0">
  2048. <TD id="TD0TR0T0" name="TD0TR0T0" class="padding5 padding8 padding9">
  2049. <table name="EntryPoint" id="EntryPoint" cellspacing="1px" class="MaxLayout sys-table-header-bgcolor2">
  2050. <tr name="TR0EntryPoint" id="TR0EntryPoint"> <!-- start of row 1 -->
  2051. <td name="TD0TR0EntryPoint" id="TD0TR0EntryPoint" colspan="2" class="sys-table-cell-bgcolor1 height7" >
  2052. <span name="S0TD0TR0EntryPoint" id="S0TD0TR0EntryPoint" align="left" class="sys-font-body sys-color-body" id="idTitle">
  2053. &nbsp;&nbsp;Remote Assistance Invitation
  2054. </span>
  2055. </td>
  2056. </tr> <!-- End of row 1 -->
  2057. <tr name="TR1EntryPoint" id="TR1EntryPoint"> <!-- Start of row 2 -->
  2058. <td name="TD0TR1EntryPoint" id="TD0TR1EntryPoint" class="sys-table-cell-bgcolor3 height7 width3">
  2059. <div name="D0TD0TR1EntryPoint" id="D0TD0TR1EntryPoint" align="right" class="sys-font-body sys-color-body">
  2060. From:&nbsp;&nbsp;
  2061. </div>
  2062. </td>
  2063. <td name="TD1TR1EntryPoint" id="TD1TR1EntryPoint" class="sys-inlineform-bgcolor1 height7 MaxWidth">
  2064. <span name="S0TD1TR1EntryPoint" id="S0TD1TR1EntryPoint">
  2065. &nbsp;
  2066. </span>
  2067. <span id="S1TD1TR1EntryPoint" name="S1TD1TR1EntryPoint" class="sys-font-body sys-color-body">
  2068. &nbsp;
  2069. </span>
  2070. </td>
  2071. </tr> <!-- End of row 2 -->
  2072. <tr name="TR2EntryPoint" id="TR2EntryPoint"> <!-- start of row 3 -->
  2073. <td name="TD0TR2EntryPoint" id="TD0TR2EntryPoint" class="sys-table-cell-bgcolor3 height7 width3" nowrap>
  2074. <div name="D0TD0TR2EntryPoint" id="D0TD0TR2EntryPoint" class="sys-font-body sys-color-body" align="right">
  2075. Expires on:&nbsp;&nbsp;
  2076. </div>
  2077. </td>
  2078. <td name="TD1TR2EntryPoint" id="TD1TR2EntryPoint" class="sys-inlineform-bgcolor1 height7 MaxWidth">
  2079. <Span name="S0TD1TR2EntryPoint" id="S0TD1TR2EntryPoint" class="sys-font-body-bold sys-color-body">
  2080. &nbsp;
  2081. </span>
  2082. <span id="idInviteExpires" name="idInviteExpires" class="sys-font-body sys-color-body">
  2083. &nbsp;
  2084. </span>
  2085. </td>
  2086. </tr> <!-- end of row 3 -->
  2087. <!-- <tr name="TR3EntryPoint" id="TR3EntryPoint">--> <!-- start of row 4 -->
  2088. <!--<td name="TD0TR3EntryPoint" id="TD0TR3EntryPoint" class="sys-table-cell-bgcolor3 width3">
  2089. <Div align="right" class="sys-font-body sys-color-body MaxLayout" id="idRow41" name="idRow41">
  2090. <BR id="idBr2" name="idBr2">
  2091. Password:&nbsp;&nbsp;
  2092. </Div>
  2093. </td>
  2094. <td name="TD1TR3EntryPoint" id="TD1TR3EntryPoint" class="sys-inlineform-bgcolor1">
  2095. <table id="T0TD1TR3EntryPoint" name="T0TD1TR3EntryPoint" border=0 cellspacing="6px" cellpadding="0px" class="MaxLayout">
  2096. <tr>
  2097. <td>
  2098. <input type="password" id="idPasswordBox" name="idPasswordBox" class="MaxWidth" onkeypress=Helper_PasswordSet() onkeyup=OnPassWrdKeyUp() tabindex=1>
  2099. </td>
  2100. </tr>
  2101. <tr>
  2102. <td id="idtdText" name="idtdText">
  2103. <span id="idRow4" name="idRow4" class="sys-font-body sys-color-body">
  2104. If you do not know the password, contact <span id="idSender1" name="idSender1">&nbsp;</span>.
  2105. </span>
  2106. </td>
  2107. </tr>
  2108. </table>
  2109. </td>
  2110. </tr>--> <!-- End of row 4 -->
  2111. </table>
  2112. </TD>
  2113. </TR>
  2114. <TR name="TR0btnRow" id="TR0btnRow"> <!-- start of row 5 -->
  2115. <TD name="TD1TR0btnRow" id="TD1TR0btnRow" class="padding5 padding8">
  2116. <span class="sys-font-body sys-color-body" id="idRow5" name="idRow5">
  2117. &nbsp;
  2118. </span>
  2119. </td>
  2120. </tr> <!-- end of row 5 -->
  2121. <tr>
  2122. <td class="Height8">
  2123. </td>
  2124. </Tr>
  2125. <tr name="TR1btnRow" id="TR1btnRow"> <!-- start of row 6 -->
  2126. <td name="TD0TR1btnRow" id="TD0TR1btnRow" colspan=2 align="right" class="valignbottom padding5">
  2127. <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>
  2128. <Span id="idblankSpace" name="idblankSpace" class="width8"></Span>
  2129. <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>
  2130. </td>
  2131. </tr> <!-- end of row 6 -->
  2132. </table>
  2133. </TD>
  2134. </TR>
  2135. </Table>
  2136. </div> <!-- end of layer 2 -->
  2137. <div id="idConnectionProgressLayer" name="idConnectionProgressLayer" class="PositionA zindex2 sys-inlineform-bgcolor1 DisplayNone">
  2138. <Table id="T0idConnectionProgressLayer" name="T0idConnectionProgressLayer" class="MaxLayout" cellspacing="0px" cellpadding="0px" border=0>
  2139. <TR>
  2140. <TD class="padding6 padding4 padding3">
  2141. <Table class="MaxLayout" cellspacing="0px" cellpadding="0px" border=0>
  2142. <TR>
  2143. <TD id="TD0TR0t0idEnunciator" name="TD0TR0t0idEnunciator" class="width8 height8 padding1">
  2144. <img id="I0TD0TR0t0idEnunciator" name="I0TD0TR0t0idEnunciator" src="connected.gif" ALT="Connecting to remote computer image">
  2145. </TD>
  2146. <TD><Span id="idblankSpace" name="idblankSpace" class="width8"></Span></TD>
  2147. <TD id="TD2TR0t0idEnunciator" name="TD2TR0t0idEnunciator" class="height8 padding1">
  2148. <span class="sys-font-body sys-color-body" align="left" id="S0TD2TR0t0idEnunciator" name="S0TD2TR0t0idEnunciator">
  2149. &nbsp;
  2150. </span>
  2151. </TD>
  2152. </TR>
  2153. <TR>
  2154. <TD class="height5" colspan="3">
  2155. </TD>
  2156. </TR>
  2157. <TR>
  2158. <TD id="idbtnContainer" name="idbtnContainer" align="center" colspan="3" class="valignbottom">
  2159. <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>
  2160. </TD>
  2161. </TR>
  2162. </Table>
  2163. </TD>
  2164. </TR>
  2165. </Table>
  2166. </div>
  2167. <div id="idRemoteControlObject" name="idRemoteControlObject" class="PositionA zindex1 MaxLayout padding3 padding7 sys-homepage-bgcolor">
  2168. <OBJECT classid=clsid:299BE050-E83E-4DB7-A7DA-D86FDEBFE6D0
  2169. data=data:application/x-oleobject;base64,UOCbKT7ot02n2thv3r/m0AADAAAlQgAAnDEAAA==
  2170. id="idRemoteDesktopClientHost" name="idRemoteDesktopClientHost"
  2171. class="MaxLayout rdchostcontainerbackground"
  2172. VIEWASTEXT>
  2173. </OBJECT>
  2174. </div>
  2175. </body>
  2176. </html>