/* [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','53',jdecode('Home'),jdecode(''),'/53.html','true',[],'',''],
	['PAGE','20617',jdecode('Contact+Me'),jdecode(''),'/20617.html','true',[],'',''],
	['PAGE','2380',jdecode('Automobiles'),jdecode(''),'/2380.html','true',[],'',''],
	['PAGE','4469',jdecode('Const++Equipment'),jdecode(''),'/4469.html','true',[],'',''],
	['PAGE','17128',jdecode('Cranes+%2F++Booms'),jdecode(''),'/17128.html','true',[],'',''],
	['PAGE','49401',jdecode('Dump+Trucks'),jdecode(''),'/49401.html','true',[],'',''],
	['PAGE','20064',jdecode('+Farm+tractors'),jdecode(''),'/20064.html','true',[],'',''],
	['PAGE','3125',jdecode('Read-mix++Trucks'),jdecode(''),'/3125.html','true',[],'',''],
	['PAGE','20397',jdecode('Front-Ready-Mix'),jdecode(''),'/20397.html','true',[],'',''],
	['PAGE','48601',jdecode('Garbage+Trucks'),jdecode(''),'/48601.html','true',[],'',''],
	['PAGE','47401',jdecode('Pickup+Trucks'),jdecode(''),'/47401.html','true',[],'',''],
	['PAGE','13077',jdecode('Pumps+Trucks'),jdecode(''),'/13077.html','true',[],'',''],
	['PAGE','3107',jdecode('Potpourri++models'),jdecode(''),'/3107.html','true',[],'',''],
	['PAGE','3116',jdecode('+Large+Trucks'),jdecode(''),'/3116.html','true',[],'',''],
	['PAGE','4460',jdecode('LINKS'),jdecode(''),'/4460.html','true',[],'',''],
	['PAGE','19253',jdecode('Client+Logos'),jdecode(''),'/19253.html','true',[],'',''],
	['PAGE','44501',jdecode('+What++is+my+story'),jdecode(''),'/44501.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Cogwheel';
theSitetree.paletteFamily='FF9900';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10398';
theSitetree.graphicsetId='10607';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cogwheel',
				paletteFamily: 	'FF9900',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10398',
				graphicsetId: 	'10607',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FF9900',
				e_color: 		'9E9D9D',
				f_color: 		'9E9D9D',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-233298']={
webappId:    '1501',
documentId:  '53',
internalId:  '233298',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20100512-115331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20100723-160714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3125',
internalId:  '',
customField: '20100512-115438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20397',
internalId:  '',
customField: '20100723-151417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20100512-115532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13077',
internalId:  '',
customField: '20100512-115602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3116',
internalId:  '',
customField: '20100723-153438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17128',
internalId:  '',
customField: '20100709-084131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20064',
internalId:  '',
customField: '20100512-115409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4469',
internalId:  '',
customField: '20100619-122110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44501',
internalId:  '',
customField: '20100512-120601'
};
webappMappings['7008']=webappMappings['7008-8603']={
webappId:    '7008',
documentId:  '20617',
internalId:  '8603',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2380',
internalId:  '',
customField: '20100709-083630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20617',
internalId:  '',
customField: '20100709-091502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47401',
internalId:  '',
customField: '20100512-115548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3107',
internalId:  '',
customField: '20100723-160938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4460',
internalId:  '',
customField: '20100619-122915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19253',
internalId:  '',
customField: '20100617-100503'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3QD';
var companyName   = 'www.woodenclassicwheels.com';
var htmlTitle	  = 'Wooden+Classic+Wheels+provides+the+highest+quality+one+of+a+kind+custom+handmade+wooden+model+replicas.+wood+replicas%2C+collectible+Replicas%2C+handmade+Replica+Novelty+Items%2C+Collectible+car+Items%2C+Construction+Equipment+Models';
var metaKeywords  = 'wood+replicas+%2C+handmade+replica+trucks+%2C+wood+replica+car%2C+collectible+replica+novelty+items+%2C+construction+equipment+models+%2C+collectible+models+%2C+vintage+trucks+%2C+modern+trucks+%2C+car+models+%2C+collector+replicas+replicas+%2C+wood+models+%2C+custom+models%2C+wooden+ready+mix+trucks+%2C+vintage+automobile+%2C+one+of+a+kind+%2C+military+%2C+marketing+resource+%2C+art+shows+%2C+artwork+%2C+art+collectors+%2Ctrade+show+models.';
var metaContents  = 'Wooden+Classic+Wheels+provides+the+highest+quality+one+of+a+kind+custom+handmade+wooden++model+replicas.+collectible+Replicas+%2Chandmade+Replica+Novelty+Items+%2CCollectible+car+Items+%2C+Construction+Equipment+Models+%2C++Vintage+model+Trucks+%2C+Vintage+model';
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();
};
