﻿<?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="no" omit-xml-declaration ="yes"/>

    <xsl:template match="/">
        <xsl:variable name="HostName" select="normalize-space(AjaxRequest/HostName)"/>

        <div>
            <xsl:comment>googleoff: all</xsl:comment>
            <noindex>
                <table calss="tableMaster" cellpadding="0" cellspacing="0">
                    <tr>
                        <td colspan="6" class="labelSize18Gray">
                            What are you working on in your life?
                        </td>
                    </tr>
                    <tr>
                        <td class="labelSize14Black" width="200px;" style="border-bottom: 1px solid gray;">
                            <span style="cursor:pointer;color: #376092;padding-left:10px; padding-right:10px;" id="span_2"
                                  onmouseover="this.style.textDecoration='underline';this.style.background = '#EEEEEE';navigationBar('2');"
                                  onmouseout="this.style.textDecoration='none';this.style.background = 'white';navigationBar('0');"
                              >Finance</span>
                        </td>
                        <td class="labelSize14Black" width="200px;" style="border-bottom: 1px solid gray;">
                            <span style="cursor:pointer;color: #376092;padding-left:10px; padding-right:10px;" id="span_3"
                                  onmouseover="this.style.textDecoration='underline';this.style.background = '#EEEEEE';navigationBar('3');"
                                  onmouseout="this.style.textDecoration='none';this.style.background = 'white';navigationBar('0');"
                              >Fitness</span>
                        </td>
                        <td class="labelSize14Black" width="200px;" style="border-bottom: 1px solid gray;">
                            <span style="cursor:pointer;color: #376092;padding-left:10px; padding-right:10px;" id="span_4"
                                   onmouseover="this.style.textDecoration='underline';this.style.background = '#EEEEEE';navigationBar('4');"
                                  onmouseout="this.style.textDecoration='none';this.style.background = 'white';navigationBar('0');"
                              >Family</span>
                        </td>
                        <td class="labelSize14Black" width="200px;" style="border-bottom: 1px solid gray;">
                            <span style="cursor:pointer;color: #376092;padding-left:10px; padding-right:10px;" id="span_5"
                                  onmouseover="this.style.textDecoration='underline';this.style.background = '#EEEEEE';navigationBar('5');"
                                  onmouseout="this.style.textDecoration='none';this.style.background = 'white';navigationBar('0');"
                              >Fun</span>
                        </td>
                        <td class="labelSize14Black" width="200px;" style="border-bottom: 1px solid gray;">
                            <span style="cursor:pointer;color: #376092;padding-left:10px; padding-right:10px;" id="span_6"
                                  onmouseover="this.style.textDecoration='underline';this.style.background = '#EEEEEE';navigationBar('6');"
                                  onmouseout="this.style.textDecoration='none';this.style.background = 'white';navigationBar('0');"
                              >Faith</span>
                        </td>
                        <td width="18px;"></td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <xsl:for-each select="AjaxRequest/LifeSpaces/LifeSpace">
                                <xsl:variable name="MenuText">
                                    <xsl:choose>
                                        <xsl:when test ="ItemID = 2">Finance and Career</xsl:when>
                                        <xsl:when test ="ItemID = 3">Health and Fitness</xsl:when>
                                        <xsl:when test ="ItemID = 4">Relationships and Family</xsl:when>
                                        <xsl:when test ="ItemID = 5">Travel and Entertainment</xsl:when>
                                        <xsl:when test ="ItemID = 6">Faith, Spirituality and Contribution</xsl:when>
                                    </xsl:choose>
                                </xsl:variable>
                                <div id="div_Lifespace_{ItemID}" style="width:690px;display:none;position:absolute;
                                                                    z-index:1000; border: 1px solid gray;margin-top:-1px;"
                                     onmouseover="navigationBar({ItemID});"
                                     onmouseout="navigationBar('0');">
                                    <table class="tableMaster" style="background:#EEEEEE">
                                        <tr>
                                            <td colspan="5">
                                                <h2 style="font-size: 14pt; font-weight: bold;margin:0px;color:gray;">
                                                    <xsl:value-of select ="$MenuText"/>
                                                </h2>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="10%" style="text-align:top;">
                                                <div style="margin-left:10px;">
                                                    <img src="http://{$HostName}/DesktopModules/LifeSpaceTemplates/Web/Images/{Item}.jpg"
                                                         style="margin-left: 0px; border: 0px; vertical-align: middle;width:80px;"
                                                         align="absmiddle" />
                                                </div>
                                            </td>
                                            <td width="15%" class="navigationColBreak" style="text-align:top;" nowrap="nowrap">
                                                <div style="margin-left:10px; margin-right:5px;">
                                                    <xsl:for-each select ="Communities/Community">
                                                        <a class="link" href="http://www.LifeSpace.com/{PromoteKey}">
                                                            <h2 class="labelSize11" style="margin:0px;"
                                                                onmouseover="this.style.textDecoration='underline';"
                                                                onmouseout="this.style.textDecoration='none';">
                                                                <xsl:value-of select ="Community"/>
                                                            </h2>
                                                        </a>
                                                    </xsl:for-each>
                                                </div>
                                            </td>
                                            <td width="50%" class="navigationColBreak" style="text-align:top;">
                                                <div style="margin-left:10px; margin-right:5px;">
                                                    <h2 class="disableItem" style="margin:0px;">Get Started</h2>
                                                    <xsl:for-each select ="Templates/Template">
                                                        <a href="http://www.LifeSpace.com/{PromoteKey}">
                                                            <h2 class="link" style="margin:0px;"
                                                                onmouseover="this.style.textDecoration='underline';"
                                                                onmouseout="this.style.textDecoration='none';">
                                                                <xsl:value-of select ="Name"/>
                                                            </h2>
                                                        </a>
                                                    </xsl:for-each>
                                                    <a style="margin-top:10px;"
                                                       href="http://www.LifeSpace.com/ListTemplates.aspx?ID={ItemID}">
                                                        <h2 class="link" style="margin:0px;"
                                                            onmouseover="this.style.textDecoration='underline';"
                                                            onmouseout="this.style.textDecoration='none';">More Templates...</h2>
                                                    </a>
                                                </div>
                                            </td>
                                            <td width="25%" style="text-align:top;">
                                                <div style="margin-left:10px; margin-right:5px;">
                                                    <h2 class="disableItem" style="margin:0px;">Latest Article</h2>
                                                    <xsl:for-each select ="Publications/Publication">
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <a href="http://www.LifeSpace.com/Publication.aspx?ID={ItemID}">
                                                                        <h2 class="link" style="margin:0px;"
                                                                            onmouseover="this.style.textDecoration='underline';"
                                                                            onmouseout="this.style.textDecoration='none';">
                                                                            <xsl:value-of select ="Title"/>
                                                                        </h2>
                                                                    </a>
                                                                    <span class="labelGraySize10">
                                                                        by&#xa0;<xsl:value-of select ="DisplayName"/>
                                                                    </span>
                                                                </td>
                                                                <td>
                                                                    <img src="{ImageURL}"
                                                           style="margin-left: 0px; border: 0px; vertical-align: middle;display:none;" align="absmiddle"
                                                           onload='setWidthAndHeightImage(this,"40");'/>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </xsl:for-each>
                                                    <a style="margin-top:10px;"
                                                       href="http://www.LifeSpace.com/ListPublications.aspx?ID={ItemID}">
                                                        <h2 class="link" style="margin:0px;"
                                                            onmouseover="this.style.textDecoration='underline';"
                                                            onmouseout="this.style.textDecoration='none';">More Articles..</h2>
                                                    </a>
                                                    <br/>
                                                    <xsl:if test ="count(Brands/Brand) &gt; 0">
                                                        <h2 class="disableItem" style="margin:0px;">Marketplace</h2>
                                                        <xsl:for-each select ="Brands/Brand">
                                                            <a href="http://www.LifeSpace.com/{BrandKey}">
                                                                <h2 class="link" style="margin:0px;"
                                                                    onmouseover="this.style.textDecoration='underline';"
                                                                    onmouseout="this.style.textDecoration='none';">
                                                                    <xsl:value-of select ="CompanyName"/>
                                                                </h2>
                                                            </a>
                                                        </xsl:for-each>
                                                    </xsl:if>
                                                    <!--<a>
                                                    <h2 class="link" style="margin:0px;">More Sites...</h2>
                                                </a>-->
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </xsl:for-each>
                        </td>
                    </tr>
                </table>
            </noindex>
            <xsl:comment>googleon: all</xsl:comment>
        </div>
    </xsl:template>
</xsl:stylesheet>
