Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
- <!-- saved from url=(0040)http://www.grun1.com/utils/timeCalc.html -->
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="DESCRIPTION" content="Time Calculator">
- <meta name="KEYWORDS" content="time, calculator, days, hours, minutes, seconds, add, cumulative">
- <meta name="viewport" content="width=device-width, initial-scale=1"> <!--- maximum-scale=1, user-scalable=no --->
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <title>Time Calculator</title>
- <style type="text/css">
- @media print {
- .noprint { display:none; }
- .printOnly { }
- BODY { background-image:none; margin:0px;}
- }
- @media screen {
- .noprint { }
- .printOnly { display:none; }
- BODY { background-image:none; margin:0px;}
- }
- INPUT {
- font-size: 11px;
- text-align:right;
- }
- .threeD {
- border-left:1px solid black;
- border-top:1px solid black;
- border-right:2px solid black;
- border-bottom:2px solid black;
- }
- .comment {
- color: dimgray;
- }
- .cumtime {
- background-color: whitesmoke;
- }
- .comments {
- text-align: left;
- }
- </style>
- <script language="JavaScript"><!--
- var mode = 'add'; // default
- // Takes a string in the form 'h:m:s.s', 'm:s.s', or 's' and converts to seconds
- function stringToSeconds (timeString) {
- var timeSeparator = document.timeCalc.timeSeparator.value
- var sign = 1 // -1 for negative number
- if (timeString == "") return 0
- if (timeString.substring(0,1) == "-") {
- sign = -1
- timeString = timeString.substring(1,timeString.length)
- }
- var days = 0
- var hr = 0
- var mn = 0
- var sec = 0
- var frames = 0
- var timeArray = timeString.split(timeSeparator)
- //alert(timeArray.length);
- switch (timeArray.length) {
- case 1:
- if (document.timeCalc.singleFormat[0].checked) { // days
- days = Number(timeArray[0])
- } else if (document.timeCalc.singleFormat[1].checked) { // hr
- hr = Number(timeArray[0])
- } else if (document.timeCalc.singleFormat[2].checked) { // min
- mn = Number(timeArray[0])
- } else if (document.timeCalc.singleFormat[3].checked) { // sec
- sec = Number(timeArray[0])
- } else { // frames
- frames = Number(timeArray[0])
- }
- break;
- case 2:
- if (document.timeCalc.timeFormat[0].checked) { // days:hr
- days = Number(timeArray[0])
- hr = Number(timeArray[1])
- } else if (document.timeCalc.timeFormat[1].checked) { // hr:min
- hr = Number(timeArray[0])
- mn = Number(timeArray[1])
- } else if (document.timeCalc.timeFormat[2].checked) { // min:sec
- mn = Number(timeArray[0])
- sec = Number(timeArray[1])
- } else { // sec:frames
- sec = Number(timeArray[0])
- frames = Number(timeArray[1])
- }
- break;
- case 3:
- if (document.timeCalc.time3Format[0].checked) { // days:hr:min
- days = Number(timeArray[0])
- hr = Number(timeArray[1])
- mn = Number(timeArray[2])
- } else if (document.timeCalc.time3Format[1].checked) { // hr:min:sec
- hr = Number(timeArray[0])
- mn = Number(timeArray[1])
- sec = Number(timeArray[2])
- } else { // min:sec:frames
- mn = Number(timeArray[0])
- sec = Number(timeArray[1])
- frames = Number(timeArray[2])
- }
- break;
- case 4:
- if (document.timeCalc.time4Format[0].checked) { // days:hr:min:sec
- days = Number(timeArray[0])
- hr = Number(timeArray[1])
- mn = Number(timeArray[2])
- sec = Number(timeArray[3])
- } else { // hr:min:sec:frames
- hr = Number(timeArray[0])
- mn = Number(timeArray[1])
- sec = Number(timeArray[2])
- frames = Number(timeArray[3])
- }
- break;
- case 5:
- days = Number(timeArray[0])
- hr = Number(timeArray[1])
- mn = Number(timeArray[2])
- sec = Number(timeArray[3])
- frames = Number(timeArray[4])
- break;
- }
- //alert(hr + ", " + mn + ", " + sec + ", " + frames)
- //alert(sign * (hr*3600 + mn*60 + sec))
- return sign * (days*86400 + hr*3600 + mn*60 + sec)
- }
- // Takes a string in the form 'h:m:s:f', 'm:s:f', 's:f' or 'f' and extract the frames
- function stringToFrames (timeString) {
- var timeSeparator = document.timeCalc.timeSeparator.value
- var sign = 1 // -1 for negative number
- if (timeString == "") return 0
- if (timeString.substring(0,1) == "-") {
- sign = -1
- timeString = timeString.substring(1,timeString.length)
- }
- var frames = 0
- var timeArray = timeString.split(timeSeparator)
- //alert(timeArray.length);
- switch (timeArray.length) {
- case 1:
- if (document.timeCalc.singleFormat[4].checked) { // f
- frames = Number(timeArray[0])
- }
- break;
- case 2:
- if (document.timeCalc.timeFormat[3].checked) { // s:f
- sec = Number(timeArray[0])
- frames = Number(timeArray[1])
- }
- break;
- case 3:
- if (document.timeCalc.time3Format[2].checked) { // m:s:f
- frames = Number(timeArray[2])
- }
- break;
- case 4:
- if (document.timeCalc.time4Format[1].checked) { // h:m:s:f
- frames = Number(timeArray[3])
- }
- break;
- case 5:
- frames = Number(timeArray[4])
- break;
- }
- //alert(hr + ", " + mn + ", " + sec + ", " + frames)
- //alert(sign * (hr*3600 + mn*60 + sec))
- return sign * frames
- }
- // Takes an hr string, mn string, and sec string and converts to seconds
- function stringToSeconds3 (dayString, hrString, minString, secString) {
- return Number(dayString)*86400 + Number(hrString)*3600 + Number(minString)*60 + Number(secString)
- }
- // Takes seconds and converts to h:m:s.s
- function secondsToString (seconds, frames, displayFrames) {
- if (typeof seconds == 'undefined') var seconds = 0;
- if (typeof frames == 'undefined') var frames = 0;
- if (typeof displayFrames == 'undefined') var displayFrames = 0;
- var myForm = document.timeCalc
- var timeSeparator = document.timeCalc.timeSeparator.value
- var sign = "" // "-" for negative number
- if (seconds < 0) {
- sign = "-"
- seconds = -1 * seconds
- }
- var days = Math.floor(seconds/86400)
- var hr = Math.floor((seconds%86400)/3600)
- var mn = Math.floor((seconds%3600)/60)
- //var mn = Math.floor(seconds/60)%60
- var sec = round3(seconds%60)
- var timeString = ""
- //if (myForm.outputFormat[0].checked || myForm.outputFormat[2].checked || myForm.outputFormat[5].checked) {
- // var timeString = "" + sec
- //else if (myForm.outputFormat[1].checked || myForm.outputFormat[4].checked) {
- // var timeString = "" + mn
- //else
- // var timeString = "" + hr
- //}
- if (myForm.outputFormat[0].checked || myForm.outputFormat[1].checked) { // days:hr:min:sec:frames or days:hr:min:sec
- if (days > 0) { // d,h,m,s are all non-blank
- timeString = days + timeSeparator;
- if (hr >= 10) timeString = timeString + hr + timeSeparator
- else timeString = timeString + "0" + hr + timeSeparator
- if (mn >= 10) timeString = timeString + mn + timeSeparator
- else timeString = timeString + "0" + mn + timeSeparator
- if (sec >= 10) timeString = timeString + sec
- else timeString = timeString + "0" + sec
- }
- else if (hr > 0) { // days is blank, h,m,s are non-blank
- timeString = hr + timeSeparator;
- if (mn >= 10) timeString = timeString + mn + timeSeparator
- else timeString = timeString + "0" + mn + timeSeparator
- if (sec >= 10) timeString = timeString + sec
- else timeString = timeString + "0" + sec
- }
- else if (mn > 0) { // days and hrs are blank, m,s are non-blank
- timeString = mn + timeSeparator;
- if (sec >= 10) timeString = timeString + sec
- else timeString = timeString + "0" + sec
- }
- else timeString = sec // days, hrs and min are blank
- }
- else if (myForm.outputFormat[2].checked || myForm.outputFormat[4].checked) { // hr:min:sec:frames or hr:min:sec
- // days aren't shown, so merge days into hours
- hr = days*24 + hr
- if (hr > 0) { // d is blank; h,m,s are all non-blank
- timeString = hr + timeSeparator;
- if (mn >= 10) timeString = timeString + mn + timeSeparator
- else timeString = timeString + "0" + mn + timeSeparator
- if (sec >= 10) timeString = timeString + sec
- else timeString = timeString + "0" + sec
- }
- else if (mn > 0) { // days and hr are blank, m,s are non-blank
- timeString = mn + timeSeparator;
- if (sec >= 10) timeString = timeString + sec
- else timeString = timeString + "0" + sec
- }
- else timeString = sec // days, hrs and min are blank
- }
- else if (myForm.outputFormat[3].checked) { // day:hr:min
- // sec aren't shown, so merge seconds into minutes
- mn = mn + round3(sec/60.0);
- if (days > 0) { // d,h,m are all non-blank; s not shown
- timeString = days + timeSeparator;
- if (hr >= 10) timeString = timeString + hr + timeSeparator
- else timeString = timeString + "0" + hr + timeSeparator
- if (mn >= 10) timeString = timeString + mn + timeSeparator
- else timeString = timeString + "0" + mn + timeSeparator
- }
- else if (hr > 0) { // days is blank; h,m are non-blank; s not shown
- timeString = hr + timeSeparator;
- if (mn >= 10) timeString = timeString + mn + timeSeparator
- else timeString = timeString + "0" + mn + timeSeparator
- }
- else timeString = mn
- }
- else if (myForm.outputFormat[6].checked) { // days:hr
- // min & sec aren't shown, so merge minutes & seconds into hours
- hr = hr + (mn/60.0)
- hr = round3(hr + sec/3660.0)
- if (days > 0) {
- if (hr >= 10) timeString = days + timeSeparator + hr
- else timeString = days + timeSeparator + "0" + hr
- }
- else timeString = hr
- }
- else if (myForm.outputFormat[7].checked) { // hr:min
- // days & sec aren't shown, so merge days into hours & merge seconds into minutes
- hr = days*24 + hr
- mn = mn + round3(sec/60.0)
- if (hr > 0) {
- if (mn >= 10) timeString = hr + timeSeparator + mn
- else timeString = hr + timeSeparator + "0" + mn
- }
- else timeString = mn
- }
- else if (myForm.outputFormat[5].checked || myForm.outputFormat[8].checked) { // min:sec or min:sec:frames
- // days,hr aren't shown, so merge days & hr into minutes
- mn = days*1440 + mn
- mn = hr*60 + mn
- if (mn > 0) {
- if (sec >= 10) timeString = mn + timeSeparator + sec
- else timeString = mn + timeSeparator + "0" + sec
- }
- else timeString = sec
- }
- else if (myForm.outputFormat[10].checked) { // days
- timeString = round3(seconds/86400)
- }
- else if (myForm.outputFormat[11].checked) { // hr
- timeString = round3(seconds/3600)
- }
- else if (myForm.outputFormat[12].checked) { // min
- timeString = round3(seconds/60)
- }
- else if (myForm.outputFormat[9].checked) { // sec
- timeString = round3(seconds)
- }
- else { // frames
- timeString = round3(seconds);
- }
- if (displayFrames) {
- if (frames >= 10) timeString = timeString + timeSeparator + frames;
- else timeString = timeString + timeSeparator + '0' + frames;
- }
- return sign + timeString
- }
- function round2(myNumber) {
- return Math.floor(Math.round(myNumber * 100)) / 100
- }
- function round3(myNumber) {
- return Math.floor(Math.round(myNumber * 1000)) / 1000
- }
- function saveData() {
- var params = [];
- for (i=1; i<=42; i++) {
- // Save times
- val = eval('document.timeCalc.time'+i+'.value');
- if (val != '') { // && !isNaN(val)
- params[params.length] = 't'+i+'='+val;
- }
- // Save comments
- val = eval('document.timeCalc.comments'+i+'.value');
- if (val != '') {
- params[params.length] = 'c'+i+'='+encodeURI(val);
- }
- }
- // Save options
- if (document.timeCalc.plusMinusMode[0].checked == 1) params[params.length] = 'mode=0';
- if (document.timeCalc.plusMinusMode[1].checked == 1) params[params.length] = 'mode=1';
- if (document.timeCalc.singleFormat[0].checked == 1) params[params.length] = 'fs0=1';
- if (document.timeCalc.singleFormat[1].checked == 1) params[params.length] = 'fs1=1';
- if (document.timeCalc.singleFormat[2].checked == 1) params[params.length] = 'fs2=1';
- if (document.timeCalc.singleFormat[3].checked == 1) params[params.length] = 'fs3=1';
- if (document.timeCalc.singleFormat[4].checked == 1) params[params.length] = 'fs4=1';
- if (document.timeCalc.timeFormat[0].checked == 1) params[params.length] = 'ft0=1';
- if (document.timeCalc.timeFormat[1].checked == 1) params[params.length] = 'ft1=1';
- if (document.timeCalc.timeFormat[2].checked == 1) params[params.length] = 'ft2=1';
- if (document.timeCalc.timeFormat[3].checked == 1) params[params.length] = 'ft3=1';
- if (document.timeCalc.time3Format[0].checked == 1) params[params.length] = 'f3t0=1';
- if (document.timeCalc.time3Format[1].checked == 1) params[params.length] = 'f3t1=1';
- if (document.timeCalc.time3Format[2].checked == 1) params[params.length] = 'f3t2=1';
- if (document.timeCalc.time4Format[0].checked == 1) params[params.length] = 'f4t0=1';
- if (document.timeCalc.time4Format[1].checked == 1) params[params.length] = 'f4t1=1';
- params[params.length] = 'd='+encodeURI(document.timeCalc.timeSeparator.value);
- if (document.timeCalc.outputFormat[0].checked == 1) params[params.length] = 'o0=1';
- if (document.timeCalc.outputFormat[1].checked == 1) params[params.length] = 'o1=1';
- if (document.timeCalc.outputFormat[2].checked == 1) params[params.length] = 'o2=1';
- if (document.timeCalc.outputFormat[3].checked == 1) params[params.length] = 'o3=1';
- if (document.timeCalc.outputFormat[4].checked == 1) params[params.length] = 'o4=1';
- if (document.timeCalc.outputFormat[5].checked == 1) params[params.length] = 'o5=1';
- if (document.timeCalc.outputFormat[6].checked == 1) params[params.length] = 'o6=1';
- if (document.timeCalc.outputFormat[7].checked == 1) params[params.length] = 'o7=1';
- if (document.timeCalc.outputFormat[8].checked == 1) params[params.length] = 'o8=1';
- if (document.timeCalc.outputFormat[9].checked == 1) params[params.length] = 'o9=1';
- if (document.timeCalc.outputFormat[10].checked == 1) params[params.length] = 'o10=1';
- if (document.timeCalc.outputFormat[11].checked == 1) params[params.length] = 'o11=1';
- if (document.timeCalc.outputFormat[12].checked == 1) params[params.length] = 'o12=1';
- if (document.timeCalc.outputFormat[13].checked == 1) params[params.length] = 'o13=1';
- if (document.timeCalc.outputFormat[14].checked == 1) params[params.length] = 'o14=1';
- //if (document.timeCalc.fractionType.checked == 1) params[params.length] = 'fps=100'
- else if (!isNaN(document.timeCalc.fps.value)) params[params.length] = 'fps='+document.timeCalc.fps.value;
- if (params.length == 0) var url = baseUrl;
- else var url = baseUrl + '?' + params.join('&');
- prompt('copy and save this url:',url);
- }
- function clearFields() {
- for (i=1; i<=42; i++) {
- eval('document.timeCalc.time'+i+'.value = ""');
- }
- for (i=1; i<=42; i++) {
- eval('document.timeCalc.cumtime'+i+'.value = ""');
- eval('document.timeCalc.comments'+i+'.value = ""');
- }
- document.timeCalc.timeMin.value = ""
- document.timeCalc.timeMax.value = ""
- document.timeCalc.timeAvg.value = ""
- document.timeCalc.timeTotal.value = ""
- document.timeCalc.timeMin2.value = ""
- document.timeCalc.timeMax2.value = ""
- document.timeCalc.timeAvg2.value = ""
- document.timeCalc.timeTotal2.value = ""
- document.timeCalc.time1.focus()
- }
- function addSeconds(sec1, sec2) { //, fps) {
- //if (typeof fps == "undefined") var fps = 1;
- if (isNaN(sec1)) return sec2;
- if (isNaN(sec2)) return sec1;
- //if (fps2 == 100) {
- // return sec1 + sec2;
- //}
- // else {
- // Add the fractions
- //alert(''+fps+' fps');
- var aArray = sec1.toString().split('.');
- var bArray = sec2.toString().split('.');
- if (aArray.length < 2) aArray[1] = 0;
- if (bArray.length < 2) bArray[1] = 0;
- if (aArray[1].length < 2) aArray[1] = aArray[1] + '0';
- if (bArray[1].length < 2) bArray[1] = bArray[1] + '0';
- //alert(aArray[0] + ', ' + aArray[1] + ', ' + bArray[0] + ', ' + bArray[1]);
- var tempTotal2 = parseInt(aArray[1]) + parseInt(bArray[1]);
- //alert(''+aArray[0] +', '+bArray[0]);
- //var tempTotal3 = parseInt(aArray[0]) + parseInt(bArray[0]) + Math.floor(tempTotal2/fps2);
- var tempTotal3 = parseInt(aArray[0]) + parseInt(bArray[0]);
- //var frames = tempTotal2%fps2;
- //if (frames < 10) frames = '0' + frames.toString();
- //alert(tempTotal3.toString()+'.'+frames);
- //return(tempTotal3.toString()+'.'+frames);
- return(tempTotal3.toString());
- //}
- }
- // Returns the value of the first selected radio button, else returns nil
- function selectedRadioValue(radioGroupObj) { // eg. document.mainForm.myRadioName
- //var radioGroupObj = document.getElementsByName(radioName);
- for(var i = 0; i < radioGroupObj.length; i++){
- if(radioGroupObj[i].checked){
- return radioGroupObj[i].value;
- }
- }
- return nil;
- }
- function changeMode() {
- if (document.timeCalc.plusMinusMode[0].checked) mode = 'add';
- else mode = 'sub';
- addTimes();
- }
- function addTimes() {
- var prevTotalTime = 0;
- var prevTotalFrames = 0;
- var totalTime = 0;
- var totalFrames = 0;
- var minsec = 0;
- var maxsec = 0;
- var minFrames = 0;
- var maxFrames = 0;
- var count = 0;
- var seconds = 0;
- var frames = 0;
- var origSeconds = 0;
- var origFrames = 0;
- var timeString = '';
- var timeSeparator = document.timeCalc.timeSeparator.value;
- var fps = document.timeCalc.fps.value;
- if (fps == '' || isNaN(fps)) fps = 0;
- else fps = parseInt(fps);
- //if (isNaN(fps) || document.timeCalc.fractionType.checked == 1) fps = 100;
- // Display the outputFormat
- outFormat = selectedRadioValue(document.timeCalc.outputFormat).replace(/:/g,timeSeparator);
- writeLayer('totalFormatDisplay',' ' + outFormat + ' ');
- writeLayer('outputFormatDisplay',' ' + outFormat + ' ');
- writeLayer('inputFormatDisplay',
- ' ' + 'd:h:m:s:f'.replace(/:/g,timeSeparator) + ' <br/>' +
- ' ' + selectedRadioValue(document.timeCalc.time4Format).replace(/:/g,timeSeparator) + ' <br/>' +
- ' ' + selectedRadioValue(document.timeCalc.time3Format).replace(/:/g,timeSeparator) + ' <br/>' +
- ' ' + selectedRadioValue(document.timeCalc.timeFormat).replace(/:/g,timeSeparator) + ' <br/>' +
- ' ' + selectedRadioValue(document.timeCalc.singleFormat).replace(/:/g,timeSeparator) + ' ');
- //Do frames get displayed?
- if (document.timeCalc.outputFormat[0].checked || document.timeCalc.outputFormat[2].checked ||
- document.timeCalc.outputFormat[5].checked || document.timeCalc.outputFormat[9].checked ||
- document.timeCalc.outputFormat[14].checked) {
- var displayFrames = true;
- } else {
- var displayFrames = false;
- }
- if ((document.timeCalc.time4Format[1].checked == 1 ||
- document.timeCalc.time3Format[2].checked == 1 ||
- document.timeCalc.timeFormat[3].checked == 1 ||
- document.timeCalc.singleFormat[4].checked == 1 || displayFrames) && // frames were selected
- (document.timeCalc.fps.value == '' || document.timeCalc.fps.value < 1)) {
- alert("Please specify frames-per-second > 0");
- document.timeCalc.fps.focus();
- return;
- }
- for (i=1; i<=42; i++){
- myValue = eval('document.timeCalc.time'+i+'.value');
- seconds = origSeconds = stringToSeconds(myValue);
- frames = origFrames = stringToFrames(myValue);
- //alert('sec1: '+seconds);
- //alert('frames1: '+frames);
- if (fps > 0) {
- seconds = seconds + Math.floor(frames / fps);
- //alert('sec2: '+seconds);
- frames = frames % fps;
- }
- if (i == 1) {
- minsec = origSeconds;
- maxsec = origSeconds;
- minFrames = origFrames;
- maxFrames = origFrames;
- }
- eval('document.timeCalc.sec'+i+'.value = seconds');
- if (mode == 'add') { // mode = add
- totalFrames = totalFrames + frames;
- } else { // mode = subtract
- if (i==1) totalFrames = frames;
- else totalFrames = totalFrames - frames;
- }
- if (fps > 0 && totalFrames >= fps) {
- //alert('totalFrames (' + totalFrames + ') are over fps (' + fps + ')');
- seconds = seconds + Math.floor(totalFrames / fps);
- //alert('sec2: '+seconds);
- totalFrames = totalFrames % fps;
- }
- if (seconds == 0 && (frames == 0 || !displayFrames)) {
- eval('document.timeCalc.cumtime'+i+'.value = ""');
- } else {
- if (mode == 'add') { // mode = add
- totalTime = totalTime + seconds;
- } else { // mode = subtract
- if (i==1) totalTime = seconds;
- else totalTime = totalTime - seconds;
- }
- //totalTime = addSeconds(totalTime, seconds, fps);
- //if (isNaN(totalTime)) totalTime = 0;
- //alert('TotalTime:' + totalTime + ', totalFrames:' + totalFrames + ', displayFrames:' + displayFrames);
- timeString = secondsToString(totalTime, totalFrames, displayFrames);
- eval('document.timeCalc.cumtime'+i+'.value = timeString');
- //eval('document.timeCalc.cumtime'+i+'.value = totalTime');
- //minsec = Math.min(minsec, seconds);
- //maxsec = Math.max(maxsec, seconds);
- if (origSeconds <= minsec) {
- if (origSeconds < minsec || origFrames <= minFrames) {
- minFrames = origFrames;
- }
- minsec = origSeconds;
- }
- if (origSeconds >= maxsec) {
- if (origSeconds > maxsec || origFrames >= maxFrames) {
- maxFrames = origFrames;
- }
- maxsec = origSeconds;
- }
- //alert(origSeconds+' seconds; '+frames+' frames; '+minsec+' minsec; '+minFrames+' minFrames');
- count = count + 1;
- }
- //alert(stringToSeconds(myValue) + ' secs, ' + stringToFrames(myValue)+ ' frames @ ' + fps + ' fps == ' + seconds + ' seconds, ' + frames + ' frames\n' +
- // totalTime + ' total seconds, ' + totalFrames + ' total frames\n' +
- // 'formatted (displayFrames=' + displayFrames + '): ' + secondsToString(totalTime, totalFrames, displayFrames) +
- // '\nmin:'+minsec+':'+minFrames);
- prevTotalTime = totalTime;
- prevTotalFrames = totalFrames;
- }
- if (count > 0) {
- document.timeCalc.timeMin.value = document.timeCalc.timeMin2.value = secondsToString(minsec, minFrames, displayFrames)
- document.timeCalc.timeMax.value = document.timeCalc.timeMax2.value = secondsToString(maxsec, maxFrames, displayFrames)
- document.timeCalc.timeAvg.value = document.timeCalc.timeAvg2.value = secondsToString(totalTime/count, totalFrames/count, displayFrames)
- } else {
- document.timeCalc.timeMin.value = document.timeCalc.timeMin2.value = ""
- document.timeCalc.timeMax.value = document.timeCalc.timeMax2.value = ""
- document.timeCalc.timeAvg.value = document.timeCalc.timeAvg2.value = ""
- }
- document.timeCalc.timeTotal.value = document.timeCalc.timeTotal2.value = secondsToString(totalTime, totalFrames, displayFrames)
- //setTimeFromSec(totalTime, 0)
- //alert('total frames: ' + totalFrames);
- }
- function checkKeyPress(nextFieldName, evt) {
- var charCode = (navigator.appName == "Netscape") ? evt.which : evt.keyCode
- if (charCode == 13) { // 13 = enter/return
- eval("document.timeCalc." + nextFieldName + ".focus()") //Go to next field
- }
- else if (charCode == 67) { // 67 = Shift-C
- clearFields()
- return false;
- }
- return true
- }
- function secToMins(sec) {
- return sec/60.0
- }
- function secToHours(sec) {
- return sec/3600.0
- }
- function minsToSec(mn) {
- return mn*60.0
- }
- function hoursToSec(hr) {
- return hr*3600.0
- }
- function changeFT(radioObj) { // change FractionType (Decimal)
- if (radioObj.checked) {
- document.timeCalc.fps.value = '';
- fps = 100;
- }
- addTimes();
- }
- function changeFps(textObj) {
- if (isNaN(textObj.value)) {
- alert("Frames per second must be a number");
- textObj.value = '';
- //document.timeCalc.fractionType.checked = true;
- document.timeCalc.fps.focus();
- } else {
- //document.timeCalc.fractionType.checked = false;
- fps = textObj.value;
- }
- addTimes();
- }
- function writeLayer(layerID,txt){
- if(document.getElementById){
- document.getElementById(layerID).innerHTML=txt;
- }else if(document.all){
- document.all[layerID].innerHTML=txt;
- }else if(document.layers){
- with(document.layers[layerID].document){
- open();
- write(txt);
- close();
- }
- }
- }
- // var myDate = new Date(2000, 0, 0)
- // myDate.setSeconds
- // alert(myDate.toString())
- var fps = 100; // decimal by default
- var baseUrl
- function initPage() {
- // Parse url parameters
- var param, num, val;
- var queryIndex = window.location.href.indexOf('?');
- var params = window.location.href.substring(queryIndex+1).split('&');
- if (queryIndex < 0) baseUrl = window.location.href // no '?' found in url
- else baseUrl = window.location.href.substring(0,queryIndex)
- if (typeof mode == "undefined") var mode ='add'; // default
- for (i=0; i<params.length; i++) {
- param = params[i].split('=');
- if (param[0].substr(0,1) == 't') {
- // if t1 - t40, then restore it's time value
- num = param[0].substring(1);
- if (num != '' && !isNaN(num)) {
- eval('document.timeCalc.time'+num+'.value="'+param[1]+'"');
- }
- } else if (param[0].substr(0,1) == 'c') {
- // Restore comments
- num = param[0].substring(1);
- if (num != '' && !isNaN(num)) {
- eval('document.timeCalc.comments'+num+'.value="'+decodeURI(param[1])+'"');
- }
- } else if (param[0].substr(0,3) == 'f4t') {
- // Four-value time format
- num = param[0].substring(3);
- if (num != '' && !isNaN(num)) {
- eval('document.timeCalc.time4Format['+num+'].checked=1');
- }
- } else if (param[0].substr(0,3) == 'f3t') {
- // Three-value time format
- num = param[0].substring(3);
- if (num != '' && !isNaN(num)) {
- eval('document.timeCalc.time3Format['+num+'].checked=1');
- }
- } else if (param[0].substr(0,2) == 'ft') {
- // Two-value time format
- num = param[0].substring(2);
- if (num != '' && !isNaN(num)) {
- eval('document.timeCalc.timeFormat['+num+'].checked=1');
- }
- } else if (param[0].substr(0,2) == 'fs') {
- // One-value time format
- num = param[0].substring(2);
- if (num != '' && !isNaN(num)) {
- eval('document.timeCalc.singleFormat['+num+'].checked=1');
- }
- } else if (param[0] == 'd') {
- // Time delimiter
- eval('document.timeCalc.timeSeparator.value ="'+decodeURI(param[1])+'"');
- } else if (param[0].substr(0,1) == 'o') {
- // output format
- num = param[0].substring(1);
- if (num != '' && !isNaN(num)) {
- eval('document.timeCalc.outputFormat['+num+'].checked=1');
- }
- } else if (param[0] == 'fps') {
- // frames/second
- num = param[1]; // fps
- if (num != '' && !isNaN(num)) {
- //if (num == 100) document.timeCalc.fractionType.checked = 1
- //else {
- //document.timeCalc.fractionType.checked = 0;
- document.timeCalc.fps.value = num;
- fps = num;
- //}
- }
- } else if (param[0] == 'mode') {
- // PlusMinusMode
- num = param[1]; // mode index
- if (num == 0) {
- mode = 'add';
- document.timeCalc.plusMinusMode[0].checked = true;
- document.timeCalc.plusMinusMode[1].checked = false;
- } else if (num == 1) {
- mode = 'sub';
- document.timeCalc.plusMinusMode[0].checked = false;
- document.timeCalc.plusMinusMode[1].checked = true;
- }
- }
- }
- window.focus();
- addTimes();
- document.timeCalc.time1.focus();
- return true;
- }
- // -->
- </script>
- <style>
- td {font-family:Arial; font-size:10pt}
- </style><style></style></head>
- <body bgcolor="#eeeef0" onload="return initPage();">
- <center>
- <form name="timeCalc">
- <table border="0" cellspacing="0" cellpadding="0">
- <tbody><tr>
- <td align="center">
- <div class="printOnly">"<font size="5" color="navy"><b>Time Calculator</b></font></div>
- <div class="noprint" style="width:350px; float:left; margin-left:">
- <table cellspacing="0" border="0" cellpadding="5">
- <tbody><tr><td align="center" colspan="10" nowrap="">
- <font size="5" color="navy"><b>Time Calculator</b></font><br>
- <div style="font-size:11px; margin-bottom:10px;">
- <!--<a href="timeCalc.html" target=_blank title="A original Time Calculator, opens in a new window">time</a> | --><strong>time</strong>
- (<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>) |
- <a href="http://www.grun1.com/utils/timeCalc2.html" target="_blank" title="A compact Time Calculator, opens in a new window">time_2</a> |
- <a href="http://www.grun1.com/utils/timeDiff.cfm" target="_blank" title="A Time Difference Calculator, opens in a new window">time diff</a> |
- <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> |
- <a href="http://www.grun1.com/familyTree/dateCalc.cfm" target="_blank" title="A Date Calculator, opens in a new window">date</a> |
- <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>
- <a href="http://www.grun1.com/utils/intervalCalc.html" target="_blank" title="A Splits Calculator, opens in a new window">interval</a> |
- <a href="http://www.grun1.com/utils/splitsCalc.html" target="_blank" title="A Splits Calculator, opens in a new window">splits</a> |
- <a href="http://www.grun1.com/utils/paceCalc.html" target="_blank" title="A Pace Calculator, opens in a new window">pace</a>
- </div>
- <div style="text-align:left; color:#CC0000;">
- Updates:<br>
- - added mode option to add or subtract times
- </div>
- </td>
- </tr>
- <tr><td align="center">
- <input type="button" value="clear fields" onclick="clearFields()" style="font-size:12px; text-align:center;">
- <input type="button" value="save data as url" title="Save this data as a url" onclick="saveData()" style="font-size:12px; text-align:center;">
- <br>Mode:
- <input type="radio" name="plusMinusMode" id="plusMode" value="0" checked="" onclick="changeMode()"><label for="plusMode">add values</label>,
- <input type="radio" name="plusMinusMode" id="minusMode" value="1" onclick="changeMode()"><label for="minusMode">subtract values</label>
- <br>
- </td></tr>
- <tr>
- <td align="center" colspan="10" bgcolor="#ddddee" class="threeD" nowrap="">
- <font size="4" color="navy"><b>Input format</b></font><br>
- <font size="-1">
- To add times,<br>enter times in the left column
- in the format:<br>
- <br>
- <i>when you enter five values:</i><br>
- <b>days:hr:min:sec:frames</b>, <i>or</i><br><br>
- <i>when you enter four values:</i><br>
- <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>,
- <input type="radio" name="time4Format" id="tfhmsf" value="h:m:s:f" onclick="addTimes()"><label for="tfhmsf"><b>hr:min:sec:frames</b></label>,
- <i>or</i><br><br>
- <i>when you enter three values:</i><br>
- <input type="radio" name="time3Format" id="tfdhm" value="d:h:m" onclick="addTimes()"><label for="tfdhm"><b>days:hr:min</b></label>,
- <input type="radio" name="time3Format" id="tfhms" value="h:m:s" onclick="addTimes()" checked=""><label for="tfhms"><b>hr:min:sec</b></label>,
- <input type="radio" name="time3Format" id="tfmsf" value="m:s:f" onclick="addTimes()"><label for="tfmsf"><b>min:sec:frames</b></label>,
- <i>or</i><br><br>
- <i>when you enter two values:</i><br>
- <input type="radio" name="timeFormat" id="tfdh" value="d:h" onclick="addTimes()"><label for="tfdh"><b>days:hr</b></label>,
- <input type="radio" name="timeFormat" id="tfhm" value="h:m" onclick="addTimes()"><label for="tfhm"><b>hr:min</b></label>,
- <input type="radio" name="timeFormat" id="tfms" value="m:s" onclick="addTimes()" checked=""><label for="tfms"><b>min:sec</b></label>,
- <input type="radio" name="timeFormat" id="tfsf" value="s:f" onclick="addTimes()"><label for="tfsf"><b>sec:frames</b></label>,
- <i>or</i><br><br>
- <i>when you enter one value:</i><br>
- <input type="radio" name="singleFormat" id="days" value="d" onclick="addTimes()"><label for="days"><b>days</b></label>,
- <input type="radio" name="singleFormat" id="hr" value="h" onclick="addTimes()"><label for="hr"><b>hr</b></label>,
- <input type="radio" name="singleFormat" id="min" value="m" onclick="addTimes()"><label for="min"><b>min</b></label>,
- <input type="radio" name="singleFormat" id="sec" value="s" onclick="addTimes()" checked=""><label for="sec"><b>sec</b></label>,
- <input type="radio" name="singleFormat" id="frames" value="f" onclick="addTimes()"><label for="frames"><b>frames</b></label><br><br>
- Hr/Min/Sec/Frame separator:
- <input type="text" name="timeSeparator" value=":" size="1" onchange="addTimes()" style="text-align: center;"><br>
- For fractions of a second, use a decimal point,<br>
- For frames, use <input type="text" name="fps" value="" size="3" onchange="changeFps(this)"> frames per second<br><br>
- This web page does not require the internet.<br>
- You can save this web page to your computer<br>
- and run it anytime in your browser<br>
- (but check back for updates)
- </font>
- </td></tr>
- </tbody></table><br>
- <table cellspacing="0" border="0" cellpadding="5">
- <tbody><tr>
- <td align="left" colspan="10" bgcolor="#ddddee" class="threeD" nowrap="">
- <div style="text-align:center;"><font size="4" color="navy"><b>Output format</b></font></div>
- <font size="-1"><br>
- <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>
- <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>
- <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>
- <input type="radio" name="outputFormat" id="outputdhm" value="d:h:m" onclick="addTimes()"><label for="outputdhm"><b>day:hr:min</b></label>,<br>
- <input type="radio" name="outputFormat" id="outputhms" value="h:m:s" onclick="addTimes()"><label for="outputhms"><b>hr:min:sec</b></label>,<br>
- <input type="radio" name="outputFormat" id="outputmsf" value="m:s:f" onclick="addTimes()"><label for="outputmsf"><b>min:sec:frames</b></label>,<br><br>
- <input type="radio" name="outputFormat" id="outdh" value="d:h" onclick="addTimes()"><label for="outdh"><b>days:hr</b></label>, <br>
- <input type="radio" name="outputFormat" id="outhm" value="h:m" onclick="addTimes()"><label for="outhm"><b>hr:min</b></label>, <br>
- <input type="radio" name="outputFormat" id="outms" value="m:s" onclick="addTimes()"><label for="outms"><b>min:sec</b></label>, <br>
- <input type="radio" name="outputFormat" id="outsf" value="s:f" onclick="addTimes()"><label for="outsf"><b>sec:frames</b></label>,
- <br><br>
- <input type="radio" name="outputFormat" id="outd" value="d" onclick="addTimes()"><label for="outd"><b>days</b></label>,<br>
- <input type="radio" name="outputFormat" id="outh" value="h" onclick="addTimes()"><label for="outh"><b>hr</b></label>,<br>
- <input type="radio" name="outputFormat" id="outm" value="m" onclick="addTimes()"><label for="outm"><b>min</b></label>,<br>
- <input type="radio" name="outputFormat" id="outs" value="s" onclick="addTimes()"><label for="outs"><b>sec</b></label>,<br>
- <input type="radio" name="outputFormat" id="outf" value="f" onclick="addTimes()"><label for="outf"><b>frames</b></label>
- <br><br>
- </font>
- </td></tr>
- </tbody></table><br>
- <input type="button" value="clear fields" onclick="clearFields()" style="font-size:12px; text-align:center;">
- <input type="button" value="save data as url" title="Save this data as a url" onclick="saveData()" style="font-size:12px; text-align:center;">
- <br> <br>
- <font size="-1" color="#9C3119" face="verdana, arial, helvetica">
- You DO NOT need to fill in all rows</font><br>
- <font size="-1" face="verdana, arial, helvetica">
- Send comments to: <a href="mailto:[email protected]?subject=timeCalculator">Grun</a>
- </font><p>
- </p></div>
- <!--- column 3 --->
- <div style="width:410px; float:left;">
- <table border="4">
- <tbody><tr bgcolor="#bbbbcc">
- <td align="center" colspan="3"><b>Time Calculator</b></td>
- </tr>
- <tr bgcolor="#bbbbcc">
- <!-- TIME STATISTICS -->
- <td align="right">
- <font size="2">min: </font><input type="text" name="timeMin" size="10"><br>
- <font size="2">max: </font><input type="text" name="timeMax" size="10"><br>
- <font size="2">avg: </font><input type="text" name="timeAvg" size="10"><br>
- </td>
- <!-- TIME TOTAL -->
- <td align="center" valign="top" nowrap="">
- <font size="2"><b>total time:</b></font><br>
- <input type="text" name="timeTotal" size="10" style="background-color:#EEE;"><br>
- <div id="totalFormatDisplay"> d:h:m:s </div>
- </td>
- <td> </td>
- </tr>
- <tr bgcolor="#ccccdd">
- <!-- TIME -->
- <td align="center" valign="top">
- <!--- <p> <br> hr : min : sec --->
- <b>enter times:</b> <br>
- <div id="inputFormatDisplay"> d:h:m:s:f <br> d:h:m:s <br> h:m:s <br> m:s <br> s </div>
- </td>
- <!-- CUMULATIVE TIME -->
- <td align="center" valign="top"><b>cumulative<br>times:</b><br><br>
- <div id="outputFormatDisplay"> d:h:m:s </div>
- </td>
- <!-- COMMENTS -->
- <td align="center" valign="top"><b>comments</b></td>
- </tr>
- <tr bgcolor="#ccccdd">
- <!-- TIME -->
- <td align="center">
- <!-- <input type=text name=time1 onfocus="select()" size=7 onChange="addTimes()"><br> -->
- <table border="0" cellspacing="0" cellpadding="0">
- <tbody><tr>
- <td align="right" class="comment">1. </td>
- <td align="left">
- <input type="text" name="time1" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time2', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">2. </td>
- <td align="left">
- <input type="text" name="time2" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time3', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">3. </td>
- <td align="left">
- <input type="text" name="time3" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time4', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">4. </td>
- <td align="left">
- <input type="text" name="time4" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time5', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">5. </td>
- <td align="left">
- <input type="text" name="time5" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time6', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">6. </td>
- <td align="left">
- <input type="text" name="time6" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time7', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">7. </td>
- <td align="left">
- <input type="text" name="time7" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time8', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">8. </td>
- <td align="left">
- <input type="text" name="time8" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time9', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">9. </td>
- <td align="left">
- <input type="text" name="time9" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time10', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">10. </td>
- <td align="left">
- <input type="text" name="time10" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time11', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">11. </td>
- <td align="left">
- <input type="text" name="time11" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time12', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">12. </td>
- <td align="left">
- <input type="text" name="time12" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time13', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">13. </td>
- <td align="left">
- <input type="text" name="time13" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time14', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">14. </td>
- <td align="left">
- <input type="text" name="time14" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time15', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">15. </td>
- <td align="left">
- <input type="text" name="time15" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time16', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">16. </td>
- <td align="left">
- <input type="text" name="time16" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time17', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">17. </td>
- <td align="left">
- <input type="text" name="time17" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time18', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">18. </td>
- <td align="left">
- <input type="text" name="time18" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time19', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">19. </td>
- <td align="left">
- <input type="text" name="time19" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time20', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">20. </td>
- <td align="left">
- <input type="text" name="time20" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time21', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">21. </td>
- <td align="left">
- <input type="text" name="time21" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time22', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">22. </td>
- <td align="left">
- <input type="text" name="time22" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time23', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">23. </td>
- <td align="left">
- <input type="text" name="time23" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time24', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">24. </td>
- <td align="left">
- <input type="text" name="time24" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time25', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">25. </td>
- <td align="left">
- <input type="text" name="time25" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time26', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">26. </td>
- <td align="left">
- <input type="text" name="time26" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time27', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">27. </td>
- <td align="left">
- <input type="text" name="time27" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time28', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">28. </td>
- <td align="left">
- <input type="text" name="time28" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time29', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">29. </td>
- <td align="left">
- <input type="text" name="time29" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time30', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">30. </td>
- <td align="left">
- <input type="text" name="time30" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time31', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">31. </td>
- <td align="left">
- <input type="text" name="time31" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time32', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">32. </td>
- <td align="left">
- <input type="text" name="time32" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time33', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">33. </td>
- <td align="left">
- <input type="text" name="time33" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time34', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">34. </td>
- <td align="left">
- <input type="text" name="time34" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time35', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">35. </td>
- <td align="left">
- <input type="text" name="time35" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time36', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">36. </td>
- <td align="left">
- <input type="text" name="time36" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time37', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">37. </td>
- <td align="left">
- <input type="text" name="time37" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time38', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">38. </td>
- <td align="left">
- <input type="text" name="time38" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time39', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">39. </td>
- <td align="left">
- <input type="text" name="time39" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time40', event)"></td>
- </tr>
- <tr>
- <td align="right" class="comment">40. </td>
- <td align="left">
- <input type="text" name="time40" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time41', event)"><br>
- </td>
- </tr> <tr>
- <td align="right" class="comment">41. </td>
- <td align="left">
- <input type="text" name="time41" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time42', event)"><br>
- </td>
- </tr>
- <tr>
- <td align="right" class="comment">42. </td>
- <td align="left">
- <input type="text" name="time42" size="10" onchange="addTimes()" onkeypress="checkKeyPress('time1', event)"><br>
- </td>
- </tr>
- </tbody></table>
- </td>
- <!-- CUMULATIVE TIME -->
- <td align="center" valign="top">
- <input type="text" name="cumtime1" size="10" class="cumtime"><br>
- <input type="text" name="cumtime2" size="10" class="cumtime"><br>
- <input type="text" name="cumtime3" size="10" class="cumtime"><br>
- <input type="text" name="cumtime4" size="10" class="cumtime"><br>
- <input type="text" name="cumtime5" size="10" class="cumtime"><br>
- <input type="text" name="cumtime6" size="10" class="cumtime"><br>
- <input type="text" name="cumtime7" size="10" class="cumtime"><br>
- <input type="text" name="cumtime8" size="10" class="cumtime"><br>
- <input type="text" name="cumtime9" size="10" class="cumtime"><br>
- <input type="text" name="cumtime10" size="10" class="cumtime"><br>
- <input type="text" name="cumtime11" size="10" class="cumtime"><br>
- <input type="text" name="cumtime12" size="10" class="cumtime"><br>
- <input type="text" name="cumtime13" size="10" class="cumtime"><br>
- <input type="text" name="cumtime14" size="10" class="cumtime"><br>
- <input type="text" name="cumtime15" size="10" class="cumtime"><br>
- <input type="text" name="cumtime16" size="10" class="cumtime"><br>
- <input type="text" name="cumtime17" size="10" class="cumtime"><br>
- <input type="text" name="cumtime18" size="10" class="cumtime"><br>
- <input type="text" name="cumtime19" size="10" class="cumtime"><br>
- <input type="text" name="cumtime20" size="10" class="cumtime"><br>
- <input type="text" name="cumtime21" size="10" class="cumtime"><br>
- <input type="text" name="cumtime22" size="10" class="cumtime"><br>
- <input type="text" name="cumtime23" size="10" class="cumtime"><br>
- <input type="text" name="cumtime24" size="10" class="cumtime"><br>
- <input type="text" name="cumtime25" size="10" class="cumtime"><br>
- <input type="text" name="cumtime26" size="10" class="cumtime"><br>
- <input type="text" name="cumtime27" size="10" class="cumtime"><br>
- <input type="text" name="cumtime28" size="10" class="cumtime"><br>
- <input type="text" name="cumtime29" size="10" class="cumtime"><br>
- <input type="text" name="cumtime30" size="10" class="cumtime"><br>
- <input type="text" name="cumtime31" size="10" class="cumtime"><br>
- <input type="text" name="cumtime32" size="10" class="cumtime"><br>
- <input type="text" name="cumtime33" size="10" class="cumtime"><br>
- <input type="text" name="cumtime34" size="10" class="cumtime"><br>
- <input type="text" name="cumtime35" size="10" class="cumtime"><br>
- <input type="text" name="cumtime36" size="10" class="cumtime"><br>
- <input type="text" name="cumtime37" size="10" class="cumtime"><br>
- <input type="text" name="cumtime38" size="10" class="cumtime"><br>
- <input type="text" name="cumtime39" size="10" class="cumtime"><br>
- <input type="text" name="cumtime40" size="10" class="cumtime"><br>
- <input type="text" name="cumtime41" size="10" class="cumtime"><br>
- <input type="text" name="cumtime42" size="10" class="cumtime"><br>
- </td>
- <!-- COMMENTS -->
- <td align="center" valign="top">
- <input type="text" name="comments1" size="30" class="comments"><br>
- <input type="text" name="comments2" size="30" class="comments"><br>
- <input type="text" name="comments3" size="30" class="comments"><br>
- <input type="text" name="comments4" size="30" class="comments"><br>
- <input type="text" name="comments5" size="30" class="comments"><br>
- <input type="text" name="comments6" size="30" class="comments"><br>
- <input type="text" name="comments7" size="30" class="comments"><br>
- <input type="text" name="comments8" size="30" class="comments"><br>
- <input type="text" name="comments9" size="30" class="comments"><br>
- <input type="text" name="comments10" size="30" class="comments"><br>
- <input type="text" name="comments11" size="30" class="comments"><br>
- <input type="text" name="comments12" size="30" class="comments"><br>
- <input type="text" name="comments13" size="30" class="comments"><br>
- <input type="text" name="comments14" size="30" class="comments"><br>
- <input type="text" name="comments15" size="30" class="comments"><br>
- <input type="text" name="comments16" size="30" class="comments"><br>
- <input type="text" name="comments17" size="30" class="comments"><br>
- <input type="text" name="comments18" size="30" class="comments"><br>
- <input type="text" name="comments19" size="30" class="comments"><br>
- <input type="text" name="comments20" size="30" class="comments"><br>
- <input type="text" name="comments21" size="30" class="comments"><br>
- <input type="text" name="comments22" size="30" class="comments"><br>
- <input type="text" name="comments23" size="30" class="comments"><br>
- <input type="text" name="comments24" size="30" class="comments"><br>
- <input type="text" name="comments25" size="30" class="comments"><br>
- <input type="text" name="comments26" size="30" class="comments"><br>
- <input type="text" name="comments27" size="30" class="comments"><br>
- <input type="text" name="comments28" size="30" class="comments"><br>
- <input type="text" name="comments29" size="30" class="comments"><br>
- <input type="text" name="comments30" size="30" class="comments"><br>
- <input type="text" name="comments31" size="30" class="comments"><br>
- <input type="text" name="comments32" size="30" class="comments"><br>
- <input type="text" name="comments33" size="30" class="comments"><br>
- <input type="text" name="comments34" size="30" class="comments"><br>
- <input type="text" name="comments35" size="30" class="comments"><br>
- <input type="text" name="comments36" size="30" class="comments"><br>
- <input type="text" name="comments37" size="30" class="comments"><br>
- <input type="text" name="comments38" size="30" class="comments"><br>
- <input type="text" name="comments39" size="30" class="comments"><br>
- <input type="text" name="comments40" size="30" class="comments"><br>
- <input type="text" name="comments41" size="30" class="comments"><br>
- <input type="text" name="comments42" size="30" class="comments"><br> </td>
- </tr>
- <tr bgcolor="#bbbbcc">
- <!-- TIME STATISTICS -->
- <td align="right">
- <font size="2">min: </font><input type="text" name="timeMin2" size="10" style="background-color:#EEE;"><br>
- <font size="2">max: </font><input type="text" name="timeMax2" size="10" style="background-color:#EEE;"><br>
- <font size="2">avg: </font><input type="text" name="timeAvg2" size="10" style="background-color:#EEE;"><br>
- </td>
- <!-- TIME TOTAL -->
- <td align="center" valign="top">
- <font size="2"><b>total time:</b></font><br>
- <input type="text" name="timeTotal2" size="10" style="background-color:#EEE;"><br>
- hr : min : sec
- </td>
- </tr>
- </tbody></table><br>
- <input type="button" value="clear fields" onclick="clearFields()" class="noprint" style="font-size:12px; text-align:center;">
- <input type="button" value="save data" title="Save this data as a url" onclick="saveData()" style="font-size:12px; text-align:center;">
- <br>
- <font face="Comic Sans MS" color="slateblue" class="noprint">Have a nice day!</font>
- </div>
- </td>
- </tr>
- </tbody></table>
- <input type="hidden" name="sec1" value="0">
- <input type="hidden" name="sec2" value="0">
- <input type="hidden" name="sec3" value="0">
- <input type="hidden" name="sec4" value="0">
- <input type="hidden" name="sec5" value="0">
- <input type="hidden" name="sec6" value="0">
- <input type="hidden" name="sec7" value="0">
- <input type="hidden" name="sec8" value="0">
- <input type="hidden" name="sec9" value="0">
- <input type="hidden" name="sec10" value="0">
- <input type="hidden" name="sec11" value="0">
- <input type="hidden" name="sec12" value="0">
- <input type="hidden" name="sec13" value="0">
- <input type="hidden" name="sec14" value="0">
- <input type="hidden" name="sec15" value="0">
- <input type="hidden" name="sec16" value="0">
- <input type="hidden" name="sec17" value="0">
- <input type="hidden" name="sec18" value="0">
- <input type="hidden" name="sec19" value="0">
- <input type="hidden" name="sec20" value="0">
- <input type="hidden" name="sec21" value="0">
- <input type="hidden" name="sec22" value="0">
- <input type="hidden" name="sec23" value="0">
- <input type="hidden" name="sec24" value="0">
- <input type="hidden" name="sec25" value="0">
- <input type="hidden" name="sec26" value="0">
- <input type="hidden" name="sec27" value="0">
- <input type="hidden" name="sec28" value="0">
- <input type="hidden" name="sec29" value="0">
- <input type="hidden" name="sec30" value="0">
- <input type="hidden" name="sec31" value="0">
- <input type="hidden" name="sec32" value="0">
- <input type="hidden" name="sec33" value="0">
- <input type="hidden" name="sec34" value="0">
- <input type="hidden" name="sec35" value="0">
- <input type="hidden" name="sec36" value="0">
- <input type="hidden" name="sec37" value="0">
- <input type="hidden" name="sec38" value="0">
- <input type="hidden" name="sec39" value="0">
- <input type="hidden" name="sec40" value="0">
- <input type="hidden" name="sec41" value="0"> <input type="hidden" name="sec42" value="0"> </form>
- </center>
- </body><autoscroll></autoscroll></html>
Advertisement
Add Comment
Please, Sign In to add comment