کد زیر تایم دانلود رو نشون میده و در وبلاگ یا سایتهای دانلود به کار میره
دمو
<!-- www.zirebaran.org --><!-- Test = OK --><SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function MakeArray(n) {
this.length = n;
for (var i = 1; i <= n; i++) {
this = 0 }
return this
}
speedVar = new MakeArray(11);
speedVar[1] = "1.1719"
speedVar[2] = "1.7578"
speedVar[3] = "3.5156"
speedVar[4] = "6.8359"
speedVar[5] = "7.8125"
speedVar[6] = "16.6250"
speedVar[7] = "187.9883"
speedVar[8] = "1220.7031"
speedVar[9] = "3295.8984"
speedVar[10] = "5493.1641"
speedVar[11] = "18920.8984"
function compute(form, mult){
for (i=1; i < 12; i++){
if (form.size.value==null||form.size.value.length==0){
form.size.value=0;}
if (form[i+"hour"].value==null||form[i+"hour"].value.length==0){
form[i+"hour"].value=0;}
if (form[i+"minute"].value==null||form[i+"minute"].value.length==0){
form[i+"minute"].value=0;}
if (form[i+"second"].value==null||form[i+"second"].value.length==0){
form[i+"second"].value=0;}
if (mult != 0 && form.size.value != 0){
with (Math){
var speed = speedVar;
var TotalTime = ((form.size.value*mult)/speed);
var TotalHours = floor((TotalTime/3600));
var TotalHoursMod = (TotalTime%3600);
var TotalMin = floor(TotalHoursMod/60);
var TotalMinMod = (TotalHoursMod%60);
var TotalSec = floor(TotalMinMod);
form[i+"hour"].value=TotalHours;
form[i+"minute"].value=TotalMin;
form[i+"second"].value=TotalSec;
}
}
}
return;
}
// End -->
</SCRIPT>
<FORM METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="7second" SIZE="6"><INPUT TYPE="HIDDEN" NAME="7minute" SIZE="6"> <INPUT TYPE="HIDDEN" NAME="7hour" SIZE="6">
<CENTER>
<TABLE BORDER="1" bordercolor="#000080" style="border-width:0; border-collapse: collapse" cellpadding="0" cellspacing="0" width="323" height="164">
<TR>
<TD width="162" height="19" style="border-left: medium none #000080; border-right-style: none; border-right-width: medium; border-top: medium none #000080; border-bottom-style: none; border-bottom-width: medium">
<p align="center" style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
<span style="font-size: 8pt">حجم فايل<b>
<INPUT NAME="size" SIZE="10" style="color: #000080; border: 1px solid #0000FF; background-color: #F4F4FF"></b></span></font></p>
<p align="center" style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
<span style="font-size: 8pt"><b> <INPUT TYPE="button" OnClick="compute(this.form, 1)" VALUE="KB" style="font-family: tahoma; font-size: 10; color: #800000; border: 1px solid #FF0000; background-color: #FFECEC">
<INPUT TYPE="button" OnClick="compute(this.form, 1024)" VALUE="MB" style="color: #800000; font-family: Tahoma; font-size: 10; border: 1px solid #FF0000; background-color: #FFECEC"><span lang="en-us">
</span> </b></span></font></TD>
<TD colspan=3 width="158" height="19" style="border-left-style: none; border-left-width: medium; border-right: medium none #000080; border-top: medium none #000080; border-bottom-style: none; border-bottom-width: medium"><center>
<p><font face="Tahoma" style="font-size: 8pt"><span lang="en-us">Download </span>
مدت زمان مورد نياز براي </font></p>
</CENTER>
</TD>
</TR>
<TR>
<TH width="162" height="14" style="border-left: medium none #000080; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium">
<font face="Tahoma" style="font-size: 8pt; font-weight: 400">بر اساس سرعت </font></TH>
<TH width="53" height="14" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt; font-weight: 400">ساعت </font> </TH>
<TH width="52" height="14" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt; font-weight: 400">دقيقه </font> </TH>
<TH width="51" height="14" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt; font-weight: 400">ثانيه</font></TH>
</TR>
<TR>
<TD BGCOLOR="#ffffff" width="162" height="20" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt">9.6 Kb</font></TD>
<TD width="53" height="20" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="1hour" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="52" height="20" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="1minute" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="51" height="20" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma" style="font-size: 8pt; font-weight: 700">
<INPUT NAME="1second" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2"></font></TD>
</TR>
<TR>
<TD BGCOLOR="#ffffff" width="162" height="21" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt">14.4 Kb</font></TD>
<TD width="53" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="2hour" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="52" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="2minute" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="51" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma" style="font-size: 8pt; font-weight: 700">
<INPUT NAME="2second" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2"></font></TD>
</TR>
<TR>
<TD BGCOLOR="#ffffff" width="162" height="21" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt">28.8 Kb</font></TD>
<TD width="53" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="3hour" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="52" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="3minute" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="51" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma" style="font-size: 8pt; font-weight: 700">
<INPUT NAME="3second" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2"></font></TD>
</TR>
<TR>
<TD BGCOLOR="#ffffff" width="162" height="21" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt">56 Kb</font></TD>
<TD width="53" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="4hour" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="52" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="4minute" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="51" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma" style="font-size: 8pt; font-weight: 700">
<INPUT NAME="4second" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2"></font></TD>
</TR>
<TR>
<TD BGCOLOR="#ffffff" width="162" height="21" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt">ISDN (64 Kb)</font></TD>
<TD width="53" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="5hour" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="52" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="5minute" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="51" height="21" style="border-style: none; border-width: medium">
<p align="center"><font face="Tahoma" style="font-size: 8pt; font-weight: 700">
<INPUT NAME="5second" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2"></font></TD>
</TR>
<TR>
<TD BGCOLOR="#ffffff" width="162" height="19" style="border-style: none; border-width: medium">
<font face="Tahoma" style="font-size: 8pt">ISDN (128 Kb)</font></TD>
<TD width="53" height="19" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom: 1px none #000080">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="6hour" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="52" height="19" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom: 1px none #000080">
<p align="center"><font face="Tahoma"><span style="font-size: 8pt"><b>
<INPUT NAME="6minute" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2">
</b></span></font> </TD>
<TD width="51" height="19" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom: 1px none #000080">
<p align="center"><font face="Tahoma" style="font-size: 8pt; font-weight: 700">
<INPUT NAME="6second" SIZE="6" style="color: #008000; border: 1px solid #00AE00; background-color: #F2FFF2"></font></TD>
</TR>
<b>
<INPUT TYPE="HIDDEN" NAME="8hour" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="8minute" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="8second" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="9hour" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="9minute" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="9second" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="10hour" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="10minute" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="10second" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="11hour" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="11minute" SIZE="6">
<INPUT TYPE="HIDDEN" NAME="11second" SIZE="6">
</b>
</TABLE>
</FORM>
</CENTER>
<!-- Script Size: 4.30 KB -->