/* [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','10923',jdecode('Home'),jdecode(''),'/10923.html','true',[],'',''],
	['PAGE','10974',jdecode('Maritime+Boundaries'),jdecode(''),'/10974.html','true',[],'',''],
	['PAGE','11016',jdecode('Maritime+Ports'),jdecode(''),'/11016.html','true',[],'',''],
	['PAGE','11037',jdecode('Shorelines'),jdecode(''),'/11037.html','true',[],'',''],
	['PAGE','10995',jdecode('Maritime+Wrecks'),jdecode(''),'/10995.html','true',[],'',''],
	['PAGE','11058',jdecode('Maritime+Piracy'),jdecode(''),'/11058.html','true',[],'',''],
	['PAGE','13923',jdecode('Broadcast+Warnings'),jdecode(''),'/13923.html','true',[],'',''],
	['PAGE','24623',jdecode('Licensing'),jdecode(''),'/24623.html','true',[],'',''],
	['PAGE','22223',jdecode('Pricing'),jdecode(''),'/22223.html','true',[],'',''],
	['PAGE','18823',jdecode('Ordering'),jdecode(''),'/18823.html','true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='49';
theSitetree.graphicsetId='57';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easy',
				paletteFamily: 	'003366',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'49',
				graphicsetId: 	'57',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10923',
internalId:  '',
customField: '20100622-001114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10974',
internalId:  '',
customField: '20100624-191411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10995',
internalId:  '',
customField: '20100625-044143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11016',
internalId:  '',
customField: '20100625-044618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11037',
internalId:  '',
customField: '20100625-201010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11058',
internalId:  '',
customField: '20100625-043721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13923',
internalId:  '',
customField: '20100625-043741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18823',
internalId:  '',
customField: '20100624-194254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24623',
internalId:  '',
customField: '20100624-191621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22223',
internalId:  '',
customField: '20100624-191541'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '10923',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INZ64A';
var companyName   = 'Global+GIS+Data+Services';
var htmlTitle	  = 'Global+GIS+Data+Services+LLC';
var metaKeywords  = 'Global+GIS+Data+Services%2C++gmbd%2C+agreement%2C+article+76%2C+baseline%2C+boundaries%2C+boundaries%2C+limits%2C+boundary+delimitation%2C+boundary+determination%2C+maritime+claims%2C+maritime+boundaries%2C+boundary+dispute%2C+boundary%2C+boundary+agreement%2C+claim%2C+contiguous+zone%2C+continental+margin%2C+continental+shelf%2C+continental+shelf%2C+delimitation%2C+convention+on+law+of+the+sea%2C+economic+zone%2C+maritime+claim%2C+overlapping+claim%2C+littoral%2C+continental+margin%2C+equidistant+line%2C+median+line%2C+exclusive+economic+zone%2C+eez%2C+ts%2C+cz%2C+efz%2C+jdz%2C+joint+fishing+zone%2C+joint+development+zone%2C+fishing+boundaries%2C+fishing+zone%2C+global+martime+boundaries+database%2C+gmbd%2C+high+seas%2C+internal+waters%2C+international+boundaries%2C+international+law%2C+international+treaties%2C+juridical+continental+shelf%2C+jurisdictions%2C+law+of+the+sea+convention%2C+law+of+the+sea%2C+law+of+the+sea+treaty%2C+los%2C+maritime%2C+maritime+boundaries%2C+maritime+boundary+delimitation%2C+maritime+boundary+delineation+and+delimitation%2C+maritime+boundary%2C+maritime+conventions+and+treaties%2C+maritime+zone+boundary+generation%2C+boundary+agreement%2C+maritime+claim%2C+maritime+zones%2C+median+line%2C+ocean+boundaries%2C+ocean+law%2C+ocean+management%2C+sovereignty%2C+territorial+sea+limit%2C+territorial+sea%2C+territorial+sea+baseline%2C+treaty%2C+unclos%2C+united+nations+convention+on+law+of+the+sea%2C+water+boundaries%2C+marine+data%2C+exclusive+economic+zone%2C+eez%2C+contiguous+zone%2C+joint+development+zone%2C+++gmwd%2C+shipwreck%2C+ship+wreck%2C+wreck%2C+cargo%2C+salvage%2C+clipper+ship%2C+sailing%2C+marine+data%2C+shipping+land%2C+maritime+boundary%2C+maritime+boundaries%2C+maritime+wreck%2C+maritime+wrecks%2C+maritime+port%2C+maritime+ports%2C+shoreline%2C+shorelines%2C+broadcast+warning%2C+broadcast+warnings%2C+piracy%2C+anti-shipping%2C+anti+shipping%2C+marine+scientific+research%2C+marine+data%2C+global+gis%2C+global+gis+data%2C+bathymetry%2C+elevation%2C+dted%2C+dbdb%2C+++gmpd%2C+global+port%2C+maritime+port%2C+marine+port%2C+ship+port%2C+harbor%2C+shipping%2C+boat%2C++ship%2C+yachting%2C+ship+operations%2C+shipbuilding%2C+fishing%2C+seaports%2C+ports%2C+harbors%2C+maritime%2C+shipping%2C+seaports%2C+ports%2C+oceans%2C+sea%2C+international+trade%2C+custom+brokers%2C+intermodal%2C+cargo%2C+freight+forwarding%2C+freight%2C+customs%2C+terminals%2C+harbor%2C+shipyard%2C+shipbuilding%2C+dockage%2C+transportation%2C+travel%2C+ships%2C+drydock%2C+stevedoring%2C+marine%2C+construction%2C+seebee%2C+VTS%2C+container%2C+dredging%2C+tug%2C+tugboat%2C+mariner%2C+merchant+fleet%2C+fleet%2C+marine+engineering%2C+maritime+domain%2C+maritime+domain+awareness%2C+mda%2C+++gsd%2C+shoreline%2C+shore+line%2C+coastline%2C+coast+line%2C+world+vector+shoreline%2C+wvs%2C+coast%2C+nautical+chart%2C+navigation%2C+country%2C+countries%2C+ocean%2C+marine+data%2C+coast%2C+coastal%2C+wvs%2C+world+vector+shoreline%2C+shoreline%2C+shore+line%2C+coastline%2C+++GIS%2C+geographic%2C+geographical%2C+geographical+information+system%2C+shapefile%2C+arc%2Finfo%2C+esri%2C+mapinfo%2C+autocad%2C+arcview%2C+arcexplorer%2C+fme%2C+feature+manipulation+engine%2C+spatial+fishing%2C+shipping%2C+surveying%2C+maritime%2C+marine+data%2C+ocean%2C+ocean+data%2C+nga%2C+broadcast+warnings%2C+NOTOM%2C+notice+to+mariners';
var metaContents  = 'Global+GIS+Data+Services%2C+LLC+provides+ocean+environmental+GIS+databases+and+services+including+the+industry+standard+Global+Maritime+Boundaries+Database+%28GMBD%29.++The+GMBD+monitors+and+stores+the+claims+and+boundary+agreements+of+the+world%27s+coastal+nations+to+the+ocean+including+their+claims+to+a+territorial+sea%2C+contiguous+zone%2C+exclusive+economic+zone%2C+exclusive+fishing+zone%2C+and+a+continental+shelf+whether+or+not+they+are+in+accordance+with+the+UNCLOS.++The+GMBD+also+monitors+and+stores+joint+development+zones+and+overlapping+claims.';
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();
};

