//Adjust Menu tab height through: padding-top & padding-bottom in #MenuItem
//Changing the margin to padding sends the left border flush left
//Changing the padding to margin indents the left border

var MenuWidth = 166;
var MenuChildWidth = "margin-left:16px";
var MenuItemBgColor = "white";
var MenuItemForeColor = "#999999";
var MenuItemBgColorSel = "#909090";
var MenuItemForeColorSel = "white";
var MenuItemBold = false;

var RedirectIndexPage = ""; // i.e.: about.htm; Leave blank ("") if index.htm is default
var DefaultRedirectErrPage = "index.html"; // i.e.: index.html;
var CookieExpiryDate = "Monday, 04-Apr-2010 05:00:00 GMT";

/*********************************************************/
// CLIENT DATA

var LocalDir = "trabuegentry.com/\Versions/\Current";
var BookmarkURL = "http://www.trabuegentry.com/index.htm";
var BookmarkTitle = "Trabue Gentry";
var SiteName = "Trabue Gentry";
var TitleBarMain = "Trabue Gentry";
var LogoAlt = "Trabue Gentry";
var CopyrightHolder = "Trabue Gentry";
var EntityName = "Trabue Gentry";
var EntityNameShort = "Trabue";
var WebSiteDesigner = "Trabue Gentry";

var WebMailFromDisplayName = "Trabue Gentry eMail Processing Center";
var WebMailSource = "trabuegentry.com Web Mail";
var WebMailFromPrefix = "sitewebmail";
var WebMailFromDomain = "trabuegentry";
var WebMailFromExt = "com";
var WebMailFromOrganization = "Trabue Gentry";
var WebMailBoundryName = "TrabueGentry";
var WebMailCodeAuthor = "Trabue Gentry";
var WebMailCodeAuthorPrefix = "codeauthor";
var WebMailCodeAuthorDomain = "trabuegentry";
var WebMailCodeAuthorExt = "com";

var DomainName = "trabuegentry.com";
var MsgPageURL = "http://www.trabuegentry.com/msg.htm";
var SiteURL = "http://www.trabuegentry.com";
var RemoteScriptURL = "http://www.trabuegentry.com/walko";
var eMailPrefix = "admin";
var eMailDomain = "trabuegentry";
var eMailExt = "com";
var eMailLink = "Address";
var eMailSubject = "Inquiry";
var Phone = new Array();
    Phone[0] = "1-217-670-1733|";

if (hRefProtocol == "file")  {
   SiteURL = getHost(self.location.href) + LocalDir + "/"; }

/*********************************************************/

// Gets path after domain name, i.e.: HTTP://DOMAINNAME/]ggp/index.html?1

if (hRefProtocol == "file") {
   var hRefPage = document.location.href.split(LocalDir + "/"); } else {
   var hRefPage = document.location.href.split(DomainName + "/"); }

hRefPage = hRefPage[1];

/*********************************************************/
// REDIRECT PAGES

if (hRefPage == "") { hRefPage = "index.html"; }

/*********************************************************/
// PAGE ELEMENTS

   // Get page caption
for(i = 0; i < aMenuItems.length; i++) {
   var Val = aMenuItems[i].split("|");
   var PageTitle = Val[3];
   var Link = Val[5];
   if (hRefPage == Link || hRefPage == Link + "?") {
      var PageTitle = PageTitle; break; } }

   // Get TitleBar caption
if (isNull(hRefPage) == true) { PageTitle = "Home"; }
document.title = TitleBarMain + ": " + PageTitle;

function GetTitle() {
   return  "<div id='PageTitle'>" + PageTitle + "</div>"; }

