/* [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','4201',jdecode('Home'),jdecode(''),'/4201.html','true',[],'',''],
	['PAGE','22601',jdecode('English'),jdecode(''),'/22601.html','true',[],'',''],
	['PAGE','27512',jdecode('Mailing+Dezember'),jdecode(''),'/27512.html','false',[],'',''],
	['PAGE','4252',jdecode('Profil+G.+Bergantini'),jdecode(''),'/4252.html','true',[],'',''],
	['PAGE','14701',jdecode('Teilnehmerkommentare'),jdecode(''),'/14701.html','true',[],'',''],
	['PAGE','10601',jdecode('Aktuelle+Kurse'),jdecode(''),'/10601.html','true',[],'',''],
	['PAGE','13501',jdecode('VIP-Schulungen'),jdecode(''),'/13501.html','true',[],'',''],
	['PAGE','17501',jdecode('Standardschulungen'),jdecode(''),'/17501/index.html','true',[ 
		['PAGE','14301',jdecode('Word'),jdecode(''),'/17501/14301.html','true',[],'',''],
		['PAGE','15001',jdecode('Excel'),jdecode(''),'/17501/15001.html','true',[],'',''],
		['PAGE','16801',jdecode('PowerPoint'),jdecode(''),'/17501/16801.html','true',[],'',''],
		['PAGE','17701',jdecode('Outlook'),jdecode(''),'/17501/17701.html','true',[],'',''],
		['PAGE','10501',jdecode('Office+2007+Update'),jdecode(''),'/17501/10501.html','true',[],'',''],
		['PAGE','30123',jdecode('Office+2010+Update+%28neu%21%29'),jdecode(''),'/17501/30123.html','true',[],'',''],
		['PAGE','16401',jdecode('OneNote'),jdecode(''),'/17501/16401.html','true',[],'','']
	],'',''],
	['PAGE','18801',jdecode('Spezialtrainings'),jdecode(''),'/18801/index.html','true',[ 
		['PAGE','18401',jdecode('Access'),jdecode(''),'/18801/18401.html','true',[],'',''],
		['PAGE','33223',jdecode('SharePoint+2010'),jdecode(''),'/18801/33223.html','true',[],'',''],
		['PAGE','10622',jdecode('SharePoint+3.0+mit+MOSS+2007'),jdecode(''),'/18801/10622.html','true',[],'',''],
		['PAGE','16701',jdecode('MapPoint'),jdecode(''),'/18801/16701.html','true',[],'','']
	],'',''],
	['PAGE','26612',jdecode('WBTs'),jdecode(''),'/26612.html','true',[],'',''],
	['PAGE','36123',jdecode('officeatwork'),jdecode(''),'/36123.html','true',[],'',''],
	['PAGE','15801',jdecode('Hotline'),jdecode(''),'/15801.html','true',[],'',''],
	['PAGE','12801',jdecode('Preise'),jdecode(''),'/12801.html','true',[],'',''],
	['PAGE','22901',jdecode('Referenzen'),jdecode(''),'/22901.html','true',[],'',''],
	['PAGE','13001',jdecode('Impressum%2FKontakt'),jdecode(''),'/13001.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11062';
theSitetree.keyvisualName='kv_11062.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11062',
				keyvisualName: 	'kv_11062.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13786',
				contentColor: 	'000000',
				contentBGColor: '426388',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20110226-131841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4252',
internalId:  '',
customField: '20091013-165521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20100707-100126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20091012-103429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20100302-151706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10622',
internalId:  '',
customField: '20101210-114502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20100707-102303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20110226-123939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20091013-155219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20100111-154951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20091012-103600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20101210-143732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20091013-155819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16401',
internalId:  '',
customField: '20091013-155124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20091013-155402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20101210-144016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20100302-150835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20091009-165115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20100119-164928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20091012-112029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22901',
internalId:  '',
customField: '20110226-131557'
};
webappMappings['7008']=webappMappings['7008-5129']={
webappId:    '7008',
documentId:  '27512',
internalId:  '5129',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-4003']={
webappId:    '7008',
documentId:  '13001',
internalId:  '4003',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26612',
internalId:  '',
customField: '20110226-132551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27512',
internalId:  '',
customField: '20091216-110403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30123',
internalId:  '',
customField: '20101210-113317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33223',
internalId:  '',
customField: '20101210-142945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36123',
internalId:  '',
customField: '20110307-144424'
};
var canonHostname = 'wsc01.webland.ch';
var accountId     = 'AWB010IN2K7L';
var companyName   = 'BerCom+Training+GmbH';
var htmlTitle	  = 'www.computer-training.ch+Schulungen+und+Dienstleistungen+f%C3%BCr+MS+Office+und+SharePoint';
var metaKeywords  = 'Computerkurs%2C+Computerschulung%2C+Computertraining%2C+Computer-Kurs%2C+Computer-Schulung%2C+Computer-Training%2C+PC-Training%2C+PC-Schulung%2C+PC-Kurs%3B+Microsoft+Schulungen%2C+Microsoft+Trainings%2C+Microsoft+Office+Schulungen%2C+Microsoft+Office+Training';
var metaContents  = 'www.computer-training.ch+-+Computer-Schulungen%2C+die+Sie+weiterbringen.+Wir+sind+spezialisiert+auf+MS+Office+und+SharePoint.';
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();
};

