/* [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','1822',jdecode('Quienes+somos'),jdecode(''),'/1822.html','true',[],'',''],
	['PAGE','1873',jdecode('Nuestro+equipo'),jdecode(''),'/1873.html','true',[],'',''],
	['PAGE','1894',jdecode('Nuestra+misi%C3%B3n'),jdecode(''),'/1894.html','true',[],'',''],
	['PAGE','1915',jdecode('Terapias+Especializadas'),jdecode(''),'/1915.html','true',[],'',''],
	['PAGE','1936',jdecode('Escuela+Terap%C3%A9utica'),jdecode(''),'/1936.html','true',[],'',''],
	['PAGE','1957',jdecode('Integraci%C3%B3n+Escolar'),jdecode(''),'/1957/index.html','true',[ 
		['PAGE','15201',jdecode('Intervenci%C3%B3n+Temprana'),jdecode(''),'/1957/15201.html','true',[],'',''],
		['PAGE','15222',jdecode('Transici%C3%B3n+e+Integraci%C3%B3n'),jdecode(''),'/1957/15222.html','true',[],'',''],
		['PAGE','15243',jdecode('Aprendizaje+y+Vida+Pr%C3%A1ctica'),jdecode(''),'/1957/15243.html','true',[],'','']
	],'',''],
	['PAGE','1978',jdecode('Trabajo+en+casa'),jdecode(''),'/1978.html','true',[],'',''],
	['PAGE','1999',jdecode('Centro+de+Autismo'),jdecode(''),'/1999.html','true',[],'',''],
	['PAGE','14001',jdecode('Curso+de+Verano'),jdecode(''),'/14001.html','true',[],'',''],
	['PAGE','14022',jdecode('%C2%A1Novedades%21'),jdecode(''),'/14022.html','true',[],'',''],
	['PAGE','2020',jdecode('Programa+de+becas'),jdecode(''),'/2020/index.html','true',[ 
		['PAGE','9801',jdecode('Ficha+de+Donativo'),jdecode(''),'/2020/9801.html','true',[],'','']
	],'',''],
	['PAGE','2041',jdecode('Cont%C3%A1ctanos'),jdecode(''),'/2041.html','true',[],'',''],
	['PAGE','2062',jdecode('Voluntariado'),jdecode(''),'/2062.html','true',[],'',''],
	['PAGE','14601',jdecode('Eventos'),jdecode(''),'/14601.html','true',[],'',''],
	['PAGE','2083',jdecode('Libro+de+visitas'),jdecode(''),'/2083.html','true',[],'',''],
	['PAGE','2104',jdecode('Boletin+'),jdecode(''),'/2104/index.html','true',[ 
		['PAGE','9822',jdecode('Julio+-+Agosto'),jdecode(''),'/2104/9822.html','true',[],'',''],
		['PAGE','9843',jdecode('Septiembre+-+Octubre'),jdecode(''),'/2104/9843.html','true',[],'',''],
		['PAGE','9864',jdecode('Noviembre+-+Diciembre'),jdecode(''),'/2104/9864.html','true',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Look';
theSitetree.paletteFamily='377AD5';
theSitetree.keyvisualId='11922';
theSitetree.keyvisualName='kv_11922.jpg';
theSitetree.fontsetId='33202';
theSitetree.graphicsetId='14096';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='8cc4f7';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Look',
				paletteFamily: 	'377AD5',
				keyvisualId: 	'11922',
				keyvisualName: 	'kv_11922.jpg',
				fontsetId: 		'33202',
				graphicsetId: 	'14096',
				contentColor: 	'000000',
				contentBGColor: '8cc4f7',
				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['1002']=webappMappings['1002-2083avf340i7cxej']={
webappId:    '1002',
documentId:  '2083',
internalId:  '2083avf340i7cxej',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1822',
internalId:  '',
customField: '20100504-125145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2083',
internalId:  '',
customField: '20100503-230421'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1822',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-2523603']={
webappId:    '1501',
documentId:  '1822',
internalId:  '2523603',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20100504-173034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20100504-123421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20100506-114719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20100503-230550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20100503-230615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20100503-230641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20100503-230708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2020',
internalId:  '',
customField: '20100503-230730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2041',
internalId:  '',
customField: '20100504-125002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2062',
internalId:  '',
customField: '20100504-173943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2104',
internalId:  '',
customField: '20100503-231354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20100513-121245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9822',
internalId:  '',
customField: '20100503-231955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9843',
internalId:  '',
customField: '20100503-231955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9864',
internalId:  '',
customField: '20100503-231955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20100721-065240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20100513-123642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20100513-124149'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CXEJ';
var companyName   = 'APyRE%2C+Apoyo+y+Rehabilitaci%C3%B3n%2C+A.C.';
var htmlTitle	  = 'APyRE+Apoyo+y+Rehabilitaci%C3%B3n%2C+A.C.';
var metaKeywords  = '';
var metaContents  = '';
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();
};
