/*
  PopupImage v1.1 (ajout du clic sur image pour fermer le popup)
  appel : javascript:PopupImage('dossier/nom_image.jpg')
*/
function PopupImage(img) {
	titre="Image taille reelle";
	w=open("",'image','top=0,left=0,width=400,height=400,toolbar=no,scrollbars=no,resizable=yes,status=no');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+8,document.images[0].height+55); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><a href='javascript:window.close()'><IMG src='"+img+"' border=0></a>");
	w.document.write("</BODY></HTML>");
	w.document.close();
}
 
 
/* ************************* Popup  ************************* */
 
function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
 
// option peut etre "menubar=no,scrollbars=no,statusbar=no"
// appel : javascript:PopupCentrer('nompage.htm',520,220,'menubar=no,scrollbars=no,statusbar=no')
 
/* ************************* - Fin Popup - ************************* */
 
/* ************************* Bloquer clic droit ************************* */
 
var message = "Le clic droit est interdit sur ce site internet.";
var ns4 = (document.layers)? true:false;   					//NS 4 
var ie4 = (document.all)? true:false;   						//IE 4 
var dom = (document.getElementById)? true:false;		//DOM
 
if (dom)
	{
  if (document.addEventListener)
  	document.addEventListener("mouseup",RightMouseDisable,false);
  else
  	document.oncontextmenu = IsForbidden;
  }
else if (ie4)
	{
  document.onkeydown = CheckKey;
  document.onmousedown = RightMouseDisable;
  }
else if (ns4)
	{
  document.captureEvents(Event.MOUSEDOWN);
  document.onmousedown = RightMouseDisable;
  }
 
function CheckKey()
	{
  var MyKey = event.keyCode;
	if (MyKey==93)
  	{
    var MyValue = IsForbidden;
    return false;
    }
	}
 
function RightMouseDisable(e)
	{
	var MyNumber=0;
	if (ie4)
		MyNumber = event.button;
  else
    MyNumber = e.which;
	if (MyNumber==2||MyNumber==3)
  	{
		var MyValue = IsForbidden();
    return false;
  	}
  else
  	return true; 
  }
 
function IsForbidden()
	{
  alert(message);
  return false;
	}
 
 
/* ************************* - Fin Bloquer clic droit - ************************* */
 
/* ************************* Vérification de champs de formulaire obligatoires ******************************** */
/* fichiers necessaires : 
<script language="JavaScript1.2" src="Scripts/menu_explorer.js"></script>
<script language="JavaScript1.2" src="Scripts/JavaYzeo.js"></script>
*/
function verif() {
	var obj = document.frmEnvoi;
	var ok = true;
	ok = ok && estPresent(obj.nom, 'Veuillez remplir le champ nom');
	ok = ok && estPresent(obj.email_exp, 'Veuillez remplir le champ email');
	return ok;
}
// les noms des objets à modifier en fonction du formulaire bien sur
// appel dans le submit : onClick="if(verif()){ this.form.submit();}
 
/* ************************* - Fin Vérification de champs de formulaire obligatoires - ******************************** */