<?xml version='1.0'?>
<!--Copyright 1999-2000 Intuit Inc. All rights reserved. Unauthorized duplication is a violation of applicable law.-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template><xsl:apply-templates/></xsl:template>

<xsl:template match="actions/action">
<xsl:for-each select=".">
	<DIV>
	<xsl:attribute name="class">menuItem</xsl:attribute>
	<xsl:attribute name="task"><xsl:value-of select="task"/></xsl:attribute>
	<xsl:value-of select="ui"/>
	</DIV>
</xsl:for-each>
</xsl:template>
	
<xsl:template match="table/rows">
<table border="0" width="100%" height="100%" cellpadding="1" cellspacing="0">
<tr><td width="10%"><img src="images/blank.gif" width="68" height="1"/></td><td width="70%"> </td><td width="20%"><img src="images/blank.gif" width="85" height="1"/></td></tr>
<tr class="key">
<td nowrap="yes"><DIV ALIGN="left"><img src="images/blank.gif" width="3" height="1"/>Due Date</DIV></td>
<td><DIV ALIGN="left">Description</DIV></td>
<td nowrap="yes"><DIV ALIGN="right">Amount<img src="images/blank.gif" width="3" height="1"/></DIV></td>
</tr>
<tr><td colspan="3" bgcolor="#FFFFFF"></td></tr>
</table>
	<xsl:apply-templates/>
<table>
<tr><td><BR/></td></tr>
<tr><td bgcolor="#FFFFFF" align="center"><a href="qbks://qbw:open_message_manager">Display Alerts Manager</a></td></tr>
<tr><td></td></tr>
</table>	
</xsl:template>

<xsl:template match="row[@view='none']"></xsl:template>

