$(document).ready(function(){
    $("#tid1").change( function() {
        $.post("/search/ssthemeliste?ajax=true", {
            tid: $("#tid1").val()
        },
        function(data){
            if(data != '') {
                $("#stid1").show();
                $("#stid1").html(data);
		$("#bloc_3m_form_1").height(130);
            }else{
                $("#stid1").hide();
		$("#bloc_3m_form_1").height(110);
            }
        });
    });
    $("#tid2").change( function() {
        $.post("search/ssthemeliste?ajax=true", {
            tid: $("#tid2").val()
        },
        function(data){
            if(data != '') {
                $("#stid2").show();
                $("#stid2").html(data);
		$("#bloc_3m_form_2").height(115);
            }else{
                $("#stid2").hide();
		$("#bloc_3m_form_2").height(90);
            }
        });
    });
    $("#tid3").change( function() {
        $.post("search/ssthemeliste?ajax=true", {
            tid: $("#tid3").val()
        },
        function(data){
            if(data != '') {
                $("#stid3").show();
                $("#stid3").html(data);
		$("#bloc_3m_form_3").height(115);
            }else{
                $("#stid3").hide();
		$("#bloc_3m_form_3").height(90);
            }
        });
    });
});	


$(document).ready(function(){
    $("#tidwid").change( function() {
        $.post("/search/ssthemeliste?ajax=true", {
            tid: $("#tidwid").val()
        },
        function(data){
            if(data != '') {
                $("#stidwid").show();
                $("#stidwid").html(data);
		$("#bloc_3m_form_wid").height(130);
            }else{
                $("#stidwid").hide();
		$("#bloc_3m_form_wid").height(110);
            }
        });
    });
    })



function change_onglet(nom)
{
    document.getElementById('onglet_'+onglet_en_cours).className = '';
    document.getElementById('onglet_'+nom).className = 'active';
    document.getElementById('contenu_onglet_'+onglet_en_cours).style.display = 'none';
    document.getElementById('contenu_onglet_'+nom).style.display = 'block';

    onglet_en_cours = nom;
}


function change_onglet_fast(nom)
{
    document.getElementById('onglet_fast_'+onglet_en_cours).className = '';
    document.getElementById('onglet_fast_'+nom).className = 'active';
    document.getElementById('contenu_onglet_fast_'+onglet_en_cours).style.display = 'none';
    document.getElementById('contenu_onglet_fast_'+nom).style.display = 'block';
    onglet_en_cours = nom;
}



function deleteformtexte(q)
{
    q.value = '';
} 





function ref_default(f)
{

		f.action = "/recherche";

	
    if ((f.q.value=='Entrez un ou plusieurs mots clés' ) ||
        (f.q.value=='Tapez le nom d\'un organisme') ||
        (f.q.value=='Choisissez un/des mot(s) clé(s)') ||
        (f.q.value=='Saisissez votre recherche'))
        {
        f.q.value='';
    }


    if(f.rid.value == '0')
    {
        f.rid.value = '';
    }


    if(f.tid.value == '0')
    {
        f.tid.value = '';
    }


    if(f.stid.value == '0')
    {
        f.stid.value = '';
    }


		if(f.type.value == 'particulier')
		{
		f.action ="/particuliers--salaries/particuliers-recherche";
		}


    return f.submit();
 
}	


function ref_default_short(f)
{
	
    if ((f.q.value=='Entrez un ou plusieurs mots clés' ) ||
        (f.q.value=='Tapez le nom d\'un organisme') ||
        (f.q.value=='Choisissez un/des mot(s) clé(s)') ||
        (f.q.value=='Saisissez votre recherche'))
        {
        f.q.value='';
    }
}



function ref_default_vocatis(f)
{
	
    if ((f.ege_sequence.value=='Entrez un ou plusieurs mots clés' ) ||
        (f.ege_sequence.value=='Tapez le nom d\'un organisme') ||
        (f.ege_sequence.value=='Choisissez un/des mot(s) clé(s)') ||
        (f.ege_sequence.value=='Saisissez votre recherche'))
        {
        f.ege_sequence.value='';
    }
}


	


		function aff_formation(id)  {
		
			var d = document.getElementById(id);
			if (d) {
				if(d.style.display == 'block')
				{
					d.style.display='none';
				}
				else if(d.style.display == 'none')
				{
					d.style.display='block';
				}
			}
		}





	

