/* [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','3801',jdecode('Home'),jdecode(''),'/3801.html','true',[],''],
	['PAGE','3852',jdecode('Therapies'),jdecode(''),'/3852/index.html','true',[ 
		['PAGE','4801',jdecode('Healing+Touch'),jdecode(''),'/3852/4801.html','true',[],''],
		['PAGE','4822',jdecode('PSYCH-K'),jdecode(''),'/3852/4822.html','true',[],''],
		['PAGE','4843',jdecode('Hypnotherapy'),jdecode(''),'/3852/4843.html','true',[],'']
	],''],
	['PAGE','5001',jdecode('Teen+Programs'),jdecode(''),'/5001.html','true',[],''],
	['PAGE','5043',jdecode('Price+List'),jdecode(''),'/5043.html','true',[],''],
	['PAGE','5201',jdecode('Testimonials'),jdecode(''),'/5201.html','true',[],''],
	['PAGE','10401',jdecode('Contact+Us'),jdecode(''),'/10401.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Oblique';
theSitetree.paletteFamily='DD9390';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33311';
theSitetree.graphicsetId='14185';
theSitetree.contentColor='B83E3A';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Oblique',
				paletteFamily: 	'DD9390',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33311',
				graphicsetId: 	'14185',
				contentColor: 	'B83E3A',
				contentBGColor: 'FFFFFF',
				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: 	'true',
				contentFontFace:'Palatino Linotype, Book Antiqua, Palatino, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3801',
internalId:  '',
customField: '20100219-143954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3852',
internalId:  '',
customField: '20100202-131220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20100204-095748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4822',
internalId:  '',
customField: '20100203-181504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4843',
internalId:  '',
customField: '20100204-123043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100227-130757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20100204-124309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20100204-100205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100209-112828'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3801',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABR330INZ5GX';
var companyName   = 'Twin+Connection+Energy+Healing+Inc.';
var htmlTitle	  = 'Twin+Connection+Energy+Healing+Inc.';
var metaKeywords  = 'Natural+healing%2C+alternative+healing%2C+Calgary+workshops%2C+teen+workshops%2C+Calgary%2C+energy+healing%2C+healing+for+animals%2C+healing+touch%2C+PSYCH-K%2C+hypnotherapy%2C+Calgary+hypnotherapy%2C+registered+clinical+hypnotherapy%2C+healing%2C+healthy+alternatives%2C+teen%2C+Calgary+teen%2C+Jane+Berthiaume%2C+twin+connection+energy+healing%2C+teen+programs+calgary%2C+Calgary+teen+workshops%2C+healing+touch+for+animals%2C+healing+for+pets%2C+natural+healing+Calgary%2C+clinical+hypnotherapy+Calgary%2C+Calgary+hypnosis%2C+help+for+teens%2C+teen+help+Calgary%2C+teen+counselling%2C+Calgary+healing+touch+for+animals';
var metaContents  = 'Twin+Connection+Energy+Healing+is+a+company+based+out+of+Calgary+Alberta+Canada+that+provides+natural+healing+and+alternative+healing+modalities+such+as+Healing+Touch%2C+Healing+Touch+for+Animals%2C+PSYCH-K%2C+and+Hypnotherapy.++We+specialize+in+teen+programs+and+workshops+in+the+Calgary+area+and+provide+individual+sessions+to+everyone+seeking+natural+healing.';
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();
};
