/* [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(''), jdecode('%2F4521.html'), 'true',[],'',''],
	['PAGE','5202',jdecode('%C2%BFQui%C3%A9nes+Somos%3F'),jdecode(''), jdecode('%2F5202.html'), 'true',[],'',''],
	['PAGE','21801',jdecode('Ofertas+Mes'),jdecode(''), jdecode('%2F21801.html'), 'true',[],'',''],
	['PAGE','67223',jdecode('Packs++de+Regalo'),jdecode(''), jdecode('%2F67223.html'), 'true',[],'',''],
	['PAGE','5602',jdecode('Terapias+Manuales'),jdecode(''), jdecode('%2F5602%2Findex.html'), 'true',[ 
		['PAGE','5629',jdecode('Quiromasaje'),jdecode(''), jdecode('%2F5602%2F5629.html'), 'true',[],'',''],
		['PAGE','5656',jdecode('Reflexolog%C3%ADa'),jdecode(''), jdecode('%2F5602%2F5656.html'), 'true',[],'',''],
		['PAGE','36223',jdecode('Terapia+craneosacral'),jdecode(''), jdecode('%2F5602%2F36223.html'), 'true',[],'',''],
		['PAGE','5683',jdecode('Drenaje+Linf%C3%A1tico'),jdecode(''), jdecode('%2F5602%2F5683.html'), 'true',[],'',''],
		['PAGE','5710',jdecode('Reiki'),jdecode(''), jdecode('%2F5602%2F5710.html'), 'true',[],'',''],
		['PAGE','5737',jdecode('Ducha+Vichy'),jdecode(''), jdecode('%2F5602%2F5737.html'), 'true',[],'','']
	],'',''],
	['PAGE','5283',jdecode('Ayurveda'),jdecode(''), jdecode('%2F5283.html'), 'true',[],'',''],
	['PAGE','26401',jdecode('Jin+Shin+Jyutsu+%C2%AE'),jdecode(''), jdecode('%2F26401.html'), 'true',[],'',''],
	['PAGE','5229',jdecode('Algoterapia'),jdecode(''), jdecode('%2F5229%2Findex.html'), 'true',[ 
		['PAGE','45723',jdecode('Est%C3%A9tica'),jdecode(''), jdecode('%2F5229%2F45723.html'), 'true',[],'',''],
		['PAGE','45744',jdecode('Tratamientos+corporales'),jdecode(''), jdecode('%2F5229%2F45744.html'), 'true',[],'',''],
		['PAGE','6940',jdecode('Masajes++Estrellas'),jdecode(''), jdecode('%2F5229%2F6940.html'), 'true',[],'','']
	],'',''],
	['PAGE','59423',jdecode('Desarrollo+Personal'),jdecode(''), jdecode('%2F59423%2Findex.html'), 'true',[ 
		['PAGE','51523',jdecode('Terapia+Gestalt'),jdecode(''), jdecode('%2F59423%2F51523.html'), 'true',[],'',''],
		['PAGE','45623',jdecode('Talleres'),jdecode(''), jdecode('%2F59423%2F45623.html'), 'true',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Bubbles';
theSitetree.paletteFamily='FF7C00';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='13';
theSitetree.graphicsetId='10';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'arsys',
  product: 'WSCSYSSSSLYTC2IR'
};
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: 	'006633',
				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:  '59423',
internalId:  '',
customField: '20110323-180813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36223',
internalId:  '',
customField: '20110322-235256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4521',
internalId:  '',
customField: '20110324-165153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67223',
internalId:  '',
customField: '20111201-123328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5202',
internalId:  '',
customField: '20111128-115409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45723',
internalId:  '',
customField: '20101026-113853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20111201-115023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5602',
internalId:  '',
customField: '20111128-114000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5629',
internalId:  '',
customField: '20110322-233857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5656',
internalId:  '',
customField: '20110322-234942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5683',
internalId:  '',
customField: '20110322-235322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5710',
internalId:  '',
customField: '20110322-235354'
};
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: '20111201-123426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45623',
internalId:  '',
customField: '20111128-113342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5283',
internalId:  '',
customField: '20110324-170635'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '21801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51523',
internalId:  '',
customField: '20110324-170243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20071231-152518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45744',
internalId:  '',
customField: '20110324-172045'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010IN2ZZ6';
var companyName   = 'Algasalut+Centre';
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+Terapia+Gestalt%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();
};

