/* [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','14801',jdecode('Life+Vision+Empowerment'),jdecode(''), jdecode('%2F14801.html'), 'true',[],'',''],
	['PAGE','19701',jdecode('Mantras+%26+Mudras'),jdecode(''), jdecode('%2F19701%2Findex.html'), 'true',[ 
		['PAGE','20901',jdecode('Breath+and+Movement'),jdecode(''), jdecode('%2F19701%2F20901.html'), 'true',[],'',''],
		['PAGE','20922',jdecode('Breath+of+Fire'),jdecode(''), jdecode('%2F19701%2F20922.html'), 'true',[],'','']
	],'',''],
	['PAGE','19722',jdecode('Gong+History'),jdecode(''), jdecode('%2F19722.html'), 'true',[],'',''],
	['PAGE','36901',jdecode('Life+Coach'),jdecode(''), jdecode('%2F36901.html'), 'true',[],'',''],
	['PAGE','36922',jdecode('GemStone+Massage'),jdecode(''), jdecode('%2F36922.html'), 'true',[],'',''],
	['PAGE','19743',jdecode('Health+Tips'),jdecode(''), jdecode('%2F19743.html'), 'true',[],'',''],
	['PAGE','19764',jdecode('A+Little+Bit+About...'),jdecode(''), jdecode('%2F19764.html'), 'true',[],'',''],
	['PAGE','19785',jdecode('Bullletin+Board'),jdecode(''), jdecode('%2F19785.html'), 'true',[],'',''],
	['PAGE','19806',jdecode('Inspiring+Links'),jdecode(''), jdecode('%2F19806.html'), 'true',[],'',''],
	['PAGE','19827',jdecode('Guest+book'),jdecode(''), jdecode('%2F19827.html'), 'true',[],'',''],
	['PAGE','19848',jdecode('Special+Thanks'),jdecode(''), jdecode('%2F19848.html'), 'true',[],'',''],
	['PAGE','19869',jdecode('Contact'),jdecode(''), jdecode('%2F19869.html'), 'true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1737';
theSitetree.keyvisualName='blumen.jpg';
theSitetree.fontsetId='291';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'enom',
  product: 'WSCENOSSSLYTC21T'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1737',
				keyvisualName: 	'blumen.jpg',
				fontsetId: 		'291',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-19827aen340inp7b1']={
webappId:    '1002',
documentId:  '19827',
internalId:  '19827aen340inp7b1',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20111027-232734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20111028-104019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19722',
internalId:  '',
customField: '20111003-204624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19743',
internalId:  '',
customField: '20110928-004033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19764',
internalId:  '',
customField: '20111028-102441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19785',
internalId:  '',
customField: '20110928-004033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19806',
internalId:  '',
customField: '20110930-231310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19827',
internalId:  '',
customField: '20111027-095446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19848',
internalId:  '',
customField: '20111003-203932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19869',
internalId:  '',
customField: '20110928-004033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20110928-225015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20922',
internalId:  '',
customField: '20110928-225156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20111027-232141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36922',
internalId:  '',
customField: '20111027-233103'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN340INP7B1';
var companyName   = 'Life+Vision+Empowerment';
var htmlTitle	  = '';
var metaKeywords  = 'Tahra+Singh%2C+life+vision+empowerment%2C+kundalini+yoga%2C+santa+cruz%2C+prana+yama%2C+mucuna%2C+gemstone+massage%2C+life+coach';
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();
};

