<form action=""
www.addlinkat.com="" java="" free-java-download="" name="Keypad">
<table>
<strong>
<tbody>
<tr>
<td align="center">
<div align="center"><center>
<table bordercolor="#c0c0c0" height="60" cellspacing="3" bordercolordark="#000000" cellpadding="0" width="50" bgcolor="#c0c0c0" bordercolorlight="#e8e8e8" border="5">
<tbody>
<tr>
<td bordercolor="#c0c0c0" bordercolorlight="#ffffff" align="center" bordercolordark="#000000" colspan="3">
<div align="right">
<p><input size="24" width="100%" name="ReadOut" value="0" type="text" /></p>
</div>
</td>
<td bordercolor="#c0c0c0" td=""> </td>
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Clear()" name="btnClear" value=" C " /></td>
<td bordercolor="#c0c0c0" align="center">
<div align="center"><center>
<p><input type="button" onclick="ClearEntry()" name="btnClearEntry" value=" CE " /></p>
</center></div>
</td>
</tr>
<tr align="center">
<td bordercolor="#c0c0c0">
<div align="center"><center>
<p><input type="button" onclick="NumPressed(7)" name="btnSeven" value=" 7 " /></p>
</center></div>
</td>
<td bordercolor="#c0c0c0" align="center">
<div align="center"><center>
<p><input type="button" onclick="NumPressed(8)" name="btnEight" value=" 8 " /></p>
</center></div>
</td>
<td bordercolor="#c0c0c0" align="center">
<div align="center"><center>
<p><input type="button" onclick="NumPressed(9)" name="btnNine" value=" 9 " /></p>
</center></div>
</td>
<td bordercolor="#c0c0c0" align="center"> </td>
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Neg()" name="btnNeg" value=" +/- " /></td>
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Percent()" name="btnPercent" value=" % " /></td>
</tr>
<tr align="center">
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(4)" name="btnFour" value=" 4 " /></td>
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(5)" name="btnFive" value=" 5 " /></td>
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(6)" name="btnSix" value=" 6 " /></td>
<td bordercolor="#c0c0c0"> </td>
<td bordercolor="#c0c0c0" align="center">
<div align="center"><center>
<p><input type="button" onclick="Operation('+')" name="btnPlus" value=" + " /></p>
</center></div>
</td>
<td bordercolor="#c0c0c0" align="center">
<div align="center"><center>
<p><input type="button" onclick="Operation('-')" name="btnMinus" value=" - " /></p>
</center></div>
</td>
</tr>
<tr align="center">
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(1)" name="btnOne" value=" 1 " /></td>
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(2)" name="btnTwo" value=" 2 " /></td>
<td bordercolor="#c0c0c0">
<div align="center"><center>
<p><input type="button" onclick="NumPressed(3)" name="btnThree" value=" 3 " /></p>
</center></div>
</td>
<td bordercolor="#c0c0c0" align="center"> </td>
<td bordercolor="#c0c0c0" align="center">
<div align="center"><center>
<p><input type="button" onclick="Operation('*')" name="btnMultiply" value=" * " /></p>
</center></div>
</td>
<td bordercolor="#c0c0c0" align="center">
<div align="center"><center>
<p><input type="button" onclick="Operation('/')" name="btnDivide" value=" / " /></p>
</center></div>
</td>
</tr>
<tr align="center">
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(0)" name="btnZero" value=" 0 " /></td>
<td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Decimal()" name="btnDecimal" value=" . " /></td>
<td bordercolor="#c0c0c0" colspan="3"> </td>
<td bordercolor="#c0c0c0">
<div align="center"><center>
<p><input type="button" onclick="Operation('=')" name="btnEquals" value=" = " /></p>
</center></div>
</td>
</tr>
</tbody>
</table>
</center></div>
</td>
</tr>
</tbody>
</strong>
</table>
</form>
<font face="Verdana, Arial, Helvetica" size="2"><br />
<br />
<script LANGUAGE="JavaScript">
<!-- Begin
var FKeyPad = document.Keypad;
var Accum = 0;
var FlagNewNum = false;
var PendingOp = "";
function NumPressed (Num) {
if (FlagNewNum) {
FKeyPad.ReadOut.value = Num;
FlagNewNum = false;
}
else {
if (FKeyPad.ReadOut.value == "0")
FKeyPad.ReadOut.value = Num;
else
FKeyPad.ReadOut.value += Num;
}
}
function Operation (Op) {
var Readout = FKeyPad.ReadOut.value;
if (FlagNewNum && PendingOp != "=");
else
{
FlagNewNum = true;
if ( '+' == PendingOp )
Accum += parseFloat(Readout);
else if ( '-' == PendingOp )
Accum -= parseFloat(Readout);
else if ( '/' == PendingOp )
Accum /= parseFloat(Readout);
else if ( '*' == PendingOp )
Accum *= parseFloat(Readout);
else
Accum = parseFloat(Readout);
FKeyPad.ReadOut.value = Accum;
PendingOp = Op;
}
}
function Decimal () {
var curReadOut = FKeyPad.ReadOut.value;
if (FlagNewNum) {
curReadOut = "0.";
FlagNewNum = false;
}
else
{
if (curReadOut.indexOf(".") == -1)
curReadOut += ".";
}
FKeyPad.ReadOut.value = curReadOut;
}
function ClearEntry () {
FKeyPad.ReadOut.value = "0";
FlagNewNum = true;
}
function Clear () {
Accum = 0;
PendingOp = "";
ClearEntry();
}
function Neg () {
FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1;
}
function Percent () {
FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accum);
}
// End -->
</script></font>powered by <a href="http://www.sarax-eu.page.tl/">Webmaster Forum</a>