In Javascript the Date object can also deal with time. To do date or time arithmetic you need to convert
the input values into a standard time (valueOf returns the number of milliseconds between midnight Jan1, 1970 and the Date and time set in the object). If all input are set this way then subtracting the two times that you want would yield you a result in millioseconds then you can convert that to the appropriate units that you want.
If you are new to Javascript then this might be a bit much.....but it is the most reliable way to do it as far as I know.
It woudl be easier in FormCalc but the principal is the same.
Paul