/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','652',jdecode('About+us'),jdecode(''),'/652.html','true',[],'',''],
	['PAGE','694',jdecode('Services'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','715',jdecode('Carpet+Cleaning'),jdecode(''),'/694/715.html','true',[],'',''],
		['PAGE','757',jdecode('Upholstery+Cleaning'),jdecode(''),'/694/757.html','true',[],'',''],
		['PAGE','736',jdecode('Tile+Cleaning'),jdecode(''),'/694/736.html','true',[],'',''],
		['PAGE','51612',jdecode('Air+Duct+%26+Dryer+Vent++Cleaning'),jdecode(''),'/694/51612.html','true',[],'',''],
		['PAGE','43412',jdecode('24+Hr+Flood+Service'),jdecode(''),'/694/43412.html','true',[],'','']
	],'',''],
	['PAGE','778',jdecode('Internet+Specials'),jdecode(''),'/778/index.html','true',[ 
		['PAGE','31012',jdecode('Carpet+Cleaning+Specials'),jdecode(''),'/778/31012.html','true',[],'',''],
		['PAGE','31033',jdecode('Upholstery+Cleaning+Specials'),jdecode(''),'/778/31033.html','true',[],'',''],
		['PAGE','31054',jdecode('Tile+Cleaning+Specials'),jdecode(''),'/778/31054.html','true',[],'',''],
		['PAGE','51633',jdecode('Air+Duct+%26+Dryer+Vent+Cleaning+Specials'),jdecode(''),'/778/51633.html','true',[],'','']
	],'',''],
	['PAGE','51654',jdecode('Testimonials'),jdecode(''),'/51654.html','true',[],'',''],
	['PAGE','883',jdecode('FAQs'),jdecode(''),'/883.html','true',[],'',''],
	['PAGE','820',jdecode('Contact'),jdecode(''),'/820/index.html','true',[ 
		['PAGE','31075',jdecode('Email+Form'),jdecode(''),'/820/31075.html','true',[],'',''],
		['PAGE','37312',jdecode('Privacy+Notice'),jdecode(''),'/820/37312.html','true',[],'','']
	],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6905';
theSitetree.keyvisualName='kv_6905.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='809DAF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6905',
				keyvisualName: 	'kv_6905.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12036',
				contentColor: 	'000000',
				contentBGColor: '809DAF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20110204-180733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100603-154259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20110204-173736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20101001-151020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20100928-200913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20101001-151048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20110204-173809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '820',
internalId:  '',
customField: '20101001-175429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '883',
internalId:  '',
customField: '20101109-182655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31033',
internalId:  '',
customField: '20101001-160248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31012',
internalId:  '',
customField: '20100929-171201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31054',
internalId:  '',
customField: '20101001-173843'
};
webappMappings['7008']=webappMappings['7008-8486']={
webappId:    '7008',
documentId:  '31075',
internalId:  '8486',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31075',
internalId:  '',
customField: '20100928-164841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37312',
internalId:  '',
customField: '20101001-174015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43412',
internalId:  '',
customField: '20101001-150937'
};
webappMappings['1002']=webappMappings['1002-51654ahw050inekr7']={
webappId:    '1002',
documentId:  '51654',
internalId:  '51654ahw050inekr7',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51612',
internalId:  '',
customField: '20110204-183738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51633',
internalId:  '',
customField: '20110204-184416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51654',
internalId:  '',
customField: '20110204-160157'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEKR7';
var companyName   = 'Finest+Carpet+Cleaning+or+it%27s+FREE++++++++++++++877-4CLEAN4';
var htmlTitle	  = 'N.F.+Carpet+Care-Finest+Carpet+%26+Upholstery+Cleaning+or+it%27s+FREE%21+';
var metaKeywords  = 'Carpet%2C+Carpet+cleaning%2C+carpet+cleaners%2C+carpet+cleaner%2C+upholstery%2C+upholstery+cleaning%2C+carpet+repairs%2C+tile%2C+tile+cleaning%2C+deodorizing%2C+San+Diego+carpet+cleaner%2C+San+Diego+carpet+cleaners%2C+San+Diego+carpet+cleaning';
var metaContents  = 'Finest+Carpet+and+Upholstery+Cleaning+or+it%27s+FREE%0D%0ACarpet%2C+Upholstery%2C+and+Tile+cleaning+and+protecting%0D%0ACarpet+Repair+and+spot+dyeing%0D%0ACarpet+and+Upholstery+Deodorizing%0D%0A24+hour+Flood+service%0D%0AArea+Rug+cleaning';
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();
};

