// JavaScript Document
										
										
								
						function calcul() {
						var nb;
						var lg;
						var ht;
						var qu;
						var vfin;
						tab0=12; tab1=16; tab2=25; tab3=48; tab4=58; tab5=70; tab6=83; tab7=102; tab8=125;
						coef = 1;
						lg = document.devis.lo.value;
						ht = document.devis.haut.value;
						qu = document.devis.u.value;
						m2 = lg/100*ht/100;
						tva = 1.196;
						prtg=10000;
						qtot = m2 * qu;
						envoi = 5.98;
						mini= 20;
						mini2 = 40;
						domingm2= 350;
						metalm2=20;
						doming=0;
						massicotu=0.085;
						massicot=0;
						metal=0;
						plast=0;
						plastm2=15;
						prt=0;
						
						
						
							if ( document.devis.Option1.checked == true )
							{
							doming = domingm2;
							mini = mini2;
							}
							
							if ( document.devis.Option2.checked == true )
							{
							massicot = massicotu;
							mini = mini2;
							}
						
							if ( document.devis.Option3.checked == true )
							{
							metal = metalm2;
							}

						
							if ( document.devis.Option4.checked == true )
							{
							plast = plastm2;
							}
						
						
						
						
						if (qtot <= 0.25)
						{
						tot = Math.round(( ((qtot * ((coef *tab8+doming)+ metal*4 + plast*4)) + (qu * massicot) + mini) * tva )*100)/100;
								if (tot < mini2) {tot = mini2}
						document.devis.prix_total.value = tot;
						
						}
						else if (qtot <= 0.5)
						{
						tot = Math.round(( ((qtot * ((coef *tab7+doming)+ metal*2 + plast*2)) + (qu * massicot)) * tva )*100)/100;
								if (tot < mini2) {tot=mini2}
						document.devis.prix_total.value = tot;
						
						}
						else if (qtot <= 1)
						{
						tot = Math.round(( ((qtot * ((coef *tab6+doming)+ metal*0.5 + plast*1.5)) + (qu * massicot)) * tva )*100)/100;
								if (tot < mini2) {tot=mini2}
						document.devis.prix_total.value = tot;
						
						}
						else if (qtot <= 50)
						{
						tot = Math.round(( ((qtot * ((tab5-qtot*(tab5-tab0)/50+doming)+ metal + plast)) + (qu * massicot)) * tva )*100)/100;
						document.devis.prix_total.value = tot;
						
					
						
						}
						
						else
						{
						tot = Math.round(( ((qtot * ((coef *tab0+doming)+ metal + plast)) + (qu * massicot)) * tva )*100)/100;
						document.devis.prix_total.value = tot;
						
						}
						
						
						
						
						
							
						document.devis.prix_total_ht.value = Math.round((document.devis.prix_total.value/1.196)*100)/100;	
						
						return false;
						}			
						
						
									
						

