<!--
var Slope;
var Tw;
var Bw;
var Height;
var Depth;
var nval;
nil = 0;

function Opencalc(form)
{
  var Per;
  Per = (1*Bw)+2*(Math.sqrt(Math.pow((Height),(2))+Math.pow((((Tw)-(Bw))/2),(2))))*(Depth)/(Height);
  form.FPer.value = Per;

  var area;
  area = ((Bw)*(Depth))+((((Tw)-(Bw))/2)*((Depth)/(Height))*(Depth));
  form.Farea.value = area;

  var Rh;
  Rh = area/Per;
  form.FRh.value = Rh;

  var Cval;
  Cval = ((1.49)*(Math.pow(Rh,(1/6)))/nval);
  form.FCval.value = Cval;

  var cfs;
  cfs = ((Cval)*(area)*(Math.sqrt((Rh)*(Slope))));
  form.Fcfs.value = cfs;

  var gpm;
  gpm = ((cfs)*(7.48)*(60));
  form.Fgpm.value = gpm;

  var vel;
  vel = ((cfs)/(area));
  form.Fvel.value = vel;
}

function SetSlope(age)
{
  Slope = age.value;
}

function SetPer(age)
{
  Per = age.value;
}

function SetTw(age)
{
  Tw = age.value;
}
function SetBw(age)
{
  Bw = age.value;
}
function SetHeight(age)
{
  Height = age.value;
}
function SetDepth(age)
{
  Depth = age.value;
}
function Setnval(age)
{
  nval = age.value;
}

// -->