function verifySend2(Lang)
{
  if (document.form1.sendersName.value == "")
  {
    if (Lang == "en")
    {
      alert("The name must be typed !!!");
    }
    else 
    {
      alert("Le nom doit être renseigné!!!");
    }
    document.form1.sendersName.focus();
    return false; 
  }
  if (document.form1.sendersEmail.value == "")
  {
    if (Lang == "en")
    {
      alert("The e-mail address must be typed !!!");
    }
    else 
    {
      alert("L'adresse du courriel doit être renseignée!!!");
    }
    document.form1.sendersEmail.focus();
    return false; 
  }  
  if (document.form1.emailRecipient.value == "")
  {
    if (Lang == "en")
    {
      alert("The e-mail address of the receiver must be typed !!!");
    }
    else 
    {
      alert("L'adresse courriel du destinataire doit être renseignée!!!");
    }
    document.form1.emailRecipient.focus();
    return false; 
  }  
return true;
}


function verify(Lang)
{
  if (document.form1.txtFirstname.value == "")
  {
    if (Lang == "en")
    {
      alert("The first name must be typed !!!");
    }
    else 
    {
      alert("Le prénom doit être renseigné!!!");
    }
    document.form1.txtFirstname.focus();
    return false; 
  }
  if (document.form1.txtMail.value == "")
  {
    if (Lang == "en")
    {
      alert("The e-mail address must be typed !!!");
    }
    else 
    {
      alert("L'adresse du courriel doit être renseignée!!!");
    }
    document.form1.txtMail.focus();
    return false; 
  }  
  if (document.form1.txtMailReceiver.value == "")
  {
    if (Lang == "en")
    {
      alert("The e-mail address of the receiver must be typed !!!");
    }
    else 
    {
      alert("L'adresse courriel du destinataire doit être renseignée!!!");
    }
    document.form1.txtMailReceiver.focus();
    return false; 
  }  
return true;
}

function verifyLogin(Lang)
{
 if (document.form1.txtUserName.value == "")
 {
   if (Lang == 'en')
   {
     alert("The user name must be type");
   }
   else 
   {
     alert("Le nom de l'utilisateur doit être rempli");
   }
   document.form1.txtUserName.focus();
   return false;
 }
 if (document.form1.txtPSW.value == "")
 {
   if (Lang == 'en')
   {
     alert("The password must be type");
   }
   else
   {
     alert("Le mot de passe de l'utilisateur doit être rempli");
   }
   document.form1.txtPSW.focus();
   return false;
 }
return true;
}

function verify_user(Lang)
{
 if (document.form1.txtName.value == "")
 {
   if (Lang == "en")
    {
      alert("The name must be typed");
    }
   else
    {
      alert("Le nom doit être renseigné ");
    }
   document.form1.txtName.focus();
   return false;
 }
if (document.form1.txtFirstName.value == "")
 {
   if (Lang == "en")
    {
      alert("The first name must be typed");
    }
   else
    {
      alert("Le prénom doit être renseigné ");
    }
   document.form1.txtFirstName.focus();
   return false;
 }
 if (document.form1.txtUserName.value == "")
   {
     if (Lang == 'en')
     {
       alert("The username must be typed");
     }
     else
     {
       alert("Le nom utilisateur est obligatoire!!!");
     }
     document.form1.txtUserName.focus();
     return false;
   }
 if (document.form1.txtPSW.value == "")
   {
     if (Lang == 'en')
     {
       alert("The password must be typed");
     }
     else
     {
       alert("Le mot de passe est obligatoire!!!");
     }
     document.form1.txtPSW.focus();
     return false;
   }
 
 if (document.form1.txtConfPSW.value == "")
   {
      if (Lang == 'en')
       {
         alert("The confirmation of the password must be typed");
       }
      else
       {
         alert("La confirmation du mot de passe est obligatoire!!!");
       }
     document.form1.txtConfPSW.focus();
     return false;
   }
 else
   {
     if (document.form1.txtPSW.value != document.form1.txtConfPSW.value)
     {
       if (Lang == 'en')
         {
            alert("The confirmation of the password is different from the password");
         }
       else
         {
            alert("La confirmation ne correspond pas au mot de passe entré !!!"); 
         }
         document.form1.txtConfPSW.focus();
         return false;
     }
   }
 if (document.form1.txtRights.value == "")
   {
     if (Lang == 'en')
     {
       alert("The rights must be typed");
     }
     else
     {
       alert("Les droits sont obligatoires!!!");
     }
     document.form1.txtRights.focus();
     return false;
   }
  else
   {
       if (isNaN(document.form1.txtRights.value))
       {
		   if (Lang == 'en')
		 {
		   alert("The rights must be numeric");
		 }
		 else
		 {
		   alert("Les droits doivent être numériques!!!");
		 }
         document.form1.txtRights.focus();
         return false;
       }
    }     
   
return true;
}

