/* [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','801',jdecode('ESPECIALITATS'),jdecode(''), jdecode('%2F801.html'), 'true',[],'',''],
	['PAGE','3501',jdecode('M%C3%9ATUES+'),jdecode(''), jdecode('%2F3501.html'), 'true',[],'',''],
	['PAGE','3522',jdecode('CONTACTE'),jdecode(''), jdecode('%2F3522%2Findex.html'), 'true',[ 
		['PAGE','5801',jdecode('CONTACTE+%28follow+up+page%29'),jdecode(''), jdecode('%2F3522%2F5801.html'), 'false',[],'','']
	],'','']];
var siteelementCount=4;
theSitetree.topTemplateName='Meta';
theSitetree.paletteFamily='72A7D3';
theSitetree.keyvisualId='11105';
theSitetree.keyvisualName='kv_11105.jpg';
theSitetree.fontsetId='31993';
theSitetree.graphicsetId='13826';
theSitetree.contentColor='020202';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'wl_enom',
  product: 'WSCENOSSSLYTC21A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Meta',
				paletteFamily: 	'72A7D3',
				keyvisualId: 	'11105',
				keyvisualName: 	'kv_11105.jpg',
				fontsetId: 		'31993',
				graphicsetId: 	'13826',
				contentColor: 	'020202',
				contentBGColor: 'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20111222-144907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20090117-160540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3522',
internalId:  '',
customField: '20080804-181421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20080611-195058'
};
webappMappings['7008']=webappMappings['7008-1176']={
webappId:    '7008',
documentId:  '3522',
internalId:  '1176',
customField: 'language:en;country:US;'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INLOO7';
var companyName   = 'CL%C3%8DNICA++M%C3%88DICA++D%C2%B4ESPECIALITATS';
var htmlTitle	  = 'CENTRE+MEDIC+AL+POBLE+NOU+-+CLINICA+MEDICA+D%C2%B4ESPECIALITATS+-++Centro+Medico+en+Barcelona%2C+Clinica+Medica+d%C2%B4Especialitats%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s+-+Ninlab+Poble+Nou%2C+Analisis+Clinicos+en+BCN%2C++Laboratorios+de+analisis++%2C+Nin';
var metaKeywords  = '%2FTITLE%21%E2%80%94Clinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0A--%21--Inicio+MetaTags%E2%80%94Clinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0Ameta+name%3Dtitle+content%3DClinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0Ameta+name%3Ddescription+content%3DClinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0A%0D%0Ameta+name%3Dkeywords+content%3DClinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0Ameta+name%3Ddistribution+content%3DGlobal+%0D%0Ameta+name%3Dcategory+content%3Danalisis+clinicos++%0D%0Ameta+name%3Dlanguage+content%3Des+%0D%0Ameta+name%3Didentifierurl+content%3Dhttp%3A%2F%2Fwww.cmpoblenou.com%0D%0Ameta+name%3Drating+content%3DGeneral+%0D%0Ameta+name%3Dauthor+content%3Dcmpoblenou%0D%0Ameta+name%3Dreply-to+content%3Dinfo%40cmpoblenou.com%0D%0Ameta+name%3Dcopyright+content%3Dcmpoblenou%0D%0Ameta+http-equiv%3Dcache-control+content%3Dno-cache%0D%0Ameta+http-equiv%3Dpragma+content%3Dno-cache+%0D%0Ameta+name%3Dresource-type+content%3Ddocument+%0D%0Ameta+name%3Drobots+content%3Dall+%0D%0Ameta+name%3Drevisit-after+content%3D1+%21--+Final+MetaTags+--%22%3E%0D%0A';
var metaContents  = '%2FTITLE%21%E2%80%94Clinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0A--%21--Inicio+MetaTags%E2%80%94Clinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0Ameta+name%3Dtitle+content%3DClinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0Ameta+name%3Ddescription+content%3DClinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0A%0D%0Ameta+name%3Dkeywords+content%3DClinica+Medica+d%C2%B4Especialitats%2CCentro+m%C3%A9dico++Barcelona%2C++Poble+Nou%2C+Analisis+Clinicos+Barcelona%2C+Dr.+Jaume+Alsina%2C+Dr.+Alexander+Ramon%2C+Dr.+Jaume+Rot%C3%A9s%2C+Analisis+clinicos+en+Barcelona%2CTest+de+Paternidad+%2C+an%C3%A1lisis+en+Poble+nou%2C+Sitges%2C+Esparreguera%2CMartorell%2CSant+Pere+de+Ribes%2C+Test+de+paternidad%2C++Ninlab%2C+Analisis+de+ADN%2C+de+alimentos%2CAnalisis+de+medio+ambiente+%0D%0Ameta+name%3Ddistribution+content%3DGlobal+%0D%0Ameta+name%3Dcategory+content%3Danalisis+clinicos++%0D%0Ameta+name%3Dlanguage+content%3Des+%0D%0Ameta+name%3Didentifierurl+content%3Dhttp%3A%2F%2Fwww.cmpoblenou.com%0D%0Ameta+name%3Drating+content%3DGeneral+%0D%0Ameta+name%3Dauthor+content%3Dcmpoblenou%0D%0Ameta+name%3Dreply-to+content%3Dinfo%40cmpoblenou.com%0D%0Ameta+name%3Dcopyright+content%3Dcmpoblenou%0D%0Ameta+http-equiv%3Dcache-control+content%3Dno-cache%0D%0Ameta+http-equiv%3Dpragma+content%3Dno-cache+%0D%0Ameta+name%3Dresource-type+content%3Ddocument+%0D%0Ameta+name%3Drobots+content%3Dall+%0D%0Ameta+name%3Drevisit-after+content%3D1+%21--+Final+MetaTags+--%22%3E%0D%0A';
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();
};

