
<!-- Original:  Mike Hall (MHall75819@aol.com) -->
<!-- Web Site:  http://members.aol.com/MHall75819 -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var NS = (document.layers);
var IE = (document.all);

var win = this;
var n   = 0;

function findInPage() {

  var isLayers = 0;
  var isAll = 0;
  var isID = 0;
  //** isAll = 1 means IE Browser
  if (document.all) {
     //alert("IE browser")
     isAll = 1;
     }
  else
  if (document.getElementById) {
     isID = 1;
     //alert("FireFox = 1")
     }
  else {
     browserVersion = parseInt(navigator.appVersion);
     if ((navigator.appName.indexOf("Netscape") != -1) && (browserVersion == 4)) {
        isLayers = 1;
        //alert("Netscape browser")
        }
     }

var str = document.theForm.request.value
var txt, i, found;
if (str == "") {
   alert("Please enter in the Search Criteria, then hit the GO button to search this page.")
   document.theForm.request.focus()
   return false;
   }

if (NS) {                 //*** Netscape browser
   if (!win.find(str))
      while(win.find(str, false, true))
            n++;
   else {
      n++;
      }
   if (n == 0) alert(str + " was not found on this page.");
   }

if (isID) {                       //*** FireFox browser
    var ag = navigator.userAgent.toLowerCase();
    var isG = (ag.indexOf('gecko') != -1);
    var isR=0;
    if (isG) {
       t = ag.split("rv:");
       isR = parseFloat(t[1]);
       }
    if (isR >=1) {
       //if (!parent.ABC_Body_Left.transcript_content.find(str,false,false,true,false,true,false))
       if (!parent.transcript_content.find(str,false,false,true,false,true,false))
          alert(str + " not found on this page.");
       }
    else
       alert("We are sorry but the Page Search function not supported on this browser");

   }
  if (IE) {                         //*** IE browser
   //txt = win.document.body.createTextRange();    *** search in current page ***
   //txt = parent.ABC_Body_Left.transcript_content.document.body.createTextRange();    //*** search in sub-iFrame
   txt = top.Index_Village_Chapel.transcript_content.document.body.createTextRange();    //*** search in sub-iFrame
   for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
       txt.moveStart("character", 1);
       txt.moveEnd("textedit");
       }
   if (found) {
      txt.moveStart("character", -1);
      txt.findText(str);
      txt.select();
      txt.scrollIntoView();
      n++;
      }
   else {
      if (n > 0) {
         n = 0;
         findInPage(str);
         }
      else
         alert(str + " was not found on this page.");
      }
     }

return false;
}
//  End -->

