//Browser Support Code
function ajaxFunction(tScript, tAction){
  var ajaxRequest;  // The variable that makes Ajax possible!
  var tAction = (tAction == null) ? "doNothing" : tAction;

  try {
    // Opera 8.0+, Firefox, Safari
    ajaxRequest = new XMLHttpRequest();
  } catch (e) {
    // Internet Explorer Browsers
    try {
      ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        // Something went wrong
        alert("Your browser broke!");
        return false;
      }
    }
  }

  ajaxRequest.onreadystatechange = function(){
    if(ajaxRequest.readyState == 4){
//      alert(ajaxRequest.responseText);
//      return false;
      eval(tAction + "('" + ajaxRequest.responseText + "')");
    }
  }

  ajaxRequest.open("GET", "ajax/" + tScript, true);
  ajaxRequest.send(null);
}


function doNothing() {
}

function displayEmailResult(msg) {
  sorry = " I'm sorry for the inconvenience.";
  sorry = sorry+"You may try again a little later, or drop a line to cookingclasses@onruetatin.com";
  sorry = sorry+" asking to subscribe to my list."
  if (msg==1) {
    alert("Thank you for joining my email list!");
  } else if (msg==2) {
    alert("Sorry, there was a problem sending your email address."+sorry);
  } else if (msg==3) {
    alert("Sorry, your email address was not received."+sorry);
  } else if (msg==47) {
    alert("Nothing happened.");
  } else {
    boxText = "An unknown technical error prevented us from adding your name to my list.";
    alert(boxText+sorry);
  }
}