function showPriceReportForm(a){overlay=(new Element("div",{id:"overlay"})).injectInside(document.body);overlay.setStyles({opacity:0,backgroundColor:"#fff",color:"#000",zIndex:9998,position:"absolute",top:window.getScrollTop(),left:"0px",width:window.getScrollWidth(),height:window.getScrollHeight(),visibility:"hidden"});Rfc=(new Element("div",{id:"reportFormContainer"})).injectAfter(overlay);Rfc.setStyles({padding:"0px",margin:"0px",width:"521px",height:"521px",marginLeft:"auto",marginRight:"auto","margin-top":window.getHeight()/2-261+"px",left:"-550px",position:"absolute",top:window.getScrollTop(),zIndex:9999});RfcC="";RfcC+='<div id="reportFormIntroText">'+LANGintroTxt+"</div>";RfcC+="<center><h2><strong>"+LANGproductFocused+" </strong> "+a+"</h2></center>";RfcC+='<form name="priceReportForm" id="priceReportFormulaire">';RfcC+='<table width="100%" border="0" cellspacing="8" cellpadding="0">';RfcC+="<tr>";RfcC+='<td class="reportFormContainerTitles">';RfcC+=LANGinfosTitle;RfcC+="</td>";RfcC+='<td class="reportFormContainerTitles">';RfcC+=LANGcommentaires;RfcC+="</td>";RfcC+="</tr>";RfcC+="<tr>";RfcC+='<td width="50%" align="center">';RfcC+='<input id="priceReportFormNom" name="nom" value="'+LANGnom+'" onfocus="if(this.value==\''+LANGnom+"'){this.value='';this.style.color='#99330c';}\" onblur=\"if (this.value==''){this.value='"+LANGnom+'\';this.style.color=\'#999\';}" type="text" size="30"/><br/>';RfcC+='<input id="priceReportFormPrenom"name="prenom" value="'+LANGprenom+'" onfocus="if(this.value==\''+LANGprenom+"'){this.value='';this.style.color='#99330c';}\" onblur=\"if (this.value==''){this.value='"+LANGprenom+'\';this.style.color=\'#999\';}" type="text" size="30"/><br/>';RfcC+='<input id="priceReportFormEmail" name="email" value="'+LANGemail+'" onfocus="if(this.value==\''+LANGemail+"'||this.value=='"+LANGemailFeedback+"'){this.value='';this.style.color='#99330c';}\" onblur=\"if (this.value==''){this.value='"+LANGemail+'\';this.style.color=\'#999\';}" type="text" size="30"/><span class="mandatory">*</span><br/>';RfcC+='<input id="priceReportFormPrix" name="prix" value="'+LANGprix+'" onfocus="if(this.value==\''+LANGprix+"'||this.value=='"+LANGprixFeedback+"'){this.value='';this.style.color='#99330c';}\" onblur=\"if (this.value==''){this.value='"+LANGprix+'\';this.style.color=\'#999\';}" type="text" size="30"/><span class="mandatory">*</span><br/>';RfcC+='<input id="priceReportFormUrl" name="url" value="'+LANGurl+'" onfocus="if(this.value==\''+LANGurl+"'||this.value=='"+LANGurlFeedback+"'){this.value='';this.style.color='#99330c';}\" onblur=\"if (this.value==''){this.value='"+LANGurl+'\';this.style.color=\'#999\';}" type="text" size="30"/><span class="mandatory">*</span><br/>';RfcC+="</td>";RfcC+='<td width="50%" align="center">';RfcC+='<textarea id="priceReportFormMessage" name="commentaire" cols="10" rows="8">';RfcC+="</textarea>";RfcC+="</td>";RfcC+="</tr>";RfcC+="<tr>";RfcC+="<br/>";RfcC+="</tr>";RfcC+="<tr>";RfcC+='<td align="left">';RfcC+='<button type="button" class="priceReportButton" onclick="fadeOut(Rfc);fadeOut(overlay);">'+LANGcancel+"</button>";RfcC+="</td>";RfcC+='<td align="right">';RfcC+='<button type="button" onclick="sendPriceReport(\''+a+'\')" class="priceReportButton">'+LANGsend+"</button>";RfcC+="</td>";RfcC+="</tr>";RfcC+="</table>";RfcC+="</form>";Rfc.innerHTML=RfcC;fadeIn(overlay,0.9);slideIn(Rfc)}function sendPriceReport(a){var b=checkEmail(),e=checkPrice(),f=checkUrl(),c=document.getElementById("priceReportFormulaire"),d=document.getElementById("reportFormIntroText"),g=null;if(b&&e&&f)g=(new XHR({method:"post",onSuccess:function(){c.innerHTML='<br/><br/><br/><br/><center><button type="button" class="priceReportButton" onclick="fadeOut(Rfc);fadeOut(overlay);">'+LANGterminer+"</button></center>";d.innerHTML='<h1 style="font-size:24px;text-align:left;">'+LANGmessageSended+"</h1>";(function(){fadeOut(Rfc);fadeOut(overlay)}).delay(1E4)},onRequest:function(){backPriceReportForm=c.innerHTML;backPriceReportText=d.innerHTML;c.innerHTML="";d.innerHTML='<h1 style="font-size:24px;text-align:left;">'+LANGmessageSending+"</h1>"},onFailure:function(){c.innerHTML=backPriceReportForm;d.innerHTML=backPriceReportText;alert(LANGajaxError)}})).send("price_report.php?productName="+escape(a)+"&nom="+document.getElementById("priceReportFormNom").value+"&prenom="+escape(document.getElementById("priceReportFormPrenom").value)+"&email="+escape(document.getElementById("priceReportFormEmail").value)+"&prix="+escape(document.getElementById("priceReportFormPrix").value)+"&url="+escape(document.getElementById("priceReportFormUrl").value)+"&comment="+escape(document.getElementById("priceReportFormMessage").value))}function slideIn(a){(new Fx.Styles($(a),{duration:800})).start({left:window.getWidth()/2-a.getSize().size.x/2+"px;"})}function fadeOut(a){(new Fx.Styles($(a),{duration:600})).start({opacity:0})}function fadeIn(a,b){(new Fx.Styles($(a),{duration:600})).start({opacity:b})}function checkEmail(){var a=/^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4}$/,b=document.getElementById("priceReportFormEmail");if(b.value==null||b.value==""||!a.test(b.value)||b.value==LANGemailFeedback){b.style.color="#ff1f1f";b.value=LANGemailFeedback;return false}else return true}function checkPrice(){var a=document.getElementById("priceReportFormPrix");if(a.value==null||a.value==""||a.value==LANGprix||a.value==LANGprixFeedback){a.style.color="#ff1f1f";a.value=LANGprixFeedback;return false}else return true}function checkUrl(){var a=document.getElementById("priceReportFormUrl");if(a.value==null||a.value==""||a.value==LANGurl||a.value==LANGurlFeedback){a.style.color="#ff1f1f";a.value=LANGurlFeedback;return false}else return true};
