<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='ISO-8859-1' indent='yes'/>

<xsl:template match="/">
  <html>
  <body>
   	<xsl:choose>
		<xsl:when test="GLOSSARY_RESULT/@term_count = 0">
		Sorry, no matches found. 
		</xsl:when>
	</xsl:choose>
   	
        <xsl:for-each select="GLOSSARY_RESULT/GLOSSARY_TERM">
	
        <table border="0" width="100%">
              <tr bgcolor="#DDE2FF">
		    <th class="mainText" align="left">
		    <xsl:value-of select="TERM"/>:&#160;&#160;<xsl:value-of select="SHORT_DEF"/>
		    </th>
              </tr>                   
        </table>

        <table border="0" width="100%">
            <tr>
                <td class="mainText"><xsl:value-of select="FULL_DEF"/></td>
            </tr>
            <tr bgcolor="#DDE2FF">
                <th class="mainText" align="left">Suggested Search Terms</th>
            </tr>
            <tr>
            
            <td><u><font color="#0000FF"><a style="cursor: pointer" class="mainText"><xsl:attribute name="onclick">parent.location.href = 'http://www.google.com/search?q=<xsl:value-of select="SEARCH_TERMS"/>'</xsl:attribute><xsl:value-of select="SEARCH_TERMS"/></a></font></u></td>
                
            </tr>
        </table>
        <table border = "0" width = "100%">
            <tr bgcolor="#DDE2FF" >
                <th align="left" class="mainText">Related Terms</th>
            </tr>
        </table>
        <table border = "0" width="100%">                     
                <tr>
                <xsl:for-each select="RELATED_TERMS/RELATED_TERM"><a style="cursor: pointer"  class="mainText"><xsl:attribute name="onclick">searchAcronym('<xsl:value-of select="."/>')</xsl:attribute><font color="#0000FF"><u><xsl:value-of select="."/></u></font></a><xsl:text>&#160; </xsl:text></xsl:for-each>                     
                </tr>
        </table>    
        
        <br/>
	
        </xsl:for-each>
        
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>