/* [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','4606',jdecode('Inicio'),jdecode(''),'/4606.html','true',[],'',''],
	['PAGE','4771',jdecode('Fundaci%C3%B3n'),jdecode(''),'/4771/index.html','true',[ 
		['PAGE','4825',jdecode('Historia++asociaci%C3%B3n'),jdecode(''),'/4771/4825.html','true',[],'',''],
		['PAGE','4852',jdecode('Hermanamientos'),jdecode(''),'/4771/4852.html','true',[],'',''],
		['PAGE','4879',jdecode('Estatutos'),jdecode(''),'/4771/4879.html','true',[],'',''],
		['PAGE','6352',jdecode('Cortejo'),jdecode(''),'/4771/6352.html','true',[],'','']
	],'',''],
	['PAGE','4744',jdecode('Junta+de+Gobierno'),jdecode(''),'/4744.html','true',[],'',''],
	['PAGE','4906',jdecode('Asociados+o+Cofrades'),jdecode(''),'/4906/index.html','true',[ 
		['PAGE','41036',jdecode('Clases+o+categor%C3%ADas'),jdecode(''),'/4906/41036.html','true',[],'',''],
		['PAGE','5014',jdecode('Simples+cofrades'),jdecode(''),'/4906/5014.html','true',[],'',''],
		['PAGE','4960',jdecode('Cofrades+de+Honor'),jdecode(''),'/4906/4960.html','true',[],'',''],
		['PAGE','4933',jdecode('Fundadores+o+Mayordomos'),jdecode(''),'/4906/4933.html','true',[],'',''],
		['PAGE','4987',jdecode('Costaleros'),jdecode(''),'/4906/4987.html','true',[],'','']
	],'',''],
	['PAGE','12736',jdecode('Registro+de+cofrades'),jdecode(''),'/12736/index.html','true',[ 
		['PAGE','14436',jdecode('Formulario'),jdecode(''),'/12736/14436/index.html','true',[ 
			['PAGE','14468',jdecode('Formulario+%28follow+up+page%29'),jdecode(''),'/12736/14436/14468.html','false',[],'','']
		],'','']
	],'',''],
	['PAGE','4663',jdecode('Noticias'),jdecode(''),'/4663/index.html','true',[ 
		['PAGE','4690',jdecode('Calendario'),jdecode(''),'/4663/4690.html','true',[],'',''],
		['PAGE','4717',jdecode('Bolet%C3%ADn+asociaci%C3%B3n'),jdecode(''),'/4663/4717.html','true',[],'','']
	],'',''],
	['PAGE','7142',jdecode('R.Fotogr%C3%A1ficos'),jdecode(''),'/7142/index.html','true',[ 
		['PAGE','7511',jdecode('Fotos+Blanco+y+Negro'),jdecode(''),'/7142/7511.html','true',[],'',''],
		['PAGE','58436',jdecode('Semana+Santa+2010'),jdecode(''),'/7142/58436.html','true',[],'',''],
		['PAGE','8215',jdecode('CINCUENTENARIO'),jdecode(''),'/7142/8215.html','true',[],'',''],
		['PAGE','9367',jdecode('MS+2003'),jdecode(''),'/7142/9367.html','true',[],'','']
	],'',''],
	['PAGE','7374',jdecode('Libro+de+visitas'),jdecode(''),'/7374/index.html','true',[ 
		['PAGE','7375',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/7374/7375.html','false',[],'','']
	],'',''],
	['PAGE','14761',jdecode('Foro'),jdecode(''),'/14761.html','true',[],'',''],
	['PAGE','14156',jdecode('Enlaces'),jdecode(''),'/14156.html','true',[],'',''],
	['PAGE','16436',jdecode('Buzon+Estudiantes'),jdecode(''),'/16436.html','true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='echo';
theSitetree.paletteFamily='712A2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10624';
theSitetree.graphicsetId='10630';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'arsys',
  product: 'WSCSYSSSSLYTC2IR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'echo',
				paletteFamily: 	'712A2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10624',
				graphicsetId: 	'10630',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-7374aas010ined1k']={
webappId:    '1002',
documentId:  '7374',
internalId:  '7374aas010ined1k',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-b8b18bfeb061b881dc6d44c4d2cb7f2f']={
webappId:    '7060',
documentId:  '8215',
internalId:  'b8b18bfeb061b881dc6d44c4d2cb7f2f',
customField: 'language:es;country:ES;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4606',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7375',
internalId:  '',
customField: '20051228-193025'
};
webappMappings['1003']=webappMappings['1003-aas010ined1k10872a3697b']={
webappId:    '1003',
documentId:  '14761',
internalId:  'aas010ined1k10872a3697b',
customField: 'es:ES:'
};
webappMappings['7060']=webappMappings['7060-3b051f128939ec220df83c10f4088bc1']={
webappId:    '7060',
documentId:  '7511',
internalId:  '3b051f128939ec220df83c10f4088bc1',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-78ca36ecdca2baeb127a92ccbd8c1f41']={
webappId:    '7060',
documentId:  '9367',
internalId:  '78ca36ecdca2baeb127a92ccbd8c1f41',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4606',
internalId:  '',
customField: '20110323-195810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4771',
internalId:  '',
customField: '20081122-114120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4825',
internalId:  '',
customField: '20081212-110242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4852',
internalId:  '',
customField: '20060213-192358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4879',
internalId:  '',
customField: '20101112-114613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6352',
internalId:  '',
customField: '20081122-114801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7142',
internalId:  '',
customField: '20060101-130849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7511',
internalId:  '',
customField: '20051228-194843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8215',
internalId:  '',
customField: '20060503-212520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4744',
internalId:  '',
customField: '20081023-181218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4906',
internalId:  '',
customField: '20081024-122602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4933',
internalId:  '',
customField: '20081024-204804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4960',
internalId:  '',
customField: '20100115-140448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4987',
internalId:  '',
customField: '20081024-203217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5014',
internalId:  '',
customField: '20081024-131126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12736',
internalId:  '',
customField: '20060501-222541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14436',
internalId:  '',
customField: '20060501-222052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14468',
internalId:  '',
customField: '20060501-215904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4663',
internalId:  '',
customField: '20110323-200722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4690',
internalId:  '',
customField: '20100115-121202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4717',
internalId:  '',
customField: '20051228-192433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9367',
internalId:  '',
customField: '20060118-200807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7374',
internalId:  '',
customField: '20090206-113014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14761',
internalId:  '',
customField: '20090206-114834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14156',
internalId:  '',
customField: '20070317-144843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16436',
internalId:  '',
customField: '20090127-202342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41036',
internalId:  '',
customField: '20081024-190608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58436',
internalId:  '',
customField: '20100402-132707'
};
webappMappings['7008']=webappMappings['7008-6573']={
webappId:    '7008',
documentId:  '14436',
internalId:  '6573',
customField: 'language:es;country:ES;'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INED1K';
var companyName   = 'COF.+ESTUDIANTES';
var htmlTitle	  = 'cofradia+de+los+estudiantes+de+Elche';
var metaKeywords  = 'real+cofradia+de+los+estudiantes%2Ccofradia+de+los+estudiantes%2Cestudiantes%2C+elche+cofradia+de+la+sangre%2Ccorazon+de+jesus%2Ccofradia+de+la+sangre+de+elche%2Ccristo+de+la+penitencia%2Csemana+santa+de+elche%2Caliaga%2Cfamilia+aliaga';
var metaContents  = 'real+cofradia+de+los+estudiantes%2Ccofradia+de+los+estudiantes%2Cestudiantes%2C+elche+cofradia+de+la+sangre%2Ccorazon+de+jesus%2Ccofradia+de+la+sangre+de+elche%2Ccristo+de+la+penitencia%2Csemana+santa+de+elche%2Caliaga%2Cfamilia+aliaga';
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();
};

