/*////////////////////////////////////////////////////////////////////////////////////*/
/* */
/*////////////////////////////////////////////////////////////////////////////////////*/

function switch_publications(id_publication)
{
	document.forms["publications"].elements["id_publication"].value = id_publication;
	document.forms["publications"].submit();
}

/*////////////////////////////////////////////////////////////////////////////////////*/
/* AFFICHAGE DU SOUS MENU SERVICES */
/*////////////////////////////////////////////////////////////////////////////////////*/

function clear()
{
	document.forms["libre"].elements["mot"].value = '';
}

/*////////////////////////////////////////////////////////////////////////////////////*/
/* */
/*////////////////////////////////////////////////////////////////////////////////////*/

function validation(form_contact)
{
	var nom = form_contact.elements['c_nom'].value;
	var adresse = form_contact.elements['c_mail'].value;
	var message = form_contact.elements['c_contenu'].value;
	
	if( nom == 0 || adresse == 0 || message == 0 )
	{
		alert('Tous les champs doivent être remplis');
		return false;		
	}
	
	if(adresse.indexOf("@") < 1 || adresse.indexOf("@") + 1 >= adresse.lastIndexOf("."))
	{
		alert('Votre adresse doit être au format : nom@domaine.extension');
		return false;
	}
	
	if(adresse.lastIndexOf(".") == 3)
	{
		var debut = adresse.lastIndexOf(".")+1;
		var fin = adresse.length;
		var total = fin - debut;

		if(total < 2 || total > 3)
		{
			alert('Veuillez specifier une extension de domaine correcte');
			return false;
		}
	}
	return true;
}

/*////////////////////////////////////////////////////////////////////////////////////*/
/* */
/*////////////////////////////////////////////////////////////////////////////////////*/

function insertion_flash()
{
  document.write('<object type="application/x-shockwave-flash" data="flash/intro.swf" width="395" height="215">\n');
  document.write('<param name="movie" value="flash/intro.swf" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
  document.write('<img src="images/replace.jpg" alt="ADC - Analyse Développement Communication - Bannière" />\n');
  document.write('</object>\n');
}