/* [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','64512',jdecode('BIOCONSEJOS'),jdecode(''), jdecode('%2F64512.html'), 'true',[],'',''],
	['PAGE','1312',jdecode('BIOCOMPRA'),jdecode(''), jdecode('%2F1312%2Findex.html'), 'true',[ 
		['PAGE','26612',jdecode('La+tienda'),jdecode(''), jdecode('%2F1312%2F26612.html'), 'true',[],'',''],
		['PAGE','8480',jdecode('Donde+estamos'),jdecode(''), jdecode('%2F1312%2F8480.html'), 'true',[],'','']
	],'',''],
	['PAGE','8417',jdecode('BIOPRODUCTO+DEL+MES'),jdecode(''), jdecode('%2F8417.html'), 'true',[],'',''],
	['PAGE','66112',jdecode('OFERTAS'),jdecode(''), jdecode('%2F66112.html'), 'true',[],'',''],
	['PAGE','2454',jdecode('COMPRA+ON-LINE'),jdecode(''), jdecode('%2F2454%2Findex.html'), 'true',[ 
		['PAGE','2496',jdecode('Reparto+a+domicilio'),jdecode(''), jdecode('%2F2454%2F2496.html'), 'true',[],'','']
	],'',''],
	['PAGE','2475',jdecode('TRATAMIENTOS+Y+MASAJES'),jdecode(''), jdecode('%2F2475.html'), 'true',[],'',''],
	['PAGE','47533',jdecode('ACTIVIDADES'),jdecode(''), jdecode('%2F47533%2Findex.html'), 'true',[ 
		['PAGE','8375',jdecode('Yoga'),jdecode(''), jdecode('%2F47533%2F8375.html'), 'true',[],'','']
	],'',''],
	['PAGE','22012',jdecode('CURSOS+Y+TALLERES'),jdecode(''), jdecode('%2F22012.html'), 'true',[],'',''],
	['PAGE','52712',jdecode('ARTICULOS+Y+RECETAS'),jdecode(''), jdecode('%2F52712%2Findex.html'), 'true',[ 
		['PAGE','41712',jdecode('Fichas+coleccionables'),jdecode(''), jdecode('%2F52712%2F41712.html'), 'true',[],'',''],
		['PAGE','53112',jdecode('Articulos'),jdecode(''), jdecode('%2F52712%2F53112.html'), 'true',[],'',''],
		['PAGE','61612',jdecode('Recetas'),jdecode(''), jdecode('%2F52712%2F61612.html'), 'true',[],'','']
	],'',''],
	['PAGE','23112',jdecode('VALES+DESCUENTO'),jdecode(''), jdecode('%2F23112.html'), 'true',[],'',''],
	['PAGE','8438',jdecode('HACERSE+BIO-SOCIO'),jdecode(''), jdecode('%2F8438%2Findex.html'), 'true',[ 
		['PAGE','42933',jdecode('Formulario+de+alta'),jdecode(''), jdecode('%2F8438%2F42933.html'), 'true',[],'','']
	],'',''],
	['PAGE','43512',jdecode('PARTICIPA'),jdecode(''), jdecode('%2F43512%2Findex.html'), 'true',[ 
		['PAGE','8501',jdecode('Buz%C3%B3n+de+sugerencias'),jdecode(''), jdecode('%2F43512%2F8501.html'), 'true',[],'',''],
		['PAGE','42912',jdecode('Libro+de+visitas'),jdecode(''), jdecode('%2F43512%2F42912.html'), 'true',[],'',''],
		['PAGE','42612',jdecode('Blog'),jdecode(''), jdecode('%2F43512%2F42612.html'), 'true',[],'',''],
		['PAGE','42954',jdecode('Votaci%C3%B3n'),jdecode(''), jdecode('%2F43512%2F42954.html'), 'true',[],'',''],
		['PAGE','42975',jdecode('Foro'),jdecode(''), jdecode('%2F43512%2F42975.html'), 'true',[],'','']
	],'',''],
	['PAGE','52733',jdecode('PAGINAS+DE+INTERES'),jdecode(''), jdecode('%2F52733.html'), 'true',[],'',''],
	['PAGE','52612',jdecode('GALERIA+DE+FOTOS'),jdecode(''), jdecode('%2F52612.html'), 'true',[],'',''],
	['PAGE','8396',jdecode('NUESTROS+PROFESIONALES'),jdecode(''), jdecode('%2F8396.html'), 'true',[],'',''],
	['PAGE','8459',jdecode('CONTACTA+CON+NOSOTROS'),jdecode(''), jdecode('%2F8459.html'), 'true',[],'','']];
var siteelementCount=29;
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 prodDef={
  wl_name: 'arsys',
  product: 'WSCSYSSSSLYTC2IR'
};
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:  '47533',
internalId:  '',
customField: '20111005-111212'
};
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: '20110516-200049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8375',
internalId:  '',
customField: '20111005-113828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8396',
internalId:  '',
customField: '20111003-220130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8417',
internalId:  '',
customField: '20111005-110845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8438',
internalId:  '',
customField: '20100420-212142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8459',
internalId:  '',
customField: '20111003-220239'
};
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:  '64512',
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:  '61612',
internalId:  '',
customField: '20111106-195337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41712',
internalId:  '',
customField: '20100603-182805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22012',
internalId:  '',
customField: '20111106-193757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52712',
internalId:  '',
customField: '20110928-151626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23112',
internalId:  '',
customField: '20110120-205202'
};
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: '20111003-203959'
};
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'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64512',
internalId:  '',
customField: '20111004-152324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66112',
internalId:  '',
customField: '20111004-143540'
};
var webAppHostname = 'wsc.webaporter.com:80';
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();
};

