/* [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','401',jdecode('HOME'),jdecode(''),'/401.html','true',[],''],
	['PAGE','452',jdecode('DOG+GROUPS'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','473',jdecode('WORKING+GROUP'),jdecode(''),'/452/473.html','true',[],''],
		['PAGE','494',jdecode('SPORTING+GROUP'),jdecode(''),'/452/494.html','true',[],''],
		['PAGE','515',jdecode('NON-SPORTING+GROUP'),jdecode(''),'/452/515.html','true',[],''],
		['PAGE','536',jdecode('HERDING+GROUP'),jdecode(''),'/452/536.html','true',[],''],
		['PAGE','557',jdecode('TERRIER+GROUP'),jdecode(''),'/452/557.html','true',[],''],
		['PAGE','578',jdecode('TOY+GROUP'),jdecode(''),'/452/578.html','true',[],''],
		['PAGE','599',jdecode('HOUND+GROUP'),jdecode(''),'/452/599.html','true',[],''],
		['PAGE','17501',jdecode('MISC.+GROUP'),jdecode(''),'/452/17501.html','true',[],'']
	],''],
	['PAGE','34501',jdecode('OTHER+DOG+ART'),jdecode(''),'/34501.html','true',[],''],
	['PAGE','662',jdecode('SHOWS+AND+NEWS'),jdecode(''),'/662.html','true',[],''],
	['PAGE','14201',jdecode('MAP'),jdecode(''),'/14201.html','true',[],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Bombay';
theSitetree.paletteFamily='8B0B22';
theSitetree.keyvisualId='7537';
theSitetree.keyvisualName='kv_7537.jpg';
theSitetree.fontsetId='16583';
theSitetree.graphicsetId='12199';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='AEC6B8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Bombay',
				paletteFamily: 	'8B0B22',
				keyvisualId: 	'7537',
				keyvisualName: 	'kv_7537.jpg',
				fontsetId: 		'16583',
				graphicsetId: 	'12199',
				contentColor: 	'000000',
				contentBGColor: 'AEC6B8',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'8B0B22',
				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['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '14201',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1838']={
webappId:    '7008',
documentId:  '401',
internalId:  '1838',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20080509-005445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20080508-105954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20080509-010339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20080509-010545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20080509-010844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20080509-011551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20080509-011837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20080509-005310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20080509-004931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20080227-134233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20080509-010218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20080508-105436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20080227-134305'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN21W0';
var companyName   = '';
var htmlTitle	  = 'METAL+AND+MUD+DOGS.NET';
var metaKeywords  = 'dogs%2C+dog%2C+dog+gates%2C+dog+breed%2C+hound%2C+sporting%2C+non-sporting%2C+non+sporting%2C+terrier%2C+toy%2C+working%2C+herons%2C+kingfisher%2C+salmon%2C+dog+groups%2C+herding%2C+metal+and+mud%2C+metal%2C+mud%2C+stainless+steel%2C+ss%2C+powder+coated%2C+pc%2C+weathered+steel%2C+steel%2C+Bernese+mountain+dog%2C+boxer%2C+dobermann%2C+great+dane%2C+harlequin%2C+giant+schnauzer%2C+schnauzer%2C+newfoundland%2C+harlequin+great+dane%2C+cocker+spaniel%2C+spaniel%2C+field+spaniel%2C+english+springer+spaniel%2C+tibetan+spaniel%2C+retriever%2C+golden+retriever%2C+gordon%2C+setter%2C+gordon+setter%2C+pointing+griffon%2C+griffon%2C+chow+chow%2C+poodle+boston+terrier%2C+boston%2C+french+bulldog%2C+buldog%2C+agility%2C+dalmatian%2C+sharpei%2C+schipperke%2C+sheltie%2C+belgian+tervuren+tervuren%2C+australian+shepherd%2C+shepherd%2C+collie%2C+smooth+collie%2C+corgi%2C+staffordshire%2C+american+staffordshire%2C+border+terrier%2C+bull+terrier%2C+scottish+terrier%2C+westie%2C+parsons+terrier%2C+cavalier+king+charles%2C+cavalier%2C+papillon%2C+english+toy+spaniel%2C+brussels+griffon%2C+griffon%2C+maltese%2C+bichon+frise%2C+%2C+pug%2C+cjihuahua%2C+shih+tzu%2C+japanese+chin%2C+beagle%2C+borzoi%2C+dachshund%2C+irish+wolfhound%2C+ridgeback%2C+dachshund+smooth%2C+dachshund+longhair%2C+grayhound%2C+whippet%2C+dachshund+smooth%2C+saluki%2C+dachshund+wire+hair%2C+chow%2C+daisy+dog%2C+dog+gate%2C+fiesta+cluster%2C+seattle+dog+show%2C+soroptimist+garden+show%2C+sequim%2C+port+angeles%2C+port+townsend%2C+juan+de+fuca+festival%2C+edmonds+arts+festival%2C+anacortes+arts+festival%2C+sequim+lavender+festival%2C+coupeville+arts+and+crafts+festival%2C+issaquah+salmon+days';
var metaContents  = 'dogs%2C+dog%2C+dog+gates%2C+dog+breed%2C+hound%2C+sporting%2C+non-sporting%2C+non+sporting%2C+terrier%2C+toy%2C+working%2C+herons%2C+kingfisher%2C+salmon%2C+dog+groups%2C+herding%2C+metal+and+mud%2C+metal%2C+mud%2C+stainless+steel%2C+ss%2C+powder+coated%2C+pc%2C+weathered+steel%2C+steel%2C+Bernese+mountain+dog%2C+boxer%2C+dobermann%2C+great+dane%2C+harlequin%2C+giant+schnauzer%2C+schnauzer%2C+newfoundland%2C+harlequin+great+dane%2C+cocker+spaniel%2C+spaniel%2C+field+spaniel%2C+english+springer+spaniel%2C+tibetan+spaniel%2C+retriever%2C+golden+retriever%2C+gordon%2C+setter%2C+gordon+setter%2C+pointing+griffon%2C+griffon%2C+chow+chow%2C+poodle+boston+terrier%2C+boston%2C+french+bulldog%2C+buldog%2C+agility%2C+dalmatian%2C+sharpei%2C+schipperke%2C+sheltie%2C+belgian+tervuren+tervuren%2C+australian+shepherd%2C+shepherd%2C+collie%2C+smooth+collie%2C+corgi%2C+staffordshire%2C+american+staffordshire%2C+border+terrier%2C+bull+terrier%2C+scottish+terrier%2C+westie%2C+parsons+terrier%2C+cavalier+king+charles%2C+cavalier%2C+papillon%2C+english+toy+spaniel%2C+brussels+griffon%2C+griffon%2C+maltese%2C+bichon+frise%2C+%2C+pug%2C+cjihuahua%2C+shih+tzu%2C+japanese+chin%2C+beagle%2C+borzoi%2C+dachshund%2C+irish+wolfhound%2C+ridgeback%2C+dachshund+smooth%2C+dachshund+longhair%2C+grayhound%2C+whippet%2C+dachshund+smooth%2C+saluki%2C+dachshund+wire+hair%2C+chow%2C+daisy+dog%2C+dog+gate%2C+fiesta+cluster%2C+seattle+dog+show%2C+soroptimist+garden+show%2C+sequim%2C+port+angeles%2C+port+townsend%2C+juan+de+fuca+festival%2C+edmonds+arts+festival%2C+anacortes+arts+festival%2C+sequim+lavender+festival%2C+coupeville+arts+and+crafts+festival%2C+issaquah+salmon+days';
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();
};
