/* [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','38901',jdecode('Clinica+Belen'),jdecode(''),'/38901.html','true',[],'',''],
	['PAGE','34722',jdecode('Porque+Elegir+Clinica+Belen'),jdecode(''),'/34722.html','true',[],'',''],
	['PAGE','4616',jdecode('Servicios+Asistenciales'),jdecode(''),'/4616/index.html','true',[ 
		['PAGE','35722',jdecode('Consultas'),jdecode(''),'/4616/35722.html','true',[],'',''],
		['PAGE','31701',jdecode('Nido'),jdecode(''),'/4616/31701.html','true',[],'',''],
		['PAGE','31722',jdecode('Quir%C3%B3fanos'),jdecode(''),'/4616/31722.html','true',[],'',''],
		['PAGE','31743',jdecode('An%C3%A1lisis+Cl%C3%ADnicos'),jdecode(''),'/4616/31743.html','true',[],'',''],
		['PAGE','31764',jdecode('Anatomia+Patologica'),jdecode(''),'/4616/31764.html','true',[],'',''],
		['PAGE','10413',jdecode('Cirugia+Ambulatoria'),jdecode(''),'/4616/10413.html','true',[],'',''],
		['PAGE','10440',jdecode('Ecografias+y+radiologia'),jdecode(''),'/4616/10440.html','true',[],'',''],
		['PAGE','31785',jdecode('Monitorizacion+Fetal'),jdecode(''),'/4616/31785.html','true',[],'',''],
		['PAGE','108201',jdecode('Partos'),jdecode(''),'/4616/108201.html','true',[],'',''],
		['PAGE','95301',jdecode('Parto+Natural'),jdecode(''),'/4616/95301.html','true',[],'',''],
		['PAGE','31806',jdecode('Urologia+Gnecol%C3%B3gica.'),jdecode(''),'/4616/31806.html','true',[],'','']
	],'',''],
	['PAGE','35701',jdecode('Profesionales+Vinculados'),jdecode(''),'/35701/index.html','true',[ 
		['PAGE','35743',jdecode('Equipo+de+Neonatologos'),jdecode(''),'/35701/35743.html','true',[],'',''],
		['PAGE','35764',jdecode('Equipo+de+Matronas'),jdecode(''),'/35701/35764.html','true',[],'',''],
		['PAGE','35785',jdecode('Equipo+de+Anestesistas'),jdecode(''),'/35701/35785.html','true',[],'',''],
		['PAGE','35806',jdecode('Equipo+de+Medico+de+guardia'),jdecode(''),'/35701/35806.html','true',[],'','']
	],'',''],
	['PAGE','4562',jdecode('Informacion+general'),jdecode(''),'/4562/index.html','true',[ 
		['PAGE','4697',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/4562/4697.html','true',[],'',''],
		['PAGE','34322',jdecode('Sociedades+medicas+concertadas'),jdecode(''),'/4562/34322.html','true',[],'',''],
		['PAGE','31869',jdecode('Distribucion+de+plantas'),jdecode(''),'/4562/31869.html','true',[],'',''],
		['PAGE','101401',jdecode('Album+de+fotos'),jdecode(''),'/4562/101401.html','true',[],'',''],
		['PAGE','34201',jdecode('Mapa+de+acceso'),jdecode(''),'/4562/34201.html','true',[],'',''],
		['PAGE','34101',jdecode('C%C3%B3mo+encontrarnos'),jdecode(''),'/4562/34101.html','true',[],'',''],
		['PAGE','109001',jdecode('Floristeria'),jdecode(''),'/4562/109001.html','true',[],'',''],
		['PAGE','4670',jdecode('Bolsa+de+trabajo'),jdecode(''),'/4562/4670/index.html','true',[ 
			['PAGE','103201',jdecode('Bolsa+de+trabajo+%28follow+up+page%29'),jdecode(''),'/4562/4670/103201.html','false',[],'','']
		],'','']
	],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Business';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='2473';
theSitetree.keyvisualName='arzt.jpg';
theSitetree.fontsetId='418';
theSitetree.graphicsetId='463';
theSitetree.contentColor='020E66';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Business',
				paletteFamily: 	'003366',
				keyvisualId: 	'2473',
				keyvisualName: 	'arzt.jpg',
				fontsetId: 		'418',
				graphicsetId: 	'463',
				contentColor: 	'020E66',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101401',
internalId:  '',
customField: '20080213-171745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103201',
internalId:  '',
customField: '20080213-175313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108201',
internalId:  '',
customField: '20081216-154223'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '34101',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '34201',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38901',
internalId:  '',
customField: '20100429-113238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4616',
internalId:  '',
customField: '20070523-093615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35722',
internalId:  '',
customField: '20080213-172744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31701',
internalId:  '',
customField: '20080213-084458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35701',
internalId:  '',
customField: '20080129-201344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35743',
internalId:  '',
customField: '20070530-163452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35764',
internalId:  '',
customField: '20080129-201447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35785',
internalId:  '',
customField: '20080129-201547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35806',
internalId:  '',
customField: '20080129-201725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4562',
internalId:  '',
customField: '20080213-083955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31869',
internalId:  '',
customField: '20080214-092410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20080102-113524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34722',
internalId:  '',
customField: '20100527-140602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31722',
internalId:  '',
customField: '20080129-201312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10440',
internalId:  '',
customField: '20100527-140539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95301',
internalId:  '',
customField: '20100118-125446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34322',
internalId:  '',
customField: '20080130-120739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34101',
internalId:  '',
customField: '20070523-103946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31743',
internalId:  '',
customField: '20080214-091444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31764',
internalId:  '',
customField: '20080129-200122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10413',
internalId:  '',
customField: '20081023-164317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31785',
internalId:  '',
customField: '20080129-202839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31806',
internalId:  '',
customField: '20080129-200332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4697',
internalId:  '',
customField: '20081125-115311'
};
webappMappings['7060']=webappMappings['7060-ab094b2464925e6a7809f24f015eba53']={
webappId:    '7060',
documentId:  '101401',
internalId:  'ab094b2464925e6a7809f24f015eba53',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-8999']={
webappId:    '7008',
documentId:  '4670',
internalId:  '8999',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109001',
internalId:  '',
customField: '20100428-093810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4670',
internalId:  '',
customField: '20080213-175654'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010IN2NEI';
var companyName   = 'Cl%C3%ADnica+de+Maternidad+Ntra.+Sra.+de+Bel%C3%A9n';
var htmlTitle	  = 'Clinica+Belen+%28Clinica+Maternidad+Nuestra+Se%C3%B1ora+de+Belen%29';
var metaKeywords  = 'parto+natural+%2C+ecografias+4d';
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();
};
