/* [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','701',jdecode('Inicio'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','752',jdecode('D%C3%B3nde+estamos'),jdecode(''), jdecode('%2F752%2Findex.html'), 'true',[ 
		['PAGE','15801',jdecode('Alicante%2FMurcia'),jdecode(''), jdecode('%2F752%2F15801.html'), 'true',[],'',''],
		['PAGE','15822',jdecode('Castilla+la+Mancha'),jdecode(''), jdecode('%2F752%2F15822.html'), 'true',[],'','']
	],'',''],
	['PAGE','773',jdecode('Nuestro+equipo'),jdecode(''), jdecode('%2F773.html'), 'true',[],'',''],
	['PAGE','794',jdecode('Servicios'),jdecode(''), jdecode('%2F794%2Findex.html'), 'true',[ 
		['PAGE','815',jdecode('Instalaci%C3%B3n'),jdecode(''), jdecode('%2F794%2F815.html'), 'true',[],'',''],
		['PAGE','29201',jdecode('Reparaci%C3%B3n'),jdecode(''), jdecode('%2F794%2F29201.html'), 'true',[],'',''],
		['PAGE','857',jdecode('Sustituci%C3%B3n'),jdecode(''), jdecode('%2F794%2F857.html'), 'true',[],'',''],
		['PAGE','878',jdecode('Mantenimiento'),jdecode(''), jdecode('%2F794%2F878.html'), 'true',[],'','']
	],'',''],
	['PAGE','962',jdecode('Elevadores'),jdecode(''), jdecode('%2F962%2Findex.html'), 'true',[ 
		['PAGE','1004',jdecode('Gama+Aurum'),jdecode(''), jdecode('%2F962%2F1004.html'), 'true',[],'',''],
		['PAGE','983',jdecode('Gama+Platinium'),jdecode(''), jdecode('%2F962%2F983.html'), 'true',[],'',''],
		['PAGE','15201',jdecode('Gama+Silver'),jdecode(''), jdecode('%2F962%2F15201.html'), 'true',[],'',''],
		['PAGE','33501',jdecode('Buscadores'),jdecode(''), jdecode('%2F962%2F33501.html'), 'false',[],'','']
	],'',''],
	['PAGE','32101',jdecode('Salvaescaleras'),jdecode(''), jdecode('%2F32101%2Findex.html'), 'true',[ 
		['PAGE','15864',jdecode('Vertical'),jdecode(''), jdecode('%2F32101%2F15864.html'), 'true',[],'',''],
		['PAGE','32301',jdecode('Inclinado'),jdecode(''), jdecode('%2F32101%2F32301.html'), 'true',[],'',''],
		['PAGE','32322',jdecode('R3000'),jdecode(''), jdecode('%2F32101%2F32322.html'), 'true',[],'','']
	],'',''],
	['PAGE','899',jdecode('Ascensores'),jdecode(''), jdecode('%2F899%2Findex.html'), 'true',[ 
		['PAGE','920',jdecode('Hidr%C3%A1ulicos'),jdecode(''), jdecode('%2F899%2F920.html'), 'true',[],'',''],
		['PAGE','941',jdecode('El%C3%A9ctricos'),jdecode(''), jdecode('%2F899%2F941.html'), 'true',[],'','']
	],'',''],
	['PAGE','18401',jdecode('Montaplatos'),jdecode(''), jdecode('%2F18401.html'), 'true',[],'',''],
	['PAGE','18422',jdecode('Plataformas+de+Carga'),jdecode(''), jdecode('%2F18422.html'), 'true',[],'',''],
	['PAGE','1025',jdecode('Obras+Realizadas'),jdecode(''), jdecode('%2F1025.html'), 'true',[],'',''],
	['PAGE','28601',jdecode('Documentacion'),jdecode(''), jdecode('%2F28601%2Findex.html'), 'true',[ 
		['PAGE','28901',jdecode('Ley+44%2F2006+-+Competencia'),jdecode(''), jdecode('%2F28601%2F28901.html'), 'true',[],'',''],
		['PAGE','836',jdecode('Real+Decreto+57%2F2005'),jdecode(''), jdecode('%2F28601%2F836.html'), 'true',[],'',''],
		['PAGE','28922',jdecode('Ley+8%2F1999'),jdecode(''), jdecode('%2F28601%2F28922.html'), 'true',[],'','']
	],'',''],
	['PAGE','34801',jdecode('Solicitud+de+Presupuesto'),jdecode(''), jdecode('%2F34801.html'), 'true',[],'',''],
	['PAGE','39001',jdecode('Campa%C3%B1a+Ondacero'),jdecode(''), jdecode('%2F39001.html'), 'true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='000066';
theSitetree.keyvisualId='1340';
theSitetree.keyvisualName='elektriker.jpg';
theSitetree.fontsetId='233';
theSitetree.graphicsetId='292';
theSitetree.contentColor='000000';
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: 	'000066',
				keyvisualId: 	'1340',
				keyvisualName: 	'elektriker.jpg',
				fontsetId: 		'233',
				graphicsetId: 	'292',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000066',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100212-135711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20110124-195110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '899',
internalId:  '',
customField: '20100208-084707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1025',
internalId:  '',
customField: '20120130-171758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20120127-174400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20100122-172952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20120127-174503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20100212-181846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20100127-185011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20100212-142258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '920',
internalId:  '',
customField: '20100212-130916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '941',
internalId:  '',
customField: '20100208-085214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '962',
internalId:  '',
customField: '20120127-175105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '983',
internalId:  '',
customField: '20120127-175242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1004',
internalId:  '',
customField: '20100212-175427'
};
webappMappings['7008']=webappMappings['7008-12411']={
webappId:    '7008',
documentId:  '39001',
internalId:  '12411',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20100208-083611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20091112-171652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15822',
internalId:  '',
customField: '20110124-195535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20120127-175317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15864',
internalId:  '',
customField: '20100208-081239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32322',
internalId:  '',
customField: '20100208-083204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20100208-082159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18422',
internalId:  '',
customField: '20091112-182014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20091112-183139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34801',
internalId:  '',
customField: '20100212-175814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29201',
internalId:  '',
customField: '20100127-183600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28922',
internalId:  '',
customField: '20100212-182627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28901',
internalId:  '',
customField: '20100212-182342'
};
webappMappings['7008']=webappMappings['7008-7244']={
webappId:    '7008',
documentId:  '34801',
internalId:  '7244',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32101',
internalId:  '',
customField: '20100208-083442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20100208-084101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39001',
internalId:  '',
customField: '20120127-165045'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INL8G2';
var companyName   = '';
var htmlTitle	  = 'RC+ELEVACION++INSTALACION+YMANTENIENTO+DE+ASCENSORES+Y+ELEVADORES';
var metaKeywords  = 'ascensores%2C+elevadores%2C+montacargas%2C+plataformas%2C+minusvalidos';
var metaContents  = 'Empresa+dedicada+a+la+instalaci%C3%B3n+de+ascensores+y+elevadores+unifamiliares%2C+montacargas%2C+salvaescaleras%2C+montacoches%2C+montaplatos%2C+etc.';
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();
};

