/* [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','48727',jdecode('Welcome'),jdecode(''), jdecode('%2F48727%2Findex.html'), 'true',[ 
		['PAGE','75001',jdecode('Get+to+know+Tatiana'),jdecode(''), jdecode('%2F48727%2F75001.html'), 'false',[],'','']
	],'',''],
	['PAGE','106401',jdecode('Seminars%2FWorkshops'),jdecode(''), jdecode('%2F106401.html'), 'true',[],'',''],
	['PAGE','48685',jdecode('What+is+Emei+Qigong'),jdecode(''), jdecode('%2F48685%2Findex.html'), 'true',[ 
		['PAGE','9601',jdecode('Advantage+of+Emei+Qigong+Practice'),jdecode(''), jdecode('%2F48685%2F9601.html'), 'true',[],'',''],
		['PAGE','49722',jdecode('Emei+Qigong++in+US'),jdecode(''), jdecode('%2F48685%2F49722.html'), 'true',[],'','']
	],'',''],
	['PAGE','48748',jdecode('Private+Sessions'),jdecode(''), jdecode('%2F48748.html'), 'true',[],'',''],
	['PAGE','48706',jdecode('Group+Practice'),jdecode(''), jdecode('%2F48706.html'), 'true',[],'',''],
	['PAGE','101901',jdecode('Students+Testimonials'),jdecode(''), jdecode('%2F101901.html'), 'true',[],'',''],
	['PAGE','48601',jdecode('Spanish'),jdecode(''), jdecode('%2F48601%2Findex.html'), 'true',[ 
		['PAGE','75022',jdecode('Conozcan+a+Tatiana'),jdecode(''), jdecode('%2F48601%2F75022.html'), 'true',[],'',''],
		['PAGE','49701',jdecode('Emei+Qigong+en+EU'),jdecode(''), jdecode('%2F48601%2F49701.html'), 'true',[],'',''],
		['PAGE','48664',jdecode('Seminarios'),jdecode(''), jdecode('%2F48601%2F48664.html'), 'true',[],'',''],
		['PAGE','48622',jdecode('Practicas+de+Grupo'),jdecode(''), jdecode('%2F48601%2F48622.html'), 'true',[],'',''],
		['PAGE','48643',jdecode('Consultas+Privadas'),jdecode(''), jdecode('%2F48601%2F48643.html'), 'true',[],'','']
	],'',''],
	['PAGE','73401',jdecode('Healing+Arts+Store'),jdecode(''), jdecode('%2F73401.html'), 'true',[],'',''],
	['PAGE','87701',jdecode('Spiritual+Journey+with+Grandmaster+Fu'),jdecode(''), jdecode('%2F87701.html'), 'false',[],'',''],
	['PAGE','48790',jdecode('REGISTRATION%2F+REQUEST'),jdecode(''), jdecode('%2F48790.html'), 'true',[],'',''],
	['PAGE','121901',jdecode('Emei+Qigong+Healing+Arts'),jdecode(''), jdecode('%2F121901.html'), 'false',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Case';
theSitetree.paletteFamily='82C1DC';
theSitetree.keyvisualId='11061';
theSitetree.keyvisualName='kv_11061.jpg';
theSitetree.fontsetId='31939';
theSitetree.graphicsetId='13781';
theSitetree.contentColor='34454C';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Case',
				paletteFamily: 	'82C1DC',
				keyvisualId: 	'11061',
				keyvisualName: 	'kv_11061.jpg',
				fontsetId: 		'31939',
				graphicsetId: 	'13781',
				contentColor: 	'34454C',
				contentBGColor: 'F6FBFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20110803-211759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75022',
internalId:  '',
customField: '20100526-081800'
};
webappMappings['7008']=webappMappings['7008-18331']={
webappId:    '7008',
documentId:  '48790',
internalId:  '18331',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20100322-121536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48685',
internalId:  '',
customField: '20100322-121104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73401',
internalId:  '',
customField: '20100525-172547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48790',
internalId:  '',
customField: '20100511-172727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48643',
internalId:  '',
customField: '20111231-141055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75001',
internalId:  '',
customField: '20091103-222200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48622',
internalId:  '',
customField: '20100322-122152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48664',
internalId:  '',
customField: '20100322-122043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49701',
internalId:  '',
customField: '20110905-111911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48706',
internalId:  '',
customField: '20091105-154732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48727',
internalId:  '',
customField: '20111029-154408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48748',
internalId:  '',
customField: '20111231-140916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49722',
internalId:  '',
customField: '20110905-100935'
};
webappMappings['4001']=webappMappings['4001-24089945']={
webappId:    '4001',
documentId:  '73401',
internalId:  '24089945',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '48727',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87701',
internalId:  '',
customField: '20110219-133542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101901',
internalId:  '',
customField: '20110324-223805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106401',
internalId:  '',
customField: '20120127-185410'
};
webappMappings['7050']=webappMappings['7050-14736']={
webappId:    '7050',
documentId:  '121901',
internalId:  '14736',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121901',
internalId:  '',
customField: '20111228-215418'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN3XZE';
var companyName   = 'Health%2C+Rejuvenation%2C+Spiritual+Development';
var htmlTitle	  = 'Emei+Qigong+Healing+Arts+for+Health%2C+Rejuvenation+and+Spiritual+Development';
var metaKeywords  = 'Emei+Qigong%2C+Grandmaster+Fu+Wei+Zhong%2C+Tatiana+Logvinova%2C+Emei+Mountain%2C+healing%2C+Qi+transmition%2C+Wuji+Gong%2C+Miami+Seminar%2C+Astrology%2C+Four+Pillars%2C+Five+Elements%2C+Karma%2C+';
var metaContents  = 'Emei+Qigong+Healing+Arts+for+Healing%2C+Rejuvenation+and+Spiritual+Development.+Tatiana+Logvinova+use+this+ancient+Chinese+System+for+healing+and+teach+how+promote+self-healing.+Personally+trained+by+Grandmaster+Fu+Wei+Zhong+in+China+and+in+US%2C+she+is+a+certified+Emei+Qigong+master%28teacher%29+living+in+Miami+area.+';
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();
};

