function reset()
{
	p=document.formulaire;
	p.reset();
}

function MM_openBrWindow(theURL,winName,features) 
{ //v2.0
  window.open(theURL,winName,features);
}

//validation des formulaires
function remp_nom()
  	{
		var nom=0;
		var nomok=0;
		nom=document.formulaire.nom.value;
		if (nom.length==0)
			{
				alert("Veuillez saisir votre nom");
				nomok=0;
			}
			else nomok = 1;
		return nomok;
	}

function remp_cat()
  	{
		var cat=0;
		var catok=0;
		cat=document.formulaire.categorie.value;
		if (cat.lenght==0)
			{
				alert("Veuillez saisir votre catégorie");
				catok=0;
			}
			else catok=1;
		return catok;	
	}

function remp_adr()
  	{
		var adr=0;
		var adrok=0;
		adr=document.formulaire.adresse1.value;
		if (adr.length==0)
			{
				alert("Veuillez saisir votre adresse");
				adrok=0;
			}
			else adrok=1;
		return adrok;
	}

function remp_cp()
  	{
		var cp=0;
		var cpok=0;
		cp=document.formulaire.code_postal.value;
		if (cp.length==0)
			{
				alert("Veuillez saisir votre code postal");
				cpok=0;
			}
			else
				{
   					if (isNaN(cp))
						{
							alert("Veuillez saisir un nombre dans le champ code postal");
							cpok=0;
						}
						else cpok=1;
				}
		return cpok;
	}

function remp_ville()
  	{
		var ville=0;
		var villeok=0;
		ville=document.formulaire.ville.value;
		if (ville.length==0)
			{
				alert("Veuillez saisir votre ville");
				villeok=0;
			}
			else villeok=1;
		return villeok;
	}

function remp_tel()
  	{
		var tel=0;
		var telok=0;
		tel=document.formulaire.telephone.value;
		if (tel.length==0)
			{
				alert("Veuillez saisir votre Téléphone");
				telok=0;
			}
			else
				{
   					if (isNaN(tel))
						{
							alert("Veuillez saisir un nombre dans le champ Téléphone");
							telok=0;
						}
						else telok=1;
				}
		return telok;			
	}

function remp_fax()
  	{
		var fax=0;
		var faxok = 0;
		fax=document.formulaire.fax.value;
		if (fax.length==0)
				{
					alert("Veuillez saisir votre Fax");
					faxok = 0;
				}
			else
				{
   					if (isNaN(fax))
						{
							alert("Veuillez saisir un nombre dans le champ Fax");
							faxok=0;
						}
						else faxok=1;
				}
		return faxok;
	}
	
function remp_doc()
	{
		var docok=0;
		if ((document.formulaire.doc1.checked == false) && (document.formulaire.doc2.checked == false))
			{
				alert("Merci de choisir un type de documentation à vous envoyer")
				docok=0;
			}
			else docok=1;
		return docok;
	}	

function remp_comm()
	{
		var commok=0;
		var	comm = 0
		commentaire = document.formulaire.descr;
		if (commentaire.value=="")
			{
				alert("Merci de saisir le descriptif de votre demande")
				commok=0;
			}
			else commok=1;
		return commok;
	}

//validation formulaire envoi de documentations
function validdoc()
	{
		var vnom=0;
		var vcat=0;
		var vadr=0;
		var vcp=0;
		var vville=0;
		var vtel=0;
		var vfax=0;
		var	vdoc=0;	

		vnom = remp_nom();
		vcat = remp_cat();
		vadr = remp_adr();
		vcp = remp_cp();
		vville = remp_ville();
		vtel = remp_tel();
		vfax = remp_fax();
		vdoc = remp_doc();
		
		if ((vnom==1)&&(vcat==1)&&(vadr==1)&&(vcp==1)&&(vville==1)&&(vtel==1)&&(vfax==1)&&(vdoc==1))
			formulaire.submit();
	}
	
//validation formulaire demande de renseignements
function validrens()
	{
		var vnom=0;
		var vcat=0;
		var vadr=0;
		var vcp=0;
		var vville=0;
		var vtel=0;
		var vfax=0;
		var	vcomm=0;	

		vnom = remp_nom();
		vcat = remp_cat();
		vadr = remp_adr();
		vcp = remp_cp();
		vville = remp_ville();
		vtel = remp_tel();
		vfax = remp_fax();
		vcomm = remp_comm();
		
		if ((vnom==1)&&(vcat==1)&&(vadr==1)&&(vcp==1)&&(vville==1)&&(vtel==1)&&(vfax==1)&&(vcomm==1))
			formulaire.submit();
	}
	
//fenêtre popup	
	function fenetre()
   {
      var nbre = Math.floor(Math.random() * 6)+1;  
      var win;
      win=window.open("","Fenster1","height=234,width=504,left=500,top=300");
      win.document.write("<HTML><HEAD><TITLE>Nouveautés</TITLE>");
	  win.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='s/main.css' type='text/css'>");
	  //if (nbre==4)
	  //{
	  //	win.document.write("</HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><A href='05/050101402.htm");
	  //}
	  if (nbre==5)
	  	{
	  		win.document.write("</HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><A href='05/0503.htm");
	  	}
	  		else
			{
				if (nbre==6)
					{
						win.document.write("</HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><A href='download/divers/video.htm");
					}
						else
						{
							win.document.write("</HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><A href='05/0502.htm#");
	  						win.document.write(nbre);
						}
	  		}
					win.document.write("' target='_blank'><IMG align='top' SRC='popup/pop-up");
					win.document.write(nbre);
					win.document.write(".jpg' onclick='javascript:self.close()'></a></BODY></HTML>"); 

   }

