/* [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','1407',jdecode('HOME+'),jdecode(''),'/1407.html','true',[],'',''],
	['PAGE','25503',jdecode('Largando+Amarras'),jdecode(''),'/25503.html','true',[],'',''],
	['PAGE','7011',jdecode('El+Infinito+Vertical'),jdecode(''),'/7011/index.html','true',[ 
		['PAGE','6930',jdecode('EL+CORREO'),jdecode(''),'/7011/6930.html','true',[],'',''],
		['PAGE','6957',jdecode('DEIA'),jdecode(''),'/7011/6957.html','true',[],'',''],
		['PAGE','7038',jdecode('Tus+comentarios'),jdecode(''),'/7011/7038/index.html','true',[ 
			['PAGE','7930',jdecode('Tus+comentarios+del+libro+%28follow+up+page%29'),jdecode(''),'/7011/7038/7930.html','false',[],'','']
		],'',''],
		['PAGE','7065',jdecode('Adquiere+el+libro'),jdecode(''),'/7011/7065/index.html','true',[ 
			['PAGE','8246',jdecode('Adquiere+el+libro+ahora+%28follow+up+page%29'),jdecode(''),'/7011/7065/8246.html','false',[],'','']
		],'',''],
		['PAGE','12117',jdecode('Adquiere+tu+libro+%28follow+up+page%29'),jdecode(''),'/7011/12117.html','false',[],'','']
	],'',''],
	['PAGE','6903',jdecode('AGUST%C3%8DN...'),jdecode(''),'/6903/index.html','true',[ 
		['PAGE','7200',jdecode('%C3%81lbum+de+Fotos+'),jdecode(''),'/6903/7200.html','true',[],'',''],
		['PAGE','7092',jdecode('Escritos'),jdecode(''),'/6903/7092.html','true',[],'',''],
		['PAGE','7119',jdecode('LA+NACI%C3%93N'),jdecode(''),'/6903/7119.html','true',[],'',''],
		['PAGE','7146',jdecode('Cuentos'),jdecode(''),'/6903/7146.html','true',[],'',''],
		['PAGE','7603',jdecode('Poes%C3%ADa'),jdecode(''),'/6903/7603.html','true',[],'',''],
		['PAGE','19205',jdecode('A+J.C.+Periotto'),jdecode(''),'/6903/19205.html','true',[],'',''],
		['PAGE','20003',jdecode('Enla+Web'),jdecode(''),'/6903/20003.html','true',[],'','']
	],'',''],
	['PAGE','7227',jdecode('Contacto'),jdecode(''),'/7227/index.html','true',[ 
		['PAGE','8197',jdecode('Contacta+con+Agust%C3%ADn+%28follow+up+page%29'),jdecode(''),'/7227/8197.html','false',[],'',''],
		['PAGE','7254',jdecode('Direcci%C3%B3n+email'),jdecode(''),'/7227/7254.html','true',[],'',''],
		['PAGE','9302',jdecode('Libro+de+visitas'),jdecode(''),'/7227/9302.html','true',[],'',''],
		['PAGE','9303',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/7227/9303.html','false',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Dots';
theSitetree.paletteFamily='CCCC99';
theSitetree.keyvisualId='409';
theSitetree.keyvisualName='keyboard.jpg';
theSitetree.fontsetId='43';
theSitetree.graphicsetId='47';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='CCCC99';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dots',
				paletteFamily: 	'CCCC99',
				keyvisualId: 	'409',
				keyvisualName: 	'keyboard.jpg',
				fontsetId: 		'43',
				graphicsetId: 	'47',
				contentColor: 	'666666',
				contentBGColor: 'CCCC99',
				a_color: 		'CCCC99',
				b_color: 		'CCCCCC',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-7022']={
webappId:    '7008',
documentId:  '7038',
internalId:  '7022',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-7023']={
webappId:    '7008',
documentId:  '7227',
internalId:  '7023',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-7024']={
webappId:    '7008',
documentId:  '7065',
internalId:  '7024',
customField: 'language:es;country:ES;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1407',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-9302aas010ineg33']={
webappId:    '1002',
documentId:  '9302',
internalId:  '9302aas010ineg33',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9303',
internalId:  '',
customField: '20060511-155320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6903',
internalId:  '',
customField: '20070417-165940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1407',
internalId:  '',
customField: '20100208-172426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6930',
internalId:  '',
customField: '20080908-155359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6957',
internalId:  '',
customField: '20080908-155416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7011',
internalId:  '',
customField: '20060518-091610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7038',
internalId:  '',
customField: '20060510-083524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7930',
internalId:  '',
customField: '20060510-083358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7065',
internalId:  '',
customField: '20060512-171045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8246',
internalId:  '',
customField: '20060510-084909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7092',
internalId:  '',
customField: '20080904-125439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7119',
internalId:  '',
customField: '20060512-080200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7146',
internalId:  '',
customField: '20090217-101407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7603',
internalId:  '',
customField: '20060511-143430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19205',
internalId:  '',
customField: '20070423-173127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20003',
internalId:  '',
customField: '20070528-091830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7200',
internalId:  '',
customField: '20070423-172339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7227',
internalId:  '',
customField: '20060510-084628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8197',
internalId:  '',
customField: '20060510-084541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7254',
internalId:  '',
customField: '20060510-084800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9302',
internalId:  '',
customField: '20060511-155320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25503',
internalId:  '',
customField: '20090903-124231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12117',
internalId:  '',
customField: '20060512-084448'
};
var canonHostname = 'llwd718.servidoresdns.net';
var accountId     = 'Aas010INEG33';
var companyName   = 'AGUSTIN+MAMOLAR';
var htmlTitle	  = 'AGUST%C3%8DN+MAMOLAR.';
var metaKeywords  = 'largando+amarras+infinito+vertical';
var metaContents  = 'MAMOLAR+EL+INFINITO+VERTICAL+VERTICAL+INFINITO+ESCRITOR+BILBAO';
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();
};

