/* [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','8201',jdecode('HOME'),jdecode(''),'/8201.html','true',[],'',''],
	['PAGE','14401',jdecode('ABOUT+US'),jdecode(''),'/14401.html','true',[],'',''],
	['PAGE','14706',jdecode('SAFETY+PHILOSOPHY'),jdecode(''),'/14706.html','true',[],'',''],
	['PAGE','14601',jdecode('SERVICES'),jdecode(''),'/14601/index.html','true',[ 
		['PAGE','47995',jdecode('Tuck+Pointing%2FCaulking'),jdecode(''),'/14601/47995.html','true',[],'',''],
		['PAGE','41154',jdecode('Brick+Replacement'),jdecode(''),'/14601/41154.html','true',[],'',''],
		['PAGE','48021',jdecode('Lintel+Replacement'),jdecode(''),'/14601/48021.html','true',[],'',''],
		['PAGE','48012',jdecode('Stone+Repair'),jdecode(''),'/14601/48012.html','true',[],'',''],
		['PAGE','41112',jdecode('Terra+Cotta+Repair'),jdecode(''),'/14601/41112.html','true',[],'',''],
		['PAGE','41612',jdecode('Washing+%26+Cleaning'),jdecode(''),'/14601/41612.html','true',[],'','']
	],'',''],
	['PAGE','14622',jdecode('PORTFOLIO'),jdecode(''),'/14622/index.html','true',[ 
		['PAGE','48387',jdecode('CSU+Fenn+Tower+Project'),jdecode(''),'/14622/48387.html','true',[],'',''],
		['PAGE','48399',jdecode('OSU+Cockins+Hall+Project'),jdecode(''),'/14622/48399.html','true',[],'',''],
		['PAGE','48426',jdecode('CWRU+Carlton+Dorms+Project'),jdecode(''),'/14622/48426.html','true',[],'','']
	],'',''],
	['PAGE','14685',jdecode('BUSINESS+AFFILIATES'),jdecode(''),'/14685.html','true',[],'',''],
	['PAGE','48828',jdecode('REQUEST+A+QUOTE'),jdecode(''),'/48828/index.html','true',[ 
		['PAGE','48349',jdecode('Request+Form'),jdecode(''),'/48828/48349.html','true',[],'','']
	],'',''],
	['PAGE','14727',jdecode('CONTACT+US'),jdecode(''),'/14727.html','true',[],'',''],
	['PAGE','47888',jdecode('COMING+SOON'),jdecode(''),'/47888.html','false',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Jakarta';
theSitetree.paletteFamily='9E9C9C';
theSitetree.keyvisualId='7885';
theSitetree.keyvisualName='kv_7885.jpg';
theSitetree.fontsetId='16854';
theSitetree.graphicsetId='12295';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D2D2D2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'true',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Jakarta',
				paletteFamily: 	'9E9C9C',
				keyvisualId: 	'7885',
				keyvisualName: 	'kv_7885.jpg',
				fontsetId: 		'16854',
				graphicsetId: 	'12295',
				contentColor: 	'000000',
				contentBGColor: 'D2D2D2',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'9E9C9C',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20100418-150104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20100418-131525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20100207-152908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14685',
internalId:  '',
customField: '20100209-231223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14622',
internalId:  '',
customField: '20100418-134837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14706',
internalId:  '',
customField: '20100209-234210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14727',
internalId:  '',
customField: '20100209-225139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48399',
internalId:  '',
customField: '20100418-140001'
};
webappMappings['7060']=webappMappings['7060-603b79c21fd00fa0a21753d1fcf21296']={
webappId:    '7060',
documentId:  '48426',
internalId:  '603b79c21fd00fa0a21753d1fcf21296',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-a4ea0a12b2d20bccc6f5f2f156f265a0']={
webappId:    '7060',
documentId:  '48387',
internalId:  'a4ea0a12b2d20bccc6f5f2f156f265a0',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48426',
internalId:  '',
customField: '20100418-135923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48349',
internalId:  '',
customField: '20100511-221353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41154',
internalId:  '',
customField: '20100418-134101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41612',
internalId:  '',
customField: '20100418-134540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41112',
internalId:  '',
customField: '20100418-134431'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '8201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47888',
internalId:  '',
customField: '20091221-013331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47995',
internalId:  '',
customField: '20100418-133714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48021',
internalId:  '',
customField: '20100418-150236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48012',
internalId:  '',
customField: '20100418-150422'
};
webappMappings['7008']=webappMappings['7008-14165']={
webappId:    '7008',
documentId:  '48349',
internalId:  '14165',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48387',
internalId:  '',
customField: '20100418-135028'
};
webappMappings['7060']=webappMappings['7060-3adfde196ffbcc6138d9af5f72a9448a']={
webappId:    '7060',
documentId:  '48399',
internalId:  '3adfde196ffbcc6138d9af5f72a9448a',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48828',
internalId:  '',
customField: '20100511-222039'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CMDD';
var companyName   = 'Preserving+the+Past+with+Pride+and+Commitment+for+the+Future+++++++++++++++++';
var htmlTitle	  = '';
var metaKeywords  = 'Masonry+Restoration%2C+Stone+Restoration%2C+Masonry+Restoration+Cleveland%2C+Caulking%2C+Pressure+Washing%2C+Tuck+Pointing%2C+Terra+Cotta+Repair%2C+Brick+Repair%2C+Lintel+Replacement%2C+Concrete+Restoration%2C+Chemical+Cleaning%2C+Restoration+Maintenance+Programs%2C+Building+Facade+Inspections%2C+Cleveland%2C+Ohio%2C+Cuyahoga+County%2C+Northeast+Ohio%2C+Water+Repellents%2C+Water+proofing%2C+Historical+Restoration%2C+Historical+Building+Restoration%2C+Thru+Wall+Flashing%2C+Masonry+Quotes%2C+Masonry+Free+Estimates%2C+Masonry';
var metaContents  = 'Preserving+the+Past+with+Pride+and+Commitment+for+the+Future+Since+1954.+Mid+State+Restoration+specializes+in+masonry+restoration+restoring+terra+cotta%2C+limestone%2C+standstone%2C+cast+stone%2C+in+addition+to+brick+and+concrete+repairs.+';
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();
};
