I would simplify a little, there is no need to worry about display and visibility. If you want to reserve portions of the page and hide and show items use visibility, if you want the area to collapse when not shown use display. I'll show the radio buttons and function to toggle changes using style.display:
Code:
<input type="radio" name="graph_by" value="yearSales" onclick="ToggleTextBoxDisplay(this.value) ">Sales By Year<br>
<input type="radio" name="graph_by" value="monthSales" onclick="ToggleTextBoxDisplay(this.value)">Sales By Month<br>
function ToggleTextBoxDisplay(Period)
{
var divYear = document.getElementById("div1");
var divMonth = document.getElementById("div2");
if (Period == "yearSales")
{
divYear.style.display = "block";
divMonth.style.display = "none";
}
else
{
divYear.style.display = "none";
divMonth.style.display = "block";
}
}
--
Joe