/* [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('ABH+2010'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('MARATON+ACUATICO'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','473',jdecode('Misi%C3%B3n'),jdecode(''),'/452/473.html','true',[],'',''],
		['PAGE','494',jdecode('Visi%C3%B3n'),jdecode(''),'/452/494.html','true',[],'',''],
		['PAGE','515',jdecode('Entrenadores+con+ABH'),jdecode(''),'/452/515.html','true',[],'','']
	],'',''],
	['PAGE','683',jdecode('ALIANZAS'),jdecode(''),'/683/index.html','true',[ 
		['PAGE','704',jdecode('Equipos'),jdecode(''),'/683/704.html','true',[],'',''],
		['PAGE','725',jdecode('Nadadores'),jdecode(''),'/683/725.html','true',[],'','']
	],'',''],
	['PAGE','662',jdecode('MEMORIAS'),jdecode(''),'/662.html','true',[],'',''],
	['PAGE','97201',jdecode('DATOS'),jdecode(''),'/97201.html','true',[],'',''],
	['PAGE','557',jdecode('CONVOCATORIAS'),jdecode(''),'/557/index.html','true',[ 
		['PAGE','123601',jdecode('GRUPO+X+EDAD+y+PRO%26%23x27%3BS'),jdecode(''),'/557/123601.html','true',[],'',''],
		['PAGE','123622',jdecode('GRAN+MICRO+'),jdecode(''),'/557/123622.html','true',[],'',''],
		['PAGE','153201',jdecode('MICRO+BEBE'),jdecode(''),'/557/153201.html','true',[],'',''],
		['PAGE','51901',jdecode('Amigos+siempre'),jdecode(''),'/557/51901.html','true',[],'','']
	],'',''],
	['PAGE','599',jdecode('RECORDS'),jdecode(''),'/599.html','true',[],'',''],
	['PAGE','57301',jdecode('VARIAS+IMAGENES++'),jdecode(''),'/57301.html','true',[],'',''],
	['PAGE','11601',jdecode('ARTICULOS'),jdecode(''),'/11601/index.html','true',[ 
		['PAGE','16801',jdecode('Estableciendo+objetivos'),jdecode(''),'/11601/16801.html','true',[],'',''],
		['PAGE','23922',jdecode('Nataci%C3%B3n+en+aguas+abiertas'),jdecode(''),'/11601/23922.html','true',[],'',''],
		['PAGE','40801',jdecode('Que+son+las+aguas+abiertas%3F'),jdecode(''),'/11601/40801.html','true',[],'','']
	],'',''],
	['PAGE','788',jdecode('ENLACES'),jdecode(''),'/788.html','true',[],'',''],
	['PAGE','29101',jdecode('AMIG%40S'),jdecode(''),'/29101.html','true',[],'',''],
	['PAGE','746',jdecode('VOTAS%3F%3F%3F'),jdecode(''),'/746/index.html','true',[ 
		['PAGE','13301',jdecode('Jueces+%2F+Arbitros'),jdecode(''),'/746/13301.html','true',[],'','']
	],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Nebula';
theSitetree.paletteFamily='4C8331';
theSitetree.keyvisualId='8806';
theSitetree.keyvisualName='kv_8806.jpg';
theSitetree.fontsetId='17095';
theSitetree.graphicsetId='12476';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7CB75F';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nebula',
				paletteFamily: 	'4C8331',
				keyvisualId: 	'8806',
				keyvisualName: 	'kv_8806.jpg',
				fontsetId: 		'17095',
				graphicsetId: 	'12476',
				contentColor: 	'FFFFFF',
				contentBGColor: '7CB75F',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-5a4d88d8913cbf435b7fe5cbb1f3d569']={
webappId:    '7060',
documentId:  '57301',
internalId:  '5a4d88d8913cbf435b7fe5cbb1f3d569',
customField: 'language:es;country:ES;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3347619']={
webappId:    '1501',
documentId:  '401',
internalId:  '3347619',
customField: '1501'
};
webappMappings['7050']=webappMappings['7050-360']={
webappId:    '7050',
documentId:  '11601',
internalId:  '360',
customField: 'language:es;country:ES;'
};
webappMappings['7005']=webappMappings['7005-218']={
webappId:    '7005',
documentId:  '746',
internalId:  '218',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-1915']={
webappId:    '7008',
documentId:  '662',
internalId:  '1915',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-1f650625bce063345fae5e8223aba721']={
webappId:    '7060',
documentId:  '29101',
internalId:  '1f650625bce063345fae5e8223aba721',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100628-200830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100415-212445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090306-232848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100826-204014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100415-212554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20100826-204055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20090306-233432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '725',
internalId:  '',
customField: '20100415-212853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20100629-183741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97201',
internalId:  '',
customField: '20100415-213115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20100415-213307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123601',
internalId:  '',
customField: '20100629-185315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123622',
internalId:  '',
customField: '20100628-195155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51901',
internalId:  '',
customField: '20100826-204256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20100628-195659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57301',
internalId:  '',
customField: '20070620-093353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20090309-210339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20070401-175608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23922',
internalId:  '',
customField: '20070322-215856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20070501-184302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '788',
internalId:  '',
customField: '20100415-214129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20090309-205404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20090309-204653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20090309-205043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153201',
internalId:  '',
customField: '20100628-195648'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN3QNT';
var companyName   = 'PROMOTORA+DEPORTIVA+Y+CULTURAL+ABH';
var htmlTitle	  = 'maratonacuaticoabh';
var metaKeywords  = 'maratonacuaticoabh%2C+maraton%2C+acu%C3%A1tico%2C+abh%2C+ABH%2C+nataci%C3%B3n%2C+aguas%2C+abiertas%2C+fondo%2C+resistencia%2C+swuim%2C+open%2C+water%2C+fina%2C+resistencia%2C+acuatica';
var metaContents  = 'Maraton+Acu%C3%A1tico+ABH+%2F+Aguas+Abiertas+ABH';
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();
};
