--- rat/client/parameter.html 2000/06/28 03:41:48 1.1
+++ rat/client/parameter.html 2001/03/21 15:42:15 1.7
@@ -2,7 +2,8 @@
LON-CAPA
@@ -14,14 +15,26 @@ var ptype='';
var pvalue='';
var preturn='';
var pcode='';
-var poptions='';
+var pscat='';
+var pmarker='';
var pname='';
var svalue;
+var stype;
+var smarker;
-var scat;
var vars=new Array();
+var cdate=new Date();
+
+var csec;
+var cmin;
+var chour;
+var cday;
+
+var months=new Array();
+
+
function selwrite(text) {
this.window.selector.document.write(text);
}
@@ -52,6 +65,220 @@ function valline(text,id1,id2) {
id2+'>');
}
+function datecalc() {
+ var sform=choices.document.forms.sch;
+
+ cdate.setHours(sform.hours.options[sform.hours.selectedIndex].value);
+ cdate.setMinutes(sform.minutes.options[sform.minutes.selectedIndex].value);
+ cdate.setSeconds(sform.minutes.options[sform.seconds.selectedIndex].value);
+ cdate.setDate(sform.date.options[sform.date.selectedIndex].value);
+ cdate.setMonth(sform.month.options[sform.month.selectedIndex].value);
+ cdate.setFullYear(sform.year.options[sform.year.selectedIndex].value);
+
+ draw();
+}
+
+function hour() {
+ var thishour=cdate.getHours();
+ var i; var j;
+ choicewrite('');
+}
+
+function minute() {
+ var thisminutes=cdate.getMinutes();
+ var i;
+ choicewrite('');
+}
+
+function second() {
+ var thisseconds=cdate.getSeconds();
+ var i;
+ choicewrite('');
+}
+
+
+function date() {
+ var thisdate=cdate.getDate();
+ var i;
+ choicewrite('');
+}
+
+function year() {
+ var thisyear=cdate.getFullYear();
+ var i;
+ choicewrite('');
+}
+
+function month() {
+ var thismonth=cdate.getMonth();
+ var i;
+ choicewrite('');
+}
+
+
+function intminute() {
+ var thisminutes=cmins;
+ var i;
+ choicewrite('');
+}
+
+function inthour() {
+ var thishours=chours;
+ var i;
+ choicewrite('');
+}
+
+function intsecond() {
+ var thisseconds=csecs;
+ var i;
+ choicewrite('');
+}
+
+
+function intday() {
+ var thisdate=cdays;
+ var i;
+ choicewrite('');
+}
+
+function intcalc() {
+ var sform=choices.document.forms.sch;
+ svalue=((sform.date.options[sform.date.selectedIndex].value*24+
+ sform.hours.options[sform.hours.selectedIndex].value*1)*60+
+ sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+
+ sform.seconds.options[sform.seconds.selectedIndex].value*1;
+ draw();
+}
+
+function integereval() {
+ svalue=choices.document.forms.sch.intval.value;
+ svalue=Math.round(svalue);
+ if (pscat=='zeropos') { svalue=Math.abs(svalue); }
+ if ((pscat=='pos') && (svalue==0)) {
+ svalue='';
+ }
+ draw();
+}
+
+function floateval() {
+ svalue=choices.document.forms.sch.floatval.value;
+ svalue=1.0*svalue;
+ if (pscat=='pos') { svalue=Math.abs(svalue); }
+ if ((pscat=='zeroone') && ((svalue<0) || (svalue>1))) {
+ svalue='';
+ }
+ draw();
+}
+
+function stringeval() {
+ svalue=choices.document.forms.sch.stringval.value;
+ draw();
+}
+
+function intervaldis() {
+ csecs=svalue;
+ cdays=Math.floor(csecs/86400);
+ csecs-=cdays*86400;
+ chours=Math.floor(csecs/3600);
+ csecs-=chours*3600;
+ cmins=Math.floor(csecs/60);
+ csecs-=cmins*60;
+ choicewrite(cdays+' days '+chours+' hours '
+ +cmins+' mins '+csecs+' secs');
+}
+
+
+
function afterproc() {
choicewrite('Error after rounding: '
+' |
');
@@ -59,25 +286,35 @@ function afterproc() {
function draw() {
choicestart();
- choicewrite('