/* [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','1801',jdecode('Home'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','1852',jdecode('Konzept'),jdecode(''), jdecode('%2F1852.html'), 'true',[],'',''],
	['PAGE','1873',jdecode('Ihr+Nutzen'),jdecode(''), jdecode('%2F1873%2Findex.html'), 'true',[ 
		['PAGE','8301',jdecode('Ihr+Nutzen+als+Treuh%C3%A4nder'),jdecode(''), jdecode('%2F1873%2F8301.html'), 'true',[],'','']
	],'',''],
	['PAGE','1894',jdecode('Produkte'),jdecode(''), jdecode('%2F1894.html'), 'true',[],'',''],
	['PAGE','9001',jdecode('Preisbeispiele'),jdecode(''), jdecode('%2F9001%2Findex.html'), 'true',[ 
		['PAGE','9101',jdecode('Mini'),jdecode(''), jdecode('%2F9001%2F9101.html'), 'true',[],'',''],
		['PAGE','9122',jdecode('Midi'),jdecode(''), jdecode('%2F9001%2F9122.html'), 'true',[],'',''],
		['PAGE','9143',jdecode('Maxi'),jdecode(''), jdecode('%2F9001%2F9143.html'), 'true',[],'',''],
		['PAGE','9164',jdecode('Treuh%C3%A4nder'),jdecode(''), jdecode('%2F9001%2F9164.html'), 'true',[],'',''],
		['PAGE','12701',jdecode('Treuhand'),jdecode(''), jdecode('%2F9001%2F12701.html'), 'true',[],'','']
	],'',''],
	['PAGE','1915',jdecode('Kontakt'),jdecode(''), jdecode('%2F1915.html'), 'true',[],'',''],
	['PAGE','1936',jdecode('Adresse'),jdecode(''), jdecode('%2F1936.html'), 'true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='9241';
theSitetree.keyvisualName='kv3.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12763';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'660000',
				keyvisualId: 	'9241',
				keyvisualName: 	'kv3.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12763',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				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:  '1801',
internalId:  '',
customField: '20120120-125107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20120120-125216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20120120-125303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20111210-004418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20090926-003544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20100523-141532'
};
webappMappings['1501']=webappMappings['1501-25837989']={
webappId:    '1501',
documentId:  '1801',
internalId:  '25837989',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20111210-165526'
};
webappMappings['7008']=webappMappings['7008-1392']={
webappId:    '7008',
documentId:  '1915',
internalId:  '1392',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20111210-170843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20111210-162254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9122',
internalId:  '',
customField: '20111210-170014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9143',
internalId:  '',
customField: '20111210-170211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9164',
internalId:  '',
customField: '20111210-165322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20111210-171504'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHP340INV52P';
var companyName   = 'Internetbuchhaltung+DSIOFFICE';
var htmlTitle	  = 'DSIOFFICE+die+Internetbuchhaltung+f%C3%BCr+Jedermann%2C+Internetadministration+leicht+gemacht.+Online-Finanzbuchhaltung%2C+Finanzbuchhaltung+online%2C+Buchhaltung+online%2C+Online+Buchhaltung';
var metaKeywords  = 'Online-Buchhaltung%2C+Onlinebuchhaltung%2CFinanzbuchhaltung+online%2C+Online-Finanzbuchhaltung+seit+2006%2C+Online-Buchhaltung+seit+2006%2C+Internetbuchhaltung%2C+Internet-Buchhaltung%2CInternetadministration%2C+Internet-Administration%2C+Online-Buchhaltung%2C+Internettreuh%C3%A4nder%2C+Internet-Treuh%C3%A4nder%2CTreuhand%2C+Kloten%2C+Buchhaltung%2C+Informatik%2C+Beratung%2C+Programmierung%2C+Webdesign%2C+Webseiten%2C+Worldsoft+Webmaster%2C+Sanierung%2C+Administration%2C+Lohnbuchhaltung%2C+Liquidit%C3%A4tsplanung%2C+Budgetberatung%2C+Lebensberatung%2C+Kinderb%C3%BCcher%2C+Vorsorgeberatung%2C+Entwickler+Finanzsoftware%2C+Internet-Buchhaltung%2C+Online-Buchhaltung%2C+Online-Software%2C+Versicherungen%2C+Inkasso%2C+Glattbrugg%2C+R%C3%BCmlang%2C+Opfikon%2C+B%C3%BClach%2C+Regensdorf%2C+Z%C3%BCrich%2C+Wallisellen%2C+Dietlikon%2C+Regensdorf%2C+Bassersdorf%2C+Kt.+Z%C3%BCrich%2C+ZH%2C+Embrach%2C+Bachenb%C3%BClach%2C+Dielsdorf%2C+Kloten%2C+Informatik+Kloten%2C+Informatik+Glattbrugg%2C+Informatik+B%C3%BClach%2C+Buchhaltung+online+f%C3%BChren';
var metaContents  = 'Wir+stellen+unseren+Kunden+Software+aus+der+Steckdose+zu+einem+kaum+schlagbaren+Preis+zur+Verf%C3%BCgung+Machen+Sie+ihre+Buchhaltung+online.+Online-Buchhaltung+ab+CHF+30.00+im+Monat.+Online-Finanzbuchhaltung+ab+CHF+30.00+im+Monat.+Online+Buchhaltung+ohne+Update-Geb%C3%BChren.+Buchhaltung+online+ohne+Wartungsgeb%C3%BChren.+Mandantenf%C3%A4hige+Online+Buchhaltung+f%C3%BCr+Treuh%C3%A4nder.+Das+effiziente+und+preiswerte+Werkzeug+f%C3%BCr+Treuh%C3%A4nder.+Treuh%C3%A4nder+und+Kunden+Sparen+Zeit%2C+Geld+und+Nerven.+';
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();
};

