function openInscription()
{
  navigateur = navigator.appName;
  version = navigator.appVersion;
  if (navigateur == 'Microsoft Internet Explorer' && version < '7')
  {
	window.open ('http://www.pmtic.net/pmticv3/table_ronde/inscription.php');
  }
  else
  {
	  win_contact = new UI.Window({
		 top: 300, 
		 left: 360,   
		 width: 730,
		 height: 260,
		 theme: "alphacube",
		 shadow: true,
		 show: Element.appear,
		 hide: Element.fade }).show();
	  win_contact2 = new UI.Window({
		 top: 300, 
		 left: 360,   
		 width: 730,
		 height: 260,
		 theme: "alphacube",
		 shadow: true,
		 show: Element.appear,
		 hide: Element.fade }).show().setAjaxContent('http://www.pmtic.net/pmticv3/table_ronde/inscription.php', {
		 method: "GET", 
		 onCreate: function() {   
		   this.setContent('<div class="message">Chargement en cours...</div><div class="spinner"></div>');   
		 }
	  });
	win_contact2.header.update("Inscription"); 
	win_contact.hide();
	}
}


function check_email(email)
{
	var e  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (e.test(email))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function check_form()
{	

	if ($('module1').checked) {var m1 = 1;}else{var m1 = 0;}
	if ($('module1').checked) {var m2 = 1;}else{var m2 = 0;}

	var nom = $('nom').value;
	var prenom = $('prenom').value;
	var email = $('email').value;

	var institution = $('institution').value;
	var tel = $('tel').value;

	if (nom == "Champ obligatoire" || prenom == "Champ obligatoire" || institution == "Champ obligatoire" || tel == "Champ obligatoire" || email == "Email incorrect" || nom == "" || prenom == "" || institution == "" || tel == "" || email == "" || (a1 == 0 && a2 == 0 && a3 == 0 && a4 == 0))
	{
		if (nom == "Champ obligatoire" || prenom == "Champ obligatoire" || institution == "Champ obligatoire" || tel == "Champ obligatoire" || nom == "" || prenom == "" || institution == "" || tel == "")
		{
			alert('Les champs nom, prenom, institution, telephone et email doivent etre renseigne');
		}
		if (email == "Email inctorrect" ||  email == "")
		{
			alert('Il est obligatoire de mettre une adresse email valide');
		}
		if (m1 == 0 && m2 == 0)
		{
			alert('Vous devez choisir au moins une table ronde');
		}
		return false;
	}
	else
	{
		return true;
	}
}
