<html>
<head>
<title>
-if -param ucm_context rebase
Rebase Progress
-else
Deliver Progress
-endif
</title>

<!-- Include components common to every page -->
-include pages Head.inc

<script language="Javascript">

//
// This needed by control frame to start the integration in the appropriate
// context
//
var RPC =
-if -param ucm_context rebase
-jsquote -rebase_rpc
-else
-jsquote -deliver_rpc
-endif
;

//
// The stream associated to the current sessions *development* view
// (the current session will always be the development view).  Unused
// in a rebase context.
//
var devStream = 
-if -param ucm_context deliver
-jsquote -stream
-else
""
-endif
;

//
// The activities selected to deliver - unused in a rebase context
//
var deliverActivities = 
-if -param ucm_context deliver
-deliver_selected_activities
-else
""
-endif
;

//
// The session preferences for deferload and automerge.  These need to come before
// UCMConstants.js, as there are references to those variables in that package.
//
var session_deferload =
-deferload
;

var session_automerge =
-automerge
;

//
// Variables required by the controller
//

var session =
-if -param ucm_context deliver
-jsquote -integration_session
-else
-jsquote -session
-endif

var workroot =
-if -param ucm_context deliver
-jsquote -integration_workroot
-else
-jsquote -workroot
-endif

function
onHelp()
{
    var helpTopic = 
-if -param ucm_context rebase
  "rebase_status"
-else
  "deliver_status"
-endif 
  ;

    CCWebHelp.displayTopic(helpTopic);
}

var integrationType = 
-if -param ucm_context rebase
                    "rebase"
-else
                    "deliver"
-endif
;

</script>

<script language="Javascript" 
    src=
    -quote -url scripts popLeftMenu.js
>
</script>


<script language="Javascript" 
    src=
    -quote -url pages Integration/UCMConstants.js
>
</script>

<script language="Javascript" 
    src=
    -quote -url scripts MergeElement.js
>
</script>

<script language="Javascript" 
    src=
    -quote -url pages Integration/Progress/Messages.js
>
</script>

<script language="Javascript" 
    src=
    -quote -url pages Integration/Progress/Listing.js
>
</script>

<script language="Javascript" 
    src=
    -quote -url pages Integration/Progress/Transcript.js
>
</script>

<script language="Javascript" 
    src=
    -quote -url pages Integration/Progress/Controller.js
>
</script>

<script language="Javascript">

// *****************************************************************************
// controller
//
// The UI controller object, which lives in the control frame.  We initialize it,
// as code outside of the control frame context needs to tickle the controller 
// from time to time (and only have access to this frameset).  Change this variable
// name, and you will need to track down references to it in the Integration
// Javascript directory.
//
//
// *****************************************************************************
var controller = null;

// *****************************************************************************
// setWindowStatus
//
// Function called by column headers "mouseOver", "mouseOut".
//
// *****************************************************************************
setWindowStatus =
function(
    text
)
{
    if (setWindowStatus.arguments.length == 0)
        window.status = '';
    else
        window.status = text;

    return true;
}

// Events:
//   - controlFrame load
//   - frameset load
//
var loadEventsAwaited = 2;
function
countLoadEvent()
{
    --loadEventsAwaited;
    if (0 == loadEventsAwaited)
        begin();
}

// *****************************************************************************
// onLoad
//
// *****************************************************************************
function
onLoad()
{
    countLoadEvent();
}

function
begin()
{
    //
    // Make an empty listing document
    //
    listingFrame.document.write('<html><body bgcolor="#ffffff"></body></html>');
    listingFrame.document.close();

    continueAfterControlFrameRendered();
}    
    
function
continueAfterControlFrameRendered()
{
    var cfg = controlFrame.generator;
    
    if (Browser.isMozillaBased) {
        
        // On Mozilla, the rendering initiated inside the constructor
        // call, Controller(), might not be done.  So we wait here
        // until we are sure it is.  We just check on the existence of
        // the busyBar foreground rectangle object.
        //
        if (!cfg.initialRenderingComplete()) {
            // Not yet rendered so wait a bit.
            //
            top.setTimeout("top.continueAfterControlFrameRendered()", 100);
            return;
        }
    }

    // On Mozilla, only make this call after the control frame has
    // been rendered.
    //
    cfg.postRenderMethod();

    // Wait for the applet to become initialized.
    //
    continueAfterAppletReady();
}

function
continueAfterAppletReady()
{
    if (!controlFrame.appletReady) {
        setTimeout("continueAfterAppletReady()", 500);
        return;
    }

    // Create the integration Controller object.  This will create the
    // listing document as well.
    //
    controller = new Controller(
                    baseURL,
                    session,
                    workroot,
                    controlFrame,
                    controlFrame.generator,
                    listingFrame,
                    controlFrame.document.ucmApplet,
-if -param ucm_context rebase
                    "rebase",
-else
                    "deliver",
-endif
                    top.RPC,
                    session_deferload,
                    session_automerge,
                    devStream,
                    deliverActivities);

    // The control frame contains an applet that needs to talk back
    // to the controller.  It can only do so if the reference to
    // that controller is in same window as the applet definition
    //
    controlFrame.controller = controller;

    //
    // Start the integration
    //
    controller.startIntegration();
}

// *****************************************************************************
// onUnLoad
//
// The frameset onUnload event handler.
//
// *****************************************************************************
function
onUnload ()
{
      if (controlFrame.document.applets.length > 1)
            controlFrame.document.applets["ucmApplet"] = null;
}

</script>

</head>

<frameset  id="theFrameset"
        -if -browser MSIE 5 0
           rows="258,*,120"        // abs modify
        -else
        -if -browser NS7 7 0
           rows="249,*,120"        // abs_modify
        -else
        -if -browser MOZILLA 0 0
           rows="249,*,120"        // abs_modify
        -else
           rows="250,*,120"        // abs_modify
        -endif
        -endif
        -endif

           frameborder="no"
           border="0"
           framespacing="0"
           onLoad="onLoad()" onUnload="onUnload()">

    <frame name=controlFrame
           src=
-if -param ucm_context rebase
           -self_request cmd integration_controlframe ucm_context rebase
-else
           -self_request cmd integration_controlframe ucm_context deliver
-endif
        scrolling="no"
        noresize
        marginheight="0"
        marginwidth="0"
        leftmargin="0"
        topmargin="0">

    <frame name=listingFrame 
        scrolling="auto"
        marginheight="0"
        marginwidth="0"
        leftmargin="0"
        topmargin="0">
                                   
                                    // abs modify add begin
    <frame name=absFrame 
        src="clearweb.exe?init_view="
        scrolling="auto"
        marginheight="0"
        marginwidth="0"
        leftmargin="0"
        topmargin="0">
                                    // abs modify add end

</frameset>

</html>
