

function addToCart(intfamilyid, intproductid, intsizeid, intcolorid, link) {
	// Fonction pour ajouter au panier selon les préférences
    if (document.getElementById("taille").selectedIndex==0) {
        alert('Veuillez choisir une taille puis un coloris avant de valider.\n\nCliquez sur OK pour continuer.');
        return false;
    } else {
	
    	link.href = '/commande1.aspx?addProductId='+intproductid+'&family='+intfamilyid+'&size='+intsizeid+'&color='+intcolorid;
        return true;
    
    }
}

function addToCartMedical(intfamilyid, intproductid, intsizeid, intcolorid, link) {
	// Fonction pour ajouter au panier selon les préférences
    if (document.getElementById("taille").selectedIndex==0) {
        alert('Veuillez choisir une taille puis un coloris avant de valider.\n\nCliquez sur OK pour continuer.');
        return false;
    } else {
	
    	link.href = '/medical-commande1.aspx?addProductId='+intproductid+'&family='+intfamilyid+'&size='+intsizeid+'&color='+intcolorid;
        return true;
    
    }
}

function confirmDeleteProductFromCart(intRange) {
	if (confirm("Etes-vous sure de vouloir retirer cet article de votre panier ?\n\nCliquez sur OK pour confirmer sinon sur Annuler.")) {
		document.location="/commande1.aspx?removeProductRange=" + intRange;	 
	}
}

function confirmDeleteProductFromCartMedical(intRange) {
	if (confirm("Etes-vous sure de vouloir retirer cet article de votre panier ?\n\nCliquez sur OK pour confirmer sinon sur Annuler.")) {
		document.location="/medical-commande1.aspx?removeProductRange=" + intRange;	 
	}
}

function PrintInvoice(intInvoice) {
	window.open('/invoice.aspx?id='+intInvoice+'&print=ok','invoiceprint','width=700,height=500');
}

function PrintInvoiceCheck(intInvoice) {
	window.open('/invoice.aspx?id='+intInvoice+'&print=ok&chk=ok','invoiceprint','width=700,height=500');
}

function PrintOrder(intOrder) {
	window.open('/order.aspx?id='+intOrder+'&print=ok','invoiceprint','width=700,height=500');
}

function showlegalpopup() {
	window.open('/popup_legalinfo.aspx','legalinfo','width=700,height=500,scrollbars');
}

function showalertpopup() {
	window.open('/fr/boutique/popup_contre-indications.aspx','contreindications','width=300,height=400');
}

function showSizesTab() {
	var fen = window.open('/fr/boutique/popup_tailles.aspx','legalinfo','width=700,height=150');
	fen.focus();
}

function showTechnical(strurl) {
	var fen = window.open(strurl, 'technical', 'width=700,height=600');
	fen.focus();
}

function showZoom(strurl) {
	var fen = window.open(strurl, 'zoom', 'width=700,height=600');
	fen.focus();
}