Look at What Current IVEC® Customers Continue to Save Each and Every Day!
*Savings calculation based on HP in service, 8 hour
shifts,
5 days per week, 9¢ per kilowatt hour since 2007.
var digits = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
window.onload = start;
function start()
{
var startDate = new Date(2013, 0, 30, 11, 59);
// number of seconds to start date from 1/1/1970
var preTime = (startDate.getTime() / 1000);
// set start amount
var startAmount = 103791309;
// set increment per second from database session object
var increment = '1.000';
var postTime = Math.floor(Date.now() / 1000);//Date.parse(currentDate) / 1000;
// calculate increased starting amount
// creates the number of elapsed seconds since start
seconds = postTime - preTime;
var start_value = (seconds * increment) + startAmount;
set_value(start_value);
setInterval("flip_digit(0)", 1000);
//setTimeout("setInterval('finish_flips()', 150)",20);
}
function set_digit(d_id, value)
{
var d_img = document.getElementById("digit_" + d_id);
d_img.src = "https://www.ivecsystems.com/OdometerImages/digit" + value + ".gif";
digits[d_id] = value;
}
function flip_digit(d_id)
{
d_img = document.getElementById("digit_" + d_id);
digits[d_id] += 0.5;
d_img.src = "https://www.ivecsystems.com/OdometerImages/digit" + digits[d_id] + ".gif";
setTimeout("finish_flips()", 30);
if (digits[d_id] >= 9.5)
{
flip_digit(d_id + 1);
}
}
function finish_flips()
{
for (i = 0; i < digits.length; i++)
{
if (digits[i] % 1 == 0.5)
{
digits[i] += 0.5;
if (digits[i] >= 10)
digits[i] = 0;
d_img = document.getElementById("digit_" + i);
d_img.src = "https://www.ivecsystems.com/OdometerImages/digit" + digits[i] + ".gif";
}
}
}
function set_value(value)
{
for (i = 0; i < digits.length; i++)
{
set_digit(i, Math.floor(value / Math.pow(10, i)) % 10);
}
}