$(document).ready(function(){ if($('#popupLink').size()){ $('#popupLink').click(); } }); function check_liv(action,formulaire){ if(navigator.appName.indexOf("Internet Explorer") != -1){ dsp_block = "block"; }else{ dsp_block = "table-row"; } oForm = document.forms[formulaire] all_fld = oForm.elements switch(action){ case 0: dsb = true; dsp = 'none'; break; case 1: dsb = false; dsp = dsp_block break; } for(i=0;i -1){ oForm.elements[fld_name].disabled = dsb } } document.getElementById('tr_livraison').style.display = dsp } function goSearch(uri,pageR){ formulaire = 'filter' dec_uri = uri.split('/page=') new_uri = dec_uri[0] document.forms[formulaire].action = new_uri+'/page='+pageR document.forms[formulaire].submit() } function filter_form(uri,formulaire){ dec_uri = uri.split('/page=') new_uri = dec_uri[0] document.forms[formulaire].action = new_uri document.forms[formulaire].submit() } function write_order_url(url_root,QTE_fld,link_id){ QTE_slt = document.getElementById(QTE_fld.id) QTE = 0 if(QTE_slt.value.length){ if(isNaN(QTE_slt.value)){ QTE = 1; alert("Indiquez une valeur numérique") return false QTE_slt.value = ''; }else{ QTE = QTE_slt.value } } if(QTE > 0){ url_root += '&QTE='+QTE+'&TB_iframe=true&width=600&height=400'; document.getElementById(link_id).href = url_root }else{ url_root += '&QTE=1&TB_iframe=true&width=600&height=400'; document.getElementById(link_id).href = url_root document.getElementById(link_id).className = 'toto' } } function mailing_act(){ oForm = document.forms['mailing'] window.open("float/wait.php", "popup"); oForm.target = "popup"; oForm.submit(); } function mailing_addDel(th){ member_mail = document.forms['mailing'].members_mail.value; switch(th.value){ case '1': formAction = "http://mailing.av-broadcast.fr/subscribe/members/add"; break; case '0': formAction = "http://mailing.av-broadcast.fr/subscribe/members/"+member_mail+"/del"; break; } document.forms['mailing'].action = formAction } function dsb_field(th_slt,opt_val,formulaire,champ){ if(th_slt.value == opt_val){ disabledMod = false; }else{ disabledMod = true; } document.forms[formulaire].elements[champ].disabled = disabledMod } function dsp_tr(tr_id){ /* all_tr = zone_sommaire.getElementsByTagName('TR') for(i=0;i 2){ all_btn[i].src = 'SITE_ROOTimg/'+dec_udsc[0]+'_'+dec_udsc[1]+'.'+dec_bName[1] } } document.getElementById(btn_id).src = newBtn_src } function dsp_prod(TR_class,TR_id,img_id,mg2_src){ if(navigator.appName.indexOf("Internet Explorer") != -1){ dsp_block = "block"; }else{ dsp_block = "table-row"; } TR_all = zone_sommaire.getElementsByTagName('TR') for(i=0;i' document.getElementById(cell_c).style.backgroundImage = 'url('+img_c+')' //document.getElementById(cell_c).style.fontWeight = fontW document.getElementById(cell_d).innerHTML = '' } function check_item(formulaire,fld,tr_dsp){ if(navigator.appName.indexOf("Internet Explorer") != -1){ dsp_block = "block"; }else{ dsp_block = "table-row"; } oForm = document.forms[formulaire] idx_slt = oForm.elements[fld].selectedIndex; if(idx_slt == oForm.elements[fld].options.length-1){ TR_display = dsp_block }else{ TR_display = "none"; } document.getElementById(tr_dsp).style.display = TR_display } function roll_cellule(cell,class_to,color_to){ cell.className = class_to; cell.style.backgroundColor = color_to } function check_all(formulaire,checkBName,ctrl_checkB){ ctrl_check = document.forms[formulaire].elements[ctrl_checkB] check_box = document.forms[formulaire].elements[checkBName] switch(ctrl_check.checked){ case true: checked_all = false break; case false: checked_all = true break; } for(chb=0;chb 0){ if(QTE <= stock){ location.href="http://www.luavista.net/panier/upt_panier.html?article_id="+MID+"&Qte="+QTE; }else{ alert("Quantitée demandée indisponible\nQuantité en stock : "+stock) } }else{ alert("Valeur incorrecte") } } function upt_Dst(pays_id,lng){ location.href="http://www.luavista.net//panier/consulter-"+pays_id+"-p.html" } function upt_Liv(livraison_id,lng){ location.href="http://www.luavista.net/panier/consulter.html?livraison_id="+livraison_id } function dsp_val(element,valeur){ document.forms[document.forms.length-2].elements[element].value = valeur } /* function act_livraison(action){ liv_zone = zone_livraison.getElementsByTagName('input'); switch(action){ case '1': document.getElementById('zone_livraison').style.display="none"; for(i=0;i1)&&(oForm.email.value.indexOf(".",1)>0)){ }else{ alert(txt_alert_email_inc); oForm.email.focus(); return false } oForm.panier_action.value="mdp"; oForm.submit(); break; case 'log': /* if(!oForm.nom.value){ alert(txt_alert_email) oForm.nom.focus(); return false } if(!oForm.prenom.value){ alert(txt_alert_email) oForm.prenom.focus(); return false } */ if(!oForm.email.value){ alert(txt_alert_email) oForm.email.focus(); return false } if ((oForm.email.value.indexOf("@",1)>1)&&(oForm.email.value.indexOf(".",1)>0)){ }else{ alert(txt_alert_email_inc); oForm.email.focus(); return false } if(!oForm.mdp.value){ alert(txt_alert_mdp) oForm.mdp.focus(); return false } oForm.panier_action.value="login"; oForm.submit(); break; case 'mailing': if(!oForm.nom.value){ alert(txt_alert_nom_liv) oForm.nom.focus(); return false } if(!oForm.prenom.value){ alert(txt_alert_prenom_liv) oForm.prenom.focus(); return false } if(!oForm.email.value){ alert(txt_alert_email) oForm.email.focus(); return false } if ((oForm.email.value.indexOf("@",1)>1)&&(oForm.email.value.indexOf(".",1)>0)){ }else{ alert(txt_alert_email_inc); oForm.email.focus(); return false } break; case 'upt_inscription': case 'inscription': if(!oForm.email.value){ alert(txt_alert_email) oForm.email.focus(); return false } if ((oForm.email.value.indexOf("@",1)>1)&&(oForm.email.value.indexOf(".",1)>0)){ }else{ alert(txt_alert_email_inc); oForm.email.focus(); return false } if(!oForm.mdp.value){ alert(txt_alert_mdp) oForm.mdp.focus(); return false } if(!oForm.mdp_confirm.value){ alert(txt_alert_mdp_confirm) oForm.mdp_confirm.focus(); return false } if(oForm.mdp.value!=oForm.mdp_confirm.value){ alert(txt_alert_mdp_confirm) oForm.mdp_confirm.focus(); return false } if(!oForm.nom.value){ alert(txt_alert_nom) oForm.nom.focus(); return false } if(!oForm.prenom.value){ alert(txt_alert_prenom) oForm.prenom.focus(); return false } if(!oForm.adresse.value){ alert(txt_alert_adresse) oForm.adresse.focus(); return false } if(!oForm.code_postal.value){ alert(txt_alert_code_postal) oForm.code_postal.focus(); return false } if(oForm.code_postal.value.substring(0,2) > 95){ alert(txt_alert_code_postal_err) oForm.code_postal.focus(); return false } if(!oForm.ville.value){ alert(txt_alert_code_ville) oForm.ville.focus(); return false } if(!oForm.tel.value){ alert(txt_alert_code_tel) oForm.tel.focus(); return false } if(!oForm.acc_cond.checked==true){ alert(txt_cond_ventes) oForm.acc_cond.focus(); return false } if(oForm.same_adr[1].checked==1){ if(!oForm.nom_liv.value){ alert(txt_alert_nom_liv) oForm.nom_liv.focus(); return false } if(!oForm.prenom_liv.value){ alert(txt_alert_prenom_liv) oForm.prenom_liv.focus(); return false } if(!oForm.adresse_liv.value){ alert(txt_alert_adresse_liv) oForm.adresse_liv.focus(); return false } if(!oForm.code_postal_liv.value){ alert(txt_alert_code_postal_liv) oForm.code_postal_liv.focus(); return false } if(oForm.code_postal_liv.value.substring(0,2) > 95){ alert(txt_alert_code_postal_err) oForm.code_postal.focus(); return false } if(!oForm.ville_liv.value){ alert(txt_alert_code_ville_liv) oForm.ville_liv.focus(); return false } if(!oForm.tel_liv.value){ alert(txt_alert_code_tel_liv) oForm.tel_liv.focus(); return false } if(oForm.email_liv.value){ if ((oForm.email_liv.value.indexOf("@",1)>1)&&(oForm.email_liv.value.indexOf(".",1)>0)){ }else{ alert(txt_alert_email_inc); oForm.email_liv.focus(); return false } } } break; } }