/* [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','1512',jdecode('Presentaci%C3%B3n'),jdecode(''), jdecode('%2F1512.html'), 'true',[],'',''],
	['PAGE','1533',jdecode('Climatizaci%C3%B3n'),jdecode(''), jdecode('%2F1533.html'), 'true',[],'',''],
	['PAGE','1586',jdecode('Energ%C3%ADa+Solar'),jdecode(''), jdecode('%2F1586.html'), 'true',[],'',''],
	['PAGE','20422',jdecode('+Presupuestos'),jdecode(''), jdecode('%2F20422.html'), 'true',[],'',''],
	['PAGE','16001',jdecode('Cobertura'),jdecode(''), jdecode('%2F16001.html'), 'true',[],'',''],
	['PAGE','18301',jdecode('Foro'),jdecode(''), jdecode('%2F18301.html'), 'true',[],'',''],
	['PAGE','13606',jdecode('Libro+de+visitas'),jdecode(''), jdecode('%2F13606%2Findex.html'), 'true',[ 
		['PAGE','13601',jdecode('Leer+el+libro+'),jdecode(''), jdecode('%2F13606%2F13601.html'), 'false',[],'','']
	],'',''],
	['PAGE','14201',jdecode('C%C3%B3mo+llegar'),jdecode(''), jdecode('%2F14201.html'), 'true',[],'',''],
	['PAGE','20401',jdecode('Ofertas'),jdecode(''), jdecode('%2F20401.html'), 'true',[],'',''],
	['PAGE','24301',jdecode('Instalaciones'),jdecode(''), jdecode('%2F24301.html'), 'true',[],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
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: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20081013-124537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13606',
internalId:  '',
customField: '20081020-204107'
};
webappMappings['7002']=webappMappings['7002-283']={
webappId:    '7002',
documentId:  '1586',
internalId:  '283',
customField: 'language:es;country:ES;'
};
webappMappings['1501']=webappMappings['1501-5868387']={
webappId:    '1501',
documentId:  '1512',
internalId:  '5868387',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1512',
internalId:  '',
customField: '20100425-121939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1533',
internalId:  '',
customField: '20100425-122234'
};
webappMappings['1002']=webappMappings['1002-13606aars20inv9iz']={
webappId:    '1002',
documentId:  '13606',
internalId:  '13606aars20inv9iz',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1586',
internalId:  '',
customField: '20110129-124305'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1512',
internalId:  '1006',
customField: '1006'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '14201',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20081020-195748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20100425-123017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20081028-191658'
};
webappMappings['1003']=webappMappings['1003-aars20inv9iz11cf5d1b331']={
webappId:    '1003',
documentId:  '18301',
internalId:  'aars20inv9iz11cf5d1b331',
customField: 'es:ES:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20100425-153106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20422',
internalId:  '',
customField: '20100425-124813'
};
webappMappings['7060']=webappMappings['7060-17978a4f45dc8859dd86ee082f45f5a1']={
webappId:    '7060',
documentId:  '24301',
internalId:  '17978a4f45dc8859dd86ee082f45f5a1',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20110129-124640'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INV9IZ';
var companyName   = 'AIRE+ACONDICIONADO-CALEFACCI%C3%93N-ENERG%C3%8DA+SOLAR';
var htmlTitle	  = 'JJCLIMASOL++Aire+Acondicionado+Calefacci%C3%B3n+Energ%C3%ADa+Solar';
var metaKeywords  = 'aire+acondicionado+madrid%2Cinstalacion+aire+acondicionado%2C+instaladores+aire+acondicionado%2C+instalaciones+aire+acondicionado%2C+empresas+instaladoras%2C+aire+acondicionado%2C+climatizar%2C+climatizac%C3%B3n%2C+calefaccion%2C+caldera%2Ccalderas%2C+solar%2C+panel%2C+paneles%2C+energia%2C+gasoil%2C+gasoleo%2C+gas+natural%2C+propano%2C+mostoles%2C+alcorcon%2C+villaviciosa+de+odon%2C+navalcarnero%2C+arroyomolinos%2C+el+alamo%2C+calipo%2C+getafe%2C+pinto%2C+parla%2C+boadilla%2C+brunete%2C+valdemorillo%2C+carranque%2C+alcobendas%2C+alcala+de+henares%2C+azuqueca%2C+yeles%2C+illescas%2C+ugena%2C+yuncos%2C+borox%2C+esquivias%2C+gri%C3%B1on%2C+humanes%2C+escorial%2C+villalba%2C+torrelodones%2C+majadahonda%2C+galapagar%2C+reparar%2C+reparacion%2C+mantenimiento%2C+acondicionar%2C+chalet%2C+piscina%2C+piso%2C+local%2C+nave+industrial%2C+madrid%2C+guadarrama%2C+los+molinos%2C+calefaccion+industrial%2C+calefaccion+domestica%2C+bomba+de+calor%2C+inverter%2C+frio+industrial%2C+oficina%2C+reparar+caldera%2C+reparacion+caldera%2C+servicio+tecnico+caldera%2C+saunier+duval%2C+daikin%2C+roca%2C+ferroli%2C+tifell%2C+beretta%2C+panasonic%2C+revision+caldera%2C+mantenimiento+caldera%2C+averias+caldera%2C+fujitsu%2C+mitsubishi%2C+carrier%2C+junkers%2Cservicio+tecnico%2Cservicio+tecnico+oficial%2Caveria+caldera%2Caverias+caldera%2Csomosaguas%2Caravaca%2Ccoimbra%2Ccalipo%2Ccalypo%2Cmonteprincipe%2Cmoraleja%2Cmejorada%2Cofertas+aire+acondicionado%2Cprecios+aire+acondicionado%2Cvallecas%2Catocha%2Csol%2Ccentro%2Caravaca%2Cvillamanta%2C+villamantilla%2C+aldea+del+fresno%2Cmostoles+centro%2Cmostoles+sur%2Cmostoles+los+rosales%2Cmostoles+hospital%2Cmostoles+manuela+malasa%C3%B1a';
var metaContents  = 'Aire+Acondicionado%2C+Calderas%2CCalefacci%C3%B3n%2C+Energ%C3%ADa+Solar%2CInstalaci%C3%B3n%2C+Reparaci%C3%B3n+de+equipos.+Presupuestos+Gratis.+Precios+Muy+Competitivos.+Trabajamos+en+Comunidad+de+Madrid%2CProvincia+de+Toledo+y+Segovia.+Todas+las+Marcas.+Domicilios+Particulares%2CLocales+Comerciales+y+Naves+Industriales.+Aire+Acondicionado+y+Calefacci%C3%B3n+a+su+justo+precio%21%21%21%21';
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();
};

