// Genealogy functions

/*******************************************************/

function showGeneLinks() 
{ 
	// Ribbon layout for genealogy sub-site links

	document.write("<table width=\"100%\" border=3 bgcolor=\"#f0f0a0\">");

	document.write("<tr>");
	document.write("<td align=center><font size=2><b>");
	document.write("GENE LINKS ...</b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/index.htm\" title=\"Introduction to my genealogy pages\">Intro</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/gedgen/fammain.htm\" title=\"List of surnames appearing in my family tree\">Surnames</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/gedgen/famname1.htm\" title=\"Index of all people in my family tree\">Name Index</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/sources/index.htm\" title=\"Research sources\">Sources</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/biogs/index.htm\" title=\"Family biographies\">Biographies</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/diagrams/genediag.htm\" title=\"Genealogical diagrams\">Diagrams</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\"http://www.cordery.org.uk/@php/weblinks.php4?type=cat&parm=Genealogy&sort=rank\" title=\"Useful links to genealogical internet sites\">Web Links</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"index.htm\" target=\"_top\" title=\"Back to my home page\">Home</a>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\"javascript: window.history.back()\" target=\"_top\" title=\"Back to previous page\">Back</a>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\"javascript: window.history.forward()\" target=\"_top\" title=\"Forward to next page\">Fwd</a>");
	document.write("</tr>");

	document.write("</table>");
}

/*******************************************************/

function showGeneSrcLinks() 
{ 
	// Ribbon layout for genealogy source links

	document.write("<table width=\"100%\" border=3 bgcolor=\"#ffffff\">");

	document.write("<tr>");
	document.write("<td align=center><font size=2><b>");
	document.write("SOURCES ...</b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/sources/index.htm\" title=\"Introduction to my sources\">Intro</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/sources/brthcert/index.htm\" title=\"Birth Certificates\">Birth Certs</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/sources/margcert/index.htm\" title=\"Marriage Certificates\">Marriage Certs</a></b></td>");
	document.write("<td align=center><font size=2><b>");
	document.write("<a href=\""+rootPath+"genealogy/sources/dethcert/index.htm\" title=\"Death Certificates\">Death Certs</a></b></td>");

	document.write("</table>");
}

/*******************************************************/

function do_birthcert (
  b_RefNum,
  b_Person,
  b_RegDis,
  b_SubDis,
  b_BirDat,
  b_BirPlc,
  b_Name,
  b_Sex,
  b_Father,
  b_Mother,
  b_FatOcc,
  b_Inform,
  b_RegDat
  )
{
  setRootPath("../../../");
  document.write("<title>Birth Certificate "+b_RefNum+" : "+b_Person+"</title>");
  document.write("<meta name=\"description\" content=\"Steve Cordery's Web Pages : Birth Certificate "+b_RefNum+" : "+b_Person+"\">");
  document.write("<link rel=stylesheet type=\"text/css\" href=\""+rootPath+"globcss.css\" title=\"Global CSS\">");
  document.write("</head>");

  document.write("<body>");
  showHead1();
  document.write("<center>");
  document.write("<br>");
  document.write("<p class=certhed>Birth Certificate "+b_RefNum+" : "+b_Person+"</p>");
  document.write("<p class=certsrc>Information transcribed from a certified copy of an entry of birth from the General Register Office.</p>");
  document.write("<table border=1>");
  document.write("<tr>");
  document.write("<td class=bcertcap>Registration District");
  document.write("<td class=bcertval>"+b_RegDis);
  document.write("<td width=40>");
  document.write("<td class=bcertcap>Sub District");
  document.write("<td class=bcertval>"+b_SubDis);
  document.write("</table>");

  document.write("<br>");
  document.write("<table border=1>");
  document.write("<tr>");
  document.write("<td class=bcertcap>Birth Date");
  document.write("<td class=bcertcap>Place of Birth");
  document.write("<td class=bcertcap>Name");
  document.write("<td class=bcertcap>Sex");
  document.write("<td class=bcertcap>Father");
  document.write("<td class=bcertcap>Mother");
  document.write("<td class=bcertcap>Father's Occupn.");
  document.write("<td class=bcertcap>Informant");
  document.write("<td class=bcertcap>Reg. Date");

  document.write("<tr>");
  document.write("<td class=bcertval>"+b_BirDat);
  document.write("<td class=bcertval>"+b_BirPlc);
  document.write("<td class=bcertval>"+b_Name);
  document.write("<td class=bcertval>"+b_Sex);
  document.write("<td class=bcertval>"+b_Father);
  document.write("<td class=bcertval>"+b_Mother);
  document.write("<td class=bcertval>"+b_FatOcc);
  document.write("<td class=bcertval>"+b_Inform);
  document.write("<td class=bcertval>"+b_RegDat);

  document.write("</table>");
  document.write("<br><br>");
  showGeneLinks();
  showGeneSrcLinks();
  showFoot1();

  document.write("</body>");

}
/*******************************************************/

