var people = new Array(); 

// The parameters are the name, email, (@) ending, and title
  makePerson("Aibell", "ladyaibell", "yahoo.com", "Lady Aibell ingen Dairmata");
  makePerson("Aimeric", "clarahan66", "yahoo.com", "Lord Aimeric de Miraval");
  makePerson("Aine", "joannemcg1", "verizon.net", "Lady Aine ingen ui Aeongus");
  makePerson("Alicia", "hutchnsn", "bucknell.edu", "Mistress Alicia Langland");
  makePerson("Andreas", "acholin", "comcast.net", "Lord Andreas J&auml;ger von Holstein");
  makePerson("Ariel", "arielphf", "yahoo.com", "Lady Ariel of Grenwich");
  makePerson("Briawg", "bcoyne810", "gmail.com", "Briawg ap Ithel ap Maelgwn");
  makePerson("Briog", "bcoyne810", "gmail.com", "Briog McClerie");
  makePerson("Bronwyn", "hedgehog", "ptd.net", "Dame Bronwyn MacFhionghuin");
  makePerson("Byrghitta", "happypolishlady", "yahoo.com", "Lady Byrghida Zajacowa");
  people["Bryghitta"] = people["Byrgitta"] = people["Byrghida"] = people["Byrghitta"];
  makePerson("Cameron", "elenawest2", "gmail.com", "Dame Cameron Fitzroy");
  makePerson("Conrad", "conradkienast", "yahoo.com", "Lord Conrad Kienast");
  makePerson("Denys", "dgreenaw", "kcnet.org", "Master Denys the Decadent");
  makePerson("Egill" , "gyronny8", "gmail.com", "Master Egill the Dane");
  makePerson("Etain", "etain1263", "aol.com", "Lady Etain ingen Ruaidri");
  makePerson("Elyse", "ACGchatelaine", "hotmail.com", "Lady Elyse la Bref");
  makePerson("Geraine", "geraine8", "verizon.net", "Lady Geraine Morys");
  makePerson("Gilchrist", "pictishsmith", "gmail.com", "Lord Gilchrist MacNaughton");
  makePerson("Gille", "whutchis", "gmail.com", "Master Gille MacDhonuill");
  makePerson("Gilles", "herald", "micro-link.net", "Ma&icirc;tre Gilles de Beauchamps");
  makePerson("Gwendolyn", "unknown", "unknown", "Lady Gwendolyn Blackthorne MacGriogair");
  makePerson("Havoc", "havocthewild", "hotmail.com", "THL Havoc The Wild");
  makePerson("Lara", "riverstonehouse", "yahoo.com", "Catalina");
  makePerson("Leioolfr", "leioolfr", "gmail.com", "Lord Leioolfr Grimr");
people["Leithoolfr"] = people["Leioolfr"];
  makePerson("Livia", "livia.orknot", "gmail.com", "Lady Livia Valentini");
  makePerson("Mairin", "butterfly164_2002", "yahoo.com", "Lady M&aacute;ir&iacute;n O'Cadhla");
  makePerson("Phiala", "sarah.goslee", "gmail.com", "Mistress Phiala O'Ceallaigh");
  makePerson("Phyllida", "wladyslaus", "hotmail.com", "Lady Phyllida Longacre");
  makePerson("Rhenna", "rhenna1", "windstream.net", "THL Rhenna An tEilean Dubh");
  makePerson("Richard", "axthrowr", "ptd.net", "Lord Richard de Derby");
  makePerson("Rowan", "romanc", "windstream.net", "Lady Rowan l'Crotha");
  makePerson("Spence", "spencecolby", "@micro-link.net", "Master Spence Colby");
  makePerson("Thorsten", "MasterThorsten", "gmail.com", "Master Thorsten Christiansen");
  makePerson("Thorvaldr", "nick_hyle", "yahoo.com", "THL Thorvaldr Frithsamr");
  makePerson("Timothy", "ttaylor", "newparadigmcontrols.com", "Duke Sir Timothy of Arindale");
  makePerson("Wlad", "wladyslaus", "hotmail.com", "Lord Wladyslaw Poznanski");

// Maps jobs to people
  makeJob("Webminister", "Aibell");
  makeJob("Medieval Studies", "Aimeric");
  makeJob("Dance Practice", "Alicia");
  makeJob("Calligraphy", "Alicia");
  makeJob("Chronicler", "Ariel");
  makeJob("Chamberlain", "Bronwyn");
  makeJob("Sewing Guild", "Cameron");
  makeJob("Exchequer", "Conrad");
  makeJob("Herald", "Egill");
  makeJob("Hospitaler", "Elyse");
  makeJob("Seneschal", "Geraine");
  makeJob("Archery", "Gille");
  makeJob("Cooks Guild", "Gille");
  makeJob("Brewers Guild", "Gille" );
  makeJob("Cave Canem", "Gilles");
  makeJob("MoL", "Leioolfr");
  makeJob("Chancellor Minor", "Mairin");
  makeJob("MoAS", "Rhenna");
  makeJob("Thrown Weapons", "Richard");
  makeJob("Knights Marshall", "Timothy");

