/* [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','4920',jdecode('Home'),jdecode(''),'/4920.html','true',[],'',''],
	['PAGE','4971',jdecode('Parts+Request'),jdecode(''),'/4971.html','true',[],'',''],
	['PAGE','4992',jdecode('Contact+Info'),jdecode(''),'/4992.html','true',[],'',''],
	['PAGE','5013',jdecode('Facility+tour'),jdecode(''),'/5013.html','true',[],'',''],
	['PAGE','5034',jdecode('New+Arrivals'),jdecode(''),'/5034.html','true',[],'',''],
	['PAGE','5220',jdecode('Parts+Specials'),jdecode(''),'/5220.html','true',[],'',''],
	['PAGE','5055',jdecode('Map%2FDirections'),jdecode(''),'/5055.html','true',[],'',''],
	['PAGE','5076',jdecode('Outdoor+Storage'),jdecode(''),'/5076.html','true',[],'',''],
	['PAGE','5097',jdecode('Vintage+License+Plates'),jdecode(''),'/5097.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Card';
theSitetree.paletteFamily='E1B006';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='432';
theSitetree.graphicsetId='478';
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: 			'Card',
				paletteFamily: 	'E1B006',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'432',
				graphicsetId: 	'478',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-18864']={
webappId:    '7008',
documentId:  '4971',
internalId:  '18864',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4920',
internalId:  '',
customField: '20100803-170805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4971',
internalId:  '',
customField: '20100803-171856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4992',
internalId:  '',
customField: '20100803-172320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5013',
internalId:  '',
customField: '20100803-211719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5034',
internalId:  '',
customField: '20100803-211901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5220',
internalId:  '',
customField: '20100803-212412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5055',
internalId:  '',
customField: '20100803-212625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5076',
internalId:  '',
customField: '20100803-213032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5097',
internalId:  '',
customField: '20100803-213555'
};
webappMappings['1501']=webappMappings['1501-6033416']={
webappId:    '1501',
documentId:  '4920',
internalId:  '6033416',
customField: '1501'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I71MTU';
var companyName   = 'Svigel+Auto+Parts+Inc.+';
var htmlTitle	  = '';
var metaKeywords  = 'Auto+parts%2C+reconditioned+parts%2C+salvage+parts%2C+storage%2C+Englewood%2C+Colorado%2C+Denver%2C+surrounding+areas%2C+buy+salvage+vehicles%2C+green+recycling%2C+parts+for+classic%2C+antique+to+2005.+new+parts+and+used+parts%2C+after+market+parts%2C+shipping%2C+worldwide+shipping%2C+family+owned+and+operated+for+over+80+years%2C+towing+and+insurance+storage%2C+tire+service%2C+rotate+and+balance%2C+centrally+located%2C+minutes+from+Denver%2C+Arapahoe+County%2C+custom+cut+glass+for+any+make+and+model%2C+parts+for+most+American+makes+and+models%2C++special+orders%2C+rebuild+starters%2C+rebuild+carburetors%2C+install+windshields%2Cvintage+auto+parts%2C+hotrods+and+ratrods%2C+1938-2005%2C+nos+parts%2C+accessories%2C+batteries%2C+hubcaps%2C+transmissions%2C+grills%2C+clutches%2C+clutch+plates%2C+American+Made+parts%2C+oem%2C+headlights%2C+taillights%2C+parts+locator%2C+turn+drums+and+rotors.+++';
var metaContents  = 'Svigels+Used+Auto+And+Truck+Parts+has+new+and+used+car+parts+in+business+for+75+years.%0D%0ASvigels+Used+Auto+And+Truck+Parts+has+new+and+used+car+parts+in+business+for+75+yeares.+...+Svigel%27s+Auto+Parts+Inc.+4393+South+Santa+Fe.+Englewood%2C+CO.+80110+%0D%0A%28303%29+781-4307+-+4393+S+Santa+Fe+Dr%2C+Englewood%2C+CO+80110+%0D%0ASvigel%27s+Auto+Parts+Incorporated%2C+Englewood%2C+CO+%3A+Reviews+and+maps+-+Yahoo%21+Local%2C+303.781.4307.+Get+Ratings%2C+Reviews%2C+Photos+%0D%0ASvigel%27s+Auto+Parts+Inc.+4393+S+Santa+Fe+Dr.+Sheridan%2CColorado.+80110.+Phone%3A+303-781-4307+...+Auto+Recyclers.+Englewood+CO+80110+%2C80110%2CEnglewood.+Autorecyclers+Inc+...%0D%0A';
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();
};

