public static void showErrorBox(XMultiServiceFactory xMSF, String ResName, String ResPrefix, int ResID, String AddTag, String AddString){
try{
String ProductName = getProductName(xMSF);
XInvocation xResInvoke = Tools.initResources(xMSF, ResName, ResPrefix);
String sErrorMessage = Tools.getResText(xResInvoke, ResID);
sErrorMessage = replaceSubString(sErrorMessage, ProductName, "%PRODUCTNAME");
sErrorMessage = replaceSubString(sErrorMessage, String.valueOf((char)13), "<BR>");
sErrorMessage = replaceSubString(sErrorMessage, AddString, AddTag);
UNODialogs.showMessageBox(xMSF, "ErrorBox", com.sun.star.awt.VclWindowPeerAttribute.OK, sErrorMessage);