// +----------------------------------------------------------------------+
// | projet		:  CHAUVIN-ARNOUX 2001																			|
// +----------------------------------------------------------------------+
// |																																			|
// | titre			:  popup																									|
// | objet			:  Ensemble de fonctions javascript												|
// |																																			|
// +----------------------------------------------------------------------+
// | création  :  02/02/01                 par : Natalini Nicolas					|
// +----------------------------------------------------------------------+
// | version		:  0.1																										|
// +----------------------------------------------------------------------+

	function PopUp(url,pWidth,pHeight) {
	large=screen.width;
		large=(large/2)-(pWidth/2);
		haut=screen.height;
		haut=(haut/2)-(pHeight/2);
		/*
		fenetre=window.open(url.replace(' ','+'),'fen','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+pWidth+',height='+pHeight+',top='+haut+',left='+large+',true');
		*/
		fenetre=window.open(url,'fen','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+pWidth+',height='+pHeight+',top='+haut+',left='+large+',true');
		fenetre.focus();
	}
	
	function OpenPopUp(theURL,theName,features)
		{
			newwin=window.open(theURL,theName,features);
			//newwin.moveTo(0,0);      possibilité de placer la fenetre à l'endroit désiré
			newwin.focus();
		}

	function PopupCentre(url,pWidth,pHeight) 
		{
		large=screen.width;
		large=(large/2)-(pWidth/2);
		haut=screen.height;
		haut=(haut/2)-(pHeight/2);
		fenetre=window.open(url,'','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+pWidth+',height='+pHeight+',top='+haut+',left='+large+',true');
		}

 	function EmailCtrl()
		{
		if (document.aform.fldEmail.value == "")
			{
			window.alert("\nLa case E-mail doit être remplie.\n\nVeuillez entrer votre adresse E-mail.")
			document.aform.fldEmail.focus();
			return false; 
			}
		if (document.aform.fldEmail.value.indexOf ('@',0) == -1 || document.aform.fldEmail.value.indexOf ('.',0) == -1)
			{
			window.alert("\nL\'adresse que vous avez indiquée dans la case E-mail n\'est pas correcte.\n\nVeuillez entrer votre adresse E-mail.")
			document.aform.fldEmail.select();
			document.aform.fldEmail.focus();
			return false;
			}
		else
			{
			return true;
			}
		}
