/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var POS_TARGET=8;
var theSitetree=[ 
	['PAGE','40101',jdecode('RESEARCH+and...'),jdecode(''), jdecode('%2F40101%2Findex.html'), 'true',[ 
		['PAGE','47522',jdecode('ROAD+TRIPS%21'),jdecode(''), jdecode('%2F40101%2F47522.html'), 'true',[],'','']
	],'',''],
	['PAGE','39094',jdecode('Talents+%26+Testimonials'),jdecode(''), jdecode('%2F39094.html'), 'true',[],'',''],
	['PAGE','39801',jdecode('Services+%26+Pricing'),jdecode(''), jdecode('%2F39801.html'), 'false',[],'',''],
	['PAGE','39136',jdecode('Let%26%23x27%3Bs+Talk%21'),jdecode(''), jdecode('%2F39136.html'), 'true',[],'',''],
	['PAGE','39157',jdecode('Cemetery+Road+Trips'),jdecode(''), jdecode('%2F39157.html'), 'true',[],'',''],
	['PAGE','39401',jdecode('Forms+%26+Freebies'),jdecode(''), jdecode('%2F39401.html'), 'true',[],'',''],
	['PAGE','60201',jdecode('Midwest+Repositories'),jdecode(''), jdecode('%2F60201.html'), 'true',[],'',''],
	['PAGE','70201',jdecode('Sites+and+Sightings'),jdecode(''), jdecode('%2F70201.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Mazy';
theSitetree.paletteFamily='E58919';
theSitetree.keyvisualId='11326';
theSitetree.keyvisualName='kv_11326.jpg';
theSitetree.fontsetId='31989';
theSitetree.graphicsetId='13821';
theSitetree.contentColor='3C3D3C';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Mazy',
				paletteFamily: 	'E58919',
				keyvisualId: 	'11326',
				keyvisualName: 	'kv_11326.jpg',
				fontsetId: 		'31989',
				graphicsetId: 	'13821',
				contentColor: 	'3C3D3C',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40101',
internalId:  '',
customField: '20100609-111254'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '60201',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39801',
internalId:  '',
customField: '20090522-223955'
};
webappMappings['7008']=webappMappings['7008-15831']={
webappId:    '7008',
documentId:  '39136',
internalId:  '15831',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39094',
internalId:  '',
customField: '20120204-151251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60201',
internalId:  '',
customField: '20090515-225302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39136',
internalId:  '',
customField: '20100609-112350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39157',
internalId:  '',
customField: '20100609-112739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70201',
internalId:  '',
customField: '20111013-212444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39401',
internalId:  '',
customField: '20100609-115416'
};
webappMappings['7060']=webappMappings['7060-b13251611afc2b77d0c9935116461bb4']={
webappId:    '7060',
documentId:  '39157',
internalId:  'b13251611afc2b77d0c9935116461bb4',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '40101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47522',
internalId:  '',
customField: '20100609-111537'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN3NII';
var companyName   = 'EVER-AFTER+ENTERPRISES...';
var htmlTitle	  = 'Ever-After+Enterprises.....an+innate+knack+for+that+needle+in+a+haystack%21';
var metaKeywords  = 'Research+Researcher+Genealogy+Genealogical+Services+Publishing+Report-Writing+Writing+Photo+Preservation+Digitization+Norwegian+Norway+International+business+personal+family+history+specialist+specializing+midwestern+midwest+resources+providing+Vice+President+Iowa+Society+classes+presentations+road+trips+reasonable+fees+Iowa+Illinois+Nebraska+Missouri+Minnesota+Indiana+Wayne+County+Association+of+Personal+Historians+Regional+Region+clients+satisfied+testimonials+prompt+attention+to+detail+24%2F7+Code+of+Ethics+consultation+consult+projects+assignments+diligent+brick+wall+privacy+beliefs+values+record+stories+confidentiality+integrity+journalism+teach+teacher+instruct+instructor+retirement+home+homes+care+center+communication+skills+CD+DVD+special+occasions+community+retiree+book+hard-cover+soft-cover+tribute+children+Montgomery+North+Carolina+Randolph+Civil+War+marketing+documentary+life+loved+ones+elderly+stories+audio+video+gifts+gift+memoir+inspiration+inspire+transcribe+transcription+montage+scrapbook+retouching+restoration+cookbook+members+families+reminiscent+archival+storage+questions+preserving+generations+preserve+courthouse+onsite+travel+databases+membership+Civil+War+Adoptions+heritage+Vice+President+money-back+guarantee+database+web+site+professional+';
var metaContents  = 'Denise+Gripp+DBA+Ever-After+Enterprises%2C+311+E+4th+Avenue+Indianola+IA+50125-2912%2C+E-mail%3A+Denise%40everafterents.com.+++Over+17+years+of+genealogical+research+experience%2C+with+an+innate+knack+for+that+%E2%80%9Cneedle+in+a+haystack+--++specializing+in+both+business+and+personal%2Fgenealogical+research.++Adoptions%2C+Civil+War+Regimental+history%2C+Midwestern+States%2C+International+assignments%2C+and+Norwegian+heritage+are+a+small+sampling+of+the+wide-ranging+array+of+past+projects.++Genealogical+classes%2C+photo+and+memorabilia+creations+and+preservation+services%2C+family-history+publishing%2C+and+database%2Freport-writing+services.++Subscribed+to+a+wide+variety+of+genealogical+and+historical+societies+and+libraries+across+the+U.S.%2C+providing+accessibility+to+over+200+historical%2Fbusiness-related+online+database+accessibility.+++Large+and+small%2Ffor+business+or+pleasure+--+any%2Fall+research+requests+timely+and+professionally+accommodated.++Reasonable+fees%3B+love+road+trips%21++';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};

