/* [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','99049',jdecode('Professional+Photography'),jdecode(''),'/99049.html','true',[],'',''],
	['PAGE','6401',jdecode('1.+Home'),jdecode(''),'/6401.html','true',[],'',''],
	['PAGE','6701',jdecode('2.+About+us'),jdecode(''),'/6701.html','true',[],'',''],
	['PAGE','16438',jdecode('3.+Contact'),jdecode(''),'/16438.html','true',[],'',''],
	['PAGE','7699',jdecode('4.Yorkshire+Terriers'),jdecode(''),'/7699.html','true',[],'',''],
	['PAGE','8227',jdecode('5.+Silky+Terriers'),jdecode(''),'/8227.html','true',[],'',''],
	['PAGE','9027',jdecode('6.+Miniature+Shih+tzu'),jdecode(''),'/9027.html','true',[],'',''],
	['PAGE','10227',jdecode('7.+Yorkie+pups+available+now%21'),jdecode(''),'/10227.html','true',[],'',''],
	['PAGE','10527',jdecode('8.+Silky+pups+available+now%21'),jdecode(''),'/10527.html','true',[],'',''],
	['PAGE','11027',jdecode('9.+Shih+tzu+pups+available+now%21'),jdecode(''),'/11027.html','true',[],'',''],
	['PAGE','38849',jdecode('10.+Designer+Pups+available+now%21'),jdecode(''),'/38849.html','true',[],'',''],
	['PAGE','19538',jdecode('11.+Adult+Dogs+for+Sale'),jdecode(''),'/19538.html','true',[],'',''],
	['PAGE','16038',jdecode('12.+Allergic+to+Dogs%3F'),jdecode(''),'/16038.html','true',[],'',''],
	['PAGE','11327',jdecode('13.+Scammers%21%21%21%21%21'),jdecode(''),'/11327.html','true',[],'',''],
	['PAGE','16238',jdecode('14.++Love+Notes'),jdecode(''),'/16238.html','true',[],'',''],
	['PAGE','16838',jdecode('15.+Champions+%26+Pedigrees'),jdecode(''),'/16838.html','true',[],'',''],
	['PAGE','13327',jdecode('16.+Code+of+Ethics'),jdecode(''),'/13327.html','true',[],'',''],
	['PAGE','18838',jdecode('17.+News'),jdecode(''),'/18838.html','true',[],'',''],
	['PAGE','13027',jdecode('18.+Your+TO+DO+List+%21+'),jdecode(''),'/13027.html','true',[],'',''],
	['PAGE','26138',jdecode('19.+Questions'),jdecode(''),'/26138.html','true',[],'',''],
	['PAGE','26838',jdecode('20.+So+you+want+to+BREED%3F'),jdecode(''),'/26838.html','true',[],'',''],
	['PAGE','34738',jdecode('21.+Random+pix+of+Family'),jdecode(''),'/34738.html','true',[],'',''],
	['PAGE','53849',jdecode('22.+Forever+Homes'),jdecode(''),'/53849.html','true',[],'',''],
	['PAGE','75449',jdecode('23.++STRESS%3B+the+real+danger'),jdecode(''),'/75449.html','true',[],'',''],
	['PAGE','79349',jdecode('24.+Letter+of+recommendation%21'),jdecode(''),'/79349.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				c_color: 		'FFFFFF',
				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:  '6401',
internalId:  '',
customField: '20100829-180251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20100829-102043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7699',
internalId:  '',
customField: '20100529-114114'
};
webappMappings['7060']=webappMappings['7060-69274a6473a9635adf1736d34da3af47']={
webappId:    '7060',
documentId:  '7699',
internalId:  '69274a6473a9635adf1736d34da3af47',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8227',
internalId:  '',
customField: '20100503-181829'
};
webappMappings['7060']=webappMappings['7060-f4148b404852f984b5366d97274f0977']={
webappId:    '7060',
documentId:  '8227',
internalId:  'f4148b404852f984b5366d97274f0977',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-f16e195a93a0a747cd8719c5cfaebe81']={
webappId:    '7060',
documentId:  '9027',
internalId:  'f16e195a93a0a747cd8719c5cfaebe81',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9027',
internalId:  '',
customField: '20100110-162806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10227',
internalId:  '',
customField: '20100826-225104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10527',
internalId:  '',
customField: '20100703-172131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11027',
internalId:  '',
customField: '20100826-223709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11327',
internalId:  '',
customField: '20091026-153237'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13027',
internalId:  '',
customField: '20100511-215207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13327',
internalId:  '',
customField: '20091128-190442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16038',
internalId:  '',
customField: '20090921-112046'
};
webappMappings['1002']=webappMappings['1002-16238aendu0inv09f']={
webappId:    '1002',
documentId:  '16238',
internalId:  '16238aendu0inv09f',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16238',
internalId:  '',
customField: '20091201-082656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16438',
internalId:  '',
customField: '20100218-125046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16838',
internalId:  '',
customField: '20100724-151101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18838',
internalId:  '',
customField: '20091014-064949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19538',
internalId:  '',
customField: '20100819-134502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26838',
internalId:  '',
customField: '20091104-181750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26138',
internalId:  '',
customField: '20091126-134025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38849',
internalId:  '',
customField: '20100610-232440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34738',
internalId:  '',
customField: '20100829-112841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75449',
internalId:  '',
customField: '20100529-113212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53849',
internalId:  '',
customField: '20100630-111212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79349',
internalId:  '',
customField: '20100529-111835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99049',
internalId:  '',
customField: '20100829-181555'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INV09F';
var companyName   = 'Welcome+to+Kingcreek+Kennel%21';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
