/** Method to get appropriate Request status text
 * @param   status  requested status
 * @return          status text
 */
function getXhrStatus(status) {
   /**
   * Request status:
   * ------------------
   * 1xx: Informational
   * 2xx: Success
   * 3xx: Redirection
   * 4xx: Client Error
   * 5xx: Server Error
   */
   var text = "";
   switch(status) {
      case 100: text = "<b>100</b> Continue";                                                                  break;
      case 101: text = "<b>101</b> Switching Protocols";                                                       break;
      case 102: text = "<b>102</b> Processing (WebDAV) (RFC 2518)";                                            break;
      case 122: text = "<b>122</b> Request-URI too long";                                                      break;
      case 200: text = "<b>200</b> OK";                                                                        break;
      case 201: text = "<b>201</b> Created";                                                                   break;
      case 202: text = "<b>202</b> Accepted";                                                                  break;
      case 203: text = "<b>203</b> Non-Authoritative Information";                                             break;
      case 204: text = "<b>204</b> No Content";                                                                break;
      case 205: text = "<b>205</b> Reset Content";                                                             break;
      case 206: text = "<b>206</b> Partial Content";                                                           break;
      case 207: text = "<b>207</b> Multi-Status (WebDAV)";                                                     break;
      case 300: text = "<b>300</b> Multiple Choices";                                                          break;
      case 301: text = "<b>301</b> Moved permanently";                                                         break;
      case 302: text = "<b>302</b> Found (the request was redirected to another URL/URI)";                     break;
      case 303: text = "<b>303</b> See Other";                                                                 break;
      case 304: text = "<b>304</b> Not Modified";                                                              break;
      case 305: text = "<b>305</b> Use Proxy (the request must use a proxy to access the resource requested)"; break;
      case 306: text = "<b>306</b> (Unused)";                                                                  break;
      case 307: text = "<b>307</b> Temporary Redirect";                                                        break;
      case 400: text = "<b>400</b> Bad Request";                                                               break;
      case 401: text = "<b>401</b> Unauthorized";                                                              break;
      case 402: text = "<b>402</b> Payment Required";                                                          break;
      case 403: text = "<b>403</b> Forbidden";                                                                 break;
      case 404: text = "<b>404</b> Not Found";                                                                 break;
      case 405: text = "<b>405</b> Everything is OK";                                                          break;
      case 406: text = "<b>406</b> Not Acceptable";                                                            break;
      case 407: text = "<b>407</b> Proxy Authentication Required";                                             break;
      case 408: text = "<b>408</b> Request Timeout";                                                           break;
      case 409: text = "<b>409</b> Conflict ";                                                                 break;
      case 410: text = "<b>410</b> Gone";                                                                      break;
      case 411: text = "<b>411</b> Length Required";                                                           break;
      case 412: text = "<b>412</b> Precondition Failed";                                                       break;
      case 413: text = "<b>413</b> Request Entity Too Large";                                                  break;
      case 414: text = "<b>414</b> Request-URI Too Long";                                                      break;
      case 415: text = "<b>415</b> Unsupported Media Type";                                                    break;
      case 416: text = "<b>416</b> Requested Range Not Satisfiable";                                           break;
      case 417: text = "<b>417</b> Expectation Failed";                                                        break;
      case 418: text = "<b>418</b> I'm a teapot";                                                              break;
      case 422: text = "<b>422</b> Unprocessable Entity (WebDAV) (RFC 4918)";                                  break;
      case 423: text = "<b>423</b> Locked (WebDAV) (RFC 4918)";                                                break;
      case 424: text = "<b>424</b> Failed Dependency (WebDAV) (RFC 4918)";                                     break;
      case 425: text = "<b>425</b> Unordered Collection";                                                      break;
      case 426: text = "<b>426</b> Upgrade Required (RFC 2817)";                                               break;
      case 449: text = "<b>449</b> Retry With";                                                                break;
      case 450: text = "<b>450</b> Blocked";                                                                   break;
      case 500: text = "<b>500</b> Internal Server Error";                                                     break;
      case 501: text = "<b>501</b> Not Implemented";                                                           break;
      case 502: text = "<b>502</b> Bad Gateway";                                                               break;
      case 503: text = "<b>503</b> Service Unavailable";                                                       break;
      case 504: text = "<b>504</b> Gateway Timeout";                                                           break;
      case 505: text = "<b>505</b> HTTP Version Not Supported";                                                break;
      case 506: text = "<b>506</b> Variant Also Negotiates (RFC 2295)";                                        break;
      case 507: text = "<b>507</b> Insufficient Storage (WebDAV) (RFC 4918)";                                  break;
      case 509: text = "<b>509</b> Bandwidth Limit Exceeded (Apache bw/limited extension)";                    break;
      case 510: text = "<b>510</b> Not Extended (RFC 2774)";                                                   break;
      default : text = "<b>Unknown HTTP Status Code</b>";
   }
   // Return value
   return text;
}
