<html>

<head>

<title>Select View</title>

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

<!-- General Dialog utilities. -->
<script language="Javascript"
        src=
        -quote -url scripts UtilsModalDialog.js
>
</script>

<script language="JavaScript">

// Variables required by SelectView.js

var sessionList =
-sessionlist
;

</script>

<script language="JavaScript"
        src=
        -quote -url pages SelectView/SelectView.js
>
</script>

<script language="JavaScript"
        src=
        -quote -url scripts DialogPageFmt.js
>
</script>

<script language="JavaScript">

// helpCallback is called when the "Help" button on the CCLogo bar is clicked
function helpCallback()
{
var helpfile = 
-jsquote -url help "select_view.htm"
;
    openHelp(helpfile);
}

function checkApplet(applet)
{
    if (applet == null ||
        typeof applet.dirExists == "undefined")
    {
        var msg = "There was a problem downloading or installing "
                + "the Java applet required by this page. "
                + "Functions on this page have been disabled.";

        alert(msg);

        return false;
    }

    return true;
}

var pageLoaded = false;
var selectView = null;

function onLoad()
{
    // Instantiate the controller
    if (checkApplet(document.selectViewApplet)) {
            selectView = new SelectView(window,
                                        document.mainform,
                                        document.selectViewApplet);
    }

    pageLoaded = true;
}

function checkController()
{
    if (!pageLoaded) {
        var msg = "Please wait until the applet used by this page is completely loaded.";
        alert(msg);
        return false;
    }
    else if (!checkApplet(document.selectViewApplet))
        return false;

    return true;
}

</script>

</head>

<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff" onload="onLoad()">

<form name="mainform" method="POST" enctype="application/x-www-form-urlencoded">

<SCRIPT language="JavaScript">
    var html_str = buildRationalCCLogoBarTable();
    document.write(html_str);
</SCRIPT>

-startpage

<SCRIPT language="JavaScript">
    var html_str = buildDialogTitle("Select View");
    document.write(html_str);
</SCRIPT>

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <TR> 
    <TD>
-image "shim.gif" width="10" height="10" border="0"
    </TD>
  </TR>
</TABLE>

<SCRIPT language="JavaScript">
    var html_str = buildDialogSubtitle("Select the view you will use to access your files " +
                                       "and directories under ClearCase control, or create " +
                                       "a new view.");
    document.write(html_str);
</SCRIPT>

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <TR> 
    <TD>
-image "shim.gif" width="10" height="10" border="0"
    </TD>
  </TR>
</TABLE>

  <table border="0" cellpadding="0" cellspacing="0">

  <tr>
    <TD rowspan="1" width="15">
-image "shim.gif" alt="image" width="16" height="1"
    </TD>
    <td><input type="radio" name="action" checked>Use existing view</td>
    <TD rowspan="1" width="15">
-image "shim.gif" alt="image" width="16" height="1"
    </TD>
  </tr>

  </table>

  <table border="0" cellpadding="0" cellspacing="0">

  <tr>
    <TD rowspan="1" width="20">
-image "shim.gif" alt="image" width="16" height="1"
    </TD>
    <td width="100%" class="searchbox">
      <SCRIPT language="JavaScript">
          var html_str = '<select name="viewtag" size="6">';
          var i;
          for (i = 0; i < sessionList.length; ++i) {
              html_str += '<option value="' + sessionList[i].viewtag + '"';
              if (sessionList[i].selected)
                  html_str += ' selected';
              html_str += '>'
                        + normalizePathSeparators(sessionList[i].workroot)
                        + ' (' + sessionList[i].viewtag + ')'
                        + '</option>';
          }
          html_str += '</select>';
          document.write(html_str);
      </SCRIPT>
    </td>
    <TD rowspan="1" width="20">
-image "shim.gif" alt="image" width="16" height="1"
    </TD>
  </tr>

  </table>

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <TR> 
    <TD>
-image "shim.gif" width="10" height="10" border="0"
    </TD>
  </TR>
</TABLE>

  <table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>
      <TD>
-image "shim.gif" width="16" height="8"
      </TD>
      <TD width="100%">
        <SCRIPT language="JavaScript">
            var buttons = new Array (
                {alt:"Remove", image:"remove_light.gif", width:"57", height:"16", onClick:"if (checkController()) selectView.onRemove()"}
            );
            var html_str = buildDialogConfirmButtons("", buttons);
            document.write(html_str);
        </SCRIPT>
    </td>
  </tr>

    <TR> 
      <TD colspan="2">
-image "shim.gif" alt="image" width="1" height="10"
      </TD>
    </TR>
  
  </table>

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <TR> 
    <TD>
-image "shim.gif" width="10" height="10" border="0"
    </TD>
  </TR>
</TABLE>

  <table border="0" cellpadding="0" cellspacing="0">

  <tr>
    <TD rowspan="1" width="15">
-image "shim.gif" alt="image" width="16" height="1"
    </TD>
    <td><input type="radio" name="action">Create a new view or join a project</td>
    <TD rowspan="1" width="15">
-image "shim.gif" alt="image" width="16" height="1"
    </TD>
  </tr>

  </table>

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <TR> 
    <TD>
-image "shim.gif" width="10" height="10" border="0"
    </TD>
  </TR>
</TABLE>

<SCRIPT language="JavaScript">
    var buttons = new Array (
        {alt:"OK", image:"button_ok_cc.gif", width:"25", height:"16", onClick:"if (checkController()) selectView.onOk()"},
        {alt:"Cancel", image:"button_cancel_cc.gif", width:"47", height:"16", onClick:"if (checkController()) selectView.onCancel()"}
    );
    var html_str = buildDialogConfirmButtons("", buttons);
    document.write(html_str);
</SCRIPT>

<input type="hidden" name="cmd" value="">
<input type="hidden" name="workroot" value="">
<input type="hidden" name="session" value=
-quote -session
>
</form>

-applet com.rational.ccweb.client.SelectViewApplet CCWebClient ccwebcl 'id="selectViewApplet"' 'name="selectViewApplet"' 'width="0"' 'height="0"' MAYSCRIPT
<param NAME=urlbase VALUE=
-quote -url
>
<param NAME=session VALUE=
-quote -session
>
</applet>

                                    <!-- abs modify - add - start  -->
<script language="JavaScript">
<!--

var userName=
-jsquote -user
;

var table4 = '<br>'
           + '<center><iframe src="'+ baseImageURL + '../bin/clearweb.exe?clean+'+userName+'" width=100% height=30 align=bottom marginheight=0 marginwidth=0 frameborder=0 scrolling=no ></center>';
document.write (table4);

//-->
</script>

                                    <!-- abs modify - add - end  -->
-endpage

</body>
</html>
