/* [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','1411',jdecode('Home'),jdecode(''), jdecode('%2F1411.html'), 'true',[],'',''],
	['PAGE','86501',jdecode('Aktuell'),jdecode(''), jdecode('%2F86501.html'), 'true',[],'',''],
	['PAGE','44901',jdecode('Unser+Vivarium'),jdecode(''), jdecode('%2F44901.html'), 'true',[],'',''],
	['PAGE','27501',jdecode('Amphibien'),jdecode(''), jdecode('%2F27501%2Findex.html'), 'true',[ 
		['PAGE','37701',jdecode('Agalychnis+callidryas'),jdecode(''), jdecode('%2F27501%2F37701.html'), 'true',[],'',''],
		['PAGE','27701',jdecode('Ceratophrys+ornata'),jdecode(''), jdecode('%2F27501%2F27701.html'), 'true',[],'',''],
		['PAGE','110501',jdecode('Trachycephalus+resinifictrix'),jdecode(''), jdecode('%2F27501%2F110501.html'), 'true',[],'','']
	],'',''],
	['PAGE','1458',jdecode('Reptilien'),jdecode(''), jdecode('%2F1458%2Findex.html'), 'true',[ 
		['PAGE','82301',jdecode('Agkistrodon+b.+bilineatus'),jdecode(''), jdecode('%2F1458%2F82301.html'), 'true',[],'',''],
		['PAGE','115001',jdecode('Atheris+chlorechis'),jdecode(''), jdecode('%2F1458%2F115001.html'), 'true',[],'',''],
		['PAGE','70201',jdecode('Atheris+squamigera'),jdecode(''), jdecode('%2F1458%2F70201.html'), 'true',[],'',''],
		['PAGE','108401',jdecode('Bitis+nasicornis'),jdecode(''), jdecode('%2F1458%2F108401.html'), 'true',[],'',''],
		['PAGE','42001',jdecode('Boa+c.+longicauda'),jdecode(''), jdecode('%2F1458%2F42001.html'), 'true',[],'',''],
		['PAGE','15943',jdecode('Bothriechis+schlegelii'),jdecode(''), jdecode('%2F1458%2F15943.html'), 'true',[],'',''],
		['PAGE','16601',jdecode('Bothropoides+erythromelas'),jdecode(''), jdecode('%2F1458%2F16601.html'), 'true',[],'',''],
		['PAGE','70222',jdecode('Calloselasma+rhodostoma'),jdecode(''), jdecode('%2F1458%2F70222.html'), 'true',[],'',''],
		['PAGE','17064',jdecode('Crotalus+r.+ravus'),jdecode(''), jdecode('%2F1458%2F17064.html'), 'true',[],'',''],
		['PAGE','60201',jdecode('Coleonyx+mitratus'),jdecode(''), jdecode('%2F1458%2F60201.html'), 'true',[],'',''],
		['PAGE','94401',jdecode('Diploglossus+monotropis'),jdecode(''), jdecode('%2F1458%2F94401.html'), 'true',[],'',''],
		['PAGE','70243',jdecode('Gloydius+b.+siniticus'),jdecode(''), jdecode('%2F1458%2F70243.html'), 'true',[],'',''],
		['PAGE','96301',jdecode('Gloydius+h.+caraganus'),jdecode(''), jdecode('%2F1458%2F96301.html'), 'true',[],'',''],
		['PAGE','95801',jdecode('Gloydius+halys+halys'),jdecode(''), jdecode('%2F1458%2F95801.html'), 'true',[],'',''],
		['PAGE','115022',jdecode('Lystrophis+pulcher'),jdecode(''), jdecode('%2F1458%2F115022.html'), 'true',[],'',''],
		['PAGE','90301',jdecode('Montivipera+albizona'),jdecode(''), jdecode('%2F1458%2F90301.html'), 'true',[],'',''],
		['PAGE','95822',jdecode('Montivipera+bulgardaghica'),jdecode(''), jdecode('%2F1458%2F95822.html'), 'true',[],'',''],
		['PAGE','70264',jdecode('Ovophis+m.+monticola'),jdecode(''), jdecode('%2F1458%2F70264.html'), 'true',[],'',''],
		['PAGE','70285',jdecode('Ovophis+tonkinensis'),jdecode(''), jdecode('%2F1458%2F70285.html'), 'true',[],'',''],
		['PAGE','96322',jdecode('Porthidium+l.+hutmanni'),jdecode(''), jdecode('%2F1458%2F96322.html'), 'true',[],'',''],
		['PAGE','52501',jdecode('Porthidium+l.+lansbergii'),jdecode(''), jdecode('%2F1458%2F52501.html'), 'true',[],'',''],
		['PAGE','94422',jdecode('Porthidium+nasutum'),jdecode(''), jdecode('%2F1458%2F94422.html'), 'true',[],'',''],
		['PAGE','37201',jdecode('Sistrurus+c.+edwardsii'),jdecode(''), jdecode('%2F1458%2F37201.html'), 'true',[],'',''],
		['PAGE','37222',jdecode('Sistrurus+m.+streckeri'),jdecode(''), jdecode('%2F1458%2F37222.html'), 'true',[],'',''],
		['PAGE','94443',jdecode('Vipera+a.+aspis'),jdecode(''), jdecode('%2F1458%2F94443.html'), 'true',[],'',''],
		['PAGE','85901',jdecode('Vipera+l.+gaditana'),jdecode(''), jdecode('%2F1458%2F85901.html'), 'true',[],'','']
	],'',''],
	['PAGE','62901',jdecode('Archiv'),jdecode(''), jdecode('%2F62901.html'), 'true',[],'',''],
	['PAGE','36401',jdecode('Terrarien'),jdecode(''), jdecode('%2F36401.html'), 'true',[],'',''],
	['PAGE','1437',jdecode('Biete+%2F+Suche'),jdecode(''), jdecode('%2F1437.html'), 'true',[],'',''],
	['PAGE','16006',jdecode('Konditionen'),jdecode(''), jdecode('%2F16006.html'), 'true',[],'',''],
	['PAGE','30201',jdecode('Reisen+%2F+Biotope'),jdecode(''), jdecode('%2F30201%2Findex.html'), 'true',[ 
		['PAGE','31243',jdecode('Costa+Rica+2004'),jdecode(''), jdecode('%2F30201%2F31243.html'), 'true',[],'',''],
		['PAGE','31264',jdecode('Costa+Rica+2007'),jdecode(''), jdecode('%2F30201%2F31264.html'), 'true',[],'',''],
		['PAGE','73801',jdecode('Insel+Krk+%2F+Cres+2008'),jdecode(''), jdecode('%2F30201%2F73801.html'), 'true',[],'',''],
		['PAGE','73822',jdecode('Frankreich+2009'),jdecode(''), jdecode('%2F30201%2F73822.html'), 'true',[],'',''],
		['PAGE','55801',jdecode('Costa+Rica+2011'),jdecode(''), jdecode('%2F30201%2F55801.html'), 'true',[],'','']
	],'',''],
	['PAGE','92801',jdecode('Museum'),jdecode(''), jdecode('%2F92801.html'), 'true',[],'',''],
	['PAGE','1511',jdecode('Kontakt'),jdecode(''), jdecode('%2F1511.html'), 'true',[],'',''],
	['PAGE','16027',jdecode('Links'),jdecode(''), jdecode('%2F16027.html'), 'true',[],'',''],
	['PAGE','22701',jdecode('Disclaimer'),jdecode(''), jdecode('%2F22701.html'), 'true',[],'','']];
var siteelementCount=48;
theSitetree.topTemplateName='Nuance';
theSitetree.paletteFamily='ACCBB2';
theSitetree.keyvisualId='8952';
theSitetree.keyvisualName='kv_8952.jpg';
theSitetree.fontsetId='17241';
theSitetree.graphicsetId='12677';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='ACCBB2';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'webland',
  product: 'WSCSYSSSSLY0XFFS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nuance',
				paletteFamily: 	'ACCBB2',
				keyvisualId: 	'8952',
				keyvisualName: 	'kv_8952.jpg',
				fontsetId: 		'17241',
				graphicsetId: 	'12677',
				contentColor: 	'000000',
				contentBGColor: 'ACCBB2',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-2166717']={
webappId:    '1501',
documentId:  '1411',
internalId:  '2166717',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-2327']={
webappId:    '7008',
documentId:  '1511',
internalId:  '2327',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1411',
internalId:  '',
customField: '20120111-114528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1437',
internalId:  '',
customField: '20120222-014927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1458',
internalId:  '',
customField: '20120222-015847'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1411',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70201',
internalId:  '',
customField: '20120129-134749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1511',
internalId:  '',
customField: '20090630-173302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52501',
internalId:  '',
customField: '20111113-190318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73801',
internalId:  '',
customField: '20110303-220301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108401',
internalId:  '',
customField: '20111224-151910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55801',
internalId:  '',
customField: '20111106-183601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73822',
internalId:  '',
customField: '20110305-191131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95801',
internalId:  '',
customField: '20111224-171607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37701',
internalId:  '',
customField: '20120129-232316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110501',
internalId:  '',
customField: '20120129-232447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20111224-153109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37201',
internalId:  '',
customField: '20111101-214142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37222',
internalId:  '',
customField: '20120129-134543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62901',
internalId:  '',
customField: '20120222-015710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30201',
internalId:  '',
customField: '20111224-153221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16006',
internalId:  '',
customField: '20100208-104343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16027',
internalId:  '',
customField: '20120204-003241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15943',
internalId:  '',
customField: '20111127-185516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85901',
internalId:  '',
customField: '20111224-152327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86501',
internalId:  '',
customField: '20120222-015847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92801',
internalId:  '',
customField: '20110807-200453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94443',
internalId:  '',
customField: '20111101-214009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94422',
internalId:  '',
customField: '20111101-213407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60201',
internalId:  '',
customField: '20111106-222453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82301',
internalId:  '',
customField: '20111127-184303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20111127-190305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17064',
internalId:  '',
customField: '20110807-073239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70222',
internalId:  '',
customField: '20111127-190942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70243',
internalId:  '',
customField: '20111119-193603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70264',
internalId:  '',
customField: '20120109-225259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70285',
internalId:  '',
customField: '20120109-225528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27501',
internalId:  '',
customField: '20120222-014927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115001',
internalId:  '',
customField: '20120129-133959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115022',
internalId:  '',
customField: '20120109-230128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20111224-152134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20100119-200707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27701',
internalId:  '',
customField: '20111106-214214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94401',
internalId:  '',
customField: '20120129-133602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90301',
internalId:  '',
customField: '20110918-181031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95822',
internalId:  '',
customField: '20110918-001459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96301',
internalId:  '',
customField: '20111224-171141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96322',
internalId:  '',
customField: '20111101-212853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31243',
internalId:  '',
customField: '20110705-230710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31264',
internalId:  '',
customField: '20110705-230535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44901',
internalId:  '',
customField: '20120220-004458'
};
var webAppHostname = 'wsc-app.webland.ch:80';
var canonHostname = 'wsc01.webland.ch';
var accountId     = 'AWB010INXZPL';
var companyName   = 'www.neotropis.ch';
var htmlTitle	  = 'www.neotropis.ch';
var metaKeywords  = 'Neotropis%2C+Amphibien%2C+Reptilien%2C+Giftschlangen%2C+Pflanzen%2C+Pfeilgiftfr%C3%B6sche%2C+Dendrobaten%2C+Bothropoides%2C+Bothriechis%2C+Crotalus%2C+Sistrurus%2C+Boa+constrictor%2C+Porthidium%2C+Diploglossus%2C+Costa+Rica%2C+Diploglossus+monotropis%2C+Porthidium%2C+Agalychnis';
var metaContents  = 'Neotropis%2C+Amphibien%2C+Reptilien%2C+Giftschlangen%2C+Pflanzen%2C+Pfeilgiftfr%C3%B6sche%2C+Dendrobaten%2C+Bothrops%2C+Bothriechis%2C+Crotalus%2C+Sistrurus%2C+Boa+constrictor%2C+kleinbleibende+Viperidae%2C+Porthidium%2C+Diploglossus%2C+Coleonyx+mitratus%2C+Crotalus+triseriatus%2C+Porthidium+nasutum%2C+Porthidium+lansbergii+lansbergii%2C+Porthidium+lansbergii+hutmanni%2C+Diploglossus+monotropis%2C+Costa+Rica%2C+Crotalus+ravus%2C+Agalychnis+callydrias';
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();
};

