<?xml version="1.0"?>

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

  <xsl:template match="error:notify">
    <html>
      <head>
        <title><xsl:value-of select="@type"/>:<xsl:value-of select="error:title"/></title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
        <link rel="stylesheet" type="text/css" href="resources/ipms.css" title="ipms"/>
        <script src="resources/menu.js"></script>
      </head>
      <body marginwidth="0" marginheight="0">
       <table cellpadding="0" cellspacing="0" border="0">
          <tr valign="top">
            <td width="140"><img src="images/logo.gif" width="140" height="98"/></td>
            <td background="images/back.gif" width="100%">
              <img src="images/transp.gif" width="1" height="13"/><br/>
              <img src="images/title.gif" width="286" height="31"/><br/>
              <img src="images/transp.gif" width="200" height="20"/><a href="search"><img src="images/search.gif" border="0" width="82" height="27"/></a><br/>
              <span class="title"><xsl:value-of select="@type"/>:<xsl:value-of select="error:title"/></span>
            </td>
          </tr>
        </table>
        <table cellpadding="0" cellspacing="0" border="0">
          <tr valign="top">
            <td width="140">
              <table cellpadding="0" cellspacing="0" border="0">
                <tr align="top">
                  <td colspan="4">
                    <img src="images/navtop.gif"/>
                  </td>
                </tr>
		<xsl:copy>
                  <xsl:apply-templates select="document('menu.xml')"/>
		</xsl:copy>
                <tr>
                  <td colspan="4">
                    <img src="images/transp.gif" width="140" height="20"/><br/>
                    <a href="/gator"><img src="images/al.jpg" width="140" height="59" border="0"/></a>
                  </td>
                </tr>
              </table>
            </td>
            <td>
              <h1>
                <xsl:value-of select="@type"/>:<xsl:value-of select="error:title"/><br/>
                <img src="images/stripe.gif" width="367" height="6" alt=""/>
              </h1>
	      <div class="s1">
                <h2><img src="images/ipms_arro.gif" width="18" height="16"/><xsl:value-of select="@type"/></h2>
		<div class="s2">
	          <xsl:apply-templates select="error:message"/>
		</div>
		<h2><img src="images/ipms_arro.gif" width="18" height="16"/>details</h2>
		<div class="s2">
		  <h3>from</h3>
		  <div class="s3">
		    <xsl:apply-templates select="@sender"/>
		  </div>
		  <h3>source</h3>
		  <div class="s3">
		    <xsl:apply-templates select="error:source"/>
		  </div>
		  <h3>description</h3>
		  <div class="s3">
		    <xsl:apply-templates select="error:description"/>
		  </div>
		</div>
		<h2><img src="images/ipms_arro.gif" width="18" height="16"/>extra info</h2>
		<div class="s2">
		  <xsl:apply-templates select="error:extra"/>
		</div>
	      </div>
              <xsl:apply-templates/>
	      <p/>
              <img src="images/transp.gif" width="400" height="3"/>
	      <a href="#top"><img src="images/topbutton.gif" border="0"/></a>
            </td>
          </tr>
        </table>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="menu">
    <tr valign="top">
      <td width="16px">
        <img src="../images/menu_top_left.gif" width="16" height="7"/>
      </td>
      <td width="85px" bgcolor="#000000" align="right">
        <a class="menu"
           href="/welcome" 
           onMouseOver="changeImage('home','images/menu_tab_sel.gif');"
           onMouseOut="changeImage('home','images/menu_tab_unsel.gif');"
           onMouseDown="blurFocus(this);">welcome</a>
      </td>
      <td width="13px" background="images/menu_right_normal.gif">
        <img name="home" src="images/menu_tab_unsel.gif" width="13" height="20"/>
      </td>
      <td width="26px"/>
    </tr>
    <tr>
      <td width="16px"/>
      <td width="98px" align="right" colspan="2">
        <img src="images/menu_sep.gif" width="98" height="6"/>
      </td>
      <td width="26px"/>
    </tr>
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="group">
    <tr valign="top">
      <td width="16px"/>
      <td width="85px" bgcolor="#000000" align="right">
        <xsl:element name="a">
          <xsl:attribute name="class">menu</xsl:attribute>
          <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
          <xsl:attribute name="onMouseOver">changeImage('gtop','images/menu_group_top_sel.gif');</xsl:attribute>
          <xsl:attribute name="onMouseOut">changeImage('gtop','images/menu_group_top_unsel.gif');</xsl:attribute>
          <xsl:attribute name="onMouseDown">blurFocus(this);</xsl:attribute>
          <xsl:value-of select="@title"/>
        </xsl:element>
      </td>
      <td width="13px" background="images/menu_right_sub.gif">
        <xsl:element name="img">
          <xsl:attribute name="name">gtop</xsl:attribute>
          <xsl:attribute name="src">images/menu_group_top_unsel.gif</xsl:attribute>
          <xsl:attribute name="width">13</xsl:attribute>
          <xsl:attribute name="height">19</xsl:attribute>
        </xsl:element>
      </td>
      <td width="26px"/>
    </tr>
    <xsl:apply-templates select="item" mode="group"/>
    <tr>
      <td width="16px"/>
      <td width="98px" align="right" colspan="2">
        <img src="images/menu_sep.gif" width="98" height="6"/>
      </td>
      <td width="26px"/>
    </tr>
  </xsl:template>

  <xsl:template match="item" mode="group">
    <tr>
      <td colspan="2" width="101px"><img href="images/transp.gif" width="101" height="2"/></td>
      <td width="13px" background="images/menu_right_sub.gif"/>
      <td width="26px"/>
    </tr>
    <xsl:choose>
      <xsl:when test="position()=last()">
        <tr valign="top">
          <td width="16px"/>
          <td width="85px" bgcolor="#000000" align="right">
            <xsl:element name="a">
              <xsl:attribute name="class">group</xsl:attribute>
              <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
              <xsl:attribute name="onMouseOver">changeImage('gbot','images/menu_group_bot_sel.gif');</xsl:attribute>
              <xsl:attribute name="onMouseOut">changeImage('gbot','images/menu_group_bot_unsel.gif');</xsl:attribute>
              <xsl:attribute name="onMouseDown">blurFocus(this);</xsl:attribute>
              <xsl:value-of select="@title"/>
            </xsl:element>
          </td>
          <td width="13px" valign="bottom" background="images/menu_right_sub.gif">
            <xsl:element name="img">
              <xsl:attribute name="name">gbot</xsl:attribute>
              <xsl:attribute name="src">images/menu_group_bot_unsel.gif</xsl:attribute>
              <xsl:attribute name="width">13</xsl:attribute>
              <xsl:attribute name="height">19</xsl:attribute>
            </xsl:element>
          </td>
          <td width="26px"/>
        </tr>
      </xsl:when>
      <xsl:otherwise>
        <tr valign="top">
          <td width="16px"/>
          <td width="85px" bgcolor="#000000" align="right">
            <xsl:element name="a">
              <xsl:attribute name="class">group</xsl:attribute>
              <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
              <xsl:attribute name="onMouseOver">changeImage('g<xsl:number value="position()" format="01"/>','images/menu_group_sel.gif');</xsl:attribute>
              <xsl:attribute name="onMouseOut">changeImage('g<xsl:number value="position()" format="01"/>','images/menu_group_unsel.gif');</xsl:attribute>
              <xsl:attribute name="onMouseDown">blurFocus(this);</xsl:attribute>
              <xsl:value-of select="@title"/>
            </xsl:element>
          </td>
          <td width="13px" background="images/menu_right_sub.gif">
            <xsl:element name="img">
              <xsl:attribute name="name">g<xsl:number value="position()" format="01"/></xsl:attribute>
              <xsl:attribute name="src">images/menu_group_unsel.gif</xsl:attribute>
              <xsl:attribute name="width">13</xsl:attribute>
              <xsl:attribute name="height">19</xsl:attribute>
            </xsl:element>
          </td>
          <td width="26px"/>
        </tr>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template match="item">
    <tr valign="top">
      <td width="16px"/>
      <td width="85px" bgcolor="#000000" align="right">
        <xsl:element name="a">
          <xsl:attribute name="class">menu</xsl:attribute>
          <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
          <xsl:attribute name="onMouseOver">changeImage('w<xsl:number value="position()" format="01"/>','images/menu_tab_sel.gif');</xsl:attribute>
          <xsl:attribute name="onMouseOut">changeImage('w<xsl:number value="position()" format="01"/>','images/menu_tab_unsel.gif');</xsl:attribute>
          <xsl:attribute name="onMouseDown">blurFocus(this);</xsl:attribute>
          <xsl:value-of select="@title"/>
        </xsl:element>
      </td>
      <td width="13px" background="images/menu_right_normal.gif">
        <xsl:element name="img">
          <xsl:attribute name="name">w<xsl:number value="position()" format="01"/></xsl:attribute>
          <xsl:attribute name="src">images/menu_tab_unsel.gif</xsl:attribute>
          <xsl:attribute name="width">13</xsl:attribute>
          <xsl:attribute name="height">19</xsl:attribute>
        </xsl:element>
      </td>
      <td width="26px"/>
    </tr>
    <tr>
      <td width="16px"/>
      <td width="98px" align="right" colspan="2">
        <img src="images/menu_sep.gif" width="98" height="6"/>
      </td>
      <td width="26px"/>
    </tr>
  </xsl:template>


  <xsl:template select="error:extra">
    <pre>
<xsl:value-of select="."/>
    </pre>
  </xsl:template>

  <xsl:template select="error:message">
    <p>
      <xsl:value-of select="."/>
    </p>
  </xsl:template>

  <xsl:template select="error:source">
    <p>
      <xsl:value-of select="."/>
    </p>
  </xsl:template>

  <xsl:template select="error:description">
    <p>
      <xsl:value-of select="."/>
    </p>
  </xsl:template>

</xsl:stylesheet>


