function showBox(state) {
	var sbox = document.getElementById('searchContainer');
	if (state) {
		sbox.style.display = "block";
	} else {
		sbox.style.display = "none";
	}
}

// Start Update Basket
function updateBasket() {
  var fullUrl = "includes/updateBasket.php";
  if (xmlhttp) {
    xmlhttp.open("GET", fullUrl, true);
    xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4) {
        if (xmlhttp.status == 200) {
          eval(xmlhttp.responseText);
          box = document.getElementById('topNavBarBasket');
          if (total > 0) {
            box.innerHTML = "<div><a class='buttonGreen buttonGreenCust' href='view_basket.php'>View Basket &raquo;</a></div>";
            box.innerHTML += "<div id='shoppingBasket' class='whiteBoxTextDisplay'>Items: " + total + " | Total: &pound;" + cost + "</div>";
          } else {
            box.innerHTML = "";
          }
        }
      }
    }
    xmlhttp.send(null);	
  }	
}
// End Update Basket

// Start XMLHTTP Request
var xmlhttp = newXMLHTTP();

function newXMLHTTP() {
  var xmlhttp=false;
  /*@cc_on @*/
  /*@if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
    xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    try {
        xmlhttp = new XMLHttpRequest();
      } catch (e) {
        xmlhttp = false;
      }
  }
  return xmlhttp;
}
// End XMLHTTP Request