// JavaScript Document


function favoris(titrefav,lienfav) {
	
if ( navigator.appName != 'Microsoft Internet Explorer' )
{ window.sidebar.addPanel(titrefav,lienfav,""); }
else { window.external.AddFavorite(lienfav,titrefav); } }


function hidestatus(){
window.status=statusmsg
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus


//menu
//startList = function() {
	// code for IE
//	if(!document.body.currentStyle) return;
//	var subs = document.getElementsByName('submenu');
//	for(var i=0; i<subs.length; i++) {
//		var li = subs[i].parentNode;
//		if(li && li.lastChild.style) {
//			li.onmouseover = function() {
//				this.lastChild.style.visibility = 'visible';
//				this.lastChild.style.display = 'block';
//			}
//			li.onmouseout = function() {
//				this.lastChild.style.visibility = 'hidden';
//				this.lastChild.style.display = 'none';
//			}
//		}
//	}
//}
//window.onload=textdefil,startList;
window.onload = function() {textdefil(); hidestatus();};


function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}

function popupcentree(page,largeur,hauteur,options)
{
var top=(screen.height-hauteur)/2;
var left=(screen.width-largeur)/2;
window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
// onClick='popupcentree("FICHIER.HTM",400,400,"menubar=no,scrollbars=no,status=no,resizable=yes")'

function validationemail(lemail){
	var verif   = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]{2,}[.][a-zA-Z]{2,3}$/
      if (verif.exec(lemail) == null)
      {alert("Votre adresse email est incorrecte !");
       return false;}
      else
      {return true;}
}


function validation(formulaire)
	{
	if (formulaire.cherche.value == "")
		{ alert ("Vous devez entrer un mot à rechercher !");
		formulaire.cherche.focus();
		return (false);
		}
	if (formulaire.cherche.value.length < 2)
		{ alert ("Vous devez entrer un mot de 2 lettres minimum !");
		formulaire.cherche.focus();
		return (false);
		}
}

function validvote()
	{
		document.envoivote.submit();
	}
	
function verifcheckbox(){

total = 0;
for(var i = 0; i < document.envoipaie.modepaie.length; i++)
	{
if(document.envoipaie.modepaie[i].checked == true)
		{ 
total = total + 1; 
		}
	}
if(total == 0)
{
alert('ATTENTION !\n\nVous devez choisir un mode de paiement. Merci')
return false;
}
return true;
}

