/* [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(''), jdecode('%2F2801.html'), 'true',[],'',''],
	['PAGE','2852',jdecode('Produkte'),jdecode(''), jdecode('%2F2852%2Findex.html'), 'true',[ 
		['PAGE','20001',jdecode('SageStart'),jdecode(''), jdecode('%2F2852%2F20001.html'), 'true',[],'',''],
		['PAGE','5101',jdecode('Sage50+%2F+Sesam'),jdecode(''), jdecode('%2F2852%2F5101.html'), 'true',[],'',''],
		['PAGE','48201',jdecode('Sage100'),jdecode(''), jdecode('%2F2852%2F48201.html'), 'true',[],'',''],
		['PAGE','48222',jdecode('Smaragd+Business+Software'),jdecode(''), jdecode('%2F2852%2F48222.html'), 'true',[],'',''],
		['PAGE','5122',jdecode('ArchiCAD+14'),jdecode(''), jdecode('%2F2852%2F5122.html'), 'true',[],'',''],
		['PAGE','7001',jdecode('ArchiCAD+StartEdition'),jdecode(''), jdecode('%2F2852%2F7001.html'), 'true',[],'',''],
		['PAGE','38201',jdecode('Neu+in+StartEdition+2009'),jdecode(''), jdecode('%2F2852%2F38201.html'), 'false',[],'',''],
		['PAGE','38801',jdecode('Systemvoraussetzungen+StartEdition'),jdecode(''), jdecode('%2F2852%2F38801.html'), 'false',[],'','']
	],'',''],
	['PAGE','66201',jdecode('NEWS'),jdecode(''), jdecode('%2F66201.html'), 'true',[],'',''],
	['PAGE','2873',jdecode('Unterlagen+bestellen'),jdecode(''), jdecode('%2F2873.html'), 'true',[],'',''],
	['PAGE','2894',jdecode('Service+%2F+Dienstleistungen'),jdecode(''), jdecode('%2F2894%2Findex.html'), 'true',[ 
		['PAGE','9801',jdecode('Schulung'),jdecode(''), jdecode('%2F2894%2F9801.html'), 'true',[],'',''],
		['PAGE','9822',jdecode('Support+%2F+Installation'),jdecode(''), jdecode('%2F2894%2F9822.html'), 'true',[],'',''],
		['PAGE','21801',jdecode('Tipps+%26+Tricks+zu+Sesam+SAGE50'),jdecode(''), jdecode('%2F2894%2F21801.html'), 'true',[],'',''],
		['PAGE','31301',jdecode('Buchhaltung+%2F+Lohnbuchhaltung'),jdecode(''), jdecode('%2F2894%2F31301.html'), 'true',[],'',''],
		['PAGE','63301',jdecode('NEWS'),jdecode(''), jdecode('%2F2894%2F63301.html'), 'false',[],'','']
	],'',''],
	['PAGE','32301',jdecode('Referenzen'),jdecode(''), jdecode('%2F32301%2Findex.html'), 'true',[ 
		['PAGE','32322',jdecode('Sesam+%2F+SAGE50+Referenzen'),jdecode(''), jdecode('%2F32301%2F32322.html'), 'true',[],'',''],
		['PAGE','53701',jdecode('Sage100+Referenzen'),jdecode(''), jdecode('%2F32301%2F53701.html'), 'true',[],'',''],
		['PAGE','53722',jdecode('Smaragd+Software+Referenzen'),jdecode(''), jdecode('%2F32301%2F53722.html'), 'true',[],'','']
	],'',''],
	['PAGE','25401',jdecode('Veranstaltungen'),jdecode(''), jdecode('%2F25401%2Findex.html'), 'true',[ 
		['PAGE','26501',jdecode('Sesam+SAGE+50+Kennenlernen'),jdecode(''), jdecode('%2F25401%2F26501.html'), 'true',[],'',''],
		['PAGE','26522',jdecode('Messen'),jdecode(''), jdecode('%2F25401%2F26522.html'), 'true',[],'','']
	],'',''],
	['PAGE','2915',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F2915%2Findex.html'), 'true',[ 
		['PAGE','2936',jdecode('So+finden+Sie+uns'),jdecode(''), jdecode('%2F2915%2F2936.html'), 'true',[],'',''],
		['PAGE','2957',jdecode('Unser+Team'),jdecode(''), jdecode('%2F2915%2F2957.html'), 'true',[],'',''],
		['PAGE','11601',jdecode('Schulungsraum'),jdecode(''), jdecode('%2F2915%2F11601.html'), 'true',[],'','']
	],'',''],
	['PAGE','2978',jdecode('Kontakt'),jdecode(''), jdecode('%2F2978.html'), 'true',[],'',''],
	['PAGE','4601',jdecode('Webshop'),jdecode(''), jdecode('%2F4601.html'), 'true',[],'',''],
	['PAGE','34901',jdecode('Branchenl%C3%B6sungen+%2F+Partner'),jdecode(''), jdecode('%2F34901%2Findex.html'), 'true',[ 
		['PAGE','34922',jdecode('Werbas+-+Werkstattl%C3%B6sung'),jdecode(''), jdecode('%2F34901%2F34922.html'), 'true',[],'',''],
		['PAGE','46001',jdecode('1solution+ag+-+Hardware%2FNetzwerke'),jdecode(''), jdecode('%2F34901%2F46001.html'), 'true',[],'','']
	],'',''],
	['PAGE','21822',jdecode('Ich+suche+nach...'),jdecode(''), jdecode('%2F21822.html'), 'true',[],'','']];
var siteelementCount=35;
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 prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
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: '20111103-174417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2873',
internalId:  '',
customField: '20100413-093920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20100927-165329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2915',
internalId:  '',
customField: '20100927-162611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2852',
internalId:  '',
customField: '20101122-164558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2936',
internalId:  '',
customField: '20100927-162809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2957',
internalId:  '',
customField: '20111103-172242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2978',
internalId:  '',
customField: '20100927-163931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20101123-093801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20111103-173911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20101227-151834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20101125-143105'
};
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: '20100927-165713'
};
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:  '66201',
internalId:  '',
customField: '20110617-153925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20101125-142559'
};
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: '20101122-164212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21822',
internalId:  '',
customField: '20090331-111629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20100927-161620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53701',
internalId:  '',
customField: '20100927-170017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26501',
internalId:  '',
customField: '20100927-161923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26522',
internalId:  '',
customField: '20111103-175230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31301',
internalId:  '',
customField: '20111103-174637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20100927-170120'
};
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: '20110116-174059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34922',
internalId:  '',
customField: '20090717-152052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38201',
internalId:  '',
customField: '20100927-154506'
};
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: '20101125-142638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48222',
internalId:  '',
customField: '20100902-180205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53722',
internalId:  '',
customField: '20100927-170017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63301',
internalId:  '',
customField: '20101215-141555'
};
webappMappings['7050']=webappMappings['7050-1969']={
webappId:    '7050',
documentId:  '66201',
internalId:  '1969',
customField: 'language:de;country:CH;'
};
webappMappings['4001']=webappMappings['4001-32241917']={
webappId:    '4001',
documentId:  '4601',
internalId:  '32241917',
customField: 'language:de;country:CH;'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
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+Sage50+Sage100+SageStart+Smaragd+Software+Gesamtl%C3%B6sung+Rechnungswesen+Auftragsabwicklung+';
var metaContents  = 'Wir+sind+Buchhaltungs-+und+Lohnbuchhaltungs%2C+Bussiness+Software+Loesungspartner.Beraten%2C+verkaufen%2C+installiere%2C+supporten+und+schulen+die+betriebswirtschaftliche+Business+Softwareloesung+fuer+KMUs+%3A+Sesam+%2F+Sage+50.+Desweiteren+fueren+wir+auch+Buchhaltungen+%26+Lohnbuchhaltungen+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();
};

