/* [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','4599',jdecode('MA+MOYOLICATZIN'),jdecode(''), jdecode('%2F4599.html'), 'true',[],'',''],
	['PAGE','127872',jdecode('ESPA%C3%91OL'),jdecode(''), jdecode('%2F127872%2Findex.html'), 'true',[ 
		['PAGE','4683',jdecode('A%C3%B1os%2C+meses'),jdecode(''), jdecode('%2F127872%2F4683.html'), 'true',[],'',''],
		['PAGE','4710',jdecode('D%C3%ADas'),jdecode(''), jdecode('%2F127872%2F4710.html'), 'true',[],'',''],
		['PAGE','437601',jdecode('Los+nueve+Se%C3%B1ores+de+la+Noche'),jdecode(''), jdecode('%2F127872%2F437601.html'), 'true',[],'',''],
		['PAGE','437622',jdecode('D%C3%ADas+de+huella+de+pie'),jdecode(''), jdecode('%2F127872%2F437622.html'), 'true',[],'',''],
		['PAGE','4737',jdecode('Cuenta+larga'),jdecode(''), jdecode('%2F127872%2F4737.html'), 'true',[],'',''],
		['PAGE','45303',jdecode('Ajuste+calend%C3%A1rico+de+Xochicalco'),jdecode(''), jdecode('%2F127872%2F45303.html'), 'true',[],'',''],
		['PAGE','59303',jdecode('Or%C3%ADgenes+del+Tonalpohualli'),jdecode(''), jdecode('%2F127872%2F59303.html'), 'true',[],'',''],
		['PAGE','4764',jdecode('Enlaces'),jdecode(''), jdecode('%2F127872%2F4764.html'), 'true',[],'','']
	],'',''],
	['PAGE','130373',jdecode('NAHUATL'),jdecode(''), jdecode('%2F130373%2Findex.html'), 'true',[ 
		['PAGE','130870',jdecode('In+xihuitl%2C+in+metztli'),jdecode(''), jdecode('%2F130373%2F130870.html'), 'true',[],'',''],
		['PAGE','130897',jdecode('In+tonalli'),jdecode(''), jdecode('%2F130373%2F130897.html'), 'true',[],'',''],
		['PAGE','437643',jdecode('In+chiconahui+yohualteteuctin'),jdecode(''), jdecode('%2F130373%2F437643.html'), 'true',[],'',''],
		['PAGE','437664',jdecode('Xocpalmachiotzintonalli'),jdecode(''), jdecode('%2F130373%2F437664.html'), 'true',[],'',''],
		['PAGE','130924',jdecode('Hueypohualli'),jdecode(''), jdecode('%2F130373%2F130924.html'), 'true',[],'',''],
		['PAGE','130951',jdecode('Xochicalco+itonalpohualcuepaliz'),jdecode(''), jdecode('%2F130373%2F130951.html'), 'true',[],'',''],
		['PAGE','130978',jdecode('Tonalpohualli+inelhuayo'),jdecode(''), jdecode('%2F130373%2F130978.html'), 'true',[],'',''],
		['PAGE','131005',jdecode('Occequintin+chanamame'),jdecode(''), jdecode('%2F130373%2F131005.html'), 'true',[],'','']
	],'',''],
	['PAGE','130606',jdecode('DEUTSCH'),jdecode(''), jdecode('%2F130606%2Findex.html'), 'true',[ 
		['PAGE','131460',jdecode('Jahre%2C+Monate'),jdecode(''), jdecode('%2F130606%2F131460.html'), 'true',[],'',''],
		['PAGE','131487',jdecode('Tage'),jdecode(''), jdecode('%2F130606%2F131487.html'), 'true',[],'',''],
		['PAGE','437685',jdecode('Die+neun+Herren+der+Nacht'),jdecode(''), jdecode('%2F130606%2F437685.html'), 'true',[],'',''],
		['PAGE','437706',jdecode('Fussabdruckstage'),jdecode(''), jdecode('%2F130606%2F437706.html'), 'true',[],'',''],
		['PAGE','131514',jdecode('Die+lange+Tagesz%C3%A4hlung'),jdecode(''), jdecode('%2F130606%2F131514.html'), 'true',[],'',''],
		['PAGE','131541',jdecode('Kalenderkorrektur+von+Xochicalco'),jdecode(''), jdecode('%2F130606%2F131541.html'), 'true',[],'',''],
		['PAGE','131568',jdecode('Ursprung+des+Tonalpohuallis'),jdecode(''), jdecode('%2F130606%2F131568.html'), 'true',[],'',''],
		['PAGE','131595',jdecode('Weiterf%C3%BChrende+Links'),jdecode(''), jdecode('%2F130606%2F131595.html'), 'true',[],'','']
	],'',''],
	['PAGE','130633',jdecode('ITALIANO'),jdecode(''), jdecode('%2F130633%2Findex.html'), 'true',[ 
		['PAGE','131848',jdecode('Anni.+mesi'),jdecode(''), jdecode('%2F130633%2F131848.html'), 'true',[],'',''],
		['PAGE','131875',jdecode('Giorni'),jdecode(''), jdecode('%2F130633%2F131875.html'), 'true',[],'',''],
		['PAGE','437727',jdecode('I+nove+Signori+della+notte'),jdecode(''), jdecode('%2F130633%2F437727.html'), 'true',[],'',''],
		['PAGE','437748',jdecode('Giorni+d%26%23x27%3Bimpronta+di+piede'),jdecode(''), jdecode('%2F130633%2F437748.html'), 'true',[],'',''],
		['PAGE','131902',jdecode('Computo+lungo'),jdecode(''), jdecode('%2F130633%2F131902.html'), 'true',[],'',''],
		['PAGE','131929',jdecode('Aggiustamento+calendarico+di+Xochicalco'),jdecode(''), jdecode('%2F130633%2F131929.html'), 'true',[],'',''],
		['PAGE','131956',jdecode('Origini+dil+tonalpohualli'),jdecode(''), jdecode('%2F130633%2F131956.html'), 'true',[],'',''],
		['PAGE','131983',jdecode('Vincoli'),jdecode(''), jdecode('%2F130633%2F131983.html'), 'true',[],'','']
	],'',''],
	['PAGE','132236',jdecode('FRAN%C3%A7AIS'),jdecode(''), jdecode('%2F132236%2Findex.html'), 'true',[ 
		['PAGE','132702',jdecode('Ans%2C+mois'),jdecode(''), jdecode('%2F132236%2F132702.html'), 'true',[],'',''],
		['PAGE','132729',jdecode('Jours'),jdecode(''), jdecode('%2F132236%2F132729.html'), 'true',[],'',''],
		['PAGE','437769',jdecode('Les+neuf+Seigneurs+de+la+nuit'),jdecode(''), jdecode('%2F132236%2F437769.html'), 'true',[],'',''],
		['PAGE','437790',jdecode('Jours+d%26%23x27%3Bempreinte+de+pied'),jdecode(''), jdecode('%2F132236%2F437790.html'), 'true',[],'',''],
		['PAGE','132756',jdecode('Compte+longue'),jdecode(''), jdecode('%2F132236%2F132756.html'), 'true',[],'',''],
		['PAGE','132783',jdecode('Changement+calendarique+de+Xochicalco'),jdecode(''), jdecode('%2F132236%2F132783.html'), 'true',[],'',''],
		['PAGE','132810',jdecode('L%26%23x27%3Borigine+du+tonalpohualli'),jdecode(''), jdecode('%2F132236%2F132810.html'), 'true',[],'',''],
		['PAGE','132837',jdecode('Links'),jdecode(''), jdecode('%2F132236%2F132837.html'), 'true',[],'','']
	],'',''],
	['PAGE','132263',jdecode('ENGLISH'),jdecode(''), jdecode('%2F132263%2Findex.html'), 'true',[ 
		['PAGE','133090',jdecode('Years%2C+months'),jdecode(''), jdecode('%2F132263%2F133090.html'), 'true',[],'',''],
		['PAGE','133117',jdecode('Days'),jdecode(''), jdecode('%2F132263%2F133117.html'), 'true',[],'',''],
		['PAGE','437811',jdecode('The+nine+Lords+of+the+night'),jdecode(''), jdecode('%2F132263%2F437811.html'), 'true',[],'',''],
		['PAGE','437832',jdecode('Footprint+days'),jdecode(''), jdecode('%2F132263%2F437832.html'), 'true',[],'',''],
		['PAGE','133144',jdecode('Long+count'),jdecode(''), jdecode('%2F132263%2F133144.html'), 'true',[],'',''],
		['PAGE','133171',jdecode('Calendar+correction+of+Xochicalco'),jdecode(''), jdecode('%2F132263%2F133171.html'), 'true',[],'',''],
		['PAGE','133198',jdecode('The+origins+of+the+tonalpohualli'),jdecode(''), jdecode('%2F132263%2F133198.html'), 'true',[],'',''],
		['PAGE','133225',jdecode('Links'),jdecode(''), jdecode('%2F132263%2F133225.html'), 'true',[],'','']
	],'','']];
var siteelementCount=55;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='FFD375';
theSitetree.keyvisualId='2054';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='329';
theSitetree.graphicsetId='385';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stylus',
				paletteFamily: 	'FFD375',
				keyvisualId: 	'2054',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'329',
				graphicsetId: 	'385',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFD375',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20091219-153613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127872',
internalId:  '',
customField: '20090203-190524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4683',
internalId:  '',
customField: '20100224-062930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4710',
internalId:  '',
customField: '20101208-184016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4737',
internalId:  '',
customField: '20060311-225559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45303',
internalId:  '',
customField: '20090315-144134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59303',
internalId:  '',
customField: '20061107-195117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20101031-090045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130373',
internalId:  '',
customField: '20081213-211155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130870',
internalId:  '',
customField: '20090223-194949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130897',
internalId:  '',
customField: '20060401-214045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130924',
internalId:  '',
customField: '20060711-210350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130951',
internalId:  '',
customField: '20090315-144409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130978',
internalId:  '',
customField: '20071117-142906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131005',
internalId:  '',
customField: '20101031-172226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130606',
internalId:  '',
customField: '20080703-160954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131460',
internalId:  '',
customField: '20100224-063052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131487',
internalId:  '',
customField: '20071227-220752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131514',
internalId:  '',
customField: '20071227-221135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131541',
internalId:  '',
customField: '20090315-144557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131568',
internalId:  '',
customField: '20071227-223420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131595',
internalId:  '',
customField: '20101223-203437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130633',
internalId:  '',
customField: '20071117-201924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131848',
internalId:  '',
customField: '20060618-113001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131875',
internalId:  '',
customField: '20051117-195610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131902',
internalId:  '',
customField: '20051117-195626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131929',
internalId:  '',
customField: '20051117-195653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131956',
internalId:  '',
customField: '20051117-195720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131983',
internalId:  '',
customField: '20051117-195736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132236',
internalId:  '',
customField: '20071117-202635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132702',
internalId:  '',
customField: '20060618-113022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132729',
internalId:  '',
customField: '20051117-195833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132756',
internalId:  '',
customField: '20051117-195853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132783',
internalId:  '',
customField: '20051117-195918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132810',
internalId:  '',
customField: '20051117-195937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132837',
internalId:  '',
customField: '20051117-195956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132263',
internalId:  '',
customField: '20080703-172217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133090',
internalId:  '',
customField: '20060618-113110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133117',
internalId:  '',
customField: '20051117-200056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133144',
internalId:  '',
customField: '20051117-200212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133171',
internalId:  '',
customField: '20070604-063128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133198',
internalId:  '',
customField: '20051117-200255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133225',
internalId:  '',
customField: '20051117-200308'
};
webappMappings['1501']=webappMappings['1501-135574']={
webappId:    '1501',
documentId:  '4599',
internalId:  '135574',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437601',
internalId:  '',
customField: '20090205-192251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437622',
internalId:  '',
customField: '20110329-205917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437643',
internalId:  '',
customField: '20090203-185621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437664',
internalId:  '',
customField: '20090203-185652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437685',
internalId:  '',
customField: '20091219-155313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437706',
internalId:  '',
customField: '20110329-205743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437727',
internalId:  '',
customField: '20090203-185740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437748',
internalId:  '',
customField: '20090203-185818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437769',
internalId:  '',
customField: '20090203-185903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437790',
internalId:  '',
customField: '20090203-190043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437811',
internalId:  '',
customField: '20090203-190125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '437832',
internalId:  '',
customField: '20090203-190151'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXSI5';
var companyName   = '7+Cipactli%2C+12+Acatl++06.02.2012';
var htmlTitle	  = 'Tlacuilolli+ipan+tonalpohuallotl';
var metaKeywords  = 'Tonalpohualli+Xochicalco+Nahuatl+Correlaci%EF%BF%BDn+Nahuallotl';
var metaContents  = 'Tonalpohualli+Xochicalco+Nahuatl+Correlaci%EF%BF%BDn+Nahuallotl';
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();
};

