/* [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','101',jdecode('In+Memoriam'),jdecode(''),'/101.html','true',[],'',''],
	['PAGE','58101',jdecode('Introduction'),jdecode(''),'/58101.html','true',[],'',''],
	['PAGE','52001',jdecode('Waddington'),jdecode(''),'/52001/index.html','true',[ 
		['PAGE','102601',jdecode('A+R+Easton'),jdecode(''),'/52001/102601.html','true',[],'','']
	],'',''],
	['PAGE','182101',jdecode('Photo+album'),jdecode(''),'/182101.html','true',[],'',''],
	['PAGE','54401',jdecode('The+Lancaster'),jdecode(''),'/54401/index.html','true',[ 
		['PAGE','58701',jdecode('Statistics'),jdecode(''),'/54401/58701.html','true',[],'',''],
		['PAGE','75901',jdecode('ME453'),jdecode(''),'/54401/75901.html','true',[],'','']
	],'',''],
	['PAGE','69901',jdecode('An+RAFVR%26%23x27%3Bs+tale'),jdecode(''),'/69901/index.html','true',[ 
		['PAGE','171001',jdecode('RATG'),jdecode(''),'/69901/171001.html','true',[],'','']
	],'',''],
	['PAGE','4701',jdecode('Crew+members'),jdecode(''),'/4701.html','true',[],'',''],
	['PAGE','93201',jdecode('Training'),jdecode(''),'/93201/index.html','true',[ 
		['PAGE','93222',jdecode('Pilot'),jdecode(''),'/93201/93222.html','true',[],'',''],
		['PAGE','93243',jdecode('Flight+Eng'),jdecode(''),'/93201/93243.html','true',[],'',''],
		['PAGE','93264',jdecode('Navigator'),jdecode(''),'/93201/93264.html','true',[],'',''],
		['PAGE','93285',jdecode('Bomb+aimer'),jdecode(''),'/93201/93285.html','true',[],'',''],
		['PAGE','93306',jdecode('Wireless+Op'),jdecode(''),'/93201/93306.html','true',[],'',''],
		['PAGE','93327',jdecode('Gunner'),jdecode(''),'/93201/93327.html','true',[],'','']
	],'',''],
	['PAGE','67701',jdecode('OTU%2FHCU'),jdecode(''),'/67701.html','true',[],'',''],
	['PAGE','50201',jdecode('The+D-E+canal'),jdecode(''),'/50201.html','true',[],'',''],
	['PAGE','54422',jdecode('The+Nachtjagd'),jdecode(''),'/54422/index.html','true',[ 
		['PAGE','58722',jdecode('Heinz+Schnaufer'),jdecode(''),'/54422/58722.html','true',[],'',''],
		['PAGE','139601',jdecode('Nachtspook'),jdecode(''),'/54422/139601.html','true',[],'','']
	],'',''],
	['PAGE','75101',jdecode('ECM'),jdecode(''),'/75101.html','true',[],'',''],
	['PAGE','13401',jdecode('On+operations'),jdecode(''),'/13401/index.html','true',[ 
		['PAGE','110801',jdecode('3+March+45'),jdecode(''),'/13401/110801.html','true',[],'','']
	],'',''],
	['PAGE','60701',jdecode('ORBs'),jdecode(''),'/60701.html','true',[],'',''],
	['PAGE','100901',jdecode('Raid+Reports'),jdecode(''),'/100901.html','true',[],'',''],
	['PAGE','78601',jdecode('Casualty+Report'),jdecode(''),'/78601.html','true',[],'',''],
	['PAGE','54443',jdecode('The+Present'),jdecode(''),'/54443.html','true',[],'',''],
	['PAGE','92301',jdecode('Video'),jdecode(''),'/92301.html','true',[],'',''],
	['PAGE','117601',jdecode('Models'),jdecode(''),'/117601/index.html','true',[ 
		['PAGE','117622',jdecode('Avro+Lancaster'),jdecode(''),'/117601/117622.html','true',[],'',''],
		['PAGE','117643',jdecode('Avro+Anson'),jdecode(''),'/117601/117643.html','true',[],'',''],
		['PAGE','117664',jdecode('Bf110G4'),jdecode(''),'/117601/117664.html','true',[],'',''],
		['PAGE','129801',jdecode('DH+Tiger+Moth'),jdecode(''),'/117601/129801.html','true',[],'',''],
		['PAGE','144801',jdecode('Wellington+III'),jdecode(''),'/117601/144801.html','true',[],'','']
	],'',''],
	['PAGE','61201',jdecode('Acknowledgements'),jdecode(''),'/61201.html','true',[],'',''],
	['PAGE','61222',jdecode('Links'),jdecode(''),'/61222.html','true',[],'',''],
	['PAGE','87301',jdecode('Bibliography'),jdecode(''),'/87301.html','true',[],'',''],
	['PAGE','105201',jdecode('Update+log'),jdecode(''),'/105201.html','true',[],'',''],
	['PAGE','122001',jdecode('Guestbook'),jdecode(''),'/122001.html','true',[],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Maschine';
theSitetree.paletteFamily='C0BFBB';
theSitetree.keyvisualId='1904';
theSitetree.keyvisualName='architekt2.jpg';
theSitetree.fontsetId='321';
theSitetree.graphicsetId='373';
theSitetree.contentColor='90A3A7';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Maschine',
				paletteFamily: 	'C0BFBB',
				keyvisualId: 	'1904',
				keyvisualName: 	'architekt2.jpg',
				fontsetId: 		'321',
				graphicsetId: 	'373',
				contentColor: 	'90A3A7',
				contentBGColor: '000000',
				a_color: 		'474141',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101',
internalId:  '',
customField: '20100227-121351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20090828-002810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93201',
internalId:  '',
customField: '20081226-082329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67701',
internalId:  '',
customField: '20100110-123636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58101',
internalId:  '',
customField: '20090724-120855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52001',
internalId:  '',
customField: '20090511-131159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102601',
internalId:  '',
customField: '20090110-153800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54401',
internalId:  '',
customField: '20090304-201111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58701',
internalId:  '',
customField: '20081102-132925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75901',
internalId:  '',
customField: '20091129-112756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69901',
internalId:  '',
customField: '20090511-131632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93222',
internalId:  '',
customField: '20091130-132139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93243',
internalId:  '',
customField: '20090121-142545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93264',
internalId:  '',
customField: '20090206-033930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93285',
internalId:  '',
customField: '20081225-114249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93306',
internalId:  '',
customField: '20081225-114352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93327',
internalId:  '',
customField: '20081225-114451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50201',
internalId:  '',
customField: '20090401-073608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54422',
internalId:  '',
customField: '20081224-145340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58722',
internalId:  '',
customField: '20090228-141238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75101',
internalId:  '',
customField: '20090327-134925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20090720-143618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60701',
internalId:  '',
customField: '20081125-124922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100901',
internalId:  '',
customField: '20090117-124147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78601',
internalId:  '',
customField: '20081106-122710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54443',
internalId:  '',
customField: '20091107-135351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92301',
internalId:  '',
customField: '20090413-080243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61201',
internalId:  '',
customField: '20090318-074726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61222',
internalId:  '',
customField: '20100110-125036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87301',
internalId:  '',
customField: '20091027-135959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105201',
internalId:  '',
customField: '20100227-135310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110801',
internalId:  '',
customField: '20100128-144431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117601',
internalId:  '',
customField: '20090512-140508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117622',
internalId:  '',
customField: '20100228-075901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117643',
internalId:  '',
customField: '20090722-063554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117664',
internalId:  '',
customField: '20090815-141746'
};
webappMappings['1002']=webappMappings['1002-122001aen010in2qgy']={
webappId:    '1002',
documentId:  '122001',
internalId:  '122001aen010in2qgy',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122001',
internalId:  '',
customField: '20090327-141145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129801',
internalId:  '',
customField: '20091129-113832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139601',
internalId:  '',
customField: '20090429-143527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144801',
internalId:  '',
customField: '20090512-141117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171001',
internalId:  '',
customField: '20091028-104204'
};
webappMappings['7060']=webappMappings['7060-0d2648c4e7819ee4d14650a298d4a0b4']={
webappId:    '7060',
documentId:  '182101',
internalId:  '0d2648c4e7819ee4d14650a298d4a0b4',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182101',
internalId:  '',
customField: '20100227-132229'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010IN2QGY';
var companyName   = 'An+Ordinary+Crew';
var htmlTitle	  = 'An+Ordinary+Crew';
var metaKeywords  = 'Lancaster+bomber++Avro+Lancaster++463+squadron++467+squadron++Dortmund-Ems+canal++RAF+Waddington+Rowland+Ward++Max+Venton++Ronnie+Smith++Harry+Callaghan++Tom+Drennan++Colin+Terras++Bf110G4++Heinz+Schnaufer';
var metaContents  = 'A+history+of+an+ordinary+bomber+crew+in+1945+and+their+final+sortie.';
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();
};
