// Pop Up Find on this page Javascript
// copyright 28th September 2002, by Stephen Chapman, Felgall Pty Ltd

// permission is granted to use this javascript provided that the code
// and comments are not altered

function locatorWin(bgcol) {lwin = window.open('','findit','height=50,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); lwin.moveTo(0,0);
lwin.document.write('<?xml version="1.0"?><!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN"\n"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd">\n<html xmlns="http:\/\/www.w3.org\/1999\/xhtml">\n<head><title>Search this page<\/title>\n');
lwin.document.write('<script type="text\/javascript">\nvar win = opener; var nm = 0; var here = ""; if (win != null) {here = win.location.href; var isLayers = 0; var isAll = 0; var isID = 0; if (document.getElementById) {isID = 1;}\n// else {\nif (document.all) {isAll = 1;} else { browserVersion = parseInt(navigator.appVersion); if ((navigator.appName.indexOf("Netscape") != -1) && (browserVersion == 4)) {isLayers = 1;}}\n// }\n}\n\n');
lwin.document.write('function findInPage(str) {\nif (win.closed) {alert("Unable to find as the main window has been closed."); self.close(); return false;} else if (here != win.location.href) {here = win.location.href; nm = 0;}\nif (str == "") {alert("Please enter the text you want to locate."); return false;} var tx, i, found; if (isLayers) {\n// start of Netscape 4 find code (from Bravenet)');
lwin.document.write('    if (!win.find(str)) while(win.find(str, false, true)) n++; else n++;\n// end of Netscape 4 find code (from Bravenet)\nif (n == 0) alert(str + "not found on this page.");} else if (isAll) {\n// start of Internet Explorer find code (from Bravenet)\n    tx = win.document.body.createTextRange(); for (i = 0; i <= nm && (found = tx.findText(str)) != false; i++) {tx.moveStart("character", 1); tx.moveEnd("textedit");}\n');
lwin.document.write('    if (found) {tx.moveStart("character", -1); tx.findText(str);tx.select(); tx.scrollIntoView(); nm++;}else {if (nm > 0) {nm = 0; findInPage(str);}\n// end of Internet Explorer find code (from Bravenet)\nelse alert(str + " not found on this page.");}} else if (isID) {\n// standard DOM find code goes here\n    alert("Find function not supported on this browser yet.");\n');
lwin.document.write('} return false;}\nfunction mnWin() {if (win.closed) {alert("Main window has been closed."); self.close();} else {win.focus(); window.focus();}}\n<\/script><\/head>\n<body bgcolor="'+bgcol+'">\n<div align="center"><form name="search"\nonsubmit="return findInPage(this.string.value);">\n');
lwin.document.write('<input name="string" type="text" size="23" onchange="nm = 0;">\n<input type="submit" value="Find"><br \/>\n<font size="1"><a\nhref="javascript:self.close()">Close Find Window<\/a><br \/><a href="javascript:mnWin()">Uncover Main Window<\/a><br \/>&nbsp;\n<\/form><\/div><\/body><\/html>'); lwin.focus();}

