

	function createXMLHttp() {
		var xmlhttp;
		try {
			xmlhttp = new XMLHttpRequest();
		} catch(e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				xmlhttp = null;
			}
		}

		return xmlhttp;
	}
	
	function vod_evenement(cat_id){
	    	
		var xmlhttp = createXMLHttp();

		xmlhttp.onreadystatechange = function () {
			if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
				document.getElementById('select_evenement').innerHTML = xmlhttp.responseText;
			}
		};

		xmlhttp.open("POST", "ajax_evenement.php");
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

		var send = "cat_id="+cat_id;

		
		xmlhttp.send(send);
		
		
	}
	
	
	function vod_affiche(cat_id){
	    	
		var xmlhttp = createXMLHttp();

		xmlhttp.onreadystatechange = function () {
			if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
				document.getElementById('content_right').innerHTML = xmlhttp.responseText;
			}
		};

		xmlhttp.open("POST", "ajax_affiche.php");
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

		var send = "cat_id="+cat_id;

		
		xmlhttp.send(send);
		
		
	}
	
	function vod_del_video(vid_id){
	    	
		var xmlhttp = createXMLHttp();

		xmlhttp.onreadystatechange = function () {
			if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
				document.getElementById('content_right').innerHTML = xmlhttp.responseText;
			}
		};

		xmlhttp.open("POST", "ajax_del_video.php");
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

		var send = "vid_id="+vid_id;

		
		xmlhttp.send(send);
		
		
	}
	
	function vod_fiche_match(id){
		
		document.getElementById("lien1").className="vod_tab_selected";
		document.getElementById("lien2").className="vod_tab_nonselected";
			    	
		var xmlhttp = createXMLHttp();

		xmlhttp.onreadystatechange = function () {
			if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
				document.getElementById('vod_box_content').innerHTML = xmlhttp.responseText;
			}
		};
	
		xmlhttp.open("POST", "ajax_fiche_match.php");
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

		var send = "vid_name="+id;
		
		
		xmlhttp.send(send);
	}
	
	function vod_commander(id){
		
		document.getElementById("lien2").className="vod_tab_selected";
		document.getElementById("lien1").className="vod_tab_nonselected";
			    	
		var xmlhttp = createXMLHttp();

		xmlhttp.onreadystatechange = function () {
			if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
				document.getElementById('vod_box_content').innerHTML = xmlhttp.responseText;
			}
		};
	
		xmlhttp.open("POST", "ajax_fiche_match.php");
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

		var send = "vid_name="+id+"&commander=true";
		
		
		xmlhttp.send(send);
	}
	
	function active_session(id) {
		
		var xmlhttp = createXMLHttp();
		
		xmlhttp.open("POST", "ajax_session.php");
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

		xmlhttp.send(null);
	}
      
       	var timer=setInterval("active_session()", 1000*60);