/*---------------------------------------------------------------------------*/
function submitQuestion(how)
{
 with(this.document.eForm)
 {
  qobj = (typeof(finalquestion) != 'undefined')?finalquestion:question;

  if(stripWS(qobj.value).length <= 0 || qobj.value == jsMessages['330818'])
  {
   alert(jsMessages['330817']);
   qobj.value = jsMessages['330818'];
  }
  else if(typeof(preferredspecialty) != 'undefined' && preferredspecialty.selectedIndex <= 0)
  {
   alert(jsMessages['330819']);
  }
  else
  {
   if(typeof(username) != 'undefined')
   {
    username.value = '';
	password.value = '';
   }

   // action = '/questions/';
   submit();
  }
 }
}


/*---------------------------------------------------------------------------*/
function getQuestion(that)
{
 that.value = '';
 that.focus();
}


/*---------------------------------------------------------------------------*/
function setQuestion(that)
{
 if(stripWS(that.value).length <= 0)
 {
  that.value = jsMessages['330818'];
 }
}


/*---------------------------------------------------------------------------*/
function clearQuestion()
{
	if(confirm('Click OK to confirm that you really want to cancel this question?')){
		with(this.document.eForm)
		{
			question.value = clearMarker;
			submit();
		}
	}
}


/*---------------------------------------------------------------------------*/
function submitQuestion()
{
 with(this.document.eForm)
 {
  submit();
 }
}


/*---------------------------------------------------------------------------*/
function nextPage(page)
{
 with(this.document.eForm)
 {
  pagenumber.value = page;
  submit();
 }
}



/*---------------------------------------------------------------------------*/
function addToCart(controlNumber)
{
 with(this.document.eForm)
 {
  cartItem.value = controlNumber;
  submit();
 }
}


/*---------------------------------------------------------------------------*/
function login()
{
 with(this.document.eForm)
 {
  if(typeof(question) != 'undefined')
   question.value = '';
  submit();
 } // end with(eForm)
}


/*---------------------------------------------------------------------------*/
function changeCaptcha()
{
 with(this.document.eForm)
 {
  captcha.value = '__change__';
  submit();
 }     
}


/*---------------------------------------------------------------------------*/
function autoRenewal()
{
 with(this.document.eForm)
 {
  optout.checked = true;
  submit();
 }
}

