/* [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','1511',jdecode('Home'),jdecode(''),'/1511.html','true',[],'',''],
	['PAGE','1532',jdecode('About+Angela'),jdecode(''),'/1532.html','true',[],'',''],
	['PAGE','19401',jdecode('About+Nancy'),jdecode(''),'/19401.html','true',[],'',''],
	['PAGE','16001',jdecode('Services+Offered'),jdecode(''),'/16001/index.html','true',[ 
		['PAGE','18701',jdecode('Tong+Ren%3A+It+Works%21'),jdecode(''),'/16001/18701.html','true',[],'','']
	],'',''],
	['PAGE','16022',jdecode('What+to+Expect'),jdecode(''),'/16022.html','true',[],'',''],
	['PAGE','16043',jdecode('Testimonials'),jdecode(''),'/16043.html','true',[],'',''],
	['PAGE','1553',jdecode('Special+Projects'),jdecode(''),'/1553.html','true',[],'',''],
	['PAGE','15401',jdecode('Workshops'),jdecode(''),'/15401.html','true',[],'',''],
	['PAGE','16064',jdecode('Other+Services'),jdecode(''),'/16064.html','true',[],'',''],
	['PAGE','15001',jdecode('Links'),jdecode(''),'/15001.html','true',[],'',''],
	['PAGE','1574',jdecode('My+Blog'),jdecode(''),'/1574.html','true',[],'',''],
	['PAGE','15301',jdecode('My+Photos'),jdecode(''),'/15301.html','true',[],'',''],
	['PAGE','15901',jdecode('Guestbook'),jdecode(''),'/15901.html','true',[],'',''],
	['PAGE','15922',jdecode('Contact'),jdecode(''),'/15922.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Ornaments';
theSitetree.paletteFamily='606ED4';
theSitetree.keyvisualId='3887';
theSitetree.keyvisualName='kv_3887.jpg';
theSitetree.fontsetId='10493';
theSitetree.graphicsetId='11073';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Ornaments',
				paletteFamily: 	'606ED4',
				keyvisualId: 	'3887',
				keyvisualName: 	'kv_3887.jpg',
				fontsetId: 		'10493',
				graphicsetId: 	'11073',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'887248',
				e_color: 		'887248',
				f_color: 		'887248',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-0d47d01b9a91879774e6bce4979348da']={
webappId:    '7060',
documentId:  '1553',
internalId:  '0d47d01b9a91879774e6bce4979348da',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-121']={
webappId:    '7050',
documentId:  '1574',
internalId:  '121',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-6e8b053961dc6b13417c7fdfe32e7eb6']={
webappId:    '7060',
documentId:  '15301',
internalId:  '6e8b053961dc6b13417c7fdfe32e7eb6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16022',
internalId:  '',
customField: '20090505-091253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1511',
internalId:  '',
customField: '20091109-223358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1532',
internalId:  '',
customField: '20091109-222441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1553',
internalId:  '',
customField: '20090505-084940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1574',
internalId:  '',
customField: '20090424-091631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20090424-090320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20090424-093058'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1511',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20091109-222035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20090424-091740'
};
webappMappings['7002']=webappMappings['7002-719']={
webappId:    '7002',
documentId:  '15901',
internalId:  '719',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-757']={
webappId:    '7008',
documentId:  '15922',
internalId:  '757',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15922',
internalId:  '',
customField: '20090505-100527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16043',
internalId:  '',
customField: '20090424-093058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16064',
internalId:  '',
customField: '20090424-093058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20090424-092507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20090509-224414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20091109-223929'
};
var canonHostname = 'wsc2.sitecreatorservice.com';
var accountId     = 'ASIB10INX3B4';
var companyName   = 'Welcome+to+Healing+Energy';
var htmlTitle	  = 'WELCOME+TO+HEALING+ENERGY';
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();
};

