#*
  The contents of this file are subject to the Mozilla Public License Version 1.1
  (the "License"); you may not use this file except in compliance with the License.
  You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
  
  Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
  WARRANTY OF ANY KIND, either express or implied. See the License for the specific
  language governing rights and limitations under the License.
  
  The Original Code is the Venice Web Communities System.
  
  The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
  for Silverwrist Design Studios.  Portions created by Eric J. Bowersox are
  Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios.  All Rights Reserved.
  
  Contributor(s): 
*#
#*
  Parameters:
    content                 = The framed page content
    pagetitle               = Title for the page within the frame
    qid                     = Page "quick ID"
    user                    = The current DynamoUser object
    unverified              = True if the current user has not had E-mail address verified
    location                = Current page location string
    display_login           = True if we should display the "Log In | Create Account" or "Log Out | Profile" links
    fixed_menu              = The "fixed" menu
    footer_text             = The text of the page footer
    sitetitle               = Site title (from global properties)
    siteurl                 = URL to the site
    logourl                 = URL to the site logo
    logourltype             = Linkage type for the site URL
    logowidth               = Width of the site logo in pixels
    logoheight              = Height of the site logo in pixels
    flogoscale              = Scaling to apply to footer logo, in percentage points
    pgicon_url              = URL to the Mozilla-type page icon
    pgicon_ltyp             = Linkage type for the Mozilla-type page icon
    pgicon_mime             = MIME type of the Mozilla-type page icon
    favicon_url             = URL to the MSIE-style FAVICON
    favicon_ltyp            = Linkage type of the MSIE-style FAVICON
    lbar_width              = Left bar width in pixels
    ms_copyright_violations = True to prevent adding anti-Microsoft Smart Tags META tag
    generator               = Page generator (Venice and Dynamo versions)
*#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>#encodeHTML( $pagetitle ) - #encodeHTML( $sitetitle )</title>
    <meta name="GENERATOR" content="$generator" />
    #if( $pgicon_url && $pgicon_ltyp && $pgicon_mime )
      <link rel="icon" href="#formatURL( $pgicon_ltyp $pgicon_url )" type="$pgicon_mime" />
    #end
    #if( $favicon_url && $favicon_ltyp )
      <link rel="SHORTCUT ICON" href="#formatURL( $favicon_ltyp $favicon_url )" />
    #end
    #if( !$ms_copyright_violations )
      <meta name="MSSmartTagsPreventParsing" content="TRUE" />
    #end
    <link rel="stylesheet" href="#formatURL( "SERVLET" "stylesheet-base.css" )" type="text/css" />
  </head>

  <body>
    #comment( "BEGIN PAGE HEADER" )
    <table class="frametop" border="0" width="100%" cellpadding="2" cellspacing="0">
      <tr valign="middle">
        <td align="left" width="20%" cellpadding="2" class="frametop">
          #comment( "Site logo" )
          <div class="frametopleft">
            <a href="$siteurl"><img src="#formatURL( $logourltype $logourl )" alt="$sitetitle"
               width="$logowidth" height="$logoheight" border="0" /></a>
          </div>
        </td>

        <td align="center" width="30%" cellpadding="2" class="frametop">
	  #comment( "Links to Front Page, Help, Find" )
          <p><b><a class="frametop" href="#formatURL( "SERVLET" "top.js.vs" )">Front Page</a></b></p>
          <p><b>
            <a class="frametop" href="TODO">Help</a> |
            <a class="frametop" href="#formatURL( "SERVLET" "find.js.vs" )">Find</a>
          </b></p>
        </td>

        <td align="right" width="50%" cellpadding="2" class="frametop">
          #comment( "Banner Ad" )
          <div class="frametopright">
            <img src="#formatURL( "IMAGE" "temp/banner-ad.jpg" )" alt="" width="468" height="60" border="0" />
          </div>
        </td>
      </tr>

      <tr valign="middle"><td align="center" colspan="3" class="frametop">
        #set( $lenc = "#encodeURL( $location )" )
	#if( $user.isAnonymous() )
          You are not logged in
          #if( $display_login )
            - <a class="frametop" href="#formatURL( "SERVLET" "login.js.vs?tgt=$lenc" )">Log In</a>
            | <a class="frametop"
                 href="#formatURL( "SERVLET" "new_account.js.vs?tgt=$lenc" )">Create Account</a>
          #end
        #else
          You are logged in as <b>$user.Name</b>
          #if( $display_login )
            - <a class="frametop" href="#formatURL( "SERVLET" "logout.js.vs?tgt=$lenc" )">Log Out</a>
            #if( $unverified )
              | <a class="frametop"
                   href="#formatURL( "SERVLET" "verify_email.js.vs?tgt=$lenc" )">Verify E-Mail</a>
            #end
            | <a class="frametop" href="#formatURL( "SERVLET" "profile.js.vs?tgt=$lenc" )">Profile</a>
          #end
	#end
      </td></tr>
    </table>
    #comment( "END PAGE HEADER" )

    <table border="0" width="100%" cellpadding="2" cellspacing="0">
      <tr valign="top">
        <td align="left" width="$lbar_width" rowspan="2" class="frameleft">
          #comment( "BEGIN LEFT SIDEBAR" )
          <div class="frameleft">
            Top/community menu thingee
          </div>
          <div>&nbsp;</div>
          <div class="frameleft">#render( $fixed_menu )</div>
          <img src="#formatURL( "IMAGE" "spacer.gif" )" width="$lbar_width" height="1" border="0" />
          #comment( "END LEFT SIDEBAR" )
        </td>

        <td align="left" width="100%" bgcolor="white" class="framecontent">
          #comment( "BEGIN PAGE CONTENT" )
          <div class="framecontent">#render( $content )</div>
          #comment( "END PAGE CONTENT" )
        </td>
      </tr>

      <tr valign="top">
        <td align="left" width="100%" bgcolor="white" class="framefooter">
          #comment( "PAGE FOOTER" )
          <hr width="80%">

          <table align="center" border="0" cellpadding="0" cellspacing="6">
            <tr valign="top">
              <td align="right" class="framefooter">$footer_text</td>
              <td rowspan="2" align="left" class="framefooter">
                #set( $width_logo = (129 * $flogoscale) / 100 )
                #set( $height_logo = (103 * $flogoscale) / 100 )
                <a href="http://venice.sourceforge.net/" target="_blank"><img
                   src="#formatURL ("IMAGE" "powered-by-venice.gif" )" alt="Powered By Venice"
                   width="$width_logo" height="$height_logo" border="0" /></a>
              </td>
            </tr>
            <tr valign="top"><td align="right" class="framefooter">
              #comment( "HITCOUNTER FOR QID: $qid" )
            </td></tr>
          </table>

	  #comment( "END PAGE FOOTER" )
        </td>
      </tr>

    </table>

  </body>
</html>
