<%
Function downloadtime (intfilesize, Strmodemtype)
Dim timeinseconds, Modemspeed, Strdownloadtime, appendstring
Dim Intyears, Intweeks, intdays
Dim inthours, Intminutes, Intseconds
Intyears = 0
Intweeks = 0
Intdays = 0
inthours = 0
Intminutes = 0
Intseconds = 0
Strdownloadtime = ""
Select Case Strmodemtype
Case "Cable"
Modemspeed = 400000
Case "56kbps"
Modemspeed = 7000
Case "33.6kbps"
Modemspeed = 4200
Case "28.8kbps"
Modemspeed = 3600
End Select
timeinseconds = Int (intfilesize/modemspeed)
'To be exact., 1years =365.25Days.
If (int (timeinseconds/31471200) <> 0) Then intyears = Int (timeinseconds/31449600)
If (Int (timeinseconds/604800) mod <> 0) Then intweeks = Int (timeinseconds/604800) MoD 52
If (Int (timeinseconds/86400) mod 7) <> 0) Then intdays = Int (timeinseconds/86400) MoD 7
If timeinseconds >= 3600 Then inthours = Int (timeinseconds/3600) Mod 24
If timeinseconds >= Then intminutes = Int (TIMEINSECONDS/60) Mod 60
If timeinseconds >= 0 Then intseconds = Int (timeinseconds) Mod 60
If intyears <> 0 Then
Strdownloadtime = strdownloadtime & Intyears & "Years"& AppendString &", "
End If
If intweeks <> 0 Then
Strdownloadtime = strdownloadtime & Intweeks & "Week"& AppendString &", "
End If
If intdays <> 0 Then
Strdownloadtime = strdownloadtime & Intdays & "Day"& AppendString &", "
End If
If inthours <> 0 Then
Strdownloadtime = strdownloadtime & inthours & "Hours"& AppendString &", "
End If
If intminutes <> 0 Then
Strdownloadtime = strdownloadtime & Intminutes & "Part"& AppendString
End If
If ((intyears = 0) and (intweeks = 0) and (intdays = 0) and (inthours = 0)) Then
If intminutes > 0 Then
Strdownloadtime = Strdownloadtime & "," & Intseconds & " sec " & appendstring
Else
Strdownloadtime = strdownloadtime & intseconds & " sec " & appendstring
End If
End If
Downloadtime = Strdownloadtime
End Function
%>
<body>
Shake snow Gush Cloud hint : you download this document to spend altogether <%=downloadtime (123456,cable)%>.
</body>
[1]