593 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			593 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <HTML>
 | |
| <!--
 | |
| Copyright (c) 2000 Microsoft Corporation
 | |
| -->
 | |
| <HEAD>
 | |
| <meta http-equiv="MSThemeCompatible" content="Yes">
 | |
| <TITLE>Remote Assistance</TITLE>
 | |
| <LINK id="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
 | |
|  		
 | |
| <SCRIPT Language="JScript">
 | |
| //
 | |
| // SAF Class Factory object
 | |
| //
 | |
| var oSAFClassFactory = null;
 | |
| 
 | |
| //
 | |
| // Security Check
 | |
| //
 | |
| function DoLoad()
 | |
| {
 | |
| 	var L_ERRACCESSDENIED_MSG	= "Directly launching this page is not allowed. ";
 | |
| 
 | |
| 	if( null == parent.TraceFunctEnter )
 | |
| 	{
 | |
| 		idBody.style.visibility = "hidden";
 | |
| 		alert( L_ERRACCESSDENIED_MSG );
 | |
| 		return;
 | |
| 	}
 | |
| }
 | |
| 
 | |
| //
 | |
| // InitRAServerToolBar: Initiates the RC Session
 | |
| //
 | |
| function InitRAServerToolBar() 
 | |
| {	
 | |
| 	if (null == parent.TraceFunctEnter )
 | |
| 	{
 | |
| 		return;
 | |
| 	}
 | |
| 	parent.TraceFunctEnter("InitRAServerToolBar");
 | |
| 
 | |
| 	try
 | |
| 	{
 | |
| 
 | |
| 		// Gray out the voice button
 | |
| 		btnVoice.disabled = true;
 | |
| 	
 | |
| 		//
 | |
| 		// Connection Status
 | |
| 		//
 | |
| 		idStatus.innerText = "View Only";
 | |
| 	
 | |
| 		//
 | |
| 		// Reject RC button is disabled
 | |
| 		//
 | |
| 		idStopControl.disabled = true;
 | |
| 
 | |
| 		// Point the oSAFClassFactory to it's parent
 | |
| 		if (parent.oSAFClassFactory  != null)
 | |
| 		{
 | |
| 		    oSAFClassFactory = parent.oSAFClassFactory;
 | |
| 		}	
 | |
| 	}
 | |
| 	catch(error)
 | |
| 	{
 | |
| 		//
 | |
| 		// Fatal Error: Unable to initialize
 | |
| 		//
 | |
| 		parent.FatalError( error.description );
 | |
| 	}
 | |
|  			    
 | |
| 
 | |
| 	parent.TraceFunctLeave();		
 | |
| 	return;
 | |
| }
 | |
| 
 | |
| 	
 | |
| 
 | |
| //
 | |
| // AbortConnection: Routine that disconnects the session
 | |
| //
 | |
| function AbortConnection() 
 | |
| {	
 | |
| 	parent.TraceFunctEnter("AbortConnection");
 | |
|  	
 | |
| 	try
 | |
| 	{
 | |
| 		if( false == parent.g_bConnected )
 | |
| 		{
 | |
| 			//
 | |
| 			// Not connected
 | |
| 			//
 | |
| 			parent.TraceFunctLeave();
 | |
| 			return;
 | |
| 		}
 | |
| 
 | |
| 		//
 | |
| 		// Disconnect the connection to Helper, if the connection is broken by the Helpee
 | |
| 		//
 | |
| 		parent.g_bUserDisconnect = true;
 | |
| 		if(true == parent.g_bUserDisconnect)
 | |
| 		{
 | |
| 			DisconnectRC();
 | |
| 		}
 | |
| 
 | |
| 		if (null != parent.g_objPanic)
 | |
| 			parent.g_objPanic.ClearPanicHook();
 | |
|  			
 | |
| 		//
 | |
| 		// Close down the UI
 | |
| 		//
 | |
| 		//parent.oSAFClassFactory.Close();
 | |
| 	}
 | |
| 	catch(error)
 | |
| 	{
 | |
| 		parent.FatalError( error.description, error );
 | |
| 	}
 | |
| 			
 | |
| 	parent.TraceFunctLeave();	
 | |
| 	return;
 | |
| }
 | |
