/* [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','4497',jdecode('PRESENTACION'),jdecode(''),'/4497.html','true',[],'',''],
	['PAGE','4801',jdecode('EL+DESPACHO'),jdecode(''),'/4801.html','true',[],'',''],
	['PAGE','4828',jdecode('CON%C3%93ZCANOS'),jdecode(''),'/4828/index.html','true',[ 
		['PAGE','23101',jdecode('Nuestra+Historia'),jdecode(''),'/4828/23101.html','true',[],'',''],
		['PAGE','4855',jdecode('Nuestro+equipo'),jdecode(''),'/4828/4855.html','true',[],'',''],
		['PAGE','47697',jdecode('Colaboradores'),jdecode(''),'/4828/47697.html','true',[],'',''],
		['PAGE','23128',jdecode('D%C3%B3nde+encontrarnos'),jdecode(''),'/4828/23128.html','true',[],'','']
	],'',''],
	['PAGE','23182',jdecode('AREAS+JURIDICAS'),jdecode(''),'/23182/index.html','true',[ 
		['PAGE','4963',jdecode('Laboral'),jdecode(''),'/23182/4963.html','true',[],'',''],
		['PAGE','5098',jdecode('Fiscal'),jdecode(''),'/23182/5098.html','true',[],'',''],
		['PAGE','4882',jdecode('Renta+y+Patrimonio'),jdecode(''),'/23182/4882.html','true',[],'',''],
		['PAGE','23209',jdecode('Contabilidad'),jdecode(''),'/23182/23209.html','true',[],'',''],
		['PAGE','4936',jdecode('Extranjeria'),jdecode(''),'/23182/4936.html','true',[],'',''],
		['PAGE','4909',jdecode('Asesoramiento+'),jdecode(''),'/23182/4909.html','true',[],'',''],
		['PAGE','46497',jdecode('Civil+y+Matrimonial'),jdecode(''),'/23182/46497.html','true',[],'',''],
		['PAGE','46518',jdecode('Penal+y+Penitenciario'),jdecode(''),'/23182/46518.html','true',[],'',''],
		['PAGE','46539',jdecode('Mercantil'),jdecode(''),'/23182/46539.html','true',[],'',''],
		['PAGE','46560',jdecode('Inmobiliario'),jdecode(''),'/23182/46560.html','true',[],'',''],
		['PAGE','46581',jdecode('Administrativo'),jdecode(''),'/23182/46581.html','true',[],'','']
	],'',''],
	['PAGE','5125',jdecode('AUTONOMOS'),jdecode(''),'/5125.html','true',[],'',''],
	['PAGE','4990',jdecode('+TEXTIL'),jdecode(''),'/4990.html','true',[],'',''],
	['PAGE','44397',jdecode('NOVEDADES'),jdecode(''),'/44397.html','true',[],'',''],
	['PAGE','23236',jdecode('ENLACES+INTER%C3%89S'),jdecode(''),'/23236.html','true',[],'',''],
	['PAGE','23155',jdecode('DOWNLOADS'),jdecode(''),'/23155.html','true',[],'',''],
	['PAGE','5044',jdecode('CONTACTENOS'),jdecode(''),'/5044/index.html','true',[ 
		['PAGE','31687',jdecode('CONTACTENOS+%28follow+up+page%29'),jdecode(''),'/5044/31687.html','false',[],'',''],
		['PAGE','5071',jdecode('Direcciones'),jdecode(''),'/5044/5071.html','true',[],'','']
	],'',''],
	['PAGE','27347',jdecode('MAPA+DE+SITUACION'),jdecode(''),'/27347.html','true',[],'',''],
	['PAGE','24703',jdecode('VISITAS'),jdecode(''),'/24703.html','false',[],'',''],
	['PAGE','24702',jdecode('LIBRO+DE+VISITAS'),jdecode(''),'/24702.html','true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='echo';
theSitetree.paletteFamily='3C4B66';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10403';
theSitetree.graphicsetId='10628';
theSitetree.contentColor='3C4B66';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'echo',
				paletteFamily: 	'3C4B66',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10403',
				graphicsetId: 	'10628',
				contentColor: 	'3C4B66',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4497',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-24702aas010ineztt']={
webappId:    '1002',
documentId:  '24702',
internalId:  '24702aas010ineztt',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4497',
internalId:  '',
customField: '20091104-090640'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '27347',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5125',
internalId:  '',
customField: '20071023-120047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4828',
internalId:  '',
customField: '20070510-172904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5044',
internalId:  '',
customField: '20070510-182733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20080311-163940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20080311-164107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4855',
internalId:  '',
customField: '20080311-164021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23128',
internalId:  '',
customField: '20091104-091935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23182',
internalId:  '',
customField: '20080311-164205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4963',
internalId:  '',
customField: '20080311-164720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5098',
internalId:  '',
customField: '20071122-112519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4882',
internalId:  '',
customField: '20070330-131414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23209',
internalId:  '',
customField: '20080327-095516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4936',
internalId:  '',
customField: '20070330-115321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4909',
internalId:  '',
customField: '20070402-185835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4990',
internalId:  '',
customField: '20070510-191553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44397',
internalId:  '',
customField: '20081001-122316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23236',
internalId:  '',
customField: '20071121-174912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23155',
internalId:  '',
customField: '20070518-110311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31687',
internalId:  '',
customField: '20070329-125513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5071',
internalId:  '',
customField: '20091104-092125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27347',
internalId:  '',
customField: '20070402-190448'
};
webappMappings['7008']=webappMappings['7008-6790']={
webappId:    '7008',
documentId:  '5044',
internalId:  '6790',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24702',
internalId:  '',
customField: '20070315-125916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46497',
internalId:  '',
customField: '20071122-113111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46518',
internalId:  '',
customField: '20071121-183109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46539',
internalId:  '',
customField: '20071122-113205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46560',
internalId:  '',
customField: '20071122-113248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46581',
internalId:  '',
customField: '20071121-181754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47697',
internalId:  '',
customField: '20071122-114745'
};
var canonHostname = 'llwd718.servidoresdns.net';
var accountId     = 'Aas010INEZTT';
var companyName   = 'Goberna+Abogados';
var htmlTitle	  = 'Goberna+Abogados%2Cabogados+barcelona%2Casesoramiento+empresas%2Cnominas+y+seguros+sociales%2Ccontratos%2Cdelcaracion+de+la+renta';
var metaKeywords  = 'abogados+barcelona%2Claboral%2Cfiscal%2Crentas%2Casesoramiento+de+empresas%2Ccontabilidad%2Cextranjer%C3%ADa%2Cnominas%2Ctextil%2Cdelaclaracion+de+la+renta%2Ccontratos%2Ctramites+hacienda%2Cseguros+sociales%2Cjur%C3%ADdico%2Cdespidos%2Cindemnizaciones%2Cadvocats%2Chacienda%2Cimpuestos%2Cirpf%2Cconsultas+jur%C3%ADdicas%2Cnuevo+negocio%2Capertura+empresas';
var metaContents  = 'Aqui+podra+tener+asesoramiento+laboral+y+fiscal+en+barcelona+realizamos+tramites+de+extranjeria%2Cnominas+y+seguros+sociales+y+declaraciones+de+la+renta.Empresas+textiles+y+de+la+confecci%C3%B3n.+Asesoramiento+empresarial.++';
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();
};
