var nb=1,sommetotal=0;
<!--------------------- Calcul
function calcul(data) {
data.somme.value=Math.round((data.qte.options[data.qte.selectedIndex].value * data.prix.value)*100)/100;
if (data.somme.value.charAt(data.somme.value.length-2)=='.')
  data.somme.value=data.somme.value+'0';
return;
}

function total(data) {
sommetotal+=parseFloat(data);
document.forms[0].somme.value=Math.round(sommetotal*100)/100;
if (document.forms[0].somme.value.charAt(document.forms[0].somme.value.length-2)=='.')
  document.forms[0].somme.value=document.forms[0].somme.value+'0';
convert1(document.forms[0],tauxeuro);
return;
}

//-->

<!----------------------------- Calcul Franc-Euros
function convert1(cform,taux) {
var s=parseFloat(cform.somme.value)/taux;
cform.euro.value=Math.round(s*100)/100;
if (cform.euro.value.charAt(cform.euro.value.length-2)=='.')
  cform.euro.value=cform.euro.value+'0';
return;
}

// -->

<!------------------ Mise en forme
function tableau(n) {
this.length = n;
for (i=1;i<=n;i++)
  this[i]='-1';
return this;
}

function copy(chemin,titre,ref,prix,qte,somme,euro) {
var text='';
if (nb<=10)
 {
  text+=chemin+'|';
  text+=titre+'|';
  text+=ref+'|';
  text+=prix+'|';
  text+=qte+'|';
  text+=somme+'|';
  text+=euro+'|';
  tabtitres[nb]=text;
  nb+=1;
  total(somme);
 }
else
 alert('La base de donnée est pleine. (Max:10 Titres)');
return;
}
// -->

<!--------------- Coma
function coma() {
if (document.forms[0].somme.value!="0")
  command(tabtitres,document.forms[0].somme.value,document.forms[0].euro.value);
else
  alert('Aucun Titre a été commandé.');
return; 
}
// -->

