/* [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','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','4909',jdecode('Asesoramiento+'),jdecode(''),'/23182/4909.html','true',[],'',''],
		['PAGE','46497',jdecode('Civil+y+Matrimonial'),jdecode(''),'/23182/46497.html','true',[],'',''],
		['PAGE','46539',jdecode('Mercantil'),jdecode(''),'/23182/46539.html','true',[],'',''],
		['PAGE','46581',jdecode('Administrativo'),jdecode(''),'/23182/46581.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','27347',jdecode('MAPA+DE+SITUACION'),jdecode(''),'/27347.html','true',[],'',''],
	['PAGE','67597',jdecode('CONT%C3%81CTENOS'),jdecode(''),'/67597.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='002F2F';
theSitetree.keyvisualId='1333';
theSitetree.keyvisualName='agentur.jpg';
theSitetree.fontsetId='232';
theSitetree.graphicsetId='298';
theSitetree.contentColor='666666';
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: 			'Startup',
				paletteFamily: 	'002F2F',
				keyvisualId: 	'1333',
				keyvisualName: 	'agentur.jpg',
				fontsetId: 		'232',
				graphicsetId: 	'298',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'002F2F',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4497',
internalId:  '1006',
customField: '1006'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4497',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4497',
internalId:  '',
customField: '20101227-115031'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '27347',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4990',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '46581',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4909',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-11909']={
webappId:    '7008',
documentId:  '67597',
internalId:  '11909',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20101227-105829'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '23209',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4882',
internalId:  '',
customField: 'language:es;country:ES;'
};
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['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '23182',
internalId:  '',
customField: 'language:es;country:ES;'
};
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: '20101227-110111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23236',
internalId:  '',
customField: '20071121-174912'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '46497',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67597',
internalId:  '',
customField: '20101227-114757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27347',
internalId:  '',
customField: '20070402-190448'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5098',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['1501']=webappMappings['1501-3470930']={
webappId:    '1501',
documentId:  '4497',
internalId:  '3470930',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46497',
internalId:  '',
customField: '20071122-113111'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4963',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46539',
internalId:  '',
customField: '20071122-113205'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4801',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46581',
internalId:  '',
customField: '20071121-181754'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '46539',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '44397',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '23236',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '27347',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '67597',
internalId:  '',
customField: 'language:es;country:ES;'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INEZTT';
var companyName   = 'G+O+B+E+R+NA+-+A+B+O+G+A+D+O+S';
var htmlTitle	  = 'Goberna+Abogados%2Cabogados+barcelona%2Casesoramiento+empresas%2Cnominas+y+seguros+sociales%2Ccontratos%2Cdelcaracion+de+la+renta';
var metaKeywords  = 'abogados+barcelona%2C+abogados+logro%C3%B1o%2C+laboral%2C+fiscal%2C+rentas%2C+asesoramiento+de+empresas%2C+contabilidad%2C+nominas%2C+industria+textil%2C+delaclaracion+de+la+renta%2C+contratos%2C+seguros+sociales%2C+++++jur%C3%ADdico%2C+despidos%2C+indemnizaciones%2C+advocats%2C+hacienda%2C+impuestos%2C+irpf%2C+despidos%2C+reclamaciones+salariales%2C+Expedientes+Regulaci%C3%B3n+Empleo%2C+abogados+laboralistas+';
var metaContents  = 'Asesoramiento+laboral+y+fiscal+en+barcelona+y+logro%C3%B1o.+Realizamos+n%C3%B3minas%2C+contratos%2C+seguros+sociales+y+declaraciones+de+la+renta.+Empresas+textiles+y+de+la+confecci%C3%B3n.+Despidos%2C+ERES%2C+Asistencia+jur%C3%ADdica%2C+reclamaciones+salariales%2C+inspecciones+de+trabajo...+';
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();
};

