/* [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','9101',jdecode('Home'),jdecode(''),'/9101.html','true',[],'',''],
	['PAGE','9173',jdecode('About+us'),jdecode(''),'/9173/index.html','true',[ 
		['PAGE','20401',jdecode('Board+of+Directors'),jdecode(''),'/9173/20401.html','true',[],'',''],
		['PAGE','9194',jdecode('Our+team'),jdecode(''),'/9173/9194.html','true',[],'',''],
		['PAGE','20422',jdecode('History'),jdecode(''),'/9173/20422.html','true',[],'',''],
		['PAGE','27901',jdecode('Farm+Credit+System'),jdecode(''),'/9173/27901.html','true',[],'',''],
		['PAGE','27401',jdecode('AgriBank'),jdecode(''),'/9173/27401.html','true',[],'',''],
		['PAGE','27422',jdecode('Farm+Credit+Administration'),jdecode(''),'/9173/27422.html','true',[],'',''],
		['PAGE','46101',jdecode('Annual+Report'),jdecode(''),'/9173/46101.html','true',[],'',''],
		['PAGE','52801',jdecode('Quarterly+Report'),jdecode(''),'/9173/52801.html','true',[],'','']
	],'',''],
	['PAGE','9152',jdecode('Contact'),jdecode(''),'/9152/index.html','true',[ 
		['PAGE','20201',jdecode('Locations'),jdecode(''),'/9152/20201.html','true',[],'',''],
		['PAGE','20622',jdecode('Dermott-Central+Office'),jdecode(''),'/9152/20622.html','true',[],'',''],
		['PAGE','20643',jdecode('Lake+Village-Branch+Office'),jdecode(''),'/9152/20643.html','true',[],'',''],
		['PAGE','20664',jdecode('Monticello-Satellite+Office'),jdecode(''),'/9152/20664.html','true',[],'','']
	],'',''],
	['PAGE','20222',jdecode('PCA+Loans'),jdecode(''),'/20222/index.html','true',[ 
		['PAGE','20685',jdecode('Farm+Operating+Loans'),jdecode(''),'/20222/20685.html','true',[],'',''],
		['PAGE','20706',jdecode('Equipment+Loans'),jdecode(''),'/20222/20706.html','true',[],'',''],
		['PAGE','26801',jdecode('YBS+Program'),jdecode(''),'/20222/26801.html','true',[],'','']
	],'',''],
	['PAGE','20243',jdecode('FLCA+Loans'),jdecode(''),'/20243/index.html','true',[ 
		['PAGE','20727',jdecode('Variable+Rate'),jdecode(''),'/20243/20727.html','true',[],'',''],
		['PAGE','20748',jdecode('Adjustable+Rates'),jdecode(''),'/20243/20748.html','true',[],'',''],
		['PAGE','20769',jdecode('Fixed+Rates'),jdecode(''),'/20243/20769.html','true',[],'','']
	],'',''],
	['PAGE','20122',jdecode('News+%26+Information'),jdecode(''),'/20122.html','true',[],'',''],
	['PAGE','47401',jdecode('Weather'),jdecode(''),'/47401.html','true',[],'',''],
	['PAGE','28801',jdecode('Privacy+Notice'),jdecode(''),'/28801.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Display';
theSitetree.paletteFamily='222222';
theSitetree.keyvisualId='11387';
theSitetree.keyvisualName='kv_11387.jpg';
theSitetree.fontsetId='31963';
theSitetree.graphicsetId='13802';
theSitetree.contentColor='1B1B1B';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Display',
				paletteFamily: 	'222222',
				keyvisualId: 	'11387',
				keyvisualName: 	'kv_11387.jpg',
				fontsetId: 		'31963',
				graphicsetId: 	'13802',
				contentColor: 	'1B1B1B',
				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:  '9101',
internalId:  '',
customField: '20091102-170336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9152',
internalId:  '',
customField: '20090908-102758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9173',
internalId:  '',
customField: '20090702-150742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47401',
internalId:  '',
customField: '20090706-104741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52801',
internalId:  '',
customField: '20091105-110823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20122',
internalId:  '',
customField: '20100219-134913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20090908-112531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20090625-124048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20622',
internalId:  '',
customField: '20090625-170631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20222',
internalId:  '',
customField: '20090625-153806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20243',
internalId:  '',
customField: '20090630-104517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20643',
internalId:  '',
customField: '20090908-103854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20664',
internalId:  '',
customField: '20100219-135421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46101',
internalId:  '',
customField: '20100302-163641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9194',
internalId:  '',
customField: '20100219-134614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20422',
internalId:  '',
customField: '20090717-095609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20685',
internalId:  '',
customField: '20090702-153937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20706',
internalId:  '',
customField: '20090702-154003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20727',
internalId:  '',
customField: '20090624-161329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20748',
internalId:  '',
customField: '20090624-161755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20769',
internalId:  '',
customField: '20090630-154319'
};
webappMappings['1501']=webappMappings['1501-14185105']={
webappId:    '1501',
documentId:  '9101',
internalId:  '14185105',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '9101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20090717-095916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27401',
internalId:  '',
customField: '20090630-164646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27422',
internalId:  '',
customField: '20090630-164705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20090717-101021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20090717-100010'
};
webappMappings['7080']=webappMappings['7080-322']={
webappId:    '7080',
documentId:  '47401',
internalId:  '322',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHGAL';
var companyName   = 'Delta+ACA+Farm+Credit+Services';
var htmlTitle	  = 'Delta+ACA+Farm+Credit+Services';
var metaKeywords  = 'Delta%0D%0ADelta+ACA%0D%0ADelta+ACA+Farm+Credit+Services%0D%0AFarm+Credit+Services';
var metaContents  = 'Delta%0D%0ADelta+ACA%0D%0ADelta+ACA+Farm+Credit+Services%0D%0AFarm+Credit';
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();
};
