<%
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 "56 kbps"
ModemSpeed = 7000
Case "33.6 kbps"
ModemSpeed = 4200
Case "28.8 kbps"
ModemSpeed = 3600
End Select
TimeInSeconds = int (intFileSize/ModemSpeed)
'To be accurate, 1Year =365.25Days.
If (Int (TimeInSeconds/31471200) <> 0) Then intYears = Int (TimeInSeconds/31449600)
If (Int (TimeInSeconds/604800) Mod 52) <> 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> = 60 Then intMinutes = Int (TimeInSeconds/60) Mod 60
If TimeInSeconds> = 0 Then intSeconds = Int (TimeInSeconds) Mod 60
If intYears <> 0 Then
StrDownloadTime = strDownloadTime & intYears &"Year"& 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 &"Minute"& AppendString
End If
If (intYears = 0) And (intWeeks = 0) And (intDays = 0) And (intHours = 0) Then
If intMinutes> 0 Then
StrDownloadTime = strDownloadTime & "," & intSeconds &"Seconds"& AppendString
Else
StrDownloadTime = strDownloadTime & intSeconds &"Seconds"& AppendString
End If
End If
DownloadTime = strDownloadTime
End Function
%>
<Html>
<Body>
Tips for snow spray on the cloud:You have spent a lot of time Downloading this file.<% = DownloadTime (123456, Cable) %>.
</Body>
[1]