/* [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','1401',jdecode('Home'),jdecode(''), jdecode('%2F1401.html'), 'true',[],'',''],
	['PAGE','1452',jdecode('Products'),jdecode(''), jdecode('%2F1452.html'), 'true',[],'',''],
	['PAGE','1536',jdecode('Suppliers'),jdecode(''), jdecode('%2F1536.html'), 'true',[],'',''],
	['PAGE','1515',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F1515.html'), 'true',[],'',''],
	['PAGE','1557',jdecode('Contact'),jdecode(''), jdecode('%2F1557.html'), 'true',[],'',''],
	['PAGE','13301',jdecode('Search'),jdecode(''), jdecode('%2F13301.html'), 'true',[],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Bigcity_NYC';
theSitetree.paletteFamily='333333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17893';
theSitetree.graphicsetId='13163';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333333';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Bigcity_NYC',
				paletteFamily: 	'333333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17893',
				graphicsetId: 	'13163',
				contentColor: 	'FFFFFF',
				contentBGColor: '333333',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20090826-151046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1452',
internalId:  '',
customField: '20091027-142918'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1557',
internalId:  '',
customField: '20090527-180649'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '13301',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1536',
internalId:  '',
customField: '20091027-163745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1515',
internalId:  '',
customField: '20091029-122852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20090521-134307'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INH9HJ';
var companyName   = 'DBE+Mfg.+%26+Supply%2C+LLC';
var htmlTitle	  = 'DBE+Manufacturing+%26+Supply%2C+LLC';
var metaKeywords  = 'DBE%2C+dbe%2C+D.B.E.%2C+concrete%2C+construction%2C+tools%2C+tool%2C+contractor%2C+contractor+supplies%2C+hardware%2C+materials%2C+concrete%2C+power+tools%2C+accessories%2C+waterproofing%2C+industrial%2C+commercial%2C+residential%2C+landscape%2C+landscaping%2C+construction+equipment%2C+home+repair%2C+improvement%2C+builder%2C+steel+adhesives%2C+caulk%2C+caulking%2C+acid+stain%2C+ties%2C+rebar%2C+hand+tool%2C+blades%2C+boxed+nails%2C+drainage%2C+safety+equipment%2C+wood%2C+anchor+bolts%2C+fasterners%2C+guns%2C+compressors%2C+drill+bits%2C+epoxies%2C+epoxy%2C+grinders%2C+grinding+wheels%2C+hammers%2C+hard+hat%2C+hats%2C+gloves%2C+safety+glasses%2C+tape+measures%2C+window+grate%2C+grates%2C+window%2C+windows%2C+string+line%2C+grade+rods%2C+vibrator%2C+vibrators%2C+ramp+flumes%2C+parshall+flumes%2C+cutthroat+flumes%2C+flume%2C+cattleguards%2C+cattle+guard%2C+culvert%2C+corrugated+steel+pipe%2C+CSP%2C+CMP%2C+flared+ends%2C+HDPE+pipe%2C+backer+rod%2C+concrete+stamps%2C+concrete+blankets%2C+blanket%2C+form+release%2C+nelson+studs%2C+rebar+cap%2C+rebar+protectors%2C+overlay+mixes%2C+sidewalk+chases%2C+drain%2C+chase%2C+sonotube%2C+wire+mesh%2C+erosion+logs%2C+wattle%2C+ADA+plates%2C+detectable+warning%2C+domes%2C+safety+fence%2C+safety+vests%2C+cure%2C+cures%2C+sealant%2C+non+sag%2C+self+leveling%2C+blasting+compound%2C+Davis+Colors%2C+cement+mix%2C+sand+topping%2C+buckets%2C+concrete+calculators%2C+hand+sprayers%2C+tie+down+straps%2C+2x4%2C+2x6%2C+2x8%2C+douglas+fir%2C+plywood%2C+hdo%2C+mdo%2C+plyform%2C+adjustable+support+columns%2C+bollard%2C+bollards%2C+plastic+bollard%2C+hand+rail%2C+orifice+plates%2C+sheet+piling%2C+trash+racks%2C+steel+fabrication%2C+Fresno+headgates%2C+headgate%2C+spigot+back%2C+flat+back%2C+staff+gauges%2C+gages%2C+all+thread%2C+backer+rod%2C+window+grates%2C+ADS%2C+Hancor%2C+Agri+Drain%2C+Blue+Seal%2C+Boman+Kemp%2C+Chapin%2C+Neenah%2C+Deeter%2C+Castings%2C+Cast+Iron%2C+Henry+Company%2C+Quikrete%2C+Sonoco%2C+Newark%2C+Proline+Concrete+Tools%2C+Stevens+Water+Monitoring+Systems%2C+WR+Meadows%2C+Wacker+Neuson%2C+safety+fence%2C+construction+fence%2C+erosion+blankets%2C+concrete+stamp%2C+stamps%2C+silica%2C+portland+cement+mix%2C+waterstop%2C+manhole+cover%2C+manhole+step%2C+steps%2C+window+ladder%2C+sidwalk+drain%2C+drains%2C+chalk%2C+extension+cords%2C+hand+tool%2C+bridge+decking%2C+inline+water+control+structures%2C+wier+plates%2C+plate%2C+burlap%2C+construction+calculators%2C+duct+tape%2C+generators%2C+stretch+film%2C+pipe%2C+tubing%2C+tube%2C+wide+flange+beams%2C+steel+beam%2C+pencil+rod%2C+safety+plate%2C+floor+plate%2C+channel';
var metaContents  = 'Northeast+Colorado%27s+Concrete+%26+Construction+Supply+and+Steel+Fabrication%2C+Greeley';
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();
};

