function show(prodIndexNum){
//preparation du code html
if(coef==1) ttc='HT' ;
var i=j=0;

var couleurs = this.couleur.split(",");
var options_couleur='<select class="listeBoutique" name="couleur" onchange="chtailles('+ count +',\''+ this.taille +'\');" >';
while(i < couleurs.length){ 
	options_couleur += '<option value="'+couleurs[i]+'">'+couleurs[i].toLowerCase()  ;
	i++;
}
options_couleur +=  '</select> ' ;

var tailles = this.taille.split(",");   
var t0 = tailles[0].split("|") ; // Charger la premiere couleurimg	
var options_taille='<select id="taille" class="listeBoutique" name="taille">' ;
while( j < t0.length){ 
	options_taille += '<option value="' + j +'" />' + t0[j].toLowerCase(); 
	j++;
}
options_taille +='</select>';
var type_produit = this.type ;


var affipromo='';
if (this.promo!=0)
{
var promotion=this.price*(100/this.promo);
affipromo='<s>&nbsp;'+promotion+'&nbsp;</s>';
}


var w= [
'<div class="images">',
'<a href=javascript:zoom("'+ this.reference +'") >',
'<img src="'+img+ +  this.image +'" alt="', s_zoomer ,'" title="', s_zoomer ,
'" id="main" /></a>',
'<span id="img80"></span>',
'<a href=javascript:zoom("'+ this.reference +'")  >',
'<img src="images/boutique/zoom.gif" alt="',s_zoomer,'" ',
'title="', s_zoomer ,'" id="zoom" /></a>',


'</div>',
'<div class="data"><form onsubmit="return false";>',
'<table width="179" cellspacing="0" cellpadding="0" border="0"><tbody>'
,'<tr><td align="left" '
,'style="width: 119px; height: 24px;color:#CCC; font-size:20px;'
,'text-transform: lowercase;letter-spacing: 3px">',
, this.type 
//,'<img width="119" height="24" alt="Haut/Vestes" src="images/boutique/titre_hautveste.gif"/>'
,'</td></tr>'
,'<tr><td align="left"><img width="5" height="15" src="images/commun/spacer.gif"/></td></tr>'
,'<tr><td align="left" class="rougeCapitale">'+ this.name+'</td></tr>'
,'<tr><td align="left"><img width="5" height="5" src="images/commun/spacer.gif"/></td></tr>'
,'<tr><td align="left" class="gris20">'+   this.price     + ' '  + _dse + ' '  + ttc +'</td></tr>'
,'<tr><td align="left"><img width="5" height="5" src="images/commun/spacer.gif"/></td></tr>'
,'<tr><td align="left" class="gris11">' + this.description + '</td></tr>'



,'<tr><td align="left"><img width="5" height="15" src="images/commun/spacer.gif"/><br/>'
,'<img width="5" height="10" src="images/commun/spacer.gif"/></td>'
,'</tr>'

 
 
 
,'<tr>'
,'<td align="left" class="gris11">', this.composition,
,'</tr>'


,'<tr><td><img width="5" height="10" src="images/commun/spacer.gif"/></td></tr>'
,'<tr><td><table width="100%" cellspacing="0" cellpadding="0" border="0">'
,'<tbody>'
,'<tr><td align="left" class="rouge11" width="43" >'  +s_C+   '</td>'  //Couleur
,'<td align="left">',options_couleur,'</td></tr>'

,'<tr><td align="left" colspan="2"><img width="5" height="5" src="images/commun/spacer.gif"/></td></tr>'
,'<tr><td align="left" class="rouge11">'+ s_T+'</td>' //Taille

,'<td align="left">',options_taille ,'</td></tr>'
,'<tr><td align="left"colspan="2"><img width="5" height="5" src="images/commun/spacer.gif"/></td></tr>'
,'<tr><td align="left" class="rouge11">'+s_EntrezQ+'</td>'
,'<td align="left" >'
,'<input type="text" value="1" id="q" class="champsBoutique" name="q"  size="3"', 
' />',
'</td>'
,'</tr>'
,'<tr><td align="left" colspan="2"><img width="5" height="5" src="images/commun/spacer.gif"/></td></tr>'
,'<tr><td align="left" colspan="2">'

,'<div id="ajouter" style="margin-top:10px">'
,'<a href="javascript: ajouterAuPanier('+ count+','+prodIndexNum+')" >'
,'<img '
,'style="margin-right:10px; border:0;float:left;vertical-align:top;width: 28px; height: 30px" src="images/boutique/picto_panier29.gif"/></a>'

,'<a class="rouge11" href="javascript: ajouterAuPanier('+ count+','+prodIndexNum+')" >'
,' Ajouter &agrave; mon panier</a><br/>'
,'<span id="subtotal" class="gris11"> 1 article, montant:'
, this.price, '&euro; .</span>'
,'</div>'	

,'</td></tr>'
,'</tbody></table></td></tr>'
,'<tr><td align="left"><img width="5" height="20" src="images/commun/spacer.gif"/>'
,'<br/>'

,'<img width="70" height="18" border="0" alt="Mon panier" id="monPanier" '
,' src="images/boutique/votre_panier.gif"/></td>'
,'</tr>'

,'<tr><td> </td></tr>'
,'</tbody></table>',
'</form></div>'];

var photo = this.image.split(/\//)[1];

var w= [
'<div class="postheader"><h4><a href=# onClick="javascript:splash();">voir toute la collection</a></h4></div>'
,'              <div class="article-large"><a href=javascript:zoom("'+ this.reference +'") ><img src="'+img+"H02/350/"+photo+'" width="350" height="350" border="0" " alt="', s_zoomer ,'" title="', s_zoomer ,
'" id="main"/></a>'
,'				<div id="zoom">'
,'				<ul>'
,'				    <li id="zoom-li"><a href=javascript:zoom("'+ this.reference +'") >Zoom</a></li> '
,'<li id="zoom-print"> <a href=javascript:printable("'+ prodIndexNum +'") >Imprimer</a></li>'
,'</ul>'
,'</div>'
,'<!-- fin zoom -->'
,'</div>'
,'<!-- fin article-large -->'
,'<form name="form1" id="form1" method="post" onSubmit="return false;">'
,'<div class="article-texte">'
,'<h2><a href=javascript:zoom("'+ this.reference +'") >'+this.name.toLowerCase()+'</a></h2>'
,'<p>',this.description.toLowerCase(),'</p><br>'
,'<div id="article-commande">'
,'<div id="article-prix">Prix: <span class="prix-prix">' + affipromo + ' '+   this.price     + ' '  + _dse + ' '  + ttc +'</span></div>'
,'<div id="article-couleur"><span>Couleur:</span>'
,options_couleur,'</div>'
,'<div id="article-taille"><span>Taille:</span> '
,'',options_taille ,'<br />'
,'<span class="small"><a href="mesures_popup.html" target="_blank">Guide des tailles</a></span>'
,'</div>'
,'<div class="small" >',this.composition.replace('|','<br />'),'</div>'



,'<div id="article-quantite">Quantit&eacute;: '
,'<input id="q" name="textfield" type="text" value="1" size="2" maxlength="2" />'
,'</form>'
,'</div>'
,'</div>'
,'<div id="ajouteraupanier">'
,'<a href="#" onClick="javascript:ajouterAuPanier('+ count+','+prodIndexNum+');hideAll();showDiv();">'
,'<img src="a/ajouter.gif" alt="ajouter" width="173" height="28" border="0" /></a>'
,'</div>'
,'<p id="mytextA" style="display:none;font-color:#500">'
,'<span class="pink"> Votre commande a bien &eacute;t&eacute; ajout&eacute;e</span><br />'
,'<img src="a/cart.png" alt="panier" width="16" height="16" /> <a href="#" onClick="javascript:checkOut();">Voir mon panier</a><br />'
,'<img src="a/cart_add.png" alt="+" width="16" height="16" /> '
,'<a href="javascript:splash()">Continuer mes achats</a><br />'
,'<img src="a/creditcards.png" /><a href="javascript:checkOut();">Commander</a></p>'
,'<p id="mytextB" style="display:none;font-color:#555">-</p>'
,'<p id="mytextC" style="display:none;font-color:#005">-</p>'
,'</div>'
,'<!-- fin de article-teste ci-dessus -->'
,'<hr class="separation" />'
];






post.innerHTML = w.join('');
w=null;
//Ev�nements: 

$('monPanier').onclick=checkOut;

var q = $('q') ;q.prix =this.price;q.count=count  ;
q.onclick = function(){this.select();} ;
q.onblur =  q.onchange = q.onfocus = q.onkeyup =  function(){reTotal( this.count, this.prix);}	
q=null;
count++;
//update_field('img80='+ this.reference, 'db.php','img80') 
}//end_show()

/* **************************************************************/
function ajouterAuPanier(id, oIndex){
//appelee par show, id identifie le N=e formulaire  

var theForm =  document.forms[id];
var productName = a[oIndex].name;
var productImage = a[oIndex].image;
var totalQty =  theForm.q.value;
var totalSum = currency( totalQty * a[oIndex].price ) ;
var i =theForm.taille.selectedIndex;
var taille=theForm.taille.options[i].value ;
var j =theForm.couleur.selectedIndex;
couleur= theForm.couleur.options[j].value;
taille = a[oIndex].taille.split(",")[j].split("|")[i];

if(totalQty == 0){
	alert(s_al);
	theForm.q.value = 1;
	reTotal(id,a[oIndex].price);
}else{
		var msg = [
		bandeau(),
		"<div id='ajouterAuPanier'>",
		"<p>", s_vousAj , ",</p>",
		"<table  bgcolor='white' border='0' width='100%'><tbody>",
		"<tr><td><img width='80'  src='",productImage,"' /></td>",
		"<td valign='top' align='left'>",
		"<span class='rouge' style='text-align:left;' >",totalQty , ' ', productName,
		"<br/>",	taille , " " , couleur ,"</span>",
		"<hr/>" ,		
		'<div class="gris11">',a[oIndex].composition ,"</div>",
		"<span class='gris20'>",totalSum ,' ',_dse,"</span> ",
		"</tbody></table>",	
		"<div style='margin:20px'>",
		'<input type="submit" id="poursuivre" value="Poursuivre" class="submit" >',
		'<input type="submit" id="voirPanier" value="Voir Panier" class="submit" >',
		'</div>',
		"</div>", 
		] ;
		store(oIndex,totalSum,totalQty,taille,couleur);
		setCookie('curcook',serier());
	} // else{alert(s_al2);}
}// fin de ajouterAuPanier(id, oindex)
/* **************************************************************/
function zoom( reference ){
//alert(zoom);
url='http://www.derhy.com/shopping/displayRef.php?article='+reference ;
display= window.open(url,'Image','width=800,height=850,toolbar=no,scrollbars=yes,resizable=yes');
display.focus();
}//fin de zoom
/* **************************************************************/

/* **************************************************************/
function printable( reference ){
//alert(zoom);
url='http://www.derhy-kids.com/zoom.php?article='+reference ;
display= window.open(url,'Image','width=500,height=800,toolbar=no,scrollbars=yes,resizable=yes');
display.focus();
}//fin de zoom
/* **************************************************************/

function chtailles(id,taille){
	var theForm = document.forms[id];
	var i=theForm.couleur.selectedIndex;
	var tailles = taille.split(",");
	var lesTailles = tailles[i].split("|") ;
	var frm= theForm.taille   ;
	for (i = 0 ; i < frm.options.length ; i++) { frm.options[i] = null; }
	for (j = 0 ; j < lesTailles.length ; j++){  frm.options[j] = new Option(lesTailles[j]) ; }
}
/* **************************************************************/
function reTotal(c,totalPrice){
	var q =document.forms[c].q.value;
	totalPrice=totalPrice* q;
	var newTotal = currency(totalPrice);
	$('total').innerHTML=  q + ' article' +  (q>1?'s':'') +',<br/> montant ' + newTotal + " &euro;." ;
}//fin de reTotal

function showDiv() {
//	new Effect.Appear('mytextA', 1);
	$('mytextA').style.display="block";
}