// JavaScript Document

function add_to_panel(Qt,id_product)
{
	q=$(Qt).val();
	p=$(id_product).val();
	
	
	
	if(q=="")
	jAlert("Le choix de l'option est obligatoire.");
	else
	{	
		$.ajax({
          type: 'POST',
          url: 'add_to_panel.php',
          data: "&Qt="+q+"&id_product="+p,
          success: function(msg){
			 
			  if(msg==false)
			  {
		 		jAlert("Votre produit est ajout&eacute; avec succ&egrave;s.")
				recharge('header.php','.contextedevis');
			  }
		 	  else
				jAlert("Ce produit existe d&eacute;j&agrave; dans votre panier.")
          }

		});

	}
}

function ConfirmDelete(ID)
{
	$.fn.colorbox({href:'confirm.php?id='+ID, width:'598px', height:'250px', iframe:true});
}
function deleteProduit(ID)
{
	$.ajax({
          type: 'POST',
          url: 'InAction.php',
          data: "page=deletePanelProduit&ID="+ID,
          success: function(msg){	
		  		$.fn.colorbox.close();	 		
				recharge('panier.php','.counter');
				recharge('detail_panier.php','.right_side');
				scrollto(665);
			  }
		 	 

		});
}
