function disp_price(b,a,d){separator=new String("|");separator2=new String(".");var c=a.value;index_separator=c.indexOf(separator);prix=c.substr(index_separator+1);tmp=new String(Math.round(prix-(prix*(d/100))));index_sep=tmp.indexOf(separator2);if(index_sep!=-1){droite=tmp.substr(index_sep+1);longueur=tmp.length;remainstring=tmp.substr(index_sep).length;gauche=tmp.substr(0,longueur-remainstring);b.value=gauche+","+droite+" Euros"}else{b.value=tmp+" Euros"}}function disp_price2(e,d,a,c){separator=new String("|");separator2=new String(".");var b=a.value;index_separator=b.indexOf(separator);prix=b.substr(index_separator+1);tmp=new String(Math.round(prix-(prix*(c/100))));index_sep=tmp.indexOf(separator2);if(index_sep!=-1){droite=tmp.substr(index_sep+1);longueur=tmp.length;remainstring=tmp.substr(index_sep).length;gauche=tmp.substr(0,longueur-remainstring);e.value=gauche+","+droite+" Euros"}else{e.value=tmp+" Euros"}tmp=new String(prix);index_sep=tmp.indexOf(separator2);if(index_sep!=-1){droite=tmp.substr(index_sep+1);longueur=tmp.length;remainstring=tmp.substr(index_sep).length;gauche=tmp.substr(0,longueur-remainstring);d.value=gauche+","+droite+" Euros"}else{d.value=tmp+" Euros"}}function disp_price3(e,d,a,c){TxtString=new String(a.text);separator=new String("|");separator2=new String(".");if(TxtString.search("Sommier Tapissier Recouvert")){var b=a.value;index_separator=b.indexOf(separator);prix=b.substr(index_separator+1);e.value=prix+" Euros";d.value=""}else{var b=a.value;index_separator=b.indexOf(separator);prix=b.substr(index_separator+1);tmp=new String(Math.round(prix-(prix*(c/100))));index_sep=tmp.indexOf(separator2);if(index_sep!=-1){droite=tmp.substr(index_sep+1);longueur=tmp.length;remainstring=tmp.substr(index_sep).length;gauche=tmp.substr(0,longueur-remainstring);e.value=gauche+","+droite+" Euros"}else{e.value=tmp+" Euros"}tmp=new String(prix);index_sep=tmp.indexOf(separator2);if(index_sep!=-1){droite=tmp.substr(index_sep+1);longueur=tmp.length;remainstring=tmp.substr(index_sep).length;gauche=tmp.substr(0,longueur-remainstring);d.value=gauche+","+droite+" Euros"}else{d.value=tmp+" Euros"}}}function add_item1(a,c,d,b){if(b.value!=""){select_items=ParseTwoItem(c.value,"|");a.value=select_items[0];d.intitule.value=c.text;d.prix.value=b.value;d.submit()}}function add_item_special1_1(a,c,d,b,e){if(b.value!=""){select_items=ParseTwoItem(c.value,"|");a.value=select_items[0];d.intitule.value=e.value;d.prix.value=b.value;d.submit()}}function add_item_special2_1(a,c,d,b){if(b.value!=""){select_items=ParseTwoItem(c.value,"|");a.value=select_items[0];d.intitule.value=c.text;d.prix.value=b.value;d.submit()}}function add_item_special3_1(e,d,c,b,a){if(c.value!=""){e.id_ref.value=d.value;e.intitule.value=b.text+"<br>"+a.text;e.prix.value=c.value;e.submit()}}function add_item_special3_1_1(d,c,b,a){if(b.value!=""){d.id_ref.value=c.value;d.intitule.value=a.text;d.prix.value=b.value;d.submit()}}function getImage1(b,a){b=new String(b);b=b.toLowerCase();only_img=1;if(b.substring(0,("matelas").length)=="matelas"){tmp_img="../produits/images/bimg_"+a+".jpg";open("../produits/det1_literie.php?id="+a+"","det","width=750,height=470");only_img=0}else{if(b.substring(0,("sommier tapissier recouvert").length)=="sommier tapissier recouvert"){tmp_img="../produits/images/sommier_"+a+".jpg";open("../produits/det1_literie_spec.php?id="+a+"","det","width=750,height=470");only_img=0}else{if(b.substring(0,("cadre a lattes").length)=="cadre a lattes"){tmp_img="../produits/images/cl.jpg";open("../produits/det1_literie_cl.php?id="+a+"","det","width=750,height=470");only_img=0}else{if(b.substring(0,("jeu de pieds pour sommier cylindre clair").length)=="jeu de pieds pour sommier cylindre clair"){tmp_img="../produits/images/JPFCC.jpg";open("../produits/det1_literie_JPFCC.php?id="+a+"","det","width=750,height=470");only_img=0}else{if(b.substring(0,("jeu de pieds pour sommier cylindre foncee").length)=="jeu de pieds pour sommier cylindre foncee"){tmp_img="../produits/images/JPFCF.jpg";open("../produits/det1_literie_JPFCF.php?id="+a+"","det","width=750,height=470");only_img=0}else{if(b.substring(0,("jeu de pieds cadre a lattes").length)=="jeu de pieds cadre a lattes"){tmp_img="../produits/images/PCL.jpg";open("../produits/det1_literie_PCL.php?id="+a+"","det","width=750,height=470");only_img=0}else{tmp_img="../produits/images/blankb.jpg";only_img=0}}}}}}if(only_img){i1=new Image;i1.src=tmp_img;html='<HTML><HEAD><TITLE>Image</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0 onload="this.focus();"><CENTER><IMG style="cursor: pointer" onclick="window.close();" SRC="'+tmp_img+'" BORDER=0 NAME=imageTest></CENTER></BODY></HTML>';popupImage=window.open("","prevu","width=400,height=400,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0");popupImage.document.open();popupImage.document.write(html);popupImage.document.close()}}function IsDigit1(a){if(a=="0"||a=="1"||a=="2"||a=="3"||a=="4"||a=="5"||a=="6"||a=="7"||a=="8"||a=="9"){return true}return false}function IsAllDigit2(a){var c=a;for(i=0;i<c.length;i++){var b=c.substring(i,i+1);if(IsDigit1(b)==false){return false}}return true}function ParseTwoItem(c,b){b=new String(b);var d=new String(c);var h=d.indexOf(b);if(h!=-1){var j=d.substr(h+1);var f=d.length;var e=d.substr(h).length;var g=d.substr(0,f-e);var a=new Array(g,j)}else{var a=new Array("","")}return a}function Apply(e,a,g,b,c,f){x=e.length;var d=false;for(i=0;i<x;i++){if(e[i][0]==a&&e[i][1]==g&&e[i][2]==b){f.value=e[i][3];c.value=e[i][4]+" Euros";d=true}}if(!d){f.value="";c.value="N/C"}return d}function ApplyLDL(j,b,e,a,c,h,d,f,g){x=j.length;var k=false;for(i=0;i<x;i++){if(j[i][0]==b&&j[i][1]==e&&j[i][2]==a){h.value=j[i][3];if(g!=undefined){g.value=j[i][5]}if(f!=undefined){tmp=new String(Math.round(j[i][4]-(j[i][4]*(d/100))));c.value=tmp+" Euros";f.value=j[i][4]+" uros";if($("#sticker_cofinoga_see_more .price_calculated").length!=0){$("#sticker_cofinoga_see_more .price_calculated").cofinoga_calculated(f.value)}}else{c.value=j[i][4]+" Euros";if($("#sticker_cofinoga_see_more .price_calculated").length!=0){$("#sticker_cofinoga_see_more .price_calculated").cofinoga_calculated(c.value)}}k=true}}if(!k){h.value="";c.value="N/C"}return k}function OverJqImg(){if(document.getElementById("zoomroulant")){document.getElementById("zoomroulant").src="/habillage/zoomOver.gif"}}function OutJqImg(){if(document.getElementById("zoomroulant")){document.getElementById("zoomroulant").src="/habillage/zoomOut.gif"}}function ap_getObj(a){if(document.getElementById(a)!=null){return document.getElementById(a).style}else{if(document.all){return document.all[a].style}else{if(document.layers){return document.layers[a]}}}}function ap_showWaitMessage(b,a){}function ChangePriceLDL(d,h,b,e,k,f,g,j){var c=ParseTwoItem(h,"|");var a=ParseTwoItem(b,"|");if(!ApplyLDL(d,c[0],c[1],a[0],e,k,f,g,j)){}}function ChangePrice(c,g,b,d,f){var e=ParseTwoItem(g,"|");var a=ParseTwoItem(b,"|");if(!Apply(c,e[0],e[1],a[0],d,f)){}}function SetSelectedPrice(b,a){if(!ParseArray(b,a)){}}function ParseArray(c,a){x=c.length;var b=false;for(i=0;i<x;i++){if(c[i][0]==a.ref.value){if(a.delay!=undefined){a.delay.value=c[i][4]}prix=c[i][2];if(a.cheque!=undefined){if(prix>450){tmp1=new String(Math.round(prix/3));a.cheque.value="3 mensualités : "+tmp1+" Euros"}else{a.cheque.value="à partir de 450 Euros"}}if(a.prix_public!=undefined){a.prix_public.value=c[i][3]+" Euros"}a.prix.value=c[i][2]+" Euros";b=true}}if(!b){a.xprix.value="N/C";if(a.prix_public!=undefined){a.prix_public.value="N/C"}if(a.cheque!=undefined){a.cheque.value="N/C"}if(a.delay!=undefined){a.delay.value="N/C"}}return b}function SetSelectedPriceRemised(b,a,c){if(!ParseArrayRemised(b,a,c)){}}function ParseArrayRemised(d,a,b){x=d.length;var c=false;for(i=0;i<x;i++){if(d[i][0]==a.ref.value){prix=d[i][2];if(a.remised_prix!=undefined){tmp=new String(Math.round(prix-(prix*(b/100))));a.remised_prix.value=tmp+" Euros"}if(a.delay!=undefined){a.delay.value=d[i][4]}if(a.cheque!=undefined){if(prix>450){tmp1=new String(Math.round(prix/3));a.cheque.value="3 mensualités : "+tmp1+" Euros"}else{a.cheque.value="à partir de 450 Euros"}}a.prix.value=d[i][2]+" Euros";if(a.prix_public!=undefined){a.prix_public.value=d[i][3]+" Euros"}c=true}}if(!c){if(a.remised_prix!=undefined){a.remised_prix.value="N/C"}if(a.prix_public!=undefined){a.prix_public.value="N/C"}a.xprix.value="N/C";if(a.cheque!=undefined){a.cheque.value="N/C"}if(a.delay!=undefined){a.delay.value="N/C"}}return c}function getImage3(b){var a=ParseTwoItem(b,"|");b=new String(a[1]);tmp_img="../habillage/echantillon/"+b;only_img=1;if(only_img){i1=new Image;i1.src=tmp_img;html='<HTML><HEAD><TITLE>Image</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0 onload="this.focus();"><CENTER><IMG style="cursor: pointer" onclick="window.close();" SRC="'+tmp_img+'" BORDER="0" ALT="Click pour fermer la fenêtre" TITLE="Click pour fermer la fenêtre" NAME="imageTest"></CENTER></BODY></HTML>';popupImage=window.open("","prevu","width=120,height=120,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0");popupImage.document.open();popupImage.document.write(html);popupImage.document.close()}}function getImageZIT(a){tmp_img=a;only_img=1;if(only_img){i1=new Image;i1.src=tmp_img;html='<HTML><HEAD><TITLE>Image</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0 onload="this.focus();"><CENTER><IMG style="cursor: pointer" onclick="window.close();" SRC="'+tmp_img+'" BORDER="0" ALT="Click pour fermer la fenêtre" TITLE="Click pour fermer la fenêtre" NAME="imageTest"></CENTER></BODY></HTML>';popupImage=window.open("","prevu","width=404,height=404,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0");popupImage.document.open();popupImage.document.write(html);popupImage.document.close()}}function ChangePriceLDL(d,h,b,e,k,f,g,j){var c=ParseTwoItem(h,"|");var a=ParseTwoItem(b,"|");if(!ApplyLDL(d,c[0],c[1],a[0],e,k,f,g,j)){}}function getImage2(b){var a=ParseTwoItem(b,"|");b=new String(a[1]);tmp_img="../habillage/echantillon/"+b;only_img=1;if(only_img){i1=new Image;i1.src=tmp_img;html='<HTML><HEAD><TITLE>Image</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0 onload="this.focus();"><CENTER><IMG style="cursor: pointer" onclick="window.close();" SRC="'+tmp_img+'" BORDER=0 NAME=imageTest></CENTER></BODY></HTML>';popupImage=window.open("","prevu","width=120,height=120,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0");popupImage.document.open();popupImage.document.write(html);popupImage.document.close()}}function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore){selObj.selectedIndex=0}}$(document).ready(function(){$("#wait").css("display","none")});$(document).ready(function(){if($("div#top_caddy").length!=0){$.post("/jq_calls/jq_server.php?q=get_top_caddy",{},function(a,b){if(b=="success"){if(a!=""){$("#top_caddy").html(a);$("#slogan").css("display","none");$("#top_caddy").css("display","block")}else{$("#top_caddy").html(a);$("#slogan").css("display","none");$("#top_caddy").css("display","block")}}},"text");$("div#top_caddy").click(function(){var a=$("div#top_caddy img[class!='empty_caddy']");if(a.length>0){$(location).attr("href","/order/panier.php")}});$("#bt_current_caddy_left").click(function(a){$("#caddy_details").dialog("destroy");$(location).attr("href","#")});$("#bt_current_caddy_right").click(function(a){$("#caddy_details").dialog("destroy");$(location).attr("href","/order/panier.php")});$("#add_in_caddy").click(function(a){$("#add_in_caddy").fadeTo("slow",0.33);if($("#form_product").find("input[name='confort'][type='hidden']").attr("value")=="zit"){alert("Vous devez choisir votre confort!");$("#add_in_caddy").fadeTo("slow",1);return false}$.post("/jq_calls/jq_server.php?q=set_in_caddy",$("#form_product").serializeArray(),function(b,c){if(c=="success"){$.post("/jq_calls/jq_server.php?q=get_caddy_details",{},function(d,e){if(e=="success"){$("#current_caddy_details").html(d);$("#caddy_details").dialog({bgiframe:false,resizable:false,width:650,modal:true,position:["center",40],title:"Détails de votre panier",overlay:{backgroundColor:"#000",opacity:0.5},beforeclose:function(f,g){$(this).dialog("destroy")}})}},"text");$.post("/jq_calls/jq_server.php?q=get_top_caddy",{},function(d,e){if(e=="success"){if(d!=""){$("#top_caddy").html(d);$("#slogan").css("display","none");$("#top_caddy").css("display","block")}else{$("#top_caddy").html(d);$("#slogan").css("display","none");$("#top_caddy").css("display","block")}}},"text")}},"json");$("#add_in_caddy").fadeTo("slow",1)});$("#left_marque_selector").find("a").click(function(a){$("#form_left_marque_selector").find("input[name='marque'][type='hidden']").attr("value",a.currentTarget.id);$("#form_left_marque_selector").find("input[name='action'][type='hidden']").attr("value","chx_mark");$("#form_left_marque_selector").find("input[value=''][type='hidden']").remove();$("#form_left_marque_selector").submit()});$("#logo_marque_selector").find("a").click(function(a){$("#form_left_marque_selector").find("input[name='marque'][type='hidden']").attr("value",a.currentTarget.id);$("#form_left_marque_selector").find("input[name='action'][type='hidden']").attr("value","chx_mark");$("#form_left_marque_selector").find("input[value=''][type='hidden']").remove();$("#form_left_marque_selector").submit()});if($("#main_body").find("a[name='produits']").attr("class")=="position_it"){$(location).attr("href","#produits")}$("#id_livraison").find("a").click(function(a){if(a.currentTarget.id=="1"){$(location).attr("href","/livraison.php#tabs-1");window.location.reload(true)}if(a.currentTarget.id=="2"){$(location).attr("href","/livraison.php#tabs-2");window.location.reload(true)}if(a.currentTarget.id=="3"){$(location).attr("href","/livraison.php#tabs-3");window.location.reload(true)}if(a.currentTarget.id=="4"){$(location).attr("href","/livraison.php#tabs-4");window.location.reload(true)}if(a.currentTarget.id=="5"){$(location).attr("href","/livraison.php#tabs-5");window.location.reload(true)}})}});$(document).ready(function(){$("#input_searched_ref").focus(function(){$("#form_ref_search").find("input[name='searched_ref']").val("")});$("#submit_ref_search").click(function(a){if($("#form_ref_search").find("input[name='searched_ref']").val()!=""&&$("#form_ref_search").find("input[name='searched_ref']").val()!="saisissez-ici"){$.post("/jq_calls/jq_server.php?q=get_a_reference",{searched_ref:$("#form_ref_search").find("input[name='searched_ref']").val()},function(b,c){if(c=="success"){if(b.result=="reserved_found"){$(location).attr("href",b.link)}else{$(location).attr("href","/mareference")}}else{}},"json")}else{$("#form_ref_search").find("input[name='searched_ref']").val("saisissez-ici")}})});$(document).ready(function(){$("#sticker_cofinoga").find(".clickme").click(function(a){showCofinogaPopUpSeeMore()});if($("#sticker_cofinoga_see_more").length!=0){$("#sticker_cofinoga_see_more").tooltip({track:true,delay:0,showURL:false,showBody:" - ",fade:250});$("#sticker_cofinoga_see_more").find(".clickme").click(function(a){showCofinogaPopUpSeeMore()})}});$(document).ready(function(){if($("#payment_choice").length!=0){var d=$("#payment_choice img#bt_cheque_3x");d.hover(function(){d.attr("src","/habillage/boutons_orange/afficher_formulaire_on.jpg")},function(){d.attr("src","/habillage/boutons_orange/afficher_formulaire_off.jpg")});var g=$("#payment_choice img#bt_cadhoc");g.hover(function(){g.attr("src","/habillage/boutons_orange/afficher_formulaire_on.jpg")},function(){g.attr("src","/habillage/boutons_orange/afficher_formulaire_off.jpg")});var e=$("#payment_choice img#bt_tel");e.hover(function(){e.attr("src","/habillage/boutons_orange/afficher_formulaire_on.jpg")},function(){e.attr("src","/habillage/boutons_orange/afficher_formulaire_off.jpg")});var j=$("#payment_choice img#bt_virement");j.hover(function(){j.attr("src","/habillage/boutons_orange/afficher_formulaire_on.jpg")},function(){j.attr("src","/habillage/boutons_orange/afficher_formulaire_off.jpg")});var b=$("#payment_choice img#payer_paypal");b.hover(function(){b.attr("src","/habillage/boutons_orange/payer_paypal_on.jpg")},function(){b.attr("src","/habillage/boutons_orange/payer_paypal_off.jpg")});var a=$("#payment_choice input#payer_amex");a.hover(function(){a.attr("src","/habillage/boutons_orange/payer_americanexpress_on.jpg")},function(){a.attr("src","/habillage/boutons_orange/payer_americanexpress_off.jpg")});var f=$("#payment_choice input#payer_aurore");f.hover(function(){f.attr("src","/habillage/boutons_orange/payer_aurore_on.jpg")},function(){f.attr("src","/habillage/boutons_orange/payer_aurore_off.jpg")});var c=$("#payment_choice input#payer_cofinoga");c.hover(function(){c.attr("src","/habillage/boutons_orange/payer_cofinoga_on.jpg")},function(){c.attr("src","/habillage/boutons_orange/payer_cofinoga_off.jpg")});var h=$("#payment_choice input#payer_cb");h.hover(function(){h.attr("src","/habillage/boutons_orange/payer_cartebancaire_on.jpg")},function(){h.attr("src","/habillage/boutons_orange/payer_cartebancaire_off.jpg")})}});(function(a){a.fn.cofinoga_calculated=function(c){var b=c.replace(" Euros","");price=Math.ceil(b/3);if(b>=499){a("#sticker_cofinoga_see_more").css("display","block");a("#sticker_cofinoga_see_more .price_calculated").html(price.toString()+"&#8364;")}else{a("#sticker_cofinoga_see_more").css("display","none")}}})(jQuery);$(document).ready(function(){$("#paiement_v2").find(".clickme").click(function(a){showCofinogaPopUp()})});function showCofinogaPopUp(){popupImage=window.open("/articles/__popup_cofinoga.php","cofinoga","width=800,height=500,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0")}function showCofinogaPopUpSeeMore(){popupImage=window.open("/articles/__popup_cofinoga.php?type=3x","cofinoga","width=800,height=500,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0")};
