docs: function(url, callback) {                                                              // 1475
      var tref;                                                                                                     // 1476
      var script = _document.createElement('script');                                                               // 1477
      var script2;  // Opera synchronous load trick.                                                                // 1478
      var close_script = function(frame) {                                                                          // 1479
          if (script2) {                                                                                            // 1480
              script2.parentNode.removeChild(script2);                                                              // 1481
              script2 = null;                                                                                       // 1482
          }                                                                                                         // 1483
          if (script) {                                                                                             // 1484
              clearTimeout(tref);                                                                                   // 1485
              // Unfortunately, you can't really abort script loading of                                            // 1486
              // the script.                                                                                        // 1487
              script.parentNode.removeChild(script);                                                                // 1488
              script.onreadystatechange = script.onerror =                                                          // 1489
                  script.onload = script.onclick = null;                                                            // 1490
              script = null;                                                                                        // 1491
              callback(frame);                                                                                      // 1492
              callback = null;                                                                                      // 1493
          }                                                                                                         // 1494
      };                                                                                                            // 1495
                                                                                                                    // 1496
      // IE9 fires 'error' event after orsc or before, in random order.                                             // 1497
      var loaded_okay = false;                                                                                      // 1498
      var error_timer = null;                                                                                       // 1499
                                                                                                                    // 1500
      script.id = 'a' + utils.random_string(8);                                                                     // 1501
      script.src = url;                                                                                             // 1502
      script.type = 'text/javascript';                                                                              // 1503
      script.charset = 'UTF-8';                                                                                     // 1504
      script.onerror = function(e) {                                                                                // 1505
          if (!error_timer) {                                                                                       // 1506
              // Delay firing close_script.                                                                         // 1507
              error_timer = setTimeout(function() {                                                                 // 1508
                  if (!loaded_okay) {                                                                               // 1509
                      close_script(utils.closeFrame(                                                                // 1510
                          1006,                                                                                     // 1511
                          "JSONP script loaded abnormally (onerror)"));                                             // 1512
                  }                                                                                                 // 1513
              }, 1000);                                                                                             // 1514
          }                                                                                                         // 1515
      };                                                                                                            // 1516
      script.onload = function(e) {                                                                                 // 1517
          close_script(utils.closeFrame(1006, "JSONP script loaded abnormally (onload)"));                          // 1518
      };                                                                                                            // 1519
                                                                                                                    // 1520
      script.onreadystatechange = function(e) {                                                                     // 1521
          if (/loaded|closed/.test(script.readyState)) {                                                            // 1522
              if (script && script.htmlFor && script.onclick) {                                                     // 1523
                  loaded_okay = true;                                                                               // 1524
                  try {                                                                                             // 1525
                      // In IE, actually execute the script.                                                        // 1526
                      script.onclick();                                                                             // 1527
                  } catch (x) {}                                                                                    // 1528
              }                                                                                                     // 1529
              if (script) {                                                                                         // 1530
                  close_script(utils.closeFrame(1006, "JSONP script loaded abnormally (onreadystatechange)"));      // 1531
              }                                                                                                     // 1532
          }                                                                                                         // 1533
      };                                                                                                            // 1534
      // IE: event/htmlFor/onclick trick.                                                                           // 1535
      // One can't rely on proper order for onreadystatechange. In order to                                         // 1536
      // make sure, set a 'htmlFor' and 'event' properties, so that                                                 // 1537
      // script code will be installed as 'onclick' handler for the                                                 // 1538
      // script object. Later, onreadystatechange, manually execute this                                            // 1539
      // code. FF and Chrome doesn't work with 'event' and 'htmlFor'                                                // 1540
      // set. For reference see:                                                                                    // 1541
      //   http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html                                    // 1542
      // Also, read on that about script ordering:                                                                  // 1543
      //   http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order                                               // 1544
      if (typeof script.async === 'undefined' && _document.attachEvent) {                                           // 1545
          // According to mozilla docs, in recent browsers script.async defaults                                    // 1546
          // to 'true', so we may use it to detect a good browser:                                                  // 1547
          // https://developer.mozilla.org/en/HTML/Element/script                                                   // 1548
          if (!/opera/i.test(navigator.userAgent)) {                                                                // 1549
              // Naively assume we're in IE                                                                         // 1550
              try {                                                                                                 // 1551
                  script.htmlFor = script.id;                                                                       // 1552
                  script.event = "onclick";                                                                         // 1553
              } catch (x) {}                                                                                        // 1554
              script.async = true;                                                                                  // 1555
          } else {                                                                                                  // 1556
              // Opera, second sync script hack                                                                     // 1557
              script2 = _document.createElement('script');                                                          // 1558
              script2.text = "try{var a = document.getElementById('"+script.id+"'); if(a)a.onerror();}catch(x){};";
              script.async = script2.async = false;                                                                 // 1560
          }                                                                                                         // 1561
      }                                                                                                             // 1562
      if (typeof script.async !== 'undefined') {                                                                    // 1563
          script.async = true;                                                                                      // 1564
      }                                                                                                             // 1565
                                                                                                                    // 1566
      // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.                                  // 1567
      tref = setTimeout(function() {                                                                                // 1568
                            close_script(utils.closeFrame(1006, "JSONP script loaded abnormally (timeout)"));       // 1569
                        }, 35000);                                                                                  // 1570
                                                                                                                    // 1571
      var head = _document.getElementsByTagName('head')[0];                                                         // 1572
      head.insertBefore(script, head.firstChild);                                                                   // 1573
      if (script2) {                                                                                                // 1574
          head.insertBefore(script2, head.firstChild);                                                              // 1575
      }                                                                                                             // 1576
      return close_script;                                                                                          // 1577
  }