/* [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','48636',jdecode('Eventos+y+Presentaciones'),jdecode(''),'/48636.html','true',[],'',''],
	['PAGE','4497',jdecode('Home'),jdecode(''),'/4497.html','true',[],'',''],
	['PAGE','30936',jdecode('Novedades'),jdecode(''),'/30936.html','true',[],'',''],
	['PAGE','41036',jdecode('FileMaker'),jdecode(''),'/41036.html','true',[],'',''],
	['PAGE','4554',jdecode('Programaci%C3%B3n+a+medida'),jdecode(''),'/4554.html','true',[],'',''],
	['PAGE','33436',jdecode('Gesti%C3%B3n+Empresarial'),jdecode(''),'/33436.html','true',[],'',''],
	['PAGE','39336',jdecode('Representante+MOBILE'),jdecode(''),'/39336.html','true',[],'',''],
	['PAGE','46236',jdecode('Publicaci%C3%B3nes+Digitales'),jdecode(''),'/46236.html','true',[],'',''],
	['PAGE','25336',jdecode('Dise%C3%B1o+Web+y+Publicacion+FM'),jdecode(''),'/25336.html','true',[],'',''],
	['PAGE','52136',jdecode('Fidelizaci%C3%B3n+de+Comercios'),jdecode(''),'/52136.html','true',[],'',''],
	['PAGE','43636',jdecode('Newsletter'),jdecode(''),'/43636.html','true',[],'',''],
	['PAGE','4608',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/4608.html','true',[],'',''],
	['PAGE','51236',jdecode('Asistencia+Remota'),jdecode(''),'/51236.html','true',[],'',''],
	['PAGE','8637',jdecode('Diario+Digital+de+Madrid'),jdecode(''),'/8637.html','true',[],'',''],
	['PAGE','6784',jdecode('Formulario+de+Info+y+Pedidos'),jdecode(''),'/6784/index.html','true',[ 
		['PAGE','6822',jdecode('Formulario+de+Informaci%C3%B3n+y+Pedidos+%28follow+up+page%29'),jdecode(''),'/6784/6822.html','false',[],'','']
	],'',''],
	['PAGE','35736',jdecode('Politica+de+Privacidad'),jdecode(''),'/35736.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='B0CBD6';
theSitetree.keyvisualId='1961';
theSitetree.keyvisualName='agentur.jpg';
theSitetree.fontsetId='329';
theSitetree.graphicsetId='383';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stylus',
				paletteFamily: 	'B0CBD6',
				keyvisualId: 	'1961',
				keyvisualName: 	'agentur.jpg',
				fontsetId: 		'329',
				graphicsetId: 	'383',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'B0CBD6',
				b_color: 		'FFFFFF',
				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['7008']=webappMappings['7008-7229']={
webappId:    '7008',
documentId:  '6784',
internalId:  '7229',
customField: 'language:es;country:ES;'
};
webappMappings['1501']=webappMappings['1501-3248262']={
webappId:    '1501',
documentId:  '30936',
internalId:  '3248262',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48636',
internalId:  '',
customField: '20100719-134811'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '30936',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35736',
internalId:  '',
customField: '20081001-183012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4497',
internalId:  '',
customField: '20091005-181632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43636',
internalId:  '',
customField: '20090328-224600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41036',
internalId:  '',
customField: '20100719-125907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4554',
internalId:  '',
customField: '20090204-100515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33436',
internalId:  '',
customField: '20090204-101746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52136',
internalId:  '',
customField: '20090923-173240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51236',
internalId:  '',
customField: '20100719-130850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6784',
internalId:  '',
customField: '20081001-183507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6822',
internalId:  '',
customField: '20070115-202748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4608',
internalId:  '',
customField: '20100719-130707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8637',
internalId:  '',
customField: '20070214-131938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39336',
internalId:  '',
customField: '20090421-112351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30936',
internalId:  '',
customField: '20100719-133924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46236',
internalId:  '',
customField: '20090930-110620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25336',
internalId:  '',
customField: '20100719-130518'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INE2RV';
var companyName   = '';
var htmlTitle	  = 'filemaker%2C+formaci%C3%B3n%2C+publicaciones+digitales%2C+Fidelizaci%C3%B3n+clientes%2C+Soporte+Remoto.';
var metaKeywords  = 'coinco%2Ccoinco+servicios+informaticos%2Cfilemaker%2Cfilemaker+pro%2Cclientes%2Cpedidos%2Civa%2Cclinicas%2Cenvios%2Casuntos%2Cfacturas%2Cerp%2Cproyectos%2Ctgc-gespro%2Ccheques%2Ccoinco%2Ccoinco+servicios+informaticos%2Cgespyme%2Cfidelizacion%2Cmedicos%2Cabogados%2Cagentes+comerciales%2Crepresentantes%2Cmarketing%2Cpublicidad%2Cfidelizacion+de+clientes%2Cpromobusiness%2Creuniones+online%2Cconferencias+online%2Ccoinco-net.com%2Ccomercio+virtual%2Cpromoci%C3%B3n+web%2Ccomercio+electronico%2Cinformatica%2Cmoratalaz%2Cinformatica+moratalaz%2C';
var metaContents  = 'desarrollo+de+aplicaciones+en+filemaker%2Coutsourcing+informatico%2Coutsourcing+administrativo+y+contable%2Ccalidad+de+datos%2Clopd%2Cfidelizaci%C3%B3n+de+comercios%2Cfidelizaci%C3%B3n+de+clientes%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();
};
