var xmlHttp
var salon
function affichage_menu_exp_niveau2(id_elt, salon, element) {
	
    var tabs=document.getElementById('recherche_menu_niveau1').getElementsByTagName("a");

    for (var i=0; i < tabs.length; i++)
    {
        if(tabs[i].rel == element.rel) 
           tabs[i].className="selected";

 
        else
           tabs[i].className="";
    }
	if (id_elt.length>0) {
		xmlHttp=GetXmlHttpObject_cf();
		if (xmlHttp==null)
		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 

		var url="ajax_exposants_menu.php";
		url=url+"?id_elt="+id_elt;
		url=url+"&salon="+salon;
		url=url+"&sid="+Math.random();

		xmlHttp.onreadystatechange=stateChanged_exp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
		
	}
}
function stateChanged_exp() 
{ 

	if (xmlHttp.readyState==4)
	{ 
	
		if (xmlHttp.responseText.length==0) {
			document.getElementById("recherche_menu_niveau2").innerHTML=xmlHttp.responseText;
		}
		if (xmlHttp.responseText.length>0) {
			document.getElementById("recherche_menu_niveau2").innerHTML=""+xmlHttp.responseText+"";
		}
		$.fn.nyroModal.settings.width = 796;
		$.fn.nyroModal.settings.height = 600;

		$(".nyroModal").nyroModal();
		
		affichage_exposants('','0','52');
	}
}



function affichage_exposants(typexp, id_elt, salon) {
	
	if (id_elt.length>0) {
		xmlHttp=GetXmlHttpObject_cf();
		if (xmlHttp==null)
		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 

		var url="ajax_exposants_liste.php";
		url=url+"?id_elt="+id_elt;
		url=url+"&typexp="+typexp;
		url=url+"&salon="+salon;
		url=url+"&sid="+Math.random();

		xmlHttp.onreadystatechange=stateChanged_lstexp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
}
function stateChanged_lstexp() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	
		if (xmlHttp.responseText.length==0) {
			document.getElementById("block_resultats").innerHTML=xmlHttp.responseText;
		}
		if (xmlHttp.responseText.length>0) {
			document.getElementById("block_resultats").innerHTML=""+xmlHttp.responseText+"";
		}
		$.fn.nyroModal.settings.width = 796;
		$.fn.nyroModal.settings.height = 600;
		$(".nyroModal").nyroModal();
	
		$(".confex").click(function(e){
			var dropDown = $(this).parent().next();
			$('.dropdown').not(dropDown).slideUp('slow');
			dropDown.slideToggle('slow');
			e.preventDefault();
		})
	}
}














function GetXmlHttpObject_cf()
{
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;
}
