<script type="text/javascript" charset="utf-8">
    Event.observe(window, 'load', function() {
      if ($('<%= focus %>') && $('<%= focus %>').visible()) {
        $('<%= focus %>').focus();
        $('<%= focus %>').select();
      }
    });
</script>

<script type="text/javascript" charset="utf-8">
<!--
    Event.observe(window, 'load', function() {
      if ($('<%= focus %>') && $('<%= focus %>').visible()) {
        $('<%= focus %>').activate();
      }
    });
// -->
</script>

Make focus JS XHTML valid
Make focus JS XHTML valid