| 	
 | |
| function document.onkeydown()
 | |
| {
 | |
| 	if (window.event.keyCode==8)
 | |
| 	{
 | |
| 		window.event.returnValue=false;
 | |
| 	}
 | |
| 	
 | |
| 	if ((window.event.keyCode==9)&&(window.event.shiftKey==true)&&(window.event.srcElement.id=="idChatimg"))
 | |
| 	{
 | |
| 		parent.frames("idFrameChatBottom").document.all("sendChatButton").focus();
 | |
| 		window.event.returnValue=false;
 | |
| 	}		
 | |
| }
 | |
| 
 | |
| 
 | |
| var g_oCols = null;
 | |
| var g_oRows = null;
 | |
| var g_oWidth = null;
 | |
| var screenLeft = window.screenLeft;
 | |
| var screenTop = window.screenTop;
 | |
| 
 | |
| //
 | |
| // Helpee_HideChat: Toggles the chat box controls
 | |
| //
 | |
| function Helpee_HideChat()
 | |
| {
 | |
| 	parent.TraceFunctEnter("Helpee_HideChat");
 | |
| 	
 | |
| 	try
 | |
| 	{
 | |
| 		if( false == parent.g_bConnected )
 | |
| 		{
 | |
| 			//
 | |
| 			// Not connected
 | |
| 			//
 | |
| 			parent.TraceFunctLeave();
 | |
| 			return;
 | |
| 		}
 | |
| 
 | |
| 		if(false == parent.g_bChatBoxHidden)
 | |
| 		{		
 | |
| 			//
 | |
| 			// Chatbox is visible. Hide it
 | |
| 			//
 | |
| 			g_oCols = parent.idFrameSet1.cols;
 | |
| 			g_oRows = parent.idFrameSet0.rows;
 | |
| 			parent.idFrameSet0.rows = "*,0%";
 | |
| 			parent.idFrameSet1.cols = "0%,*";
 | |
| 			parent.g_bChatBoxHidden = true;
 | |
| 			idtogglechat.innerHTML = "  Show Chat ";
 | |
| 			idChatimg.src = "../Common/show-chat.gif";
 | |
| 
 | |
| 			//
 | |
| 			// Reduce the size of the window
 | |
| 			//
 | |
| 			screenLeft = parent.idCtx.x;
 | |
| 			screenTop = parent.idCtx.y;
 | |
| 			parent.idCtx.setWindowDimensions(  screenLeft,  screenTop, parent.c_RCControlHiddenWidth, parent.c_RCControlHiddenHeight);					 
 | |
| 		}
 | |
| 		else
 | |
| 		{
 | |
| 			//
 | |
| 			// Chatbox is Hidden. Show it
 | |
| 			//
 | |
| 			parent.idFrameSet1.cols = g_oCols;
 | |
| 			parent.idFrameSet0.rows = g_oRows;
 | |
| 			parent.g_bChatBoxHidden = false;
 | |
| 			idtogglechat.innerHTML = "  Hide Chat ";
 | |
| 			idChatimg.src = "../Common/hide-chat.gif";
 | |
| 
 | |
| 			//
 | |
| 			// Restore the size of the window
 | |
| 			//
 | |
| 			if( screenLeft != parent.idCtx.x )
 | |
| 			{
 | |
| 				screenLeft = parent.idCtx.x;
 | |
| 			}
 | |
| 
 | |
| 			if( screenTop != parent.idCtx.y )
 | |
| 			{
 | |
| 				screenTop = parent.idCtx.y;
 | |
| 			}
 | |
| 
 | |
| 			parent.idCtx.setWindowDimensions( screenLeft, screenTop, parent.c_RCChatWidth, parent.c_RCChatHeight);
 | |
| 		}
 | |
| 	}
 | |
| 	catch(error)
 | |
| 	{
 | |
| 		alert(error.description);
 | |
| 	}
 | |
| 		
 | |
| 	parent.TraceFunctLeave();
 | |
| 	return;
 | |
| }
 | |
