var timer_site_ecriture_lectureID;
var timer_ia_site_lectureID;
var timer_chat_lectureID;
var timer_ia_chat_lectureID;
var timer_ia_nb_messages_recusID;
var timer_chat_ecritureID;
var timer_chat_invite_lectureID;

var timer_site_ecritureID;
var timer_site_lectureID;


/* timer_site_ecriture_lecture */
function START_timer_site_lecture()
	{
		timer_site_lectureID = setInterval(timer_site_lecture, 5000);
	}
function timer_site_lecture()
	{
		xmlhttpPost_timer_site_lecture("timer_site_lecture.php", "div_timer_site_lecture");
	}
function STOP_timer_site_lecture()
	{
		clearInterval(timer_site_lectureID);
	}
function xmlhttpPost_timer_site_lecture(strURL, dividcible) {
    var xmlHttpReq_timer_site_lecture = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_site_lecture = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_site_lecture = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReq_timer_site_lecture.open('POST', strURL, true);
    self.xmlHttpReq_timer_site_lecture.onreadystatechange = function() {
        if (self.xmlHttpReq_timer_site_lecture.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = ""; 
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_site_lecture.responseText;
	        }
    }
    self.xmlHttpReq_timer_site_lecture.send(null);
}


/* timer_site_ecriture */
function START_timer_site_ecriture()
	{
		timer_site_ecritureID = setInterval(timer_site_ecriture, 5000);
	}
function timer_site_ecriture()
	{
		xmlhttpPost_timer_site_ecriture("timer_site_ecriture.php", "div_timer_site_ecriture");
	}
function STOP_timer_site_ecriture()
	{
		clearInterval(timer_site_ecritureID);
	}
function xmlhttpPost_timer_site_ecriture(strURL, dividcible) {
    var xmlHttpReq_timer_site_ecriture = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_site_ecriture = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_site_ecriture = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReq_timer_site_ecriture.open('POST', strURL, true);
    self.xmlHttpReq_timer_site_ecriture.onreadystatechange = function() {
        if (self.xmlHttpReq_timer_site_ecriture.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = ""; 
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_site_ecriture.responseText;
	        }
    }
    self.xmlHttpReq_timer_site_ecriture.send(null);
}


/* timer_site_lecture */
function START_timer_site_ecriture_lecture()
	{
		timer_site_ecriture_lectureID = setInterval(timer_site_ecriture_lecture, 5000);
	}
function timer_site_ecriture_lecture()
	{
		xmlhttpPost_timer_site_ecriture_lecture("timer_site_ecriture_lecture.php", "div_timer_site_ecriture_lecture");
	}
function STOP_timer_site_ecriture_lecture()
	{
		clearInterval(timer_site_ecriture_lectureID);
	}
function xmlhttpPost_timer_site_ecriture_lecture(strURL, dividcible) {
    var xmlHttpReq_timer_site_ecriture_lecture = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_site_ecriture_lecture = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_site_ecriture_lecture = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReq_timer_site_ecriture_lecture.open('POST', strURL, true);
    self.xmlHttpReq_timer_site_ecriture_lecture.onreadystatechange = function() {
        if (self.xmlHttpReq_timer_site_ecriture_lecture.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = ""; 
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_site_ecriture_lecture.responseText;
	        }
    }
    self.xmlHttpReq_timer_site_ecriture_lecture.send(null);
}









/* timer_ia_site_lecture */
function START_timer_ia_site_lecture()
	{
		timer_ia_site_lectureID = setInterval(timer_ia_site_lecture, 5000);
	}
function timer_ia_site_lecture()
	{
		xmlhttpPost_timer_ia_site_lecture("timer_ia_site_lecture.php","div_timer_ia_site_lecture");
	}
function STOP_timer_ia_site_lecture()
	{
		clearInterval(timer_ia_site_lectureID);
	}
