









function checktel1()
{
     if (FVerifSecteur.tel1.value.length >= 3)
     { 
	     FVerifSecteur.tel2.focus();
     }
}
function checktel2()
{
     if (FVerifSecteur.tel2.value.length >= 3)
     { 
	     FVerifSecteur.tel3.focus();
     }
}
function checktel3()
{
     if (FVerifSecteur.tel3.value.length >= 4)
     { 
	     FVerifSecteur.tel4.focus();
     }
}






function FormInscrBranchement_checktel1()
{
     if (FormInscrBranchement.tel1.value.length >= 3)
     { 
	     FormInscrBranchement.tel2.focus();
     }
}

function FormInscrBranchement_checktel2()
{
     if (FormInscrBranchement.tel2.value.length >= 3)
     { 
	     FormInscrBranchement.tel3.focus();
     }
}

function FormInscrBranchement_checktel3()
{
     if (FormInscrBranchement.tel3.value.length >= 4)
     { 
	     FormInscrBranchement.tel4.focus();
     }
}




























function FormInscrBranchement_checkfax1()
{
     if (FormInscrBranchement.fax1.value.length >= 3)
     { 
	     FormInscrBranchement.fax2.focus();
     }
}

function FormInscrBranchement_checkfax2()
{
     if (FormInscrBranchement.fax2.value.length >= 3)
     { 
	     FormInscrBranchement.fax3.focus();
     }
}






























function validate(field) {
var valid = "0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Caractere invalide");
tempo2 = 1;
field.focus();
field.select();
  }
}



























//valid form dinscription pour internet
function verifchamps_FVerifInscription()
{
   if (FormInscrBranchement.pre.value == "")
   {
       alert("Veuillez indiquer votre prénom");	
	   FormInscrBranchement.pre.focus();
   }
   
   else if (FormInscrBranchement.nom.value == "")
   {
       alert("Veuillez indiquer votre nom");	
	   FormInscrBranchement.nom.focus();
   }
   
   else if (FormInscrBranchement.no.value == "")
   {
       alert("Veuillez indiquer votre numéro civic");	
	   FormInscrBranchement.no.focus();
   }
   
   else if (FormInscrBranchement.rue.value == "")
   {
       alert("Veuillez indiquer votre rue");	
	   FormInscrBranchement.rue.focus();
   }
   
   else if (FormInscrBranchement.ville.value == "")
   {
       alert("Veuillez indiquer votre ville");	
	   FormInscrBranchement.ville.focus();
   } 
    
   else if (FormInscrBranchement.cp.value == "")
   {
       alert("Veuillez indiquer votre code régional");	
	   FormInscrBranchement.cp.focus();
   } 
   
   
   
   
   else if (FormInscrBranchement.tel1.value == "")
   {
       alert("Veuillez indiquer votre indicatif");	
	   FormInscrBranchement.tel1.focus();
   }
   else if (FormInscrBranchement.tel1.value.length < 3)
   {
       alert("Veuillez indiquer votre indicatif avec 3 chiffres");	
	   FormInscrBranchement.tel1.focus();
   }
  
  
  
  
  
   else if (FormInscrBranchement.tel2.value == "")
   {
       alert("Veuillez indiquer votre téléphone SVP");	
	   FormInscrBranchement.tel2.focus();
   }
   else if (FormInscrBranchement.tel2.value.length < 3)
   {
       alert("Veuillez indiquer votre téléphone correctement SVP");	
	   FormInscrBranchement.tel2.focus();
   }
   
   
   
   
   else if (FormInscrBranchement.tel3.value == "")
   {
       alert("Veuillez indiquer votre téléphone SVP");	
	   FormInscrBranchement.tel3.focus();
   }
   else if (FormInscrBranchement.tel3.value.length < 4)
   {
       alert("Veuillez indiquer votre téléphone correctement SVP");	
	   FormInscrBranchement.tel3.focus();
   }
   

   else if (FormInscrBranchement.service.value=="0")
   {
	   alert("Veuillez indiquer votre connexion souhaitée"); 
       FormInscrBranchement.service.focus();
   }

 
   else if (FormInscrBranchement.email.value != "")
   {  	
	      txt=FormInscrBranchement.email.value;
          if (txt.indexOf("@")<3)
	     {
            alert("Je suis désolé. Cette adresse courriel semble mauvaise");
            FormInscrBranchement.email.focus();
         }   
		 else
         {
            FormInscrBranchement.submit();
         }
   }
   else
         {
            FormInscrBranchement.submit();
         }
   
   

   
}





























































