<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- Licensed Materials - Property of IBM
     5648-F10 (C) Copyright International Business Machines Corp. 2005
     All Rights Reserved
     US Government Users Restricted Rights - Use, duplication or disclosure
     restricted by GSA ADP Schedule Contract with IBM Corp. -->
<HTML lang="en">
<HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

    <HTA:APPLICATION ID="LaunchPad"
         APPLICATIONNAME="LaunchPad"
         BORDER="thick"
         BORDERSTYLE="normal"
         CAPTION="yes"
         CONTEXTMENU="yes"
         MAXIMIZEBUTTON="yes"
         MINIMIZEBUTTON="yes"
         NAVIGABLE = "yes"
         SELECTION = "yes"
         SHOWINTASKBAR="yes"
         SINGLEINSTANCE="no"
         SYSMENU="yes"
         VERSION="1.0"
         WINDOWSTATE="normal"
         ICON="diskinfo\product.ico">
    </HTA>

    <script language="JavaScript">
    try {    
        document.search = document.location.search;
        if (typeof document.search != "string" || document.search.length <= 1) {
            if (typeof LaunchPad != "undefined" && typeof LaunchPad.commandLine == "string" &&
                LaunchPad.commandLine.indexOf('?') > 0 &&
                LaunchPad.commandLine.indexOf('?') < (LaunchPad.commandLine.length-2)) {
                document.search = LaunchPad.commandLine.substring(LaunchPad.commandLine.indexOf('?'));
                if (document.search.substring(document.search.length-1) == '"' || document.search.substring(document.search.length-1) == "'")
                    document.search = document.search.substring(0,document.search.length-1);
            } else
                document.search = '?en';
        }
        if (document.search.indexOf(',') >= 0) {
            top.INITIALLOCALE = document.search.substring(1,document.search.indexOf(','));
            document.search = '?' + document.search.substring(document.search.indexOf(',')+1);
        } else {
            top.INITIALLOCALE = document.search.substring(1);
            document.search = '';
        }
        top.NOBROWSER = window.location.href.substring(0,window.location.href.lastIndexOf('/'))+'/'+top.INITIALLOCALE+'/noBrowser.html';
        var useragent = navigator.userAgent.toLowerCase();
        top.BROWSERVERSION = parseFloat(useragent.substring(useragent.indexOf("msie")+4));
    } catch(e) {}
    try {
        if (typeof top.BROWSERVERSION == "undefined" || top.BROWSERVERSION < 6.0)
            try {
                window.location.href = top.NOBROWSER;
            }catch(e) {
            document.writeln('<FRAMESET ROWS="100%" COLS="100%" RESIZE="yes" frameborder=no border=0 >');
            document.writeln('<FRAME SRC="'+top.NOBROWSER+'" NAME=root SCROLLING=auto marginwidth="0" marginheight="0" frameborder=no APPLICATION=yes>');
            document.writeln('<\/FRAMESET>');
        }
    } catch(e) {}
    
    </script>

    <script src="globals.js">
    </script>

    <script src="log.js">
    </script>

    <script src="utils.js">
    </script>

    <script src="OS.js">
    </script>

    <script src="IExplore.js">
    </script>

    <script src="properties.js">
    </script>

    <script src="browsePrompt.js">
    </script>

    <script src="diskLabels.js">
    </script>

    <script language="JavaScript">

    try
    {   
        //If this happens, it means that diskLabels.js found a different compatible directory for diskLabel.id
        //than the one we started in
        if (top.getNativeFileName(top.diskMappings[top.diskLabel.id]) !=  top.getNativeFileName(top.STARTINGDIR)) {
            //If we found a compatible disk, then reset the STARTINGDIR.  Otherwise, just leave it 
            //and let the no browser code catch the problem.
            if (top.foundCompatibleStartDisk) {
              top.STARTINGDIR = top.diskMappings[top.diskLabel.id];
            }
            
            top.initializeProperties();
            top.initializeDiskLabelService();
        }

        var localeMappings = top.findProperty('engineLocales', self, null);        
        var previousLocale = top.LOCALE;

        top.LOCALE = localeMappings[top.trim(secureGetEnv(new Function('return window'), "LaunchPadLocale").toLowerCase())];

        if ( top.LOCALE == null ) { // if no mapping exists for the 5 character lang code, try the two digit code
            top.LOCALE = localeMappings[secureGetEnv(new Function('return window'), "LaunchPadLocale").substring(0,2).toLowerCase()];
        }
        if (top.LOCALE == null) { // if everything fails, default to English
            top.LOCALE = top.findProperty('fallBackLocale', self, 'en');
        }

        //The initial locale is set in IExplore.js/Mozilla.js.  However, at that point, the properties service
        //has not been loaded, so we can't determine if a region specific locale should be used.  So we use
        //as base locale.  Using a base locale means that any properties in global.properties will not be loaded
        //for the regional dialects.  So, after the locale is absolutely determined, we'll reload the global.prop files.
        if (top.LOCALE != previousLocale) {
            top.initializeProperties();
        }
    }
    catch(e)
    {        
        alert(top.formatmsg(document.properties['errorLoadingLocaleProperties'], e.message));        
    }
    </script>

    <SCRIPT src="jscp.js">
    <%@ include file="global.head" %>

    <%@ include file= "secureUserExtensions.js" %>
    <%@ include file= "userExtensions.js" %>

    <%
    try
    {   
        if (typeof top.launchpadStartup != "undefined") {
            top.launchpadStartup();
        }        
    }
    catch(e)
    {   
        alert(top.formatmsg(document.properties['launchpadStartupCodeError'], e.message));        
    }    
    top.handleDiskLabelJavascriptSubstitution();    
    %>    

    <%      

    top.resize(property('launchpadWidth',800),property('launchpadHeight',600));

    if (top.foundCompatibleStartDisk) {
        %>

        <FRAMESET ROWS="100%" COLS="100%" frameborder="0" border="0" framespacing="0" >
        <FRAME SRC="<%= findURL(null,top.STARTPAGE) %>" name="root" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" application="yes">
        </FRAMESET>

        <%
    } else {
         //This is an attempt to re-orient the launchpad to the original starting directory to pick up the incorrectDisk.html file.
         //We do this because there's no gaurantee that we'll find one in another location.  If we get here, we can be assured that
         //top.STARTINGDIR was reset to the original starting directory.  So we should be able to find an incorrectDisk.html file.
         top.diskMappings[diskLabel.id] = top.STARTINGDIR;         
        %>   
        <FRAMESET ROWS="100%" COLS="100%" frameborder="0" border="0" framespacing="0" >
        <FRAME SRC="<%= findURL(null,'incorrectDisk.html') %>" name="root" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" application="yes">
        </FRAMESET>
        <%
    }
    %>
    
    </SCRIPT>

</HEAD>
</HTML>

