/* [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','15701',jdecode('HOMEPAGE'),jdecode(''),'/15701.html','true',[],'',''],
	['PAGE','48801',jdecode('Our+Mission+Statement'),jdecode(''),'/48801.html','true',[],'',''],
	['PAGE','54901',jdecode('Photo+Album'),jdecode(''),'/54901.html','true',[],'',''],
	['PAGE','57401',jdecode('Instructor+Bios'),jdecode(''),'/57401.html','true',[],'',''],
	['PAGE','43601',jdecode('Studio+Class+Schedule'),jdecode(''),'/43601.html','true',[],'',''],
	['PAGE','43622',jdecode('Class+Descriptions'),jdecode(''),'/43622.html','true',[],'',''],
	['PAGE','30001',jdecode('Yoga+4+Back+Pain'),jdecode(''),'/30001.html','true',[],'',''],
	['PAGE','546',jdecode('KidzYoga%21'),jdecode(''),'/546.html','true',[],'',''],
	['PAGE','4375',jdecode('Personal+Yoga+Training'),jdecode(''),'/4375/index.html','true',[ 
		['PAGE','28001',jdecode('Personal+Training+Rates'),jdecode(''),'/4375/28001.html','true',[],'','']
	],'',''],
	['PAGE','246',jdecode('Prenatal+Yoga'),jdecode(''),'/246.html','true',[],'',''],
	['PAGE','1204',jdecode('Featured+Yoga+Poses'),jdecode(''),'/1204.html','true',[],'',''],
	['PAGE','884',jdecode('Tips+for+Healthy+Living'),jdecode(''),'/884/index.html','true',[ 
		['PAGE','6670',jdecode('Featured+Recipe'),jdecode(''),'/884/6670.html','true',[],'',''],
		['PAGE','9514',jdecode('Pearls+of+Wisdom'),jdecode(''),'/884/9514.html','true',[],'','']
	],'',''],
	['PAGE','1566',jdecode('Testimonials'),jdecode(''),'/1566.html','true',[],'',''],
	['PAGE','41101',jdecode('CONTACT+US'),jdecode(''),'/41101.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Crisscross';
theSitetree.paletteFamily='9C6540';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11083';
theSitetree.graphicsetId='11811';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='9C6540';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Crisscross',
				paletteFamily: 	'9C6540',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11083',
				graphicsetId: 	'11811',
				contentColor: 	'000000',
				contentBGColor: '9C6540',
				a_color: 		'9C6540',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '15701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48801',
internalId:  '',
customField: '20100903-180611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43601',
internalId:  '',
customField: '20100903-203319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20100903-180427'
};
webappMappings['7008']=webappMappings['7008-6584']={
webappId:    '7008',
documentId:  '41101',
internalId:  '6584',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4375',
internalId:  '',
customField: '20100903-171132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20100903-171150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246',
internalId:  '',
customField: '20100903-171205'
};
webappMappings['7060']=webappMappings['7060-3b8e21e2add827c93865354bb6dabd1e']={
webappId:    '7060',
documentId:  '54901',
internalId:  '3b8e21e2add827c93865354bb6dabd1e',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '546',
internalId:  '',
customField: '20100903-170943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20100903-170612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1204',
internalId:  '',
customField: '20100903-171307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '884',
internalId:  '',
customField: '20100903-145257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6670',
internalId:  '',
customField: '20090221-114857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9514',
internalId:  '',
customField: '20100903-171347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43622',
internalId:  '',
customField: '20100903-190448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20100903-172006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1566',
internalId:  '',
customField: '20100903-171448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54901',
internalId:  '',
customField: '20100903-174021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57401',
internalId:  '',
customField: '20100903-194450'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3YO5';
var companyName   = 'The+Mind+and+Body+Studio';
var htmlTitle	  = 'yoga+classes%2C+certified+yoga+teacher%2Cprenatal+yoga%2Cchildrens+yoga%2C+personal+yoga+training%2Cmeditation';
var metaKeywords  = 'Yoga++personal+yoga+training++prenatal+yoga+++childrens+yoga+++Yoga+classes++yoga+teacher+resource++opportunities+for+yoga+teachers++yoga+and+meditation++workshops+and+classes';
var metaContents  = 'Yoga+classes++personal+yoga+training++prenatal+yoga+++childrens+yoga+classes++yoga+teacher+resources++yoga+and+meditation++workshops+and+classes';
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();
};
