/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','134401',jdecode('NEWS+%26+Agenda'),jdecode(''),'/134401.html','true',[],'',''],
	['PAGE','652',jdecode('Curriculum'),jdecode(''),'/652.html','true',[],'',''],
	['PAGE','673',jdecode('Pictures'),jdecode(''),'/673/index.html','true',[ 
		['PAGE','28701',jdecode('That%26%23x27%3Bs+me'),jdecode(''),'/673/28701.html','true',[],'',''],
		['PAGE','28722',jdecode('Musical+'),jdecode(''),'/673/28722.html','true',[],'',''],
		['PAGE','28743',jdecode('Big+Band'),jdecode(''),'/673/28743.html','true',[],'',''],
		['PAGE','181101',jdecode('Auftritte+09'),jdecode(''),'/673/181101.html','true',[],'',''],
		['PAGE','142901',jdecode('Auftritte+08'),jdecode(''),'/673/142901.html','true',[],'',''],
		['PAGE','143701',jdecode('Auftritte+07'),jdecode(''),'/673/143701.html','true',[],'',''],
		['PAGE','197901',jdecode('mit+Chris+von+Rohr'),jdecode(''),'/673/197901.html','true',[],'','']
	],'',''],
	['PAGE','120201',jdecode('Demo-Songs'),jdecode(''),'/120201/index.html','true',[ 
		['PAGE','715',jdecode('Always+on+my+mind'),jdecode(''),'/120201/715.html','true',[],'',''],
		['PAGE','189701',jdecode('Angel'),jdecode(''),'/120201/189701.html','true',[],'',''],
		['PAGE','196801',jdecode('Dreams+come+true'),jdecode(''),'/120201/196801.html','false',[],'',''],
		['PAGE','90001',jdecode('Fallin%26%23x27%3B'),jdecode(''),'/120201/90001.html','true',[],'',''],
		['PAGE','110801',jdecode('You%26%23x27%3Bre+all+I+want+'),jdecode(''),'/120201/110801.html','true',[],'',''],
		['PAGE','95501',jdecode('The+Rose'),jdecode(''),'/120201/95501.html','true',[],'',''],
		['PAGE','90022',jdecode('The+Look+of+love'),jdecode(''),'/120201/90022.html','true',[],'',''],
		['PAGE','147901',jdecode('Turn+me+on'),jdecode(''),'/120201/147901.html','true',[],'',''],
		['PAGE','33301',jdecode('Somewhere+over+the+rainbow'),jdecode(''),'/120201/33301.html','true',[],'',''],
		['PAGE','90601',jdecode('The+Lion+sleeps+tonight'),jdecode(''),'/120201/90601.html','true',[],'',''],
		['PAGE','112601',jdecode('I%26%23x27%3Bll+be+home+for+christmas'),jdecode(''),'/120201/112601.html','true',[],'',''],
		['PAGE','149901',jdecode('Please+come+home+for+christmas'),jdecode(''),'/120201/149901.html','true',[],'',''],
		['PAGE','148901',jdecode('Musical%3A+on+my+own'),jdecode(''),'/120201/148901.html','true',[],'',''],
		['PAGE','176901',jdecode('If+I+ain%26%23x27%3Bt+got+you'),jdecode(''),'/120201/176901.html','true',[],'','']
	],'',''],
	['PAGE','736',jdecode('Repertoire'),jdecode(''),'/736.html','true',[],'',''],
	['PAGE','22922',jdecode('Presse'),jdecode(''),'/22922.html','true',[],'',''],
	['PAGE','24601',jdecode('Preise'),jdecode(''),'/24601.html','true',[],'',''],
	['PAGE','23206',jdecode('G%C3%A4stebuch'),jdecode(''),'/23206/index.html','true',[ 
		['PAGE','23201',jdecode('Eintr%C3%A4ge'),jdecode(''),'/23206/23201.html','true',[],'','']
	],'',''],
	['PAGE','778',jdecode('Kontakt'),jdecode(''),'/778.html','true',[],'',''],
	['PAGE','26901',jdecode('Links'),jdecode(''),'/26901.html','true',[],'',''],
	['PAGE','90064',jdecode('Referenzen'),jdecode(''),'/90064.html','true',[],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Blues';
theSitetree.paletteFamily='FC0707';
theSitetree.keyvisualId='2749';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='10569';
theSitetree.graphicsetId='10701';
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: 			'Blues',
				paletteFamily: 	'FC0707',
				keyvisualId: 	'2749',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'10569',
				graphicsetId: 	'10701',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FC0707',
				e_color: 		'FC0707',
				f_color: 		'FC0707',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-23206abw0x0in2m6d']={
webappId:    '1002',
documentId:  '23206',
internalId:  '23206abw0x0in2m6d',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-1759']={
webappId:    '7008',
documentId:  '778',
internalId:  '1759',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-9377325']={
webappId:    '1501',
documentId:  '601',
internalId:  '9377325',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100308-174058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134401',
internalId:  '',
customField: '20100503-134644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20090731-135539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20071205-191935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20100227-073303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28722',
internalId:  '',
customField: '20071205-192042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28743',
internalId:  '',
customField: '20060913-114246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181101',
internalId:  '',
customField: '20100131-214610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142901',
internalId:  '',
customField: '20090105-230346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143701',
internalId:  '',
customField: '20080210-192002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120201',
internalId:  '',
customField: '20080210-194345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20061025-003334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90001',
internalId:  '',
customField: '20061025-003440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110801',
internalId:  '',
customField: '20061213-105028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95501',
internalId:  '',
customField: '20061025-132231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90022',
internalId:  '',
customField: '20061025-000130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147901',
internalId:  '',
customField: '20080210-205422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33301',
internalId:  '',
customField: '20061025-003202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189701',
internalId:  '',
customField: '20100113-210127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90601',
internalId:  '',
customField: '20061025-002625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112601',
internalId:  '',
customField: '20061214-101152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149901',
internalId:  '',
customField: '20080210-231042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148901',
internalId:  '',
customField: '20080214-200648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176901',
internalId:  '',
customField: '20081226-225542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20090105-231711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22922',
internalId:  '',
customField: '20100129-104612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20080725-190751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23206',
internalId:  '',
customField: '20061003-230206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23201',
internalId:  '',
customField: '20060828-144403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20080718-180808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20100215-211757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90064',
internalId:  '',
customField: '20100302-151747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '196801',
internalId:  '',
customField: '20100227-080237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197901',
internalId:  '',
customField: '20100302-170700'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2M6D';
var companyName   = 'A+voice+-+beautiful+like+flowers';
var htmlTitle	  = '';
var metaKeywords  = 'S%C3%A4ngerin+Hochzeit+Anlass+Event+Musik+music+mieten+Show+Unterhaltung+Songs+Stimme+Ursula+Bickel+Ursula+Bichsel+Konzert';
var metaContents  = 'S%C3%A4ngerin+Hochzeit+Anlass+Event+Musik+music+mieten+Show+Unterhaltung+Songs+Stimme+Ursula+Bickel+Ursula+Bichsel+Konzert';
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();
};
