<!-- 

// openWindow By jc@vitalyn.com le 25 Mai 2003
//
// MAJ 19-01-2006 - La fenetre est centree aussi en mode scroll
//                - Ajout de la fonction commune changeCss
//

var     ns  = (document.layers) ? true : false;                // ns4x
var     dom = (document.getElementById) ? true : false;        // DOM compatible browser (ie6+, ns6+, mozilla...)
var     ie  = (document.all) ? true : false;                   // ie4x

function        openWindow(src, width, height, scroll, name)
{
	x = (window.screen.availWidth - width) / 2;
	y = (window.screen.availHeight - height) / 2;
	
	if (!name)
		name = '';
	if (scroll)
       	  winpop = window.open(src, name, "width=" + width + ", height=" + height + ", scrollbars=yes, resizable=yes, modale=yes, screenX=" + x + ", screenY=" + y);
	else
	  winpop = window.open(src, name, "width=" + width + ", height=" + height + ", scrollbars=no, screenX=" + x + ", screenY=" + y);
	winpop.focus();
}

function	resizeWindow(width, height)
{
	window.resizeTo(width, height);
	window.moveTo((window.screen.width - width) / 2, (window.screen.height - height) / 2) ;
}

function        changeCss(e, cls)
{
  if (dom && e)
    e.className = cls;
}

//-->
