function tsCallback1244036617(items) {
  var A=[];
  var B=[];
  var C=[];
  var class_count;
  var teacher_count;
  var article_count;
  var search_more;
  
  for(var item in items) {
    var txt = "<li style=\"clear: left;float:left;width:100%;padding-bottom:12px;margin-bottom:12px;border-bottom:1px dotted #bcbcbc;\">" +
               "<a style=\"font-weight: bold;color:#06c;\" href=\"" + items[item].url + "\">" +
               "<img src=\"" + items[item].img_url + "\" width=\"45\" height=\"45\" style=\"width:45px;height:45px;float:left; margin-right:5px;\" />" + 
               items[item].title + "</a>";
    
    if (items[item].item_type != 'teacher') {            
       txt +=  "<span style=\"display:block;font-size:11px;color:#111;margin-left:50px;\">By  " + 
               "<a style=\"font-size:11px;display:inline;color:#06c;\" href=\"" + items[item].profile_url + "\">" + items[item].user + 
               "</a></span>";
    }
               
    txt += "</li>";
    
    if (items[item].item_type == 'class') {
      A.push(txt);
    }
    else if (items[item].item_type == 'teacher') {
      B.push(txt);
    }
    else if (items[item].item_type == 'article') {
      C.push(txt);
    }
    else if (items[item].item_type == 'summary') {
      class_count = items[item].class_count;
      teacher_count = items[item].teacher_count;
      article_count = items[item].article_count;
      search_more = "<li style=\"clear: left;float:left;width:100%;padding-bottom:12px;margin-bottom:12px;border-bottom:1px dotted #bcbcbc;\">" + 
      "<a style=\"font-weight: bold;color:#06c;text-align:right;\" target=\"_blank\" href=\"http://www.teachstreet.com/search?what=" + items[item].what + "\">See all results for " + items[item].what + " &raquo;</a></li>";      
    }
  }
  
  if (A.length > 4) {
    A.push(search_more);
  }
  
  if (B.length > 4) {
    B.push(search_more);
  }
  
  if (C.length > 4) {
    C.push(search_more);
  }
  
  if (A.length > 0) { 
    document.getElementById("TeachStreet_sec11244036617").innerHTML=A.join("");
  }
  else {
    document.getElementById("TeachStreet_sec11244036617").innerHTML= "<div style=\"margin-bottom: 20px;\"><b>No classes found.</b></div>";
  }

  if (B.length > 0) { 
    document.getElementById("TeachStreet_sec21244036617").innerHTML=B.join("");
  }
  else {
    document.getElementById("TeachStreet_sec21244036617").innerHTML= "<div style=\"margin-bottom: 20px;\"><b>No teachers found.</b></div>";
  }

  if (C.length > 0) { 
    document.getElementById("TeachStreet_sec31244036617").innerHTML=C.join("");
  }
  else {
    document.getElementById("TeachStreet_sec31244036617").innerHTML= "<div style=\"margin-bottom: 20px;\"><b>No articles found.</b></div>";
  }
}

function TeachStreet_menu_tabs(menu) {
  if (menu.id != 'TeachStreet_menu_selected'){
    var sectionNum = menu.parentNode.className;

    //replace selected tab
    document.getElementById('TeachStreet_menu_selected').id = '';
    menu.id = 'TeachStreet_menu_selected'

    //hide sections
    var contentSections = document.getElementById('TeachStreet_widget_content').getElementsByTagName('ul');

    for (i = 0; i < contentSections.length; i++) {
      if (contentSections[i].style.display = 'block') {
        contentSections[i].style.display = 'none';
      }
    }

    //show new one
    document.getElementById('TeachStreet_' + sectionNum).style.display = 'block';
  }
}

function requestContent( wid, q, r ) {
  var script = document.createElement('script');
  script.src = "http://www.teachstreet.com/widget/search.js" + "?wid=" + wid + "&r=" + r + "&w=" + escape(q);
  document.getElementsByTagName('head')[0].appendChild(script);
}
