var agent = navigator.userAgent.toLowerCase();
if ((agent.indexOf('mozilla') != -1) && (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera') == -1) && (agent.indexOf('webtv') == -1) && (agent.indexOf('hotjava') == -1)) {
 var is_nav = 1;
}
if ((agent.indexOf("msie") != -1) && (agent.indexOf("opera") == -1)) {
  var is_ie = 1;
}

var months   = new Array()
  months[0]  = ""
  months[1]  = "January"
  months[2]  = "February"
  months[3]  = "March"
  months[4]  = "April"
  months[5]  = "May"
  months[6]  = "June"
  months[7]  = "July"
  months[8]  = "August"
  months[9]  = "September"
  months[10]  = "October"
  months[11] = "November"
  months[12] = "December"

var bday = new Array()
  bday[0] = "Kelsey Lynn Griffin"
  bday[1] = "Beth Marie Courtright"
  bday[2] = "Albert Maywood Courtright II"
  bday[3] = "Cynthia Delle Berry"
  bday[4] = "Linda Lee Bonnett"
  bday[5] = "Jonathon Shannon Warner"
  bday[6] = "Shari Lyn Warner"
  bday[7] = "Kylee Lynn Carpenter"
  bday[8] = "John Earl Courtright"
  bday[9] = "Hendrick Jansen Van Beest"
  bday[10] = "Sandra Kay Lynn"
  bday[11] = "John Johannes Courtright"
  bday[12] = "Priscilla Delle Warner"
  bday[13] = "Christine Adelle Courtright"
  bday[14] = "Terry Robert Courtright"
  bday[15] = "Grace Elizabeth Courtright"
  bday[16] = "Julie Lynn Surface"
  bday[17] = "Robert William Bonnett"
  bday[18] = "David Brooks Warner"
  bday[19] = "Jeffrey Shannon Warner"
  bday[20] = "Alan Maywood Courtright"
  bday[21] = "Robert Allen Bonnett"
  bday[22] = "David Scott Warner"
  bday[23] = "Marshall Franklin Berry"
  bday[24] = "Jessica Lee Goodin"
  bday[25] = "Mitchel Alan Courtright"
  bday[26] = "Spring Courtright"
  bday[27] = "Andrea Marie Courtright"
  bday[28] = "Abigail Joanna Spangler"
  bday[29] = "Ross Westerman Courtright"
  bday[30] = "Yolande Irene Courtright"
  bday[31] = "John Brooks Courtright"
  bday[32] = "Constance Marie Courtright"
  bday[33] = "Jeffry Brooks Courtright"
  bday[34] = "Abraham Van Kampen Courtright"
  bday[35] = "Jessica Lindsay Bonnett"
  bday[36] = "Sarah Marie Warner"
  bday[37] = "Stephanie Elaine Warner"
  bday[38] = "Raymond Douglas Courtright"
  bday[39] = "Deborah Ann Lynn"
  bday[40] = "Margaret Helen Berry"
  bday[41] = "Johannes Corneliussen Cortregt"
  bday[42] = "John Ezra Courtright"
  bday[43] = "James Whitney Berry"
  bday[44] = "Joanne Eleanor Courtright"
  bday[45] = "Connor Courtright Pennington"
  bday[46] = "Steven Brooks Courtright"
  bday[47] = "Evalyn Ruth Courtright"
  bday[48] = "Jessica Sue Warner"
  bday[49] = "Robert Carl Courtright"
  bday[50] = "Rosemary Grembla"
  bday[51] = "Thomas August Courtright"
  bday[52] = "Hiram Brooks Courtright"
  bday[53] = "Jasmine Bleux LaValley"
  bday[54] = "Ryan Alexander Courtright"
  bday[55] = "Frank Patrick Courtright"
  bday[56] = "Jacob Ryan Bonnett"
  bday[57] = "Cornelius Hendricksen Cortright"
  bday[58] = "Florence Irene Courtright"
  bday[59] = "Brooks Westerman Courtright"
  bday[60] = "Chad Murdoch Courtright"
  bday[61] = "Jackson Blake Spangler"
  bday[62] = "Gina Grace Suleski"
  bday[63] = "Albert Maywood Courtright"
  bday[64] = "Barrett Warren Hall"
  bday[65] = "Jan Albert Courtright"
  bday[66] = "Cassandra Anne Pennington"
  bday[67] = "Claris Bashore Courtright"
  bday[68] = "Lindsey Brooke Carpenter"
  bday[69] = "Chelsea Nicolle LaValley"
  bday[70] = "David Benjamin Warner"
  bday[71] = "Constance Louise Willard"
  bday[72] = "Kathy Lynn Courtright"
  bday[73] = "Valerie Marie Courtright"
  bday[74] = "John Jacob Courtright"
  bday[75] = "Theodore Eugene Courtright"
  bday[76] = "Lainey Grace Daunhauer"
  bday[77] = "Germaine Yvonnette Côté"

  var bdate = new Array()
  bdate[0] = "03 1 1978"
  bdate[1] = "04 1 1960"
  bdate[2] = "17 1 1898"
  bdate[3] = "31 1 1953"
  bdate[4] = "01 2 1963"
  bdate[5] = "03 2 1988"
  bdate[6] = "04 2 1966"
  bdate[7] = "06 2 1985"
  bdate[8] = "09 2 1906"
  bdate[9] = "12 2 1648"
  bdate[10] = "12 2 1951"
  bdate[11] = "26 2 1779"
  bdate[12] = "03 3 1929"
  bdate[13] = "12 3 1980"
  bdate[14] = "16 3 1946"
  bdate[15] = "17 3 1926"
  bdate[16] = "20 4 1981"
  bdate[17] = "25 4 1983"
  bdate[18] = "30 4 1934"
  bdate[19] = "04 5 1959"
  bdate[20] = "08 5 1932"
  bdate[21] = "13 5 1953"
  bdate[22] = "19 5 1961"
  bdate[23] = "19 5 1994"
  bdate[24] = "20 5 1980"
  bdate[25] = "24 5 1962"
  bdate[26] = "26 5 1976"
  bdate[27] = "29 5 1987"
  bdate[28] = "29 5 1998"
  bdate[29] = "01 6 1992"
  bdate[30] = "13 6 1928"
  bdate[31] = "16 6 1931"
  bdate[32] = "21 6 1930"
  bdate[33] = "06 7 1963"
  bdate[34] = "08 7 1748"
  bdate[35] = "11 7 1990"
  bdate[36] = "20 7 1990"
  bdate[37] = "20 7 1990"
  bdate[38] = "02 8 1899"
  bdate[39] = "11 8 1954"
  bdate[40] = "14 8 1997"
  bdate[41] = "15 8 1714"
  bdate[42] = "16 8 1837"
  bdate[43] = "25 8 1958"
  bdate[44] = "29 8 1932"
  bdate[45] = "03 9 1993"
  bdate[46] = "12 9 1958"
  bdate[47] = "15 9 1901"
  bdate[48] = "24 9 1991"
  bdate[49] = "28 9 1934"
  bdate[50] = "02 10 1946"
  bdate[51] = "07 10 1977"
  bdate[52] = "08 10 1903"
  bdate[53] = "21 10 1991"
  bdate[54] = "23 10 1989"
  bdate[55] = "30 10 1960"
  bdate[56] = "30 10 1987"
  bdate[57] = "03 11 1680"
  bdate[58] = "04 11 1907"
  bdate[59] = "10 11 1988"
  bdate[60] = "12 11 1965"
  bdate[61] = "14 11 2002"
  bdate[62] = "15 11 2001"
  bdate[63] = "20 11 1871"
  bdate[64] = "20 11 2002"
  bdate[65] = "22 11 1941"
  bdate[66] = "27 11 1991"
  bdate[67] = "01 12 1910"
  bdate[68] = "11 12 1980"
  bdate[69] = "13 12 1993"
  bdate[70] = "17 12 1992"
  bdate[71] = "21 12 1957"
  bdate[72] = "24 12 1942"
  bdate[73] = "26 12 1964"
  bdate[74] = "? 0 1815"
  bdate[75] = "? 0 1869"
  bdate[76] = "05 4 2007"
  bdate[77] = "14 2 1900"

  var alive = new Array()
  // 1=living, 0=deceased
  alive[0] = 1
  alive[1] = 1
  alive[2] = 0
  alive[3] = 1
  alive[4] = 1
  alive[5] = 1
  alive[6] = 1
  alive[7] = 1
  alive[8] = 0
  alive[9] = 0
  alive[10] = 1
  alive[11] = 0
  alive[12] = 1
  alive[13] = 1
  alive[14] = 1
  alive[15] = 1
  alive[16] = 1
  alive[17] = 1
  alive[18] = 1
  alive[19] = 1
  alive[20] = 0
  alive[21] = 1
  alive[22] = 1
  alive[23] = 1
  alive[24] = 1
  alive[25] = 1
  alive[26] = 1
  alive[27] = 1
  alive[28] = 1
  alive[29] = 1
  alive[30] = 1
  alive[31] = 1
  alive[32] = 1
  alive[33] = 1
  alive[34] = 0
  alive[35] = 1
  alive[36] = 1
  alive[37] = 1
  alive[38] = 0
  alive[39] = 1
  alive[40] = 1
  alive[41] = 0
  alive[42] = 0
  alive[43] = 1
  alive[44] = 1
  alive[45] = 1
  alive[46] = 1
  alive[47] = 0
  alive[48] = 1
  alive[49] = 1
  alive[50] = 1
  alive[51] = 1
  alive[52] = 0
  alive[53] = 1
  alive[54] = 1
  alive[55] = 1
  alive[56] = 1
  alive[57] = 0
  alive[58] = 0
  alive[59] = 1
  alive[60] = 1
  alive[61] = 1
  alive[62] = 1
  alive[63] = 0
  alive[64] = 1
  alive[65] = 0
  alive[66] = 1
  alive[67] = 0
  alive[68] = 1
  alive[69] = 1
  alive[70] = 1
  alive[71] = 1
  alive[72] = 0
  alive[73] = 1
  alive[74] = 0
  alive[75] = 0
  alive[76] = 1
  alive[76] = 0

  var portrait = new Array()
  // 1=yes, 0=no
  portrait[0] = 0
  portrait[1] = 0
  portrait[2] = 0
  portrait[3] = 0
  portrait[4] = 0
  portrait[5] = 0
  portrait[6] = 0
  portrait[7] = 0
  portrait[8] = 0
  portrait[9] = 0
  portrait[10] = 0
  portrait[11] = 0
  portrait[12] = 0
  portrait[13] = 0
  portrait[14] = 0
  portrait[15] = 0
  portrait[16] = 0
  portrait[17] = 0
  portrait[18] = 0
  portrait[19] = 0
  portrait[20] = 1
  portrait[21] = 0
  portrait[22] = 0
  portrait[23] = 0
  portrait[24] = 0
  portrait[25] = 1
  portrait[26] = 1
  portrait[27] = 1
  portrait[28] = 0
  portrait[29] = 1
  portrait[30] = 0
  portrait[31] = 0
  portrait[32] = 0
  portrait[33] = 0
  portrait[34] = 0
  portrait[35] = 0
  portrait[36] = 0
  portrait[37] = 0
  portrait[38] = 0
  portrait[39] = 0
  portrait[40] = 0
  portrait[41] = 0
  portrait[42] = 0
  portrait[43] = 0
  portrait[44] = 0
  portrait[45] = 0
  portrait[46] = 1
  portrait[47] = 0
  portrait[48] = 0
  portrait[49] = 0
  portrait[50] = 0
  portrait[51] = 0
  portrait[52] = 0
  portrait[53] = 0
  portrait[54] = 0
  portrait[55] = 0
  portrait[56] = 0
  portrait[57] = 0
  portrait[58] = 0
  portrait[59] = 1
  portrait[60] = 0
  portrait[61] = 0
  portrait[62] = 0
  portrait[63] = 0
  portrait[64] = 0
  portrait[65] = 0
  portrait[66] = 0
  portrait[67] = 0
  portrait[68] = 0
  portrait[69] = 0
  portrait[70] = 0
  portrait[71] = 0
  portrait[72] = 0
  portrait[73] = 0
  portrait[74] = 0
  portrait[75] = 0
  portrait[76] = 0
  portrait[77] = 0

  var bdayemail = new Array()
  bdayemail[0] = ""
  bdayemail[1] = ""
  bdayemail[2] = ""
  bdayemail[3] = ""
  bdayemail[4] = ""
  bdayemail[5] = ""
  bdayemail[6] = ""
  bdayemail[7] = ""
  bdayemail[8] = ""
  bdayemail[9] = ""
  bdayemail[10] = ""
  bdayemail[11] = ""
  bdayemail[12] = ""
  bdayemail[13] = ""
  bdayemail[14] = "tcxtwo@aol.com"
  bdayemail[15] = ""
  bdayemail[16] = ""
  bdayemail[17] = ""
  bdayemail[18] = ""
  bdayemail[19] = ""
  bdayemail[20] = ""
  bdayemail[21] = "bonnettfab5@comcast.net"
  bdayemail[22] = "dbwarner1@juno.com"
  bdayemail[23] = ""
  bdayemail[24] = ""
  bdayemail[25] = ""
  bdayemail[26] = "spring@courtright.info"
  bdayemail[27] = ""
  bdayemail[28] = ""
  bdayemail[29] = ""
  bdayemail[30] = ""
  bdayemail[31] = "jbcandcrc@prodigy.net"
  bdayemail[32] = ""
  bdayemail[33] = "jeff@courtright.info"
  bdayemail[34] = ""
  bdayemail[35] = ""
  bdayemail[36] = ""
  bdayemail[37] = ""
  bdayemail[38] = ""
  bdayemail[39] = ""
  bdayemail[40] = "jobob@aol.com"
  bdayemail[41] = ""
  bdayemail[42] = ""
  bdayemail[43] = ""
  bdayemail[44] = ""
  bdayemail[45] = ""
  bdayemail[46] = "stbc@aol.com"
  bdayemail[47] = ""
  bdayemail[48] = ""
  bdayemail[49] = "rcc2@gte.net"
  bdayemail[50] = ""
  bdayemail[51] = ""
  bdayemail[52] = ""
  bdayemail[53] = ""
  bdayemail[54] = ""
  bdayemail[55] = ""
  bdayemail[56] = ""
  bdayemail[57] = "mitch@courtright.info"
  bdayemail[58] = ""
  bdayemail[59] = ""
  bdayemail[60] = "chad@courtright.info"
  bdayemail[61] = ""
  bdayemail[62] = ""
  bdayemail[63] = ""
  bdayemail[64] = ""
  bdayemail[65] = ""
  bdayemail[66] = ""
  bdayemail[67] = ""
  bdayemail[68] = ""
  bdayemail[69] = ""
  bdayemail[70] = ""
  bdayemail[71] = ""
  bdayemail[72] = ""
  bdayemail[73] = "vcourtright@yahoo.com"
  bdayemail[74] = ""
  bdayemail[75] = ""
  bdayemail[76] = ""
  bdayemail[77] = ""

function menuElementDef() {
  var menuH = document.body.clientHeight;
  var menuW = 273;
  if (is_nav) menuW = 268;
  var menuHoffset = 306;
  if (is_nav) menuHoffset = 312;
  document.getElementById('menu').style.height = menuH - menuHoffset;
  document.getElementById('menu').style.width = menuW;
}

function pageElementDef(){
  var pageH = document.body.clientHeight;
  var pageW = document.body.clientWidth;

  var pageHoffset = 233;
  var pageWoffset = 273;
  document.getElementById('page').style.height = pageH - pageHoffset;
  document.getElementById('page').style.width = pageW - pageWoffset;
  if (is_nav) {
    pageHoffset = 241;
    pageWoffset = 293;
    document.getElementById('page').style.height = pageH - pageHoffset;
    document.getElementById('page').style.width = pageW - pageWoffset;
  }
}

function footerElementDef() {
  document.getElementById('footer').style.position = "absolute";
  document.getElementById('footer').style.top = document.body.clientHeight - 93;
  document.getElementById('footer').style.left = 0;
  document.getElementById('footer').style.width = document.body.clientWidth;
}

function adfooterElementDef() {
  document.getElementById('adfooter').style.position = "absolute";
  document.getElementById('adfooter').style.top = document.body.clientHeight - 60;
  document.getElementById('adfooter').style.left = 0;
  document.getElementById('adfooter').style.width = document.body.clientWidth;
}

// =======================================================================================================================================================================
// The script call in the HTML file should look like this
//   <script language="javascript">email('address','domain','subject')</script>
// The script needs to have the following line in the header of the HTML file
//   <script language="javascript" type="text/javascript" src="js/email.js"></script>
// The subject is optional and can be left blank
function email(a,b,c,d,e) {
  var addr = a;  // address
  var host = b;  // host
  var tld  = c;  // domain
  var subj = d;  // subject
  var text = e;  // link text
  if (d == '') {
    subj = "";
  } else {
    subj = "?subject=" + d;
  }
  document.write("<a href=\"mailto:" + addr + "@" + host + "." + tld + subj + "\">" + text + "</a>");
}

// =======================================================================================================================================================================


function getBday() {
  var titleArray = document.title.split(': ');
  var val = titleArray[0];
  var loc = 0;
  for (var i=0; i<bday.length; i++) {
    if (val == bday[i]) {
      loc = i;
      break;
    }
  }
  var bd = bdate[loc];
  var bdA = "";
  bdA = bd.split(' ');
  document.write(bdA[0]+" "+months[bdA[1]]+" "+bdA[2]);
}

function showSelf() {
  var titleArray = document.title.split(': ');
  var name = titleArray[0];
  var nameArray = titleArray[0].split(' ');
  var loc = 0;
  for (var i=0; i<bday.length; i++) {
    if (name == bday[i]) {
      loc = i;
      break;
    }
  }
  var hasPortrait = portrait[loc];
  if (hasPortrait) {
    var selfDivWidth = 0;
    var imgName = name.toLowerCase();
        imgName = imgName.replace(/ /g,"");
        imgName = "c_"+imgName+".png";
    selfDiv = document.getElementById("self1111");
    selfDivWidth = document.body.clientWidth - (document.body.clientWidth * .832);
    if (nameArray.length == 2) {
      document.write(nameArray[0]+"<br>"+nameArray[1]+"<div class=\"selfimage\" id=\"selfimage\"><img src=\"images/"+imgName+"\" width=\""+selfDivWidth+"\" height=\""+selfDivWidth+"\"></div>");
    } else if (nameArray.length == 3) {
      document.write(nameArray[0]+" "+nameArray[1]+"<br>"+nameArray[2]+"<div class=\"selfimage\" id=\"selfimage\"><img src=\"images/"+imgName+"\" width=\""+selfDivWidth+"\" height=\""+selfDivWidth+"\"></div>");
    } else if (nameArray.length == 4) {
      if (nameArray[2] == "van" || nameArray[2] == "Van") {
        document.write(nameArray[0]+" "+nameArray[1]+"<br>"+nameArray[2]+" "+nameArray[3]+"<div class=\"selfimage\" id=\"selfimage\"><img src=\"images/"+imgName+"\" width=\""+selfDivWidth+"\" height=\""+selfDivWidth+"\"></div>");
      } else if (nameArray[3] == "II" || nameArray[3] == "III" || nameArray[3] == "IV") {
        document.write(nameArray[0]+" "+nameArray[1]+"<br>"+nameArray[2]+"<div class=\"selfimage\" id=\"selfimage\"><img src=\"images/"+imgName+"\" width=\""+selfDivWidth+"\" height=\""+selfDivWidth+"\"></div>");
      } else {
        document.write(nameArray[0]+" "+nameArray[1]+" "+nameArray[2]+"<br>"+nameArray[3]+"<div class=\"selfimage\" id=\"selfimage\"><img src=\"images/"+imgName+"\" width=\""+selfDivWidth+"\" height=\""+selfDivWidth+"\"></div>");
      }
    }
  } else {
    document.getElementById("toggleSelfImage").style.display = 'none';
    if (nameArray.length == 2) {
      document.write(nameArray[0]+"<br>"+nameArray[1]);
    } else if (nameArray.length == 3) {
      document.write(nameArray[0]+" "+nameArray[1]+"<br>"+nameArray[2]);
    } else if (nameArray.length == 4) {
      if (nameArray[2] == "van" || nameArray[2] == "Van") {
        document.write(nameArray[0]+" "+nameArray[1]+"<br>"+nameArray[2]+" "+nameArray[3]);
      } else if (nameArray[3] == "II" || nameArray[3] == "III" || nameArray[3] == "IV") {
        document.write(nameArray[0]+" "+nameArray[1]+"<br>"+nameArray[2]);
      } else {
        document.write(nameArray[0]+" "+nameArray[1]+" "+nameArray[2]+"<br>"+nameArray[3]);
      }
    }
  }
}

function turnSelfImageOff() {
  var elem = document.getElementById("selfimage");
  elem.style.display = 'none';
}
function turnSelfImageOn() {
  var elem = document.getElementById("selfimage");
  elem.style.display = 'block';
}

function birthdayAlert() {
  var thisDate = new Date();
  var dd = thisDate.getDate();
  var m = thisDate.getMonth()+1;
  var yyyy = thisDate.getFullYear();
  var count = 0;
  
  for (var i=0;i<bdate.length;i++) {
    var bdateArray = bdate[i].split(' '); // Elements: 0=dd, 1=m, 2=yyyy
    if (bdateArray[0] == dd && bdateArray[1] == m) {
      count++;
    }
  }
  if (count == 1) {
    document.write ("<p><b>There's a birthday in the family today, "+dd+" "+months[m]+"!</b> (<a href=\"news.php?page=news,birthdays,index,1\">More Courtright birthdays</a>.)</p>");
  } else if (count > 1) {
    document.write ("<p><b>There are "+count+" birthdays in the family today, "+dd+" "+months[m]+"!</b> (<a href=\"news.php?page=news,birthdays,index,1\">More Courtright birthdays</a>.)</p>");
  }
  var bdayLink = "";
  if (count > 0) {
    document.write("<ul style=\"margin-top:-10px\">");
    for (var i=0;i<bdate.length;i++) {
      bdayLink = bday[i].toLowerCase();
      bdayLink = bdayLink.replace(/ /g,"");
      var bdateArray = bdate[i].split(' '); // Elements: 0=dd, 1=m, 2=yyyy
      if (bdateArray[0] == dd && bdateArray[1] == m) {
        var yearsOld = yyyy-bdateArray[2];
        if (alive[i] > 0) {
          document.write("<li><a href=\"c_"+bdayLink+".shtml\">"+bday[i]+"</a> was born "+yearsOld+" years ago today in "+bdateArray[2]+". ");
//          if (bdayemail[i] != "") {
//            document.write("<a href=\"mailto:"+bdayemail[i]+"\">Send an e-mail birthday card</a>.");
//          }
        } else {
          document.write("<li><a href=\"c_"+bdayLink+".shtml\">"+bday[i]+"</a> was born "+yearsOld+" years ago today in "+bdateArray[2]+". ");
        }
      }
    }
  }
  document.write("</ul>");
}


var photoRemoteWindow = null;
function photoRemote(picName,w,h) {
  ww = parseInt(w);
  hh = parseInt(h);
  winLeft = (screen.width-ww)/2;
  winTop = (screen.height-hh)/2;
  var settings  = 'width='+ww+',';
      settings += 'height='+hh+',';
      settings += 'top='+winTop+',';
      settings += 'left='+winLeft+',';
      settings += 'resizable=no,';
      settings += 'scrollbars=no,';
      settings += 'toolbars=no';

  if (photoRemoteWindow) {
    photoRemoteWindow.close();
  }

  photoRemoteWindow = window.open('','remotephoto',settings);

  photoRemoteWindow.document.write("<html>\n");
  photoRemoteWindow.document.write("<head>");
  photoRemoteWindow.document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\">");
  photoRemoteWindow.document.write("<title>Photo</title>");
  photoRemoteWindow.document.write("</head>");
  photoRemoteWindow.document.write("<body marginheight=\"0\" marginwidth=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\">");
  photoRemoteWindow.document.write("<div style=\"background-image:url('"+picName+"'); width:"+w+"; height:"+h+"; position:absolute; top:0px; left:0px; margin:00px\" onclick=\"window.close()\"><img src=\"images/pixel_transp.gif\" width=\""+w+"\" height=\""+h+"\"></div>");
  photoRemoteWindow.document.write("</body>");
  photoRemoteWindow.document.write("</html>");
}


