//*** The first form contains the names of the pages passed to the
//*** function so the script can take different actions based on
//*** the page being built. The second form contains help text 
//*** that appears in the status bar. The third  
//*** form contains the names of the button gifs if using button 
//*** links. The third form contains the name of the button gif.
//*** The fourth form contains the name of the html page the 
//*** navigation link will point to.
//*** When adding (or deleting) pages make sure to keep these four
//*** forms in synch by adding (or deleting) four corresponding  
//*** entries per web page, one in each form.
//*** NOTE: You must close your current browser window and open a 
//*** new one after updating the forms before you can test your 
//*** changes.
//***
//*** These are the instructions for making new button gifs in Paint 
//*** Shop Pro 5.0 to match the existing ones:
//*** 1.  Open buttonblank.psp.
//*** 2.  Set the foreground color to #BD0000.
//*** 3.  Add the words with font set to Haettenschweiler 12pt bold
//***     with anti-alias turned off.
//*** 4.  Move the words till the vertical offset is 14 if using one
//***     line, or 7 for the first line of a two-line label and 20
//***     for the second line of a two-line label.
//*** 5.  While the type is still selected add a white drop shadow,
//***     opacity 100, blur 0 and offsets both -1.
//*** 6.  Save the button as a gif.
//*** To make the inactive state button
//*** 7.  Select colors/adjust/brightness contrast. Set the brightness 
//***     to 0 and the contrast to -50.
//*** 8.  Save the button as a gif.
var msgBoardURL = 'http://boards.ancestry.com/mbexec?htx=board&r=rw&p=surnames.wickersham';

document.write("<FORM NAME='pageNameForm'>");
document.write("<INPUT TYPE='hidden' NAME='page1' VALUE='Home'>");
//document.write("<INPUT TYPE='hidden' NAME='page2' VALUE='Sample Pages'>");
//document.write("<INPUT TYPE='hidden' NAME='page3' VALUE='Wickersham Facts'>");
document.write("<INPUT TYPE='hidden' NAME='page7' VALUE='About the Book'>");
document.write("<INPUT TYPE='hidden' NAME='page4' VALUE='About the Editors'>");
document.write("<INPUT TYPE='hidden' NAME='page8' VALUE='Order the Book'>");
//document.write("<INPUT TYPE='hidden' NAME='page5' VALUE='Submit Your Information'>");
document.write("<INPUT TYPE='hidden' NAME='page6' VALUE='Most Wanted Wickershams'>");
document.write("<INPUT TYPE='hidden' NAME='page9' VALUE='GenConnect Boards'>");
document.write("<INPUT TYPE='hidden' NAME='page10' VALUE='Message Boards'>");
document.write("<INPUT TYPE='hidden' NAME='page11' VALUE='Links'>");
document.write("<INPUT TYPE='hidden' NAME='page12' VALUE='Photo Gallery'>");
document.write("<INPUT TYPE='hidden' NAME='page13' VALUE='Vital Records'>");
document.write("<INPUT TYPE='hidden' NAME='page14' VALUE='Wickersham National Archive'>");
document.write("<INPUT TYPE='hidden' NAME='page15' VALUE='Contact Us'>");
document.write("</FORM>");

