
// request

function ajaxResend() {
	
  var form = document.forms["formResend"];

  if (!hasAjax) {
	  form.submit();  
		return;
	}
	
	form.resendBut.disabled = true;
	
  var postStr = createGetStringFromForm('formResend');
  var url = "/ajax/ajaxResend.php";
  httpRequest("POST",url,1,resendResponse,postStr);
	
}

// response

function resendResponse() {
  if (request.readyState == 4) {
	  document.forms["formResend"].resendBut.disabled = false;
	  if (request.status == 200) {
      var mytext = request.responseText;
      if (mytext == '1') {
			  ajaxError("Your activation code has been resent.  Thank you for participating.");
			}
			else {
			  ajaxError(mytext);
			} 
		}
		else {
		  ajaxError("A communications problem occured attempting to resend the code.  Please try again.");
		}
  }
}