//function highestLast(a,b) {
//  if (a<b) { return -1 }
//  else if (a==b) { return 0 }
//  else if (a>b) { return 1 }
//}

//function symSort(array1,array2) {
//  var copy1=new Array();
//  var copy2=new Array();
//  var smartDouble=new Array();
//  for (var i=0;i<array1.length;i++) {
//    copy1.length++;
//    copy1[copy1.length-1]=array1[i];
//    smartDouble.length++;
//    smartDouble[smartDouble.length-1]=0;
//  }
//  copy2.length=copy1.length;
//  copy1.sort(highestLast);
//  var redrawCopy2=0;
//  for (var x=0;x<copy1.length;x++) {
//    for (var y=0;y<array1.length;y++) {
//      if (copy1[x]==array1[y]) {
//        if (smartDouble[y]==1) { continue }
//        copy2[redrawCopy2++]=array2[y];
//        smartDouble[y]=1
//      }
//    }
//  }
//  return new Array(copy1,copy2);
//}

function loadBdayTable() {
  var bdayLnk = "";
  var bdaysplit = "";

//  var newbdateArray = symSort(bdate,bday)[0];
//  var newbdayArray = symSort(bdate,bday)[1];

  for (var i=0; i<bdate.length; i++) {
    bdayLnk = bday[i].toLowerCase();
    bdayLnk = bdayLnk.replace(/ /g,"");
    bdaysplit = bdate[i].split(' ');
    document.write("<tr>\n");
    document.write("  <td class=\"bdaytdL\">"+bdaysplit[0]+" "+months[bdaysplit[1]]+" "+bdaysplit[2]+"</td>\n");
    document.write("  <td class=\"bdaytdC\"><a href=\"c_"+bdayLnk+".shtml\">"+bday[i]+"</a></td>\n");
    if (alive[i]) {
      document.write("  <td class=\"bdaytdC\"><a href=\"http://click.linksynergy.com/fs-bin/click?id=CJ5xMlus7Dw&offerid=40893.10000013&type=3&subid=0\">send</a><IMG border=\"0\" width=\"1\" height=\"1\" src=\"http://ad.linksynergy.com/fs-bin/show?id=CJ5xMlus7Dw&bids=40893.10000013&type=3&subid=0\" ></td>");
    } else {
      document.write("  <td class=\"bdaytdC\">&nbsp;</td>");
    }
    document.write("  <td class=\"bdaytdR\">&nbsp;</td>");
    document.write("</tr>\n");
  }
}

