/* [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','6801',jdecode('Home'),jdecode(''), jdecode('%2F6801.html'), 'true',[],'',''],
	['PAGE','63101',jdecode('Contact'),jdecode(''), jdecode('%2F63101.html'), 'true',[],'',''],
	['PAGE','59843',jdecode('About+us'),jdecode(''), jdecode('%2F59843.html'), 'true',[],'',''],
	['PAGE','60301',jdecode('Services'),jdecode(''), jdecode('%2F60301.html'), 'true',[],'',''],
	['PAGE','67001',jdecode('Comments'),jdecode(''), jdecode('%2F67001.html'), 'true',[],'','']];
var siteelementCount=5;
theSitetree.topTemplateName='Undulate';
theSitetree.paletteFamily='413D42';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33124';
theSitetree.graphicsetId='14071';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='413D42';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Undulate',
				paletteFamily: 	'413D42',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33124',
				graphicsetId: 	'14071',
				contentColor: 	'FFFFFF',
				contentBGColor: '413D42',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20110504-113924'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67001',
internalId:  '',
customField: '20110504-114508'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60301',
internalId:  '',
customField: '20110503-153147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63101',
internalId:  '',
customField: '20110504-123702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59843',
internalId:  '',
customField: '20110504-121216'
};
webappMappings['1002']=webappMappings['1002-67001avf340i7cr5b']={
webappId:    '1002',
documentId:  '67001',
internalId:  '67001avf340i7cr5b',
customField: 'icq=false'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CR5B';
var companyName   = 'Roland+Automotive+Group+704-393-3500';
var htmlTitle	  = 'Roland+Automotive+Group';
var metaKeywords  = 'engine%2C+engine+replacement%2C+engine+repairs%2C+engine+diagnostics%2C+powertrain%2C+cylinder+head%2C+seals%2C+gaskets%2C+timing+belt%2C+timing+chain%2C+tune-up%2C+injectors%2C+fuel+systems%2Cfuel+system+repairs%2C+fuel+system+diagnostics%2C+cooling+system%2C+cooling+system+diagnostics%2C+cooling+system+repairs%2C+hoses%2C+radiators%2C+water+pump%2C+drive+belts%2C+belts%2C+filters%2C+oil+change%2C+transmission%2C+transmission+replacement%2C+transmission+service%2C+transmission+diagnostics%2C+drivetrain%2C+driveline%2C+axles%2C+cv+axles%2C+u-joints%2C+bearings%2C+gears%2C+seals%2C+wheel+bearings%2C+drivetrain+diagnostics%2C+drivetrain+repairs%2C+driveline+diagnostics%2C+driveline+repairs%2C+brakes%2C+brake+diagnostics%2C+brake+repairs%2C+disc+brakes%2C+drum+brakes%2C+ABS%2C+ABS+diagnostics%2C+ABS+repairs%2C+suspension+diagnostics%2C+suspension+repairs%2C+suspension%2C+shocks%2C+struts%2C+bushings%2C+bearings%2C+adjustments%2C+tire+rotations%2C+steering%2C+steering+repairs%2C+steering+diagnostics%2C+power+steering%2C+power+steering+pumps%2C+power+steering+lines+and+hoses%2C+electrical%2C+electrical+diagnostics%2C+electrical+repairs%2C+charging+system%2C+alternator%2C+starting+system%2C+starter%2C+battery%2C+cables%2C+computer%2C+computer+diagnostics%2C+computer+repairs%2C+sensors%2C+computer+sensors%2C+computer+scanning%2C+check+engine+light%2C+air+bag%2C+air+bag+diagnostics%2C+air+bag+repairs%2C+interior+upgrades%2C+exterior+upgrades%2C+customizing%2C+custom%2C+automotive+glass%2C+lighting%2C+roland%2C+roland+automotive+group%2C+roland+automotive%2C+Roland%2C+Roland+Automotive+Group%2C+Roland+Automotive%2C+rolandautomotivegroup.com%2C+charlotte%2C+charlotte%2Cnc%2C+Charlotte%2C+Charlotte%2CNC%2C+NC%2C+nc%2C+4903+rozzellles+ferry+rd.%2C+quality%2C+low+price%2C+flexible%2C+customer+service%2C+diesel%2C+gasoline%2C+small+engine%2C+auto+repair%2C+auto+service';
var metaContents  = 'automotive+repairs+and+services%2C+car+and+truck+customizing+and+upgrades%2C+domestic+and+import+cars+and+trucks%2C+diesel+and+gasoline+vehicles%2C+low+price%2C+quality%2C+ASE+certified+mechanic%2Ftechnician%2C+flexible%2C+customer+assistance+driven%2C+bumper+to+bumper+repairs%2Cmaintenance%2C+services.+Roland+Automotive+Group%2C+roland+automotive+group%2C+rolandautomotivegroup.com%2C+charlotte%2Cnc%2C+4903+rozzelles+ferry+rd.%2C+family+owned+and+operated%2C+704-393-3500%2C+auto+repair%2C+auto+service';
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();
};

