<?php
  function SmallTitleTemplate($Caption=null,$Logo=null,$MenuFile=null,$Title=null,$Home=null,$Image=null,$Quote=null,$ImageCap=null,$TitleSize=null,$Link=null)
  { include_once  "Site.inc";
    global  $NoLogin;
    global  $PrevSection;
    global  $Prev;
    global  $NextSection;
    global  $Next;
    echo "<!--Begin Strip-->\r\n";
    global  $DisclaimerLink;

    echo "<table style=\"width: 100%; text-align: left;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n";
    echo "  <tbody>\r\n";
    echo "    <tr>\r\n";
    echo "      <td colspan=\"2\" rowspan=\"1\" style=\"width: 15%; vertical-align: top;\">\r\n";
    if (isset($Home))
      echo "        <a href=\"",SiteFileName($Home),"\">\r\n";
    if (isset($Logo))
    { echo "          <img title=\"Click on the ",$Caption," Logo to take you to the website's home page\"\r\n";
      echo "             src=\"",SiteFileName($Logo),"\" alt=\"Logo\" style=\"border: 0px solid ; width: 118px; height: 56px;\">\r\n";
    }
    else if (isset($Caption))
      echo "        ",$Caption,"\r\n";
    if (isset($Home))
      echo "        </a>\r\n";
    echo "      </td>\r\n";
    echo "      <td style=\"vertical-align: bottom; text-align: center;\">\r\n";
    echo "        <table style=\"height: 100%; margin-left: auto; margin-right: auto; width: 100%; text-align: left;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n";
    echo "          <tbody>\r\n";
    echo "            <tr>\r\n";
    echo "              <td style=\"text-align: center; vertical-align: bottom; color: rgb(128, 128, 255); \">\r\n";
    if (!isset($_SESSION['site_control'][SiteUserNameInTitle]))
      echo "<br>\r\n";
    else
    { if (isset($_SESSION['member']))
        echo "Member\r\n";
      else if (isset($_SESSION['guest']))
        echo "Guest\r\n";
      else
        echo "<br>\r\n";
    }
    echo "              </td>\r\n";
    echo "              <td style=\"text-align: center; vertical-align: top;\">\r\n";
    if (isset($Image))
    { echo "                <img alt=\"\"";
      if (isset($ImageCap))
        echo "title=\"",$ImageCap,"\"";
      echo " src=\"",SiteFileName($Image),"\" style=\"width: 109px; height: 30px;\">\r\n";
    }
    else
      echo "              <br>\r\n";
    echo "              </td>\r\n";
    echo "              <td style=\"vertical-align: top;\"><br>\r\n";
    echo "              </td>\r\n";
    echo "            </tr>\r\n";
    echo "            <tr>\r\n";
    echo "              <td style=\"width: 15%; text-align: center; vertical-align: top; color: rgb(128, 128, 255);\">\r\n";
    if (!isset($_SESSION['site_control'][SiteUserNameInTitle]))
      echo "<br>\r\n";
    else
    { if (isset($_SESSION['member']))
        echo "<b>",GetItem("MemberTable","MemberUserName","MemberID",$_SESSION['member']),"</b>\r\n";
      else if (isset($_SESSION['guest']))
        echo "<b>",GetItem("MemberTable","MemberUserName","MemberID",$_SESSION['guest']),"<b>\r\n";
      else
        echo "<br>\r\n";
    }
    echo "              </td>\r\n";
    echo "              <td title=\"The Company Name\" style=\"vertical-align: bottom; text-align: center;\">\r\n";
    echo "                <font style=\"color: rgb(128, 128, 255); font-weight: bold;\" size=\"+2\">\r\n";
    if (isset($Caption))
      echo "                  ",$Caption,"\r\n";
    else
      echo "              <br>\r\n";
    echo "                </font>\r\n";
    echo "              </td>\r\n";
    echo "              <td style=\"width: 15%; vertical-align: bottom;\"><br>\r\n";
    echo "              </td>\r\n";
    echo "            </tr>\r\n";
    echo "          </tbody>\r\n";
    echo "        </table>\r\n";
    echo "      </td>\r\n";
    echo  "     <td colspan=\"2\" rowspan=\"1\" style=\"width: 15%; text-align: center; vertical-align: top;\">\r\n";
    if (!isset($NoLogin))
    { if (isset($_SESSION['member']) || isset($_SESSION['guest']))
        echo  "       <a title=\"Log out when finished\" href=\"Host/Logout.php\"><font style=\"color: rgb(128, 128, 255);\" size=\"-1\">Logout</font></a><br>\r\n";
      else
        echo  "       <a title=\"Log in to the site\" href=\"Host/Login.php\"><font style=\"color: rgb(128, 128, 255);\" size=\"-1\">Login</font></a><br>\r\n";
    }
    if (isset($_SESSION['session_type']) && ($_SESSION['session_type'] >= 5))
    { echo "        <a title=\"A Link to the Administrator Control Panel (ACP)\" href=\"Host/Admin/Admin.php\"><font style=\"color: rgb(128, 128, 255);\" size=\"-1\">ACP</font></a><br>\r\n";
    }
    if (!isset($NoLogin) || (isset($_SESSION['session_type']) && ($_SESSION['session_type'] >= 3)))
      echo "        <br>\r\n";
    echo "      </td>\r\n";
    echo "    </tr>\r\n";
    if (isset($MenuFile))
    { echo "    <tr>\r\n";
      echo "      <td colspan=\"5\" rowspan=\"1\" style=\"background-color: rgb(232, 232, 232); color:black; vertical-align: top;\">\r\n";
      include_once    $MenuFile;
      echo "        </td>\r\n";
      echo "      </tr>\r\n";
    }
    else if (!isset($Quote))
    { echo "      <tr>\r\n";
      echo "        <td colspan=\"5\" rowspan=\"1\" style=\"background-color: rgb(232, 232, 232); color:black; vertical-align: top;\">\r\n";
      echo "          <br>\r\n";
      echo "        </td>\r\n";
      echo "      </tr>\r\n";
    }
    if (isset($Prev) || isset($PrevSection) || isset($Title) || isset($Next) || isset($NextSection)  || isset($Disclaimer))
    { echo "      <tr>\r\n";
      echo "        <td style=\"width: 150px; vertical-align: middle;\">\r\n";
      if (isset($Prev))
      { echo  "<a title=\"The webpages on this website can be accessed sequentially. Click on this link to go to the previous sequential webpage.\" href=";
        echo    $Prev;
        echo  "><font size=\"-1\">Prev</font></a>&nbsp;&nbsp;\r\n";
      }
      if (isset($PrevSection))
      { echo "<a title=\"The webpages on this website can be accessed sequentially by section. Click on this link to go to the previous sequential section webpage.\" href=";
        echo $PrevSection,  "\r\n";
        echo "><font size=\"-1\">Prev Sect</font></a>\r\n";
      }
      echo "        </td>\r\n";
      echo "        <td style=\"width: 50px; vertical-align: middle;\">\r\n";
      echo "        </td>\r\n";
      echo "        <td title=\"The page title.\" style=\"vertical-align: top; text-align: center;\">\r\n";
      if (!isset($TitleSize)) $TitleSize  = "x-large";
      echo "<font style=\"color: rgb(128, 128, 255); font-style: italic; font-weight: bold; font-size:\",$TitleSize,\">\r\n";
      if (isset($Title))
      { if (isset($Link))
        { if (strpos($Link,"http://") === FALSE)
          { echo "<a title=\"Click on the page Title for more information.\" href=";
            echo  $Link;
            echo ">\r\n";
            echo "$Title\r\n";
            echo "</a>\r\n";
          }
          else
          { OffSite($Link,$Title);
          }
        }
        else
          echo "$Title\r\n";
      }
      else
        echo "              <br>\r\n";
      echo "        </font>\r\n";
      echo "      </td>\r\n";
      if (isset($_SESSION['site_control'][SiteDisclaimer]))
      { if (!isset($DisclaimerLink)) $DisclaimerLink = "";
        echo "      <td style=\"width: 50px; text-align: right; vertical-align: middle;\">\r\n";
        echo "        <a href=\"\",$DisclaimerLink,\"\"><font size=\"-1\"><b>($Disclaimer)</b></font></a>\r\n";
      }
      else
      { echo  "     <td style=\"width: 50px; text-align: right; vertical-align: middle;\">\r\n";
        echo  "       <br>\r\n";
      }
      echo "      </td>\r\n";
      echo "      <td style=\"width: 150px; text-align: right; vertical-align: middle;\">\r\n";
      if (isset($NextSection))
      { echo "<a title=\"The webpages on this website can be accessed by section sequentially. Click on this link to go to the previous sequential section's first webpage.\" href=";
        echo $NextSection;
        echo "><font size=\"-1\">Next Sect</font></a>&nbsp;&nbsp;\r\n";
      }
      if (isset($Next))
      { echo "<a title=\"The webpages on this website can be accessed sequentially. Click on this link to go to the next sequential webpage.\" href=";
        echo $Next;
        echo "><font size=\"-1\">Next</font></a>\r\n";
      }
    }
    if (isset($Quote))
    { echo "          <tr>\r\n";
      echo "            <td colspan=\"5\" rowspan=\"1\" style=\"vertical-align: top; \">\r\n";
      echo "              <hr>\r\n";
      echo "            </td>\r\n";
      echo "          </tr>\r\n";
      echo "          <tr>\r\n";
      echo "            <td colspan=\"5\" rowspan=\"1\" style=\"vertical-align: top; background-color: rgb(240, 240, 240);\">\r\n";
      echo "              <font size=\"-1\">\r\n";
      echo "  						  <div style=\"text-align: center; \">\r\n";
      echo "                  ", $Quote, "\r\n";
      echo "  							</div>\r\n";
      echo "              </font>\r\n";
      echo "            </td>\r\n";
      echo "          </tr>\r\n";
    }
    echo "  </tbody>\r\n";
    echo "</table>\r\n";
    echo "<!--End Strip-->\r\n";
  }
?>