| 	
 | |
| 	
 | |
| //
 | |
| // Disconnect: Disconnects the RC Connection made by Expert
 | |
| //
 | |
| function DisconnectRC()
 | |
| {
 | |
| 	if ( null == parent.TraceFunctEnter)
 | |
| 	{
 | |
| 		return;
 | |
| 	}	
 | |
| 	parent.TraceFunctEnter("DisconnectRC");
 | |
| 
 | |
| 	try
 | |
| 	{
 | |
| 		//
 | |
| 		// Revert back optimization settings
 | |
| 		//
 | |
| 		if ( parent.parent.g_bOptimizedPerf == true )
 | |
| 		{
 | |
| 		    parent.parent.RevertColorDepth();		
 | |
| 		}
 | |
| 
 | |
| 		// If we are connected for VoIP, then disconnect the server
 | |
| 		if ( true == parent.g_bVoipOn)
 | |
| 		{
 | |
| 			// Call StopListen() on the IntercomServer object
 | |
| 			try
 | |
| 			{
 | |
| 				parent.g_Helpee_oSAFIntercomServer.StopListen();
 | |
| 
 | |
| 				// alert("Call to StopListen() succeeded!");
 | |
| 
 | |
| 				parent.g_bVoipOn = false;
 | |
| 
 | |
| 				btnVoice.Disabled = true;
 | |
| 				
 | |
| 			}
 | |
| 			catch (e)
 | |
| 			{
 | |
| 
 | |
| 				parent.FatalError("Call to StopListen() failed!",e, false);
 | |
| 
 | |
| 			}
 | |
| 		}	
 | |
| 		
 | |
| 		if( false == parent.g_bConnected )
 | |
| 		{
 | |
| 			//
 | |
| 			// Not connected
 | |
| 			//
 | |
| 			parent.TraceFunctLeave();
 | |
| 			return;
 | |
| 		}
 | |
| 
 | |
| 
 | |
| 
 | |
| 		parent.idBody.disabled = true;
 | |
| 		parent.frames.idFrameChatTop.idBody.disabled = true;
 | |
| 		parent.frames.idFrameChatBottom.idBody.disabled = true;
 | |
| 		idBody.disabled = true;
 | |
| 
 | |
| 		idStatus.innerText = "Disconnecting...";
 | |
| 		
 | |
| 		if( true == parent.g_bConnected)
 | |
| 		{
 | |
| 			try
 | |
| 			{
 | |
| 				if(null != parent.parent.oRCSession)
 | |
| 				{
 | |
| 					parent.parent.oRCSession.Disconnect();
 | |
| 				}
 | |
| 			}
 | |
| 			catch(error)
 | |
| 			{
 | |
| 				if(error.number == -2146827850)
 | |
| 				{
 | |
| 					// 
 | |
| 					// For backward compatibility
 | |
| 					//
 | |
| 					try
 | |
| 					{	
 | |
| 						//
 | |
| 						// Send DISCONNECT to helper
 | |
| 						//
 | |
| 						parent.Helpee_SendControlCommand( parent.c_szDisconnectRC );
 | |
| 					}
 | |
| 					catch(error)
 | |
| 					{
 | |
| 						parent.FatalError( error.description );
 | |
| 					}
 | |
| 				}
 | |
| 				else
 | |
| 				{
 | |
| 					parent.FatalError( error.description );
 | |
| 				}
 | |
| 			}
 | |
| 				
 | |
| 			parent.g_bConnected = false;
 | |
| 		}
 | |
| 
 | |
| 	}
 | |
| 	catch(error)
 | |
| 	{
 | |
| 		parent.FatalError( error.description );
 | |
| 	}
 | |
| 	
 | |
| 	parent.TraceFunctLeave();
 | |
| 	parent.EndTrace();
 | |
| 
 | |
| 	return;
 | |
| }
 | |
