// anti-spam routine
// =================
x = "t(dot)hanson(at)btinternet(dot)com"
y = ""
z = ""
x = String.fromCharCode(60) + "A H" + "REF=\"ma" + "ilto:t.h" + "anson"
y = String.fromCharCode(14 + 50) + "btin" + "tern" + "et.c" + "om?subje" + "ct=Trevor Hanson\'s " + "Genealogy Homepages\""
z = String.fromCharCode(62) + "t.ha" + "nson" + String.fromCharCode(6 * 13 - 14) + "btinte" + "rne" + "t.c" + "om" + String.fromCharCode(60) + String.fromCharCode(47) + "A>"

m = "E-ma" + "il: " + String.fromCharCode(60) + "A H" + "REF=\"ma" + "ilto:ROS" + "EPM"
s = String.fromCharCode(14 + 50) + "ao" + "l.c" + "om?subje" + "ct=Trevor Hanson\'s " + "Genealogy Homepages\""
r = String.fromCharCode(62) + "ROSE" + "PM" + String.fromCharCode(6 * 13 - 14) + "a" + "ol.c" + "om" + String.fromCharCode(60) + String.fromCharCode(47) + "A>"
// =================

// Welcome message routine
// =======================
numberText = new Array ("","Two","Three","Four","Five","Six","Seven","Eight","Nine","Eleven")
now = new Date
monNum = Math.floor(now.getTime() / (1000 * 60 * 60 * 24 * 30.5))
//lastVisit = monNum
//expireDate = new Date
//expireDate.setYear(expireDate.getYear()+5)

//message = "Welcome to Trevor Hanson&#8217;s Genealogy Homepages.<br />Visit the <a href=\"index.htm\">Genealogy Homepage</a>"
//message1 = "Welcome to Trevor Hanson&#8217;s Genealogy Homepages.<br /><a href='javascript:addbookmark()'>Add this website to your favourites</a>"

//if (document.cookie != "") {
//   lastVisit = parseInt(document.cookie.split("=")[1])
   message = ""
   message1 = ""
//}

//document.cookie = "siteVisit="+monNum+";expires="+ expireDate.toGMTString()

//if (monNum-lastVisit >= 1) {
//   message = "Welcome back to Trevor Hanson&#8217;s Genealogy Homepages.<br />It&#146;s a month or more since you last visited."
//   message1 = "Welcome back.<br />It&#8217;s a month or more since you last visited."
//}

//if (monNum-lastVisit > 2) {
//   message = "Welcome back to Trevor Hanson&#8217;s Genealogy Homepages.<br /> "+numberText[(monNum-lastVisit)]+" months have flown by since your last visit."
//   message1 = "Welcome back.<br />"+numberText[(monNum-lastVisit)]+" months have flown by since your last visit."
//}

//if (monNum-lastVisit >= 12) {
//   message = "Welcome back to Trevor Hanson&#8217;s Genealogy Homepages.<br />It&#146;s been a year or more since your last visit."
//   message1 = "Welcome back.<br />It&#8217;s been a year or more since your last visit."
//}

//if (message != "") {
//   message = "<div class='welcome'>" + message + "</div><br />"
//   message1 = "<div class='welcome'>" + message1 + "</div><br />"
//}
// =======================

// Find width of window function
// =======================
function findWidth1() {
//if (document.body.clientWidth != null) p = document.body.clientWidth;
//if (window.innerWidth != null) p = window.innerWidth;
//if (p > 800) p = (p-800)/2
//return '<div style="padding-left:' + p + 'px; padding-right:' + p + 'px; padding-top:15px;">'

return '<div style="width:800px; margin-left:auto; margin-right:auto; padding-top:15px; padding-bottom:15px">'
}
// =======================

// Popup window
// =======================
var popWin
function newWindow(doc)
{
popWin = window.open(doc, "popup", "status=yes,scrollbars=yes,width=500,height=500,resizable=yes,top=50,left=50")
window.popWin.focus()
}


// Blank window
// =======================
function blankWindow(link){
newWin = window.open(link.href,'blankWin')
newWin.focus()
}


// Close popup
// ========================
function updateParent() {
if (opener != document.self){
opener.document.location = "index.htm"
window.close()
}
else document.location = "index.htm"
}

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

