/* [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','4595',jdecode('Home'),jdecode(''),'/4595.html','true',[],'',''],
	['PAGE','13053',jdecode('The+Band'),jdecode(''),'/13053.html','true',[],'',''],
	['PAGE','52389',jdecode('News'),jdecode(''),'/52389.html','true',[],'',''],
	['PAGE','12303',jdecode('Music'),jdecode(''),'/12303.html','true',[],'',''],
	['PAGE','19303',jdecode('Concerts'),jdecode(''),'/19303.html','true',[],'',''],
	['PAGE','58783',jdecode('Pictures'),jdecode(''),'/58783/index.html','true',[ 
		['PAGE','78583',jdecode('Inox'),jdecode(''),'/58783/78583.html','true',[],'',''],
		['PAGE','74383',jdecode('Cosmic+Sound+Studio'),jdecode(''),'/58783/74383.html','true',[],'','']
	],'',''],
	['PAGE','9330',jdecode('Contact+%26+Booking'),jdecode(''),'/9330.html','true',[],'',''],
	['PAGE','8322',jdecode('G%C3%A4stebuch'),jdecode(''),'/8322/index.html','true',[ 
		['PAGE','8323',jdecode('Eintr%C3%A4ge'),jdecode(''),'/8322/8323.html','false',[],'','']
	],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='1D7573';
theSitetree.keyvisualId='2342';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='373';
theSitetree.graphicsetId='426';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='1D7573';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Speed',
				paletteFamily: 	'1D7573',
				keyvisualId: 	'2342',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'373',
				graphicsetId: 	'426',
				contentColor: 	'FFFFFF',
				contentBGColor: '1D7573',
				a_color: 		'1D7573',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				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:  '4595',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-8322ahp010in2di1']={
webappId:    '1002',
documentId:  '8322',
internalId:  '8322ahp010in2di1',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-3587']={
webappId:    '7008',
documentId:  '12303',
internalId:  '3587',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4595',
internalId:  '',
customField: '20110115-200820'
};
webappMappings['7008']=webappMappings['7008-3586']={
webappId:    '7008',
documentId:  '9330',
internalId:  '3586',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-66eb2640cb8a1c7c75ac290dfd6eff27']={
webappId:    '7060',
documentId:  '74383',
internalId:  '66eb2640cb8a1c7c75ac290dfd6eff27',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-11c02fdd1eeed71fa8238c4ef82cc207']={
webappId:    '7060',
documentId:  '78583',
internalId:  '11c02fdd1eeed71fa8238c4ef82cc207',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13053',
internalId:  '',
customField: '20110115-195143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52389',
internalId:  '',
customField: '20110115-201500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12303',
internalId:  '',
customField: '20071018-074309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19303',
internalId:  '',
customField: '20110115-200422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58783',
internalId:  '',
customField: '20070501-151845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78583',
internalId:  '',
customField: '20070501-150839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74383',
internalId:  '',
customField: '20070411-205442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9330',
internalId:  '',
customField: '20071018-073502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8322',
internalId:  '',
customField: '20041112-191534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8323',
internalId:  '',
customField: '20041112-191549'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010IN2DI1';
var companyName   = '';
var htmlTitle	  = 'Funky+Delicious';
var metaKeywords  = 'funkydelicious+funky+delicious+rasoul+jalali+marina+trulec+s%EF%BF%BDmi+schmid+t%EF%BF%BDbi+stefan+br%EF%BF%BDndle+lars+jacobi+sandro+schneider+give+it+to+me+if+band+aargau+region+baden+funk';
var metaContents  = 'Funk-Rock+vom+Feinsten+-+das+bietet+die+achtk%EF%BF%BDpfige+Badener+Band+Funky+Delicious.+Treibende+Beats+und+B%EF%BF%BDsse+werden+erg%EF%BF%BDnzt+mit+Melodien+von+Gitarre+und+Hammond+sowie+knackig+markanten+Bl%EF%BF%BDsers%EF%BF%BDtzen.+Den+letzten+Schliff+gibt+diesem+unwiderstehlichen+Soundcocktail+die+wunderbar+soulige+Stimme+der+S%EF%BF%BDngerin+Marina+Trulec+%EF%BF%BD+wer+dann+noch+sitzen+bleibt%2C+ist+selber+schuld%21';
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();
};

