/* [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','2501',jdecode('Home'),jdecode(''),'/2501.html','true',[],'',''],
	['PAGE','2552',jdecode('Events'),jdecode(''),'/2552/index.html','true',[ 
		['PAGE','67011',jdecode('Annual+Conference'),jdecode(''),'/2552/67011.html','true',[],'',''],
		['PAGE','12601',jdecode('Past+Events'),jdecode(''),'/2552/12601.html','true',[],'',''],
		['PAGE','33321',jdecode('Fall+Seminar'),jdecode(''),'/2552/33321.html','false',[],'',''],
		['PAGE','3201',jdecode('2009+AC'),jdecode(''),'/2552/3201.html','false',[],'',''],
		['PAGE','33621',jdecode('2010+MYC'),jdecode(''),'/2552/33621.html','false',[],'','']
	],'',''],
	['PAGE','2573',jdecode('About+APP'),jdecode(''),'/2573/index.html','true',[ 
		['PAGE','2594',jdecode('Port+Members'),jdecode(''),'/2573/2594.html','true',[],'',''],
		['PAGE','2615',jdecode('Associate+Members'),jdecode(''),'/2573/2615.html','true',[],'',''],
		['PAGE','2636',jdecode('Executive+Committee'),jdecode(''),'/2573/2636.html','true',[],'',''],
		['PAGE','14301',jdecode('APP+Staff'),jdecode(''),'/2573/14301.html','true',[],'',''],
		['PAGE','60811',jdecode('Bylaws'),jdecode(''),'/2573/60811.html','true',[],'',''],
		['PAGE','2699',jdecode('Past+Presidents'),jdecode(''),'/2573/2699.html','true',[],'',''],
		['PAGE','14322',jdecode('Life+Members'),jdecode(''),'/2573/14322.html','true',[],'','']
	],'',''],
	['PAGE','2720',jdecode('Join+APP'),jdecode(''),'/2720.html','true',[],'',''],
	['PAGE','2741',jdecode('News+%26+Information'),jdecode(''),'/2741/index.html','true',[ 
		['PAGE','2762',jdecode('Newsletter+Archives'),jdecode(''),'/2741/2762.html','true',[],'',''],
		['PAGE','2783',jdecode('Announcements'),jdecode(''),'/2741/2783.html','true',[],'','']
	],'',''],
	['PAGE','2804',jdecode('Links'),jdecode(''),'/2804.html','true',[],'',''],
	['PAGE','2657',jdecode('Contact+Us'),jdecode(''),'/2657.html','true',[],'',''],
	['PAGE','11801',jdecode('2010+AC+Registration'),jdecode(''),'/11801.html','false',[],'',''],
	['PAGE','17901',jdecode('2009+SFIS'),jdecode(''),'/17901.html','false',[],'',''],
	['PAGE','18301',jdecode('2009+AC+Companion'),jdecode(''),'/18301.html','false',[],'',''],
	['PAGE','102951',jdecode('2010+AC+Companions'),jdecode(''),'/102951.html','false',[],'',''],
	['PAGE','35249',jdecode('2009+Annual+Conference+Photos'),jdecode(''),'/35249.html','false',[],'',''],
	['PAGE','35270',jdecode('2009+Fall+FIS+Location'),jdecode(''),'/35270.html','false',[],'',''],
	['PAGE','39349',jdecode('Kim+Puzey+Article'),jdecode(''),'/39349.html','false',[],'',''],
	['PAGE','40858',jdecode('2009+AC+Presentations'),jdecode(''),'/40858.html','false',[],'',''],
	['PAGE','51786',jdecode('2009+FFIS+Photos'),jdecode(''),'/51786.html','false',[],'',''],
	['PAGE','113651',jdecode('2010+AC+Photos'),jdecode(''),'/113651.html','false',[],'',''],
	['PAGE','65111',jdecode('2010+MYC+Companions'),jdecode(''),'/65111.html','false',[],'',''],
	['PAGE','74311',jdecode('2010+MYC+Photos'),jdecode(''),'/74311.html','false',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='A6CBB5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10432';
theSitetree.graphicsetId='10774';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FEFEF8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Borders',
				paletteFamily: 	'A6CBB5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10432',
				graphicsetId: 	'10774',
				contentColor: 	'000000',
				contentBGColor: 'FEFEF8',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20100816-112655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2552',
internalId:  '',
customField: '20100609-115227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2573',
internalId:  '',
customField: '20090610-161140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20090928-143804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20090610-130137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2594',
internalId:  '',
customField: '20100816-113016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2615',
internalId:  '',
customField: '20100511-181424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2636',
internalId:  '',
customField: '20100816-125518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2657',
internalId:  '',
customField: '20090612-111008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102951',
internalId:  '',
customField: '20100611-173028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2699',
internalId:  '',
customField: '20091229-145120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2720',
internalId:  '',
customField: '20100512-190308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2741',
internalId:  '',
customField: '20091006-182537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2762',
internalId:  '',
customField: '20100628-123407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2783',
internalId:  '',
customField: '20090619-170733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2804',
internalId:  '',
customField: '20091012-165019'
};
webappMappings['7008']=webappMappings['7008-3608']={
webappId:    '7008',
documentId:  '11801',
internalId:  '3608',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20100611-183048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100414-160335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20091229-145321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20090612-145435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20090806-151042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33321',
internalId:  '',
customField: '20091112-172217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33621',
internalId:  '',
customField: '20100129-124618'
};
webappMappings['7060']=webappMappings['7060-ed1333785ce87aeb1c837b41c722beaa']={
webappId:    '7060',
documentId:  '35249',
internalId:  'ed1333785ce87aeb1c837b41c722beaa',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '35270',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35249',
internalId:  '',
customField: '20090909-170230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35270',
internalId:  '',
customField: '20090824-183522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39349',
internalId:  '',
customField: '20090914-181437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40858',
internalId:  '',
customField: '20090922-174810'
};
webappMappings['7060']=webappMappings['7060-87e8a714f9c81ad764ab4a645b4f1bfa']={
webappId:    '7060',
documentId:  '113651',
internalId:  '87e8a714f9c81ad764ab4a645b4f1bfa',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51786',
internalId:  '',
customField: '20091109-140700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60811',
internalId:  '',
customField: '20091229-145000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65111',
internalId:  '',
customField: '20100105-183713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67011',
internalId:  '',
customField: '20100809-145119'
};
webappMappings['7060']=webappMappings['7060-2997720b132e03790d80bbf36158d133']={
webappId:    '7060',
documentId:  '74311',
internalId:  '2997720b132e03790d80bbf36158d133',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74311',
internalId:  '',
customField: '20100125-161827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113651',
internalId:  '',
customField: '20100809-144410'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INLGJ4';
var companyName   = 'ASSOCIATION+OF+PACIFIC+PORTS';
var htmlTitle	  = 'Association+of+Pacific+Ports';
var metaKeywords  = '';
var metaContents  = 'Association+of+Pacific+Ports';
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();
};
