<?php

/**
* @package Clientexec
*/
class TemplateLib
{
    var $templateName;

    function TemplateLib($templateName)
    {
        $this->templateName = $templateName;
    }

    function ShowBlock1Header($tString="",$div="",$display="",$righttext="", $print = true, $namedLink = false)
    {
        if ($namedLink) {
            $tString = "<a name=\"$namedLink\">$tString</a>";
        }
        $block1Header = <<<EOD
          <!-- Header -->
          <TABLE cellSpacing=0 cellPadding=0 width="100%" background=templates/{$this->templateName}/images/box_bgt.gif border=0>
            <TBODY>
            <TR>
              <TD width=18><IMG height=18 alt="" src="templates/{$this->templateName}/images/box_bgt.gif" width=18 border=0></TD>
              <TD  class=boxtitle align=left>$tString
              </TD>
              <td align=right class=boxtitle nowrap>{$righttext}&nbsp;&nbsp;</tD>
              <TD align=right width=22><IMG height=18 alt="" src="templates/{$this->templateName}/images/box_end.gif" width=22 border=0></TD>
            </TR>
            </TBODY>
          </TABLE>
          
          <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 align=center>
            <TBODY>
            <TR vAlign=top>
              <TD background=templates/{$this->templateName}/images/box_bgl.gif></TD>
              <TD  width="100%"><IMG height=6 alt="" src="templates/{$this->templateName}/images/px.gif" width=1 border=0>
              <!-- End Header -->
    <!--          <div id="$div" style="display: $display ">              -->
EOD;

        if ($print) {
            echo $block1Header;
        } else {
            return $block1Header;
        }
    }

    function ShowHeader($tString="",$width="100%",$rightcontent="", $return=false)
    {
          $html = <<<EOD
              <!-- Header -->
              <table width='$width' cellpadding=0 border=0 cellspacing=0>
              <tr><td class="snapshot-header-left">
              </td><td class="snapshot-header" nowrap>
              <font class=snapshot-header-text>
              $tString</font>
              <font class=snapshot-header-description></font></td>
              <td class="snapshot-header" align=right>$rightcontent</td>
              <td class="snapshot-header-right"></td>
              </tr></table>
EOD;
        if ($return) {
            return $html;
        } else {
            echo $html;
        }
    }

    function ShowBlock1Footer($print = true)
    {
        $block1Footer = <<<EOD
    <!--          </div> -->
              <!-- Footer -->
              </TD>
            </TR>
          </TBODY>
          </TABLE>
         <!-- End Footer -->
EOD;

        if ($print) {
            echo $block1Footer;
        } else {
            return $block1Footer;
        }
    }
}

?>
