/* [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','4607',jdecode('Home'),jdecode(''),'/4607.html','true',[],'',''],
	['PAGE','158360',jdecode('Band'),jdecode(''),'/158360/index.html','true',[ 
		['PAGE','166560',jdecode('Aline+Trede'),jdecode(''),'/158360/166560.html','true',[],'',''],
		['PAGE','166581',jdecode('Bernhard+Eicher'),jdecode(''),'/158360/166581.html','true',[],'',''],
		['PAGE','166602',jdecode('Jimy+Hofer'),jdecode(''),'/158360/166602.html','true',[],'',''],
		['PAGE','166623',jdecode('Mario+Imhof'),jdecode(''),'/158360/166623.html','true',[],'',''],
		['PAGE','166644',jdecode('Patrizia+Mordini'),jdecode(''),'/158360/166644.html','true',[],'',''],
		['PAGE','166665',jdecode('Pesche+B%C3%BChler'),jdecode(''),'/158360/166665.html','true',[],'',''],
		['PAGE','166686',jdecode('Simon+Glauser'),jdecode(''),'/158360/166686.html','true',[],'',''],
		['PAGE','166707',jdecode('Su+Elsener'),jdecode(''),'/158360/166707.html','true',[],'',''],
		['PAGE','166728',jdecode('Thomas+G%C3%B6ttin'),jdecode(''),'/158360/166728.html','true',[],'',''],
		['PAGE','166749',jdecode('Tinu+Schneider'),jdecode(''),'/158360/166749.html','true',[],'','']
	],'',''],
	['PAGE','4664',jdecode('Goodies'),jdecode(''),'/4664/index.html','true',[ 
		['PAGE','166960',jdecode('Pics'),jdecode(''),'/4664/166960.html','true',[],'',''],
		['PAGE','166981',jdecode('Music'),jdecode(''),'/4664/166981.html','true',[],'',''],
		['PAGE','170060',jdecode('Lyrics'),jdecode(''),'/4664/170060.html','true',[],'',''],
		['PAGE','167044',jdecode('Supporters'),jdecode(''),'/4664/167044.html','true',[],'',''],
		['PAGE','167002',jdecode('Merchandising'),jdecode(''),'/4664/167002.html','false',[],'',''],
		['PAGE','167023',jdecode('Links'),jdecode(''),'/4664/167023.html','true',[],'','']
	],'',''],
	['PAGE','93368',jdecode('Guestbook'),jdecode(''),'/93368.html','true',[],'',''],
	['PAGE','166460',jdecode('Booking'),jdecode(''),'/166460.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Esoteric';
theSitetree.paletteFamily='97332A';
theSitetree.keyvisualId='5873';
theSitetree.keyvisualName='kv_5873.jpg';
theSitetree.fontsetId='11103';
theSitetree.graphicsetId='11880';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFD8D4';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Esoteric',
				paletteFamily: 	'97332A',
				keyvisualId: 	'5873',
				keyvisualName: 	'kv_5873.jpg',
				fontsetId: 		'11103',
				graphicsetId: 	'11880',
				contentColor: 	'000000',
				contentBGColor: 'FFD8D4',
				a_color: 		'DBDBDB',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158360',
internalId:  '',
customField: '20100914-004452'
};
webappMappings['7060']=webappMappings['7060-27724ed026eeff4e9808b158abba1a18']={
webappId:    '7060',
documentId:  '166960',
internalId:  '27724ed026eeff4e9808b158abba1a18',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-93368ahp010in25o6']={
webappId:    '1002',
documentId:  '93368',
internalId:  '93368ahp010in25o6',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166460',
internalId:  '',
customField: '20110307-173924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170060',
internalId:  '',
customField: '20110122-155823'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4607',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166960',
internalId:  '',
customField: '20100614-231650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166981',
internalId:  '',
customField: '20100918-144204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167002',
internalId:  '',
customField: '20100614-202912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166707',
internalId:  '',
customField: '20100615-002115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166686',
internalId:  '',
customField: '20100615-002052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166665',
internalId:  '',
customField: '20100615-002031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4607',
internalId:  '',
customField: '20110430-130104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20110307-180111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166728',
internalId:  '',
customField: '20100615-002130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166749',
internalId:  '',
customField: '20100615-002152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166644',
internalId:  '',
customField: '20100918-143629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93368',
internalId:  '',
customField: '20100614-231543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167023',
internalId:  '',
customField: '20100616-145857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167044',
internalId:  '',
customField: '20100615-002306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166623',
internalId:  '',
customField: '20100615-001848'
};
webappMappings['7008']=webappMappings['7008-3225']={
webappId:    '7008',
documentId:  '166460',
internalId:  '3225',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166560',
internalId:  '',
customField: '20100615-001735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166581',
internalId:  '',
customField: '20100615-001807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166602',
internalId:  '',
customField: '20100615-001828'
};
webappMappings['7008']=webappMappings['7008-3230']={
webappId:    '7008',
documentId:  '167044',
internalId:  '3230',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-832153']={
webappId:    '1501',
documentId:  '4607',
internalId:  '832153',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-3231']={
webappId:    '7008',
documentId:  '167002',
internalId:  '3231',
customField: 'language:de;country:CH;'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010IN25O6';
var companyName   = 'FraktionsZwang+-+politics+goes+rock%27n%27roll';
var htmlTitle	  = 'FraktionsZwang+-+politics+goes+rock%27n%27roll';
var metaKeywords  = 'FraktionsZwang%2C+Fraktion%2C+Bern%2C+Stadtrat%2C+Stadtparlament%2C+Politik%2C+politics+goes+rock%27n%27roll%2C+Mundartrock%2C+Mundart%2C+Schweiz%2C+Ratsband%2C+Simon+Glauser%2C+Aline+Trede%2C+Bernhard+Eicher%2C+Jimy+Hofer%2C+Patrizia+Mordini%2C+Mario+Imhof%2C+Peter+B%C3%BChler%2C+Su+Elsener%2C+Thomas+G%C3%B6ttin%2C+Tinu+Schneider%2C+Markus+von+K%C3%A4nel';
var metaContents  = 'FraktionsZwang%2C+Fraktion%2C+Bern%2C+Stadtrat%2C+Stadtparlament%2C+Politik%2C+politics+goes+rock%27n%27roll%2C+Mundartrock%2C+Mundart%2C+Schweiz%2C+Ratsband%2C+Simon+Glauser%2C+Aline+Trede%2C+Bernhard+Eicher%2C+Jimy+Hofer%2C+Patrizia+Mordini%2C+Mario+Imhof%2C+Peter+B%C3%BChler%2C+Su+Elsener%2C+Thomas+G%C3%B6ttin%2C+Tinu+Schneider%2C+Markus+von+K%C3%A4nel';
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();
};

