/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','501',jdecode('About+us'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','522',jdecode('Services'),jdecode(''),'/522/index.html','true',[ 
		['PAGE','543',jdecode('Modernizations'),jdecode(''),'/522/543.html','true',[],'',''],
		['PAGE','564',jdecode('Frequency+Drives'),jdecode(''),'/522/564.html','true',[],'',''],
		['PAGE','585',jdecode('Pendant+Controls'),jdecode(''),'/522/585.html','true',[],'',''],
		['PAGE','5101',jdecode('Load+testing'),jdecode(''),'/522/5101.html','true',[],'',''],
		['PAGE','5122',jdecode('Festoon+systems'),jdecode(''),'/522/5122.html','true',[],'',''],
		['PAGE','5164',jdecode('Inspection+Service'),jdecode(''),'/522/5164.html','true',[],'',''],
		['PAGE','5185',jdecode('Maintenance+Service'),jdecode(''),'/522/5185.html','true',[],'',''],
		['PAGE','54301',jdecode('Radio+Controls'),jdecode(''),'/522/54301.html','true',[],'','']
	],'',''],
	['PAGE','23801',jdecode('Products'),jdecode(''),'/23801.html','true',[],'',''],
	['PAGE','19001',jdecode('Valued+Customers+'),jdecode(''),'/19001.html','true',[],'',''],
	['PAGE','627',jdecode('Contact'),jdecode(''),'/627/index.html','true',[ 
		['PAGE','648',jdecode('Address'),jdecode(''),'/627/648.html','true',[],'','']
	],'',''],
	['PAGE','8501',jdecode('Photos'),jdecode(''),'/8501/index.html','true',[ 
		['PAGE','31201',jdecode('Cranes+we+work+on'),jdecode(''),'/8501/31201.html','true',[],'',''],
		['PAGE','41201',jdecode('Our+men+at+work'),jdecode(''),'/8501/41201.html','true',[],'',''],
		['PAGE','45801',jdecode('Out+in+the+field'),jdecode(''),'/8501/45801.html','true',[],'',''],
		['PAGE','41222',jdecode('Shop+capabilities'),jdecode(''),'/8501/41222.html','true',[],'',''],
		['PAGE','31222',jdecode('Load+testing'),jdecode(''),'/8501/31222.html','true',[],'',''],
		['PAGE','31243',jdecode('Products+we+work+with'),jdecode(''),'/8501/31243.html','true',[],'','']
	],'',''],
	['PAGE','8601',jdecode('Map'),jdecode(''),'/8601.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='364EB6';
theSitetree.keyvisualId='7153';
theSitetree.keyvisualName='kv_7153.jpg';
theSitetree.fontsetId='16394';
theSitetree.graphicsetId='12129';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'364EB6',
				keyvisualId: 	'7153',
				keyvisualName: 	'kv_7153.jpg',
				fontsetId: 		'16394',
				graphicsetId: 	'12129',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1962031']={
webappId:    '1501',
documentId:  '301',
internalId:  '1962031',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '8601',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-50459f4eaa436c428df4ecfa5478a550']={
webappId:    '7060',
documentId:  '31201',
internalId:  '50459f4eaa436c428df4ecfa5478a550',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20091005-094338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20091230-132824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '522',
internalId:  '',
customField: '20091005-100715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '543',
internalId:  '',
customField: '20091005-100901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '564',
internalId:  '',
customField: '20091005-100445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '585',
internalId:  '',
customField: '20091005-100001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20091005-100037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20080724-131556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20091130-114927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5164',
internalId:  '',
customField: '20091005-100633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5185',
internalId:  '',
customField: '20080724-131633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20091005-100817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20100516-141615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '627',
internalId:  '',
customField: '20100305-122629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '648',
internalId:  '',
customField: '20081126-045447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20091005-095239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20080724-130016'
};
webappMappings['7060']=webappMappings['7060-39af8205bcc33bb7c5f9c73eab4c87da']={
webappId:    '7060',
documentId:  '31222',
internalId:  '39af8205bcc33bb7c5f9c73eab4c87da',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e89a7060edea7522d839d2621db69fd8']={
webappId:    '7060',
documentId:  '31243',
internalId:  'e89a7060edea7522d839d2621db69fd8',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31201',
internalId:  '',
customField: '20081121-090406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31222',
internalId:  '',
customField: '20081122-193406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31243',
internalId:  '',
customField: '20081122-193446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41201',
internalId:  '',
customField: '20090823-114228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41222',
internalId:  '',
customField: '20090103-171237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45801',
internalId:  '',
customField: '20090921-151705'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INV5ME';
var companyName   = 'The+Bartholomew+Company%2C+Inc.';
var htmlTitle	  = 'The+Bartholomew+Company+Inc.';
var metaKeywords  = 'Overhead+Cranes+Repair+and+Service+NY%2C+Overhead+Cranes+%2C+service+%2C+sales+%2C+repair%2C+hoists+%2C+Inspections%2C+Bartholomew+Company%2C+new+york+%2C+long+island+%2C+bart%2C+cranes+%2C++pendants+%2C+remotes+%2C+repair+%2C++inspect+%2C++load+testing+%2C+hicksville+%2C+nassau%2C+ny+%2C+nyc+%2C+suffolk%2C+queens%2C+bronx%2C+brooklyn%2C+wire+rope+%2C+chain+hoist';
var metaContents  = 'Overhead+Cranes+Repair+and+Service+NY%2C+Overhead+Cranes+%2C+service+%2C+sales+%2C+repair%2C+hoists+%2C+Inspections%2C+Bartholomew+Company%2C+new+york+%2C+long+island+%2C+bart%2C+cranes+%2C++pendants+%2C+remotes+%2C+repair+%2C++inspect+%2C++load+testing+%2C+hicksville+%2C+nassau%2C+ny+%2C+nyc+%2C+suffolk%2C+queens%2C+bronx%2C+brooklyn%2C+wire+rope%2C+chain+hoist';
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();
};
