/* [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','1312',jdecode('BIOCOMPRA'),jdecode(''),'/1312.html','true',[],'',''],
	['PAGE','26612',jdecode('LA+TIENDA'),jdecode(''),'/26612/index.html','true',[ 
		['PAGE','8480',jdecode('Donde+estamos'),jdecode(''),'/26612/8480.html','true',[],'','']
	],'',''],
	['PAGE','8312',jdecode('PRODUCTOS'),jdecode(''),'/8312/index.html','true',[ 
		['PAGE','8417',jdecode('Ofertas'),jdecode(''),'/8312/8417.html','true',[],'',''],
		['PAGE','2496',jdecode('Reparto+a+domicilio'),jdecode(''),'/8312/2496.html','true',[],'',''],
		['PAGE','2454',jdecode('Compra+On-Line'),jdecode(''),'/8312/2454.html','true',[],'','']
	],'',''],
	['PAGE','8396',jdecode('NUESTROS+PROFESIONALES'),jdecode(''),'/8396.html','true',[],'',''],
	['PAGE','2475',jdecode('TRATAMIENTOS+Y+MASAJES'),jdecode(''),'/2475.html','true',[],'',''],
	['PAGE','47533',jdecode('ACTIVIDADES'),jdecode(''),'/47533.html','true',[],'',''],
	['PAGE','22012',jdecode('CURSOS+Y+TALLERES'),jdecode(''),'/22012.html','true',[],'',''],
	['PAGE','8375',jdecode('YOGA'),jdecode(''),'/8375.html','true',[],'',''],
	['PAGE','52712',jdecode('INFORMATE'),jdecode(''),'/52712/index.html','true',[ 
		['PAGE','41712',jdecode('FICHAS+COLECCIONABLES'),jdecode(''),'/52712/41712.html','true',[],'',''],
		['PAGE','53112',jdecode('ARTICULOS'),jdecode(''),'/52712/53112.html','true',[],'','']
	],'',''],
	['PAGE','23112',jdecode('PUNTOS+BIOCOMPRA'),jdecode(''),'/23112.html','true',[],'',''],
	['PAGE','8438',jdecode('HACERSE+BIO-SOCIO'),jdecode(''),'/8438/index.html','true',[ 
		['PAGE','42933',jdecode('Formulario+de+alta'),jdecode(''),'/8438/42933.html','true',[],'','']
	],'',''],
	['PAGE','8459',jdecode('CONTACTA+CON+NOSOTROS'),jdecode(''),'/8459.html','true',[],'',''],
	['PAGE','43512',jdecode('PARTICIPA'),jdecode(''),'/43512/index.html','true',[ 
		['PAGE','8501',jdecode('Buz%C3%B3n+de+sugerencias'),jdecode(''),'/43512/8501.html','true',[],'',''],
		['PAGE','42912',jdecode('Libro+de+visitas'),jdecode(''),'/43512/42912.html','true',[],'',''],
		['PAGE','42612',jdecode('Blog'),jdecode(''),'/43512/42612.html','true',[],'',''],
		['PAGE','42954',jdecode('Votaci%C3%B3n'),jdecode(''),'/43512/42954.html','true',[],'',''],
		['PAGE','42975',jdecode('Foro'),jdecode(''),'/43512/42975.html','true',[],'','']
	],'',''],
	['PAGE','52733',jdecode('PAGINAS+DE+INTERES'),jdecode(''),'/52733.html','true',[],'',''],
	['PAGE','52612',jdecode('GALERIA+DE+FOTOS'),jdecode(''),'/52612.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='86862D';
theSitetree.keyvisualId='920';
theSitetree.keyvisualName='fitness1.jpg';
theSitetree.fontsetId='166';
theSitetree.graphicsetId='196';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'86862D',
				keyvisualId: 	'920',
				keyvisualName: 	'fitness1.jpg',
				fontsetId: 		'166',
				graphicsetId: 	'196',
				contentColor: 	'006633',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'86862D',
				c_color: 		'000000',
				d_color: 		'2C331B',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1312',
internalId:  '',
customField: '20080501-130618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2496',
internalId:  '',
customField: '20080723-160926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8312',
internalId:  '',
customField: '20100420-211337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47533',
internalId:  '',
customField: '20100716-132027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2454',
internalId:  '',
customField: '20080718-163231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2475',
internalId:  '',
customField: '20100504-210251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52733',
internalId:  '',
customField: '20100803-194809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8375',
internalId:  '',
customField: '20100413-195544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8396',
internalId:  '',
customField: '20100526-121320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8417',
internalId:  '',
customField: '20080717-125644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8438',
internalId:  '',
customField: '20100420-212142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8459',
internalId:  '',
customField: '20080718-171229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8480',
internalId:  '',
customField: '20080801-114542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20100521-124135'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1312',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43512',
internalId:  '',
customField: '20100521-140839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52612',
internalId:  '',
customField: '20100521-131955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41712',
internalId:  '',
customField: '20100603-182805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22012',
internalId:  '',
customField: '20100702-153043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52712',
internalId:  '',
customField: '20100521-140057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23112',
internalId:  '',
customField: '20100420-203006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53112',
internalId:  '',
customField: '20100624-201428'
};
webappMappings['7060']=webappMappings['7060-f26f28618ae7cadbc672a4b7762ef840']={
webappId:    '7060',
documentId:  '52612',
internalId:  'f26f28618ae7cadbc672a4b7762ef840',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26612',
internalId:  '',
customField: '20100324-113053'
};
webappMappings['7050']=webappMappings['7050-6340']={
webappId:    '7050',
documentId:  '42612',
internalId:  '6340',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42612',
internalId:  '',
customField: '20100521-124917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42933',
internalId:  '',
customField: '20100326-135626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42912',
internalId:  '',
customField: '20100521-124827'
};
webappMappings['1002']=webappMappings['1002-42912aars20in3s36']={
webappId:    '1002',
documentId:  '42912',
internalId:  '42912aars20in3s36',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-8451']={
webappId:    '7008',
documentId:  '42933',
internalId:  '8451',
customField: 'language:es;country:ES;'
};
webappMappings['7005']=webappMappings['7005-70']={
webappId:    '7005',
documentId:  '42954',
internalId:  '70',
customField: 'language:es;country:ES;'
};
webappMappings['1003']=webappMappings['1003-aars20in3s361279a5402f6']={
webappId:    '1003',
documentId:  '42975',
internalId:  'aars20in3s361279a5402f6',
customField: 'es:ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42954',
internalId:  '',
customField: '20100326-125549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42975',
internalId:  '',
customField: '20100326-125549'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN3S36';
var companyName   = 'Salud+y+bienestar+a+tu+alcance';
var htmlTitle	  = '';
var metaKeywords  = 'Herboristeria%2C+biol%C3%B3gico%2C+natural%2C+salud%2C+bienestar%2C+herbodiet%C3%A9tica%0D%0A';
var metaContents  = 'Tienda+herbodietetica+de+productos+biologicos%2C+ecologicos+y+naturales+en+La+Eliana.';
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();
};
