function jsUpload(upload_field, ext)
{
  // this is just an example of checking file extensions
  // if you do not need extension checking, remove
  // everything down to line
  // upload_field.form.submit();

  var re_text = '.'+ext;
  var filename = upload_field.value;

  /* Checking file type */
  if (filename.search(re_text) == -1)
  {
      alert("File is no "+ext.toUpperCase()+"-File (."+ext+")");
      upload_field.form.reset();
      return false;
  }

  upload_field.form.submit();
  document.getElementById('upload_status').value = "uploading file...";
  upload_field.disabled = true;
  return true;
}


