 /*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);
	}
}
/*feestwinkel*/
/*
function wijzig_aantal_reservatie_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_reservatie(l_id,aantal);
	}
}
*/
function wijzig_aantal(l_id,aantal) 
{ 
	xmlHttp=GetXmlHttpObjectwinkel();
	xmlHttp2=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-wijzigaantal-" + l_id + "-" + aantal + ".php";
	var url2 = "Winkelwagen_ajax_settotal.php";
	xmlHttp.onreadystatechange=stateChangedwinkel;
	xmlHttp2.onreadystatechange=stateChangedTotal;
	xmlHttp.open("GET",url,true);
	xmlHttp2.open("GET",url2,true);	
	xmlHttp.send(null);
	xmlHttp2.send(null);	
}
/*feestwinkel*/
/*
function wijzig_aantal_reservatie(l_id,aantal) 
{ 
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-wijzigaantalreservatie-" + l_id + "-" + aantal + ".php";
	xmlHttp.onreadystatechange=stateChangedreservatie;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
*/
function delete_item(l_id)
{
	xmlHttp=GetXmlHttpObjectwinkel();
	xmlHttp2=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-deleteitem-" + l_id + ".php";
	var url2 = "Winkelwagen_ajax_settotal.php";
	xmlHttp.onreadystatechange=stateChangedwinkel;
	xmlHttp2.onreadystatechange=stateChangedTotal;
	xmlHttp.open("GET",url,true);
	xmlHttp2.open("GET",url2,true);	
	xmlHttp.send(null);
	xmlHttp2.send(null);	
	
} 
/*
function updatetotal()
{
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax_settotal.php";
	xmlHttp.onreadystatechange=stateChangedTotal;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
 */
/*
function delete_item_reservatie(l_id)
{
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-deleteitemreservatie-" + l_id + ".php";
	xmlHttp.onreadystatechange=stateChangedreservatie;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 
*/
function disable_datumafhaling(flg_collect)
{
	if (flg_collect){
		document.frm_winkelmandje.dagafhaling.disabled=false;
		document.frm_winkelmandje.maandafhaling.disabled=false;
		document.frm_winkelmandje.jaarafhaling.disabled=false;
	}else{//datum disabelen
		document.frm_winkelmandje.dagafhaling.disabled=true;
		document.frm_winkelmandje.maandafhaling.disabled=true;
		document.frm_winkelmandje.jaarafhaling.disabled=true;
	}
}

/*feestwinkel*/
/*
function wijzig_maat(productid,l_id,productpriceid) //voor moonkidsstore
{ 
	
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-wijzigmaat-" + productid + "-" + l_id + "-" + productpriceid + ".php";
	//alert(url);
	xmlHttp.onreadystatechange=stateChangedwinkel;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
*/
/*feestwinkel*/
/*
function wijzig_maat_reservatie(productid,l_id,productpriceid) //voor moonkidsstore
{ 
	
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Winkelwagen_ajax-wijzigmaatreservatie-" + productid + "-" + l_id + "-" + productpriceid + ".php";
	//alert(url);
	xmlHttp.onreadystatechange=stateChangedreservatie;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
*/
function stateChangedwinkel()
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("divwinkelmandje").innerHTML=xmlHttp.responseText;
	}
}
function stateChangedTotal()
{ 
	if (xmlHttp2.readyState==4)
	{ 
	document.getElementById("jscheckouttotal").innerHTML=xmlHttp2.responseText;
	}
}
/*
function stateChangedreservatie()
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("divreservatiemandje").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 check_data_register(field)
{
	xmlHttp=GetXmlHttpObjectwinkel();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	var url = "Login_ajax-" + l_id + ".php";
	xmlHttp.onreadystatechange=stateChangedwinkel;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
*/
/*
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();
}
*/
