/* {/catal/js/common.js} */
if(!CATAL_COMMON_JS){$(function(){$("a.calcul_qte, a.calcul_qte_liste, a.calcul_qte_only").live("click",function(){var artn=this.href.substring(this.href.indexOf("#")+1);var data="artn="+artn;if($(this).hasClass("calcul_qte_liste")){data+="&liste=nelle"}if($(this).hasClass("calcul_qte_only")){var refId=artn.substring(artn.indexOf("_")+1);artn=artn.substring(0,artn.indexOf("_"));data="artn="+artn+"&liste="+$("#id_liste").val()+"&qte="+$("#quantite"+refId).val()+"&ii="+refId}ajax_blockui();$.ajax({type:"POST",url:"/catal/jsp/Z_catal_060_040.jsp",data:data,success:function(response){$.blockUI({message:'<div class="blockui_popup">'+response+"</div>",css:{top:"10%",marginLeft:"-221px",width:"442px"}});gouf()}});return false});$("a.add_panier").live("click",function(){var index=this.href.substring(this.href.indexOf("#")+1);verif_qte(index);return false});for(elem in tPrixHtml){$("#"+elem).html("<p>"+tPrixHtml[elem]+"</p>")}var params="";var flag="";for(ajaxCall in tAjaxCall){flag="oui";params+=(params.length==0)?"":",";params+=ajaxCall+":'"+tAjaxCall[ajaxCall]+"'"}if(flag=="oui"){eval('$.post("/catal/jsp/catal_pxnet_ajax.jsp", {'+params+"}); ")}});function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore){selObj.selectedIndex=0}}function PopUp(c,a,b){window.open(c,a,b)}function MM_openBrWindow(e,a,b){var d=(screen.height-382)/2;var c=(screen.width-368)/2;window.open(e,a,"top="+d+",left="+c+","+b)}function nelleliste(a){var c=(screen.height-212)/2;var b=(screen.width-368)/2;fen=window.open(a,"pop","top="+c+",left="+b+",width=368,height=212");fen.close();fen=window.open(a,"pop","top="+c+",left="+b+",width=368,height=212");fen.focus()}function isEmailAddress(b,a){str=a.value;valAt=str.indexOf("@");valSpace=str.indexOf(" ");valAt2=str.indexOf("@",valAt+1);valDot=str.indexOf(".");if(valSpace!=-1||valAt==-1||valAt==0||valAt==(valDot-1)||valDot==-1||valAt2!=-1||!isNaN(str.substring(0,1))||valDot==(str.length-1)){alert("Entrez une adresse e-mail valide")}else{document.newsletter.submit()}}function moins(b){numero=b.substring(5,7);document.getElementById("quantite"+numero).value--;if(document.getElementById("quantite"+numero).value<1){document.getElementById("quantite"+numero).value="1"}}function plus(b){numero=b.substring(4,6);document.getElementById("quantite"+numero).value++}function prodmoins(b){numero=b.substring(5,7);document.prodx.elements["quantite"+numero].value--;if(document.prodx.elements["quantite"+numero].value<1){document.prodx.elements["quantite"+numero].value=""}}function prodplus(b){numero=b.substring(4,6);document.prodx.elements["quantite"+numero].value++}function num(a){if(a!=" "){if(isNaN(prodx.quantite01.value.replace(".",","))){prodx.quantite01.value="";alert("Vous devez saisir une quantité");return false}}else{if(isNaN(prodx.quantite01.value)){prodx.quantite01.value="";alert("Vous devez saisir une quantité");return false}}}function IsNum(a,e){var b=$("#quantite"+a)||"";var d=true;var c="";if(!isNaN(b.val())&&b.val()>99999999.99){c="Quantité trop élevée, quantité maxi = 99999999";d=false}if(e!=" "&&isNaN(b.val().replace(".",","))){c="Vous devez saisir une quantité";d=false}if(isNaN(b.val())||b.val()<=0||b.val()==0){c="Vous devez saisir une quantité";d=false}if(d==false){alert(c);b.val("1");b.focus()}return d}function FocusText(a){if(a.value==a.defaultValue){a.value=""}}function BlurText(a){if(a.value==""){a.value=a.defaultValue}}function checkpicto(){pictovar="<%=art.dispo%>";if(pictovar.value=="I"){window.open("aide.htm#stock","aide","width=650,height=505,scrollbars=yes")}if(pictovar.value=="S"){window.open("aide.htm#stock","aide","width=650,height=505,scrollbars=yes")}if(pictovar.value=="V"){window.open("aide.htm#commande","aide","width=650,height=505,scrollbars=yes")}}CATAL_COMMON_JS=true};
