/* [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(''), jdecode('%2F94.html'), 'true',[],'',''],
	['PAGE','489',jdecode('About+Us'),jdecode(''), jdecode('%2F489.html'), 'true',[],'',''],
	['PAGE','97823',jdecode('Vision%2C+Mission%2C+Values'),jdecode(''), jdecode('%2F97823.html'), 'true',[],'',''],
	['PAGE','55301',jdecode('Services'),jdecode(''), jdecode('%2F55301.html'), 'true',[],'',''],
	['PAGE','124723',jdecode('Our+Process'),jdecode(''), jdecode('%2F124723.html'), 'true',[],'',''],
	['PAGE','30001',jdecode('Project+Portfolio'),jdecode(''), jdecode('%2F30001%2Findex.html'), 'true',[ 
		['PAGE','32301',jdecode('Additions+%26+Windows'),jdecode(''), jdecode('%2F30001%2F32301.html'), 'false',[],'',''],
		['PAGE','32701',jdecode('Kitchens'),jdecode(''), jdecode('%2F30001%2F32701.html'), 'false',[],'',''],
		['PAGE','33101',jdecode('Basements'),jdecode(''), jdecode('%2F30001%2F33101.html'), 'false',[],'',''],
		['PAGE','33501',jdecode('Bathrooms'),jdecode(''), jdecode('%2F30001%2F33501.html'), 'false',[],'',''],
		['PAGE','33901',jdecode('Outdoor%2FIndoor+Structures'),jdecode(''), jdecode('%2F30001%2F33901.html'), 'false',[],'','']
	],'',''],
	['PAGE','7785',jdecode('Testimonials'),jdecode(''), jdecode('%2F7785.html'), 'true',[],'',''],
	['PAGE','507',jdecode('Contact+Us'),jdecode(''), jdecode('%2F507.html'), 'true',[],'',''],
	['PAGE','100023',jdecode('Blog%2C+Twitter+%26+Facebook'),jdecode(''), jdecode('%2F100023.html'), 'true',[],'',''],
	['PAGE','61322',jdecode('E-News+Sign+Up'),jdecode(''), jdecode('%2F61322.html'), 'true',[],'',''],
	['PAGE','90323',jdecode('NARI'),jdecode(''), jdecode('%2F90323.html'), 'true',[],'',''],
	['PAGE','101123',jdecode('The+Not+So+Big%C2%AE+House'),jdecode(''), jdecode('%2F101123.html'), 'true',[],'',''],
	['PAGE','9501',jdecode('Newsletters+%26+Articles'),jdecode(''), jdecode('%2F9501%2Findex.html'), 'true',[ 
		['PAGE','77823',jdecode('The+Remodeling+Process'),jdecode(''), jdecode('%2F9501%2F77823.html'), 'false',[],'',''],
		['PAGE','23901',jdecode('The+Top+Ten+Remodeling+List'),jdecode(''), jdecode('%2F9501%2F23901.html'), 'false',[],'',''],
		['PAGE','67301',jdecode('Kitchen+Remodel+Ideas'),jdecode(''), jdecode('%2F9501%2F67301.html'), 'false',[],'',''],
		['PAGE','95523',jdecode('You+Don%26%23x27%3Bt+Have+to+Go+Huge+to+Go+Green'),jdecode(''), jdecode('%2F9501%2F95523.html'), 'false',[],'',''],
		['PAGE','119023',jdecode('Fall+Winter+Maintenance'),jdecode(''), jdecode('%2F9501%2F119023.html'), 'false',[],'',''],
		['PAGE','64201',jdecode('Seasonal+Maintenance'),jdecode(''), jdecode('%2F9501%2F64201.html'), 'false',[],'',''],
		['PAGE','25401',jdecode('Fun+Facts'),jdecode(''), jdecode('%2F9501%2F25401.html'), 'false',[],'',''],
		['PAGE','105823',jdecode('25+Ways+to+Improve+Your+Health'),jdecode(''), jdecode('%2F9501%2F105823.html'), 'false',[],'','']
	],'',''],
	['PAGE','81544',jdecode('Volunteer+Corner'),jdecode(''), jdecode('%2F81544%2Findex.html'), 'true',[ 
		['PAGE','79323',jdecode('The+Giving+Garden'),jdecode(''), jdecode('%2F81544%2F79323.html'), 'false',[],'',''],
		['PAGE','123723',jdecode('Rebuilding+Together+Aurora'),jdecode(''), jdecode('%2F81544%2F123723.html'), 'false',[],'',''],
		['PAGE','80644',jdecode('Cary+Grove+Neighborhood+Life'),jdecode(''), jdecode('%2F81544%2F80644.html'), 'false',[],'',''],
		['PAGE','22943',jdecode('Habitat+for+Humanity'),jdecode(''), jdecode('%2F81544%2F22943.html'), 'false',[],'','']
	],'',''],
	['PAGE','113623',jdecode('Choosing+a+Contractor'),jdecode(''), jdecode('%2F113623.html'), 'true',[],'',''],
	['PAGE','7806',jdecode('Energy+Tax+Credits'),jdecode(''), jdecode('%2F7806.html'), 'true',[],'',''],
	['PAGE','108923',jdecode('EPA+RRP+Lead+Rule'),jdecode(''), jdecode('%2F108923.html'), 'true',[],'','']];
var siteelementCount=34;
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 prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTC24G'
};
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: '20100902-141954'
};
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: '20110127-113705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124723',
internalId:  '',
customField: '20110723-151355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113623',
internalId:  '',
customField: '20110124-152559'
};
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: '20120106-181332'
};
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: '20100829-161017'
};
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:  '123723',
internalId:  '',
customField: '20110124-164518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119023',
internalId:  '',
customField: '20101014-163713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7806',
internalId:  '',
customField: '20110124-164846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77823',
internalId:  '',
customField: '20090513-181503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79323',
internalId:  '',
customField: '20110124-162719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97823',
internalId:  '',
customField: '20110124-144756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80644',
internalId:  '',
customField: '20090317-144516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81544',
internalId:  '',
customField: '20110124-164642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90323',
internalId:  '',
customField: '20090509-232759'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSXY';
var companyName   = 'Building+Better+Not+Bigger';
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();
};

