/* [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','701',jdecode('DANAVEDA'),jdecode(''), jdecode('%2F701%2Findex.html'), 'true',[ 
		['PAGE','20501',jdecode('Montserrat+Garc%C3%ADa'),jdecode(''), jdecode('%2F701%2F20501.html'), 'true',[],'',''],
		['PAGE','79801',jdecode('Reflexiones'),jdecode(''), jdecode('%2F701%2F79801.html'), 'true',[],'',''],
		['PAGE','46101',jdecode('Contacto'),jdecode(''), jdecode('%2F701%2F46101.html'), 'true',[],'',''],
		['PAGE','22101',jdecode('Links'),jdecode(''), jdecode('%2F701%2F22101.html'), 'true',[],'','']
	],'',''],
	['PAGE','41901',jdecode('Coaching'),jdecode(''), jdecode('%2F41901%2Findex.html'), 'true',[ 
		['PAGE','75122',jdecode('Personal'),jdecode(''), jdecode('%2F41901%2F75122.html'), 'true',[],'',''],
		['PAGE','75143',jdecode('Empresarial'),jdecode(''), jdecode('%2F41901%2F75143.html'), 'true',[],'','']
	],'',''],
	['PAGE','773',jdecode('Ayurveda'),jdecode(''), jdecode('%2F773%2Findex.html'), 'true',[ 
		['PAGE','83501',jdecode('Consulta'),jdecode(''), jdecode('%2F773%2F83501.html'), 'true',[],'',''],
		['PAGE','40701',jdecode('Productos'),jdecode(''), jdecode('%2F773%2F40701.html'), 'true',[],'',''],
		['PAGE','22122',jdecode('Formaci%C3%B3n'),jdecode(''), jdecode('%2F773%2F22122.html'), 'true',[],'','']
	],'',''],
	['PAGE','74901',jdecode('Terapia'),jdecode(''), jdecode('%2F74901%2Findex.html'), 'true',[ 
		['PAGE','42801',jdecode('Terapia+Floral'),jdecode(''), jdecode('%2F74901%2F42801.html'), 'true',[],'','']
	],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='cutout';
theSitetree.paletteFamily='F0F1D8';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10611';
theSitetree.graphicsetId='10473';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'piensa',
  product: 'WSCSYSSSSLYTC2IR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'cutout',
				paletteFamily: 	'F0F1D8',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10611',
				graphicsetId: 	'10473',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				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:  '701',
internalId:  '',
customField: '20120110-193137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20110525-154054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75122',
internalId:  '',
customField: '20101116-135821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79801',
internalId:  '',
customField: '20100912-130917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74901',
internalId:  '',
customField: '20110207-134732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40701',
internalId:  '',
customField: '20120103-190834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20120103-195437'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20101114-155130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46101',
internalId:  '',
customField: '20120104-152838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20120103-200744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22122',
internalId:  '',
customField: '20120104-191909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20120104-144324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83501',
internalId:  '',
customField: '20101012-150000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75143',
internalId:  '',
customField: '20120103-195638'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INVJLV';
var companyName   = 'DANAVEDA+Montserrat+Garc%C3%ADa';
var htmlTitle	  = 'DANAVEDA+Montserrat+Garc%C3%ADa';
var metaKeywords  = 'Terapias+Naturales.+Ayurveda.+Terapia+Floral.+Flores+de+Bach.+Flores+de+California.+Crecimiento+Personal.+Terapia+Corporal.+Terapia+Emocional.+Coaching.+Reflexolog%C3%ADa+Podal.+Quiromasaje.+Cosm%C3%A9tica+Natural.+Tratamientos+Faciales.+Tratamientos+Corporales.+Masajes+y+Belleza.+Montserrat+Garc%C3%ADa.+Coaching+Personal+y+Empresarial.+Terapia+Emocional+Integrativa.+Consulta+y+Formaci%C3%B3n+en+Ayurveda';
var metaContents  = 'Coaching+Personal+y+Empresarial.+Terapia+Emocional+Integrativa.+Consulta+y+Formaci%C3%B3n+en+Ayurveda.';
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();
};

