/* [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','5101',jdecode('Home'),jdecode(''),'/5101/index.html','true',[ 
		['PAGE','8501',jdecode('Board+of+Governors+'),jdecode(''),'/5101/8501.html','true',[],''],
		['PAGE','6985',jdecode('Officers'),jdecode(''),'/5101/6985.html','true',[],''],
		['PAGE','55812',jdecode('Committees'),jdecode(''),'/5101/55812.html','true',[],''],
		['PAGE','8901',jdecode('Affiliated+Clubs'),jdecode(''),'/5101/8901.html','true',[],''],
		['PAGE','33212',jdecode('Code+of+Ethics'),jdecode(''),'/5101/33212.html','true',[],''],
		['PAGE','13112',jdecode('Membership+App.'),jdecode(''),'/5101/13112.html','true',[],'']
	],''],
	['PAGE','53312',jdecode('Meet+the+Breeds'),jdecode(''),'/53312.html','true',[],''],
	['PAGE','55112',jdecode('Breeds+'),jdecode(''),'/55112/index.html','true',[ 
		['PAGE','6501',jdecode('Smooth+Breed+Standard'),jdecode(''),'/55112/6501.html','true',[],''],
		['PAGE','11712',jdecode('Wire+Breed+Standard'),jdecode(''),'/55112/11712.html','true',[],'']
	],''],
	['PAGE','16312',jdecode('Looking+For+A+Puppy%3F'),jdecode(''),'/16312.html','true',[],''],
	['PAGE','11754',jdecode('Breeders%26%23x27%3B+Website'),jdecode(''),'/11754.html','true',[],''],
	['PAGE','11775',jdecode('AFTC+Rescue'),jdecode(''),'/11775.html','true',[],''],
	['PAGE','6943',jdecode('Club+News'),jdecode(''),'/6943/index.html','true',[ 
		['PAGE','24512',jdecode('AKC+News'),jdecode(''),'/6943/24512.html','true',[],''],
		['PAGE','24533',jdecode('Legislative+News'),jdecode(''),'/6943/24533.html','true',[],''],
		['PAGE','28012',jdecode('Health+News'),jdecode(''),'/6943/28012.html','true',[],'']
	],''],
	['PAGE','81012',jdecode('2010+Annual+Dinner'),jdecode(''),'/81012.html','true',[],''],
	['PAGE','81812',jdecode('Montgomery+Ads'),jdecode(''),'/81812.html','true',[],''],
	['PAGE','12912',jdecode('Judges+Education'),jdecode(''),'/12912.html','true',[],''],
	['PAGE','53112',jdecode('Member+Education'),jdecode(''),'/53112.html','true',[],''],
	['PAGE','6901',jdecode('Coming+Events'),jdecode(''),'/6901.html','true',[],''],
	['PAGE','73312',jdecode('Show+Results'),jdecode(''),'/73312/index.html','true',[ 
		['PAGE','6922',jdecode('2008+Show+Results'),jdecode(''),'/73312/6922.html','true',[],'']
	],''],
	['PAGE','58512',jdecode('Versatility+Awards'),jdecode(''),'/58512/index.html','true',[ 
		['PAGE','74312',jdecode('2008+Versatility+Awards'),jdecode(''),'/58512/74312.html','true',[],''],
		['PAGE','74333',jdecode('2007+Versatility+Awards'),jdecode(''),'/58512/74333.html','true',[],'']
	],''],
	['PAGE','7006',jdecode('AFTC+Store'),jdecode(''),'/7006.html','true',[],''],
	['PAGE','13712',jdecode('Links+to+Other+Sites+'),jdecode(''),'/13712/index.html','true',[ 
		['PAGE','28312',jdecode('Links+to+World+Wide'),jdecode(''),'/13712/28312.html','true',[],'']
	],''],
	['PAGE','6964',jdecode('Members+Only'),jdecode(''),'/6964.html','true',[],''],
	['PAGE','77612',jdecode('Grand+Champion'),jdecode(''),'/77612.html','true',[],'']];
var siteelementCount=33;
theSitetree.topTemplateName='Sub_Port';
theSitetree.paletteFamily='416FB6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10376';
theSitetree.graphicsetId='10540';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Sub_Port',
				paletteFamily: 	'416FB6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10376',
				graphicsetId: 	'10540',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:  '5101',
internalId:  '',
customField: '20100125-192920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77612',
internalId:  '',
customField: '20100201-224303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20091007-230108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11754',
internalId:  '',
customField: '20090308-155838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20090314-210302'
};
webappMappings['7050']=webappMappings['7050-7726']={
webappId:    '7050',
documentId:  '6943',
internalId:  '7726',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11712',
internalId:  '',
customField: '20090314-210955'
};
webappMappings['4001']=webappMappings['4001-15422867']={
webappId:    '4001',
documentId:  '7006',
internalId:  '15422867',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6922',
internalId:  '',
customField: '20100112-205800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6943',
internalId:  '',
customField: '20091007-230912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6964',
internalId:  '',
customField: '20090421-224046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6985',
internalId:  '',
customField: '20090423-225932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7006',
internalId:  '',
customField: '20090314-205145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20100505-204516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20100531-235135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13112',
internalId:  '',
customField: '20090428-204358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12912',
internalId:  '',
customField: '20100505-213447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11775',
internalId:  '',
customField: '20090314-181847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13712',
internalId:  '',
customField: '20090505-225543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28012',
internalId:  '',
customField: '20100531-235257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24533',
internalId:  '',
customField: '20091101-221247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81812',
internalId:  '',
customField: '20100726-094204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16312',
internalId:  '',
customField: '20090621-233737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24512',
internalId:  '',
customField: '20091007-231711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28312',
internalId:  '',
customField: '20090707-232456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33212',
internalId:  '',
customField: '20090420-233410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53312',
internalId:  '',
customField: '20100125-192847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53112',
internalId:  '',
customField: '20100505-214812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55112',
internalId:  '',
customField: '20090428-081252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55812',
internalId:  '',
customField: '20091101-222241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58512',
internalId:  '',
customField: '20100125-185830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73312',
internalId:  '',
customField: '20100304-202753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74333',
internalId:  '',
customField: '20100121-195645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74312',
internalId:  '',
customField: '20100125-190842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81012',
internalId:  '',
customField: '20100722-211755'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INEPO1';
var companyName   = 'American+Fox+Terrier+Club';
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();
};
