var w2;
var numDern=0;
var	req = null;
var avx = ['MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'];

function loadXMLRequest(url)
{try{req=null;req=new XMLHttpRequest();}catch (e){for (var i=0;i<avx.length;i++){try{req=new ActiveXObject(avx[i]);break;}catch (e) {}}}
if (req){req.open("GET",url,true);req.onreadystatechange=aCb;req.send(null);}
return false;}

function aCb()
{if (req&&req.readyState==4){if (req.status==200) str=req.responseText;else str="<center><b>Erreur HTTP "+req.status+" !!!</b></center>";document.getElementById('HautDroite').innerHTML=str;}}

function Yo(url, urlSuite, numSite) {
	var url2="http://www.top-reduc.fr/"+url+".php"+urlSuite;
/*	if (numSite==numDern){
	}
	else {
		numDern=numSite;
*/		w2=window.open(url2,'popup02','width=1000,height=750,top=20, left=20, toolbar=yes, menubar=yes, location=yes, resizable=yes, scrollbars=yes, status=yes');
/*  		w2.focus();
 	 	w2.focus();
	}
*/	
}

function voter(fichId,fonctionne){
	var url="resultat/evaluation.php?fId="+fichId+"&fonctionne="+fonctionne;
	OuvrirFenetre(url,'popup','width=650,height=220,top=1, left=1, toolbar=no, menubar=no, location=no, resizable=yes, scrollbars=no, status=no');
}

function OuvrirFenetre(url,nom,details) {
	w2=window.open(url,nom,details);
  	w2.document.close();
  	w2.focus();
  	w2.focus();
}

function affiche(id) {
	var d = document.getElementById(id);
	for (var i = 0; i<=50; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
	if (d) {d.style.display='block';}
	fonctionPost(id);
}
// la fonction qui permet de masquer ou de montrer le menu catégories
function controle_choix()
{
	var choix = document.form1.checkbox;

	if (choix.checked == true) {document.getElementById('globalnav').style.display = 'none';}
	else {document.getElementById('globalnav').style.display = 'block';}
}
