/* [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','1701',jdecode('Home'),jdecode(''),'/1701.html','true',[],'',''],
	['PAGE','1857',jdecode('Sales'),jdecode(''),'/1857.html','true',[],'',''],
	['PAGE','52475',jdecode('Sold'),jdecode(''),'/52475/index.html','true',[ 
		['PAGE','1920',jdecode('+Windsong+Fadlago'),jdecode(''),'/52475/1920.html','true',[],'',''],
		['PAGE','20643',jdecode('+Andesine+EA'),jdecode(''),'/52475/20643.html','true',[],'',''],
		['PAGE','26601',jdecode('+IF+Call+Me+Al'),jdecode(''),'/52475/26601.html','true',[],'',''],
		['PAGE','20601',jdecode('IF+Sweet+Baby+James'),jdecode(''),'/52475/20601.html','true',[],'',''],
		['PAGE','29701',jdecode('IF+Walk+This+Way'),jdecode(''),'/52475/29701.html','true',[],'','']
	],'',''],
	['PAGE','54312',jdecode('Stallions'),jdecode(''),'/54312/index.html','true',[ 
		['PAGE','1773',jdecode('WS+Very+Superstitious'),jdecode(''),'/54312/1773.html','true',[],'','']
	],'',''],
	['PAGE','1794',jdecode('Mares'),jdecode(''),'/1794/index.html','true',[ 
		['PAGE','32101',jdecode('Apache+Dancer'),jdecode(''),'/1794/32101.html','true',[],'',''],
		['PAGE','48001',jdecode('Rhapsody+in+Bey'),jdecode(''),'/1794/48001.html','true',[],'',''],
		['PAGE','30901',jdecode('Fantasia+Vu'),jdecode(''),'/1794/30901.html','true',[],'',''],
		['PAGE','104545',jdecode('Zees+Reba'),jdecode(''),'/1794/104545.html','true',[],'',''],
		['PAGE','30922',jdecode('Dream+River'),jdecode(''),'/1794/30922.html','true',[],'',''],
		['PAGE','33401',jdecode('TR+Packa+Pretty+Punch'),jdecode(''),'/1794/33401.html','false',[],'',''],
		['PAGE','33422',jdecode('Khlassic+Jewel'),jdecode(''),'/1794/33422.html','true',[],'',''],
		['PAGE','33443',jdecode('Windsong+April+Aria'),jdecode(''),'/1794/33443.html','true',[],'',''],
		['PAGE','33464',jdecode('WS+Queen+Annes+Lace'),jdecode(''),'/1794/33464.html','true',[],'',''],
		['PAGE','60412',jdecode('SF+Cowboys+Genesis'),jdecode(''),'/1794/60412.html','true',[],'',''],
		['PAGE','29722',jdecode('IF+Oh+Cecilia'),jdecode(''),'/1794/29722.html','true',[],'','']
	],'',''],
	['PAGE','54447',jdecode('Geldings'),jdecode(''),'/54447/index.html','true',[ 
		['PAGE','1815',jdecode('KHA+Deja+Vu'),jdecode(''),'/54447/1815.html','true',[],'',''],
		['PAGE','20622',jdecode('IF+Double+Vision'),jdecode(''),'/54447/20622.html','true',[],'','']
	],'',''],
	['PAGE','99145',jdecode('The+Truth+About+Horses'),jdecode(''),'/99145.html','true',[],'',''],
	['PAGE','1836',jdecode('Others'),jdecode(''),'/1836.html','true',[],'',''],
	['PAGE','2004',jdecode('News'),jdecode(''),'/2004.html','true',[],'',''],
	['PAGE','95445',jdecode('Around+The+Farm+2010'),jdecode(''),'/95445/index.html','true',[ 
		['PAGE','54174',jdecode('Around+The+Farm+2009'),jdecode(''),'/95445/54174.html','true',[],'',''],
		['PAGE','1941',jdecode('Around+the+Farm+2008'),jdecode(''),'/95445/1941.html','false',[],'','']
	],'',''],
	['PAGE','1962',jdecode('Memories'),jdecode(''),'/1962/index.html','true',[ 
		['PAGE','3701',jdecode('Sport'),jdecode(''),'/1962/3701.html','true',[],'','']
	],'',''],
	['PAGE','1983',jdecode('Photography'),jdecode(''),'/1983/index.html','true',[ 
		['PAGE','35401',jdecode('IF+Images+2009'),jdecode(''),'/1983/35401.html','true',[],'',''],
		['PAGE','75123',jdecode('IF+Images+2008'),jdecode(''),'/1983/75123.html','true',[],'','']
	],'',''],
	['PAGE','2025',jdecode('Contact'),jdecode(''),'/2025.html','true',[],'','']];
var siteelementCount=37;
theSitetree.topTemplateName='Billy';
theSitetree.paletteFamily='8D7C50';
theSitetree.keyvisualId='7102';
theSitetree.keyvisualName='kv_7102.jpg';
theSitetree.fontsetId='16390';
theSitetree.graphicsetId='12126';
theSitetree.contentColor='534625';
theSitetree.contentBGColor='8D7C50';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Billy',
				paletteFamily: 	'8D7C50',
				keyvisualId: 	'7102',
				keyvisualName: 	'kv_7102.jpg',
				fontsetId: 		'16390',
				graphicsetId: 	'12126',
				contentColor: 	'534625',
				contentBGColor: '8D7C50',
				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['7060']=webappMappings['7060-664956f6f9f2aad095d6037096bd4c53']={
webappId:    '7060',
documentId:  '35401',
internalId:  '664956f6f9f2aad095d6037096bd4c53',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-1dd957ee8b852721145c27fde03e3cf1']={
webappId:    '7060',
documentId:  '3701',
internalId:  '1dd957ee8b852721145c27fde03e3cf1',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-cba2de96b0985545e2fae252ab74bac0']={
webappId:    '7060',
documentId:  '35401',
internalId:  'cba2de96b0985545e2fae252ab74bac0',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20100828-235951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54447',
internalId:  '',
customField: '20100109-235827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1773',
internalId:  '',
customField: '20100620-002238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1794',
internalId:  '',
customField: '20100725-234605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32101',
internalId:  '',
customField: '20100329-002404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20100518-003706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20090809-020632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30922',
internalId:  '',
customField: '20100829-004520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33401',
internalId:  '',
customField: '20100604-010101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33422',
internalId:  '',
customField: '20100518-003837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33443',
internalId:  '',
customField: '20100716-003402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33464',
internalId:  '',
customField: '20100518-004323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29722',
internalId:  '',
customField: '20100306-235728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1815',
internalId:  '',
customField: '20091021-133101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1836',
internalId:  '',
customField: '20100716-000833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1857',
internalId:  '',
customField: '20100715-233843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20090919-162715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20100110-004807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20091012-100343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20622',
internalId:  '',
customField: '20100110-000511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1920',
internalId:  '',
customField: '20100110-005339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52475',
internalId:  '',
customField: '20091012-095701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20643',
internalId:  '',
customField: '20090726-003332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2004',
internalId:  '',
customField: '20100731-225514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1941',
internalId:  '',
customField: '20090127-161713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1962',
internalId:  '',
customField: '20091001-162121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3701',
internalId:  '',
customField: '20090405-154440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1983',
internalId:  '',
customField: '20091028-210008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20091028-211437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2025',
internalId:  '',
customField: '20090127-140903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54174',
internalId:  '',
customField: '20100110-010800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54312',
internalId:  '',
customField: '20100626-153937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60412',
internalId:  '',
customField: '20100801-003859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75123',
internalId:  '',
customField: '20091001-162921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95445',
internalId:  '',
customField: '20100329-001229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99145',
internalId:  '',
customField: '20100604-004037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104545',
internalId:  '',
customField: '20100515-235555'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3SM';
var companyName   = 'Illusions+Farm';
var htmlTitle	  = 'Illusions+Farm';
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();
};
