<?xml version="1.0" encoding="ISO-8859-15"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:output method="html" indent="no" omit-xml-declaration="yes" encoding="ISO-8859-1"/>
<!--Component xslc:OutlookBar-->
<xsl:template name="xslc:OutlookBarHeader">
<link rel="stylesheet" type="text/css" href="{$XMLC_SkinPath}outlookbar/outlookbar.css"/>
<script language="javascript" src="{$XMLC_Portal}outlookbar.js"/>
</xsl:template>
<xsl:template name="xslc:OutlookBar">
<xsl:param name="Palettes" select="/document/Palettes"/>
<xsl:param name="SelectedPalette"/>
<xsl:param name="Width">100%</xsl:param>
<xsl:variable name="VPalettes" select="msxsl:node-set($Palettes)"/>
<xsl:variable name="SelectedPaletteID">
<xsl:choose>
<xsl:when test="$SelectedPalette != ''">
<xsl:value-of select="generate-id($VPalettes/Palette[@Name=$SelectedPalette])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="generate-id($VPalettes/Palette[1])"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<form action="" method="GET" name="obForm">
<input type="hidden" name="obPalette" value="{$SelectedPaletteID}"/>
<input type="hidden" name="obItem"/>
</form>
<table border="0" cellpadding="0" cellspacing="0" class="obContainer" height="100%" width="{$Width}">
<xsl:for-each select="$VPalettes/Palette">
<xsl:variable name="PaletteID" select="generate-id()"/>
<xsl:variable name="Selected">
<xsl:if test="$SelectedPaletteID = $PaletteID">1</xsl:if>
</xsl:variable>
<tr valign="top">
<td id="obPalette{$PaletteID}">
<xsl:if test="$Selected = '1'">
<xsl:attribute name="height">100%</xsl:attribute>
</xsl:if>
<div id="obPaletteHeader{$PaletteID}" onmousedown="obPaletteDown(this);" onmouseout="obPaletteOut(this, '{$PaletteID}');" onmouseover="obPaletteOver(this, '{$PaletteID}');">
<xsl:attribute name="style">background-image: url(<xsl:value-of select="$XMLC_SkinPath"/>outlookbar/palette<xsl:if test="$Selected = '1'">_selected</xsl:if>.gif)</xsl:attribute>
<xsl:attribute name="class"><xsl:choose><xsl:when test="$Selected = '1'">obPaletteSelected</xsl:when><xsl:otherwise>obPalette</xsl:otherwise></xsl:choose></xsl:attribute>
<xsl:attribute name="onclick">obPaletteClick(this, '<xsl:value-of select="$PaletteID"/>');<xsl:if test="@OnClick != ''"><xsl:value-of select="@OnClick"/></xsl:if></xsl:attribute>
<xsl:choose>
<xsl:when test="Content">
<xsl:copy-of select="Content"/>
</xsl:when>
<xsl:otherwise>
<xsl:if test="@ImagePath != ''">
<img align="absmiddle" border="0" src="{@ImagePath}"/>&#160;</xsl:if>
<xsl:value-of select="@Caption"/>
</xsl:otherwise>
</xsl:choose>
</div>
<div id="obPaletteContent{$PaletteID}">
<xsl:attribute name="style">display: <xsl:choose><xsl:when test="$Selected = '1'">block</xsl:when><xsl:otherwise>none</xsl:otherwise></xsl:choose></xsl:attribute>
<xsl:for-each select="Item">
<xsl:variable name="ItemID">
<xsl:choose>
<xsl:when test="@ItemID != ''">
<xsl:value-of select="@ItemID"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="generate-id()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<a hidefocus="true" href="{@HRef}" style="text-decoration: none; width: 100%;">
<xsl:if test="@Target != ''">
<xsl:attribute name="target"><xsl:value-of select="@Target"/></xsl:attribute>
</xsl:if>
<xsl:if test="@OnClick != ''">
<xsl:attribute name="onclick"><xsl:value-of select="@OnClick"/></xsl:attribute>
</xsl:if>
<div class="obItem" id="obItem{$ItemID}" title="{@Title}" onclick="obItemClick(this, '{$ItemID}');" onmouseover="obItemOver(this, '{$ItemID}');" onmouseout="obItemOut(this, '{$ItemID}');">
<xsl:if test="@ImagePath != ''">
<img align="absmiddle" border="0" src="{@ImagePath}"/>&#160;</xsl:if>
<xsl:value-of select="@Caption"/>
</div>
</a>
</xsl:for-each>
</div>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
