/* [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','3501',jdecode('Home'),jdecode(''),'/3501.html','true',[],''],
	['PAGE','3573',jdecode('About+Us'),jdecode(''),'/3573.html','true',[],''],
	['PAGE','3552',jdecode('Services'),jdecode(''),'/3552.html','true',[],''],
	['PAGE','3615',jdecode('Job+Photos'),jdecode(''),'/3615.html','true',[],''],
	['PAGE','19301',jdecode('Mold+Removal+FAQ'),jdecode(''),'/19301/index.html','true',[ 
		['PAGE','9501',jdecode('Attic+Abatement+Steps'),jdecode(''),'/19301/9501.html','true',[],''],
		['PAGE','3720',jdecode('Lorain+OH++mold+floor+abatement'),jdecode(''),'/19301/3720.html','true',[],''],
		['PAGE','18401',jdecode('avon+lake+mold+pics'),jdecode(''),'/19301/18401.html','true',[],''],
		['PAGE','3678',jdecode('Willoughby+OH+Motel+6+Mold+Abatement+'),jdecode(''),'/19301/3678.html','true',[],'']
	],''],
	['PAGE','3594',jdecode('News'),jdecode(''),'/3594.html','true',[],''],
	['PAGE','3636',jdecode('Testimonials'),jdecode(''),'/3636.html','true',[],''],
	['PAGE','3657',jdecode('Request+an+Estimate'),jdecode(''),'/3657.html','true',[],''],
	['PAGE','3762',jdecode('Mold+Abatement'),jdecode(''),'/3762.html','false',[],''],
	['PAGE','3699',jdecode('Stephan+Bell+Law+Office+Sewer+Damage+Restoration'),jdecode(''),'/3699.html','false',[],''],
	['PAGE','3741',jdecode('Licenses+and+Training'),jdecode(''),'/3741.html','false',[],''],
	['PAGE','3783',jdecode('Asbestos+Abatement'),jdecode(''),'/3783.html','false',[],''],
	['PAGE','3804',jdecode('Fire+Damage+Restoration'),jdecode(''),'/3804.html','false',[],''],
	['PAGE','3825',jdecode('Water+Damage+Restoration'),jdecode(''),'/3825.html','false',[],''],
	['PAGE','10101',jdecode('%22Green%22+construction'),jdecode(''),'/10101.html','false',[],''],
	['PAGE','18701',jdecode('Baptist+Church'),jdecode(''),'/18701.html','false',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Grace';
theSitetree.paletteFamily='FBB044';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32048';
theSitetree.graphicsetId='13869';
theSitetree.contentColor='484848';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Grace',
				paletteFamily: 	'FBB044',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32048',
				graphicsetId: 	'13869',
				contentColor: 	'484848',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-8785']={
webappId:    '7008',
documentId:  '3657',
internalId:  '8785',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-2ff32813e6573bc3804795e555cb6624']={
webappId:    '7060',
documentId:  '3678',
internalId:  '2ff32813e6573bc3804795e555cb6624',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-c87f00bc0fd1bc1fb146e3a1b2f10a63']={
webappId:    '7060',
documentId:  '3699',
internalId:  'c87f00bc0fd1bc1fb146e3a1b2f10a63',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-62a52f26a8dc959dd6c0e318ab877ee4']={
webappId:    '7060',
documentId:  '3720',
internalId:  '62a52f26a8dc959dd6c0e318ab877ee4',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20100305-022419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3636',
internalId:  '',
customField: '20090408-212238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3615',
internalId:  '',
customField: '20090411-145218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3657',
internalId:  '',
customField: '20081121-200257'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-12190748']={
webappId:    '1501',
documentId:  '3501',
internalId:  '12190748',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3552',
internalId:  '',
customField: '20090530-002918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3573',
internalId:  '',
customField: '20090408-183729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3594',
internalId:  '',
customField: '20090408-201655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3678',
internalId:  '',
customField: '20080921-192241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3699',
internalId:  '',
customField: '20080921-192422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3720',
internalId:  '',
customField: '20080921-192542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3741',
internalId:  '',
customField: '20080921-192650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3762',
internalId:  '',
customField: '20090409-011314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3783',
internalId:  '',
customField: '20081121-201125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3804',
internalId:  '',
customField: '20081121-201316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3825',
internalId:  '',
customField: '20081121-202616'
};
webappMappings['7008']=webappMappings['7008-11142']={
webappId:    '7008',
documentId:  '3657',
internalId:  '11142',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20090408-233011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20090409-003323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20090411-144526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20090411-140403'
};
webappMappings['1003']=webappMappings['1003-aendu0ine4g61209bdb301a']={
webappId:    '1003',
documentId:  '19301',
internalId:  'aendu0ine4g61209bdb301a',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20090412-154334'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INE4G6';
var companyName   = '++A+%26+I+Health+Solutions......Call+888-258-2475+';
var htmlTitle	  = 'A+%26+I+Health+Solutions%2C+LLC';
var metaKeywords  = 'cleveland+mold+companies%2C+mold+removal%2C+attic+mold%2C+black+mold%2C+mold+inspector%2C+mold+abatement%2C+toxic+mold%2C+kill+mold%2C+asbestos%2C+cleveland+asbestos+company%2C+asbestos+pipe+insulation%2C+asbestos+pricing%2C+lorain+mold+companies%2C+brookpark+mold+removal%2C+solon+mold+removal%2C+industrial+mold+removal%2C+commercial+mold+removal%2C+water+damage+restoration';
var metaContents  = 'Environmental+company+specializing+in+mold%2C+asbestos%2C+water+damage+restoration%2C+fire+damage+restoration%2C+demolition%2C+and+reconstruction+work.+';
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();
};
