/* [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','2301',jdecode('Home'),jdecode(''),'/2301.html','true',[],'',''],
	['PAGE','2352',jdecode('Products'),jdecode(''),'/2352.html','true',[],'',''],
	['PAGE','7701',jdecode('Services'),jdecode(''),'/7701.html','true',[],'',''],
	['PAGE','2373',jdecode('How+It+Works'),jdecode(''),'/2373.html','true',[],'',''],
	['PAGE','2394',jdecode('Where+It+Works'),jdecode(''),'/2394.html','true',[],'',''],
	['PAGE','2415',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/2415.html','true',[],'',''],
	['PAGE','2436',jdecode('Clients%2FTestimonials'),jdecode(''),'/2436.html','true',[],'',''],
	['PAGE','9801',jdecode('Contact+Us'),jdecode(''),'/9801.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11164';
theSitetree.keyvisualName='kv_11164.jpg';
theSitetree.fontsetId='32064';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11164',
				keyvisualName: 	'kv_11164.jpg',
				fontsetId: 		'32064',
				graphicsetId: 	'13879',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20100219-162914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2436',
internalId:  '',
customField: '20100216-121253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2352',
internalId:  '',
customField: '20100219-170842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2394',
internalId:  '',
customField: '20100218-111735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2373',
internalId:  '',
customField: '20100219-132154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20100219-171259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2415',
internalId:  '',
customField: '20100219-145218'
};
webappMappings['7008']=webappMappings['7008-15064']={
webappId:    '7008',
documentId:  '9801',
internalId:  '15064',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20100220-142347'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CN4U';
var companyName   = 'FloorGrippers%2C+Inc';
var htmlTitle	  = '';
var metaKeywords  = 'A.D.A.%2Caccidents%2CADA%2CAmerica%2CAmericans+With+Disabilities+Act%2Canti+slip%2Canti-slip%2CAurora%2CBatavia%2Cbathtub%2Cbusiness%2Cbusinesses%2Cceramic+tile%2CChicago%2Ccoating%2Ccoatings%2Ccommercial%2Cconcrete%2Cconcrete+seal%2CDarien%2Cdomestic%2CDowners+Grove%2CElmhurst%2Centryway%2CEola%2Cfall%2Cfloor%2Cfloor+safety%2Cfloor+treatment%2Cflooring%2Cflooring+treatment%2Cfloors%2CGeneva%2Cglazed+brick%2Chome%2CIllinois%2Cindustrial%2Cindustrial+safety%2Cinstallation%2Cinstallations%2CJoliet%2Ckitchens%2Cliability%2CLisle%2Cmarble%2Cmats%2CMontgomery%2CNaperville%2CNaperville%2Cnon+skid%2Cnon+slip%2CNon+Slip+floor+treatment%2Cnonslip%2Cnon-slip%2COak+Brook%2Coffice%2COSHA%2COswego%2Cpatios%2Cpervent+slips%2CPlainfield%2Cpool%2Cpools%2Cprevent+accidents%2Cproducts%2Cprotection%2Cramps%2Cresidential%2Cretail%2CRomeoville%2Csafety%2Csafety+coating%2Csafety+solutions%2Cseal%2Csealing%2Csenior+citizens%2CService%2CServices%2Cshower%2Cslip%2Cslip+and+fall%2Cslip+prevention+treatments%2Cslip+resistance%2Cslip+resistant%2Cslippery+floor+solution%2Cslips%2Csolutions%2Cspanish+tile%2Cspecialty%2CSt+Charles%2Csteps%2Cstone%2CSugar+Grove%2Csurface%2Cterazzo%2Ctile%2Ctreatment%2Ctub%2Ctubs%2Cwalkways%2CWarrenville%2CWest+Chicago%2CWestmont%2Cwet+slippery+floor+treatment%2CWheaton%2CWinfield%2CWoodridge';
var metaContents  = 'FloorGrippers%2C+Inc+--+Your+Solution+to+Slip+and+Fall+Accidents+in+the+Fox+Valley+and+Chicago+Metro+area%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();
};
