/* [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','22201',jdecode('Home'),jdecode(''), jdecode('%2F22201.html'), 'true',[],'',''],
	['PAGE','29422',jdecode('Holistic+Pet+Food'),jdecode(''), jdecode('%2F29422%2Findex.html'), 'true',[ 
		['PAGE','58901',jdecode('Orijen'),jdecode(''), jdecode('%2F29422%2F58901.html'), 'true',[],'',''],
		['PAGE','58922',jdecode('Acana'),jdecode(''), jdecode('%2F29422%2F58922.html'), 'true',[],'',''],
		['PAGE','77001',jdecode('N-R-G'),jdecode(''), jdecode('%2F29422%2F77001.html'), 'true',[],'',''],
		['PAGE','58943',jdecode('Proseries'),jdecode(''), jdecode('%2F29422%2F58943.html'), 'true',[],'',''],
		['PAGE','70401',jdecode('Prairie'),jdecode(''), jdecode('%2F29422%2F70401.html'), 'true',[],'','']
	],'',''],
	['PAGE','29443',jdecode('Why+Switch+to+Holistic%3F'),jdecode(''), jdecode('%2F29443%2Findex.html'), 'true',[ 
		['PAGE','70422',jdecode('Why+Grain+Free'),jdecode(''), jdecode('%2F29443%2F70422.html'), 'true',[],'',''],
		['PAGE','70443',jdecode('Benefits+of+Holistic'),jdecode(''), jdecode('%2F29443%2F70443.html'), 'true',[],'','']
	],'',''],
	['PAGE','29485',jdecode('Health+%26+Treatments'),jdecode(''), jdecode('%2F29485%2Findex.html'), 'true',[ 
		['PAGE','67801',jdecode('Skin+Conditions'),jdecode(''), jdecode('%2F29485%2F67801.html'), 'true',[],'',''],
		['PAGE','88201',jdecode('Arthritis%2FHips'),jdecode(''), jdecode('%2F29485%2F88201.html'), 'true',[],'',''],
		['PAGE','67822',jdecode('Tear+Stains'),jdecode(''), jdecode('%2F29485%2F67822.html'), 'true',[],'',''],
		['PAGE','67843',jdecode('Urinary+Crystals'),jdecode(''), jdecode('%2F29485%2F67843.html'), 'true',[],'',''],
		['PAGE','67864',jdecode('Digestive+Problems'),jdecode(''), jdecode('%2F29485%2F67864.html'), 'true',[],'',''],
		['PAGE','68001',jdecode('Worms+%26+Fleas'),jdecode(''), jdecode('%2F29485%2F68001.html'), 'true',[],'',''],
		['PAGE','83701',jdecode('Dental+Health'),jdecode(''), jdecode('%2F29485%2F83701.html'), 'true',[],'','']
	],'',''],
	['PAGE','29464',jdecode('Dog+Products'),jdecode(''), jdecode('%2F29464%2Findex.html'), 'true',[ 
		['PAGE','58964',jdecode('Dog+Apparel'),jdecode(''), jdecode('%2F29464%2F58964.html'), 'true',[],'',''],
		['PAGE','74701',jdecode('Collars'),jdecode(''), jdecode('%2F29464%2F74701.html'), 'true',[],'',''],
		['PAGE','58985',jdecode('Dog+Beds'),jdecode(''), jdecode('%2F29464%2F58985.html'), 'true',[],'',''],
		['PAGE','59006',jdecode('Training+Products'),jdecode(''), jdecode('%2F29464%2F59006.html'), 'true',[],'',''],
		['PAGE','67101',jdecode('Hunting+Dogs'),jdecode(''), jdecode('%2F29464%2F67101.html'), 'true',[],'',''],
		['PAGE','65301',jdecode('Grooming'),jdecode(''), jdecode('%2F29464%2F65301.html'), 'true',[],'','']
	],'',''],
	['PAGE','61901',jdecode('Cat+Products'),jdecode(''), jdecode('%2F61901.html'), 'true',[],'',''],
	['PAGE','22273',jdecode('Newfoundland+Products'),jdecode(''), jdecode('%2F22273.html'), 'true',[],'',''],
	['PAGE','39401',jdecode('Treats'),jdecode(''), jdecode('%2F39401.html'), 'true',[],'',''],
	['PAGE','61922',jdecode('Small+Animal+Supplies'),jdecode(''), jdecode('%2F61922.html'), 'true',[],'',''],
	['PAGE','69601',jdecode('Contact+Us'),jdecode(''), jdecode('%2F69601.html'), 'true',[],'',''],
	['PAGE','84701',jdecode('Grooming'),jdecode(''), jdecode('%2F84701.html'), 'true',[],'',''],
	['PAGE','85201',jdecode('SPCA+Pet+of+the+Month'),jdecode(''), jdecode('%2F85201.html'), 'true',[],'',''],
	['PAGE','91601',jdecode('Specials'),jdecode(''), jdecode('%2F91601.html'), 'true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='EBEAEA';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='73';
theSitetree.graphicsetId='88';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F5F5F5';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTC24G'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'EBEAEA',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'73',
				graphicsetId: 	'88',
				contentColor: 	'000000',
				contentBGColor: 'F5F5F5',
				a_color: 		'EBEAEA',
				b_color: 		'666666',
				c_color: 		'000000',
				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:  '58943',
internalId:  '',
customField: '20101027-135522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58922',
internalId:  '',
customField: '20101027-134507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29464',
internalId:  '',
customField: '20110316-171848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20120125-082524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29485',
internalId:  '',
customField: '20110811-090745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22273',
internalId:  '',
customField: '20100504-140354'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24M']={
webappId:    '5003',
documentId:  '22201',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24M',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39401',
internalId:  '',
customField: '20101028-084027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58901',
internalId:  '',
customField: '20101227-111221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29443',
internalId:  '',
customField: '20110622-081654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29422',
internalId:  '',
customField: '20110512-160026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91601',
internalId:  '',
customField: '20120125-092002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58964',
internalId:  '',
customField: '20110316-171708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58985',
internalId:  '',
customField: '20120108-084655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59006',
internalId:  '',
customField: '20120108-085157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61922',
internalId:  '',
customField: '20120108-084751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61901',
internalId:  '',
customField: '20120108-084826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65301',
internalId:  '',
customField: '20110207-123734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67101',
internalId:  '',
customField: '20101106-094255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67822',
internalId:  '',
customField: '20110811-085338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67801',
internalId:  '',
customField: '20110811-084908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67864',
internalId:  '',
customField: '20110811-084618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68001',
internalId:  '',
customField: '20110811-084439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67843',
internalId:  '',
customField: '20101106-140333'
};
webappMappings['7008']=webappMappings['7008-10228']={
webappId:    '7008',
documentId:  '69601',
internalId:  '10228',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69601',
internalId:  '',
customField: '20101207-130454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70422',
internalId:  '',
customField: '20110207-124541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70443',
internalId:  '',
customField: '20101227-111045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83701',
internalId:  '',
customField: '20110525-073644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70401',
internalId:  '',
customField: '20110512-160241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74701',
internalId:  '',
customField: '20120108-084602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77001',
internalId:  '',
customField: '20110525-071512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84701',
internalId:  '',
customField: '20110528-090231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85201',
internalId:  '',
customField: '20120125-092402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88201',
internalId:  '',
customField: '20110811-091946'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXE3K';
var companyName   = 'Pet+Central';
var htmlTitle	  = 'Pet+Central+-+Holistic+Pet+Food+and+Supplies';
var metaKeywords  = 'orijen%2C+pet+food%2C+dogs%2C+cats%2C+rabbits%2C+collars%2C+leashes%2C+bowls%2C+neater+feeder%2C+shampoos%2C+acana+dog+food%2C+beds%2C+pooper+scooper%2C+toys%2C+kennels%2C+Gander';
var metaContents  = 'Pet+Central+provides+World+Class+Pet+food+made+from+FRESH+canadian+ingredients.+Visit+us+at+50+Roe+Avenue+Gander+for+your+FREE+SAMPLE+today%21+We+also+carry+a+large+selection+of+dog+and+cat+supplies+and+accessories%2C+with+a+focus+on+Holisic+and+natural+products.';
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();
};

