/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','72899',jdecode('Estimate+kitchen+remodel+cost'),jdecode(''),'/72899.html','false',[],'',''],
	['PAGE','73499',jdecode('+estimate'),jdecode(''),'/73499.html','false',[],'',''],
	['PAGE','8501',jdecode('Services+offered'),jdecode(''),'/8501/index.html','true',[ 
		['PAGE','35099',jdecode('Design+Services'),jdecode(''),'/8501/35099.html','true',[],'',''],
		['PAGE','66299',jdecode('Cabinets'),jdecode(''),'/8501/66299.html','true',[],'',''],
		['PAGE','68099',jdecode('Economical+Cabinets'),jdecode(''),'/8501/68099.html','false',[],'',''],
		['PAGE','68999',jdecode('Economical+Cabinets+%232'),jdecode(''),'/8501/68999.html','false',[],'',''],
		['PAGE','90760',jdecode('Granite+Counters'),jdecode(''),'/8501/90760.html','true',[],'',''],
		['PAGE','24120',jdecode('+Remodeling'),jdecode(''),'/8501/24120.html','true',[],'',''],
		['PAGE','24099',jdecode('kitchen+remodeling'),jdecode(''),'/8501/24099.html','true',[],'',''],
		['PAGE','43599',jdecode('Bath+Remodeling'),jdecode(''),'/8501/43599.html','true',[],'',''],
		['PAGE','32920',jdecode('Renovations'),jdecode(''),'/8501/32920.html','true',[],'',''],
		['PAGE','40299',jdecode('Accessibility'),jdecode(''),'/8501/40299.html','true',[],'',''],
		['PAGE','42899',jdecode('Finish+Carpentry'),jdecode(''),'/8501/42899.html','true',[],'',''],
		['PAGE','43620',jdecode('Cabinet+Installs'),jdecode(''),'/8501/43620.html','true',[],'','']
	],'',''],
	['PAGE','5152',jdecode('About+us'),jdecode(''),'/5152.html','true',[],'',''],
	['PAGE','63699',jdecode('Refference+Letters'),jdecode(''),'/63699.html','true',[],'',''],
	['PAGE','32899',jdecode('Contact+an+expert'),jdecode(''),'/32899.html','true',[],'',''],
	['PAGE','5215',jdecode('Galleries'),jdecode(''),'/5215/index.html','true',[ 
		['PAGE','22199',jdecode('Online+portfolio'),jdecode(''),'/5215/22199.html','true',[],'',''],
		['PAGE','5236',jdecode('kitchens+slide+show+'),jdecode(''),'/5215/5236.html','true',[],'',''],
		['PAGE','22699',jdecode('kitchens+before+and+after'),jdecode(''),'/5215/22699.html','true',[],'',''],
		['PAGE','15101',jdecode('Bathrooms'),jdecode(''),'/5215/15101.html','true',[],'',''],
		['PAGE','15122',jdecode('kichen+cabinet+ideas'),jdecode(''),'/5215/15122.html','true',[],'',''],
		['PAGE','18301',jdecode('Manufactured+Homes'),jdecode(''),'/5215/18301.html','true',[],'',''],
		['PAGE','18322',jdecode('Home+Repairs'),jdecode(''),'/5215/18322.html','true',[],'','']
	],'',''],
	['PAGE','15164',jdecode('Tips+and+Tricks'),jdecode(''),'/15164/index.html','true',[ 
		['PAGE','13501',jdecode('upper+cabinet+bottoms'),jdecode(''),'/15164/13501.html','true',[],'',''],
		['PAGE','15185',jdecode('reversed+cabinets'),jdecode(''),'/15164/15185.html','true',[],'',''],
		['PAGE','15206',jdecode('free+standing+panels'),jdecode(''),'/15164/15206.html','true',[],'',''],
		['PAGE','15227',jdecode('cabinets+at+45degrees'),jdecode(''),'/15164/15227.html','true',[],'',''],
		['PAGE','18343',jdecode('dry+wall+patching'),jdecode(''),'/15164/18343.html','true',[],'',''],
		['PAGE','65399',jdecode('Choosing+a+Contractor'),jdecode(''),'/15164/65399.html','true',[],'','']
	],'',''],
	['PAGE','59799',jdecode('remodeling+guide'),jdecode(''),'/59799.html','true',[],'',''],
	['PAGE','65320',jdecode('bad+construction'),jdecode(''),'/65320/index.html','true',[ 
		['PAGE','13522',jdecode('Cabinetry'),jdecode(''),'/65320/13522.html','true',[],'',''],
		['PAGE','65299',jdecode('construction'),jdecode(''),'/65320/65299.html','true',[],'','']
	],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='E58F12';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11062';
theSitetree.graphicsetId='11833';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antique',
				paletteFamily: 	'E58F12',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11062',
				graphicsetId: 	'11833',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				a_color: 		'664F23',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-360cbf2d85bcf579174d51d3307d3ffb']={
webappId:    '7060',
documentId:  '5236',
internalId:  '360cbf2d85bcf579174d51d3307d3ffb',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20110217-180808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5152',
internalId:  '',
customField: '20090606-095015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5215',
internalId:  '',
customField: '20090608-085658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20080411-042619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13522',
internalId:  '',
customField: '20090531-120305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5236',
internalId:  '',
customField: '20080411-144643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20110208-074819'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20101029-103209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15122',
internalId:  '',
customField: '20080411-144442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20080530-171644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15164',
internalId:  '',
customField: '20090521-183321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15185',
internalId:  '',
customField: '20080411-151014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15206',
internalId:  '',
customField: '20080411-152226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15227',
internalId:  '',
customField: '20081016-024337'
};
webappMappings['7060']=webappMappings['7060-8f2ef14e7900844427d5154841ce42d9']={
webappId:    '7060',
documentId:  '15122',
internalId:  '8f2ef14e7900844427d5154841ce42d9',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18322',
internalId:  '',
customField: '20080530-173118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18343',
internalId:  '',
customField: '20090605-061720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22199',
internalId:  '',
customField: '20090521-154402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22699',
internalId:  '',
customField: '20090524-200157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24099',
internalId:  '',
customField: '20110214-155922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24120',
internalId:  '',
customField: '20110207-230204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32899',
internalId:  '',
customField: '20090608-091810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32920',
internalId:  '',
customField: '20090521-155324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35099',
internalId:  '',
customField: '20110124-020819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40299',
internalId:  '',
customField: '20090517-135049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42899',
internalId:  '',
customField: '20090521-155302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43599',
internalId:  '',
customField: '20091125-104516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43620',
internalId:  '',
customField: '20090521-180040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72899',
internalId:  '',
customField: '20090607-034455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59799',
internalId:  '',
customField: '20090629-224146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90760',
internalId:  '',
customField: '20110124-015144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63699',
internalId:  '',
customField: '20110214-143425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65399',
internalId:  '',
customField: '20090605-062145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65299',
internalId:  '',
customField: '20090531-115850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65320',
internalId:  '',
customField: '20090603-031819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66299',
internalId:  '',
customField: '20110207-232308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68099',
internalId:  '',
customField: '20090603-022919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68999',
internalId:  '',
customField: '20090603-023023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73499',
internalId:  '',
customField: '20090607-042638'
};
webappMappings['7008']=webappMappings['7008-17432']={
webappId:    '7008',
documentId:  '72899',
internalId:  '17432',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-17435']={
webappId:    '7008',
documentId:  '73499',
internalId:  '17435',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-17434']={
webappId:    '7008',
documentId:  '32899',
internalId:  '17434',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2O5J';
var companyName   = 'Chileab+Construction';
var htmlTitle	  = 'Chileab+Construction%2C+remodeling+Chico+Oroville+Durham+%26+all+of+Butte+County';
var metaKeywords  = 'construction%2C+contractor%2C+remodel%2C+kitchens%2C+kitchen%2C+bath%2C+Butte+county%2C+Chico%2C+Durham%2C+Oroville%2C+Paradise%2C+home+repairs%2C+remodeling%2C+cabinets%2C+refinishing%2C+resurfacing%2C+cabinet+installation%2C+home+repairs%2C+granite+counters%2C+home+improvements%2C+design%2C+3D+project+modeling%2C+Chico%2C+Oroville%2C+durham%2C+willis%2C+lasell%2C+chileab%2C+remodeling+contractor%2C+ideas+';
var metaContents  = 'Chileab+Construction+specializing+in+residential+remodeling+for+all+of+Butte+County.++Free+consultations%2C+Projects+to+match+your+budget.+';
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();
};

