/*
This method sets a value on an input and then 
submits the form.  Use it for submit images to 
tell what image was clicked to do the Submit
*/
function processForm(form, input, value) {
  document.getElementById(input).value=value;
  if(value != 'delete' || confirm("Are you sure you want to delete")) {
	return true;
  } else {
	return false;
  }
}
function refreshForm(form) {
  document.getElementById(form).submit();
}
/*This function looks through a provided table 
and checks a hidden field if a checkbox was checked
so that all rows get a checkbox value
*/
function populateHiddenCheckBox(table, hiddenBoxIndex, visibleBoxIndex) {
  var tbody = document.getElementById(table).getElementsByTagName("TBODY")[0];
  for(var i=1; i < tbody.rows.length; i++) {
    var row = tbody.rows[i];
    var reqCol = row.children[0];
    var hidReqBox = reqCol.children[hiddenBoxIndex];
    var reqBox = reqCol.children[visibleBoxIndex];
    if(reqBox.checked) {
      hidReqBox.value = "1";
	 }
   }
   return true;
}