I'm confused... you talk about setting the focus on a textbook, but your code shows a hidden DIV with the id of 'surv'. Which is it?
If it's the latter of the two, try this:
<script type="text/javascript">
function toggle_visibility(id) {
var obj = document.getElementById(id);
if(obj)
obj.style.display = (obj.style.display == "none" ? "block" : "none");
}
</script>
else it's simply:
<script type="text/javascript">
function toggle_visibility(id) {
var obj = document.getElementById(id);
if(obj)
obj.focus();
}
</script>