// form_time.js - JavaScript support for PHP-based form library functions.

//	FST Application Framework, Version 3.4
//	Copyright 2004-10, Norman Lippincott Jr, Saylorsburg PA USA
//	All Rights Reserved
//
//	The FST Application Framework, and its associated libraries, may
//	be used only with the expressed permission of the copyright holder.
//	Usage without permission is strictly prohibited.

function form_time (id)
{
	var h2 = 0;
	if (document.getElementById(id + '_h2'))
		h2 = document.getElementById(id + '_h2').value;

	var h = Number(document.getElementById(id + '_h').value) + Number(h2);
	var m = document.getElementById(id + '_m').value;

	var ts = '';
	if (h < 10)
		ts = ts + '0';
	ts = ts + String(h) + ':';
	if (m < 10)
		ts = ts + '0';
	ts = ts + String(m) + ':00';

	document.getElementById(id).value = ts;
}