function xmlhttpPost_timer_ia_site_lecture(strURL, dividcible) {
    var xmlHttpReq_timer_ia_site_lecture = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_ia_site_lecture = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_ia_site_lecture = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}
    self.xmlHttpReq_timer_ia_site_lecture.open('POST', strURL, true);
    self.xmlHttpReq_timer_ia_site_lecture.onreadystatechange = function() {
        if (self.xmlHttpReq_timer_ia_site_lecture.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = ""; 
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_ia_site_lecture.responseText;
	        }
    }
    self.xmlHttpReq_timer_ia_site_lecture.send(null);
}










/* timer_chat_lecture */
function START_timer_chat_lecture()
	{
		timer_chat_lectureID = setInterval(timer_chat_lecture, 5000);
	}
function timer_chat_lecture()
	{
		xmlhttpPost_timer_chat_lecture("timer_chat_lecture.php","div_timer_chat_lecture");
	}
function STOP_timer_chat_lecture()
	{
		clearInterval(timer_chat_lectureID);
	}
function xmlhttpPost_timer_chat_lecture(strURL, dividcible) {
    var xmlHttpReq_timer_chat_lecture = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_chat_lecture = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_chat_lecture = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}
    self.xmlHttpReq_timer_chat_lecture.open('POST', strURL, true);
    self.xmlHttpReq_timer_chat_lecture.onreadystatechange = function() {

        if (self.xmlHttpReq_timer_chat_lecture.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = "";
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_chat_lecture.responseText;
	        }
    }
    self.xmlHttpReq_timer_chat_lecture.send(null);
}

/* timer_ia_chat_lecture */

function START_timer_ia_chat_lecture()
	{
		timer_ia_chat_lectureID = setInterval(timer_ia_chat_lecture, 5000);
	}

function timer_ia_chat_lecture()
	{
		xmlhttpPost_timer_ia_chat_lecture("timer_ia_chat_lecture.php","div_timer_ia_chat_lecture");
	}

function STOP_timer_ia_chat_lecture()
	{
		clearInterval(timer_ia_chat_lectureID);
	}

function xmlhttpPost_timer_ia_chat_lecture(strURL, dividcible)
	{
	    var xmlHttpReq_timer_ia_chat_lecture = false;
	    var self = this;
		if (window.XMLHttpRequest)
			{
				self.xmlHttpReq_timer_ia_chat_lecture = new XMLHttpRequest();
			}
		else
			{
				if (window.ActiveXObject)
					{
				          self.xmlHttpReq_timer_ia_chat_lecture = new ActiveXObject("Microsoft.XMLHTTP");
					}
			}
	    self.xmlHttpReq_timer_ia_chat_lecture.open('POST', strURL, true);
	    self.xmlHttpReq_timer_ia_chat_lecture.onreadystatechange = function() {
	        if (self.xmlHttpReq_timer_ia_chat_lecture.readyState == 4) // && self.xmlHttpReq1.status == 200
		        {
					document.getElementById(dividcible).innerHTML = "";
		        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_ia_chat_lecture.responseText;
		        }
	    }
	    self.xmlHttpReq_timer_ia_chat_lecture.send(null);
	}







/* timer_nb_messages_recus */
function START_timer_nb_messages_recus()
	{
		timer_nb_messages_recusID = setInterval(timer_nb_messages_recus, 5000);
	}
function timer_nb_messages_recus()
	{
		xmlhttpPost_timer_nb_messages_recus("timer_nb_messages_recus.php","div_timer_nb_messages_recus");
	}
function STOP_timer_nb_messages_recus()
	{
		clearInterval(timer_nb_messages_recusID);
	}
function xmlhttpPost_timer_nb_messages_recus(strURL, dividcible) {
    var xmlHttpReq_timer_nb_messages_recus = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_nb_messages_recus = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_nb_messages_recus = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}
    self.xmlHttpReq_timer_nb_messages_recus.open('POST', strURL, true);
    self.xmlHttpReq_timer_nb_messages_recus.onreadystatechange = function() {

        if (self.xmlHttpReq_timer_nb_messages_recus.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = ""; 
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_nb_messages_recus.responseText;
	        }
    }
    self.xmlHttpReq_timer_nb_messages_recus.send(null);
}











