/* [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','157',jdecode('Home'),jdecode(''),'/157.html','true',[],''],
	['PAGE','1913',jdecode('Junkyard+Inventory'),jdecode(''),'/1913/index.html','true',[ 
		['PAGE','1852',jdecode('FOMOCO'),jdecode(''),'/1913/1852.html','true',[],''],
		['PAGE','1806',jdecode('General+Motors'),jdecode(''),'/1913/1806.html','true',[],''],
		['PAGE','1829',jdecode('MOPAR'),jdecode(''),'/1913/1829.html','true',[],''],
		['PAGE','3752',jdecode('Other+Makes'),jdecode(''),'/1913/3752.html','true',[],'']
	],''],
	['PAGE','2388',jdecode('Virtual+Tour'),jdecode(''),'/2388/index.html','true',[ 
		['PAGE','3411',jdecode('FOMOCO'),jdecode(''),'/2388/3411.html','true',[],''],
		['PAGE','2243',jdecode('General+Motors'),jdecode(''),'/2388/2243.html','true',[],''],
		['PAGE','3170',jdecode('Mopar'),jdecode(''),'/2388/3170.html','true',[],''],
		['PAGE','2157',jdecode('Other+Makes'),jdecode(''),'/2388/2157.html','true',[],'']
	],''],
	['PAGE','250',jdecode('Contact+Us+%2F+Find+Us'),jdecode(''),'/250/index.html','true',[ 
		['PAGE','6952',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/250/6952.html','false',[],''],
		['PAGE','2958',jdecode('Route+Planner'),jdecode(''),'/250/2958.html','true',[],''],
		['PAGE','2964',jdecode('Maps+%26+Directions'),jdecode(''),'/250/2964.html','true',[],'']
	],''],
	['PAGE','3023',jdecode('Guestbook'),jdecode(''),'/3023/index.html','true',[ 
		['PAGE','3022',jdecode('Read+Guestbook'),jdecode(''),'/3023/3022.html','false',[],'']
	],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Atmosphere';
theSitetree.paletteFamily='003333';
theSitetree.keyvisualId='169';
theSitetree.keyvisualName='rohrzange.jpg';
theSitetree.fontsetId='10';
theSitetree.graphicsetId='5';
theSitetree.contentColor='';
theSitetree.contentBGColor='';
var theTemplate={
				name: 			'Atmosphere',
				paletteFamily: 	'003333',
				keyvisualId: 	'169',
				keyvisualName: 	'rohrzange.jpg',
				fontsetId: 		'10',
				graphicsetId: 	'5',
				contentColor: 	'',
				contentBGColor: '',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003333',
				b_color: 		'669999',
				c_color: 		'000000',
				d_color: 		'',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1010']=webappMappings['1010-_Ea_MOPAR_Inventory']={
webappId:    '1010',
documentId:  '1829',
internalId:  '_Ea_MOPAR_Inventory',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1010']=webappMappings['1010-_Ea_GM_Inventory']={
webappId:    '1010',
documentId:  '1806',
internalId:  '_Ea_GM_Inventory',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1010']=webappMappings['1010-_Ea_FOMOCO_Inventory']={
webappId:    '1010',
documentId:  '1852',
internalId:  '_Ea_FOMOCO_Inventory',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '2964',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '157',
internalId:  '1006',
customField: '1006'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '2958',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['1010']=webappMappings['1010-_Ea_Other_Inventory']={
webappId:    '1010',
documentId:  '3752',
internalId:  '_Ea_Other_Inventory',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1002']=webappMappings['1002-3023AHW050INXEIJ']={
webappId:    '1002',
documentId:  '3023',
internalId:  '3023AHW050INXEIJ',
customField: 'icq=false'
};
webappMappings['1001']=webappMappings['1001-ahw050inxeij7f53da973134cd63']={
webappId:    '1001',
documentId:  '250',
internalId:  'ahw050inxeij7f53da973134cd63',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inxeij7f53da973134cd63']={
webappId:    '1001',
documentId:  '6952',
internalId:  'ahw050inxeij7f53da973134cd63',
customField: 'followUp'
};
webappMappings['1501']=webappMappings['1501-178106']={
webappId:    '1501',
documentId:  '157',
internalId:  '178106',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-8bcbd0e1b6b04eddc8b2dcbf149d8c6c']={
webappId:    '7060',
documentId:  '2157',
internalId:  '8bcbd0e1b6b04eddc8b2dcbf149d8c6c',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-bb5ecf35394e0df1531beff3e99d9121']={
webappId:    '7060',
documentId:  '2243',
internalId:  'bb5ecf35394e0df1531beff3e99d9121',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-286e86f2ec6a53859f091e1f3b386f08']={
webappId:    '7060',
documentId:  '3170',
internalId:  '286e86f2ec6a53859f091e1f3b386f08',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-c6dc9da310c1f9c96642378f7b50eedb']={
webappId:    '7060',
documentId:  '3411',
internalId:  'c6dc9da310c1f9c96642378f7b50eedb',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157',
internalId:  '',
customField: '20080607-122730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1913',
internalId:  '',
customField: '20080607-123635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20080208-024644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1806',
internalId:  '',
customField: '20080208-024651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1829',
internalId:  '',
customField: '20080208-024658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3752',
internalId:  '',
customField: '20080208-024741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2388',
internalId:  '',
customField: '20080208-025432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3411',
internalId:  '',
customField: '20080208-164816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2243',
internalId:  '',
customField: '20080207-205340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3170',
internalId:  '',
customField: '20080207-190404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2157',
internalId:  '',
customField: '20080206-203323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '250',
internalId:  '',
customField: '20080208-023149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6952',
internalId:  '',
customField: '20080207-203311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2958',
internalId:  '',
customField: '20080205-211953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2964',
internalId:  '',
customField: '20080208-031714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3023',
internalId:  '',
customField: '20080205-212624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3022',
internalId:  '',
customField: '20080205-212624'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXEIJ';
var companyName   = 'Roblin%27s+Classic+Auto+Salvage';
var htmlTitle	  = 'Roblins+Garage+-+Classic+Auto+Salvage';
var metaKeywords  = 'AMC%2C+Auto%2C+Buick%2C+Cadillac%2C+Chrysler%2C+Classic%2C+Desoto%2C+Dodge%2C+Fargo%2C+Ford%2C+Hudson%2C+Imperial%2C+International%2C+Junkyard%2C+Garage%2C+Lincoln%2C+Mercury%2C+Meteor%2C+Monarch%2C+Nash%2C+Oldsmobile%2C+Plymouth%2C+Pontiac%2C+Rambler%2C+Roblin%2C+Salvage%2C+Studebaker%2C+Wrecker+';
var metaContents  = 'Roblins+Garage+-+Classic+Auto+Salvage%3A++The+Internets+ONLY+fully-pictured+auto+wrecker+-+Over+800+Cars+and+Trucks+for+Parts++Restoration+-+New%2C+Used++NOS+Parts';
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();
};
