var tableWidth = sectionCellWidth * sectionNames.length;
var halfSectionCellWidth = sectionCellWidth/2;
var halfTableWidth = tableWidth/2;

//This value sets the height of each menu row - This should not need to be changed unless changing font size
var sideMenuItemHeight = 13;

//Change this value if necessary to set the with of the Side Menu
var sideMenuWidth = subMenuWidth + 22;

if (document.images)
{
   imgEmailUs = new Image
   imgEmailUs2 = new Image
   imgViewGuestbook = new Image
   imgViewGuestbook2 = new Image
   imgAddComment = new Image
   imgAddComment2 = new Image
	 imgViewCalendar = new Image
   imgViewCalendar2 = new Image

   imgEmailUs.src = "Images/Home/EmailUs.gif"
   imgEmailUs2.src = "Images/Home/EmailUs2.gif"
   imgViewGuestbook.src = "Images/Home/Guestbook.gif"
   imgViewGuestbook2.src = "Images/Home/Guestbook2.gif"
   imgAddComment.src = "Images/Home/AddComment.gif"
   imgAddComment2.src = "Images/Home/AddComment2.gif"
	 imgViewCalendar.src = "Images/Home/Calendar.gif"
   imgViewCalendar2.src = "Images/Home/Calendar2.gif"
}
else
{
   imgEmailUs = ""
   imgEmailUs2 = ""
   imgViewGuestbook = ""
   imgViewGuestbook2 = ""
   imgAddComment = ""
   imgAddComment2 = ""
	 imgViewCalendar = ""
	 imgViewCalendar2 = ""
}

function highlightSideItem(itemID)
{
   if (navigator.appName == "Netscape")
   {
      eval("document." + itemID + ".src= img" + itemID + "2.src")
   }
   else
      eval(itemID + ".src = img" + itemID + "2.src");
}

