/* [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','58429',jdecode('Junta+Directiva'),jdecode(''),'/58429.html','true',[],'',''],
	['PAGE','20871',jdecode('Colaboradores'),jdecode(''),'/20871.html','true',[],'',''],
	['PAGE','82102',jdecode('Solicitud+Inscripcion+'),jdecode(''),'/82102.html','true',[],'',''],
	['PAGE','84602',jdecode('Informacion+Socios'),jdecode(''),'/84602.html','true',[],'',''],
	['PAGE','93802',jdecode('Recogida+R.+ECOPARQUE'),jdecode(''),'/93802.html','true',[],'',''],
	['PAGE','131402',jdecode('Recogida+de+RESIDUOS'),jdecode(''),'/131402.html','true',[],'',''],
	['PAGE','136202',jdecode('Plan+de+la+vivienda+09+a+2012'),jdecode(''),'/136202.html','true',[],'',''],
	['PAGE','143702',jdecode('C.Mayores+Montolivete'),jdecode(''),'/143702.html','true',[],'',''],
	['PAGE','143744',jdecode('Octubre+Escola+de+Teatre'),jdecode(''),'/143744.html','true',[],'',''],
	['PAGE','145502',jdecode('Multas+y+puntos+en+carnet'),jdecode(''),'/145502.html','true',[],'',''],
	['PAGE','144802',jdecode('Suscripcion+a+nueva+Revista'),jdecode(''),'/144802.html','true',[],'',''],
	['PAGE','145523',jdecode('Cita+Previa+en+S.Social'),jdecode(''),'/145523.html','true',[],'',''],
	['PAGE','128902',jdecode('Fotos+Picassent'),jdecode(''),'/128902.html','true',[],'',''],
	['PAGE','18892',jdecode('Fotos+SC+2007'),jdecode(''),'/18892.html','true',[],'',''],
	['PAGE','104002',jdecode('Foto+SC+2008'),jdecode(''),'/104002.html','true',[],'',''],
	['PAGE','20301',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/20301.html','true',[],'',''],
	['PAGE','127402',jdecode('Comision+Socio-Sanitaria'),jdecode(''),'/127402.html','true',[],'',''],
	['PAGE','125202',jdecode('Recojida+de+enseres'),jdecode(''),'/125202.html','true',[],'',''],
	['PAGE','125223',jdecode('Ayuda+a+la+drogadiccion'),jdecode(''),'/125223.html','true',[],'',''],
	['PAGE','125502',jdecode('Taller+para+la+contratacion'),jdecode(''),'/125502.html','true',[],'',''],
	['PAGE','149935',jdecode('Para+los+necesitados'),jdecode(''),'/149935.html','true',[],'',''],
	['PAGE','11302',jdecode('Cual+es+tu+opinion%3F'),jdecode(''),'/11302.html','true',[],'',''],
	['PAGE','11303',jdecode('Leer+la+opinion+'),jdecode(''),'/11303.html','false',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Moonflight';
theSitetree.paletteFamily='708B50';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='446';
theSitetree.graphicsetId='500';
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: 			'Moonflight',
				paletteFamily: 	'708B50',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'446',
				graphicsetId: 	'500',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'476A1E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136202',
internalId:  '',
customField: '20090217-193937'
};
webappMappings['1002']=webappMappings['1002-11302aas010inx3tx']={
webappId:    '1002',
documentId:  '11302',
internalId:  '11302aas010inx3tx',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-199206830c82fcf9398080236cc01ba0']={
webappId:    '7060',
documentId:  '104002',
internalId:  '199206830c82fcf9398080236cc01ba0',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104002',
internalId:  '',
customField: '20080811-233925'
};
webappMappings['7060']=webappMappings['7060-c5ca8eda925547679ad8755d6c2f2932']={
webappId:    '7060',
documentId:  '128902',
internalId:  'c5ca8eda925547679ad8755d6c2f2932',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-e2564bf7d2f2d02d0b902cbd39b869dc']={
webappId:    '7060',
documentId:  '18892',
internalId:  'e2564bf7d2f2d02d0b902cbd39b869dc',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145523',
internalId:  '',
customField: '20090725-150818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58429',
internalId:  '',
customField: '20080418-164310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125202',
internalId:  '',
customField: '20081122-211130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20080418-171934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20871',
internalId:  '',
customField: '20081030-161348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18892',
internalId:  '',
customField: '20080611-233825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11302',
internalId:  '',
customField: '20060604-214635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144802',
internalId:  '',
customField: '20090628-160900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131402',
internalId:  '',
customField: '20090115-190215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93802',
internalId:  '',
customField: '20080612-002527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84602',
internalId:  '',
customField: '20090328-193608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128902',
internalId:  '',
customField: '20081123-144059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125502',
internalId:  '',
customField: '20081122-210905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82102',
internalId:  '',
customField: '20080508-001314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127402',
internalId:  '',
customField: '20081122-212042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125223',
internalId:  '',
customField: '20081122-210206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143744',
internalId:  '',
customField: '20090628-160029'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '82102',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143702',
internalId:  '',
customField: '20090628-154950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145502',
internalId:  '',
customField: '20090725-151023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149935',
internalId:  '',
customField: '20091217-205926'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INX3TX';
var companyName   = 'Asociacion+Vecinos+Distrito+26+Castellar-Oliveral+de+Valencia';
var htmlTitle	  = 'Asociacion+Vecinos+Castellar-Oliveral';
var metaKeywords  = 'barrio%2C+vecinos%2C+asociacion';
var metaContents  = 'Asociacion+vecinos';
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();
};

