function MM_openBrWindow(theURL,winName,features) { //v2.0
  var xwin = window.open(theURL,winName,features);
  xwin.focus();
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function inIE() {
	if (navigator.appName == "Microsoft Internet Explorer")
		return true
	else
		return false
}

function createHTTPRequest() {
	var xmlhttp
	if (inIE()) {
		xmlhttp = new ActiveXObject("Microsoft.XmlHttp")
	} else {
		xmlhttp = new XMLHttpRequest()
	}
	return xmlhttp
}

function appel(val, adr, meth) {

	xmlhttp = createHTTPRequest()
	if (meth == "get") {
		adr = adr + "?" + val

		val = null
	}
	xmlhttp.open(meth, adr, true) // asynchronous
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
	xmlhttp.send(val)
	xmlhttp.onreadystatechange = recup_result
}

function createXMLDoc() {

	if (inIE()) {
		var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
		xmlDoc.async = "false"
		return xmlDoc
	} else {
		var xmlDoc = document.implementation.createDocument("", "", null)
		return xmlDoc
	}
}
function nodeVal(n){
if(n.firstChild == null){
return ''
}else{
return n.firstChild.data
}
}
function recup_result() {

	if (xmlhttp.readyState == 4) /* 4 etat complété */
	{
		if (xmlhttp.status == 200) /* 200 code HTTP OK */
		{

		var xmlDoc = createXMLDoc()
			if (inIE()) {
				xmlDoc.loadXML(xmlhttp.responseText)
			} else {
				xmlDoc = xmlhttp.responseXML
			}
			expos = xmlDoc.getElementsByTagName("expo")
var calque = document.getElementById('animFlash');
			str = '<div id="xDisplayCont"><table class="xDisplay">'
			for (i = 0; i < expos.length; i++) {
				expo = expos[i].firstChild.data
				titreN = expos[i].getElementsByTagName("titre")
				titreS = nodeVal(titreN[0])
				debutN = expos[i].getElementsByTagName("debut")
				debutS = nodeVal(debutN[0])
				finN = expos[i].getElementsByTagName("fin")
				finS = nodeVal(finN[0])
				villeN = expos[i].getElementsByTagName("ville")
				villeS = nodeVal(villeN[0])
				nomPaysN = expos[i].getElementsByTagName("nomPays")
				nomPaysS = nodeVal(nomPaysN[0])
				
				imgN= expos[i].getElementsByTagName("img")
				imgS = nodeVal(imgN[0])
				
				id_expoN= expos[i].getElementsByTagName("id_expo")
				id_expoS = id_expoN[0].firstChild.data
				
				if(imgS == 1){
				strImg = '<a href="#" onClick="MM_openBrWindow(\'../afc.php?ni='+id_expoS+'&titre='+titreS+'\',\'paint\',\'scrollbars=no,resizable=no,width=400,height=400\')">';
strImg = strImg+'<img src = ../images.php?type=afc&ri='+id_expoS+'&box=50&fdh=faf0e6 border = 0></a>';
}else{
strImg = 'n.a.';
}

				if (i > 0) {
					
				}
				str = str + '<tr><td>'+debutS+'</td><td>'+titreS+'</td><td>'+strImg+'</td><td>'+villeS+' ('+nomPaysS+')</td></tr>'
			}
		str = str + "</table></div>"

		calque.innerHTML= str;
		
				//calque.innerHTML= xmlhttp.responseText;
			
		}
	}
}