/* [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','601',jdecode('Aktuell'),jdecode(''),'/601/index.html','true',[ 
		['PAGE','35901',jdecode('Infos+Ruderbetrieb'),jdecode(''),'/601/35901.html','true',[],'',''],
		['PAGE','63931',jdecode('Trainingszeiten'),jdecode(''),'/601/63931.html','true',[],'',''],
		['PAGE','652',jdecode('Jahresprogramm'),jdecode(''),'/601/652.html','true',[],'',''],
		['PAGE','16701',jdecode('Jubil%C3%A4um'),jdecode(''),'/601/16701.html','true',[],'',''],
		['PAGE','43601',jdecode('Berichte'),jdecode(''),'/601/43601.html','true',[],'',''],
		['PAGE','29801',jdecode('Presse'),jdecode(''),'/601/29801.html','true',[],'','']
	],'',''],
	['PAGE','694',jdecode('Der+Club'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','715',jdecode('Geschichte'),jdecode(''),'/694/715.html','true',[],'',''],
		['PAGE','24201',jdecode('Standort'),jdecode(''),'/694/24201.html','true',[],'',''],
		['PAGE','18601',jdecode('Bootshaus'),jdecode(''),'/694/18601.html','true',[],'',''],
		['PAGE','16743',jdecode('Leitbild'),jdecode(''),'/694/16743.html','true',[],'',''],
		['PAGE','736',jdecode('Der+Vorstand'),jdecode(''),'/694/736.html','true',[],'','']
	],'',''],
	['PAGE','757',jdecode('Rudersport'),jdecode(''),'/757/index.html','true',[ 
		['PAGE','16722',jdecode('Breitensport'),jdecode(''),'/757/16722.html','true',[],'',''],
		['PAGE','15401',jdecode('Jugend+%2F+Regattateam'),jdecode(''),'/757/15401.html','true',[],'',''],
		['PAGE','17801',jdecode('G%C3%A4sterudern'),jdecode(''),'/757/17801.html','true',[],'','']
	],'',''],
	['PAGE','18201',jdecode('Kurse'),jdecode(''),'/18201.html','true',[],'',''],
	['PAGE','14601',jdecode('Sponsoren'),jdecode(''),'/14601.html','true',[],'',''],
	['PAGE','17201',jdecode('Fotoalben'),jdecode(''),'/17201/index.html','true',[ 
		['PAGE','29001',jdecode('Hochwasser+2005'),jdecode(''),'/17201/29001.html','true',[],'',''],
		['PAGE','37701',jdecode('Wanderfahrt+2008'),jdecode(''),'/17201/37701.html','true',[],'',''],
		['PAGE','53001',jdecode('Jubil%C3%A4um+2008'),jdecode(''),'/17201/53001.html','true',[],'',''],
		['PAGE','63331',jdecode('Wanderfahrt+2009'),jdecode(''),'/17201/63331.html','true',[],'',''],
		['PAGE','66131',jdecode('Wanderfahrt+2010'),jdecode(''),'/17201/66131.html','true',[],'','']
	],'',''],
	['PAGE','16764',jdecode('Links'),jdecode(''),'/16764.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='75';
theSitetree.graphicsetId='84';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCD6E0';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'003366',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'75',
				graphicsetId: 	'84',
				contentColor: 	'000000',
				contentBGColor: 'CCD6E0',
				a_color: 		'003366',
				b_color: 		'CCCC99',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-2c471b215bff0f32e57abd9161fa42ca']={
webappId:    '7060',
documentId:  '17201',
internalId:  '2c471b215bff0f32e57abd9161fa42ca',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-2c4cda10b79fc845c689a4d3abd0059d']={
webappId:    '7060',
documentId:  '29001',
internalId:  '2c4cda10b79fc845c689a4d3abd0059d',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-5e28f1d5e5c2ce510331332b1e63401b']={
webappId:    '7060',
documentId:  '37701',
internalId:  '5e28f1d5e5c2ce510331332b1e63401b',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-1525e0309e2d191206ba37059950159a']={
webappId:    '7060',
documentId:  '53001',
internalId:  '1525e0309e2d191206ba37059950159a',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100826-142239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20100430-180327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16764',
internalId:  '',
customField: '20100502-111526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20100426-201125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37701',
internalId:  '',
customField: '20080609-170818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53001',
internalId:  '',
customField: '20081007-202244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20080717-172545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20100426-212508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100501-211047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20080717-172645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20100426-202734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16722',
internalId:  '',
customField: '20100426-202924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20080328-082112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20100805-200632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43601',
internalId:  '',
customField: '20080707-150614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20090508-202426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20080224-203539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20080224-211852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20080523-072918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16743',
internalId:  '',
customField: '20080224-203822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20090510-170323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20081210-180507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20100501-204222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63331',
internalId:  '',
customField: '20100510-204102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63931',
internalId:  '',
customField: '20100502-113534'
};
webappMappings['7060']=webappMappings['7060-f3457e7b4937282b840b3983b131ee38']={
webappId:    '7060',
documentId:  '63331',
internalId:  'f3457e7b4937282b840b3983b131ee38',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66131',
internalId:  '',
customField: '20100826-142318'
};
webappMappings['7060']=webappMappings['7060-08e9e79b8dbc176a884abdd63dec9cc0']={
webappId:    '7060',
documentId:  '66131',
internalId:  '08e9e79b8dbc176a884abdd63dec9cc0',
customField: 'language:de;country:CH;'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0IN3U2O';
var companyName   = '';
var htmlTitle	  = 'Seeclub+Interlaken';
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();
};
