/* [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','5101',jdecode('Home%2FInicio'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','5152',jdecode('Como+llegar%2FFind+us'),jdecode(''),'/5152.html','true',[],'',''],
	['PAGE','5173',jdecode('El+equipo%2FOur+team'),jdecode(''),'/5173.html','true',[],'',''],
	['PAGE','5194',jdecode('Team-Building%2Fcolegios%2Fgrupos'),jdecode(''),'/5194.html','true',[],'',''],
	['PAGE','5215',jdecode('Cont%C3%A1ctenos%2FContact+us'),jdecode(''),'/5215.html','true',[],'',''],
	['PAGE','5236',jdecode('Enlaces+de+inter%C3%A9s%2Flinks'),jdecode(''),'/5236.html','true',[],'',''],
	['PAGE','5257',jdecode('Precios%2FPrices'),jdecode(''),'/5257.html','true',[],'',''],
	['PAGE','5278',jdecode('Actividades%2FActivities'),jdecode(''),'/5278.html','true',[],'',''],
	['PAGE','5299',jdecode('Cursos%2FTrainings'),jdecode(''),'/5299.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Meadow';
theSitetree.paletteFamily='0000BB';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10703';
theSitetree.graphicsetId='10949';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='9FD796';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Meadow',
				paletteFamily: 	'0000BB',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10703',
				graphicsetId: 	'10949',
				contentColor: 	'000000',
				contentBGColor: '9FD796',
				a_color: 		'6EC262',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20100721-154407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5236',
internalId:  '',
customField: '20100630-103841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5152',
internalId:  '',
customField: '20100701-093627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5173',
internalId:  '',
customField: '20100608-060036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5194',
internalId:  '',
customField: '20100608-061258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5215',
internalId:  '',
customField: '20081008-143610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5257',
internalId:  '',
customField: '20100711-223453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5278',
internalId:  '',
customField: '20100711-225202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5299',
internalId:  '',
customField: '20100608-060453'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN306Z';
var companyName   = 'CLUB+H%C3%8DPICO+MAIGM%C3%93';
var htmlTitle	  = 'Paseos+a+Caballo+y+Rutas+Ecuestres%2C+Formaci%C3%B3n+Manejo+Natural+y+Doma+m%C3%A9todo+Parelli%2C+jugando+con+los+amigos+m%C3%A1s+antiguos+del+hombre.+Aprender+a+comunicar+con+el+Caballo';
var metaKeywords  = 'h%C3%ADpico+h%C3%ADpica+riding+stable+mountain+sierra+maigm%C3%B3+alicante+rutas+hacking+excursiones+paseos+horses+walks+cursos+caballos+viajes+holiday+centro+deportivo+ecuestre+ecuestrian+sportive+caballo+equitacion+terapeutica+equidos+doma+salto+jumping+volteo+vaulting+clases+school+terapia+pupilaje+cumplea%C3%B1os+birthday+present+journey+jornadas+actividades+activity+grupos+empresas+teambuiling+colegios+escolares+entorno+manejo+natural+surrounds+amigos+friends+vivir+experiencias+miedo+%C3%BAnica+%C3%BAnico+personas+tibi+pantano+dam+oferta+servicios+vistas+impresionantes+precios+naturaleza+orientacion+deportiva+montar+familiar+relajaci%C3%B3n+bienestar+comunicaci%C3%B3n+infantil+ni%C3%B1os+jinete+turismo+verano+diario+rural+horsemanship++metaname%3Dverify-v1content%3DYVbrJwo2s%2FHx%2FCsammu11e9sMAHRJdobM4BCD8Cskys%3D+%2F';
var metaContents  = 'El+Club+Hipico+Maigmo+organiza%3B+Paseos+a+Caballo%2C+Rutas+Ecuestres%2C+Cursos+de+Convivencia%2C+Clases%2C+para+familias%2C+novios%2C+amigos%2C+colegios+o+grupos.+Teambuilding+o+Intensivos%2C+Equitaci%C3%B3n+Terape%C3%BAtica+o+Hipoterapia%2C+Doma+en+manejo+natural+m%C3%A9todo+cuerpo+a+cuerpo+y+parelli%2C+Salto%2C+Volteo%2C+Pupilaje%2C+Caballos+en+semi-libertad%2C+Cumplea%C3%B1os%2C+Eventos.+Nuestro+lema+es+considerar+el+caballo+como+al+amigo+m%C3%A1s+antiguo+del+hombre+y+vivir+con+el+experiencias+%C3%BAnicas+para+personas+%C3%BAnicas.+La+sierra+del+Maigm%C3%B3+y+el+pantano+nos+ofrecen+unas+vistas+impresionantes%2C+nos+ubicamos+a+tan+solo+15+minutos+desde+la+Universidad+Alicante+en+la+localidad+de+Tibi.';
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();
};
