/* [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 theSitetree=[ 
	['PAGE','1284',jdecode('Willkommen'),jdecode(''),'/1284.html','true',[],''],
	['PAGE','61701',jdecode('Leistungs%C3%BCbersicht'),jdecode(''),'/61701.html','true',[],''],
	['PAGE','2008',jdecode('Systeme+%26+Prozesse'),jdecode(''),'/2008.html','true',[],''],
	['PAGE','14680',jdecode('Unternehmenskultur'),jdecode(''),'/14680.html','true',[],''],
	['PAGE','1476',jdecode('Medizinaltechnik'),jdecode(''),'/1476.html','true',[],''],
	['PAGE','50096',jdecode('Kunden+%2F+Mandate'),jdecode(''),'/50096.html','true',[],''],
	['PAGE','60301',jdecode('%C3%9Cber+uns'),jdecode(''),'/60301.html','true',[],''],
	['PAGE','62301',jdecode('Kontakt'),jdecode(''),'/62301.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Clean';
theSitetree.paletteFamily='B5B5B5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33270';
theSitetree.graphicsetId='14153';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				name: 			'Clean',
				paletteFamily: 	'B5B5B5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33270',
				graphicsetId: 	'14153',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'787878',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1284',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1284',
internalId:  '',
customField: '20091012-230355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50096',
internalId:  '',
customField: '20091012-234108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1476',
internalId:  '',
customField: '20091012-214521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2008',
internalId:  '',
customField: '20091012-214427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14680',
internalId:  '',
customField: '20091012-214501'
};
webappMappings['7008']=webappMappings['7008-7629']={
webappId:    '7008',
documentId:  '62301',
internalId:  '7629',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61701',
internalId:  '',
customField: '20091012-235320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62301',
internalId:  '',
customField: '20091012-225427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60301',
internalId:  '',
customField: '20091012-220304'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX2O8';
var companyName   = 'MH+LOG+Martin+Hochuli';
var htmlTitle	  = 'Unternehmerberater';
var metaKeywords  = 'Willkommen+bei+MH+LOG+Martin+Hochuli%2C+Ihrem+Unternehmerberater+Kreisprofil+weiche+Faktoren+harte+Faktoren+pragmatisch+unabh%C3%A4ngig+L%C3%B6sungsorientiert+nachhaltig+Langfristig+umsichtig+Perspektive+Unternehmenskultur+Kultur+Entwicklung+Weiterentwicklung+12+Stile+zw%C3%B6lf+Stile+Partner+Erfolgreich++ORGANISATIONSGESTALTUNG++MH+LOG++Martin+Hochuli+Sparringpartner+Zweitmeinung+Drittmeinung+Due+Dilligance+Wert+Signifikant+Unternehmensberatung+Human+Synergistics+Unternehmerberatung+Management+M%C3%BCnsingen+Unternehmensberater+5A+5A-Coach+5A-Kampagne+5A-Aktion+5A-Aktionen++Optimierung+Innovation+L%C3%B6sungsorientiert+Qualit%C3%A4tsmanagement+Managementsystem+Supply+Chain+Management+++ISO+9001++ISO+13485++Prozessmanagement+Prozessorientiert+Managementsysteme+Medizinaltechnik++Coaching++Einzelcoaching++Beratung+Projekte+Projektleitung+Analysen+Prozessverbesserungen+Prozessoptimierung+Kontinuierliche+Verbesserung++KVP+Weiterentwicklung++Erfolg+MepV+RL%2F93%2F42%2FEWG+ISO+14971+Medizinaltechnikindustrie';
var metaContents  = 'Willkommen+bei+MH+LOG+Martin+Hochuli%2C+Ihrem+Unternehmerberater+Kreisprofil+weiche+Faktoren+harte+Faktoren+pragmatisch+unabh%C3%A4ngig+L%C3%B6sungsorientiert+nachhaltig+Langfristig+umsichtig+Perspektive+Unternehmenskultur+Kultur+Entwicklung+Weiterentwicklung+12+Stile+zw%C3%B6lf+Stile+Partner+Erfolgreich++ORGANISATIONSGESTALTUNG++MH+LOG++Martin+Hochuli+Sparringpartner+Zweitmeinung+Drittmeinung+Due+Dilligance+Wert+Signifikant+Unternehmensberatung+Human+Synergistics+Unternehmerberatung+Management+M%C3%BCnsingen+Unternehmensberater+5A+5A-Coach+5A-Kampagne+5A-Aktion+5A-Aktionen++Optimierung+Innovation+L%C3%B6sungsorientiert+Qualit%C3%A4tsmanagement+Managementsystem+Supply+Chain+Management+++ISO+9001++ISO+13485++Prozessmanagement+Prozessorientiert+Managementsysteme+Medizinaltechnik++Coaching++Einzelcoaching++Beratung+Projekte+Projektleitung+Analysen+Prozessverbesserungen+Prozessoptimierung+Kontinuierliche+Verbesserung++KVP+Weiterentwicklung++Erfolg+MepV+RL%2F93%2F42%2FEWG+ISO+14971+Medizinaltechnikindustrie';
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();
};
