function proA(centre) {
var top=(screen.height-360)/2;
var left=(screen.width-400)/2;
  window.open('coordonnees_proa.php?id='+ centre +'','','top='+top+',left='+left+', height=360, width=400, scrollbars=no, resizable=yes');
  }
  
  
function lfb(centre) {
var top=(screen.height-350)/2;
var left=(screen.width-400)/2;
  window.open('coordonnees_lfb.php?id='+ centre +'','','top='+top+',left='+left+', height=350, width=400, scrollbars=no, resizable=yes');
  }
  
  
function popup(region) {
var top=(screen.height-600)/2;
var left=(screen.width-350)/2;
  window.open('coordonnees.php?code='+ region +'','','top='+top+',left='+left+', height=600, width=350, scrollbars=yes, resizable=yes');
  }
  
  
function formation(pole) {
var top=(screen.height-700)/2;
var left=(screen.width-600)/2;
  window.open('coordonnees_poles.php?code='+ pole +'','','top='+top+',left='+left+', height=700, width=600, scrollbars=yes, resizable=yes');
  }
  
function formation_cfbb() {
var top=(screen.height-750)/2;
var left=(screen.width-380)/2;
  window.open('acceuil_cfbb.php','','top='+top+',left='+left+', height=750, width=380, scrollbars=no, resizable=no');
  }
  
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);
  }
  
  
function out(t) { 
document.getElementById("rubric"+t).style.position = 'absolute'; 
document.getElementById("rubric"+t).innerHTML = ''; 
}


function gom(n,s,h) { 
	if(OpenMenu) { 
    	out(OpenMenu) 
  	}
	document.getElementById("rubric"+n).innerHTML = '<iframe src="http://www.basketfrance.com/dtn/menu/sous_cat.php?id='+ n +'&ss='+ s +'" frameborder=no WIDTH="148" height="'+ h +'"></iframe>';
	document.getElementById("rubric"+n).style.position = 'relative';
	return n;
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


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+' doit contenir une adresse e-mail valide.\n';
      			} 
				else if (test!='R') { 
					num = parseFloat(val);
        			if (isNaN(val)) 
					errors+='- '+nm+' doit être de type numérique.\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+'\n'; 
				
			
		}
  	} 
	if (errors) 
		{alert('Le(s) champ(s) suivant(s) doi(ven)t être rempli(s):\n'+errors);
		document.MM_returnValue = (errors == '');}
}		





function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function langue(lg)
{
	if (lg == 'francais')
	{
		MM_showHideLayers('an_haut','','hide','f_haut','','show');
	}
	else
	{
		MM_showHideLayers('an_haut','','show','f_haut','','hide');
	}
}

// Java Document
function AxRep(){
	if (!document.all || !window.print || window.opera) return;
	if (document.getElementsByTagName) {

		//object
		var theObjects = document.getElementsByTagName("object");
		for (var i = 0; i < theObjects.length; i++) {
			//ajout d'un div autour de object
			div = theObjects[i].parentNode.insertBefore(document.createElement("div"), theObjects[i]);
			div.style.display="none";
			div.appendChild(theObjects[i]);

			if(div.firstChild.data){
				// Fix for Flash Satay style objects
				div.firstChild.removeAttribute('data');
			}

			//Recuperation des flashvars
			var theParams = div.getElementsByTagName("param");
			for (var j = 0; j < theParams.length; j++) {
				if(theParams[j].name.toLowerCase() == 'flashvars'){
					var theFlashVars = theParams[j].value;
					break;
				}
			}

			//changement des flashvars
			var theInnnerHTML = div.innerHTML;
			var re =
			theInnnerHTML = theInnnerHTML.replace(re, "<param name='FlashVars' value='" + theFlashVars + "'>");
			div.outerHTML = theInnnerHTML;
		}

		//embed
		var embs = document.getElementsByTagName("embed");
		for (i=0; i<embs.length; i++) {
			embs[i].outerHTML = embs[i].outerHTML;
		}
	}
}

