/* [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 theSitetree=[ 
	['PAGE','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','452',jdecode('Biographie'),jdecode(''),'/452.html','true',[],''],
	['PAGE','190601',jdecode('Neue+CD%21%21'),jdecode(''),'/190601/index.html','true',[ 
		['PAGE','192801',jdecode('Hansdampf'),jdecode(''),'/190601/192801.html','true',[],''],
		['PAGE','198564',jdecode('A-Poscht+'),jdecode(''),'/190601/198564.html','true',[],''],
		['PAGE','198522',jdecode('Pubert%C3%A4t'),jdecode(''),'/190601/198522.html','true',[],''],
		['PAGE','198543',jdecode('Es+isch+wie%60s+isch+'),jdecode(''),'/190601/198543.html','true',[],''],
		['PAGE','198501',jdecode('Gott+sei+Dank'),jdecode(''),'/190601/198501.html','true',[],''],
		['PAGE','203501',jdecode('Tarzan+%2B+Jane'),jdecode(''),'/190601/203501.html','true',[],'']
	],''],
	['PAGE','26201',jdecode('Repertoire+'),jdecode(''),'/26201.html','true',[],''],
	['PAGE','557',jdecode('Kontakt+'),jdecode(''),'/557/index.html','true',[ 
		['PAGE','14401',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/557/14401.html','false',[],'']
	],''],
	['PAGE','25601',jdecode('Fotos'),jdecode(''),'/25601.html','true',[],''],
	['PAGE','25643',jdecode('Referenzen'),jdecode(''),'/25643.html','true',[],''],
	['PAGE','148306',jdecode('G%C3%A4stebuch'),jdecode(''),'/148306/index.html','true',[ 
		['PAGE','148301',jdecode('Eintr%C3%A4ge'),jdecode(''),'/148306/148301.html','false',[],'']
	],''],
	['PAGE','164101',jdecode('Links'),jdecode(''),'/164101.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Fellow';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10637';
theSitetree.graphicsetId='10695';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				name: 			'Fellow',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10637',
				graphicsetId: 	'10695',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090513-125944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20071113-225548'
};
webappMappings['1002']=webappMappings['1002-148306abw0x0in2waj']={
webappId:    '1002',
documentId:  '148306',
internalId:  '148306abw0x0in2waj',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-20079672']={
webappId:    '1501',
documentId:  '401',
internalId:  '20079672',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190601',
internalId:  '',
customField: '20081211-120011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192801',
internalId:  '',
customField: '20081211-120317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198564',
internalId:  '',
customField: '20081211-120550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198522',
internalId:  '',
customField: '20081211-120815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198543',
internalId:  '',
customField: '20081211-121117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198501',
internalId:  '',
customField: '20081211-121344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26201',
internalId:  '',
customField: '20080204-174044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20070303-182816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20060915-222218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20090130-212356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25643',
internalId:  '',
customField: '20061104-162842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148306',
internalId:  '',
customField: '20081210-151649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148301',
internalId:  '',
customField: '20061115-155115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164101',
internalId:  '',
customField: '20081211-121829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '203501',
internalId:  '',
customField: '20090201-110742'
};
webappMappings['7008']=webappMappings['7008-5561']={
webappId:    '7008',
documentId:  '557',
internalId:  '5561',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2WAJ';
var companyName   = 'ROSSO%60S+LIVE-JUKEBOX';
var htmlTitle	  = 'Die+one-man-band+f%C3%BCr+jeden+Anlass';
var metaKeywords  = 'Band+Musik+Sound+Rosso+Rossos+Jukebox+onemanband+one-man-band+one+man+band+Konzert+Hochzeit+Party+Club+Rosso+und+Schwegi';
var metaContents  = 'Band+Musik+Sound+Rosso+Rossos+Jukebox+onemanband+one-man-band+one+man+band+Konzert+Hochzeit+Party+Club+Rosso+';
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();
};

