Using comma instead of dot

I’ve got quite a big problem:

In sweden we don’t use dot (.) when writing decimals. We don’t write 12.3, we write 12,3.

Take a look at my function here:

[AS]
fKlass = function (hcp) {
if (_root.sStartavgift) {
_root.sSumma -= _root.sStartavgift;
}
if (hcp<=12.4) {
_root.formData.klass = “A”;
_root.sStartavgift = 600;
} else if (hcp<=18.4) {
_root.formData.klass = “B”;
_root.sStartavgift = 400;
} else if (hcp<=24.4) {
_root.formData.klass = “C”;
_root.sStartavgift = 400;
} else if (hcp<36.0) {
_root.formData.klass = “D”;
_root.sStartavgift = 400;
}
if (hcp == “0” || hcp >= 36.1) {
_root.hcp.text = “FEL!”;
_root.formData.klass = “FEL!”;
_root.formData.hcp = “FEL!”;
_root.sStartavgift = 0;
}
_root.calcSumma();
_root.sKlass = _root.formData.klass;
};
[/AS]

The function checks if formData.klass should be A,B,C or D based on hcp.
But I want the users to be able to write their hcp (golf handicap) with a comma, since they’re used to it.
So, before the function start checking what the value of formData.klass should be, I want it to check the hcp to see if there is a comma there and, if there is one, to replace it with a dot so that the function works correctly…

How should I do?
I’ve searched for “replace letter” “relpace” and so, but didn’t find anything…

Please help… I’m stuck!