/* [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','401',jdecode('INICIO'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','148912',jdecode('Album+CONGRESO+'),jdecode(''),'/148912.html','true',[],'',''],
	['PAGE','87601',jdecode('CON%C3%93CENOS'),jdecode(''),'/87601/index.html','true',[ 
		['PAGE','87622',jdecode('Ficha+T%C3%A9cnica'),jdecode(''),'/87601/87622.html','true',[],'',''],
		['PAGE','87643',jdecode('Junta+Directiva'),jdecode(''),'/87601/87643.html','true',[],'',''],
		['PAGE','87664',jdecode('Objetivos'),jdecode(''),'/87601/87664.html','true',[],'',''],
		['PAGE','87685',jdecode('D%C3%B3nde+estamos'),jdecode(''),'/87601/87685.html','true',[],'',''],
		['PAGE','129901',jdecode('Mapa+de+acceso'),jdecode(''),'/87601/129901.html','true',[],'',''],
		['PAGE','87706',jdecode('Para+saber+m%C3%A1s'),jdecode(''),'/87601/87706/index.html','true',[ 
			['PAGE','91101',jdecode('Para+saber+m%C3%A1s+%28follow+up+page%29'),jdecode(''),'/87601/87706/91101.html','false',[],'','']
		],'','']
	],'',''],
	['PAGE','87727',jdecode('QU%C3%89+HACEMOS'),jdecode(''),'/87727/index.html','true',[ 
		['PAGE','133201',jdecode('Beneficios'),jdecode(''),'/87727/133201.html','true',[],'','']
	],'',''],
	['PAGE','87748',jdecode('COLABORAN'),jdecode(''),'/87748/index.html','true',[ 
		['PAGE','92701',jdecode('COLABORAN+%28follow+up+page%29'),jdecode(''),'/87748/92701.html','false',[],'',''],
		['PAGE','87769',jdecode('Plan%2BFamilia'),jdecode(''),'/87748/87769.html','true',[],'',''],
		['PAGE','87790',jdecode('Nivel+auton%C3%B3mico'),jdecode(''),'/87748/87790.html','true',[],'',''],
		['PAGE','87811',jdecode('Nivel+Local'),jdecode(''),'/87748/87811.html','true',[],'','']
	],'',''],
	['PAGE','87832',jdecode('COMPENSACIONES'),jdecode(''),'/87832/index.html','true',[ 
		['PAGE','87853',jdecode('En+Cuenca'),jdecode(''),'/87832/87853.html','true',[],'',''],
		['PAGE','87874',jdecode('En+Castilla-La+Mancha'),jdecode(''),'/87832/87874.html','true',[],'',''],
		['PAGE','87895',jdecode('En+toda+Espa%C3%B1a'),jdecode(''),'/87832/87895.html','true',[],'','']
	],'',''],
	['PAGE','87916',jdecode('FAMILIA+NUMEROSA'),jdecode(''),'/87916/index.html','true',[ 
		['PAGE','87937',jdecode('Qui%C3%A9n+es'),jdecode(''),'/87916/87937.html','true',[],'',''],
		['PAGE','87958',jdecode('T%C3%ADtulo+'),jdecode(''),'/87916/87958.html','true',[],'','']
	],'',''],
	['PAGE','87979',jdecode('ASOCIATE'),jdecode(''),'/87979.html','true',[],'',''],
	['PAGE','88000',jdecode('NOTICIAS'),jdecode(''),'/88000.html','true',[],'',''],
	['PAGE','88021',jdecode('DOCUMENTOS'),jdecode(''),'/88021/index.html','true',[ 
		['PAGE','88042',jdecode('General'),jdecode(''),'/88021/88042.html','true',[],'',''],
		['PAGE','93601',jdecode('Legislaci%C3%B3n'),jdecode(''),'/88021/93601.html','true',[],'','']
	],'',''],
	['PAGE','88063',jdecode('ENLACES'),jdecode(''),'/88063.html','true',[],'',''],
	['PAGE','136501',jdecode('JUEGOS'),jdecode(''),'/136501/index.html','true',[ 
		['PAGE','137601',jdecode('Football'),jdecode(''),'/136501/137601.html','true',[],'',''],
		['PAGE','137622',jdecode('Spacio'),jdecode(''),'/136501/137622.html','true',[],'',''],
		['PAGE','137664',jdecode('Diamonds'),jdecode(''),'/136501/137664.html','true',[],'',''],
		['PAGE','137685',jdecode('The+invader'),jdecode(''),'/136501/137685.html','true',[],'','']
	],'',''],
	['PAGE','102806',jdecode('Libro+de+visitas'),jdecode(''),'/102806/index.html','true',[ 
		['PAGE','102801',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/102806/102801.html','false',[],'','']
	],'',''],
	['PAGE','150412',jdecode('Foro+de+la+familia'),jdecode(''),'/150412.html','true',[],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='F5F5F5';
theSitetree.keyvisualId='2172';
theSitetree.keyvisualName='non_profit.jpg';
theSitetree.fontsetId='356';
theSitetree.graphicsetId='407';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F5F5F5';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'F5F5F5',
				keyvisualId: 	'2172',
				keyvisualName: 	'non_profit.jpg',
				fontsetId: 		'356',
				graphicsetId: 	'407',
				contentColor: 	'000000',
				contentBGColor: 'F5F5F5',
				a_color: 		'F5F5F5',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87706',
internalId:  '',
customField: '20080124-000409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100313-110438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87622',
internalId:  '',
customField: '20080124-002603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87601',
internalId:  '',
customField: '20090110-184527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87643',
internalId:  '',
customField: '20090111-210506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87685',
internalId:  '',
customField: '20100301-000705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87664',
internalId:  '',
customField: '20080123-234649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87979',
internalId:  '',
customField: '20080712-111114'
};
webappMappings['7008']=webappMappings['7008-7770']={
webappId:    '7008',
documentId:  '87748',
internalId:  '7770',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87727',
internalId:  '',
customField: '20080204-223800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91101',
internalId:  '',
customField: '20080124-000246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87748',
internalId:  '',
customField: '20080128-180326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87769',
internalId:  '',
customField: '20080124-231144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87790',
internalId:  '',
customField: '20080124-230107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87811',
internalId:  '',
customField: '20080603-185814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87832',
internalId:  '',
customField: '20091024-114441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87853',
internalId:  '',
customField: '20100312-201930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87874',
internalId:  '',
customField: '20100312-202410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87895',
internalId:  '',
customField: '20091024-121505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87916',
internalId:  '',
customField: '20080128-181928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87937',
internalId:  '',
customField: '20080128-182220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87958',
internalId:  '',
customField: '20080128-182619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88000',
internalId:  '',
customField: '20081013-221945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88021',
internalId:  '',
customField: '20080131-230246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88042',
internalId:  '',
customField: '20080127-222654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88063',
internalId:  '',
customField: '20091014-213640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102801',
internalId:  '',
customField: '20080203-001517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92701',
internalId:  '',
customField: '20080124-003951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93601',
internalId:  '',
customField: '20080501-001624'
};
webappMappings['1501']=webappMappings['1501-4866074']={
webappId:    '1501',
documentId:  '401',
internalId:  '4866074',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-102806aars20in3mdh']={
webappId:    '1002',
documentId:  '102806',
internalId:  '102806aars20in3mdh',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-7769']={
webappId:    '7008',
documentId:  '87706',
internalId:  '7769',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102806',
internalId:  '',
customField: '20080203-001517'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '129901',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129901',
internalId:  '',
customField: '20080712-202154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133201',
internalId:  '',
customField: '20081013-223019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136501',
internalId:  '',
customField: '20090228-111626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137601',
internalId:  '',
customField: '20090228-111728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137622',
internalId:  '',
customField: '20090228-112003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137664',
internalId:  '',
customField: '20090228-112054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137685',
internalId:  '',
customField: '20090228-112855'
};
webappMappings['7005']=webappMappings['7005-53']={
webappId:    '7005',
documentId:  '401',
internalId:  '53',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-ef395a4f135ffd46e2bdb4c051f641f3']={
webappId:    '7060',
documentId:  '148912',
internalId:  'ef395a4f135ffd46e2bdb4c051f641f3',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148912',
internalId:  '',
customField: '20091109-205359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150412',
internalId:  '',
customField: '20091107-165313'
};
webappMappings['1003']=webappMappings['1003-aars20in3mdh124cf51bb70']={
webappId:    '1003',
documentId:  '150412',
internalId:  'aars20in3mdh124cf51bb70',
customField: 'es:ES:'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN3MDH';
var companyName   = 'FAMILIAS+NUMEROSAS+DE+CUENCA';
var htmlTitle	  = 'Familias+Numerosas+de+Cuenca';
var metaKeywords  = 'familias+numerosas+cuenca';
var metaContents  = 'Informaci%C3%B3n+sobre+protecci%C3%B3n%2C+defensa+y+promoci%C3%B3n+de+las+familias+numerosas';
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();
};
