/* [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','822',jdecode('Home'),jdecode(''),'/822.html','true',[],''],
	['PAGE','63814',jdecode('FOR+SALE'),jdecode(''),'/63814.html','true',[],''],
	['PAGE','6625',jdecode('Front+Replacements'),jdecode(''),'/6625/index.html','true',[ 
		['PAGE','6646',jdecode('++CHEVROLET'),jdecode(''),'/6625/6646.html','true',[],''],
		['PAGE','6667',jdecode('++DODGE'),jdecode(''),'/6625/6667.html','true',[],''],
		['PAGE','6688',jdecode('++FORD'),jdecode(''),'/6625/6688.html','true',[],''],
		['PAGE','6709',jdecode('++GMC'),jdecode(''),'/6625/6709.html','true',[],'']
	],''],
	['PAGE','21925',jdecode('Rear+Replacements'),jdecode(''),'/21925/index.html','true',[ 
		['PAGE','21946',jdecode('++CHEVROLET+%2F+GMC'),jdecode(''),'/21925/21946.html','true',[],''],
		['PAGE','21967',jdecode('++DODGE'),jdecode(''),'/21925/21967.html','true',[],''],
		['PAGE','21988',jdecode('++FORD'),jdecode(''),'/21925/21988.html','true',[],'']
	],''],
	['PAGE','894',jdecode('Steps'),jdecode(''),'/894.html','true',[],''],
	['PAGE','11125',jdecode('ATV+Accessories+'),jdecode(''),'/11125.html','true',[],''],
	['PAGE','936',jdecode('Dealers'),jdecode(''),'/936.html','true',[],''],
	['PAGE','63193',jdecode('Pricing+%26+Info'),jdecode(''),'/63193/index.html','true',[ 
		['PAGE','63255',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/63193/63255.html','false',[],'']
	],''],
	['PAGE','65101',jdecode('Support'),jdecode(''),'/65101/index.html','true',[ 
		['PAGE','56125',jdecode('F.A.Q.'),jdecode(''),'/65101/56125.html','true',[],''],
		['PAGE','65533',jdecode('Warranty'),jdecode(''),'/65101/65533.html','true',[],''],
		['PAGE','957',jdecode('About+Us'),jdecode(''),'/65101/957.html','true',[],'']
	],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='D72B2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10893';
theSitetree.contentColor='D72B2B';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'D72B2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10893',
				contentColor: 	'D72B2B',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D72B2B',
				e_color: 		'D72B2B',
				f_color: 		'D72B2B',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '822',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050ineri211b94d6075b']={
webappId:    '1001',
documentId:  '63193',
internalId:  'ahw050ineri211b94d6075b',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineri211b94d6075b']={
webappId:    '1001',
documentId:  '63255',
internalId:  'ahw050ineri211b94d6075b',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '822',
internalId:  '',
customField: '20100216-142629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6625',
internalId:  '',
customField: '20100116-151259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6688',
internalId:  '',
customField: '20100105-143424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6646',
internalId:  '',
customField: '20100116-191428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6667',
internalId:  '',
customField: '20100216-143413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6709',
internalId:  '',
customField: '20100216-145613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21925',
internalId:  '',
customField: '20100216-145908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21946',
internalId:  '',
customField: '20100216-152413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21967',
internalId:  '',
customField: '20100216-152132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21988',
internalId:  '',
customField: '20100216-152724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20100216-153229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11125',
internalId:  '',
customField: '20081125-104240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '936',
internalId:  '',
customField: '20100216-142240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65533',
internalId:  '',
customField: '20091007-165644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63193',
internalId:  '',
customField: '20100104-093927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63255',
internalId:  '',
customField: '20080806-095348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56125',
internalId:  '',
customField: '20091007-165011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '957',
internalId:  '',
customField: '20081209-171059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63814',
internalId:  '',
customField: '20100116-150708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65101',
internalId:  '',
customField: '20091105-143032'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INERI2';
var companyName   = 'Call+today%21++903.785.8939';
var htmlTitle	  = 'Bodyguard+Truck+Accessories%2C+Heavy+Duty+Truck+Accessories%2C+Ranch+style+replacement+bumpers%2C+front+replacement+bumpers%2C+rear+replacement+bumpers%2C+winch+bumpers';
var metaKeywords  = 'truck+accessories%2C+front+replacement+bumpers%2C+rear+replacement+bumpers%2C+truck+bumpers%2C+winch+bumpers%2C+ranch+hand+bumpers%2C+buck+stop+bumpers%2C+frontier+gear%2C+top+gun+bumpers%2C+heavy+duty+bumpers%2C+bodyguard+bumpers%2C+bodyguard+truck+accessories%2C+Texas+truck+accessories%2C+powder+coat+bumpers%2C+truck+bumpers';
var metaContents  = 'Bodyguard+Truck+Accessories%3A++Front+Replacement+Bumpers%2C+Rear+Replacement+Bumpers%2C+Winch+Bumpers%2C+Heavy+Duty+Truck+Bumpers%2C+Ranch+Style+Bumpers%2C+Bumpers%2C+Heavy+Duty+Bumpers%2C+Dodge+Bumpers%2C+Chevrolet%2C+Chevy+Bumpers%2C+Ford+Bumpers%2C+grill+guard+bumpers%2C+tube+steps';
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();
};
