/* [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','401',jdecode('HOME'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('NEWS'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','6422',jdecode('TEAM'),jdecode(''),'/6422/index.html','true',[ 
		['PAGE','7901',jdecode('Schlagzeug'),jdecode(''),'/6422/7901.html','true',[],'',''],
		['PAGE','10301',jdecode('Pauken'),jdecode(''),'/6422/10301.html','true',[],'',''],
		['PAGE','10322',jdecode('Bl%C3%B6ck'),jdecode(''),'/6422/10322.html','true',[],'',''],
		['PAGE','7922',jdecode('Trompeten'),jdecode(''),'/6422/7922.html','true',[],'',''],
		['PAGE','7943',jdecode('Posaunen'),jdecode(''),'/6422/7943.html','true',[],'',''],
		['PAGE','7964',jdecode('Horn'),jdecode(''),'/6422/7964.html','true',[],'',''],
		['PAGE','7985',jdecode('Susaphon'),jdecode(''),'/6422/7985.html','true',[],'',''],
		['PAGE','91412',jdecode('Bass-Triangel'),jdecode(''),'/6422/91412.html','true',[],'','']
	],'',''],
	['PAGE','6443',jdecode('VORSTAND'),jdecode(''),'/6443/index.html','true',[ 
		['PAGE','29401',jdecode('Kommissionen'),jdecode(''),'/6443/29401.html','true',[],'','']
	],'',''],
	['PAGE','6901',jdecode('FOTOS'),jdecode(''),'/6901.html','true',[],'',''],
	['PAGE','6464',jdecode('REPERTOIRE'),jdecode(''),'/6464.html','true',[],'',''],
	['PAGE','515',jdecode('SCH%C3%9C%C3%9CRBALL'),jdecode(''),'/515/index.html','true',[ 
		['PAGE','6485',jdecode('News'),jdecode(''),'/515/6485.html','true',[],'',''],
		['PAGE','6506',jdecode('Info%26%23x27%3Bs'),jdecode(''),'/515/6506.html','true',[],'',''],
		['PAGE','29422',jdecode('Sch%C3%BC%C3%BCrball-Kommission'),jdecode(''),'/515/29422.html','true',[],'',''],
		['PAGE','6527',jdecode('Fotos'),jdecode(''),'/515/6527.html','true',[],'','']
	],'',''],
	['PAGE','66612',jdecode('G%C3%84STEBUCH'),jdecode(''),'/66612.html','true',[],'',''],
	['PAGE','84412',jdecode('SPONSOREN'),jdecode(''),'/84412.html','true',[],'',''],
	['PAGE','536',jdecode('KONTAKT'),jdecode(''),'/536/index.html','true',[ 
		['PAGE','5301',jdecode('Neugugger'),jdecode(''),'/536/5301.html','true',[],'','']
	],'',''],
	['PAGE','43301',jdecode('LINKS'),jdecode(''),'/43301/index.html','true',[ 
		['PAGE','43322',jdecode('Diversi+Links'),jdecode(''),'/43301/43322.html','true',[],'','']
	],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Seasons_summer';
theSitetree.paletteFamily='AAD165';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21092';
theSitetree.graphicsetId='13191';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='AAD165';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Seasons_summer',
				paletteFamily: 	'AAD165',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21092',
				graphicsetId: 	'13191',
				contentColor: 	'2E2E2E',
				contentBGColor: 'AAD165',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84412',
internalId:  '',
customField: '20100501-181215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91412',
internalId:  '',
customField: '20100216-141209'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100511-130517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100120-182222'
};
webappMappings['1002']=webappMappings['1002-66612abw0x0ine4ei']={
webappId:    '1002',
documentId:  '66612',
internalId:  '66612abw0x0ine4ei',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6422',
internalId:  '',
customField: '20100125-180746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20100511-132538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20100511-132558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10322',
internalId:  '',
customField: '20100303-183310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7922',
internalId:  '',
customField: '20100511-132628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7943',
internalId:  '',
customField: '20100511-132657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7964',
internalId:  '',
customField: '20100125-181341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7985',
internalId:  '',
customField: '20100511-133056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6443',
internalId:  '',
customField: '20100125-181657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29401',
internalId:  '',
customField: '20100511-133213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20100120-182048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6464',
internalId:  '',
customField: '20090421-165635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100119-180734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6485',
internalId:  '',
customField: '20091216-161246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6506',
internalId:  '',
customField: '20100108-161528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29422',
internalId:  '',
customField: '20090112-175751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6527',
internalId:  '',
customField: '20100303-182810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66612',
internalId:  '',
customField: '20090421-165849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20100511-130638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100312-161931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43301',
internalId:  '',
customField: '20090212-175629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43322',
internalId:  '',
customField: '20090421-170338'
};
webappMappings['1501']=webappMappings['1501-22972103']={
webappId:    '1501',
documentId:  '401',
internalId:  '22972103',
customField: '1501'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INE4EI';
var companyName   = 'Guggemusig+Sumpfer-Stilzli';
var htmlTitle	  = '';
var metaKeywords  = 'Sch%C3%BC%C3%BCrball';
var metaContents  = 'Sch%C3%BC%C3%BCrball%0D%0A';
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();
};
