/* [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','94',jdecode('HOME'),jdecode(''),'/94.html','true',[],'',''],
	['PAGE','489',jdecode('ABOUT+US'),jdecode(''),'/489.html','true',[],'',''],
	['PAGE','97823',jdecode('VISION%2C+MISSION%2C+VALUES'),jdecode(''),'/97823.html','true',[],'',''],
	['PAGE','113623',jdecode('CHOOSING+A+CONTRACTOR'),jdecode(''),'/113623.html','true',[],'',''],
	['PAGE','90323',jdecode('NARI'),jdecode(''),'/90323.html','true',[],'',''],
	['PAGE','507',jdecode('CONTACT+US'),jdecode(''),'/507.html','true',[],'',''],
	['PAGE','55301',jdecode('SERVICES'),jdecode(''),'/55301.html','true',[],'',''],
	['PAGE','69401',jdecode('HANDYMAN+SERVICES'),jdecode(''),'/69401.html','true',[],'',''],
	['PAGE','30001',jdecode('PROJECT+PORTFOLIO'),jdecode(''),'/30001/index.html','true',[ 
		['PAGE','32301',jdecode('Additions+%26+Windows'),jdecode(''),'/30001/32301.html','false',[],'',''],
		['PAGE','32701',jdecode('Kitchens'),jdecode(''),'/30001/32701.html','false',[],'',''],
		['PAGE','33101',jdecode('Basements'),jdecode(''),'/30001/33101.html','false',[],'',''],
		['PAGE','33501',jdecode('Bathrooms'),jdecode(''),'/30001/33501.html','false',[],'',''],
		['PAGE','33901',jdecode('Outdoor%2FIndoor+Structures'),jdecode(''),'/30001/33901.html','false',[],'','']
	],'',''],
	['PAGE','7785',jdecode('TESTIMONIALS'),jdecode(''),'/7785.html','true',[],'',''],
	['PAGE','101123',jdecode('THE+NOT+SO+BIG%C2%AE+HOUSE'),jdecode(''),'/101123.html','true',[],'',''],
	['PAGE','100023',jdecode('BLOG%2C+TWITTER+%26+FACEBOOK%21'),jdecode(''),'/100023.html','true',[],'',''],
	['PAGE','9501',jdecode('NEWSLETTERS+%26+ARTICLES'),jdecode(''),'/9501/index.html','true',[ 
		['PAGE','77823',jdecode('The+Remodeling+Process'),jdecode(''),'/9501/77823.html','false',[],'',''],
		['PAGE','23901',jdecode('The+Top+Ten+Remodeling+List'),jdecode(''),'/9501/23901.html','false',[],'',''],
		['PAGE','67301',jdecode('Kitchen+Remodel+Ideas'),jdecode(''),'/9501/67301.html','false',[],'',''],
		['PAGE','95523',jdecode('You+Don%26%23x27%3Bt+Have+to+Go+Huge+to+Go+Green'),jdecode(''),'/9501/95523.html','false',[],'',''],
		['PAGE','64201',jdecode('Seasonal+Maintenance'),jdecode(''),'/9501/64201.html','false',[],'',''],
		['PAGE','25401',jdecode('Fun+Facts'),jdecode(''),'/9501/25401.html','false',[],'',''],
		['PAGE','105823',jdecode('25+Ways+to+Improve+Your+Health'),jdecode(''),'/9501/105823.html','false',[],'','']
	],'',''],
	['PAGE','61322',jdecode('E-NEWS+SIGN+UP'),jdecode(''),'/61322.html','true',[],'',''],
	['PAGE','81544',jdecode('VOLUNTEER+CORNER'),jdecode(''),'/81544/index.html','true',[ 
		['PAGE','79323',jdecode('The+Giving+Garden'),jdecode(''),'/81544/79323.html','false',[],'',''],
		['PAGE','80644',jdecode('Cary+Grove+Neighborhood+Life'),jdecode(''),'/81544/80644.html','false',[],'',''],
		['PAGE','22943',jdecode('Habitat+for+Humanity'),jdecode(''),'/81544/22943.html','false',[],'','']
	],'',''],
	['PAGE','61343',jdecode('FUN+PLACES%2FEVENTS'),jdecode(''),'/61343.html','true',[],'',''],
	['PAGE','7806',jdecode('ENERGY+TAX+CREDITS'),jdecode(''),'/7806.html','true',[],'',''],
	['PAGE','108923',jdecode('EPA+RRP+LEAD+RULE'),jdecode(''),'/108923.html','true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6913';
theSitetree.keyvisualName='kv_6913.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='304B5C';
theSitetree.contentBGColor='809DAF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6913',
				keyvisualName: 	'kv_6913.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12036',
				contentColor: 	'304B5C',
				contentBGColor: '809DAF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-b09071c35e614c33a08168c185c5531b']={
webappId:    '7060',
documentId:  '32301',
internalId:  'b09071c35e614c33a08168c185c5531b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105823',
internalId:  '',
customField: '20100126-160657'
};
webappMappings['7008']=webappMappings['7008-94']={
webappId:    '7008',
documentId:  '61322',
internalId:  '94',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-95']={
webappId:    '7008',
documentId:  '507',
internalId:  '95',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-5ffbe88fcfeef6ce270e2447f92be4e5']={
webappId:    '7060',
documentId:  '32701',
internalId:  '5ffbe88fcfeef6ce270e2447f92be4e5',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-01699400f4f7fe09984af3e90c9298bf']={
webappId:    '7060',
documentId:  '33101',
internalId:  '01699400f4f7fe09984af3e90c9298bf',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-de346a0aed45b5719778d806cb970012']={
webappId:    '7060',
documentId:  '33501',
internalId:  'de346a0aed45b5719778d806cb970012',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-3305702f1353c86c88645826c0aa2343']={
webappId:    '7060',
documentId:  '33901',
internalId:  '3305702f1353c86c88645826c0aa2343',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94',
internalId:  '',
customField: '20100114-163535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7785',
internalId:  '',
customField: '20091103-132547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101123',
internalId:  '',
customField: '20091217-174421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '489',
internalId:  '',
customField: '20100415-211838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '507',
internalId:  '',
customField: '20090317-161643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61322',
internalId:  '',
customField: '20100511-142324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55301',
internalId:  '',
customField: '20091103-132830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69401',
internalId:  '',
customField: '20090226-122914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113623',
internalId:  '',
customField: '20100608-141840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20091013-170748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20090513-185045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32701',
internalId:  '',
customField: '20090226-123356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33101',
internalId:  '',
customField: '20090226-123455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20090226-123547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20091013-170834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20100511-143811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20090513-175939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95523',
internalId:  '',
customField: '20090604-194742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67301',
internalId:  '',
customField: '20090226-125606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100023',
internalId:  '',
customField: '20100415-212844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22943',
internalId:  '',
customField: '20090317-144618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108923',
internalId:  '',
customField: '20100504-074433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64201',
internalId:  '',
customField: '20090226-130824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20090226-130914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61343',
internalId:  '',
customField: '20090630-132756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7806',
internalId:  '',
customField: '20100415-211941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77823',
internalId:  '',
customField: '20090513-181503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79323',
internalId:  '',
customField: '20090317-172728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97823',
internalId:  '',
customField: '20100608-133401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80644',
internalId:  '',
customField: '20090317-144516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81544',
internalId:  '',
customField: '20090513-184558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90323',
internalId:  '',
customField: '20090509-232759'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSXY';
var companyName   = 'Building+Into+Communities+One+Home+at+a+Time';
var htmlTitle	  = 'R+%26+W+Construction+Custom+Home+Remodeling%2C+Inc.';
var metaKeywords  = 'Remodeling%2C+Cary%2C+Illinois%2C+Kitchens%2C+Baths%2C+Room+Additions%2C+Additions%2C+Contractor%2C+Basements%2C+Decks%2C+Carpentry%2C+Construction';
var metaContents  = 'We+are+a+design%2Fbuild+remodeling+company+handling+all+aspects+of+our+customer%27s+projects+from+design+to+completion+with+outstanding+craftsmanship+and+customer+service.++Our+services+include%2C+but+are+not+limited+to%2C+kitchens%2C+baths%2C+room+additions%2C+basements+and+outdoor+structures.++Our+officers+are+NARI+Certified+Remodelers+and+we+are+EPA+Certified+Lead-Safe+Renovators.++Enjoy+a+stress-free+remodeling+experience+with+the+Certified+Remodelers+of+R+%26+W+Construction+Custom+Home+Remodeling%2C+Inc.++Building+into+communities+one+home+at+a+time.';
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();
};
