

	var nomPage = new Array;//nom de la page courante
	
	
	nomPage = document.location.href.split("/")
	//Si on est sur la première page on redirige vers
	//le français s'il y a le cookie
	
	if(nomPage[nomPage.length - 1] == "index.htm" || nomPage[nomPage.length - 1] == "" )
	{
		window.location.assign("Index.htm");
		if(document.cookie == "langADNT=Franc")
		{
			window.location.assign("IndexFr.htm");
		}
	}
	else
	{
		//Si FR Drop cookie
		//Sinon fait expiré le cookie 
		var Francesca = new Array; //fr ou non
		
		Francesca = nomPage[nomPage.length - 1].split("_");
		
		if(Francesca[Francesca.length - 1].split(".")[0] == "FR" ||
		   Francesca[Francesca.length - 1].split(".")[0] == "fr")
		{
			DropCookie();
		}
		else
		{
			if(nomPage[nomPage.length - 1] != "IndexFR.htm" && 
			   nomPage[nomPage.length - 1] != "index.htm" &&
			   nomPage[nomPage.length - 1] != "")
			{
				expireCookieExpire();
			}	
		}
	}
	
	
	function DropCookie()
	{
		var dateExpiration = new Date;
		dateExpiration.setMonth(dateExpiration.getMonth() + 6);
		
		var chaineCookie = "langADNT=Franc;expires=" + dateExpiration.toGMTString();
		
		document.cookie = chaineCookie
	}
	
	function expireCookieExpire()
	{
			var dateExpiration = new Date
			dateExpiration.setDate(dateExpiration.getDate() - 1)
			
			var chaineCookie = "langADNT=ANG;expires=" + dateExpiration.toGMTString()

			document.cookie = chaineCookie		
	}
	
	
	
