var xmlHttp

function WinkelwagenUpdate(str,str2,qty)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="/shop/include/miniCart.php"
url=url+"?p="+str+"&action="+str2+"&aantal="+qty
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function WinkelwagenPakketUpdate(str,str2,qty)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="/shop/include/miniCart.php"
url=url+"?pakket=1&p="+str+"&action="+str2+"&aantal="+qty
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

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

function Huidig(str,str2,del)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="/shop/admin/pakket/currentlist.php"
url=url+"?pid="+str+"&add="+str2+"&del="+del
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged2 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

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

function getSubs(str,pakketid)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="/shop/admin/pakket/getsubs.php"
url=url+"?catid="+str+"&pakketId="+pakketid
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged3 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

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

function getProducts(str,pakketid)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="/shop/admin/pakket/productlist.php"
url=url+"?catid="+str+"&pakketId="+pakketid
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged4
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged4() 
{
if (xmlHttp.readyState==1 || xmlHttp.readyState=="loading")
 { 
 document.getElementById("productlist").innerHTML='Een moment geduld a.u.b.'
 } 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("productlist").innerHTML=xmlHttp.responseText 
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}