/************************************************
				Navigation - Connection des membres et Devenir membre
************************************************/
/*$(document).ready(function() {
	$("div.panel_button").click(function(){
		$("div#panel").animate({ height: "85px" }, "fast");
		$("div#panel2").animate({ height: "0" }, "fast");
		$('div#show_button').hide();
		$('div#show2_button').show();
		$('div#hide_button').show();
		$('div#hide2_button').hide();
		$("div#recherche").animate({ height: "0" }, "fast");
		$("div#plansite").show();
	});	
	
   $("div#hide_button").click(function(){
	    $("div#panel").animate({ height: "0" }, "fast");
		$('div#show_button').show();
		$('div#show2_button').show();
		$('div#hide_button').hide();
		$('div#hide2_button').hide();
		$("div#recherche").animate({ height: "57px" }, "fast");
		$("div#plansite").show();
	});	
   
	$("div.panel2_button").click(function(){
		$("div#panel2").animate({ height: "85px" }, "fast");
		$("div#panel").animate({ height: "0" }, "fast");
		$('div#show2_button').hide();
		$('div#show_button').show();
		$('div#hide2_button').show();
		$('div#hide_button').hide();
		$("div#recherche").animate({ height: "57px" }, "fast");
		$("div#plansite").hide("slow");

		
	});	
	
   $("div#hide2_button").click(function(){
		$("div#panel2").animate({ height: "0" }, "fast");
		$('div#show2_button').show();
		$('div#show_button').show();
		$('div#hide2_button').hide();
		$('div#hide_button').hide();
		$("div#plansite").show("slow");
   	});	 
	
});*/

/************************************************
				Checkbox - Se souvenir de mon identifiant
************************************************/

function newCookie(name,value,days) {
 var days = 7;   // the number at the left reflects the number of days for the cookie to last
                 // modify it according to your needs
 if (days) {
   var date = new Date();
   date.setTime(date.getTime()+(days*24*60*60*1000));
   var expires = "; expires="+date.toGMTString(); }
   else var expires = "";
   document.cookie = name+"="+value+expires+"; path=/"; }

function readCookie(name) {
	var nameSG = name + "=";
	var nuller = '';
	if (document.cookie.indexOf(nameSG) == -1)
    	return nuller;
		var ca = document.cookie.split(';');
		for(var i=0; i<ca.length; i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameSG) == 0) return c.substring(nameSG.length,c.length);
			}
    return null; 
	}

function eraseCookie(name) {
	newCookie(name,"",1);
	//document.form.login.value = 'Identifiant';
	}

function toMem(a) {
    newCookie('thelogin', document.form.login.value);
	newCookie('thepass', document.form.pass.value); 
	}

function delMem(a) {
	eraseCookie('thelogin');   // make sure to add the eraseCookie function for every field
	}





/************************************************
		Fonction qui affiche les divisions
************************************************/
function displaySubs(the_sub){
	if(document.getElementById(the_sub).style.display==""){
		document.getElementById(the_sub).style.display = "none";
		return;
		}
		
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('div'+i)) {
			document.getElementById('div'+i).style.display='none';
			}
		}

	document.getElementById(the_sub).style.display = "";
	}
	

function gotosite1(){
	var URL = document.gotoform1.region.options[document.gotoform1.region.selectedIndex].value; window.location.href = URL;
	}
	
function gotosite2(){
	var URL = document.gotoform2.discipline.options[document.gotoform2.discipline.selectedIndex].value; window.location.href = URL;
	}
	
function gotosite3(){
	var URL = document.gotoform3.m.options[document.gotoform3.m.selectedIndex].value; window.location.href = URL;
	}
