dr_frienderman

IGT Addition Chart (HTML)

Jan 31st, 2018
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.46 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  2. <!-- saved from url=(0040)http://www.grun1.com/utils/timeCalc.html -->
  3. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4.  
  5. <meta name="DESCRIPTION" content="Time Calculator">
  6. <meta name="KEYWORDS" content="time, calculator, days, hours, minutes, seconds, add, cumulative">
  7. <meta name="viewport" content="width=device-width, initial-scale=1"> <!--- maximum-scale=1, user-scalable=no --->
  8. <meta name="apple-mobile-web-app-capable" content="yes">
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  10. <title>Time Calculator</title>
  11.  
  12. <style type="text/css">
  13. @media print {
  14. .noprint { display:none; }
  15. .printOnly { }
  16. BODY { background-image:none; margin:0px;}
  17. }
  18. @media screen {
  19. .noprint { }
  20. .printOnly { display:none; }
  21. BODY { background-image:none; margin:0px;}
  22. }
  23. INPUT {
  24. font-size: 11px;
  25. text-align:right;
  26. }
  27. .threeD {
  28. border-left:1px solid black;
  29. border-top:1px solid black;
  30. border-right:2px solid black;
  31. border-bottom:2px solid black;
  32. }
  33. .comment {
  34. color: dimgray;
  35. }
  36. .cumtime {
  37. background-color: whitesmoke;
  38. }
  39. .comments {
  40. text-align: left;
  41. }
  42. </style>
  43.  
  44. <script language="JavaScript"><!--
  45.  
  46. var mode = 'add'; // default
  47.  
  48. // Takes a string in the form 'h:m:s.s', 'm:s.s', or 's' and converts to seconds
  49. function stringToSeconds (timeString) {
  50. var timeSeparator = document.timeCalc.timeSeparator.value
  51. var sign = 1 // -1 for negative number
  52.  
  53. if (timeString == "") return 0
  54. if (timeString.substring(0,1) == "-") {
  55. sign = -1
  56. timeString = timeString.substring(1,timeString.length)
  57. }
  58. var days = 0
  59. var hr = 0
  60. var mn = 0
  61. var sec = 0
  62. var frames = 0
  63. var timeArray = timeString.split(timeSeparator)
  64. //alert(timeArray.length);
  65. switch (timeArray.length) {
  66. case 1:
  67. if (document.timeCalc.singleFormat[0].checked) { // days
  68. days = Number(timeArray[0])
  69. } else if (document.timeCalc.singleFormat[1].checked) { // hr
  70. hr = Number(timeArray[0])
  71. } else if (document.timeCalc.singleFormat[2].checked) { // min
  72. mn = Number(timeArray[0])
  73. } else if (document.timeCalc.singleFormat[3].checked) { // sec
  74. sec = Number(timeArray[0])
  75. } else { // frames
  76. frames = Number(timeArray[0])
  77. }
  78. break;
  79. case 2:
  80. if (document.timeCalc.timeFormat[0].checked) { // days:hr
  81. days = Number(timeArray[0])
  82. hr = Number(timeArray[1])
  83. } else if (document.timeCalc.timeFormat[1].checked) { // hr:min
  84. hr = Number(timeArray[0])
  85. mn = Number(timeArray[1])
  86. } else if (document.timeCalc.timeFormat[2].checked) { // min:sec
  87. mn = Number(timeArray[0])
  88. sec = Number(timeArray[1])
  89. } else { // sec:frames
  90. sec = Number(timeArray[0])
  91. frames = Number(timeArray[1])
  92. }
  93. break;
  94. case 3:
  95. if (document.timeCalc.time3Format[0].checked) { // days:hr:min
  96. days = Number(timeArray[0])
  97. hr = Number(timeArray[1])
  98. mn = Number(timeArray[2])
  99. } else if (document.timeCalc.time3Format[1].checked) { // hr:min:sec
  100. hr = Number(timeArray[0])
  101. mn = Number(timeArray[1])
  102. sec = Number(timeArray[2])
  103. } else { // min:sec:frames
  104. mn = Number(timeArray[0])
  105. sec = Number(timeArray[1])
  106. frames = Number(timeArray[2])
  107. }
  108. break;
  109. case 4:
  110. if (document.timeCalc.time4Format[0].checked) { // days:hr:min:sec
  111. days = Number(timeArray[0])
  112. hr = Number(timeArray[1])
  113. mn = Number(timeArray[2])
  114. sec = Number(timeArray[3])
  115. } else { // hr:min:sec:frames
  116. hr = Number(timeArray[0])
  117. mn = Number(timeArray[1])
  118. sec = Number(timeArray[2])
  119. frames = Number(timeArray[3])
  120. }
  121. break;
  122. case 5:
  123. days = Number(timeArray[0])
  124. hr = Number(timeArray[1])
  125. mn = Number(timeArray[2])
  126. sec = Number(timeArray[3])
  127. frames = Number(timeArray[4])
  128. break;
  129. }
  130. //alert(hr + ", " + mn + ", " + sec + ", " + frames)
  131. //alert(sign * (hr*3600 + mn*60 + sec))
  132. return sign * (days*86400 + hr*3600 + mn*60 + sec)
  133. }
  134.  
  135. // Takes a string in the form 'h:m:s:f', 'm:s:f', 's:f' or 'f' and extract the frames
  136. function stringToFrames (timeString) {
  137. var timeSeparator = document.timeCalc.timeSeparator.value
  138. var sign = 1 // -1 for negative number
  139.  
  140. if (timeString == "") return 0
  141. if (timeString.substring(0,1) == "-") {
  142. sign = -1
  143. timeString = timeString.substring(1,timeString.length)
  144. }
  145. var frames = 0
  146. var timeArray = timeString.split(timeSeparator)
  147. //alert(timeArray.length);
  148. switch (timeArray.length) {
  149. case 1:
  150. if (document.timeCalc.singleFormat[4].checked) { // f
  151. frames = Number(timeArray[0])
  152. }
  153. break;
  154. case 2:
  155. if (document.timeCalc.timeFormat[3].checked) { // s:f
  156. sec = Number(timeArray[0])
  157. frames = Number(timeArray[1])
  158. }
  159. break;
  160. case 3:
  161. if (document.timeCalc.time3Format[2].checked) { // m:s:f
  162. frames = Number(timeArray[2])
  163. }
  164. break;
  165. case 4:
  166. if (document.timeCalc.time4Format[1].checked) { // h:m:s:f
  167. frames = Number(timeArray[3])
  168. }
  169. break;
  170. case 5:
  171. frames = Number(timeArray[4])
  172. break;
  173. }
  174. //alert(hr + ", " + mn + ", " + sec + ", " + frames)
  175. //alert(sign * (hr*3600 + mn*60 + sec))
  176. return sign * frames
  177. }
  178.  
  179. // Takes an hr string, mn string, and sec string and converts to seconds
  180. function stringToSeconds3 (dayString, hrString, minString, secString) {
  181. return Number(dayString)*86400 + Number(hrString)*3600 + Number(minString)*60 + Number(secString)
  182. }
  183.  
  184. // Takes seconds and converts to h:m:s.s
  185. function secondsToString (seconds, frames, displayFrames) {
  186. if (typeof seconds == 'undefined') var seconds = 0;
  187. if (typeof frames == 'undefined') var frames = 0;
  188. if (typeof displayFrames == 'undefined') var displayFrames = 0;
  189.  
  190. var myForm = document.timeCalc
  191. var timeSeparator = document.timeCalc.timeSeparator.value
  192. var sign = "" // "-" for negative number
  193.  
  194. if (seconds < 0) {
  195. sign = "-"
  196. seconds = -1 * seconds
  197. }
  198.  
  199. var days = Math.floor(seconds/86400)
  200. var hr = Math.floor((seconds%86400)/3600)
  201. var mn = Math.floor((seconds%3600)/60)
  202. //var mn = Math.floor(seconds/60)%60
  203. var sec = round3(seconds%60)
  204. var timeString = ""
  205.  
  206. //if (myForm.outputFormat[0].checked || myForm.outputFormat[2].checked || myForm.outputFormat[5].checked) {
  207. // var timeString = "" + sec
  208. //else if (myForm.outputFormat[1].checked || myForm.outputFormat[4].checked) {
  209. // var timeString = "" + mn
  210. //else
  211. // var timeString = "" + hr
  212. //}
  213.  
  214. if (myForm.outputFormat[0].checked || myForm.outputFormat[1].checked) { // days:hr:min:sec:frames or days:hr:min:sec
  215. if (days > 0) { // d,h,m,s are all non-blank
  216. timeString = days + timeSeparator;
  217. if (hr >= 10) timeString = timeString + hr + timeSeparator
  218. else timeString = timeString + "0" + hr + timeSeparator
  219. if (mn >= 10) timeString = timeString + mn + timeSeparator
  220. else timeString = timeString + "0" + mn + timeSeparator
  221. if (sec >= 10) timeString = timeString + sec
  222. else timeString = timeString + "0" + sec
  223. }
  224. else if (hr > 0) { // days is blank, h,m,s are non-blank
  225. timeString = hr + timeSeparator;
  226. if (mn >= 10) timeString = timeString + mn + timeSeparator
  227. else timeString = timeString + "0" + mn + timeSeparator
  228. if (sec >= 10) timeString = timeString + sec
  229. else timeString = timeString + "0" + sec
  230. }
  231. else if (mn > 0) { // days and hrs are blank, m,s are non-blank
  232. timeString = mn + timeSeparator;
  233. if (sec >= 10) timeString = timeString + sec
  234. else timeString = timeString + "0" + sec
  235. }
  236. else timeString = sec // days, hrs and min are blank
  237. }
  238.  
  239.  
  240. else if (myForm.outputFormat[2].checked || myForm.outputFormat[4].checked) { // hr:min:sec:frames or hr:min:sec
  241. // days aren't shown, so merge days into hours
  242. hr = days*24 + hr
  243. if (hr > 0) { // d is blank; h,m,s are all non-blank
  244. timeString = hr + timeSeparator;
  245. if (mn >= 10) timeString = timeString + mn + timeSeparator
  246. else timeString = timeString + "0" + mn + timeSeparator
  247. if (sec >= 10) timeString = timeString + sec
  248. else timeString = timeString + "0" + sec
  249. }
  250. else if (mn > 0) { // days and hr are blank, m,s are non-blank
  251. timeString = mn + timeSeparator;
  252. if (sec >= 10) timeString = timeString + sec
  253. else timeString = timeString + "0" + sec
  254. }
  255. else timeString = sec // days, hrs and min are blank
  256. }
  257.  
  258. else if (myForm.outputFormat[3].checked) { // day:hr:min
  259. // sec aren't shown, so merge seconds into minutes
  260. mn = mn + round3(sec/60.0);
  261. if (days > 0) { // d,h,m are all non-blank; s not shown
  262. timeString = days + timeSeparator;
  263. if (hr >= 10) timeString = timeString + hr + timeSeparator
  264. else timeString = timeString + "0" + hr + timeSeparator
  265. if (mn >= 10) timeString = timeString + mn + timeSeparator
  266. else timeString = timeString + "0" + mn + timeSeparator
  267. }
  268. else if (hr > 0) { // days is blank; h,m are non-blank; s not shown
  269. timeString = hr + timeSeparator;
  270. if (mn >= 10) timeString = timeString + mn + timeSeparator
  271. else timeString = timeString + "0" + mn + timeSeparator
  272. }
  273. else timeString = mn
  274. }
  275.  
  276. else if (myForm.outputFormat[6].checked) { // days:hr
  277. // min & sec aren't shown, so merge minutes & seconds into hours
  278. hr = hr + (mn/60.0)
  279. hr = round3(hr + sec/3660.0)
  280. if (days > 0) {
  281. if (hr >= 10) timeString = days + timeSeparator + hr
  282. else timeString = days + timeSeparator + "0" + hr
  283. }
  284. else timeString = hr
  285. }
  286.  
  287. else if (myForm.outputFormat[7].checked) { // hr:min
  288. // days & sec aren't shown, so merge days into hours & merge seconds into minutes
  289. hr = days*24 + hr
  290. mn = mn + round3(sec/60.0)
  291. if (hr > 0) {
  292. if (mn >= 10) timeString = hr + timeSeparator + mn
  293. else timeString = hr + timeSeparator + "0" + mn
  294. }
  295. else timeString = mn
  296. }
  297.  
  298. else if (myForm.outputFormat[5].checked || myForm.outputFormat[8].checked) { // min:sec or min:sec:frames
  299. // days,hr aren't shown, so merge days & hr into minutes
  300. mn = days*1440 + mn
  301. mn = hr*60 + mn
  302. if (mn > 0) {
  303. if (sec >= 10) timeString = mn + timeSeparator + sec
  304. else timeString = mn + timeSeparator + "0" + sec
  305. }
  306. else timeString = sec
  307. }
  308.  
  309. else if (myForm.outputFormat[10].checked) { // days
  310. timeString = round3(seconds/86400)
  311. }
  312.  
  313. else if (myForm.outputFormat[11].checked) { // hr
  314. timeString = round3(seconds/3600)
  315. }
  316.  
  317. else if (myForm.outputFormat[12].checked) { // min
  318. timeString = round3(seconds/60)
  319. }
  320.  
  321. else if (myForm.outputFormat[9].checked) { // sec
  322. timeString = round3(seconds)
  323. }
  324.  
  325. else { // frames
  326. timeString = round3(seconds);
  327. }
  328. if (displayFrames) {
  329. if (frames >= 10) timeString = timeString + timeSeparator + frames;
  330. else timeString = timeString + timeSeparator + '0' + frames;
  331. }
  332. return sign + timeString
  333. }
  334.  
  335. function round2(myNumber) {
  336. return Math.floor(Math.round(myNumber * 100)) / 100
  337. }
  338.  
  339. function round3(myNumber) {
  340. return Math.floor(Math.round(myNumber * 1000)) / 1000
  341. }
  342.  
  343. function saveData() {
  344. var params = [];
  345. for (i=1; i<=42; i++) {
  346. // Save times
  347. val = eval('document.timeCalc.time'+i+'.value');
  348. if (val != '') { // && !isNaN(val)
  349. params[params.length] = 't'+i+'='+val;
  350. }
  351. // Save comments
  352. val = eval('document.timeCalc.comments'+i+'.value');
  353. if (val != '') {
  354. params[params.length] = 'c'+i+'='+encodeURI(val);
  355. }
  356. }
  357. // Save options
  358. if (document.timeCalc.plusMinusMode[0].checked == 1) params[params.length] = 'mode=0';
  359. if (document.timeCalc.plusMinusMode[1].checked == 1) params[params.length] = 'mode=1';
  360. if (document.timeCalc.singleFormat[0].checked == 1) params[params.length] = 'fs0=1';
  361. if (document.timeCalc.singleFormat[1].checked == 1) params[params.length] = 'fs1=1';
  362. if (document.timeCalc.singleFormat[2].checked == 1) params[params.length] = 'fs2=1';
  363. if (document.timeCalc.singleFormat[3].checked == 1) params[params.length] = 'fs3=1';
  364. if (document.timeCalc.singleFormat[4].checked == 1) params[params.length] = 'fs4=1';
  365. if (document.timeCalc.timeFormat[0].checked == 1) params[params.length] = 'ft0=1';
  366. if (document.timeCalc.timeFormat[1].checked == 1) params[params.length] = 'ft1=1';
  367. if (document.timeCalc.timeFormat[2].checked == 1) params[params.length] = 'ft2=1';
  368. if (document.timeCalc.timeFormat[3].checked == 1) params[params.length] = 'ft3=1';
  369. if (document.timeCalc.time3Format[0].checked == 1) params[params.length] = 'f3t0=1';
  370. if (document.timeCalc.time3Format[1].checked == 1) params[params.length] = 'f3t1=1';
  371. if (document.timeCalc.time3Format[2].checked == 1) params[params.length] = 'f3t2=1';
  372. if (document.timeCalc.time4Format[0].checked == 1) params[params.length] = 'f4t0=1';
  373. if (document.timeCalc.time4Format[1].checked == 1) params[params.length] = 'f4t1=1';
  374. params[params.length] = 'd='+encodeURI(document.timeCalc.timeSeparator.value);
  375. if (document.timeCalc.outputFormat[0].checked == 1) params[params.length] = 'o0=1';
  376. if (document.timeCalc.outputFormat[1].checked == 1) params[params.length] = 'o1=1';
  377. if (document.timeCalc.outputFormat[2].checked == 1) params[params.length] = 'o2=1';
  378. if (document.timeCalc.outputFormat[3].checked == 1) params[params.length] = 'o3=1';
  379. if (document.timeCalc.outputFormat[4].checked == 1) params[params.length] = 'o4=1';
  380. if (document.timeCalc.outputFormat[5].checked == 1) params[params.length] = 'o5=1';
  381. if (document.timeCalc.outputFormat[6].checked == 1) params[params.length] = 'o6=1';
  382. if (document.timeCalc.outputFormat[7].checked == 1) params[params.length] = 'o7=1';
  383. if (document.timeCalc.outputFormat[8].checked == 1) params[params.length] = 'o8=1';
  384. if (document.timeCalc.outputFormat[9].checked == 1) params[params.length] = 'o9=1';
  385. if (document.timeCalc.outputFormat[10].checked == 1) params[params.length] = 'o10=1';
  386. if (document.timeCalc.outputFormat[11].checked == 1) params[params.length] = 'o11=1';
  387. if (document.timeCalc.outputFormat[12].checked == 1) params[params.length] = 'o12=1';
  388. if (document.timeCalc.outputFormat[13].checked == 1) params[params.length] = 'o13=1';
  389. if (document.timeCalc.outputFormat[14].checked == 1) params[params.length] = 'o14=1';
  390. //if (document.timeCalc.fractionType.checked == 1) params[params.length] = 'fps=100'
  391. else if (!isNaN(document.timeCalc.fps.value)) params[params.length] = 'fps='+document.timeCalc.fps.value;
  392.  
  393. if (params.length == 0) var url = baseUrl;
  394. else var url = baseUrl + '?' + params.join('&');
  395. prompt('copy and save this url:',url);
  396. }
  397.  
  398. function clearFields() {
  399. for (i=1; i<=42; i++) {
  400. eval('document.timeCalc.time'+i+'.value = ""');
  401. }
  402. for (i=1; i<=42; i++) {
  403. eval('document.timeCalc.cumtime'+i+'.value = ""');
  404. eval('document.timeCalc.comments'+i+'.value = ""');
  405. }
  406. document.timeCalc.timeMin.value = ""
  407. document.timeCalc.timeMax.value = ""
  408. document.timeCalc.timeAvg.value = ""
  409. document.timeCalc.timeTotal.value = ""
  410. document.timeCalc.timeMin2.value = ""
  411. document.timeCalc.timeMax2.value = ""
  412. document.timeCalc.timeAvg2.value = ""
  413. document.timeCalc.timeTotal2.value = ""
  414.  
  415. document.timeCalc.time1.focus()
  416. }
  417.  
  418. function addSeconds(sec1, sec2) { //, fps) {
  419. //if (typeof fps == "undefined") var fps = 1;
  420. if (isNaN(sec1)) return sec2;
  421. if (isNaN(sec2)) return sec1;
  422. //if (fps2 == 100) {
  423. // return sec1 + sec2;
  424. //}
  425. // else {
  426. // Add the fractions
  427. //alert(''+fps+' fps');
  428. var aArray = sec1.toString().split('.');
  429. var bArray = sec2.toString().split('.');
  430. if (aArray.length < 2) aArray[1] = 0;
  431. if (bArray.length < 2) bArray[1] = 0;
  432. if (aArray[1].length < 2) aArray[1] = aArray[1] + '0';
  433. if (bArray[1].length < 2) bArray[1] = bArray[1] + '0';
  434. //alert(aArray[0] + ', ' + aArray[1] + ', ' + bArray[0] + ', ' + bArray[1]);
  435. var tempTotal2 = parseInt(aArray[1]) + parseInt(bArray[1]);
  436. //alert(''+aArray[0] +', '+bArray[0]);
  437. //var tempTotal3 = parseInt(aArray[0]) + parseInt(bArray[0]) + Math.floor(tempTotal2/fps2);
  438. var tempTotal3 = parseInt(aArray[0]) + parseInt(bArray[0]);
  439. //var frames = tempTotal2%fps2;
  440. //if (frames < 10) frames = '0' + frames.toString();
  441. //alert(tempTotal3.toString()+'.'+frames);
  442. //return(tempTotal3.toString()+'.'+frames);
  443. return(tempTotal3.toString());
  444. //}
  445. }
  446.  
  447. // Returns the value of the first selected radio button, else returns nil
  448. function selectedRadioValue(radioGroupObj) { // eg. document.mainForm.myRadioName
  449. //var radioGroupObj = document.getElementsByName(radioName);
  450. for(var i = 0; i < radioGroupObj.length; i++){
  451. if(radioGroupObj[i].checked){
  452. return radioGroupObj[i].value;
  453. }
  454. }
  455. return nil;
  456. }
  457.  
  458. function changeMode() {
  459. if (document.timeCalc.plusMinusMode[0].checked) mode = 'add';
  460. else mode = 'sub';
  461. addTimes();
  462. }
  463.  
  464. function addTimes() {
  465. var prevTotalTime = 0;
  466. var prevTotalFrames = 0;
  467. var totalTime = 0;
  468. var totalFrames = 0;
  469. var minsec = 0;
  470. var maxsec = 0;
  471. var minFrames = 0;
  472. var maxFrames = 0;
  473. var count = 0;
  474. var seconds = 0;
  475. var frames = 0;
  476. var origSeconds = 0;
  477. var origFrames = 0;
  478. var timeString = '';
  479. var timeSeparator = document.timeCalc.timeSeparator.value;
  480. var fps = document.timeCalc.fps.value;
  481. if (fps == '' || isNaN(fps)) fps = 0;
  482. else fps = parseInt(fps);
  483. //if (isNaN(fps) || document.timeCalc.fractionType.checked == 1) fps = 100;
  484.  
  485. // Display the outputFormat
  486. outFormat = selectedRadioValue(document.timeCalc.outputFormat).replace(/:/g,timeSeparator);
  487. writeLayer('totalFormatDisplay','&nbsp;' + outFormat + '&nbsp;');
  488. writeLayer('outputFormatDisplay','&nbsp;' + outFormat + '&nbsp;');
  489. writeLayer('inputFormatDisplay',
  490. '&nbsp;' + 'd:h:m:s:f'.replace(/:/g,timeSeparator) + '&nbsp;<br/>' +
  491. '&nbsp;' + selectedRadioValue(document.timeCalc.time4Format).replace(/:/g,timeSeparator) + '&nbsp;<br/>' +
  492. '&nbsp;' + selectedRadioValue(document.timeCalc.time3Format).replace(/:/g,timeSeparator) + '&nbsp;<br/>' +
  493. '&nbsp;' + selectedRadioValue(document.timeCalc.timeFormat).replace(/:/g,timeSeparator) + '&nbsp;<br/>' +
  494. '&nbsp;' + selectedRadioValue(document.timeCalc.singleFormat).replace(/:/g,timeSeparator) + '&nbsp;');
  495.  
  496. //Do frames get displayed?
  497. if (document.timeCalc.outputFormat[0].checked || document.timeCalc.outputFormat[2].checked ||
  498. document.timeCalc.outputFormat[5].checked || document.timeCalc.outputFormat[9].checked ||
  499. document.timeCalc.outputFormat[14].checked) {
  500. var displayFrames = true;
  501. } else {
  502. var displayFrames = false;
  503. }
  504.  
  505. if ((document.timeCalc.time4Format[1].checked == 1 ||
  506. document.timeCalc.time3Format[2].checked == 1 ||
  507. document.timeCalc.timeFormat[3].checked == 1 ||
  508. document.timeCalc.singleFormat[4].checked == 1 || displayFrames) && // frames were selected
  509. (document.timeCalc.fps.value == '' || document.timeCalc.fps.value < 1)) {
  510. alert("Please specify frames-per-second > 0");
  511. document.timeCalc.fps.focus();
  512. return;
  513. }
  514.  
  515.  
  516. for (i=1; i<=42; i++){
  517. myValue = eval('document.timeCalc.time'+i+'.value');
  518. seconds = origSeconds = stringToSeconds(myValue);
  519. frames = origFrames = stringToFrames(myValue);
  520. //alert('sec1: '+seconds);
  521. //alert('frames1: '+frames);
  522. if (fps > 0) {
  523. seconds = seconds + Math.floor(frames / fps);
  524. //alert('sec2: '+seconds);
  525. frames = frames % fps;
  526. }
  527. if (i == 1) {
  528. minsec = origSeconds;
  529. maxsec = origSeconds;
  530. minFrames = origFrames;
  531. maxFrames = origFrames;
  532. }
  533. eval('document.timeCalc.sec'+i+'.value = seconds');
  534.  
  535. if (mode == 'add') { // mode = add
  536. totalFrames = totalFrames + frames;
  537. } else { // mode = subtract
  538. if (i==1) totalFrames = frames;
  539. else totalFrames = totalFrames - frames;
  540. }
  541. if (fps > 0 && totalFrames >= fps) {
  542. //alert('totalFrames (' + totalFrames + ') are over fps (' + fps + ')');
  543. seconds = seconds + Math.floor(totalFrames / fps);
  544. //alert('sec2: '+seconds);
  545. totalFrames = totalFrames % fps;
  546. }
  547.  
  548. if (seconds == 0 && (frames == 0 || !displayFrames)) {
  549. eval('document.timeCalc.cumtime'+i+'.value = ""');
  550. } else {
  551. if (mode == 'add') { // mode = add
  552. totalTime = totalTime + seconds;
  553. } else { // mode = subtract
  554. if (i==1) totalTime = seconds;
  555. else totalTime = totalTime - seconds;
  556. }
  557. //totalTime = addSeconds(totalTime, seconds, fps);
  558.  
  559. //if (isNaN(totalTime)) totalTime = 0;
  560. //alert('TotalTime:' + totalTime + ', totalFrames:' + totalFrames + ', displayFrames:' + displayFrames);
  561. timeString = secondsToString(totalTime, totalFrames, displayFrames);
  562. eval('document.timeCalc.cumtime'+i+'.value = timeString');
  563. //eval('document.timeCalc.cumtime'+i+'.value = totalTime');
  564. //minsec = Math.min(minsec, seconds);
  565. //maxsec = Math.max(maxsec, seconds);
  566. if (origSeconds <= minsec) {
  567. if (origSeconds < minsec || origFrames <= minFrames) {
  568. minFrames = origFrames;
  569. }
  570. minsec = origSeconds;
  571. }
  572. if (origSeconds >= maxsec) {
  573. if (origSeconds > maxsec || origFrames >= maxFrames) {
  574. maxFrames = origFrames;
  575. }
  576. maxsec = origSeconds;
  577. }
  578. //alert(origSeconds+' seconds; '+frames+' frames; '+minsec+' minsec; '+minFrames+' minFrames');
  579. count = count + 1;
  580. }
  581. //alert(stringToSeconds(myValue) + ' secs, ' + stringToFrames(myValue)+ ' frames @ ' + fps + ' fps == ' + seconds + ' seconds, ' + frames + ' frames\n' +
  582. // totalTime + ' total seconds, ' + totalFrames + ' total frames\n' +
  583. // 'formatted (displayFrames=' + displayFrames + '): ' + secondsToString(totalTime, totalFrames, displayFrames) +
  584. // '\nmin:'+minsec+':'+minFrames);
  585. prevTotalTime = totalTime;
  586. prevTotalFrames = totalFrames;
  587. }
  588.  
  589. if (count > 0) {
  590. document.timeCalc.timeMin.value = document.timeCalc.timeMin2.value = secondsToString(minsec, minFrames, displayFrames)
  591. document.timeCalc.timeMax.value = document.timeCalc.timeMax2.value = secondsToString(maxsec, maxFrames, displayFrames)
  592. document.timeCalc.timeAvg.value = document.timeCalc.timeAvg2.value = secondsToString(totalTime/count, totalFrames/count, displayFrames)
  593. } else {
  594. document.timeCalc.timeMin.value = document.timeCalc.timeMin2.value = ""
  595. document.timeCalc.timeMax.value = document.timeCalc.timeMax2.value = ""
  596. document.timeCalc.timeAvg.value = document.timeCalc.timeAvg2.value = ""
  597. }
  598. document.timeCalc.timeTotal.value = document.timeCalc.timeTotal2.value = secondsToString(totalTime, totalFrames, displayFrames)
  599. //setTimeFromSec(totalTime, 0)
  600. //alert('total frames: ' + totalFrames);
  601. }
  602.  
  603. function checkKeyPress(nextFieldName, evt) {
  604. var charCode = (navigator.appName == "Netscape") ? evt.which : evt.keyCode
  605. if (charCode == 13) { // 13 = enter/return
  606. eval("document.timeCalc." + nextFieldName + ".focus()") //Go to next field
  607. }
  608. else if (charCode == 67) { // 67 = Shift-C
  609. clearFields()
  610. return false;
  611. }
  612. return true
  613. }
  614.  
  615. function secToMins(sec) {
  616. return sec/60.0
  617. }
  618.  
  619. function secToHours(sec) {
  620. return sec/3600.0
  621. }
  622.  
  623. function minsToSec(mn) {
  624. return mn*60.0
  625. }
  626.  
  627. function hoursToSec(hr) {
  628. return hr*3600.0
  629. }
  630.  
  631. function changeFT(radioObj) { // change FractionType (Decimal)
  632. if (radioObj.checked) {
  633. document.timeCalc.fps.value = '';
  634. fps = 100;
  635. }
  636. addTimes();
  637. }
  638.  
  639. function changeFps(textObj) {
  640. if (isNaN(textObj.value)) {
  641. alert("Frames per second must be a number");
  642. textObj.value = '';
  643. //document.timeCalc.fractionType.checked = true;
  644. document.timeCalc.fps.focus();
  645. } else {
  646. //document.timeCalc.fractionType.checked = false;
  647. fps = textObj.value;
  648. }
  649. addTimes();
  650. }
  651.  
  652. function writeLayer(layerID,txt){
  653. if(document.getElementById){
  654. document.getElementById(layerID).innerHTML=txt;
  655. }else if(document.all){
  656. document.all[layerID].innerHTML=txt;
  657. }else if(document.layers){
  658. with(document.layers[layerID].document){
  659. open();
  660. write(txt);
  661. close();
  662. }
  663. }
  664. }
  665.  
  666. // var myDate = new Date(2000, 0, 0)
  667. // myDate.setSeconds
  668. // alert(myDate.toString())
  669.  
  670. var fps = 100; // decimal by default
  671. var baseUrl
  672. function initPage() {
  673. // Parse url parameters
  674. var param, num, val;
  675. var queryIndex = window.location.href.indexOf('?');
  676. var params = window.location.href.substring(queryIndex+1).split('&');
  677. if (queryIndex < 0) baseUrl = window.location.href // no '?' found in url
  678. else baseUrl = window.location.href.substring(0,queryIndex)
  679. if (typeof mode == "undefined") var mode ='add'; // default
  680. for (i=0; i<params.length; i++) {
  681. param = params[i].split('=');
  682. if (param[0].substr(0,1) == 't') {
  683. // if t1 - t40, then restore it's time value
  684. num = param[0].substring(1);
  685. if (num != '' && !isNaN(num)) {
  686. eval('document.timeCalc.time'+num+'.value="'+param[1]+'"');
  687. }
  688. } else if (param[0].substr(0,1) == 'c') {
  689. // Restore comments
  690. num = param[0].substring(1);
  691. if (num != '' && !isNaN(num)) {
  692. eval('document.timeCalc.comments'+num+'.value="'+decodeURI(param[1])+'"');
  693. }
  694. } else if (param[0].substr(0,3) == 'f4t') {
  695. // Four-value time format
  696. num = param[0].substring(3);
  697. if (num != '' && !isNaN(num)) {
  698. eval('document.timeCalc.time4Format['+num+'].checked=1');
  699. }
  700. } else if (param[0].substr(0,3) == 'f3t') {
  701. // Three-value time format
  702. num = param[0].substring(3);
  703. if (num != '' && !isNaN(num)) {
  704. eval('document.timeCalc.time3Format['+num+'].checked=1');
  705. }
  706. } else if (param[0].substr(0,2) == 'ft') {
  707. // Two-value time format
  708. num = param[0].substring(2);
  709. if (num != '' && !isNaN(num)) {
  710. eval('document.timeCalc.timeFormat['+num+'].checked=1');
  711. }
  712. } else if (param[0].substr(0,2) == 'fs') {
  713. // One-value time format
  714. num = param[0].substring(2);
  715. if (num != '' && !isNaN(num)) {
  716. eval('document.timeCalc.singleFormat['+num+'].checked=1');
  717. }
  718. } else if (param[0] == 'd') {
  719. // Time delimiter
  720. eval('document.timeCalc.timeSeparator.value ="'+decodeURI(param[1])+'"');
  721.  
  722. } else if (param[0].substr(0,1) == 'o') {
  723. // output format
  724. num = param[0].substring(1);
  725. if (num != '' && !isNaN(num)) {
  726. eval('document.timeCalc.outputFormat['+num+'].checked=1');
  727. }
  728. } else if (param[0] == 'fps') {
  729. // frames/second
  730. num = param[1]; // fps
  731. if (num != '' && !isNaN(num)) {
  732. //if (num == 100) document.timeCalc.fractionType.checked = 1
  733.  
  734. //else {
  735. //document.timeCalc.fractionType.checked = 0;
  736. document.timeCalc.fps.value = num;
  737. fps = num;
  738. //}
  739. }
  740. } else if (param[0] == 'mode') {
  741. // PlusMinusMode
  742. num = param[1]; // mode index
  743. if (num == 0) {
  744. mode = 'add';
  745. document.timeCalc.plusMinusMode[0].checked = true;
  746. document.timeCalc.plusMinusMode[1].checked = false;
  747. } else if (num == 1) {
  748. mode = 'sub';
  749. document.timeCalc.plusMinusMode[0].checked = false;
  750. document.timeCalc.plusMinusMode[1].checked = true;
  751. }
  752. }
  753. }
  754.  
  755. window.focus();
  756. addTimes();
  757. document.timeCalc.time1.focus();
  758. return true;
  759. }
  760.  
  761. // -->
  762. </script>
  763. <style>
  764. td {font-family:Arial; font-size:10pt}
  765. </style><style></style></head>
  766.  
  767.  
  768.  
  769. <body bgcolor="#eeeef0" onload="return initPage();">
  770. <center>
  771. <form name="timeCalc">
  772.  
  773. <table border="0" cellspacing="0" cellpadding="0">
  774. <tbody><tr>
  775. <td align="center">
  776.  
  777. <div class="printOnly">"<font size="5" color="navy"><b>Time Calculator</b></font></div>
  778. <div class="noprint" style="width:350px; float:left; margin-left:">
  779.  
  780. <table cellspacing="0" border="0" cellpadding="5">
  781. <tbody><tr><td align="center" colspan="10" nowrap="">
  782. <font size="5" color="navy"><b>Time Calculator</b></font><br>
  783. <div style="font-size:11px; margin-bottom:10px;">
  784. <!--<a href="timeCalc.html" target=_blank title="A original Time Calculator, opens in a new window">time</a> | --><strong>time</strong>
  785. (<a href="http://www.grun1.com/utils/timeCalc_orig.html" target="_blank" title="The original compact Time Calculator, opens in a new window">orig</a>) |
  786. <a href="http://www.grun1.com/utils/timeCalc2.html" target="_blank" title="A compact Time Calculator, opens in a new window">time_2</a> |
  787. <a href="http://www.grun1.com/utils/timeDiff.cfm" target="_blank" title="A Time Difference Calculator, opens in a new window">time diff</a> |
  788. <a href="http://www.grun1.com/utils/dateTimeDiff.cfm" target="_blank" title="A Date/Time Difference Calculator, opens in a new window">date/time diff</a> |
  789. <a href="http://www.grun1.com/familyTree/dateCalc.cfm" target="_blank" title="A Date Calculator, opens in a new window">date</a> |
  790. <a href="http://www.grun1.com/utils/timeCardCalc.html" target="_blank" title="A Time Card Calculator, opens in a new window">time card</a> <br>
  791. <a href="http://www.grun1.com/utils/intervalCalc.html" target="_blank" title="A Splits Calculator, opens in a new window">interval</a> |
  792. <a href="http://www.grun1.com/utils/splitsCalc.html" target="_blank" title="A Splits Calculator, opens in a new window">splits</a> |
  793. <a href="http://www.grun1.com/utils/paceCalc.html" target="_blank" title="A Pace Calculator, opens in a new window">pace</a>
  794. </div>
  795. <div style="text-align:left; color:#CC0000;">
  796. Updates:<br>
  797. - added mode option to add or subtract times
  798. </div>
  799. </td>
  800. </tr>
  801. <tr><td align="center">
  802. <input type="button" value="clear fields" onclick="clearFields()" style="font-size:12px; text-align:center;">&nbsp;&nbsp;&nbsp;
  803. <input type="button" value="save data as url" title="Save this data as a url" onclick="saveData()" style="font-size:12px; text-align:center;">
  804. <br>Mode:
  805. <input type="radio" name="plusMinusMode" id="plusMode" value="0" checked="" onclick="changeMode()"><label for="plusMode">add values</label>,&nbsp;&nbsp;
  806. <input type="radio" name="plusMinusMode" id="minusMode" value="1" onclick="changeMode()"><label for="minusMode">subtract values</label>
  807. <br>
  808. </td></tr>
  809. <tr>
  810. <td align="center" colspan="10" bgcolor="#ddddee" class="threeD" nowrap="">
  811. <font size="4" color="navy"><b>Input format</b></font><br>
  812. <font size="-1">
  813. To add times,<br>enter times in the left column
  814. in the format:<br>
  815. <br>
  816.  
  817. <i>when you enter five values:</i><br>
  818. <b>days:hr:min:sec:frames</b>, <i>or</i><br><br>
  819.  
  820. <i>when you enter four values:</i><br>
  821. <input type="radio" name="time4Format" id="tfdhms" value="d:h:m:s" onclick="addTimes()" checked=""><label for="tfdhms"><b>days:hr:min:sec</b></label>,
  822. <input type="radio" name="time4Format" id="tfhmsf" value="h:m:s:f" onclick="addTimes()"><label for="tfhmsf"><b>hr:min:sec:frames</b></label>,
  823. <i>or</i><br><br>
  824.  
  825. <i>when you enter three values:</i><br>
  826. <input type="radio" name="time3Format" id="tfdhm" value="d:h:m" onclick="addTimes()"><label for="tfdhm"><b>days:hr:min</b></label>,
  827. <input type="radio" name="time3Format" id="tfhms" value="h:m:s" onclick="addTimes()" checked=""><label for="tfhms"><b>hr:min:sec</b></label>,
  828. <input type="radio" name="time3Format" id="tfmsf" value="m:s:f" onclick="addTimes()"><label for="tfmsf"><b>min:sec:frames</b></label>,
  829. <i>or</i><br><br>
  830.  
  831. <i>when you enter two values:</i><br>
  832. <input type="radio" name="timeFormat" id="tfdh" value="d:h" onclick="addTimes()"><label for="tfdh"><b>days:hr</b></label>,
  833. <input type="radio" name="timeFormat" id="tfhm" value="h:m" onclick="addTimes()"><label for="tfhm"><b>hr:min</b></label>,
  834. <input type="radio" name="timeFormat" id="tfms" value="m:s" onclick="addTimes()" checked=""><label for="tfms"><b>min:sec</b></label>,
  835. <input type="radio" name="timeFormat" id="tfsf" value="s:f" onclick="addTimes()"><label for="tfsf"><b>sec:frames</b></label>,
  836. <i>or</i><br><br>
  837.  
  838. <i>when you enter one value:</i><br>
  839. <input type="radio" name="singleFormat" id="days" value="d" onclick="addTimes()"><label for="days"><b>days</b></label>,
  840. <input type="radio" name="singleFormat" id="hr" value="h" onclick="addTimes()"><label for="hr"><b>hr</b></label>,
  841. <input type="radio" name="singleFormat" id="min" value="m" onclick="addTimes()"><label for="min"><b>min</b></label>,
  842. <input type="radio" name="singleFormat" id="sec" value="s" onclick="addTimes()" checked=""><label for="sec"><b>sec</b></label>,
  843. <input type="radio" name="singleFormat" id="frames" value="f" onclick="addTimes()"><label for="frames"><b>frames</b></label><br><br>
  844.  
  845. Hr/Min/Sec/Frame separator:
  846. <input type="text" name="timeSeparator" value=":" size="1" onchange="addTimes()" style="text-align: center;"><br>
  847. For fractions of a second, use a decimal point,<br>
  848. For frames, use <input type="text" name="fps" value="" size="3" onchange="changeFps(this)"> frames per second<br><br>
  849. This web page does not require the internet.<br>
  850. You can save this web page to your computer<br>
  851. and run it anytime in your browser<br>
  852. (but check back for updates)
  853. </font>
  854. </td></tr>
  855. </tbody></table><br>
  856.  
  857. <table cellspacing="0" border="0" cellpadding="5">
  858. <tbody><tr>
  859. <td align="left" colspan="10" bgcolor="#ddddee" class="threeD" nowrap="">
  860. <div style="text-align:center;"><font size="4" color="navy"><b>Output format</b></font></div>
  861. <font size="-1"><br>
  862.  
  863. <input type="radio" name="outputFormat" id="outputdhmsf" value="d:h:m:s:f" onclick="addTimes()"><label for="outputdhmsf"><b>days:hr:min:sec:frames</b></label>,<br><br>
  864.  
  865. <input type="radio" name="outputFormat" id="outputdhms" value="d:h:m:s" onclick="addTimes()" checked=""><label for="outputdhms"><b>days:hr:min:sec</b></label>,<br>
  866. <input type="radio" name="outputFormat" id="outputhmsf" value="h:m:s:f" onclick="addTimes()"><label for="outputhmsf"><b>hr:min:sec:frames</b></label>,<br><br>
  867.  
  868. <input type="radio" name="outputFormat" id="outputdhm" value="d:h:m" onclick="addTimes()"><label for="outputdhm"><b>day:hr:min</b></label>,<br>
  869. <input type="radio" name="outputFormat" id="outputhms" value="h:m:s" onclick="addTimes()"><label for="outputhms"><b>hr:min:sec</b></label>,<br>
  870. <input type="radio" name="outputFormat" id="outputmsf" value="m:s:f" onclick="addTimes()"><label for="outputmsf"><b>min:sec:frames</b></label>,<br><br>
  871.  
  872. <input type="radio" name="outputFormat" id="outdh" value="d:h" onclick="addTimes()"><label for="outdh"><b>days:hr</b></label>, <br>
  873. <input type="radio" name="outputFormat" id="outhm" value="h:m" onclick="addTimes()"><label for="outhm"><b>hr:min</b></label>, <br>
  874. <input type="radio" name="outputFormat" id="outms" value="m:s" onclick="addTimes()"><label for="outms"><b>min:sec</b></label>, <br>
  875. <input type="radio" name="outputFormat" id="outsf" value="s:f" onclick="addTimes()"><label for="outsf"><b>sec:frames</b></label>,
  876. <br><br>
  877.  
  878. <input type="radio" name="outputFormat" id="outd" value="d" onclick="addTimes()"><label for="outd"><b>days</b></label>,<br>
  879. <input type="radio" name="outputFormat" id="outh" value="h" onclick="addTimes()"><label for="outh"><b>hr</b></label>,<br>
  880. <input type="radio" name="outputFormat" id="outm" value="m" onclick="addTimes()"><label for="outm"><b>min</b></label>,<br>
  881. <input type="radio" name="outputFormat" id="outs" value="s" onclick="addTimes()"><label for="outs"><b>sec</b></label>,<br>
  882. <input type="radio" name="outputFormat" id="outf" value="f" onclick="addTimes()"><label for="outf"><b>frames</b></label>
  883. <br><br>
  884. </font>
  885. </td></tr>
  886. </tbody></table><br>
  887.  
  888. <input type="button" value="clear fields" onclick="clearFields()" style="font-size:12px; text-align:center;">&nbsp;&nbsp;&nbsp;
  889. <input type="button" value="save data as url" title="Save this data as a url" onclick="saveData()" style="font-size:12px; text-align:center;">
  890. <br>&nbsp;<br>
  891.  
  892. <font size="-1" color="#9C3119" face="verdana, arial, helvetica">
  893. You DO NOT need to fill in all rows</font><br>
  894. <font size="-1" face="verdana, arial, helvetica">
  895. Send comments to: <a href="mailto:[email protected]?subject=timeCalculator">Grun</a>
  896. </font><p>
  897. </p></div>
  898.  
  899.  
  900.  
  901. <!--- column 3 --->
  902. <div style="width:410px; float:left;">
  903.  
  904. <table border="4">
  905. <tbody><tr bgcolor="#bbbbcc">
  906. <td align="center" colspan="3"><b>Time Calculator</b></td>
  907. </tr>
  908. <tr bgcolor="#bbbbcc">
  909. <!-- TIME STATISTICS -->
  910. <td align="right">
  911. <font size="2">min: </font><input type="text" name="timeMin" size="10"><br>
  912. <font size="2">max: </font><input type="text" name="timeMax" size="10"><br>
  913. <font size="2">avg: </font><input type="text" name="timeAvg" size="10"><br>
  914. </td>
  915. <!-- TIME TOTAL -->
  916. <td align="center" valign="top" nowrap="">
  917. <font size="2"><b>total time:</b></font><br>
  918. <input type="text" name="timeTotal" size="10" style="background-color:#EEE;"><br>
  919. <div id="totalFormatDisplay">&nbsp;d:h:m:s&nbsp;</div>
  920. </td>
  921. <td>&nbsp;</td>
  922. </tr>
  923. <tr bgcolor="#ccccdd">
  924. <!-- TIME -->
  925. <td align="center" valign="top">
  926. <!--- <p>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;hr&nbsp;&nbsp;:&nbsp;&nbsp;min&nbsp;&nbsp;:&nbsp;&nbsp;sec&nbsp;&nbsp;&nbsp;&nbsp; --->
  927. &nbsp;&nbsp;&nbsp;&nbsp;<b>enter times:</b>&nbsp;&nbsp;&nbsp;&nbsp;<br>
  928. <div id="inputFormatDisplay">&nbsp;d:h:m:s:f&nbsp;<br>&nbsp;d:h:m:s&nbsp;<br>&nbsp;h:m:s&nbsp;<br>&nbsp;m:s&nbsp;<br>&nbsp;s&nbsp;</div>
  929. </td>
  930. <!-- CUMULATIVE TIME -->
  931. <td align="center" valign="top"><b>cumulative<br>times:</b><br><br>
  932. <div id="outputFormatDisplay">&nbsp;d:h:m:s&nbsp;</div>
  933. </td>
  934. <!-- COMMENTS -->
  935. <td align="center" valign="top"><b>comments</b></td>
  936. </tr>
  937. <tr bgcolor="#ccccdd">
  938. <!-- TIME -->
  939. <td align="center">
  940. <!-- <input type=text name=time1 onfocus="select()" size=7 onChange="addTimes()"><br> -->
  941. <table border="0" cellspacing="0" cellpadding="0">
  942. <tbody><tr>
  943. <td align="right" class="comment">1.&nbsp;</td>
  944. <td align="left">
  945. <input type="text" name="time1" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time2&#39;, event)"></td>
  946. </tr>
  947. <tr>
  948. <td align="right" class="comment">2.&nbsp;</td>
  949. <td align="left">
  950. <input type="text" name="time2" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time3&#39;, event)"></td>
  951. </tr>
  952. <tr>
  953. <td align="right" class="comment">3.&nbsp;</td>
  954. <td align="left">
  955. <input type="text" name="time3" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time4&#39;, event)"></td>
  956. </tr>
  957. <tr>
  958. <td align="right" class="comment">4.&nbsp;</td>
  959. <td align="left">
  960. <input type="text" name="time4" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time5&#39;, event)"></td>
  961. </tr>
  962. <tr>
  963. <td align="right" class="comment">5.&nbsp;</td>
  964. <td align="left">
  965. <input type="text" name="time5" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time6&#39;, event)"></td>
  966. </tr>
  967. <tr>
  968. <td align="right" class="comment">6.&nbsp;</td>
  969. <td align="left">
  970. <input type="text" name="time6" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time7&#39;, event)"></td>
  971. </tr>
  972. <tr>
  973. <td align="right" class="comment">7.&nbsp;</td>
  974. <td align="left">
  975. <input type="text" name="time7" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time8&#39;, event)"></td>
  976. </tr>
  977. <tr>
  978. <td align="right" class="comment">8.&nbsp;</td>
  979. <td align="left">
  980. <input type="text" name="time8" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time9&#39;, event)"></td>
  981. </tr>
  982. <tr>
  983. <td align="right" class="comment">9.&nbsp;</td>
  984. <td align="left">
  985. <input type="text" name="time9" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time10&#39;, event)"></td>
  986. </tr>
  987. <tr>
  988. <td align="right" class="comment">10.&nbsp;</td>
  989. <td align="left">
  990. <input type="text" name="time10" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time11&#39;, event)"></td>
  991. </tr>
  992. <tr>
  993. <td align="right" class="comment">11.&nbsp;</td>
  994. <td align="left">
  995. <input type="text" name="time11" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time12&#39;, event)"></td>
  996. </tr>
  997. <tr>
  998. <td align="right" class="comment">12.&nbsp;</td>
  999. <td align="left">
  1000. <input type="text" name="time12" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time13&#39;, event)"></td>
  1001. </tr>
  1002. <tr>
  1003. <td align="right" class="comment">13.&nbsp;</td>
  1004. <td align="left">
  1005. <input type="text" name="time13" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time14&#39;, event)"></td>
  1006. </tr>
  1007. <tr>
  1008. <td align="right" class="comment">14.&nbsp;</td>
  1009. <td align="left">
  1010. <input type="text" name="time14" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time15&#39;, event)"></td>
  1011. </tr>
  1012. <tr>
  1013. <td align="right" class="comment">15.&nbsp;</td>
  1014. <td align="left">
  1015. <input type="text" name="time15" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time16&#39;, event)"></td>
  1016. </tr>
  1017. <tr>
  1018. <td align="right" class="comment">16.&nbsp;</td>
  1019. <td align="left">
  1020. <input type="text" name="time16" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time17&#39;, event)"></td>
  1021. </tr>
  1022. <tr>
  1023. <td align="right" class="comment">17.&nbsp;</td>
  1024. <td align="left">
  1025. <input type="text" name="time17" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time18&#39;, event)"></td>
  1026. </tr>
  1027. <tr>
  1028. <td align="right" class="comment">18.&nbsp;</td>
  1029. <td align="left">
  1030. <input type="text" name="time18" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time19&#39;, event)"></td>
  1031. </tr>
  1032. <tr>
  1033. <td align="right" class="comment">19.&nbsp;</td>
  1034. <td align="left">
  1035. <input type="text" name="time19" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time20&#39;, event)"></td>
  1036. </tr>
  1037. <tr>
  1038. <td align="right" class="comment">20.&nbsp;</td>
  1039. <td align="left">
  1040. <input type="text" name="time20" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time21&#39;, event)"></td>
  1041. </tr>
  1042. <tr>
  1043. <td align="right" class="comment">21.&nbsp;</td>
  1044. <td align="left">
  1045. <input type="text" name="time21" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time22&#39;, event)"></td>
  1046. </tr>
  1047. <tr>
  1048. <td align="right" class="comment">22.&nbsp;</td>
  1049. <td align="left">
  1050. <input type="text" name="time22" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time23&#39;, event)"></td>
  1051. </tr>
  1052. <tr>
  1053. <td align="right" class="comment">23.&nbsp;</td>
  1054. <td align="left">
  1055. <input type="text" name="time23" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time24&#39;, event)"></td>
  1056. </tr>
  1057. <tr>
  1058. <td align="right" class="comment">24.&nbsp;</td>
  1059. <td align="left">
  1060. <input type="text" name="time24" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time25&#39;, event)"></td>
  1061. </tr>
  1062. <tr>
  1063. <td align="right" class="comment">25.&nbsp;</td>
  1064. <td align="left">
  1065. <input type="text" name="time25" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time26&#39;, event)"></td>
  1066. </tr>
  1067. <tr>
  1068. <td align="right" class="comment">26.&nbsp;</td>
  1069. <td align="left">
  1070. <input type="text" name="time26" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time27&#39;, event)"></td>
  1071. </tr>
  1072. <tr>
  1073. <td align="right" class="comment">27.&nbsp;</td>
  1074. <td align="left">
  1075. <input type="text" name="time27" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time28&#39;, event)"></td>
  1076. </tr>
  1077. <tr>
  1078. <td align="right" class="comment">28.&nbsp;</td>
  1079. <td align="left">
  1080. <input type="text" name="time28" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time29&#39;, event)"></td>
  1081. </tr>
  1082. <tr>
  1083. <td align="right" class="comment">29.&nbsp;</td>
  1084. <td align="left">
  1085. <input type="text" name="time29" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time30&#39;, event)"></td>
  1086. </tr>
  1087. <tr>
  1088. <td align="right" class="comment">30.&nbsp;</td>
  1089. <td align="left">
  1090. <input type="text" name="time30" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time31&#39;, event)"></td>
  1091. </tr>
  1092. <tr>
  1093. <td align="right" class="comment">31.&nbsp;</td>
  1094. <td align="left">
  1095. <input type="text" name="time31" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time32&#39;, event)"></td>
  1096. </tr>
  1097. <tr>
  1098. <td align="right" class="comment">32.&nbsp;</td>
  1099. <td align="left">
  1100. <input type="text" name="time32" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time33&#39;, event)"></td>
  1101. </tr>
  1102. <tr>
  1103. <td align="right" class="comment">33.&nbsp;</td>
  1104. <td align="left">
  1105. <input type="text" name="time33" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time34&#39;, event)"></td>
  1106. </tr>
  1107. <tr>
  1108. <td align="right" class="comment">34.&nbsp;</td>
  1109. <td align="left">
  1110. <input type="text" name="time34" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time35&#39;, event)"></td>
  1111. </tr>
  1112. <tr>
  1113. <td align="right" class="comment">35.&nbsp;</td>
  1114. <td align="left">
  1115. <input type="text" name="time35" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time36&#39;, event)"></td>
  1116. </tr>
  1117. <tr>
  1118. <td align="right" class="comment">36.&nbsp;</td>
  1119. <td align="left">
  1120. <input type="text" name="time36" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time37&#39;, event)"></td>
  1121. </tr>
  1122. <tr>
  1123. <td align="right" class="comment">37.&nbsp;</td>
  1124. <td align="left">
  1125. <input type="text" name="time37" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time38&#39;, event)"></td>
  1126. </tr>
  1127. <tr>
  1128. <td align="right" class="comment">38.&nbsp;</td>
  1129. <td align="left">
  1130. <input type="text" name="time38" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time39&#39;, event)"></td>
  1131. </tr>
  1132. <tr>
  1133. <td align="right" class="comment">39.&nbsp;</td>
  1134. <td align="left">
  1135. <input type="text" name="time39" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time40&#39;, event)"></td>
  1136. </tr>
  1137. <tr>
  1138. <td align="right" class="comment">40.&nbsp;</td>
  1139. <td align="left">
  1140. <input type="text" name="time40" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time41&#39;, event)"><br>
  1141. </td>
  1142. </tr> <tr>
  1143. <td align="right" class="comment">41.&nbsp;</td>
  1144. <td align="left">
  1145. <input type="text" name="time41" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time42&#39;, event)"><br>
  1146. </td>
  1147. </tr>
  1148. <tr>
  1149. <td align="right" class="comment">42.&nbsp;</td>
  1150. <td align="left">
  1151. <input type="text" name="time42" size="10" onchange="addTimes()" onkeypress="checkKeyPress(&#39;time1&#39;, event)"><br>
  1152. </td>
  1153. </tr>
  1154. </tbody></table>
  1155. </td>
  1156. <!-- CUMULATIVE TIME -->
  1157. <td align="center" valign="top">
  1158. <input type="text" name="cumtime1" size="10" class="cumtime"><br>
  1159. <input type="text" name="cumtime2" size="10" class="cumtime"><br>
  1160. <input type="text" name="cumtime3" size="10" class="cumtime"><br>
  1161. <input type="text" name="cumtime4" size="10" class="cumtime"><br>
  1162. <input type="text" name="cumtime5" size="10" class="cumtime"><br>
  1163. <input type="text" name="cumtime6" size="10" class="cumtime"><br>
  1164. <input type="text" name="cumtime7" size="10" class="cumtime"><br>
  1165. <input type="text" name="cumtime8" size="10" class="cumtime"><br>
  1166. <input type="text" name="cumtime9" size="10" class="cumtime"><br>
  1167. <input type="text" name="cumtime10" size="10" class="cumtime"><br>
  1168. <input type="text" name="cumtime11" size="10" class="cumtime"><br>
  1169. <input type="text" name="cumtime12" size="10" class="cumtime"><br>
  1170. <input type="text" name="cumtime13" size="10" class="cumtime"><br>
  1171. <input type="text" name="cumtime14" size="10" class="cumtime"><br>
  1172. <input type="text" name="cumtime15" size="10" class="cumtime"><br>
  1173. <input type="text" name="cumtime16" size="10" class="cumtime"><br>
  1174. <input type="text" name="cumtime17" size="10" class="cumtime"><br>
  1175. <input type="text" name="cumtime18" size="10" class="cumtime"><br>
  1176. <input type="text" name="cumtime19" size="10" class="cumtime"><br>
  1177. <input type="text" name="cumtime20" size="10" class="cumtime"><br>
  1178. <input type="text" name="cumtime21" size="10" class="cumtime"><br>
  1179. <input type="text" name="cumtime22" size="10" class="cumtime"><br>
  1180. <input type="text" name="cumtime23" size="10" class="cumtime"><br>
  1181. <input type="text" name="cumtime24" size="10" class="cumtime"><br>
  1182. <input type="text" name="cumtime25" size="10" class="cumtime"><br>
  1183. <input type="text" name="cumtime26" size="10" class="cumtime"><br>
  1184. <input type="text" name="cumtime27" size="10" class="cumtime"><br>
  1185. <input type="text" name="cumtime28" size="10" class="cumtime"><br>
  1186. <input type="text" name="cumtime29" size="10" class="cumtime"><br>
  1187. <input type="text" name="cumtime30" size="10" class="cumtime"><br>
  1188. <input type="text" name="cumtime31" size="10" class="cumtime"><br>
  1189. <input type="text" name="cumtime32" size="10" class="cumtime"><br>
  1190. <input type="text" name="cumtime33" size="10" class="cumtime"><br>
  1191. <input type="text" name="cumtime34" size="10" class="cumtime"><br>
  1192. <input type="text" name="cumtime35" size="10" class="cumtime"><br>
  1193. <input type="text" name="cumtime36" size="10" class="cumtime"><br>
  1194. <input type="text" name="cumtime37" size="10" class="cumtime"><br>
  1195. <input type="text" name="cumtime38" size="10" class="cumtime"><br>
  1196. <input type="text" name="cumtime39" size="10" class="cumtime"><br>
  1197. <input type="text" name="cumtime40" size="10" class="cumtime"><br>
  1198. <input type="text" name="cumtime41" size="10" class="cumtime"><br>
  1199. <input type="text" name="cumtime42" size="10" class="cumtime"><br>
  1200. </td>
  1201. <!-- COMMENTS -->
  1202. <td align="center" valign="top">
  1203. <input type="text" name="comments1" size="30" class="comments"><br>
  1204. <input type="text" name="comments2" size="30" class="comments"><br>
  1205. <input type="text" name="comments3" size="30" class="comments"><br>
  1206. <input type="text" name="comments4" size="30" class="comments"><br>
  1207. <input type="text" name="comments5" size="30" class="comments"><br>
  1208. <input type="text" name="comments6" size="30" class="comments"><br>
  1209. <input type="text" name="comments7" size="30" class="comments"><br>
  1210. <input type="text" name="comments8" size="30" class="comments"><br>
  1211. <input type="text" name="comments9" size="30" class="comments"><br>
  1212. <input type="text" name="comments10" size="30" class="comments"><br>
  1213. <input type="text" name="comments11" size="30" class="comments"><br>
  1214. <input type="text" name="comments12" size="30" class="comments"><br>
  1215. <input type="text" name="comments13" size="30" class="comments"><br>
  1216. <input type="text" name="comments14" size="30" class="comments"><br>
  1217. <input type="text" name="comments15" size="30" class="comments"><br>
  1218. <input type="text" name="comments16" size="30" class="comments"><br>
  1219. <input type="text" name="comments17" size="30" class="comments"><br>
  1220. <input type="text" name="comments18" size="30" class="comments"><br>
  1221. <input type="text" name="comments19" size="30" class="comments"><br>
  1222. <input type="text" name="comments20" size="30" class="comments"><br>
  1223. <input type="text" name="comments21" size="30" class="comments"><br>
  1224. <input type="text" name="comments22" size="30" class="comments"><br>
  1225. <input type="text" name="comments23" size="30" class="comments"><br>
  1226. <input type="text" name="comments24" size="30" class="comments"><br>
  1227. <input type="text" name="comments25" size="30" class="comments"><br>
  1228. <input type="text" name="comments26" size="30" class="comments"><br>
  1229. <input type="text" name="comments27" size="30" class="comments"><br>
  1230. <input type="text" name="comments28" size="30" class="comments"><br>
  1231. <input type="text" name="comments29" size="30" class="comments"><br>
  1232. <input type="text" name="comments30" size="30" class="comments"><br>
  1233. <input type="text" name="comments31" size="30" class="comments"><br>
  1234. <input type="text" name="comments32" size="30" class="comments"><br>
  1235. <input type="text" name="comments33" size="30" class="comments"><br>
  1236. <input type="text" name="comments34" size="30" class="comments"><br>
  1237. <input type="text" name="comments35" size="30" class="comments"><br>
  1238. <input type="text" name="comments36" size="30" class="comments"><br>
  1239. <input type="text" name="comments37" size="30" class="comments"><br>
  1240. <input type="text" name="comments38" size="30" class="comments"><br>
  1241. <input type="text" name="comments39" size="30" class="comments"><br>
  1242. <input type="text" name="comments40" size="30" class="comments"><br>
  1243.  
  1244. <input type="text" name="comments41" size="30" class="comments"><br>
  1245. <input type="text" name="comments42" size="30" class="comments"><br> </td>
  1246. </tr>
  1247. <tr bgcolor="#bbbbcc">
  1248. <!-- TIME STATISTICS -->
  1249. <td align="right">
  1250. <font size="2">min: </font><input type="text" name="timeMin2" size="10" style="background-color:#EEE;"><br>
  1251. <font size="2">max: </font><input type="text" name="timeMax2" size="10" style="background-color:#EEE;"><br>
  1252. <font size="2">avg: </font><input type="text" name="timeAvg2" size="10" style="background-color:#EEE;"><br>
  1253. </td>
  1254. <!-- TIME TOTAL -->
  1255. <td align="center" valign="top">
  1256. <font size="2"><b>total time:</b></font><br>
  1257. <input type="text" name="timeTotal2" size="10" style="background-color:#EEE;"><br>
  1258. hr : min : sec
  1259. </td>
  1260. </tr>
  1261. </tbody></table><br>
  1262.  
  1263. <input type="button" value="clear fields" onclick="clearFields()" class="noprint" style="font-size:12px; text-align:center;">&nbsp;&nbsp;&nbsp;
  1264. <input type="button" value="save data" title="Save this data as a url" onclick="saveData()" style="font-size:12px; text-align:center;">
  1265. <br>
  1266.  
  1267. <font face="Comic Sans MS" color="slateblue" class="noprint">Have a nice day!</font>
  1268.  
  1269. </div>
  1270.  
  1271. </td>
  1272. </tr>
  1273. </tbody></table>
  1274.  
  1275. <input type="hidden" name="sec1" value="0">
  1276. <input type="hidden" name="sec2" value="0">
  1277. <input type="hidden" name="sec3" value="0">
  1278. <input type="hidden" name="sec4" value="0">
  1279. <input type="hidden" name="sec5" value="0">
  1280. <input type="hidden" name="sec6" value="0">
  1281. <input type="hidden" name="sec7" value="0">
  1282. <input type="hidden" name="sec8" value="0">
  1283. <input type="hidden" name="sec9" value="0">
  1284. <input type="hidden" name="sec10" value="0">
  1285. <input type="hidden" name="sec11" value="0">
  1286. <input type="hidden" name="sec12" value="0">
  1287. <input type="hidden" name="sec13" value="0">
  1288. <input type="hidden" name="sec14" value="0">
  1289. <input type="hidden" name="sec15" value="0">
  1290. <input type="hidden" name="sec16" value="0">
  1291. <input type="hidden" name="sec17" value="0">
  1292. <input type="hidden" name="sec18" value="0">
  1293. <input type="hidden" name="sec19" value="0">
  1294. <input type="hidden" name="sec20" value="0">
  1295. <input type="hidden" name="sec21" value="0">
  1296. <input type="hidden" name="sec22" value="0">
  1297. <input type="hidden" name="sec23" value="0">
  1298. <input type="hidden" name="sec24" value="0">
  1299. <input type="hidden" name="sec25" value="0">
  1300. <input type="hidden" name="sec26" value="0">
  1301. <input type="hidden" name="sec27" value="0">
  1302. <input type="hidden" name="sec28" value="0">
  1303. <input type="hidden" name="sec29" value="0">
  1304. <input type="hidden" name="sec30" value="0">
  1305. <input type="hidden" name="sec31" value="0">
  1306. <input type="hidden" name="sec32" value="0">
  1307. <input type="hidden" name="sec33" value="0">
  1308. <input type="hidden" name="sec34" value="0">
  1309. <input type="hidden" name="sec35" value="0">
  1310. <input type="hidden" name="sec36" value="0">
  1311. <input type="hidden" name="sec37" value="0">
  1312. <input type="hidden" name="sec38" value="0">
  1313. <input type="hidden" name="sec39" value="0">
  1314. <input type="hidden" name="sec40" value="0">
  1315. <input type="hidden" name="sec41" value="0"> <input type="hidden" name="sec42" value="0"> </form>
  1316. </center>
  1317.  
  1318.  
  1319. </body><autoscroll></autoscroll></html>
Advertisement
Add Comment
Please, Sign In to add comment