function XmlParser(oXML){
/***
Brion Nick
72Dpi Multimedia
25/01/2007

Parse un résultat XML 
***/		
	if(!oXML) return false;
	
	var arrHeader 	= new Array() ;
	var arrData 	= new Array();
	
	//TROUVER LA DEFINITION DU XML
	var definitionXml = oXML.getElementsByTagName('MEDIADEF')[0];
	//alert(definitionXml);
	var txt = "";
	var indice = 0;
	
	if(definitionXml){
		for (j=0;j<definitionXml.childNodes.length;j++){	
			if(definitionXml.childNodes[j].nodeType!=3 && definitionXml.childNodes[j].nodeType!=8){
				txt += definitionXml.childNodes[j].nodeName+" : "+definitionXml.childNodes[j].firstChild.nodeValue+"\n";
				arrHeader[indice] = definitionXml.childNodes[j].nodeName;
				
				//alert(indice+":"+definitionXml.childNodes[j].nodeName);
				
				indice++;
			}
		}
		//alert(txt);
		var nbColonne = indice;
		//alert(nbColonne);
		
		arrData[0] = new Array();

		var racineData = oXML.getElementsByTagName('RESULT')[0];
		var indice = 0;
		//alert(racineData.childNodes.length);
		for (j=0;j<racineData.childNodes.length;j++){	
			
			if(racineData.childNodes[j].nodeType!=3 && racineData.childNodes[j].nodeType!=8){
				var RowData = racineData.childNodes[j];
				arrData[indice] 	= new Array();
				var indice2 = 0;
				
				for(i=0; i<RowData.childNodes.length; i++){
					if(RowData.childNodes[i].nodeType!=3 && RowData.childNodes[i].nodeType!=8){
						
						if(!RowData.childNodes[i].getAttribute('isnull')){
							arrData[indice][indice2]			= RowData.childNodes[i].firstChild.nodeValue;
							arrData[indice][arrHeader[indice2]]	= RowData.childNodes[i].firstChild.nodeValue;
						} else {
							arrData[indice][indice2]			= null;
							arrData[indice][arrHeader[indice2]]	= null;
						}
						//alert('arrData['+indice+']['+indice2+'] = '+RowData.childNodes[i].firstChild.nodeValue+'\n arrData['+indice+']['+arrHeader[indice2]+'] = '+RowData.childNodes[i].firstChild.nodeValue);
						indice2++;
					}
				}
				
				indice++;
			}
		}
	} else {
		alert("Aucun Xml retourne.");
	}
				
	return arrData;
}

