/* [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 theSitetree=[ 
	['PAGE','1501',jdecode('Inicio'),jdecode(''),'/1501.html','true',[],''],
	['PAGE','8801',jdecode('Productos'),jdecode(''),'/8801/index.html','true',[ 
		['PAGE','8822',jdecode('Proyecci%C3%B3n'),jdecode(''),'/8801/8822.html','true',[],''],
		['PAGE','24201',jdecode('Inform%C3%A1tica'),jdecode(''),'/8801/24201.html','true',[],''],
		['PAGE','24243',jdecode('Ergonom%C3%ADa'),jdecode(''),'/8801/24243.html','true',[],''],
		['PAGE','52701',jdecode('Filtros+de+pantalla'),jdecode(''),'/8801/52701.html','true',[],''],
		['PAGE','24401',jdecode('Accesorios'),jdecode(''),'/8801/24401.html','true',[],'']
	],''],
	['PAGE','3001',jdecode('Tienda'),jdecode(''),'/3001.html','true',[],''],
	['PAGE','24422',jdecode('Buscar'),jdecode(''),'/24422.html','true',[],''],
	['PAGE','26501',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/26501/index.html','true',[ 
		['PAGE','86151',jdecode('Ubicaci%C3%B3n'),jdecode(''),'/26501/86151.html','true',[],'']
	],''],
	['PAGE','2601',jdecode('Contacto'),jdecode(''),'/2601.html','true',[],''],
	['PAGE','31701',jdecode('Videoproyectores+3M'),jdecode(''),'/31701.html','false',[],''],
	['PAGE','24522',jdecode('SCP+3M'),jdecode(''),'/24522.html','false',[],''],
	['PAGE','42701',jdecode('SCPaccesorios'),jdecode(''),'/42701.html','false',[],''],
	['PAGE','26322',jdecode('Retroproyectores+3M'),jdecode(''),'/26322.html','false',[],''],
	['PAGE','26343',jdecode('Pizarra+Digital+3M'),jdecode(''),'/26343.html','false',[],''],
	['PAGE','29822',jdecode('Vikuiti+3M'),jdecode(''),'/29822.html','false',[],''],
	['PAGE','30101',jdecode('3M+MPro'),jdecode(''),'/30101.html','false',[],''],
	['PAGE','90430',jdecode('Informatica1'),jdecode(''),'/90430.html','false',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='B85454';
theSitetree.keyvisualId='11163';
theSitetree.keyvisualName='kv_11163.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13878';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				name: 			'Office',
				paletteFamily: 	'B85454',
				keyvisualId: 	'11163',
				keyvisualName: 	'kv_11163.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13878',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20100609-202451'
};
webappMappings['7008']=webappMappings['7008-562']={
webappId:    '7008',
documentId:  '2601',
internalId:  '562',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2601',
internalId:  '',
customField: '20090823-174008'
};
webappMappings['4001']=webappMappings['4001-719558']={
webappId:    '4001',
documentId:  '3001',
internalId:  '719558',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20100515-125447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20100307-171710'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '24422',
internalId:  'search',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24422',
internalId:  '',
customField: '20090729-172840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8822',
internalId:  '',
customField: '20100208-190308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24522',
internalId:  '',
customField: '20100307-172112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20100617-111843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24243',
internalId:  '',
customField: '20100225-110350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26501',
internalId:  '',
customField: '20091004-164426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20090531-173739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31701',
internalId:  '',
customField: '20100301-194951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20100609-201650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26343',
internalId:  '',
customField: '20090816-220811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42701',
internalId:  '',
customField: '20100417-124721'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '86151',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52701',
internalId:  '',
customField: '20090802-224231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26322',
internalId:  '',
customField: '20090729-195822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29822',
internalId:  '',
customField: '20090726-182409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86151',
internalId:  '',
customField: '20090825-155643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90430',
internalId:  '',
customField: '20090913-184604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92130',
internalId:  '',
customField: '20090912-214925'
};
var canonHostname = 'eul0300555.eu.verio.net';
var accountId     = 'ANTT10INXXP9';
var companyName   = 'Soportes+Magn%C3%A9ticos+Comunicaci%C3%B3n+SL';
var htmlTitle	  = 'Soportes+Magn%C3%A9ticos+Comunicaci%C3%B3n+SL';
var metaKeywords  = 'SMC%2C3M+Proyectores%2CInstalaci%C3%B3n+de+videoproyector%2CInstalaci%C3%B3n+de+proyector%2CErgonom%C3%ADa%2CMPro110%2CX20%2CWX20%2CX64%2CX66%2CWX66%2CDX70%2CX90%2CX95%2CSCP740%2CSCP712%2CSCP716%2CSCP%2CFiltros+de+pantalla%2Cvideoproyector%2Cretroproyector%2Ctransparencias%2Ccintas+de+impresora%2Ccintas+de+maquina%2Ccartuchos+de+tinta%2C+cintas+de+almacenamiento%2CImation%2CFujitsu+Tegnilogy+Sistem%2CVikuity%2CMicro+proyector%2Csoportes%2Csoportes+magneticos%2Csmc+soportes%2CVideoproyector+3M%2Cdistribuidor+3M+Gava%2CVikuiti%2C+MPro120%2C+MPro150';
var metaContents  = 'Soportes+Magneticos+Comunicacion%2C+SMC%2C+3M%2C+Proyectores+3M%2C++Ergonom%C3%ADa%2C+filtro+de+pantalla%2C+Microproyector+MPro110%2C+instalacion+de+proyector%2C+consumibles%2C+Vikuiti%2C+3M%2C+MPro150%2C+MPro%2C+';
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();
};