//valid form de verification de h-v pour secteur
function verifchamps_FVerifSecteur()
{
   if (FVerifSecteur.tel1.value == "")
   {
       alert("Veuillez indiquer votre code régional");	
	   FVerifSecteur.tel1.focus();
   } 
   else if (FVerifSecteur.tel2.value == "")
   {
       alert("Veuillez indiquer votre téléphone SVP");	
	   FVerifSecteur.tel2.focus();
   }
   else if (FVerifSecteur.tel3.value == "")
   {
       alert("Veuillez indiquer votre téléphone SVP");	
	   FVerifSecteur.tel3.focus();
   }
   else if (FVerifSecteur.tel.value == "")
   {
       alert("Veuillez indiquer le # de téléphone où le service doit être installé");	
	   FVerifSecteur.tel.focus();
   }
   else
   {
       FVerifSecteur.submit();
   }
   

}












//clique de croit
//function nod()
	//{
	////}
//document.oncontextmenu = nod;


















function verifchamps()
{
   
   if (FCourPerso.pre.value == "")
   {
       alert("Veuillez indiquer votre prénom");	
	   FCourPerso.pre.focus();
   } 
   else if (FCourPerso.nom.value == "")
   {
       alert("Veuillez indiquer votre nom");
	   FCourPerso.nom.focus();
   }

   else	if 	(FCourPerso.ville.value == "")
   {
	  	alert("Veuillez indiquer votre ville");
		FCourPerso.ville.focus();
   }
   
   else	if 	(FCourPerso.exp.value == "")
   {
	  	alert("Veuillez indiquer le contenu du cours");
		FCourPerso.exp.focus();
   }
   else if (FCourPerso.date.value == "")
   {
	  	alert("Veuillez indiquer une date approximative");
		FCourPerso.date.focus();
   }
   else if (FCourPerso.nb.value == "")
   {
	  	alert("Veuillez indiquer le nombre de participant(s) SVP");
		FCourPerso.nb.focus();
   }
   else if (FCourPerso.com2.value=="")
   {
	  	alert("Veuillez indiquer le moyen de communication");
		FCourPerso.com.focus();
   } 
   else if (FCourPerso.com2.value != "")
   {  
	   					
	   if (FCourPerso.com1[0].checked == true)
	   {
	      txt=FCourPerso.com2.value;
          if (txt.indexOf("@")<3)
	     {
            alert("Je suis désolé. Cette adresse courriel semble mauvaise");
            exit();
         }
	   }
     FCourPerso.submit();
   }

}

function aff_moy_com_mail()
{
   FCourPerso.com2.value='Indiquez votre mail';
   FCourPerso.com2.style.visibility = 'visible';
   FCourPerso.com2.focus();
}

function aff_moy_com_tel()
{
   FCourPerso.com2.value='Indiquez votre Tél.';	
   FCourPerso.com2.style.visibility = 'visible';
   FCourPerso.com2.focus();
}






















//tchek mail
function emailCheck()
	{
      adresse = FMail.email.value;
	  if (adresse == "")
	 {
		   alert('Entrez une adresse SVP');
		   FMail.email.focus();
		   return false;
	 }
	else
	{
	var place = adresse.indexOf("@",0);
	var point = adresse.indexOf(".",place+0);
	if ((place > -1)&&(adresse.length >0)&&(point > 0))
		{
		   FMail.submit();
		}
	else
		{
		   alert('Entrez une adresse de courriel valide !!');
		}
	}
	}


















//menu plan
var head="display:''";
img1=new Image();
img1.src="fold.gif";
img2=new Image();
img2.src="open.gif";