function GetMenu() {

   var Contents = "";

      // Determine if is child
   for(i = 1; i < aMenuItems.length; i++) {
      var Val = aMenuItems[i].split("|");
      if (hRefPage == Val[5]) {
         var SelNodeID = Val[1]; } }

   for(i = 0; i < aMenuItems.length; i++) {

      var ForeColor = MenuItemForeColor;
      var BgColor = MenuItemBgColor;
      var MenuItemBgColor = "";
      var Display = "";
      var MenuItemBoldTagPre = "";
      var MenuItemBoldTagPost = "";

      var Val = aMenuItems[i].split("|");
      var Node = Val[0];
      var NodeID = Val[1];
      var MenuCaption = Val[2];
      var IsSubDir = Val[4];
      var Link = Val[5];

         // Hide all child menu items
      if (Node == "Child") { Display = " display:none;"; }

         // Set all bullets to default
      if (Node == "Parent") {
         Bullet = SiteURL + "/images/bullet-menu-drop.gif"; } else {
         Bullet = SiteURL + "/images/bullet-menu.gif"; }

         // Set full path
      if (hRefProtocol == "http") {
         FullLink = SiteURL + "/" + Link;
      } else if (hRefProtocol == "file")  {
         FullLink = getHost(self.location.href) + LocalDir + "/"+ Link;
         FullLink = ReplaceStr(FullLink,'/','\\');
      }

         // Set atrributes of selected menu item
      if (hRefPage == Link || hRefPage == Link + "?") {

      	//if (IsInstr(Link,"/")) { var IsSubDir = true; }

         BgColor = MenuItemBgColorSel;
         ForeColor = MenuItemForeColorSel;

         if (MenuItemBold) { MenuItemBoldTagPre = "<b>"; MenuItemBoldTagPost = "</b>"; }
         MenuCaption = MenuItemBoldTagPre + MenuCaption + MenuItemBoldTagPost;

         if (Node == "Parent") {
            Bullet = SiteURL + "/images/bullet-menu-drop-sel.gif"; } else {
            Bullet = SiteURL + "/images/bullet-menu-sel.gif"; }

      }

         // Display and indent child menu items
      if (Node == "Child" && NodeID == SelNodeID) {
         Display = "display:block;" + MenuChildWidth; }

         // Toggle collapse/expand chidren of on selecting parent
         /*********************************************************/
         // COLLAPSE CHILDREN ON SELECTING PARENT AFTER SELECTING CHILD:
         //    (Node == "Parent" && NodeID == SelNodeID)
         // DO NOT COLLAPSE CHILDREN ON SELECTING PARENT AFTER SELECTING CHILD:
         //    (Node == "Parent" && NodeID == SelNodeID && hRefQueryStr == "")
         /*********************************************************/
      if (Node == "Parent" && NodeID == SelNodeID) {
         FullLink = FullLink + "?" }

      if (Link != "msg.htm") {
         Contents = Contents +
         "<div style='background-color:" + BgColor + ";" + Display + "'>" +
            "<a id='MenuItem' style='color:" + ForeColor + "'; href=" + FullLink + ">" +
            "<img id='MenuBullet' src='" + Bullet + "' align='absmiddle' border='0'>" + MenuCaption + "</a></div>"; }

   }

	if (IsSubDir == 1) {

	   return "" +
	      "<div id='MenuNavHdr' style='display:block;'>" +
	      "<div><a style='color:white'; href='" + SiteURL + "/index.html' target='_self'><img src='" + SiteURL + "/images/home.gif' alt='Return To Main Menu' border='0'>&nbsp;&nbsp;Return To Main Menu</a></div>" +
	      "</div>" +
	      "<div id='Spacer' style='margin-top:5px;margin-bottom:0px;'></div>" +
	      "<div id='MenuHdr'>" + SectionTitle + "</div>" +
	      "<div id='Spacer' style='margin-top:5px;margin-bottom:0px;'></div>" +
	      "<div style='width:" + MenuWidth + "px;'>" + Contents + "</div>";
      
	} else {

	   return "" +
	      "<div id='MenuHdr'>Main Menu</div>" +
	      "<div style='width:" + MenuWidth + "px;'>" + Contents + "</div>";
      
	}

}

   // Get TitleBar caption