<xsl:template match="row[@view!='none']">
<xsl:for-each select=".">
<table border="0" width="100%" height="100%" cellpadding="1" cellspacing="0">
<xsl:attribute name="id">R<xsl:value-of select="row_id"/></xsl:attribute>
<tr><td></td><td width="10%"><img src="images/blank.gif" width="68" height="1"/></td><td width="70%"> </td><td width="20%"><img src="images/blank.gif" width="85" height="1"/></td><td></td></tr>
 <tr>
	<xsl:attribute name="class">message</xsl:attribute>
	<xsl:attribute name="onmouseover">rolloverRow.className='row';rolloverRow='0';rolloverGRow.className='message';this.className = 'rollovermessage';rolloverGRow = this;</xsl:attribute>
	<xsl:attribute name="onmouseout">rolloverRow.className='row';rolloverGRow.className = 'message';rolloverGRow = '0';</xsl:attribute>
 	<xsl:choose>
	<xsl:when test="actions/action">
		<xsl:attribute name="oncontextmenu">rolloverRow.className='row';rolloverRow='0';rolloverGRow.className='message';this.className = 'rollovermessage';rolloverGRow = this;showContextMenu(<xsl:value-of select="row_id"/>);return false;</xsl:attribute>
	</xsl:when>
	<xsl:otherwise>
		<xsl:attribute name="oncontextmenu">return false;</xsl:attribute>
	</xsl:otherwise>
	</xsl:choose>
	<xsl:choose>
		<xsl:when test=".[@view='summary']"> 
			<xsl:attribute name="onclick">rolloverRow.className='row';rolloverRow='0';rolloverGRow.className='message';this.className = 'rollovermessage';rolloverGRow = this;toggleGroup(this,'G<xsl:value-of select="row_id"/>','detail');</xsl:attribute>
		</xsl:when>
		<xsl:otherwise>
			<xsl:attribute name="onclick">rolloverRow.className='row';rolloverRow='0';rolloverGRow.className='message';this.className = 'rollovermessage';rolloverGRow = this;toggleGroup(this,'G<xsl:value-of select="row_id"/>','summary');</xsl:attribute>
		</xsl:otherwise>
	</xsl:choose>
	<td></td><td class="description" align="left" valign="bottom" colspan="2">
 	<xsl:choose>
		<xsl:when test=".[@view='summary']"> 
			<img src="Reminders/images/plus.gif" align="left" vspace="3" hspace="2" width="9" height="9" onmousedown="this.src = 'Reminders/images/plus.down.gif'" onmouseup="this.src = 'Reminders/images/plus.gif'"/>
		</xsl:when>
		<xsl:otherwise>
			<img src="Reminders/images/minus.gif" align="left" vspace="3" hspace="2" width="9" height="9" onmousedown="this.src = 'Reminders/images/minus.down.gif'" onmouseup="this.src = 'Reminders/images/minus.gif'"/>
		</xsl:otherwise>
	</xsl:choose>

  <xsl:value-of select="description"/>
  <xsl:choose>
  <xsl:when test="detailcount">
	&#160;&#160;<font color="#660000">(<xsl:value-of select="detailcount"/>)</font>&#160;&#160;
  </xsl:when>
  <xsl:otherwise>
	&#160;
  </xsl:otherwise>
  </xsl:choose>
  </td>
  <td nowrap="yes" class="description" align="right"><xsl:value-of select="amount"/><img src="images/blank.gif"  width="3" height="1"/></td>
 <td></td></tr>
	<xsl:if test="actions/action">
	<DIV>
	 <xsl:attribute name="class">menus</xsl:attribute>
	 <xsl:attribute name="id"><xsl:value-of select="row_id"/></xsl:attribute>
	 <xsl:attribute name="onmouseover">toggleContextMenu()</xsl:attribute>
	 <xsl:attribute name="onmouseout">toggleContextMenu()</xsl:attribute>
	 <xsl:attribute name="onclick">clickContextMenu(<xsl:value-of select="row_id"/>)</xsl:attribute>
	 <xsl:attribute name="oncontextmenu">rtClickContextMenu(<xsl:value-of select="row_id"/>);return false;</xsl:attribute>
	 <xsl:attribute name="style">display: none;</xsl:attribute>
	 <xsl:apply-templates select="actions/action"/>
	</DIV>
	</xsl:if>
 <tr><td colspan="5" bgcolor="#FFFFFF"></td></tr>

 <xsl:for-each select=".[@view='detail']/details/detail">
  <tr>
 	<xsl:choose>
	<xsl:when test="actions/action">
		<xsl:attribute name="class">standardrow</xsl:attribute>
		<xsl:attribute name="onmouseover">rolloverGRow.className='message';rolloverGRow='0';rolloverRow.className="row";this.className="rowHighlight";rolloverRow = this;</xsl:attribute>
		<xsl:attribute name="onmouseout">rolloverRow.className="row";rolloverRow = '0';</xsl:attribute>
		<xsl:attribute name="oncontextmenu">rolloverGRow.className='message';rolloverGRow='0';rolloverRow.className="row";this.className="rowHighlight";rolloverRow = this;showContextMenu(<xsl:value-of select="row_id"/>);return false;</xsl:attribute>
		<xsl:attribute name="onclick">this.className="rowHighlight";rolloverGRow.className='message';rolloverGRow='0';rolloverRow.className="row";rolloverRow = this;clickRow();return false;</xsl:attribute>
	</xsl:when>
	<xsl:otherwise>
		<xsl:attribute name="class">nounderlinerow</xsl:attribute>
		<xsl:attribute name="oncontextmenu">return false;</xsl:attribute>
	</xsl:otherwise>
	</xsl:choose>
	<td></td>
	<td nowrap="yes" class="date" valign="top"><xsl:attribute name="task"><xsl:value-of select="actions/action[@type='default']/task"/></xsl:attribute><img src="images/blank.gif"  width="3" height="1"/><xsl:value-of select="date"/><img src="images/blank.gif"  width="5" height="1"/></td>
	<td class="reminder" valign="top"><xsl:attribute name="task"><xsl:value-of select="actions/action[@type='default']/task"/></xsl:attribute>
	<xsl:if test=".[@online='true']"><img src="images/blank.gif"  width="3" height="1"/><img src="images/com_bolt.gif" width="8" height="12"><xsl:attribute name="task"><xsl:value-of select="actions/action[@type='default']/task"/></xsl:attribute></img><img src="images/blank.gif" width="3" height="1"/></xsl:if>
	<xsl:value-of select="description"/>
	</td>
	<td nowrap="yes" class="amount" valign="top" align="right"><xsl:attribute name="task"><xsl:value-of select="actions/action[@type='default']/task"/></xsl:attribute><img src="images/blank.gif"  width="5" height="1"/><xsl:value-of select="amount"/><img src="images/blank.gif"  width="3" height="1"/></td>
	<td></td></tr> 
 	<xsl:if test="actions/action">
	<DIV>
	 <xsl:attribute name="class">menus</xsl:attribute>
	 <xsl:attribute name="id"><xsl:value-of select="row_id"/></xsl:attribute>
	 <xsl:attribute name="onmouseover">toggleContextMenu()</xsl:attribute>
	 <xsl:attribute name="onmouseout">toggleContextMenu()</xsl:attribute>
	 <xsl:attribute name="onclick">clickContextMenu(<xsl:value-of select="row_id"/>)</xsl:attribute>
	 <xsl:attribute name="oncontextmenu">rtClickContextMenu(<xsl:value-of select="row_id"/>);return false;</xsl:attribute>
	 <xsl:attribute name="style">display: none;</xsl:attribute>
	 <xsl:apply-templates select="actions/action"/>
	</DIV>
	</xsl:if>
 <tr><td colspan="5" bgcolor="#FFFFFF"></td></tr>
 </xsl:for-each>
 <xsl:if test=".[@view='detail']">
 <xsl:if test="detailcount[. $gt$ 10]">
	<tr><td colspan="5" bgcolor="#FFFFFF" height="6"></td></tr>
	<tr><td>&#160;</td><td colspan="3" bgcolor="#FFFFFF" align="right"><a><xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>More <xsl:eval>truncate(this)</xsl:eval>...</a></td><td>&#160;</td></tr>
 </xsl:if>
 </xsl:if>
</table>
 </xsl:for-each> 
</xsl:template>
<xsl:script><![CDATA[
    function truncate(node)
    {
		var MAX = 38;
		var myNode = node.selectSingleNode("description").text;
		if (myNode.length > MAX)
		{
      return myNode.substring(0,MAX);
		}
		else
		{
      return myNode;
		}
    }
    
  ]]></xsl:script>
</xsl:stylesheet>