function getParentFormElement(elem) {
  form_obj = elem;
  while (form_obj.tagName!='FORM') {
    form_obj = form_obj.parentNode;
    if (!form_obj) {
      alert('Form not found! Please put the list control in a form!'); return 0;
    }
  }
  return form_obj;
}

function ADivButton(d){
  var col = d.getElementsByTagName('A');
  if(col.length>0){
    col[0].click();
  }
}