/* [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','98',jdecode('Home'),jdecode(''),'/98.html','true',[],'',''],
	['PAGE','3421',jdecode('PranaMama+Prenatal+Yoga'),jdecode(''),'/3421.html','true',[],'',''],
	['PAGE','2312',jdecode('Angel+Parties'),jdecode(''),'/2312.html','true',[],'',''],
	['PAGE','137',jdecode('Angel+Therapy+Readings'),jdecode(''),'/137.html','true',[],'',''],
	['PAGE','8501',jdecode('Special+Offer+for+Workshop+Participants'),jdecode(''),'/8501.html','true',[],'',''],
	['PAGE','3761',jdecode('Astrology'),jdecode(''),'/3761/index.html','true',[ 
		['PAGE','3779',jdecode('Moon+Astrology'),jdecode(''),'/3761/3779.html','true',[],'',''],
		['PAGE','3788',jdecode('Daily+Watch+Astrology'),jdecode(''),'/3761/3788.html','true',[],'','']
	],'',''],
	['PAGE','3430',jdecode('Chakra+Balancing'),jdecode(''),'/3430.html','true',[],'',''],
	['PAGE','9901',jdecode('Crystals'),jdecode(''),'/9901.html','true',[],'',''],
	['PAGE','3457',jdecode('Mediumship'),jdecode(''),'/3457.html','true',[],'',''],
	['PAGE','3684',jdecode('Workshops%3A'),jdecode(''),'/3684.html','true',[],'',''],
	['PAGE','2147',jdecode('+Connecting+With+Your+Angels+'),jdecode(''),'/2147/index.html','true',[ 
		['PAGE','3466',jdecode('Angels+101+Connecting+to+Your+Angels'),jdecode(''),'/2147/3466.html','true',[],'',''],
		['PAGE','3475',jdecode('Chakra+Clearing'),jdecode(''),'/2147/3475.html','true',[],'',''],
		['PAGE','3493',jdecode('PranaMama+Prenatal+Yoga'),jdecode(''),'/2147/3493.html','true',[],'',''],
		['PAGE','3502',jdecode('Mediumship%3A+Lifting+the+Veil'),jdecode(''),'/2147/3502.html','true',[],'','']
	],'',''],
	['PAGE','1426',jdecode('FAQ'),jdecode(''),'/1426.html','true',[],'',''],
	['PAGE','191',jdecode('Contact'),jdecode(''),'/191.html','true',[],'',''],
	['PAGE','3140',jdecode('Guestbook'),jdecode(''),'/3140/index.html','true',[ 
		['PAGE','3139',jdecode('Read+Guestbook'),jdecode(''),'/3140/3139.html','false',[],'','']
	],'',''],
	['PAGE','8543',jdecode('new'),jdecode(''),'/8543.html','true',[],'',''],
	['PAGE','11401',jdecode('New+page'),jdecode(''),'/11401.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='0B578E';
theSitetree.keyvisualId='2042';
theSitetree.keyvisualName='party.jpg';
theSitetree.fontsetId='342';
theSitetree.graphicsetId='394';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='0B578E';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Activate',
				paletteFamily: 	'0B578E',
				keyvisualId: 	'2042',
				keyvisualName: 	'party.jpg',
				fontsetId: 		'342',
				graphicsetId: 	'394',
				contentColor: 	'FFFFFF',
				contentBGColor: '0B578E',
				a_color: 		'0B578E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3421',
internalId:  '',
customField: '20070403-154948'
};
webappMappings['1002']=webappMappings['1002-3140AHW050IN3R0A']={
webappId:    '1002',
documentId:  '3140',
internalId:  '3140AHW050IN3R0A',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '98',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98',
internalId:  '',
customField: '20100310-074348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137',
internalId:  '',
customField: '20081028-100619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20090210-073826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3761',
internalId:  '',
customField: '20070628-124028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3779',
internalId:  '',
customField: '20100310-080256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3788',
internalId:  '',
customField: '20070628-121134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3430',
internalId:  '',
customField: '20090716-175922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3457',
internalId:  '',
customField: '20070403-154948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2312',
internalId:  '',
customField: '20070306-014545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3684',
internalId:  '',
customField: '20070628-114734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2147',
internalId:  '',
customField: '20081028-092404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20090210-110229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3466',
internalId:  '',
customField: '20070628-120142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3475',
internalId:  '',
customField: '20070403-154949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3493',
internalId:  '',
customField: '20070403-154949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3502',
internalId:  '',
customField: '20070403-154949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1426',
internalId:  '',
customField: '20070306-012505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191',
internalId:  '',
customField: '20060712-191138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3140',
internalId:  '',
customField: '20070306-003843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3139',
internalId:  '',
customField: '20070306-003843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8543',
internalId:  '',
customField: '20081028-085450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20090716-165945'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3R0A';
var companyName   = 'Birth+Of+The+Spirit';
var htmlTitle	  = 'birthofthespirit.com';
var metaKeywords  = 'Astrology%2C+Angel+Card+Reading%2C+crystals%2C+Spritual+Midwifery%2C+Tarot%2C+Oracle';
var metaContents  = 'Angel+Card+Reading%2C+Spiritual+Midwifery%2C+Crystals%2C++books%2C+Astrology%2CSpirit%2C+Tarot%2C+Oracle';
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();
};
