/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','6043',jdecode('Fahrzeuge'),jdecode(''),'/6043/index.html','true',[ 
		['PAGE','86101',jdecode('BMW+E36+von+Patrik'),jdecode(''),'/6043/86101.html','true',[],'',''],
		['PAGE','6001',jdecode('Honda+CRX+von+Jacqueline'),jdecode(''),'/6043/6001.html','true',[],'',''],
		['PAGE','6064',jdecode('Honda+CRX+von+Remo'),jdecode(''),'/6043/6064.html','true',[],'',''],
		['PAGE','6127',jdecode('Honda+CRX+von+Ursula'),jdecode(''),'/6043/6127.html','true',[],'',''],
		['PAGE','142455',jdecode('Mazda+323+von+Philipp'),jdecode(''),'/6043/142455.html','true',[],'',''],
		['PAGE','163355',jdecode('Mini+von+Patrik'),jdecode(''),'/6043/163355.html','true',[],'',''],
		['PAGE','2301',jdecode('Opel+Astra+von+Jacqueline'),jdecode(''),'/6043/2301.html','true',[],'',''],
		['PAGE','126555',jdecode('Opel+Astra+von+K%C3%B6bi'),jdecode(''),'/6043/126555.html','true',[],'',''],
		['PAGE','98001',jdecode('Opel+Calibra+von+Peter'),jdecode(''),'/6043/98001.html','true',[],'',''],
		['PAGE','6022',jdecode('Opel+Kadett+von+Jacqueline'),jdecode(''),'/6043/6022.html','true',[],'',''],
		['PAGE','8801',jdecode('Opel+Kadett+von+Jacqueline'),jdecode(''),'/6043/8801.html','true',[],'',''],
		['PAGE','127255',jdecode('Subaru+Impreza+von+Franz'),jdecode(''),'/6043/127255.html','true',[],'',''],
		['PAGE','2322',jdecode('Auszeichnungen'),jdecode(''),'/6043/2322.html','false',[],'',''],
		['PAGE','64201',jdecode('Interview'),jdecode(''),'/6043/64201.html','false',[],'',''],
		['PAGE','8201',jdecode('Jacqueline'),jdecode(''),'/6043/8201.html','false',[],'','']
	],'',''],
	['PAGE','124055',jdecode('Passivmitglieder'),jdecode(''),'/124055.html','true',[],'',''],
	['PAGE','112901',jdecode('Die+Umbauten'),jdecode(''),'/112901/index.html','false',[ 
		['PAGE','51001',jdecode('Umbau+Astra'),jdecode(''),'/112901/51001.html','true',[],'',''],
		['PAGE','78801',jdecode('Umbau+Calibra'),jdecode(''),'/112901/78801.html','true',[],'',''],
		['PAGE','78822',jdecode('Umbau+CRX+gelb'),jdecode(''),'/112901/78822.html','true',[],'',''],
		['PAGE','84801',jdecode('Umbau+Fiat'),jdecode(''),'/112901/84801.html','true',[],'','']
	],'',''],
	['PAGE','140755',jdecode('Suche'),jdecode(''),'/140755.html','true',[],'',''],
	['PAGE','89301',jdecode('Statuten'),jdecode(''),'/89301.html','true',[],'',''],
	['PAGE','111001',jdecode('Austritte'),jdecode(''),'/111001.html','true',[],'',''],
	['PAGE','9101',jdecode('Zu+verkaufen'),jdecode(''),'/9101.html','false',[],'',''],
	['PAGE','9122',jdecode('Fotogallery'),jdecode(''),'/9122.html','true',[],'',''],
	['PAGE','9901',jdecode('Links'),jdecode(''),'/9901.html','true',[],'',''],
	['PAGE','2385',jdecode('Kontakt'),jdecode(''),'/2385.html','true',[],'',''],
	['PAGE','164155',jdecode('Online+Shop'),jdecode(''),'/164155.html','true',[],'',''],
	['PAGE','36006',jdecode('G%C3%A4stebuch'),jdecode(''),'/36006/index.html','true',[ 
		['PAGE','36001',jdecode('Eintr%C3%A4ge'),jdecode(''),'/36006/36001.html','false',[],'','']
	],'',''],
	['PAGE','164855',jdecode('Forum'),jdecode(''),'/164855.html','true',[],'',''],
	['PAGE','161455',jdecode('Termine%2FEvents'),jdecode(''),'/161455.html','true',[],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='6683B6';
theSitetree.keyvisualId='2469';
theSitetree.keyvisualName='verkehr.jpg';
theSitetree.fontsetId='406';
theSitetree.graphicsetId='461';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Collage',
				paletteFamily: 	'6683B6',
				keyvisualId: 	'2469',
				keyvisualName: 	'verkehr.jpg',
				fontsetId: 		'406',
				graphicsetId: 	'461',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'6683B6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-36006ahopt0in3mdw']={
webappId:    '1002',
documentId:  '36006',
internalId:  '36006ahopt0in3mdw',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-428']={
webappId:    '7008',
documentId:  '2385',
internalId:  '428',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20110506-113538'
};
webappMappings['1501']=webappMappings['1501-10101581']={
webappId:    '1501',
documentId:  '301',
internalId:  '10101581',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89301',
internalId:  '',
customField: '20080318-193246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20100928-135931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20110410-101705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2322',
internalId:  '',
customField: '20110417-175740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64201',
internalId:  '',
customField: '20080606-085653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20110410-102104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6022',
internalId:  '',
customField: '20071121-220146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20080710-112350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98001',
internalId:  '',
customField: '20110417-182011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6043',
internalId:  '',
customField: '20070701-110327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6064',
internalId:  '',
customField: '20100722-103242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6127',
internalId:  '',
customField: '20110415-091625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86101',
internalId:  '',
customField: '20101228-104148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142455',
internalId:  '',
customField: '20091225-170350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127255',
internalId:  '',
customField: '20101228-110942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126555',
internalId:  '',
customField: '20090315-202922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124055',
internalId:  '',
customField: '20100419-164323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112901',
internalId:  '',
customField: '20080805-211647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51001',
internalId:  '',
customField: '20110417-174623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78801',
internalId:  '',
customField: '20110410-102411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78822',
internalId:  '',
customField: '20110410-102322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84801',
internalId:  '',
customField: '20080701-151153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111001',
internalId:  '',
customField: '20110410-102555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20110410-102524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9122',
internalId:  '',
customField: '20080422-231121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20090823-133852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164855',
internalId:  '',
customField: '20110415-213327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2385',
internalId:  '',
customField: '20110415-091548'
};
webappMappings['4001']=webappMappings['4001-24913076']={
webappId:    '4001',
documentId:  '164155',
internalId:  '24913076',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163355',
internalId:  '',
customField: '20110506-112504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36006',
internalId:  '',
customField: '20070628-091449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36001',
internalId:  '',
customField: '20070628-091449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161455',
internalId:  '',
customField: '20110414-105805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164155',
internalId:  '',
customField: '20110415-212430'
};
webappMappings['1003']=webappMappings['1003-ahopt0in3mdw12f5aa758b0']={
webappId:    '1003',
documentId:  '164855',
internalId:  'ahopt0in3mdw12f5aa758b0',
customField: 'de:CH'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '140755',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140755',
internalId:  '',
customField: '20090823-124246'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3MDW';
var companyName   = 'T+u+n+i+n+g+f+r+e+u+n+d+e++++S+u+i+s+s+e';
var htmlTitle	  = 'Tuningfreunde+Suisse';
var metaKeywords  = 'Blackastra+Tuning+Auto+Tuningtreffen+Autotuning+Tuningfreunde+Suisse+';
var metaContents  = 'Auto+Tuning+Tuningfreunde+Tuningclub';
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();
};

