// Real time phone charge calculator, for www.eircomtribunal.com. By gag /////////////////////////////////////////// // Variables freq = 1; // interval in seconds between updates (no less than 1) fieldwidth = 15; // width of box on page VAT = 1; // optional VAT rate modifier, set to 1 to ignore VAT quote = "Keep this window open. It'll show you
how your money is going down the drain with EIRCOMs 'free' Internet
access.(Peak 5.07¢/min; offpeak
1.26¢/min)"; // Change the text string as you please. Use
to cause line breaks // End of Variables - don't change anything below this unless you know what you're doing :-) /////////////////////////////////////////// offpeak = 0.021; // price per second, off-peak rate. Set to free isp rates @ 1.26c per minute. Don't change this without changing the frequency aswell. peak = 0.0845; // price per second, peak rate. Set to free isp rates @ 5.07c per minute. Don't change this without changing the frequency aswell. time = freq*1000; now = new Date(); hour = now.getHours(); day = now.getDate(); month = now.getMonth() + 1; year = now.getYear() + 1900; var a = Math.floor((14 - month)/12); var y = year - a; var m = month + 12*a - 2; var d = ((day + y + Math.floor(y/4) - Math.floor(y/100) + Math.floor(y/400) + Math.floor((31*m)/12)) % 7); weekday = parseInt(d); myhour = parseInt(hour); if ((weekday != 0) && (weekday != 6) && (myhour <= 18) && (myhour >= 7)) { rate = (peak * freq); } else{ rate = (offpeak * freq); } count = 0; document.write( quote + "
" + "") document.onlineClock.window.value = count; function autoUpdate() { count++; money = ((Math.round(count*rate*VAT*100))/10000); document.onlineClock.window.value = "EUR " + money; setTimeout('autoUpdate()',time) }