// ceasar.js
// Copyright 2008 (c) by John P. Korb
// All Rights Reserved
//
   // There should be no more than 20 blocks. Initialize their states to hidden.
   var block_id_state = new Array (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
   // This function toggles a block div and changes the link the preceeds the block div.
   function toggle_block (block_id_num, block_header) {
      // block_id should look like: 'block_1', head_id should look like: 'hdr_1'.
      block_id = 'block_'+block_id_num;
      head_id = 'hdr_'+block_id_num;
      // toggle the state
      if (block_id_state[block_id_num] == 0) {
         // Display the block
         block_id_state[block_id_num] = 1;
         document.getElementById(head_id).innerHTML = '[-] Hide: '+block_header;
         document.getElementById(block_id).style.display='block';
      } else {
         // Hide the block
         block_id_state[block_id_num] = 0;
         document.getElementById(head_id).innerHTML = '[+] Show: '+block_header;
         document.getElementById(block_id).style.display='none';
      }
   }
   function toggle_block2 (block_id_num, block_header) {
      // block_id should look like: 'block_1', head_id should look like: 'hdr_1'.
      block_id = 'block_'+block_id_num;
      head_id = 'hdr_'+block_id_num;
      // toggle the state
      if (block_id_state[block_id_num] == 0) {
         // Display the block
         block_id_state[block_id_num] = 1;
         document.getElementById(head_id).innerHTML = '[-] '+block_header;
         document.getElementById(block_id).style.display='block';
      } else {
         // Hide the block
         block_id_state[block_id_num] = 0;
         document.getElementById(head_id).innerHTML = '[+] '+block_header;
         document.getElementById(block_id).style.display='none';
      }
   }
