/* [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','601',jdecode('Home'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','45901',jdecode('NORTZUK+GARA%3F'),jdecode(''), jdecode('%2F45901.html'), 'true',[],'',''],
	['PAGE','652',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''), jdecode('%2F652.html'), 'true',[],'',''],
	['PAGE','45922',jdecode('ZER+EGITEN+DUGU%3F'),jdecode(''), jdecode('%2F45922.html'), 'true',[],'',''],
	['PAGE','673',jdecode('%C2%BFQu%C3%A9+hacemos%3F'),jdecode(''), jdecode('%2F673.html'), 'true',[],'',''],
	['PAGE','49001',jdecode('KONTAKTUAK'),jdecode(''), jdecode('%2F49001%2Findex.html'), 'true',[ 
		['PAGE','49801',jdecode('Kontaktuak+%28follow+up+page%29'),jdecode(''), jdecode('%2F49001%2F49801.html'), 'false',[],'','']
	],'',''],
	['PAGE','16401',jdecode('Contacto'),jdecode(''), jdecode('%2F16401%2Findex.html'), 'true',[ 
		['PAGE','34601',jdecode('Cont%C3%A1ctanos+%28follow+up+page%29'),jdecode(''), jdecode('%2F16401%2F34601.html'), 'false',[],'','']
	],'',''],
	['PAGE','49022',jdecode('PARTE+HARTU'),jdecode(''), jdecode('%2F49022%2Findex.html'), 'true',[ 
		['PAGE','50901',jdecode('Parte+hartu+%28follow+up+page%29'),jdecode(''), jdecode('%2F49022%2F50901.html'), 'false',[],'','']
	],'',''],
	['PAGE','715',jdecode('Participa'),jdecode(''), jdecode('%2F715%2Findex.html'), 'true',[ 
		['PAGE','34901',jdecode('Colabora+%28follow+up+page%29'),jdecode(''), jdecode('%2F715%2F34901.html'), 'false',[],'','']
	],'',''],
	['PAGE','46090',jdecode('BERRIKUNTZAK'),jdecode(''), jdecode('%2F46090.html'), 'true',[],'',''],
	['PAGE','736',jdecode('Novedades'),jdecode(''), jdecode('%2F736.html'), 'true',[],'',''],
	['PAGE','46111',jdecode('AHOAZ+AHO'),jdecode(''), jdecode('%2F46111.html'), 'true',[],'',''],
	['PAGE','35401',jdecode('Nos+cuentan'),jdecode(''), jdecode('%2F35401.html'), 'true',[],'',''],
	['PAGE','46006',jdecode('KONTUAK+ARGI'),jdecode(''), jdecode('%2F46006.html'), 'true',[],'',''],
	['PAGE','757',jdecode('Cuentas+claras'),jdecode(''), jdecode('%2F757.html'), 'true',[],'',''],
	['PAGE','46027',jdecode('ALDIZKARIAK'),jdecode(''), jdecode('%2F46027.html'), 'true',[],'',''],
	['PAGE','799',jdecode('Revistas'),jdecode(''), jdecode('%2F799.html'), 'true',[],'',''],
	['PAGE','46048',jdecode('LOTUNEAK'),jdecode(''), jdecode('%2F46048.html'), 'true',[],'',''],
	['PAGE','14322',jdecode('Enlaces'),jdecode(''), jdecode('%2F14322.html'), 'true',[],'',''],
	['PAGE','49043',jdecode('SAREAK'),jdecode(''), jdecode('%2F49043.html'), 'true',[],'',''],
	['PAGE','31001',jdecode('Redes'),jdecode(''), jdecode('%2F31001.html'), 'true',[],'',''],
	['PAGE','56606',jdecode('Libro+de+visitas'),jdecode(''), jdecode('%2F56606%2Findex.html'), 'true',[ 
		['PAGE','56601',jdecode('Leer+el+libro+de+Visitas'),jdecode(''), jdecode('%2F56606%2F56601.html'), 'false',[],'','']
	],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='cutout';
theSitetree.paletteFamily='CEC8F8';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10611';
theSitetree.graphicsetId='10478';
theSitetree.contentColor='43637C';
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: 			'cutout',
				paletteFamily: 	'CEC8F8',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10611',
				graphicsetId: 	'10478',
				contentColor: 	'43637C',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20120130-134103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20110602-120850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20111028-145730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100520-120213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16401',
internalId:  '',
customField: '20090610-091649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20111201-231540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '799',
internalId:  '',
customField: '20111213-232713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20111104-150531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20111103-224647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20090622-111750'
};
webappMappings['7008']=webappMappings['7008-7207']={
webappId:    '7008',
documentId:  '16401',
internalId:  '7207',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-7208']={
webappId:    '7008',
documentId:  '49001',
internalId:  '7208',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20120103-122316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45901',
internalId:  '',
customField: '20100520-120351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45922',
internalId:  '',
customField: '20111110-232824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49001',
internalId:  '',
customField: '20090610-091729'
};
webappMappings['7008']=webappMappings['7008-7209']={
webappId:    '7008',
documentId:  '49022',
internalId:  '7209',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49022',
internalId:  '',
customField: '20090622-103057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20090622-113123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46006',
internalId:  '',
customField: '20111201-231820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46027',
internalId:  '',
customField: '20111213-232740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46048',
internalId:  '',
customField: '20111104-151505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49043',
internalId:  '',
customField: '20090622-111649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46090',
internalId:  '',
customField: '20111027-204441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46111',
internalId:  '',
customField: '20120103-122400'
};
webappMappings['1002']=webappMappings['1002-56606aars20invyoj']={
webappId:    '1002',
documentId:  '56606',
internalId:  '56606aars20invyoj',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49801',
internalId:  '',
customField: '20090610-091215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56606',
internalId:  '',
customField: '20090622-113123'
};
webappMappings['7008']=webappMappings['7008-7206']={
webappId:    '7008',
documentId:  '715',
internalId:  '7206',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34601',
internalId:  '',
customField: '20090421-181947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34901',
internalId:  '',
customField: '20090421-182453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50901',
internalId:  '',
customField: '20090610-092737'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INVYOJ';
var companyName   = 'EGOAIZIA++++Asociaci%C3%B3n+para+la+Cooperaci%C3%B3n+al+Desarrollo';
var htmlTitle	  = 'www.egoaizia.org';
var metaKeywords  = 'EGOAIZIA+';
var metaContents  = 'Cooperaci%C3%B3n+al+desarrollo++++EGOAIZIA';
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();
};

