/* [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','7701',jdecode('Home'),jdecode(''), jdecode('%2F7701.html'), 'true',[],'',''],
	['PAGE','7752',jdecode('About+Me'),jdecode(''), jdecode('%2F7752.html'), 'true',[],'',''],
	['PAGE','7773',jdecode('Services+Offered'),jdecode(''), jdecode('%2F7773%2Findex.html'), 'true',[ 
		['PAGE','7794',jdecode('Soal+Coaching+Services'),jdecode(''), jdecode('%2F7773%2F7794.html'), 'true',[],'',''],
		['PAGE','7815',jdecode('Angel+Card+Readings'),jdecode(''), jdecode('%2F7773%2F7815.html'), 'true',[],'',''],
		['PAGE','7836',jdecode('Tarot+Card+Services'),jdecode(''), jdecode('%2F7773%2F7836.html'), 'true',[],'',''],
		['PAGE','7857',jdecode('Astrology+Services'),jdecode(''), jdecode('%2F7773%2F7857.html'), 'true',[],'','']
	],'',''],
	['PAGE','30201',jdecode('What+is+Soul+Coaching'),jdecode(''), jdecode('%2F30201.html'), 'true',[],'',''],
	['PAGE','7878',jdecode('Pricing+Information'),jdecode(''), jdecode('%2F7878%2Findex.html'), 'true',[ 
		['PAGE','18601',jdecode('Soul+Coaching+Pricing'),jdecode(''), jdecode('%2F7878%2F18601.html'), 'true',[],'',''],
		['PAGE','18622',jdecode('Astrological+Readings'),jdecode(''), jdecode('%2F7878%2F18622.html'), 'true',[],'',''],
		['PAGE','18643',jdecode('Tarot+Card+Reading'),jdecode(''), jdecode('%2F7878%2F18643.html'), 'true',[],'',''],
		['PAGE','18664',jdecode('Angel+Card+Reading'),jdecode(''), jdecode('%2F7878%2F18664.html'), 'true',[],'','']
	],'',''],
	['PAGE','19701',jdecode('Articles'),jdecode(''), jdecode('%2F19701.html'), 'true',[],'',''],
	['PAGE','7899',jdecode('Contact+Information'),jdecode(''), jdecode('%2F7899.html'), 'true',[],'',''],
	['PAGE','17801',jdecode('Testimonials+'),jdecode(''), jdecode('%2F17801.html'), 'true',[],'',''],
	['PAGE','19101',jdecode('Code+of+Ethics'),jdecode(''), jdecode('%2F19101.html'), 'true',[],'',''],
	['PAGE','7920',jdecode('Carol%26%23x27%3Bs+Blog'),jdecode(''), jdecode('%2F7920.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Column';
theSitetree.paletteFamily='6266AD';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10400';
theSitetree.graphicsetId='10615';
theSitetree.contentColor='121447';
theSitetree.contentBGColor='D7D8ED';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'gate',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Column',
				paletteFamily: 	'6266AD',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10400',
				graphicsetId: 	'10615',
				contentColor: 	'121447',
				contentBGColor: 'D7D8ED',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'6266AD',
				e_color: 		'3A3C83',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-3970']={
webappId:    '7050',
documentId:  '7920',
internalId:  '3970',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20120119-180649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7752',
internalId:  '',
customField: '20120121-144134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7773',
internalId:  '',
customField: '20120118-160031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7920',
internalId:  '',
customField: '20120117-213105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7794',
internalId:  '',
customField: '20120119-181029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7857',
internalId:  '',
customField: '20120119-181019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7836',
internalId:  '',
customField: '20120119-180909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7815',
internalId:  '',
customField: '20120117-212613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20120118-160855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7899',
internalId:  '',
customField: '20120121-144050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7878',
internalId:  '',
customField: '20120118-160007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18622',
internalId:  '',
customField: '20120118-161040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20120118-161018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18664',
internalId:  '',
customField: '20120118-161141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18643',
internalId:  '',
customField: '20120118-161105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20120118-160934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20120118-162312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30201',
internalId:  '',
customField: '20120124-161542'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INFU2U';
var companyName   = 'Carol+Bellis+CSC%2C+CPLC';
var htmlTitle	  = '';
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();
};