function NewWindow(u,n,w,h,f,p,x,y){var	ws=window.screen?1:0,m=Math,C='center',R='random',M='custom',sw=screen.availWidth,sh=screen.availHeight,T=(p==C&&ws)?(sh-h)/2:(p==R&&ws)?(m.floor(m.random()*(sh-h))):(p==M)?y:100,L=(p==C&&ws)?(sw-w)/2:(p==R&&ws)?(m.floor(m.random()*(sw-w))):(p==M)?x:100,s='width='+w+',height='+h+',top='+T+',left='+L;s+=(!f||f=='')?'':','+f;win=window.open(u,n,s);if(win.focus)win.focus();}

function Delete_onClick(numero)
{
 var strHref
 strHref = "GestionImg.asp?x=3&pk=" + numero 
 document.location.href = strHref
}
//<SCRIPT LANGUAGE="JavaScript">
function ShowHelp(objet)
{
 var nouvelleFenetre;
 if(objet.value == "Aide")
 {
  nouvelleFenetre = window.open("AideGestionContenu.asp?Language=francais",null,"width=450,height=200,scrollbars=yes");
 } 
 else
 {
  nouvelleFenetre = window.open("AideGestionContenu.asp?Language=anglais",null,"width=450,height=200,scrollbars=yes");
 }  
}



function Modifier_onclick(parametre)
{
 var parametreName = parametre.name;
 var effet = parametreName.charAt(0);
 var numero = parametreName.charAt(1);
   
 var range =  document.selection.createRange(); 
 var notreSelection = range.htmlText; 
 var sTextSelect = notreSelection;
 
 
 maDivisionNom = "Division" + numero;
 maDivision = document.getElementById(maDivisionNom);
 
 var sTextComplet = maDivision.innerHTML;

 var sFindTextSelect;
 var sFindTextSelect2;
 
 var cmptSelect;
 var cmptSelect2;
 
 var bFind = false;
 	
 if(notreSelection)
 {
  switch (effet)
  {
   case "B":
      maDivision.document.execCommand('bold', false, null);
	  break;
   case "I":
      maDivision.document.execCommand('italic', false, null);
	  break;
   case "U":
      maDivision.document.execCommand('underline', false, null);
	  break;
   case "P":      	   
	  maDivision.document.execCommand('InsertUnorderedList', false, null);    	
	 break;
   case "N":    
      maDivision.document.execCommand('ForeColor', false, '#000000');
	 break;
   case "R": 
      maDivision.document.execCommand('ForeColor', false, '#333399');
     break;	   
   case "V": 
      maDivision.document.execCommand('ForeColor', false, '#1F2A40');
     break;	   
   case "L":
      maDivision.document.execCommand("CreateLink");
	  break;
  }
 }
 else
 {
  alert("Vous devez souligner une partie du texte.");
 }
}

function doCopDiv(cmpt,objet)
{
 var num;
 for (num = 1; num <= cmpt; num++)
 {     
	 maDivisionNom = "Division" + num;
	 maDivision = document.getElementById(maDivisionNom);
     maCopDivNom = "CopDiv" + num;
	 maCopDiv = document.getElementById(maCopDivNom);
	 strText = maDivision.innerHTML;
	 strText = FormaterText(strText);
	 maCopDiv.value = strText;
 }
 if (objet.value == "Soumettre")
 {
  if (confirm("Voulez-vous vraiment enregistrer les changements?"))
  {
   return true;
  }
 }
 else
 {
  if (confirm("Are you sure you want to save changes?"))
  {
   return true;
  }
 } 
 return false;
}

function FormaterText(strText)
{
 var maChaine = strText
 var monExpReg = /(<[/]P>\r\n<P>)/gi;
 maChaine = maChaine.replace(monExpReg, "<BR><BR>");
 monExpReg = /(<P>)/gi;
 maChaine = maChaine.replace(monExpReg, "");
 monExpReg = /(<[/]P>)/gi;
 maChaine = maChaine.replace(monExpReg, "");
 monExpReg = /(<STRONG>)/gi;
 maChaine = maChaine.replace(monExpReg, "<B>");
 monExpReg = /(<[/]STRONG>)/gi;
 maChaine = maChaine.replace(monExpReg, "</B>");
 monExpReg = /(<EM>)/gi;
 maChaine = maChaine.replace(monExpReg, "<I>");
 monExpReg = /(<[/]EM>)/gi;
 maChaine = maChaine.replace(monExpReg, "</I>");
 monExpReg = /([&]nbsp[;]|nbsp[;])/gi;
 maChaine = maChaine.replace(monExpReg, "");
 monExpReg = /(\r\n)/gi;
 maChaine = maChaine.replace(monExpReg, "");
 monExpReg = /(<A href)/gi;
 maChaine = maChaine.replace(monExpReg, "<A style='margin-left: 0px; margin-right: 0px; font-weight: bold' href");
 var OK = true;
 while (OK == true)
 {
  var longueur = maChaine.length;
  if (maChaine.substring(longueur - 4,longueur)=="<BR>")
  {
   maChaine = maChaine.substring(0,longueur - 4);
  }
  else
  {
   OK = false;  
  } 
 } 
 return maChaine; 
}

