/* [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','34301',jdecode('Home+Page'),jdecode(''), jdecode('%2F34301.html'), 'true',[],'',''],
	['PAGE','2752',jdecode('Information+about+Angels'),jdecode(''), jdecode('%2F2752.html'), 'true',[],'',''],
	['PAGE','2794',jdecode('What+is+Mediumship'),jdecode(''), jdecode('%2F2794.html'), 'true',[],'',''],
	['PAGE','2815',jdecode('Carol+Hunt'),jdecode(''), jdecode('%2F2815.html'), 'true',[],'',''],
	['PAGE','60801',jdecode('What+is+Hypnosis'),jdecode(''), jdecode('%2F60801.html'), 'true',[],'',''],
	['PAGE','69101',jdecode('What+is+NLP'),jdecode(''), jdecode('%2F69101.html'), 'true',[],'',''],
	['PAGE','63101',jdecode('Access+to+Angels+Academy+of+Enlightenment'),jdecode(''), jdecode('%2F63101.html'), 'true',[],'',''],
	['PAGE','2836',jdecode('Services'),jdecode(''), jdecode('%2F2836.html'), 'true',[],'',''],
	['PAGE','9901',jdecode('Applications'),jdecode(''), jdecode('%2F9901.html'), 'true',[],'',''],
	['PAGE','14201',jdecode('Paying+for+Services'),jdecode(''), jdecode('%2F14201.html'), 'true',[],'',''],
	['PAGE','2857',jdecode('Contact+Us'),jdecode(''), jdecode('%2F2857.html'), 'true',[],'',''],
	['PAGE','4001',jdecode('Calendar+of+Events'),jdecode(''), jdecode('%2F4001.html'), 'true',[],'',''],
	['PAGE','2878',jdecode('Submit+a+Testimonial'),jdecode(''), jdecode('%2F2878.html'), 'true',[],'',''],
	['PAGE','31801',jdecode('Testimonials'),jdecode(''), jdecode('%2F31801.html'), 'true',[],'',''],
	['PAGE','36701',jdecode('Links'),jdecode(''), jdecode('%2F36701.html'), 'true',[],'',''],
	['PAGE','43901',jdecode('Special+Event+Pictures'),jdecode(''), jdecode('%2F43901.html'), 'true',[],'',''],
	['PAGE','59501',jdecode('Healing+Prayer+Requests+'),jdecode(''), jdecode('%2F59501.html'), 'true',[],'',''],
	['PAGE','66201',jdecode('Gift+Certificates'),jdecode(''), jdecode('%2F66201.html'), 'true',[],'',''],
	['PAGE','66222',jdecode('Volunteers'),jdecode(''), jdecode('%2F66222.html'), 'true',[],'',''],
	['PAGE','60822',jdecode(''),jdecode(''), jdecode('%2F60822.html'), 'true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Livinginamerica';
theSitetree.paletteFamily='83A270';
theSitetree.keyvisualId='6338';
theSitetree.keyvisualName='kv_6338.jpg';
theSitetree.fontsetId='11154';
theSitetree.graphicsetId='11957';
theSitetree.contentColor='5C5C5C';
theSitetree.contentBGColor='D1E0C7';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Livinginamerica',
				paletteFamily: 	'83A270',
				keyvisualId: 	'6338',
				keyvisualName: 	'kv_6338.jpg',
				fontsetId: 		'11154',
				graphicsetId: 	'11957',
				contentColor: 	'5C5C5C',
				contentBGColor: 'D1E0C7',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20120119-101920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2815',
internalId:  '',
customField: '20111207-091723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2752',
internalId:  '',
customField: '20110629-094948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2794',
internalId:  '',
customField: '20110926-181611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2836',
internalId:  '',
customField: '20111207-090947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2857',
internalId:  '',
customField: '20100726-184311'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '34301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-11846']={
webappId:    '7008',
documentId:  '2857',
internalId:  '11846',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20111207-190126'
};
webappMappings['7008']=webappMappings['7008-12037']={
webappId:    '7008',
documentId:  '2878',
internalId:  '12037',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20110302-145344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2878',
internalId:  '',
customField: '20100726-184400'
};
webappMappings['7008']=webappMappings['7008-12324']={
webappId:    '7008',
documentId:  '9901',
internalId:  '12324',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20111009-104426'
};
webappMappings['4001']=webappMappings['4001-15783910']={
webappId:    '4001',
documentId:  '14201',
internalId:  '15783910',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20110629-103401'
};
webappMappings['7008']=webappMappings['7008-14961']={
webappId:    '7008',
documentId:  '34301',
internalId:  '14961',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20110804-104512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43901',
internalId:  '',
customField: '20110301-135059'
};
webappMappings['1002']=webappMappings['1002-59501aendu0ine9im']={
webappId:    '1002',
documentId:  '59501',
internalId:  '59501aendu0ine9im',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59501',
internalId:  '',
customField: '20110629-103524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60801',
internalId:  '',
customField: '20101210-093433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60822',
internalId:  '',
customField: '20101202-131156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63101',
internalId:  '',
customField: '20120119-102022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66201',
internalId:  '',
customField: '20101206-171023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66222',
internalId:  '',
customField: '20101206-171023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69101',
internalId:  '',
customField: '20110629-101757'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INE9IM';
var companyName   = 'ACCESS+TO+ANGELS.COM+++';
var htmlTitle	  = 'Access+to+Angels';
var metaKeywords  = 'angels%2C+angel+therapist%2C+angel+readings%2C+medium%2C+medium+readings%2C+spiritual+teacher%2C+healer%2C+counselor%2C+angel+therapy+practitioner%2C+reiki%2C+integrated+energy+therapy%2C+akashic+field+therapy%2Cpast+life+regression+therapy%2C+healing.++++';
var metaContents  = 'Services+I+provide+for+healing+the+emotional%2C+mental%2C+spiritual+and+physical+body+through+the+angels+and+spirit+world+from+teaching+workshops+and+giving+private+sessions.++';
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();
};

