/* [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','5001',jdecode('Home'),jdecode(''),'/5001.html','true',[],''],
	['PAGE','5094',jdecode('Contact+info'),jdecode(''),'/5094.html','true',[],''],
	['PAGE','5073',jdecode('Proper+Feeding'),jdecode(''),'/5073.html','true',[],''],
	['PAGE','13301',jdecode('For+more+information'),jdecode(''),'/13301.html','true',[],''],
	['PAGE','20227',jdecode('M+%26+K+Farms+Pet+Foods'),jdecode(''),'/20227/index.html','true',[ 
		['PAGE','20248',jdecode('25%2F15+Adult+Breeder+Pak'),jdecode(''),'/20227/20248.html','true',[],''],
		['PAGE','20269',jdecode('32%2F21+Puppy+Lactation+%26+Performance'),jdecode(''),'/20227/20269.html','true',[],''],
		['PAGE','20290',jdecode('32%2F20+Cat+%26+Kitten+Dry+food'),jdecode(''),'/20227/20290.html','true',[],''],
		['PAGE','20311',jdecode('Probiotic+Topping'),jdecode(''),'/20227/20311.html','true',[],'']
	],''],
	['PAGE','7201',jdecode('Royal+Canin+dog+food'),jdecode(''),'/7201.html','true',[],''],
	['PAGE','7222',jdecode('Pro+Pac+pet+food'),jdecode(''),'/7222/index.html','true',[ 
		['PAGE','11443',jdecode('Pro+Pac+Adult+Mini+Chunks'),jdecode(''),'/7222/11443.html','true',[],''],
		['PAGE','11464',jdecode('Pro+Pac+High+Performance'),jdecode(''),'/7222/11464.html','true',[],''],
		['PAGE','11485',jdecode('Pro+Pac+Performance+Puppy'),jdecode(''),'/7222/11485.html','true',[],''],
		['PAGE','11506',jdecode('Pro+Pac+Cat+food'),jdecode(''),'/7222/11506.html','true',[],'']
	],''],
	['PAGE','7243',jdecode('Sportmix+pet+food'),jdecode(''),'/7243/index.html','true',[ 
		['PAGE','11527',jdecode('Sportmix+Adult+Maintenance+dog+food'),jdecode(''),'/7243/11527.html','true',[],''],
		['PAGE','11548',jdecode('Sportmix+Gourmet+Cat+food'),jdecode(''),'/7243/11548.html','true',[],'']
	],''],
	['PAGE','18027',jdecode('Online+Order'),jdecode(''),'/18027.html','true',[],''],
	['PAGE','14201',jdecode('where+to+buy'),jdecode(''),'/14201.html','true',[],''],
	['PAGE','5052',jdecode('Delivery+Schedule'),jdecode(''),'/5052.html','true',[],''],
	['PAGE','7264',jdecode('Kennels'),jdecode(''),'/7264/index.html','true',[ 
		['PAGE','11569',jdecode('Colorado+Kennels'),jdecode(''),'/7264/11569.html','true',[],''],
		['PAGE','11590',jdecode('Kansas+Kennels'),jdecode(''),'/7264/11590.html','true',[],''],
		['PAGE','11611',jdecode('Nebraska+Kennels'),jdecode(''),'/7264/11611.html','true',[],''],
		['PAGE','11632',jdecode('Wyoming+Kennels'),jdecode(''),'/7264/11632.html','true',[],'']
	],''],
	['PAGE','5115',jdecode('About+us'),jdecode(''),'/5115.html','true',[],'']];
var siteelementCount=27;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='E9562E';
theSitetree.keyvisualId='9690';
theSitetree.keyvisualName='kv_9690.gif';
theSitetree.fontsetId='10658';
theSitetree.graphicsetId='11183';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCACA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Dispose',
				paletteFamily: 	'E9562E',
				keyvisualId: 	'9690',
				keyvisualName: 	'kv_9690.gif',
				fontsetId: 		'10658',
				graphicsetId: 	'11183',
				contentColor: 	'000000',
				contentBGColor: 'CCCACA',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20091025-194837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5094',
internalId:  '',
customField: '20081012-231247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20091025-192422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5073',
internalId:  '',
customField: '20081012-231655'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20090215-160232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7222',
internalId:  '',
customField: '20090329-230430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7243',
internalId:  '',
customField: '20090329-230234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7264',
internalId:  '',
customField: '20081207-185852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5115',
internalId:  '',
customField: '20091025-194941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20227',
internalId:  '',
customField: '20091026-011454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11464',
internalId:  '',
customField: '20081228-192044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11443',
internalId:  '',
customField: '20081228-192227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11569',
internalId:  '',
customField: '20081228-164848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11590',
internalId:  '',
customField: '20090713-224759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11611',
internalId:  '',
customField: '20090713-224905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11632',
internalId:  '',
customField: '20081228-165832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18027',
internalId:  '',
customField: '20081228-235923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11485',
internalId:  '',
customField: '20081228-191913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11506',
internalId:  '',
customField: '20081228-193142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11527',
internalId:  '',
customField: '20081228-210604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11548',
internalId:  '',
customField: '20081228-211206'
};
webappMappings['7008']=webappMappings['7008-11320']={
webappId:    '7008',
documentId:  '13301',
internalId:  '11320',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20081228-173436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20081228-174258'
};
webappMappings['4001']=webappMappings['4001-14503716']={
webappId:    '4001',
documentId:  '18027',
internalId:  '14503716',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20248',
internalId:  '',
customField: '20091026-013205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20311',
internalId:  '',
customField: '20091026-013318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20269',
internalId:  '',
customField: '20090917-221216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20290',
internalId:  '',
customField: '20090917-221216'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2J6V';
var companyName   = 'IT+Feeds%2F+Terry+%26+Chris+Lytle';
var htmlTitle	  = 'IT+FEEDS+Royal+Canin%2C+Pro+Pac%2C+and+Sportmix+pet+foods';
var metaKeywords  = 'Royal+Canin%2C+Pro+Pac%2C+Sportmix%2C+Nebraska%2C+Kansas%2C+Colorado%2C+Wyoming%2C+Pet+food%2C+Dog+food%2C+puppies%2C+cat+food%2C+pets%2C+dogs%2C+kennels%2C+kennel%2C';
var metaContents  = 'Royal+Canin%2C+Pro+Pac%2C+and+Sportmix+pet+foods+in+Western+Nebraska%2C+NW+Kansas%2C+NE+Colorado+and+SE+Wyoming';
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();
};
