/* -- USED FOR BUGREPORT WINDOW -- */

/** py */

/** Exemple: 
<a href="..."
   onClick="return popup_centre(this);">
...
</a>
*/

 function popup_centre(mylink, windowname, winWidth, winHeight)
 {
	if (! window.focus)return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	
	//Set popup location
	var winTop    = (screen.height - winHeight) / 2;
	var winLeft   = (screen.width - winWidth) / 2;
	
	//Set popup features
	var winFeatures  = '';
	/*if (document.all)*/
    { winFeatures += "left="+winLeft+",top="+winTop + ','; }
    /*else if (document.layers)
         winFeatures += "screenX="+winLeft+",screenY="+winTop+',';*/

	winFeatures += 'height=' + winHeight + ',';
	winFeatures += 'width='  + winWidth  + ',';
	winFeatures += 'toolbar=no,menubar=no,scrollbars=yes,resizable=yes';
	
	//
	window.open(href, windowname, winFeatures);
	return false;
}
