var xmlHttp
function calculs_devis(str,id,typ)
{
	$.ajax({ 
		url: "/v2/exposants_devis_calculs.php?q="+str+"&id="+id+"&typ="+typ+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
} 
function playVideo(id_video, salon)
{
	$.ajax({ 
		url: "/v3/ajax_video.php?id_v="+id_video+"&salon="+salon,
		cache: false, 
		success:function(html){ 
			afficher_lavideo(html);
			FB.XFBML.parse(document.getElementById('la_video'));
			twttr.widgets.load();			
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
	function afficher_lavideo(donnees){ 
		$("#la_video").empty(); 
		$("#la_video").append(donnees); 
		FB.XFBML.parse(document.getElementById('la_video'));
		twttr.widgets.load();
	}
}


function choix_etapes_pod(salon, panier) {
	var valeur = document.fetapes.choix;
    var tmp="";
    for (var i=0;i < valeur.length; i++)
    {    if ( valeur[i].checked )
        {    tmp+="|"+valeur[i].value;    }
    }
	
	$.ajax({ 
		url: "/v3/ajax_podcasts_liste.php?tp=3&id="+tmp+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespod(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');	
			FB.XFBML.parse(document.getElementById('listeExposants'));
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});	
}
function affichage_podcasts(tp, id, salon, panier) {
	$.ajax({ 
		url: "/v3/ajax_podcasts_liste.php?tp="+tp+"&id="+id+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespod(html);  
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			FB.XFBML.parse(document.getElementById('listeExposants'));
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function ordre_podcasts(ordre,colonne,id,tp,salon,panier) {
	$.ajax({ 
		url: "/v3/ajax_podcasts_liste.php?tp="+tp+"&id="+id+"&ordre="+ordre+"&colonne="+colonne+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespod(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			FB.XFBML.parse(document.getElementById('listeExposants'));
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function afficher_etapespod(donnees){ 
	$("#listeExposants").empty(); 
	$("#listeExposants").append(donnees); 
}



function choix_etapes_conf(salon, panier) {
	var valeur = document.fetapes.choix;
    var tmp="";
    for (var i=0;i < valeur.length; i++)
    {    if ( valeur[i].checked )
        {    tmp+="|"+valeur[i].value;    }
    }
	$.ajax({ 
		url: "/v3/ajax_conferences_liste.php?tp=3&id="+tmp+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapesconf(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function affichage_conferences(tp, id, salon, panier) {
	$.ajax({ 
		url: "/v3/ajax_conferences_liste.php?tp="+tp+"&id="+id+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapesconf(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function ordre_conferences(ordre,colonne,id,tp,salon,panier) {
	$.ajax({ 
		url: "/v3/ajax_conferences_liste.php?tp="+tp+"&id="+id+"&ordre="+ordre+"&colonne="+colonne+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapesconf(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function afficher_etapesconf(donnees){ 
	$("#listeExposants").empty(); 
	$("#listeExposants").append(donnees); 
}


function choix_etapes_par_esp(salon, panier) {
	var valeur = document.fetapes.choix;
    var tmp="";
    for (var i=0;i < valeur.length; i++)
    {    if ( valeur[i].checked )
        {    tmp+="|"+valeur[i].value;    }
    }
	$.ajax({ 
		url: "/v3/ajax_espaces_parcours_liste.php?tp=3&id="+tmp+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function affichage_parcours_espaces(tp, id, salon, panier) {
	$.ajax({ 
		url: "/v3/ajax_espaces_parcours_liste.php?tp="+tp+"&id="+id+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function ordre_parcours_espaces(ordre,colonne,id,tp,salon,panier) {
	$.ajax({ 
		url: "/v3/ajax_espaces_parcours_liste.php?tp="+tp+"&id="+id+"&ordre="+ordre+"&colonne="+colonne+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function choix_etapes_par_conf(salon, panier) {
	var valeur = document.fetapes.choix;
    var tmp="";
    for (var i=0;i < valeur.length; i++)
    {    if ( valeur[i].checked )
        {    tmp+="|"+valeur[i].value;    }
    }
	$.ajax({ 
		url: "/v3/ajax_conferences_parcours_liste.php?tp=3&id="+tmp+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function affichage_parcours_conferences(tp, id, salon, panier) {
	$.ajax({ 
		url: "/v3/ajax_conferences_parcours_liste.php?tp="+tp+"&id="+id+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function ordre_parcours_conferences(ordre,colonne,id,tp,salon,panier) {
	$.ajax({ 
		url: "/v3/ajax_conferences_parcours_liste.php?tp="+tp+"&id="+id+"&ordre="+ordre+"&colonne="+colonne+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function afficher_etapespar(donnees){ 
	$("#parcours_contenu").empty(); 
	$("#parcours_contenu").append(donnees); 
}





function choix_etapes_par_exp(salon, panier) {
	var valeur = document.fetapes.choix;
    var tmp="";
    for (var i=0;i < valeur.length; i++)
    {    if ( valeur[i].checked )
        {    tmp+="|"+valeur[i].value;    }
    }
	$.ajax({ 
		url: "/v3/ajax_exposants_parcours_liste.php?tp=3&id="+tmp+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});	
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function affichage_parcours_exposants(tp, id, salon, panier) {
	$.ajax({ 
		url: "/v3/ajax_exposants_parcours_liste.php?tp="+tp+"&id="+id+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});	
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function ordre_parcours_exposants(ordre,colonne,id,tp,salon,panier) {
	$.ajax({ 
		url: "/v3/ajax_exposants_parcours_liste.php?tp="+tp+"&id="+id+"&ordre="+ordre+"&colonne="+colonne+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapespar(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}







function choix_etapes(salon, panier) {
	var valeur = document.fetapes.choix;
    var tmp="";
    for (var i=0;i < valeur.length; i++)
    {    if ( valeur[i].checked )
        {    tmp+="|"+valeur[i].value;    }
    }
	$.ajax({ 
		url: "/v3/ajax_exposants_liste.php?tp=3&id="+tmp+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapesconf(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function affichage_exposants(tp, id, salon, panier) {
	$.ajax({ 
		url: "/v3/ajax_exposants_liste.php?tp="+tp+"&id="+id+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapesconf(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function ordre_exposants(ordre,colonne,id,tp,salon,panier) {
	$.ajax({ 
		url: "/v3/ajax_exposants_liste.php?tp="+tp+"&id="+id+"&ordre="+ordre+"&colonne="+colonne+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapesconf(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}


function ajout_selection(id, typ) {
		xmlHttp=GetXmlHttpObject_cf();
		if (xmlHttp==null)
		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 

		var url="/v3/ajax_panier.php";
		url=url+"?id="+id;
		url=url+"&typ="+typ;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChanged_panier;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
}
function stateChanged_panier() 
{ 

}


function affichage_competences(comp, salon, panier, id) {
	var valeur = document.fcomp.comp;
    var tmp="";
    for (var i=0;i < valeur.length; i++)
    {    if ( valeur[i].checked )
        {    tmp+="|"+valeur[i].value;    }
    }
	
	
	$.ajax({ 
		url: "/v3/ajax_exposants_liste.php?tp=2&id="+tmp+"&selection="+panier+"&id_salon="+salon+"&sid="+Math.random(),
		cache: false, 
		success:function(html){ 
			afficher_etapesconf(html);
			getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
			getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
			getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
			getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
			getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
			$('.selectionAdd').click(function(e){
				$(this).addClass('selectionRemove').removeClass('selectionAdd');
				removeSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});
			$('.selectionRemove').click(function(e){
				$(this).addClass('selectionAdd').removeClass('selectionRemove');
				addSelection();
				getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
				getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
				e.preventDefault();
			});		
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
}
function afficher_popup_comp(){
	var fenetre = document.getElementById('fenetre_comp');
	if(fenetre.style.display == "none" || !fenetre.style.display){
		fenetre.style.display = "block";
	}else if(fenetre.style.display == "block"){
		fenetre.style.display = "none";
	}
}


function stateChanged_lst_exp() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		if (xmlHttp.responseText.length==0) {
			document.getElementById("listeExposants").innerHTML=xmlHttp.responseText;
		}
		if (xmlHttp.responseText.length>0) {
			document.getElementById("listeExposants").innerHTML=""+xmlHttp.responseText+"";
		}
	}
}
function GetXmlHttpObject_cf()
{
	var xmlHttp=null;
	try {
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function addSelection()
{
  	$('.selectionAdd').click(function(e){
  		$(this).addClass('selectionRemove').removeClass('selectionAdd');
  		removeSelection();
	
		getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
		getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');

  		e.preventDefault();

  	});
	
}
function removeSelection()
{
  	$('.selectionRemove').click(function(e){
  		$(this).addClass('selectionAdd').removeClass('selectionRemove');
  		addSelection();
	
		getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
		getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');

  		e.preventDefault();
  	});
	
}
function bigAddSelection()
{
  	$('.addToSelection').click(function(e){
  		$(this).addClass('removeFromSelection').removeClass('addToSelection').text('Enlever de ma sélection');
  		bigRemoveSelection();
  		e.preventDefault();
  	});
	
}
function bigRemoveSelection()
{
  	$('.removeFromSelection').click(function(e){
  		$(this).addClass('addToSelection').removeClass('removeFromSelection').text('Ajouter à ma sélection');
  		bigAddSelection();
  		e.preventDefault();
  	});
	
}

function medAddSelection()
{
  	$('.selectionAddLink').click(function(e){
  		$(this).addClass('selectionRemoveLink').removeClass('selectionAddLink').text('Enlever de ma sélection');
  		medRemoveSelection();
  		e.preventDefault();
  	});
	
}
function medRemoveSelection()
{
  	$('.selectionRemoveLink').click(function(e){
  		$(this).addClass('selectionAddLink').removeClass('selectionRemoveLink').text('Ajouter à ma sélection');
  		medAddSelection();
  		e.preventDefault();
  	});
	
}

function showList(elt,rub)
{
	$('#listeExposants').hide();
	$('#listeEspTh').hide();
	$('#listeConf').hide();
	$('a.expo').parent().removeClass('current');
	$('a.espth').parent().removeClass('current');
	$('a.conf').parent().removeClass('current');

	$('a.' + rub).parent().addClass('current');
	$(elt).show();
}

function animateLabel(eltClass,eltFollowClass,widthParam)
{
	$(eltClass).hover(function () {
			$(this).animate({width: widthParam},80);
			$(eltFollowClass).show();
		},
		function () {
			$(eltFollowClass).hide();
			$(this).animate({width: '+25'},40);
			$(this).animate({width: '+32'},150);
			$(this).animate({width: '+25'},200);
	});		
}

function getQTip(elt,text,at,my)
{
	$(elt).qtip(
	{
		content: { text: text },
		position: {
	      corner: {
	         at: at,
	         my: my
	      }
	   	},
	   style: {
	      classes: 'ui-tooltip-dark'
	   }
	});
}

function activate(elt,divToShow)
{
	var eltClass = $(elt).attr('class');
	
	if(eltClass == 'searchNav')
	{
	     $(elt).addClass('current');
	     $(divToShow).fadeIn();
	}
	else
	{
	     $(elt).attr('class','searchNav');
	     $(divToShow).fadeOut();
	}

}

$(document).ready(function(){
	
		
	$.localScroll();
	
	$('.leftAnimation .word1 div').delay(500).fadeIn('slow');
	$('.leftAnimation .word2 div').delay(800).fadeIn('slow');
	$('.leftAnimation .word3 div').delay(1200).fadeIn('slow');
	$('.leftAnimation .word4 div').delay(1500).fadeIn('slow');

	$('.rightAnimation .word1 div').delay(700).fadeIn('slow');
	$('.rightAnimation .word2 div').delay(1000).fadeIn('slow');
	$('.rightAnimation .word3 div').delay(1500).fadeIn('slow');
	$('.rightAnimation .word4 div').delay(2000).fadeIn('slow');
	
	
	$('.socials').show();
	animateLabel(".fbLabel",".facebookFollow","+205");
	animateLabel(".twtLabel",".twitterFollow","+90");
	animateLabel(".lknLabel",".linkedinFollow","+60");
	animateLabel(".gplLabel",".gplusFollow","+70");
	animateLabel(".youtLabel",".youtFollow","+200");
	animateLabel(".dmLabel",".dmFollow","+215");

	getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
	getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
	getQTip('a.listen','Télécharger la conférence audio','bottomCenter','topLeft');
	getQTip('a.downloadIcon','Télécharger cette conférence','bottomCenter','topLeft');
	getQTip('a.viewIcon','Télécharger la conférence multimédia','bottomCenter','topLeft');
	
	$('.qTipIt').qtip(
	{
		content: { attr: 'text'},
    		position: {
     		at: 'right top'
   		},
 		style: {
			classes: 'ui-tooltip-dark',
			tip: {
				corner: 'center center'
			}
		}
	});	
	
 	$('.peopleThumbs ul.thumb li').Zoomer({speedView:200,speedRemove:400,altAnim:true,speedTitle:400,debug:false});

     $("li.nav a").hover(function() {
     	$(this).parent().animate({ backgroundPosition: '0px -74px'}, 250);
     },function() {
     	$(this).parent().animate({ backgroundPosition: '0px 0px'}, 100);
     });

	
	 
	$('#search').focusin(function(){

		if($('#search').val() == 'Recherche rapide')
			$(this).val('');

	}).focusout(function(){
		
		if($('#search').val() == '')
			$(this).val('Recherche Rapide');
	});
	
	$('#slider').show().bxSlider({
		easing: 'easeOutBack',
		auto:true
  	});
  	
  	$('#tweets').bxSlider({
  		auto:true,
  		mode: 'vertical',
  		displaySlideQty:2,
  		moveSlideQty:2,
  		easing: 'jswing',
  		controls: false,
  		pause:9000
  	});
  	
  	/*
  	$('#actu').bxSlider({
  		auto:true,
  		mode: 'vertical',
  		displaySlideQty:1,
  		moveSlideQty:1,
  		easing: 'jswing',
  		controls: false,
  		pause:4500
  	});
  	*/
  	
  	$('.selectionAdd').click(function(e){
  		$(this).addClass('selectionRemove').removeClass('selectionAdd');
  		removeSelection();
	
		getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
		getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
  		
  		e.preventDefault();
  	});
  	
  	$('.selectionRemove').click(function(e){
  		$(this).addClass('selectionAdd').removeClass('selectionRemove');
  		addSelection();

		getQTip('a.selectionRemove','Enlever de ma sélection','bottomCenter','topLeft');
		getQTip('a.selectionAdd','Ajouter à ma sélection','bottomCenter','topLeft');
  		
  		e.preventDefault();
  	});
   	
  	$('.addToSelection').click(function(e){
  		$(this).addClass('removeFromSelection').removeClass('addToSelection').text('Enlever de ma sélection');
  		bigRemoveSelection();
  		e.preventDefault();
  	});
  	
  	$('.removeFromSelection').click(function(e){
  		$(this).addClass('addToSelection').removeClass('removeFromSelection').text('Ajouter à ma sélection');
  		bigAddSelection();
  		e.preventDefault();
  	});
  	  	
   	
  	$('.selectionAddLink').click(function(e){
  		$(this).addClass('selectionRemoveLink').removeClass('selectionAddLink').text('Enlever de ma sélection');
  		medRemoveSelection();
  		e.preventDefault();
  	});
  	
  	$('.selectionRemoveLink').click(function(e){
  		$(this).addClass('selectionAddLink').removeClass('selectionRemoveLink').text('Ajouter à ma sélection');
  		medAddSelection();
  		e.preventDefault();
  	});
  	

  	
  	$('.removeLine').click(function(e){
  		$(this).parent().parent().fadeOut();
  	     e.preventDefault();
  	});
 
	
	var textuserguide = $('#stepsContent').html();
	
	if (textuserguide=="") $('#stepsContent').html($('#userGuide').html()).show();
	
	$('#allSteps').hide();
	$('.profilesStep').show();
	 	
 	$('.profContainer .profilesList ul li').click(function(e){
 		
 		$('.profContainer .profilesList ul li').removeClass('current');
  		$(this).addClass('current');
 		
  		myClass = $(this).attr('class');
  		myId = myClass.split(' ');		
		myValue = $(this).attr('data-title');
		$('#parcours').html(myValue);
		$('#parcoursContent').show();
  		$('#allSteps','.profilesStep').show();
  		$('.mainContent').attr('id',myId[0]);
		$('.profilesStepTitle').hide();

		if(myId[0] == 'crea' || myId[0] == 'startup' || myId[0] == 'tpe')
  		{
 			contentVal = $('#' + myId[0] + 'Steps').html();

			$('#stepsContent').html(contentVal).show();
			$('.profilesStepTitle').show();

		  	$('.step').click(function(){
		  		
		  		valId = $(this).attr('id');
				myId = valId.split('p');
				id = myId[1];						
						
			     if($('#step' + id + ' input[name=step' + id + ']').attr('checked') == 'checked')
			     {
			          $('#ssStep' + id + '_1 input').attr('checked', true);
			          $('#ssStep' + id + '_2 input').attr('checked', true);
			          $('#ssStep' + id + '_3 input').attr('checked', true);
			    }
			     else
			     {
			          $('#ssStep' + id + '_1 input').attr('checked', false);
			          $('#ssStep' + id + '_2 input').attr('checked', false);
			          $('#ssStep' + id + '_3 input').attr('checked', false);
			     }
		  	});
		  	
		  	$('.ssStep').click(function(){
		  		valId = $(this).attr('id');
				myId = valId.split('_');
				id = myId[0].substr(6,1);
				
			     if($('#step' + id + ' input[name=step' + id + ']').attr('checked') == 'checked')
			     {
			          $('#step' + id + ' input[name=step' + id + ']').attr('checked', false);
			          $('#allSteps input[name=allSteps]').attr('checked',false);
				}
		  	});
			
		     $('#allSteps input[name=allSteps]').click(function(){
				
		     	if($('#allSteps input[name=allSteps]').attr('checked') == 'checked')
		     	{
		     		$('.step input').attr('checked', true);
		     		$('.ssStep input').attr('checked', true);
		     	}
		     	else
		     	{
		     		$('.step input').attr('checked', false);
		     		$('.ssStep input').attr('checked', false);
				}
		     });

  		}
  		else
  		{
  			$('#stepsContent').html($('#userGuide').html()).show();

			$('#allSteps').hide();
   			$('.profilesStep h2').removeClass('normal').addClass(myId[0]);
 		}	
  		
   		$('.profilesStep h2').removeClass('normal').addClass(myId[0]);
 		e.preventDefault();	
 	});
 	
	
	$('.bigSocial-facebook').hover(function(){
		$('.communitiesScreen').html('<a href="http://fr-fr.facebook.com/Le.Salon.des.Entrepreneurs" target="_blank"><img src="/v3/images/interface/screen-facebook.jpg" alt="Facebook" /></a>');
	});

	$('.bigSocial-twitter').hover(function(){
		$('.communitiesScreen').html('<a href="http://twitter.com/sdentrepreneurs" target="_blank"><img src="/v3/images/interface/screen-twitter.jpg" alt="Twitter" /></a>');
	});

	$('.bigSocial-linkedin').hover(function(){
		$('.communitiesScreen').html('<a href="http://www.linkedin.com/osview/canvas?_ch_page_id=1&_ch_panel_id=1&_ch_app_id=2000&_applicationId=2000&_ownerId=0&appParams=%7B%22event%22%3A%22763717%22%2C%22page%22%3A%22event%22%7D&trk=" target="_blank"><img src="/v3/images/interface/screen-linkedin.jpg" alt="LinkedIn" /></a>');
	});

	$('.bigSocial-youtube').hover(function(){
		$('.communitiesScreen').html('<a href="http://www.youtube.com/user/SalonEntrepreneurs?feature=watch" target="_blank"><img src="/v3/images/interface/screen-youtube.jpg" alt="Youtube" /></a>');
	});

	$('.bigSocial-viadeo').hover(function(){
		$('.communitiesScreen').html('<a href="" target="_blank"><img src="/v3/images/interface/screen-viadeo.jpg" alt="Viadeo" /></a>');
	});
	
	$('.bigSocial-dailymotion').hover(function(){
		$('.communitiesScreen').html('<a href="http://www.dailymotion.com/Salon_des_Entrepreneurs#videoId=xmsib0" target="_blank"><img src="/v3/images/interface/screen-dailymotion.jpg" alt="Dailymotion" /></a>');
	});

	
	/*** Get Modal window ***/
	$('.getModal').fancybox({
		'centerOnScroll'  : true,
		'onComplete' : function(){
		
			$('#formBox a.submitFormBox').click(function(e){
				name = $('#nom').val();
				name = $('#nom').val();
				forename = $('#prenom').val();
				email = $('#email').val();
				profile = $('#profile').val();
				salon = $('#salon').val();
				conf = $('#conf').val();
				cp = $('#cp').val();
				
				origine = $('#origine').val();
				type_elt = $('#type_elt').val();
				
				civ = $('#civ:checked').attr('value');
				valciv = $('#civ:checked').length;
				
				if(name == '' || forename == '')
				{
					$('.errorForm').html('Merci de remplir votre identité pour accéder à la conférence').fadeIn();
				}
				else if(email == '')
				{
					$('.errorForm').empty().html('Merci de saisir votre adresse email pour accéder à la conférence').fadeIn();
				}
				else if(cp == '')
				{
					$('.errorForm').empty().html('Merci de saisir votre code postal pour accéder à la conférence').fadeIn();
				}
				else if(!email.match(/^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$/i))		
				{
					$('.errorForm').empty().html('Merci de saisir une adresse email valide').fadeIn();
				}
				else if(profile == '' || profile == '0')
				{
					$('.errorForm').empty().html('Merci de sélectionner votre profil d\'entrepreneur').fadeIn();
				}
				else
				{
					// Submit form
					$('.errorForm').hide();
					$('#formBox').hide();
					
					$.ajax({ 
						url: "/v3/podcasts_enregistrements.php?nom="+name+"&prenom="+forename+"&mail="+email+"&profil="+profile+"&cp="+cp+"&civ="+civ+"&origine="+origine+"&type_elt="+type_elt+"&salon="+salon+"&conf="+conf+"&sid="+Math.random(),
						cache: false, 
						success:function(html){ 
							$('.formBoxContent').append('<div class="medGrey" style="font-weight : bold; font-size : 16px;">Un message est parti sur votre boîte mail avec les instructions pour accéder gratuitement au contenu sélectionné.</div>');
						},
						error:function(XMLHttpRequest, textStatus, errorThrows){
						}
					});

					//$.fancybox.close();
				}
				e.preventDefault();
			});
		
		}
	});


	/*** Community actions ***/
	(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/fr_FR/all.js#xfbml=1";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	
	window.___gcfg = {lang: 'fr'};
	
	(function() {
	  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
	  po.src = 'https://apis.google.com/js/plusone.js';
	  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
	})();

	$('.socialBar').show();

});

