/* [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','2801',jdecode('Home'),jdecode(''),'/2801.html','true',[],'',''],
	['PAGE','2852',jdecode('Produkte'),jdecode(''),'/2852/index.html','true',[ 
		['PAGE','5101',jdecode('Sage+50+%2F+Sesam'),jdecode(''),'/2852/5101.html','true',[],'',''],
		['PAGE','20001',jdecode('Sage+Start'),jdecode(''),'/2852/20001.html','true',[],'',''],
		['PAGE','48201',jdecode('Sage100'),jdecode(''),'/2852/48201.html','true',[],'',''],
		['PAGE','48222',jdecode('Smaragd+Business+Software'),jdecode(''),'/2852/48222.html','true',[],'',''],
		['PAGE','5122',jdecode('ArchiCAD+13'),jdecode(''),'/2852/5122.html','true',[],'',''],
		['PAGE','11901',jdecode('13+gute+Gr%C3%BCnde+f%C3%BCr+ArchiCAD+13'),jdecode(''),'/2852/11901.html','true',[],'',''],
		['PAGE','7001',jdecode('ArchiCAD+StartEdition'),jdecode(''),'/2852/7001.html','true',[],'',''],
		['PAGE','38201',jdecode('Neu+in+StartEdition+2009'),jdecode(''),'/2852/38201.html','true',[],'',''],
		['PAGE','38801',jdecode('Systemvoraussetzungen+StartEdition'),jdecode(''),'/2852/38801.html','true',[],'','']
	],'',''],
	['PAGE','2873',jdecode('Unterlagen+bestellen'),jdecode(''),'/2873.html','true',[],'',''],
	['PAGE','2894',jdecode('Service+%2F+Dienstleistungen'),jdecode(''),'/2894/index.html','true',[ 
		['PAGE','9801',jdecode('Schulung'),jdecode(''),'/2894/9801.html','true',[],'',''],
		['PAGE','9822',jdecode('Support+%2F+Installation'),jdecode(''),'/2894/9822.html','true',[],'',''],
		['PAGE','21801',jdecode('Tipps+%26+Tricks+zu+Sesam+SAGE50'),jdecode(''),'/2894/21801.html','true',[],'',''],
		['PAGE','31301',jdecode('Buchhaltung+%2F+Lohnbuchhaltung'),jdecode(''),'/2894/31301.html','true',[],'','']
	],'',''],
	['PAGE','32301',jdecode('Referenzen'),jdecode(''),'/32301/index.html','true',[ 
		['PAGE','32322',jdecode('Sesam+%2F+SAGE+50+Referenzen'),jdecode(''),'/32301/32322.html','true',[],'','']
	],'',''],
	['PAGE','25401',jdecode('Veranstaltungen'),jdecode(''),'/25401/index.html','true',[ 
		['PAGE','26501',jdecode('Sesam+SAGE+50+Kennenlernen'),jdecode(''),'/25401/26501.html','true',[],'',''],
		['PAGE','25501',jdecode('ArchiCAD+Kennenlernen'),jdecode(''),'/25401/25501.html','true',[],'',''],
		['PAGE','26522',jdecode('Messen'),jdecode(''),'/25401/26522.html','true',[],'','']
	],'',''],
	['PAGE','2915',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/2915/index.html','true',[ 
		['PAGE','2936',jdecode('So+finden+Sie+uns'),jdecode(''),'/2915/2936.html','true',[],'',''],
		['PAGE','2957',jdecode('Unser+Team'),jdecode(''),'/2915/2957.html','true',[],'',''],
		['PAGE','11601',jdecode('Schulungsraum'),jdecode(''),'/2915/11601.html','true',[],'','']
	],'',''],
	['PAGE','2978',jdecode('Kontakt'),jdecode(''),'/2978.html','true',[],'',''],
	['PAGE','4601',jdecode('Software+kaufen+-+Shop'),jdecode(''),'/4601.html','true',[],'',''],
	['PAGE','34901',jdecode('Branchenl%C3%B6sungen+%2F+Partner'),jdecode(''),'/34901/index.html','true',[ 
		['PAGE','34922',jdecode('Werbas+-+Werkstattl%C3%B6sung'),jdecode(''),'/34901/34922.html','true',[],'',''],
		['PAGE','46001',jdecode('1solution+ag+-+Hardware%2FNetzwerke'),jdecode(''),'/34901/46001.html','true',[],'','']
	],'',''],
	['PAGE','21822',jdecode('Ich+suche+nach...'),jdecode(''),'/21822.html','true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11156';
theSitetree.keyvisualName='kv_11156.jpg';
theSitetree.fontsetId='32065';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11156',
				keyvisualName: 	'kv_11156.jpg',
				fontsetId: 		'32065',
				graphicsetId: 	'13879',
				contentColor: 	'000000',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20100902-164955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2873',
internalId:  '',
customField: '20100413-093920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20100902-165047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2915',
internalId:  '',
customField: '20090511-120856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2852',
internalId:  '',
customField: '20100319-103854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2936',
internalId:  '',
customField: '20100819-120859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2957',
internalId:  '',
customField: '20100413-101547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2978',
internalId:  '',
customField: '20090625-134514'
};
webappMappings['4001']=webappMappings['4001-28810612']={
webappId:    '4001',
documentId:  '4601',
internalId:  '28810612',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20090312-093954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20090924-105350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20100319-114458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20090827-160439'
};
webappMappings['7008']=webappMappings['7008-3016']={
webappId:    '7008',
documentId:  '2873',
internalId:  '3016',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20091217-202011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9822',
internalId:  '',
customField: '20090511-120711'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20090506-164211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100319-113233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20090924-105121'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '21822',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20100413-175151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21822',
internalId:  '',
customField: '20090331-111629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20090511-120752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25501',
internalId:  '',
customField: '20100413-103234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26501',
internalId:  '',
customField: '20100413-102149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26522',
internalId:  '',
customField: '20100319-121053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31301',
internalId:  '',
customField: '20100902-181051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20090604-181407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32322',
internalId:  '',
customField: '20090812-185856'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '2936',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['1501']=webappMappings['1501-29265112']={
webappId:    '1501',
documentId:  '2801',
internalId:  '29265112',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34901',
internalId:  '',
customField: '20100413-101405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34922',
internalId:  '',
customField: '20090717-152052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38201',
internalId:  '',
customField: '20090827-161652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38801',
internalId:  '',
customField: '20090827-162446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20100413-100736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48201',
internalId:  '',
customField: '20100819-111313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48222',
internalId:  '',
customField: '20100902-180205'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW330INERNV';
var companyName   = 'ArchiDraft+International+Trading';
var htmlTitle	  = 'ArchiDraft+-++Ihr+Business+Software+Partner+f%C3%BCr+Buchhaltung%2C+Lohnbuchhaltung%2C+Auftrag+';
var metaKeywords  = 'sesam+software+kmu+betriebswirtschaftliche+softwareloesungen+archidraft+Sesam+SESAM+SAGE+Sage+business+software+finanzbuchhaltung+Lohnbuchhaltung+Betriebsbuchhaltung+SAGE+50+SAGE+Start+Sesam+Easy+ERP+Lohn+FIBU+BEBU';
var metaContents  = 'Wir+sind+Buchhaltungs-+und+Lohnbuchhaltungs%2C+Bussiness+Software+Loesungspartner.Beraten%2C+verkaufen%2C+installieren+und+supporten+die+betriebswirtschaftliche+Business+Softwareloesung+fuer+KMUs+%3A+Sesam+%2F+Sage+50.+Desweiteren+fueren+wir+auch+Buchhaltungen+fuer+KMU%27s+die+nicht+selber+buchen+m%C3%B6chten.';
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();
};
