//----------------------------------------------------------------------------------------
// POTMFormatPage.js
//   Format the Plant of the Month pages
//   Copyright 2009 Gabi and Cliff McLean
//----------------------------------------------------------------------------------------
var HomePage = "../index.html"; 
var TitleBarImage1 = "San_Gabriel_Mtns_0517w.jpg";
var TitleBarImage2 = "Dragonfly_4634w.jpg";
var GalleryPrev, GalleryNext;
var NextPOTM = "";
var PrevPOTM = "";



// Format the TitleBar at the top of the screen for Plant of the Month pages.
// 1st parm is larger text for the title.
// 2nd parm is smaller text.
// 3rd and 4th parms are optional photos.
function POTMTitleBar(TitleBarText1,TitleBarText2,Image1,Image2)
 {         
  if (Image1) TitleBarImage1 = Image1;
  if (Image2) TitleBarImage2 = Image2;        
  document.write(
       '<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" frame="void">'
     +   '<tr valign="middle" align="center">'
     +     '<td height="100" width="110" bgcolor="#41554B">'
     +       '<a href="' + HomePage + '">'  
     +         '<img src="../Main/Images/NAHLogo.gif" width="88px" height="79px"  border=0></td>'
     +       '</a>'
     +     '<td width="20" bgcolor="#41554B"><img src="../Main/Images/Spacer.gif" width="20px" height="1px"></td>'
  );  
  document.write(
           '<td height="100" width="100%">'
     +       '<table width="100%" border="0" cellspacing="0" cellpadding="0" frame="void">'
     +         '<tr valign="middle" align="center">'
     +           '<td height="100" bgcolor="#41554B" width="600px">'
     +             '<span style="font-family: Impact, sans-serif;font-size: 32px;color:#fffbcc;" >'
     +               TitleBarText1
     +             '</span><br />'
     +             '<span style="font-family: Impact, sans-serif;font-size: 24px;color:#fffbcc;" >'
     +               TitleBarText2
     +             '</span>'
     +           '</td>'
     +           '<td bgcolor="#41554B" width="10px"></td>'
     +           '<td bgcolor="#41554B">'
     +             '<img src="../Main/Photos/' + TitleBarImage1 + '" height="90px" align="left" class="TitleBarPhoto" /></td>'
     +           '<td bgcolor="#41554B">'
     +             '<img src="../Main/Photos/' + TitleBarImage2 + '" height="90px"  align="left" class="TitleBarPhoto" /></td>'
     +         '</tr>'
     +       '</table>'
     +   '</tr>'
  );     
  document.write(
         '<tr valign="center">'
     +     '<td height="20" bgcolor="#6a0d24"><center><a class="NavBarLink" id="Home"    href="' + HomePage +'" '
     +       'title="Go to the Nature at Hand home page"><b>HOME</b></a></center></td>'
     +     '<td bgcolor="#6a0d24"></td>'
     +     '<td bgcolor="#6a0d24" style="color:#fffbcc;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="NavBarLink" id="WhoWeAre" href="../Main/NAHWhoWeAre.htm" '
     +       'title="Who is Nature at Hand">Who We Are</a>  '
     +       '&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a class="NavBarLink" id="ContactUs"      href="../Main/NAHContactUs.htm" '
     +       'title="See how to contact Gabi and Cliff">Contact Us</a>'
     +       '&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a class="NavBarLink" id="Privacy"        href="../Main/NAHPrivacy.htm" '
     +       'title="Our privacy policy">Privacy Policy</a>'
     +       '&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a class="NavBarLink" id="Support"        href="../Main/NAHSupport.htm" '
     +       'title="Get support">Get Support</a>'
     +       '&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a class="NavBarLink" id="SiteMap"        href="../Main/NAHSiteMap.htm" '
     +       'title="See contents of the entire website">Site Map</a>  </td>'
     +   '</tr>'
     +   '<tr valign="top">'
     +     '<td height="10" colspan="5"></td>'
     +   '</tr>'
     +   '<tr>'
     +     '<td bgcolor="#41554B" height="6000"><img src="Buttons/Spacer.gif" width="110px" height="1px"></td>'
     +     '<td bgcolor="#6a0d24"></td>'
     +     '<td valign="top">'
     +       '<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" >'
     +         '<tr valign="top">'
     +           '<td width="100%" height="100%" valign="top"><img src="Buttons/Spacer.gif" width="600px" height="800px"></td>'
     +         '</tr>'
     +       '</table>'
     +     '<td>'
     +   '</tr>'
     + '</table>'
  ); 
 } // end POTMTitleBar

