
var site="Sullivan, Parks, Wheeler, &amp; Hawkins";
var who="Larr" + "y Sull" + "ivan";
var xtop="index.htm";
var emme="mailt" + "o:larrysgene" + "s@yaho" + "o.com";
var xxx=0;
var myDate=new Date();

function toggle( id )
{
	var el = document.getElementById( id );
	if ( el.style.display != 'none' )
		el.style.display = 'none';
	else
		el.style.display = '';
}

function dq( txt )
{
	return '"' + txt + '"' ;
}

function attr( a, v )
{
// space + attr + equal + dblquote + value + dblquote
document.write( ' ' + a + '=' + dq(v) );
}

function openTag( tag, cls ) // do not nest!!!
{
document.write( '<' + tag );
if( cls ) attr( 'class', cls );
}

function closeTag(tag, text)
{
document.write( '>' + text + '<\/' + tag + '> ' );
}

function top()
{
openTag( 'div', 'mypage' );
attr( 'style', 'font-style:italic' );
closeTag( 'div', site );
}

function txteml( t )
{
document.write( t.link( emme ) ) ;
}

function footer()
{
document.write( '<div style="text-align:center; border-top: 3px solid lime; margin: .5em 0 5em;padding-top: .5em;clear:both;">' );
document.write( '<a href="term_1.html" onclick="alert(\'No part of this material may be reproduced ' );
document.write( 'or utilized in any form or by any means, electronic or mechanical, including photocopying, ' );
document.write( 'recording, or by any information storage or retrieval system, ' );
document.write( 'without permission in writing from the Author.\'); return false">Copyright &copy; 2000' );
document.write( '-' + myDate.getFullYear() + '<\/a>, ' );
document.write( who.link( emme ) ) ;
document.write( ' all rights reserved.'.italics() );
document.write( '<\/div>' );
}

function copyright()
{
document.write( "&copy; 2000-9, " + who );
}

function dotted_path(up, path)
{
var dots="";
for(i=0;i<up;++i) dots += "../";
return dots + path;
}

function href( up, path )
{
attr( 'href', dotted_path( up, path ) );
}

function home( up )		// <button href="%up%index.htm">%site%</button>
{
document.write( site.link( dotted_path( up, 'index.htm' ) ) ) ;
}

function nav( up, path )	// <button href=%up%%path% class="nav"
{
openTag( 'button', 'nav' );
document.write( " onclick='location=" + dq( dotted_path( up, path ) ) + "'" );
}

function nav_link( up, path, title, text )			// <button> title="%title%" >%text%</button>
{
nav( up, path );
attr( 'title', title );
closeTag( 'button', text );
document.write('\n');
}

function nav_email()		// <button href=". . ." title="email %who%" >Email me</button>
{
nav( 0, emme );
attr( "title", "e-mail " + who );
closeTag( "button", "Email me" );
}

function nav_home(up)  {nav_link( up, xtop,          site,                        "Home");}
function nav_bios(up)  {nav_link( up, "Bio/"+xtop,   "Biographical sketches",     "Bios" );}
function nav_wills(up) {nav_link( up, "Will/"+xtop,  "Will transcriptions",       "Wills" );}
function nav_obits(up) {nav_link( up, "obits/"+xtop, "Obituary transcriptions",   "Obits" );}
function nav_tombs(up) {nav_link( up, "tombs/"+xtop, "Gravestone photos",         "Graves" );}
function nav_links(up) {nav_link( up, "links.htm",   "Favorite genealogy links",  "Links");}

function nav_bar( up, txt )
{
if( txt != "Home" )   nav_home( up );
if( txt != "Bios" )   nav_bios( up );
if( txt != "Wills" )  nav_wills( up );
if( txt != "Graves" )  nav_tombs( up );
if( txt != "Links" )  nav_links( up );
nav_email(); 
}

function endhref(text)		// obsolete, use closeTag( "a", text )
{
document.write( '>' + text + '<\/button> ' );
}

function nav_top( text ){}		// obsolete
function nav_here( text ){}		// obsolete

function link_bar(up) {		// obsolete, use nav_bar( up, txt )
nav_home(up);
nav_bios(up);
nav_wills(up);
nav_tombs(up);
nav_links(up);
nav_email(); 
}
