/* [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','4498',jdecode('Bienvenidos%21%21%21'),jdecode(''),'/4498.html','true',[],'',''],
	['PAGE','49585',jdecode('Santpetardo+2010'),jdecode(''),'/49585.html','true',[],'',''],
	['PAGE','43285',jdecode('X+Rallie+motos+antigues+'),jdecode(''),'/43285.html','true',[],'',''],
	['PAGE','4555',jdecode('Rinc%C3%B3n+del+presidente'),jdecode(''),'/4555/index.html','true',[ 
		['PAGE','17885',jdecode('Rac%C3%B3+del+president'),jdecode(''),'/4555/17885.html','true',[],'','']
	],'',''],
	['PAGE','4636',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/4636/index.html','true',[ 
		['PAGE','4690',jdecode('Historia'),jdecode(''),'/4636/4690.html','true',[],'',''],
		['PAGE','4717',jdecode('D%C3%B3nde+encontrarnos'),jdecode(''),'/4636/4717.html','true',[],'','']
	],'',''],
	['PAGE','34585',jdecode('Cr%C3%B3nicas'),jdecode(''),'/34585.html','true',[],'',''],
	['PAGE','10785',jdecode('Gente+de+Santpetardo'),jdecode(''),'/10785.html','true',[],'',''],
	['PAGE','4744',jdecode('Hacerse+miembro'),jdecode(''),'/4744/index.html','true',[ 
		['PAGE','14085',jdecode('Hacerse+miembro+%28follow+up+page%29'),jdecode(''),'/4744/14085.html','false',[],'',''],
		['PAGE','4771',jdecode('Rutas+pintorescas'),jdecode(''),'/4744/4771.html','true',[],'','']
	],'',''],
	['PAGE','10485',jdecode('Vila+de+Santpedor'),jdecode(''),'/10485.html','true',[],'',''],
	['PAGE','48385',jdecode('fotos'),jdecode(''),'/48385/index.html','true',[ 
		['PAGE','6047',jdecode('fotos+estru%C3%A7os+2007'),jdecode(''),'/48385/6047.html','true',[],'',''],
		['PAGE','43585',jdecode('fotos+estru%C3%A7os+2008'),jdecode(''),'/48385/43585.html','true',[],'',''],
		['PAGE','10085',jdecode('fotos+santpetardo+2006'),jdecode(''),'/48385/10085.html','true',[],'',''],
		['PAGE','43606',jdecode('fotos+santpetardo+2007'),jdecode(''),'/48385/43606.html','true',[],'',''],
		['PAGE','56385',jdecode('fotos+santpetardo+2008'),jdecode(''),'/48385/56385.html','true',[],'','']
	],'',''],
	['PAGE','4798',jdecode('Contactar'),jdecode(''),'/4798/index.html','true',[ 
		['PAGE','4825',jdecode('Direcciones'),jdecode(''),'/4798/4825.html','true',[],'','']
	],'',''],
	['PAGE','47885',jdecode('Proximas+concentraciones'),jdecode(''),'/47885.html','true',[],'',''],
	['PAGE','57585',jdecode('Estru%C3%A7os+2009'),jdecode(''),'/57585.html','true',[],'',''],
	['PAGE','14385',jdecode('Inscripci%C3%B3n+SANTPETARDO+2010'),jdecode(''),'/14385/index.html','true',[ 
		['PAGE','14785',jdecode('Inscripci%C3%B3n+Santpetardo+2007+%28follow+up+page%29'),jdecode(''),'/14385/14785.html','false',[],'','']
	],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='2026';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='339';
theSitetree.graphicsetId='391';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='990000';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Activate',
				paletteFamily: 	'990000',
				keyvisualId: 	'2026',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'339',
				graphicsetId: 	'391',
				contentColor: 	'FFFFFF',
				contentBGColor: '990000',
				a_color: 		'990000',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4498',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3691051']={
webappId:    '1501',
documentId:  '4498',
internalId:  '3691051',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-85c22abafc162cbaac6e965a44e0515f']={
webappId:    '7060',
documentId:  '6047',
internalId:  '85c22abafc162cbaac6e965a44e0515f',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-ec0ebb7e2d94c5c05e0648cd40a2063c']={
webappId:    '7060',
documentId:  '10085',
internalId:  'ec0ebb7e2d94c5c05e0648cd40a2063c',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-9be08eb93661c95cf74057e4b6a92ca5']={
webappId:    '7060',
documentId:  '10785',
internalId:  '9be08eb93661c95cf74057e4b6a92ca5',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-9386']={
webappId:    '7008',
documentId:  '14385',
internalId:  '9386',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4498',
internalId:  '',
customField: '20100529-200701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4555',
internalId:  '',
customField: '20080924-215207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17885',
internalId:  '',
customField: '20080924-214849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4636',
internalId:  '',
customField: '20070826-221113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43585',
internalId:  '',
customField: '20080303-222617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4690',
internalId:  '',
customField: '20080204-224754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4717',
internalId:  '',
customField: '20080204-230619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10785',
internalId:  '',
customField: '20080102-215248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4744',
internalId:  '',
customField: '20070519-224000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14085',
internalId:  '',
customField: '20070830-173107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4771',
internalId:  '',
customField: '20080105-194005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10485',
internalId:  '',
customField: '20070916-181113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34585',
internalId:  '',
customField: '20080119-093745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43285',
internalId:  '',
customField: '20080924-225656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6047',
internalId:  '',
customField: '20080102-215125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10085',
internalId:  '',
customField: '20070916-122132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43606',
internalId:  '',
customField: '20080322-083121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47885',
internalId:  '',
customField: '20080924-215634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14385',
internalId:  '',
customField: '20100527-102231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14785',
internalId:  '',
customField: '20070830-180444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4798',
internalId:  '',
customField: '20080510-125044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4825',
internalId:  '',
customField: '20080114-215610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48385',
internalId:  '',
customField: '20081004-225728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49585',
internalId:  '',
customField: '20100527-102515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56385',
internalId:  '',
customField: '20081004-231110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57585',
internalId:  '',
customField: '20090304-084502'
};
webappMappings['7008']=webappMappings['7008-9385']={
webappId:    '7008',
documentId:  '4744',
internalId:  '9385',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INEHVV';
var companyName   = 'SANTPETARDO.COM';
var htmlTitle	  = 'PENYA+SANTPETARDO';
var metaKeywords  = '';
var metaContents  = '';
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();
};

