function Gradient (x1,y1,x2,y2,h1,h2)
{
  var grad = 0;
  var dist = 0;

 //distance calculation corrected 01-17-2001
 dist = Math.sqrt(  (x2-x1)*(x2-x1)  +  (y2-y1)*(y2-y1)  )

 if (dist>0) {grad = (h2-h1)/dist;}
 
 return grad;

}