/* [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','14601',jdecode('Home'),jdecode(''), jdecode('%2F14601.html'), 'true',[],'',''],
	['PAGE','116189',jdecode('Anmeldung+Bowlen'),jdecode(''), jdecode('%2F116189.html'), 'true',[],'',''],
	['PAGE','95278',jdecode('Mitgliedschaft'),jdecode(''), jdecode('%2F95278%2Findex.html'), 'true',[ 
		['PAGE','14736',jdecode('Statuten'),jdecode(''), jdecode('%2F95278%2F14736.html'), 'true',[],'','']
	],'',''],
	['PAGE','14799',jdecode('Carfahrten'),jdecode(''), jdecode('%2F14799.html'), 'true',[],'',''],
	['PAGE','14694',jdecode('Vorstand'),jdecode(''), jdecode('%2F14694.html'), 'true',[],'',''],
	['PAGE','23601',jdecode('1.+Mannschaft'),jdecode(''), jdecode('%2F23601%2Findex.html'), 'true',[ 
		['PAGE','52734',jdecode('Walti%26%23x27%3Bs+Statistik'),jdecode(''), jdecode('%2F23601%2F52734.html'), 'true',[],'','']
	],'',''],
	['PAGE','110689',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F110689.html'), 'true',[],'',''],
	['PAGE','14757',jdecode('Veranstaltungen'),jdecode(''), jdecode('%2F14757%2Findex.html'), 'true',[ 
		['PAGE','34734',jdecode('Bowlingabend'),jdecode(''), jdecode('%2F14757%2F34734.html'), 'true',[],'',''],
		['PAGE','78945',jdecode('Brunch+2010'),jdecode(''), jdecode('%2F14757%2F78945.html'), 'true',[],'',''],
		['PAGE','78545',jdecode('Spiele+Saison+10%2F11'),jdecode(''), jdecode('%2F14757%2F78545.html'), 'true',[],'',''],
		['PAGE','72645',jdecode('City+Cup+2010'),jdecode(''), jdecode('%2F14757%2F72645.html'), 'true',[],'',''],
		['PAGE','71845',jdecode('Grillplausch'),jdecode(''), jdecode('%2F14757%2F71845.html'), 'true',[],'',''],
		['PAGE','68245',jdecode('Sportpanorama'),jdecode(''), jdecode('%2F14757%2F68245.html'), 'true',[],'',''],
		['PAGE','66345',jdecode('30+Jahre+Fanclub'),jdecode(''), jdecode('%2F14757%2F66345.html'), 'true',[],'',''],
		['PAGE','41134',jdecode('Fanh%C3%B6ck'),jdecode(''), jdecode('%2F14757%2F41134.html'), 'true',[],'',''],
		['PAGE','40934',jdecode('1.+H%C3%BCttengaudi'),jdecode(''), jdecode('%2F14757%2F40934.html'), 'true',[],'','']
	],'',''],
	['PAGE','23101',jdecode('Hockeymannschaft+Fanclub'),jdecode(''), jdecode('%2F23101%2Findex.html'), 'true',[ 
		['PAGE','30712',jdecode('Spielberichte+Saison+10%2F11'),jdecode(''), jdecode('%2F23101%2F30712.html'), 'true',[],'','']
	],'',''],
	['PAGE','21601',jdecode('Links'),jdecode(''), jdecode('%2F21601.html'), 'true',[],'',''],
	['PAGE','51134',jdecode('Partner'),jdecode(''), jdecode('%2F51134.html'), 'true',[],'',''],
	['PAGE','14820',jdecode('Kontakt'),jdecode(''), jdecode('%2F14820.html'), 'true',[],'',''],
	['PAGE','44334',jdecode('FAQ%26%23x27%3Bs'),jdecode(''), jdecode('%2F44334.html'), 'true',[],'',''],
	['PAGE','14841',jdecode('Impressum'),jdecode(''), jdecode('%2F14841.html'), 'true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Citadel';
theSitetree.paletteFamily='414E8C';
theSitetree.keyvisualId='8166';
theSitetree.keyvisualName='kv_8166.jpg';
theSitetree.fontsetId='17011';
theSitetree.graphicsetId='12397';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='414E8C';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Citadel',
				paletteFamily: 	'414E8C',
				keyvisualId: 	'8166',
				keyvisualName: 	'kv_8166.jpg',
				fontsetId: 		'17011',
				graphicsetId: 	'12397',
				contentColor: 	'FFFFFF',
				contentBGColor: '414E8C',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-4716']={
webappId:    '7008',
documentId:  '95278',
internalId:  '4716',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20111122-175552'
};
webappMappings['7008']=webappMappings['7008-5007']={
webappId:    '7008',
documentId:  '14799',
internalId:  '5007',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110689',
internalId:  '',
customField: '20110617-173309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14694',
internalId:  '',
customField: '20111001-104413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71845',
internalId:  '',
customField: '20100629-094124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14736',
internalId:  '',
customField: '20110602-192255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14757',
internalId:  '',
customField: '20110916-182632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14799',
internalId:  '',
customField: '20111122-180219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14820',
internalId:  '',
customField: '20110812-163431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14841',
internalId:  '',
customField: '20100307-102500'
};
webappMappings['7008']=webappMappings['7008-1119']={
webappId:    '7008',
documentId:  '14820',
internalId:  '1119',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-110689ahp340invwwi']={
webappId:    '1002',
documentId:  '110689',
internalId:  '110689ahp340invwwi',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-5071']={
webappId:    '7008',
documentId:  '116189',
internalId:  '5071',
customField: 'language:de;country:CH;'
};
webappMappings['7050']=webappMappings['7050-19']={
webappId:    '7050',
documentId:  '14601',
internalId:  '19',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21601',
internalId:  '',
customField: '20100108-050025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20110920-183452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20110913-184556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51134',
internalId:  '',
customField: '20110908-192641'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30712',
internalId:  '',
customField: '20101101-220847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41134',
internalId:  '',
customField: '20100629-094822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40934',
internalId:  '',
customField: '20100629-094833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34734',
internalId:  '',
customField: '20101111-222104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44334',
internalId:  '',
customField: '20110602-002401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72645',
internalId:  '',
customField: '20100705-111948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68245',
internalId:  '',
customField: '20100606-210447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52734',
internalId:  '',
customField: '20101214-125123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66345',
internalId:  '',
customField: '20110416-234128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95278',
internalId:  '',
customField: '20111013-105243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78545',
internalId:  '',
customField: '20100809-211205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78945',
internalId:  '',
customField: '20100815-132930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116189',
internalId:  '',
customField: '20110922-195320'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHP340INVWWI';
var companyName   = 'Lakers+Fanclub';
var htmlTitle	  = 'Fanclub+Lakers+-+officieller+Fanclub+in+Rapperswil%21';
var metaKeywords  = '';
var metaContents  = '';
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();
};

