/* [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','3201',jdecode('Home'),jdecode(''),'/3201.html','true',[],''],
	['PAGE','27101',jdecode('Our+Family'),jdecode(''),'/27101.html','true',[],''],
	['PAGE','5601',jdecode('My+Girls'),jdecode(''),'/5601.html','true',[],''],
	['PAGE','3743',jdecode('My+Boy'),jdecode(''),'/3743.html','true',[],''],
	['PAGE','3701',jdecode('Nursery'),jdecode(''),'/3701.html','true',[],''],
	['PAGE','41801',jdecode('Honeymooners'),jdecode(''),'/41801.html','true',[],''],
	['PAGE','3764',jdecode('Happy+Puppies'),jdecode(''),'/3764.html','true',[],''],
	['PAGE','4501',jdecode('History'),jdecode(''),'/4501.html','true',[],''],
	['PAGE','3315',jdecode('Care+tips'),jdecode(''),'/3315.html','true',[],''],
	['PAGE','3336',jdecode('Tips+and+tricks'),jdecode(''),'/3336.html','true',[],''],
	['PAGE','3420',jdecode('Food+%26+Water+Bottle+Holder'),jdecode(''),'/3420.html','true',[],''],
	['PAGE','3441',jdecode('Veterinary'),jdecode(''),'/3441.html','true',[],''],
	['PAGE','3462',jdecode('Insurance'),jdecode(''),'/3462.html','true',[],''],
	['PAGE','3785',jdecode('Contact+Us'),jdecode(''),'/3785.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Charm';
theSitetree.paletteFamily='E1D5F2';
theSitetree.keyvisualId='11068';
theSitetree.keyvisualName='kv_11068.jpg';
theSitetree.fontsetId='31948';
theSitetree.graphicsetId='13791';
theSitetree.contentColor='1F1F1F';
theSitetree.contentBGColor='E1D5F2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Charm',
				paletteFamily: 	'E1D5F2',
				keyvisualId: 	'11068',
				keyvisualName: 	'kv_11068.jpg',
				fontsetId: 		'31948',
				graphicsetId: 	'13791',
				contentColor: 	'1F1F1F',
				contentBGColor: 'E1D5F2',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20100625-205926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3785',
internalId:  '',
customField: '20091002-214416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3462',
internalId:  '',
customField: '20091004-081428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3441',
internalId:  '',
customField: '20090604-144326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3420',
internalId:  '',
customField: '20100720-090623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20090604-141426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20100717-233608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3743',
internalId:  '',
customField: '20091120-124743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3701',
internalId:  '',
customField: '20100720-084912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3764',
internalId:  '',
customField: '20100224-190851'
};
webappMappings['7008']=webappMappings['7008-17767']={
webappId:    '7008',
documentId:  '3785',
internalId:  '17767',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3315',
internalId:  '',
customField: '20091004-081800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3336',
internalId:  '',
customField: '20090617-155939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41801',
internalId:  '',
customField: '20100514-173716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20100625-210112'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN349X';
var companyName   = 'Imperial+Shih+Tzu%27s+by+Tricia';
var htmlTitle	  = 'Imperial+Shih+Tzu%27s+By+Tricia';
var metaKeywords  = 'Shih+TzuPuppies+l+North+Carolina++l+Shih+Tzu+Puppies+For+Sale+l+AKC+Puppies+l+Shih+Tzu+Breeders+%7C+Gifts+%7C+Shih+Tzu+%7C+Dogs+for+Sale+%7C+Puppies+for+Sale+%7C+Shih+Tzu+Puppies+%7CAKC+Breeder%7C+Shih+Tzu+Breeder%7C+Imperial+Shih+Tzu+%7C+Puppies+%7C+Show+Dogs+%7C+Valentines+Day+%7C';
var metaContents  = 'AKC+Shih+Tzu+Puppies+For+Sale+';
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();
};