function change(){
if(!document.all)
return;
if (event.srcElement.id=="foldheader") {
var srcIndex = event.srcElement.sourceIndex;
var nested = document.all[srcIndex+1];
if (nested.style.display=="none") {
nested.style.display='';
event.srcElement.style.listStyleImage="url(open.gif)";
}
else {
nested.style.display="none";
event.srcElement.style.listStyleImage="url(fold.gif)";
}
}
}

document.onclick=change;



































//user-p
var win=null;
function openfenetre(mypage,myname,w,h,scroll,pos)
{
  if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
  if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
  else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
  settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=0,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
  win=window.open(mypage,myname,settings);
}






function tchekchampsvide()
{
   if (Form_User.EUser.value == "")
   {
       alert("Veuillez indiquer votre nom d'utilisateur");
   }
   else if (Form_User.EPass.value == "")
   {
       alert("Veuillez indiquer votre mot de passe");
   }
   else
   {
	  
   }
}



	  














//prtscreen
function clp_clear() 
{
   var content=window.clipboardData.getData("Text");
   if (content==null) 
   {
        window.clipboardData.clearData();
   }
   setTimeout("clp_clear();",1000);
}




















	














































































//fenetre popup fond jaune (bulle explicative)
var fenetreNote;
function afficheNote(titre, message, couleurFond, fond, couleurTexte, typePolice, tailleCaracteres) {
  fenetreNote = window.open('','Note','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,' + 'width=400' + ',height=100');
  texte = '<' + 'HTML' + '><' + 'HEAD' + '><' + 'TITLE' + '>' + titre + '</' + 'TITLE' + '><' + '/HEAD' + '><' + 'BODY BACKGROUND=' + '"' + fond + '"' + ' BGCOLOR=' + '"' + couleurFond + '">';
  texte += '<CENTER>';
  texte +='<FONT FACE="' + typePolice +'"';
  texte += ' SIZE=' + tailleCaracteres; 
  texte += ' COLOR=' + '"' + couleurTexte +'">';
  texte += message + '</CENTER></FONT>';
  texte += '</' + 'BODY' + '><' + '/HTML' + '>';
  fenetreNote.document.write(texte);
  fenetreNote.focus();
  fenetreNote.document.close();
  return false;
}
//  Fin du script -->





