function jsDeleteAuthor( formID, authID ) {
  if (confirm('Are you sure you want to delete this author?')) {
  var tgt=formID;
  tgt.Action.value='CollectAuthors';
  tgt.SubAction.value='DeleteAuthor';
  tgt.AuthorID.value=authID;
  //tgt.submit();
  return true;
  } else {
    return false;
  }
}

function jsMoveAuthorUp( formID, authID ) {
  var tgt=formID;
  tgt.Action.value='CollectAuthors';
  tgt.SubAction.value='MoveAuthorUp';
  tgt.AuthorID.value=authID;
  //tgt.submit();
  return true;
}

function jsMoveAuthorDown( formID, authID ) {
  var tgt=formID;
  tgt.Action.value='CollectAuthors';
  tgt.SubAction.value='MoveAuthorDown';
  tgt.AuthorID.value=authID;
  //tgt.submit();
  return true;
}

function jsEditAuthor( formID, authID ) {
  var tgt=formID;
  tgt.Action.value='CollectAuthors';
  tgt.SubAction.value='EditAuthor';
  tgt.AuthorID.value=authID;
  //tgt.submit();
  return true;
}

function checkFieldLen(fId, tgt) {
  if (tgt.value.length<1) {
    document.getElementById(fId).style.color='red';
  } else {
    document.getElementById(fId).style.color='black';
  }
}
function checkTopic( el ) {
  if (el.options[el.selectedIndex].value=='0' && el.selectedIndex!=0) {
    alert('Topic \'' + el.options[el.selectedIndex].text + '\' has sub-topics; you cannot select this topic.');
    el.selectedIndex=0;
    return false;
  }
  return true;
}

function checkFileName( el ) {
  if (!((el.value.slice(el.value.length - 3) == '.ps') || (el.value.slice(el.value.length - 3) == '.PS') || (el.value.slice(el.value.length - 4) == '.pdf') || (el.value.slice(el.value.length - 4) == '.PDF') || (el.value.slice(el.value.length - 4) == '.zip') || (el.value.slice(el.value.length - 4) == '.ZIP') || (el.value.slice(el.value.length - 3) == '.gz') || (el.value.slice(el.value.length - 3) == '.GZ')  )) {alert('Please submit a PostScript or PDF file or a PKWare PKZIP compatible compressed PostScript or PDF file as specified in the paper kit.  Your filename may end with \'.ps\', \'.pdf\', \'.zip\', or \'.gz\'.'); return true;}
  else {return false;};
}

