/* [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','501',jdecode('Inicio'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('%C2%BFQUIENES+SOMOS%3F'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','38001',jdecode('Preinscripci%C3%B3n'),jdecode(''),'/38001.html','true',[],'',''],
	['PAGE','21301',jdecode('Servicios+y+productos'),jdecode(''),'/21301.html','true',[],'',''],
	['PAGE','51701',jdecode('Ver+promociones+'),jdecode(''),'/51701.html','true',[],'',''],
	['PAGE','21701',jdecode('Actividades'),jdecode(''),'/21701.html','true',[],'',''],
	['PAGE','657',jdecode('Horarios+de+actividades'),jdecode(''),'/657.html','true',[],'',''],
	['PAGE','18701',jdecode('SPA+balneario+urbano'),jdecode(''),'/18701.html','true',[],'',''],
	['PAGE','50001',jdecode('FOTOS'),jdecode(''),'/50001/index.html','true',[ 
		['PAGE','18601',jdecode('Fotos+Millennium'),jdecode(''),'/50001/18601.html','true',[],'',''],
		['PAGE','40001',jdecode('Fotos+Fiestas+Millennium'),jdecode(''),'/50001/40001.html','true',[],'','']
	],'',''],
	['PAGE','23701',jdecode('Blog'),jdecode(''),'/23701.html','true',[],'',''],
	['PAGE','26201',jdecode('Bolet%C3%ADn+electronico'),jdecode(''),'/26201/index.html','true',[ 
		['PAGE','26601',jdecode('Bolet%C3%ADn+electronico+%28follow+up+page%29'),jdecode(''),'/26201/26601.html','false',[],'','']
	],'',''],
	['PAGE','45001',jdecode('Noticias'),jdecode(''),'/45001.html','true',[],'',''],
	['PAGE','636',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/636.html','true',[],'',''],
	['PAGE','23601',jdecode('Mapa+de+acceso'),jdecode(''),'/23601.html','true',[],'',''],
	['PAGE','45801',jdecode('SOMOS+VERDES'),jdecode(''),'/45801.html','true',[],'',''],
	['PAGE','25001',jdecode('Franquicias'),jdecode(''),'/25001.html','true',[],'',''],
	['PAGE','25022',jdecode('MSC+Consulting'),jdecode(''),'/25022.html','true',[],'',''],
	['PAGE','25701',jdecode('%C2%BFquieres+trabajar+aqu%C3%AD%3F'),jdecode(''),'/25701/index.html','true',[ 
		['PAGE','26101',jdecode('%C2%BFquieres+trabajar+aqu%C3%AD%3F+%28follow+up+page%29'),jdecode(''),'/25701/26101.html','false',[],'','']
	],'',''],
	['PAGE','678',jdecode('Enlaces+de+inter%C3%A9s'),jdecode(''),'/678.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Konzept';
theSitetree.paletteFamily='6C05A7';
theSitetree.keyvisualId='1673';
theSitetree.keyvisualName='sport.jpg';
theSitetree.fontsetId='119';
theSitetree.graphicsetId='139';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Konzept',
				paletteFamily: 	'6C05A7',
				keyvisualId: 	'1673',
				keyvisualName: 	'sport.jpg',
				fontsetId: 		'119',
				graphicsetId: 	'139',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'6C05A7',
				b_color: 		'C8D0ED',
				c_color: 		'000000',
				d_color: 		'15094B',
				e_color: 		'C5B39F',
				f_color: 		'900B4D',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20091005-110156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100628-140043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20090924-072214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20090924-064248'
};
webappMappings['7060']=webappMappings['7060-00606973e9c501c3c3b869085b1dc909']={
webappId:    '7060',
documentId:  '18601',
internalId:  '00606973e9c501c3c3b869085b1dc909',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20090924-204925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20100525-091530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21301',
internalId:  '',
customField: '20090925-080604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20090923-180334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21701',
internalId:  '',
customField: '20090929-122722'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '23601',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-9397214']={
webappId:    '1501',
documentId:  '501',
internalId:  '9397214',
customField: '1501'
};
webappMappings['7050']=webappMappings['7050-5759']={
webappId:    '7050',
documentId:  '23701',
internalId:  '5759',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20090929-122441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20100130-105903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20090924-201436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25022',
internalId:  '',
customField: '20090924-201516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20100507-210949'
};
webappMappings['7008']=webappMappings['7008-6594']={
webappId:    '7008',
documentId:  '26201',
internalId:  '6594',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26201',
internalId:  '',
customField: '20090924-204600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20090924-073749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20090924-073355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38001',
internalId:  '',
customField: '20100308-100737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50001',
internalId:  '',
customField: '20091214-105724'
};
webappMappings['7060']=webappMappings['7060-5d26ef680a4187ace0d90da3e1a97d32']={
webappId:    '7060',
documentId:  '40001',
internalId:  '5d26ef680a4187ace0d90da3e1a97d32',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40001',
internalId:  '',
customField: '20091215-090155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45001',
internalId:  '',
customField: '20100728-121142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45801',
internalId:  '',
customField: '20091113-090034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51701',
internalId:  '',
customField: '20091221-150425'
};
webappMappings['7008']=webappMappings['7008-6593']={
webappId:    '7008',
documentId:  '25701',
internalId:  '6593',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INLRTT';
var companyName   = 'MILLENNIUM+Health+%26+Fitness+Center';
var htmlTitle	  = 'Gimnasio+Millennium+Zaragoza%2C+health+fitness+center+Zaragoza%2C+el+mejor+gimnasio+de+Zaragoza.';
var metaKeywords  = 'gimnasio%2C+zaragoza%2C+fitness%2C+aerobic%2C+spinning%2C+bodycombat%2C+bodypump%2C+espalda+sana%2C+yoga%2C+pilates%2C+bodybalance%2C+bodyvive%2C+calidad%2C+delicias%2C+romareda%2C+GIMNASIOS%2C+deporte%2C+';
var metaContents  = 'La+web+del+mejor+gimnasio+y+fitness+center+de+Zaragoza.+Gimnasio+certificado+ISO+9001%3A2008.';
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();
};
