// Need a dummy var...
hitcount = 0;

function buildHeaderFull()
{
  document.write("<!-- This is the top bar! -->");
  document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">");
  document.write("  <tr class=\"class1\" valign=\"top\"><!-- row 1 -->");
  document.write("   <td bgcolor=\"#e9d496\" width=\"50%\" align=\"left\"><img name=\"topbar_r1_c1\" src=\"./images/topbar_r1_c1.gif\" width=\"272\" height=\"90\" border=\"0\"></td>");
  document.write("   <td bgcolor=\"#e9d496\" width=\"50%\" align=\"right\">");
  document.write("     <img name=\"topbar_r1_c4\" src=\"./images/topbar_r1_c4.gif\" width=\"65\" height=\"90\" border=\"0\" align=\"right\">");
  document.write("     <APPLET NAME=\"Scroll\" CODEBASE=\"./ScrollMaster\" CODE=\"ScrollMaster.class\" WIDTH=260 HEIGHT=85 border=\"0\">");
  document.write("       <PARAM NAME=\"filename\" VALUE=\"scroll.txt\">");
  document.write("       <PARAM NAME=\"bgcolor\" VALUE=\"233;212;150\">");
  document.write("       <PARAM NAME=\"titletxt\" VALUE=\"102;51;0\">");
  document.write("       <PARAM NAME=\"txtcolor\" VALUE=\"0;0;0\">");
  document.write("       <PARAM NAME=\"bgimg\" VALUE=\"vffobg.gif\">");
  document.write("       <PARAM NAME=\"iconimg\" VALUE=\"vffo_icon.gif\">");
  document.write("       <PARAM NAME=\"linkimg\" VALUE=\"vffo_link.gif\">");
  document.write("     </APPLET>");
  document.write("  </td>");
  document.write("  </tr>");
  document.write("</table>");
  document.write("");
  document.write("<!-- This is the nav bar! -->");
  document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"640\">");
  document.write("<tr>");
  document.write("<td colspan=3>");
  document.write("  <img src=\"./images/shim.gif\" width=\"640\" height=\"1\" border=\"0\">");
  document.write("</td>");
  document.write("</TR>");
  document.write("<tr>");
  document.write("<td width=\"100\" valign=\"top\">");
  document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100\">");
  document.write("<!-- fwtable fwsrc=\"homepage v2.png\" fwbase=\"menubar.gif\" -->");
  document.write("  <tr>");
  document.write("<!-- Shim row, height 1. -->");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"100\" height=\"1\" border=\"0\"></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"1\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("");
  document.write("  <tr valign=\"top\"><!-- row 1 -->");
  document.write("   <td><a href=\"./thefruit.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r1_c1','./images/menubar_r1_c1_f2.gif','./images/menubar_r1_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r1_c1','./images/menubar_r1_c1_f3.gif',1);\" ><img name=\"menubar_r1_c1\" src=\"./images/menubar_r1_c1.gif\" width=\"100\" height=\"90\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"90\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 2 -->");
  document.write("   <td><a href=\"./thetrees.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r2_c1','./images/menubar_r2_c1_f2.gif','./images/menubar_r2_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r2_c1','./images/menubar_r2_c1_f3.gif',1);\" ><img name=\"menubar_r2_c1\" src=\"./images/menubar_r2_c1.gif\" width=\"100\" height=\"90\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"90\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 3 -->");
  document.write("   <td><a href=\"./thefarm.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r3_c1','./images/menubar_r3_c1_f2.gif','./images/menubar_r3_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r3_c1','./images/menubar_r3_c1_f3.gif',1);\" ><img name=\"menubar_r3_c1\" src=\"./images/menubar_r3_c1.gif\" width=\"100\" height=\"80\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"80\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 4 -->");
  document.write("   <td><a href=\"./thefarmer.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r4_c1','./images/menubar_r4_c1_f2.gif','./images/menubar_r4_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r4_c1','./images/menubar_r4_c1_f3.gif',1);\" ><img name=\"menubar_r4_c1\" src=\"./images/menubar_r4_c1.gif\" width=\"100\" height=\"102\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"102\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 5 -->");
  document.write("   <td><a href=\"./getsome.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r5_c1','./images/menubar_r5_c1_f2.gif','./images/menubar_r5_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r5_c1','./images/menubar_r5_c1_f3.gif',1);\" ><img name=\"menubar_r5_c1\" src=\"./images/menubar_r5_c1.gif\" width=\"100\" height=\"118\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"118\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("<!--   This table was automatically created with Macromedia Fireworks 3.0   -->");
  document.write("<!--   http://www.macromedia.com   -->");
  document.write("</table>");
  document.write("</td>");
  document.write("<td class=\"class2\" width=\"540\" valign=\"top\">");
  document.write("<center>");
  document.write("<!-- Top menu bar -->");
  document.write("<DIV  class=\"menubar\">");
  document.write("<A HREF=\"./\">Home</A> | ");
  document.write("<A HREF=\"./thefruit.html\">The Fruit</A> | ");
  document.write("<A HREF=\"./thetrees.html\">The Trees</A> | ");
  document.write("<A HREF=\"./thefarm.html\">The Farm</A><BR>");
  document.write("<A HREF=\"./thefarmer.html\">The Farmer</A> | ");
  document.write("<A HREF=\"./getsome.html\">Can I Get Some?</A>");
  document.write("<HR COLOR=\"#E9D496\" SIZE=\"1\" WIDTH=\"200\">");
  document.write("</DIV>");
  document.write("<!-- End menu bar -->");  
 
}

function buildHeader()
{
  document.write("<!-- This is the top bar! -->");
  document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">");
  document.write("  <tr class=\"class1\" valign=\"top\"><!-- row 1 -->");
  document.write("   <td bgcolor=\"#e9d496\" width=\"50%\" align=\"left\"><img name=\"topbar_r1_c1\" src=\"./images/topbar_r1_c1.gif\" width=\"272\" height=\"90\" border=\"0\"></td>");
  document.write("   <td bgcolor=\"#e9d496\" width=\"50%\" align=\"right\">");
  document.write("     <img name=\"topbar_r1_c4\" src=\"./images/topbar_r1_c4.gif\" width=\"65\" height=\"90\" border=\"0\" align=\"right\">");
  document.write("  </td>");
  document.write("  </tr>");
  document.write("</table>");
  document.write("");
  document.write("<!-- This is the nav bar! -->");
  document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"640\">");
  document.write("<tr>");
  document.write("<td colspan=3>");
  document.write("  <img src=\"./images/shim.gif\" width=\"640\" height=\"1\" border=\"0\">");
  document.write("</td>");
  document.write("</TR>");
  document.write("<tr>");
  document.write("<td width=\"100\" valign=\"top\">");
  document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100\">");
  document.write("<!-- fwtable fwsrc=\"homepage v2.png\" fwbase=\"menubar.gif\" -->");
  document.write("  <tr>");
  document.write("<!-- Shim row, height 1. -->");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"100\" height=\"1\" border=\"0\"></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"1\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("");
  document.write("  <tr valign=\"top\"><!-- row 1 -->");
  document.write("   <td><a href=\"./thefruit.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r1_c1','./images/menubar_r1_c1_f2.gif','./images/menubar_r1_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r1_c1','./images/menubar_r1_c1_f3.gif',1);\" ><img name=\"menubar_r1_c1\" src=\"./images/menubar_r1_c1.gif\" width=\"100\" height=\"90\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"90\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 2 -->");
  document.write("   <td><a href=\"./thetrees.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r2_c1','./images/menubar_r2_c1_f2.gif','./images/menubar_r2_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r2_c1','./images/menubar_r2_c1_f3.gif',1);\" ><img name=\"menubar_r2_c1\" src=\"./images/menubar_r2_c1.gif\" width=\"100\" height=\"90\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"90\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 3 -->");
  document.write("   <td><a href=\"./thefarm.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r3_c1','./images/menubar_r3_c1_f2.gif','./images/menubar_r3_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r3_c1','./images/menubar_r3_c1_f3.gif',1);\" ><img name=\"menubar_r3_c1\" src=\"./images/menubar_r3_c1.gif\" width=\"100\" height=\"80\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"80\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 4 -->");
  document.write("   <td><a href=\"./thefarmer.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r4_c1','./images/menubar_r4_c1_f2.gif','./images/menubar_r4_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r4_c1','./images/menubar_r4_c1_f3.gif',1);\" ><img name=\"menubar_r4_c1\" src=\"./images/menubar_r4_c1.gif\" width=\"100\" height=\"102\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"102\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("  <tr valign=\"top\"><!-- row 5 -->");
  document.write("   <td><a href=\"./getsome.html\" onMouseOut=\"MM_nbGroup('out');\"  onMouseOver=\"MM_nbGroup('over','menubar_r5_c1','./images/menubar_r5_c1_f2.gif','./images/menubar_r5_c1_f3.gif',1);\"  onClick=\"MM_nbGroup('down','navbar1','menubar_r5_c1','./images/menubar_r5_c1_f3.gif',1);\" ><img name=\"menubar_r5_c1\" src=\"./images/menubar_r5_c1.gif\" width=\"100\" height=\"118\" border=\"0\"></a></td>");
  document.write("   <td><img src=\"./images/shim.gif\" width=\"1\" height=\"118\" border=\"0\"></td>");
  document.write("  </tr>");
  document.write("<!--   This table was automatically created with Macromedia Fireworks 3.0   -->");
  document.write("<!--   http://www.macromedia.com   -->");
  document.write("</table>");
  document.write("</td>");
  document.write("<td class=\"class2\" width=\"540\" valign=\"top\">");
  document.write("<center>");
  document.write("<!-- Top menu bar -->");
  document.write("<DIV  class=\"menubar\">");
  document.write("<A HREF=\"./\">Home</A> | ");
  document.write("<A HREF=\"./thefruit.html\">The Fruit</A> | ");
  document.write("<A HREF=\"./thetrees.html\">The Trees</A> | ");
  document.write("<A HREF=\"./thefarm.html\">The Farm</A><BR>");
  document.write("<A HREF=\"./thefarmer.html\">The Farmer</A> | ");
  document.write("<A HREF=\"./getsome.html\">Can I Get Some?</A>");
  document.write("<HR COLOR=\"#E9D496\" SIZE=\"1\" WIDTH=\"200\">");
  document.write("</DIV>");
  document.write("<!-- End menu bar -->");  
 
}

function buildFooter()
{
  document.write("</td>");
  document.write("<td valign=\"top\">");
  document.write("</td>");
  document.write("</tr>");
  document.write("<tr>");
  document.write("<td colspan=\"3\" align=\"center\">");
  document.write("<hr width=\"176\" size=\"1\">");
  document.write("<TABLE CLASS=\"class_footnote\">");
  document.write("<TR>");
  document.write("<TD ALIGN=\"RIGHT\" VALIGN=\"MIDDLE\">");
  document.write("Site design by VE<BR>");
  document.write("(C)2001, Vaughn Enterprises");
  document.write("</TD>");
  document.write("<TD ALIGN=\"LEFT\">");
  document.write("<img src=\"./images/logo-new_ve.gif\" BORDER=\"0\">");
  document.write("</TD>");
  document.write("</TR>");
  document.write("</TABLE>");
  document.write("<hr width=\"176\" size=\"1\">");
  document.write("</td>");
  document.write("</tr>");
  document.write("</table>");
  
}

function showWindow( x, y, loc )
{
  window.open( loc, "tinyWindow", 'toolbar=no,width=' + x + ',height=' + y )
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
/* Functions that swaps down images. */
function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

/* Functions that handle preload. */
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function checkBrowser()
{
  // Find MSIE, then parse int...
  var browser = navigator.appName;
  var version;
  var ok = true;
  if( browser == "Netscape" )
  {
    // Netscape...
    version = parseInt( navigator.appVersion );
    if( version < 5 )
    {
      // Not OK!
      ok = false;
    }
  }
  else
  {
    // MSIE...
    version = parseInt( navigator.appVersion );
    if( version < 4 )
    {
      // Not OK!
      ok = false;
    }
  }
  
  if( !ok )
  {
    document.location = "./badbrowser.html";
  }
}

