/* [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','2001',jdecode('LichtSeminare'),jdecode(''),'/2001/index.html','true',[ 
		['PAGE','2052',jdecode('Modulsystem'),jdecode(''),'/2001/2052.html','true',[],'',''],
		['PAGE','10312',jdecode('LichtWesen%C2%AE'),jdecode(''),'/2001/10312.html','true',[],'','']
	],'',''],
	['PAGE','2073',jdecode('Module'),jdecode(''),'/2073/index.html','true',[ 
		['PAGE','2901',jdecode('A+I++'),jdecode(''),'/2073/2901.html','true',[],'',''],
		['PAGE','2922',jdecode('A+II++'),jdecode(''),'/2073/2922.html','true',[],'',''],
		['PAGE','2943',jdecode('A+III'),jdecode(''),'/2073/2943.html','true',[],'',''],
		['PAGE','4001',jdecode('B+I+'),jdecode(''),'/2073/4001.html','true',[],'',''],
		['PAGE','4022',jdecode('B+II+'),jdecode(''),'/2073/4022.html','true',[],'',''],
		['PAGE','4043',jdecode('B+III+'),jdecode(''),'/2073/4043.html','true',[],'',''],
		['PAGE','4064',jdecode('B+IV+'),jdecode(''),'/2073/4064.html','true',[],'',''],
		['PAGE','4085',jdecode('B+V+'),jdecode(''),'/2073/4085.html','true',[],'',''],
		['PAGE','4106',jdecode('C++I++-+++Freiheit'),jdecode(''),'/2073/4106.html','true',[],'',''],
		['PAGE','11212',jdecode('C+II'),jdecode(''),'/2073/11212.html','true',[],'',''],
		['PAGE','11233',jdecode('C+III'),jdecode(''),'/2073/11233.html','true',[],'',''],
		['PAGE','11254',jdecode('C+IV'),jdecode(''),'/2073/11254.html','true',[],'','']
	],'',''],
	['PAGE','4127',jdecode('Termine'),jdecode(''),'/4127.html','true',[],'',''],
	['PAGE','4148',jdecode('Ihr+Aufwand'),jdecode(''),'/4148/index.html','true',[ 
		['PAGE','4169',jdecode('Ihr+Einsatz'),jdecode(''),'/4148/4169.html','true',[],'',''],
		['PAGE','4190',jdecode('Modul+-+Preise'),jdecode(''),'/4148/4190.html','true',[],'',''],
		['PAGE','4701',jdecode('Anmeldung'),jdecode(''),'/4148/4701.html','true',[],'','']
	],'',''],
	['PAGE','10333',jdecode('Gedanken....'),jdecode(''),'/10333.html','true',[],'',''],
	['PAGE','2115',jdecode('Unsere+Dozenten'),jdecode(''),'/2115/index.html','true',[ 
		['PAGE','5401',jdecode('Gerhard+K.+Pieroth'),jdecode(''),'/2115/5401.html','true',[],'',''],
		['PAGE','5422',jdecode('Verena+Hort'),jdecode(''),'/2115/5422.html','true',[],'','']
	],'',''],
	['PAGE','4211',jdecode('Kontakt+'),jdecode(''),'/4211.html','true',[],'',''],
	['PAGE','4232',jdecode('Impressum'),jdecode(''),'/4232.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Blades';
theSitetree.paletteFamily='466AD2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='31704';
theSitetree.graphicsetId='13467';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='608DFE';
var localeDef={
  language: 'de',
  country: 'DE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blades',
				paletteFamily: 	'466AD2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'31704',
				graphicsetId: 	'13467',
				contentColor: 	'FFFFFF',
				contentBGColor: '608DFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20101111-082528'
};
webappMappings['7008']=webappMappings['7008-6505']={
webappId:    '7008',
documentId:  '4211',
internalId:  '6505',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20101121-072409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2073',
internalId:  '',
customField: '20101013-122000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20101012-053346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2922',
internalId:  '',
customField: '20101012-053801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2943',
internalId:  '',
customField: '20101015-165851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20101012-060605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4022',
internalId:  '',
customField: '20101012-061240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4043',
internalId:  '',
customField: '20101012-061643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4064',
internalId:  '',
customField: '20101012-062208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4085',
internalId:  '',
customField: '20101016-041931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4106',
internalId:  '',
customField: '20101016-042138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4127',
internalId:  '',
customField: '20101121-074201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4148',
internalId:  '',
customField: '20101016-043050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4169',
internalId:  '',
customField: '20101013-061800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4190',
internalId:  '',
customField: '20101016-043949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20101013-062205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2115',
internalId:  '',
customField: '20101028-060313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4211',
internalId:  '',
customField: '20101012-070545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4232',
internalId:  '',
customField: '20101016-044612'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20101012-071435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20101012-072648'
};
webappMappings['7008']=webappMappings['7008-6516']={
webappId:    '7008',
documentId:  '4701',
internalId:  '6516',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10312',
internalId:  '',
customField: '20101028-053233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10333',
internalId:  '',
customField: '20101121-071642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11212',
internalId:  '',
customField: '20101121-071146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11233',
internalId:  '',
customField: '20101121-071146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11254',
internalId:  '',
customField: '20101121-071146'
};
var canonHostname = 'wsc.alfahosting.de';
var accountId     = 'AAHS10IN2UYD';
var companyName   = '';
var htmlTitle	  = 'LichtSeminare+LichtWesen+LIWE';
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();
};

