In a large saucepan, melt 4 tablespoons butter. Stir in flour, parsley, salt, thyme and pepper until smooth. Gradually add milk; bring to a boil. Cook and stir for 2 minutes.
Combine potatoes, ham and onion; place half in a greased 2-1/2-qt. baking dish. Top with half of the sauce; repeat layers.
Cover and bake at 375° for 65-75 minutes or until potatoes are almost tender. Dot with remaining butter. Bake, uncovered, 15-20 minutes longer or until potatoes are tender.