// copyright 1999-2010, Real Software
// Author: ckflentje

// ensure that everything runs in the frameset
 if (top == self) {
	var url = self.location.href;

	if (url.indexOf("/families/") > -1) {
		var nPos = url.lastIndexOf('/');
		if (nPos > -1) {
			url = "../index.htm#" + url.substring(nPos + 1, url.length);
			self.location.href = url;
		}
	}
	else if (url.indexOf("/document.asp") == -1) {
	 	self.location.href = "index.htm"; 
	}
}

sMonthNames = new Array(12)
sMonthNames[0] = "Jan"
sMonthNames[1] = "Feb"
sMonthNames[2] = "Mar"
sMonthNames[3] = "Apr"
sMonthNames[4] = "May"
sMonthNames[5] = "Jun"
sMonthNames[6] = "Jul"
sMonthNames[7] = "Aug"
sMonthNames[8] = "Sep"
sMonthNames[9] = "Oct"
sMonthNames[10] = "Nov"
sMonthNames[11] = "Dec"


function writeNoBotsEmailAddress() {
	var emailAdd = "";

	for (var i = 0; i < arguments.length; i++) {
		emailAdd += arguments[i];
	}

	var sURL = encodeURI("mai" + "lto:" + emailAdd);
	document.write(emailAdd.link(sURL));
}

function getLastModifiedDate() {
    var sDay = "";
    var nYear = 0;
    var sMonth = "";
    var nMonth = 0;

    var lastUpdate = new Date(document.lastModified)
    sDay = lastUpdate.getDate()
    
    nYear = lastUpdate.getYear();
		// handle different year values returned by IE and NS in the year 2000.
		if ((nYear >= 100) && (nYear < 1000)) {
			nYear = (nYear - 100) + 2000;
		}

    nMonth = lastUpdate.getMonth();
    if ((nMonth >= 0) && (nMonth <= 11)) {
        sMonth = sMonthNames[nMonth];
    }

    return "(This page last modified " + sDay + " " + sMonth + " " + nYear + ")"
}


function displayDoc(sDocID, sDocType) {
	var oWin = window.open("../document.asp?docid=" + sDocID + "&doctype=" + sDocType, "FamDoc", "resizable,scrollbars,height=400,width=600,top=40,left=40"); 
	oWin.focus();
}


function writeCopyrightNotice() {
	document.write("<div class=\"notice\">");
	document.write("Copyright &copy; 1999-2010, Real Software<br/>");
	document.write(getLastModifiedDate());
	document.write("</div>");
}

function writeContactNotice() {
	var sDomain1 = "flentje";
	var sDomain2 = ".us";
	var sUser = "genealogy"
	var sFull = sUser + "@" + sDomain1 + sDomain2;
	var sURL = "mai" + "lto:" + sFull

	document.write("<div class=\"contact_info\">");
	document.write("Please e-mail if your family connects!<br/>");
	document.write("Chad K. Flentje: " + sFull.link(sURL));
	document.write("</div>");
}

function writeContact() {
	var sDomain1 = "flentje";
	var sDomain2 = ".us";
	var sUser = "genealogy"
	var sFull = sUser + "@" + sDomain1 + sDomain2;
	var sURL = "mai" + "lto:" + sFull

	document.write("<div class=\"contact_info\">");
	document.write("Chad K. Flentje: " + sFull.link(sURL));
	document.write("</div>");
}

sMapArray = new Array()
sMapArray["AlumRidge"] = "http://virginia.hometownlocator.com/maps/bigmap,n,alum%20ridge,fid,1462433.cfm"
sMapArray["Bellevue"] = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Bellevue,+IA&sll=37.500125,-79.879446&sspn=0.032413,0.035963&ie=UTF8&ll=42.258572,-90.428896&spn=0.030238,0.035963&t=p&z=14&iwloc=A"
sMapArray["BlueEarth"] = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Blue+Earth,+MN&sll=42.258572,-90.428896&sspn=0.030555,0.035963&ie=UTF8&hq=&hnear=Blue+Earth,+Faribault,+Minnesota&t=p&z=13"
sMapArray["Fincastle"] = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Fincastle,+VA&sll=36.913666,-80.320187&sspn=0.032666,0.035963&ie=UTF8&ll=37.500125,-79.879446&spn=0.032413,0.035963&t=p&z=14&iwloc=A"
sMapArray["Floyd"] = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Floyd,+VA&sll=44.834935,-93.288689&sspn=0.107854,0.144196&ie=UTF8&ll=36.913666,-80.320187&spn=0.030401,0.036049&t=p&z=14&iwloc=A"
sMapArray["Hjartdal"] = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=59.5999457,+8.6517231&sll=43.380411,-94.093523&sspn=0.030006,0.035963&g=Lakota,+IA&ie=UTF8&ll=59.600776,8.651208&spn=0.334249,0.575409&t=p&z=10"
sMapArray["Lakota"] = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Lakota,+IA&sll=37.500125,-79.879446&sspn=0.032413,0.035963&ie=UTF8&ll=43.380411,-94.093523&spn=0.029694,0.035963&t=p&z=14&iwloc=A"
sMapArray["Mecklenhorst"] = "http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=Mecklenhorst,+Neustadt+am+R%C3%BCbenberge&sll=52.516639,9.527035&sspn=0.049724,0.071926&ie=UTF8&ll=52.506923,9.499912&spn=0.024867,0.035963&t=p&z=14&iwloc=A"
sMapArray["Munchehagen"] = "http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=M%C3%BCnchehagen&sll=52.440473,9.194613&sspn=0.021138,0.038409&ie=UTF8&t=p&ll=52.441833,9.186373&spn=0.012452,0.017982&z=15&iwloc=A"
sMapArray["Northwood"] = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Northwood,+IA&sll=43.637455,-94.102182&sspn=0.059757,0.071926&ie=UTF8&hq=&hnear=Northwood,+Worth,+Iowa&t=p&z=13"
sMapArray["Otternhagen"] = "http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=Otternhagen,+Neustadt+am+R%C3%BCbenberge&sll=52.38021,9.735947&sspn=0.199511,0.287704&ie=UTF8&ll=52.516639,9.527035&spn=0.049724,0.071926&t=p&z=13&iwloc=A"

function displayMap(sLocationName) {
	var oWin = window.open(sMapArray[sLocationName], "FamLoc", "resizable,scrollbars,height=600,width=800,top=40,left=40"); 
	oWin.focus();
}
