 /*var xmlHttp;
 function createXMLHttpRequest() {
     if (window.ActiveXObject) {
         xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
     } 
     else if (window.XMLHttpRequest) {
         xmlHttp = new XMLHttpRequest();                
     }
 }
 function detailProduct(l_id) {
     createXMLHttpRequest();
     var url = "Winkelwagen_ajax.php?m=detail&id=" + l_id + "&d";
    	xmlHttp.open("GET", url, true);
    	xmlHttp.onreadystatechange = callbackdetail;
    	xmlHttp.send(null);
 }
 
  function wijzig_aantal(l_id,aantal) {
     createXMLHttpRequest();
     var url = "Winkelwagen_ajax.php?m=wijzigaantal&orderdetailid=" + l_id + "&aantal=" + aantal;
    	xmlHttp.open("GET", url, true);
    	xmlHttp.onreadystatechange = callback;
    	xmlHttp.send(null);
 }

function setInhoud(divinhoud) {
	var fontColor = "black";
     	document.getElementById("inhoud").innerHTML = divinhoud;			
 }   
 function updateInfoBasket(aantal,l_id) {
     createXMLHttpRequest();
     var url = "Winkelwagen_ajax.php?m=update&aant=" + aantal + "&id=" + l_id + "&d";
    	xmlHttp.open("GET", url, true);
    	xmlHttp.onreadystatechange = callback;
    	xmlHttp.send(null);
 }
function callback() {
     if (xmlHttp.readyState == 4) {
         if (xmlHttp.status == 200) {
			var cbaantal = xmlHttp.responseXML.getElementsByTagName("aantal")[0].firstChild.data; 
             setMessage(cbaantal);
         }
     }
 }
function setMessage(divaantal) {
var fontColor = "green";
     document.getElementById("info").innerHTML = "<font color=" + fontColor + ">" + divaantal + "</font>";			
 }   
 */
 /*ilse*/
 var xmlHttp


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function disableEnterKey(e)
{
     var key;

     if(window.event)
          key = window.event.keyCode;     //IE
     else
          key = e.which;     //firefox

     if(key == 13)
          return false;
     else
          return true;
}


function wijzig_aantal_onenter(l_id,e,aantal)
{
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;
	if (keycode == 13)
	{
		wijzig_aantal(l_id,aantal);
	}
}
function wijzig_aantal(l_id,aantal) 
{ 
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-wijzigaantal-" + l_id + "-" + aantal + ".php";
	xmlHttp.onreadystatechange=stateChangedwinkel;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function delete_item(l_id)
{
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-deleteitem-" + l_id + ".php";
	xmlHttp.onreadystatechange=stateChangedwinkel;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 
	
function stateChangedwinkel()
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("divwinkelmandje").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObjectwinkel()
{
	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;
}


function openConditions(childUrl,childName,childWidth,childHeight,childLeft,childTop,childStatus,childScrollbars,childLocation,childTollbar,childMenubar) {
	var newChild = null;
	var childScrollbars = 'yes';
	if (childLeft=='center') {	
		childPosLeft = Math.floor((screen.width - childWidth) / 2);
		if (childTop=='center'||childTop=='middle')
			childPosTop = Math.floor((screen.height - childHeight) / 2);
    	else if (childTop=='top')
			childPosTop = 0;
		else
			childPosTop = screen.height - childHeight-30;
	}
	else if (childLeft=='left') {	
		childPosLeft = 0;
		if (childTop=='center'||childTop=='middle')
			childPosTop = Math.floor((screen.height - childHeight) / 2);
    	else if (childTop=='top')
			childPosTop = 0;
		else
			childPosTop = screen.height - childHeight-30;
	}
	else {	
		childPosLeft = screen.width - childWidth-10;
		if (childTop=='center'||childTop=='middle')
			childPosTop = Math.floor((screen.height - childHeight) / 2);
    	else if (childTop=='top')
			childPosTop = 0;
		else
			childPosTop = screen.height - childHeight-30;
	}
	newChild = window.open(childUrl,childName,'width='+childWidth+',height='+childHeight+',innerwidth='+childWidth+',innerheight='+ childHeight+',top='+childPosTop+',left='+childPosLeft+',status='+childStatus+',scrollbars='+childScrollbars+',location='+childLocation+',toolbar='+childTollbar+',menubar='+childMenubar);
	if (newChild != null)
		newChild.window.focus();
}