function simulator(q, c, cb) {
  if (!q) q = $("#simInput").val();
  if (!c) c = $("#simChannel").val();
  if (c == "DOTCOM") s = "368266";
  if (c == "DOTEDU") s = "368338";
  if (c == "DOTGOV") s = "368468";
  if (c == "DOTNET") s = "368638";
  if (c == "DOTORG") s = "368674";

  var n = $.cookie("n");
  if(!n) {
    var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
    var str = '';
    for(var i=0; i<10; i++) {
      var rnum = Math.floor(Math.random() * chars.length);
      str += chars.substring(rnum,rnum+1);
    }
    $.cookie("n", str, { expires: 300, path: "/"});
  }

  $("#simDisplay").html('<img src="http://dotgo.com/img/loader.gif" style="margin-left: 71px; margin-top: 60px"/>');
  $("#simQuery").html('<input id="simInput" type="text" name="query" value="' + q + '"/>');
  $("#simChannel").val(c).attr("selected", "selected");

  q = encodeURI(q)




  $('#simDisplay').load('http://dotgo.com/api/?method=dotgo.simulator&key=xxx4y9dicywhmz9056gd8h8lq&query=' + q + '&shortcode=' + s + '&number=api:' + $.cookie("n"));
  
  
  
  var e = $("#simInput").focus().get(0);
  e && e.select && e.select();
}