function POTMInfoBarPlant()
 {
  document.write('<div class="InfoBarDiv">');

  if (PrevPOTM != "")
    {
     document.write('<div Class="PrevPOTMDiv"><span class="HalfHigh"><br /></span>'
                 + '<a href="' + PrevPOTM + '.htm" class="ButtonLink">'
                 + 'Prev Plant'
                 + '</a></div><br />');
    } 
  if (NextPOTM != "")
    {
     document.write('<div Class="NextPOTMDiv"><span class="HalfHigh"><br /></span>'
                  + '<a href="' + NextPOTM + '.htm" class="ButtonLink">'
                  + 'Next Plant'
                  + '</a></div>');
    } 

document.write('<br clear="all"><br /><br />');
document.write('<a href="POTMArchive.htm" class="h2">Plant of the Month Archive</a>'
               + '<br /><hr color="#41554B">');
//document.write('<h1>Plant of the Month<br />' + POTMMonth + '</h1>');
document.write('<h1>Plant of the Month</h1>');
document.write('<p>Click on a photo for a larger image, or click on one of the icons for detailed plant information.  Click on the speaker icon to hear the botanical name pronounced. (The first time may take a few seconds.)</p>');
document.write('<p>The plant page, shown here, is one of 258 featured in the interactive CD-ROM, <a href="../SGF_Plants/SGFIntro.htm" class="h2" >'
               + 'Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD'
               + '</a></p>');
document.write('<br /><a href="../SGF_Plants/SGFIntro.htm" >'
               + '<img src="../SGF_Plants/Images/SGFCover.jpg" width="220" height="220" align="left" alt="Cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="0">'
               + '</a>'
               + '<br clear="all" /><br />'
               + '<script lanquage="javascript">POTMHowToBuyButton();</script><br />'
                );
//document.write('<br /><a href="SGFIntro.htm" >'
//               + '<img src="../SGF_Plants/Images/SGFCover.jpg" width="220" height="220" align="left" alt="Cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="0">'
//               + '</a>'
//               + '<br clear="all" /><br />'
//               + '<a href="SGFIntro.htm" >'
//               + '<img src="../SGF_Plants/Images/SGFBackCover.jpg" width="220" height="194" align="left" alt="Back cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="1">'
//               + '</a>'
//               + '<br clear="all" /><br />'
//               + '<script lanquage="javascript">SGFHowToBuyButton();</script><br />'
//                );
  document.write('</div>');
 }

function POTMInfoBarPhoto()
 {
  document.write('<div class="InfoBarDiv">');
document.write('<br /><br />');
document.write('<a href="POTMArchive.htm" class="h2" >'
               + 'Plant of the Month Archive'
               + '</a>'
               + '<br /><hr color="#41554B">');
document.write('<h1>Plant of the Month<br />' + POTMMonth + '</h1>');
document.write('<p>Click on the photo to see more images of the same plant, or click on one of the icons for detailed plant information.  Click on the speaker icon to hear the botanical name pronounced. (The first time may take a few seconds.)</p>');
document.write('<p>The plant, shown here, is one of 258 featured in the interactive CD-ROM, <a href="../SGF_Plants/SGFIntro.htm" class="h2" >'
               + 'Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD'
               + '</a></p>');
document.write('<br /><a href="../SGF_Plants/SGFIntro.htm" >'
               + '<img src="../SGF_Plants/Images/SGFCover.jpg" width="220" height="220" align="left" alt="Cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="0">'
               + '</a>'
               + '<br clear="all" /><br />'
               + '<script lanquage="javascript">POTMHowToBuyButton();</script><br />'
                );
//document.write('<br /><a href="SGFIntro.htm" >'
//               + '<img src="../SGF_Plants/Images/SGFCover.jpg" width="220" height="220" align="left" alt="Cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="0">'
//               + '</a>'
//               + '<br clear="all" /><br />'
//               + '<a href="SGFIntro.htm" >'
//               + '<img src="../SGF_Plants/Images/SGFBackCover.jpg" width="220" height="194" align="left" alt="Back cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="1">'
//               + '</a>'
//               + '<br clear="all" /><br />'
//               + '<script lanquage="javascript">SGFHowToBuyButton();</script><br />'
//                );
  document.write('</div>');
 }