|  
 | |
| 
 | |
| var ip= null;		
 | |
| 
 | |
| //
 | |
| // LaunchFileXfer: Launches the File Xfer UI
 | |
| //
 | |
| function LaunchFileXfer( mode )
 | |
| {
 | |
| 	parent.TraceFunctEnter("LaunchFileXfer");
 | |
| 	var vArgs			= new Array(8);
 | |
| 
 | |
| 	try
 | |
| 	{
 | |
| 		if( false == parent.g_bConnected )
 | |
| 		{
 | |
| 			//
 | |
| 			// Not connected
 | |
| 			//
 | |
| 			parent.TraceFunctLeave();
 | |
| 			return;
 | |
| 		}
 | |
| 
 | |
| 		if(0 == mode)
 | |
| 		{
 | |
| 			vArgs[0] = mode;				// Source Mode
 | |
| 			vArgs[1] = parent.g_Helpee_oControlChannel;	// Control Channel
 | |
| 			vArgs[2] = parent.g_Helpee_oSAFRemoteDesktopChannelMgr;	// Channel Manager
 | |
| 
 | |
| 			// The following is added so that a unique channel id is created for each of the 
 | |
| 			// filexfer channels. The unique channel id is IP Address.MonthDayYearMillisec
 | |
| 
 | |
| 			if(null == ip) 
 | |
| 			{
 | |
| 				ip = parent.GetLocalIPAddr();
 | |
| 			}
 | |
| 			
 | |
| 			vArgs[3] = ip; 		// Channel ID
 | |
| 			vArgs[4] = new ActiveXObject("Scripting.FileSystemObject");
 | |
| 			vArgs[5] = parent.oSAFClassFactory;	// SAF ClassFactory object
 | |
| 			vArgs[6] = parent.parent.gHelper;		// Receiver
 | |
| 
 | |
| 			try
 | |
| 			{
 | |
| 			    vArgs[7] = new ActiveXObject("SAFRCFileDlg.FileOpen");
 | |
| 			}
 | |
| 			catch (error)
 | |
| 			{
 | |
| 				FatalError( error.description, error ); 
 | |
| 			}
 | |
| 			
 | |
| 			var subWin = window.showModelessDialog( parent.c_szFileXferURL, vArgs, "dialogwidth:" + parent.c_FileXferWidth + "px;dialogHeight:" + parent.c_FileXferHeight + "px;status:no;resizable:no"); 
 | |
| 			parent.AddOpenSubWin( subWin );
 | |
| 		}
 | |
| 	}
 | |
| 	catch(error)
 | |
| 	{
 | |
| 		parent.FatalError( error.description, error );
 | |
| 	}
 | |
| 	
 | |
| 	parent.TraceFunctLeave();
 | |
| 	return;
 | |
| }
 | |
| 
 | |
| //
 | |
| // Helpee_SendVoice: Send voice across
 | |
| //
 | |
| function Helpee_SendVoice()
 | |
| {
 | |
| 	parent.TraceFunctEnter( "Helpee_SendVoice" );
 | |
| 
 | |
| 	try
 | |
| 	{
 | |
| 	
 | |
| 		//
 | |
| 		// Check if VoIP is enabled
 | |
| 		//
 | |
| 		if(false == parent.g_bVoIPEnabled )
 | |
| 		{	
 | |
| 			//
 | |
| 			// VoIP is disabled
 | |
| 			//
 | |
| 			return;
 | |
| 		}
 | |
| 			
 | |
| 		if( false == parent.g_bConnected )
 | |
| 		{
 | |
| 			//
 | |
| 			// Not connected
 | |
| 			//
 | |
| 			parent.TraceFunctLeave();
 | |
| 			return;
 | |
| 		}
 | |
| 
 | |
| 		// Gray button
 | |
| 		btnVoice.disabled = true;
 | |
| 
 | |
| 		// Disable incoming 'PreStart' requests
 | |
| 		parent.g_bStartEnabled = false;
 | |
| 
 | |
| 		// Send the Helper/Client a PreStart Message
 | |
| 		parent.Helpee_SendControlCommand( parent.c_szVoipPreStart );
 | |
| 
 | |
| 	}
 | |
| 	catch( error )
 | |
| 	{
 | |
| 		parent.FatalError( error.description, error );
 | |
| 	}
 | |
| 
 | |
| 	parent.TraceFunctLeave();
 | |
| 	return;
 | |
| 	
 | |
| }
 | |
