/* [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','5301',jdecode('Home'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','38712',jdecode('Current+Promotions'),jdecode(''), jdecode('%2F38712%2Findex.html'), 'true',[ 
		['PAGE','39112',jdecode('Gillespie%26%23x27%3Bs+Abbey+Carpet+Love+Your+Floor+Sales+Event'),jdecode(''), jdecode('%2F38712%2F39112.html'), 'true',[],'','']
	],'',''],
	['PAGE','5352',jdecode('Services'),jdecode(''), jdecode('%2F5352%2Findex.html'), 'true',[ 
		['PAGE','30112',jdecode('Cleaning+Services'),jdecode(''), jdecode('%2F5352%2F30112.html'), 'true',[],'',''],
		['PAGE','30133',jdecode('Flooring+Services'),jdecode(''), jdecode('%2F5352%2F30133.html'), 'true',[],'',''],
		['PAGE','30154',jdecode('Countertops+%2F+Showers'),jdecode(''), jdecode('%2F5352%2F30154.html'), 'true',[],'',''],
		['PAGE','30175',jdecode('Window+Coverings'),jdecode(''), jdecode('%2F5352%2F30175.html'), 'true',[],'','']
	],'',''],
	['PAGE','5373',jdecode('Contact'),jdecode(''), jdecode('%2F5373.html'), 'true',[],'',''],
	['PAGE','5394',jdecode('About+Us'),jdecode(''), jdecode('%2F5394%2Findex.html'), 'true',[ 
		['PAGE','6601',jdecode('About+Our+Staff'),jdecode(''), jdecode('%2F5394%2F6601.html'), 'true',[],'',''],
		['PAGE','10701',jdecode('Code+of+Ethics'),jdecode(''), jdecode('%2F5394%2F10701.html'), 'true',[],'','']
	],'',''],
	['PAGE','75512',jdecode('360+Virtual+Showroom+Tour'),jdecode(''), jdecode('%2F75512.html'), 'true',[],'',''],
	['PAGE','10001',jdecode('Client+Testimonials'),jdecode(''), jdecode('%2F10001.html'), 'true',[],'',''],
	['PAGE','5457',jdecode('How+To+Find+Us'),jdecode(''), jdecode('%2F5457.html'), 'true',[],'',''],
	['PAGE','45512',jdecode('Flooring+Video+Gallery'),jdecode(''), jdecode('%2F45512.html'), 'true',[],'',''],
	['PAGE','12101',jdecode('Job+Photos'),jdecode(''), jdecode('%2F12101.html'), 'true',[],'',''],
	['PAGE','8001',jdecode('Free+Internet+Bucks'),jdecode(''), jdecode('%2F8001.html'), 'true',[],'',''],
	['PAGE','14501',jdecode('Brands+-+Helpful+Links'),jdecode(''), jdecode('%2F14501%2Findex.html'), 'true',[ 
		['PAGE','47412',jdecode('Video+-+Choosing+The+Right'),jdecode(''), jdecode('%2F14501%2F47412.html'), 'true',[],'',''],
		['PAGE','28501',jdecode('Countertops'),jdecode(''), jdecode('%2F14501%2F28501.html'), 'true',[],'',''],
		['PAGE','14522',jdecode('Hardwood'),jdecode(''), jdecode('%2F14501%2F14522.html'), 'true',[],'',''],
		['PAGE','14543',jdecode('Laminate'),jdecode(''), jdecode('%2F14501%2F14543.html'), 'true',[],'',''],
		['PAGE','14564',jdecode('Vinyl+%2F+Linoleum'),jdecode(''), jdecode('%2F14501%2F14564.html'), 'true',[],'',''],
		['PAGE','14585',jdecode('Tile+%26+Stone'),jdecode(''), jdecode('%2F14501%2F14585.html'), 'true',[],'',''],
		['PAGE','14701',jdecode('Carpet+%26+Area+Rugs'),jdecode(''), jdecode('%2F14501%2F14701.html'), 'true',[],'',''],
		['PAGE','14722',jdecode('Window+Fashions'),jdecode(''), jdecode('%2F14501%2F14722.html'), 'true',[],'',''],
		['PAGE','14743',jdecode('+Fabric+Care+Institute'),jdecode(''), jdecode('%2F14501%2F14743.html'), 'true',[],'',''],
		['PAGE','14764',jdecode('W+F+C+A'),jdecode(''), jdecode('%2F14501%2F14764.html'), 'true',[],'','']
	],'',''],
	['PAGE','43912',jdecode('Gillespie%26%23x27%3Bs+Blog'),jdecode(''), jdecode('%2F43912.html'), 'true',[],'',''],
	['PAGE','49112',jdecode('Community+Service'),jdecode(''), jdecode('%2F49112.html'), 'true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Card';
theSitetree.paletteFamily='E1B006';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='427';
theSitetree.graphicsetId='477';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Card',
				paletteFamily: 	'E1B006',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'427',
				graphicsetId: 	'477',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				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: '20111215-113835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5352',
internalId:  '',
customField: '20091111-173949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5457',
internalId:  '',
customField: '20111215-184821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5394',
internalId:  '',
customField: '20110329-124018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20110525-165316'
};
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: '20110822-111802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38712',
internalId:  '',
customField: '20111213-131254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20111213-171902'
};
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: '20111213-170927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14743',
internalId:  '',
customField: '20111215-181255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14543',
internalId:  '',
customField: '20111213-171724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14564',
internalId:  '',
customField: '20111213-171146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14585',
internalId:  '',
customField: '20111215-122529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20111215-180827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14764',
internalId:  '',
customField: '20091110-185056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14722',
internalId:  '',
customField: '20111213-172017'
};
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'
};
webappMappings['7060']=webappMappings['7060-7f5f9fc5cf6e0cb8efa413732dde386f']={
webappId:    '7060',
documentId:  '39112',
internalId:  '7f5f9fc5cf6e0cb8efa413732dde386f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39112',
internalId:  '',
customField: '20111213-131700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43912',
internalId:  '',
customField: '20101208-191755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45512',
internalId:  '',
customField: '20111215-182934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47412',
internalId:  '',
customField: '20110511-170218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49112',
internalId:  '',
customField: '20110622-191253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75512',
internalId:  '',
customField: '20120201-142946'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INECWK';
var companyName   = 'Gillespie%27s+Abbey+Carpet+%26+Floor';
var htmlTitle	  = 'Gillespie%27s+Abbey+Carpet+%26+Floor';
var metaKeywords  = 'floor+flooring+floors+carpet+carpets+rug+rugs+vinyl+lino+linoleum+hardwood+laminate+tile+stone+natural+stone+area+rug+area+rugs+window+coverings+shades+shutters+blinds+window+treatments+window+fashions+carpet+cleaning+counter+tops';
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();
};

