// JavaScript Document

<!--Protection de l'image
var message = "Vous n'etes pas autorisé a utiliser le bouton droit de la souris.";
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;
	}

function PopupImage(img) {
	titre="Image taille reelle";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE><SCRIPT LANGUAGE=JavaScript>function noclick(){ alert('Pensez à eux, merci !!!'); return(false);} document.oncontextmenu = noclick; </"+"SCRIPT></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+40); 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("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function ImageMax(chemin) {
	html='<html> <head> <title>Titre</title> </head> <body bgcolor=black><IMG src="'+chemin+'" BORDER=0 NAME=ImageMax onLoad="window.resizeTo(document.ImageMax.width+40, document.ImageMax.height+60)"></body></html>';
	popupImage = window.open('','_blank','toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=1');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
};

function ChangeCat(){
var cat = document.valide.marque.options[document.valide.marque.selectedIndex].value;
document.valide.action="choix.php?marque="+cat;
document.valide.submit();
}

function ValideForm(){
var obj = document.frmEnvoi;
captVerif(obj);
}