| 
 | |
| 
 | |
| //
 | |
| // Helpee_HandleOptions: Set Options
 | |
| //
 | |
| function Helpee_HandleOptions()
 | |
| {
 | |
| 	parent.TraceFunctEnter("Helper_HandleOptions");
 | |
| 	
 | |
| 	try
 | |
| 	{
 | |
| 		if( false == parent.g_bConnected )
 | |
| 		{
 | |
| 			//
 | |
| 			// Not connected
 | |
| 			//
 | |
| 			parent.TraceFunctLeave();
 | |
| 			return;
 | |
| 		}
 | |
| 
 | |
| 		var vArgs=new Array(3);
 | |
| 		vArgs[0]=parent;
 | |
| 		vArgs[1]="";
 | |
| 		vArgs[2]="";
 | |
| 				
 | |
| 		var ret=window.showModalDialog("SettingServer.htm",vArgs,"dialogWidth:375px;dialogHeight:250px;dialogTop:200px;dialogLeft:400px;edge:raised;scroll:no;status:no;");
 | |
| 
 | |
| 	}
 | |
| 	catch( error )
 | |
| 	{
 | |
| 		parent.FatalError( error.description, error );
 | |
| 	}
 | |
| 
 | |
| 	parent.TraceFunctLeave();
 | |
| 	return;
 | |
| } 
 | |
| 
 | |
| function setfocus()
 | |
| {
 | |
| 	if( false == parent.g_bConnected )
 | |
| 	{
 | |
| 			//
 | |
| 			// Not connected
 | |
| 			//
 | |
| 			parent.TraceFunctLeave();
 | |
| 			return;
 | |
| 	}
 | |
| 	
 | |
| 	var butname=document.activeElement.id;
 | |
| 	if (butname=="btnOptions")
 | |
| 	{
 | |
| 		parent.frames("idFrameTools").document.all("FileXferId").focus();
 | |
| 		parent.frames("idFrameTools").document.all("btnOptions").focus();
 | |
| 	}
 | |
| 	else
 | |
| 	{
 | |
| 		parent.frames("idFrameTools").document.all("btnOptions").focus();
 | |
| 		parent.frames("idFrameTools").document.all(butname).focus();
 | |
| 	}
 | |
| }
 | |
| </SCRIPT>
 | |
| 
 | |
| </Head>
 | |
| <BODY id="idBody" onload='DoLoad();InitRAServerToolBar()' onunload=DisconnectRC() scroll=no tabindex=-1>
 | |
|  <Table id="idServerToolbar" class="styServerToolbar" cellpadding=0 cellspacing=3 border=0>
 | |
| 	<tr>
 | |
| 		<TD>
 | |
| 			<Table cellspacing=0 class="MaxLayout">
 | |
| 				<TR> 
 | |
| 					<td class="cursor Border" width="4px"> 
 | |
| 						<img tabindex=1 id=idChatimg name=idChatimg onkeydown="if (event.keyCode==13){idChatimg.onclick();}" onclick="setfocus();Helpee_HideChat();" title="hide chat window" src="../Common/hide-chat.gif" class="VAlign">
 | |
| 					</TD>
 | |
| 					<TD  onclick="Helpee_HideChat()" class="Cursor styRAStatusBarTableTD2" title="hide chat window">	
 | |
| 						<Span class="styText Cursor Valign" id=idtogglechat>  Hide Chat </Span>						
 | |
| 					</TD>
 | |
| 				</TR>
 | |
| 			</Table>
 | |
| 		</TD>				   
 | |
| 	</tr>
 | |
| 
 | |
