/* [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','1501',jdecode('Home'),jdecode(''),'/1501.html','true',[],'',''],
	['PAGE','52901',jdecode('Aktuell'),jdecode(''),'/52901.html','true',[],'',''],
	['PAGE','3201',jdecode('Biografie'),jdecode(''),'/3201/index.html','true',[ 
		['PAGE','3643',jdecode('Kurzbiografie+deutsch'),jdecode(''),'/3201/3643.html','true',[],'',''],
		['PAGE','3664',jdecode('Biography+in+english'),jdecode(''),'/3201/3664.html','true',[],'',''],
		['PAGE','3685',jdecode('Biographie+en+fran%C3%A7ais'),jdecode(''),'/3201/3685.html','true',[],'',''],
		['PAGE','3706',jdecode('Biografia+in+italiano'),jdecode(''),'/3201/3706.html','true',[],'',''],
		['PAGE','3622',jdecode('Auszeichnungen'),jdecode(''),'/3201/3622.html','true',[],'','']
	],'',''],
	['PAGE','4101',jdecode('Repertoire'),jdecode(''),'/4101/index.html','true',[ 
		['PAGE','3222',jdecode('Oper'),jdecode(''),'/4101/3222.html','true',[],'',''],
		['PAGE','4143',jdecode('Messen+%2F+Oratorien'),jdecode(''),'/4101/4143.html','true',[],'',''],
		['PAGE','4122',jdecode('Lied'),jdecode(''),'/4101/4122.html','true',[],'',''],
		['PAGE','4164',jdecode('Operette+%2F+Musical'),jdecode(''),'/4101/4164.html','true',[],'',''],
		['PAGE','4185',jdecode('Chanson+und+Andere'),jdecode(''),'/4101/4185.html','true',[],'','']
	],'',''],
	['PAGE','46601',jdecode('Konzerte+2009%2F10'),jdecode(''),'/46601/index.html','true',[ 
		['PAGE','68901',jdecode('September+2009'),jdecode(''),'/46601/68901.html','true',[],'',''],
		['PAGE','63501',jdecode('Oktober+2009'),jdecode(''),'/46601/63501.html','true',[],'',''],
		['PAGE','61822',jdecode('November+2009'),jdecode(''),'/46601/61822.html','true',[],'',''],
		['PAGE','12669',jdecode('Dezember+2009'),jdecode(''),'/46601/12669.html','true',[],'',''],
		['PAGE','12690',jdecode('J%C3%A4nner+2010'),jdecode(''),'/46601/12690.html','true',[],'',''],
		['PAGE','12711',jdecode('Februar+2010'),jdecode(''),'/46601/12711.html','true',[],'',''],
		['PAGE','12732',jdecode('M%C3%A4rz+2010'),jdecode(''),'/46601/12732.html','true',[],'',''],
		['PAGE','46301',jdecode('April+2010'),jdecode(''),'/46601/46301.html','true',[],'',''],
		['PAGE','46322',jdecode('Mai+2010'),jdecode(''),'/46601/46322.html','true',[],'',''],
		['PAGE','49501',jdecode('Juni+2010'),jdecode(''),'/46601/49501.html','true',[],'',''],
		['PAGE','49522',jdecode('Juli+2010'),jdecode(''),'/46601/49522.html','true',[],'',''],
		['PAGE','49543',jdecode('August+2010'),jdecode(''),'/46601/49543.html','true',[],'','']
	],'',''],
	['PAGE','3264',jdecode('Media+-+Fotos'),jdecode(''),'/3264/index.html','true',[ 
		['PAGE','11843',jdecode('Pressefotos'),jdecode(''),'/3264/11843.html','true',[],'',''],
		['PAGE','20701',jdecode('B%C3%BChnenfotos'),jdecode(''),'/3264/20701.html','true',[],'',''],
		['PAGE','4311',jdecode('Private+Fotos'),jdecode(''),'/3264/4311.html','true',[],'',''],
		['PAGE','4374',jdecode('Pressestimmen'),jdecode(''),'/3264/4374.html','true',[],'',''],
		['PAGE','57901',jdecode('TV-Berichte+%2F+Links'),jdecode(''),'/3264/57901.html','true',[],'','']
	],'',''],
	['PAGE','41901',jdecode('CDs'),jdecode(''),'/41901.html','true',[],'',''],
	['PAGE','4458',jdecode('Info'),jdecode(''),'/4458/index.html','true',[ 
		['PAGE','4416',jdecode('Allgemeine+Anfragen'),jdecode(''),'/4458/4416.html','true',[],'',''],
		['PAGE','3285',jdecode('Agenturen+%26+Partner'),jdecode(''),'/4458/3285.html','true',[],'',''],
		['PAGE','4479',jdecode('Impressum'),jdecode(''),'/4458/4479.html','true',[],'','']
	],'',''],
	['PAGE','14606',jdecode('G%C3%A4stebuch'),jdecode(''),'/14606/index.html','true',[ 
		['PAGE','14601',jdecode('Eintr%C3%A4ge'),jdecode(''),'/14606/14601.html','false',[],'','']
	],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Retro';
theSitetree.paletteFamily='CC3300';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='204';
theSitetree.graphicsetId='244';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Retro',
				paletteFamily: 	'CC3300',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'204',
				graphicsetId: 	'244',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'CC3300',
				b_color: 		'33CCCC',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'EAEAEA',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-14606ahopt0ine69c']={
webappId:    '1002',
documentId:  '14606',
internalId:  '14606ahopt0ine69c',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20090628-185345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20090628-184558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3664',
internalId:  '',
customField: '20090809-210111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52901',
internalId:  '',
customField: '20100619-015504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3643',
internalId:  '',
customField: '20090705-195133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3685',
internalId:  '',
customField: '20090705-194858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3706',
internalId:  '',
customField: '20061016-204339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3622',
internalId:  '',
customField: '20061016-230730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20061016-232019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3222',
internalId:  '',
customField: '20080906-175524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4143',
internalId:  '',
customField: '20061002-195213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4122',
internalId:  '',
customField: '20061002-175223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4164',
internalId:  '',
customField: '20080906-180057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4185',
internalId:  '',
customField: '20061016-231129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46601',
internalId:  '',
customField: '20090628-164451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68901',
internalId:  '',
customField: '20090628-185810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63501',
internalId:  '',
customField: '20090628-185951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61822',
internalId:  '',
customField: '20090628-190053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12669',
internalId:  '',
customField: '20091118-201734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12690',
internalId:  '',
customField: '20090628-173945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12711',
internalId:  '',
customField: '20090628-173933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12732',
internalId:  '',
customField: '20090628-174028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46301',
internalId:  '',
customField: '20100425-202709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46322',
internalId:  '',
customField: '20100427-193536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49501',
internalId:  '',
customField: '20100427-195935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49522',
internalId:  '',
customField: '20100509-195605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49543',
internalId:  '',
customField: '20100509-195054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3264',
internalId:  '',
customField: '20061016-231456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11843',
internalId:  '',
customField: '20081104-192629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20701',
internalId:  '',
customField: '20080906-184259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4311',
internalId:  '',
customField: '20070118-220300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4374',
internalId:  '',
customField: '20100427-202150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57901',
internalId:  '',
customField: '20080205-102355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20070118-221346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4458',
internalId:  '',
customField: '20061016-232606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4416',
internalId:  '',
customField: '20061016-211855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3285',
internalId:  '',
customField: '20080108-220225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4479',
internalId:  '',
customField: '20090628-181133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14606',
internalId:  '',
customField: '20060927-123731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20060927-123731'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0INE69C';
var companyName   = 'Martin+Achrainer+++++++++++++++++++++++++++++++++Bass-Bariton';
var htmlTitle	  = 'Offizielle+Homepage+von+Martin+Achrainer+-+Bassbariton';
var metaKeywords  = '';
var metaContents  = 'Martin+Achrainer+Homepage+';
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();
};
