﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
    <xsl:output method="xml" indent="yes" omit-xml-declaration ="yes"/>

    <xsl:template name="LifeSpaceTopNavigationBar">
        <xsl:param name="HostName" select="'N/A'"></xsl:param>
        <xsl:param name="SelectTab" select="'N/A'"></xsl:param>
        <xsl:variable name ="TabID">
            <xsl:choose>
                <xsl:when test ="$SelectTab = 'inspired'">2</xsl:when>
                <xsl:when test ="$SelectTab = 'findcoach' or $SelectTab = 'coaches'">3</xsl:when>
                <xsl:when test ="$SelectTab = 'getsocial'">4</xsl:when>
                <xsl:otherwise>1</xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <div>
            <table class="tableMaster" cellpadding="2" cellspacing ="2" >
                <tr style="background-color:#C6C4C4;">
                    <xsl:choose>
                        <xsl:when test="$TabID =1">
                            <td style="background-color:#376092;text-align:center;" width="17%" id="td_1_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/Home.aspx">My Action Plan</a>
                            </td>
                        </xsl:when>
                        <xsl:otherwise>
                            <td style="background-color:#A39E9E;text-align:center;" width="17%" id="td_1_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/Home.aspx">My Action Plan</a>
                            </td>
                        </xsl:otherwise>
                    </xsl:choose>

                    <xsl:choose>
                        <xsl:when test="$TabID =2">
                            <td style="background-color:#376092;text-align:center;" width="17%"
                                id="td_2_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/Inspired.aspx">Get Inspired</a>
                            </td>
                        </xsl:when>
                        <xsl:otherwise>
                            <td style="background-color:#A39E9E;text-align:center;" width="17%"
                                id="td_2_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/Inspired.aspx">Get Inspired</a>
                            </td>
                        </xsl:otherwise>
                    </xsl:choose>


                    <xsl:choose>
                        <xsl:when test="$TabID =3">
                            <td style="background-color:#376092;text-align:center;" width="17%"
                                id="td_3_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/FindCoach.aspx">Find a Coach</a>
                            </td>
                        </xsl:when>
                        <xsl:otherwise>
                            <td style="background-color:#A39E9E;text-align:center;" width="17%"
                                id="td_3_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/FindCoach.aspx">Find a Coach</a>
                            </td>
                        </xsl:otherwise>
                    </xsl:choose>


                    <xsl:choose>
                        <xsl:when test="$TabID =4">
                            <td style="background-color:#376092;text-align:center;" width="17%"
                                id="td_4_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/GetSocial.aspx">Get Social</a>
                            </td>

                        </xsl:when>
                        <xsl:otherwise>
                            <td style="background-color:#A39E9E;text-align:center;" width="17%"
                                id="td_4_Navigation">
                                <a style="font-family: Calibri, Verdana, Arial;
	                                        font-size: 12pt;cursor:pointer;color:#FFFFFF;"
                                   href="http://{$HostName}/GetSocial.aspx">Get Social</a>
                            </td>

                        </xsl:otherwise>
                    </xsl:choose>


                    <td  style="background-color:#A39E9E;text-align:center;" width="32%"
                        id="td_5_Navigation">
                        <div id="div_Search_Suggest" style="text-align:left;">
                            <input id="txt_Menu_Bar_Search_Data" type="text" runat="server" defaultValue="Search Communities, Templates, Publications"
                              value="Search Communities, Templates, Publications" Class="autoSuggest" style="width:300px;"
                              onFocus='return AutoSuggest_ClearAutoSuggestTextbox("txt_Menu_Bar_Search_Data");'
                              onBlur='return MenuSearch_RestoreAutoSuggestTextbox("txt_Menu_Bar_Search_Data", 
                                                                                   "txt_Menu_Bar_Search_Data_Suggestions");'
                              onKeyUp='MenuSearch_getAutoSuggestData(event,
                                                                "-99",
                                                                "txt_Menu_Bar_Search_Data", 
                                                                "MenuBarSearchData",
                                                                "txt_Menu_Bar_Search_Data_Suggestions",
                                                                "txt_Menu_Bar_Search_Data");'
                              onKeyPress='return MenuSearch_selectAutoSuggestFromAutoSuggestTextBox(event,
                                                            "-99",
                                                            "txt_Menu_Bar_Search_Data", 
                                                            "MenuBarSearchData",
                                                            "txt_Menu_Bar_Search_Data");'
                              suggestID='-99' />
                        </div>
                    </td>
                </tr>
                <tr style="background-color:#FFFFFF;>">
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>
                        <div id="txt_Menu_Bar_Search_Data_Suggestions" class="tableLocal" 
                             style="margin-right:5px;display:none;background:white;position:absolute;
                             z-index: 1000;margin-top:-5px;">
                        </div>
                    </td>
                </tr>
            </table>
        </div>

    </xsl:template>
</xsl:stylesheet>
