<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 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">
    <style type="text/css">
        @import "../../content/lib/dojo/resources/dojo.css";
        @import "../../content/lib/dijit/themes/claro/claro.css";
    </style>
    <script type="text/javascript" src="../../content/lib/dojo/dojo.js" data-dojo-config="async:true"></script>
    <script type="text/javascript">
    function jscpThen(){
        //console.log("Loading framework banner.....");
        require(["oob/oob", "dojo/domReady!"],function(){
            require(["dojo/dom", "dojo/_base/array", "dijit/Tooltip", "oob/Utils"], function(dom, array, Tooltip, Utils){

                var versionStr = dojo.string.substitute(
                    property('version', ''),
                    array.map(Utils._getBuildTxts().slice(0, 1), function(item) {
                        return dojo.string.trim(item.substr(1));
                    })
                );

                /* Create version Tip. */
                new Tooltip({
                    connectId: ["titleContent"],
                    label: versionStr
                });
            });
        });
    }
    </script>

    <script src="../../jscp.js" language="javascript">
    <%@ include file="global.head" %>
    <% loadCSSfiles(DEFAULTCSS); %>
</head>

<body class="claro" onclick="parent.bodyClickEvent(event)" onkeydown="parent.bodyKeyDownEvent(event)" onselectstart="return false">

<!-- remove original title div for incompatiable Tooltip position in IE. -->
<div id="title" class="absolute" style="z-index: 999;">
    <span id="titleContent"></span>
</div>

<div class="absolute fill">
    <div class="outerVerticalCenteringWrapper fill">
        <div class="innerVerticalCenteringWrapper fillWidth">
            <div id="languageSelectorContainer" class="verticallyCenteredContent">
                <form style="display:inline" action="javascript:void 0" name="languageSelector" id="languageSelector">
                    
                    <label for="languageSelector" class="languageSelectorLabel"><%= property('languageLabel' )%></label> 
                    
                    <select id="languageSelectorList" name="languageSelectorList" onchange="top.changeLocale(document.languageSelector.languageSelectorList.value)">
                    <% 
                    var localeList = top.getValidLocaleNames();
                    var aLocale = property('fallBackLocale');

                    for (var i in localeList) {
                      if (top.LOCALE == localeList[i][0]) {
                          aLocale = top.LOCALE;
                      }
                    }

                    for (var i in localeList) {
                        var selected = "";
                        if (aLocale == localeList[i][0]) {
                            selected = "SELECTED";
                        } 
                        else {
                            selected = "";
                        }
                        %>     
                        <option <%=selected%> value=<%= localeList[i][0] %>><%= localeList[i][1] %></option>
                        <%
                    }
                    %>
                    </select>
                </form>
                <% 
                    var languageSelectorWidth = document.getElementById('languageSelector').offsetWidth;
                    document.getElementById('title').style['margin' + bidiString('Left','Right')] = (languageSelectorWidth + property('titleMarginPad', 15)) + 'px';
                %>
            </div>
        </div>
    </div>
</div>
</script>
</body>
</html>