// util.js : Quelques fonctions JavaScript utilitaires

// Deprecated
function fullScreen (url) {
	var w = open ("", "screen");
	if (w != null) w.close(); 
	w = open (url, "screen",
		  "width="+ (screen.width-10) +",height=" + (screen.height-50) + ",top=0,left=0,"
		+ "fullscreen=yes,scrollbars=yes,resizable=no,location=no,status=no"
		+ "locationbar=no,location=no,menubar=no,personalbar=no,statusbar=no,toolbar=no,status=no");
}

// Pour voir un truc, une photo, par exemple, en plein écran
function openFullScreen (url, urlLoading) {
	var w = open ("", "screen");
	if (w != null) w.close(); 
	w = open (url, "screen",
		  "width="+ (screen.width-10) +",height=" + (screen.height-50) + ",top=0,left=0,"
		+ "fullscreen=yes,scrollbars=yes,resizable=no,location=no,status=no"
		+ "locationbar=no,location=no,menubar=no,personalbar=no,statusbar=no,toolbar=no,status=no");
	openDialog ("loading", urlLoading, 300,150);
}

// Ouvre une fenêtre dialogue au milieu de l'écran
function openDialog (name, url, width, height) {
	var w = open ("", name);
	if (w != null) w.close(); 
	w = open (url, name,
		  "width="+width+",height="+height+",top="+((screen.height-height)/2)+",left="+((screen.width-width)/2)
		+ ",scrollbars=yes,resizable=no,location=no,status=no,"
		+ "locationbar=no,location=no,menubar=no,personalbar=no,statusbar=no,toolbar=no,status=no");
	return w;		
}
