function writeTableHeaders(titleGif, button, subDir)
	{
	var secondRow;
	
	// We don't want to mouseover the tab of the current page, just the others as the user browsers
	document.write("<table border='0' cellpadding='0' cellspacing='0'>");
	document.write("<tr>");
	document.write("<td rowspan='2'><a href='" + subDir + "default.htm'><img src='" + subDir + "images/ph_barbaras.gif' width='118' height='65' border='0' alt='Barbaras header'></a></td>");

	if(button == "search")
		{
		document.write("<td><a href=\"" + subDir + "database/search.html\"><img name=search src='" + subDir + "images/ph_search_active.gif' width='69' height='33' border='0' alt='Name Search'>");
		secondRow = "<img src='" + titleGif +"' width='552' height='32' border='0' alt=\"Search\">";
		}
	else
		document.write("<td><a href=\"" + subDir + "database/search.html\" onmouseover='display_active_images(\"search\")' onmouseout='display_inactive_images(\"search\")'><img name=search src='" + subDir + "images/ph_search.gif' width='69' height='33' border='0' alt='Name Search'>");
		
	if(button == "emigrations")
		{
		document.write("<a href=\"" + subDir + "emigrations/emigrations.html\"><img name='us' src='" + subDir + "images/ph_us_active.gif' width='54' height='33' border='0' alt='U.S. Branches'>");
		secondRow = "<img src='" + titleGif +"' width='552' height='32' border='0' alt=\"U.S.\">";
		}
	else
		document.write("<a href=\"" + subDir + "emigrations/emigrations.html\" onmouseover='display_active_images(\"us\")' onmouseout='display_inactive_images(\"us\")'><img name=us src='" + subDir + "images/ph_us.gif' width='54' height='33' border='0' alt='U.S. Branches'>");

	if(button == "tree")
		{
		document.write("<a href=\"" + subDir + "tree/tree.html\"><img name='tree' src='" + subDir + "images/ph_tree_active.gif' width='57' height='33' border='0' alt='Family tree'>");
		secondRow = "<img src='" + titleGif +"' width='552' height='32' border='0' alt=\"Tree\">";
		}
	else
		document.write("<a href=\"" + subDir + "tree/tree.html\" onmouseover='display_active_images(\"tree\")' onmouseout='display_inactive_images(\"tree\")'><img name=tree src='" + subDir + "images/ph_tree.gif' width='57' height='33' border='0' alt='Family tree'>");

	if(button == "people")
		{
		document.write("<a href=\"" + subDir + "people/people.html\"><img name='people' src='" + subDir + "images/ph_people_active.gif' width='115' height='33' border='0' alt='People'>");
		secondRow = "<img src='" + titleGif +"' width='552' height='32' border='0' alt=\"People\">";
		}
	else
		document.write("<a href='" + subDir + "people/people.html' onmouseover='display_active_images(\"people\")' onmouseout='display_inactive_images(\"people\")'><img name=people src='" + subDir + "images/ph_people.gif' width='115' height='33' border='0' alt='People'>");

	if(button == "origin")
		{
		document.write("<a href=\"" + subDir + "origin/origin.html\"><img name='origin' src='" + subDir + "images/ph_origin_active.gif' width='66' height='33' border='0' alt='Name Origin'>");
		secondRow = "<img src='" + titleGif +"' width='552' height='32' border='0' alt=\"Origin\">";
		}
	else
		document.write("<a href='" + subDir + "origin/origin.html' onmouseover='display_active_images(\"origin\")' onmouseout='display_inactive_images(\"origin\")'><img name=origin src='" + subDir + "images/ph_origin.gif' width='66' height='33' border='0' alt='Name Origin'>");

	if(button == "researchers")
		{
		document.write("<a href=\"" + subDir + "researchers/researchers.html\"><img name='researchers' src='" + subDir + "images/ph_researchers_active.gif' width='103' height='33' border='0' alt='Researchers'>");
		secondRow = "<img src='" + titleGif +"' width='552' height='32' border='0' alt='researchers'>";
		}
	else
		document.write("<a href=\"" + subDir + "researchers/researchers.html\" onmouseover=\"display_active_images('researchers')\" onmouseout=\"display_inactive_images('researchers')\"><img name='researchers' src='" + subDir + "images/ph_researchers.gif' width='103' height='33' border='0' alt='Researchers'>");

	if(button == "contacts")
		{
		document.write("<a href=\"" + subDir + "contacts/contacts.html\"><img name='contacts' src='" + subDir + "images/ph_contact_active.gif' width='88' height='33' border='0' alt='Contact Us'></a></td>");
		secondRow = "<img src='" + titleGif +"' width='552' height='32' border='0' alt='Contact us'>";
		}
	else
		document.write("<a href=\"" + subDir + "contacts/contacts.html\" onmouseover=\"display_active_images('contacts')\" onmouseout=\"display_inactive_images('contacts')\"><img name='contacts' src='" + subDir + "images/ph_contact.gif' width='88' height='33' border='0' alt='Contact Us'></a>");
		
	document.write("</td></tr>");
	document.write("<tr><td colspan='7'>" + secondRow + "</td></tr></table>");
	}

function preload_headers(subDir)
	{
	tree_active=new Image();
	search_active=new Image();
	people_active=new Image();
	researchers_active=new Image();
	us_active=new Image();
	contacts_active=new Image();
	origin_active=new Image();

	tree_inactive=new Image();
	search_inactive=new Image();
	people_inactive=new Image();
	researchers_inactive=new Image();
	us_inactive=new Image();
	contacts_inactive=new Image();
	origin_inactive=new Image();

	tree_active.src= subDir + "images/ph_tree_active.gif";
	search_active.src= subDir + "images/ph_search_active.gif";
	people_active.src= subDir + "images/ph_people_active.gif";
	researchers_active.src= subDir + "images/ph_researchers_active.gif";
	us_active.src= subDir + "images/ph_us_active.gif";
	contacts_active.src= subDir + "images/ph_contact_active.gif";
	origin_active.src= subDir + "images/ph_origin_active.gif";

	tree_inactive.src= subDir + "images/ph_tree.gif";
	search_inactive.src= subDir + "images/ph_search.gif";
	researchers_inactive.src= subDir + "images/ph_researchers.gif";
	people_inactive.src= subDir + "images/ph_people.gif";
	us_inactive.src= subDir + "images/ph_us.gif";
	contacts_inactive.src= subDir + "images/ph_contact.gif";
	origin_inactive.src= subDir + "images/ph_origin.gif";
}

function display_active_images(image_name)
	{
	if(document.images)
		document[image_name].src = eval(image_name + "_active.src");
	}

function display_inactive_images(image_name, subDir)
	{
	if(document.images)
		document[image_name].src = eval(image_name + "_inactive.src");
	}
function elim_border(x)
	{
    if (navigator.appName == 'Microsoft Internet Explorer')
        x.blur();
	}
