function setWinner(val)
{
   document.battleform.winner.value = val;
   submitBattle();
}

function submitBattle()
{
   document.battleform.submit();
}

function validate()
{
   /* if( emailWork.indexOf('@') == -1 )
      {
         msg += "<%=locale.getString(locale.JS_ERROR_WORKEMAIL1)%>\r";
         bool = false;
      }
      if( emailWork.indexOf('.') == -1 )
      {
         msg += "<%=locale.getString(locale.JS_ERROR_WORKEMAIL2)%>\r";
         bool = false;
      }
      if( emailWork.indexOf('.') > -1
               && emailWork.substring( emailWork.indexOf('.'), emailWork.length-1 ).length < 2 )
      {
         msg += "<%=locale.getString(locale.JS_ERROR_WORKEMAIL3)%>\r";
         bool = false;
      } */
   if( document.tattoo.firstName.value == '' )
   {
      alert("You must enter your name.");
      document.tattoo.firstName.focus();
      return false;
   }
   else if( document.tattoo.email.value == '' )
   {
      alert("You must enter your email.");
      document.tattoo.email.focus();
      return false;
   }
   else if( document.tattoo.imageName.value == '' )
   {
      alert("You must enter the name of your tattoo.");
      document.tattoo.imageName.focus();
      return false;
   }
   else if( document.tattoo.categoryId.options[0].selected )
   {
      alert("You must select a category for your tattoo.");
      document.tattoo.categoryId.focus();
      return false;
   }
   else if( document.tattoo.fileName.value == '' )
   {
      alert("You must browse to select a file.");
      document.tattoo.fileName.focus();
      return false;
   }
}

function validateQuestionForm()
{
   if( document.mailform.realname.value == '' )
   {
      alert("You must enter your name.");
      document.mailform.realname.focus();
      return false;
   }
   /* else if( document.mailform.company.value == '' )
   {
      alert("You must enter your company.");
      document.mailform.company.focus();
      return false;
   } */
   /* else if( document.mailform.phone.value == '' )
   {
      alert("You must enter the name of your tattoo.");
      document.mailform.phone.focus();
      return false;
   } */
   else if( document.mailform.email.value == '' )
   {
      alert("You must enter your email address.");
      document.mailform.email.focus();
      return false;
   }
   else if( document.mailform.msg.value == '' )
   {
      alert("You must enter a message.");
      document.mailform.msg.focus();
      return false;
   }
}