/* [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','1001',jdecode('Home'),jdecode(''),'/1001.html','true',[],''],
	['PAGE','26373',jdecode('Board+Up+Service'),jdecode(''),'/26373.html','true',[],''],
	['PAGE','26952',jdecode('Apartments'),jdecode(''),'/26952.html','true',[],''],
	['PAGE','7501',jdecode('Commercial'),jdecode(''),'/7501/index.html','true',[ 
		['PAGE','26970',jdecode('Doors+%26+Door+Repairs'),jdecode(''),'/7501/26970.html','true',[],''],
		['PAGE','27015',jdecode('Storefronts'),jdecode(''),'/7501/27015.html','true',[],'']
	],''],
	['PAGE','7522',jdecode('Residential'),jdecode(''),'/7522/index.html','true',[ 
		['PAGE','27024',jdecode('Glass+Replacement'),jdecode(''),'/7522/27024.html','true',[],''],
		['PAGE','26961',jdecode('Shower+Enclosures'),jdecode(''),'/7522/26961.html','true',[],'']
	],''],
	['PAGE','27033',jdecode('In+Shop'),jdecode(''),'/27033.html','true',[],''],
	['PAGE','1052',jdecode('Products'),jdecode(''),'/1052/index.html','true',[ 
		['PAGE','27042',jdecode('Insulated+Units'),jdecode(''),'/1052/27042.html','true',[],''],
		['PAGE','27051',jdecode('Plate+Glass'),jdecode(''),'/1052/27051.html','true',[],''],
		['PAGE','26979',jdecode('Safety+Glass'),jdecode(''),'/1052/26979.html','true',[],''],
		['PAGE','26988',jdecode('Pattern+Glass'),jdecode(''),'/1052/26988.html','true',[],''],
		['PAGE','26997',jdecode('Mirrors'),jdecode(''),'/1052/26997.html','true',[],''],
		['PAGE','27006',jdecode('Screens'),jdecode(''),'/1052/27006.html','true',[],'']
	],''],
	['PAGE','26816',jdecode('Coupons'),jdecode(''),'/26816/index.html','true',[ 
		['PAGE','27060',jdecode('Apartments'),jdecode(''),'/26816/27060.html','true',[],''],
		['PAGE','31001',jdecode('Board+Up+Service'),jdecode(''),'/26816/31001.html','true',[],''],
		['PAGE','27069',jdecode('Commercial'),jdecode(''),'/26816/27069.html','true',[],''],
		['PAGE','27078',jdecode('Residential'),jdecode(''),'/26816/27078.html','true',[],''],
		['PAGE','27087',jdecode('In+Shop'),jdecode(''),'/26816/27087.html','true',[],'']
	],''],
	['PAGE','18501',jdecode('Location+%26+Hours'),jdecode(''),'/18501.html','true',[],''],
	['PAGE','1157',jdecode('Contact+Us'),jdecode(''),'/1157/index.html','true',[ 
		['PAGE','13601',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/1157/13601.html','false',[],'']
	],'']];
var siteelementCount=26;
theSitetree.topTemplateName='Sportive';
theSitetree.paletteFamily='F6F6E6';
theSitetree.keyvisualId='2657';
theSitetree.keyvisualName='architekt.jpg';
theSitetree.fontsetId='220';
theSitetree.graphicsetId='260';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F6F6E6';
var theTemplate={
				name: 			'Sportive',
				paletteFamily: 	'F6F6E6',
				keyvisualId: 	'2657',
				keyvisualName: 	'architekt.jpg',
				fontsetId: 		'220',
				graphicsetId: 	'260',
				contentColor: 	'000000',
				contentBGColor: 'F6F6E6',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'F6F6E6',
				b_color: 		'CCCCC0',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050ineqya2b9c55c2f318e6e6']={
webappId:    '1001',
documentId:  '1157',
internalId:  'ahw050ineqya2b9c55c2f318e6e6',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineqya2b9c55c2f318e6e6']={
webappId:    '1001',
documentId:  '13601',
internalId:  'ahw050ineqya2b9c55c2f318e6e6',
customField: 'followUp'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '18501',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20090407-103044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26373',
internalId:  '',
customField: '20090406-145024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20090408-104444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1052',
internalId:  '',
customField: '20090407-103500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20090403-081724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1157',
internalId:  '',
customField: '20090407-103214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20090403-095400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20080110-122257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26816',
internalId:  '',
customField: '20090331-144726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26952',
internalId:  '',
customField: '20090404-141206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27024',
internalId:  '',
customField: '20090404-141247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26961',
internalId:  '',
customField: '20090331-145404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26970',
internalId:  '',
customField: '20090331-145441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27015',
internalId:  '',
customField: '20090331-145457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27033',
internalId:  '',
customField: '20090402-102645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27042',
internalId:  '',
customField: '20090403-105106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27051',
internalId:  '',
customField: '20090407-143057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26979',
internalId:  '',
customField: '20090331-145210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26988',
internalId:  '',
customField: '20090404-141333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26997',
internalId:  '',
customField: '20090407-101930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27006',
internalId:  '',
customField: '20090331-145302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27060',
internalId:  '',
customField: '20090404-141418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27069',
internalId:  '',
customField: '20090402-103441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27078',
internalId:  '',
customField: '20090402-103457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27087',
internalId:  '',
customField: '20090404-141448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20090402-103352'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEQYA';
var companyName   = 'JB+Glass+%26+Board+Up+Service';
var htmlTitle	  = 'Welcome+to+JB+Glass+%26+Board+Up+Service+-+24+hr.+7+days+a+week+Emergency+Board+Up+Service';
var metaKeywords  = 'mirrors%2C+glass%2C+glass+replacement%2C+window+replacement%2C+board+up%2C+emergency+board+up%2C+24%2F7+board+up%2C+free+estimates%2C+coupons%2C+glass+coupons%2C+plate+glass%2C+flate+glass%2C+safety+glass%2C+glass+installation%2C+tempered+glass%2C+tough+glass%2C+plexiglas%2C+plexiglass%2C+acrylic%2C+lexan%2C+wired+glass%2C+pattern+glass%2C+obscured+glass%2C+decorative+glass%2C+shower+enclosers%2C+tub+enclosers%2C+shower+door%2C+commercial+glass%2C+residential+glass%2C+jb+glass++board+up+service%2C+commercial+glass+glaziers%2C+apartment+wholesale+glass%2C+apartment+glass%2C+wholesale+glass%2C+plexi+glass%2C+plexi+mirror%2C+tabletops%2C+patio+glass%2C+storm+windows%2C+aluminum+storm+windows%2C+wood+windows%2C+wood+sashes%2C+steel+sashes%2C+drive+thru+windows%2C+aluminum+doors%2C+door+repairs%2C+door+glass%2C+glass+doors%2C+storm+doors%2C+aluminum+storefronts%2C+screens%2C+screening%2C+fiberglass+screens%2C+aluminum+screens%2C+pet+screens%2C+insulated+glass+units%2C+thermopanes%2C+glass+manufacturer%2C+cut+glass%2C+beveled+glass%2C+beveled+mirror%2C+poilshed+edges%2C+polished+glass%2C+polished+mirror%2C+bronze+glass%2C+grey+glass%2C+tinted+glass%2C+bronze+mirror%2C+patio+door+glass%2C+patio+screen+door%2C+double+pane+glass%2C+shoring%2C+winterization%2C+barricades%2C+tarping%2C+structural+stabilization%2C+temporary+fencing%2C+roof+covering%2C+water+extraction%2C+cabinet+glass';
var metaContents  = 'Wholesale+Glass+Manufacturers+for+over+30+years+of+Insulated+Glass+Units+%28thermopanes%29.+Installing+commercial+and+residential+glass.+Services+include%3A+24%2F7+Emergency+Board+Up+Service%2C+storm+windows%2C+patio+glass%2C+mirrors%2C+door+repairs%2C+shower+enclosers%2C+pattern+glass%2C+screens%2C+tabletops%2C+storefront+glass++much+more.+Call+for+a+Free+Estimate%21';
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();
};

