/* [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','1284',jdecode('Home'),jdecode(''),'/1284/index.html','true',[ 
		['PAGE','159126',jdecode('Home+%28Form+followup+page%29'),jdecode(''),'/1284/159126.html','false',[],'',''],
		['PAGE','221483',jdecode('Rennliegerad+Baron'),jdecode(''),'/1284/221483.html','true',[],'',''],
		['PAGE','221492',jdecode('TDS-Rad+mit+BionX'),jdecode(''),'/1284/221492.html','true',[],'',''],
		['PAGE','203987',jdecode('Microcar+Break'),jdecode(''),'/1284/203987.html','true',[],'',''],
		['PAGE','217484',jdecode('Smart+mhd'),jdecode(''),'/1284/217484.html','true',[],'','']
	],'',''],
	['PAGE','223315',jdecode('Tourenberichte'),jdecode(''),'/223315.html','true',[],'',''],
	['PAGE','216739',jdecode('Kewetforum'),jdecode(''),'/216739.html','true',[],'',''],
	['PAGE','79576',jdecode('Informationen'),jdecode(''),'/79576.html','true',[],'',''],
	['PAGE','204470',jdecode('Archiv'),jdecode(''),'/204470/index.html','true',[ 
		['PAGE','56198',jdecode('Kewet+El+Jet+4'),jdecode(''),'/204470/56198.html','true',[],'',''],
		['PAGE','172226',jdecode('**+Rekuperation'),jdecode(''),'/204470/172226.html','true',[],'',''],
		['PAGE','134090',jdecode('Microcar+light'),jdecode(''),'/204470/134090.html','true',[],'',''],
		['PAGE','4826',jdecode('Cityel+3127'),jdecode(''),'/204470/4826.html','true',[],'',''],
		['PAGE','1395',jdecode('Twike+386'),jdecode(''),'/204470/1395.html','true',[],'','']
	],'',''],
	['PAGE','216796',jdecode('Fundgrube'),jdecode(''),'/216796.html','true',[],'',''],
	['PAGE','217813',jdecode('Vermischtes'),jdecode(''),'/217813.html','true',[],'',''],
	['PAGE','1988',jdecode('mein+G%C3%A4stebuch'),jdecode(''),'/1988/index.html','true',[ 
		['PAGE','1989',jdecode('G%C3%A4stebucheintr%C3%A4ge'),jdecode(''),'/1988/1989.html','false',[],'','']
	],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='C8C0A4';
theSitetree.keyvisualId='1685';
theSitetree.keyvisualName='abendstimmung.jpg';
theSitetree.fontsetId='282';
theSitetree.graphicsetId='347';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C8C0A4';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'C8C0A4',
				keyvisualId: 	'1685',
				keyvisualName: 	'abendstimmung.jpg',
				fontsetId: 		'282',
				graphicsetId: 	'347',
				contentColor: 	'000000',
				contentBGColor: 'C8C0A4',
				a_color: 		'C8C0A4',
				b_color: 		'5C5438',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1284',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159126',
internalId:  '',
customField: '20051113-213411'
};
webappMappings['1002']=webappMappings['1002-1988ABW0X0INX2O3']={
webappId:    '1002',
documentId:  '1988',
internalId:  '1988ABW0X0INX2O3',
customField: 'icq=false'
};
webappMappings['1003']=webappMappings['1003-abw0x0inx2o310c5df21422']={
webappId:    '1003',
documentId:  '216739',
internalId:  'abw0x0inx2o310c5df21422',
customField: 'de:CH:'
};
webappMappings['1009']=webappMappings['1009-6007067']={
webappId:    '1009',
documentId:  '159126',
internalId:  '6007067',
customField: 'isFollowupPage:true;documentId:1284;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221483',
internalId:  '',
customField: '20091130-201632'
};
webappMappings['7008']=webappMappings['7008-825']={
webappId:    '7008',
documentId:  '1284',
internalId:  '825',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79576',
internalId:  '',
customField: '20090817-201140'
};
webappMappings['7008']=webappMappings['7008-826']={
webappId:    '7008',
documentId:  '216796',
internalId:  '826',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1284',
internalId:  '',
customField: '20100105-185436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221492',
internalId:  '',
customField: '20081013-094854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '203987',
internalId:  '',
customField: '20090802-210217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217484',
internalId:  '',
customField: '20090617-104241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216739',
internalId:  '',
customField: '20081005-152339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204470',
internalId:  '',
customField: '20081005-152412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56198',
internalId:  '',
customField: '20081005-152437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '172226',
internalId:  '',
customField: '20081005-152457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134090',
internalId:  '',
customField: '20081005-152525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4826',
internalId:  '',
customField: '20081005-152549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1395',
internalId:  '',
customField: '20081005-152613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216796',
internalId:  '',
customField: '20100207-133327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217813',
internalId:  '',
customField: '20081025-114840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1988',
internalId:  '',
customField: '20090201-143729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1989',
internalId:  '',
customField: '20081108-202021'
};
webappMappings['1501']=webappMappings['1501-1205512']={
webappId:    '1501',
documentId:  '1284',
internalId:  '1205512',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223315',
internalId:  '',
customField: '20100103-192736'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INX2O3';
var companyName   = 'Alternativmobile';
var htmlTitle	  = 'Alternativmobile+im+Alltagsgebrauch+oder+als+Zweitverkehrsmittel';
var metaKeywords  = 'Felix%2C+Felice%2C+Alternativmobile%2C+Cityel%2C+Twike%2C+Kewet%2C+Batterie%2C+Fahrzeug%2C+Mobil%2C+Elektroantrieb%2C+Elektromobil%2C+Pedalantrieb%2C+Fortbewegungsmittel%2C+El+Jet%2C+Eljet%2C+eljet%2C+Kewetforum%2C+Forum%2C+J%C3%A4ger%2C+Jaeger%2C+Kleinmobile%2C+Micromobile%2C+Fahrrad%2C+Liegerad%2C+Speadrad%2C+Baron%2C+Streamer%2C+Verschalung%2C+Heckverschalung%2C+Kurzlieger%2C+Hilfsantrieb%2C+Microcar%2C+Microcar+light%2C+NiCd%2C+Saft%2C+Occasion%2C+Verkauf%2C+Artikel%2C+Wartung%2C+Reparatur%2C+Bionx%2C+Sigma%2C+';
var metaContents  = 'Willkommen+bei+Fahrzeuge+mit+Alternativantrieb+von+Felix+Jaeger.';
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();
};
