<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function format(valeur,decimal,separateur) {
var deci=Math.round( Math.pow(10,decimal)*(Math.abs(valeur)-Math.floor(Math.abs(valeur)))) ; 
var val=Math.floor(Math.abs(valeur));
if ((decimal==0)||(deci==Math.pow(10,decimal))) {val=Math.floor(Math.abs(valeur)); deci=0;}
var val_format=val+"";
var nb=val_format.length;
for (var i=1;i<4;i++) {
	if (val>=Math.pow(10,(3*i))) {
		val_format=val_format.substring(0,nb-(3*i))+separateur+val_format.substring(nb-(3*i));
	}
}
if (decimal>0) {
	var decim=""; 
	for (var j=0;j<(decimal-deci.toString().length);j++) {decim+="0";}
	deci=decim+deci.toString();
	val_format=val_format+"."+deci;
}
if (parseFloat(valeur)<0) {val_format="-"+val_format;}
return val_format;
}

function openWindow(theURL,winName,features)
{
window.open(theURL,winName,features)
}

function openWindow(theURL,winName,features)
{
window.open(theURL,winName,features)
}

function affcancel()
{
this.close();
}

function PopupCentrer(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);
}

function PopupImage(img, titre) {
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');	
	w.document.write("<html><head><title>"+titre+"</title></head>");
	w.document.write("<script language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"script>");
	w.document.write("<body onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><a href=\"javascript:this.close();\"><img src='"+img+"' border=0></a>");
	w.document.write("");
	w.document.write("</body></html>");
	w.document.close();
}

function popupamoi(img,wi,he,titre) {
	var top=(screen.height-he)/2;
	var left=(screen.width-wi)/2;
	w=open("",'popup','top='+top+',left='+left+',width='+wi+',height='+he+',toolbar=no,scrollbars=no,resizable=yes');
	w.document.write("<title>"+titre+" - Football Club Noidanais</title>");
	w.document.write("<body	style=\"background-color: #FFF; margin: 0px; border: 0px; padding: 0px; vertical-align: middle;\">");
	w.document.write("<div align=\"center\"><a href=\"javascript:this.close();\"><img src=\""+img+"\" width=\""+wi+"\" height=\""+he+"\" alt=\"\" title=\"\" border=\"0\" align=\"absmiddle\"></a></div>");
	w.document.write("</body>");
	w.document.close();
}


function testvalid(){
	var f=document.contact;

if(f.nom.value== ""){
	alert("Veuillez saisir votre nom.");
	f.nom.focus();
	return false;
}
if (f.telephone.value== "") {
	alert("Veuillez saisir votre téléphone");
	f.telephone.focus();
	return false;
}
if (f.message.value== "") {
	alert("Veuillez saisir votre message");
	f.message.focus();
	return false;
}

f.submit();
}


function testerboutonradio(radio) {
for (var i=0; i<radio.length;i++) {
if (radio[i].checked) {
return true;
}
}
return false;
}
//-->