<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils,
                                                                             com.novell.emframe.fw.FwUtils,
                                                                             com.novell.emframe.dev.eMFrameFactory" %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request);

  /* **************************************************************************
%name: WizFrameSet_js.jsp %
%version: 9 %
%date_modified: Thu Feb 05 14:45:26 2004 %
Copyright (c) 2001, 2002 Novell, Inc. All Rights Reserved.
THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL PROPRIETARY
AND TRADE SECRET INFORMATION OF NOVELL, INC. ACCESS TO THIS WORK IS
RESTRICTED TO (I) NOVELL, INC. EMPLOYEES WHO HAVE A NEED TO KNOW HOW
TO PERFORM TASKS WITHIN THE SCOPE OF THEIR ASSIGNMENTS AND (II)
ENTITIES OTHER THAN NOVELL, INC. WHO HAVE ENTERED INTO APPROPRIATE
LICENSE AGREEMENTS. NO PART OF THIS WORK MAY BE USED, PRACTICED,
PERFORMED COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED
OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE
OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE
PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY.
***************************************************************************  */


  /* ------------------------------------------------------------------  */
  /* This file contains JavaScript specific to the "Backup and Restore"  */
  /* plug-in"s frameset.                                                 */
  /* ------------------------------------------------------------------  */

  /* Global variables.  */

  /* Tracks whether the user wants to authenticate to a server known to  */
  /* iManager.                                                           */%>
var bWiz_iManagerAuthenticated = true;

<%/* The following is used to track the frameset and frames as  */
  /* they load so that we can know when everything has loaded.        */%>
var	iFrameLoadCount = 0;



<%/* ---------------------------------------------------  */
  /* Called as each frameset component has loaded.  */
  /* ---------------------------------------------------  */%>
function frameLoaded(
	sName)	<%/* The name of the frameset component that just loaded.  */%>
{
	<%/* Is this the last (i.e., the 4th) frameset component being  */
	  /* loaded?                                                    */%>
	iFrameLoadCount += 1;
	if (4 == iFrameLoadCount)
	{
		<%/* The remainder of this function works on the main 	   */
		  /* form.                                                   */%>
		with (getMainWizForm())
		{
			<%/* Simply activate the content panel.  */%>
			action = "<%= c.var("Wiz.ContentURL") %>";
			submitMain();
		} <%/* with  */%>
	} <%/* if  */%>
} <%/* frameLoaded  */



  /* -------------------------------  */
  /* Initializes the frameset.  */
  /* -------------------------------  */%>
function initWizFrameSet()
{
	<%/* We need to track frameset components being loaded so  */
	  /* that we can initialize things in earnest.                      */%>
	frameLoaded( "Wiz_FrameSet" );
} <%/* initWizFrameSet  */



  /* -------------------------------------------------------------  */
  /* Processes any onComplete parameter passed into the frame set.  */
  /* -------------------------------------------------------------  */%>
function processOnComplete()
{
	<%/* If we running in a popup window...  */%>
	if ((null == parent)         ||
		(null == parent.Content) ||
		(!(isDefined( parent.Content ))))
	{
		<%/* ...simply close it.  */%>
		window.close();
		return;
	} <%/* if  */


	  /* Otherwise, submit the return form.  */%>
	with (getReturnWizForm())
	{
		<% if (c.var("Hidden_AutoLaunched").equals("true")) { %>
		action 				= "webacc?taskId=dev.Empty&merge=fw.FinishLogin&showInstallWizard=false&User.context=<%= c.var("User.context") %>";
		target 				= "_top";
		<% } else if(!c.var("fw.ConfigWizard.refresh").equals("true")) { %>
      action            = "webacc?NPService=fw.LaunchService&NPAction=Return&returnID=<%= c.var("taskId") %>";
		<% } else { %>
      action 				= "webacc?taskId=dev.Empty&merge=fw.Body&showInstallWizard=false&view=Config";
      target            = "Mainscreen";
      <% } %>

		submit();
	} <%/* with  */%>
} <%/* processOnComplete  */



						     /* * * * * * *  */
                             /* End of File  */
                             /* * * * * * *  */%>
