dialog opens but page scrolls to top

dialog opens but page scrolls to top

I have several links that have onmouseover function to open dialog on a div.

The problem is that if the page is long, and when I move to the bottom of the page, when I mouse over the tag, the page is scrolled to the top.

How to avoid this problem?

I have the above code:

  1. <a href='#' onmouseover="openDialog(19,'tooltip'); return false;" onmouseout="closeDialog(19)" id="note_19" style="cursor:pointer">
  2. <div id="dialog_content_19" title="Product: #0015" style="display: none;">
  3.                              <b>Author: </b>m<br>
  4.                              <b>Start date: </b>Mon 02/14/2011<br>
  5.                              <b>End date: </b>Mon 02/21/2011<br>
  6.                              <b>Comment: </b><br>
  7.                              This is a test promo for 15s and 25s.                         </div>

  1.     function openDialog(row_index,type) {
  2.         var type_id = type == 'tooltip' ? 'mo_' : '';
  3.         $("#dialog_content_"+type_id+row_index).dialog({
  4.                                             width:250,
  5.                                             height:180,
  6.                                             position:'center'
  7.         });
  8.       $('.ui-dialog').each(function(){
  9.              var top = (row_index-1) * 24.5 + 233;
  10.              if($(this).attr('aria-labelledby') == 'ui-dialog-title-dialog_content_'+row_index || $(this).attr('aria-labelledby') == 'ui-dialog-title-dialog_content_mo_'+row_index) {
  11.                 $(this).css('left', '180px');
  12.                 $(this).css('top', top+'px');
  13.              }
  14.         });
  15.         return false;
  16.     }

  17.     function closeDialog(row_index) {
  18.         $('.ui-dialog').each(function(){
  19.              if($(this).attr('aria-labelledby') == 'ui-dialog-title-dialog_content_mo_'+row_index) {
  20.                 $(this).remove();
  21.              }
  22.         });
  23.     }

As you see my href has # and also the mouseover event has return false, and also the openDialog has return false; It should not scroll to the top of the page. 

I am using:

  1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
  2. <script src="js/jquery/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
  3. <link rel="stylesheet" href="js/jquery/jquery-ui-1.8.10.custom.css" type="text/css" media="screen" />

What I am doing wrong?