// Fenetres pop_up

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var MSWin = navigator.userAgent.indexOf("Win") != -1;
var ref_w_choix = null

function t( fich, largeur, hauteur )
{
	if( InternetExplorer && MSWin && ref_w_choix ) ref_w_choix.close();

	ref_w_choix = window.open( "", "w_image", 'width=' + ( largeur + 30 ) + ',height=' + ( hauteur + 30 ) +  ',scrollbars=no,toolbar=no,status=yes' );

	r = ref_w_choix.document
	r.open();
	r.write( '<html><head><title>Roland Weber</title><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">' )
	r.write( '</head><body bgcolor="#000000" onBlur="self.close()" text="#003300">' )
	r.write( '<table bgcolor="000000" align="center" valign="center" border="0" cellpadding="0"><tr valign="bottom">' )
	r.write( '<td width="' + largeur + '" height="' + hauteur + '" align="right" background="' + fich + '">' )
	r.write( '</td></tr></table></body></html>' )
	ref_w_choix.focus()
}

function ouvre_fen_info( url, w, h )
{
	if( InternetExplorer && ref_w_choix ) ref_w_choix.close();
	if( ! w ) w = 300;
	if( ! h ) h = 400;
	ref_w_choix = window.open( url, "w", 'scrollbars=yes,resizable=yes,width=' + w + ',height=' + h );
	ref_w_choix.focus();
}

function plein_ecran( url )
{
	if( InternetExplorer && MSWin && ref_w_choix ) ref_w_choix.close();
	
	w = screen.width;
	h = screen.height;

	if( InternetExplorer && MSWin ) { // IE Windows
		ref_w_choix = window.open( url, "w", "fullscreen,scrollbars=no" ); 
	} else if( ! InternetExplorer && MSWin ) { // NS Windows
		ref_w_choix = window.open( url, "w", "outerwidth=" + w + ",outerheight=" + h + ",top=0,left=0" );
	} else if( InternetExplorer && ! MSWin ) { // IE Mac
		ref_w_choix = window.open( url, "w", "width=" + w + ",height=" + h + ",top=0,left=0,scrollbars=no" );
	} else if( ! InternetExplorer && ! MSWin ) { // NS Mac
		ref_w_choix = window.open( url, "w", "width=" + ( w - 10 ) + ",height=" + ( h - 50 ) + ",top=0,left=0" );
	}

	ref_w_choix.focus();
}

function Recadre_Au_Mieux()
{
	InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
   l = 1024;
   h = 768;
   largeur = screen.width;
   hauteur = screen.height;
   window.moveTo( ( largeur-l ) / 2, ( hauteur-h ) / 2 );
   if( InternetExplorer )
   {
   	window.resizeTo( l, h );
   } else {
   	window.resizeTo( l - 13 ,h - 157 ); // 1011,   611
   }
}


