/* [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','301',jdecode('Home'),jdecode(''),'/301/index.html','true',[ 
		['PAGE','352',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/301/352.html','true',[],'',''],
		['PAGE','23022',jdecode('Geschichte'),jdecode(''),'/301/23022.html','true',[],'',''],
		['PAGE','23043',jdecode('Statuten'),jdecode(''),'/301/23043.html','true',[],'',''],
		['PAGE','23601',jdecode('Mitglieder'),jdecode(''),'/301/23601.html','true',[],'','']
	],'',''],
	['PAGE','62901',jdecode('Schnuppertauchen'),jdecode(''),'/62901.html','true',[],'',''],
	['PAGE','394',jdecode('Aktuelles'),jdecode(''),'/394/index.html','true',[ 
		['PAGE','415',jdecode('News'),jdecode(''),'/394/415.html','true',[],'',''],
		['PAGE','118901',jdecode('Jahresprogramm+10'),jdecode(''),'/394/118901.html','true',[],'',''],
		['PAGE','23064',jdecode('Protokolle'),jdecode(''),'/394/23064.html','true',[],'',''],
		['PAGE','120401',jdecode('Archiv'),jdecode(''),'/394/120401.html','true',[],'','']
	],'',''],
	['PAGE','23622',jdecode('Unsere+Aktivit%C3%A4ten'),jdecode(''),'/23622/index.html','true',[ 
		['PAGE','109101',jdecode('Cliff+Diving+09'),jdecode(''),'/23622/109101.html','true',[],'',''],
		['PAGE','96601',jdecode('Pfingstweekend+08'),jdecode(''),'/23622/96601.html','true',[],'',''],
		['PAGE','73801',jdecode('Pfingstweekend+07'),jdecode(''),'/23622/73801.html','true',[],'',''],
		['PAGE','49301',jdecode('Ryyputzete+2006'),jdecode(''),'/23622/49301.html','true',[],'',''],
		['PAGE','49322',jdecode('Rodeln+Langenbruck'),jdecode(''),'/23622/49322.html','true',[],'',''],
		['PAGE','77801',jdecode('Skiweekend+Airolo+'),jdecode(''),'/23622/77801.html','true',[],'','']
	],'',''],
	['PAGE','23085',jdecode('+Club+Gallery'),jdecode(''),'/23085/index.html','true',[ 
		['PAGE','79843',jdecode('Seelisberg+08'),jdecode(''),'/23085/79843.html','true',[],'',''],
		['PAGE','79822',jdecode('Badi+putzen+08'),jdecode(''),'/23085/79822.html','true',[],'',''],
		['PAGE','79801',jdecode('Tauchen+Baumg%C3%A4rtli'),jdecode(''),'/23085/79801.html','true',[],'',''],
		['PAGE','83401',jdecode('Tauchen+im+Tessin'),jdecode(''),'/23085/83401.html','true',[],'',''],
		['PAGE','87843',jdecode('Aegypten+08'),jdecode(''),'/23085/87843.html','true',[],'',''],
		['PAGE','87801',jdecode('neu'),jdecode(''),'/23085/87801.html','true',[],'',''],
		['PAGE','29501',jdecode('Tauchturm+Mai+06'),jdecode(''),'/23085/29501.html','true',[],'',''],
		['PAGE','29101',jdecode('Koppiland+April+06'),jdecode(''),'/23085/29101.html','true',[],'',''],
		['PAGE','87822',jdecode('Elba+08'),jdecode(''),'/23085/87822.html','true',[],'',''],
		['PAGE','39601',jdecode('Elba+05'),jdecode(''),'/23085/39601.html','true',[],'',''],
		['PAGE','51301',jdecode('Diverse+Bilder'),jdecode(''),'/23085/51301.html','true',[],'',''],
		['PAGE','62101',jdecode('Tauchpl%C3%A4tze+des+ENS'),jdecode(''),'/23085/62101.html','true',[],'','']
	],'',''],
	['PAGE','478',jdecode('Kontakt'),jdecode(''),'/478/index.html','true',[ 
		['PAGE','499',jdecode('Adresse%2C+Telefon'),jdecode(''),'/478/499.html','true',[],'',''],
		['PAGE','23127',jdecode('Kontakt+%2F+Fragen'),jdecode(''),'/478/23127.html','true',[],'',''],
		['PAGE','24901',jdecode('Treffpunkt+Tauchen'),jdecode(''),'/478/24901.html','true',[],'',''],
		['PAGE','24401',jdecode('Mitglied+werden+%28Folgeseite%29'),jdecode(''),'/478/24401.html','false',[],'',''],
		['PAGE','37601',jdecode('Mitglied+werden'),jdecode(''),'/478/37601.html','true',[],'','']
	],'',''],
	['PAGE','23169',jdecode('Links'),jdecode(''),'/23169.html','true',[],'',''],
	['PAGE','6001',jdecode('Weblog'),jdecode(''),'/6001.html','true',[],'',''],
	['PAGE','23748',jdecode('Wissenswertes'),jdecode(''),'/23748.html','true',[],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='2354B7';
theSitetree.keyvisualId='2702';
theSitetree.keyvisualName='kv_2702.jpg';
theSitetree.fontsetId='10701';
theSitetree.graphicsetId='10633';
theSitetree.contentColor='2354B7';
theSitetree.contentBGColor='C6E2FE';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Match',
				paletteFamily: 	'2354B7',
				keyvisualId: 	'2702',
				keyvisualName: 	'kv_2702.jpg',
				fontsetId: 		'10701',
				graphicsetId: 	'10633',
				contentColor: 	'2354B7',
				contentBGColor: 'C6E2FE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'2354B7',
				e_color: 		'707070',
				f_color: 		'707070',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109101',
internalId:  '',
customField: '20091005-134438'
};
webappMappings['7060']=webappMappings['7060-83736b35baa09b277b98de5fad5682d5']={
webappId:    '7060',
documentId:  '39601',
internalId:  '83736b35baa09b277b98de5fad5682d5',
customField: 'language:de;country:CH;'
};
webappMappings['7050']=webappMappings['7050-40']={
webappId:    '7050',
documentId:  '6001',
internalId:  '40',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100830-070409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62901',
internalId:  '',
customField: '20100816-162131'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '24901',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-3cec9427fe57a45dcc9840b90119dcdc']={
webappId:    '7060',
documentId:  '29101',
internalId:  '3cec9427fe57a45dcc9840b90119dcdc',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-033a8a08c90778dce0f85f7fd2991fa3']={
webappId:    '7060',
documentId:  '29501',
internalId:  '033a8a08c90778dce0f85f7fd2991fa3',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-46010cb1988989494ca68f7510e36ef9']={
webappId:    '7060',
documentId:  '51301',
internalId:  '46010cb1988989494ca68f7510e36ef9',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-4993c3fe1c1b64b937e4839cd5d6e677']={
webappId:    '7060',
documentId:  '62101',
internalId:  '4993c3fe1c1b64b937e4839cd5d6e677',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-466']={
webappId:    '7008',
documentId:  '23127',
internalId:  '466',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20100830-070537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20061113-003735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23022',
internalId:  '',
customField: '20090717-185654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23043',
internalId:  '',
customField: '20070128-162754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20070127-181704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20100115-082218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120401',
internalId:  '',
customField: '20100403-194134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23064',
internalId:  '',
customField: '20100705-020607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23622',
internalId:  '',
customField: '20080503-085204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49301',
internalId:  '',
customField: '20070303-131604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49322',
internalId:  '',
customField: '20070114-211932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73801',
internalId:  '',
customField: '20080503-085139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77801',
internalId:  '',
customField: '20080503-085050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96601',
internalId:  '',
customField: '20090306-175210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23085',
internalId:  '',
customField: '20061114-020049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79843',
internalId:  '',
customField: '20080927-183752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79822',
internalId:  '',
customField: '20080927-112837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79801',
internalId:  '',
customField: '20080927-115539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83401',
internalId:  '',
customField: '20080927-111726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87843',
internalId:  '',
customField: '20080927-183431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87801',
internalId:  '',
customField: '20080927-175118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29501',
internalId:  '',
customField: '20061114-001256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20070114-203724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87822',
internalId:  '',
customField: '20080927-180634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39601',
internalId:  '',
customField: '20070114-203751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51301',
internalId:  '',
customField: '20070114-214224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62101',
internalId:  '',
customField: '20070206-220106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '478',
internalId:  '',
customField: '20070127-181837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '499',
internalId:  '',
customField: '20100617-070021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23127',
internalId:  '',
customField: '20070109-213341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24901',
internalId:  '',
customField: '20070108-223706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20061113-000157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37601',
internalId:  '',
customField: '20070114-194830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23169',
internalId:  '',
customField: '20090322-010558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20090810-081956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23748',
internalId:  '',
customField: '20070115-022654'
};
webappMappings['1501']=webappMappings['1501-5488631']={
webappId:    '1501',
documentId:  '301',
internalId:  '5488631',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118901',
internalId:  '',
customField: '20100403-193900'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0INE6NS';
var companyName   = 'TC+ERGOLZNAUTIC';
var htmlTitle	  = 'TC+ERGOLZ+NAUTIC';
var metaKeywords  = 'Tauchclub+Ergolznautic+Sissach+tauchen+Baselland+Familie+Wasser';
var metaContents  = 'Tauchclub+Ergolznautic+tauchen+Erlebnis';
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();
};
