WDVL: Try It Out: Using the Select Element for Date Difference ...
Our web spider found the following code snippet at www_wdvl_com and contains information about abs and JavaScript.
abs((((daysDiff  / 1000) / 60) / 60) / 24));
 myForm.txtDays.value = daysDiff;
  return true;
function window_onload()
  var theForm = document.form1;
  var nowDate = new Date();
  theForm.firstDay.options[nowDate.getDate() - 1].selected = true;
  theForm.secondDay.options[nowDate.getDate() - 1].selected = true;
  theForm.firstMonth.options[nowDate.getMonth()].selected = true;
  theForm.secondMonth.options[nowDate.getMonth()].selected = true;
  theForm.firstYear.options[nowDate.getFullYear()-
1970].selected = true;
  theForm.secondYear.options[nowDate.getFullYear() -
1970].selected = true;
</SCRIPT>
</HEAD>
<BODY LANGUAGE=JavaScript onload="return window_onload()">
<FORM NAME=form1>
<P>
Read the entire article....