// JavaScript Document
<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>



function scrollManager() {
	//Fonction permettant de faire glisser le div "colonne_droite" lors du scroll de la page
	var ie4=document.all
	// pour détecter ie
	var ns6=document.getElementById&&!document.all
	// pour detecter Netscape et FF
	if (ns6) { 
		// Navigateur Netscape 5 et plus et DOM-1.
		document.getElementById("colonne_droite").style.top = window.pageYOffset + "px";		
		} 
	else if (ie4) { 
	  // Internet Explorer et Opera
      document.getElementById("colonne_droite").style.top = document.documentElement.scrollTop + "px";
		}
}
   

function setListeners() {
	 // Fonction permettant de créer un evenement onScroll auquel est rattaché la fonction scrollManager
	 // Cette fonction est executée au chargement de la page.
     if (window.addEventListener)
     window.addEventListener('scroll', function(){scrollManager();},false);
    else if (window.attachEvent)
     window.attachEvent('onscroll', function(){scrollManager();});
}

// fonction pour la validation du formulaire de demande d'information.

function Verif()	
{
	var RS = document.Demande.RaisonSociale.value;
	var CP = document.Demande.CodePostal.value;
	var VIL = document.Demande.Ville.value;
	var Te = document.Demande.Tel.value;
	var Fa = document.Demande.Fax.value;
	var NM = document.Demande.VCNom.value;
	var PR = document.Demande.VCPrénom.value;
	var FC = document.Demande.VCFonction.value;
	var EM = document.Demande.VCEmail.value;
	var Com = document.Demande.commentaire.value;
	RS = RS.replace(/'/g,"`");
	CP = CP.replace(/'/g,"`");
	VIL = VIL.replace(/'/g,"`");
	Te = Te.replace(/'/g,"`");
	Fa = Fa.replace(/'/g,"`");
	NM = NM.replace(/'/g,"`");
	PR = PR.replace(/'/g,"`");
	FC = FC.replace(/'/g,"`");
	EM = EM.replace(/'/g,"`");
	Com = Com.replace(/'/g,"`");
	document.Demande.RaisonSociale.value = RS;
	document.Demande.CodePostal.value = CP;
	document.Demande.Ville.value = VIL;
	document.Demande.Tel.value = Te;
	document.Demande.Fax.value = Fa;
	document.Demande.VCNom.value = NM;
	document.Demande.VCPrénom.value = PR;
	document.Demande.VCFonction.value = FC;
	document.Demande.VCEmail.value = EM;
	document.Demande.commentaire.value = Com;

	if (document.Demande.RaisonSociale.value=="" || document.Demande.Tel.value=="" || document.Demande.VCNom.value=="" || document.Demande.VCEmail.value=="") 
		{alert ("Veuillez remplir tous les champs obligatoires.");}
	else  {if (document.Demande.commentaire.value.length > 1000)
			 {alert ("Le champ commentaire est limité à 1000 caractères, veuillez le corriger");}
		  else document.Demande.submit();
		  }
}

function Verif2()	
{
	var RS = document.Demande.RaisonSociale.value;
	var Te = document.Demande.Tel.value;
	var NM = document.Demande.VCNom.value;
	var PR = document.Demande.VCPrénom.value;
	var FC = document.Demande.VCFonction.value;
	var EM = document.Demande.VCEmail.value;
	var Com = document.Demande.commentaire.value;
	RS = RS.replace(/'/g,"`");
	Te = Te.replace(/'/g,"`");
	NM = NM.replace(/'/g,"`");
	PR = PR.replace(/'/g,"`");
	FC = FC.replace(/'/g,"`");
	EM = EM.replace(/'/g,"`");
	Com = Com.replace(/'/g,"`");
	document.Demande.RaisonSociale.value = RS;
	document.Demande.Tel.value = Te;
	document.Demande.VCNom.value = NM;
	document.Demande.VCPrénom.value = PR;
	document.Demande.VCFonction.value = FC;
	document.Demande.VCEmail.value = EM;
	document.Demande.commentaire.value = Com;

	if (document.Demande.RaisonSociale.value=="" || document.Demande.Tel.value=="" || document.Demande.VCNom.value=="" || document.Demande.VCEmail.value=="") 
		{alert ("Veuillez remplir tous les champs obligatoires.");}
	else  {if (document.Demande.commentaire.value.length > 1000)
			 {alert ("Le champ commentaire est limité à 1000 caractères, veuillez le corriger");}
		  else document.Demande.submit();
		  }
}

function Verif3()	
{
	var RS = document.Demande.RaisonSociale.value;
	var NM = document.Demande.VCNom.value;
	var PR = document.Demande.VCPrénom.value;
	var EM = document.Demande.VCEmail.value;
	RS = RS.replace(/'/g,"`");	
	NM = NM.replace(/'/g,"`");
	PR = PR.replace(/'/g,"`");
	EM = EM.replace(/'/g,"`");
	document.Demande.RaisonSociale.value = RS;
	document.Demande.VCNom.value = NM;
	document.Demande.VCPrénom.value = PR;
	document.Demande.VCEmail.value = EM;

	if (document.Demande.RaisonSociale.value=="" || document.Demande.VCPrénom.value=="" || document.Demande.VCNom.value=="" || document.Demande.VCEmail.value=="") 
		{alert ("Veuillez remplir tous les champs obligatoires.");}
	else  {document.Demande.submit();}
}

function Verif4()	
{
	var RS = document.Demande.RaisonSociale.value;
	var EM = document.Demande.VCEmail.value;
	RS = RS.replace(/'/g,"`");
	EM = EM.replace(/'/g,"`");
	document.Demande.RaisonSociale.value = RS;
	document.Demande.VCEmail.value = EM;

	if (document.Demande.RaisonSociale.value=="" || document.Demande.VCEmail.value=="") 
		{alert ("Veuillez remplir tous les champs obligatoires.");}
	else  {document.Demande.submit();}
}


// fonction jump() pour acceder à une page web sans utiliser le href standard, visible par les moteur de recherche.
function Jump(U) {
window.open(U,'_self','');
}

// fonction jump2() pour acceder à une page web sans utiliser le href standard, visible par les moteur de recherche.
// ouverture d'une fenetre indépendante.
function Jump2(URL) {
window.open(URL,'_blank','');
} 

// fonction jump3() pour ouvrir une fenetre type popup.
function Jump3(U) {
window.open(U,'_blank','location=no, menubar=no, resizable=no, height=830, width=800');
}

// fonction jump4() pour ouvrir une fenetre type popup.
function Jump4(U) {
window.open(U,'_blank','location=no, menubar=no, resizable=no, height=420, width=605');
}


