/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('About+us'),jdecode(''),'/552.html','true',[],''],
	['PAGE','699',jdecode('Announcements'),jdecode(''),'/699.html','true',[],''],
	['PAGE','678',jdecode('Specials'),jdecode(''),'/678.html','true',[],''],
	['PAGE','28220',jdecode('Recalls+%26+Industry+News'),jdecode(''),'/28220.html','true',[],''],
	['PAGE','23801',jdecode('Education'),jdecode(''),'/23801.html','true',[],''],
	['PAGE','573',jdecode('Products'),jdecode(''),'/573/index.html','true',[ 
		['PAGE','594',jdecode('Food+%26+Treats'),jdecode(''),'/573/594.html','true',[],''],
		['PAGE','636',jdecode('Supplements'),jdecode(''),'/573/636.html','true',[],''],
		['PAGE','6101',jdecode('Spa+products'),jdecode(''),'/573/6101.html','true',[],''],
		['PAGE','6122',jdecode('Toys'),jdecode(''),'/573/6122.html','true',[],''],
		['PAGE','6143',jdecode('Supplies'),jdecode(''),'/573/6143.html','true',[],'']
	],''],
	['PAGE','657',jdecode('Services'),jdecode(''),'/657.html','true',[],''],
	['PAGE','1901',jdecode('Jobs'),jdecode(''),'/1901.html','true',[],''],
	['PAGE','2501',jdecode('Links'),jdecode(''),'/2501.html','true',[],''],
	['PAGE','16201',jdecode('Photo+Gallery'),jdecode(''),'/16201.html','true',[],''],
	['PAGE','6164',jdecode('Customers+Comments'),jdecode(''),'/6164.html','true',[],''],
	['PAGE','3806',jdecode('Guestbook'),jdecode(''),'/3806/index.html','true',[ 
		['PAGE','3801',jdecode('Read+Guestbook'),jdecode(''),'/3806/3801.html','false',[],'']
	],''],
	['PAGE','11301',jdecode('Store+Hours+%26+Closings'),jdecode(''),'/11301.html','true',[],''],
	['PAGE','8801',jdecode('Contact+%26+Location+Info.'),jdecode(''),'/8801.html','true',[],'']];
var siteelementCount=21;
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 theTemplate={
				name: 			'Kalkutta',
				paletteFamily: 	'83A763',
				keyvisualId: 	'6178',
				keyvisualName: 	'kv_6178.jpg',
				fontsetId: 		'11145',
				graphicsetId: 	'11946',
				contentColor: 	'000000',
				contentBGColor: 'ADC895',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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: '20100408-163806'
};
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: '20090319-071508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20100115-104737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20100408-162935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20091115-105012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20100104-170517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20091120-075041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20091120-075154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6122',
internalId:  '',
customField: '20091120-075232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6143',
internalId:  '',
customField: '20091120-075421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100104-170635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20090807-122944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20100104-171102'
};
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:  '23801',
internalId:  '',
customField: '20090526-075234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20100104-172830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20070925-115322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28220',
internalId:  '',
customField: '20100408-164115'
};
var canonHostname = 'wsc-worker01.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+dog+cat+pet+grooming+groomer+food+holistic+healthy+supplement+vitamin+toy+bed+crate+treat+bully+shampoo+flea+tick+supplies+book+training+gift+clothing+';
var metaContents  = 'Westfields+only+all+natural+pet+food+ad+supply+store.++Catering+to+your+pets+health+and+well-being+by+only+selling+products+healthy+for+your+pet%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();
};
