/* 

Two-state radio button-handling JavaScript library, (C) Paul Stephens 1999

Tested with Netscape Navigator 4.01 and Microsoft Internet Explorer 4.72 (SP1)

To use these functions, you have to set up the relevant images and objects
in your page. See PC Plus issue 150, or http://www.bigfoot.com/~pstephens for details.

*/


function radclick (groupname, butnum) {
// point object variable at group object containing curselected property

var groupobj = eval(groupname)

// ignore if re-click on currently-selected button

if (groupobj.curselected != butnum) {

  // unindent previously-selected button, if not zero
  if (groupobj.curselected != 0) {
  radchangepic(groupname+groupobj.curselected, 'off') }

  // indent the newly-selected button
  radchangepic(groupname+butnum, "on"); 
  // set group's currently-selected button property to new button number
  groupobj.curselected = butnum
  } // end of reclick-protect if()
} // end of function


function radchangepic (imgname, status) {
// alert(imgname)
if (document.images) {
  document.images[imgname].src = eval(imgname+status+".src")
  }
}
