/* [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','4801',jdecode('PORTADA'),jdecode(''), jdecode('%2F4801.html'), 'true',[],'',''],
	['PAGE','28801',jdecode('INSTALACIONES'),jdecode(''), jdecode('%2F28801.html'), 'true',[],'',''],
	['PAGE','14722',jdecode('PRODUCTOS'),jdecode(''), jdecode('%2F14722%2Findex.html'), 'true',[ 
		['PAGE','43023',jdecode('dise%C3%B1o+3D'),jdecode(''), jdecode('%2F14722%2F43023.html'), 'true',[],'',''],
		['PAGE','43044',jdecode('Franquicias'),jdecode(''), jdecode('%2F14722%2F43044.html'), 'true',[],'',''],
		['PAGE','28201',jdecode('R%C3%B3tulos+Comerciales'),jdecode(''), jdecode('%2F14722%2F28201.html'), 'true',[],'',''],
		['PAGE','26401',jdecode('Grandes+Dimensiones'),jdecode(''), jdecode('%2F14722%2F26401.html'), 'true',[],'',''],
		['PAGE','28222',jdecode('Corp%C3%B3reos'),jdecode(''), jdecode('%2F14722%2F28222.html'), 'true',[],'',''],
		['PAGE','28243',jdecode('Substrato+flexible'),jdecode(''), jdecode('%2F14722%2F28243.html'), 'true',[],'',''],
		['PAGE','27301',jdecode('Monolitos+-+Totems'),jdecode(''), jdecode('%2F14722%2F27301.html'), 'true',[],'',''],
		['PAGE','28264',jdecode('Se%C3%B1alizaci%C3%B3n+-+Interior%2FExterior'),jdecode(''), jdecode('%2F14722%2F28264.html'), 'true',[],'',''],
		['PAGE','28285',jdecode('Decoraci%C3%B3n'),jdecode(''), jdecode('%2F14722%2F28285.html'), 'true',[],'',''],
		['PAGE','43065',jdecode('Fachadas'),jdecode(''), jdecode('%2F14722%2F43065.html'), 'true',[],'',''],
		['PAGE','28401',jdecode('Tecnolog%C3%ADa+LED%C2%B4S'),jdecode(''), jdecode('%2F14722%2F28401.html'), 'true',[],'',''],
		['PAGE','28422',jdecode('Vinilos+e+Impresi%C3%B3n+Digital'),jdecode(''), jdecode('%2F14722%2F28422.html'), 'true',[],'',''],
		['PAGE','28501',jdecode('Rotulaci%C3%B3n+de+vehiculos'),jdecode(''), jdecode('%2F14722%2F28501.html'), 'true',[],'',''],
		['PAGE','29701',jdecode('Mobiliario'),jdecode(''), jdecode('%2F14722%2F29701.html'), 'true',[],'',''],
		['PAGE','43086',jdecode('Mantenimiento'),jdecode(''), jdecode('%2F14722%2F43086.html'), 'true',[],'','']
	],'',''],
	['PAGE','5722',jdecode('CONTACTO'),jdecode(''), jdecode('%2F5722%2Findex.html'), 'true',[ 
		['PAGE','28601',jdecode('D%C3%B3nde+encontrarnos'),jdecode(''), jdecode('%2F5722%2F28601.html'), 'true',[],'',''],
		['ITEM','44123',jdecode('FTP'),jdecode(''), jdecode('ftp%3A%2F%2Fincoluz.com'), 'true',[],'','_blank']
	],'',''],
	['PAGE','5701',jdecode('EMPRESA'),jdecode(''), jdecode('%2F5701.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Displace';
theSitetree.paletteFamily='2E2E2E';
theSitetree.keyvisualId='11075';
theSitetree.keyvisualName='kv_11075.jpg';
theSitetree.fontsetId='31959';
theSitetree.graphicsetId='13798';
theSitetree.contentColor='D8D8D5';
theSitetree.contentBGColor='2E2E2E';
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: 			'Displace',
				paletteFamily: 	'2E2E2E',
				keyvisualId: 	'11075',
				keyvisualName: 	'kv_11075.jpg',
				fontsetId: 		'31959',
				graphicsetId: 	'13798',
				contentColor: 	'D8D8D5',
				contentBGColor: '2E2E2E',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-79d7a24b614a0b8ebb91fa01c12fd8d2']={
webappId:    '7060',
documentId:  '5764',
internalId:  '79d7a24b614a0b8ebb91fa01c12fd8d2',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20111212-121146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20111212-121022'
};
webappMappings['7060']=webappMappings['7060-e64ed01b5ba6345de212b5bf30af16f8']={
webappId:    '7060',
documentId:  '14722',
internalId:  'e64ed01b5ba6345de212b5bf30af16f8',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20111212-120157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5764',
internalId:  '',
customField: '20100927-155149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28222',
internalId:  '',
customField: '20110217-183353'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14722',
internalId:  '',
customField: '20111212-120947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20101221-131823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20111212-120258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20110217-182113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28243',
internalId:  '',
customField: '20110217-183828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27301',
internalId:  '',
customField: '20110217-183930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20110217-181620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28264',
internalId:  '',
customField: '20110519-173003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28285',
internalId:  '',
customField: '20110519-173311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20110217-191836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28422',
internalId:  '',
customField: '20110217-192219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20110519-165448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20110217-192732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43023',
internalId:  '',
customField: '20110519-172743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43044',
internalId:  '',
customField: '20110519-172705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43086',
internalId:  '',
customField: '20110217-194504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43065',
internalId:  '',
customField: '20110519-173905'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AAS340INZREK';
var companyName   = 'Ingenieria+Corporativa+Luminosa%2C+S.L.';
var htmlTitle	  = 'INCOLUZ';
var metaKeywords  = 'rotulos%2C+R%C3%93TULOS%2C+impresion+digital%2C+luminosoS%2C+VINILO%2C+DECORACION%2C+MUEBLES%2Cmonolito';
var metaContents  = 'DISE%C3%91O%2C+PRODUCCI%C3%93N+Y+MONTAJE+DE+ELEMENTOS++DE+IMAGEN+CORPORATIVA%2C+INSTITUCIONAL+Y+APLICADOS+A+LA+DECORACI%C3%93N+Y+PUBLICIDADD%2C+MERCHANDISING%2C+MOBILIRIARIO+URBANO%2C+SE%C3%91ALIZACI%C3%93N%2C+R%C3%93TULOS+LUMINOSOS+Y+NO+LUMINOSOS';
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();
};

