diff --git theme/theme.inc theme/theme.inc
index 61eea65..c03a19c 100644
--- theme/theme.inc
+++ theme/theme.inc
@@ -35,6 +35,51 @@ function _views_theme_functions($hook, $view, $display = NULL) {
 }
 
 /**
+ * Generates a unique dom id for the view.
+ *
+ * @param $view
+ *   object view
+ * @return
+ *   string view dom id
+ */
+function _views_generate_dom_id($view) {
+   // If the dom_id property has already been set, it used as a view identifier.
+   // If the function views_ajax() was previously invoked the dom_id might
+   // already have a client-defined value.
+  if (isset($view->dom_id) && !empty($view->dom_id)) {
+    return $view->dom_id;
+  }
+
+  // Clients may set the dom_id per request as they can bypass the views_ajax()
+  // function with a custom menu call back and the invokation of
+  // views_embed_view(). It is needed when the same display is rendered
+  // multiple times on a common HTML page by separate requests.
+  // Clients are supposed to look up the view_dom_id entries of the
+  // Drupal.settings.views.AjaxViews array and calculate a unique id themselves.
+  if (isset($_REQUEST['view_dom_id'])) {
+    // Sanitize to prevent XSS attacks.
+    return preg_replace('/[^a-zA-Z0-9_-]+/', '-', $_REQUEST['view_dom_id']);
+  }
+
+  // The following code fragement provides unique identifiers per request. It
+  // is needed when the same view display is rendered multiple times on a
+  // common HTML page within the same request. The ID is determined by the
+  // view's name, display name and an incremential counter. It also prevents
+  // ID clashing if different view displays are rendered by separate requests.
+  // A simple incremental counter wouldn't avoid that.
+  static $dom_ids = array();
+  $base = $dom_id = drupal_html_class($view->name . '-' . $view->current_display);
+  $counter = 0;
+
+  while (!empty($dom_ids[$dom_id])) {
+    $dom_id .= $base . '-' . ++$counter;
+  }
+
+  $dom_ids[$dom_id] = TRUE;
+  return $dom_id;
+}
+
+/**
  * Preprocess the primary theme implementation for a view.
  */
 function template_preprocess_views_view(&$vars) {
@@ -108,7 +153,7 @@ function template_preprocess_views_view(&$vars) {
     // each view. This identifier is written to both Drupal.settings and the DIV
     // wrapper.
     static $dom_id = 1;
-    $vars['dom_id'] = !empty($view->dom_id) ? $view->dom_id : $dom_id++;
+    $vars['dom_id'] = _views_generate_dom_id($view);
     $vars['classes_array'][] = 'view-dom-id-' . $vars['dom_id'];
   }
 
