/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','552',jdecode('About+us'),jdecode(''), jdecode('%2F552.html'), 'true',[],'',''],
	['PAGE','699',jdecode('Announcements'),jdecode(''), jdecode('%2F699.html'), 'true',[],'',''],
	['PAGE','678',jdecode('Specials'),jdecode(''), jdecode('%2F678.html'), 'true',[],'',''],
	['PAGE','28220',jdecode('Recalls+%26+Industry+News'),jdecode(''), jdecode('%2F28220.html'), 'true',[],'',''],
	['PAGE','573',jdecode('Products'),jdecode(''), jdecode('%2F573%2Findex.html'), 'true',[ 
		['PAGE','594',jdecode('Food+%26+Treats'),jdecode(''), jdecode('%2F573%2F594.html'), 'true',[],'',''],
		['PAGE','636',jdecode('Supplements'),jdecode(''), jdecode('%2F573%2F636.html'), 'true',[],'',''],
		['PAGE','6101',jdecode('Spa+products'),jdecode(''), jdecode('%2F573%2F6101.html'), 'true',[],'',''],
		['PAGE','6122',jdecode('Toys'),jdecode(''), jdecode('%2F573%2F6122.html'), 'true',[],'',''],
		['PAGE','6143',jdecode('Supplies'),jdecode(''), jdecode('%2F573%2F6143.html'), 'true',[],'','']
	],'',''],
	['PAGE','657',jdecode('Services+%2F+Grooming'),jdecode(''), jdecode('%2F657.html'), 'true',[],'',''],
	['PAGE','1901',jdecode('Jobs'),jdecode(''), jdecode('%2F1901.html'), 'true',[],'',''],
	['PAGE','2501',jdecode('Links'),jdecode(''), jdecode('%2F2501.html'), 'true',[],'',''],
	['PAGE','16201',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F16201.html'), 'true',[],'',''],
	['PAGE','6164',jdecode('Customers+Comments'),jdecode(''), jdecode('%2F6164.html'), 'true',[],'',''],
	['PAGE','3806',jdecode('Guestbook'),jdecode(''), jdecode('%2F3806%2Findex.html'), 'true',[ 
		['PAGE','3801',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F3806%2F3801.html'), 'false',[],'','']
	],'',''],
	['PAGE','11301',jdecode('Store+Hours+%26+Closings'),jdecode(''), jdecode('%2F11301.html'), 'true',[],'',''],
	['PAGE','8801',jdecode('Contact+%26+Location+Info.'),jdecode(''), jdecode('%2F8801.html'), 'true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Kalkutta';
theSitetree.paletteFamily='83A763';
theSitetree.keyvisualId='6178';
theSitetree.keyvisualName='kv_6178.jpg';
theSitetree.fontsetId='11145';
theSitetree.graphicsetId='11946';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='ADC895';
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: 			'Kalkutta',
				paletteFamily: 	'83A763',
				keyvisualId: 	'6178',
				keyvisualName: 	'kv_6178.jpg',
				fontsetId: 		'11145',
				graphicsetId: 	'11946',
				contentColor: 	'000000',
				contentBGColor: 'ADC895',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111128-192830'
};
webappMappings['1002']=webappMappings['1002-3806AHW050INEYJL']={
webappId:    '1002',
documentId:  '3806',
internalId:  '3806AHW050INEYJL',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '8801',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-1097276']={
webappId:    '1501',
documentId:  '501',
internalId:  '1097276',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-2d2174ddf961850a8998f87fa9ff8650']={
webappId:    '7060',
documentId:  '16201',
internalId:  '2d2174ddf961850a8998f87fa9ff8650',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20110221-101324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20111128-204142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20111128-200058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20111128-194021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20111128-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20091120-075041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20111121-180539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6122',
internalId:  '',
customField: '20091120-075232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6143',
internalId:  '',
customField: '20111128-204245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20110730-143741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20110510-191757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20111121-175044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20090319-080535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6164',
internalId:  '',
customField: '20080113-111108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3806',
internalId:  '',
customField: '20070627-202952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3801',
internalId:  '',
customField: '20070627-202952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20110510-101349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20070925-115322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28220',
internalId:  '',
customField: '20110809-063604'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEYJL';
var companyName   = 'For+K-9s+%26+Felines';
var htmlTitle	  = 'Dedicated+to+the+Health+and+Happiness+of+your+Pet%21';
var metaKeywords  = 'dog%2C+cat%2C+pet%2C+grooming%2C+groomer%2C+Westfield%2C+01085%2C+01077%2C+01086%2C+Southwick%2C+natural%2C+holistic%2C+k9s+and+felines%2C+k-9s+and+felines%2C+canine%2C+feline%2C+food%2C+holistic%2C+health%2C+supplement%2C+vitamin%2C+toy%2C+bed%2C+crate%2C+treat%2C+bully%2C+shampoo%2C+flea%2C+tick%2C+supplies%2C+book%2C+training%2C+gift%2C+clothing%2C+innova%2C+abady%2C+artemis%2C+merrick%2C+evo%2C+california+natural%2C+healthwise%2C+natural+balance%2C+hi-tek+naturals%2C+perfectly+natural+dog%2C+elk%2C+bison%2C+venison%2C+lupine%2C+tropiclean%2C+orijen%2C+acana%2C+steve%2C+natures+variety%2C+bravo%2C+paragon%2C+canz%2C+real+meat%2C+meat%2C+dogswell%2C+loving+pets%2C+premier%2C+kong%2C+worlds+best%2C+world%27s+best%2C+litter%2C+collar%2C+leash%2C+behavior%2C+homeopathic%2C+antler%2C+chew%2C+ball%2C+nutrition%2C+wholesome%2C+human+grade';
var metaContents  = 'Westfield%27s+only+holistic%2C+all+natural+pet+food+and+supply+store+and+gentle+grooming+salon.++%0A%0ADedicated+to+the+health+and+happiness+of+your+pet+is+more+than+our+motto%21+Species+appropriate+diets+will+keep+your+pet+healthy+and+long+lived.+We+research+our+products+and+manufacturers+and+only+carry+what+we+believe+are+truly+healthy+products.+We+also+offer+gentle+grooming+services+of+your+cat+or+dog.+Come+check+us+out.+We+look+forward+to+meeting+you%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();
};

