/* [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','65',jdecode('Home'),jdecode(''),'/65.html','true',[],''],
	['PAGE','1179',jdecode('The+Founder'),jdecode(''),'/1179.html','true',[],''],
	['PAGE','86',jdecode('Educational+Enhancement'),jdecode(''),'/86/index.html','true',[ 
		['PAGE','1711',jdecode('Sessions'),jdecode(''),'/86/1711.html','true',[],'']
	],''],
	['PAGE','104',jdecode('Superbrain+Yoga'),jdecode(''),'/104/index.html','true',[ 
		['PAGE','113',jdecode('What+Is+It+%3F'),jdecode(''),'/104/113.html','true',[],''],
		['PAGE','122',jdecode('Benefits+and+Applications'),jdecode(''),'/104/122.html','true',[],''],
		['PAGE','131',jdecode('Dramatic+Results'),jdecode(''),'/104/131.html','true',[],''],
		['PAGE','1945',jdecode('Technique'),jdecode(''),'/104/1945.html','true',[],''],
		['PAGE','149',jdecode('Testimonials'),jdecode(''),'/104/149.html','true',[],'']
	],''],
	['PAGE','1106',jdecode('Pranic+Healing'),jdecode(''),'/1106/index.html','true',[ 
		['PAGE','1430',jdecode('What+Is+It+%3F'),jdecode(''),'/1106/1430.html','true',[],''],
		['PAGE','1439',jdecode('Benefits+and+Applications'),jdecode(''),'/1106/1439.html','true',[],''],
		['PAGE','1767',jdecode('Sessions'),jdecode(''),'/1106/1767.html','true',[],'']
	],''],
	['PAGE','4374',jdecode('Pranic+Facelift+and+Body+Sculpting'),jdecode(''),'/4374.html','true',[],''],
	['PAGE','2704',jdecode('Meditation+Nights'),jdecode(''),'/2704/index.html','true',[ 
		['PAGE','2713',jdecode('Twin+Hearts+Meditation'),jdecode(''),'/2704/2713.html','true',[],''],
		['PAGE','2722',jdecode('Schedule'),jdecode(''),'/2704/2722.html','true',[],'']
	],''],
	['PAGE','158',jdecode('Videos'),jdecode(''),'/158.html','true',[],''],
	['PAGE','1115',jdecode('Contact'),jdecode(''),'/1115.html','true',[],''],
	['PAGE','1124',jdecode('Email+Us'),jdecode(''),'/1124.html','true',[],''],
	['PAGE','2791',jdecode('Directions+'),jdecode(''),'/2791.html','true',[],''],
	['PAGE','2481',jdecode('Sitemap'),jdecode(''),'/2481.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='7B4F7E';
theSitetree.keyvisualId='4236';
theSitetree.keyvisualName='kv_4236.jpg';
theSitetree.fontsetId='10674';
theSitetree.graphicsetId='11191';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='8C5E8F';
var theTemplate={
				name: 			'Americanlife',
				paletteFamily: 	'7B4F7E',
				keyvisualId: 	'4236',
				keyvisualName: 	'kv_4236.jpg',
				fontsetId: 		'10674',
				graphicsetId: 	'11191',
				contentColor: 	'FFFFFF',
				contentBGColor: '8C5E8F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '65',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65',
internalId:  '',
customField: '20091020-200435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2704',
internalId:  '',
customField: '20080124-042719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2713',
internalId:  '',
customField: '20080123-013334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2722',
internalId:  '',
customField: '20091020-200540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4374',
internalId:  '',
customField: '20090617-183958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1179',
internalId:  '',
customField: '20080216-211154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86',
internalId:  '',
customField: '20080216-000846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1711',
internalId:  '',
customField: '20071017-024059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104',
internalId:  '',
customField: '20080123-011918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113',
internalId:  '',
customField: '20071009-034026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122',
internalId:  '',
customField: '20071009-023100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131',
internalId:  '',
customField: '20071012-032248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1945',
internalId:  '',
customField: '20071012-035748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149',
internalId:  '',
customField: '20091117-215357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1106',
internalId:  '',
customField: '20071009-024355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1430',
internalId:  '',
customField: '20080217-234648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1439',
internalId:  '',
customField: '20071009-025055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1767',
internalId:  '',
customField: '20071011-231818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158',
internalId:  '',
customField: '20071117-130615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1115',
internalId:  '',
customField: '20071009-025312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1124',
internalId:  '',
customField: '20071009-025349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2791',
internalId:  '',
customField: '20080128-005231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2481',
internalId:  '',
customField: '20080221-224124'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN39Y7';
var companyName   = 'PranicWorks+of+Fairfield';
var htmlTitle	  = 'PranicWorks+of+Fairfield';
var metaKeywords  = 'Educational+Enhancement+Superbrain+Yoga+Pranic+Healing+GMCKS';
var metaContents  = 'Educational+Enhancement+Superbrain+Yoga+Pranic+Healing+GMCKS';
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();
};
