/* [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','5001',jdecode('Home'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','5052',jdecode('Grenzland'),jdecode(''),'/5052/index.html','true',[ 
		['PAGE','31901',jdecode('%C3%9Cber+uns'),jdecode(''),'/5052/31901.html','true',[],'','']
	],'',''],
	['PAGE','6901',jdecode('Wildnisp%C3%A4dagogik'),jdecode(''),'/6901/index.html','true',[ 
		['PAGE','14501',jdecode('Coyote+Teaching'),jdecode(''),'/6901/14501.html','true',[],'',''],
		['PAGE','5073',jdecode('Wildniswissen'),jdecode(''),'/6901/5073.html','true',[],'',''],
		['PAGE','5094',jdecode('Heilwissen'),jdecode(''),'/6901/5094.html','true',[],'',''],
		['PAGE','16101',jdecode('%28Nat%29Urhandwerk'),jdecode(''),'/6901/16101.html','true',[],'',''],
		['PAGE','33401',jdecode('in+der+Natur'),jdecode(''),'/6901/33401.html','true',[],'',''],
		['PAGE','33422',jdecode('mit+Tieren'),jdecode(''),'/6901/33422.html','true',[],'','']
	],'',''],
	['PAGE','24901',jdecode('Krisenintervention'),jdecode(''),'/24901.html','true',[],'',''],
	['PAGE','5241',jdecode('Spezialprojekte'),jdecode(''),'/5241/index.html','true',[ 
		['PAGE','35501',jdecode('Beispielprojekte'),jdecode(''),'/5241/35501.html','true',[],'',''],
		['PAGE','38201',jdecode('Richtpreise'),jdecode(''),'/5241/38201.html','true',[],'','']
	],'',''],
	['PAGE','12101',jdecode('Wildniskurse'),jdecode(''),'/12101/index.html','true',[ 
		['PAGE','21822',jdecode('Anmeldung'),jdecode(''),'/12101/21822.html','true',[],'',''],
		['PAGE','5136',jdecode('Wildnisschnuppern'),jdecode(''),'/12101/5136.html','true',[],'',''],
		['PAGE','17301',jdecode('Feuer+und+Flamme'),jdecode(''),'/12101/17301.html','true',[],'',''],
		['PAGE','17201',jdecode('Wildpflanzen+essen'),jdecode(''),'/12101/17201.html','true',[],'',''],
		['PAGE','17501',jdecode('Baumwelten'),jdecode(''),'/12101/17501.html','true',[],'',''],
		['PAGE','5157',jdecode('Wildnisapotheke'),jdecode(''),'/12101/5157.html','true',[],'',''],
		['PAGE','5178',jdecode('Wolle+spinnen'),jdecode(''),'/12101/5178.html','true',[],'','']
	],'',''],
	['PAGE','22101',jdecode('Kontakt'),jdecode(''),'/22101.html','true',[],'',''],
	['PAGE','17022',jdecode('Kalender'),jdecode(''),'/17022.html','true',[],'',''],
	['PAGE','17901',jdecode('Fotogalerie'),jdecode(''),'/17901.html','true',[],'',''],
	['PAGE','21801',jdecode('G%C3%A4stebuch'),jdecode(''),'/21801.html','true',[],'',''],
	['PAGE','28301',jdecode('AGB%60s'),jdecode(''),'/28301.html','true',[],'',''],
	['PAGE','7601',jdecode('Links'),jdecode(''),'/7601.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Orbit';
theSitetree.paletteFamily='003333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='172';
theSitetree.graphicsetId='201';
theSitetree.contentColor='99CCCC';
theSitetree.contentBGColor='003333';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Orbit',
				paletteFamily: 	'003333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'172',
				graphicsetId: 	'201',
				contentColor: 	'99CCCC',
				contentBGColor: '003333',
				a_color: 		'003333',
				b_color: 		'99CCCC',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100311-155400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5073',
internalId:  '',
customField: '20091110-113045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20091215-140253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5094',
internalId:  '',
customField: '20091002-165239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17022',
internalId:  '',
customField: '20100506-095623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5136',
internalId:  '',
customField: '20100506-095909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5157',
internalId:  '',
customField: '20091228-195814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5178',
internalId:  '',
customField: '20091124-141551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35501',
internalId:  '',
customField: '20100520-161529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5241',
internalId:  '',
customField: '20100520-161903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20100506-095724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20100520-162101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20090926-111634'
};
webappMappings['1002']=webappMappings['1002-21801abw330iner3v']={
webappId:    '1002',
documentId:  '21801',
internalId:  '21801abw330iner3v',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20091015-103709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24901',
internalId:  '',
customField: '20100531-161833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20091124-134954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20091228-202544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20091228-195705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20091228-195750'
};
webappMappings['7008']=webappMappings['7008-7492']={
webappId:    '7008',
documentId:  '21822',
internalId:  '7492',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33401',
internalId:  '',
customField: '20100311-155733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38201',
internalId:  '',
customField: '20100520-162015'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33422',
internalId:  '',
customField: '20100311-155839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20091006-121609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31901',
internalId:  '',
customField: '20100520-162307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20091124-133312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20090925-192236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21822',
internalId:  '',
customField: '20091111-141100'
};
webappMappings['7008']=webappMappings['7008-7496']={
webappId:    '7008',
documentId:  '22101',
internalId:  '7496',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20090925-192032'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW330INER3V';
var companyName   = 'Grenzland-+Wildniswissen';
var htmlTitle	  = '';
var metaKeywords  = 'Naturp%C3%A4dagogik%2C+Wildnisp%C3%A4dagogik%2C+Wildniskurse%2C+Projekte%2C+Kurse%2C+Naturerlebnis%2C+Wildniswissen%2C+Naturschutz%2C+Krisenintervention%2C+Sozialp%C3%A4dagogik%2C+Wildnistreffen%2C+Tiergest%C3%BCtzte+P%C3%A4dagogik%2C+Naturheilkunde%2C+Kr%C3%A4uterkunde%2C+Indianer%2C+Coyote+Teaching%2C+Kelten%2C+Steinzeit%2C+Naturhandwerk%2C+';
var metaContents  = 'Krisenintervention%2C+Natur-+und+Wildnisp%C3%A4dagogik%2C+Naturheilkunde%2C+Wildniskurse%2C++Sozialp%C3%A4dagogische+Intervention%2C+Projekttage+f%C3%BCr+Schulklassen%2C+Tiergest%C3%BCtzte+P%C3%A4dagogik.%0D%0ASozialp%C3%A4dagogik%2C+Jugendliche';
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();
};