function ClearAll(parametre)
{
 var parametreName = parametre.name;
 var numero = parametreName.charAt(1);
 maDivisionNom = "Division" + numero
 maDivision = document.getElementById(maDivisionNom)
 maDivision.innerHTML = "";
}

function addbookmark()
{
var bookmarkurl="http://www.equipementsbernard.com"
var bookmarktitle="Équipements Bernard @ www.equipementsbernard.com"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function verifyList()
{
 if (document.form1.txtName.value == "")
 {
   alert("Le nom doit être rempli !!!");
   document.form1.txtName.focus();
   return false;
 }
 if (document.form1.txtMail.value == "")
 {
   alert("Le courriel doit être rempli !!!");
   document.form1.txtMail.focus();
   return false;
 } 
  var trouveAt = document.form1.txtMail.value.indexOf("@");
  var trouvePoint = document.form1.txtMail.value.indexOf(".");
  if(trouveAt == -1 ||trouvePoint == -1 )
  {
    alert("L'adresse courriel n'est pas conforme !!!");
    document.form1.txtMail.focus();
    return false;
  }
  if (document.form1.areaMsg.value == "")
 {
   alert("Le message doit être rempli !!!");
   document.form1.areaMsg.focus();
   return false;
 }
return true;
}

function verifyListName()
{
 if (document.form1.txtTitre.value == "")
 {
  alert("Le titre de la liste doit être renseigné !!!");
  document.form1.txtTitre.focus();
  return false;
 } 
return true;
}

function verifyForm(Lang)
{
 if (document.form1.txtContact.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le nom du contact doit être rempli.");   
  }
  else
  {
   alert("The contact name must be typed."); 
  } 
  document.form1.txtContact.focus();
  return false;
 }
 if (document.form1.strMail.value == "")
 {
   if (Lang == "fr")
  {
   alert("Le courriel du contact doit être rempli.");
  }
  else 
  {
   alert("The contact e-mail address must be typed");
  }   
  document.form1.strMail.focus();
  return false;
 } 
  var trouveAt = document.form1.strMail.value.indexOf("@");
  var trouvePoint = document.form1.strMail.value.indexOf(".");
  if(trouveAt == -1 ||trouvePoint == -1 )
  {
    if (Lang == "fr")
    {
     alert("L'adresse courriel n'est pas conforme.");
    }
    else 
    {
     alert("The e-mail address isn't in the right format.");
    } 	
    document.form1.strMail.focus();
    return false;
  }
  if (document.form1.txtComm.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le # de commande doit être rempli.");
  }
  else 
  {
   alert("The order # must be typed.");
  } 
  document.form1.txtComm.focus();
  return false;
 }
 if (document.form1.productMsg.value == "")
 {
  if (Lang == "fr")
  {
   alert("Au moins un article doit être rempli.");
  }
  else 
  {
   alert("At least one article must be typed.");
  }
  document.form1.productMsg.focus();
  return false;
 }
 if (document.form1.txtExp.value == "")
 {
   if (Lang == "fr")
  {
   alert("Le moyen d'expédition doit être rempli.");
  }
  else 
  {
   alert("The type of shipping must be typed.");
  }
   document.form1.txtExp.focus();
   return false;
 }
 if (document.form1.txtAdrMess.value == "")
 {
   if (Lang == "fr")
  {
   alert("L'adresse pour expédition doit être rempli.");
  }
  else 
  {
   alert("The shipping adress must be typed.");
  }
   document.form1.txtAdrMess.focus();
   return false;
 }
 
return true;
}