if (isNull(hRefPage) == true) { PageTitle = "Home"; }
document.title = TitleBarMain + ": " + PageTitle;

function GetTitle() { return  "<div id='PageTitle'>" + PageTitle + "</div>"; }

function GetHeader() { 

   return "" +
   "<table border='0' cellpadding='0' cellspacing=0 width='1'>" +
      "<td>" +
         "<img src=" + SiteURL + "/images/logo-hdr.gif alt='" + LogoAlt + "' border='0'></td>" +
   "</table>";

}

function GetFooter() {

   var EmailLink = GetEmailLink('admin','trabuegentry','com',WebSiteDesigner,'Inquiry')

   return "All content of this web site Copyright&copy; 2005-" + GetDateFormats(21) + " " + CopyrightHolder + ". All rights reserved." +
  	"No part of this page may be reproduced, stored in a retrieval system, or transmitted in any form or by any means - electronic, mechanical, photocopying, recording, or otherwise - without written permission of the copyright owner. All content is copyrighted and may never be considered to be in the public domain. Such content cannot be used for any commercial use whatsoever without the written permission of the copyright holder. Such content may not be posted on any websites, newsgroups, or bulletin boards, electronic or otherwise. Such content may not be resold or given to another person; is for personal use only and may not be used as an inducement for any commercial venture. All coding for and design of this web site by " + EmailLink + " &copy; 1992-" + GetDateFormats(21) + ". All rights reserved.</td>";

}

/*********************************************************/

function GetCopyrightHolder() {
   return "<nobr>" + CopyrightHolder + "</nobr>";  }

function GetEmailLink(Prefix,Domain,Ext,Link,Subject) {

   if (Link == "Address") { Link = Prefix + "@" + Domain + "." + Ext; }

   return "<a href=mailto:" + Prefix + "@" + Domain + "." + Ext + "?subject=" + Subject + ">" + Link + "</a>";

   // SAMPLE CALLS:
   // GetEmailLink('admin','trabuegentry','com','Picture Glide','Inquiry')
   // <Script Language='JavaScript'>document.write(GetEmailLink('Prefix','Domain','DomainExtension','Link('Name or "Address"','Subject'))</Script>

}

function GetInquiryEmailLink() {

   if (eMailLink == "Address") { eMailLink = eMailPrefix + "@" + eMailDomain + "." + eMailExt; }

   return "<a href=mailto:" + eMailPrefix + "@" + eMailDomain + "." + eMailExt + "?subject=" + eMailSubject + ">" + eMailLink + "</a>";

}

function GetPhoneNumbers() {

   var Phones = "";


   for (i = 0; i < Phone.length; i++){

      var Val = Phone[i].split("|");
      var PhoneNum = "";
      var PhoneType = "";
      PhoneNum = Val[0];
      PhoneType = Val[1];

      if (PhoneType != "") { PhoneType = "(" + Val[1] + ")"; }

      Phones = Phones + "<tr><td class='BasicText' nobr>" + PhoneNum + "</td><td>&nbsp;</td><td class='BasicText' nobr>" + PhoneType + "</td></tr>"; }

   return Phones;

}

function GetPageWidth() {

   if (screen.width > 1024)
      return "<div style='width:974px;'>";
   else if ((screen.width == 800) || (screen.width == 1024))
      return "<div style='width:100%;'>";

}


/********************************************************
/* Zoom Viewer */

function GetZoomHeader() {
   return "<img src=images/logo-hdr-zoom.gif alt='" + LogoAlt + "' border='0'>"; }

function ZoomGetHeaderUp1() {
   return "<img src=../images/logo-hdr-zoom.gif alt='" + LogoAlt + "' border='0'>"; }

function ZoomGetImage() {
   return "<img id='ZoomImage' name='FullSize' src='" + hRefQueryStr + "' border='0'>"; }