document.write("<FORM NAME='pageDescForm'>");
document.write("<INPUT TYPE='hidden' NAME='page1' VALUE='Wickersham home page'>");
//document.write("<INPUT TYPE='hidden' NAME='page2' VALUE='View sample pages from the book'>");
//document.write("<INPUT TYPE='hidden' NAME='page3' VALUE='Fun facts and interesting trivia'>");
document.write("<INPUT TYPE='hidden' NAME='page7' VALUE='Facts about the book and a list of Wickersham related surnames'>");
document.write("<INPUT TYPE='hidden' NAME='page4' VALUE='Biographies of the editors'>");
document.write("<INPUT TYPE='hidden' NAME='page8' VALUE='How to order your copy of the book'>");
//document.write("<INPUT TYPE='hidden' NAME='page5' VALUE='Tell us about your family line'>");
document.write("<INPUT TYPE='hidden' NAME='page6' VALUE='Help us connect these Wickershams to the rest of the family'>");
document.write("<INPUT TYPE='hidden' NAME='page9' VALUE='Research tools and a query board'>");
document.write("<INPUT TYPE='hidden' NAME='page10' VALUE='Research tools and a query board'>");
document.write("<INPUT TYPE='hidden' NAME='page11' VALUE='Links to research helps.'>");
document.write("<INPUT TYPE='hidden' NAME='page12' VALUE='Wickersham people and places in pictures'>");
document.write("<INPUT TYPE='hidden' NAME='page13' VALUE='Wills; Birth, Death & Marriage Certificates'>");
document.write("<INPUT TYPE='hidden' NAME='page14' VALUE='Wickersham National Archive'>");
document.write("<INPUT TYPE='hidden' NAME='page15' VALUE='Get in touch with us via email'>");
document.write("</FORM>");

document.write("<FORM NAME='buttonNameForm'>");
document.write("<INPUT TYPE='hidden' NAME='page1' VALUE='button_home'>");
//document.write("<INPUT TYPE='hidden' NAME='page2' VALUE='button_sample_pages'>");
//document.write("<INPUT TYPE='hidden' NAME='page3' VALUE='button_wickersham_facts'>");
document.write("<INPUT TYPE='hidden' NAME='page7' VALUE='button_about_the_book'>");
document.write("<INPUT TYPE='hidden' NAME='page4' VALUE='button_about_the_editors'>");
document.write("<INPUT TYPE='hidden' NAME='page8' VALUE='button_order_the_book'>");
//document.write("<INPUT TYPE='hidden' NAME='page5' VALUE='button_submit_your_information'>");
document.write("<INPUT TYPE='hidden' NAME='page6' VALUE='button_most_wanted_wickershams'>");
document.write("<INPUT TYPE='hidden' NAME='page9' VALUE='button_genconnect_boards'>");
document.write("<INPUT TYPE='hidden' NAME='page10' VALUE='button_message_boards'>");
document.write("<INPUT TYPE='hidden' NAME='page11' VALUE='button_links'>");
document.write("<INPUT TYPE='hidden' NAME='page12' VALUE='button_photo_gallery'>");
document.write("<INPUT TYPE='hidden' NAME='page13' VALUE='button_vital_records'>");
document.write("<INPUT TYPE='hidden' NAME='page14' VALUE='button_wickersham_national_archive'>");
document.write("<INPUT TYPE='hidden' NAME='page15' VALUE='button_contact_us'>");
document.write("</FORM>");

document.write("<FORM NAME='fileNameForm'>");
document.write("<INPUT TYPE='hidden' NAME='page1' VALUE='index.htm'>");
//document.write("<INPUT TYPE='hidden' NAME='page2' VALUE='sample_pages.htm'>");
//document.write("<INPUT TYPE='hidden' NAME='page3' VALUE='wickersham_facts.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page7' VALUE='about_the_book.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page4' VALUE='about_the_editors.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page8' VALUE='order_the_book.htm'>");
//document.write("<INPUT TYPE='hidden' NAME='page5' VALUE='submit_your_information.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page6' VALUE='most_wanted_wickershams.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page9' VALUE='javascript:genConnectAlert()'>");
//old genconnect link ==> document.write("<INPUT TYPE='hidden' NAME='page9' VALUE='http://resources.rootsweb.com/surnames/w/i/WICKERSHAM/'>");
document.write("<INPUT TYPE='hidden' NAME='page10' VALUE='javascript:popup(msgBoardURL)'>");
//document.write("<INPUT TYPE='hidden' NAME='page10' VALUE='javascript:popup(\'http://boards.ancestry.com/mbexec?htx=admin.board&r=rw&p=surnames.wickersham\')>");
document.write("<INPUT TYPE='hidden' NAME='page11' VALUE='links.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page12' VALUE='photo_gallery.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page13' VALUE='vital_records.htm'>");
document.write("<INPUT TYPE='hidden' NAME='page14' VALUE='wickersham_national_archive.html'>");
document.write("<INPUT TYPE='hidden' NAME='page15' VALUE=''>");
document.write("</FORM>");