function searchObj(str){
	
	//alert(str);
	
	var loading = document.getElementById('loading');
	loading.style.display = 'block';
	
	var div = document.getElementById('contenuAjax');
	div.innerHTML = '';
	
	//var cache   = document.getElementById('cache');
	
	//var hauteurCache = document.getElementById('main').offsetHeight + 5;
	
	//cache.style.display = 'block';
	//alert(hauteurCache);
	//cache.style.height = hauteurCache+'px';
	
	//document.body.style.overflow = 'hidden';
	
	if(str.substring(0,4)=='cat_'){
		
		//alert(str.substring(4));
		var url  = 'search.php?cat='+str.substring(4); // url de la page et variable
		var method = "GET";
		
	}else if(str.substring(0,4)=='dat_'){
		
		var url  = 'search.php?date='+str.substring(4); // url de la page et variable
		var method = "GET";
	
	}else if(str.substring(0,4)=='id__'){

		var url  = 'search.php?id='+str.substring(4); // url de la page et variable
		var method = "GET";
	
	}else{
		
		var url  = 'search.php?str='+str; // url de la page et variable
		var method = "GET";
		
	}
	
	if (window.XMLHttpRequest) {
		var xmlhttp = new XMLHttpRequest();				
	} else if (window.ActiveXObject) {
		var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		var xmlhttp = false;
		alert("Error : No object created !");
		return;
	}
	
	xmlhttp.open(method, url, true);
	
	function onReadyStateChangeFunc() {
		if (xmlhttp.readyState==4) {
			if (xmlhttp.status == 200) {
				arrXmlResult = XmlParser(xmlhttp.responseXML);
				
				if(document.getElementById('menu_semaine_all')){document.getElementById('menu_semaine_all').style.display = 'none';}
				if(document.getElementById('barre_recherche')){document.getElementById('barre_recherche').style.display = 'none';}
				if(document.getElementById('barre_recherche_2')){document.getElementById('barre_recherche_2').style.display = 'none';}
				if(document.getElementById('barre_recherche_cat')){document.getElementById('barre_recherche_cat').style.display = 'none';}
				if(document.getElementById('barre_recherche_date')){document.getElementById('barre_recherche_date').style.display = 'none';}
				if(document.getElementById('barre_recherche_key')){document.getElementById('barre_recherche_key').style.display = 'none';}
				if(document.getElementById('barre_recherche_keyword')){document.getElementById('barre_recherche_keyword').style.display = 'none';}
				
				if(str.substring(0,4)=='cat_'){
					document.getElementById('barre_recherche_cat').style.display = 'block';
				}else if(str.substring(0,4)=='dat_'){
					document.getElementById('barre_recherche_date').style.display = 'block';
				}else if(str.substring(0,4)=='key_'){
					document.getElementById('barre_recherche_key').style.display = 'block';
				}else{
					document.getElementById('barre_recherche_keyword').style.display = 'block';
				}
				
				if(arrXmlResult != false){
					
					var div = document.getElementById('contenuAjax');
					div.innerHTML = '';
					
					var divSearch = document.createElement("DIV");
					divSearch.id = 'infos_recherche';
					if(str.substring(0,4)=='cat_'){
						divSearch.innerHTML = '<div id="infos_recherche_txt">Votre recherche pour la categorie <strong>"'+str.substring(4)+'"</strong> a donne '+arrXmlResult.length+' resultat(s)</div>';
					}else if(str.substring(0,4)=='dat_'){
						divSearch.innerHTML = '<div id="infos_recherche_txt">Votre recherche pour la date du <strong>"'+str.substring(4).substring(8,10)+'-'+str.substring(4).substring(5,7)+'-'+str.substring(4).substring(0,4)+'"</strong> a donne '+arrXmlResult.length+' resultat(s)</div>';
					}else if(str.substring(0,4)=='id__'){
						divSearch.innerHTML = '';	
					}else{
						divSearch.innerHTML = '<div id="infos_recherche_txt">Votre recherche pour le mot <strong>"'+str+'"</strong> a donne '+arrXmlResult.length+' resultat(s)</div>';
					}
					
					var divSelectVazy = document.createElement("DIV");
					divSelectVazy.innerHTML = '';
					
					if(str.substring(0,4)=='id__'){
						divSearch.style.display = 'none';
					}	
					
					if(arrXmlResult.length==1 && str.substring(0,4)!='cat_' && str.substring(0,4)!='dat_' && str.substring(0,4)!='key_'){					
						if(document.getElementById('barre_recherche_keyword')){document.getElementById('barre_recherche_keyword').style.display = 'none';}
						var divRecherche = document.createElement("DIV");
						divRecherche.id = 'barre_recherche_2';
						divRecherche.innerHTML = '<a href="http://ns352290.ovh.net/Public/home.php"><img src="http://ns352290.ovh.net/Public/images/website/home.gif" border="0"/></a><img src="http://ns352290.ovh.net/Public/image_bar_recherche.php?title='+arrXmlResult[0][1]+'&amp;myfont=VAG Rounded BT.ttf&amp;size=12&amp;txtcolor=2a2a2a&amp;bgcolor=D3D0C9" /><a href="http://ns352290.ovh.net/Public/flux_rss.php"><img src="images/website/rss_btn.gif" border="0" /></a>';
						document.getElementById('contenuAjax').appendChild(divRecherche);
					}
					
					div.appendChild(divSearch);	
					
					if(arrXmlResult.length==1){
						
						ext = 0;
						
						var picto = "";
						if(arrXmlResult[ext][8]!='test'){
							picto += '<a href="'+arrXmlResult[ext][8]+'" target="_blank"><img src="images/website/video.gif" width="25" height="25" border="0" hspace="0" vspace="0"  /></a>';	
						}
						if(arrXmlResult[ext][9]!='test'){
							picto += '<a href="'+arrXmlResult[ext][9]+'" target="_blank"><img src="images/website/audio.gif" width="25" height="25" border="0" hspace="0" vspace="0"  /></a>';	
						}
						if(arrXmlResult[ext][10]!='test'){
							picto += '<a href="'+arrXmlResult[ext][10]+'" target="_blank"><img src="images/website/info.gif" width="25" height="25" border="0" hspace="0" vspace="0"  /></a>';	
						}
						
						var today = new Date();
						var time  = '';
						//alert(arrXmlResult[ext][11].substr(0,4)+' '+arrXmlResult[ext][11].substr(5,2)+' '+arrXmlResult[ext][11].substr(8,2));
						var dateIn  = new Date(arrXmlResult[ext][11].substr(0,4),arrXmlResult[ext][11].substr(5,2),arrXmlResult[ext][11].substr(8,2));
						var dateOut = new Date(arrXmlResult[ext][12].substr(0,4),arrXmlResult[ext][12].substr(5,2),arrXmlResult[ext][12].substr(8,2));
						
						if(dateIn.getTime() == today.getTime()){
							time = 'Aujourd\'hui jusqu\'au '+arrXmlResult[ext][12].substr(8,2)+'/'+arrXmlResult[ext][12].substr(5,2)+'/'+arrXmlResult[ext][12].substr(0,4);
							//time += dateIn.getTime();
							//alert('1');
						}else if(dateIn.getTime() > today.getTime()){
							
							if(dateOut > dateIn){
								time = 'Du '+arrXmlResult[ext][11].substr(8,2)+'/'+arrXmlResult[ext][11].substr(5,2)+'/'+arrXmlResult[ext][11].substr(0,4)+ ' au '+arrXmlResult[ext][12].substr(8,2)+'/'+arrXmlResult[ext][12].substr(5,2)+'/'+arrXmlResult[ext][12].substr(0,4);	
							}else{
								time = 'Le '+arrXmlResult[ext][11].substr(8,2)+'/'+arrXmlResult[ext][11].substr(5,2)+'/'+arrXmlResult[ext][11].substr(0,4);
							}
							//time += dateIn.getTime()+'='+today.getTime();
						}else{
							time = 'Jusqu\'au '+arrXmlResult[ext][12].substr(8,2)+'/'+arrXmlResult[ext][12].substr(5,2)+'/'+arrXmlResult[ext][12].substr(0,4);	
							//time += dateIn.getTime();
						}
						
						//var DivC = document.createElement("DIV");
						//DivC.className = 'event_result';
						//DivC.id = 'm_'+arrXmlResult[ext][0];					   
						//DivC.innerHTML = '<div class="event_result_image"><a href="javascript:OuvrirOption('+arrXmlResult[ext][0]+');"><img src="http://ns352290.ovh.net/Public/image_result.php?path='+arrXmlResult[ext][3]+'" alt="'+arrXmlResult[ext][1]+'" border="0" width="47" height="47" /></a></div>';						
						//DivC.innerHTML += '<div class="event_result_image_cat"><img src="http://ns352290.ovh.net/Public/images/etiquettes/'+arrXmlResult[ext][2]+'" height="15" /></div>';						
						//DivC.innerHTML += '<div class="event_result_titre"><a href="javascript:OuvrirOption('+arrXmlResult[ext][0]+');" class="lien_description">'+arrXmlResult[ext][1]+'</a> | '+time+'</div><br />';					   
						//DivC.innerHTML += '<div class="event_result_description">'+descrMin(arrXmlResult[ext][4])+'&nbsp;<a href=\'javascript:OuvrirOption('+arrXmlResult[ext][0]+')\' class="lien_description">[...]</a></div>';							
							
							// Creation du div overflowHidden
							var DivO = document.createElement("DIV");
							DivO.className = 'overflowHidden'; //overflow:hidden; height:1px; width:694px; padding-top:2px;
							DivO.id = 't_'+arrXmlResult[ext][0];
							
							// Creation du div contenuCache
							var DivCC = document.createElement("DIV");
							DivCC.className = 'event_page';
							DivCC.id = 'b_'+arrXmlResult[ext][0];
							DivCC.marginTop = '3px';							
							//DivCC.innerHTML = '<div style="position:absolute; top:5px; right:5px;"><a href="javascript:OuvrirOption('+arrXmlResult[ext][0]+');" class="lien_description">[fermer]</a></div>';			   						   
							DivCC.innerHTML += '<div class="event_image"><img src="http://ns352290.ovh.net/Public/image_event.php?path=/Files'+arrXmlResult[ext][3]+'&path_cat=/Public/images/etiquettes/'+arrXmlResult[ext][2]+'&color=e9e7e4&nomargin=true" alt="" border="0"/></div>';							
							DivCC.innerHTML += '<div class="event_page_titre"><img src="http://ns352290.ovh.net/Public/titrage.php?title='+arrXmlResult[ext][1].replace(/&/g,'%26')+'&amp;myfont=VAG Rounded BT.ttf&amp;size=18&amp;txtcolor=000000&amp;bgcolor=E9E7E4" /></div><br/><span style="font-weight:bold; color:#0066FF" >Du '+arrXmlResult[0][11].substr(8,2)+'-'+arrXmlResult[0][11].substr(5,2)+'-'+arrXmlResult[0][11].substr(0,4)+ ' au '+arrXmlResult[0][12].substr(8,2)+'-'+arrXmlResult[0][12].substr(5,2)+'-'+arrXmlResult[0][12].substr(0,4)+'</span><br/>';							
							DivCC.innerHTML += '<div class="event_description">'+arrXmlResult[ext][4].replace(/&apos;/g,'\'')+'</div>';							
							DivCC.innerHTML += '<div style="clear:both"></div>';								
							DivCC.innerHTML += '<div class="event_infos"><img src="http://ns352290.ovh.net/Public/titrage.php?title=O&#249;?&amp;myfont=VAG Rounded BT.ttf&amp;size=12&amp;txtcolor=2a2a2a&amp;bgcolor=D3D0C9" /><br/>'+arrXmlResult[ext][5]+'<br/><img src="http://ns352290.ovh.net/Public/titrage.php?title=Quand?&amp;myfont=VAG Rounded BT.ttf&amp;size=12&amp;txtcolor=2a2a2a&amp;bgcolor=D3D0C9" /><br/>'+arrXmlResult[ext][6]+'<br/><img src="http://ns352290.ovh.net/Public/titrage.php?title=Combien?&amp;myfont=VAG Rounded BT.ttf&amp;size=12&amp;txtcolor=2a2a2a&amp;bgcolor=D3D0C9" /><br/>'+arrXmlResult[ext][7]+'</div><div class="icones_details">'+picto+' &#160; <a href="javascript:;" onclick="$toggle(\'envoi_ami\')"><img src="images/website/envoi_ami_ico.gif" width="25" height="25" border="0" hspace="0" vspace="0" alt="Envoyer a un ami" title="Envoyer a un ami"  /></a><a href="http://ns352290.ovh.net/Public/Event_print.php?ID='+arrXmlResult[ext][0]+'" target="_blank"><img src="images/website/print.gif" width="25" height="25" border="0" hspace="0" vspace="0" /></a></div>';	
							
							//DivCC.innerHTML += '<div id="envoi_ami" style="display:none; background:#fff;"><form action="details.php" target="_self" method="get" name="form_reponse"><input type="hidden" name="action" value="send" /><input type="hidden" name="ID_VAZY" value="" /><input type="hidden" name="ID" value="'+arrXmlResult[ext][0]+'" /><table width="650" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px" cellpadding="6" cellspacing="6"><tr><td colspan="4" style="padding-bottom:10px"><img src="images/website/reponse_ami.gif" border="0" /></td></tr><tr><td style="width:150px; padding-left:10px">Ton nom : </td><td style="width:170px"><input style="width:170px" type="text" name="nom"/></td><td style="width:80px">Ton email</td><td style="width:170px;"><input style="width:170px"  type="text" name="tonemail"/></td></tr><tr><td valign="top" style="width:150px; padding-left:10px">Message : </td><td colspan="3"><textarea style="width:454px" name="message" rows="6"></textarea></td></tr><tr><td style="width:160px"></td><td colspan="3"><table style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px"><tr><td valign="top"><input type="checkbox" size="30" name="newsregister" value="newsregister" />Je m\'abonne a la newsletter Vazy </td></tr></table></td></tr><tr><td colspan="4" style="padding-left:300px"><table><tr><td><input type="image" src="images/website/envoi_ami_bouton.gif"  name="envoyer" value="envoyer" onClick="document.form_ami.submit();" /></td></tr><tr><td><img src="images/website/envoi_ami_bouton2.gif" border="0" /></td></tr></table></td></tr></table></form></div>';
							
							DivCC.innerHTML += '<div id="envoi_ami" style="display:none; background:#fff;"><form action="details.php" target="_self" method="post" name="form_ami"><input type="hidden" name="action" value="send" /><input type="hidden" name="ID" value="'+arrXmlResult[ext][0]+'" /><table width="670" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px" cellpadding="6" cellspacing="6"><td colspan="4" style="padding-bottom:10px"><img src="images/website/envoi_ami.gif" border="0" /></td></tr><tr><td style="width:150px; padding-left:10px">Ton nom : </td><td><input style="width:170px" type="text" name="nom"/></td><td style="padding-left:10px">Ton email : </td><td><input style="width:170px" type="text" name="tonemail"/></td></tr><tr><td style="width:150px; padding-left:10px">Email de tes amis : </td><td colspan="3"><input style="width:468px" type="text" name="email"/></td></tr><tr><td style="width:150px; padding-left:10px">&#160;</td><td colspan="3"><span style="font-style:italic; color:#999999">Separer les emails par des ;</span></td></tr><tr><td valign="top" style="width:150px; padding-left:10px">Message : </td><td colspan="3"><textarea style="width:468px" name="message" rows="6"></textarea></td></tr><tr><td style="width:150px">&#160;</td><td colspan="3"><table style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px"><tr><td><input style="" type="checkbox" name="newsregister" /></td><td>Je m\'abonne a la magnifique newsletter VAZY!</td></tr></table></td></tr><tr><td colspan="4" style="padding-left:300px"><table><tr><td><input type="image" src="images/website/envoi_ami_bouton.gif"  name="envoyer" value="envoyer" onclick="document.form_ami.submit();" /></td></tr><tr><td><img src="images/website/envoi_ami_bouton2.gif" border="0" /></td></tr></table></td></tr></table></form></div>';
							
						//DivO.appendChild(DivCC);							
						//div.appendChild(DivC);
						div.appendChild(DivCC);	
						
						//div.appendChild(page);
						
					}else{	
					
						div.appendChild(divSelectVazy);
						
						var cpt_i = 8;	
						var cpt = Math.ceil((arrXmlResult.length)/cpt_i);	
						
						for(t = 1; t<=cpt; t++){
							
							var page = document.createElement("DIV");
							page.id = 'page_'+t;
							if(t!=1){
								page.style.display = 'none';
							}
							
							for(i=0; i<cpt_i; i++){	
							
								ext = Math.ceil(i+((t*cpt_i)-cpt_i));
								
								if(ext<arrXmlResult.length){
								
								var picto = "";
								if(arrXmlResult[ext][8]!='test'){
									picto += '<a href="'+arrXmlResult[ext][8]+'" target="_blank"><img src="images/website/video.gif" width="25" height="25" border="0" hspace="0" vspace="0"  /></a>';	
								}
								if(arrXmlResult[ext][9]!='test'){
									picto += '<a href="'+arrXmlResult[ext][9]+'" target="_blank"><img src="images/website/audio.gif" width="25" height="25" border="0" hspace="0" vspace="0"  /></a>';	
								}
								if(arrXmlResult[ext][10]!='test'){
									picto += '<a href="'+arrXmlResult[ext][10]+'" target="_blank"><img src="images/website/info.gif" width="25" height="25" border="0" hspace="0" vspace="0"  /></a>';	

								}
								
								var today = new Date();
								var time  = '';
								//alert(arrXmlResult[ext][11].substr(0,4)+' '+arrXmlResult[ext][11].substr(5,2)+' '+arrXmlResult[ext][11].substr(8,2));
								var dateIn  = new Date(arrXmlResult[ext][11].substr(0,4),arrXmlResult[ext][11].substr(5,2),arrXmlResult[ext][11].substr(8,2));
								var dateOut = new Date(arrXmlResult[ext][12].substr(0,4),arrXmlResult[ext][12].substr(5,2),arrXmlResult[ext][12].substr(8,2));
								
								if(dateIn.getTime() == today.getTime()){
									time = 'Aujourd\'hui jusqu\'au '+arrXmlResult[ext][12].substr(8,2)+'/'+arrXmlResult[ext][12].substr(5,2)+'/'+arrXmlResult[ext][12].substr(0,4);
									//time += dateIn.getTime();
									//alert('1');
								}else if(dateIn.getTime() > today.getTime()){
									
									if(dateOut > dateIn){
										time = 'Du '+arrXmlResult[ext][11].substr(8,2)+'/'+arrXmlResult[ext][11].substr(5,2)+'/'+arrXmlResult[ext][11].substr(0,4)+ ' au '+arrXmlResult[ext][12].substr(8,2)+'/'+arrXmlResult[ext][12].substr(5,2)+'/'+arrXmlResult[ext][12].substr(0,4);	
									}else{
										time = 'Le '+arrXmlResult[ext][11].substr(8,2)+'/'+arrXmlResult[ext][11].substr(5,2)+'/'+arrXmlResult[ext][11].substr(0,4);
									}
									//time += dateIn.getTime()+'='+today.getTime();
								}else{
									time = 'Jusqu\'au '+arrXmlResult[ext][12].substr(8,2)+'/'+arrXmlResult[ext][12].substr(5,2)+'/'+arrXmlResult[ext][12].substr(0,4);	
									//time += dateIn.getTime();
								}
								
								/*if(arrXmlResult[ext][13]=='Event'){
									time += '<div style="position:absolute;top:-4px;right:-25px;"><img src="images/website/select_vazy_ico.gif" border="0" width="18" height="17"></div>';	
								}*/
								
								var DivC = document.createElement("DIV");
								DivC.className = 'event_result';
								DivC.id = 'm_'+arrXmlResult[ext][0];					   
								DivC.innerHTML = '<div class="event_result_image"><a href="javascript:OuvrirOption('+arrXmlResult[ext][0]+');"><img src="http://ns352290.ovh.net/Public/image_result.php?path='+arrXmlResult[ext][3]+'" alt="'+arrXmlResult[ext][1]+'" border="0" width="47" height="47" /></a></div>';						
								DivC.innerHTML += '<div class="event_result_image_cat"><img src="http://ns352290.ovh.net/Public/images/etiquettes/'+arrXmlResult[ext][2]+'" height="15" /></div>';						
								DivC.innerHTML += '<div class="event_result_titre" style="position:relative;"><a href="javascript:OuvrirOption('+arrXmlResult[ext][0]+');" class="lien_description">'+arrXmlResult[ext][1]+'</a> | '+time+'</div><br /><br />';					   
								DivC.innerHTML += '<div class="event_result_description" style="margin-top:5px;">'+descrMin(arrXmlResult[ext][4].replace(/&apos;/g,'\''))+'&nbsp;<a href=\'javascript:OuvrirOption('+arrXmlResult[ext][0]+')\' class="lien_description">[...]</a></div>';							
									
									// Creation du div overflowHidden
									var DivO = document.createElement("DIV");
									DivO.className = 'overflowHidden'; //overflow:hidden; height:1px; width:694px; padding-top:2px;
									DivO.id = 't_'+arrXmlResult[ext][0];
									
									// Creation du div contenuCache
									var DivCC = document.createElement("DIV");
									DivCC.className = 'event_page';
									DivCC.id = 'b_'+arrXmlResult[ext][0];
									DivCC.marginTop = '3px';							
									DivCC.innerHTML = '<div style="position:absolute; top:5px; right:5px;"><a href="javascript:OuvrirOption('+arrXmlResult[ext][0]+');" class="lien_description">[fermer]</a></div>';			   						   
									DivCC.innerHTML += '<div class="event_image" onclick="javascript:searchObj(\'id__'+arrXmlResult[ext][0]+'\');"><img src="http://ns352290.ovh.net/Public/image_event.php?path=/Files'+arrXmlResult[ext][3]+'&path_cat=/Public/images/etiquettes/'+arrXmlResult[ext][2]+'&color=e9e7e4&nomargin=true" alt="" border="0"/></div>';							
									DivCC.innerHTML += '<div class="event_page_titre"><img src="http://ns352290.ovh.net/Public/titrage.php?title='+arrXmlResult[ext][1].replace(/&/g,'%26')+'&amp;myfont=VAG Rounded BT.ttf&amp;size=18&amp;txtcolor=000000&amp;bgcolor=E9E7E4" /></div><br />';							
									DivCC.innerHTML += '<div class="event_description">'+arrXmlResult[ext][4].replace(/&apos;/g,'\'')+'</div>';							
									DivCC.innerHTML += '<div style="clear:both"></div>';								
									DivCC.innerHTML += '<div class="event_infos" style="height:90px;"><img src="http://ns352290.ovh.net/Public/titrage.php?title=O&#249;?&amp;myfont=VAG Rounded BT.ttf&amp;size=12&amp;txtcolor=2a2a2a&amp;bgcolor=D3D0C9" /><br/>'+arrXmlResult[ext][5]+'<br/><img src="http://ns352290.ovh.net/Public/titrage.php?title=Quand?&amp;myfont=VAG Rounded BT.ttf&amp;size=12&amp;txtcolor=2a2a2a&amp;bgcolor=D3D0C9" /><br/>'+arrXmlResult[ext][6]+'<br/><img src="http://ns352290.ovh.net/Public/titrage.php?title=Combien?&amp;myfont=VAG Rounded BT.ttf&amp;size=12&amp;txtcolor=2a2a2a&amp;bgcolor=D3D0C9" /><br/>'+arrXmlResult[ext][7]+'</div><div class="icones_details">'+picto+' &#160; <a href="details.php?ID='+arrXmlResult[ext][0]+'&sendtoafriend=yes"><img src="images/website/envoi_ami_ico.gif" width="25" height="25" border="0" hspace="0" vspace="0" alt="Envoyer a un ami" title="Envoyer a un ami"  /></a><a href="http://ns352290.ovh.net/Public/Event_print.php?ID='+arrXmlResult[ext][0]+'" target="_blank"><img src="images/website/print.gif" width="25" height="25" border="0" hspace="0" vspace="0" /></a></div>';	
								
								DivO.appendChild(DivCC);							
								page.appendChild(DivC);
								page.appendChild(DivO);	
								
								}
								
							}
							
							div.appendChild(page);
						}
						
						var page = document.createElement("DIV");
						page.style.background = '#D3D0C9';
						page.style.padding = '5px 2px';
						page.style.margin = '10px 0';
						page.style.fontWeight = 'bold';
						for(e=1; e<=cpt; e++){
							if(e==1){
								page.innerHTML += '<a href="javascript:;" onclick="PasserPage(\''+e+'\',\''+cpt+'\');" class="pagination" style="color:#000;" id="pagination_'+e+'">Page '+e+'</a>';	
							}else{
								page.innerHTML += ' | <a href="javascript:;" onclick="PasserPage(\''+e+'\',\''+cpt+'\');" class="pagination" id="pagination_'+e+'">Page '+e+'</a>';								
								
							}
						}
						div.appendChild(page);
						
					}
					
				}else{
					
					// aucun résultat
					var div = document.getElementById('contenuAjax');
					if(str.substring(0,4)=='cat_'){
						div.innerHTML = '<div id="infos_recherche"><div id="infos_recherche_txt">Votre recherche pour la categorie <strong>"'+str.substring(4)+'"</strong> n\'a donne aucun resultat</div></div>';
					}else{
						div.innerHTML = '<div id="infos_recherche"><div id="infos_recherche_txt">Votre recherche pour le mot <strong>"'+str+'"</strong> n\'a donne aucun resultat</div></div>';
					}
				}
				
				loading.style.display = 'none';
				//cache.style.display = 'none';
				//document.body.style.overflow = 'auto';
				/*document.body.style.filter = 'alpha(opacity=100)';
				document.body.style.opacity =  '100';
				document.body.style.MozOpacity = '100';
				document.body.style.KhtmlOpacity =  '100';*/
			}
		}
	}
	
	xmlhttp.onreadystatechange = onReadyStateChangeFunc;
	xmlhttp.setRequestHeader("Content-Type", "text/xml");
	xmlhttp.send('');
	
}

