function visible(id, bool) {
	if(bool)
		document.getElementById(id).style.display = "block";
	else
		document.getElementById(id).style.display = "none";
}

function intervenantAjax(articleId, topicId, associateId) {
	visible("unable", true);
	visible("ajaxContent", true);
	
	if(!associateId)
		deliajax_getXML("div:ajaxContent", "GET", "intervenants_ajax", "article_id:"+articleId+";topic_id:"+topicId, false);
	else
		deliajax_getXML("div:ajaxContent", "GET", "intervenants_ajax", "article_id:"+articleId+";topic_id:"+topicId+";associate_id:"+associateId, false);
	
	if(navigator.userAgent.indexOf("MSIE") != -1) {
		document.getElementById("unable").style.top = document.documentElement.scrollTop+"px";
		window.onscroll = function() { document.getElementById("unable").style.top = document.documentElement.scrollTop+"px" }
	}
	else {
		document.getElementById("unable").style.top = window.pageYOffset+"px";
		window.onscroll = function() { document.getElementById("unable").style.top = window.pageYOffset+"px" }
	}
}

function formateursAjax(articleId, topicId, associateId) {
	visible("unable", true);
	visible("ajaxContent", true);
	
	deliajax_getXML("div:ajaxContent", "GET", "formateurs_ajax", "article_id:"+articleId+";topic_id:"+topicId+";associate_id:"+associateId, false);
	
	if(navigator.userAgent.indexOf("MSIE") != -1) {
		document.getElementById("unable").style.top = document.documentElement.scrollTop+"px";
		window.onscroll = function() { document.getElementById("unable").style.top = document.documentElement.scrollTop+"px" }
	}
	else {
		document.getElementById("unable").style.top = window.pageYOffset+"px";
		window.onscroll = function() { document.getElementById("unable").style.top = window.pageYOffset+"px" }
	}
	
	window.location = "#ajaxContent";
}
function consultantsAjax(articleId, topicId, associateId) {
	visible("unable", true);
	visible("ajaxContent", true);
	
	deliajax_getXML("div:ajaxContent", "GET", "consultants_ajax", "article_id:"+articleId+";topic_id:"+topicId+";associate_id:"+associateId, false);
	
	if(navigator.userAgent.indexOf("MSIE") != -1) {
		document.getElementById("unable").style.top = document.documentElement.scrollTop+"px";
		window.onscroll = function() { document.getElementById("unable").style.top = document.documentElement.scrollTop+"px" }
	}
	else {
		document.getElementById("unable").style.top = window.pageYOffset+"px";
		window.onscroll = function() { document.getElementById("unable").style.top = window.pageYOffset+"px" }
	}
}
