// JavaScript Document
var frm;

function validForm2() {
	var frm = document.formulaire;
	if ( frm.Nom.value == '') {
		frm.Nom.focus();
		alert( "Vous devez précisez votre nom." );
		return false;
	}
	if ( frm.Email.value == '' || frm.Email.value.search('@')<0 ) {
		frm.Email.focus();
		alert( "Vous devez précisez votre adresse de messagerie." );
		return false;
	}
	return true;
}

function envoiFichiers2() {
	frm = document.formulaire;
	if ( validForm() ) {
		var pos = 0;
		var tabVal = new Array();
		
		if ( document.getElementById('Fortinet').checked ) {
			tabVal[pos] = document.getElementById('Fortinet').value;
			pos = pos+1;
		}
		if ( document.getElementById('BlueSocket').checked ) {
			tabVal[pos] = document.getElementById('BlueSocket').value;
			pos = pos+1;
		}
		if ( document.getElementById('IronPort').checked ) {
			tabVal[pos] = document.getElementById('IronPort').value;
			pos = pos+1;
		}
		if ( document.getElementById('Fortinet').checked ) {
			tabVal[pos] = document.getElementById('Fortinet').value;
			pos = pos+1;
		}
		if ( document.getElementById('F5').checked ) {
			tabVal[pos] = document.getElementById('F5').value;
			pos = pos+1;
		}
		if ( document.getElementById('NetReport').checked ) {
			tabVal[pos] = document.getElementById('NetReport').value;
			pos = pos+1;
		}
		if (pos==0 ) {
			alert( "Vous n'avez pas sélectionner de présentations à télécharger." );
			return;
		}
		/*	téléchargement immédiat
		for (i=0; i<tabVal.length; i++ ) {
			window.open( "./"+tabVal[i], tabVal[i] );
		}
		*/
		/*	notification par le user
		var corpus ="";
		if ( frm.Nom.value != '')		corpus = "Nom : " + frm.Nom.value + "\n";
		if ( frm.Fonction.value != '')	corpus += "Fonction : " + frm.Fonction.value + "\n";
		if ( frm.Numtel.value != '')	corpus += "Tél. : " + frm.Numtel.value + "\n";
		if ( frm.Email.value != '')		corpus += "Email : " + frm.Email.value + "\n";
		if ( frm.interet.value != '')	corpus += "Interet : " + frm.interet.value + "\n";
		var popup = window.open( "mailto:nrey@addax.eu?subject="+escape('Téléchargement de fichier sur le site')+"&Body="+escape(corpus))
		popup.close();
		*/
		document.getElementById('btnSend').click();
	}
}

function lanceFormulaire2() {
	var tableau = document.getElementsByName('select');
	for (i=0; i<tableau.length; i++ )
		tableau[i].style.display = '';

//	document.ddeDown.style.display='';
	document.getElementById('formulaire').style.display='';
//	document.formulaire.style.display='';
//	document.formulaire.Nom.focus();
	document.getElementById('btnDown').style.display='none';
//	document.getElementById('btnValid').style.display='';
}

function adaptSize() {
/*
if (document.getElementById("Nom").value != "" &&  document.getElementById("EMail").value != "")
		document.getElementById("formulaire").style.height = "100px";
	else
		alert( "existe pas ")
*/
}