function show_mini_form(num_form)
{
  author_fname = document.articles_submit_form.elements['authors_fname[' + num_form + ']'].value;
  author_lname = document.articles_submit_form.elements['authors_lname[' + num_form + ']'].value;
  orga_name    = document.articles_submit_form.elements['authors_orga[' + num_form + ']'].value;
	
  document.articles_submit_form.elements['form_authors_fname' + num_form].value = author_fname;
  document.articles_submit_form.elements['form_authors_lname' + num_form].value = author_lname;
  document.articles_submit_form.elements['form_authors_orga' + num_form].value  = orga_name ;

  document.getElementById('form_authors' + num_form).style.display = 'block';
}


function hide_mini_form(num_form)
{
  document.getElementById('form_authors' + num_form).style.display = 'none';
}


function validate_mini_form(num_form)
{
  author_fname = document.articles_submit_form.elements['form_authors_fname' + num_form].value ;
  author_lname = document.articles_submit_form.elements['form_authors_lname' + num_form].value ;
  orga_name    = document.articles_submit_form.elements['form_authors_orga' + num_form].value ;

  if (author_fname != '' && author_lname != '' && orga_name != '')
  {
    document.articles_submit_form.elements['authors_fname[' + num_form + ']'].value = author_fname ;
    document.articles_submit_form.elements['authors_lname[' + num_form + ']'].value = author_lname ;
    document.articles_submit_form.elements['authors_orga[' + num_form + ']'].value  = orga_name ;
	
    update_mini_form_span(num_form);
    hide_mini_form(num_form);
  }
}


function update_mini_form_span(num_form)
{
  author_fname = document.articles_submit_form.elements['authors_fname[' + num_form + ']'].value ;
  author_lname = document.articles_submit_form.elements['authors_lname[' + num_form + ']'].value ;
  orga_name    = document.articles_submit_form.elements['authors_orga[' + num_form + ']'].value ;

  span_author = document.getElementById('span_authors' + num_form);
  if (author_fname != '' && author_lname != '' && orga_name != '')
    span_author.innerHTML = "<strong>" + author_lname + " " + author_fname + "</strong> (" + orga_name + ")";
  else
    span_author.innerHTML = "";
}