function verifyContact(Lang)
{
 if (document.form1.txtName.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le nom doit être rempli.");   
  }
  else
  {
   alert("The name must be typed."); 
  } 
  document.form1.txtName.focus();
  return false;
 }
 if (document.form1.txtTel.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le numéro de téléphone doit être rempli.");   
  }
  else
  {
   alert("The phone number must be typed."); 
  } 
  document.form1.txtTel.focus();
  return false;
 } 
 if (document.form1.txtMail.value == "")
 {
   if (Lang == "fr")
  {
   alert("Le courriel doit être rempli.");
  }
  else 
  {
   alert("The e-mail address must be typed");
  }   
  document.form1.txtMail.focus();
  return false;
 } 
  var trouveAt = document.form1.txtMail.value.indexOf("@");
  var trouvePoint = document.form1.txtMail.value.indexOf(".");
  if(trouveAt == -1 ||trouvePoint == -1 )
  {
    if (Lang == "fr")
    {
     alert("L'adresse courriel n'est pas conforme.");
    }
    else 
    {
     alert("The e-mail address isn't in the right format.");
    } 	
    document.form1.txtMail.focus();
    return false;
  }
return true;
}

function verifyCourrier(Lang)
{
 if (document.courrier.e_input_topic.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le sujet doit être rempli.");   
  }
  else
  {
   alert("The subject must be typed."); 
  } 
  document.courrier.e_input_topic.focus();
  return false;
 }
 if (document.courrier.e_input_name.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le nom doit être rempli.");   
  }
  else
  {
   alert("The name must be typed."); 
  } 
  document.courrier.e_input_name.focus();
  return false;
 }
 if (document.courrier.e_input_phone.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le numéro de téléphone doit être rempli.");   
  }
  else
  {
   alert("The phone number must be typed."); 
  } 
  document.courrier.e_input_phone.focus();
  return false;
 } 
 if (document.courrier.e_input_email.value == "")
 {
   if (Lang == "fr")
  {
   alert("Le courriel doit être rempli.");
  }
  else 
  {
   alert("The e-mail address must be typed");
  }   
  document.courrier.e_input_email.focus();
  return false;
 } 
  var trouveAt = document.courrier.e_input_email.value.indexOf("@");
  var trouvePoint = document.courrier.e_input_email.value.indexOf(".");
  if(trouveAt == -1 ||trouvePoint == -1 )
  {
    if (Lang == "fr")
    {
     alert("L'adresse courriel n'est pas conforme.");
    }
    else 
    {
     alert("The e-mail address isn't in the right format.");
    } 	
    document.courrier.dl_input_email.focus();
    return false;
  }
return true;
}


function verifyListeEnvoi(Lang)
{
 if (document.listeenvoi.dl_input_name.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le nom doit être rempli.");   
  }
  else
  {
   alert("The name must be typed."); 
  } 
  document.listeenvoi.dl_input_name.focus();
  return false;
 }
 if (document.listeenvoi.dl_input_phone.value == "")
 {
  if (Lang == "fr")
  {
   alert("Le numéro de téléphone doit être rempli.");   
  }
  else
  {
   alert("The phone number must be typed."); 
  } 
  document.listeenvoi.dl_input_phone.focus();
  return false;
 } 
 if (document.listeenvoi.dl_input_email.value == "")
 {
   if (Lang == "fr")
  {
   alert("Le courriel doit être rempli.");
  }
  else 
  {
   alert("The e-mail address must be typed");
  }   
  document.listeenvoi.dl_input_email.focus();
  return false;
 } 
  var trouveAt = document.listeenvoi.dl_input_email.value.indexOf("@");
  var trouvePoint = document.listeenvoi.dl_input_email.value.indexOf(".");
  if(trouveAt == -1 ||trouvePoint == -1 )
  {
    if (Lang == "fr")
    {
     alert("L'adresse courriel n'est pas conforme.");
    }
    else 
    {
     alert("The e-mail address isn't in the right format.");
    } 	
    document.listeenvoi.dl_input_email.focus();
    return false;
  }
return true;
}


function Delete_onClick(numero)
{
 var strHref
 strHref = "GestionImg.asp?x=3&pk=" + numero 
 document.location.href = strHref
}


function noRightClick()
{
 if (event.button==2) 
 {
  alert('Vous ne pouvez pas effectuer de right-click sur cette page. The right-click is not allowed in this page.')
 }
}



function ShowHelp(objet)
{
 var nouvelleFenetre;
 if(objet.value == "Aide")
 {
  nouvelleFenetre = window.open("AideGestionContenu.asp?Language=francais",null,"width=450,height=200,scrollbars=yes");
 } 
 else
 {
  nouvelleFenetre = window.open("AideGestionContenu.asp?Language=anglais",null,"width=450,height=200,scrollbars=yes");
 }  
}

var statBarMsg = " A.D.S. Excavation" +
                 " vous souhaite de passer une belle journée." +
               
                 " N'hésitez pas a nous contacter !" ;

function startStatusScroller()
{
    window.status = statBarMsg;
    statBarMsg = statBarMsg.substring(1, statBarMsg.length) + statBarMsg.substring(0, 1)
    setTimeout("startStatusScroller()", 240)
}


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.0
  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 && document.getElementById) x=document.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];}
}



//</SCRIPT>
