javascript search&replace from glossarie