I need to show and hide a pair of submit buttons depending on the user selection of a radio button. I found a script that nearly fits my requirements on this post http://www.sitepoint.com/forums/showthread.php?608874
Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
  <div id="tabs">
    <div id="nav">
      <p>Show Div 1:<input type="radio" name="tab" value="pkfrom" class="div1" /></p>
      <p>Show Div 2:<input type="radio" name="tab" value="pkfrom" class="div2" /></p>
    <div id="div1" class="tab">
      <p>this is div 1</p>
    <div id="div2" class="tab">
      <p>this is div 2</p>
  <script type="text/javascript" charset="utf-8">
      var tabs =document.getElementById('tabs');
      var nav = tabs.getElementsByTagName('input');
      * Hide all tabs
      function hideTabs(){
        var tab = tabs.getElementsByTagName('div');
        for(var i=0;i<=nav.length;i++){
          if(tab[i].className == 'tab'){
            tab[i].className = tab[i].className + ' hide';
      * Show the clicked tab
      function showTab(tab){
        document.getElementById(tab).className = 'tab'
      hideTabs(); /* hide tabs on load */
      * Add click events
      for(var i=0;i<nav.length;i++){
        nav[i].onclick = function(){
The only thing I need is for the first radio button to be selected on page load. I suspect there is a simple modifaction needs and I would be grateful for some advice. Many thanks.