function createRequestObject() {var ro;var browser = navigator.appName;if(browser == "Microsoft Internet Explorer"){ro = new ActiveXObject("Microsoft.XMLHTTP"); }else{ro = new XMLHttpRequest();} return ro;}
var http = createRequestObject();
function changeCatalog(category) {http.open('get', 'data/show.php?type=c&category='+category); http.onreadystatechange = handleResponse; http.send(null);}
function handleResponse() {if(http.readyState == 4){ var response = http.responseText;changeBrands(response, document.getElementById("b")); }}
function changeBrands(str, sel) {sel.options.length=0;sel.options.add(new Option("Waiting...","-1"));var arrstr = new Array();var substr = new Array();arrstr = str.split(",");if(str.length>0) {
 for(var i=0;i< arrstr.length; i++) {
   substr = arrstr[i].split("|");sel.options.add(new Option(substr[1],substr[0]));}
 }
 sel.options[0].text = "All brands";sel.options[0].value = "-1";sel.options[0].selected=true
}
function setTab(id) {
  document.getElementById('tradeshowTab1').className = 'tradeshowCycleTab';
  document.getElementById('tradeshowTab2').className = 'tradeshowCycleTab';
  document.getElementById('tradeshowTab3').className = 'tradeshowCycleTab';
  document.getElementById('tradeshowTab4').className = 'tradeshowCycleTab';
  document.getElementById('tradeshowItem1').style.display = 'none';
  document.getElementById('tradeshowItem2').style.display = 'none';
  document.getElementById('tradeshowItem3').style.display = 'none';
  document.getElementById('tradeshowItem4').style.display = 'none';
  document.getElementById('tradeshowTab' + id).className = 'tradeshowCycleTab current';
  document.getElementById('tradeshowItem' + id).style.display = 'block';
}
