/* [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','501',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F501%2Findex.html'), 'true',[ 
		['PAGE','552',jdecode('Geschichte+Learning+for+Life'),jdecode(''), jdecode('%2F501%2F552.html'), 'true',[],'',''],
		['PAGE','573',jdecode('Stiftungszweck'),jdecode(''), jdecode('%2F501%2F573.html'), 'true',[],'',''],
		['PAGE','594',jdecode('Stiftungsrat'),jdecode(''), jdecode('%2F501%2F594.html'), 'true',[],'',''],
		['PAGE','70701',jdecode('Jahresbericht+2011'),jdecode(''), jdecode('%2F501%2F70701.html'), 'true',[],'',''],
		['PAGE','55501',jdecode('Jahresbericht+2010'),jdecode(''), jdecode('%2F501%2F55501.html'), 'true',[],'','']
	],'',''],
	['PAGE','21501',jdecode('News'),jdecode(''), jdecode('%2F21501%2Findex.html'), 'true',[ 
		['PAGE','73601',jdecode('Mikrokredit+Gruppe+2'),jdecode(''), jdecode('%2F21501%2F73601.html'), 'true',[],'',''],
		['PAGE','66801',jdecode('Reisebericht+Fr%C3%BChjahr+11'),jdecode(''), jdecode('%2F21501%2F66801.html'), 'true',[],'',''],
		['PAGE','52801',jdecode('Frauenlauf+Addis+Abeba'),jdecode(''), jdecode('%2F21501%2F52801.html'), 'true',[],'',''],
		['PAGE','68601',jdecode('Student+of+the+year'),jdecode(''), jdecode('%2F21501%2F68601.html'), 'true',[],'',''],
		['PAGE','69301',jdecode('Trinkwasseraufbereitung'),jdecode(''), jdecode('%2F21501%2F69301.html'), 'true',[],'','']
	],'',''],
	['PAGE','615',jdecode('Kontakt'),jdecode(''), jdecode('%2F615.html'), 'true',[],'',''],
	['PAGE','636',jdecode('Projekte+%C3%84thiopien'),jdecode(''), jdecode('%2F636%2Findex.html'), 'true',[ 
		['PAGE','56901',jdecode('Mikrokredit+Gruppe+1'),jdecode(''), jdecode('%2F636%2F56901.html'), 'true',[],'',''],
		['PAGE','45801',jdecode('Mikrokredit-Konzept'),jdecode(''), jdecode('%2F636%2F45801.html'), 'true',[],'',''],
		['PAGE','38501',jdecode('Trinkwasseraufbereitung'),jdecode(''), jdecode('%2F636%2F38501.html'), 'true',[],'',''],
		['PAGE','39801',jdecode('Gem%C3%BCse+in+Supe'),jdecode(''), jdecode('%2F636%2F39801.html'), 'true',[],'',''],
		['PAGE','34401',jdecode('Freiwilligen-Einsatz'),jdecode(''), jdecode('%2F636%2F34401.html'), 'true',[],'',''],
		['PAGE','32001',jdecode('Supe+Felix-Schule'),jdecode(''), jdecode('%2F636%2F32001.html'), 'true',[],'',''],
		['PAGE','678',jdecode('Supe+Sekundarschule'),jdecode(''), jdecode('%2F636%2F678.html'), 'true',[],'',''],
		['PAGE','657',jdecode('Supe+Boro+Grundschule'),jdecode(''), jdecode('%2F636%2F657.html'), 'true',[],'','']
	],'',''],
	['PAGE','699',jdecode('Projekte+Madagaskar'),jdecode(''), jdecode('%2F699%2Findex.html'), 'true',[ 
		['PAGE','720',jdecode('Sch%C3%BCler-Unterst%C3%BCtzungen'),jdecode(''), jdecode('%2F699%2F720.html'), 'true',[],'',''],
		['PAGE','741',jdecode('Waisenhaus'),jdecode(''), jdecode('%2F699%2F741.html'), 'true',[],'',''],
		['PAGE','762',jdecode('N%C3%A4herinnen+%2F+Hauswirtschaft'),jdecode(''), jdecode('%2F699%2F762.html'), 'true',[],'','']
	],'',''],
	['PAGE','804',jdecode('Spenden+%2F+G%C3%B6nner'),jdecode(''), jdecode('%2F804.html'), 'true',[],'',''],
	['PAGE','825',jdecode('Ausbildungspatenschaft'),jdecode(''), jdecode('%2F825.html'), 'true',[],'',''],
	['PAGE','7501',jdecode('Fotogalerie'),jdecode(''), jdecode('%2F7501%2Findex.html'), 'true',[ 
		['PAGE','44701',jdecode('Supe+November+09'),jdecode(''), jdecode('%2F7501%2F44701.html'), 'true',[],'',''],
		['PAGE','43701',jdecode('Einweihung+Felix+School'),jdecode(''), jdecode('%2F7501%2F43701.html'), 'true',[],'',''],
		['PAGE','42801',jdecode('Supe+Jan%2FFeb+2009'),jdecode(''), jdecode('%2F7501%2F42801.html'), 'true',[],'',''],
		['PAGE','7522',jdecode('Impressionen+%C3%84thiopien'),jdecode(''), jdecode('%2F7501%2F7522.html'), 'true',[],'',''],
		['PAGE','8901',jdecode('Schuler%C3%B6ffnung+Supe+2003'),jdecode(''), jdecode('%2F7501%2F8901.html'), 'true',[],'',''],
		['PAGE','8922',jdecode('Schuler%C3%B6ffnung+Supe+2007'),jdecode(''), jdecode('%2F7501%2F8922.html'), 'true',[],'',''],
		['PAGE','7543',jdecode('Impressionen+Madagsakar'),jdecode(''), jdecode('%2F7501%2F7543.html'), 'true',[],'',''],
		['PAGE','8943',jdecode('Sch%C3%BCler+Madagaskar'),jdecode(''), jdecode('%2F7501%2F8943.html'), 'true',[],'','']
	],'',''],
	['PAGE','7564',jdecode('Links'),jdecode(''), jdecode('%2F7564.html'), 'true',[],'',''],
	['PAGE','7585',jdecode('Presse'),jdecode(''), jdecode('%2F7585%2Findex.html'), 'true',[ 
		['PAGE','60801',jdecode('Milkom'),jdecode(''), jdecode('%2F7585%2F60801.html'), 'true',[],'','']
	],'',''],
	['PAGE','11006',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F11006%2Findex.html'), 'true',[ 
		['PAGE','11001',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F11006%2F11001.html'), 'false',[],'','']
	],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Intense';
theSitetree.paletteFamily='B7622A';
theSitetree.keyvisualId='3505';
theSitetree.keyvisualName='kv_3505.jpg';
theSitetree.fontsetId='10654';
theSitetree.graphicsetId='10799';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D58856';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Intense',
				paletteFamily: 	'B7622A',
				keyvisualId: 	'3505',
				keyvisualName: 	'kv_3505.jpg',
				fontsetId: 		'10654',
				graphicsetId: 	'10799',
				contentColor: 	'000000',
				contentBGColor: 'D58856',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'AD401A',
				e_color: 		'727171',
				f_color: 		'3F3F3F',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-11006abw0x0in2eco']={
webappId:    '1002',
documentId:  '11006',
internalId:  '11006abw0x0in2eco',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111215-142516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20070716-164818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20070716-164920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20100829-203846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20070521-201255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20111215-103456'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '73601',
internalId:  '-',
customField: '20111215-131407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20111215-125535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20080201-205251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20070719-203336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20081216-192521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20080201-205428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20110124-103311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20080201-203319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32001',
internalId:  '',
customField: '20090709-061258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '804',
internalId:  '',
customField: '20111215-065252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '825',
internalId:  '',
customField: '20090125-191427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20070521-215834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20070520-075408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20070520-074714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8922',
internalId:  '',
customField: '20070719-203717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7543',
internalId:  '',
customField: '20080201-205820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8943',
internalId:  '',
customField: '20080201-203554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7564',
internalId:  '',
customField: '20110826-074227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7585',
internalId:  '',
customField: '20070525-212346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11006',
internalId:  '',
customField: '20070523-214900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20070514-175912'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '70701',
internalId:  '-',
customField: '20111215-142831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38501',
internalId:  '',
customField: '20100208-212021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20090920-183144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39801',
internalId:  '',
customField: '20100208-220712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20100224-200018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43701',
internalId:  '',
customField: '20100224-202040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44701',
internalId:  '',
customField: '20100224-203521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45801',
internalId:  '',
customField: '20110211-094242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52801',
internalId:  '',
customField: '20110409-212150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20110124-103426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56901',
internalId:  '',
customField: '20110427-151934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60801',
internalId:  '',
customField: '20110220-101154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66801',
internalId:  '',
customField: '20110704-103434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68601',
internalId:  '',
customField: '20110713-110643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69301',
internalId:  '',
customField: '20110826-073827'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2ECO';
var companyName   = 'Stiftung+Learning+for+Life';
var htmlTitle	  = '';
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();
};

