/* [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','7701',jdecode('Principal'),jdecode(''), jdecode('%2F7701.html'), 'true',[],'',''],
	['PAGE','46612',jdecode('Novedades'),jdecode(''), jdecode('%2F46612.html'), 'true',[],'',''],
	['PAGE','13601',jdecode('Qui%C3%A9nes+somos'),jdecode(''), jdecode('%2F13601.html'), 'true',[],'',''],
	['PAGE','7743',jdecode('Servicios'),jdecode(''), jdecode('%2F7743.html'), 'true',[],'',''],
	['PAGE','43312',jdecode('Cursos+y+Talleres'),jdecode(''), jdecode('%2F43312.html'), 'true',[],'',''],
	['PAGE','42112',jdecode('Terapia+de+Grupo'),jdecode(''), jdecode('%2F42112.html'), 'true',[],'',''],
	['PAGE','19201',jdecode('Terapia+online'),jdecode(''), jdecode('%2F19201%2Findex.html'), 'true',[ 
		['PAGE','20901',jdecode('Terapia+online+%28follow+up+page%29'),jdecode(''), jdecode('%2F19201%2F20901.html'), 'false',[],'',''],
		['PAGE','23701',jdecode('iconsulta'),jdecode(''), jdecode('%2F19201%2F23701%2Findex.html'), 'true',[ 
			['PAGE','36412',jdecode('iconsulta+%28follow+up+page%29'),jdecode(''), jdecode('%2F19201%2F23701%2F36412.html'), 'false',[],'','']
		],'',''],
		['PAGE','23722',jdecode('iterapia'),jdecode(''), jdecode('%2F19201%2F23722.html'), 'true',[],'',''],
		['PAGE','23743',jdecode('iderivaci%C3%B3n'),jdecode(''), jdecode('%2F19201%2F23743%2Findex.html'), 'true',[ 
			['PAGE','37512',jdecode('iderivaci%C3%B3n+%28follow+up+page%29'),jdecode(''), jdecode('%2F19201%2F23743%2F37512.html'), 'false',[],'','']
		],'','']
	],'',''],
	['PAGE','36812',jdecode('Compa%C3%B1%C3%ADas+m%C3%A9dicas'),jdecode(''), jdecode('%2F36812.html'), 'true',[],'',''],
	['PAGE','7785',jdecode('D%C3%B3nde+estamos'),jdecode(''), jdecode('%2F7785%2Findex.html'), 'true',[ 
		['PAGE','23301',jdecode('C%C3%B3mo+llegar'),jdecode(''), jdecode('%2F7785%2F23301.html'), 'true',[],'',''],
		['PAGE','50912',jdecode('Mapa+de+acceso'),jdecode(''), jdecode('%2F7785%2F50912.html'), 'true',[],'','']
	],'',''],
	['PAGE','7806',jdecode('Cont%C3%A1ctanos'),jdecode(''), jdecode('%2F7806%2Findex.html'), 'true',[ 
		['PAGE','22401',jdecode('Cont%C3%A1ctanos+%28follow+up+page%29'),jdecode(''), jdecode('%2F7806%2F22401.html'), 'false',[],'','']
	],'',''],
	['PAGE','34312',jdecode('Foros'),jdecode(''), jdecode('%2F34312%2Findex.html'), 'true',[ 
		['PAGE','33012',jdecode('Terapia+infantil'),jdecode(''), jdecode('%2F34312%2F33012.html'), 'true',[],'',''],
		['PAGE','34333',jdecode('TLP'),jdecode(''), jdecode('%2F34312%2F34333.html'), 'true',[],'','']
	],'',''],
	['PAGE','34354',jdecode('Votaciones'),jdecode(''), jdecode('%2F34354%2Findex.html'), 'true',[ 
		['PAGE','33033',jdecode('Terapia+online'),jdecode(''), jdecode('%2F34354%2F33033.html'), 'true',[],'',''],
		['PAGE','34375',jdecode('La+web'),jdecode(''), jdecode('%2F34354%2F34375.html'), 'true',[],'','']
	],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='555454';
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: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'555454',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20091018-203623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20110727-121523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7743',
internalId:  '',
customField: '20091018-201934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7785',
internalId:  '',
customField: '20091018-202804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7806',
internalId:  '',
customField: '20090302-005354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43312',
internalId:  '',
customField: '20091018-195701'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '50912',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '46612',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46612',
internalId:  '',
customField: '20091018-211603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42112',
internalId:  '',
customField: '20091018-195739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20091018-202039'
};
webappMappings['7008']=webappMappings['7008-13822']={
webappId:    '7008',
documentId:  '23701',
internalId:  '13822',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20071029-135122'
};
webappMappings['7008']=webappMappings['7008-13821']={
webappId:    '7008',
documentId:  '19201',
internalId:  '13821',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20071030-090854'
};
webappMappings['7008']=webappMappings['7008-13820']={
webappId:    '7008',
documentId:  '7806',
internalId:  '13820',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37512',
internalId:  '',
customField: '20071107-225229'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '23301',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36412',
internalId:  '',
customField: '20071107-221153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23301',
internalId:  '',
customField: '20091018-203327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20090302-005120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23722',
internalId:  '',
customField: '20090302-005147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23743',
internalId:  '',
customField: '20090302-005213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33012',
internalId:  '',
customField: '20090302-005438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33033',
internalId:  '',
customField: '20090302-005549'
};
webappMappings['7005']=webappMappings['7005-213']={
webappId:    '7005',
documentId:  '33033',
internalId:  '213',
customField: 'language:es;country:ES;'
};
webappMappings['1003']=webappMappings['1003-aars20in352711617153710']={
webappId:    '1003',
documentId:  '33012',
internalId:  'aars20in352711617153710',
customField: 'es:ES:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34312',
internalId:  '',
customField: '20090302-005414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34354',
internalId:  '',
customField: '20090302-005528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34333',
internalId:  '',
customField: '20090302-005502'
};
webappMappings['1003']=webappMappings['1003-aars20in35271161715dc9e']={
webappId:    '1003',
documentId:  '34333',
internalId:  'aars20in35271161715dc9e',
customField: 'es:ES:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34375',
internalId:  '',
customField: '20090302-005637'
};
webappMappings['7005']=webappMappings['7005-214']={
webappId:    '7005',
documentId:  '34375',
internalId:  '214',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-13823']={
webappId:    '7008',
documentId:  '23743',
internalId:  '13823',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36812',
internalId:  '',
customField: '20091018-201453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50912',
internalId:  '',
customField: '20091018-203027'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN3527';
var companyName   = 'Centro+de+Psicolog%C3%ADa+de+Aravaca+-+iTerapia';
var htmlTitle	  = 'Bienvenido+a+iterapia+-+Tu+Centro+Integral+de+salud+emocional';
var metaKeywords  = 'psicoanalisis++psicoan%C3%A1lisis++psicologa++psicologa+Aravaca++psicologa+Madrid++psicologia++psicologia+clinica++psicologia+infantil++psicologia+online++psicologico++psicologo++psicologo+Aravaca++psicologo+Madrid++psicolog%C3%ADa++psicolog%C3%ADa+cl%C3%ADnica++psicoterapia++psicoterapia+breve++psic%C3%B3loga++psic%C3%B3loga+cl%C3%ADnica++psiquiatra++psiquiatra+infantil++psiquiatria++psiquiatr%C3%ADa++psiquiatr%C3%ADa+infantil++terapia++terapia+cognitiva++terapia+de+grupo++terapia+de+pareja++terapia+familiar++terapia+gestalt++terapia+online++terapia+sexual++terapia+sistemica++terapia+sist%C3%A9mica';
var metaContents  = 'psicoanalisis++psicoan%C3%A1lisis++psicologa++psicologa+Aravaca++psicologa+Madrid++psicologia++psicologia+clinica++psicologia+infantil++psicologia+online++psicologico++psicologo++psicologo+Aravaca++psicologo+Madrid++psicolog%C3%ADa++psicolog%C3%ADa+cl%C3%ADnica++psicoterapia++psicoterapia+breve++psic%C3%B3loga++psic%C3%B3loga+cl%C3%ADnica++psiquiatra++psiquiatra+infantil++psiquiatria++psiquiatr%C3%ADa++psiquiatr%C3%ADa+infantil++terapia++terapia+cognitiva++terapia+de+grupo++terapia+de+pareja++terapia+familiar++terapia+gestalt++terapia+online++terapia+sexual++terapia+sistemica++terapia+sist%C3%A9mica';
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();
};

