/* [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','26',jdecode('Home'),jdecode(''), jdecode('%2F26.html'), 'true',[],'',''],
	['PAGE','282',jdecode('Aktuelles'),jdecode(''), jdecode('%2F282.html'), 'true',[],'',''],
	['PAGE','71243',jdecode('Termine+2011'),jdecode(''), jdecode('%2F71243.html'), 'true',[],'',''],
	['PAGE','229665',jdecode('BSK+Schwimm-Meeting+2011'),jdecode(''), jdecode('%2F229665%2Findex.html'), 'true',[ 
		['PAGE','197765',jdecode('Fotoalbum'),jdecode(''), jdecode('%2F229665%2F197765.html'), 'true',[],'','']
	],'',''],
	['PAGE','530',jdecode('Sportangebot'),jdecode(''), jdecode('%2F530%2Findex.html'), 'true',[ 
		['PAGE','1067',jdecode('Aqua-Jogging'),jdecode(''), jdecode('%2F530%2F1067.html'), 'true',[],'',''],
		['PAGE','1085',jdecode('Aqua-Fitness'),jdecode(''), jdecode('%2F530%2F1085.html'), 'true',[],'',''],
		['PAGE','539',jdecode('Anf%C3%A4ngerschwimmen'),jdecode(''), jdecode('%2F530%2F539.html'), 'true',[],'',''],
		['PAGE','123054',jdecode('R%C3%BCckenfitness'),jdecode(''), jdecode('%2F530%2F123054.html'), 'true',[],'',''],
		['PAGE','817',jdecode('Sport+f%C3%BCr+Diabetiker'),jdecode(''), jdecode('%2F530%2F817.html'), 'true',[],'',''],
		['PAGE','557',jdecode('Tanzen'),jdecode(''), jdecode('%2F530%2F557.html'), 'true',[],'',''],
		['PAGE','1076',jdecode('Wassergew%C3%B6hnung'),jdecode(''), jdecode('%2F530%2F1076.html'), 'true',[],'','']
	],'',''],
	['PAGE','1094',jdecode('Wettkampfgruppen'),jdecode(''), jdecode('%2F1094%2Findex.html'), 'true',[ 
		['PAGE','1270',jdecode('A-+und+B-Mannschaft'),jdecode(''), jdecode('%2F1094%2F1270.html'), 'true',[],'',''],
		['PAGE','1112',jdecode('Masters'),jdecode(''), jdecode('%2F1094%2F1112.html'), 'true',[],'',''],
		['PAGE','1121',jdecode('Talentf%C3%B6rdergruppe'),jdecode(''), jdecode('%2F1094%2F1121.html'), 'true',[],'','']
	],'',''],
	['PAGE','2615',jdecode('Wettkampfberichte'),jdecode(''), jdecode('%2F2615.html'), 'true',[],'',''],
	['PAGE','2042',jdecode('Schwimmabzeichen'),jdecode(''), jdecode('%2F2042%2Findex.html'), 'true',[ 
		['PAGE','4285',jdecode('Baderegeln'),jdecode(''), jdecode('%2F2042%2F4285.html'), 'true',[],'','']
	],'',''],
	['PAGE','566',jdecode('Vermischtes'),jdecode(''), jdecode('%2F566.html'), 'true',[],'',''],
	['PAGE','243865',jdecode('Mitgliedschaft'),jdecode(''), jdecode('%2F243865.html'), 'true',[],'',''],
	['PAGE','291',jdecode('Kontakt'),jdecode(''), jdecode('%2F291.html'), 'true',[],'',''],
	['PAGE','300',jdecode('Anfahrt'),jdecode(''), jdecode('%2F300.html'), 'true',[],'',''],
	['PAGE','309',jdecode('Impressum'),jdecode(''), jdecode('%2F309.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='90A262';
theSitetree.keyvisualId='1721';
theSitetree.keyvisualName='schwimmerin.jpg';
theSitetree.fontsetId='304';
theSitetree.graphicsetId='344';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='90A262';
var localeDef={
  language: 'de',
  country: 'DE'
};
var prodDef={
  wl_name: 'netcologne',
  product: 'WSCSYSSSSLYTCPLG'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'90A262',
				keyvisualId: 	'1721',
				keyvisualName: 	'schwimmerin.jpg',
				fontsetId: 		'304',
				graphicsetId: 	'344',
				contentColor: 	'000000',
				contentBGColor: '90A262',
				a_color: 		'90A262',
				b_color: 		'525D37',
				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['1501']=webappMappings['1501-129663']={
webappId:    '1501',
documentId:  '26',
internalId:  '129663',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '243865',
internalId:  '',
customField: '20111111-202805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26',
internalId:  '',
customField: '20100319-193631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '282',
internalId:  '',
customField: '20120115-104007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71243',
internalId:  '',
customField: '20111108-090739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '530',
internalId:  '',
customField: '20111102-182747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1067',
internalId:  '',
customField: '20110301-095935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1085',
internalId:  '',
customField: '20110301-100112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '539',
internalId:  '',
customField: '20111102-182505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229665',
internalId:  '',
customField: '20110921-161706'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '26',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123054',
internalId:  '',
customField: '20110301-100257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '817',
internalId:  '',
customField: '20061211-093353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20090308-192232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1076',
internalId:  '',
customField: '20110301-103542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1094',
internalId:  '',
customField: '20110601-142535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1270',
internalId:  '',
customField: '20061210-125336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1112',
internalId:  '',
customField: '20101110-102452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1121',
internalId:  '',
customField: '20110601-143134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2615',
internalId:  '',
customField: '20120107-220520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2042',
internalId:  '',
customField: '20110201-133643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4285',
internalId:  '',
customField: '20070318-163251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '566',
internalId:  '',
customField: '20110413-110947'
};
webappMappings['7060']=webappMappings['7060-38627f0c979cf7cb58c7e23773992770']={
webappId:    '7060',
documentId:  '197765',
internalId:  '38627f0c979cf7cb58c7e23773992770',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '291',
internalId:  '',
customField: '20110911-182238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '300',
internalId:  '',
customField: '20100319-170300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '309',
internalId:  '',
customField: '20100315-205324'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '26',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197765',
internalId:  '',
customField: '20110921-160839'
};
var webAppHostname = 'cm4all.netcologne.de:80';
var canonHostname = 'cm4all4.netcologne.de';
var accountId     = 'ANC010IN2DUE';
var companyName   = 'Br%C3%BChler+Schwimmklub+1923+e.V.';
var htmlTitle	  = 'Hompage+des+Br%C3%BChler+Schwimmklubs+1923+e.V.';
var metaKeywords  = 'Br%EF%BF%BD';
var metaContents  = 'Homepage++Schwimm-+und+Sportangebote++';
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();
};