function PasserPage(page, tot){
	for(a=1; a<=tot; a++){
		document.getElementById('page_'+a).style.display = 'none';	
		document.getElementById('pagination_'+a).style.color = '#333333';	
	}
	document.getElementById('page_'+page).style.display = 'block';	
	document.getElementById('pagination_'+page).style.color = '#000';	
}

function descrMin(str){
	var obj=new RegExp("[<][a-zA-Z1-9 \b=\"]{1,50}[>]", "gi");
	str = str.replace(obj, ''); 
	str = str.substr(0,150);	
	return str;
}

function OuvrirOption(id){
	
	// déclarations des variables
	var miniature 		= document.getElementById('m_'+id).style;
	var contenuCache = document.getElementById('b_'+id).style;
	var overflowHidden	= document.getElementById('t_'+id).style;
	
	// Hauteur du div contenuCache
	var tailleMax = document.getElementById('b_'+id).offsetHeight+5;
	var tailleMin = 1;
	var speed = 2;
	var timer = 0;
	
	// Si le div overflowHidden est à 1px
	if(document.getElementById('t_'+id).style.height == '1px' || document.getElementById('t_'+id).style.height == ''){	
		// aggrandissement du div overflowHidden à la taille du div qu'il contient
		for(i = tailleMin; i <= tailleMax; i++) {	
			setTimeout("document.getElementById('t_"+id+"').style.height = '"+i+"px';",(timer * speed));
			timer++;						
		}		
	}else{
		for(i = tailleMax; i >= tailleMin; i--) {	
			setTimeout("document.getElementById('t_"+id+"').style.height = '"+i+"px';",(timer * speed));
			timer++;						
		}	
	}
}