function setFieldValToDocTitle(theFieldID) {
  var theField = document.getElementById(theFieldID)
  var theTitle = document.title;
  theField.value = theTitle;
} 
function hiddenFormSubmit(formID) {
  var actionform = document.getElementById(formID);
  actionform.submit();
}

function addfavourites(theFieldID, theFormID) {
  setFieldValToDocTitle(theFieldID);
  hiddenFormSubmit(theFormID); 
}
