var counter=0;
function toggle(form) {
  var c = 0;
  counter = counter+1;

  if (counter % 2 == 1) {
    for (c; c<form.length; ++c)
    {
      if (form[c].type == 'checkbox'){
        form[c].checked = true;
        }
    }
  }  
  else {
    for (c; c<form.length; ++c)
    {
      if (form[c].type == 'checkbox')
        form[c].checked = false;
    }
  }

}

function Description(file,height,width)
 {
  if (height == undefined) {
    height = 400;
  }

  if (width == undefined) {
    width = 500;
  }

  var left = (screen.width) ? (screen.width - (width + 30 )) : width;

  var popup = window.open(file,"popup","width=" + width + ",height=" + height + ",left=" + left + ",top=20,resizable=no,scrollbars=yes");
  popup.focus();

  return false;
 }

// cause the specified menu item to load in a popup
function menupopup(menu) {
  // menu - a reference to the select object
  if (menu.options[menu.selectedIndex].value != "") {
    Description(menu.options[menu.selectedIndex].value)
  }
  menu.selectedIndex = 0
}

