<!--
var poppart;
function devenirpartenaire() {
	params = "width=600,height=470,top="+(screen.height/2-235)+",left="+(screen.width/2-300);
	poppart = window.open('formulaire.html','poppartenaire',params);
}

function valider() {
	document.formpartenaire.submit();
}
function check_champs(){
	var tmprep = '';
		var themail = document.formpartenaire.email.value;
		if ( document.formpartenaire.societe.value == '' )
			tmprep += '\n- Société';
		if (document.formpartenaire.nom.value == '')
			tmprep += '\n- Nom';
		if (document.formpartenaire.prenom.value == '')
			tmprep += '\n- Prénom';
		if ( (themail == '') || (verifMail(themail) == false) ){
			tmprep += '\n- Email';
		}
		if (document.formpartenaire.tel.value == '')
			tmprep += '\n- Téléphone';
		if (document.formpartenaire.nomsite.value == '' || document.formpartenaire.nomsite.value.substr(0,7) != "http://")
			tmprep += '\n- Nom du site';
		if ( document.formpartenaire.creasite.value == '' )
			tmprep += '\n- Date de création du site';		
			
		if ( document.formpartenaire.creasociete.value == '' )
			tmprep += '\n- Date de création de la société';	
		if ( document.formpartenaire.capital.value == '' )
			tmprep += '\n- Capital de la société';		
		if ( document.formpartenaire.ca.value == '' )
			tmprep += '\n- Chiffre d\'affaire de la société';	
		if ( document.formpartenaire.siret.value == '' )
			tmprep += '\n- N° de SIRET de la société';		
		if ( document.formpartenaire.adr1.value == '' &&  document.formpartenaire.adr2.value == '' )
			tmprep += '\n- Adresse de la société';		
			
			
			
		if ( !test_radio(document.formpartenaire.activite)) {
			tmprep += '\n- Veuillez indiquer votre secteur d\'activité';
		}	
		if ( tmprep != ''){
			message = 'Veuillez remplir/vérifier les informations suivantes : '+tmprep;
			alert(message);
		} else {
			document.formcheckmail.mailcheck.value = themail;
			document.formcheckmail.submit();
		}
}

function verifMail(a) {
	testm = false ;
	if ( (a.length > 5) && (a.length < 255) ) {
		for (var j=1 ; j<(a.length) ; j++) {
			if (a.charAt(j)=='@') {
				if (j<(a.length-4)){
					for (var k=j ; k<(a.length-2) ; k++) {
						if (a.charAt(k)=='.') testm = true;
					}
				}
			}
		}
	}
	return testm ;
}
function test_radio(btradio) {
	var tmp = false;
	for (i=0; i<btradio.length; i++) {
		if (btradio[i].checked == true)
			tmp = true;
	}
	return tmp;
}
//-->


