/* [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','1501',jdecode('Home'),jdecode(''), jdecode('%2F1501.html'), 'true',[],'',''],
	['PAGE','7422',jdecode('Einzelpersonen'),jdecode(''), jdecode('%2F7422.html'), 'true',[],'',''],
	['PAGE','7401',jdecode('Personalcoaching'),jdecode(''), jdecode('%2F7401.html'), 'true',[],'',''],
	['PAGE','25801',jdecode('Personalmanagement'),jdecode(''), jdecode('%2F25801.html'), 'true',[],'',''],
	['PAGE','7443',jdecode('Mein+Lebensweg'),jdecode(''), jdecode('%2F7443.html'), 'true',[],'',''],
	['PAGE','7464',jdecode('Kontakt'),jdecode(''), jdecode('%2F7464.html'), 'true',[],'',''],
	['PAGE','7485',jdecode('Downloads'),jdecode(''), jdecode('%2F7485.html'), 'true',[],'',''],
	['PAGE','18001',jdecode('Impressum'),jdecode(''), jdecode('%2F18001.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='C9DFEE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10432';
theSitetree.graphicsetId='10771';
theSitetree.contentColor='692643';
theSitetree.contentBGColor='F0F2F4';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Borders',
				paletteFamily: 	'C9DFEE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10432',
				graphicsetId: 	'10771',
				contentColor: 	'692643',
				contentBGColor: 'F0F2F4',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7443',
internalId:  '',
customField: '20110719-152315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20120106-083202'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20120106-092826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7422',
internalId:  '',
customField: '20120106-091229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7464',
internalId:  '',
customField: '20110905-164825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7485',
internalId:  '',
customField: '20120106-093736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20110324-180818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25801',
internalId:  '',
customField: '20120106-092903'
};
webappMappings['7008']=webappMappings['7008-2909']={
webappId:    '7008',
documentId:  '7464',
internalId:  '2909',
customField: 'language:de;country:CH;'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010IN2IH4';
var companyName   = 'Laufbahnplanung+Bildung+Konfliktl%C3%B6sung';
var htmlTitle	  = 'Rettig+Consulting';
var metaKeywords  = 'arbeitslos%2C+coaching%2C+Beratung%2C+Standortbestimmung%2C+Blockaden%2C+Google%2C+RAV%2C+seco%2C+Arbeitsam%2Ct+Rettig%2C+Huber%2C+Laufbahnberatung%2C+Personal%2C+Blockaden%2C+Biografie%2C+Kurs%2C+Bildung%2C+Perspektivenwechsel%2C+f%C3%BCnfzigplus%2C+schreiben%2C+Consulting%2C+Lohn%2C+Arbeitsvertrag%2C+Personalien%2C+Arbeitszeugnis%2C+Zeugnis%2C+50plus%2C+45+plus%2C+Alter%2C+pro+senectute%2C+Personalmanagement%2C+Stellensuche%2C+Mediation%2C+Konfliktmanagement%2C+Agnes+Huber-Rettig%2C++Human+Resource%2C+Rettich%2C+Rettung%2C+Hilfe%2C+Personalvermittlung%2C+Gesundheit%2C+Soziales%2C+50+plu%2Cs+60+plus%2C+45+plus%2C+Outplacement%2C+Mister+Schweiz%2C+Buchrain%2C+Ebikon%2C+Luzern%2C+Root%2C+Dierikon%2C+Rotkreuz%2C+Zug%2C+Kriens%2C+Emmen%2C+Alzheimer%2C+Jobs%2C+Jobsvermittlung%2C+Jobangebot%2C+Gesundheit%2C+Arbeit';
var metaContents  = 'ich+werde+arbeitslos%2C+wie+erstelle+ich+eine+Bewerbung%3F+Ich+m%C3%B6chte+meine+Stelle+wechseln%2C+welche+Perspektiven+habe+ich+mit+50+Jahren%3F+Wo+finde+ich+Hilfe+bei+Konflikten%3F+Hilfe%2C+ich+werde+gemobbt.+Krach+mit+dem+Chef.+Hilfe%21+Welche+Perspektiven+habe+ich+mit+60+plus%3F+Wir+m%C3%BCssen+Stellen+abbauen.+Wer+bietet+Outplacement+an%3F+Rat+bei+schwierigen+Mitarbeitern.+Arbeit+im+mittleren+Alter%2C+meine+Biografie+schreiben+lassen%2C+Mediator+gesucht%2C+Probleme+mit+Sozialversicherungen%2C+meine+Lebensgeschichte%2C+Kurs+in+Konfliktl%C3%B6sung';
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();
};

