 
 function afficheTheme(num_video)
{
  
    var url = 'ajax_bloc.php';
    var myAjax = new Ajax.Request(
            url, 
            {
                method: 'get', 
				parameters: 'ajax_param='+num_video,
                onComplete: gestionReponse
            });     
}


function gestionReponse(xhr)
{
    if (xhr.status == 200)
    {
        $('ajax_bloc').innerHTML = xhr.responseText;
		
	 /* var allscript = document.getElementById("ajax_bloc").getElementsByTagName('script');
	    for (var i=0; i<allscript.length; i++)
		   eval(allscript[i].text);
	//*/
    }
    else
    {
        $('ajax_bloc').innerHTML = xhr.status;
    }
}
 
 
  // fonction pour l administration pour recuperer les level2 en fonction du level1
    // utilisé dans AttribLevelPrinc.php et AttribLevelSec.php
function selectLevel2(form)
{
 
    var url = 'RecupererLevel2.php';
    var myAjax = new Ajax.Request(
            url, 
            {
                method: 'get', 
				parameters: 'level1='+form.level1.value,
                onComplete: gestionReponseLevel2
            });     
}

function gestionReponseLevel2(xhr)
{
    if (xhr.status == 200)
    {
        $('ajax_level2').innerHTML = xhr.responseText;	

    }
    else
    {
        $('ajax_level2').innerHTML = xhr.status;
    }
}

function userSelectDestination(id) {
// Todo: Appel AJAX pour récupérer la valeur de ID pour connaitre la position sélectionné par l'utilisateur
 //alert(id);
 var url = 'main_content_ajax.php';
    var myAjax = new Ajax.Request(
            url, 
            {
                method: 'get', 
				parameters: 'num_destination='+id,
                onComplete: gestionReponseDestination
            });     
  

}


function gestionReponseDestination(xhr)
{
    if (xhr.status == 200)
    {
        $('content').innerHTML = xhr.responseText;	

    }
    else
    {
        $('content').innerHTML = xhr.status;
    }
}


