Jump through search results in UIWebView with Javascript on the Button click
===

I have set up a search in uiwebview with javascript that works great, 
but I want to be able to jump to the next found word in the search results.
I have succeeded in geting the view to scroll to the first instance by using this code:

     
       function uiWebview_HighlightAllOccurencesOfStringForElement(element,keyword) {
    
    //declared a var for height
    
    if (element) {
        if (element.nodeType == 3) {        // Text node
            while (true) {
                //if (counter < 1) {
                var value = element.nodeValue;  // Search for keyword in text node
                var idx = value.toLowerCase().indexOf(keyword);
                if (idx < 0) break;             // not found, abort
                
                //(value.split);
                
                //we create a SPAN element for every parts of matched keywords
                var span = document.createElement("span");
                var text = document.createTextNode(value.substr(idx,keyword.length));
                span.appendChild(text);
                span.setAttribute("id",keyword);
                span.setAttribute("class","uiWebviewHighlight");
                span.style.backgroundColor="black";
                span.style.color="white";
                 
                uiWebview_SearchResultCount++;    // update the counter
                
                text = document.createTextNode(value.substr(idx+keyword.length));
                element.deleteData(idx, value.length - idx);
                var next = element.nextSibling;
                element.parentNode.insertBefore(span, next);
                element.parentNode.insertBefore(text, next);
                element = text;
                if(desiredHeight == 0)
                {
                    var offset = {};
                    offset.x = 0;
                    offset.y =0;
                    GetOffset(document.getElementById(keyword),offset);
                    desiredHeight = offset.y-150;
                    alert(desiredHeight);
                    window.scrollTo(0,desiredHeight);
                }
            }
           
            
        } else if (element.nodeType == 1) { // Element node
            if (element.style.display != "none" && element.nodeName.toLowerCase() !=  
         'select') {
                for (var i=element.childNodes.length-1; i>=0; i--) {
       uiWebview_HighlightAllOccurencesOfStringForElement(element.childNodes[i],keyword);
                         
                }
            }
         }
       }
   
      }

       function GetOffset (object, offset) {
      if (!object)
        return;
     offset.x += object.offsetLeft;
     offset.y += object.offsetTop;
    
      GetOffset (object.offsetParent, offset);
      }
 now i want to jump to the next search string on the next button click.
How can i do it?
Please suggest me.