/* [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 theSitetree=[ 
	['PAGE','2801',jdecode('Welcome'),jdecode(''),'/2801.html','true',[],''],
	['PAGE','2852',jdecode('Industrial+Compressors'),jdecode(''),'/2852/index.html','true',[ 
		['PAGE','7701',jdecode('Kaeser'),jdecode(''),'/2852/7701.html','true',[],''],
		['PAGE','7722',jdecode('Saylor-Beall'),jdecode(''),'/2852/7722.html','true',[],'']
	],''],
	['PAGE','7785',jdecode('Portable+Compressors'),jdecode(''),'/7785.html','true',[],''],
	['PAGE','19001',jdecode('Air+Tools'),jdecode(''),'/19001/index.html','true',[ 
		['PAGE','19022',jdecode('US+Saws'),jdecode(''),'/19001/19022.html','true',[],''],
		['PAGE','19043',jdecode('Sullair'),jdecode(''),'/19001/19043.html','true',[],'']
	],''],
	['PAGE','2894',jdecode('Compressor+Services'),jdecode(''),'/2894/index.html','true',[ 
		['PAGE','14801',jdecode('Air+Tank+Tests'),jdecode(''),'/2894/14801.html','true',[],''],
		['PAGE','44823',jdecode('Pump+Repair'),jdecode(''),'/2894/44823.html','true',[],''],
		['PAGE','16601',jdecode('System+Installations'),jdecode(''),'/2894/16601.html','true',[],''],
		['PAGE','15501',jdecode('Glossary'),jdecode(''),'/2894/15501.html','true',[],'']
	],''],
	['PAGE','2957',jdecode('Receive+Information'),jdecode(''),'/2957.html','true',[],''],
	['PAGE','2915',jdecode('Our+History'),jdecode(''),'/2915/index.html','true',[ 
		['PAGE','2936',jdecode('Our+Team'),jdecode(''),'/2915/2936.html','true',[],'']
	],''],
	['PAGE','2978',jdecode('Careers'),jdecode(''),'/2978.html','true',[],''],
	['PAGE','4101',jdecode('Hours+%26+Directions'),jdecode(''),'/4101.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Trend';
theSitetree.paletteFamily='3F70CF';
theSitetree.keyvisualId='7966';
theSitetree.keyvisualName='kv_7966.jpg';
theSitetree.fontsetId='16910';
theSitetree.graphicsetId='12323';
theSitetree.contentColor='163D88';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Trend',
				paletteFamily: 	'3F70CF',
				keyvisualId: 	'7966',
				keyvisualName: 	'kv_7966.jpg',
				fontsetId: 		'16910',
				graphicsetId: 	'12323',
				contentColor: 	'163D88',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				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['7008']=webappMappings['7008-6655']={
webappId:    '7008',
documentId:  '2957',
internalId:  '6655',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20090615-124122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44823',
internalId:  '',
customField: '20090611-161706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20090615-124206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2852',
internalId:  '',
customField: '20090619-141104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20090603-175547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2915',
internalId:  '',
customField: '20090527-163647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2957',
internalId:  '',
customField: '20090429-212946'
};
webappMappings['1501']=webappMappings['1501-15149082']={
webappId:    '1501',
documentId:  '2801',
internalId:  '15149082',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2936',
internalId:  '',
customField: '20090625-083156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2978',
internalId:  '',
customField: '20090608-131620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20090504-134730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20090611-162522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7722',
internalId:  '',
customField: '20090611-162608'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '4101',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7785',
internalId:  '',
customField: '20090608-125536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20090430-150338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20090430-204842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20090603-163208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19022',
internalId:  '',
customField: '20090521-132308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19043',
internalId:  '',
customField: '20090508-150433'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHA55';
var companyName   = 'BYRNE+COMPRESSED+AIR+EQUIP.%2C+CO.%2C+INC.';
var htmlTitle	  = 'Byrne+Compressed+Air+Equipment';
var metaKeywords  = 'Byrne+Compressed+Air+Equipment+Air+Compressor+Bronx+New+York+City+Queens+Manhattan+Service+Air+Compressor+Doosan+Portable+Power+Bronx+Kaeser+New+York+Sullivan+Palatek+Bronx+Air+Compressor+New+York+Bronx+Air+Compressor+Service+Installation+BCA+Equipment+Distributor+Doosan+Portable+Power+P185+Ingersoll+Rand+Generator+Air+Compressed+Byrne+James+Brady+1949+Bronx+Air+Compressors';
var metaContents  = 'Byrne+Compressed+Air+Equipment+%28BCA+Equipment%29+is+the+Authorized+Dealer+for+Parts++Service+for+Doosan+Portable+Power%2C+Kaeser+Compressors%2C+Saylor-Beall+and+other+manufacturers+such+as+Sullivan+Palatek%2C+Dev+Air%2C+Champion%2C+Air+Man%2C+Sull+Air+and+U.S.+Saws.+Whether+you+have+a+machine+still+running+since+1949%2C+or+if+you+have+the+latest+Air+Technology%2C+BCA+Equipment+has+the+know+how+to+get+the+job+done.';
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();
};
