/* [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','7001',jdecode('1.++++Home'),jdecode(''), jdecode('%2F7001.html'), 'true',[],'',''],
	['PAGE','7052',jdecode('2.++Health+%26+Food+%26+Care'),jdecode(''), jdecode('%2F7052.html'), 'true',[],'',''],
	['PAGE','7094',jdecode('3.++Delivery%2FShipping++info'),jdecode(''), jdecode('%2F7094.html'), 'true',[],'',''],
	['PAGE','968456',jdecode('4.+Requirements+'),jdecode(''), jdecode('%2F968456.html'), 'true',[],'',''],
	['PAGE','1537842',jdecode('Hypoglycemia'),jdecode(''), jdecode('%2F1537842.html'), 'true',[],'',''],
	['PAGE','1435743',jdecode('Unhonorable+Customers'),jdecode(''), jdecode('%2F1435743.html'), 'true',[],'',''],
	['PAGE','2014885',jdecode('Yorkies++Morkies'),jdecode(''), jdecode('%2F2014885.html'), 'true',[],'',''],
	['PAGE','1904385',jdecode('Yorki-Pom+%26+Yorki-Pek'),jdecode(''), jdecode('%2F1904385.html'), 'true',[],'',''],
	['PAGE','1981585',jdecode('Yorkiepoo+%26+Chorkie'),jdecode(''), jdecode('%2F1981585.html'), 'true',[],'',''],
	['PAGE','2178818',jdecode('Shorkies+%26+Shiapoo'),jdecode(''), jdecode('%2F2178818.html'), 'true',[],'',''],
	['PAGE','7343',jdecode('Shih-tzu+%26+Pekingese'),jdecode(''), jdecode('%2F7343.html'), 'true',[],'',''],
	['PAGE','1585342',jdecode('Maltese+Malshi+Maltipoo'),jdecode(''), jdecode('%2F1585342.html'), 'true',[],'',''],
	['PAGE','1716296',jdecode('Maltipom+Maltipek+Malshi'),jdecode(''), jdecode('%2F1716296.html'), 'true',[],'',''],
	['PAGE','1850685',jdecode('Toy+Poodle+%26+Dachshund'),jdecode(''), jdecode('%2F1850685.html'), 'true',[],'',''],
	['PAGE','1712975',jdecode('Pomeranian++Chihuahua'),jdecode(''), jdecode('%2F1712975.html'), 'true',[],'',''],
	['PAGE','666917',jdecode('Crate+Training'),jdecode(''), jdecode('%2F666917.html'), 'true',[],'',''],
	['PAGE','668312',jdecode('Housetraining'),jdecode(''), jdecode('%2F668312.html'), 'true',[],'',''],
	['PAGE','764056',jdecode('Spay+%26++Neuter'),jdecode(''), jdecode('%2F764056.html'), 'true',[],'',''],
	['PAGE','1540342',jdecode('Hybrid+vs+Pure+Breed'),jdecode(''), jdecode('%2F1540342.html'), 'true',[],'',''],
	['PAGE','764156',jdecode('Poisonous+Substances'),jdecode(''), jdecode('%2F764156.html'), 'true',[],'',''],
	['PAGE','1064598',jdecode('Whats+in+my+dogs+food%3F'),jdecode(''), jdecode('%2F1064598.html'), 'true',[],'',''],
	['PAGE','970056',jdecode('Puppy+Brag+Page+A'),jdecode(''), jdecode('%2F970056.html'), 'true',[],'',''],
	['PAGE','1118756',jdecode('Puppy+Brag+Page+B'),jdecode(''), jdecode('%2F1118756.html'), 'true',[],'',''],
	['PAGE','1510531',jdecode('Puppy+Brag+Page+C'),jdecode(''), jdecode('%2F1510531.html'), 'true',[],'',''],
	['PAGE','1774375',jdecode('Puppy+Brag+page+D'),jdecode(''), jdecode('%2F1774375.html'), 'true',[],'',''],
	['PAGE','1992285',jdecode('Puppy+Brag+page+E'),jdecode(''), jdecode('%2F1992285.html'), 'true',[],'',''],
	['PAGE','2055017',jdecode('Puppy+Brag+page+F'),jdecode(''), jdecode('%2F2055017.html'), 'true',[],'',''],
	['PAGE','2071296',jdecode('Puppy+Brag+Page+G'),jdecode(''), jdecode('%2F2071296.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Brush';
theSitetree.paletteFamily='6F7DC8';
theSitetree.keyvisualId='11941';
theSitetree.keyvisualName='kv_11941.jpg';
theSitetree.fontsetId='33211';
theSitetree.graphicsetId='14102';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Brush',
				paletteFamily: 	'6F7DC8',
				keyvisualId: 	'11941',
				keyvisualName: 	'kv_11941.jpg',
				fontsetId: 		'33211',
				graphicsetId: 	'14102',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20111227-220552'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '7001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7052',
internalId:  '',
customField: '20111202-013855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7094',
internalId:  '',
customField: '20120203-222704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1510531',
internalId:  '',
customField: '20111123-203047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2014885',
internalId:  '',
customField: '20120207-211026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7343',
internalId:  '',
customField: '20120207-211648'
};
webappMappings['1501']=webappMappings['1501-10754865']={
webappId:    '1501',
documentId:  '7001',
internalId:  '10754865',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1981585',
internalId:  '',
customField: '20120207-211132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '764156',
internalId:  '',
customField: '20111123-204618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1904385',
internalId:  '',
customField: '20120201-223721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '666917',
internalId:  '',
customField: '20111123-204905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1992285',
internalId:  '',
customField: '20111123-203742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '668312',
internalId:  '',
customField: '20111123-204809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1064598',
internalId:  '',
customField: '20111123-204548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1716296',
internalId:  '',
customField: '20120206-103852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1712975',
internalId:  '',
customField: '20120203-222411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '764056',
internalId:  '',
customField: '20111123-204743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2178818',
internalId:  '',
customField: '20120207-211555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '968456',
internalId:  '',
customField: '20111202-014209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '970056',
internalId:  '',
customField: '20111123-202159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1537842',
internalId:  '',
customField: '20111202-014523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1850685',
internalId:  '',
customField: '20120207-212421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1435743',
internalId:  '',
customField: '20120112-190852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1118756',
internalId:  '',
customField: '20111123-202449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1540342',
internalId:  '',
customField: '20110425-170911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1585342',
internalId:  '',
customField: '20120207-212250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1774375',
internalId:  '',
customField: '20111123-203614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2055017',
internalId:  '',
customField: '20111123-204154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2071296',
internalId:  '',
customField: '20111123-204425'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2VAR';
var companyName   = 'Toy+Breed+puppies+for+sale+by+private+in-home+breeders';
var htmlTitle	  = 'Yorkie+Yorkiepoo+Shih-tzu+Maltese+Morkie+Shorkie+Toy+Poodle+Pomeranian+puppies+for+sale+NY+MA+CT+RI+NJ+NH+DE+MD+VA+VT+ME+PA';
var metaKeywords  = 'Yorkie+Shihtzu+Maltese+Toy+Poodle+Boston+Terrier+Pug+Chihuahua+Havanese+Pomeranian+Cavalier+Hybrid+Mixed+Toy+Breeds+Puppies+Breeders+for+sale+in+Massachusettes+Rhode+island+Connecticut+New+Jersey+New+York+Delaware+New+Hampshire+Vermont+Maryland+';
var metaContents  = 'Yorkie+Shihtzu+Maltese+Toy+Poodle+Boston+Terrier+Pug+Chihuahua+Havanese+Pomeranian+Cavalier+Hybrid+Mixed+Toy+Breeds+Puppies+Breeders+for+sale+in+Massachusettes+Rhode+island+Connecticut+New+Jersey+New+York+Delaware+New+Hampshire+Vermont+Maryland+';
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();
};