function writeTop(pageName) {
  document.write('<BODY TEXT="#000000" BGCOLOR="#E0E0E0" LINK="#000000" VLINK="#000000" ALINK="#000000">');
//*** This is the outer table that controls the layout of the entire page
  document.write('<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="760">');
  document.write('<TR>');
  document.write('<TD WIDTH="120" HEIGHT="120" BGCOLOR="#BD0000" ALIGN="center" VALIGN="center">');
  document.write('<IMG SRC="support_freedom.gif" BORDER="0">');
  document.write('</TD><TD WIDTH="15">');
//  document.write('<TD WIDTH="505" ALIGN="center">');
//  document.write('</TD><TD WIDTH="625" ALIGN="center">');
  document.write('</TD><TD ALIGN="center">');
  document.write('<IMG SRC="wickbooktitle2.gif" WIDTH="338" HEIGHT="120">');
  document.write('</TD></TR><TR>');
  document.write('<TD COLSPAN="3" HEIGHT="5" >');
  document.write('</TD></TR><TR>');
  document.write('<TD COLSPAN="3" HEIGHT="4" BGCOLOR="#BD0000">');
//*** Because the Netscape browser won't render the background color of this cell
//*** unless it contains some content, stuff this unneeded image in.
  document.write('<IMG SRC="onepixel.gif" BORDER="0" HSPACE="0" VSPACE="0">');
  document.write('</TD></TR><TR>');
  document.write('<TD COLSPAN="3" HEIGHT="5" >');

  document.write('</TD></TR></TD>');
  document.write('<TD WIDTH="120" BGCOLOR="#BD0000" ALIGN="center" VALIGN="top">');
  document.write('<BR>');
//  document.write('<TABLE WIDTH="110" CELLPADDING="3" CELLSPACING="3" BORDER="0">');
  document.write('<TABLE WIDTH="110" CELLPADDING="0" CELLSPACING="0" BORDER="0" ALIGN="center">');
  var sub = 0;
  while (sub < (document.pageNameForm.length)) {
    document.write('<TR>');
//    document.write('<TD BGCOLOR="#C0C0C0" WIDTH="110" ALIGN="center">');
    document.write('<TD BGCOLOR="#C0C0C0" WIDTH="100%" ALIGN="center">');
    if (document.pageNameForm[sub].value == "Contact Us") {
//      document.write('<A HREF="mailto:&#71;&#68;&#65;&#86;&#73;&#83;&#57;&#57;&#64;&#112;&#114;&#111;&#100;&#105;&#103;&#121;&#46;&#110;&#101;&#116;?subject=The Wickersham Family in America"><FONT FACE="serif" SIZE="-1" COLOR="#000000">' + document.pageNameForm[sub].value + '</FONT></A>');
      document.write('<A HREF="mailto:&#103;&#114;&#100;&#97;&#118;&#105;&#115;&#64;&#99;&#101;&#110;&#116;&#117;&#114;&#121;&#116;&#101;&#108;&#46;&#110;&#101;&#116;?subject=The Wickersham Family in America"><IMG SRC="' + document.buttonNameForm[sub].value + '.gif" BORDER="0" HEIGHT="40" WIDTH="110" '
                     + 'onMouseOver="statusMessage(' + "'over','" 
                     + document.pageDescForm[sub].value + "'" 
                     + ');return true;" onMouseOut="statusMessage(' 
                     + "'out'" + ');return true;"></A>');
    }
    else  {
      if (pageName == document.pageNameForm[sub].value)  {
//*** If the page currently pointed at by sub in the pageNameForm is
//*** the same as the name of the page we are currently building then
//*** insert the inactive button for this page
//        document.write('<FONT FACE="serif" SIZE="-1" COLOR="#FFFFFF"><U>' 
//                       + document.pageNameForm[sub].value + '</U></FONT>');
          document.write('<IMG SRC="' + document.buttonNameForm[sub].value
                         + '_inactive.gif" BORDER="0" HEIGHT="40" WIDTH="110">');
      }
      else {
//*** Otherwise insert the active button
//          document.write('<A HREF="' + document.fileNameForm[sub].value + 
//                         '"><FONT FACE="serif" SIZE="-1" COLOR="#000000">'
//                         + document.pageNameForm[sub].value + '</FONT></A>');
//          document.write('<A HREF="' + document.fileNameForm[sub].value + 
//                         '"><IMG SRC="' + document.buttonNameForm[sub].value
//                         + '.gif" BORDER="0" HEIGHT="40" WIDTH="110"></A>');
          document.write('<A HREF="' + document.fileNameForm[sub].value 
                         + '"><IMG SRC="' + document.buttonNameForm[sub].value
                         + '.gif" BORDER="0" HEIGHT="40" WIDTH="110" '
                         + 'onMouseOver="statusMessage(' + "'over','" 
                         + document.pageDescForm[sub].value + "'" 
                         + ');return true;" onMouseOut="statusMessage(' 
                         + "'out'" + ');return true;"></A>');
      } 
    }
//    document.write('<TD WIDTH="5">');
    document.write('</TD>');
    document.write('</TR><TR><TD HEIGHT="5"></TD></TR>');
    sub = sub + 1;
  }
//*** End of navigation bar table
  document.write('</TABLE>');
	document.write('<A HREF="javascript:heritageOrder();"><IMG SRC="heritage_books.gif" ALT="History, Genealogy, Americana" BORDER="0" HEIGHT="156" WIDTH="94"></A>'); 
//	document.write('<A HREF="http://www.heritagebooks.com/mm5/merchant.mvc?Screen=SFNT&Store_Code=HBI&Affiliate=grdavis"><IMG SRC="heritage_books.gif" ALT="History, Genealogy, Americana" BORDER="0" HEIGHT="156" WIDTH="94"></A>'); 
//	document.write('<A HREF="http://www.heritagebooks.com/mm5/merchant.mvc?Screen=SFNT&Store_Code=HBI&Affiliate=grdavis"><IMG SRC="heritage_books.gif" ALT="History, Genealogy, Americana" BORDER="0" HEIGHT="156" WIDTH="94"></A>');
  document.write('</TD><TD WIDTH="15">');
  document.write('</TD><TD WIDTH="625" VALIGN="top" BGCOLOR="#E0E0E0" ALIGN="left">');
//*** End of outer table is in the script that lays out the bottom of the page
}

function heritageOrder() {
  heritageOrderPage = window.open("http://www.heritagebooks.com/mm5/merchant.mvc?Screen=SFNT&Store_Code=HBI&Affiliate=grdavis", "heritageOrderPage");
	heritageOrderPage.focus();
}

function statusMessage(state,msg) {
  if (state == 'over') {
    window.status = msg;
  }
  if (state == 'out') {
    window.status = '';
  }
}

function popup(page) {
  linksPage = window.open(page, "linksPage");
	linksPage.focus();
}

function genConnectAlert() {
  alert('With the merger of Rootsweb.com and Ancestry.com ' +
        'the "GenConnect Boards" have been transformed into ' +
				'"Message Boards". Some features are similar, some ' +
				'have changed considerably and others are no longer ' +
				'available. When you click the OK button you will be ' +
				'directed to the Message Boards. In the future please ' +
				'use the Message Boards button since the GenConnect ' +
				'button will soon be removed. Note that a new Vital ' +
				'Records area has been added to our web site to replace ' +
				'some of the lost functionality of the GenConnect Boards');
				popup(msgBoardURL);
}