	function calcul1(url1,url2,url3)
		{
		var a;
		var b;
		var temp;
		var baba = false;
		var result = 0;
		var a = 0;
		nonRepondu = new Array();
		c = new Array();
		for (i = 1 ; i <= 10 ; i++)
			{
			rad = eval('document.quiz.Q' + i)
			for (j=0 ; j < rad.length ; j++)
				{
				if (rad[j].checked == true)
					{
					temp = parseInt(rad[j].value);
					c[i] = true;
					}
				}
			if (!c[i])
				{
				baba = true;
				nonRepondu[a] = i;
				a++;
				}
			result += temp;
			}
		desole = "Désolé vous n'avez pas répondu aux questions suivantes :" + nonRepondu;
		if (baba == true)
			{
			alert(desole);
			window.location = "#top";
			}
		else
			{
			if (result >= 0 && result <= 4)
				{
				window.location = url1;
				}
			else if ( result >= 5 && result <= 10)
				{
				window.location = url2;
				}
			else if (result >= 11)
				{
				window.location = url3;
				}
			}
		}

// Dossier Ecole

	function calcul2(url1,url2,url3,url4,url5,url6)
		{
		var temp;
		var baba = false;
		var R_a = 0;
		var R_b = 0;
		var R_c = 0;
		nonRepondu = new Array();
		var x;
		var x = 0;
		y = new Array();
		for (i = 1 ; i <= 7 ; i++)
			{
			rad = eval('document.quiz.Q' + i)
			for (j=0 ; j < rad.length ; j++)
				{
				if (rad[j].checked == true)
					{
					temp = parseInt(rad[j].value);
					y[i] = true;
					}
				}
			if (!y[i])
				{
				baba = true;
				nonRepondu[x] = i;
				x++;
				}
			if ( temp == 1 ) { R_a += 1 }
			if ( temp == 2 ) { R_b += 1 }
			if ( temp == 3 ) { R_c += 1 }
			}
		desole = "Désolé vous n'avez pas répondu aux questions suivantes :" + nonRepondu;
		if (baba == true)
			{
			alert(desole);
			window.location = "#top";
			}
		else
			{
			if ((R_a > R_b) && (R_a > R_c))
				{
				window.location = url1;
				}
			else if ((R_b > R_a) && (R_b > R_c))
				{
				window.location = url2;
				}
			else if ((R_c > R_a) && (R_c > R_b))
				{
				window.location = url3;
				}
			else if (R_a == R_b)
				{
				window.location = url4;
				}
			else if (R_a == R_c)
				{
				window.location = url5;
				}
			else if (R_b == R_c)
				{
				window.location = url6;
				}
			}
		}
		
/* fonction d'ouverture de popup centrée */

function popupcentree(page,largeur,hauteur,options)
	{
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
	}