/* [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','4558',jdecode('INICIO'),jdecode(''),'/4558.html','true',[],'',''],
	['PAGE','4615',jdecode('ACERI'),jdecode(''),'/4615/index.html','true',[ 
		['PAGE','4642',jdecode('Objetivos'),jdecode(''),'/4615/4642.html','true',[],'',''],
		['PAGE','4669',jdecode('La+celiaquia+en+La+Rioja'),jdecode(''),'/4615/4669.html','true',[],'','']
	],'',''],
	['PAGE','4696',jdecode('CELIAQUIA'),jdecode(''),'/4696/index.html','true',[ 
		['PAGE','4723',jdecode('Dermatitis'),jdecode(''),'/4696/4723.html','true',[],'',''],
		['PAGE','4750',jdecode('Medicamentos'),jdecode(''),'/4696/4750.html','true',[],'','']
	],'',''],
	['PAGE','4777',jdecode('DUDAS'),jdecode(''),'/4777/index.html','true',[ 
		['PAGE','4804',jdecode('Preguntas+frecuentes'),jdecode(''),'/4777/4804.html','true',[],'',''],
		['PAGE','4831',jdecode('D%C3%A9janos+tus+dudas'),jdecode(''),'/4777/4831/index.html','true',[ 
			['PAGE','6412',jdecode('D%C3%A9janos+tus+dudas+%28follow+up+page%29'),jdecode(''),'/4777/4831/6412.html','false',[],'','']
		],'','']
	],'',''],
	['PAGE','4858',jdecode('ACTIVIDADES'),jdecode(''),'/4858/index.html','true',[ 
		['PAGE','4885',jdecode('D%C3%ADa+del+celiaco'),jdecode(''),'/4858/4885.html','true',[],'',''],
		['PAGE','4912',jdecode('Jornadas'),jdecode(''),'/4858/4912.html','true',[],'',''],
		['PAGE','4939',jdecode('Publicaciones'),jdecode(''),'/4858/4939.html','true',[],'',''],
		['PAGE','17316',jdecode('Excursiones'),jdecode(''),'/4858/17316.html','true',[],'','']
	],'',''],
	['PAGE','4966',jdecode('ALIMENTACION'),jdecode(''),'/4966/index.html','true',[ 
		['PAGE','4993',jdecode('Normas+y+consejos'),jdecode(''),'/4966/4993.html','true',[],'',''],
		['PAGE','5020',jdecode('Recetas+sin+gluten'),jdecode(''),'/4966/5020.html','true',[],'','']
	],'',''],
	['PAGE','5074',jdecode('DONDE+COMPRAR'),jdecode(''),'/5074.html','true',[],'',''],
	['PAGE','5155',jdecode('DONDE+COMER'),jdecode(''),'/5155.html','true',[],'',''],
	['PAGE','5209',jdecode('NOVEDADES'),jdecode(''),'/5209.html','true',[],'',''],
	['PAGE','25416',jdecode('CONGRESO+FACE'),jdecode(''),'/25416.html','true',[],'',''],
	['PAGE','8102',jdecode('FORO'),jdecode(''),'/8102.html','true',[],'',''],
	['PAGE','6697',jdecode('Mapa+de+acceso'),jdecode(''),'/6697.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Care';
theSitetree.paletteFamily='669999';
theSitetree.keyvisualId='218';
theSitetree.keyvisualName='mutter_tochter.jpg';
theSitetree.fontsetId='22';
theSitetree.graphicsetId='16';
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: 			'Care',
				paletteFamily: 	'669999',
				keyvisualId: 	'218',
				keyvisualName: 	'mutter_tochter.jpg',
				fontsetId: 		'22',
				graphicsetId: 	'16',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'669999',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'6A8493',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6697',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4558',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4558',
internalId:  '',
customField: '20090518-134112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4858',
internalId:  '',
customField: '20090518-134855'
};
webappMappings['7060']=webappMappings['7060-111cb83f0093b892fc2b1cf06022abb5']={
webappId:    '7060',
documentId:  '17316',
internalId:  '111cb83f0093b892fc2b1cf06022abb5',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4615',
internalId:  '',
customField: '20050213-225409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4642',
internalId:  '',
customField: '20050213-225500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4669',
internalId:  '',
customField: '20080526-135107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4696',
internalId:  '',
customField: '20050213-230921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4723',
internalId:  '',
customField: '20050213-231144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4750',
internalId:  '',
customField: '20050213-231243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4777',
internalId:  '',
customField: '20050213-231434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4804',
internalId:  '',
customField: '20050213-231518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4831',
internalId:  '',
customField: '20050213-232009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6412',
internalId:  '',
customField: '20050213-231800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4885',
internalId:  '',
customField: '20050213-232330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4912',
internalId:  '',
customField: '20091222-110651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4939',
internalId:  '',
customField: '20050213-233730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17316',
internalId:  '',
customField: '20071108-161439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4966',
internalId:  '',
customField: '20050213-233828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4993',
internalId:  '',
customField: '20050213-234009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5020',
internalId:  '',
customField: '20061130-134638'
};
webappMappings['1501']=webappMappings['1501-1075670']={
webappId:    '1501',
documentId:  '4558',
internalId:  '1075670',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5074',
internalId:  '',
customField: '20091117-104721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25416',
internalId:  '',
customField: '20081012-161920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5155',
internalId:  '',
customField: '20091119-214400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5209',
internalId:  '',
customField: '20100219-120523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8102',
internalId:  '',
customField: '20090305-112950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6697',
internalId:  '',
customField: '20050213-235814'
};
webappMappings['7008']=webappMappings['7008-7428']={
webappId:    '7008',
documentId:  '4831',
internalId:  '7428',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwd718.servidoresdns.net';
var accountId     = 'Aas010IN2UU3';
var companyName   = 'W+W+W+.+A+C+E+R+I+.+O+R+G';
var htmlTitle	  = 'Asociaci%C3%B3n+de+Celiacos+de+La+Rioja';
var metaKeywords  = 'celiaquia%2C+celiacos%2C+celiaco%2C+celiaca%2C+aceri%2C+gluten%2C+dermatitis%2C+herpetiforme%2C+la+rioja%2C+asociacion%2C+alimentacion%2C+alimentos+sin+gluten';
var metaContents  = 'Web+de+la+Asociaci%EF%BF%BDn+de+Celiacos+de+La+Rioja';
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();
};
