var xmlhttp;
var duniq=0;
function priceselection(str1,str2)
{
//alert(str1.value);
//alert(str2.value);

s=str1.id;
duniq=s.substring((s.length)-1);
	
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="selection.php";
url=url+"?q="+str1.value+"&q2="+str2.value;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function priceselectionoun(str1)
{
var s=str1.id;
	
	duniq=s.substring((s.length)-1);

//alert(str1.value);
//alert(str2.value);
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="selection.php";
url=url+"?oun="+str1.value;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}


function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  seprate=new Array();
  rstr=xmlhttp.responseText;
  seprate=rstr.split(",");
 
  document.getElementById("pricedisplay"+duniq+"1").innerHTML="$"+seprate[1];
  document.getElementById("pricedisplay"+duniq+"2").innerHTML="$"+seprate[2];
  document.getElementById("productid"+duniq).value=seprate[0];

  }
}

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;
}
