//move through list of bookmarks which derive either from
        //a search query or
        //a reference lookup
        void OnKeyDown(object sender, WebEventHandlerBase.WebEventArgs  e)
        {
            //F3
            if(e.KeyCode == 114)
            {
                //scroll to previous highlighted object
                if(bookMarks != null && bookMarks.Count > 0)
                {
                    mshtml.IHTMLTxtRange TextRange = (mshtml.IHTMLTxtRange)((mshtml.IHTMLBodyElement)this.webBrowserEx1.CurrentDocument.body).createTextRange();
                    TextRange.moveToBookmark((string)bookMarks[bmc]);
                    //TextRange.execCommand("BackColor", false, "Red");
                    //TextRange.collapse(false);

                    TextRange.scrollIntoView(false);
                    if(bmc > 0)
                        bmc--;
                }
            }
            //F4
            if(e.KeyCode == 115)
            {
                //scroll to next highlighted object
                if(bookMarks != null && bookMarks.Count > 0)
                {
                    mshtml.IHTMLTxtRange TextRange = (mshtml.IHTMLTxtRange)((mshtml.IHTMLBodyElement)this.webBrowserEx1.CurrentDocument.body).createTextRange();
                    TextRange.moveToBookmark((string)bookMarks[bmc]);
                    //TextRange.execCommand("BackColor", false, "Red");
                    //TextRange.collapse(false);
                    TextRange.scrollIntoView(false);
                    if(bmc < (bookMarks.Count - 1))
                        bmc++;
                }

            }
            if(e.KeyCode == 19)
            {
                this.webBrowserEx1.PrintPreview();
                this.webBrowserEx1.Print(true);
            }
        }
 //needed for google like dictionary lookup
 private void OnMouseMove(object sender, WebEventHandlerBase.WebEventArgs e)
 {
     MouseMoveHandler h = (MouseMoveHandler)sender;
     if(selectionTriggered)
     {
         h.HtmlElement.title = "";
         currentSelText = null;
         return;
     }
      			mshtml.IHTMLTxtRange TextRange = (mshtml.IHTMLTxtRange)((mshtml.IHTMLSelectionObject)this.webBrowserEx1.CurrentDocument.selection).createRange();
      			TextRange.moveToPoint(e.ClientX, e.ClientY);
      			TextRange.expand("word");
       		TextRange.select();
       		currentSelText = TextRange.text;
       		string b = OnSilentLookUp(currentSelText);
       		h.HtmlElement.title = currentSelText + ((b == "") ? "?" : ": means ") + b;
 }
 /// <summary>
 /// Calculate current paragraph number for corresponding commentary paragraph
 /// Return result of other pali editions book and page numbers
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnMouseOver(object sender, WebEventHandlerBase.WebEventArgs e)
 {
     try
     {
      			MouseOverHandler h = (MouseOverHandler)sender;
       	    string a = h.HtmlElement.innerHTML;
       	    if(a != null)
       	    {
       	    	a = a.ToLower();
       	    	string x = LocateEdition(a);
       	    	a = a.Substring(0, a.IndexOf("."));
       	    	paragraphCounter = int.Parse(a);
       	    	x = x + paragraphCounter.ToString();
       	    	OnDetectEdition(x);
       	    }
     }catch(Exception ex){}
 }
        void OnKeyUp(object sender, WebEventHandlerBase.WebEventArgs  e)
        {
            if((e.KeyCode == 16))
            {

            }
        }