function centerWindow(url,wname,w,h,scr,ext) 
{
	if (ext!="undefined")
		{
		ext = ","+ext;
		}
	if ((document.all) || (document.getElementById))
		var xMax = screen.width, yMax = screen.height;
	else
		if (document.layers)
			var xMax = window.outerWidth, yMax = window.outerHeight;
		else
			var xMax = 800, yMax=600;
	var xOffset = (xMax - w)/2, yOffset = (yMax - h)/2;
	objWindow=window.open(url,wname,'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars='+scr+','+ext);
	objWindow.focus();
}