function show468x60() {
  google_ad_client = "pub-0787760297551230";
  google_ad_width = 728;
  google_ad_height = 90;
  google_ad_format = "728x90_as";
  google_ad_type = "text_image";
  //2007-02-22: The Courtright Family
  google_ad_channel = "8681375182";
  google_color_border = "FFFFFF";
  google_color_bg = "FFFFFF";
  google_color_link = "000000";
  google_color_text = "000000";
  google_color_url = "336699";
  document.write('<script type="text/javascript"');
  document.write('  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">');
  document.write('</script>');
}


// =======================================================================================================================================================================


function show88x31() {
/*
   l88x31[] = '';
*/
  var b88x31 = 15;
  var n88x31 = b88x31-1;
  var ad88x31 = Math.round(Math.random() * n88x31);
  var l88x31 = new Array(b88x31);
   // commission junction
   l88x31[0] = '<a href="http://www.dpbolvw.net/click-1420288-10500601" target="_top" onmouseover="window.status=\'http://www.rosettastone.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.ftjcfx.com/image-1420288-10500601" width="88" height="31" alt="Rosetta Stone Language Software" border="0"></a>';
   l88x31[1] = '<a href="http://rover.ebay.com/rover/1/711-53200-19255-1/1?campid=5335887015&toolid=71153200192551&customid=&mpvc="><img border="0px" src="http://rover.ebay.com/ar/1/711-53200-19255-1/1?campid=5335887015&toolid=71153200192551&customid=&mpt=[CACHEBUSTER]&adtype=1&size=88x31&mpvc=" alt="Click Here"></a>';
   l88x31[2] = '<a href="http://www.qksrv.net/click-1420288-5688218" target="_top" onmouseover="window.status=\'http://www.mlb.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-1420288-5688218" width="88" height="31" alt="Click here for the MLB.com Shop" border="0"></a>';
   l88x31[3] = '<a href="http://www.qksrv.net/click-1420288-9323735" target="_top" onmouseover="window.status=\'http://www.mlb.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-1420288-9323735" width="88" height="31" alt="Click here for MLB.com Shop" border="0"></a>';
   l88x31[4] = '<a href="http://www.qksrv.net/click-1420288-9324956" target="_top" onmouseover="window.status=\'http://www.linguaphone.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-1420288-9324956" width="88" height="31" alt="languages by Linguaphone" border="0"></a>';
   l88x31[5] = '<a href="http://www.qksrv.net/click-1420288-9324959" target="_top" onmouseover="window.status=\'http://www.linguaphone.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-1420288-9324959" width="88" height="31" alt="French language with Linguaphone" border="0"></a>';
   l88x31[6] = '<a href="http://www.qksrv.net/click-766068-10306782" target="_top" onmouseover="window.status=\'http://www.napster.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-766068-10306782" width="88" height="31" alt="Download Napster 2.0 now!" border="0"></a>';
   l88x31[7] = '<a href="http://www.qksrv.net/click-766068-9829667" target="_top" onmouseover="window.status=\'http://store.aetv.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-766068-9829667" width="88" height="31" alt="" border="0"></a>';
   l88x31[8] = '<a href="http://www.qksrv.net/click-766068-9829171" target="_top" onmouseover="window.status=\'http://store.aetv.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-766068-9829171" width="88" height="31" alt="" border="0"></a>';

   // amazon
   l88x31[9] = '<A HREF="http://www.amazon.com/exec/obidos/redirect?tag=courtrightfam-20&path=tg/browse/-/283155"><img src="banners/amazon_88x31_01.gif" width="88" height="31" border="0"></A>';
   l88x31[10] = '<A HREF="http://www.amazon.com/exec/obidos/redirect?tag=courtrightfam-20&path=tg/browse/-/130"><img src="banners/amazon_88x31_02.gif" width="88" height="31" border="0"></A>';
   l88x31[11] = '<A HREF="http://www.amazon.com/exec/obidos/redirect?tag=courtrightfam-20&path=tg/browse/-/502394"><img src="banners/amazon_88x31_03.gif" width="88" height="31" border="0"></A>';
   l88x31[12] = '<A HREF="http://www.amazon.com/exec/obidos/redirect?tag=courtrightfam-20&path=subst/home/music.html"><img src="banners/amazon_88x31_04.gif" width="88" height="31" border="0"></A>';

   // linkshare
   l88x31[13] = '<a href="http://click.linksynergy.com/fs-bin/click?id=CJ5xMlus7Dw&offerid=23198.10000046&type=4&subid=0" target="_top" onmouseover="window.status=\'http://www.ccmusic.com\';return true;" onmouseout="window.status=\' \';return true;"><img width="88" height="31" alt="EQ_small_button" border="0" src="http://www.ccmusic.com/linkshare/88X31/small_button.gif"></a><IMG border="0" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=CJ5xMlus7Dw&bids=23198.10000046&type=4&subid=0">';
   l88x31[14] = '<a href="http://www.qksrv.net/click-1420288-1643272" target="_top" onmouseover="window.status=\'http://www.ebay.com\';return true;" onmouseout="window.status=\' \';return true;"><img src="http://www.qksrv.net/image-1420288-1643272" width="88" height="31" alt="Click here for your favorite eBay items" border="0"></a>';

  document.write(l88x31[ad88x31]);
}


