Hi, this is my first post and Iím not sure what I am asking is possible but I require a script where users can;
enter a value (V1) say 1000
with a starting time (T1) say 3.35pm
and date (D2) say 21/12/12
then a lesser value (V2) say 750
with a finishing time (T2) say 9.05pm
and date (D2) say 25/12/12
Once all of the info is entered V1 is then reduced over time (T1 & D1 minus T2 & D2) by the difference between V1 & V2.
Example: Difference between V1 & V2 is 250.00, Difference between T1;D1 and T2;D2 is 4 days 6 Ĺ hours = 102.5 hours = 6150 minutes = 369000 seconds.
Therefore 1000.00 needs to be reduced by 250.00 to 7500.00 in 369000 seconds.

I would have liked to do it myself however I find Java Script completely foreign to me, I have been staring at it for many hours and have tried different things but only make it worse!

Below is a 2006 script that is in this forum however the person that posted it doesnít appear to be around any longer. I donít know if itís of any help and I donít have the required skills to modify it to suit my needs.

Thanks in Advance.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Currency Countdown</title>
<script type="text/javascript">
<!--//
String.prototype.toNumber = function() {
// convert number-formatted string into a numeric result
var nbr = Number(this);
return ((isNaN(nbr)) ? 0 : nbr);
}
Number.prototype.toCurrency = function() {
// convert number into a currency-formatted string result
var symb = (arguments.length>0) ? arguments[0] : "$,.";
symb = ((typeof(symb)=="string" && symb.length==3) ? symb : "$,.").split("");
var nbr = this.toString().toNumber().toString();
dec = Math.floor((nbr*100+0.5)%100);
nbr = Math.floor((nbr*100+0.5)/100).toString();
if (dec < 10) dec = "0" + dec;
for (var i = 0; i < Math.floor((nbr.length-(1+i))/3); i++) {
nbr = nbr.substring(0,nbr.length-(4*i+3))+symb[1]+nbr.substring(nbr.length-(4*i+3));
}
return (symb[0] + nbr + symb[2] + dec);
}
var USAcurrency = "$,.";
//-->
</script>
<script type="text/javascript">
<!--//
var begDate = new Date("03/30/2006");
var amount = 19000.00;
function CurrencyCountdown() {
var minutes = Math.floor(((new Date()).getTime() - begDate.getTime()) / 1000 / 60);
var amt = amount - (minutes * .01);
document.getElementById("countdown").innerHTML = amt.toCurrency(USAcurrency);
window.setTimeout("CurrencyCountdown()", 10000); // repeat every 10 seconds
return true;
}
window.onload = CurrencyCountdown;
//-->
</script>
</head>

<body>
<div id="countdown"></div>
</body>
</html>