home *** CD-ROM | disk | FTP | other *** search
- <HTML STYLE="font-family: arial; font-size: 8pt; width: 38em;
- height: 14em">
- <HEAD>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
- <TITLE id=dialogTitle>
- Zamie±
- </TITLE>
- <SCRIPT LANGUAGE="JavaScript" defer>
- var fFindEnabled = false;
- function callHelp()
- {
- var L_NoHelp_Text = "Brak dostΩpnego tematu pomocy.";
- var elm = window.event.srcElement;
- if (null != elm.helpid)
- {
- if ("btnCancel" != elm.id)
- {
- window.showHelp("iexplore.hlp", parseInt(elm.helpid));
- }
- else
- {
- window.showHelp("windows.hlp", parseInt(elm.helpid));
- }
- }
- }
- function btnCancelClick()
- {
- window.close();
- }
- function findFlags()
- {
- var htmlMatchWord = 2;
- var htmlMatchCase = 4;
- return (htmlMatchWord * document.all.chkWholeWord.checked)
- | (htmlMatchCase * document.all.chkMatchCase.checked)
- }
- function btnFindClick()
- {
- var L_FinishedDocument_Text = "Zako±czono przeszukiwanie dokumentu.";
- var docSearch = window.dialogArguments.document;
- var intDirection;
- var rngCurrent = docSearch.selection.createRange();
- var rngWorking = docSearch.body.createTextRange();
- var rngFoundText;
- var fFoundText = false;
- if ((docSearch.selection.type == "Text") ||
- (docSearch.selection.type == "None"))
- {
- fFoundText = (rngCurrent.text.toLowerCase()
- == txtFindText.value.toLowerCase());
- }
- if (radDirection[0].checked)
- {
- if (!fFoundText)
- {
- rngWorking.end = rngCurrent.end;
- }
- else
- {
- rngWorking.end = rngCurrent.end - 1;
- }
- intDirection = rngWorking.start - rngWorking.end
- }
- else
- {
- if (!fFoundText)
- {
- rngWorking.start = rngCurrent.start;
- }
- else
- {
- rngWorking.start = rngCurrent.start + 1;
- }
- intDirection = rngWorking.end - rngWorking.start
- }
- rngFoundText = rngWorking.duplicate();
- success = rngFoundText.findText(txtFindText.value, intDirection, findFlags());
- if (!success)
- {
- alert(L_FinishedDocument_Text);
- }
- else
- {
- rngFoundText.select();
- rngFoundText.scrollIntoView(true);
- }
- }
- function defaultActions()
- {
- var htmlKeyReturn = 13;
- var htmlKeyEscape = 27;
- if ((event.keyCode) == htmlKeyReturn)
- {
- if (!btnFind.disabled)
- {
- btnFindClick();
- btnFind.focus();
- }
- }
- else if ((event.keyCode) == htmlKeyEscape)
- {
- btnCancelClick();
- }
- }
- function setFindState()
- {
- if (("" == txtFindText.value) == fFindEnabled)
- {
- btnFind.disabled = !btnFind.disabled;
- btnReplace.disabled = !btnReplace.disabled;
- btnReplaceAll.disabled = !btnReplaceAll.disabled;
- fFindEnabled = !fFindEnabled;
- }
- }
- function btnReplaceAllClick()
- {
- var docSearch = window.dialogArguments.document;
- var L_FinishedReplaceAll_Text = "Zako±czono zamianΩ wszystkich";
- var rngFindText;
- var intDocEnd;
- rngFindText = docSearch.body.createTextRange();
- intDocEnd = rngFindText.end;
- success = rngFindText.findText(txtFindText.value, 0, findFlags());
- while (success)
- {
- rngFindText.text = txtReplaceText.value;
- rngFindText.end = intDocEnd;
- rngFindText.findText(txtFindText.value, 0, findFlags());
- }
- alert(L_FinishedReplaceAll_Text);
- }
- function btnReplaceClick()
- {
- var docSearch = window.dialogArguments.document;
- var rngWorking = docSearch.selection.createRange();
- if (txtFindText.value == rngWorking.text)
- {
- rngWorking.text = txtReplaceText.value;
- }
- btnFindClick();
- }
- function loadBdy()
- {
- var docSearch = window.dialogArguments.document;
- var rng = docSearch.selection.createRange();
- btnFind.onclick = new Function("btnFindClick()");
- btnCancel.onclick = new Function("btnCancelClick()");
- btnReplace.onclick = new Function("btnReplaceClick()");
- btnReplaceAll.onclick = new Function("btnReplaceAllClick()");
- document.onhelp = new Function("callHelp()");
- document.onkeypress = new Function("defaultActions()");
- txtFindText.onkeyup = new Function("setFindState()");
- txtFindText.onfocus = new Function("txtFindText.select()");
- txtReplaceText.onfocus = new Function("txtReplaceText.select()");
- txtFindText._enabled = false
- if ("Text" == docSearch.selection.type)
- {
- if (16 > rng.text.length)
- {
- txtFindText.value = rng.text;
- txtFindText.select();
- }
- }
- setFindState();
- }
- </SCRIPT>
- </HEAD>
- <BODY ID=bdy onLoad="loadBdy()" style="font-family: arial;
- font-size: 8pt; background: buttonface;">
- <DIV align=absMiddle style="font-family: arial; font-size: 8pt;
- position: absolute; LEFT: 1em; TOP: 1.3em; WIDTH: 8em; HEIGHT: 1em;">
- <LABEL FOR=txtFindText ID=lblFindText>
- Z<U>n</U>ajdƒ:
- </LABEL>
- </DIV>
- <DIV align=absMiddle style="font-family: arial; font-size: 8pt;
- position: absolute; LEFT: 1em; TOP: 3.8em; WIDTH: 8em; HEIGHT: 1em;">
- <LABEL FOR=txtReplaceText ID=lblReplaceText>
- Za<U>m</U>ie± na:
- </LABEL>
- </DIV>
- <INPUT type=text id=txtFindText ACCESSKEY="n" tabIndex=5
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 7.2em; TOP: 1em; WIDTH: 19.5em; HEIGHT: 2.1em">
- <INPUT type=text id=txtReplaceText ACCESSKEY="m" tabIndex=8
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 7.2em; TOP: 3.5em; WIDTH: 19.5em; HEIGHT: 2.1em">
- <BUTTON id=btnFind ACCESSKEY="Z" DISABLED=1 tabIndex=60
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 27.7em; TOP: 1em; WIDTH: 10em; HEIGHT: 2.3em">
- <U>Z</U>najdƒ nastΩpny
- </BUTTON>
- <BUTTON id=btnReplace ACCESSKEY="a" DISABLED=1 tabIndex=65
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 27.7em; TOP: 3.7em; WIDTH: 10em; HEIGHT: 2.3em">
- <U></U>Z<u>a</u>mie±
- </BUTTON>
- <BUTTON id=btnReplaceAll ACCESSKEY="s" DISABLED=1 tabIndex=70
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 27.7em; TOP: 6.2em; WIDTH: 10em; HEIGHT: 2.3em">
- Zamie± w<u>s</u>zystko <U></U>
- </BUTTON>
- <BUTTON id=btnCancel tabIndex=75
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 27.7em; TOP: 8.7em; WIDTH: 10em; HEIGHT: 2.3em">
- Anuluj
- </BUTTON>
- <INPUT id=chkWholeWord type=checkbox ACCESSKEY="c" tabIndex=40
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 1em; TOP: 7.6em; WIDTH: 1em; HEIGHT: 1em">
- <INPUT id=chkMatchCase type=checkbox ACCESSKEY="w" tabIndex=45
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 1em; TOP: 9.4em; WIDTH: 1em; HEIGHT: 1em">
- <DIV style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 3em; TOP: 8em; WIDTH: 20em; HEIGHT: 1.3em">
- <LABEL FOR=chkWholeWord id=lblWholeWord tabIndex="-1">
- Znajdƒ tylko <U>c</U>a│e wyrazy
- </LABEL>
- </DIV>
- <DIV style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 3em; TOP: 9.8em; WIDTH: 20em; HEIGHT: 1em">
- <LABEL FOR=chkMatchCase id=lblMatchCase tabIndex="-1">
- UwzglΩdniaj <U>w</U>ielko£µ liter
- </LABEL>
- </DIV>
- <TABLE cellspacing cellPadding=7 borderColorDark=buttonhighlight
- borderColorLight=buttonshadow border=1 noshade="yes"
- style="font-family: arial; font-size: 8pt; position: absolute;
- LEFT: 16.5em; TOP: 7.5em; WIDTH: 9.5em; HEIGHT: 4.2em">
- <TR>
- <TD style="font-family: arial; font-size: 8pt;
- width: 6.4em; height: 2em;">
- <DIV style="color: buttonface">w</DIV>
- </TD>
- </TR>
- </TABLE>
- <INPUT id=radDirectionUp type=radio name=radDirection ACCESSKEY="G"
- tabIndex=50
- style="position: absolute;font-family: arial; font-size: 8pt;
- top: 9em; left: 17em; width: 1em; height: 1em;">
- <DIV style="position: absolute;font-family: arial;
- font-size: 8pt;top: 9.2em; left: 19em; width: 2em; height: 2em;">
- <LABEL FOR=radDirectionUp id=lblDirectionUp tabIndex="-1"
- STYLE="font-family: arial; font-size: 8pt"> <U>G</U>óra </LABEL>
- </DIV>
- <INPUT id=radDirectionDown type=radio CHECKED name=radDirection
- ACCESSKEY="d" tabIndex=55
- style="position: absolute;font-family: arial; font-size: 8pt;
- top: 9em; left: 21.75em; width: 1em; height: 1em;">
- <DIV style="position: absolute;font-family: arial;
- font-size: 8pt;top: 9.2em; left: 23.75em; width: 3em; height: 1em;">
- <LABEL FOR=radDirectionDown id=lblDirectionDown tabIndex="-1"
- STYLE="font-family: arial; font-size: 8pt"> <U>D</U>ó│ </LABEL>
- </DIV>
- <DIV style="font-family: arial; font-size: 8pt; position: absolute;
- background: buttonface; HEIGHT: 1em; LEFT: 17em; TOP: 7em; WIDTH: 4.1em">
- <LABEL id=lblDirection tabIndex="-1" STYLE="font-family: arial;
- font-size: 8pt;">
- Kierunek </LABEL>
- </DIV>
- </BODY>
- </HTML>
-