This type of study is called a "Phase I study". Its purpose is to determine the side effects of the two medicines listed in this study when given together with whole brain radiation, and the highest dose of valproic acid that can be given together with temozolomide and whole brain radiation. We will also study the drug combination's effectiveness in treating cancer. While both of these drugs and whole brain radiation have been used in people for many years, they have never been combined for the purpose of treating patients with cancer.