<!--


function openWin(url,hauteur,largeur)
{	
	window.open(url,'nom','toolsbar=no,status,resizable,scrollbars,height='+hauteur+',width='+largeur);
}

function openWin2(url,hauteur,largeur)
{	
	window.open(url,'nom2','toolsbar=no,scrollbars=0,height='+hauteur+',width='+largeur);
}

function openWin3(url,hauteur,largeur)
{	
	window.open(url,'nom3','toolsbar=no,scrollbars=1,height='+hauteur+',width='+largeur);
}


function rollOver(ImgNme)
{
 obj=document.images[ImgNme];
 obj.src=(obj.src.lastIndexOf('_on')!=-1)? obj.src.replace(/_on/gi,"_off"):obj.src.replace(/_off/gi,"_on");
}


function controleClient()
{
	if (document.cli.nucpt.value.length<11)
	{
		alert("Vous n'avez pas saisi votre Numéro de Compte ou il est incomplet (11 caractères)")
		return false
	}
}
	
function controleAbonne()
{
	document.abo.userid.value = document.abo.userid.value.toUpperCase();
	//if (document.abo.userid.value.length<8)
	//	{
	//		alert("Vous n'avez pas saisi votre code abonné ou il est incomplet (8 caractères minimum).");
	//		return false;
	//	}
	if (document.abo.password.value.length<3)
	{
		alert("Votre mot de passe doit contenir au minimum 3 caractères.");
		return false;
	}
	else
	{
		document.abo.password.value = document.abo.password.value.toUpperCase();
		Chaine = new String();
		Chaine=escape(document.abo.password.value);
		for (i=0; i<Chaine.length; i++)
		{
			if (Chaine.charAt(i) == "%")
			{
				alert("Le mot de passe ne doit pas comporter de caractères accentués ou spéciaux.");
				return false;
			}
		}
	}
	Stamp = new Date();
	TimeStamp = Stamp.getTime();
	document.abo.TimeStamp.value = TimeStamp;
	return true;
}


function openSimul() {

            var topScreen=0;

            var leftScreen=0; 

            var screenHeight=screen.availHeight;

            var screenWidth=screen.availWidth;

            var windowHeight=screenHeight;

            var windowWidth=screenWidth;

            var topWindow=topScreen;

            var leftWindow=leftScreen; 

            

            var wnd=self.open("http://81.80.126.151/RetraiteInternet/index.jsp", "Accueil", "resizable=no, locationbar=no, location=no, personalbar=no, statusbar=no, scrollbars=no, directories=no, menubar=no, titlebar=no, menu=no, toolbar=no");
}

function verifChamps()
{
	with(document.FormName)
	{
	if (!nom.value)
    	{
		alert ("Vous n'avez pas saisi votre nom !");
        return false;
		}		
	if (!prenom.value)
        {
		alert ("Vous n'avez pas saisi votre prénom !");
         return false;
		}	
	if (!adresse.value)
        {
		alert ("Vous n'avez pas saisi votre adresse !");
        return false;
		}	
	if (!CP.value)
        {
		alert ("Vous n'avez pas saisi votre code postal !");
        return false;
		}	
	if (!ville.value)
        {
		alert ("Vous n'avez pas saisi votre ville !");
        return false;
		}		
	if (!e_mail.value)
			{
				alert ("Vous n'avez pas saisi votre adresse e-mail !");
                return false;
			}	

			var maReg = new RegExp ("^\\w[\\w+\.\-]*@[\\w\-]+[\\w\-\.]*\.{1}[a-zA-Z]{2,4}$","gi") ;
			
			e_mail.value = e_mail.value.replace(/\.\./g,".")
			e_mail.value = e_mail.value.replace(/ /g,"")		
		   
   			if (e_mail.value.search(maReg) == -1 )
   			{
      			alert ( "Votre adresse e-mail n'est pas correcte !" ) ;
   				return false
   			}

			if (!email[0].checked && !email[1].checked)
			{
				alert ("Merci de préciser privée ou professionnelle.");
                return false;
			}
			
		
	}
		return true;
	}

function valider()
        {
		verifOk = verifChamps();
        if (verifOk) document.FormName.submit();
        }

//-->