function OnQueryErr() {

   if (isNull(hRefQueryStr) == true ) {
      document.location="index.html"; }

}

/*********************************************************/
// BASIC FUNCTIONS

function AddToFavorites() {

   if ((navigator.platform!="MacPPC") && (navigator.appName=="Microsoft Internet Explorer") && (navigator.appVersion>="4") && (document.all)) {
      window.external.AddFavorite(BookmarkURL,BookmarkTitle)
   } else {
      alert("Sorry. This option is only available for Microsoft Internet Explorer.\n\n" +
      "If you are using Netscape Navigator, click the \'Bookmarks\' menu,\n" +
      "then select \'Add...\' from the menu list to add the \'" + BookmarkTitle + "\' to your Bookmarks.")
   }

}

function MakeHomePage() {

   if ((navigator.platform!="MacPPC") && (navigator.appName=="Microsoft Internet Explorer") && (navigator.appVersion>="4")) {
      document.forms[0].style.behavior='url(#default#homepage)'; document.forms[0].setHomePage(BookmarkURL);
   } else {
      alert("Sorry. This option is only available for Microsoft Internet Explorer.\n\n" +
      "If you are using Netscape Navigator, click the \'Bookmarks\' menu,\n" +
      "then select \'Add...\' from the menu list to add the \'" + BookmarkTitle + "\' to your Bookmarks.")
   }

}

function GetPageTop() {

   document.writeln("" +
   "<Script Language='JavaScript'>document.write(GetPageWidth())</Script>" +
   "<table border='0' cellpadding='0' cellspacing=0 width='100%'>" +
   "<tr>" +
      "<td colspan='3' align='left' valign='top'>" +
         "<div id='header'>" +
            GetHeader() + "</div></td></tr>" +
   "<tr><td id='hgutter'></div></td></tr>" +
   "<tr>" +
      "<td align='left' valign='top'>" +
         "<div id='contents'>" +
            GetMenu() + "</div></td>" +
      "<td id='vgutter'></td>" +
      "<td id='body' valign='top' width='100%'>" +
         GetTitle());

}

function GetPageBtm() {

   document.writeln("      </td></tr>" +
   "<tr><td id='hgutter'></div></td></tr>" +
   "<tr>" +
      "<td colspan='3' align='center' valign='top'>" +
         "<div id='footer'>" +
            GetFooter() + "</div></td></tr>" +
"</table>" +
"<img src=" + SiteURL + "/global/cnt-page.pl width=1 height=1>");

}

/********************************************************
Message Page*/

function GetMsgPageMsg(MsgNum) {

	var aLength = aMsg.length - 1;
	if (MsgNum > aLength) { MsgNum = 14; }
		
   var Val = aMsg[MsgNum].split("|");
   var MsgHdr = Val[1];
   var MsgBody = Val[2];
   return "Error Code: " + MsgNum + "<p><font color=\"red\"><b>" + MsgHdr + ":</b></font><p>" + MsgBody

}

function GetMsgBoxMsg(MsgNum) {

	var aLength = aMsg.length - 1;
	if (MsgNum > aLength) { MsgNum = 14; }
		
   var Val = aMsg[MsgNum].split("|");
   var MsgHdr = Val[1];
   var MsgBody = Val[2];
   return "Error Code: " + MsgNum + "\n" + MsgHdr + ":\n" + MsgBody

}

/********************************************************
Messages*/

var OldIPAddress = ""; //getCookie('OldIPAddress')
var NewIPAddress = ""; //getCookie('NewIPAddress')

//deleteCookie('OldIPAddress','/','')
//deleteCookie('NewIPAddress','/','')

var EmailErrLink1 = GetEmailLink('admin',eMailDomain,eMailExt,'Web Site Administrator','Media File Download Error')
var EmailErrLink2 = GetEmailLink('admin',eMailDomain,eMailExt,'Web Site Administrator','Media File Download Error')
var Contact1 = "<a href='contact.htm' target=_self>contact</a>";

