//ouvre une fenetre fille retaillable    	
function new_browser(src,name,w,h)
{
	size=",width="+w+",height="+h
	browser=window.open(src,name,"resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,location=0,directories=no"+size)
}


//ouvre une fenetre fille de taille fixe   
function new_browser3(src,name,w,h)
{
	size=",width="+w+",height="+h
	browser=window.open(src,name,"resizable=no,scrollbars=no,toolbar=no,status=no,menubar=no,location=0,directories=no"+size)
}	


//ouvre une photo dans une fenetre fille à la taille de la photo
function fenetrephoto2 (repimages, lo, ha, nomimage,id)
{	
	browser=window.open("visualisation.asp?image="+repimages+"&id="+id, nomimage,"resizable=no,scrollbars=auto,toolbar=no,status=no,menubar=no,location=0,directories=no,width="+lo+",height="+ha)
}


function ExecAJAX () 
{
	//premier parametre = nom du script serveur
	
	var args = ExecAJAX.arguments;
	var erreur = 0;
	var script = args[0];
	
	var xhr_object1 = null;   
    if(window.XMLHttpRequest) xhr_object1 = new XMLHttpRequest();   // Firefox     
	else if(window.ActiveXObject) xhr_object1 = new ActiveXObject("Microsoft.XMLHTTP");   // Internet Explorer  
	else return;   // XMLHttpRequest non supporte par le navigateur   

	xhr_object1.open("POST", script, true);   
    
	xhr_object1.onreadystatechange = function() { if(xhr_object1.readyState == 4) eval(xhr_object1.responseText); }   
		
	xhr_object1.setRequestHeader("Content-type", "application/x-www-form-urlencoded");   

	var data = "";
	
	for (i=1;i<args.length;i++)
	{
		if (i>1) data = data + "&";
		data = data + "param" + i + "=" + escape(args[i]);		
		
	}
	
	//data = "param1=valider&param2=6&param3=test%2024"
	
	xhr_object1.send(data);  
}

function popup(ad, largeur, hauteur, nom)
{
	var top=(screen.height-hauteur)/2;

	var left=(screen.width-largeur)/2;
	
	window.open(ad, nom,'resizable=yes, location=no, top='+top+',left='+left+', width='+largeur+', height='+hauteur+', menubar=no, status=no, scrollbars=yes, menubar=no');
}


