
var defaultProps =
	'dependent=yes,'+ 			//fermeture auto avec fermeture parent (NS, ne fonctionne pas sur IE)
	'directories=no,'+			//barre d'outils
	'location=no,'+				//zone d'adresse
	'menubar=no,'+				//barre de menu
	'resizable=no,'+			//redimensionnement
	'focus=yes,'+
	'status=no,';				//barre de statuts
	
function openWindow(a_url, a_name, a_width, a_height, a_left, a_top, a_scroll, a_props) {
	if (!a_props) a_props = defaultProps;
	var l_props = a_props +
					'width=' + a_width + ',' +
					'height=' + a_height + ',' +
					'screenX=' + a_left + ',' +				//position horizontale (NS, ne fonctionne pas sur IE)
					'screenY=' + a_top + ',' +
					'scrollbars=' + a_scroll + ',';   
	var theWindow = window.open(a_url, a_name, l_props); 
	theWindow.focus();
	
	return theWindow;
}

// Ouvre un document dans sa propre fenêtre
function open_document(doc) {

	var l_props =
		'top=0,'+
		'dependent=no,'+ 
		'directories=no,'+
		'location=no,'+
		'menubar=no,'+
		'resizable=yes,'+
		'focus=yes,'+
		'status=no,';
	
	openWindow(doc, 'Document', '960', window.screen.availHeight-30, '', '', 'yes', l_props);
}

