// Bibliothèque de fonctions javascript

var style = '\
body { margin: 0px; }	\
img { border: none; }\
';

function afficheImage(Objet) {
	var w = popup('', 'image', '');
	w.focus();
	w.moveTo(0,0);
	var URL = Objet.href;
	w.document.writeln('<html><head><title>' + URL + '</title><style type="text/css">' + style + '</style></head>');
	w.document.writeln('<body onload="window.resizeTo(\
		(document.images[0].width+40>screen.availWidth?screen.availWidth:document.images[0].width+40),\
		(document.images[0].height+75>screen.availHeight?screen.availHeight:document.images[0].height+75)\
		)">');
	w.document.writeln('<div align="center">');
	w.document.writeln('<a href="" onclick="self.close()" title="Fermer"><img src="'+URL+'" name="image"></a></div>');
	w.document.writeln('</body></html>');
	w.document.close();
	return false;
}

function popup(URL, NomWin, Options) {
	if (Options == '') { Options = 'width=400,height=550,menubar=yes,scrollbars=yes,resizable=yes'; }
	return window.open(URL, NomWin, Options);
}
var pobj, pstyle;
function setstyle(obj,strStyle) {
	if (!document.getElementById) return false;
	if (pobj) restyle();
	pobj = obj;
	pstyle = obj.className;
	obj.className = strStyle;
	return true;
}
function restyle() {
	pobj.className = pstyle;
}