code: protected String getOpenGalleryCall(
          CmsObject cms,
          I_CmsWidgetDialog widgetDialog,
          I_CmsWidgetParameter param,
          long hashId) {
  
          StringBuffer sb = new StringBuffer(128);
          sb.append("javascript:cmsOpenDialog('");
  
          // the gallery title
          sb.append(widgetDialog.getMessages().key(Messages.getButtonName(getGalleryName()))).append("', '");
  
          // the gallery path
          sb.append(OpenCms.getSystemInfo().getOpenCmsContext()).append(PATH_GALLERY_JSP);
  
          // set the content locale
          Locale contentLocale = widgetDialog.getLocale();
          try {
              I_CmsXmlContentValue value = (I_CmsXmlContentValue)param;
              contentLocale = value.getLocale();
          } catch (Exception e) {
              // may fail if widget is not opened from xml content editor, ignore
          }
          sb.append("?__locale=").append(contentLocale.toString());
          // add other open parameters
          for (Entry<String, String> paramEntry : getGalleryOpenParams(
              cms,
              widgetDialog.getMessages(),
              param,
              widgetDialog instanceof CmsDialog ? ((CmsDialog)widgetDialog).getParamResource() : null,
              hashId).entrySet()) {
              sb.append("&").append(paramEntry.getKey()).append("=").append(paramEntry.getValue());
          }
          sb.append("', '").append(param.getId()).append("', 488, 650); return false;");
          return sb.toString();
      }
docs: Returns the javascript call to open the gallery widget dialog.<p>
  
  @param cms an initialized instance of a CmsObject
  @param widgetDialog the dialog where the widget is used on
  @param param the widget parameter to generate the widget for
  @param hashId the field id hash
  
  @return the javascript call to open the gallery widget dialog