//-------------------------
//---- FONCTIONS GENERIQUES
//-------------------------

function afficheImage(chemin)
	{
	i1 = new Image;
	i1.src = chemin;
	html = '<HTML><HEAD><TITLE>:: Ets MORINI</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0 onLoad="msg.style.visibility = \'hidden\'"><div id="msg" style="position:absolute; left:220px; top:205px; width:400px; height: 100px"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td height="100" bgcolor="#FFFFFF"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"><b>Patientez quelques secondes...</b></font></div></td></tr></table><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"></font></div><CENTER><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+32)"></CENTER></BODY></HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=auto,resizable=0');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};
	
function ouvrir_credits(URL)
{
	window.open(URL, "","resizable=yes, scrollbars=auto, toolbar=no, status=no, directories=no, menubar=no, screenX = 600, screenY = 400, width=400, height=200");
}

//---- Fonction d'affichage d'une popup

function fenetre(page,largeur, hauteur, barre, centre)
{
	if (centre)
	{
		var left=((screen.availWidth-largeur)/2);
		var top=((screen.availHeight-hauteur)/2);
	}
	else
	{
		var left=screen.availWidth-largeur-40;

		var top=screen.availHeight-hauteur-60;
	}

	window.open(page, "", "width="+largeur+", height="+hauteur+",resizable=no, scrollbars="+barre+", toolbar=no, status=no, directories=no, menubar=no, left="+left+", top="+top+", titlebar=no");
}

function agenda(page)
{
	var largeur=782;
	var hauteur=550;

	var left=((screen.availWidth-largeur)/2);
	var top=((screen.availHeight-hauteur)/2)-10;

	window.open(page, "", "width="+largeur+", height="+hauteur+",resizable=no, scrollbars=yes, toolbar=yes, status=no, directories=no, menubar=yes, resize=yes, left="+left+", top="+top+"");
}

function ChangerImage(fichier, image)
{
	image.src = fichier ;
}
