<SCRIPT type = "text/JavaScript" Language = "JavaScript">
Function diffdate () {var syearitem = document. getelementbyid ("drop_syear "). selectedindex. tostring (); var smonthitem = document. getelementbyid ("drop_smonth "). selectedindex. tostring (); var sdayitem = document. getelementbyid ("drop_sday "). selectedindex. tostring (); var shouritem = document. getelementbyid ("drop_shour "). selectedindex. tostring (); var eyearitem = document. getelementbyid ("drop_eyear "). selectedindex. tostring (); var emonthitem = document. getelementbyid ("drop_emonth "). selectedindex. tostring (); var edayitem = document. getelementbyid ("drop_eday "). selectedindex. tostring (); var ehouritem = document. getelementbyid ("drop_ehour "). selectedindex. tostring (); var startdate = new date (syearitem, smonthitem, sdayitem, shouritem, "0", "00"); var enddate = new date (eyearitem, emonthitem, edayitem, ehouritem, "0", "00"); var diff = (enddate. valueof ()-startdate. valueof ()/(1000*3600*24); var days = math. ceil (parseint (diff) + 1; document. getelementbyid ("tb_costdays "). value = days ;}
</SCRIPT>
<Tr>
<TD class = "style5"> estimated business trip <br/>
Time </TD>
<TD colspan = "4" class = "style2">
<Asp: dropdownlist
Id = "drop_syear" runat = "server" Height = "16px" width = "62px"
Autopostback = "true">
</ASP: dropdownlist>
<Asp: dropdownlist id = "drop_smonth" runat = "server" Height = "16px" width = "62px"
Autopostback = "true" onselectedindexchanged = "drop_smonth_selectedindexchanged">
</ASP: dropdownlist>
Month <asp: dropdownlist id = "drop_sday" runat = "server" Height = "16px" width = "62px">
</ASP: dropdownlist>
<Asp: dropdownlist id = "drop_shour" runat = "server" Height = "16px" width = "62px">
</ASP: dropdownlist>
Hour <br/>
To <asp: dropdownlist
Id = "drop_eyear" runat = "server" Height = "16px" width = "62px">
</ASP: dropdownlist>
<Asp: dropdownlist id = "drop_emonth" runat = "server" Height = "16px" width = "62px"
Autopostback = "true" onselectedindexchanged = "drop_emonth_selectedindexchanged">
</ASP: dropdownlist>
Month <asp: dropdownlist id = "drop_eday" runat = "server" Height = "16px" width = "62px">
</ASP: dropdownlist>
<Asp: dropdownlist id = "drop_ehour" runat = "server" Height = "16px" width = "62px">
</ASP: dropdownlist>
Hour </TD>
<TD class = "style2"> total <asp: textbox id = "tb_costdays" runat = "server" width = "62px"
Onfocus = "Return diffdate ();"/>
Day </TD>
</Tr>