'); function MakeItem(co,h1,h2,fa) { this.code=co; this.head1=h1; this.head2=h2; this.factor=parseFloat(fa); return this; } function ConvertForm(form){ var userin=0.0; for (var i=0; i < obj.items.Ilength; i++) { if (form.elements[i].value != "") { if (i == 0 && form.elements[1].value != "") return false; userin=parseFloat(form.elements[i].value) / obj.items[i].factor; form.elements[i].blur(); break; } } if (userin == 0.0) { ClearForm(form); return false; } for (var i=0; i < obj.items.Ilength; i++) form.elements[i].value = FormatMoney(userin * obj.items[i].factor,14); return true; } var WGdc="."; var WGgc=","; var WGnc="("; function FormatMoney(A,W) { var N=Math.abs(Math.round(A*100)); var S=((N<10)?"00":((N<100)?"0":""))+N; S=((A<0)?WGnc:"")+Group(S.substring(0,(S.length-2)))+WGdc+ S.substring((S.length-2),S.length)+((A<0&&WGnc=="(")?")":""); return (S.length>W)?"over":S; } function Group(S) { return (S.length<4)?S:(Group(S.substring(0,S.length-3))+ WGgc+S.substring(S.length-3,S.length)); } function ClearForm(form) { for (var i=0; i < obj.items.Ilength; i++) form.elements[i].value = ""; return true; } function MakeCccObj() { this.items=new MakeCccItems(); return this; } //-->