/****************************************************/
/*   This is the function to do the gallery login   */
/****************************************************/

// The event id entered into the submitted form is extracted,
//   and the corresponding index file for that gallery
//   (in the "event_id" folder) is opened in a new window.

//   If the folder does not exist, a 404 error is triggered,
//   which displays a custom error page.


//  Input:  submitted login_form
//  Output: the event gallery in a new window


function check_login(login_form) {

  var gallery_name = login_form.event_id.value

  document.getElementById("event_id").focus()
  if (gallery_name) {
    location.href = gallery_name + "/index.html"
  }

}