function makeBanner() {
  document.write("<CENTER><TABLE width=740>");

  // shire device
  document.write("<TR>");
  document.write("<TD VALIGN=MIDDLE><IMG SRC='Elements/VSmallOakleaf.gif'</TD>");
  document.write("<TD VALIGN=MIDDLE><IMG SRC='Elements/ACGDevice1vs.gif'></TD>");

  // links
  document.write("<TD VALIGN=MIDDLE><CENTER><TABLE width=100%>");

  // links row 1
  document.write("<TR>");
  makeLink("index.html", "Home");
  makeLink("officers.html", "Officers");
  makeLink("calendar.html", "Calendar");
  makeLink("activities.html", "Activities");
  makeLink("maps.html", "Maps");

  // links row 3
  document.write("</TR><TR>"); 
  makeLink("photos/", "Photos");
  makeLink("events.html", "Events");
  makeLink("newcomers.html", "Newcomers");
  makeLink("articles.html", "Articles");
  makeLink("links.html", "Links");

  document.write("</TR></TABLE></CENTER></TD>");

  // Shire name
  document.write("<TD VALIGN=MIDDLE><I><B><CENTER>");
  document.write("Shire of<BR><BIG><BIG>Abhainn<BR>Ciach<BR>Ghlais</TD>");
  document.write("<TD VALIGN=MIDDLE><IMG SRC='Elements/VSmallOakleaf.gif'>");
  document.write("</TD></TR></TABLE></CENTER>");
}

function makeLink(location, name) {
  document.write("<TD  align=center><I>");
  document.write("<A HREF='http://www.eg.bucknell.edu/~acg/");
  document.write(location);
  document.write("' target='_top'>");
  document.write(name);
  document.write("</A>");
}

function makeHeader() {
  document.write("<CENTER>");
  document.write("<IMG SRC='Elements/ivy1hozdl.gif' width=375>");
  document.write("<IMG SRC='Elements/ivy1hozdr.gif' width=375>");
  document.write("</CENTER>");
}

function makeFooter() {
  document.write("<CENTER><P>");
  document.write("<IMG SRC='Elements/ivy1hozul.gif' ALIGN=BOTTOM width=375>");
  document.write("<IMG SRC='Elements/ivy1hozur.gif' ALIGN=BOTTOM width=375>");

  document.write("<P>   <!-- Site Meter -->");
  document.write("<script type='text/javascript'"); 
  document.write("src='http://s34.sitemeter.com/js/counter.js?site=s34scaacg'>");
  document.write("</script>");
  document.write("<noscript>");
  document.write("<a href='http://s34.sitemeter.com/stats.asp?site=s34scaacg'"); 
  document.write("target='_top'>");
  document.write("<img src='http://s34.sitemeter.com/meter.asp?site=s34scaacg'"); 
  document.write("alt='Site Meter' border='0'/></a>");
  document.write("</noscript>");
  document.write("   <!-- Copyright (c)2006 Site Meter -->");
  document.write("</CENTER>");
}

// Used by photos
function makeLinks(x) {
  document.write("<CENTER><TABLE cellspacing=10><TR>");
  makeLink("index.html", "Home");
  makeLink("officers.html", "Officers");
  makeLink("calendar.html", "Calendar");
  makeLink("activities.html", "Activities");
  makeLink("maps.html", "Maps");
  makeLink("photos/", "Photos");
  makeLink("events.html", "Events");
  makeLink("newcomers.html", "Newcomers");
  makeLink("articles.html", "Articles");
  makeLink("links.html", "Links");
  document.write("</TR></TABLE></CENTER>");
}

/* The header table on the maps pages. These are split into several 
 * actual pages because google will not let me load more than 3 maps 
 * on a page.
 */
function makeMapsTable() {
  document.write("<TABLE><TR><TD><UL>");
  document.write("<LI><A HREF='maps.html#Holstein'>von Holstein Estate</A>");
  document.write("<LI><A HREF='maps.html#Aibell'>Caer Aibell</A>");
  document.write("<LI><A HREF='maps.html#Church'>Trinity Lutheran Church</A>");

  document.write("</UL></TD><TD><UL>");
  document.write("<LI><A HREF='maps2.html#Hop'>Hop Haven</A>");
  document.write("<LI><A HREF='maps2.html#McGinnis'>McGinnis Range</A>");
  document.write("<LI><A HREF='maps2.html#Rhenna'>Gilles and Rhenna</A>");

  document.write("</UL></TD><TD><UL>");
  document.write("<LI><A HREF='maps3.html#Decadence'>Denys the Decadent</A>");
  document.write("<LI><A HREF='maps3.html#Wlad'>Wlad and Phyllida</A>");
  document.write("<LI><A HREF='maps3.html#Axes'>Axes and Archery</A>");
  document.write("</UL></TD></TR></TABLE>");
}

function makeJob(job, person) {
  people[job] = people[person];
}

function makePerson(person, email, at, title) {
  people[person] = new Array(email, at, title);
}

function showMail(name) {
  // var x = people.findIndex(name);
  // var y = people.length;
  //var z = people.indexOf("ladyaibell"); always -1??
  var found = false;
  for (i in people) {
    if (name == i) found = true;
  }
  
  if (found) {
  makeMail(name);
  document.write(" ("); 
  document.write(people[name][0]); at();
  document.write(people[name][1]);
  document.write(")");
  }

  else {
    document.write("Name unknown??");
  }
}

function makeMail(name) {
  begin();
  document.write(people[name][0]); at();
  document.write(people[name][1]); after();    
  document.write(people[name][2]);
  end();
}

function begin() { document.write("<a href='mailto:"); }
function at()    { document.write("@"); }
function after() { document.write("'>"); }
function end() { document.write("</A>"); }


