function openGrandJeuxReglement()
{
	myWidth = (screen.width - 535) / 2;
	if (myWidth < 0) myWidth = 0;
	
	myHeight = (screen.height - 500) / 2;
	if (myHeight < 0) myHeight = 0;
	window.open("./grandJeuxReglement.asp", "_blank", "width=535, height=500, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, toolbar=no, top="+(myHeight-50)+", left="+myWidth);
}

function openGrandJeux(numJeux)
{
	myWidth = (screen.width - 500) / 2;
	if (myWidth < 0) myWidth = 0;
	
	myHeight = (screen.height - 500) / 2;
	if (myHeight < 0) myHeight = 0;
	window.open("./grandJeux.asp?eval="+numJeux, "_blank", "width=500, height=500, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, toolbar=no, top="+(myHeight-50)+", left="+myWidth);
}

function openTestAnglais()
{
	myWidth = (screen.width - 800) / 2;
	if (myWidth < 0) myWidth = 0;
	
	myHeight = (screen.height - 500) / 2;
	if (myHeight < 0) myHeight = 0;
	window.open("http://www.demos.fr/bilans-tests/tests-langues/Pages/tests-langues.aspx", "_blank", "width=975, height=500, location=yes, menubar=yes, resizable=yes, scrollbars=yes, status=yes, toolbar=yes, top="+(myHeight-50)+", left="+myWidth);
}

function openAideByIntro()
{
	myWidth = (screen.width - 530) / 2;
	if (myWidth < 0) myWidth = 0;
	
	myHeight = (screen.height - 510) / 2;
	if (myHeight < 0) myHeight = 0;
	window.open("./aideByIntro.asp", "_blank", "width=750, height=550, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, top="+myHeight+", left="+myWidth);
}//fin openIntroInfo

function openIntroInfo(strNum)
{
	myWidth = (screen.width - 530) / 2;
	if (myWidth < 0) myWidth = 0;
	
	myHeight = (screen.height - 510) / 2;
	if (myHeight < 0) myHeight = 0;
	window.open("./introInfo.asp?num="+strNum, "_blank", "width=530, height=510, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, toolbar=no, top="+myHeight+", left="+myWidth);
}//fin openIntroInfo

function supprimerEvaluation()
{
	Check = confirm("Voulez vous vraiment supprimer cette évaluation?");
	if(Check == false)
	{
		//on ne fais rien
	}
	else
	{
		document.getElementById("idFormModifier").action = "./supprimerEvaluation.asp";
		document.getElementById("idFormModifier").submit();	
	}
}

function goToDemos()
{
	window.open("http://www.demos.fr", "_blank");
}

function testTouche()
{
	try
	{
		if (window.event.keyCode == 13)
		{
			document.getElementById("idForm").submit();		
		}
	}
	catch(err)
	{
	
	}
}

function loadAllFormation(strValue)
{
	if (strValue == 0)
	{
		window.open("formation.asp?eval="+document.getElementById("idEval").value+"&all=yes", "_self");
	}
	else
	{
		window.open("formation.asp?eval="+document.getElementById("idEval").value, "_self");
	}
}

function envoyerFormation(urlFormation)
{
	var link = "http://www.demos.fr/Catalogue-Formations/Pages/envoi-collegue.aspx";
	var url = "?sourceUrl="+urlFormation;
	link = link + url;

	window.open(link);
}

function loadImprimeFormation(idFormation)
{
	var link = "http://pdf.demosgroup.com/default.aspx?Stage_Id="+ idFormation + "&undefined";
	window.open(link,"_blank");

}

function addItemToPanier(strNumFormation, strNumEval, strNumDomaine, strNumRub, strAll)
{
	window.open("./addToPanier.asp?numF="+strNumFormation+"&numE="+strNumEval+"&numR="+strNumRub+"&numD="+strNumDomaine+"&all="+strAll, "_self");
}//fin addItemToPanier

function removeItemToPanierByFormation(strNumFormation, strNumEval, strNumDomaine, strNumRub, strAll)
{
	window.open("./removeItemToPanierByFormation.asp?numF="+strNumFormation+"&numE="+strNumEval+"&numR="+strNumRub+"&numD="+strNumDomaine+"&all="+strAll, "_self");
}//fin removeItemToPanierByFormation

function removeItemToPanier(numEval, strNumDomaine, strNumRubrique, strNumFormation)
{
	window.open("./removeToPanier.asp?numF="+strNumFormation+"&numE="+numEval+"&numD="+strNumDomaine+"&numR="+strNumRubrique, "_self");
}

function loadPrint(numEval)
{
	myWidth = (screen.width - 800) / 2;
	if (myWidth < 0) myWidth = 0;
	
	myHeight = (screen.height - 600) / 2;
	if (myHeight < 0) myHeight = 0;
	window.open("./panierPrint.asp?eval="+numEval, "_blank", "width=800, height=600, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, top="+myHeight+", left="+myWidth);
}

function afficheEvaluation()
{
	(document.getElementById("idEvaluation")).style.visibility = "visible";
	(document.getElementById("idEvaluation")).style.display = "inline";
	
	(document.getElementById("idIntroEvaluation")).style.visibility = "hidden";
	(document.getElementById("idIntroEvaluation")).style.display = "none";
}

function setNumGroupeNorme(val)
{
	document.getElementById("numGroupeNorme").value = val;
	document.getElementById("formPGA").submit();
}//fin setNumGroupeNorme

function domaineSuivant(pageEnCours)
{
	pageSuivante = pageEnCours + 1;
	
	(document.getElementById("indexDomaine_" + pageEnCours)).style.visibility = "hidden";
	(document.getElementById("indexDomaine_" + pageEnCours)).style.display = "none";
	
	(document.getElementById("indexDomaine_" + pageSuivante)).style.visibility = "visible";
	(document.getElementById("indexDomaine_" + pageSuivante)).style.display = "inline";
}//fin pageSuivante

function domainePrecedent(pageEnCours)
{
	pagePrecedente = pageEnCours - 1;
	
	(document.getElementById("indexDomaine_" + pageEnCours)).style.visibility = "hidden";
	(document.getElementById("indexDomaine_" + pageEnCours)).style.display = "none";
	
	(document.getElementById("indexDomaine_" + pagePrecedente)).style.visibility = "visible";
	(document.getElementById("indexDomaine_" + pagePrecedente)).style.display = "inline";
}//fin pageSuivante


function outNiveau(idNiv, idRub)
{
	(document.getElementById(idNiv)).style.color = "#000066";
	(document.getElementById(idRub)).style.color = "#000066";
}//fin outNiveau

function overNiveau(idNiv, idRub)
{
	(document.getElementById(idNiv)).style.color = "#990000";
	(document.getElementById(idRub)).style.color = "#990000";
}//fin overNiveau

function setReponse(obj, strDomRub)
{
		//alert(obj.value + " - Reponse_" + strDomRub);
		(document.getElementById("Reponse_" + strDomRub)).value = obj.value;
}

function goToPageSupprCompte()
{
	Check = confirm("Voulez vous vraiment supprimer votre compte?");
	if(Check == false)
	{
		//
	}
	else
	{
		document.getElementById("idLogin").value = document.getElementById("tmp_login").value;
		document.getElementById("idPass1").value = document.getElementById("tmp_password1").value;
		document.getElementById("idPass2").value = document.getElementById("tmp_password2").value;
		document.getElementById("idFormSupprCompte").submit();
	}
}//fin goToPageSupprCompte