/* [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','37912',jdecode('Online-Shop'),jdecode(''), jdecode('%2F37912.html'), 'true',[],'',''],
	['PAGE','34612',jdecode('Mieten+statt+kaufen'),jdecode(''), jdecode('%2F34612.html'), 'true',[],'',''],
	['PAGE','1552',jdecode('Gastro+-+Kassen'),jdecode(''), jdecode('%2F1552%2Findex.html'), 'true',[ 
		['PAGE','11212',jdecode('QTouch10'),jdecode(''), jdecode('%2F1552%2F11212.html'), 'true',[],'',''],
		['PAGE','11233',jdecode('QTouch15'),jdecode(''), jdecode('%2F1552%2F11233.html'), 'true',[],'',''],
		['PAGE','11112',jdecode('QTouch2'),jdecode(''), jdecode('%2F1552%2F11112.html'), 'true',[],'',''],
		['PAGE','22112',jdecode('INKA+415+Touch'),jdecode(''), jdecode('%2F1552%2F22112.html'), 'true',[],'',''],
		['PAGE','8933',jdecode('INKA+430+Touch'),jdecode(''), jdecode('%2F1552%2F8933.html'), 'true',[],'',''],
		['PAGE','15712',jdecode('INKA+440+Touch'),jdecode(''), jdecode('%2F1552%2F15712.html'), 'true',[],'',''],
		['PAGE','11275',jdecode('CR1240T'),jdecode(''), jdecode('%2F1552%2F11275.html'), 'true',[],'',''],
		['PAGE','11254',jdecode('Orderman+MAX2'),jdecode(''), jdecode('%2F1552%2F11254.html'), 'true',[],'','']
	],'',''],
	['PAGE','34012',jdecode('POS+Kasse'),jdecode(''), jdecode('%2F34012.html'), 'true',[],'',''],
	['PAGE','11012',jdecode('Handels+-+Kassen'),jdecode(''), jdecode('%2F11012%2Findex.html'), 'true',[ 
		['PAGE','8912',jdecode('QMP50'),jdecode(''), jdecode('%2F11012%2F8912.html'), 'true',[],'',''],
		['PAGE','11317',jdecode('CR1040'),jdecode(''), jdecode('%2F11012%2F11317.html'), 'true',[],'',''],
		['PAGE','20912',jdecode('Scanning+einfach'),jdecode(''), jdecode('%2F11012%2F20912.html'), 'true',[],'',''],
		['PAGE','11359',jdecode('SE-C2000'),jdecode(''), jdecode('%2F11012%2F11359.html'), 'true',[],'',''],
		['PAGE','11338',jdecode('SE-S2000'),jdecode(''), jdecode('%2F11012%2F11338.html'), 'true',[],'',''],
		['PAGE','21812',jdecode('QTouch2'),jdecode(''), jdecode('%2F11012%2F21812.html'), 'true',[],'','']
	],'',''],
	['PAGE','22733',jdecode('Z%C3%A4hlen+und+pr%C3%BCfen'),jdecode(''), jdecode('%2F22733%2Findex.html'), 'true',[ 
		['PAGE','22712',jdecode('M%C3%BCnzz%C3%A4hler'),jdecode(''), jdecode('%2F22733%2F22712.html'), 'true',[],'',''],
		['PAGE','22754',jdecode('Notenpr%C3%BCfer'),jdecode(''), jdecode('%2F22733%2F22754.html'), 'true',[],'','']
	],'',''],
	['PAGE','23912',jdecode('Bargeldlos+bezahlen'),jdecode(''), jdecode('%2F23912%2Findex.html'), 'true',[ 
		['PAGE','23933',jdecode('Optimum+Terminal'),jdecode(''), jdecode('%2F23912%2F23933.html'), 'true',[],'','']
	],'',''],
	['PAGE','11296',jdecode('Ger%C3%A4teanfrage'),jdecode(''), jdecode('%2F11296.html'), 'true',[],'',''],
	['PAGE','1594',jdecode('Kontakt'),jdecode(''), jdecode('%2F1594%2Findex.html'), 'true',[ 
		['PAGE','8954',jdecode('Unser+Standort'),jdecode(''), jdecode('%2F1594%2F8954.html'), 'true',[],'','']
	],'',''],
	['PAGE','1678',jdecode('Service'),jdecode(''), jdecode('%2F1678.html'), 'true',[],'',''],
	['PAGE','1615',jdecode('Die+Firma'),jdecode(''), jdecode('%2F1615.html'), 'true',[],'',''],
	['PAGE','21512',jdecode('AGB'),jdecode(''), jdecode('%2F21512.html'), 'true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Trend';
theSitetree.paletteFamily='3F70CF';
theSitetree.keyvisualId='7928';
theSitetree.keyvisualName='kv_7928.jpg';
theSitetree.fontsetId='16910';
theSitetree.graphicsetId='12323';
theSitetree.contentColor='163D88';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Trend',
				paletteFamily: 	'3F70CF',
				keyvisualId: 	'7928',
				keyvisualName: 	'kv_7928.jpg',
				fontsetId: 		'16910',
				graphicsetId: 	'12323',
				contentColor: 	'163D88',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20120213-154641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1552',
internalId:  '',
customField: '20110628-154832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34012',
internalId:  '',
customField: '20111208-164213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1594',
internalId:  '',
customField: '20110106-203318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1615',
internalId:  '',
customField: '20110109-212624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1678',
internalId:  '',
customField: '20110109-111010'
};
webappMappings['7008']=webappMappings['7008-11400']={
webappId:    '7008',
documentId:  '1594',
internalId:  '11400',
customField: 'language:de;country:CH;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '8954',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8912',
internalId:  '',
customField: '20120104-160629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8933',
internalId:  '',
customField: '20110331-082837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8954',
internalId:  '',
customField: '20110106-185951'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11012',
internalId:  '',
customField: '20110628-154937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11112',
internalId:  '',
customField: '20110331-082643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11296',
internalId:  '',
customField: '20111202-150446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11212',
internalId:  '',
customField: '20120104-160835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11233',
internalId:  '',
customField: '20110331-082704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11254',
internalId:  '',
customField: '20110331-082933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11275',
internalId:  '',
customField: '20110331-082904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11317',
internalId:  '',
customField: '20110331-083119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11338',
internalId:  '',
customField: '20110331-083222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11359',
internalId:  '',
customField: '20110331-083157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22733',
internalId:  '',
customField: '20110202-111950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22712',
internalId:  '',
customField: '20110308-091625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22112',
internalId:  '',
customField: '20110331-082742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21812',
internalId:  '',
customField: '20110331-083258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21512',
internalId:  '',
customField: '20110830-113438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34612',
internalId:  '',
customField: '20120120-170601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20912',
internalId:  '',
customField: '20110116-213336'
};
webappMappings['7008']=webappMappings['7008-13283']={
webappId:    '7008',
documentId:  '34012',
internalId:  '13283',
customField: 'language:de;country:CH;'
};
webappMappings['4001']=webappMappings['4001-33831416']={
webappId:    '4001',
documentId:  '37912',
internalId:  '33831416',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '37912',
internalId:  '-',
customField: '20120115-205230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15712',
internalId:  '',
customField: '20110331-082811'
};
webappMappings['7008']=webappMappings['7008-11413']={
webappId:    '7008',
documentId:  '11296',
internalId:  '11413',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-12705']={
webappId:    '7008',
documentId:  '34612',
internalId:  '12705',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22754',
internalId:  '',
customField: '20110207-210228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23912',
internalId:  '',
customField: '20110207-210502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23933',
internalId:  '',
customField: '20110207-212041'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW330INET7E';
var companyName   = 'ACOTEC+Kassensysteme';
var htmlTitle	  = 'Acotec+Kassensysteme';
var metaKeywords  = 'Acotec%2C+Kassen%2C+Kassensysteme%2C+Regisstrierkassen%2C+Kassa%2C+Orderman%2C+INKA%2C+Qorion%2C+Drucker%2C+QProg%2C+NCR%2C+Sanyo%2C+M%C3%BCnzz%C3%A4hler%2C+Geldz%C3%A4hler';
var metaContents  = 'ACOTEC+Kassensysteme+f%C3%BCr+Gastronomie%2C+Restaurant%2C+Hote%2C+Kantine%2C+Metzger%2C+Blumenladen%2C+G%C3%A4rtnerei%2C+Autohandel%2C+Garage%2C+Kiosk%2C+';
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();
};