function unHighlightSideItem(itemID)
{
   if (navigator.appName == "Netscape")
   {
      eval("document." + itemID + ".src= img" + itemID + ".src")
   }
   else
   {
      eval(itemID + ".src = img" + itemID + ".src");
   }
}


   //This is the table for the whole left column of the page
   document.write("<table height='100%' width='" + sideMenuWidth  + "' cellpadding='0' cellspacing='0' border='0'>");
   document.write("<tr height='12'><td class='tiny'>&nbsp;</td></tr>");
   document.write("<tr><td valign='top'>");


   //This is the menu position table
   document.write("   <table cellpadding='0' cellspacing='0' border='0' bgcolor='white'>");
   document.write("   <tr height='6'><td class='tiny'>&nbsp;</td></tr>");
   document.write("   <tr><td width='5' class='tiny'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
   document.write("      <td>");

   //This is the menu container table
   document.write("         <table cellpadding='0' cellspacing='0' border='0' width='" + sideMenuWidth + "'><tr>");
   document.write("            <td valign='top'>");

   //This is the menu table
   document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0'>");

   //This is an empty row at top of table used to construct the top of table image
   document.write("<tr><td colspan='2'><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>");
   document.write("   <td height='14' width='98' background='" + sideMenuImagePath + "TopLeft.jpg'>&nbsp;</td>");
   document.write("   <td height='14' background='" + sideMenuImagePath + "TopCenter.jpg'>&nbsp;</td>");
   document.write("   <td height='14' width='18' background='" + sideMenuImagePath + "TopRight.jpg'>&nbsp;</td>");
   document.write("</tr></table></td></tr>");

   document.write("<tr><td><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>");
   document.write("    <td bgcolor='#97adfc' background='" + sideMenuImagePath + "MiddleLeft.jpg' style='background-repeat: repeat-y'>");

   document.write("<table cellpadding='0' cellspacing='0' border='0' width='100%'>");
   document.write("<tr><td colspan='3' height='2' width='" + subMenuWidth + "'></td></tr>");

   document.write("<tr><td class='tiny'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
   document.write("   <td><table width='100%' cellpadding='0' cellspacing='0' border='0'>");
   document.write("      <tr onmouseover='highlightSideItem(\"EmailUs\")' onmouseout='unHighlightSideItem(\"EmailUs\")'>");
   document.write("         <td class='tiny'>&nbsp;&nbsp;&nbsp;</td>");
   document.write("         <td align='center'>");
   document.write("            <a href='EmailUs.php'><IMG border='0' Name='EmailUs' src='Images/Home/EmailUs.gif' alt='Email Us'></a>");
   document.write("         </td>");
   document.write("      </tr>");
   document.write("   </table></td>");
   document.write("<td class='tiny'>&nbsp;&nbsp;</td></tr>");
      


   document.write("<tr><td class='tiny'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
   document.write("   <td><table width='100%' cellpadding='0' cellspacing='0' border='0'>");
   document.write("      <tr onmouseover='highlightSideItem(\"ViewGuestbook\")' onmouseout='unHighlightSideItem(\"ViewGuestbook\")'>");
   document.write("         <td class='tiny'>&nbsp;&nbsp;&nbsp;</td>");
   document.write("         <td align='center'>");
   document.write("            <a href='Guestbook.php'><IMG border='0' Name='ViewGuestbook' src='Images/Home/Guestbook.gif' alt='View Guestbook'></a>");
   document.write("         </td>");
   document.write("      </tr>");
   document.write("   </table></td>");
   document.write("<td class='tiny'>&nbsp;&nbsp;</td></tr>"); 
     


   document.write("<tr><td class='tiny'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
   document.write("   <td><table width='100%' cellpadding='0' cellspacing='0' border='0'>");
   document.write("      <tr onmouseover='highlightSideItem(\"AddComment\")' onmouseout='unHighlightSideItem(\"AddComment\")'>");
   document.write("         <td class='tiny'>&nbsp;&nbsp;&nbsp;</td>");
   document.write("         <td align='center'>");
   document.write("            <a href='AddComment.htm'><IMG border='0' Name='AddComment' src='Images/Home/AddComment.gif' alt='Sign Guestbook'></a>");
   document.write("         </td>");
   document.write("      </tr>");
   document.write("   </table></td>");
   document.write("<td class='tiny'>&nbsp;&nbsp;</td></tr>");
	 


   document.write("<tr><td class='tiny'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
   document.write("   <td><table width='100%' cellpadding='0' cellspacing='0' border='0'>");
   document.write("      <tr onmouseover='highlightSideItem(\"ViewCalendar\")' onmouseout='unHighlightSideItem(\"ViewCalendar\")'>");
   document.write("         <td class='tiny'>&nbsp;&nbsp;&nbsp;</td>");
   document.write("         <td align='center'>");
   document.write("            <a href='' onclick='return loadNewWindow(\"Diary.php\")'><IMG border='0' Name='ViewCalendar' src='Images/Home/Calendar.gif' alt='View Calendar'></a>");
   document.write("         </td>");
   document.write("      </tr>");
   document.write("   </table></td>");
   document.write("<td class='tiny'>&nbsp;&nbsp;</td></tr>"); 

   document.write("<tr height='2'><td colspan='3' class='tiny'>&nbsp;</td></tr>");
   document.write("</table>");

   document.write("</td>");
   document.write("    <td width='10' background='" + sideMenuImagePath + "MiddleRight.jpg'>&nbsp;</td>");
   document.write("</tr></table></td></tr>");

   //This is an empty row at bottom of table used to construct the bottom of table image
   document.write("<tr><td colspan='2'><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>");
   document.write("   <td height='20' width='98' background='" + sideMenuImagePath + "BottomLeft.jpg'>&nbsp;</td>");
   document.write("   <td height='20' background='" + sideMenuImagePath + "BottomCenter.jpg'>&nbsp;</td>");
   document.write("   <td height='20' width='18' background='" + sideMenuImagePath + "BottomRight.jpg'>&nbsp;</td>");
   document.write("</tr></table></td></tr>");

   //document.write("<tr><td width='2' background='" + sideMenuImagePath + "LeftSpace.jpg'>&nbsp;&nbsp;</td><td colspan='3' height='20'></td></tr>");
   document.write("</table>");
   //End of menu table

   document.write("            </td>");
   document.write("         </tr></table>");
   //End of menu container table

   document.write("      </td>");
   document.write("      <td width='5' class='tiny'>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>");
   document.write("   <tr height='4'><td class='tiny'>&nbsp;</td></tr>");
   document.write("   </table>");
   //End of menu position table

   document.write("</td></tr>");
   document.write("</table>");
   //End of Left Column table