/* [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','301',jdecode('About+Us'),jdecode(''),'/301.html','true',[],''],
	['PAGE','622',jdecode('Service'),jdecode(''),'/622.html','true',[],''],
	['PAGE','601',jdecode('Contact'),jdecode(''),'/601.html','true',[],'']];
var siteelementCount=3;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='C8C0A4';
theSitetree.keyvisualId='1712';
theSitetree.keyvisualName='museum.jpg';
theSitetree.fontsetId='301';
theSitetree.graphicsetId='347';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C8C0A4';
var theTemplate={
				name: 			'Architekt',
				paletteFamily: 	'C8C0A4',
				keyvisualId: 	'1712',
				keyvisualName: 	'museum.jpg',
				fontsetId: 		'301',
				graphicsetId: 	'347',
				contentColor: 	'000000',
				contentBGColor: 'C8C0A4',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'C8C0A4',
				b_color: 		'5C5438',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24M']={
webappId:    '5003',
documentId:  '301',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24M',
customField: 'en:US:'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20081010-014955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '622',
internalId:  '',
customField: '20080805-012958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20080805-013058'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INV5SM';
var companyName   = 'ATK+Construction';
var htmlTitle	  = '';
var metaKeywords  = 'General+Contractor++++Construction+Management++++Commercial++%E2%80%A2+Plumbing+Services+++%E2%80%A2+Restoration+Services+++%E2%80%A2+Construction+Services+++%E2%80%A2+Foundations++Basements+++%E2%80%A2+Demolition+Excavation++Grading+++%E2%80%A2+Addition+Construction+++%E2%80%A2+Remodeling+Services+++%E2%80%A2+Decks++Patios+++%E2%80%A2+Fences++Gates+++%E2%80%A2+Landscaping+++%E2%80%A2+Masonry+Services+++%E2%80%A2+Fire+Sprinklers+++%E2%80%A2+Windows++Doors+++%E2%80%A2+Cabinetry+Services+++%E2%80%A2+Countertop+Services+++%E2%80%A2+Drywall++Plastering+++%E2%80%A2+Flooring+Services+++%E2%80%A2+Painting++Wallcoverings+++%E2%80%A2+Electrical+Services+++%E2%80%A2+Siding+++%E2%80%A2+Handyman+Services+++%E2%80%A2+Insulation+Services+++%E2%80%A2+Heating++Cooling+++%E2%80%A2+Electrical+Services+++%E2%80%A2+Heating++Cooling+Services+++%E2%80%A2+Plumbing+Services+++%E2%80%A2+Drywall++Plastering+++%E2%80%A2+Construction+Services+++%E2%80%A2+Renovation+Services+++%E2%80%A2+Masonry+Services+++%E2%80%A2+Fire+Sprinkler+Services+++%E2%80%A2+Insulation+Services+++%E2%80%A2+Landscape+Services+++%E2%80%A2+Painting++Wallcovering+Services+++%E2%80%A2+Garage+Doors+++%E2%80%A2+Fence++Gate+Services+++%E2%80%A2+Carpentry++Woodwork+++%E2%80%A2+Wine+Cellars++Storage+++%E2%80%A2+Ceiling+Services+++%E2%80%A2+Tile+Services+++%E2%80%A2+Demolition+Excavation++Grading+++%E2%80%A2+Flooring+Services+++%E2%80%A2+Roofing+Services+++%E2%80%A2+Foundations+++%E2%80%A2+Restoration+Services+++%E2%80%A2+Window++Door+Services+++%E2%80%A2+Glass++Glazing+++%E2%80%A2+Awning+Services+++%E2%80%A2+Ceiling+Services+++%E2%80%A2+Carpentry++Woodwork+Services+++%E2%80%A2+Glass++Glazing+++%E2%80%A2+Sunrooms+++%E2%80%A2+Staircases+++%E2%80%A2+Outdoor+Kitchens+++%E2%80%A2+Roofing++Gutters+++%E2%80%A2+Pressure+Washing+++%E2%80%A2+Chimneys++Fireplaces+++%E2%80%A2+Scaffolding+Services+++%E2%80%A2+Cleanup+Services+Dumpsters++Salvage+++%E2%80%A2+Plumbing+Services+++%E2%80%A2+Restoration+Services+++%E2%80%A2+Construction+Services+++%E2%80%A2+Foundations++Basements+++%E2%80%A2+Demolition+Excavation++Grading+++%E2%80%A2+Addition+Construction+++%E2%80%A2+Remodeling+Services+++%E2%80%A2+Decks++Patios+++%E2%80%A2+Fences++Gates+++%E2%80%A2+Landscaping+++%E2%80%A2+Masonry+Services+++%E2%80%A2+Fire+Sprinklers+++%E2%80%A2+Windows++Doors+++%E2%80%A2+Cabinetry+Services+++%E2%80%A2+Countertop+Services+++%E2%80%A2+Drywall++Plastering+++%E2%80%A2+Flooring+Services+++%E2%80%A2+Painting++Wallcoverings+++%E2%80%A2+Electrical+Services+++%E2%80%A2+Siding+++%E2%80%A2+Handyman+Services+++%E2%80%A2+Insulation+Services+++%E2%80%A2+Heating++Cooling+++%E2%80%A2+Electrical+Services+++%E2%80%A2+Heating++Cooling+Services+++%E2%80%A2+Plumbing+Services+++%E2%80%A2+Drywall++Plastering+++%E2%80%A2+Construction+Services+++%E2%80%A2+Renovation+Services+++%E2%80%A2+Masonry+Services+++%E2%80%A2+Fire+Sprinkler+Services+++%E2%80%A2+Insulation+Services+++%E2%80%A2+Landscape+Services+++%E2%80%A2+Painting++Wallcovering+Services+++%E2%80%A2+Garage+Doors+++%E2%80%A2+Fence++Gate+Services+++%E2%80%A2+Carpentry++Woodwork+++%E2%80%A2+Wine+Cellars++Storage+++%E2%80%A2+Ceiling+Services+++%E2%80%A2+Tile+Services+++%E2%80%A2+Demolition+Excavation++Grading+++%E2%80%A2+Flooring+Services+++%E2%80%A2+Roofing+Services+++%E2%80%A2+Foundations+++%E2%80%A2+Restoration+Services+++%E2%80%A2+Window++Door+Services+++%E2%80%A2+Glass++Glazing+++%E2%80%A2+Awning+Services+++%E2%80%A2+Ceiling+Services+++%E2%80%A2+Carpentry++Woodwork+Services+++%E2%80%A2+Glass++Glazing+++%E2%80%A2+Sunrooms+++%E2%80%A2+Staircases+++%E2%80%A2+Outdoor+Kitchens+++%E2%80%A2+Roofing++Gutters+++%E2%80%A2+Pressure+Washing+++%E2%80%A2+Chimneys++Fireplaces+++%E2%80%A2+Scaffolding+Services+++%E2%80%A2+Cleanup+Services+Dumpsters++Salvage++++++++++++Residential++++Licensed++++Insured++++Ground+up++++Tenant+Finish++++Tenant+Fix-up++++Reconstruction++++Remodel++++Additions++++Basements++++Custom+Shelving+Units++++Custom+Carpentry++++Garages++++Concrete+%28stamped++++driveways++++colored++++countertops++++acid+stained+floors++++Retaining+Walls++++Decks++++Bathrooms++++Kitchens++++Exterior++Interior+Pillars++++Siding++++Repairs++++vestibules++++atriums++++common+areas++++front+office++++waiting+areas++++restrooms++++windows++++flooring++++electrical++++plumbing++++heating+and+air+conditioning++++mechanical++++tile++++roofing++++New+Construction+-+Ground+Up+-+Tenant+Finish+-+Reconstruction%2C+Additions%2C+Custom+Shelving+Units%2C+Custom+Finishing+Carpentry%2C+Concrete+%28stamped%2C+driveways%2C+colored%2C+retaining+walls%29%2CDecks%2C+Bath%2C+Kitchen%2C+Basements%2C+Repairs%2C+RoofingPlans%2C+code+and+zoning+review.+Great+prices+on+Material+which+can+save+you+a+bundle.+We+have+great+contracts+with+tile%2C+carpet%2C+hardwood%2C+all+flooring%2C+lumber%2C+cabinet%2C+concrete%2C+roofing+companies.+We+will+pass+our+savings+on+to+you%21+Great+References%21+';
var metaContents  = '';
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();
};
