/* [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','52',jdecode('Home'),jdecode(''),'/52.html','true',[],'',''],
	['PAGE','73',jdecode('About+us'),jdecode(''),'/73.html','true',[],'',''],
	['PAGE','127',jdecode('Contact'),jdecode(''),'/127.html','true',[],'',''],
	['PAGE','3470',jdecode('Directions'),jdecode(''),'/3470.html','true',[],'',''],
	['PAGE','91',jdecode('Products+and+Brochures'),jdecode(''),'/91/index.html','true',[ 
		['PAGE','1887',jdecode('Conestoga+Full+Line+Brochure'),jdecode(''),'/91/1887.html','true',[],'',''],
		['PAGE','1896',jdecode('Distinctive+Designs'),jdecode(''),'/91/1896.html','true',[],'',''],
		['PAGE','1905',jdecode('Gonestoga+Guide'),jdecode(''),'/91/1905.html','true',[],'',''],
		['PAGE','5908',jdecode('Meridian+Products'),jdecode(''),'/91/5908.html','true',[],'',''],
		['PAGE','5917',jdecode('Premoule+Thermoplastic'),jdecode(''),'/91/5917.html','true',[],'',''],
		['PAGE','7596',jdecode('Wood+Accents'),jdecode(''),'/91/7596.html','true',[],'',''],
		['PAGE','9216',jdecode('Decorative+Hardware'),jdecode(''),'/91/9216.html','true',[],'',''],
		['PAGE','6966',jdecode('Corian+Solid+Surface'),jdecode(''),'/91/6966.html','true',[],'',''],
		['PAGE','8011',jdecode('Commercial+Casework'),jdecode(''),'/91/8011.html','true',[],'','']
	],'',''],
	['PAGE','28201',jdecode('Promo-+Specials'),jdecode(''),'/28201.html','true',[],'',''],
	['PAGE','488',jdecode('Handyman+Service+Repair+++++++++++++++++'),jdecode(''),'/488.html','true',[],'',''],
	['PAGE','154',jdecode('Offers++Discounts+'),jdecode(''),'/154.html','false',[],'',''],
	['PAGE','7804',jdecode('Featured+Products'),jdecode(''),'/7804.html','true',[],'',''],
	['PAGE','5612',jdecode('Update'),jdecode(''),'/5612.html','true',[],'',''],
	['PAGE','6865',jdecode('Links'),jdecode(''),'/6865.html','true',[],'',''],
	['PAGE','22201',jdecode('Photo+Gallery'),jdecode(''),'/22201.html','true',[],'',''],
	['PAGE','66915',jdecode('Innovative+Design+Ideas'),jdecode(''),'/66915.html','true',[],'',''],
	['PAGE','51101',jdecode('Clearance+Items'),jdecode(''),'/51101.html','true',[],'',''],
	['PAGE','57701',jdecode('%22How+Many+How+Much%22'),jdecode(''),'/57701.html','true',[],'',''],
	['PAGE','25301',jdecode('For+Rent'),jdecode(''),'/25301.html','true',[],'',''],
	['PAGE','58801',jdecode('SHOPPING+CART'),jdecode(''),'/58801.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='479949';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10895';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'479949',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10895',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'479949',
				e_color: 		'479949',
				f_color: 		'479949',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '52',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '3470',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127',
internalId:  '',
customField: '20090910-092217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73',
internalId:  '',
customField: '20100318-090535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66915',
internalId:  '',
customField: '20100324-182024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52',
internalId:  '',
customField: '20100417-074304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3470',
internalId:  '',
customField: '20071103-211444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20091005-171359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1887',
internalId:  '',
customField: '20071027-180905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1896',
internalId:  '',
customField: '20071027-204610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1905',
internalId:  '',
customField: '20071027-215954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5908',
internalId:  '',
customField: '20071028-204240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5917',
internalId:  '',
customField: '20071029-175406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7596',
internalId:  '',
customField: '20071101-183811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9216',
internalId:  '',
customField: '20071231-163835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6966',
internalId:  '',
customField: '20071224-200204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8011',
internalId:  '',
customField: '20071103-215814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7804',
internalId:  '',
customField: '20071103-212518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154',
internalId:  '',
customField: '20100325-100607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5612',
internalId:  '',
customField: '20071107-132825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6865',
internalId:  '',
customField: '20100418-082851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '488',
internalId:  '',
customField: '20100325-100542'
};
webappMappings['7060']=webappMappings['7060-da36ac4a710554d91434f92af96c5675']={
webappId:    '7060',
documentId:  '66915',
internalId:  'da36ac4a710554d91434f92af96c5675',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-7e827c0180319c01f37730563f2f2e69']={
webappId:    '7060',
documentId:  '22201',
internalId:  '7e827c0180319c01f37730563f2f2e69',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20091012-143901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20100325-104446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20100325-101820'
};
webappMappings['7060']=webappMappings['7060-2dda84eff56bbbbd23a02fe2cedbdc93']={
webappId:    '7060',
documentId:  '51101',
internalId:  '2dda84eff56bbbbd23a02fe2cedbdc93',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51101',
internalId:  '',
customField: '20100115-164409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20100416-124241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58801',
internalId:  '',
customField: '20100110-164924'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN33HD';
var companyName   = 'Modern+Woodworking+Co.';
var htmlTitle	  = 'Modern+Woodworking+Co.';
var metaKeywords  = 'kitchen+cabinets%2C+bathroom+vanities%2C+custom+woodwork%2C+counter+tops%2C+Corian%2C++kitchen+and+bath+remodeling%2C+counter+top+replacement%2C+cabinet+repair%2C+handyman%2C+wall+units%2C+entertainment+centers%2C+fireplace+surround%2C+cabinet+doors%2C+built-in%2C+furniture%2C+cabinet+parts%2C+moldings%2C+drawer+box%2C+wood+specialties%2C+hutch%2C+retro+cabinet+hardware+closeouts%2C+cabinet+accents%2C+corbels%2C+appliqu%C3%A9s%2C+table+legs%2C+bun+feet%2C+custom+wood+pieces%2C+cabinet%2C+wood+products%2C+wood+parts%2C+kitchen+accessories%2C+household+items%2C+price+calculators%2C+spreadsheets%2C+cost+estimator%2C+computer+price+and+cost+programs';
var metaContents  = 'kitchen+cabinet%2C+kitchen+and+bath+remodeling%2C+custom+woodwork%2C+custom+kitchen+cabinet%2C+cabinet+maker%2C+wood+products%2C+kitchen+counter%2C+cabinet+parts%2C+repair%2C+handyman%2C+architectural+woodwork';
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();
};
