Minor adjustment to js and php multiplesof code