// Affichage de la fenetre PopUp

function InitAcces() {
	document.getElementById("login").focus();
}

function ControleAcces() {
	var login = document.getElementById("login").value;
	var password = document.getElementById("password").value;
	if ((login == "gvermont") && (password == "testform")) {
		PopUpForm("frmInscription.html", 825, 700);
	} else {
//		alert("Cette fonctionnalit&eacute; sera bient&ocirc;t disponible.");
		alert("Cette fonctionnalité sera bientôt disponible.");
	}
	window.close();
}

function PopUpCentre(Page, Largeur, Hauteur) {
	var Left = (window.screen.width - Largeur) / 2;
	var Top = (window.screen.height - Hauteur) / 2;
	var Configuration = 'dependent=yes' +
		', left=' + Left + ', top=' + Top +
		', height=' + Hauteur + ', width=' + Largeur +
		', directories=no, addressbar=no, menubar=no, status=no, location=no, scrollbars=no, resizable=no, toolbar=no';
	var PopUpWindow = window.open(Page, 'PopUp', Configuration);
	PopUpWindow.focus();
//	setTimeout(isPopUp, 1000)
	return true;
}

function PopUpForm(Page, Largeur, Hauteur) {
	var Left = (window.screen.width - Largeur) / 2;
	var Top = (window.screen.height - Hauteur) / 2;
	var Configuration = 'dependent=yes' +
		', left=' + Left + ', top=' + Top +
		', height=' + Hauteur + ', width=' + Largeur +
		', directories=no, addressbar=no, menubar=no, status=no, location=no, scrollbars=yes, resizable=no, toolbar=no';
	var PopUpWindow = window.open(Page, 'Form', Configuration);
	PopUpWindow.focus();
//	setTimeout(isPopUp, 1000)
	return true;
}

function isPopUp() {
	if (PopUpWindow) {
		PopUpWindow.focus();
	} else {
		alert('Ouverture bloquée par l\'anti-PopUp');
	}
	return true;
}

