/* [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','615',jdecode('Inicio'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','20101',jdecode('Inici'),jdecode(''),'/20101.html','true',[],'',''],
	['PAGE','501',jdecode('Los+casos+m%C3%A1s+t%C3%ADpicos'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','20122',jdecode('Els+casos+m%C3%A9s+t%C3%ADpics'),jdecode(''),'/20122.html','true',[],'',''],
	['PAGE','24501',jdecode('Novedad%3A+n-computing'),jdecode(''),'/24501.html','true',[],'',''],
	['PAGE','24522',jdecode('Novetat%3A+n-computing'),jdecode(''),'/24522.html','true',[],'',''],
	['PAGE','636',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/636.html','true',[],'',''],
	['PAGE','20143',jdecode('Contacti%26%23x27%3Bns'),jdecode(''),'/20143.html','true',[],'',''],
	['PAGE','657',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/657.html','false',[],'',''],
	['PAGE','20164',jdecode('Qui+som%3F'),jdecode(''),'/20164.html','false',[],'',''],
	['PAGE','16801',jdecode('Ventajas'),jdecode(''),'/16801.html','true',[],'',''],
	['PAGE','20185',jdecode('Avantatges'),jdecode(''),'/20185.html','true',[],'',''],
	['PAGE','720',jdecode('Aviso+legal'),jdecode(''),'/720.html','false',[],'',''],
	['PAGE','20206',jdecode('Av%C3%ADs+legal'),jdecode(''),'/20206.html','false',[],'',''],
	['PAGE','25701',jdecode('Webs+amig%40s'),jdecode(''),'/25701.html','true',[],'',''],
	['PAGE','29501',jdecode('Strumber'),jdecode(''),'/29501.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='F5F5F5';
theSitetree.keyvisualId='2177';
theSitetree.keyvisualName='tastatur.jpg';
theSitetree.fontsetId='356';
theSitetree.graphicsetId='407';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F5F5F5';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'piensa',
  product: 'WSCSYSSSSLYTC2IR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'F5F5F5',
				keyvisualId: 	'2177',
				keyvisualName: 	'tastatur.jpg',
				fontsetId: 		'356',
				graphicsetId: 	'407',
				contentColor: 	'000000',
				contentBGColor: 'F5F5F5',
				a_color: 		'F5F5F5',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100510-211134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100510-110941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100510-111305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20110317-131039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20110317-131138'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '615',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20100510-113226'
};
webappMappings['1501']=webappMappings['1501-10955881']={
webappId:    '1501',
documentId:  '615',
internalId:  '10955881',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20122',
internalId:  '',
customField: '20100510-110707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20143',
internalId:  '',
customField: '20100510-104350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20164',
internalId:  '',
customField: '20100510-104656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20185',
internalId:  '',
customField: '20100510-105638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20100510-111748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20206',
internalId:  '',
customField: '20100510-113504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24501',
internalId:  '',
customField: '20100622-174953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24522',
internalId:  '',
customField: '20100602-213014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20110317-130105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29501',
internalId:  '',
customField: '20110623-142150'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INL2UH';
var companyName   = 'DAVID+ZAFRA+PEDREGOSA-+Su+inform%C3%A1tica+de+confianza.';
var htmlTitle	  = 'Informatico+domicilio+Badalona';
var metaKeywords  = 'copias+de+seguridad%0D%0Acortes+de+luz%0D%0Ainformatica%0D%0Ainformatico%0D%0Ainformatico+badalona%0D%0Ainformatico+barcelona%0D%0Ainformatico+sant+adria+del+besos%0D%0Ainformatico+santa+coloma+de+gramanet%0D%0Ainformatico+sta+coloma+de+gramanet%0D%0Ainstalacion+redes+cableadas%0D%0Ainstalacion+redes+inalambricas%0D%0Ainstalacion+redes+wifi%0D%0Ainstalar+ordenador%0D%0Amantenimiento+ordenador%0D%0Amonitor%0D%0Aordenador%0D%0Aordenadores+portatiles%0D%0Apc%0D%0Aportatil%0D%0Aprogramas+informaticos%0D%0Ared%0D%0Areparar+pc%0D%0Asai%0D%0Asistemas+de+alimentacion+ininterrumpida%0D%0Aservicio+informatico%0D%0Aservidor%0D%0Atecnobadal%0D%0Atienda+de+informatica%0D%0Aups%0D%0Avirus%0D%0Awifi%0D%0Awindows%0D%0AServicio+Profesional+Tecnico+Informatico%0D%0AServicio+informatico%0D%0AInformatico+confianza%0D%0AInformatico+en+Bdn%0D%0AInformatico+en+Bcn%0D%0AInformatico+en+Badalona%0D%0AInformatico+en+Santa+Coloma+de+Gramanet%0D%0AInformatico+en+Sta+Coloma+de+Gramanet%0D%0AInformatico+en+Sant+Adria+del+Besos%0D%0AInformatico+en+Montgat%0D%0AInformatico+en+Premia%0D%0AInformatico+en+Montcada%0D%0AInformatico+en+Tiana%0D%0AInformatico+en+Alella%0D%0AInformatico+en+Teia%0D%0AInformatico+en+Vilassar%0D%0AInformatico+en+Cabrils%0D%0AInformatico+en+Cerdanyola%0D%0APrevenir+caidas+de+corriente%0D%0Areparar+ordenador%0D%0A';
var metaContents  = 'Servicio+Profesional+Tecnico+Informatico%0D%0AServicio+informatico%0D%0AInformatico+confianza%0D%0AInformatico+en+Bdn%0D%0AInformatico+en+Bcn%0D%0AInformatico+en+Badalona%0D%0AInformatico+en+Santa+Coloma+de+Gramanet%0D%0AInformatico+en+Sant+Adria+del+Besos%0D%0AInformatico+en+Montgat%0D%0AInformatico+en+Premia%0D%0AInformatico+en+Montcada%0D%0AInformatico+en+Tiana%0D%0AInformatico+en+Alella%0D%0AInformatico+en+Teia%0D%0AInformatico+en+Vilassar%0D%0AInformatico+en+Cabrils%0D%0AInformatico+en+Cerdanyola%0D%0AInformatico+en+Barcelona%0D%0APrevenir+caidas+de+corriente%0D%0ALimpiar+virus%0D%0AQuitar+virus%0D%0Areparar+ordenador%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();
};

