
function enable(form){
  var list=document.getElementById("thereasons");
  for (var i=0;i<list.childNodes.length;i++) {
    if (list.childNodes[i].tagName=="LI") {
      var item = list.childNodes[i];
      item.firstChild.disabled=false;
    }
  }
  return true;
}
function addItem() {
  var ullist=document.getElementById('thereasons');
  for (var i=0;i<ullist.childNodes.length;i++) {
    if (ullist.childNodes[i].tagName=="LI")
      var newli=ullist.childNodes[i].cloneNode(true);
  }
  var input = newli.firstChild;
  var reason = document.getElementById('newitem').value;
  input.value = reason;
  input.name = "newreason"+ullist.childNodes.length;
  ullist.appendChild(newli);
}
function removeItem(){
  var list = document.getElementById('thereasons');
  var last = list.lastChild;
  if (last == "[object Text]") {
    list.removeChild(last);
    removeLast();
  }
  list.removeChild(last);
}
function removeLast() {
  removeItem();
}
function showMore(){
  var a=document.getElementById("hidden");
  a.style.display="inline";
}
function showHowLong(src) {
  var yes=document.getElementById('smokeryes');
  var no=document.getElementById('smokerno');
  if (src.id=="yes") {
    yes.style.display="inline";
    no.style.display="none";
  }
  if (src.id=="no") {
    no.style.display="inline";
    yes.style.display="none";
  }
}
function onceDid(src){
  var quit=document.getElementById('ifonce');
  if (src.id=="oncedid")
    quit.style.display="inline";
  if (src.id=="neverdid")
    quit.style.display="none";
}

