/* [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','4597',jdecode('Home'),jdecode(''), jdecode('%2F4597.html'), 'true',[],'',''],
	['PAGE','4654',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F4654%2Findex.html'), 'true',[ 
		['PAGE','28749',jdecode('Vorstand'),jdecode(''), jdecode('%2F4654%2F28749.html'), 'true',[],'',''],
		['PAGE','28872',jdecode('Was+sind+HSK-Kurse%3F'),jdecode(''), jdecode('%2F4654%2F28872.html'), 'true',[],'',''],
		['PAGE','28767',jdecode('Statuten'),jdecode(''), jdecode('%2F4654%2F28767.html'), 'true',[],'','']
	],'',''],
	['PAGE','4681',jdecode('Aktivit%C3%A4ten'),jdecode(''), jdecode('%2F4681.html'), 'true',[],'',''],
	['PAGE','4735',jdecode('Kontakt'),jdecode(''), jdecode('%2F4735.html'), 'true',[],'',''],
	['PAGE','38901',jdecode('Zusammenarbeit+'),jdecode(''), jdecode('%2F38901.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='333399';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='85';
theSitetree.graphicsetId='105';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2QE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Global',
				paletteFamily: 	'333399',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'85',
				graphicsetId: 	'105',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'242E8A',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4597',
internalId:  '',
customField: '20111005-171233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4654',
internalId:  '',
customField: '20111005-170845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28767',
internalId:  '',
customField: '20061120-152252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28749',
internalId:  '',
customField: '20111005-170707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28872',
internalId:  '',
customField: '20110914-201709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4681',
internalId:  '',
customField: '20090630-131155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38901',
internalId:  '',
customField: '20100827-130345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4735',
internalId:  '',
customField: '20100528-130942'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXLLD';
var companyName   = '';
var htmlTitle	  = '';
var metaKeywords  = 'HSK%2C+Lehrerverein%2C+Z%C3%BCrich%2C+Heimatliche+Sprache+und+Kultur%2C+Muttersprache%2C+Lehrpersonen+HSK-Lehrpersonen%2C+Lehrerinnenverein%2C++Lehrerin%2C+albanisch%2C+chinesisch%2C+spanisch%2C+portugiesisch%2C+brasilien%2C+lernen%2C+sprachen%2C+serbisch%2C+ungarisch%2C+t%C3%BCrkisch%2C+slowenisch%2C+lateinamerikanisch%2C+Lateinamerika%2C+Koreanisch%2C+korea%2C+Spanien%2C+Portugal%2C+T%C3%BCrkei%2C+Italien%2C+italienisch%2C+Finnland%2C+finnisch%2C+China%2C+Kroatisch%2C+Kroatien%2C+Montenegro%2C+Serbien%2C+Ungarn%2C+ungarisch%2C+Frankreich%2C+franz%C3%B6sisch%2C+Sch%C3%BCler%2C+sch%C3%BClerinnen%2C+Sch%C3%BClerin%2C+Ausl%C3%A4nder%2C+Ausl%C3%A4nderin%2C+Integration%2C+Integrationskurse%2C+Sprachkurse%2C+Oberstufe%2C+Unterstufe%2C+Primarschule%2C+Primarstufe%2C+ausl%C3%A4ndisch%2C+nationalit%C3%A4t%2C+Schulstufe%2C+heimat%2C+Dragana+Dimitijevic%2C+Kathia+R%C3%BCegsegger%2C+Masuma+Alikhani+Wahidi%2C+Kardos+Katalin%2C+Gabrielle+Rouvinez%2CSelin+%C3%96nd%C3%BCl%2C+Muttersprache';
var metaContents  = 'HSK%2C+Lehrerverein%2C+Z%C3%BCrich%2C+Heimatliche+Sprache+und+Kultur%2C+Muttersprache%2C+Lehrpersonen+HSK-Lehrpersonen%2C+Lehrerinnenverein%2C++Lehrerin%2C+albanisch%2C+chinesisch%2C+spanisch%2C+portugiesisch%2C+brasilien%2C+lernen%2C+sprachen%2C+serbisch%2C+ungarisch%2C+t%C3%BCrkisch%2C+slowenisch%2C+lateinamerikanisch%2C+Lateinamerika%2C+Koreanisch%2C+korea%2C+Spanien%2C+Portugal%2C+T%C3%BCrkei%2C+Italien%2C+italienisch%2C+Finnland%2C+finnisch%2C+China%2C+Kroatisch%2C+Kroatien%2C+Montenegro%2C+Serbien%2C+Ungarn%2C+ungarisch%2C+Frankreich%2C+franz%C3%B6sisch%2C+Sch%C3%BCler%2C+sch%C3%BClerinnen%2C+Sch%C3%BClerin%2C+Ausl%C3%A4nder%2C+Ausl%C3%A4nderin%2C+Integration%2C+Integrationskurse%2C+Sprachkurse%2C+Oberstufe%2C+Unterstufe%2C+Primarschule%2C+Primarstufe%2C+ausl%C3%A4ndisch%2C+nationalit%C3%A4t%2C+Schulstufe%2C+heimat%2C+Dragana+Dimitijevic%2C+Kathia+R%C3%BCegsegger%2C+Masuma+Alikhani+Wahidi%2C+Kardos+Katalin%2C+Gabrielle+Rouvinez%2CSelin+%C3%96nd%C3%BCl%2C+Muttersprache';
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();
};

