/* [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 theSitetree=[ 
	['PAGE','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','48801',jdecode('Image+Gallery'),jdecode(''),'/48801/index.html','true',[ 
		['PAGE','57412',jdecode('Tetelestia'),jdecode(''),'/48801/57412.html','true',[],''],
		['PAGE','49101',jdecode('Fireplaces+'),jdecode(''),'/48801/49101.html','true',[],''],
		['PAGE','49201',jdecode('Residential'),jdecode(''),'/48801/49201.html','true',[],'']
	],''],
	['PAGE','41916',jdecode('Services'),jdecode(''),'/41916/index.html','true',[ 
		['PAGE','15322',jdecode('Fireplaces'),jdecode(''),'/41916/15322.html','true',[],''],
		['PAGE','22601',jdecode('Rumford'),jdecode(''),'/41916/22601.html','true',[],''],
		['PAGE','26501',jdecode('Isokern'),jdecode(''),'/41916/26501.html','true',[],'']
	],''],
	['PAGE','17701',jdecode('Stone'),jdecode(''),'/17701/index.html','true',[ 
		['PAGE','25601',jdecode('Natural+Stone'),jdecode(''),'/17701/25601.html','true',[],''],
		['PAGE','25622',jdecode('Cultured+Stone'),jdecode(''),'/17701/25622.html','true',[],'']
	],''],
	['PAGE','15343',jdecode('Outdoors'),jdecode(''),'/15343.html','true',[],''],
	['PAGE','43422',jdecode('Silver+Creek+'),jdecode(''),'/43422/index.html','true',[ 
		['PAGE','43431',jdecode('Slate'),jdecode(''),'/43422/43431.html','true',[],''],
		['PAGE','43599',jdecode('Limestone'),jdecode(''),'/43422/43599.html','true',[],''],
		['PAGE','43608',jdecode('Travertine'),jdecode(''),'/43422/43608.html','true',[],''],
		['PAGE','43440',jdecode('Pavers'),jdecode(''),'/43422/43440.html','true',[],''],
		['PAGE','43449',jdecode('Octant+Kits'),jdecode(''),'/43422/43449.html','false',[],''],
		['PAGE','43458',jdecode('Caps+and+Bar+Tops'),jdecode(''),'/43422/43458.html','false',[],''],
		['PAGE','43467',jdecode('Flagstone'),jdecode(''),'/43422/43467.html','false',[],'']
	],''],
	['PAGE','43476',jdecode('Rockwood'),jdecode(''),'/43476/index.html','false',[ 
		['PAGE','43485',jdecode('Retaining+Walls'),jdecode(''),'/43476/43485.html','true',[],''],
		['PAGE','43494',jdecode('Freestanding+Walls'),jdecode(''),'/43476/43494.html','true',[],''],
		['PAGE','43503',jdecode('Garden+Walls'),jdecode(''),'/43476/43503.html','true',[],''],
		['PAGE','43512',jdecode('Pavers'),jdecode(''),'/43476/43512.html','true',[],''],
		['PAGE','43521',jdecode('Accessories'),jdecode(''),'/43476/43521.html','true',[],'']
	],''],
	['PAGE','42466',jdecode('Testimonials'),jdecode(''),'/42466.html','true',[],''],
	['PAGE','44227',jdecode('Community'),jdecode(''),'/44227.html','true',[],''],
	['PAGE','594',jdecode('Employment+'),jdecode(''),'/594.html','true',[],''],
	['PAGE','15385',jdecode('Our+Team'),jdecode(''),'/15385.html','true',[],''],
	['PAGE','2201',jdecode('Contact+Info'),jdecode(''),'/2201.html','true',[],''],
	['PAGE','4401',jdecode('Contact+Info+%28follow+up+page%29'),jdecode(''),'/4401/index.html','false',[ 
		['PAGE','43554',jdecode('Location'),jdecode(''),'/4401/43554.html','true',[],'']
	],''],
	['PAGE','20801',jdecode('Partners'),jdecode(''),'/20801.html','true',[],''],
	['PAGE','42310',jdecode('Great+Deals%21'),jdecode(''),'/42310.html','true',[],'']];
var siteelementCount=36;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10344';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10344',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahw050inxs6k5496ec8162f08b0d']={
webappId:    '1001',
documentId:  '2201',
internalId:  'ahw050inxs6k5496ec8162f08b0d',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inxs6k5496ec8162f08b0d']={
webappId:    '1001',
documentId:  '4401',
internalId:  'ahw050inxs6k5496ec8162f08b0d',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43422',
internalId:  '',
customField: '20090211-103157'
};
webappMappings['7060']=webappMappings['7060-f2cb85eaafc2768ff332ff5c4d0c7270']={
webappId:    '7060',
documentId:  '49101',
internalId:  'f2cb85eaafc2768ff332ff5c4d0c7270',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-6ab9052e3a9b07cf8fca952a4d1e249e']={
webappId:    '7060',
documentId:  '49201',
internalId:  '6ab9052e3a9b07cf8fca952a4d1e249e',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100127-144918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42466',
internalId:  '',
customField: '20090121-090708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42310',
internalId:  '',
customField: '20081111-153142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41916',
internalId:  '',
customField: '20090720-173418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15322',
internalId:  '',
customField: '20090423-111247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20080208-183758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26501',
internalId:  '',
customField: '20080708-174812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20090325-131520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20080304-150532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25622',
internalId:  '',
customField: '20080708-185412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15343',
internalId:  '',
customField: '20090720-173446'
};
webappMappings['7060']=webappMappings['7060-7531af6af1f81eff5e201c7737672588']={
webappId:    '7060',
documentId:  '57412',
internalId:  '7531af6af1f81eff5e201c7737672588',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20090423-172658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15385',
internalId:  '',
customField: '20090914-085659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20100127-151606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20070918-143925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20100127-150657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43554',
internalId:  '',
customField: '20090210-174143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43431',
internalId:  '',
customField: '20090211-104015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43440',
internalId:  '',
customField: '20090211-102845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43449',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43458',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43467',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43476',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43485',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43494',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43503',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43512',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43521',
internalId:  '',
customField: '20090210-171649'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '43554',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43599',
internalId:  '',
customField: '20090211-095320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43608',
internalId:  '',
customField: '20090211-101718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57412',
internalId:  '',
customField: '20100127-144834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48801',
internalId:  '',
customField: '20100127-150149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49101',
internalId:  '',
customField: '20090709-125018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44227',
internalId:  '',
customField: '20090720-173559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49201',
internalId:  '',
customField: '20090709-125309'
};
webappMappings['1501']=webappMappings['1501-22122']={
webappId:    '1501',
documentId:  '501',
internalId:  '22122',
customField: '1501'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXS6K';
var companyName   = '%28406%29+257-4930';
var htmlTitle	  = 'GT+Masonry+-+Distinctive+Craftsmanship+since+2000';
var metaKeywords  = 'GT+Masonry+Kalispell+Marion+Montana+stone+silver+creek+stoneworks+silver+creek+rockwood+retaining+walls++commercial+residential++block+brick+Rumford+fireplace+fire+place+Donovan+Sweem+Whitefish+quality+detail+custom+stone+quality+brick+block+and+custom+stone+licensed+insured+specializing+specialize+custom+craftsman+satisfaction+certified+GT+Masonry+Kalispell+Marion+Montana+stone+block+brick+Rumford+certified+fireplace+fire+place+licensed+insured+specializing+quality+detail+design+MT+block+brick+stone+custom+craftsman+Marion+log+homeGT+Masonry+Kalispell+Marion+Montana+stone+block+brick+Rumford+certified+fireplace+fire+place+licensed+insured+specializing+quality+detail+design+MT+block+brick+stone+custom+craftsman+Marion+log+home+design+craftsmanship+chief+cliff+moss+whitefish+bigfork+thompson+falls+somers+creston+eureka+hot+springs+paradise+plains+glacier+park+happys+inn+libby+columbia+falls+apgar+olney+stryker+rexford+kila+troy+rollins+dayon+elmo+big+arm+polson+swan+lake+lone+pine+lakeside+camas+trout+creek+perma+dixon+ronan+rocky+point+yellow+bay+flathead+lake+whitefish+lake+whitefish+lake+flathead+lake+rocky+point+swan+lake+Big+mountain+Whitefish+mountain+Iron+Horse++Happys+Inn+Columbia+Falls+Thompson+Falls+Lone+Pine+59911+59937+59935+59901+59925+59*+Montana';
var metaContents  = 'GT+Masonry+Kalispell+Marion+Montana++commercial+residential+stone+block+brick+Rumford+certified+fireplace+fire+place+licensed+insured+specializing+quality+detail+design+MT+block+brick+stone+custom+craftsman+Marion+log+home+design+craftsmanship+chief+cliff+moss+whitefish+bigfork+thompson+falls+somers+creston+eureka+hot+springs+paradise+plains+glacier+park+happys+inn+libby+columbia+falls+apgar+olney+stryker+rexford+kila+troy+rollins+dayon+elmo+big+arm+polson+swan+lake+lone+pine+lakeside+camas+trout+creek+perma+dixon+ronan+rocky+point+yellow+bay+flathead+lake+whitefish+lake+whitefish+lake+flathead+lake+rocky+point+swan+lake+Big+mountain+Whitefish+mountain+Iron+Horse++Happys+Inn+Columbia+Falls+Thompson+Falls+Lone+Pine+59911+59937+59935+59901+59925+59*+Montana+silver+creek+stoneworks+silver+creek+rockwood+retaining+walls++';
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();
};
