<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <!-- felles komponenter -->
  <xsl:import href="../../../felles/komponenter/fritekst/v002/fritekst.xsl" />
  <xsl:import href="../../../felles/komponenter/bilde/v002/bilde.xsl" />
  <xsl:import href="../../../felles/komponenter/overskrift/v002/overskrift.xsl" />
  <xsl:import href="../../../felles/komponenter/tabell/v001/tabell.xsl" />
  <!-- xsl:import href="../../../felles/komponenter/tid-og-sted/v001/tid-og-sted.xsl" / -->
  <!-- bruker property isteden -->

  <xsl:import href="../../../system/api-v001.xsl" />
  <xsl:include href="../../../felles/ressurser/output-method-html-v001.xsl" />
  <xsl:include href="../../../felles/ressurser/breadcrumb-v001.xsl" />
  <xsl:include href="../../../extensions/property-accessor-v001.xsl"/> 
  <xsl:include href="../../../felles/komponenter/weblenke/v001/weblenke.xsl" />

 <xsl:strip-space elements="*"/>

  <xsl:template match="/">
    <html>
      <head>
        <title><xsl:value-of select="ad-ons/tittel"/></title> 
        <style type="text/css">
          .breadcrumb-xsl {font-size:80%;}
          .boks1 {
	    width: 200px;
            background-color: #f5ece3;
            border: 1px solid #e1d4c0;
            padding: 8px;
          }
          .boks2 {
	    width: 200px;
            background-color: #eeeef2;
            border: 1px solid #cccccc;
            padding: 8px;
          }
          .boks3 {
	    width: 200px;
            background-color: #cccccc;
            border: 1px solid #e1d4c0;
            padding: 8px;
          }
          .tittel {
          font-size:120%;
          font-weight: bold;
          color: #666;
          }
          .tekst {
          font-size:90%;
          font-weight: normal;
          color: #000;
          }
          .lenke {
          font-size:80%;
          font-weight: normal;
          color: blue;
          }
          
        </style>
      </head>
      <body>
        <xsl:call-template name="prefixed-breadcrumb"/>
        <xsl:apply-templates />
      </body>
    </html>
  </xsl:template>


  <xsl:template match="tittel">
    <h1><xsl:value-of select="."/></h1>
  </xsl:template>
  
  <xsl:template match="boks">
    <xsl:choose> 
      <xsl:when test="@type='boks1'">
        <div class="boks1">
          <xsl:apply-templates select="tittel | fritekst | lenker"/>
        </div>
        <br />           
      </xsl:when>
      <xsl:when test="@type='boks2'">
        <div class="boks2">            
          <xsl:apply-templates select="tittel | fritekst | lenker" />
         </div>
         <br />           
     </xsl:when>
      <xsl:otherwise>
        <div class="boks3">
          <xsl:apply-templates select="tittel | fritekst | lenker" />
        </div>            
        <br />           
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
 <xsl:template match="boks/tittel">
    <xsl:if test="not(.='')">
      <div class="tittel"><xsl:value-of select="." /></div>
    </xsl:if>
  </xsl:template>

  <xsl:template match="fritekst">
    <xsl:if test="not(.='')">
      <div class="tekst"><xsl:value-of select="." /></div>
    </xsl:if>
  </xsl:template>

  <xsl:template match="lenker">
    <xsl:if test="not(.='')">
      <xsl:for-each select="weblenke">
        <xsl:if test="not(.='')">
          <div class="lenke"><xsl:apply-templates select="." /></div>
        </xsl:if>
      </xsl:for-each>
    </xsl:if>
  </xsl:template>


</xsl:stylesheet>