/* timer_ia_nb_messages_recus */
function START_timer_ia_nb_messages_recus()
	{
		timer_ia_nb_messages_recusID = setInterval(timer_ia_nb_messages_recus, 5000);
	}
function timer_ia_nb_messages_recus()
	{
		xmlhttpPost_timer_ia_nb_messages_recus("timer_ia_nb_messages_recus.php","contenu_messages");
	}
function STOP_timer_ia_nb_messages_recus()
	{
		clearInterval(timer_ia_nb_messages_recusID);
	}
function xmlhttpPost_timer_ia_nb_messages_recus(strURL, dividcible) {
    var xmlHttpReq_timer_ia_nb_messages_recus = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_ia_nb_messages_recus = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_ia_nb_messages_recus = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}
    self.xmlHttpReq_timer_ia_nb_messages_recus.open('POST', strURL, true);
    self.xmlHttpReq_timer_ia_nb_messages_recus.onreadystatechange = function() {

        if (self.xmlHttpReq_timer_ia_nb_messages_recus.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = ""; 
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_ia_nb_messages_recus.responseText;
	        }
    }
    self.xmlHttpReq_timer_ia_nb_messages_recus.send(null);
}









/* timer_chat_ecriture */
function START_timer_chat_ecriture()
	{
		timer_chat_ecritureID = setInterval(timer_chat_ecriture, 5000);
	}
function timer_chat_ecriture()
	{
		xmlhttpPost_timer_chat_ecriture("rea/timer_chat_ecriture.php","div_timer_chat_ecriture"); 
	}
function STOP_timer_chat_ecriture()
	{
		clearInterval(timer_chat_ecritureID);
	}
function xmlhttpPost_timer_chat_ecriture(strURL, dividcible) {
    var xmlHttpReq_timer_chat_ecriture = false;
    var self = this;
	if (window.XMLHttpRequest)
		{
			self.xmlHttpReq_timer_chat_ecriture = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          self.xmlHttpReq_timer_chat_ecriture = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}
    self.xmlHttpReq_timer_chat_ecriture.open('POST', strURL, true);
    self.xmlHttpReq_timer_chat_ecriture.onreadystatechange = function() {
        if (self.xmlHttpReq_timer_chat_ecriture.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
				document.getElementById(dividcible).innerHTML = "";
	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_chat_ecriture.responseText;
	        }
    }
    self.xmlHttpReq_timer_chat_ecriture.send(null);
}




/* timer_chat_invite_lecture */
function START_timer_chat_invite_lecture()
	{
		timer_chat_invite_lectureID = setInterval(timer_chat_invite_lecture, 5000);
	}
function timer_chat_invite_lecture()
	{
		xmlhttpPost_timer_chat_invite_lecture("timer_chat_invite_lecture.php","div_timer_chat_invite_lecture");
	}
function STOP_timer_chat_invite_lecture()
	{
		clearInterval(timer_chat_invite_lectureID);
	}
function xmlhttpPost_timer_chat_invite_lecture(strURL, dividcible)
	{
	    var xmlHttpReq_timer_chat_invite_lecture = false;
	    var self = this;
		if (window.XMLHttpRequest)
			{
				self.xmlHttpReq_timer_chat_invite_lecture = new XMLHttpRequest();
			}
		else
			{
				if (window.ActiveXObject)
					{
				          self.xmlHttpReq_timer_chat_invite_lecture = new ActiveXObject("Microsoft.XMLHTTP");
					}
			}
	    self.xmlHttpReq_timer_chat_invite_lecture.open('POST', strURL, true);
	    self.xmlHttpReq_timer_chat_invite_lecture.onreadystatechange = function() {
	
	        if (self.xmlHttpReq_timer_chat_invite_lecture.readyState == 4) // && self.xmlHttpReq_timer_chat_invite_lecture.status == 200
		        {
					document.getElementById(dividcible).innerHTML = "";
		        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq_timer_chat_invite_lecture.responseText;
		        }
	    }
	    self.xmlHttpReq_timer_chat_invite_lecture.send(null);
	}