//on mouse move btn retour
function VersionNavigateur(Netscape, Explorer) 
{
  if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      
      (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
    return true;
else return false;
}











var ntsc =(document.getElementById && !document.all)
var ftx=-620;
var fty=410;
var fpx=0;var fpy=0;var fpxf=0;var fpxc=0;var tempobe=0;var toclose=0;var decax=0;var decay=0;var deplace=0;

//fct lors du drague de lutilisateur
function Mouvement(e) 
{
	Xpos = (ntsc)? e.pageX : event.clientX+document.body.scrollLeft;
	Ypos = (ntsc)? e.pageY : event.clientY+document.body.scrollTop;
  if (deplace!=0) 
  {
  	if (deplace==1) 
	{
  		decax=Xpos-fpx;
  		decay=Ypos-fpy;
  		deplace=2;
  	}
 	  fpx=Xpos-decax;
 	  fpy=Ypos-decay;
 	  document.getElementById('fenetre').style.top=fpy;
 	  document.getElementById('fenetre').style.left=fpx;
 	  return false;
  }	
}


//deplacement
if(ntsc) 
document.captureEvents(Event.MOUSEMOVE); 
document.onmousemove = Mouvement;

function cliquer(flag) {
	deplace=flag;
	return false;
}


function beWindow(fpx,fpy,ftx,fty,z,fichier) {
var ftxb=210;var hide="hidden";//affichage du titre

fchaine=''

+'<div id="fenetre" style="position:absolute;visibility:hidden;z-index:50;top:'+fpy+'px;left:'+fpx+'px;width:'+ftx+'px;height:'+(fty+21)+'px;bgcolor:#FFFFFF;border:0px solid red;">'

+'<div id="window" style="position:absolute;z-index:50;top:21px;left:0px;width:'+(ftx)+'px;height:'+(fty)+'px;">'

//petit coin gris a gauche haut
+'<div id="hg" style="position:absolute;z-index:50;top:0px;left:0px;width:6px;height:6px;"><img src="img/hg.gif" width="6" height="6"></div>'
//petit coin gris a droite
+'<div id="hd" style="position:absolute;z-index:50;top:0px;left:'+(ftx-6)+'px;width:6px;height:6px;"><img src="img/hd.gif" width="6" height="6"></div>'
//petit coin gris a gauche bas
+'<div id="bg" style="position:absolute;z-index:50;top:'+(fty-6)+'px;left:0px;width:6px;height:6px;"><img src="img/bg.gif" width="6" height="6"></div>'
//petit coin gris a droite bas
+'<div id="bd" style="position:absolute;z-index:50;top:'+(fty-6)+'px;left:'+(ftx-6)+'px;width:6px;height:6px;"><img src="img/bd.gif" width="6" height="6"></div>'
//ligne horizontal haut
+'<div id="h" style="position:absolute;z-index:50;top:0px;left:6px;width:1px;height:6px;"><img src="img/h.gif" width="'+(ftx-12)+'" height="6"></div>'
//ligne horizontal bas
+'<div id="b" style="position:absolute;z-index:50;top:'+(fty-6)+'px;left:6px;width:1px;height:6px;"><img src="img/b.gif" width="'+(ftx-12)+'" height="6"></div>'
//ligne vrtical gauche
+'<div id="g" style="position:absolute;z-index:50;top:6px;left:0px;width:6px;height:1px;"><img src="img/g.gif" width="6" height="'+(fty-12)+'"></div>'
//ligne vertical droite
+'<div id="d" style="position:absolute;z-index:50;top:6px;left:'+(ftx-6)+'px;width:6px;height:6px;"><img src="img/d.gif" width="6" height="'+(fty-12)+'"></div>'
//cadrage
+'</div>'

//barre - important
+'<div id="barre" style="position:absolute;z-index:50;top:0px;left:0px;width:'+(ftxb)+'px;height:21px;text-align:left;border:0px solid yellow;">'

//titre,bouton fermer - important
+'<div id="titre" style="position:absolute;top:1px;border:0; width:'+(ftxb)+'; height:21px;padding-top:3px;background-img:url(img/tm.gif);gackground-repeat;repeat-x;font-size:12px;font-family:verdana, arial;color:#000000;font-weight:normal;text-align:left;cursor:move;" onmousedown="return cliquer(1);" onmouseup="return cliquer(0);">'+z+'</div>'

//img close aff + img close change sur onmousemove__--ici pour le x--__
+'<div style="position:absolute;z-index:50;top:1px;right:-290px;"><IMG src="img/tg.gif" style="border:0px; width:21px; height:21px;cursor:pointer;" onclick="closebe();" onMouseOver="this.src=\'img/tgs.gif\';" onMouseOut=this.src="img/tg.gif"></div>'

//fenetre int - important
+'<div id="interieur" style="position:absolute;z-index:50;top:27px;left:6px;width:'+(ftx-12)+'px;height:'+(fty-8)+'px;">'
//affichage de linterieur de la fenetre - important
+'<iframe name="inbeos" id="inbeos" TOP=0 LEFT=0 WIDTH='+(ftx-12)+' HEIGHT='+(fty-12)+' border=0 FRAMEBORDER=0 scrolling="auto" src="'+fichier+'"></iframe>'
+'</DIV>'
+'</div>'
+'</div>'
document.write(fchaine);
}




function slidebe() {
	if (toclose!=3) {
    fpx+=fpxc;
    if ((fpx>fpxf) && (toclose==0)) {fpx=fpxf;fpxc=0;toclose=3;}
    if (toclose==1) {fpxc=fpxc-5;}
    document.getElementById('fenetre').style.left=fpx;
    if (fpx<-744) {
      fpxc=0;fpx=744;toclose=0;
      inbeos.location.href="vide.htm";
      document.getElementById('fenetre').style.visibility="hidden";
    }
  }
  tempobe=setTimeout('slidebe();',5);
}




function apercu(fichier,titr) {
if (document.getElementById){
self.clearTimeout();self.clearInterval();
fpy= (document.all) ? document.body.scrollTop+(document.body.clientHeight/2)-205 : window.pageYOffset+(window.innerHeight/2)-250; // position haute fenetre
if(titr !=null)
document.getElementById('titre').innerHTML = titr;
document.getElementById('fenetre').style.top=fpy;
document.getElementById('fenetre').style.left=-744;
fpx=-744;
fpxf=(document.all) ? (document.body.clientWidth/2)-250 :(window.innerWidth/2)-250; ;
fpxc=50;
toclose=0;
document.getElementById('fenetre').style.visibility="visible";
inbeos.location.href=fichier;
}
else {myWindow=open(fichier, "newWindow", "width=300,height=400,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no");}
return false;
}

function closebe() {
fpxc=50;toclose=1;
return false;
}

if (document.getElementById){beWindow(0,0,500,300,"","");slidebe();}


	  















	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
//DEFILEMENT IMAGES LIENS
imgPath = new Array;
SiClickGoTo = new Array;
if (document.images) 
{
    i0 = new Image;
	i0.src = 'img/pub_ref/vitavous.gif';
	SiClickGoTo[0] = "http://www.vitavous.com";
	imgPath[0] = i0.src;
	
	i1 = new Image;
	i1.src = 'img/pub_ref/cananadaannonce.gif';
	SiClickGoTo[1] = "http://www.canada-annonces.com";
	imgPath[1] = i1.src;
	
	i2 = new Image;
	i2.src = 'img/pub_ref/refmarketing.gif';
	SiClickGoTo[2] = "http://www.refmarketing.com";
	imgPath[2] = i2.src;
	
	i3 = new Image;
	i3.src = 'img/pub_ref/referencementcom.gif';
	SiClickGoTo[3] = "http://www.gratuit-referencement.com";
	imgPath[3] = i3.src;

	
	i4 = new Image;
	i4.src = 'img/pub_ref/bestofweb.gif';
	SiClickGoTo[4] = "http://bestofweb.maxibottin.com";
	imgPath[4] = i4.src;
	  
	
	i5 = new Image;
	i5.src = 'img/pub_ref/refrapide.gif';
	SiClickGoTo[5] = "http://www.refrapide.com";
	imgPath[5] = i5.src; 
		
	
	i6 = new Image;
	i6.src = 'img/pub_ref/aw.gif';
	SiClickGoTo[6] = "http://awreferencement.com";
	imgPath[6] = i6.src; 
	
	
	i7 = new Image;
	i7.src = 'img/pub_ref/meta_referencement.gif';
	SiClickGoTo[7] = "http://www.meta-referencement.com";
	imgPath[7] = i7.src;
	  
	
	i8 = new Image;
	i8.src = 'img/pub_ref/meta_referencement.gif';
	SiClickGoTo[8] = "http://www.meta-referencement.com";
	imgPath[8] = i8.src;
		
	
	i9 = new Image;
	i9.src = 'img/pub_ref/quebec_top.gif';
	SiClickGoTo[9] = "http://www.quebectop.com";
	imgPath[9] = i9.src;
	
	
	i10 = new Image;
	i10.src = 'img/pub_ref/babillard_electronique.gif';
	SiClickGoTo[10] = "http://www.babillardelectronique.com";
	imgPath[10] = i10.src;
}
a=0;

function ejs_img_fx(img) {
	if(img && img.filters && img.filters[0]) {
		img.filters[0].apply();
		img.filters[0].play();
	}
}

function StartImgAnim() 
{
	if (document.images) 
	{
		document.write('<a href="#" onclick="ImgDest(); return false;"><img src="img/def_ini.gif" border="0" alt="" name="defil" style="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=100,Duration=1)" /></a>');
		defilimg()
	} 

}

function ImgDest() 
{
	window.open(SiClickGoTo[a],'_blank');
}


function defilimg() 
{
	if (document.images) 
	{
		a = Math.round(Math.random()*(10));
		ejs_img_fx(document.defil)
		document.defil.src = imgPath[a];
		tempo1 = setTimeout("defilimg()",2000);
	}
}
