function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function PopUpSpe(src,name,w,h)
	{
	size=",width="+w+",height="+h
	browser=window.open(src, name,"scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no,location=no,directories=no"+size)
	}
	
function PopupImage(img) {
	titre="AGRANDISSEMENT";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	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+10,document.images[0].height+48); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function popup(page,largeur,hauteur,options) 
{     
	var top=(screen.height-hauteur)/2-50;     
	var left=(screen.width-largeur)/2;    
	
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options); 
} 

function refresh(page)
{
  window.opener.location.href= page ;
}
