/* [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','4521',jdecode('Home'),jdecode(''),'/4521.html','true',[],'',''],
	['PAGE','5202',jdecode('%C2%BFQui%C3%A9nes+Somos%3F'),jdecode(''),'/5202.html','true',[],'',''],
	['PAGE','5602',jdecode('Terapias+Manuales'),jdecode(''),'/5602/index.html','true',[ 
		['PAGE','5629',jdecode('Quiromasaje'),jdecode(''),'/5602/5629.html','true',[],'',''],
		['PAGE','5656',jdecode('Reflexolog%C3%ADa'),jdecode(''),'/5602/5656.html','true',[],'',''],
		['PAGE','36223',jdecode('Terapia+craneosacral'),jdecode(''),'/5602/36223.html','true',[],'',''],
		['PAGE','5683',jdecode('Drenaje+Linf%C3%A1tico'),jdecode(''),'/5602/5683.html','true',[],'',''],
		['PAGE','5710',jdecode('Reiki'),jdecode(''),'/5602/5710.html','true',[],'',''],
		['PAGE','5737',jdecode('Ducha+Vichy'),jdecode(''),'/5602/5737.html','true',[],'','']
	],'',''],
	['PAGE','26401',jdecode('Jin+Shin+Jyutsu+%C2%AE'),jdecode(''),'/26401.html','true',[],'',''],
	['PAGE','5229',jdecode('Algoterapia'),jdecode(''),'/5229.html','true',[],'',''],
	['PAGE','5283',jdecode('Ayurveda'),jdecode(''),'/5283.html','true',[],'',''],
	['PAGE','45723',jdecode('Est%C3%A9tica'),jdecode(''),'/45723.html','true',[],'',''],
	['PAGE','45744',jdecode('Tratamientos+corporales'),jdecode(''),'/45744.html','true',[],'',''],
	['PAGE','6940',jdecode('Packs+de+Regalo'),jdecode(''),'/6940.html','true',[],'',''],
	['PAGE','45623',jdecode('Talleres'),jdecode(''),'/45623.html','true',[],'',''],
	['PAGE','21801',jdecode('Alb%C3%BAm+fotos'),jdecode(''),'/21801.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Bubbles';
theSitetree.paletteFamily='FF7C00';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='13';
theSitetree.graphicsetId='10';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bubbles',
				paletteFamily: 	'FF7C00',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'13',
				graphicsetId: 	'10',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FF7C00',
				b_color: 		'FF8900',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36223',
internalId:  '',
customField: '20100318-100251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4521',
internalId:  '',
customField: '20100425-204752'
};
webappMappings['7060']=webappMappings['7060-8556a707788a46113a3c45ce2e0cfc5d']={
webappId:    '7060',
documentId:  '21801',
internalId:  '8556a707788a46113a3c45ce2e0cfc5d',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5202',
internalId:  '',
customField: '20100425-204933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45723',
internalId:  '',
customField: '20100425-210949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20071205-124923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5602',
internalId:  '',
customField: '20100323-154012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5629',
internalId:  '',
customField: '20050620-173947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5656',
internalId:  '',
customField: '20050620-174246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5683',
internalId:  '',
customField: '20050620-174720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5710',
internalId:  '',
customField: '20050620-175144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5737',
internalId:  '',
customField: '20050620-175513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5229',
internalId:  '',
customField: '20050620-175827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6940',
internalId:  '',
customField: '20100425-210534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45623',
internalId:  '',
customField: '20100323-153243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5283',
internalId:  '',
customField: '20080310-122937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20071231-152518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45744',
internalId:  '',
customField: '20100323-154658'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010IN2ZZ6';
var companyName   = '';
var htmlTitle	  = 'Algasalut+Centre.++Ayurveda+%2CCentro+Integral+de+Algoterapia%2C+Quiromasaje+y+Terapias+Manuales.';
var metaKeywords  = 'Masajes%2C+centro+de+algoterapia%2C+reiki%2C+tratamientos+terapeuticos%2C+jin+shin+jyutsu+en+vila-seca%2C+jinshinjyutsu+en+vila-seca%2C+terapeuta+jinshinjyutsu%2C+drenaje%2Cvila-seca%2Cvilaseca%2C+masajes+en+vila-seca%2C+fisioterapia+en+vila-seca%2C+centros+de+fisioterapia+en+vila-seca+linfatico%2C+Fisioterapia%2C+quiromasaje%2Ctratamientos+adelgazantes%2Ctratamientos+reafirmantes%2C+ducha+vichy%2C+reflexoterapia%2C+diatermia%2C+fibromialgia%2C+envolturas+de+algas+y+arcilla+marina%2C+peelings%2C+masajes+circulatorios%2C+fango+en+vila-seca%2C+mascarillas+corporales+y+faciales%2C+vila-seca%2C+vilaseca%2C+tarragona%2C+fisioterapia+en+vila-seca%2C+fisioterapia+en+vilaseca%2C+algoterapia%2C+algas%2C+ayurveda%2C+masajes+ayurvedicos.';
var metaContents  = 'Centro+especializado+en+Algoterapia%2C+masajes+y+terapias+manuales.';
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();
};