| 	<tr>
 | |
| 		<td class="styText Border styServerStatus" >
 | |
| 			<STRONG> Status:</STRONG><BR>
 | |
| 			<Center><Span id=idStatus class="FontColorBlue VAlign" >  </Span></Center>
 | |
| 		</td>
 | |
| 	</tr>
 | |
| 
 | |
| 	<tr>	  
 | |
| 		<td align="left" class="styServerButton"> 
 | |
| 			<BUTTON id="idStopControl" class="stySubmitButton MaxLayout" onclick="setfocus();parent.Helpee_RejectRC(1);" tabindex=2 accesskey="C"> 
 | |
| 			    <Center>
 | |
| 					<img id="imgStopControl" src="StopControl.gif"><BR>
 | |
| 					<Span id="RejectId" class="styText"> Stop <u>C</u>ontrol </Span>					
 | |
| 				</Center>
 | |
| 			</BUTTON> 
 | |
| 	   </td>
 | |
| 	</tr>
 | |
| 
 | |
| 	<tr>
 | |
| 	   <td align="left" class="styServerButton"> 
 | |
| 			<BUTTON id="FileXferId" class="stySubmitButton MaxLayout" onclick="setfocus();LaunchFileXfer(0);" tabindex=3 accesskey="F"> 
 | |
| 				<Center>
 | |
| 					<img src="../Common/SendFile.gif" id="imgSendFile"><BR>
 | |
| 					<Span class="styText" id="txtSendFile">Send a <u>F</u>ile </Span>
 | |
| 				</Center>
 | |
| 			</BUTTON> 
 | |
| 		</td>
 | |
| 	</tr>
 | |
| 
 | |
| 	<tr>
 | |
| 	   <td align="left" class="styServerButton"> 
 | |
| 			<BUTTON id="btnVoice" class="stySubmitButton MaxLayout" onclick="setfocus();Helpee_SendVoice();" tabindex=4 accesskey="V"> 
 | |
| 				<Center>
 | |
| 					<!--<td valign=center align=center id="imgVoice" >-->
 | |
| 					<img id="imgVoicePic" src="../Common/SendVoice.gif"> <BR>  
 | |
| 					<Span class="styText" id="txtVoice"><u>V</u>oice</Span>					
 | |
| 				</Center>
 | |
| 			</BUTTON>  
 | |
| 		</td>
 | |
| 	 </tr>
 | |
| 
 | |
| 	<tr> 
 | |
| 		<td align="left" class="styServerButton"> 
 | |
| 			<BUTTON id="btnOptions" class="stySubmitButton MaxLayout" onclick="setfocus();Helpee_HandleOptions();" tabindex=5 accesskey="e">
 | |
| 				<Center>
 | |
| 					<!--<td valign=center align=center id="imgSettings" >-->
 | |
| 					<img src="../Common/Options.gif"> <BR>
 | |
| 					<Span class="styText" id="txtSettings" >S<u>e</u>ttings	</Span>
 | |
| 				</Center>		
 | |
| 			</BUTTON>  
 | |
| 		</td>
 | |
| 	</tr>
 | |
| 	<tr>
 | |
| 		<td align="left" class="styServerButton"> 
 | |
| 			<BUTTON id=btnAbortConnection class="stySubmitButton MaxLayout" onclick="setfocus();AbortConnection();" tabindex=6 accesskey="D"> 
 | |
| 				<Center>	
 | |
| 					<img src="../Common/Quit.gif" id="imgQuit" ><BR>
 | |
| 					<Span class="styText" id="txtQuit"> <u>D</u>isconnect </Span>
 | |
| 				</Center>	
 | |
| 			</BUTTON> 
 | |
| 		</td>
 | |
| 	</tr>
 | |
| 	<tr>
 | |
| 		<td align="center"> 
 | |
| 			<img src="helpee_line.gif">
 | |
| 		</td>
 | |
| 	</tr>
 | |
| 	
 | |
|  </Table>
 | |
| </BODY>
 | |
| </HTML>
 |