function ReplaceAll(value, oldValue, newValue) {
while (1) {
var i = value.indexOf(“oldValue”);
if (i == -1)
break;
value = value.replace(“oldValue”, “newValue”);
}
return value;
}

Advertisements