// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function toggleLayer(whichLayer)
{
  if (document.getElementById)
  {
    // this is the way the standards work
    var style2 = document.getElementById(whichLayer).style;
    style2.display = style2.display? "":"inline";
  }
  else if (document.all)
  {
    // this is the way old msie versions work
    var style2 = document.all[whichLayer].style;
    style2.display = style2.display? "":"inline";
  }
  else if (document.layers)
  {
    // this is the way nn4 works
    var style2 = document.layers[whichLayer].style;
    style2.display = style2.display? "":"inline";
  }
}


// This script and many more are available free online at
// The JavaScript Source!! http://javascript.internet.com
// John Munn  (jrmunn@home.com)

// The second number in the "onLoad" command in the body
// tag determines the form's focus. Counting starts with '0'
//
// Usage:   <body onLoad="putFocus(0,0);">
//
function putFocus(formInst, elementInst) {
  if (document.forms.length > 0) {
   document.forms[formInst].elements[elementInst].focus();
  }
 }