aMsg = new Array (
   "0|Data Entry Error|You have indicated that you would like a reply to your message but you have not entered an eMail Address.",
   "1|Data Entry Error|You have indicated that you would like us to send you a copy of your message but you have not entered an eMail Address.",
   "2|Data Entry Error|The eMail address you entered appears to be invalid.\nPlease check your entry and try again.",
   "3|Data Entry Error|You will need to make an entry in the Subject field in order to continue.",
   "4|Data Entry Error|You will need to make an entry in the Message field in order to continue.",
   "5|Error|There was an error in processing your eMail request.",
   "6|Notice|Your message has been successfully sent to our eMail processing center.",
   "7|File Download Error|<b>Problem:</b><p><ul>The file you are attempting to download does not appear to exist.</ul><p><b>Possible Causes:</b><p><ul><li>The link to the file you attempted to download may be erroneous.<p><li>You may have entered the file download command URL directly in the browser address or location field indicating the URL to the file incorrectly.</ul><p><b>Possible Solutions:</b><p><ul>If the problem persists, please " + Contact1 + " the <b>" + SiteName + "</b> Web Site Administrator. Please be sure to indicate the file name or description of the file that you attempted to download.</ul>",
   "8|File Download Error|<b>Problem:</b><p><ul>The URL to the file you wish to download was not received.</ul><p><b>Possible Causes:</b><p><ul><li>The link to the file you attempted to download may be erroneous.<p><li>You may have entered the file download command URL directly in the browser address or location field without indicating the URL to the file itself.</ul><p><b>Possible Solutions:</b><p><ul>If the problem persists, please contact the " + SiteName + " " + EmailErrLink1 + ". Please be sure to indicate the file name or description of the file that you attempted to download.</ul>",
	"9|Media File Download Error|<b>Problem:</b><p><ul>The media file you are attempting to download does not appear to exist.</ul><p><b>Possible Causes:</b><p><ul><li>The link to the media file you attempted to download may be erroneous.<p><li>You may have entered the media file download command URL directly in the browser address or location field indicating the URL to the media file incorrectly.</ul><p><b>Possible Solutions:</b><p><ul>If the problem persists, please contact the " + SiteName + " " + Contact1 + ". Please be sure to indicate the media file name or description of the media file that you attempted to download.</ul>",
	"10|Media File Download Error|<b>Problem:</b><p><ul>The URL to the media file you wish to download was not received.</ul><p><b>Possible Causes:</b><p><ul><li>The link to the media file you attempted to download may be erroneous.<p><li>You may have entered the media file download command URL directly in the browser address or location field without indicating the URL to the media file itself.</ul><p><b>Possible Solutions:</b><p><ul>If the problem persists, please contact the " + SiteName + " " + Contact1 + ". Please be sure to indicate the media file name or description of the media file that you attempted to download.</ul>",
	"11|Purchase Canceled|Your purchase of Central Sound has been successfully canceled.",
	"12|Central Sound Purchase Complete|Thank you for your purchase of Central Sound.<p>A receipt for your purchase has been eMailed to you. You may log into your account at <a href=\"http://www.paypal.com/us\" target=\"_New\">www.paypal.com/us</a> to view details of this transaction.<p>A confirmation of your order has also been sent to the eMail address you supplied. This confirmation contains your assigned User ID, Password and detected IP address. It also includes helpful tips pertaining to the use of Central Sound.<p>If you do not already have a copy of Central Sound you may download a copy by selecting the <a href=\"http://www.trabuegentry.com/download.htm\">Download Central Sound</a> menu item at the Central Sound web site.<p>Simply setup the Central Sound software and enter your User ID and Password when prompted. You can receive assistance in setting up Central Sound by selecting the <a href=\"http://www.trabuegentry.com/setup.htm\">Setting Up Central Sound</a> menu item at the Central Sound web site.<p>If your IP address changes Central Sound automatically will notify you that you need to register your new IP address in order to continue using Central Sound. This process will take only a minute or two. You can do this without being prompted by selecting the <a href=\"http://www.trabuegentry.com/update-ip.htm\">Register New IP</a> menu item at the Central Sound web site.<p>Should you have technical issues regarding Central Sound you may contact us by selecting the <a href=\"http://www.trabuegentry.com/web-mail.htm\">Contact</a> menu item at the Central Sound web site.",
	"13|Duplicate Order|The order you attempted to place has already been placed.",
	"14|Invalid Message Number|The message number called does not appear to exist.",
	"15|Data Entry Error|You will need to make an entry in the User ID field in order to continue.",
	"16|Data Entry Error|You will need to make an entry in the Password field in order to continue.",
	"17|Data Entry Error|The <b>User ID</b> and <b>Password</b> you entered do not appear to correspond with any existing account. Please check this item and try again.",
	"18|Notice|Your IP address has been successfully updated.<p>Your previous IP address was:<br><b>" + OldIPAddress + "</b><p>Your new IP address is:<br><b>" + NewIPAddress + "</b><p>You may now resume using Central Sound.",
	"19|Data Entry Error|You will need to make an entry in the eMail Address field in order to continue.",
	"20|Central Sound Evaluation Registration Complete|Thank your for registering to evaluate Central Sound.<p>A confirmation of your registration has been sent to the eMail address you supplied. This confirmation contains your assigned User ID, Password and detected IP address. It also includes helpful tips pertaining to the use of Central Sound.<p>If you do not already have a copy of Central Sound you may download a copy by selecting the <a href=\"http://www.trabuegentry.com/download.htm\">Download Central Sound</a> menu item at the Central Sound web site.<p>Simply setup the Central Sound software and enter your User ID and Password when prompted. You can receive assistance in setting up Central Sound by selecting the <a href=\"http://www.trabuegentry.com/setup.htm\">Setting Up Central Sound</a> menu item at the Central Sound web site.<p>If your IP address changes Central Sound automatically will notify you that you need to register your new IP address in order to continue evaluating Central Sound. This process will take only a minute or two. You can do this without being prompted by selecting the <a href=\"http://www.trabuegentry.com/update-ip.htm\">Register New IP</a> menu item at the Central Sound web site.<p>Should you have technical issues regarding Central Sound you may contact us by selecting the <a href=\"http://www.trabuegentry.com/web-mail.htm\">Contact</a> menu item at the Central Sound web site.",
	"21|Duplicate Registration|The registration you attempted to make has already been made using the same <b>eMail Address</b> that you entered.",
	"22|Central Sound Purchase Complete|Thank your for your purchase of Central Sound.<p>A receipt for your purchase has been eMailed to you. You may log into your account at <a href=\"http://www.paypal.com/us\" target=\"_New\">www.paypal.com/us</a> to view details of this transaction.<p>A confirmation of your purchase has also been sent to the eMail address you supplied.<p>If your IP address changes Central Sound automatically will notify you that you need to register your new IP address in order to continue using Central Sound. This process will take only a minute or two. You can do this without being prompted by selecting the <a href=\"http://www.trabuegentry.com/update-ip.htm\">Register New IP</a> menu item at the Central Sound web site.<p>Should you have technical issues regarding Central Sound you may contact us by selecting the <a href=\"http://www.trabuegentry.com/web-mail.htm\">Contact</a> menu item at the Central Sound web site.",
	"23|Duplicate Purchase Error|The purchase you attempted to make has already been made using the same <b>User ID</b> and <b>Password</b> that you entered.",
	"24|Duplicate Purchase Error|The purchase you attempted to make has already been made using the same <b>eMail Address</b> that you entered."
);

