/* [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','4559',jdecode('Home+%2F+News'),jdecode(''), jdecode('%2F4559.html'), 'true',[],'',''],
	['PAGE','5101',jdecode('Unsere+Grundlage'),jdecode(''), jdecode('%2F5101.html'), 'true',[],'',''],
	['PAGE','14301',jdecode('Gesch%C3%A4ftsleitung'),jdecode(''), jdecode('%2F14301.html'), 'true',[],'',''],
	['PAGE','13069',jdecode('Sekretariat'),jdecode(''), jdecode('%2F13069.html'), 'true',[],'',''],
	['PAGE','129712',jdecode('Anmeldung+LSZ'),jdecode(''), jdecode('%2F129712.html'), 'true',[],'',''],
	['PAGE','129412',jdecode('An+das+Sekretariat'),jdecode(''), jdecode('%2F129412.html'), 'true',[],'',''],
	['PAGE','129733',jdecode('Abmeldung+LSZ'),jdecode(''), jdecode('%2F129733.html'), 'true',[],'',''],
	['PAGE','12964',jdecode('Organisation'),jdecode(''), jdecode('%2F12964.html'), 'true',[],'',''],
	['PAGE','145223',jdecode('PBV+Volksschule'),jdecode(''), jdecode('%2F145223.html'), 'true',[],'',''],
	['PAGE','14322',jdecode('Regionalsektionen'),jdecode(''), jdecode('%2F14322%2Findex.html'), 'true',[ 
		['PAGE','15301',jdecode('Innerschwyz'),jdecode(''), jdecode('%2F14322%2F15301.html'), 'true',[],'',''],
		['PAGE','15322',jdecode('Einsiedeln+%2F+H%C3%B6fe'),jdecode(''), jdecode('%2F14322%2F15322.html'), 'true',[],'',''],
		['PAGE','15343',jdecode('March'),jdecode(''), jdecode('%2F14322%2F15343.html'), 'true',[],'','']
	],'',''],
	['PAGE','14343',jdecode('Stufenvereine'),jdecode(''), jdecode('%2F14343%2Findex.html'), 'true',[ 
		['PAGE','15364',jdecode('Kindergarten'),jdecode(''), jdecode('%2F14343%2F15364.html'), 'true',[],'',''],
		['PAGE','15385',jdecode('Primarschule'),jdecode(''), jdecode('%2F14343%2F15385.html'), 'true',[],'',''],
		['PAGE','15448',jdecode('SOK'),jdecode(''), jdecode('%2F14343%2F15448.html'), 'true',[],'',''],
		['PAGE','15532',jdecode('Mittelschule'),jdecode(''), jdecode('%2F14343%2F15532.html'), 'true',[],'',''],
		['PAGE','15427',jdecode('Hauswirtschaft'),jdecode(''), jdecode('%2F14343%2F15427.html'), 'true',[],'',''],
		['PAGE','15406',jdecode('Technisches+Gestalten'),jdecode(''), jdecode('%2F14343%2F15406.html'), 'true',[],'',''],
		['PAGE','15469',jdecode('PHZ'),jdecode(''), jdecode('%2F14343%2F15469.html'), 'true',[],'',''],
		['PAGE','15511',jdecode('Deutsch+als+Zweitsprache'),jdecode(''), jdecode('%2F14343%2F15511.html'), 'true',[],'',''],
		['PAGE','15553',jdecode('Heilp%C3%A4dagogik'),jdecode(''), jdecode('%2F14343%2F15553.html'), 'true',[],'','']
	],'',''],
	['PAGE','14364',jdecode('Regionalkonferenzen'),jdecode(''), jdecode('%2F14364.html'), 'true',[],'',''],
	['PAGE','14385',jdecode('Delegierte'),jdecode(''), jdecode('%2F14385.html'), 'true',[],'',''],
	['PAGE','12901',jdecode('Agenda'),jdecode(''), jdecode('%2F12901.html'), 'true',[],'',''],
	['PAGE','16601',jdecode('Lohn+und+Arbeitszeit'),jdecode(''), jdecode('%2F16601.html'), 'true',[],'',''],
	['PAGE','13006',jdecode('Dienstleistungen'),jdecode(''), jdecode('%2F13006.html'), 'true',[],'',''],
	['PAGE','38801',jdecode('12+Gr%C3%BCnde'),jdecode(''), jdecode('%2F38801.html'), 'true',[],'',''],
	['PAGE','39701',jdecode('Rundbriefe'),jdecode(''), jdecode('%2F39701%2Findex.html'), 'true',[ 
		['PAGE','144523',jdecode('Rundbriefe+12'),jdecode(''), jdecode('%2F39701%2F144523.html'), 'true',[],'',''],
		['PAGE','124001',jdecode('Rundbriefe+11'),jdecode(''), jdecode('%2F39701%2F124001.html'), 'true',[],'',''],
		['PAGE','112101',jdecode('Rundbriefe+10'),jdecode(''), jdecode('%2F39701%2F112101.html'), 'true',[],'',''],
		['PAGE','77601',jdecode('Rundbriefe+09'),jdecode(''), jdecode('%2F39701%2F77601.html'), 'true',[],'',''],
		['PAGE','61401',jdecode('Rundbriefe+08'),jdecode(''), jdecode('%2F39701%2F61401.html'), 'true',[],'',''],
		['PAGE','13048',jdecode('Rundbriefe+07'),jdecode(''), jdecode('%2F39701%2F13048.html'), 'true',[],'',''],
		['PAGE','40901',jdecode('Rundbriefe+06'),jdecode(''), jdecode('%2F39701%2F40901.html'), 'true',[],'',''],
		['PAGE','40922',jdecode('Rundbriefe+05'),jdecode(''), jdecode('%2F39701%2F40922.html'), 'true',[],'',''],
		['PAGE','40943',jdecode('Rundbriefe+04'),jdecode(''), jdecode('%2F39701%2F40943.html'), 'true',[],'','']
	],'',''],
	['PAGE','110601',jdecode('Politische+Vorst%C3%B6sse'),jdecode(''), jdecode('%2F110601.html'), 'true',[],'',''],
	['PAGE','12943',jdecode('Links'),jdecode(''), jdecode('%2F12943.html'), 'true',[],'',''],
	['PAGE','12922',jdecode('Archiv'),jdecode(''), jdecode('%2F12922.html'), 'true',[],'',''],
	['PAGE','64501',jdecode('Poolstunden'),jdecode(''), jdecode('%2F64501.html'), 'true',[],'',''],
	['PAGE','42006',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F42006%2Findex.html'), 'true',[ 
		['PAGE','42001',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F42006%2F42001.html'), 'false',[],'','']
	],'','']];
var siteelementCount=45;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='CC3300';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='87';
theSitetree.graphicsetId='107';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Global',
				paletteFamily: 	'CC3300',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'87',
				graphicsetId: 	'107',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'CB1C00',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-10574976']={
webappId:    '1501',
documentId:  '4559',
internalId:  '10574976',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13069',
internalId:  '',
customField: '20120105-074347'
};
webappMappings['1002']=webappMappings['1002-42006ahp010in2faw']={
webappId:    '1002',
documentId:  '42006',
internalId:  '42006ahp010in2faw',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124001',
internalId:  '',
customField: '20120201-153559'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4559',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4559',
internalId:  '',
customField: '20120201-152341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20120105-091738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20120105-091137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12964',
internalId:  '',
customField: '20090621-104544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20120105-074006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20120105-074855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20120111-122919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15322',
internalId:  '',
customField: '20120109-111327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15343',
internalId:  '',
customField: '20070803-171409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14343',
internalId:  '',
customField: '20090621-104725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15364',
internalId:  '',
customField: '20110824-133911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15385',
internalId:  '',
customField: '20110824-130001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15406',
internalId:  '',
customField: '20111019-170616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15427',
internalId:  '',
customField: '20110824-131539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15448',
internalId:  '',
customField: '20100830-101350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15469',
internalId:  '',
customField: '20110401-085010'
};
webappMappings['7008']=webappMappings['7008-4489']={
webappId:    '7008',
documentId:  '129412',
internalId:  '4489',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15511',
internalId:  '',
customField: '20100928-111353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15532',
internalId:  '',
customField: '20070803-181130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15553',
internalId:  '',
customField: '20111214-152052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14364',
internalId:  '',
customField: '20120105-075925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14385',
internalId:  '',
customField: '20120105-081447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20120105-085520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13006',
internalId:  '',
customField: '20120111-122514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38801',
internalId:  '',
customField: '20120105-081946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39701',
internalId:  '',
customField: '20120105-082059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77601',
internalId:  '',
customField: '20100125-102110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61401',
internalId:  '',
customField: '20090220-075355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13048',
internalId:  '',
customField: '20080115-115258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40901',
internalId:  '',
customField: '20070803-111450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40922',
internalId:  '',
customField: '20070803-115752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40943',
internalId:  '',
customField: '20070730-165241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12943',
internalId:  '',
customField: '20120105-091250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12922',
internalId:  '',
customField: '20101017-124418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64501',
internalId:  '',
customField: '20080229-135207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42006',
internalId:  '',
customField: '20070730-162146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20070730-162146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110601',
internalId:  '',
customField: '20091212-123600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112101',
internalId:  '',
customField: '20101210-122630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129412',
internalId:  '',
customField: '20110320-112840'
};
webappMappings['7008']=webappMappings['7008-4494']={
webappId:    '7008',
documentId:  '129712',
internalId:  '4494',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-4495']={
webappId:    '7008',
documentId:  '129733',
internalId:  '4495',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129712',
internalId:  '',
customField: '20110328-152940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129733',
internalId:  '',
customField: '20110328-152845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144523',
internalId:  '',
customField: '20120201-161345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145223',
internalId:  '',
customField: '20120106-211511'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010IN2FAW';
var companyName   = 'LSZ+-+Lehrerinnen+und+Lehrer+Schwyz';
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();
};

