/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','102901',jdecode('Warum+DH-Software+'),jdecode(''), jdecode('%2F102901.html'), 'true',[],'',''],
	['PAGE','452',jdecode('Software+Produkte'),jdecode(''), jdecode('%2F452%2Findex.html'), 'true',[ 
		['PAGE','473',jdecode('DH-Debi'),jdecode(''), jdecode('%2F452%2F473.html'), 'true',[],'',''],
		['PAGE','5301',jdecode('DH-Kredi'),jdecode(''), jdecode('%2F452%2F5301.html'), 'true',[],'',''],
		['PAGE','5322',jdecode('DH-Fibu'),jdecode(''), jdecode('%2F452%2F5322.html'), 'true',[],'',''],
		['PAGE','5801',jdecode('DH-POS'),jdecode(''), jdecode('%2F452%2F5801.html'), 'true',[],'',''],
		['PAGE','494',jdecode('DH-Shop'),jdecode(''), jdecode('%2F452%2F494.html'), 'true',[],'',''],
		['PAGE','15901',jdecode('DH-Kterm'),jdecode(''), jdecode('%2F452%2F15901.html'), 'true',[],'',''],
		['PAGE','9301',jdecode('Individual+Software'),jdecode(''), jdecode('%2F452%2F9301.html'), 'true',[],'','']
	],'',''],
	['PAGE','98701',jdecode('Programm+Bilder'),jdecode(''), jdecode('%2F98701%2Findex.html'), 'true',[ 
		['PAGE','99501',jdecode('DH-Debi'),jdecode(''), jdecode('%2F98701%2F99501.html'), 'true',[],'',''],
		['PAGE','99522',jdecode('DH-Kredi'),jdecode(''), jdecode('%2F98701%2F99522.html'), 'true',[],'',''],
		['PAGE','99543',jdecode('DH-Fibu'),jdecode(''), jdecode('%2F98701%2F99543.html'), 'true',[],'',''],
		['PAGE','99564',jdecode('DH-POS'),jdecode(''), jdecode('%2F98701%2F99564.html'), 'true',[],'','']
	],'',''],
	['PAGE','124301',jdecode('Prog.-Beschreibung'),jdecode(''), jdecode('%2F124301.html'), 'true',[],'',''],
	['PAGE','8601',jdecode('Kassen+Produkte'),jdecode(''), jdecode('%2F8601.html'), 'true',[],'',''],
	['PAGE','124901',jdecode('Zahlterminals'),jdecode(''), jdecode('%2F124901.html'), 'true',[],'',''],
	['PAGE','14201',jdecode('Preisliste'),jdecode(''), jdecode('%2F14201.html'), 'true',[],'',''],
	['PAGE','101622',jdecode('Muster+Offerte'),jdecode(''), jdecode('%2F101622.html'), 'true',[],'',''],
	['PAGE','15101',jdecode('Schulung'),jdecode(''), jdecode('%2F15101.html'), 'true',[],'',''],
	['PAGE','101601',jdecode('Neu+in+DH-2020'),jdecode(''), jdecode('%2F101601.html'), 'true',[],'',''],
	['PAGE','8622',jdecode('Software+Download'),jdecode(''), jdecode('%2F8622.html'), 'true',[],'',''],
	['PAGE','8643',jdecode('Shop'),jdecode(''), jdecode('%2F8643.html'), 'true',[],'',''],
	['PAGE','120601',jdecode('Empfohlene+Shop%26%23x27%3Bs'),jdecode(''), jdecode('%2F120601.html'), 'true',[],'',''],
	['PAGE','107501',jdecode('Link%26%23x27%3Bs'),jdecode(''), jdecode('%2F107501.html'), 'true',[],'',''],
	['PAGE','515',jdecode('Kontakt'),jdecode(''), jdecode('%2F515%2Findex.html'), 'true',[ 
		['PAGE','10501',jdecode('Anfahrt'),jdecode(''), jdecode('%2F515%2F10501.html'), 'true',[],'','']
	],'',''],
	['PAGE','536',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F536.html'), 'true',[],'',''],
	['PAGE','599',jdecode('Rechtliches'),jdecode(''), jdecode('%2F599.html'), 'true',[],'',''],
	['PAGE','17301',jdecode('Partner-Firmen'),jdecode(''), jdecode('%2F17301.html'), 'true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Money';
theSitetree.paletteFamily='144240';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='148';
theSitetree.graphicsetId='164';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Money',
				paletteFamily: 	'144240',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'148',
				graphicsetId: 	'164',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'144240',
				b_color: 		'0D111D',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-507']={
webappId:    '7008',
documentId:  '515',
internalId:  '507',
customField: 'language:de;country:CH;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '10501',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20110923-141424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102901',
internalId:  '',
customField: '20070816-134237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20110912-183601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20070816-135331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20070813-193819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20070813-193836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20080408-102245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20070814-124537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20080408-102426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20080408-102635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101601',
internalId:  '',
customField: '20110912-200635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20101112-125837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98701',
internalId:  '',
customField: '20070814-165912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99501',
internalId:  '',
customField: '20070814-174520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99522',
internalId:  '',
customField: '20070814-165815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99543',
internalId:  '',
customField: '20070814-165815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99564',
internalId:  '',
customField: '20070814-174548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20111220-111650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101622',
internalId:  '',
customField: '20111220-111748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20070814-131501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8622',
internalId:  '',
customField: '20110901-193529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8643',
internalId:  '',
customField: '20101112-130803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107501',
internalId:  '',
customField: '20101115-101459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100813-162908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20100513-083218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20070813-194313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20070814-180219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20091015-095626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120601',
internalId:  '',
customField: '20111220-111456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124301',
internalId:  '',
customField: '20091015-093648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124901',
internalId:  '',
customField: '20091015-095441'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2ZJM';
var companyName   = 'DH-Soft';
var htmlTitle	  = 'Kassensoftware+%28+POS+%29+%2F+PC+Kassen-Software+%2F+DH-2020';
var metaKeywords  = 'PC%3B+Kassen-Software%3BKasse%3BKassen%3BPoint+of+Sale%2CSale%3BKassenprogramm%3B++Kassen-Programm%3BPC-Kasse%3BPC%3BKassensoftware%3BKassensystem%3B+Kasse%3BRegistrierkasse%3BPoint%3BSale%3BStrichcode%3B++EAN-Code%3BRegister%3BDebitoren%2CKreditoren%3BFibu%3BFinanzbuchhaltung%3BSoftware%3B++Kredi%3BDebi%3BShop%3BInternet-Shop%3BInternetshop%2CFrei+J%EF%BF%BD';
var metaContents  = 'Kassensoftware+%3BKassen-Sofware%3BKasse%3BDetailhandel%3BPOS%3BKassen-Systeme';
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();
};

