changes to correct bug translation in bookmark fwhen javascript replacement

New code in bookmark form is not "DRY" at the moment.