/* [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','1601',jdecode('Inicio'),jdecode(''),'/1601.html','true',[],'',''],
	['PAGE','66133',jdecode('Equipo'),jdecode(''),'/66133/index.html','true',[ 
		['PAGE','1652',jdecode('%C2%BFQuienes+somos%3F+'),jdecode(''),'/66133/1652.html','true',[],'',''],
		['PAGE','1673',jdecode('Juventudes'),jdecode(''),'/66133/1673.html','true',[],'','']
	],'',''],
	['PAGE','66154',jdecode('Fundaci%C3%B3n'),jdecode(''),'/66154/index.html','true',[ 
		['PAGE','66175',jdecode('Sede+de+la+asociaci%C3%B3n'),jdecode(''),'/66154/66175.html','true',[],'',''],
		['PAGE','66196',jdecode('Historia+de+la+asociaci%C3%B3n'),jdecode(''),'/66154/66196.html','true',[],'',''],
		['PAGE','66217',jdecode('La+asociaci%C3%B3n'),jdecode(''),'/66154/66217.html','true',[],'',''],
		['PAGE','66238',jdecode('Estatutos'),jdecode(''),'/66154/66238.html','true',[],'','']
	],'',''],
	['PAGE','66259',jdecode('Miembros'),jdecode(''),'/66259/index.html','true',[ 
		['PAGE','66301',jdecode('Direcci%C3%B3n'),jdecode(''),'/66259/66301.html','true',[],'','']
	],'',''],
	['PAGE','66385',jdecode('Hacerse+miembro'),jdecode(''),'/66385.html','true',[],'',''],
	['PAGE','66343',jdecode('Reglamento'),jdecode(''),'/66343.html','true',[],'',''],
	['PAGE','66364',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/66364/index.html','true',[ 
		['PAGE','1715',jdecode('Centros+de+Contacto+Sedes'),jdecode(''),'/66364/1715.html','true',[],'','']
	],'',''],
	['PAGE','66406',jdecode('Enlaces'),jdecode(''),'/66406/index.html','true',[ 
		['PAGE','69623',jdecode('Links'),jdecode(''),'/66406/69623.html','true',[],'','']
	],'',''],
	['PAGE','66448',jdecode('Noticias'),jdecode(''),'/66448/index.html','true',[ 
		['PAGE','1694',jdecode('Noticias+y+Videos'),jdecode(''),'/66448/1694.html','true',[],'',''],
		['PAGE','91245',jdecode('MANIFESTACIONES'),jdecode(''),'/66448/91245.html','true',[],'','']
	],'',''],
	['PAGE','66427',jdecode('Prensa'),jdecode(''),'/66427.html','true',[],'',''],
	['PAGE','66469',jdecode('Calendario'),jdecode(''),'/66469/index.html','true',[ 
		['PAGE','101866',jdecode('PUNTOS+DE+VENTA+'),jdecode(''),'/66469/101866.html','true',[],'','']
	],'',''],
	['PAGE','66532',jdecode('Programa'),jdecode(''),'/66532/index.html','true',[ 
		['PAGE','68423',jdecode('Elecciones+Europeas'),jdecode(''),'/66532/68423.html','true',[],'',''],
		['PAGE','68444',jdecode('Eleccions+a+Catalunya'),jdecode(''),'/66532/68444.html','true',[],'','']
	],'',''],
	['PAGE','106366',jdecode('REDES+SOCIALES'),jdecode(''),'/106366.html','true',[],'',''],
	['PAGE','66553',jdecode('Aviso+legal'),jdecode(''),'/66553.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='F8F2E6';
theSitetree.keyvisualId='2160';
theSitetree.keyvisualName='communication.jpg';
theSitetree.fontsetId='355';
theSitetree.graphicsetId='410';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F8F2E6';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'F8F2E6',
				keyvisualId: 	'2160',
				keyvisualName: 	'communication.jpg',
				fontsetId: 		'355',
				graphicsetId: 	'410',
				contentColor: 	'000000',
				contentBGColor: 'F8F2E6',
				a_color: 		'F8F2E6',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20100719-172351'
};
webappMappings['1501']=webappMappings['1501-11041710']={
webappId:    '1501',
documentId:  '1601',
internalId:  '11041710',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1652',
internalId:  '',
customField: '20100408-162058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1673',
internalId:  '',
customField: '20100408-162117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1694',
internalId:  '',
customField: '20100705-121212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1715',
internalId:  '',
customField: '20100408-162736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106366',
internalId:  '',
customField: '20100620-171357'
};
webappMappings['7008']=webappMappings['7008-6450']={
webappId:    '7008',
documentId:  '1715',
internalId:  '6450',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66532',
internalId:  '',
customField: '20100408-163141'
};
webappMappings['7008']=webappMappings['7008-6451']={
webappId:    '7008',
documentId:  '1673',
internalId:  '6451',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66133',
internalId:  '',
customField: '20100408-161843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66406',
internalId:  '',
customField: '20100625-165807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66553',
internalId:  '',
customField: '20100408-163314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66364',
internalId:  '',
customField: '20100408-162657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66385',
internalId:  '',
customField: '20100411-205145'
};
webappMappings['7008']=webappMappings['7008-6449']={
webappId:    '7008',
documentId:  '1601',
internalId:  '6449',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68423',
internalId:  '',
customField: '20100408-163211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68444',
internalId:  '',
customField: '20100408-163240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69623',
internalId:  '',
customField: '20100620-155347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66427',
internalId:  '',
customField: '20100719-172626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66154',
internalId:  '',
customField: '20100408-162208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66175',
internalId:  '',
customField: '20100408-162240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66196',
internalId:  '',
customField: '20100411-204947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66217',
internalId:  '',
customField: '20100408-162339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66238',
internalId:  '',
customField: '20100408-162409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66343',
internalId:  '',
customField: '20100408-162607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66259',
internalId:  '',
customField: '20100408-162444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66301',
internalId:  '',
customField: '20100408-162514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66448',
internalId:  '',
customField: '20100705-121104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66469',
internalId:  '',
customField: '20100719-172206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101866',
internalId:  '',
customField: '20100621-235337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91245',
internalId:  '',
customField: '20100705-120326'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1601',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INV2ES';
var companyName   = 'PARTIDO+GLBTH%2FTODOS+SOMOS+IGUALES';
var htmlTitle	  = 'PARTIDO+GAY%2C+L%C3%89SBICO%2C+BISEXUAL%2C+TRANSEXUAL+Y+HETROSEXUAL+%2F+TODOS+SOMOS+IGUALES';
var metaKeywords  = 'POLITICA%2C+PARTIDO%2C+POLITICO%2C+GAY%2C+LESBICO%2C+LESBIANA%2C+BISEXUAL%2C+TRANSEXUAL%2C+HETEROSEXUAL%2C+HOMOSEXUAL%2C+TODOS%2C+SOMOS%2C+IGUALES%2C+todos+somos+iguales%2C+PARTIDO+DE+CENTRO+REAL%2C+LGTB%2C+ENTIDAD';
var metaContents  = 'POLITICA++PARTIDO+POLITICO+GAY+LESBICO+BISEXUAL+TRANSEXUAL+Y+HETEROSEXUAL+TODOS+SOMOS+IGUALES%2C+POLITICA+CENTRO%2C+politica+gay%2C+politica+homosexual%2C+PARIDODE+CENTRO+REAL%2C+LGTB%2C+ENTIDAD%2C';
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();
};
