/* [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','18101',jdecode('Home'),jdecode(''),'/18101.html','true',[],'',''],
	['PAGE','18152',jdecode('Our+Story'),jdecode(''),'/18152.html','true',[],'',''],
	['PAGE','18173',jdecode('Contact+Us'),jdecode(''),'/18173.html','true',[],'',''],
	['PAGE','18215',jdecode('Burial+Support'),jdecode(''),'/18215.html','true',[],'',''],
	['PAGE','18236',jdecode('Healing+Hearts'),jdecode(''),'/18236.html','true',[],'',''],
	['PAGE','18257',jdecode('Blog'),jdecode(''),'/18257.html','true',[],'',''],
	['PAGE','18278',jdecode('Contributions'),jdecode(''),'/18278/index.html','true',[ 
		['PAGE','18299',jdecode('By+Mail'),jdecode(''),'/18278/18299.html','true',[],'',''],
		['PAGE','18320',jdecode('Online+Contributions'),jdecode(''),'/18278/18320.html','true',[],'',''],
		['PAGE','28501',jdecode('GoodSearch%2FGoodShop'),jdecode(''),'/18278/28501.html','true',[],'',''],
		['PAGE','31601',jdecode('In+Memory'),jdecode(''),'/18278/31601.html','true',[],'',''],
		['PAGE','31622',jdecode('Contributors'),jdecode(''),'/18278/31622.html','true',[],'','']
	],'',''],
	['PAGE','18341',jdecode('Resources'),jdecode(''),'/18341/index.html','true',[ 
		['PAGE','18362',jdecode('Books+of+Hope'),jdecode(''),'/18341/18362.html','true',[],'',''],
		['PAGE','18383',jdecode('Infant+Loss+Organizations'),jdecode(''),'/18341/18383.html','true',[],'',''],
		['PAGE','18404',jdecode('Infant+Loss+Websites'),jdecode(''),'/18341/18404.html','true',[],'',''],
		['PAGE','18425',jdecode('Keepsakes'),jdecode(''),'/18341/18425.html','true',[],'','']
	],'',''],
	['PAGE','18446',jdecode('Guest+Book'),jdecode(''),'/18446.html','true',[],'',''],
	['PAGE','32901',jdecode('Memory+Wall'),jdecode(''),'/32901.html','true',[],'',''],
	['PAGE','33401',jdecode('Who+We+Support'),jdecode(''),'/33401.html','true',[],'',''],
	['PAGE','35101',jdecode('Newsletters'),jdecode(''),'/35101.html','true',[],'',''],
	['PAGE','35401',jdecode('Zazzle+Store'),jdecode(''),'/35401.html','true',[],'',''],
	['PAGE','37001',jdecode('Blogs+We+Follow'),jdecode(''),'/37001.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='cutout';
theSitetree.paletteFamily='F0F1D8';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10350';
theSitetree.graphicsetId='10473';
theSitetree.contentColor='43637C';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'cutout',
				paletteFamily: 	'F0F1D8',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10350',
				graphicsetId: 	'10473',
				contentColor: 	'43637C',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-2974']={
webappId:    '7050',
documentId:  '18257',
internalId:  '2974',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-18446avfl30inhevv']={
webappId:    '1002',
documentId:  '18446',
internalId:  '18446avfl30inhevv',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20090920-003206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31601',
internalId:  '',
customField: '20091022-162846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18152',
internalId:  '',
customField: '20090914-173452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18173',
internalId:  '',
customField: '20090923-220142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18215',
internalId:  '',
customField: '20090914-144403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18236',
internalId:  '',
customField: '20091109-173209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18257',
internalId:  '',
customField: '20090914-153913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18278',
internalId:  '',
customField: '20090917-171734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18299',
internalId:  '',
customField: '20090914-160002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18320',
internalId:  '',
customField: '20090916-165321'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '18101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18341',
internalId:  '',
customField: '20090915-234335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18362',
internalId:  '',
customField: '20091109-174233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18383',
internalId:  '',
customField: '20090917-173257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18404',
internalId:  '',
customField: '20100201-183333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18425',
internalId:  '',
customField: '20090914-232351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18446',
internalId:  '',
customField: '20090914-232748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31622',
internalId:  '',
customField: '20100201-183123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20090915-230809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37001',
internalId:  '',
customField: '20100201-184510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33401',
internalId:  '',
customField: '20091001-122030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32901',
internalId:  '',
customField: '20091016-182833'
};
webappMappings['7060']=webappMappings['7060-e0d8da445bf7560d3964357759d3083b']={
webappId:    '7060',
documentId:  '32901',
internalId:  'e0d8da445bf7560d3964357759d3083b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35101',
internalId:  '',
customField: '20091014-144558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20091014-165525'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHEVV';
var companyName   = 'The+Light+of+Gabriel+Foundation';
var htmlTitle	  = 'The+Light+of+Gabriel+Foundation';
var metaKeywords  = '';
var metaContents  = '';
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();
};
