i'm having trouble figuring out this error:
document.getElementById("tsearch") has no properties

here is the javascript:

<script language="javascript" type="text/javascript">
var pqs = new ParseQueryString();
if (pqs.param("search") == "all")
{
document.getElementById("tsearch").checked = true;
}
else
{
document.getElementById("tsearch").checked = false;
}
</script>

the html form element is <input type="radio" name="tsearch" id="tsearch"
value="all" />

ParseQueryString is stored in an exrternal file. I know it works because when
I change the action in the if statement to alert, it works fine. i cant seem to
set the checked value of the radio button.

any ideas?