{"size": 765, "ext": "js", "max_stars_repo_path": "smsexpress.jasonwindows.local/lib/SendSMS.js", "max_stars_repo_name": "TinnedMan/JW-Website", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "smsexpress.jasonwindows.local/lib/SendSMS.js", "max_issues_repo_name": "TinnedMan/JW-Website", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "smsexpress.jasonwindows.local/lib/SendSMS.js", "max_forks_repo_name": "TinnedMan/JW-Website", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.2608695652, "max_line_length": 115, "alphanum_fraction": 0.7045751634}
function SendSMS (Message) {
  recipient = Message.recipient;
  text = Message.text;
  var xhr = new XMLHttpRequest();

  URL = "/Send/SendSMS.php";

  text = encodeURIComponent(text);
  recipient = encodeURIComponent(recipient);

  querystring = "?dst=" + recipient + "&txt=" + text;

  // We need to use an anonymous function here rather than calling handleSend... directly so that we create
  // a closure with Message in scope, it's a little bit kludgy but it works.
  xhr.onload = function () {handleSendSMSComplete(Message, this.status, this.statusText);};
  xhr.ontimeout = function () {handleSendSMSComplete(Message, 504, "Timeout waiting for local SendSMS service.");};

  xhr.open("GET", URL + querystring, true);
  xhr.timeout = 120000;

  xhr.send();
}
