
libcalculateur=new Array();for(i=0;i<22;i++){libcalculateur[i]=new Array();}
libcalculateur[0]["FR"]="Payer en ligne";libcalculateur[0]["EN"]="Pay online";libcalculateur[1]["FR"]="Veuillez choisir le tirage";libcalculateur[1]["EN"]="Choose the print run";libcalculateur[2]["FR"]="Veuillez choisir le support";libcalculateur[2]["EN"]="Choose the media";libcalculateur[3]["FR"]="Veuillez choisir le format";libcalculateur[3]["EN"]="Choose the format";libcalculateur[4]["FR"]="Veuillez choisir la durée";libcalculateur[4]["EN"]="Choose the duration";libcalculateur[5]["FR"]="Options supplémentaires : ";libcalculateur[5]["EN"]="Additional options : ";libcalculateur[6]["FR"]="Réutilisation sur le site internet du support";libcalculateur[6]["EN"]="Re-use on website";libcalculateur[7]["FR"]="Utilisation de fac-simile (affichage, dos de kiosques, matériel publicitaire ou spots TV)";libcalculateur[7]["EN"]="Facsimile (display, back of kiosk, advertizing material or TV spots)";libcalculateur[8]["FR"]="Droits d'extension Europe";libcalculateur[8]["EN"]="Rights of extension for Europe";libcalculateur[9]["FR"]="Droits d'extension Monde";libcalculateur[9]["EN"]="Rights of extension for worldwide";libcalculateur[10]["FR"]="Prix : ";libcalculateur[10]["EN"]="Price : ";libcalculateur[11]["FR"]="Choisir";libcalculateur[11]["EN"]="Choose";libcalculateur[12]["FR"]="Pour cette utilisation,";libcalculateur[12]["EN"]="For this use";libcalculateur[13]["FR"]="Nous contacter par ";libcalculateur[13]["EN"]="Please contact us by ";libcalculateur[14]["FR"]="demande de devis ";libcalculateur[14]["EN"]="price quote ";libcalculateur[15]["FR"]="ou par ";libcalculateur[15]["EN"]="or by ";libcalculateur[16]["FR"]="téléphone";libcalculateur[16]["EN"]="phone";libcalculateur[17]["FR"]="Choisir une autre utilisation ?";libcalculateur[17]["EN"]="Choose another image usage ?";libcalculateur[18]["FR"]="Choisir un autre format ?";libcalculateur[18]["EN"]="Choose another format";libcalculateur[19]["FR"]="Vous devez déterminer un prix pour cette image !";libcalculateur[19]["EN"]="You must set a price for this image";libcalculateur[20]["FR"]="Reprise sur site web";libcalculateur[20]["EN"]="Re-use on website";libcalculateur[21]["FR"]="Droit d'extension à 1 ou 2 pays";libcalculateur[21]["EN"]="Rights of extension to 1 or 2 countries";function propose_utilisation(nomselect,N_ID,typeapp){var CodeSecteur=0;var objet_select=document.getElementById("calculateurRM"+N_ID);if(objet_select!=null){if(objet_select.options.selectedIndex>=0){CodeSecteur=objet_select.options[objet_select.options.selectedIndex].value;}}
switch(CodeSecteur){case"1":var CodeSousCat=100;var CodeTirage=0;var CodeFormat=0;var CodeDuree=0;break;case"2":var CodeSousCat=100;var CodeTirage=0;var CodeFormat=0;var CodeDuree=0;break;case"3":var CodeSousCat=0;var CodeTirage=0;var CodeFormat=0;var CodeDuree=0;break;case"4":var CodeSousCat=0;var CodeTirage=0;var CodeFormat=0;break;default:var CodeSousCat=0;var CodeTirage=0;var CodeFormat=0;var CodeDuree=0;break;}
if(nomselect=='calculateurRMSC'+N_ID||nomselect=='calculateurRMT'+N_ID||nomselect=='calculateurRMF'+N_ID||nomselect=='calculateurRMD'+N_ID){var objet_select=document.getElementById("calculateurRMSC"+N_ID);if(objet_select!=null){if(objet_select.options.selectedIndex>=0){CodeSousCat=objet_select.options[objet_select.options.selectedIndex].value;}}}
if(nomselect=='calculateurRMT'+N_ID||nomselect=='calculateurRMF'+N_ID||nomselect=='calculateurRMD'+N_ID){var objet_select=document.getElementById("calculateurRMT"+N_ID);if(objet_select!=null){if(objet_select.options.selectedIndex>=0){CodeTirage=objet_select.options[objet_select.options.selectedIndex].value;}}}
if(nomselect=='calculateurRMF'+N_ID||nomselect=='calculateurRMD'+N_ID){var objet_select=document.getElementById("calculateurRMF"+N_ID);if(objet_select!=null){if(objet_select.options.selectedIndex>=0){CodeFormat=objet_select.options[objet_select.options.selectedIndex].value;}}}
if(nomselect=='calculateurRMD'+N_ID){var objet_select=document.getElementById("calculateurRMD"+N_ID);if(objet_select!=null){if(objet_select.options.selectedIndex>=0){CodeDuree=objet_select.options[objet_select.options.selectedIndex].value;}}}
var elementVisu=document.getElementById("calculateursuite"+N_ID);if(elementVisu!=null){while(elementVisu.firstChild){elementVisu.removeChild(elementVisu.firstChild);}}
var codenext=false;switch(CodeSecteur){case"1":var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat=100&codetirage=0&codeformat=0&codeduree=0");create_select(elementVisu,result,"calculateurRMT"+N_ID,CodeTirage,0,libcalculateur[1][lang_dir],pays_aff,N_ID,typeapp);break;case"2":var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat=100&codetirage=0&codeformat=0&codeduree=0");create_select(elementVisu,result,"calculateurRMT"+N_ID,CodeTirage,0,libcalculateur[1][lang_dir],pays_aff,N_ID,typeapp);break;case"3":var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat=0&codetirage=0&codeformat=0&codeduree=0");create_select(elementVisu,result,"calculateurRMSC"+N_ID,CodeSousCat,0,libcalculateur[2][lang_dir],pays_aff,N_ID,typeapp);break;case"4":var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat=0&codetirage=0&codeformat=0&codeduree=0");resulttab0=result.split("<sep1>");if(resulttab0[0]>100){create_select(elementVisu,result,"calculateurRMSC"+N_ID,CodeSousCat,0,libcalculateur[2][lang_dir],pays_aff,N_ID,typeapp);}else{CodeSousCat=100;codenext=true;}
break;default:break;}
if(CodeSousCat>100||codenext){var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat="+CodeSousCat+"&codetirage=0&codeformat=0&codeduree=0");resulttab1=result.split("<sep1>");if(resulttab1[0]>500){create_select(elementVisu,result,"calculateurRMT"+N_ID,CodeTirage,0,libcalculateur[1][lang_dir],pays_aff,N_ID,typeapp);}else{CodeTirage=500;codenext=true;}}
if(CodeTirage>500||codenext){codenext=false;var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat="+CodeSousCat+"&codetirage="+CodeTirage+"&codeformat=0&codeduree=0");resulttab2=result.split("<sep1>");if(resulttab2[0]>1000){create_select(elementVisu,result,"calculateurRMF"+N_ID,CodeFormat,0,libcalculateur[3][lang_dir],pays_aff,N_ID,typeapp);}else{CodeFormat=1000;codenext=true;}}
if(CodeFormat>1000||codenext){codenext=false;var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat="+CodeSousCat+"&codetirage="+CodeTirage+"&codeformat="+CodeFormat+"&codeduree=0");resulttab3=result.split("<sep1>");if(resulttab3[0]>1500){create_select(elementVisu,result,"calculateurRMD"+N_ID,CodeDuree,0,libcalculateur[4][lang_dir],pays_aff,N_ID,typeapp);}else{CodeDuree=1500;codenext=true;}}
if(CodeDuree>1500||codenext){var result=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codesouscat="+CodeSousCat+"&codetirage="+CodeTirage+"&codeformat="+CodeFormat+"&codeduree="+CodeDuree);if(result>0){if(CodeSecteur==1||CodeSecteur==2||CodeSecteur==3){createDIVtext(elementVisu,libcalculateur[5][lang_dir],"10","");create_img_sep(elementVisu,1,4);create_elemenetBR(elementVisu);var resultOption=requeteSQL(ADR_SITE+"/cmn/php/calculateurRM.php?lang_dir="+lang_dir+"&pays_aff="+pays_aff+"&codesecteur="+CodeSecteur+"&codeduree="+CodeDuree+"&codeoption=o");resultOption_t=resultOption.split(":");resultOption_t3=new Array;for(k=0;k<resultOption_t.length;k++){resultOption_t2=resultOption_t[k].split("_");resultOption_t3[resultOption_t2[0]]=resultOption_t2[1];}
switch(CodeSecteur){case"1":create_casecoche(elementVisu,libcalculateur[6][lang_dir],resultOption_t3[CodeSecteur+"P1"],CodeSecteur+"P1",N_ID,null,null,null,null);create_casecoche(elementVisu,libcalculateur[7][lang_dir],resultOption_t3[CodeSecteur+"P4"],CodeSecteur+"P4",N_ID,null,null,null,null);create_casecoche(elementVisu,libcalculateur[8][lang_dir],resultOption_t3[CodeSecteur+"P2"],CodeSecteur+"P2",N_ID,resultOption_t3[CodeSecteur+"P3"],CodeSecteur+"P3",null,null);create_casecoche(elementVisu,libcalculateur[9][lang_dir],resultOption_t3[CodeSecteur+"P3"],CodeSecteur+"P3",N_ID,resultOption_t3[CodeSecteur+"P2"],CodeSecteur+"P2",null,null);break;case"2":create_casecoche(elementVisu,libcalculateur[6][lang_dir],resultOption_t3[CodeSecteur+"P1"],CodeSecteur+"P1",N_ID,null,null,null,null);create_casecoche(elementVisu,libcalculateur[8][lang_dir],resultOption_t3[CodeSecteur+"P2"],CodeSecteur+"P2",N_ID,resultOption_t3[CodeSecteur+"P3"],CodeSecteur+"P3",null,null);create_casecoche(elementVisu,libcalculateur[9][lang_dir],resultOption_t3[CodeSecteur+"P3"],CodeSecteur+"P3",N_ID,resultOption_t3[CodeSecteur+"P2"],CodeSecteur+"P2",null,null);break;case"3":create_casecoche(elementVisu,libcalculateur[20][lang_dir],resultOption_t3[CodeSecteur+"P1"],CodeSecteur+"P1",N_ID,null,null,null,null);create_casecoche(elementVisu,libcalculateur[21][lang_dir],resultOption_t3[CodeSecteur+"P2"],CodeSecteur+"P2",N_ID,resultOption_t3[CodeSecteur+"P3"],CodeSecteur+"P3",resultOption_t3[CodeSecteur+"P4"],CodeSecteur+"P4");create_casecoche(elementVisu,libcalculateur[8][lang_dir],resultOption_t3[CodeSecteur+"P3"],CodeSecteur+"P3",N_ID,resultOption_t3[CodeSecteur+"P2"],CodeSecteur+"P2",resultOption_t3[CodeSecteur+"P4"],CodeSecteur+"P4");create_casecoche(elementVisu,libcalculateur[9][lang_dir],resultOption_t3[CodeSecteur+"P4"],CodeSecteur+"P4",N_ID,resultOption_t3[CodeSecteur+"P2"],CodeSecteur+"P2",resultOption_t3[CodeSecteur+"P3"],CodeSecteur+"P3");break;default:break;}
create_img_sep(elementVisu,1,6);create_elemenetBR(elementVisu);}
var elementVisuTxt=document.createTextNode(libcalculateur[10][lang_dir]);var ElementBold=document.createElement("b");var contenuprix=document.createElement("span");contenuprix.setAttribute("id","ppelc"+N_ID);var elementVisuTxt1=document.createTextNode(affiche_decimal(result));contenuprix.appendChild(elementVisuTxt1);ElementBold.appendChild(contenuprix);var elementVisuTxt2=document.createTextNode(" EUR");ElementBold.appendChild(elementVisuTxt2);if(PEL_ACTIVATION){var elementVisuTxt3=document.createTextNode(" - ");}else{var elementVisuTxt3=document.createTextNode(" ");}
var contenuDIV=document.createElement("div");if(IE&&!onWindows){contenuDIV.style.cssText="font-family:verdana,arial,helvetica,sans-serif;font-size:12px;";}
if(IE&&onWindows){contenuDIV.style.setAttribute("cssText","font-family:verdana,arial,helvetica,sans-serif;font-size:12px;");}else{contenuDIV.setAttribute("style","font-family:verdana,arial,helvetica,sans-serif;font-size:12px;");}
contenuDIV.appendChild(elementVisuTxt);contenuDIV.appendChild(ElementBold);contenuDIV.appendChild(elementVisuTxt3);create_img_sep(contenuDIV,6,1);if(PEL_ACTIVATION){if(typeapp==1){var elementVisuTxt=document.createTextNode(libcalculateur[11][lang_dir]);var contenuLien=document.createElement("a");CodeSecteurT=CodeSecteur;CodeSousCatT=CodeSousCat-100;CodeTirageT=CodeTirage-500;CodeFormatT=CodeFormat-1000;CodeDureeT=CodeDuree-1500;contenuLien.setAttribute("href","javascript:ajouteprix('"+N_ID+"','rm');");}else{var elementVisuTxt=document.createTextNode(libcalculateur[0][lang_dir]);var contenuLien=document.createElement("a");CodeSecteurT=CodeSecteur;CodeSousCatT=CodeSousCat-100;CodeTirageT=CodeTirage-500;CodeFormatT=CodeFormat-1000;CodeDureeT=CodeDuree-1500;var elementhidden=document.createElement("input");elementhidden.setAttribute("type","hidden");elementhidden.setAttribute("id","cdrmun"+N_ID);elementhidden.setAttribute("value","m"+CodeSecteurT+"_"+CodeSousCatT+"_"+CodeTirageT+"_"+CodeFormatT+"_"+CodeDureeT);elementVisu.appendChild(elementhidden);contenuLien.setAttribute("href","javascript:PaiementPopup('"+N_ID+"','rm');");}
contenuLien.appendChild(elementVisuTxt);contenuDIV.appendChild(contenuLien);}
var elementhidden=document.createElement("input");elementhidden.setAttribute("type","hidden");elementhidden.setAttribute("id","hppelc"+N_ID);elementhidden.setAttribute("value",result);elementVisu.appendChild(elementhidden);create_elemenetBR(contenuDIV);create_img_sep(contenuDIV,1,6);create_elemenetBR(contenuDIV);elementVisu.appendChild(contenuDIV);}else{var contenuDIV=document.createElement("div");if(IE&&!onWindows){contenuDIV.style.cssText="font-family:verdana,arial,helvetica,sans-serif;font-size:11px;";}
if(IE&&onWindows){contenuDIV.style.setAttribute("cssText","font-family:verdana,arial,helvetica,sans-serif;font-size:11px;");}else{contenuDIV.setAttribute("style","font-family:verdana,arial,helvetica,sans-serif;font-size:11px;");}
var elementVisuTxt0=document.createTextNode(libcalculateur[12][lang_dir]);var elementVisuTxt0B=document.createTextNode(libcalculateur[13][lang_dir]);var elementVisuTxt1=document.createTextNode(libcalculateur[14][lang_dir]);var elementVisuTxt2=document.createTextNode(libcalculateur[15][lang_dir]);var elementVisuTxt3=document.createTextNode(libcalculateur[16][lang_dir]);var contenuLien=document.createElement("a");var contenuLien2=document.createElement("a");if(popupactive==0){contenuLien.setAttribute("href","javascript:bascule_basic_devis('Devisform');");contenuLien2.setAttribute("href","javascript:bascule_basic_contact('Contactform');");}else{contenuLien.setAttribute("href","javascript:bascule_basic_p('Devisform');");contenuLien2.setAttribute("href","javascript:bascule_basic_p('Contactform');");}
contenuLien.appendChild(elementVisuTxt1);contenuLien2.appendChild(elementVisuTxt3);create_img_sep(contenuDIV,1,4);create_elemenetBR(contenuDIV);contenuDIV.appendChild(elementVisuTxt0);create_elemenetBR(contenuDIV);create_img_sep(contenuDIV,1,4);create_elemenetBR(contenuDIV);contenuDIV.appendChild(elementVisuTxt0B);contenuDIV.appendChild(contenuLien);contenuDIV.appendChild(elementVisuTxt2);contenuDIV.appendChild(contenuLien2);create_elemenetBR(contenuDIV);create_img_sep(contenuDIV,1,6);create_elemenetBR(contenuDIV);elementVisu.appendChild(contenuDIV);}}}
function create_casecoche(elementVisu,elementInputText,valueSup,valueSupID,N_ID,valueSup2,valueSupID2,valueSup3,valueSupID3){var elementTable=document.createElement("table");elementTable.setAttribute("cellpadding","0");elementTable.setAttribute("cellspacing","0");elementTable.setAttribute("border","0");var tbody_element=document.createElement("tbody");var elementTR=document.createElement("tr");var elementTD0=document.createElement("td");create_img_sep(elementTD0,4,1);var elementTD1=document.createElement("td");var elementInput=document.createElement("input");elementInput.setAttribute("type","checkbox");elementInput.setAttribute("id","opt"+valueSupID);elementInput.setAttribute("name","opt"+valueSupID);if(IE){elementInput.onclick=function(){var temp=new Function("CtrlOption('"+valueSup2+"','opt"+valueSupID2+"','"+N_ID+"');CtrlOption('"+valueSup3+"','opt"+valueSupID3+"','"+N_ID+"');supplementOption('"+valueSup+"','opt"+valueSupID+"','"+N_ID+"')");temp();};}else{elementInput.setAttribute("onclick","CtrlOption('"+valueSup2+"','opt"+valueSupID2+"','"+N_ID+"');CtrlOption('"+valueSup3+"','opt"+valueSupID3+"','"+N_ID+"');supplementOption('"+valueSup+"','opt"+valueSupID+"','"+N_ID+"');");}
if(IE&&!onWindows){elementInput.style.cssText="border:1px solid #F4F4F4;font-family:verdana,arial,helvetica,sans-serif;font-size:10px;background-color:#F4F4F4;";}
if(IE&&onWindows){elementInput.style.setAttribute("cssText","border:1px solid #F4F4F4;font-family:verdana,arial,helvetica,sans-serif;font-size:10px;background-color:#F4F4F4;");}else{elementInput.setAttribute("style","border:1px solid #F4F4F4;font-family:verdana,arial,helvetica,sans-serif;font-size:10px;background-color:#F4F4F4;");}
elementTD1.appendChild(elementInput);var elementTD2=document.createElement("td");createDIVtext(elementTD2,elementInputText,"10","txt"+valueSupID);elementTR.appendChild(elementTD0);elementTR.appendChild(elementTD1);elementTR.appendChild(elementTD2);tbody_element.appendChild(elementTR);elementTable.appendChild(tbody_element);elementVisu.appendChild(elementTable);}
function CtrlOption(valueSup2,valueSupID2,N_ID){if(valueSup2!=null){var elementvalueSup2=document.getElementById(valueSupID2);if(elementvalueSup2!=null){if(elementvalueSup2.checked){elementvalueSup2.checked=null;supplementOption(valueSup2,valueSupID2,N_ID);}}}}
function supplementOption(valueSup,valueSupID,N_ID){var elementvalueSup=document.getElementById(valueSupID);if(elementvalueSup!=null){var mntOri=parseInt(document.getElementById("hppelc"+N_ID).value);var mntActuel=parseInt(document.getElementById("ppelc"+N_ID).firstChild.nodeValue);var mntVar=Math.round(mntOri*(valueSup/100));if(elementvalueSup.checked){var mntRecalcule=mntActuel+mntVar;}else{var mntRecalcule=mntActuel-mntVar;}
document.getElementById("ppelc"+N_ID).firstChild.nodeValue=affiche_decimal(mntRecalcule);var elemntcodeunit=document.getElementById("cdrmun"+N_ID);if(elemntcodeunit!=null){var oldcodehidden=elemntcodeunit.value;if(elementvalueSup.checked){var valuecode=valueSupID.substr(3,valueSupID.length-3);document.getElementById("cdrmun"+N_ID).value=oldcodehidden+"_"+valuecode;}else{var valuecode=valueSupID.substr(3,valueSupID.length-3);document.getElementById("cdrmun"+N_ID).value=oldcodehidden.replace("_"+valuecode,"");}}}}
function createDIVtext(elementVisu,DIVtext,taillepolice,IDvalue){var elementVisuTxt=document.createTextNode(DIVtext);var contenuDIV=document.createElement("div");if(IE&&!onWindows){contenuDIV.style.cssText="font-family:verdana,arial,helvetica,sans-serif;font-size:"+taillepolice+"px;";}
if(IE&&onWindows){contenuDIV.style.setAttribute("cssText","font-family:verdana,arial,helvetica,sans-serif;font-size:"+taillepolice+"px;");}else{contenuDIV.setAttribute("style","font-family:verdana,arial,helvetica,sans-serif;font-size:"+taillepolice+"px;");}
if(IDvalue!=""){contenuDIV.setAttribute("id",IDvalue);}
contenuDIV.appendChild(elementVisuTxt);elementVisu.appendChild(contenuDIV);}
function create_select(elementVisu,result,nomselect,optionselect,codestandard,libstandard,pays_aff,N_ID,typeapp){var elementSelect=document.createElement("select");elementSelect.setAttribute("id",nomselect);elementSelect.setAttribute("name",nomselect);if(IE){elementSelect.onchange=function(){var temp=new Function("propose_utilisation('"+nomselect+"','"+N_ID+"','"+typeapp+"')");temp();};}else{elementSelect.setAttribute("onchange","javascript:propose_utilisation('"+nomselect+"','"+N_ID+"','"+typeapp+"');");}
if(IE&&!onWindows){elementSelect.style.cssText="border-left:1px solid #cccccc;font-family:verdana,arial,helvetica,sans-serif;font-size:10px;background-color:#FFFFFF;";}
if(IE&&onWindows){elementSelect.style.setAttribute("cssText","border-left:1px solid #cccccc;font-family:verdana,arial,helvetica,sans-serif;font-size:10px;background-color:#FFFFFF;");}else{elementSelect.setAttribute("style","border-left:1px solid #cccccc;font-family:verdana,arial,helvetica,sans-serif;font-size:10px;background-color:#FFFFFF;");}
tablevaluelib=result.split("<sep2>");var elementOption=document.createElement("option");if(optionselect==codestandard){elementOption.setAttribute("selected","selected");}
var elementOptionText=document.createTextNode(libstandard);elementOption.appendChild(elementOptionText);elementSelect.appendChild(elementOption);for(i=0;i<tablevaluelib.length;i++){var elementOption=document.createElement("option");tablevaluelib2=tablevaluelib[i].split("<sep1>");elementOption.setAttribute("value",tablevaluelib2[0]);if(optionselect==tablevaluelib2[0]){elementOption.setAttribute("selected","selected");}
var elementOptionText=document.createTextNode(tablevaluelib2[1]);elementOption.appendChild(elementOptionText);elementSelect.appendChild(elementOption);}
elementVisu.appendChild(elementSelect);create_elemenetBR(elementVisu);create_img_sep(elementVisu,1,8);create_elemenetBR(elementVisu);}
function create_img_sep(elementVisu,width,height){var spacer=document.createElement("img");spacer.setAttribute("src","/cmn/m/shim.gif");spacer.setAttribute("width",width);spacer.setAttribute("height",height);spacer.setAttribute("border","0");elementVisu.appendChild(spacer);}
function create_elemenetBR(elementVisu){var elementBR=document.createElement("BR");elementVisu.appendChild(elementBR);}
function ajouteprix(image,typedroit){if(typedroit=="rm"){var prix_select=document.getElementById("ppelc"+image);}else{var prix_select=document.getElementById(typedroit);}
if(prix_select!=null){var prix=prix_select.firstChild.nodeValue;var prix_select_new=document.getElementById("ppelsel"+image);if(prix_select_new!=null){prix_select_new.firstChild.nodeValue=affiche_decimal(prix)+" EUR";var typedroitindice=document.getElementById("tdind"+image);if(typedroit=="rm"){prix_select_new.setAttribute("class","droitgere");prix_select_new.setAttribute("className","droitgere");typedroitindice.setAttribute("class","droitgere");typedroitindice.setAttribute("className","droitgere");}else{prix_select_new.setAttribute("class","libredroit");prix_select_new.setAttribute("className","libredroit");typedroitindice.setAttribute("class","libredroit");typedroitindice.setAttribute("className","libredroit");}}
if(typedroit=="rm"){var rfutil=document.getElementById("rfutil"+image);if(rfutil!=null){while(rfutil.firstChild){rfutil.removeChild(rfutil.firstChild);}
var mesutilvalue="";var rfutilsel=document.getElementById("calculateurRM"+image);if(rfutilsel!=null){var codesecteur=rfutilsel.options[rfutilsel.options.selectedIndex].value;ajouteUtilisation(rfutil,rfutilsel);}
var rfutilsel=document.getElementById("calculateurRMSC"+image);if(rfutilsel!=null){ajouteUtilisation(rfutil,rfutilsel);}
var rfutilsel=document.getElementById("calculateurRMT"+image);if(rfutilsel!=null){ajouteUtilisation(rfutil,rfutilsel);}
var rfutilsel=document.getElementById("calculateurRMF"+image);if(rfutilsel!=null){ajouteUtilisation(rfutil,rfutilsel);}
for(j=1;j<=4;j++){var elementoptioncoche=document.getElementById("opt"+codesecteur+"P"+j);var elementoptiontxt=document.getElementById("txt"+codesecteur+"P"+j);if(elementoptiontxt!=null&&elementoptioncoche!=null){if(elementoptioncoche.checked){var elementDIV=document.createElement("DIV");var elementOptionText=document.createTextNode(elementoptiontxt.firstChild.nodeValue);elementDIV.appendChild(elementOptionText);rfutil.appendChild(elementDIV);}}}}}else{var rfutil=document.getElementById("rfutil"+image);if(rfutil!=null){var rfutilsel=document.getElementById("rfutil"+typedroit.substr(2,typedroit.length));var rfutilselb=document.getElementById("rfutilb"+typedroit.substr(2,typedroit.length));if(rfutilsel!=null){var rfutilselvalue=rfutilsel.firstChild.nodeValue;if(rfutilselb!=null){rfutilselvalue=rfutilselvalue+" "+rfutilselb.firstChild.nodeValue;}
rfutil.firstChild.nodeValue=rfutilselvalue;}}}
var coche_image_pel=document.getElementById("imgpel"+image);coche_image_pel.checked=true;document.getElementById("cimgpel"+image).src="/cmn/m/cocheOK.gif";recalculeprix(image,typedroit);if(typedroit=="rm"){var elementVisu=document.getElementById("calculateursuite"+image);if(elementVisu!=null){while(elementVisu.firstChild){elementVisu.removeChild(elementVisu.firstChild);}}
var objet_select=document.getElementById("calculateurRM"+image);if(objet_select!=null){objet_select.options[0].selected=true;}}
var utilmes=document.getElementById("utilmes"+image);if(utilmes!=null){if(typedroit=="rm"){utilmes.firstChild.nodeValue=libcalculateur[17][lang_dir];}else{utilmes.firstChild.nodeValue=libcalculateur[18][lang_dir];}}}}
function ajouteUtilisation(rfutil,rfutilsel){var elementDIV=document.createElement("DIV");mesutilvalue=rfutilsel.options[rfutilsel.options.selectedIndex].firstChild.nodeValue;var elementOptionText=document.createTextNode(mesutilvalue);elementDIV.appendChild(elementOptionText);rfutil.appendChild(elementDIV);}
function recalculeprix(image,typedroit){var prixtot=0;total_img=panier_contenu_C.split("_");total_img_temp=typedroit.split("_");if(total_img.length>0){var postenouv=total_img_temp[0].substr(2,total_img_temp[0].length);var pres_img=false;for(i=0;i<total_img.length;i++){if(total_img[i]==postenouv){pres_img=true;}}
if(pres_img==false){total_img[total_img.length]=postenouv;}}else{total_img=new Array;total_img[0]="";total_img[1]=total_img_temp[0].substr(2,total_img_temp[0].length);}
for(i=1;i<total_img.length;i++){var casecoche=document.getElementById("imgpel"+total_img[i]);if(casecoche!=null){var valcasecoche=casecoche.checked;if(valcasecoche==true){var prixcasecoche=document.getElementById("ppelsel"+total_img[i]);if(prixcasecoche!=null){var valprixcasecoche=prixcasecoche.firstChild.nodeValue;var valprixcasecochenum=valprixcasecoche.substr(0,valprixcasecoche.length-5);prixtot=prixtot+parseInt(valprixcasecochenum);}else{document.getElementById("cimgpel"+total_img[i]).src="/cmn/m/cocheKO.gif";casecoche.checked=false;}}}}
var prix_total=document.getElementById("ppeltot");if(prix_total!=null){prix_total.firstChild.nodeValue=affiche_decimal(prixtot)+" EUR";}}
function recalculeprixverif(image,typedroit){var prix_sel=document.getElementById("ppelsel"+image);if(prix_sel!=null){var valprix_sel=parseInt(prix_sel.firstChild.nodeValue);if(valprix_sel==0){document.getElementById("cimgpel"+image).src="/cmn/m/cocheKO.gif";var coche_sel=document.getElementById("imgpel"+image);if(coche_sel!=null){coche_sel.checked=false;}
divInfo(libcalculateur[19][lang_dir]);}else{if(typedroit=="rmok"){var typedroitindice=document.getElementById("tdind"+image);typedroitindice.setAttribute("class","droitgere");typedroitindice.setAttribute("className","droitgere");document.getElementById("cimgpel"+image).src="/cmn/m/cocheOK.gif";var coche_sel=document.getElementById("imgpel"+image);if(coche_sel!=null){coche_sel.checked=true;}
var prix_total=document.getElementById("ppeltot");if(prix_total!=null){prix_total.firstChild.nodeValue=affiche_decimal(valprix_sel)+" EUR";}}else{var coche_sel=document.getElementById("imgpel"+image);if(coche_sel!=null){if(coche_sel.checked){document.getElementById("cimgpel"+image).src="/cmn/m/cocheKO.gif";coche_sel.checked=false;}else{document.getElementById("cimgpel"+image).src="/cmn/m/cocheOK.gif";coche_sel.checked=true;}}
recalculeprix(image,typedroit);}}}else{document.getElementById("cimgpel"+image).src="/cmn/m/cocheKO.gif";var coche_sel=document.getElementById("imgpel"+image);if(coche_sel!=null){coche_sel.checked=false;}}}
function affiche_decimal(numbervalue){numbervalue=parseInt(numbervalue)+".00";return numbervalue;}