/* [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','4607',jdecode('Home'),jdecode(''), jdecode('%2F4607.html'), 'true',[],'',''],
	['PAGE','54322',jdecode('Sponsorpartner'),jdecode(''), jdecode('%2F54322.html'), 'true',[],'',''],
	['PAGE','140001',jdecode('Wozu+Spitalsozialarbeit%3F'),jdecode(''), jdecode('%2F140001.html'), 'true',[],'',''],
	['PAGE','14609',jdecode('Dienstleistungen'),jdecode(''), jdecode('%2F14609%2Findex.html'), 'true',[ 
		['PAGE','15480',jdecode('Fort-+und+Weiterbildung'),jdecode(''), jdecode('%2F14609%2F15480.html'), 'true',[],'',''],
		['PAGE','15399',jdecode('Vortr%C3%A4ge%2C+Berichte'),jdecode(''), jdecode('%2F14609%2F15399.html'), 'true',[],'',''],
		['PAGE','15453',jdecode('Fachinformationen'),jdecode(''), jdecode('%2F14609%2F15453.html'), 'true',[],'',''],
		['PAGE','15372',jdecode('Literatur'),jdecode(''), jdecode('%2F14609%2F15372.html'), 'true',[],'',''],
		['PAGE','15426',jdecode('Berufspolitisches'),jdecode(''), jdecode('%2F14609%2F15426.html'), 'true',[],'',''],
		['PAGE','36330',jdecode('Stellenb%C3%B6rse'),jdecode(''), jdecode('%2F14609%2F36330.html'), 'true',[],'','']
	],'',''],
	['PAGE','15156',jdecode('%C3%9Cber+uns...'),jdecode(''), jdecode('%2F15156%2Findex.html'), 'true',[ 
		['PAGE','15183',jdecode('Vorstand'),jdecode(''), jdecode('%2F15156%2F15183.html'), 'true',[],'',''],
		['PAGE','15291',jdecode('Aktuelles'),jdecode(''), jdecode('%2F15156%2F15291.html'), 'true',[],'',''],
		['PAGE','15237',jdecode('Mitglied+werden'),jdecode(''), jdecode('%2F15156%2F15237.html'), 'true',[],'',''],
		['PAGE','15318',jdecode('Statuten'),jdecode(''), jdecode('%2F15156%2F15318.html'), 'true',[],'',''],
		['PAGE','49985',jdecode('Fachtagungen'),jdecode(''), jdecode('%2F15156%2F49985.html'), 'true',[],'',''],
		['PAGE','15345',jdecode('Geschichte'),jdecode(''), jdecode('%2F15156%2F15345.html'), 'true',[],'','']
	],'',''],
	['PAGE','14636',jdecode('N%C3%BCtzliche+Links'),jdecode(''), jdecode('%2F14636.html'), 'true',[],'',''],
	['PAGE','33406',jdecode('LOGIN+Mitglieder'),jdecode(''), jdecode('%2F33406%2Findex.html'), 'true',[ 
		['PAGE','23281',jdecode('Mitgliederliste'),jdecode(''), jdecode('%2F33406%2F23281.html'), 'true',[],'',''],
		['PAGE','50982',jdecode('Insider+Infos'),jdecode(''), jdecode('%2F33406%2F50982.html'), 'true',[],'',''],
		['PAGE','128601',jdecode('Jahresziele+Vorstand'),jdecode(''), jdecode('%2F33406%2F128601.html'), 'true',[],'',''],
		['PAGE','90501',jdecode('Mitgliederversammlung'),jdecode(''), jdecode('%2F33406%2F90501.html'), 'true',[],'',''],
		['PAGE','158001',jdecode('Jahrestagung+2011'),jdecode(''), jdecode('%2F33406%2F158001.html'), 'true',[],'',''],
		['PAGE','121401',jdecode('Anl%C3%A4sse+2010'),jdecode(''), jdecode('%2F33406%2F121401.html'), 'true',[],'',''],
		['PAGE','50637',jdecode('Anl%C3%A4sse+2008'),jdecode(''), jdecode('%2F33406%2F50637.html'), 'true',[],'',''],
		['PAGE','33784',jdecode('Anl%C3%A4sse+2006'),jdecode(''), jdecode('%2F33406%2F33784.html'), 'true',[],'',''],
		['PAGE','33811',jdecode('Anl%C3%A4sse+2005'),jdecode(''), jdecode('%2F33406%2F33811.html'), 'true',[],'','']
	],'',''],
	['PAGE','33703',jdecode('LOGIN+Vorstand'),jdecode(''), jdecode('%2F33703%2Findex.html'), 'true',[ 
		['PAGE','23308',jdecode('Vorstandsliste'),jdecode(''), jdecode('%2F33703%2F23308.html'), 'true',[],'',''],
		['PAGE','52347',jdecode('Ehemalige+V-Mitglieder'),jdecode(''), jdecode('%2F33703%2F52347.html'), 'true',[],'',''],
		['PAGE','50646',jdecode('Anl%C3%A4sse+2007'),jdecode(''), jdecode('%2F33703%2F50646.html'), 'true',[],'',''],
		['PAGE','33730',jdecode('Anl%C3%A4sse+2006'),jdecode(''), jdecode('%2F33703%2F33730.html'), 'true',[],'',''],
		['PAGE','33757',jdecode('Anl%C3%A4sse+2005'),jdecode(''), jdecode('%2F33703%2F33757.html'), 'true',[],'','']
	],'',''],
	['PAGE','121443',jdecode('Sektion+Bern+'),jdecode(''), jdecode('%2F121443%2Findex.html'), 'true',[ 
		['PAGE','123301',jdecode('Leitungsteam'),jdecode(''), jdecode('%2F121443%2F123301.html'), 'true',[],'',''],
		['PAGE','127701',jdecode('Protokolle'),jdecode(''), jdecode('%2F121443%2F127701.html'), 'true',[],'',''],
		['PAGE','123322',jdecode('Unterlagen%2C+Dokumente'),jdecode(''), jdecode('%2F121443%2F123322.html'), 'true',[],'','']
	],'',''],
	['PAGE','129801',jdecode('Sektion+P%C3%A4diatrie'),jdecode(''), jdecode('%2F129801%2Findex.html'), 'true',[ 
		['PAGE','130001',jdecode('Leitungsteam'),jdecode(''), jdecode('%2F129801%2F130001.html'), 'true',[],'',''],
		['PAGE','138701',jdecode('Unterlagen%2C+Dokumente'),jdecode(''), jdecode('%2F129801%2F138701.html'), 'true',[],'','']
	],'',''],
	['PAGE','164501',jdecode('Sektion+Z%C3%BCrich'),jdecode(''), jdecode('%2F164501%2Findex.html'), 'true',[ 
		['PAGE','164522',jdecode('Leitungsteam'),jdecode(''), jdecode('%2F164501%2F164522.html'), 'true',[],'',''],
		['PAGE','164543',jdecode('Unterlagen%2C+Dokumente'),jdecode(''), jdecode('%2F164501%2F164543.html'), 'true',[],'','']
	],'',''],
	['PAGE','14447',jdecode('Kontakt'),jdecode(''), jdecode('%2F14447%2Findex.html'), 'true',[ 
		['PAGE','15129',jdecode('Postcheckkonto'),jdecode(''), jdecode('%2F14447%2F15129.html'), 'true',[],'','']
	],'','']];
var siteelementCount=46;
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: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4607',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158001',
internalId:  '',
customField: '20111031-155058'
};
webappMappings['1009']=webappMappings['1009-6407788']={
webappId:    '1009',
documentId:  '41745',
internalId:  '6407788',
customField: 'isFollowupPage:true;documentId:15237;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4607',
internalId:  '',
customField: '20120105-085202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14609',
internalId:  '',
customField: '20110601-171147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15453',
internalId:  '',
customField: '20110729-112636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15426',
internalId:  '',
customField: '20110603-220803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15156',
internalId:  '',
customField: '20110601-171415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15183',
internalId:  '',
customField: '20111202-154844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33703',
internalId:  '',
customField: '20110603-224646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52347',
internalId:  '',
customField: '20111202-155207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23308',
internalId:  '',
customField: '20120105-120228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33730',
internalId:  '',
customField: '20061112-192421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14447',
internalId:  '',
customField: '20110404-131007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15129',
internalId:  '',
customField: '20110601-095725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15291',
internalId:  '',
customField: '20111202-154913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15237',
internalId:  '',
customField: '20111117-113357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41745',
internalId:  '',
customField: '20060314-080145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15318',
internalId:  '',
customField: '20110608-163733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49985',
internalId:  '',
customField: '20110601-173258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15345',
internalId:  '',
customField: '20111121-105857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36330',
internalId:  '',
customField: '20111125-133107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15480',
internalId:  '',
customField: '20111117-105145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15372',
internalId:  '',
customField: '20110603-220549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15399',
internalId:  '',
customField: '20111212-141101'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '164501',
internalId:  '-',
customField: '20111202-161741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54322',
internalId:  '',
customField: '20120201-091553'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '164522',
internalId:  '-',
customField: '20111202-162558'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '164543',
internalId:  '-',
customField: '20111202-164057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14636',
internalId:  '',
customField: '20111028-141006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33406',
internalId:  '',
customField: '20110603-224420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23281',
internalId:  '',
customField: '20110603-224552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50982',
internalId:  '',
customField: '20110603-220043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127701',
internalId:  '',
customField: '20120206-145902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90501',
internalId:  '',
customField: '20110603-220159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50637',
internalId:  '',
customField: '20080612-192936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33784',
internalId:  '',
customField: '20070831-213055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33811',
internalId:  '',
customField: '20061116-085904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50646',
internalId:  '',
customField: '20061028-085936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33757',
internalId:  '',
customField: '20060110-055133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129801',
internalId:  '',
customField: '20111101-125838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128601',
internalId:  '',
customField: '20110608-164803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121401',
internalId:  '',
customField: '20100818-111843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121443',
internalId:  '',
customField: '20120119-090807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123301',
internalId:  '',
customField: '20110415-102628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123322',
internalId:  '',
customField: '20120119-091431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130001',
internalId:  '',
customField: '20111202-161810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138701',
internalId:  '',
customField: '20111205-113506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140001',
internalId:  '',
customField: '20120107-084401'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXPH4';
var companyName   = 'Schweizerischer+Fachverband+Sozialdienst+in+Spit%C3%A4lern';
var htmlTitle	  = 'Schweizerischer+Fachverband+Sozialdienst+in+Spit%C3%A4lern';
var metaKeywords  = 'Sozialdienst%2C+Spital%2C+Fachverband%2C+Spitaeler%2C+Spit%C3%A4ler%2C+Sozialarbeit%2C+Klinische+Sozialarbeit';
var metaContents  = 'Spital-Sozialdienst';
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();
};

