/* [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','4801',jdecode('Home'),jdecode(''), jdecode('%2F4801.html'), 'true',[],'',''],
	['PAGE','13601',jdecode('Team'),jdecode(''), jdecode('%2F13601.html'), 'true',[],'',''],
	['PAGE','13622',jdecode('Leitbild'),jdecode(''), jdecode('%2F13622.html'), 'true',[],'',''],
	['PAGE','13643',jdecode('News'),jdecode(''), jdecode('%2F13643.html'), 'true',[],'',''],
	['PAGE','15201',jdecode('Ausweise'),jdecode(''), jdecode('%2F15201.html'), 'true',[],'',''],
	['PAGE','14801',jdecode('Kategorien'),jdecode(''), jdecode('%2F14801%2Findex.html'), 'true',[ 
		['PAGE','13664',jdecode('Auto'),jdecode(''), jdecode('%2F14801%2F13664.html'), 'true',[],'',''],
		['PAGE','13685',jdecode('Motorrad'),jdecode(''), jdecode('%2F14801%2F13685.html'), 'true',[],'',''],
		['PAGE','13706',jdecode('Lastwagen'),jdecode(''), jdecode('%2F14801%2F13706.html'), 'true',[],'',''],
		['PAGE','21201',jdecode('Anh%C3%A4nger'),jdecode(''), jdecode('%2F14801%2F21201.html'), 'true',[],'',''],
		['PAGE','13727',jdecode('Car'),jdecode(''), jdecode('%2F14801%2F13727.html'), 'true',[],'',''],
		['PAGE','14822',jdecode('Taxi'),jdecode(''), jdecode('%2F14801%2F14822.html'), 'true',[],'',''],
		['PAGE','14843',jdecode('Notfallfahrzeuge'),jdecode(''), jdecode('%2F14801%2F14843.html'), 'true',[],'','']
	],'',''],
	['PAGE','14864',jdecode('CZV'),jdecode(''), jdecode('%2F14864%2Findex.html'), 'true',[ 
		['PAGE','14885',jdecode('CZV-Weiterbildung'),jdecode(''), jdecode('%2F14864%2F14885.html'), 'true',[],'',''],
		['ITEM','14906',jdecode('CZV-Ausbildung'),jdecode(''), jdecode('http%3A%2F%2Fwww.profi2drive.ch'), 'true',[],'','_blank']
	],'',''],
	['PAGE','15001',jdecode('Theorie'),jdecode(''), jdecode('%2F15001.html'), 'true',[ 
		['ITEM','15022',jdecode('Auto'),jdecode(''), jdecode('http%3A%2F%2Fwww.traffic-tool.ch%2Flogin%2Fdefault.asp%3Fschule%3D105'), 'true',[],'',''],
		['ITEM','15101',jdecode('LKW+-+CAR'),jdecode(''), jdecode('http%3A%2F%2Fwww.traffic-tool.ch%2Flogin%2Fdefault.asp%3Fschule%3D105'), 'true',[],'','']
	],'',''],
	['PAGE','15222',jdecode('Preise'),jdecode(''), jdecode('%2F15222.html'), 'true',[],'',''],
	['PAGE','15243',jdecode('Links'),jdecode(''), jdecode('%2F15243.html'), 'true',[],'',''],
	['PAGE','15901',jdecode('Anmeldeformular'),jdecode(''), jdecode('%2F15901.html'), 'true',[],'',''],
	['PAGE','30101',jdecode('Kontakt'),jdecode(''), jdecode('%2F30101.html'), 'true',[],'',''],
	['PAGE','15401',jdecode('Disclaimer'),jdecode(''), jdecode('%2F15401.html'), 'true',[],'',''],
	['PAGE','15422',jdecode('Q-Management'),jdecode(''), jdecode('%2F15422%2Findex.html'), 'true',[ 
		['PAGE','25601',jdecode('Managementprozess'),jdecode(''), jdecode('%2F15422%2F25601.html'), 'true',[],'',''],
		['PAGE','25622',jdecode('Kursangebot'),jdecode(''), jdecode('%2F15422%2F25622.html'), 'true',[],'',''],
		['PAGE','25643',jdecode('Kursdurchf%C3%BChrung'),jdecode(''), jdecode('%2F15422%2F25643.html'), 'true',[],'',''],
		['PAGE','25664',jdecode('Kundenzufriedenheit'),jdecode(''), jdecode('%2F15422%2F25664.html'), 'true',[],'',''],
		['PAGE','25685',jdecode('Infrastruktur'),jdecode(''), jdecode('%2F15422%2F25685.html'), 'true',[],'',''],
		['PAGE','25706',jdecode('Personal'),jdecode(''), jdecode('%2F15422%2F25706.html'), 'true',[],'',''],
		['PAGE','25727',jdecode('Dokumente'),jdecode(''), jdecode('%2F15422%2F25727.html'), 'true',[],'',''],
		['PAGE','37101',jdecode('Dokumentenliste'),jdecode(''), jdecode('%2F15422%2F37101.html'), 'true',[],'',''],
		['PAGE','40601',jdecode('Pendenzenliste'),jdecode(''), jdecode('%2F15422%2F40601.html'), 'true',[],'','']
	],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Kreis';
theSitetree.paletteFamily='4D4CD2';
theSitetree.keyvisualId='584';
theSitetree.keyvisualName='autoclub.jpg';
theSitetree.fontsetId='124';
theSitetree.graphicsetId='140';
theSitetree.contentColor='7794FB';
theSitetree.contentBGColor='000000';
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: 			'Kreis',
				paletteFamily: 	'4D4CD2',
				keyvisualId: 	'584',
				keyvisualName: 	'autoclub.jpg',
				fontsetId: 		'124',
				graphicsetId: 	'140',
				contentColor: 	'7794FB',
				contentBGColor: '000000',
				a_color: 		'4D4CD2',
				b_color: 		'7794F8',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20101208-201835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13706',
internalId:  '',
customField: '20101213-203354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20120102-004828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13622',
internalId:  '',
customField: '20101213-203057'
};
webappMappings['7008']=webappMappings['7008-11184']={
webappId:    '7008',
documentId:  '15901',
internalId:  '11184',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13643',
internalId:  '',
customField: '20120102-014329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20101207-205029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20110609-071640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13664',
internalId:  '',
customField: '20101213-203250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13685',
internalId:  '',
customField: '20101213-203318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15422',
internalId:  '',
customField: '20101210-111747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13727',
internalId:  '',
customField: '20101211-170855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20101213-203721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15222',
internalId:  '',
customField: '20110530-144054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15243',
internalId:  '',
customField: '20110609-071041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20101216-131248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25643',
internalId:  '',
customField: '20101212-164630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14885',
internalId:  '',
customField: '20120127-093357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20101213-200529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14864',
internalId:  '',
customField: '20120127-100511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25664',
internalId:  '',
customField: '20110707-065809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25685',
internalId:  '',
customField: '20101212-103613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25622',
internalId:  '',
customField: '20101210-145014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25727',
internalId:  '',
customField: '20101212-103735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20101212-164516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20120102-014740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14822',
internalId:  '',
customField: '20101213-203509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25706',
internalId:  '',
customField: '20101212-103649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14843',
internalId:  '',
customField: '20101213-203530'
};
webappMappings['7008']=webappMappings['7008-11192']={
webappId:    '7008',
documentId:  '30101',
internalId:  '11192',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20120102-014707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37101',
internalId:  '',
customField: '20101210-142539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20110707-070956'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INEAH9';
var companyName   = 'start2drive-fahrschule-+CZV-Weiterbildungsst%C3%A4tte';
var htmlTitle	  = 'start2drive-fahrschule+%2F+start2drive-CZV-Weiterbildungsst%C3%A4tte';
var metaKeywords  = 'Lastwagen+Anh%C3%A4nger+Gesellschaftswagen+LKW+Car+Auto+Fahrschule+Lastwagenfahrschule+Carfahrschule+Fritz+M%C3%BChlemann+Mollis+Einsiedeln+Glarus+N%C3%A4fels+T%C3%B6ff+Anh%C3%A4ngerfahrschule+Kat.C+Kat.+D+Kat+A+Kat.B+CZV+ARV1';
var metaContents  = 'Lastwagen+Anh%C3%A4nger+Gesellschaftswagen+LKW+Car+Auto+Fahrschule+Lastwagenfahrschule+Carfahrschule+Fritz+M%C3%BChlemann+Mollis+Einsiedeln+Glarus+N%C3%A4fels+T%C3%B6ff+Anh%C3%A4ngerfahrschule+Kat.+C+Kat.+D+Kat.+A+Kat.B+CZV+ARV1';
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();
};

