function bookform_validation_init() {
   theForm = document.getElementById('create_form');
   theForm.onsubmit = bookform_validate;
}

function bookform_validate() {
   theTitle = document.getElementById('title');
   if (!theTitle.value.length) {
      alert('You need to enter an event title.');
      return false;
   } else {
      return true;
   }
}
