function openWindowCentered(htmlFile, windowName, windowWidth, windowHeight, optLocation, optMenubar, optResizable, optScrollbars, optStatus, optToolbar) {
    optLocation = (optLocation) ? "yes" : "no";
	optMenubar = (optMenubar) ? "yes" : "no";
	optResizable = (optResizable) ? "yes" : "no";
	optScrollbars = (optScrollbars) ? "yes" : "no";
	optStatus = (optStatus) ? "yes" : "no";
	optToolbar = (optToolbar) ? "yes" : "no";
/*
	alert("optLocation" + optLocation);
	alert("optMenubar" + optMenubar);
	alert("optResizable" + optResizable);
	alert("optScrollbars" + optScrollbars);
	alert("optStatus" + optStatus);
	alert("optToolbar" + optToolbar);
*/
	scrWidth = screen.width;
	scrHeight = screen.height;
	var newWindow;
	var optString = ", location=" + optLocation + ", menubar=" + optMenubar + ", resizable=" + optResizable + ", scrollbars=" + optScrollbars + ", status=" + optStatus + ", toolbar=" + optToolbar;
//	alert(optString);
	newWindow = window.open(htmlFile,windowName,"width=" + windowWidth + ", height=" + windowHeight + optString);
//	if (!newWindow) {
//	   alert('you disabled popup-windows. please click on logo to open window manually.');
//	} else {
		if ((scrWidth < 0) && (scrHeigth < 0)) {
		   newWindow.moveTo(0,0);
		} else {
		   newWindow.moveTo(((scrWidth - windowWidth) / 2), ((scrHeight - windowHeight) / 2));
		}
		newWindow.focus();
//	}
}
