var xmlHttp
var loadstatustext="<FONT style=BACKGROUND-COLOR: #990033 color=#ff0033><STRONG><FONT color=#123B69>&nbsp;Loading....</FONT></STRONG></FONT>";
function addItem(str,mid,delId,ordSessId,itemPrice,itemType)
{
if (str.length==0 && id.length==0)
{ 
return
}
xmlHttp=GetXmlHttpObject2()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="php/addItem.php"
iid		=str
mid		=mid
delId	=delId
ordSessId	=ordSessId
itemPrice	=itemPrice
itemType	=itemType
optional	="optional"+iid;
if(itemType=='2')
{
if(document.getElementById(optional).checked==false)
{
	delId	=2;
}
}
url=url+"?iid="+iid+"&mid="+mid+"&delId="+delId+"&ordSessId="+ordSessId+"&itemPrice="+itemPrice+"&itemType="+itemType
//alert(url);
url=url+"&stid="+Math.random()
xmlHttp.onreadystatechange=stateChanged2 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{	
	document.getElementById("txtItems").innerHTML=xmlHttp.responseText
} 
} 

function GetXmlHttpObject2()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 

