/* [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','2650',jdecode('Home'),jdecode(''),'/2650.html','true',[],'',''],
	['PAGE','38113',jdecode('Contact'),jdecode(''),'/38113.html','true',[],'',''],
	['PAGE','38071',jdecode('What%26%23x27%3Bs+New%3F'),jdecode(''),'/38071.html','true',[],'',''],
	['PAGE','38155',jdecode('Casted+Racks'),jdecode(''),'/38155.html','true',[],'',''],
	['PAGE','38176',jdecode('Billet+Racks'),jdecode(''),'/38176.html','true',[],'',''],
	['PAGE','38197',jdecode('Center+Pivot+Racks'),jdecode(''),'/38197.html','true',[],'',''],
	['PAGE','38218',jdecode('Adjustable+End+Racks'),jdecode(''),'/38218.html','true',[],'',''],
	['PAGE','43550',jdecode('Dbl+Ended+Cylinder+Racks'),jdecode(''),'/43550.html','true',[],'',''],
	['PAGE','38239',jdecode('Rack+Housings'),jdecode(''),'/38239.html','true',[],'',''],
	['PAGE','38260',jdecode('Rack+Shafts'),jdecode(''),'/38260.html','true',[],'',''],
	['PAGE','38281',jdecode('Servos'),jdecode(''),'/38281.html','true',[],'',''],
	['PAGE','38302',jdecode('Cylinders'),jdecode(''),'/38302.html','true',[],'',''],
	['PAGE','38323',jdecode('FTCs+and+TCs'),jdecode(''),'/38323.html','true',[],'',''],
	['PAGE','38344',jdecode('Pumps+%26+Hose+Kits'),jdecode(''),'/38344.html','true',[],'',''],
	['PAGE','38365',jdecode('Power+Steering+Fluid'),jdecode(''),'/38365.html','true',[],'',''],
	['PAGE','38386',jdecode('Miscellaneous+Parts'),jdecode(''),'/38386.html','true',[],'',''],
	['PAGE','38407',jdecode('Repair+Department'),jdecode(''),'/38407.html','true',[],'',''],
	['PAGE','38428',jdecode('Reconditioned+Racks'),jdecode(''),'/38428.html','true',[],'',''],
	['PAGE','38449',jdecode('Breakdowns'),jdecode(''),'/38449.html','true',[],'',''],
	['PAGE','38491',jdecode('Dealers'),jdecode(''),'/38491.html','true',[],'',''],
	['PAGE','38512',jdecode('Appleton+Champions'),jdecode(''),'/38512.html','true',[],'',''],
	['PAGE','38533',jdecode('Memorial+Winners'),jdecode(''),'/38533.html','true',[],'',''],
	['PAGE','38554',jdecode('Racers'),jdecode(''),'/38554.html','true',[],'',''],
	['PAGE','38470',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/38470.html','true',[],'',''],
	['PAGE','38134',jdecode('Directions'),jdecode(''),'/38134.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Hexagon';
theSitetree.paletteFamily='AF2828';
theSitetree.keyvisualId='7421';
theSitetree.keyvisualName='kv_7421.jpg';
theSitetree.fontsetId='16522';
theSitetree.graphicsetId='12180';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C6C5C5';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Hexagon',
				paletteFamily: 	'AF2828',
				keyvisualId: 	'7421',
				keyvisualName: 	'kv_7421.jpg',
				fontsetId: 		'16522',
				graphicsetId: 	'12180',
				contentColor: 	'000000',
				contentBGColor: 'C6C5C5',
				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:  '2650',
internalId:  '',
customField: '20100902-161323'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '38134',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43550',
internalId:  '',
customField: '20100727-085442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38512',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38071',
internalId:  '',
customField: '20100802-152700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38113',
internalId:  '',
customField: '20100722-211606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38134',
internalId:  '',
customField: '20100722-213149'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2650',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38407',
internalId:  '',
customField: '20100727-090336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38491',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38155',
internalId:  '',
customField: '20100902-161444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38176',
internalId:  '',
customField: '20100806-085021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38197',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38218',
internalId:  '',
customField: '20100902-161527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38239',
internalId:  '',
customField: '20100902-161546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38260',
internalId:  '',
customField: '20100803-101101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38281',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38302',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38323',
internalId:  '',
customField: '20100902-161625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38344',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38365',
internalId:  '',
customField: '20100727-085019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38386',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38428',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38449',
internalId:  '',
customField: '20100902-161711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38533',
internalId:  '',
customField: '20100902-161736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38554',
internalId:  '',
customField: '20100721-082420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38470',
internalId:  '',
customField: '20100721-082420'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INZX2I';
var companyName   = 'Appleton+Rack+%26+Pinion%2C+Inc.';
var htmlTitle	  = 'Appleton+Rack+%26+Pinion%2C+Inc.';
var metaKeywords  = '';
var metaContents  = '';
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();
};
