<!-- ;
function logcost()
{
var system=document.timber.system.value
var acres=document.timber.acres.value
var mbf=document.timber.mbf.value
var bf= document.timber.bf.value
var lbsbf=document.timber.lbsbf.value
var slope = document.timber.slope.value
var ayd= document.timber.ayd.value
var haulloads=document.timber.haulloads.value
var trucks=document.timber.trucks.value
var st=document.timber.st.value
var sr= document.timber.sr.value
var sryd = document.timber.sryd.value
var reveg$ac = document.timber.reveg$ac.value
var tr = document.timber.tr.value
var tryd = document.timber.tryd.value
var trsur = document.timber.trsur.value
var sur$ = document.timber.sur$.value
var drain$ = document.timber.drain$.value
var sets = document.timber.sets.value
var rds = document.timber.rds.value
var tail = document.timber.tail.value

/*end basic input definitions*/
/*cost variables*/

var support = 40000
/*support is crew cab truck, saws, tools, etc*/
var labor = 150
var loader = 120000
var gskidder = 180972
var cskidder = 150000
var tracksg = 291400
var tracksc = 237130
var dozer = 100000
var forwarder = 200000
var harvester = 300000
var horse = 76000
/*horse cost based upon 582/day including 1truck*/
var shovel = 284640
var skyline = 165750
var helicopter = 4500000
var truck = 100000
var ax411 = 185000

var manfall = (bf/1000)*240/(1.75+(Math.sqrt((acres*43560)/(mbf*1000/bf)))/88+(Math.sqrt(bf)+4)/12)
document.timber.manfall.value=manfall

/*end cost variables*/
/*begin system selection*/

if (system== "rtgs" )
{
var hook = 1
var yard = ayd/225
var delay =1
var cycle =hook+yard+delay

if (slope <= 20) {if (bf*lbsbf*2<=5000*(1-slope/100)) { var load = bf*lbsbf*2}
		else {var load = 5000*(1-slope/100)}}
else {if (bf*lbsbf*2<=5000*(1-slope*1.75/100)) { var load = bf*lbsbf*2}
		else {var load = 5000*(1-slope*1.75/100)}}

var csl=(360/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((dozer+loader+gskidder+support)*.0003*8 + 3*labor)/prod+(250/manfall)
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((dozer+loader+gskidder+support)*.0003*8 + 3*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else {

if (system== "rtcs" )
{
var hook = 3
var yard = ayd/176
var delay =1
var cycle =hook+yard+delay

if (slope <= 25) {if (bf*lbsbf*4<=5000*(1-slope/100)) { var load = bf*lbsbf*4}
		else {var load = 5000*(1-slope/100)}}
else {if (bf*lbsbf*4<=5000*(1-slope*1.5/100)) { var load = bf*lbsbf*4}
		else {var load = 5000*(1-slope*1.5/100)}}

var csl=(360/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((dozer+loader+cskidder+support)*.0003*8 + 3*labor) / prod+(250/manfall)
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((dozer+loader+cskidder+support)*.0003*8 + 3*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "tg" )
{
var hook = 1
var yard = ayd/110
var delay =1
var cycle =hook+yard+delay

if (slope <= 25) {if (bf*lbsbf*2<=6000*(1-slope/100)) { var load = bf*lbsbf*2}
		else {var load = 6000*(1-slope/100)}}
else {if (bf*lbsbf*2<=6000*(1-slope*1.5/100)) { var load = bf*lbsbf*2}
		else {var load = 6000*(1-slope*1.5/100)}}

var csl=(360/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((dozer+loader+tracksg+support)*.0003*8 + 3*labor) / prod+(250/manfall)
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((dozer+loader+tracksg+support)*.0003*8 + 3*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "tgs" )
{
var hook = 1
var yard = ayd/132
var delay =1
var cycle =hook+yard+delay

if (slope <= 25) {if (bf*lbsbf*2<=6000*(1-slope/100)) { var load = bf*lbsbf*2}
		else {var load = 6000*(1-slope/100)}}
else {if (bf*lbsbf*2<=6000*(1-slope*1.5/100)) { var load = bf*lbsbf*2}
		else {var load = 6000*(1-slope*1.5/100)}}

var csl=(360/cycle)*load/lbsbf/1000

var manfall = "n/a"
document.timber.manfall.value=manfall

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul="n/a" /*haulloads*trucks*50/lbsbf*/
document.timber.haul.value = haul
var hault= "n/a" /*haulloads*trucks*25*/
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((tracksg)*.0003*8 + 1*labor) / prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((tracksg)*.0003*8 + 1*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}

else { if (system== "tc" )
{
var hook = 3
var yard = ayd/110
var delay =1
var cycle =hook+yard+delay

if (slope <= 25) {if (bf*lbsbf*4<=7000*(1-slope/100)) { var load = bf*lbsbf*4}
		else {var load = 7000*(1-slope/100)}}
else {if (bf*lbsbf*4<=7000*(1-slope*1.5/100)) { var load = bf*lbsbf*4}
		else {var load = 7000*(1-slope*1.5/100)}}


var csl=(360/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((dozer+loader+tracksc+support)*.0003*8 + 3*labor) / prod+(250/manfall)
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((dozer+loader+tracksc+support)*.0003*8 + 3*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "tcs" )
{
var hook = 3
var yard = ayd/132
var delay =1
var cycle =hook+yard+delay

if (slope <= 25) {if (bf*lbsbf*4<=7000*(1-slope/100)) { var load = bf*lbsbf*4}
		else {var load = 7000*(1-slope/100)}}
else {if (bf*lbsbf*4<=7000*(1-slope*1.5/100)) { var load = bf*lbsbf*4}
		else {var load = 7000*(1-slope*1.5/100)}}

var csl=(360/cycle)*load/lbsbf/1000

var manfall = "n/a"
document.timber.manfall.value=manfall

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul="n/a" /*haulloads*trucks*50/lbsbf*/
document.timber.haul.value = haul
var hault="n/a" /*haulloads*trucks*25*/
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((tracksc)*.0003*8 + 1*labor) / prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((tracksc)*.0003*8 + 1*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "ctl" )
{
var hook = 25
/* TJ 230 Feric time to load & unload*/
var yard = ayd/220
var delay =1
var cycle =hook+yard+delay
/*var load = 18000*/
if (slope <= 15){ var load = 18000}
		else {var load = 18000*(1-slope/100)}

var csl=(360/cycle)*load/lbsbf/1000

var manfall = "n/a"
document.timber.manfall.value=manfall

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((dozer+forwarder+harvester+support)*.0003*8 + 3*labor) / prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((dozer+forwarder+harvester+support)*.0003*8 + 3*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "fors" )
{
var hook = 25
/* TJ 230 Feric time to load & unload*/
var yard = ayd/220
var delay =1
var cycle =hook+yard+delay
var load = 18000
/*if (slope <= 30) {if (bf*lbsbf*4<=6000) { var load = bf*lbsbf*4}
		else {var load = 6000}}
else {if (bf*lbsbf*4<=4500) {var load = bf*lbsbf*4}
		else {var load = 4500}}*/

var csl=(360/cycle)*load/lbsbf/1000

var manfall = "n/a"
document.timber.manfall.value=manfall

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul="n/a" /*haulloads*trucks*50/lbsbf*/
document.timber.haul.value = haul
var hault="n/a" /*haulloads*trucks*25*/
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((forwarder)*.0002*8 + 1*labor) / prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((forwarder)*.0002*8 + 1*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "hor" )
{
var hook = 3
var yard = ayd/100
var delay =3
var cycle =hook+yard+delay

if (slope <= 5) {if (bf*lbsbf*4<=1500) { var load = bf*lbsbf*4}
		else {var load = 1500}}
else {if (bf*lbsbf*4<=1000) {var load = bf*lbsbf*4}
		else {var load = 1000}}
var csl=(360/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((horse)*.0002*8 + 2*labor) / prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((horse)*.0002*8 + 2*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "shov" )
{
var hook = 0
var yard = (60/120)*(ayd/50)
var delay =(ayd/50)*.2
var cycle =hook+yard+delay
var load = bf*lbsbf
/*if (slope <= 30) {if (bf*lbsbf*4<=6000) { var load = bf*lbsbf*4}
		else {var load = 6000}}
 else {if (bf*lbsbf*4<=4500) {var load = bf*lbsbf*4}
		else {var load = 4500}}*/
var csl=(360/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((shovel+loader+support)*.0002*8 + 3*labor)/prod+(250/manfall)
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((shovel+loader+support)*.0002*8 + 3*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}
else { if (system== "shovs" )
{
var hook = 0
var yard = (60/120)*(ayd/50)
var delay =(ayd/50)*.2
var cycle =hook+yard+delay
var load = bf*lbsbf
/*if (slope <= 30) {if (bf*lbsbf*4<=6000) { var load = bf*lbsbf*4}
		else {var load = 6000}}
 else {if (bf*lbsbf*4<=4500) {var load = bf*lbsbf*4}
		else {var load = 4500}}*/
var csl=(360/cycle)*load/lbsbf/1000

var manfall = "n/a"
document.timber.manfall.value=manfall

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul="n/a" /*haulloads*trucks*50/lbsbf*/
document.timber.haul.value = haul
var hault="n/a" /*haulloads*trucks*25*/
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((shovel)*.0002*8 + 1*labor) / prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((shovel)*.0002*8 + 1*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t

}
else { if (system== "sky" )
{
var hook = 2.5
var yard = (ayd/450)
var delay =((sets*3*60)+(rds*1*60)+(tail*1*60))/mbf
var cycle =hook+yard+delay
if (bf*lbsbf<=2000){var load = bf*lbsbf*3} else {var load = 6000}
var csl=(480/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((skyline+shovel+support)*.0002*8 + 5*labor) / prod+(250/manfall)
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((skyline+shovel+support)*.0002*8 + 5*labor)/(mbf*4)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t

}

else { if (system== "skyrts" )
{
var hook = 2.5
var yard = (ayd/450)
var delay =((sets*3*60)+(rds*1*60)+(tail*1*60))/mbf
var cycle =hook+yard+delay
if (bf*lbsbf<=2000){var load = bf*lbsbf*3} else {var load = 6000}
var csl=(480/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((skyline+dozer+loader+cskidder+support)*.0002*8 + 6*labor) / prod+(250/manfall)
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((skyline+dozer+loader+cskidder+support)*.0002*8 + 6*labor)/(mbf*4)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t

}


else { if (system== "heli" )
{
var cycle =60/(33.8 - (.0048*(ayd-1300)))
if (mbf/acres<=4.5){var load = 4000} else{var load = 5000}
var csl=(480/cycle)*load/lbsbf/1000

var mechfall = "n/a"
document.timber.mechfall.value=mechfall

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else{limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

/*var csl$ = kmax, 2 loaders, 7 loggers, 4 fallers; daily 15850 ,8 flight hrs*/
var csl$ = 15850/prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =(15850)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t

}
else { if (system== "mech" )
{
var mechfall = (bf/1000)*420/(.25+(Math.sqrt((acres*43560)/(mbf*1000/bf)))/176+(Math.sqrt(bf)+4)/24)
document.timber.mechfall.value=mechfall
var manfall = "n/a"
document.timber.manfall.value=manfall

var hook = 1
var yard = ayd/225
var delay =1
var cycle =hook+yard+delay

if (slope <= 20) {if (bf*lbsbf*4<=5000*(1-slope/100)) { var load = bf*lbsbf*4}
		else {var load = 5000*(1-slope/100)}}
else {if (bf*lbsbf*4<=5000*(1-slope*1.75/100)) { var load = bf*lbsbf*4}
		else {var load = 5000*(1-slope*1.75/100)}}

if (mechfall<2*(360/cycle)*load/lbsbf/1000) {var csl = mechfall} else {var csl=2*(360/cycle)*load/lbsbf/1000}

var haul=haulloads*trucks*50/lbsbf
document.timber.haul.value = haul
var hault=haulloads*trucks*25
document.timber.hault.value = hault

if (csl>haul){limited="hauling"} else {limited="yarding"}
document.timber.limited.value = limited
if (csl>haul){var prod = haul} else{var prod = csl}
document.timber.prod.value = prod

var csl$ =((dozer+loader+gskidder+gskidder+ax411+support)*.0003*8 + 5*labor) / prod
document.timber.csl$.value = csl$
var csl$t=csl$*(2/lbsbf)
document.timber.csl$t.value = csl$t

var move$ =((dozer+loader+gskidder+gskidder+ax411+support)*.0003*8 + 5*labor)/(mbf*2)
document.timber.move$.value = move$
var move$t=move$*(2/lbsbf)
document.timber.move$t.value = move$t


}

else { document.timber.csl.value = "no system selected" }
}
}
}
}
}
}
}
}
}
}
}
}
}
}
/*end system production selection
 begin reporting*/


document.timber.csl.value = csl
var cslton = csl*lbsbf/2
document.timber.cslton.value = cslton

if(system=="fors"){var haul$=0}else {if(system=="tgs"){var haul$=0} else {if(system=="tcs"){var haul$=0}else {if(system=="shovs"){var haul$=0}else{var haul$ = ((trucks*truck)*.0002*8 + trucks
*labor)/prod}}}}
document.timber.haul$.value = haul$
var haul$ton = haul$*2/lbsbf
document.timber.haul$ton.value = haul$ton

var reveg$ =(((st*8)+(sr*10)+(tr*15))/43560)*reveg$ac/mbf
document.timber.reveg$.value = reveg$
var revegac=((st*8)+(sr*10)+(tr*15))/43560
document.timber.revegac.value = revegac

var reveg$ton = reveg$*2/lbsbf
document.timber.reveg$ton.value = reveg$ton

var skidrd$ = ((sr/100)*(sryd*2))/mbf
document.timber.skidrd$.value = skidrd$
var skidrd$ton = skidrd$*2/lbsbf
document.timber.skidrd$ton.value = skidrd$ton

var truckrd$ =((tr/100*tryd*2)+((tr/5280)*trsur*sur$))/mbf + drain$/mbf
document.timber.truckrd$.value = truckrd$
var truckrd$ton = truckrd$*2/lbsbf
document.timber.truckrd$ton.value = truckrd$ton

var total$ = csl$+haul$+reveg$+skidrd$+truckrd$+move$
document.timber.total$.value = total$
var total$ton = total$*2/lbsbf
document.timber.total$ton.value = total$ton

}

// end hide -->