function srcOwnBrth(
  b_DOB,
  b_BrthPlc,
  b_MyID
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+b_DOB);
	document.write("<td>Born at <b>"+b_BrthPlc+"</b>.");
	document.write("<br><a href=\"../../@php/brthcert.php4?myid="+b_MyID+"\" ");
	document.write("title=\"Birth certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");

}

/*******************************************************/

function srcOwnMarg(
  m_Date,
  m_Spouse,
  m_MargPlc,
  m_MargAge,
  m_MargCond,
  m_Prof,
  m_Resid,
  m_GroomID,
  m_BrideID,
  m_Note
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+m_Date);
	document.write("<td>Married <b>"+m_Spouse+"</b> at <b>"+m_MargPlc+"</b>.");
	document.write(" Age = <b>"+m_MargAge+"</b>;");
	document.write(" Condition = <b>"+m_MargCond+"</b>;");
	document.write("<br>");
	document.write(" Profession = <b>"+m_Prof+"</b>;");
	document.write(" Residence = <b>"+m_Resid+"</b>.");
    if (m_Note != null)
    {
		document.write(m_Note);
    }
	document.write("<br><a href=\"../../@php/margcert.php4?groom="+m_GroomID+"&bride="+m_BrideID+"\" ");
	document.write("title=\"Marriage certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");
}

/*******************************************************/

function srcOwnDeth(
  d_DOD,
  d_DethPlc,
  d_Age,
  d_Occ,
  d_MyID,
  d_Note
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+d_DOD);
	document.write("<td>Died at <b>"+d_DethPlc+"</b>.");
	document.write(" Age = <b>"+d_Age+"</b>;");
	document.write(" Occupation = <b>"+d_Occ+"</b>.");
    if (d_Note != null)
    {
		document.write(d_Note);
    }
	document.write("<br><a href=\"../../@php/dethcert.php4?myid="+d_MyID+"\" ");
	document.write("title=\"Death certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");

}

/*******************************************************/

function srcFathChldBrth(
  b_Date,
  b_Sex,
  b_Chld,
  b_BrthPlc,
  b_FathOcc,
  b_ChldID,
  b_Note
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+b_Date);
	document.write("<td>"+b_Sex+" <b>"+b_Chld+"</b> born at <b>"+b_BrthPlc+"</b>.");
	document.write("<br>Father's occupation = <b>"+b_FathOcc+"</b>.");
    if (b_Note != null)
    {
		document.write(b_Note);
    }
	document.write("<br><a href=\"../../@php/brthcert.php4?myid="+b_ChldID+"\" ");
	document.write("title=\"Birth certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");
}

/*******************************************************/

function srcMothChldBrth(
  b_Date,
  b_Sex,
  b_Chld,
  b_BrthPlc,
  b_MothName,
  b_ChldID,
  b_Note
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+b_Date);
	document.write("<td>"+b_Sex+" <b>"+b_Chld+"</b> born at <b>"+b_BrthPlc+"</b>.");
	document.write("<br>Mother's name = <b>"+b_MothName+"</b>.");
    if (b_Note != null)
    {
		document.write(b_Note);
    }
	document.write("<br><a href=\"../../@php/brthcert.php4?myid="+b_ChldID+"\" ");
	document.write("title=\"Birth certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");
}

