/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','6501',jdecode('Windshield+Numbers'),jdecode(''),'/6501.html','true',[],'',''],
	['PAGE','6522',jdecode('Windshield+Slogans'),jdecode(''),'/6522.html','true',[],'',''],
	['PAGE','6543',jdecode('Sales+Forms'),jdecode(''),'/6543.html','true',[],'',''],
	['PAGE','6564',jdecode('Under+Hood+Signs'),jdecode(''),'/6564.html','true',[],'',''],
	['PAGE','6585',jdecode('Smoking+Receptacles'),jdecode(''),'/6585.html','true',[],'',''],
	['PAGE','6606',jdecode('Windshield+Banners'),jdecode(''),'/6606.html','true',[],'',''],
	['PAGE','6627',jdecode('Swooper+Flags'),jdecode(''),'/6627.html','true',[],'',''],
	['PAGE','6648',jdecode('Rearview+Mirror+Tags'),jdecode(''),'/6648.html','true',[],'',''],
	['PAGE','6669',jdecode('Antenna+Flags'),jdecode(''),'/6669.html','true',[],'',''],
	['PAGE','6690',jdecode('Clip-on+Window+Flags'),jdecode(''),'/6690.html','true',[],'',''],
	['PAGE','6711',jdecode('Boomer+Flag+%26+Pole+Kit'),jdecode(''),'/6711.html','true',[],'',''],
	['PAGE','6732',jdecode('Windshield+Markers'),jdecode(''),'/6732.html','true',[],'',''],
	['PAGE','6753',jdecode('Key+Tags'),jdecode(''),'/6753.html','true',[],'',''],
	['PAGE','6774',jdecode('Key+Boards'),jdecode(''),'/6774.html','true',[],'',''],
	['PAGE','17401',jdecode('Key+Cabinets'),jdecode(''),'/17401.html','true',[],'',''],
	['PAGE','6795',jdecode('Shop+Supplies+'),jdecode(''),'/6795.html','true',[],'',''],
	['PAGE','6816',jdecode('Shop+Forms'),jdecode(''),'/6816.html','true',[],'',''],
	['PAGE','7901',jdecode('Twirl-a-way+Signs'),jdecode(''),'/7901.html','true',[],'',''],
	['PAGE','8101',jdecode('Dealer+Plate+Magnets'),jdecode(''),'/8101.html','true',[],'',''],
	['PAGE','17422',jdecode('License+Plate+Screws+and+Nuts'),jdecode(''),'/17422.html','true',[],'',''],
	['PAGE','14801',jdecode('Decals-+Dealer+Name+Plates'),jdecode(''),'/14801.html','true',[],'',''],
	['PAGE','6837',jdecode('Promotional+Products'),jdecode(''),'/6837.html','true',[],'',''],
	['PAGE','5001',jdecode('Specials'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','19601',jdecode('LINKS'),jdecode(''),'/19601.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Billy';
theSitetree.paletteFamily='7179A3';
theSitetree.keyvisualId='7102';
theSitetree.keyvisualName='kv_7102.jpg';
theSitetree.fontsetId='16391';
theSitetree.graphicsetId='12122';
theSitetree.contentColor='353C5C';
theSitetree.contentBGColor='7179A3';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Billy',
				paletteFamily: 	'7179A3',
				keyvisualId: 	'7102',
				keyvisualName: 	'kv_7102.jpg',
				fontsetId: 		'16391',
				graphicsetId: 	'12122',
				contentColor: 	'353C5C',
				contentBGColor: '7179A3',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100716-145423'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100702-162627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100716-151044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100716-151228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6543',
internalId:  '',
customField: '20100716-151723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6564',
internalId:  '',
customField: '20100716-153739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6585',
internalId:  '',
customField: '20100526-182916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6606',
internalId:  '',
customField: '20091114-083021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6627',
internalId:  '',
customField: '20090725-080436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6648',
internalId:  '',
customField: '20100723-151543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6669',
internalId:  '',
customField: '20091114-085126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6690',
internalId:  '',
customField: '20100723-151323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6711',
internalId:  '',
customField: '20100716-152714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6732',
internalId:  '',
customField: '20100702-160723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6753',
internalId:  '',
customField: '20100716-154245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6774',
internalId:  '',
customField: '20091114-091212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6795',
internalId:  '',
customField: '20100701-144702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6816',
internalId:  '',
customField: '20090806-090005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6837',
internalId:  '',
customField: '20100702-173510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20100702-160343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20091114-091746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20100526-170927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17422',
internalId:  '',
customField: '20091114-092142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20091114-091644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20091002-130837'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INL7TR';
var companyName   = 'KENNETH+RAPER-+advertising%2C+dealer+supply';
var htmlTitle	  = '';
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();
};
