/* [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','4556',jdecode('P%C3%81GINA+PRINCIPAL'),jdecode(''),'/4556.html','true',[],'',''],
	['PAGE','296331',jdecode('BLOG+%22QUO+VADIS%22'),jdecode(''),'/296331.html','true',[],'',''],
	['PAGE','187631',jdecode('ACTUALIZATE+%40%40%40'),jdecode(''),'/187631/index.html','true',[ 
		['PAGE','191131',jdecode('ACTUALIZATE+%40%40%40+%28follow+up+page%29'),jdecode(''),'/187631/191131.html','false',[],'','']
	],'',''],
	['PAGE','128531',jdecode('RENOVACI%C3%93N'),jdecode(''),'/128531/index.html','true',[ 
		['PAGE','128659',jdecode('RENOVACI%C3%93N+%28follow+up+page%29'),jdecode(''),'/128531/128659.html','false',[],'','']
	],'',''],
	['PAGE','4903',jdecode('LA+ASOCIACION'),jdecode(''),'/4903.html','true',[],'',''],
	['PAGE','295331',jdecode('FOTOS'),jdecode(''),'/295331/index.html','true',[ 
		['PAGE','44902',jdecode('LA+TORTA'),jdecode(''),'/295331/44902.html','true',[],'',''],
		['PAGE','276631',jdecode('CARNAVALES+2010'),jdecode(''),'/295331/276631.html','true',[],'','']
	],'',''],
	['PAGE','52625',jdecode('MANDAR+FOTOS'),jdecode(''),'/52625.html','true',[],'',''],
	['PAGE','51625',jdecode('NOTICIAS+FIESTAS'),jdecode(''),'/51625.html','true',[],'',''],
	['PAGE','42418',jdecode('LIBRO+DE+VISITAS'),jdecode(''),'/42418/index.html','true',[ 
		['PAGE','42419',jdecode('Leer+Libro+de+Visitas'),jdecode(''),'/42418/42419.html','false',[],'',''],
		['PAGE','256631',jdecode('HACEMOS+HISTOR%C3%8DA'),jdecode(''),'/42418/256631.html','true',[],'','']
	],'',''],
	['PAGE','5092',jdecode('BUZON+Sugerencias'),jdecode(''),'/5092/index.html','true',[ 
		['PAGE','5426',jdecode('Buzon+de+Sugerencias+%28follow+up+page%29'),jdecode(''),'/5092/5426.html','false',[],'','']
	],'',''],
	['PAGE','49135',jdecode('FORO+PUBLICO'),jdecode(''),'/49135.html','true',[],'',''],
	['PAGE','45581',jdecode('MAPA+DE+ACCESO'),jdecode(''),'/45581.html','true',[],'',''],
	['PAGE','130220',jdecode('GPS'),jdecode(''),'/130220.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Zoe';
theSitetree.paletteFamily='B06021';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='409';
theSitetree.graphicsetId='457';
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: 			'Zoe',
				paletteFamily: 	'B06021',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'409',
				graphicsetId: 	'457',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'B76301',
				e_color: 		'794202',
				f_color: 		'F5E204',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-6455']={
webappId:    '7008',
documentId:  '128531',
internalId:  '6455',
customField: 'language:es;country:ES;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '296331',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-42418aas010inev51']={
webappId:    '1002',
documentId:  '42418',
internalId:  '42418aas010inev51',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '296331',
internalId:  '1501',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '45581',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['7008']=webappMappings['7008-6454']={
webappId:    '7008',
documentId:  '5092',
internalId:  '6454',
customField: 'language:es;country:ES;'
};
webappMappings['7050']=webappMappings['7050-5730']={
webappId:    '7050',
documentId:  '296331',
internalId:  '5730',
customField: 'language:es;country:ES;'
};
webappMappings['1003']=webappMappings['1003-aas010inev51110ae5c2f1d']={
webappId:    '1003',
documentId:  '49135',
internalId:  'aas010inev51110ae5c2f1d',
customField: 'es:ES:'
};
webappMappings['7008']=webappMappings['7008-6456']={
webappId:    '7008',
documentId:  '187631',
internalId:  '6456',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-7eff871dbd1c36364161a8f8de54f8c0']={
webappId:    '7060',
documentId:  '44902',
internalId:  '7eff871dbd1c36364161a8f8de54f8c0',
customField: 'language:es;country:ES;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '130220',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20100722-203452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128531',
internalId:  '',
customField: '20080905-225012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128659',
internalId:  '',
customField: '20070505-132318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4903',
internalId:  '',
customField: '20100502-210614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '295331',
internalId:  '',
customField: '20100722-132814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '256631',
internalId:  '',
customField: '20090526-205509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '296331',
internalId:  '',
customField: '20100722-202208'
};
webappMappings['7060']=webappMappings['7060-6b642f7cdf3541aae240a591b8cb63b2']={
webappId:    '7060',
documentId:  '276631',
internalId:  '6b642f7cdf3541aae240a591b8cb63b2',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44902',
internalId:  '',
customField: '20070805-002035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '276631',
internalId:  '',
customField: '20100316-212135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52625',
internalId:  '',
customField: '20070325-161900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51625',
internalId:  '',
customField: '20090515-174636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42418',
internalId:  '',
customField: '20071216-144318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5092',
internalId:  '',
customField: '20070218-140141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5426',
internalId:  '',
customField: '20070128-213024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49135',
internalId:  '',
customField: '20081218-142439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45581',
internalId:  '',
customField: '20100318-122017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130220',
internalId:  '',
customField: '20070527-170935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '187631',
internalId:  '',
customField: '20080210-170338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42419',
internalId:  '',
customField: '20080114-205932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191131',
internalId:  '',
customField: '20080210-170232'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INEV51';
var companyName   = '+++++++++++ASOC.+CULTURAL++%22QUO-VADIS%22';
var htmlTitle	  = '';
var metaKeywords  = '%22fuenterrobles%22+%22quovadis%22+quo+vadis+baile+carnaval+discoteca+movil+valencia+asociacion+cultura+quovadis+fiesta+%22quo+vadis%22+%22utiel-requena%22';
var metaContents  = 'asociacion+cultural+quovadis+de+fuenterrobles';
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();
};
