/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','53685',jdecode('Airbrushing'),jdecode(''),'/53685/index.html','true',[ 
		['PAGE','54203',jdecode('Wheels'),jdecode(''),'/53685/54203.html','true',[],'']
	],''],
	['PAGE','53338',jdecode('Specials'),jdecode(''),'/53338.html','true',[],''],
	['PAGE','4701',jdecode('Some+of+our+projects'),jdecode(''),'/4701/index.html','true',[ 
		['PAGE','53921',jdecode('Custom+Ice+Cream+Vehicle'),jdecode(''),'/4701/53921.html','true',[],''],
		['PAGE','4722',jdecode('Custom+Trailers'),jdecode(''),'/4701/4722.html','true',[],''],
		['PAGE','4743',jdecode('Motorcycle+Projects'),jdecode(''),'/4701/4743.html','true',[],''],
		['PAGE','48601',jdecode('Custom+Chopper'),jdecode(''),'/4701/48601.html','true',[],''],
		['PAGE','4764',jdecode('Custom+Vehicle+Conversions'),jdecode(''),'/4701/4764.html','true',[],''],
		['PAGE','40001',jdecode('1968+Camaro+Restoration'),jdecode(''),'/4701/40001.html','true',[],''],
		['PAGE','16801',jdecode('2006+Mustang+Transformation'),jdecode(''),'/4701/16801.html','true',[],''],
		['PAGE','46001',jdecode('Boston+Whaler+Restoration'),jdecode(''),'/4701/46001.html','true',[],''],
		['PAGE','23701',jdecode('Lift+Kits'),jdecode(''),'/4701/23701.html','true',[],''],
		['PAGE','30201',jdecode('Miscellaneous+Projects'),jdecode(''),'/4701/30201.html','true',[],'']
	],''],
	['PAGE','4785',jdecode('Contact'),jdecode(''),'/4785/index.html','true',[ 
		['PAGE','24701',jdecode('Request+More+Information'),jdecode(''),'/4785/24701/index.html','true',[ 
			['PAGE','25101',jdecode('Request+More+Information+%28follow+up+page%29'),jdecode(''),'/4785/24701/25101.html','false',[],'']
		],'']
	],''],
	['PAGE','4848',jdecode('Tips+%26+Tricks'),jdecode(''),'/4848.html','true',[],''],
	['PAGE','7101',jdecode('List+of+links'),jdecode(''),'/7101.html','true',[],''],
	['PAGE','18601',jdecode('Items+for+Sale'),jdecode(''),'/18601/index.html','true',[ 
		['PAGE','28801',jdecode('1988+Chevy+Pick-Up'),jdecode(''),'/18601/28801.html','true',[],'']
	],'']];
var siteelementCount=22;
theSitetree.topTemplateName='Sportive';
theSitetree.paletteFamily='FADE8A';
theSitetree.keyvisualId='2672';
theSitetree.keyvisualName='industrie.jpg';
theSitetree.fontsetId='221';
theSitetree.graphicsetId='261';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FADE8A';
var theTemplate={
				name: 			'Sportive',
				paletteFamily: 	'FADE8A',
				keyvisualId: 	'2672',
				keyvisualName: 	'industrie.jpg',
				fontsetId: 		'221',
				graphicsetId: 	'261',
				contentColor: 	'000000',
				contentBGColor: 'FADE8A',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FADE8A',
				b_color: 		'D0B976',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050ine0sg80c56a90f4fcc24']={
webappId:    '1001',
documentId:  '24701',
internalId:  'ahw050ine0sg80c56a90f4fcc24',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ine0sg80c56a90f4fcc24']={
webappId:    '1001',
documentId:  '25101',
internalId:  'ahw050ine0sg80c56a90f4fcc24',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100216-100405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20091023-144144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20061102-171245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20090216-183838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53338',
internalId:  '',
customField: '20080723-135057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20061107-163814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4743',
internalId:  '',
customField: '20061028-113212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20070616-214636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40001',
internalId:  '',
customField: '20070414-162023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20061230-153515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20070424-210206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20080721-162413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30201',
internalId:  '',
customField: '20061219-153818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4785',
internalId:  '',
customField: '20080308-213347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20061102-172025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20061102-172138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4848',
internalId:  '',
customField: '20061026-164108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20090924-092320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20100216-100225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53685',
internalId:  '',
customField: '20090819-194701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53921',
internalId:  '',
customField: '20090825-123956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54203',
internalId:  '',
customField: '20091023-144506'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INE0SG';
var companyName   = 'Advanced+Customs+%26+Conversions+Inc.';
var htmlTitle	  = 'Advanced+Customs+and+Conversions%2C+Inc.';
var metaKeywords  = 'Trailer+Manufacturing%2C+Trailer+Repairs%2C+Fiber+optics+mobile+labs%2C+Custom+Trailers%2C+Gooseneck+Trailers%2C+Bus+Conversions%2C+Van+Conversions%2C+Mobile+Computer+Labs%2C+Mobile+Office+Vehicles%2C+Mobile+Pet+Washing+Vehicles%2C+Custom+Car+Modifications%2C+Custom+Body+Kits%2C+Custom+Motorcycle+Modifications%2C+Lift+Kits%2C+Lambo+Doors%2C+High+Quality+Painting%2C+Steel++and+Aluminum+Fabrication%2C+Welding+Repairs%2C+Fiberglass+Repairs%2C+Auto+Restorations%2C+Air+Brushing%2C+General+Auto+Repairs%2C+A%2FC+Repairs%2C+Boydstun+Car+Hauler+Repairs%2C+Hydraulic+Repairs%2C+Truck+Repairs%2C+Factory+machinery+repairs%2C+Packaging+line+repairs%2C+electrical+repairs%2C+hydraulic+repairs%2C+pneumatic+machinery+repairs%2C+tow+truck+hydraulic+repairs%2C+dynamic+lift+repairs';
var metaContents  = 'Advanced+Customs++Conversions+Inc%2C+Manufactures+high+quality+trailers+for+the+generator+industry+along+with+custom+trailers+to+customers+requirements.+Our+motorcycle+and+custom+car+division+can+create+your+dream+car+or+bike+to+your+exacting+specifications+along+with+custom+airbrushing.+We+also+produce+mobile+computer+labs%2C+Fiber+optics+mobile+labs%2C+mobile+offices%2C+van+conversions+etc.+You+dream+it%2C+we+produce+it%21Car+hauling+trailer+repairs+along+with+hydraulic+repairs.Factory+maintenance+and+machinery+repairs+from+electrical%2C+pneumatic%2C+hydraulic%2C+conveyors%2C+packaging+lines+and+production+lines.';
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();
};
