home *** CD-ROM | disk | FTP | other *** search
- <HTML id=dlgFind STYLE="font-family: ms sans serif; font-size: 8pt;
- width: 33.5em; height: 11.2em">
- <HEAD>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <TITLE id=dialogTitle>
- Find
- </TITLE>
- <SCRIPT LANGUAGE="JavaScript" defer>
- function callHelp(elm)
- {
- if (null != elm.helpid)
- {
- window.showHelp(elm.helpfile, "" + parseInt(elm.helpid));
- }
- else
- {
- if ("BODY" != elm.tagName)
- {
- callHelp(elm.parentElement);
- }
- }
- }
- function btnCancelClick()
- {
- window.close();
- }
- function getTextRange(elm)
- {
- var r = elm.parentTextEdit.createTextRange();
- r.moveToElementText(elm);
- return r;
- }
- function mouseClick()
- {
- if (window.event.srcElement.id.substring(0,3)
- == "txt")
- {
- return;
- }
- if (window.event.button == 2)
- {
- callHelp(window.event.srcElement);
- }
- }
- function txtDefaultESC()
- {
- if (event.keyCode == 27)
- {
- window.close();
- return;
- }
- }
- function setFindState(fKeyPress) { var htmlKeyAlt = 18; if (!fKeyPress || htmlKeyAlt != event.keyCode) { if (("" == txtFindText.value) == g_fFindEnabled) { btnFind.disabled = g_fFindEnabled; g_fFindEnabled = !g_fFindEnabled; } } else { window.setTimeout("set" + "Find" + "State(false)", 50); } }
- var g_fFindEnabled = false;
- function findFlags()
- {
- var htmlMatchWord = 2;
- var htmlMatchCase = 4;
- return (htmlMatchWord * document.all.chkWholeWord.checked)
- | (htmlMatchCase * document.all.chkMatchCase.checked)
- }
- function docPosition(doc)
- {
- var index;
- var fraParent = window.dialogArguments.unsecuredWindowOfDocument.frames;
- for (index = 0; index < fraParent.length; ++index)
- {
- if (fraParent[index].document == doc)
- {
- return index;
- }
- }
- return -1;
- }
- function nextDoc(doc)
- {
- var winParent = window.dialogArguments.unsecuredWindowOfDocument;
- var docTemp;
- var nPosition;
- nPosition = docPosition(doc);
- if (nPosition == -1)
- {
- return null;
- }
- if (nPosition < winParent.frames.length - 1)
- {
- return winParent.frames[nPosition + 1].document;
- }
- else
- {
- if (winParent.document.parentWindow
- == txtFindText.topDoc.parentWindow)
- {
- return doc;
- }
- docTemp = doc;
- while (docPosition(docTemp) == winParent.frames.length - 1)
- {
- docTemp = winParent.document;
- if (docTemp.parentWindow
- == txtFindText.topDoc.parentWindow)
- {
- return doc;
- }
- winParent = docTemp.parentWindow.parent;
- }
- return winParent.frames[docPosition(docTemp) + 1].document;
- }
- }
- function prevDoc(doc)
- {
- var winParent = window.dialogArguments.unsecuredWindowOfDocument;
- var docTemp;
- var nPosition;
- nPosition = docPosition(doc);
- if (nPosition != 0)
- {
- return winParent.frames[nPosition - 1].document;
- }
- else
- {
- if (winParent.document.parentWindow
- == txtFindText.topDoc.parentWindow)
- {
- return doc;
- }
- docTemp = doc;
- while (docPosition(docTemp) == 0)
- {
- docTemp = winParent.document;
- if (docTemp.parentWindow
- == txtFindText.topDoc.parentWindow)
- {
- return doc;
- }
- winParent = docTemp.parentWindow.parent;
- }
- return winParent.frames[docPosition(docTemp) - 1].document;
- }
- }
- function btnFindClick()
- {
- var docSearch
- = window.dialogArguments.unsecuredWindowOfDocument.document;
- var L_FinishedDocument_Text = "Finished searching the document.";
- var intDirection;
- var rngWorking;
- var rngFoundText;
- var fFoundText = false;
- var fFrameset = false;
- var fIframe = docSearch.all.tags("IFRAME").length;
- var index;
- if (!fIframe && docSearch.parentWindow.frames.length)
- {
- fFrameset = true;
- if (0 == txtFindText.docLastSearched)
- {
- while (docSearch.parentWindow.frames.length)
- {
- docSearch = docSearch.parentWindow.frames[0].document;
- }
- txtFindText.docLastSearched = docSearch;
- }
- else
- {
- docSearch = txtFindText.docLastSearched;
- if (docSearch == null)
- {
- alert(L_FinishedDocument_Text);
- return;
- }
- while (docSearch.parentWindow.frames.length)
- {
- if (radDirection[0].checked)
- {
- docSearch = docSearch.parentWindow.
- frames[docSearch.parentWindow.
- frames.length - 1].document;
- }
- else
- {
- docSearch = docSearch.parentWindow.frames[0].document;
- }
- }
- txtFindText.docLastSearched = docSearch;
- }
- }
- rngWorking = docSearch.selection.createRange();
- if (docSearch.queryCommandState("BrowseMode")
- && rngWorking.text.length == 0)
- {
- rngWorking = docSearch.body.createTextRange();
- }
- fFoundText = (docSearch.selection.type == "Text");
- if (radDirection[0].checked)
- {
- if (fFoundText)
- {
- rngWorking.moveEnd("character" , -1);
- }
- while (0 != rngWorking.moveStart("textedit", -1))
- {
- }
- intDirection = -1 * rngWorking.text.length;
- }
- else
- {
- if (fFoundText)
- {
- rngWorking.moveStart("character", 1);
- }
- while (0 != rngWorking.moveEnd("textedit", 1))
- {
- }
- intDirection = rngWorking.text.length
- }
- rngFoundText = rngWorking.duplicate();
- success = rngFoundText.findText(txtFindText.value,
- intDirection, findFlags());
- if (!intDirection)
- {
- success = false;
- }
- if (!success)
- {
- if (fFrameset)
- {
- if (radDirection[0].checked)
- {
- if (prevDoc(docSearch) != docSearch)
- {
- txtFindText.docLastSearched = prevDoc(docSearch);
- if (txtFindText.docLastSearched != null)
- {
- btnFindClick();
- return;
- }
- else
- {
- alert(L_FinishedDocument_Text);
- return;
- }
- }
- }
- else
- {
- if (nextDoc(docSearch) != docSearch)
- {
- txtFindText.docLastSearched = nextDoc(docSearch);
- btnFindClick();
- return;
- }
- }
- }
- alert(L_FinishedDocument_Text);
- }
- else
- {
- if (fFrameset)
- {
- txtFindText.docLastFound.execCommand("Unselect", false);
- txtFindText.docLastFound = docSearch;
- }
- rngFoundText.select();
- rngFoundText.scrollIntoView(true);
- }
- }
- function loadBdy()
- {
- var docSearch = window.dialogArguments.unsecuredWindowOfDocument.document;
- var rng = docSearch.selection.createRange();
- btnFind.onclick = new
- Function("btnFindClick()");
- btnCancel.onclick = new Function("btnCancelClick()");
- document.onhelp = new Function("callHelp(window.event.srcElement)");
- document.onmouseup = new Function("mouseClick()");
- txtFindText.onkeyup = new Function("setFindState(true)");
- txtFindText.onfocus = new Function("txtFindText.select()");
- txtFindText.onkeypress = new Function("txtDefaultESC()");
- txtFindText.topDoc
- = window.dialogArguments.unsecuredWindowOfDocument.document;
- txtFindText.topIframeDoc
- = window.dialogArguments.unsecuredWindowOfDocument.document;
- txtFindText.docLastSearched = 0;
- txtFindText.docLastFound = txtFindText.topDoc;
- setFindState(false);
- }
- </SCRIPT>
- </HEAD>
- <BODY ID=bdy onLoad="loadBdy()" style="font-family: 'ms sans serif';
- font-size: '8pt'; background: threedface;" topmargin=0>
- <BUTTON id=btnFind ACCESSKEY=f DISABLED=1 tabIndex=55 helpid=50026
- helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 24.78em; top: 1.0647em; width: 7em; height: 2.1294em; " type=submit>
- <U>F</U>ind Next
- </BUTTON>
- <DIV align=absMiddle
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 0.98em; top: 1.2168em; width: 4.8em; height: 1.2168em; ">
- <LABEL FOR=txtFindText ID=lblFindText tabIndex=-1 helpid=50027
- helpfile="iexplore.hlp">
- Fi<U>n</U>d what:
- </LABEL>
- </DIV>
- <INPUT type=text id=txtFindText ACCESSKEY=n tabIndex=15 helpid=50027
- helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 6.16em; top: 1.0647em; width: 17.36em; height: 2.1294em; ">
- <BUTTON id=btnCancel tabIndex=60 helpid="0x6F1C" helpfile="windows.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 24.78em; top: 3.6504em; width: 7em; height: 2.1294em; " type=reset>
- Cancel
- </BUTTON>
- <INPUT id=chkWholeWord ACCESSKEY=w type=checkbox tabIndex=25
- helpfile="iexplore.hlp" helpid=50022
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 0.68em; top: 3.8588em; width: 1em; height: 1em; ">
- <INPUT ACCESSKEY=c type=checkbox tabIndex=35 helpid=50023
- helpfile="iexplore.hlp"
- id=chkMatchCase style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 0.68em; top: 5.684em; width: 1em;
- height: 1em; ">
- <DIV
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 2.6em; top: 4.2588em; width: 12.46em; height: 1.521em; ">
- <LABEL FOR=chkWholeWord ID=lblWholeWord tabIndex=-1 helpid=50022
- helpfile="iexplore.hlp">
- Match <U>w</U>hole word only
- </LABEL>
- </DIV>
- <DIV style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 2.6em; top: 6.084em; width: 7.42em; height: 1.521em; ">
- <LABEL FOR=chkMatchCase ID=lblMatchCase tabIndex=-1 helpid=50023
- helpfile="iexplore.hlp">
- Match <U>c</U>ase
- </LABEL>
- </DIV>
- <FIELDSET id=fldDirection style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 13.7em; top: 3.5em; width: 9.7em;
- height: 4.2em;">
- <LEGEND>
- Direction
- </LEGEND>
- </FIELDSET>
- <INPUT id=radDirectionUp type=radio name=radDirection ACCESSKEY=u
- tabIndex=42 helpid=50025 helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 14.26em; top: 5.1235em; width: 1em; height: 1em; ">
- <DIV style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 16.2em; top: 5.3235em; width: 3.5em;
- height: 1.521em; ">
- <LABEL style="font-family: 'ms sans serif'; font-size: '8pt'"
- FOR=radDirectionUp ID=lblDirectionUp
- tabIndex=45 helpid=50025
- helpfile="iexplore.hlp"> <U>U</U>p </LABEL>
- </DIV>
- <INPUT id=radDirectionDown type=radio CHECKED name=radDirection
- ACCESSKEY=d tabIndex=47 helpid=50024 helpfile="iexplore.hlp"
- style="font-family: ms sans serif; font-size: 8pt; position: absolute;
- left: 18.18em; top: 5.1235em; width: 1em; height: 1em; ">
- <DIV style="font-family: ms sans serif; font-size: 8pt;
- position: absolute; left: 20.1em; top: 5.3235em; width: 4.9em;
- height: 1.521em; ">
- <LABEL style="font-family: 'ms sans serif'; font-size: '8pt'"
- FOR=radDirectionDown helpid=50024 helpfile="iexplore.hlp"
- ID=lblDirectionDown tabIndex=50> <U>D</U>own </LABEL>
- </DIV>
- </BODY>
- </HTML>
-