
/**********************************************/
/** corey lang's ajax, division of angelleye **/

var xmlhttp;
var xmlhttp2;

function updateQuantity(str, item_id)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="javascript/qtyUpdate.php";
url=url+"?qty_update="+str+"&item_id="+item_id;
//url=url+"&sid="+Math.random();
//xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

///////// StateChanges //////////////////
function stateChanged()
{
if (xmlhttp.readyState<4)
{
document.getElementById("cities").innerHTML='<center><span style="color: #d9d9d9; font-size: 12px; font-weight: bold;">Loading Zip Info</span>&nbsp; <img src="http://servicebp.com/gfx/ajax-loader.gif" alt="Loading"></center>';
} else if (xmlhttp.readyState==4)
{
document.getElementById("cities").innerHTML=xmlhttp.responseText;
}
}


////////////////////////////////////////

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}



