comparison buycode.js @ 4:c96cb4e773e5 laserkard

[svn r5] fully functional website.
author rlm
date Fri, 01 Jan 2010 01:19:49 -0500
parents 599d0315537d
children ae22c2d59891
comparison
equal deleted inserted replaced
3:8261184f606b 4:c96cb4e773e5
1
2
3 function clearDefault(el) {
4 if (el.defaultValue==el.value) el.value = ""
5 }
6
7
1 function Dollar (val) { // force to valid dollar amount 8 function Dollar (val) { // force to valid dollar amount
2 var str,pos,rnd=0; 9 var str,pos,rnd=0;
3 if (val < .995) rnd = 1; // for old Netscape browsers 10 if (val < .995) rnd = 1; // for old Netscape browsers
4 str = escape (val*1.0 + 0.005001 + rnd); // float, round, escape 11 str = escape (val*1.0 + 0.005001 + rnd); // float, round, escape
5 pos = str.indexOf ("."); 12 pos = str.indexOf (".");