/* [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','1800',jdecode('%C2%BFQue+es+Reciclamadrid%3F'),jdecode(''),'/1800.html','true',[],'',''],
	['PAGE','1779',jdecode('Yo+reciclo'),jdecode(''),'/1779.html','true',[],'',''],
	['PAGE','7301',jdecode('Socios'),jdecode(''),'/7301.html','true',[],'',''],
	['PAGE','7322',jdecode('Gu%C3%ADa+del+visitante'),jdecode(''),'/7322/index.html','true',[ 
		['PAGE','7343',jdecode('Programa'),jdecode(''),'/7322/7343.html','true',[],'',''],
		['PAGE','7364',jdecode('Organizadores'),jdecode(''),'/7322/7364.html','true',[],'','']
	],'',''],
	['PAGE','7385',jdecode('Gu%C3%ADa+del+expositor'),jdecode(''),'/7385/index.html','true',[ 
		['PAGE','7406',jdecode('Participaci%C3%B3n+e+informaci%C3%B3n'),jdecode(''),'/7385/7406.html','true',[],'',''],
		['PAGE','7427',jdecode('Oferta+de+servicios'),jdecode(''),'/7385/7427.html','true',[],'',''],
		['PAGE','7448',jdecode('Informaci%C3%B3n+sobre+el+montaje+de+stands'),jdecode(''),'/7385/7448.html','true',[],'',''],
		['PAGE','7469',jdecode('Zona+de+descarga'),jdecode(''),'/7385/7469.html','true',[],'',''],
		['PAGE','9211',jdecode('Solicitud%2FApplication'),jdecode(''),'/7385/9211.html','true',[],'','']
	],'',''],
	['PAGE','7490',jdecode('Servicio+de+prensa'),jdecode(''),'/7490/index.html','true',[ 
		['PAGE','7511',jdecode('Centro+de+prensa'),jdecode(''),'/7490/7511.html','true',[],'',''],
		['PAGE','7532',jdecode('Noticias'),jdecode(''),'/7490/7532.html','true',[],'',''],
		['PAGE','7553',jdecode('Comunicados+de+prensa'),jdecode(''),'/7490/7553.html','true',[],'','']
	],'',''],
	['PAGE','4264',jdecode('Contacto'),jdecode(''),'/4264.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Measure';
theSitetree.paletteFamily='8A9FD6';
theSitetree.keyvisualId='3872';
theSitetree.keyvisualName='kv_3872.jpg';
theSitetree.fontsetId='10492';
theSitetree.graphicsetId='11068';
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: 			'Measure',
				paletteFamily: 	'8A9FD6',
				keyvisualId: 	'3872',
				keyvisualName: 	'kv_3872.jpg',
				fontsetId: 		'10492',
				graphicsetId: 	'11068',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'4F65A0',
				e_color: 		'4F65A0',
				f_color: 		'4F65A0',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7490',
internalId:  '',
customField: '20100803-002807'
};
webappMappings['7008']=webappMappings['7008-4956']={
webappId:    '7008',
documentId:  '4264',
internalId:  '4956',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7322',
internalId:  '',
customField: '20100803-003842'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '1800',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1779',
internalId:  '',
customField: '20100803-003454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20100803-002807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1800',
internalId:  '',
customField: '20100803-003316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4264',
internalId:  '',
customField: '20100803-004758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7532',
internalId:  '',
customField: '20100803-005955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7343',
internalId:  '',
customField: '20100803-004004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7364',
internalId:  '',
customField: '20100803-004146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7385',
internalId:  '',
customField: '20100803-004321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7406',
internalId:  '',
customField: '20100803-004431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7448',
internalId:  '',
customField: '20100803-004552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7469',
internalId:  '',
customField: '20100803-002807'
};
webappMappings['7008']=webappMappings['7008-10176']={
webappId:    '7008',
documentId:  '9211',
internalId:  '10176',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9211',
internalId:  '',
customField: '20100803-005050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7427',
internalId:  '',
customField: '20100803-002807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7511',
internalId:  '',
customField: '20100803-002807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7553',
internalId:  '',
customField: '20100803-002807'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INLMU8';
var companyName   = '%C2%A1Cuando+reciclo%2C+reciclo+mi+cerebro%21';
var htmlTitle	  = '';
var metaKeywords  = 'reciclaje+recilar+dise%C3%B1o+artesan%C3%ADa+cine+eco+biodiversidad+talleres+de+reciclaje+medioambiente+Fundesarte+Cosmo+Caixa+Fila5.arte+seminarios+semana+de+la+ciencia+pefc+espa%C3%B1a';
var metaContents  = 'Reciclamadrid+Sal%C3%B3n+del+Reciclaje+de+arte+reciclaje+dise%C3%B1o+artesania+';
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();
};
