function centerDialog(fileName, dialogWidth, dialogHeight, dialogParams, dialogTitle) {
	if (dialogParams == null) {
	 	dialogParams = "";
	}
	else {
		dialogParams = "," + dialogParams;
	}

	xpos = (screen.width - dialogWidth)/2;
	ypos = (screen.height - dialogHeight)/2;
	var dialogProperties = "left="+xpos+",top="+ypos+",width="+dialogWidth+",height="+dialogHeight;
	
	if (dialogTitle != null) 
	   dialogProperties += ",title='" + dialogTitle + "'";

   dialogProperties += dialogParams;
	window.open(fileName,null,dialogProperties);
}
