function MakeFiche(codevente){
ficheEnCours=codevente;
xmlHttpFic=GetXmlHttpObject();
if (xmlHttpFic==null){
  alert ("Votre navigateur ne supporte pas la technologie AJAX!");
  return;} 
var urlFic="/c2000/ajaxFiche.asp";
urlFic=urlFic+"?codevente="+codevente;
urlFic=urlFic+"&sid="+Math.random();
xmlHttpFic.onreadystatechange=stateChangedFic;
xmlHttpFic.open("GET",urlFic,true);
xmlHttpFic.send(null);
}

function stateChangedFic(){ 
	if (xmlHttpFic.readyState==4){ 
		var contenuFiche=xmlHttpFic.responseText;
		var newdiv = document.createElement('div');
		newdiv.setAttribute('id', ficheEnCours);
		newdiv.innerHTML = contenuFiche;
		document.body.appendChild(newdiv);
		FicheProduit=dhtmlmodal.open('Fiche', 'div', ficheEnCours, 'Fiche Produit', 'width=750px,height=500px,center=1,resize=0,scrolling=1')
		}
}

function GetXmlHttpObject(){
var xmlHttp=null;
try {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e){
  // Internet Explorer
  try {xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
  catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
  }
return xmlHttp;
}
