/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','494',jdecode('Horse+%26+Alpaca+Hay'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','515',jdecode('Orchard%2Fbrome+Grass+%281%29'),jdecode(''),'/494/515.html','true',[],'',''],
		['PAGE','19701',jdecode('Irrigated+Pasture+Grass'),jdecode(''),'/494/19701.html','true',[],'',''],
		['PAGE','54602',jdecode('Dry+land+pasture+grass'),jdecode(''),'/494/54602.html','true',[],'',''],
		['PAGE','54131',jdecode('Certified+Weed+Free+Grass'),jdecode(''),'/494/54131.html','true',[],'',''],
		['PAGE','536',jdecode('Orchard%2Fbrome+Grass+%282%29'),jdecode(''),'/494/536.html','true',[],'','']
	],'',''],
	['PAGE','55793',jdecode('Certified+Weed+Free+Hay'),jdecode(''),'/55793.html','true',[],'',''],
	['PAGE','578',jdecode('Lower+Quality+Hay'),jdecode(''),'/578.html','true',[],'',''],
	['PAGE','53519',jdecode('Imported+Hay+Info'),jdecode(''),'/53519.html','true',[],'',''],
	['PAGE','16001',jdecode('Delivery'),jdecode(''),'/16001.html','true',[],'',''],
	['PAGE','18201',jdecode('Storage+%26+Price+Lock'),jdecode(''),'/18201.html','true',[],'',''],
	['PAGE','452',jdecode('About+us'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','599',jdecode('Contact+%2F+Address'),jdecode(''),'/599/index.html','true',[ 
		['PAGE','620',jdecode('Adresses'),jdecode(''),'/599/620.html','true',[],'',''],
		['PAGE','641',jdecode('How+to+find+us'),jdecode(''),'/599/641.html','true',[],'','']
	],'',''],
	['PAGE','662',jdecode('Recommended+Resources'),jdecode(''),'/662.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='290';
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: 		'290',
				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:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '494',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100627-072714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100822-124047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100726-072518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20100714-090125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100714-085344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20100522-185201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20100627-065505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53519',
internalId:  '',
customField: '20100726-071623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20100704-090301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20100726-072301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55793',
internalId:  '',
customField: '20100709-123754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20080615-102231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20071013-144618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20071013-144329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20091021-045101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54131',
internalId:  '',
customField: '20100628-202006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54602',
internalId:  '',
customField: '20100714-090251'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX257';
var companyName   = 'JC%2B+Ranch+';
var htmlTitle	  = 'JC%2B+Ranch+-+Colorado+Grass+Hay+For+Sale';
var metaKeywords  = 'horse+++horses+++hay+++grass++grass+hay++hay+for+sale++horse+trailer++saddle++colorado++equestrian+';
var metaContents  = 'Home+grown+on+our+farm+50+miles+north+east+of+Denver.++++++++As+horse+owners+ourselves+we+care+a+great+deal+about+feeding+consistent+quality+hay+to+our+own+extended+family+members.++Since+2003+we+have+offered+locally+grown+high+quality+roughage+for+the+dicriminating+horse+owner-+consistent+quality+AND+reliable+service.++We+deliver+north-south+from+Castlerock+to+Fort+Collins+and+east-west+from+Strasburg+to+Conifer.++Quality-+++Fields+scientificly+tested+and+chemically+fertilized+for+highest+quality+possible.++NO+waste-+either+animal+or+human+is+applied+to+our+irrigated+fields.++Hay+is+baled+as+dry+as+possible+to+avoid+spoilage.++We+use+moisture+probes+and+target+an+average+moisture+level+of+16-17%25+%28moisture+below+20%25+is+recommended+to+avoid+spoilage%29.++NO+chemical+additive%2Fpreservatives+are+ever+applied.++++++++Consistent+in+quality+and+availablity-++Horse+hay+has+been+the+primary+business+of+our+farm+since+2003.++We+produce+an+average+of+21%2C000+small+bales+%28630+tons%29+per+year+and+have+hay+available+on+average+9+months+per+year.++We+seed+the+grass%2C++irrigate+it%2C++cut+it%2C+rake+it%2C+bale+it%2C+stack+it+and+we+deliver+it...+in+other+words+we+control+the+production+of+our+hay+start+to+finish.++We+do+not+wholesale%2C+our+average+customer+buys+400-500+bales+per+year%3B+feeding+3-4+horses.++We+deliver+over+90%25+of+the+hay+we+produce.++++++Service-++When+you+call+to+inquire+about+this+years+hay+you+will+either+get+me+immediately+on+the+phone+or+get+your+call+returned+in+short+order.++If+I+cannot+meet+your+needs+Ill+usually+be+able+to+provide+another+resource+for+you.++I+manage+the+marketing+and+planning+for+the+farm+and+try+to+be+available+to+answer+inquiries%2C+questions%2C+schedule+deliveries%2C+etc.++We+check+email+daily+and+respond+promptly.++++++Pricing-++We+price+our+hay+based+on+1%29+quality+2%29+costs+3%29+our+production+and+lastly+4%29+the+market.++We+are+NOT+your+cheapest+source+for+hay.++We+DO+represent+a+good+value+when+all+factors+are+considered.++Because+we+are+set+up+to+store+our+hay+under+cover+and+want+to+have+hay+available+for+most+of+the+year+we+do+not+have+fire+sales+to+liquidate+inventory.+++++++You+can+reach+us+at+303-880-0847.+We+are+looking+forward+to+hearing+from+you.+You+can+also+contact+us+at+our+e-mail+address%3A+johncox%40grasshay.net++We+currently+have+1st+and+2nd+cut+grass+horse+quality+grass+and+some+cow+hay+available.++Sold+out+on+pasture+grass+and+alfalfa.++++++Premium+Grass+%281st%29+++%247%2Fbale++++++Premium+Grass+%282nd%29+++%247%2Fbale++++++Alfalfa++%282nd%29+++SOLD+OUT++++++Pasture+Grass+++SOLD+OUT++++++Premium+Grass+is+irrigated+Orchard+and+Meadow+Brome.++Orchard+and+Meadow+Brome+are+cool+season+grasses.++As+a+result+they+grow+rapidly+from+April+to+June%2C+go+dormant+in+the+heat+of+summer+then+get+a+boost+in+growth+in+the+fall.++1st+cutting+usually+starts+and+finishes+in+June+and+accounts+for+about+2%2F3+of+total+annual+production%2C++2nd+cutting+usually+starts+in+mid+September+and+finishes+by+mid+October+and+provides+1%2F3+of+annual+production.++The+grass+shoots+up+a+stem+and+seed+head+in+the+early+season%2C+resulting+in+much+higher+total+production+than+2nd.++While+the+nutritional+value+of+the+two+cuttings+is+comparable+they+are+significantly+different+in+nature.++1st+cutting+has+all+the+stems+and+seed+heads%2C+flaking+and+holding+together+nicely%3B+while+2nd+is+often+described+as+lawn+clippings+as+it+is+all+grass+leaf+and+flakes+have+less+structure.++As+a+result+of+the+stems+vs.+no+stems...+1st+generally+takes+longer+for+a+horse+to+consume+vs.+2nd.++Opinions+always+vary+among+horse+folks+but+generally+I+suggest+1st+for+most+horses-+it+gives+them+something+to+do+for+a+longer+period+and+provides+the+nutrition+they+need%2C+2nd+is+preferred+for+horses+that+are+hard+keepers+%2C+have+mouth+problems+or+are+on+pasture+while+being+fed.++++++premium+colorado+grass+horse+hay.++barn+stored.';
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();
};
