<HTML>
<HEAD>
<TITLE>Login to ClearCase</TITLE>

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

<script language="JavaScript">

// Variables required by the Login page

// Initial error check
var browserCheck =
-jsquote -startpage
;

// Server hostname
var ServerName = 
-jsquote -servername
;

// Last user logged in
var UserName = 
-jsquote -user
;

// Platform of web server
var ServerPlatform = 
-jsquote -server_platform
;

-if -server_platform "Windows"

// Windows NT domain
var Domain = 
-jsquote -domain
;

-endif

// Localizeable strings

var txt_logout = "You have successfully logged out of Rational ClearCase";
var txt_instructions = "Please enter your user name and password.";
var txt_logo_tooltip = "Welcome to Rational ClearCase Web";
var txt_ratltext_tooltip = "Rational Software Corporation";
var txt_site_label = "Site";
var txt_user_label = "User Name";
var txt_password_label = "Password";
var txt_domain_label = "Domain";
var txt_login_tooltip = "Click here to log in";
var txt_domain_instructions = "Since this is a Windows NT machine, enter a domain name as well";
var txt_copyright = "Copyright  2001 Rational Software Corporation.  All Rights Reserved.";
var txt_about_rational = "About Rational";
var txt_period = ".";

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

function buildLoginContent()
{
    var login_message;

    if (document.mainform.cmd != null &&
        document.mainform.cmd.value.toLowerCase() == "logout")
    {
        login_message = '<STRONG>' + txt_logout + '</STRONG></BR>' + txt_instructions;
        document.mainform.cmd.value = "";
    }
    else
        login_message = txt_instructions;

    var s = '<IMG src="' + baseImageURL + 'shim.gif" width="1" height="120" alt="image" />'
          + '<TABLE width="355" border="0" cellspacing="0" cellpadding="0" align="center" class="dialogueboxbg" summary="">'
          +   '<TR>'
          +     '<TD class="bgwhite"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +     '<TD class="bgwhite"><IMG src="' + baseImageURL + 'shim.gif" width="7" height="1" alt="image" /></TD>'
          +     '<TD class="bgwhite"><IMG src="' + baseImageURL + 'shim.gif" width="346" height="1" alt="image" /></TD>'
          +     '<TD class="bgwhite"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +   '</TR>'
          +   '<TR>' 
          +     '<TD colspan="3" class="dialogueboxborder"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +     '<TD rowspan="8" class="dialogueboxborder"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +   '</TR>'
          +   '<TR>'
          +     '<TD rowspan="6" class="dialogueboxborder"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +     '<TD colspan="2" class="dialogueboxhighlight"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +   '</TR>'
          +   '<TR>' 
          +     '<TD colspan="2" height="24" align="center">' + login_message
          +     '</TD>'
          +   '</TR>'
          +   '<TR>'
          +     '<TD><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +     '<TD>'
          +       '<TABLE width="346" border="0" cellspacing="0" cellpadding="0" summary="">'
          +         '<TR>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="177" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="10" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="140" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD><IMG src="' + baseImageURL + 'shim.gif" width="13" height="1" alt="image" /></TD>'
          +         '</TR>'
          +         '<TR>'
          +           '<TD rowspan="10" class="dialogueboxhighlight"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD rowspan="9" class="dialgbxshadow2"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD class="dialgbxshadow2"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD rowspan="9" class="dialgbxshadow2"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD rowspan="10" class="dialogueboxhighlight"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD colspan="5" class="dialgbxshadow2"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +         '</TR>'
          +         '<TR>' 
          +           '<TD class="dialogueboxhighlight"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +           '<TD colspan="5" class="dialogueboxhighlight"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
          +         '</TR>'
          +         '<TR>' 
          +           '<TD rowspan="6" class="bgwhite" valign="bottom" align="center"><IMG src="' + baseImageURL + 'abs_welcome_message.jpg" width="177" height="198" alt="' + txt_logo_tooltip + '" border="0" />'   // abs modify
          +           '</TD>'
          +         '</TR>'
          +         '<TR> '
          +           '<TD height="40">&#160;</TD>'
          +           '<TD valign="top">' + txt_site_label + '&#058;<BR />'
          +             '<SPAN class="bold">' + ServerName
          +             '</SPAN>'
          +           '</TD>'
          +           '<TD class="dialgbxshadow2" rowspan="5"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="" /></TD>'
          +           '<TD class="dialogueboxhighlight" rowspan="5"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="" /></TD>'
          +           '<TD rowspan="5" class="dialogueboxbg2" align="center"><IMG src="' + baseImageURL + 'logo_rational_text.gif" width="11" height="173" alt="' + txt_ratltext_tooltip + '&#174;" /></TD>'
          +         '</TR>'
          +         '<TR>'
          +           '<TD height="40">&#160;</TD>'
          +           '<TD valign="top">' + txt_user_label + '&#058;<BR />'
          +             '<INPUT type="text" name="user" size="10" maxlength="20" value="' + UserName + '">'
          +           '</TD>'
          +         '</TR>'
          +         '<TR>'
          +           '<TD height="40">&#160;</TD>'
          +           '<TD valign="top">' + txt_password_label + '&#058;<BR />'
          +             '<INPUT type="password" name="password" size="10" onKeyDown="return submit_on_enter(event)">'
          +           '</TD>'
          +         '</TR>';
    if (ServerPlatform == "Windows") {
        s +=        '<TR>'
          +           '<TD height="40">&#160;</TD>'
          +           '<TD valign="top">' + txt_domain_label + '&#058;<BR />'
          +             '<INPUT type="text" name="domain" size="10" value="' + Domain + '"'
          +               ' onKeyDown="return submit_on_enter(event)">'
          +           '</TD>'
          +         '</TR>';
    } else {
        s +=        '<TR>'
          +           '<TD height="40">&#160;</TD>'
          +           '<TD> </TD>'
          +         '</TR>';
    }
    s +=         '<TR>' 
       +           '<TD>&#160;</TD>'
       +           '<TD height="30"><A href="javascript:document.mainform.submit()"><IMG src="' + baseImageURL + 'button_login.gif" width="46" height="17" alt="' + txt_login_tooltip + '" border="0"></A></TD>'
       +         '</TR>'
       +         '<TR>' 
       +           '<TD class="dialgbxshadow2"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
       +           '<TD colspan="5" class="dialgbxshadow2"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
       +         '</TR>'
       +         '<TR>' 
       +            '<TD colspan="3" class="dialogueboxhighlight"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
       +           '<TD colspan="5" class="dialogueboxhighlight"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
       +         '</TR>'
       +       '</TABLE>'
       +     '</TD>'
       +   '</TR>'
       +   '<TR>'
       +    '<TD colspan="2" align="center" height="35"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="35" alt="image" /></TD>'
       +   '</TR>'
       +   '<TR>'
       +     '<TD colspan="2" class="dialogueboxMedium"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
       +   '</TR>'
       +   '<TR>'
       +     '<TD colspan="2" class="dialogueboxborder"><IMG src="' + baseImageURL + 'shim.gif" width="1" height="1" alt="image" /></TD>'
       +   '</TR>'
       + '</TABLE>'
       + '<P>&#160;</P>'
       + '<P class="copyright" align="center">' + txt_copyright
       +   '<A href="http://www.rational.com" target="_blank" class="copyright">' + txt_about_rational + '</A>' + txt_period + '</P>'

       // abs modify - add begin
       
       ;
     s += '<P class="copyright" align="center">' + 'Copyright  2001 A Better Solution, Inc. All Rights Reserved. '
       +   '<A href="http://www.abs-consulting.com" target="_blank" class="copyright">' + 'About A Better Solution, Inc.</A></P>'

       // abs modify - add end

       + '<P>&#160;</P>';

    return s;
}

function init_focus() {
    if (document.mainform.user.value == '')
        document.mainform.user.focus();
    else
        document.mainform.password.focus();
}

function submit_on_enter(e) {
    if (is_ie && e.keyCode == 13) {
        e.returnValue = false;
        document.mainform.submit();
        return false;
    }
    else if (is_nn4 && e.which == 13) {
        document.mainform.submit();
        return false;
    }
    return true;
}

</SCRIPT>
</HEAD>

<BODY topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff" onload="init_focus()">

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

-request

<SCRIPT language="JavaScript">
    // Do not show Logout button on login page
    noLogout = true;

    var html_str = buildRationalCCLogoBarTable()
                 + buildHtmlErrorText(browserCheck)
                 + buildLoginContent();
    document.write(html_str);
    document.close();
</SCRIPT>

</FORM>

-endpage

</BODY>
</HTML>
