/* [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 theSitetree=[ 
	['PAGE','4201',jdecode('Home'),jdecode(''),'/4201.html','true',[],''],
	['PAGE','4252',jdecode('About+Us'),jdecode(''),'/4252.html','true',[],''],
	['PAGE','4501',jdecode('Services'),jdecode(''),'/4501.html','true',[],''],
	['PAGE','4336',jdecode('Contact'),jdecode(''),'/4336.html','true',[],''],
	['PAGE','11001',jdecode('Links+and+Resources'),jdecode(''),'/11001.html','true',[],''],
	['PAGE','14701',jdecode('Holiday+Specials'),jdecode(''),'/14701.html','false',[],''],
	['PAGE','18101',jdecode('Reiki+'),jdecode(''),'/18101.html','false',[],''],
	['PAGE','30901',jdecode('Clients+and+Testimonials'),jdecode(''),'/30901.html','false',[],''],
	['PAGE','23301',jdecode('Events'),jdecode(''),'/23301.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Weekend';
theSitetree.paletteFamily='DEADAC';
theSitetree.keyvisualId='3983';
theSitetree.keyvisualName='kv_3983.jpg';
theSitetree.fontsetId='10538';
theSitetree.graphicsetId='11147';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='BDBABB';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Weekend',
				paletteFamily: 	'DEADAC',
				keyvisualId: 	'3983',
				keyvisualName: 	'kv_3983.jpg',
				fontsetId: 		'10538',
				graphicsetId: 	'11147',
				contentColor: 	'000000',
				contentBGColor: 'BDBABB',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20090519-114538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4252',
internalId:  '',
customField: '20091102-121718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4336',
internalId:  '',
customField: '20080930-122946'
};
webappMappings['1501']=webappMappings['1501-14039558']={
webappId:    '1501',
documentId:  '4201',
internalId:  '14039558',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20091102-121840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20081208-143137'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20090905-103128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20081208-144152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23301',
internalId:  '',
customField: '20091102-122404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20091102-130645'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INE56N';
var companyName   = 'Companion+Kneads';
var htmlTitle	  = 'Companion+Kneads+Small+Animal+Massage';
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();
};
