/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','1057',jdecode('About+Us'),jdecode(''),'/1057.html','true',[],'',''],
	['PAGE','1078',jdecode('Facility'),jdecode(''),'/1078.html','true',[],'',''],
	['PAGE','1015',jdecode('Current+Offers'),jdecode(''),'/1015.html','true',[],'',''],
	['PAGE','952',jdecode('Available+Services'),jdecode(''),'/952.html','true',[],'',''],
	['PAGE','1036',jdecode('Used+Cars+for+Sale'),jdecode(''),'/1036.html','true',[],'',''],
	['PAGE','17501',jdecode('Request+Appointment'),jdecode(''),'/17501.html','true',[],'',''],
	['PAGE','1099',jdecode('Directions+%26+Hours'),jdecode(''),'/1099.html','true',[],'',''],
	['PAGE','17522',jdecode('Contact+Us'),jdecode(''),'/17522.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Trend';
theSitetree.paletteFamily='3F70CF';
theSitetree.keyvisualId='7972';
theSitetree.keyvisualName='kv_7972.jpg';
theSitetree.fontsetId='16911';
theSitetree.graphicsetId='12323';
theSitetree.contentColor='163D88';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Trend',
				paletteFamily: 	'3F70CF',
				keyvisualId: 	'7972',
				keyvisualName: 	'kv_7972.jpg',
				fontsetId: 		'16911',
				graphicsetId: 	'12323',
				contentColor: 	'163D88',
				contentBGColor: 'FFFFFF',
				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['1501']=webappMappings['1501-8429012']={
webappId:    '1501',
documentId:  '901',
internalId:  '8429012',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-875']={
webappId:    '7008',
documentId:  '17501',
internalId:  '875',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20081211-080537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1057',
internalId:  '',
customField: '20080125-172208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20080125-172610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1015',
internalId:  '',
customField: '20100316-094605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20080125-171840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20081129-133827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20080121-105713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1099',
internalId:  '',
customField: '20080126-194428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17522',
internalId:  '',
customField: '20080121-120627'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLSOT';
var companyName   = 'Milton+Tire+and+Auto+Sales';
var htmlTitle	  = 'Milton+Tire+and+Auto+Sales';
var metaKeywords  = 'Automotive%3B+Sales%3B+Used+Cars%3B+Used+Trucks%3B+Used+SUVs%3B+Used+Vans%3B+Used+Automobile+Dealer%3B+Auto%3B+Service%3B+Repair%3B+Car%3B+Care%3B+Vehicle%3B+Truck%3B+Van%3B+SUV%3B+Preventive%3B+Warranty%3B+Maintenance%3B+Inspections%3B+Diagnosis%3B+Oil%3B+Lube%3B+Change%3B+Tune+Up%3B+Fleet%3B+Replace%3B+Technician%3B+15K%3B+15%2C000%3B+30K%3B+30%2C000%3B+60K%3B+60%2C000%3B+90k%3B+90%2C000%3B+Miles%3B+Air+conditioning%3B+Alignment%3B+Alternator%3B+American%3B+Appointment%3B+ASE%3B+Automatic%3B+Axle%3B+Batteries%3B+Belts%3B+Brake%3B+Certified%3B+Change%3B+Clean%3B+Commercial%3B+Community%3B+Coolant%3B+Cooling%3B+Coupons%3B+Diagnostic%3B+Differential%3B+Domestic%3B+Electrical%3B+Emissions%3B+Engines%3B+Excellence%3B+Exhaust%3B+Expert%3B+Filter%3B+Fix%3B+Fluid%3B+Flush%3B+Fuel%3B+Foreign%3B+Garage%3B+Heating%3B+Hoses%3BInjection%3B+Labor%3B+Leak%3B+Linings%3B+Manual%3B+Mechanic%3B+Modern%3B+Motor%3B+Muffler%3B+National%3B+Nationwide%3B+Neighbor%3B+Neighborhood%3B+New%3B+Noise%3B+Pads%3B+Parts%3B+Power%3B+Professional%3B+Pumps%3B+Replacement%3B+Rotation%3B+Safety%3B+Shocks%3B+Shop%3B+Specials%3B+Starter%3B+Steering%3B+Struts%3B+Suspension%3B+Tank%3B+Thermostat%3B+Tire%3B+Test%3B+Transmission%3B+Wheels%3B+Goodyear%3B+Dunlop%3B+Yokohama%3B+Bridgestone%3B+BF+Goodrich%3B+Toyo%3B+Pirelli%3B+Kumho%3B+Michelin%3B+Fierce%3B+Chevy%3B+Chevrolet%3B+Ford%3B+Dodge%3B+Chrysler%3BBuick%3B+GM%3B+GMC%3B+Cadillac%3B+Jeep%3B+Lincoln%3B+Oldsmobile%3B+Pontiac%3B+Acura%3B+Audi%3B+BMW%3B+Honda%3B+Hummer%3B+Hyundai%3B+Infiniti%3B+Jaguar%3BIsuzu%3B+Kia%3B+Lexus%3B+Mazda%3B+Mercedes%3B+Mitsubishi%3B+Nissan%3B+Saab%3B+Saturn%3B+Subaru%3B+Suzuki%3B+Toyota%3B+Volkswagen%3B+Volvo%3B+Tuning%3B+Oil+Change%3B+Alpharetta%3B+Milton%3B+Roswell%3Bebay%3Bebaymotors%3Bauction%3Blocator%3Balpharetta%3Bga%3Bgeorgia%3Bmilton%3Bnorth+fulton%3Bwinward+parkway%3Bhighway+9%3Byou+tube%3Bcraigslist';
var metaContents  = 'North+Fultons+Premier+Automotive+Service+and+Sales+Facility';
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();
};
