function addToFavorites(){ // alert (typeof window.external.AddFavorite); if ((navigator.appName.indexOf('Microsoft',0)>=0) && (parseInt(navigator.appVersion)>=4)) { // window.external.AddFavorite(anchor.getAttribute('href'), anchor.getAttribute('title')); window.external.AddFavorite('',''); } else{ window.sidebar.addPanel('','',''); } } // 02/09/2009 // rapatrie depuis antalys-check-specific.js : utilise lors de la commande pour vérifier le stock // old value permet de remettre l'ancienne valeur function antcheck_stock(valform,stock,oldvalue){ // check if amount entered is less then available stock // alert ('problem :' + valform.name + ' : ' + valform.elements['stock_max'].value + ' ' + valform.quantite.value); // alert ('problem :' + valform.name + ' : ' + valform.value + ' ' + stock); //if (valform.quantite.value > valform.stock_max.value){ if (valform.value > stock) { alert ('!! La quantité indiquée dépasse le stock disponible qui est actuellement de: ' + stock); valform.value=oldvalue; return false; } return true; } // 20/09/2009 : description de produits sous forme de tabs function antChangeTab(active, nombre, tab_prefix, contenu_prefix) { for (var i=1; i < nombre + 1; i++) { var tmp=tab_prefix+i; var elem=document.getElementById(tab_prefix + i); //alert('tmp:' + tmp +' :' + elem); if (elem != null){ document.getElementById(contenu_prefix + i).style.display = 'none'; elem.className = ''; } } document.getElementById(contenu_prefix+active).style.display = 'block'; document.getElementById(tab_prefix+active).className = 'antprodactive'; }