/* [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','1801',jdecode('Home'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','116934',jdecode('Upcoming+Events'),jdecode(''), jdecode('%2F116934.html'), 'true',[],'',''],
	['PAGE','1957',jdecode('Contact+Us'),jdecode(''), jdecode('%2F1957%2Findex.html'), 'true',[ 
		['PAGE','1978',jdecode('Our+team'),jdecode(''), jdecode('%2F1957%2F1978.html'), 'true',[],'',''],
		['PAGE','1999',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F1957%2F1999.html'), 'true',[],'',''],
		['PAGE','96201',jdecode('Brad+Fedders'),jdecode(''), jdecode('%2F1957%2F96201.html'), 'false',[],'','']
	],'',''],
	['PAGE','84101',jdecode('FTP++Site+Link'),jdecode(''), jdecode('%2F84101.html'), 'true',[],'',''],
	['PAGE','111534',jdecode(''),jdecode(''), jdecode('%2F111534.html'), 'true',[],'',''],
	['PAGE','1894',jdecode('Services'),jdecode(''), jdecode('%2F1894.html'), 'true',[],'',''],
	['PAGE','63901',jdecode('Construction+Stakeout'),jdecode(''), jdecode('%2F63901%2Findex.html'), 'true',[ 
		['PAGE','60501',jdecode('Walter+P.+Chrysler+Historical+Museum'),jdecode(''), jdecode('%2F63901%2F60501.html'), 'true',[],'',''],
		['PAGE','59901',jdecode('Pinnacle+Race+Course'),jdecode(''), jdecode('%2F63901%2F59901.html'), 'true',[],'',''],
		['PAGE','60801',jdecode('Tabernacle+Missionary+Baptist+Church'),jdecode(''), jdecode('%2F63901%2F60801.html'), 'true',[],'','']
	],'',''],
	['PAGE','65401',jdecode('Foundation+Layout'),jdecode(''), jdecode('%2F65401%2Findex.html'), 'true',[ 
		['PAGE','58501',jdecode('General+Motors+-+VEC'),jdecode(''), jdecode('%2F65401%2F58501.html'), 'true',[],'','']
	],'',''],
	['PAGE','63501',jdecode('Anchor+Bolt+Installation'),jdecode(''), jdecode('%2F63501%2Findex.html'), 'true',[ 
		['PAGE','66501',jdecode('General+Motors+-+Grand+Rapids'),jdecode(''), jdecode('%2F63501%2F66501.html'), 'true',[],'',''],
		['PAGE','87501',jdecode('General+Moters+-+Powertrain'),jdecode(''), jdecode('%2F63501%2F87501.html'), 'true',[],'',''],
		['PAGE','113034',jdecode('General+Motors+-+Marion%2C+IN'),jdecode(''), jdecode('%2F63501%2F113034.html'), 'true',[],'','']
	],'',''],
	['PAGE','77101',jdecode('Setting+Leveling+Nuts'),jdecode(''), jdecode('%2F77101.html'), 'true',[],'',''],
	['PAGE','10401',jdecode('Anchor+Bolt+Surveys'),jdecode(''), jdecode('%2F10401%2Findex.html'), 'true',[ 
		['PAGE','62501',jdecode('MGM+Grand+Detroit+Casino'),jdecode(''), jdecode('%2F10401%2F62501.html'), 'true',[],'',''],
		['PAGE','47601',jdecode('Comerica+Park'),jdecode(''), jdecode('%2F10401%2F47601.html'), 'true',[],'',''],
		['PAGE','62001',jdecode('National+Alabama+Railcar+Facility'),jdecode(''), jdecode('%2F10401%2F62001.html'), 'true',[],'',''],
		['PAGE','93901',jdecode('Chrysler+Technical+Center'),jdecode(''), jdecode('%2F10401%2F93901.html'), 'true',[],'',''],
		['PAGE','94301',jdecode('Chrsysler+Jefferson+North+Assembly'),jdecode(''), jdecode('%2F10401%2F94301.html'), 'true',[],'','']
	],'',''],
	['PAGE','64301',jdecode('Precast+Layout'),jdecode(''), jdecode('%2F64301.html'), 'true',[],'',''],
	['PAGE','64601',jdecode('Column+Plumb+Surveys'),jdecode(''), jdecode('%2F64601%2Findex.html'), 'true',[ 
		['PAGE','93101',jdecode('Chrysler+Technical+Center'),jdecode(''), jdecode('%2F64601%2F93101.html'), 'true',[],'',''],
		['PAGE','93501',jdecode('IRS+Building+-+Detroit'),jdecode(''), jdecode('%2F64601%2F93501.html'), 'true',[],'','']
	],'',''],
	['PAGE','63201',jdecode('Crane+Rail+Alignment+Survey'),jdecode(''), jdecode('%2F63201.html'), 'true',[],'',''],
	['PAGE','65501',jdecode('Final+As+built+Surveys'),jdecode(''), jdecode('%2F65501.html'), 'true',[],'',''],
	['PAGE','10601',jdecode('Steel+Detailing'),jdecode(''), jdecode('%2F10601%2Findex.html'), 'true',[ 
		['PAGE','58801',jdecode('Papa+Joe%26%23x27%3Bs+Gourmet+Market'),jdecode(''), jdecode('%2F10601%2F58801.html'), 'true',[],'',''],
		['PAGE','60201',jdecode('Freedom+Hill+Amphitheatre+'),jdecode(''), jdecode('%2F10601%2F60201.html'), 'true',[],'',''],
		['PAGE','48001',jdecode('Chrysler+Phoenix+Engine'),jdecode(''), jdecode('%2F10601%2F48001.html'), 'true',[],'',''],
		['PAGE','87801',jdecode('General+Motors+-+Powertrain'),jdecode(''), jdecode('%2F10601%2F87801.html'), 'true',[],'',''],
		['PAGE','92601',jdecode('City+of+Warren'),jdecode(''), jdecode('%2F10601%2F92601.html'), 'true',[],'',''],
		['PAGE','121845',jdecode('LG+Chem+-+Holland%2C+Michigan'),jdecode(''), jdecode('%2F10601%2F121845.html'), 'true',[],'','']
	],'',''],
	['PAGE','84201',jdecode('Skylight+Measurements'),jdecode(''), jdecode('%2F84201%2Findex.html'), 'true',[ 
		['PAGE','59501',jdecode('National+Museum+of+the+Marine+Corps'),jdecode(''), jdecode('%2F84201%2F59501.html'), 'true',[],'',''],
		['PAGE','61501',jdecode('Gaylord+National+Resort+%26+Convention+Center+'),jdecode(''), jdecode('%2F84201%2F61501.html'), 'true',[],'','']
	],'',''],
	['PAGE','112234',jdecode('+'),jdecode(''), jdecode('%2F112234.html'), 'true',[],'','']];
var siteelementCount=43;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='B85454';
theSitetree.keyvisualId='11151';
theSitetree.keyvisualName='kv_11151.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13878';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'B85454',
				keyvisualId: 	'11151',
				keyvisualName: 	'kv_11151.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13878',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20110317-072549'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1999',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20101013-141926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20100724-221318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20091110-145516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111534',
internalId:  '',
customField: '20091112-024749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84201',
internalId:  '',
customField: '20091112-004037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84101',
internalId:  '',
customField: '20110317-075416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20100325-140334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47601',
internalId:  '',
customField: '20091003-171155'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20100323-092157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20091111-140438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20091003-171402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58501',
internalId:  '',
customField: '20091004-083018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58801',
internalId:  '',
customField: '20091022-152906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59501',
internalId:  '',
customField: '20091009-105734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59901',
internalId:  '',
customField: '20091009-095944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60201',
internalId:  '',
customField: '20091112-004816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60501',
internalId:  '',
customField: '20091003-180955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60801',
internalId:  '',
customField: '20091003-181327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61501',
internalId:  '',
customField: '20091009-101807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62001',
internalId:  '',
customField: '20091110-121205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62501',
internalId:  '',
customField: '20091003-215424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63201',
internalId:  '',
customField: '20091112-003113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63501',
internalId:  '',
customField: '20110913-110250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63901',
internalId:  '',
customField: '20091004-001020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64301',
internalId:  '',
customField: '20091004-000808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64601',
internalId:  '',
customField: '20100323-102850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65401',
internalId:  '',
customField: '20091112-005541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65501',
internalId:  '',
customField: '20091004-082045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66501',
internalId:  '',
customField: '20091005-145002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77101',
internalId:  '',
customField: '20091009-114113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87501',
internalId:  '',
customField: '20091009-112904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87801',
internalId:  '',
customField: '20091009-113945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92601',
internalId:  '',
customField: '20091106-152657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93101',
internalId:  '',
customField: '20100323-103025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93501',
internalId:  '',
customField: '20091016-114304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93901',
internalId:  '',
customField: '20091016-115344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94301',
internalId:  '',
customField: '20091022-155128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96201',
internalId:  '',
customField: '20091111-160659'
};
webappMappings['7080']=webappMappings['7080-654']={
webappId:    '7080',
documentId:  '111534',
internalId:  '654',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113034',
internalId:  '',
customField: '20091120-141934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112234',
internalId:  '',
customField: '20091113-102302'
};
webappMappings['7008']=webappMappings['7008-23084']={
webappId:    '7008',
documentId:  '1957',
internalId:  '23084',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-13385']={
webappId:    '7050',
documentId:  '112234',
internalId:  '13385',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116934',
internalId:  '',
customField: '20100323-110546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121845',
internalId:  '',
customField: '20100823-133201'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVAOT';
var companyName   = 'Field+Measurements+Inc.';
var htmlTitle	  = 'Field+Measurements';
var metaKeywords  = 'columndetailingsurveyas+builtanchor+';
var metaContents  = 'anchor+boltas+built+surveysurveyplumb+surveyfield+measurefield+measurements';
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();
};

