window.defaultStatus="www.ladouche-leclub.fr";
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function popup(url,titre,l,h)
{
	window.open(url, titre, "toolbar=0,location=0,directories=0,menubar=0,status=0,scrollbars=0,resizable=1,height="+h+"px,width="+l+"px,left=0px,top=0px");
}

var win=0;

function popupImg(img,titre,l,h)
{
	if(l>screen.availWidth-8 && h>screen.availHeight-10)
    {
     lf=screen.availWidth+8;
     hf=screen.availHeight-10;

    }
    else
    {
		if(l>screen.availWidth-8) lf=screen.availWidth+8;
	    else lf=l+15;

	   	if(h>screen.availHeight-10) {hf=screen.availHeight-26;}
	    else hf=h+17;
    }

     var date = new Date();
     var dd='_';    // création d'une nouvelle fenêtre en cas de rafraichissement de la page
         dd+=date.getHours();
         dd+=date.getMinutes();
         dd+=date.getSeconds();

    if(win==0 || win.closed) win=window.open('about:blank', 'viewer'+dd, "toolbar=0,location=0,directories=0,menubar=0,status=0,scrollbars=1,resizable=1,height="+hf+"px,width="+lf+"px,left=0,top=0");
    else win.document.open();
//   	win.document.open();
	win.document.writeln("<html><head><title>"+titre+" Appuyez sur l\'image et déplacer la souris pour déplacer l\'image</title>");
	win.document.writeln("</head>");
	win.document.writeln("<body onLoad=\"this.focus();\" style=\"text-align:center;margin:0;border:0;font-family:Arial;font-size:15;\" >");
    win.document.writeln("<a href=\"javascript:window.close();\" title=\"FERMER\" ><img src=\""+img+"\" height=\""+h+"px\" width=\""+l+"px\" style=\"border:0;\" /><br />");
	win.document.write("FERMER</a>");
//  	win.document.writeln("<script type=\"text/javascript\" src=\"./scriptMove.js\" ></script>");
  	win.document.writeln("<script type=\"text/javascript\" >");

  	win.document.writeln("var cX0,cY0,il0,it0;");
  	win.document.writeln("var posV0=0,posV=0;");
  	win.document.writeln("var sens=1,ok=0;");

  	win.document.writeln("function init() { // démarrage appelé dans la ligne body");
  	win.document.writeln("	  // capture d'événènements pour Netscape 4");
  	win.document.writeln("	  if (document.captureEvents)");
  	win.document.writeln("	  {");
  	win.document.writeln("	  	  document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);");
  	win.document.writeln("	  }");
  	win.document.writeln("	  document.onmousedown=startDrag;");
  	win.document.writeln("	  document.onmouseup=endDrag;");
  	win.document.writeln("    document.oncontextmenu=new Function(\"return false;\");");

  	win.document.writeln("	  window.status='Utilisez la souris pour bouger l\\\'image';");
//  	win.document.writeln("    document.body.style.cursor=\"move\";");
//	win.document.writeln("    document.body.style.cursor=\"url('main1.cur'),move\";");
  	win.document.writeln("}");

  	win.document.writeln("function startDrag(e)");
  	win.document.writeln("{");
  	win.document.writeln("	  if((document.all && event.button == 2) || (!document.all && e.which == 3))");
  	win.document.writeln("	  {                                          // click droit");
  	win.document.writeln("	  	  if(ok==1 && sens==(-1)) sens=3;");
  	win.document.writeln("	  	  else sens=(1);");
  	win.document.writeln("	  }");
  	win.document.writeln("	  if(document.layers && e.which == 2)");
  	win.document.writeln("	  {                                          // click milieu, 3ème bouton");
  	win.document.writeln("	  	  sens=0;");
  	win.document.writeln("	  }");
  	win.document.writeln("	  if((document.all && event.button == 1) || (!document.all && e.which == 1))");
  	win.document.writeln("	  {                                          // click gauche");
  	win.document.writeln("	  	  if(ok==1 && sens==1) sens=2;");
  	win.document.writeln("	  	  else sens=(-1);");
  	win.document.writeln("	  }");
  	win.document.writeln("	  if(document.all && event.button == 3)");
  	win.document.writeln("	  {                                          // click droit et click gauche");
  	win.document.writeln("	  	  if(ok==1 && sens==1) sens=2;");
  	win.document.writeln("	  	  else sens=3;");
  	win.document.writeln("	  }");
  	win.document.writeln("	  ok=1;");

//	win.document.writeln("    if(sens==(-1) || sens==3) document.body.style.cursor=\"url('main0.cur'),move\";");
//	win.document.writeln("    if(sens==1 || sens==2) document.body.style.cursor=\"url('cible.cur'),move\";");

  	win.document.writeln("	  cX0=(!document.all) ? e.pageX : event.clientX;");
  	win.document.writeln("	  cY0=(!document.all) ? e.pageY : event.clientY;");

  	win.document.writeln("	  cX0-=document.body.scrollLeft;");
  	win.document.writeln("	  cY0-=document.body.scrollTop;");

  	win.document.writeln("	  if(document.documentElement && document.documentElement.scrollTop)");
  	win.document.writeln("	  {");
  	win.document.writeln("	  	  posV0=document.documentElement.scrollTop;");
  	win.document.writeln("	  }");
  	win.document.writeln("	  else");
  	win.document.writeln("	  {");
  	win.document.writeln("	  	  posV0=document.body.scrollTop;");
  	win.document.writeln("	  }");

  	win.document.writeln("	  if (document.captureEvents)");
  	win.document.writeln("	  {");
  	win.document.writeln("	  	  document.captureEvents(Event.MOUSEMOVE);");
  	win.document.writeln("	  }");
  	win.document.writeln("	  document.onmousemove= moveIt;");

  	win.document.writeln("	  return false;");
  	win.document.writeln("}");

  	win.document.writeln("function moveIt(e)");
  	win.document.writeln("{");
  	win.document.writeln("    var cX=(!document.all) ? e.pageX : event.clientX;");
  	win.document.writeln("	  var cY=(!document.all) ? e.pageY : event.clientY;");

  	win.document.writeln("    cX-=document.body.scrollLeft;");
  	win.document.writeln("	  cY-=document.body.scrollTop;");

  	win.document.writeln("    if(sens==2)");
  	win.document.writeln("    {");
  	win.document.writeln("    	  v=(cX-cX0);");
  	win.document.writeln("	  	  h=(cY-cY0);");
  	win.document.writeln("    }");
  	win.document.writeln("    else if(sens==3)");
  	win.document.writeln("    {");
  	win.document.writeln("    	  v=-(cX-cX0);");
  	win.document.writeln("	  	  h=-(cY-cY0);");
  	win.document.writeln("    }");
  	win.document.writeln("    else");
  	win.document.writeln("    {");
  	win.document.writeln("    	  v=sens*(((cX-cX0)*parseInt(document.images[0].width))/parseInt(document.body.clientWidth));");
  	win.document.writeln("	  	  h=sens*(((cY-cY0)*parseInt(document.images[0].height))/parseInt(document.body.clientHeight));");
  	win.document.writeln("    }");
  	win.document.writeln("    window.scrollBy(v,h);");

  	win.document.writeln("    cX0=(!document.all) ? e.pageX : event.clientX;");
  	win.document.writeln("	  cY0=(!document.all) ? e.pageY : event.clientY;");

  	win.document.writeln("    cX0-=document.body.scrollLeft;");
  	win.document.writeln("	  cY0-=document.body.scrollTop;");

  	win.document.writeln("    return false;");
  	win.document.writeln("}");

  	win.document.writeln("function endDrag(e)");
  	win.document.writeln("{");
  	win.document.writeln("    ok=0;");
  	win.document.writeln("	  if (document.captureEvents)");
  	win.document.writeln("	  {");
  	win.document.writeln("	  	  document.releaseEvents(Event.MOUSEMOVE);");
  	win.document.writeln("	  }");
  	win.document.writeln("    document.onmousemove=\"\";");
//	win.document.writeln("    document.body.style.cursor=\"url('main1.cur'),move\";");
  	win.document.writeln("    return false;");
  	win.document.writeln("}");

  	win.document.writeln("init();");

  	win.document.writeln("</script>");

	win.document.write("</body></html>");
	win.document.close();
}

function courrielOk()
{
	if(document.forms[0].courriel.value=='')
	{
		alert("Il n'y a pas de courriel!");
		return false;
	}
	if(document.forms[0].objet.value=='')
	{
		alert("Il n'y a pas d'objet!");
		return false;
	}
	if(document.forms[0].texte.value=='')
	{
		alert("Il n'y a pas de message!");
		return false;
	}
	return true;
}