<!------------------------------------- Commande
function command(titres,totalf,totale) {
var i,j=titres.length,l;
var chemin='',titre='',ref='',qte='',somme='',euro='',prix='';
var fenetreChop=null;
fenetreChop=window.open('','Chop','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=745,height=400');
texte='<HTML><HEAD><TITLE>R&eacute;capitulatif Des Titres Du Caddie</TITLE>';
texte+='<script language="JavaScript">var tauxeuro=6.55957;</script>';
texte+='</HEAD><BODY BACKGROUND="texture/fond1.jpg">';
texte+='<HR><CENTER><H2><FONT COLOR=#d91d56>R&eacute;capitulatif Des Titres Du Caddie</FONT></H2></CENTER><HR>';
for (i=1; i<=j;i++)
 {
 if (titres[i] !='-1')
  {
   chemin='';titre='';ref='';qte='';somme='';euro='';prix=''; 
   for (l=0;titres[i].charAt(l)!='|';l++)
    chemin+=titres[i].charAt(l);
   for (l+=1;titres[i].charAt(l)!='|';l++)
    titre+=titres[i].charAt(l);
   for (l+=1;titres[i].charAt(l)!='|';l++)
    ref+=titres[i].charAt(l);
   for (l+=1;titres[i].charAt(l)!='|';l++)
    prix+=titres[i].charAt(l);
   for (l+=1;titres[i].charAt(l)!='|';l++)
    qte+=titres[i].charAt(l);
   for (l+=1;titres[i].charAt(l)!='|';l++)
    somme+=titres[i].charAt(l);
   for (l+=1;titres[i].charAt(l)!='|';l++)
    euro+=titres[i].charAt(l);
   texte+='<table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><td>';
   texte+='<img src="'+chemin+'" width="62" height="61" align="top" border="1"></td>';
   texte+='<td width="100%" valign="top">Titre'+i+' : '+titre+'<br>R&eacute;f : '+ref+'<br>Prix : '+prix+' Fht</td></tr></table>';
   texte+='<FORM><INPUT TYPE="HIDDEN" NAME="ref" VALUE="'+ref+'">';
   texte+='<INPUT TYPE="HIDDEN" NAME="titre" VALUE="'+titre+'">';
   texte+='<INPUT TYPE="HIDDEN" NAME="prix" VALUE="'+prix+'">';
   texte+='<INPUT TYPE="checkbox" NAME="check" VALUE="Commander" checked onClick="if (this.form.check.checked) {calcul(this.form);total();convert1(this.form,tauxeuro);}';
   texte+='else {this.form.somme.value=0;this.form.qte.options[0].selected=true;total();convert1(this.form,tauxeuro);}">';
   texte+='Commander&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quantit&eacute;(s) : <SELECT NAME="qte" SIZE=1 onChange="if (this.form.check.checked) {calcul(this.form);total();convert1(this.form,tauxeuro);}">';
   for (l=1;l<=9;l++)
     {
      if (l==qte)
       texte+='<OPTION VALUE="'+l+'" selected> '+l;
      else
       texte+='<OPTION VALUE="'+l+'"> '+l;
     }
   texte+='</SELECT>';
   texte+='&nbsp;&nbsp;&nbsp;&nbsp;Prix : <INPUT TYPE="text" NAME="somme" VALUE="'+somme+'" SIZE=7 MAXLENGTH=7 READONLY> Franc(s)';
   texte+='&nbsp;&nbsp;o&ugrave; : <INPUT TYPE="text" NAME="euro" VALUE="'+euro+'" SIZE=6 MAXLENGTH=6 READONLY> Euro(s) - (Taux de change=';
   texte+='<script language="JavaScript">document.write(tauxeuro);</script>)</FORM>';
   texte+='<hr>';
  }
 }

texte+='Les Taxes et Frais de Port sont en sus.<BR>Un mail de confirmation les incluant vous sera adressé.<BR><BR>';
texte+='<H4><CENTER><H2>Bon De Commande</H2></CENTER>';
texte+='<FORM NAME="coma">';
texte+='<STRONG>Total de la commande :</STRONG> <INPUT TYPE="text" NAME="total" VALUE="'+totalf+'" SIZE=10 MAXLENGTH=10 READONLY> Franc(s)';
texte+='&nbsp;o&ugrave; : <INPUT TYPE="text" NAME="euro" VALUE="'+totale+'" SIZE=10 MAXLENGTH=10 READONLY> Euro(s) - (Taux de change=';
texte+='<script language="JavaScript">document.write(tauxeuro);</script>)';
texte+='<p>Nom : <input type="text" size="20" name="nom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prenom : <input type="text" size="20" name="prenom"></p>';
texte+='<p>Adresse 1 : <input type="text" size="45" name="adresse1"></p>';
texte+='<p>Adresse 2 : <input type="text" size="45" name="adresse2"></p>';
texte+='<p>Code postal : <input type="text" size="20" name="postal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ville : <input type="text" size="20" name="ville"></p>';
texte+='<p>Pays : <select name="zone" size="1">';
texte+='<option value="France et DOM-TOM">France et DOM-TOM</option><option value="Europe">Europe</option><option value="Europe d&#138Est">Europe de l&#138;Est</option><option value="Amerique">Amérique</option><option value="Afrique">Afrique</option><option value="Asie">Asie</option><option value="Pacifique">Pacifique</option></select></p>';
texte+='<p>Tel : <input type="text" size="20" name="tel">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fax : <input type="text" size="20" name="fax"></p>';
texte+='<p>E-Mail : <input type="text" size="35" name="email"></p>';
texte+='Type de paiement : <BR> _____________________________ Paiment (Normal) _____________________________ <BR>';
texte+='<INPUT TYPE="radio" CHECKED NAME="marque" VALUE="cb"> Carte Bancaire <INPUT TYPE="radio" NAME="marque" VALUE="visa">';
texte+='Visa <INPUT TYPE="radio" NAME="marque" VALUE="mastercard"> Mastercard <INPUT TYPE="radio" NAME="marque" VALUE="aurore">';
texte+='Aurore <INPUT TYPE="radio" NAME="marque" VALUE="amex"> American Express <BR><BR>';
texte+='Numéro de carte : <INPUT TYPE="text" SIZE="30" NAME="numero">&nbsp;&nbsp;&nbsp;&nbsp;';
texte+='Date d´expiration : &nbsp;&nbsp; Mois <SELECT NAME="mois" SIZE="1"><OPTION VALUE="01" SELECTED>01</OPTION><OPTION VALUE="02">02</OPTION><OPTION VALUE="03">03</OPTION><OPTION VALUE="04">04</OPTION>';
texte+='<OPTION VALUE="05">05</OPTION><OPTION VALUE="06">06</OPTION><OPTION VALUE="07">07</OPTION><OPTION VALUE="08">08</OPTION><OPTION VALUE="09">09</OPTION>';
texte+='<OPTION VALUE="10">10</OPTION><OPTION VALUE="11">11</OPTION><OPTION VALUE="12">12</OPTION></SELECT>&nbsp;&nbsp;&nbsp; Année : ';
texte+='<SELECT NAME="annee" SIZE="1"><OPTION VALUE="2000" SELECTED>2000</OPTION><OPTION VALUE="2001">2001</OPTION><OPTION VALUE="2002">2002</OPTION>';
texte+='<OPTION VALUE="2003">2003</OPTION><OPTION VALUE="2004">2004</OPTION></SELECT><BR>';
texte+='Nom du porteur : <INPUT TYPE="text" SIZE="40" MAXLENGTH="40" NAME="porteur"><BR><BR>';
texte+=' ____________________________ Paiement (Sécurisé) ____________________________ <BR>';
<!---- texte+='<INPUT TYPE="radio" NAME="marque" VALUE="klebox">'; ---->
texte+='Disponible MARS 2000 &nbsp;&nbsp;&nbsp;';
texte+='Klebox <IMG SRC="kleline.jpg" ALIGN="absmiddle" WIDTH="108" HEIGHT="48" VALIGN="TOP"><BR></H4>';
texte+='<p align="center"><font size="7">&nbsp;<img src="texture/dpvcom.gif" alt="Logo DPV.com" width="100" height="50" naturalsizeflag="3"><img src="texture/dpvcom.gif" alt="Logo DPV.com" width="100" height="50" naturalsizeflag="3"><img src="texture/dpvcom.gif" alt="Logo DPV.com" width="100" height="50" naturalsizeflag="3"><br></font>EDITIONS DE PLEIN VENT<font size="4"><img src="texture/piano.gif" alt="Piano.gif" align="right" hspace="0" width="44" height="113" naturalsizeflag="3"></font><font size="4"><br>';
texte+='</font>5, Rue Jean-Jaurès - 07600 Vals Les Bains - France - Tél : (33) 04.75.94.63.55 - Fax : (33) 04.75.37.63.66<br>e-mail : <a href="mailto:de.plein.vent@depleinvent.com">de.plein.vent@depleinvent.com</a></p>';
texte+='<INPUT TYPE="BUTTON" VALUE="Envoyer la commande" onClick="if (verif()) envoie()">';
texte+='&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ';
texte+='<INPUT TYPE="BUTTON" value="Fermer la fen&ecirc;tre" onClick="window.close()"></FORM>';
texte+='</BODY><script language="JavaScript" src="cscript.js"></script></HTML>';
fenetreChop.document.clear();
fenetreChop.document.write(texte);
return;
}
// -->
