

function new_image(i,a,b){if(document.images){preload_image=new Image(25,25);preload_image.src='http://interface.passion-piercing.fr/zoom/loading.gif'}getElementById('photo_'+i).innerHTML='<img src="http://interface.passion-piercing.fr/zoom/loading.gif">';var q='ref='+a+'&i='+i+'&colori='+b;xml_im=appelAjax('POST','code/commande-directe/saisie_rapide_ajax.php',q);maj_image(i)}
function maj_image(i){xml_im.onreadystatechange=function(){if(xml_im.readyState==4){var a=xml_im.responseXML.getElementsByTagName('root')[0];var b='';for(var j=0;j<a.getElementsByTagName('image')[0].childNodes.length;j++)b+=a.getElementsByTagName('image')[0].childNodes[j].nodeValue;getElementById('photo_'+i).innerHTML=b}}}
function calc_total_qte(i,a,b){var q='ref='+a+'&i='+i+'&qte='+b;xml_qte=appelAjax('POST','code/commande-directe/saisie_rapide_ajax.php',q);maj_total_qte(i)}
function maj_total_qte(i){xml_qte.onreadystatechange=function(){if(xml_qte.readyState==4){var a=xml_qte.responseXML.getElementsByTagName('root')[0];var b='';for(var j=0;j<a.getElementsByTagName('total')[0].childNodes.length;j++)b+=a.getElementsByTagName('total')[0].childNodes[j].nodeValue;getElementById('total_'+i).innerHTML=b}}}
function load_colori_taille(i,a){if(document.images){preload_image=new Image(25,25);preload_image.src='http://interface.passion-piercing.fr/zoom/loading.gif'}getElementById('photo_'+i).innerHTML='<img src="http://interface.passion-piercing.fr/zoom/loading.gif">';var q='ref='+a+'&i='+i;xml=appelAjax('POST','code/commande-directe/saisie_rapide_ajax.php',q);maj_colori_taille(i);if(document.frm['zs_qte_'+i].value!=''){calc_total_qte(i,a,document.frm['zs_qte_'+i].value)}}
function maj_colori_taille(i){xml.onreadystatechange=function(){if(xml.readyState==4){var a=xml.responseXML.getElementsByTagName('root')[0];var b='';for(var j=0;j<a.getElementsByTagName('colori')[0].childNodes.length;j++)b+=a.getElementsByTagName('colori')[0].childNodes[j].nodeValue;getElementById('colori_'+i).innerHTML=b;var b='';for(var j=0;j<a.getElementsByTagName('taille')[0].childNodes.length;j++)b+=a.getElementsByTagName('taille')[0].childNodes[j].nodeValue;getElementById('taille_'+i).innerHTML=b;var b='';for(var j=0;j<a.getElementsByTagName('image')[0].childNodes.length;j++)b+=a.getElementsByTagName('image')[0].childNodes[j].nodeValue;getElementById('photo_'+i).innerHTML=b}}}
function autotab_l(a,b,c){var d=c.keyCode?c.keyCode:c.which?c.which:c.charCode;if(((d>64)&&(d<91))||((d>96)&&(d<123))){if(b!=null){if(a.getAttribute&&a.value.length==a.getAttribute("maxlength")){if(a.getAttribute&&a.value.length>1){window.setTimeout("",200)}b.select();b.focus()}}}}
function autotab_n(a,b,c){var d=c.keyCode?c.keyCode:c.which?c.which:c.charCode;if(((d>47)&&(d<58))||((d>95)&&(d<106))){if(b!=null){if(a.getAttribute&&a.value.length==a.getAttribute("maxlength")){if(a.getAttribute&&a.value.length>1){window.setTimeout("",200)}b.select();b.focus()}}}}
function CheckNr(a){return;if(a){if(a.value.length==0){a.value="0"}}}
function check_prod(i){var a='http://interface.passion-piercing.fr/zoom/loading.gif';if((document.getElementsByName('1_'+i)[0].value!='')&&(document.getElementsByName('2_'+i)[0].value!='')&&(document.getElementsByName('3_'+i)[0].value!='')&&(document.getElementsByName('4_'+i)[0].value!='')&&(document.getElementsByName('5_'+i)[0].value!='')&&(document.getElementsByName('6_'+i)[0].value!='')){load_colori_taille(i,document.getElementsByName('1_'+i)[0].value+document.getElementsByName('2_'+i)[0].value+document.getElementsByName('3_'+i)[0].value+document.getElementsByName('4_'+i)[0].value+document.getElementsByName('5_'+i)[0].value+document.getElementsByName('6_'+i)[0].value)}}