/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','836',jdecode('About+us'),jdecode(''),'/836.html','true',[],'',''],
	['PAGE','16601',jdecode('Warranty%2CSales'),jdecode(''),'/16601.html','true',[],'',''],
	['PAGE','752',jdecode('Service'),jdecode(''),'/752.html','true',[],'',''],
	['PAGE','10601',jdecode('Parts+Store'),jdecode(''),'/10601.html','true',[],'',''],
	['PAGE','773',jdecode('The+team'),jdecode(''),'/773.html','true',[],'',''],
	['PAGE','794',jdecode('How+to+find+us'),jdecode(''),'/794.html','true',[],'',''],
	['PAGE','7601',jdecode('Tips+%26+Tricks'),jdecode(''),'/7601.html','true',[],'',''],
	['PAGE','34501',jdecode('Published+Articles'),jdecode(''),'/34501.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='C239A1';
theSitetree.keyvisualId='8818';
theSitetree.keyvisualName='KV_04.swf';
theSitetree.fontsetId='17181';
theSitetree.graphicsetId='12652';
theSitetree.contentColor='FFBEEF';
theSitetree.contentBGColor='262626';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Holz',
				paletteFamily: 	'C239A1',
				keyvisualId: 	'8818',
				keyvisualName: 	'KV_04.swf',
				fontsetId: 		'17181',
				graphicsetId: 	'12652',
				contentColor: 	'FFBEEF',
				contentBGColor: '262626',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'C039A3',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-11761692']={
webappId:    '1501',
documentId:  '701',
internalId:  '11761692',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100530-080539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20100323-173444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20100530-082537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20090121-195025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20090426-174913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20090729-102920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20090923-180725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20090509-180359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20090121-193030'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPJZ9';
var companyName   = 'County+R.V.+Service+Center';
var htmlTitle	  = '';
var metaKeywords  = 'Brakes%2C+Electrical%2C+Rv%2C+Parts%2C+Roofs%2C+Suspension%2C+Exhaust%2C+Systems%2C+Air+Conditioning%2C+Interior%2C+Exterior%2C+Repairs%2C+Collision%2C+Warranty%2C+Painting%2C+Replace%2C+Insurance%2C+Quotes%2C+Metal%2C+Fiber+Glass%2C+Rubber%2C+Engine%2C+Baseplates%2C+Custom%2C+Batteries%2C+Generators%2C+LPG%2C+Propane%2C+Tanks%2C+Windows%2C+Axles%2C+Water%2C+Holding%2C+Paint%2CCollision+Repair%2C+Body+Work%2C+Full+Service+Repairs%2CComplete+Service%2CSan+Diego%2CElCajon%2CSantee%2CLakeside%2CAlpine%2COceanside%2CMission+Beach%2CChula+Vista%2C+Escondido%2C+Vista%2COrange+County%2COcotillo%2CNational+City%2CRamona%2CImperial+County%2CImperial+Beach%2CLaJolla%2CMission+Viejo%2CLong+Beach%2CLoma+Santa+fe+California%2CCarlsbad%2CEscondido%2CPerris+California%2CCuyamacca+State+Park%2CTemecula%2CCapistrano%2CDelmar%2CPacific+Beach%2CMission+Bay%2CMission+Beach%2CMission+Valley%2CSpring+Valley%2CMurrieta+California%2CSan+Jaun+Capistrano%2CKearny+Mesa%2CMiramesa%2CCoronado+Calif%2CPoway%2CMount+Laguna%2CHemmit%2CDelmar%2CImperial+Beach%2COtay+Lakes%2COtay%2CSan+Marcos%2CLaguna+Nigel%2CSantee+Lakes%2CBarona%2CSun+City+California%2CCamp+Pendelton%2CCoronado+California%2CLaurence+Welks%2CTemcula%2CRancho+San+Diego%2CRancho+Cucamunga%2CFall+Brook%2CSan+Yasidro%2CCounty+RV+Parts%2C+Full+Service%2C+Repairs%2C+Custom+Baseplates%2C+Complete+RV+Service+';
var metaContents  = 'County+RV+Parts%2C+Full+Service%2C+Repairs%2C+Custom+Baseplates%2C+Complete+RV+Service+and+much+more.';
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();
};