function SGFInfoBar()
 {
  document.write('<div class="InfoBarDiv">');
  document.write('<br /><br />');
  document.write(
                 '<a href="SGFFeatures.htm" class="h2" >'
               + 'Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD'
               + '</a><br /><br />'
               + '<a href="SGFFeatures.htm" >'
               + '<img src="Images/SGFCover.jpg" width="220" height="220" align="left" alt="Cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="0">'
               + '</a>'
               + '<br clear="all" /><br />'
               + '<a href="SGFFeatures.htm" >'
               + '<img src="Images/SGFBackCover.jpg" width="220" height="194" align="left" alt="Back cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="1">'
               + '</a>'
               + '<br clear="all" /><br />'
               + '<script lanquage="javascript">SGFHowToBuyButton();</script><br />'
                );
  document.write('</div>');
 }

function GalleryInfoBar(FolderPrefix)
 {
  if (!FolderPrefix) var FolderPrefix = "../";
  document.write('<div class="InfoBarDiv">');
  document.write('<br /><h1>NEW!</h1><br />');
  document.write(
                 '<a href="' +FolderPrefix +'SGF_Plants/SGFFeatures.htm" class="h2" >'
               + 'Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD'
               + '</a><br /><br />'
               + '<a href="' +FolderPrefix +'SGF_Plants/SGFFeatures.htm" >'
               + '<img src="' +FolderPrefix +'SGF_Plants/Images/SGFCover.jpg" width="220" height="220" align="left" '
               + 'alt="Cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="0">'
               + '</a>'
               + '<br clear="all" /><br />'
               + '<a href="' +FolderPrefix +'SGF_Plants/SGFFeatures.htm" >'
               + '<img src="' +FolderPrefix +'SGF_Plants/Images/SGFBackCover.jpg" width="220" height="194" align="left" alt="Back cover of Plants of the San Gabriel Mountains: Foothills and Canyons - Interpretive Guide on CD" border="1">'
               + '</a>'
               + '<br clear="all" /><br />'
                );
  document.write('<a class="ButtonLink" href="' +FolderPrefix +'SGF_Plants/SGFFeatures.htm">Find out more about it</a>');
  document.write('</div>');
 }

////
function SGFHowToBuyButton()
  {
   document.write('<a class="ButtonLink" href="SGFHowToBuy.htm">How to Buy the CD</a>');
  }

////
function SGFPlantsRef()
 {
  document.write('<br /><br />');
  document.write('<a class="ECPlantsLink" href="../../SGF_Plants/SGFFeatures.htm">')
  document.write('This plant is featured in <b>"Plants of the San Gabriel Mountains: Foothills and Canyons</b>,<br />an interpretive guide on CD".')
  document.write('<br />Click here for more information.</a>');
 }

function FinishDisplay()
 {         
  document.write('<br clear="all"/><br /><center>'
  + '<a class="BottomLink" href="../index.html">Home</a> &bull; '
  + '<a class="BottomLink" href="../Main/NAHWhoWeAre.htm">Who We Are</a> &bull; '
  + '<a class="BottomLink" href="../SGF_Plants/SGFFeatures.htm">Plants of the San Gabriel Mountains</a> &bull; '
  + '<a class="BottomLink" href="../Main/NAHPhotoGalleryHome.htm">Photo Gallery</a> &bull; '
  + '<a class="BottomLink" href="../Main/NAHGardenGallery.htm">Our Native Garden</a> &bull; '
  + '<a class="BottomLink" href="../Main/NAHEssays.htm">Essays</a> &bull; '
  + '<a class="BottomLink" href="../Main/NAHContactUs.htm">Contact Us</a> &bull; '
  + '<a class="BottomLink" href="../Main/NAHSupport.htm">Support</a>'
  + '<br /><a class="BottomLink">&copy; 2003-2008, Gabi and Cliff McLean</a>'
  + '</center>'); 
 }

//// Function to place Prev/Next buttons on photo pages
function GalleryPrevNext()
  {
   if ((GalleryPrev != null) && (GalleryNext != null))
     {
      document.write('<div class="GalleryPrevNextDiv"> '
      +  '<br /> '
      +  '<a href="' + GalleryPrev + '" class="NextLink">'
      +    '<img src="arrowlbksm.gif" border="0">'
      +    '&nbsp;Prev'
      +  '</a>'
      +  '&nbsp;'
      +  '<a href="' + GalleryNext + '" class="NextLink">'
      +    'Next&nbsp;'
      +    '<img src="arrowrbksm.gif" border="0">'
      +  '</a>'
      + '</div>');
     }
  }

