/* [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('Der+Beginn%3A'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','473',jdecode('Eine+Faszination'),jdecode(''),'/452/473.html','true',[],'','']
	],'',''],
	['PAGE','15201',jdecode('Infos'),jdecode(''),'/15201/index.html','true',[ 
		['PAGE','6501',jdecode('Infos+%C3%BCber+das+nat%C3%BCrliche+Biotop'),jdecode(''),'/15201/6501.html','true',[],'',''],
		['PAGE','17701',jdecode('Das+Aquarium'),jdecode(''),'/15201/17701.html','true',[],'','']
	],'',''],
	['PAGE','17022',jdecode('Cyprichromini'),jdecode(''),'/17022/index.html','true',[ 
		['PAGE','40801',jdecode('Cyprichromis'),jdecode(''),'/17022/40801.html','true',[],'',''],
		['PAGE','41801',jdecode('Paracyprichromis'),jdecode(''),'/17022/41801.html','true',[],'','']
	],'',''],
	['PAGE','41822',jdecode('Ectodini'),jdecode(''),'/41822/index.html','true',[ 
		['PAGE','41843',jdecode('Aulonocranus'),jdecode(''),'/41822/41843.html','true',[],'',''],
		['PAGE','41864',jdecode('Ectodus'),jdecode(''),'/41822/41864.html','true',[],'',''],
		['PAGE','41885',jdecode('Lestradea'),jdecode(''),'/41822/41885.html','true',[],'',''],
		['PAGE','41906',jdecode('Ophtalmotilapia'),jdecode(''),'/41822/41906.html','true',[],'',''],
		['PAGE','41927',jdecode('Xenotilapia'),jdecode(''),'/41822/41927.html','true',[],'','']
	],'',''],
	['PAGE','42032',jdecode('Eretmodini'),jdecode(''),'/42032/index.html','true',[ 
		['PAGE','42053',jdecode('Eretmodus'),jdecode(''),'/42032/42053.html','true',[],'',''],
		['PAGE','50501',jdecode('Spathodus'),jdecode(''),'/42032/50501.html','true',[],'',''],
		['PAGE','72501',jdecode('Tanganicodus'),jdecode(''),'/42032/72501.html','true',[],'','']
	],'',''],
	['PAGE','17001',jdecode('Lamprologini'),jdecode(''),'/17001/index.html','true',[ 
		['PAGE','40822',jdecode('Altolamprologus'),jdecode(''),'/17001/40822.html','true',[],'',''],
		['PAGE','41948',jdecode('Julidochromis'),jdecode(''),'/17001/41948.html','true',[],'',''],
		['PAGE','41969',jdecode('Lamprologus'),jdecode(''),'/17001/41969.html','true',[],'',''],
		['PAGE','53801',jdecode('Lepidiolamprologus'),jdecode(''),'/17001/53801.html','true',[],'',''],
		['PAGE','41990',jdecode('Neolamprologus'),jdecode(''),'/17001/41990.html','true',[],'',''],
		['PAGE','42011',jdecode('Telmatochromis'),jdecode(''),'/17001/42011.html','true',[],'','']
	],'',''],
	['PAGE','40843',jdecode('Limnochromini'),jdecode(''),'/40843/index.html','true',[ 
		['PAGE','40864',jdecode('Gnathochromis+'),jdecode(''),'/40843/40864.html','true',[],'',''],
		['PAGE','42074',jdecode('Reganochromis'),jdecode(''),'/40843/42074.html','true',[],'',''],
		['PAGE','42095',jdecode('Triglachromis'),jdecode(''),'/40843/42095.html','true',[],'','']
	],'',''],
	['PAGE','40885',jdecode('Tropheini'),jdecode(''),'/40885/index.html','true',[ 
		['PAGE','40906',jdecode('Cyphotilapia+'),jdecode(''),'/40885/40906.html','true',[],'','']
	],'',''],
	['PAGE','40927',jdecode('Nichtcichliden'),jdecode(''),'/40927/index.html','true',[ 
		['PAGE','42116',jdecode('Caecomastacembelus'),jdecode(''),'/40927/42116.html','true',[],'',''],
		['PAGE','42137',jdecode('Lophiobagrus'),jdecode(''),'/40927/42137.html','true',[],'',''],
		['PAGE','40948',jdecode('Synodontis'),jdecode(''),'/40927/40948.html','true',[],'','']
	],'',''],
	['PAGE','42158',jdecode('Wirbellose'),jdecode(''),'/42158/index.html','true',[ 
		['PAGE','50522',jdecode('Garnelen'),jdecode(''),'/42158/50522.html','true',[],'',''],
		['PAGE','50543',jdecode('Schnecken'),jdecode(''),'/42158/50543.html','true',[],'','']
	],'',''],
	['PAGE','15243',jdecode('Tipps+%26+Tricks'),jdecode(''),'/15243/index.html','true',[ 
		['PAGE','70201',jdecode('Schneckenh%C3%A4user'),jdecode(''),'/15243/70201.html','true',[],'',''],
		['PAGE','70222',jdecode('Gartenplatten'),jdecode(''),'/15243/70222.html','true',[],'',''],
		['PAGE','70243',jdecode('Selbstbau-Steine'),jdecode(''),'/15243/70243.html','true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Angebote'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','57101',jdecode('Nachzuchten'),jdecode(''),'/494/57101.html','true',[],'',''],
		['PAGE','57122',jdecode('Diverses'),jdecode(''),'/494/57122.html','true',[],'','']
	],'',''],
	['PAGE','557',jdecode('Kontakt'),jdecode(''),'/557.html','true',[],'',''],
	['PAGE','13306',jdecode('G%C3%A4stebuch'),jdecode(''),'/13306/index.html','true',[ 
		['PAGE','13301',jdecode('Eintr%C3%A4ge'),jdecode(''),'/13306/13301.html','false',[],'','']
	],'',''],
	['PAGE','40101',jdecode('Anfahrt'),jdecode(''),'/40101.html','true',[],'',''],
	['PAGE','51001',jdecode('Ihr+Weg+zu+uns'),jdecode(''),'/51001.html','true',[],'',''],
	['PAGE','75301',jdecode('Aktuelle+Stockliste'),jdecode(''),'/75301.html','true',[],'',''],
	['PAGE','15285',jdecode('Links'),jdecode(''),'/15285.html','true',[],'',''],
	['PAGE','57601',jdecode('Danksagung'),jdecode(''),'/57601.html','true',[],'',''],
	['PAGE','69601',jdecode('Impressum'),jdecode(''),'/69601.html','true',[],'','']];
var siteelementCount=55;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='93A6CC';
theSitetree.keyvisualId='2251';
theSitetree.keyvisualName='reise1.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='415';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='93A6CC';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'93A6CC',
				keyvisualId: 	'2251',
				keyvisualName: 	'reise1.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'415',
				contentColor: 	'FFFFFF',
				contentBGColor: '93A6CC',
				a_color: 		'93A6CC',
				b_color: 		'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-13306abw0x0in2mnn']={
webappId:    '1002',
documentId:  '13306',
internalId:  '13306abw0x0in2mnn',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40101',
internalId:  '',
customField: '20070913-222945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20080611-150134'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '51001',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '40101',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-16263874']={
webappId:    '1501',
documentId:  '401',
internalId:  '16263874',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51001',
internalId:  '',
customField: '20070913-223050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75301',
internalId:  '',
customField: '20100609-170354'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2MNN';
var companyName   = 'Tanganjika-Corner';
var htmlTitle	  = 'Tanganjikasee';
var metaKeywords  = 'Tanganjikasee+++Cichliden++Xenotilapia++Gnathochromis++Neolamprologus++Lamprologus++Altolamprologus++Julidochromis++Lestradea++Ectodus++Cyprichromis++Paracyprichromis++Synodontis++Ophtalmotilapia++Eretmodus++Telmatochromis++Spathodus+Enantiopus+kilesa+Triglachromis+Tanganjika-Schnecke+Lophiobagrus+cyclurus+Triglachromis+Garnelen+Schnecken+dhonti+leptosoma+otostigma';
var metaContents  = 'Faszination+Tanganjikasee-Cichliden+++Tanganjika++Tanganyika++Cichliden+++Buntbarsche+++Tanganjikasee++Lake+Tanganyika';
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();
};
