var menustate="on";

window.onerror = ferror;

if (parseInt(navigator.appVersion)<4) {
 var menutype="text";
 var menupos="none";
 var MenuVerticalCentered="static"; }
 else {
var menutype=null;
var menupos=null;
var search = "menutype=";
if (document.cookie.length > 0) { 
offset = document.cookie.indexOf(search);
  if (offset != -1) {  
  offset += search.length; 
  end = document.cookie.indexOf(";", offset); 
   if (end == -1) end = document.cookie.length;       
   menutype=unescape(document.cookie.substring(offset, end)); } }
if (menutype==null) menutype="graph"; }

if (menutype=="graph") {
var menupos=null;
var search = "menupos=";
if (document.cookie.length > 0) {   // if there is a cookie
offset = document.cookie.indexOf(search);
  if (offset != -1) {  // menupos is in cookie
  offset += search.length; 
  end = document.cookie.indexOf(";", offset); 
   if (end == -1) end = document.cookie.length;       
   menupos=unescape(document.cookie.substring(offset, end)); } }
if (menupos==null) menupos="rel";
if (menupos=="abs") var MenuVerticalCentered="top";
else var MenuVerticalCentered="static"; } 

function ferror(){
  return true; }
  
function menunotice() {
document.write('<font color="#990000">For faster browsing in the Parish History, hide the menu by clicking on the button that appears at the bottom of this and every page in the history.  Note that cookies must be enabled in your browser for this option to work.</font>'); }

function checktextmenu() {
menustate="on";
var search = "menustate=";
if (document.cookie.length > 0) {   // if there is a cookie
offset = document.cookie.indexOf(search);
  if (offset != -1) {  // there menustate is in cookie
  offset += search.length; 
  end = document.cookie.indexOf(";", offset); 
   if (end == -1) end = document.cookie.length;       
   menustate=unescape(document.cookie.substring(offset, end)); } } }
   
function selectmenubutton() {
if (menustate=="on")
document.write('<a href="javascript:psetmenu()"><img src="bhidemenu.gif" border=0></a>'); 
if (menustate=="off")
document.write('<a href="javascript:psetmenu()"><img src="bshowmenu.gif" border=0></a>'); }

function psetmenu() {
if (menustate=="on") mvalue="off";
if (menustate=="off") mvalue="on";
document.cookie="menustate="+escape(mvalue)+""; 
window.history.go(0); }
  
function checkbrowser() {
if (navigator.appName=="Netscape") mbrowser="ns";
else mbrowser="ie";
mversion=parseInt(navigator.appVersion);
if (mbrowser=="ie" && mversion<4) mie3="yes";
else mie3="no";
 return true }
   
function getwidth() {
scrwidth=400;
scrheight=300;
  if (mbrowser=="ns" && mversion>3)
      {scrwidth=window.screen.availWidth;
     scrheight=window.screen.availHeight; }
  if ((mbrowser=="ns" && mversion==3) && navigator.javaEnabled())
  { var toolkit = java.awt.Toolkit.getDefaultToolkit();
   var screen_size = toolkit.getScreenSize();
   scrwidth = screen_size.width;  
   scrheight=screen_size.height; }
  if (mbrowser=="ie" && mie3=="no")
    { scrwidth=window.screen.availWidth;
       scrheight=window.screen.availHeight;  } 
       return true}
 
function pfindsect()
{ if (document.images) {
checkbrowser();
getwidth();
var mleft=((scrwidth-142)/2)+142-200;
var mtop=(scrheight/2)-200;
windowprops = "menubars=no,location=no,toolbars=no,scrollbars=yes,width=400,height=400,left="+mleft+",top="+mtop;
window.open("histfind.html","",windowprops); } }

function menuwrite() {
if (menustate=="on" && menutype=="graph")
{document.write("<script language='JavaScript1.1' type='text/javascript'>function Go(){return}</script>");
document.write("<script language='JavaScript1.1' type='text/javascript' src='menu.js'></script>"); } }

