/* [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','53',jdecode('Home'),jdecode(''),'/53.html','true',[],''],
	['PAGE','2222',jdecode('Contact'),jdecode(''),'/2222/index.html','true',[ 
		['PAGE','5636',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/2222/5636.html','false',[],'']
	],''],
	['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/index.html','true',[ 
		['PAGE','20617',jdecode('Front-End+Mixers+%28follow+up+page%29'),jdecode(''),'/20397/20617.html','false',[],'']
	],''],
	['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=19;
theSitetree.topTemplateName='Circulation';
theSitetree.paletteFamily='2FAF66';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10381';
theSitetree.graphicsetId='10565';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Circulation',
				paletteFamily: 	'2FAF66',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10381',
				graphicsetId: 	'10565',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-5095']={
webappId:    '7008',
documentId:  '5636',
internalId:  '5095',
customField: 'language:en;country:US;'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3qd165721281cf863bc']={
webappId:    '1001',
documentId:  '3107',
internalId:  'ahw050inx3qd165721281cf863bc',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3qd57949154710b29c4']={
webappId:    '1001',
documentId:  '2222',
internalId:  'ahw050inx3qd57949154710b29c4',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3qd57949154710b29c4']={
webappId:    '1001',
documentId:  '5636',
internalId:  'ahw050inx3qd57949154710b29c4',
customField: 'followUp'
};
webappMappings['1501']=webappMappings['1501-233298']={
webappId:    '1501',
documentId:  '53',
internalId:  '233298',
customField: '1501'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3qd8656c11c3824ffa0']={
webappId:    '1001',
documentId:  '20397',
internalId:  'ahw050inx3qd8656c11c3824ffa0',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3qd8656c11c3824ffa0']={
webappId:    '1001',
documentId:  '20617',
internalId:  'ahw050inx3qd8656c11c3824ffa0',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20100129-150151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20100224-092033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3125',
internalId:  '',
customField: '20100224-093914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20397',
internalId:  '',
customField: '20100217-092619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20100129-151709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13077',
internalId:  '',
customField: '20100129-144140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3116',
internalId:  '',
customField: '20100304-094609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17128',
internalId:  '',
customField: '20100129-150110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20064',
internalId:  '',
customField: '20100129-150225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4469',
internalId:  '',
customField: '20100304-101647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44501',
internalId:  '',
customField: '20100101-092606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2222',
internalId:  '',
customField: '20100224-092229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5636',
internalId:  '',
customField: '20071201-175732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2380',
internalId:  '',
customField: '20100304-101815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20617',
internalId:  '',
customField: '20080602-220827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47401',
internalId:  '',
customField: '20100304-101918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3107',
internalId:  '',
customField: '20100129-144722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4460',
internalId:  '',
customField: '20100117-095157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19253',
internalId:  '',
customField: '20091105-144330'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3QD';
var companyName   = '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();
};
