/* [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','4529',jdecode('Home'),jdecode(''),'/4529/index.html','true',[ 
		['PAGE','14601',jdecode('Kontakt'),jdecode(''),'/4529/14601.html','true',[],'','']
	],'',''],
	['PAGE','53801',jdecode('Modellbau'),jdecode(''),'/53801/index.html','true',[ 
		['PAGE','54201',jdecode('RG65+Details'),jdecode(''),'/53801/54201.html','true',[],'',''],
		['PAGE','55101',jdecode('Fotos+RG65'),jdecode(''),'/53801/55101.html','true',[],'',''],
		['PAGE','54222',jdecode('IOM'),jdecode(''),'/53801/54222.html','true',[],'','']
	],'',''],
	['PAGE','16501',jdecode('Naher+Osten+2007'),jdecode(''),'/16501/index.html','true',[ 
		['PAGE','4586',jdecode('Maerz'),jdecode(''),'/16501/4586.html','true',[],'',''],
		['PAGE','16522',jdecode('April'),jdecode(''),'/16501/16522.html','true',[],'',''],
		['PAGE','22501',jdecode('Mai'),jdecode(''),'/16501/22501.html','true',[],'',''],
		['PAGE','25801',jdecode('Juni'),jdecode(''),'/16501/25801.html','true',[],'',''],
		['PAGE','25822',jdecode('Juli'),jdecode(''),'/16501/25822.html','true',[],'',''],
		['PAGE','32401',jdecode('August'),jdecode(''),'/16501/32401.html','true',[],'',''],
		['PAGE','36701',jdecode('September'),jdecode(''),'/16501/36701.html','true',[],'',''],
		['PAGE','39501',jdecode('Oktober'),jdecode(''),'/16501/39501.html','true',[],'',''],
		['PAGE','40801',jdecode('November'),jdecode(''),'/16501/40801.html','true',[],'',''],
		['PAGE','40822',jdecode('Dezember'),jdecode(''),'/16501/40822.html','true',[],'',''],
		['PAGE','45701',jdecode('Januar+08'),jdecode(''),'/16501/45701.html','true',[],'',''],
		['PAGE','45722',jdecode('Februar+08'),jdecode(''),'/16501/45722.html','true',[],'',''],
		['PAGE','45743',jdecode('Maerz+08'),jdecode(''),'/16501/45743.html','true',[],'','']
	],'',''],
	['PAGE','7101',jdecode('Fotos+Israel'),jdecode(''),'/7101.html','false',[],'',''],
	['PAGE','33901',jdecode('Fotos+Syrien'),jdecode(''),'/33901.html','false',[],'',''],
	['PAGE','48801',jdecode('Fotos+Indien'),jdecode(''),'/48801.html','false',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Analyzer';
theSitetree.paletteFamily='0F57A1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10557';
theSitetree.graphicsetId='10574';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Analyzer',
				paletteFamily: 	'0F57A1',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10557',
				graphicsetId: 	'10574',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-92e44a301a9eb7fb38d97677a676671d']={
webappId:    '7060',
documentId:  '7101',
internalId:  '92e44a301a9eb7fb38d97677a676671d',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4529',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-d8b36add8322cf1a30e9d4ef29329b50']={
webappId:    '7060',
documentId:  '33901',
internalId:  'd8b36add8322cf1a30e9d4ef29329b50',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-3516a871904d2dff18fd2cc9ab1b038e']={
webappId:    '7060',
documentId:  '48801',
internalId:  '3516a871904d2dff18fd2cc9ab1b038e',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4529',
internalId:  '',
customField: '20101104-135125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53801',
internalId:  '',
customField: '20101102-193901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20080929-205207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20070331-092305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4586',
internalId:  '',
customField: '20070331-092142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16522',
internalId:  '',
customField: '20070426-135637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20070529-173333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25801',
internalId:  '',
customField: '20070619-104721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25822',
internalId:  '',
customField: '20070711-110906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20070818-120023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20071003-090006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20071018-104810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20071127-085004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40822',
internalId:  '',
customField: '20071227-094014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45701',
internalId:  '',
customField: '20080116-155000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45722',
internalId:  '',
customField: '20080214-093418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45743',
internalId:  '',
customField: '20080305-124359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20070818-115631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20070818-115652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48801',
internalId:  '',
customField: '20080214-090712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54201',
internalId:  '',
customField: '20101104-135321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54222',
internalId:  '',
customField: '20101104-135229'
};
webappMappings['7060']=webappMappings['7060-7dacd93ca81aa89c3381f7d191296d3f']={
webappId:    '7060',
documentId:  '55101',
internalId:  '7dacd93ca81aa89c3381f7d191296d3f',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55101',
internalId:  '',
customField: '20110104-130712'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010INER5Z';
var companyName   = 'Willkommen+auf+redink.ch';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

