/* [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','1001',jdecode('Home'),jdecode(''),'/1001.html','true',[],'',''],
	['PAGE','1052',jdecode('Schule'),jdecode(''),'/1052/index.html','true',[ 
		['PAGE','5601',jdecode('Leitung'),jdecode(''),'/1052/5601.html','true',[],'',''],
		['PAGE','1115',jdecode('Profil'),jdecode(''),'/1052/1115.html','true',[],'',''],
		['PAGE','1073',jdecode('Lehrpersonen'),jdecode(''),'/1052/1073.html','true',[],'',''],
		['PAGE','6301',jdecode('So+finden+Sie+uns'),jdecode(''),'/1052/6301.html','true',[],'',''],
		['PAGE','62801',jdecode('Feedback'),jdecode(''),'/1052/62801.html','true',[],'','']
	],'',''],
	['PAGE','1136',jdecode('Kurse'),jdecode(''),'/1136/index.html','true',[ 
		['PAGE','6322',jdecode('Kursangebot'),jdecode(''),'/1136/6322.html','true',[],'',''],
		['PAGE','5643',jdecode('freie+Pl%C3%A4tze'),jdecode(''),'/1136/5643.html','true',[],'',''],
		['PAGE','66101',jdecode('Einstufung'),jdecode(''),'/1136/66101.html','true',[],'',''],
		['PAGE','5622',jdecode('Kurslokale'),jdecode(''),'/1136/5622.html','true',[],'','']
	],'',''],
	['PAGE','5664',jdecode('Preise'),jdecode(''),'/5664/index.html','true',[ 
		['PAGE','6343',jdecode('Lektionen'),jdecode(''),'/5664/6343.html','true',[],'',''],
		['PAGE','6364',jdecode('Examenskurse'),jdecode(''),'/5664/6364.html','true',[],'',''],
		['PAGE','6385',jdecode('Konditionen'),jdecode(''),'/5664/6385.html','true',[],'','']
	],'',''],
	['PAGE','1157',jdecode('Service'),jdecode(''),'/1157/index.html','true',[ 
		['PAGE','68601',jdecode('Hausaufgaben'),jdecode(''),'/1157/68601.html','true',[],'',''],
		['PAGE','6406',jdecode('Mediathek'),jdecode(''),'/1157/6406.html','true',[],'',''],
		['PAGE','6427',jdecode('Schulmagazin'),jdecode(''),'/1157/6427.html','true',[],'','']
	],'',''],
	['PAGE','1178',jdecode('Kontakt'),jdecode(''),'/1178.html','true',[],'',''],
	['PAGE','1199',jdecode('Links'),jdecode(''),'/1199.html','true',[],'',''],
	['PAGE','12401',jdecode('weitere+Sprachen'),jdecode(''),'/12401/index.html','true',[ 
		['PAGE','10901',jdecode('Espa%C3%B1ol'),jdecode(''),'/12401/10901.html','true',[],'',''],
		['PAGE','74601',jdecode('Deutsch+f%C3%BCr+Fremdsprachige'),jdecode(''),'/12401/74601.html','true',[],'','']
	],'',''],
	['PAGE','1220',jdecode('Jobs'),jdecode(''),'/1220.html','true',[],'',''],
	['PAGE','1241',jdecode('News'),jdecode(''),'/1241.html','true',[],'',''],
	['PAGE','88501',jdecode('Photos'),jdecode(''),'/88501/index.html','true',[ 
		['PAGE','87201',jdecode('Fotoalbum+Rollercoaster+2010'),jdecode(''),'/88501/87201.html','true',[],'',''],
		['PAGE','75901',jdecode('Fotoalbum+Rollercoaster+2008'),jdecode(''),'/88501/75901.html','true',[],'',''],
		['PAGE','72801',jdecode('Fotoalbum+Reisen+ins+Sprachgebiet'),jdecode(''),'/88501/72801.html','true',[],'','']
	],'',''],
	['PAGE','79401',jdecode('Weblog'),jdecode(''),'/79401.html','true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Frugality';
theSitetree.paletteFamily='6FAE54';
theSitetree.keyvisualId='7682';
theSitetree.keyvisualName='kv_7682.jpg';
theSitetree.fontsetId='16748';
theSitetree.graphicsetId='12255';
theSitetree.contentColor='45792F';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Frugality',
				paletteFamily: 	'6FAE54',
				keyvisualId: 	'7682',
				keyvisualName: 	'kv_7682.jpg',
				fontsetId: 		'16748',
				graphicsetId: 	'12255',
				contentColor: 	'45792F',
				contentBGColor: 'FFFFFF',
				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['7060']=webappMappings['7060-61139378cc2b9e5bcea14e632723c15e']={
webappId:    '7060',
documentId:  '72801',
internalId:  '61139378cc2b9e5bcea14e632723c15e',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-5ee79a0534fe48dd3fdb064972b53f5e']={
webappId:    '7060',
documentId:  '75901',
internalId:  '5ee79a0534fe48dd3fdb064972b53f5e',
customField: 'language:de;country:CH;'
};
webappMappings['7050']=webappMappings['7050-55']={
webappId:    '7050',
documentId:  '79401',
internalId:  '55',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20100719-165248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1052',
internalId:  '',
customField: '20100712-141433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20080320-232401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1115',
internalId:  '',
customField: '20080519-151319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1073',
internalId:  '',
customField: '20100414-210617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20100712-141654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62801',
internalId:  '',
customField: '20100421-125729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1136',
internalId:  '',
customField: '20090527-082216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6322',
internalId:  '',
customField: '20100712-142302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5643',
internalId:  '',
customField: '20100414-210359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66101',
internalId:  '',
customField: '20090304-153311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5622',
internalId:  '',
customField: '20080316-123952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5664',
internalId:  '',
customField: '20080316-142009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6343',
internalId:  '',
customField: '20100712-142427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6364',
internalId:  '',
customField: '20080321-223033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6385',
internalId:  '',
customField: '20080317-104651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1157',
internalId:  '',
customField: '20080624-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68601',
internalId:  '',
customField: '20080528-142435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6406',
internalId:  '',
customField: '20100712-143214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6427',
internalId:  '',
customField: '20100719-165353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1178',
internalId:  '',
customField: '20080316-124200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1199',
internalId:  '',
customField: '20100720-093505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20100712-144153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20100414-205610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74601',
internalId:  '',
customField: '20100712-144623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1220',
internalId:  '',
customField: '20081109-181957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1241',
internalId:  '',
customField: '20090822-225130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75901',
internalId:  '',
customField: '20080805-112822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72801',
internalId:  '',
customField: '20080805-112902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79401',
internalId:  '',
customField: '20100106-220229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87201',
internalId:  '',
customField: '20100720-113035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88501',
internalId:  '',
customField: '20100712-160326'
};
webappMappings['7060']=webappMappings['7060-cf06fabe03774efb1e7db04944b80ea3']={
webappId:    '7060',
documentId:  '87201',
internalId:  'cf06fabe03774efb1e7db04944b80ea3',
customField: 'language:de;country:CH;'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3S8K';
var companyName   = 'English+At+Home';
var htmlTitle	  = '';
var metaKeywords  = 'Englischunterricht+Z%C3%BCrcher+Oberland++Englisch+in+Kleingruppen++++Englisch+privat+Englisch+nach+Mass++tailormade+lessons+in+English++English+tailormade++Spanisch+mit+Leidenschaft++Spanischunterricht+in+Kleingruppen+und+privat++Espa%C3%B1ol++';
var metaContents  = 'Sprachunterricht+Privatunterricht+Englischunterricht';
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();
};
