/* [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','3301',jdecode('Inicio'),jdecode(''),'/3301/index.html','true',[ 
		['PAGE','21801',jdecode('Inicio+%28follow+up+page%29'),jdecode(''),'/3301/21801.html','false',[],'','']
	],'',''],
	['PAGE','25201',jdecode('Cosas'),jdecode(''),'/25201/index.html','true',[ 
		['PAGE','83701',jdecode('Cosas+%28follow+up+page%29'),jdecode(''),'/25201/83701.html','false',[],'','']
	],'',''],
	['PAGE','28701',jdecode('Noticias'),jdecode(''),'/28701.html','true',[],'',''],
	['PAGE','29001',jdecode('Autores+amigos'),jdecode(''),'/29001.html','true',[],'',''],
	['PAGE','28301',jdecode('Indice+y+foros'),jdecode(''),'/28301.html','true',[],'',''],
	['PAGE','27701',jdecode('Textos'),jdecode(''),'/27701.html','true',[],'',''],
	['PAGE','28606',jdecode('Libro+de+visitas'),jdecode(''),'/28606/index.html','true',[ 
		['PAGE','28601',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/28606/28601.html','false',[],'','']
	],'',''],
	['PAGE','267912',jdecode('Wojtek+Siudmak'),jdecode(''),'/267912.html','true',[],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='4A587F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10449';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4A587F';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'4A587F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10449',
				contentColor: 	'FFFFFF',
				contentBGColor: '4A587F',
				a_color: 		'4A587F',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7050']=webappMappings['7050-5703']={
webappId:    '7050',
documentId:  '27701',
internalId:  '5703',
customField: 'language:es;country:ES;'
};
webappMappings['1002']=webappMappings['1002-28606aars20in31an']={
webappId:    '1002',
documentId:  '28606',
internalId:  '28606aars20in31an',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-6356']={
webappId:    '7008',
documentId:  '25201',
internalId:  '6356',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-6355']={
webappId:    '7008',
documentId:  '3301',
internalId:  '6355',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20070617-033557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20100128-162453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27701',
internalId:  '',
customField: '20100208-011249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20100901-191051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20070616-015440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25201',
internalId:  '',
customField: '20100128-132834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83701',
internalId:  '',
customField: '20070709-093345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20090223-092526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20090508-082629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28606',
internalId:  '',
customField: '20070617-033505'
};
webappMappings['7060']=webappMappings['7060-3e4648078c6945fd5c20efb2df957515']={
webappId:    '7060',
documentId:  '267912',
internalId:  '3e4648078c6945fd5c20efb2df957515',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '267912',
internalId:  '',
customField: '20090627-203517'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN31AN';
var companyName   = 'ICONOCLASTA';
var htmlTitle	  = '';
var metaKeywords  = 'amor+cabr%C3%B3n+odio+follar+mierda+odio+sexo+follador+invisible+666+rabia+enga%C3%B1o+hipocres%C3%ADa+iconoclasta+ateo+incr%C3%A9dulo+asesino+ultrajant';
var metaContents  = 'literatura+relatos+ensayos+cr%C3%ADtica+social+noticias+im%C3%A1genes+humor+terror+violencia+irreverencia+blasfemia+religi%C3%B3n+ate%C3%ADsmo+pol%C3%ADtica+suicidio+frustraci%C3%B3n+sexo+666+sadismo+dolor+ambici%C3%B3n+burla+herej%C3%ADa+iconoclasta+asesinato+delito+violaci%C3%B3n+ultrajant';
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();
};