/*******************************************************/

function srcFathChldMarg(
  m_Date,
  m_Sex,
  m_Chld,
  m_MargPlc,
  m_FathOcc,
  m_GroomID,
  m_BrideID,
  m_Note
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+m_Date);
	document.write("<td>"+m_Sex+" <b>"+m_Chld+"</b> married at <b>"+m_MargPlc+"</b>.");
	document.write("<br>Father's occupation = <b>"+m_FathOcc+"</b>.");
    if (m_Note != null)
    {
		document.write(m_Note);
    }
	document.write("<br><a href=\"../../@php/margcert.php4?groom="+m_GroomID+"&bride="+m_BrideID+"\" ");
	document.write("title=\"Marriage certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");
}

/*******************************************************/

function srcMargWitns(
  m_Date,
  m_Groom,
  m_Bride,
  m_Witness,
  m_GroomID,
  m_BrideID,
  m_Note
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+m_Date);
	document.write("<td>Witness at marriage of <b>"+m_Groom+"</b> and <b>"+m_Bride+"</b>.");
	document.write("<br>Witness's name is <b>"+m_Witness+"</b>.");
    if (m_Note != null)
    {
		document.write(m_Note);
    }
	document.write("<br><a href=\"../../@php/margcert.php4?groom="+m_GroomID+"&bride="+m_BrideID+"\" ");
	document.write("title=\"Marriage certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");
}

/*******************************************************/

function srcDethInf(
  d_Date,
  d_Decd,
  d_Informant,
  d_InfReside,
  d_MyID,
  d_Note
  )
{
	document.write("<tr>");
	document.write("<td valign=top align=right>"+d_Date);
	document.write("<td>Informant at death of <b>"+d_Decd+"</b>.");
	document.write("<br>Informant = <b>"+d_Informant+"</b>.");
	document.write("<br>Informant's residence = <b>"+d_InfReside+"</b>.");
    if (d_Note != null)
    {
		document.write(d_Note);
    }
	document.write("<br><a href=\"../../@php/dethcert.php4?myid="+d_MyID+"\" ");
	document.write("title=\"Death certificate\" target=\"_blank\">");
	document.write("Click for source.</a>");
}

/*******************************************************/
function srcCens(
  c_Year,
  c_Locn,
  c_Status,
  c_Age,
  c_Occ,
  c_Born,
  c_HhldID,
  c_Note
  )
{
	var censDate;
	switch (c_Year)
	{
	case '1841': censDate="6 Jun 1841"; break;
	case '1851': censDate="30 Mar 1851"; break;
	case '1861': censDate="7 Apr 1861"; break;
	case '1871': censDate="2 Apr 1871"; break;
	case '1881': censDate="3 Apr 1881"; break;
	case '1891': censDate="5 Apr 1891"; break;
	case '1901': censDate="31 Mar 1901"; break;
	default: censDate=c_Year; break;
	}
	document.write("<tr>");
	document.write("<td valign=top align=right>"+censDate);
	document.write("<td>Appears in <b>"+c_Year+"</b> census at ");
	document.write("<b>"+c_Locn+"</b>.");
	document.write("<br>Status = <b>"+c_Status+"</b>;");
	document.write(" Age = <b>"+c_Age+"</b>;");
	document.write(" Occupation = <b>"+c_Occ+"</b>;");
	document.write("<br>Born = <b>"+c_Born+"</b>.");
    if (c_Note != null)
    {
		document.write(c_Note);
    }
	document.write("<br><a href=\"../../@php/censhhld.php4?hhldid="+c_HhldID+"\" ");
	document.write("title=\"Census Entry\" target=\"_blank\">");
	document.write("Click for source.</a>");
}

/*******************************************************/