/* [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 theSitetree=[ 
	['PAGE','14',jdecode('Home'),jdecode(''),'/14.html','true',[],''],
	['PAGE','53203',jdecode('Modellbahnhandel'),jdecode(''),'/53203/index.html','true',[ 
		['PAGE','49503',jdecode('Mein+%22Gesch%C3%A4ft%22'),jdecode(''),'/53203/49503.html','true',[],''],
		['PAGE','619',jdecode('Sortiment+%22Gleise+und+Zubeh%C3%B6r%22'),jdecode(''),'/53203/619.html','true',[],''],
		['PAGE','663',jdecode('Sortiment+%22Lokomotiven%22'),jdecode(''),'/53203/663.html','true',[],''],
		['PAGE','40703',jdecode('Sortiment+%22Waggons%22'),jdecode(''),'/53203/40703.html','true',[],''],
		['PAGE','46703',jdecode('Sortiment+%22Steuerger%C3%A4te%22'),jdecode(''),'/53203/46703.html','true',[],''],
		['PAGE','474',jdecode('Modellbahn-Ankauf'),jdecode(''),'/53203/474.html','true',[],'']
	],''],
	['PAGE','951',jdecode('Modellbahninformationen'),jdecode(''),'/951/index.html','true',[ 
		['PAGE','60403',jdecode('Tips+zur+Anschaffung'),jdecode(''),'/951/60403.html','true',[],''],
		['PAGE','4141',jdecode('Tips+zu+Einkaufsquellen'),jdecode(''),'/951/4141.html','true',[],''],
		['PAGE','2824',jdecode('Tips+zum+Anlagenbau'),jdecode(''),'/951/2824.html','true',[],''],
		['PAGE','62403',jdecode('Tips+zum+eBay-Verkauf'),jdecode(''),'/951/62403.html','true',[],''],
		['PAGE','3654',jdecode('Infos+zu+Motoren+und+Decoder'),jdecode(''),'/951/3654.html','true',[],''],
		['PAGE','61803',jdecode('Infos+zu+Steuerger%C3%A4ten'),jdecode(''),'/951/61803.html','true',[],''],
		['PAGE','1023',jdecode('Infos+zu+Gleisen'),jdecode(''),'/951/1023.html','true',[],''],
		['PAGE','960',jdecode('Infos+zu+Weichen'),jdecode(''),'/951/960.html','true',[],''],
		['PAGE','1032',jdecode('Infos+zu+Ersatzteilen+Gleise%2FWeichen'),jdecode(''),'/951/1032.html','true',[],''],
		['PAGE','4807',jdecode('Infos+zu+ICE+1+und+ICE+2'),jdecode(''),'/951/4807.html','true',[],'']
	],''],
	['PAGE','438',jdecode('Modellbahnaktivit%C3%A4ten'),jdecode(''),'/438/index.html','true',[ 
		['PAGE','429',jdecode('Die+ersten+Schritte+mit+M%C3%A4rklin'),jdecode(''),'/438/429.html','true',[],''],
		['PAGE','2070',jdecode('Anlagebau+2001%2F2002'),jdecode(''),'/438/2070.html','true',[],''],
		['PAGE','447',jdecode('Anlagenbau+2002%2F2003'),jdecode(''),'/438/447.html','true',[],''],
		['PAGE','2079',jdecode('Anlagenbau+2003%2F2004'),jdecode(''),'/438/2079.html','true',[],''],
		['PAGE','2088',jdecode('Aufbau+einer+Sammlung+ab+2006'),jdecode(''),'/438/2088.html','true',[],'']
	],''],
	['PAGE','54903',jdecode('Mountainbiking'),jdecode(''),'/54903/index.html','true',[ 
		['PAGE','55303',jdecode('Mountainbiken+in+K%C3%B6ln'),jdecode(''),'/54903/55303.html','true',[],''],
		['PAGE','55324',jdecode('Das+Wuppertal'),jdecode(''),'/54903/55324.html','true',[],''],
		['PAGE','55345',jdecode('Die+Dh%C3%BCnntalsperre'),jdecode(''),'/54903/55345.html','true',[],''],
		['PAGE','55366',jdecode('Das+Ahrtal'),jdecode(''),'/54903/55366.html','true',[],'']
	],''],
	['PAGE','57603',jdecode('Webpages'),jdecode(''),'/57603/index.html','true',[ 
		['PAGE','52303',jdecode('Freunde+und+Bekannte'),jdecode(''),'/57603/52303.html','true',[],''],
		['PAGE','57103',jdecode('Modellbau+-+Lieferanten'),jdecode(''),'/57603/57103.html','true',[],'']
	],''],
	['PAGE','1897',jdecode('G%C3%A4stebuch'),jdecode(''),'/1897/index.html','true',[ 
		['PAGE','1896',jdecode('Eintr%C3%A4ge'),jdecode(''),'/1897/1896.html','false',[],'']
	],''],
	['PAGE','2712',jdecode('Zu+meiner+Person'),jdecode(''),'/2712.html','true',[],''],
	['PAGE','885',jdecode('Anfahrt%2C+Wegbeschreibung'),jdecode(''),'/885.html','true',[],''],
	['PAGE','71',jdecode('Impressum%2C+Kontakt'),jdecode(''),'/71.html','true',[],'']];
var siteelementCount=38;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='5351C2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10894';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'DE'
};
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'5351C2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10894',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5351C2',
				e_color: 		'5351C2',
				f_color: 		'5351C2',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '885',
internalId:  'location',
customField: 'language:de;country:DE;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-1897anc010in273h']={
webappId:    '1002',
documentId:  '1897',
internalId:  '1897anc010in273h',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14',
internalId:  '',
customField: '20110316-193625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '619',
internalId:  '',
customField: '20110223-093015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '663',
internalId:  '',
customField: '20110305-085359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54903',
internalId:  '',
customField: '20090616-203738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55303',
internalId:  '',
customField: '20090611-070037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40703',
internalId:  '',
customField: '20110314-204606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55345',
internalId:  '',
customField: '20090629-211427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55324',
internalId:  '',
customField: '20090611-070722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46703',
internalId:  '',
customField: '20090601-061601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55366',
internalId:  '',
customField: '20090611-071540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '474',
internalId:  '',
customField: '20090702-072054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62403',
internalId:  '',
customField: '20090829-073824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61803',
internalId:  '',
customField: '20090728-210534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '951',
internalId:  '',
customField: '20090702-190054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3654',
internalId:  '',
customField: '20070406-091816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2824',
internalId:  '',
customField: '20070308-174329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1023',
internalId:  '',
customField: '20070319-171841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '960',
internalId:  '',
customField: '20070323-160102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1032',
internalId:  '',
customField: '20070617-110521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4141',
internalId:  '',
customField: '20090706-201232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4807',
internalId:  '',
customField: '20070708-181440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57103',
internalId:  '',
customField: '20090621-161204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53203',
internalId:  '',
customField: '20110316-193443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52303',
internalId:  '',
customField: '20090621-165419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '438',
internalId:  '',
customField: '20070307-224842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '429',
internalId:  '',
customField: '20070303-203448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2070',
internalId:  '',
customField: '20070303-203636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '447',
internalId:  '',
customField: '20070303-203753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2079',
internalId:  '',
customField: '20070302-231830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2088',
internalId:  '',
customField: '20070319-172038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49503',
internalId:  '',
customField: '20080720-191503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1897',
internalId:  '',
customField: '20070302-204620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1896',
internalId:  '',
customField: '20070302-204739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2712',
internalId:  '',
customField: '20070307-223343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '885',
internalId:  '',
customField: '20070302-204212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71',
internalId:  '',
customField: '20070227-200236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60403',
internalId:  '',
customField: '20090702-184056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57603',
internalId:  '',
customField: '20090621-170056'
};
var canonHostname = 'cm4all3.netcologne.de';
var accountId     = 'ANC010IN273H';
var companyName   = 'Escher+Modellbahner';
var htmlTitle	  = 'Escher+Modellbahner';
var metaKeywords  = 'M%EF%BF%BD';
var metaContents  = 'Homepage+Escher+Modellbahner++++Produkte+und+Leistungen+im+Zusamenhang+mit+dem+An-%2FVerkauf+von+gebrauchten+Modelleisenbahnen+mit+dem+Schwerpunkt+auf+das+C-Gleis+und+digitale+Lokomotiven';
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();
};

