<?xml version="1.0" encoding="ISO-8859-1"?> 

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- parameters -->
<xsl:param name="section" select="'section'" />
<xsl:param name="username" select="'username'" />
<xsl:param name="link" select="'link'" />


<xsl:variable name="securl">section[@order='<xsl:value-of select="$section"/>']</xsl:variable>

<xsl:variable name="action">/client/view.epl</xsl:variable>


<!-- templates -->

<!-- trademark template -->
<xsl:template match="tm">
  <span class="trademark">
		<xsl:value-of select="."/><font size="-1"><sup>TM</sup></font>
	</span>
</xsl:template>

<!-- wording template -->
<xsl:template match="paragraph"><xsl:value-of select="."/>
<xsl:text>

</xsl:text>

</xsl:template>

<xsl:template match="/manual">

<!-- debug
<xsl:value-of select="$section"/>
<xsl:value-of select="$securl"/>
-->

<!-- top nav bar -->
<!--
<p>
<center>
<a>
<xsl:attribute name="href">/admin/clients/view.epl?u=<xsl:value-of select="$username"/></xsl:attribute>
Table of Contents
</a>
</center>
</p>
-->

<!-- title bar -->
<p>
<table width="95%">
<tr>
	<th align="left">Company</th>
	<td><xsl:value-of select="company"/></td>
</tr>
<tr><th align="left">Title</th>
	<td><xsl:value-of select="title"/></td></tr>
<tr><th align="left">Manager</th>
	<td><xsl:value-of select="manager"/></td></tr>
</table>
</p>
<p/>

<!-- section -->
<xsl:for-each select="section[@order=$section]">


<table width="95%">
<tr>
	<th align="left" class="sectionhead">
		<table width="100%">
			<tr>
			<th align="left" class="sectionhead">
				Section <xsl:value-of select="$section"/><br/>
			</th>
			<td align="right" rowspan="3">
			 <a>
				<xsl:attribute name="href">#</xsl:attribute>
				<xsl:attribute name="onClick">popup('www.strategicriskcontrol.com/client/roadmap.epl?s=<xsl:value-of select="$section"/>','roadmap',350,350); return false;</xsl:attribute><img src="/media/signpost.jpg" border="0"/><br/>Roadmap</a>
			</td>
			</tr>
			<tr>
				<th align="left" class="sectionhead"><xsl:value-of select="title"/>
			</th>
			</tr>
			<tr>
			  <td align="left" class="sectiondesc">
			    <xsl:copy-of select="desc"/>
			  </td>
			</tr>
		</table>
	</th>
</tr>
<tr>
	<td align="left" class="sectionconj">
		<xsl:apply-templates select="conjunction"/>
	</td>
</tr>
<tr><td align="left" class="sectioncontent">
<p/>
<form method="post">
	<xsl:attribute name="action">
		<xsl:value-of select="$action"/>
	</xsl:attribute>

	<input type="hidden" name="s">
		<xsl:attribute name="value">
			<xsl:value-of select="$section"/>
		</xsl:attribute>
	</input>

	<input type="hidden" name="sv">
		<xsl:attribute name="value">1</xsl:attribute>
	</input>

	<input type="hidden" name="u">
		<xsl:attribute name="value">
			<xsl:value-of select="$username"/>
		</xsl:attribute>
	</input>


	<table bgcolor="#DDDDDD" width="100%">
		<tr>
			<td>
				<xsl:for-each select="wording/paragraph">
     			<xsl:apply-templates select="."/>
    		</xsl:for-each>
			</td>
		</tr>
	</table>

<br/>
<a name="client"/>
<p>
	<textarea name="clientwording" rows="20" cols="60">
		<xsl:for-each select="clientwording/paragraph">
			<xsl:apply-templates select="."/>
		</xsl:for-each>
	</textarea>
</p>




<a name="schedules"/>
<p>
<b>Schedules</b> - 
<a class="tiny">
  <xsl:attribute name="href">add_schedule.epl?u=<xsl:value-of select="$username"/>&amp;s=<xsl:value-of select="$section"/>
  </xsl:attribute>Add Schedule
</a>
</p>
<p>
<table>
<xsl:for-each select="document('arg:/schedules')/schedules/schedule">
<tr><th><xsl:value-of select="designation"/></th>
<td>
<a target="_blank">
	<xsl:attribute name="href"><xsl:value-of select="$link"/><xsl:value-of select="file"/></xsl:attribute><xsl:value-of select="title"/></a>
</td>
</tr>
</xsl:for-each>
</table>
</p>
<br/><br/><p>
<input type="submit" value="Save Changes" /></p>
</form>

</td></tr>
</table>

</xsl:for-each>


</xsl:template>



</xsl:stylesheet>
