/* [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','9101',jdecode('Home'),jdecode(''),'/9101.html','true',[],'',''],
	['PAGE','14001',jdecode('Contact'),jdecode(''),'/14001.html','true',[],'',''],
	['PAGE','14022',jdecode('Join'),jdecode(''),'/14022.html','true',[],'',''],
	['PAGE','14043',jdecode('Flight+Report'),jdecode(''),'/14043.html','true',[],'',''],
	['PAGE','14085',jdecode('Operation+Specification'),jdecode(''),'/14085.html','true',[],'',''],
	['PAGE','17001',jdecode('Seniority+List'),jdecode(''),'/17001.html','true',[],'',''],
	['PAGE','51601',jdecode('Upgrade+Process'),jdecode(''),'/51601.html','true',[],'',''],
	['PAGE','33201',jdecode('Resources'),jdecode(''),'/33201.html','true',[],'',''],
	['PAGE','141723',jdecode('Alaska+Airlines'),jdecode(''),'/141723/index.html','true',[ 
		['PAGE','141744',jdecode('Alaska+Timetable'),jdecode(''),'/141723/141744.html','true',[],'',''],
		['PAGE','141765',jdecode('Alaska+Hangar'),jdecode(''),'/141723/141765.html','true',[],'','']
	],'',''],
	['PAGE','90301',jdecode('American+Airlines'),jdecode(''),'/90301/index.html','true',[ 
		['PAGE','90801',jdecode('AA+Timetables'),jdecode(''),'/90301/90801.html','true',[],'',''],
		['PAGE','90822',jdecode('AA+Hangar'),jdecode(''),'/90301/90822.html','true',[],'','']
	],'',''],
	['PAGE','137023',jdecode('BOAC'),jdecode(''),'/137023/index.html','true',[ 
		['PAGE','137044',jdecode('BOAC+Timetables'),jdecode(''),'/137023/137044.html','true',[],'',''],
		['PAGE','137065',jdecode('BOAC+Hangar'),jdecode(''),'/137023/137065.html','true',[],'','']
	],'',''],
	['PAGE','49301',jdecode('Capital+Airlines'),jdecode(''),'/49301/index.html','true',[ 
		['PAGE','49343',jdecode('Capital+Timetables'),jdecode(''),'/49301/49343.html','true',[],'',''],
		['PAGE','49322',jdecode('Capital+Hangar'),jdecode(''),'/49301/49322.html','true',[],'','']
	],'',''],
	['PAGE','130023',jdecode('Eastern+Shuttle'),jdecode(''),'/130023/index.html','true',[ 
		['PAGE','130044',jdecode('Timetable'),jdecode(''),'/130023/130044.html','true',[],'',''],
		['PAGE','130065',jdecode('Hangar'),jdecode(''),'/130023/130065.html','true',[],'','']
	],'',''],
	['PAGE','39401',jdecode('North+Central+Airlines'),jdecode(''),'/39401/index.html','true',[ 
		['PAGE','41301',jdecode('North+Central+Timetable'),jdecode(''),'/39401/41301.html','true',[],'',''],
		['PAGE','41601',jdecode('North+Central+Hangar'),jdecode(''),'/39401/41601.html','true',[],'','']
	],'',''],
	['PAGE','61501',jdecode('Northwest+Orient'),jdecode(''),'/61501/index.html','true',[ 
		['PAGE','61543',jdecode('NWOA+Timetables'),jdecode(''),'/61501/61543.html','true',[],'',''],
		['PAGE','61522',jdecode('NWOA+Hangar'),jdecode(''),'/61501/61522.html','true',[],'','']
	],'',''],
	['PAGE','61201',jdecode('PanAm+Jets'),jdecode(''),'/61201/index.html','true',[ 
		['PAGE','61243',jdecode('PanAm+Timetable'),jdecode(''),'/61201/61243.html','true',[],'',''],
		['PAGE','61222',jdecode('PanAm+Hangar'),jdecode(''),'/61201/61222.html','true',[],'','']
	],'',''],
	['PAGE','42801',jdecode('Piedmont+Airlines'),jdecode(''),'/42801/index.html','true',[ 
		['PAGE','15201',jdecode('Piedmont+Timetables'),jdecode(''),'/42801/15201.html','true',[],'',''],
		['PAGE','14064',jdecode('Piedmont+Hangar+A'),jdecode(''),'/42801/14064.html','true',[],'',''],
		['PAGE','31001',jdecode('Piedmont+Hangar+B'),jdecode(''),'/42801/31001.html','true',[],'','']
	],'',''],
	['PAGE','120812',jdecode('United'),jdecode(''),'/120812/index.html','true',[ 
		['PAGE','120833',jdecode('UAL+Timetable'),jdecode(''),'/120812/120833.html','true',[],'',''],
		['PAGE','120854',jdecode('UAL+Hangar'),jdecode(''),'/120812/120854.html','true',[],'','']
	],'',''],
	['PAGE','69201',jdecode('NC+ANG'),jdecode(''),'/69201.html','true',[],'',''],
	['PAGE','120112',jdecode('Pilot+Supply+Shop'),jdecode(''),'/120112.html','true',[],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10466';
theSitetree.graphicsetId='10916';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stars',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10466',
				graphicsetId: 	'10916',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20100831-111317'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '9101',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-24144345']={
webappId:    '1501',
documentId:  '9101',
internalId:  '24144345',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-22708']={
webappId:    '7008',
documentId:  '14022',
internalId:  '22708',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-22709']={
webappId:    '7008',
documentId:  '14043',
internalId:  '22709',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20091214-094053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20091214-094126'
};
webappMappings['7008']=webappMappings['7008-22710']={
webappId:    '7008',
documentId:  '14001',
internalId:  '22710',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20100524-105309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14064',
internalId:  '',
customField: '20091224-151835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14085',
internalId:  '',
customField: '20100524-114620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20091109-132359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33201',
internalId:  '',
customField: '20100101-082354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20091201-111620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20100902-151535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39401',
internalId:  '',
customField: '20091214-105105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20100514-140553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41601',
internalId:  '',
customField: '20100512-163153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49343',
internalId:  '',
customField: '20100512-160401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51601',
internalId:  '',
customField: '20100830-090453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20091214-102752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49301',
internalId:  '',
customField: '20091224-210056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49322',
internalId:  '',
customField: '20100517-123331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120112',
internalId:  '',
customField: '20100707-171732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120812',
internalId:  '',
customField: '20100710-155540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61201',
internalId:  '',
customField: '20100706-201508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61222',
internalId:  '',
customField: '20100706-201410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61243',
internalId:  '',
customField: '20100706-201434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61501',
internalId:  '',
customField: '20100704-162845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61522',
internalId:  '',
customField: '20100704-170811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61543',
internalId:  '',
customField: '20100704-171111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69201',
internalId:  '',
customField: '20100603-091102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90301',
internalId:  '',
customField: '20100521-142144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90801',
internalId:  '',
customField: '20100521-171316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90822',
internalId:  '',
customField: '20100521-165001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120833',
internalId:  '',
customField: '20100710-153115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120854',
internalId:  '',
customField: '20100710-155336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130023',
internalId:  '',
customField: '20100803-125728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130044',
internalId:  '',
customField: '20100803-140944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130065',
internalId:  '',
customField: '20100803-131451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137023',
internalId:  '',
customField: '20100830-092705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137044',
internalId:  '',
customField: '20100829-155423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137065',
internalId:  '',
customField: '20100829-151455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141723',
internalId:  '',
customField: '20100903-112812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141744',
internalId:  '',
customField: '20100903-113047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141765',
internalId:  '',
customField: '20100903-220450'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVOGQ';
var companyName   = 'HISTORIC+AIRLINE+GROUP';
var htmlTitle	  = 'Historic+Airline+Group';
var metaKeywords  = 'Piedmont+Virtual+Airlines+Airline+FS9+FS2004%0AClassic+airlines%0Aclassic+airliners%0Ahistorical+airlines%0APilot+Etiquette+';
var metaContents  = 'Piedmont+Virtual+Airlines+%28PVA%29';
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();
};
