I'm trying to display the date of expiration off the calculation of the date_inspection. the date od expiration is 30 days from the date of inspection.

Can anybody see what's wrong with this code:

<html>
<script language="javascript">

function monthsahead()
{
var newdate = document.inspection.Date_Inspection_Month.value + '/1/' + document.inspection.Date_Inspection_Year.value;
var today = new Date(newdate);
var noofmonths = document.inspection.Year_TypeDef_Duration_Months.o ptions[document.inspection.Year_TypeDef_Duration_Months.s electedIndex].value;
var date = new Date(today.getYear(),today.getMonth() + eval(noofmonths),today.getDate(),today.getHours(), today.getMinutes(),today.getSeconds());

document.inspection.exp.value = getDisplayDate(date);
}
function getDisplayDate(passedDate)
{
// uses getDisplayMonth()
// returns passed Date formatted nicely
// Month day, Year mmmm dd, yyyy

theDate = new Date(passedDate);

// split into day, month, year
iDay = theDate.getDate();
iMonth = theDate.getMonth();
iYear = theDate.getFullYear();

sDisplayDate = iMonth + eval(1) + "/" + iYear;

return sDisplayDate;
}
</script>

here's the code inside the connection:

Response.Write "<TR><td align='center'><b>DATE INSPECTED</td><td colspan='1'><b>STATE NUMBER<td align='right'><b>NATIONAL BOARD #</td><td align='center'><b>EXPIRATION DATE</td></tr>"

Response.Write "<tr><td align='center'>" & Date_Inspection & "</td><td align='center'>" & state_no & "</td><td width='20%'>" & Nat_Brd_No & "</td><td align='center'><input type='text' size='10' name='exp'></td></tr>"