function bgOn(elem) {
  elem.style.backgroundColor = '#ffffcc';
}

function bgOff(elem) {
  elem.style.backgroundColor = '#f8f8f8';
}


// Declare arrays to hold elements containing 
// news- and stock-related URLs and link text
var newsNames = new Array();
var indexNames = new Array();

function getAttributes() {
	var htmlStr = GetCookie('htmlPrefs');
	if (htmlStr == null) {
    htmlStr = "face=tahoma-->size=10-->";
	}
	var htmlArray = htmlStr.split('-->');
	for (var i = 0; i < htmlArray.length; i++) {
		var tagInfo = htmlArray[i].split('=');
		if (tagInfo[0] != "") {
			if (tagInfo[0].indexOf('newsNames') == 0) {
				newsNames[newsNames.length] = tagInfo[1];
			}
			else if (tagInfo[0].indexOf('indexNames') == 0) {
				indexNames[indexNames.length] = tagInfo[1];
			}
			else { eval(tagInfo[0] + ' = "' + tagInfo[1] + '"'); }
		}
	}
}

// Extract the user preferences from the 
// cookie file BEFORE the page loads
getAttributes();

document.write('<style type="text/css">');
document.write('body { font-family:'+face+'; font-size:'+size+'pt }');
document.write('td,p,a,input,li,span,input,select { font-size:'+size+'pt }');
document.write('h1 { font-size:'+(parseInt(size)+3)+'pt; text-decoration:underline }');
document.write('h2 { font-size:'+(parseInt(size)+2)+'pt }');
document.write('div.navigation td, div.navigation a:link, div.navigation a:active, div.navigation a:visited, div.navigation a:hover { font-size:'+(parseInt(size)+1)+'pt }');
document.write('</style>');

