/* [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','5301',jdecode('Home'),jdecode(''),'/5301.html','true',[],''],
	['PAGE','5352',jdecode('Services'),jdecode(''),'/5352/index.html','true',[ 
		['PAGE','30112',jdecode('Cleaning+Services'),jdecode(''),'/5352/30112.html','true',[],''],
		['PAGE','30133',jdecode('Flooring+Services'),jdecode(''),'/5352/30133.html','true',[],''],
		['PAGE','30154',jdecode('Countertops+%2F+Showers'),jdecode(''),'/5352/30154.html','true',[],''],
		['PAGE','30175',jdecode('Window+Coverings'),jdecode(''),'/5352/30175.html','true',[],'']
	],''],
	['PAGE','5373',jdecode('Contact'),jdecode(''),'/5373.html','true',[],''],
	['PAGE','5394',jdecode('About+Us'),jdecode(''),'/5394/index.html','true',[ 
		['PAGE','6601',jdecode('About+Our+Staff'),jdecode(''),'/5394/6601.html','true',[],''],
		['PAGE','10701',jdecode('Code+of+Ethics'),jdecode(''),'/5394/10701.html','true',[],'']
	],''],
	['PAGE','10001',jdecode('Client+Testimonials'),jdecode(''),'/10001.html','true',[],''],
	['PAGE','5457',jdecode('How+to+find+us'),jdecode(''),'/5457.html','true',[],''],
	['PAGE','12101',jdecode('Job+Photos'),jdecode(''),'/12101.html','true',[],''],
	['PAGE','8001',jdecode('Free+Internet+Bucks'),jdecode(''),'/8001.html','true',[],''],
	['PAGE','14501',jdecode('Helpful+Links'),jdecode(''),'/14501/index.html','true',[ 
		['PAGE','28501',jdecode('Countertops'),jdecode(''),'/14501/28501.html','true',[],''],
		['PAGE','14522',jdecode('Hardwood'),jdecode(''),'/14501/14522.html','true',[],''],
		['PAGE','14543',jdecode('Laminate'),jdecode(''),'/14501/14543.html','true',[],''],
		['PAGE','14564',jdecode('Vinyl+%2F+Linoleum'),jdecode(''),'/14501/14564.html','true',[],''],
		['PAGE','14585',jdecode('Tile+%26+Stone'),jdecode(''),'/14501/14585.html','true',[],''],
		['PAGE','14701',jdecode('Carpet+%26+Area+Rugs'),jdecode(''),'/14501/14701.html','true',[],''],
		['PAGE','14722',jdecode('Window+Fashions'),jdecode(''),'/14501/14722.html','true',[],''],
		['PAGE','14743',jdecode('+Fabric+Care+Institute'),jdecode(''),'/14501/14743.html','true',[],''],
		['PAGE','14764',jdecode('W+F+C+A'),jdecode(''),'/14501/14764.html','true',[],'']
	],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1766';
theSitetree.keyvisualName='zuhause.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1766',
				keyvisualName: 	'zuhause.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100107-193919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5352',
internalId:  '',
customField: '20091111-173949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5457',
internalId:  '',
customField: '20091118-185218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5394',
internalId:  '',
customField: '20091118-184819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20091104-175728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8001',
internalId:  '',
customField: '20091105-115727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5373',
internalId:  '',
customField: '20091217-164741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20091118-185434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20091118-185001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20091105-173102'
};
webappMappings['7060']=webappMappings['7060-e72e5b348f15f72c23351234f5a01b80']={
webappId:    '7060',
documentId:  '12101',
internalId:  'e72e5b348f15f72c23351234f5a01b80',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20091112-140718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14522',
internalId:  '',
customField: '20091110-165134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14743',
internalId:  '',
customField: '20091110-185045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14543',
internalId:  '',
customField: '20091112-145749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14564',
internalId:  '',
customField: '20091112-123033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14585',
internalId:  '',
customField: '20091112-123126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20091112-123401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14764',
internalId:  '',
customField: '20091110-185056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14722',
internalId:  '',
customField: '20091110-165732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20091111-165441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30112',
internalId:  '',
customField: '20091111-174943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30133',
internalId:  '',
customField: '20091111-181041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30154',
internalId:  '',
customField: '20091111-182857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30175',
internalId:  '',
customField: '20091112-140224'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INECWK';
var companyName   = 'Gillespie%27s+Abbey+Carpet+%26+Floor';
var htmlTitle	  = '';
var metaKeywords  = '';
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();
};
