/* [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','501',jdecode('Inicio'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('Agradecimientos'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','4701',jdecode('Ludopatia'),jdecode(''),'/4701.html','true',[],'',''],
	['PAGE','59001',jdecode('%C2%BFComo+Diagnosticarla%3F'),jdecode(''),'/59001.html','true',[],'',''],
	['PAGE','73601',jdecode('Ultimas+Noticias'),jdecode(''),'/73601/index.html','true',[ 
		['PAGE','74001',jdecode('Espa%C3%B1a'),jdecode(''),'/73601/74001.html','true',[],'',''],
		['PAGE','74022',jdecode('Argentina'),jdecode(''),'/73601/74022.html','true',[],'',''],
		['PAGE','74043',jdecode('Mexico'),jdecode(''),'/73601/74043.html','true',[],'',''],
		['PAGE','74064',jdecode('Panam%C3%A1'),jdecode(''),'/73601/74064.html','true',[],'',''],
		['PAGE','74085',jdecode('Resto+de+America+Larina'),jdecode(''),'/73601/74085.html','true',[],'','']
	],'',''],
	['PAGE','57301',jdecode('Mi+Historia'),jdecode(''),'/57301.html','true',[],'',''],
	['PAGE','4722',jdecode('Agaja'),jdecode(''),'/4722.html','true',[],'',''],
	['PAGE','20101',jdecode('Mapa+de+acceso'),jdecode(''),'/20101.html','true',[],'',''],
	['PAGE','25001',jdecode('Multimedia'),jdecode(''),'/25001/index.html','true',[ 
		['PAGE','20301',jdecode('%C3%81LBUM+DE+FOTOS'),jdecode(''),'/25001/20301.html','true',[],'',''],
		['PAGE','25022',jdecode('Hay+que+Vivir'),jdecode(''),'/25001/25022.html','true',[],'',''],
		['PAGE','72001',jdecode('Otros+Videos'),jdecode(''),'/25001/72001.html','true',[],'','']
	],'',''],
	['PAGE','4764',jdecode('Descargas'),jdecode(''),'/4764.html','true',[],'',''],
	['PAGE','4785',jdecode('Links'),jdecode(''),'/4785.html','true',[],'',''],
	['PAGE','5306',jdecode('Libro+de+visitas'),jdecode(''),'/5306/index.html','true',[ 
		['PAGE','5301',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/5306/5301.html','false',[],'','']
	],'',''],
	['PAGE','42101',jdecode('Cont%C3%A1cto'),jdecode(''),'/42101/index.html','true',[ 
		['PAGE','42401',jdecode('Cont%C3%A1ctenos+%28follow+up+page%29'),jdecode(''),'/42101/42401.html','false',[],'','']
	],'',''],
	['PAGE','70901',jdecode('Formulario+de+compra'),jdecode(''),'/70901/index.html','true',[ 
		['PAGE','71201',jdecode('Formulario+de+compra+%28follow+up+page%29'),jdecode(''),'/70901/71201.html','false',[],'','']
	],'',''],
	['PAGE','78301',jdecode('Blog'),jdecode(''),'/78301.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='988';
theSitetree.keyvisualName='aerzteteam.jpg';
theSitetree.fontsetId='166';
theSitetree.graphicsetId='197';
theSitetree.contentColor='A00000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'988',
				keyvisualName: 	'aerzteteam.jpg',
				fontsetId: 		'166',
				graphicsetId: 	'197',
				contentColor: 	'A00000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090426-110955'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-5306aars20in32qp']={
webappId:    '1002',
documentId:  '5306',
internalId:  '5306aars20in32qp',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-7940']={
webappId:    '7008',
documentId:  '42101',
internalId:  '7940',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20081019-165316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20080511-175206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20080502-162651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70901',
internalId:  '',
customField: '20090405-195059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20080511-180404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4785',
internalId:  '',
customField: '20090226-134708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5306',
internalId:  '',
customField: '20080514-221817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78301',
internalId:  '',
customField: '20100306-185755'
};
webappMappings['7050']=webappMappings['7050-6133']={
webappId:    '7050',
documentId:  '78301',
internalId:  '6133',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74022',
internalId:  '',
customField: '20090414-195853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74001',
internalId:  '',
customField: '20090515-222812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74043',
internalId:  '',
customField: '20090414-201744'
};
webappMappings['7005']=webappMappings['7005-60']={
webappId:    '7005',
documentId:  '501',
internalId:  '60',
customField: 'language:es;country:ES;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '20101',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74085',
internalId:  '',
customField: '20090515-223158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20080428-180705'
};
webappMappings['1501']=webappMappings['1501-4225023']={
webappId:    '1501',
documentId:  '501',
internalId:  '4225023',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20080507-165331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20081019-174001'
};
webappMappings['7060']=webappMappings['7060-c5e39214444efe9c897e27c081e65a3c']={
webappId:    '7060',
documentId:  '20301',
internalId:  'c5e39214444efe9c897e27c081e65a3c',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74064',
internalId:  '',
customField: '20090414-202536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20080508-191906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25022',
internalId:  '',
customField: '20081019-174718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73601',
internalId:  '',
customField: '20090515-223331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71201',
internalId:  '',
customField: '20090405-193311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57301',
internalId:  '',
customField: '20081019-173251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20080608-113146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72001',
internalId:  '',
customField: '20090525-140158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20080514-221855'
};
webappMappings['7008']=webappMappings['7008-7941']={
webappId:    '7008',
documentId:  '70901',
internalId:  '7941',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42401',
internalId:  '',
customField: '20080514-175310'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN32QP';
var companyName   = 'DIARIO+DE+UN+LUDOPATA';
var htmlTitle	  = 'DIARIO+DE+UN+LUDOPATA';
var metaKeywords  = 'Ludopatia+ludopata+diario+superacion+juegos+de+azar+diario+de+un+ludopata+eride+ediciones+panama+vigo+colombia+argentina+mexico';
var metaContents  = 'Diario+de+un+Lud%C3%B3pata%3A+Diario+de+superaci%C3%B3n+de+un+joven+de+25+a%C3%B1os.+Como+superar+la+adiccion+al+juego+de+azar.+Adicciones+de+Ludopatia.+Noticias';
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();
};

