[$] Pr1v473 xHeEl B4ckD00RzZ [$]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style/editor.css" rel="stylesheet" type="text/css">
<script>
var sLangDir=parent.oUtil.langDir;
document.write("<scr"+"ipt src='language/"+sLangDir+"/search.js'></scr"+"ipt>");
</script>
<script>writeTitle()</script>
<script>
function bodyOnLoad()
{
loadTxt();
var oEditor=openerWin.idSource;
oEditor.focus();
inpSearch.focus();
}
function doSearch()
{
var oEditor=openerWin.idSource;
oEditor.focus();
var oSel=oEditor.document.selection.createRange();
if(chkMatchCase.checked && chkMatchWord.checked) sType=6;
else if(chkMatchCase.checked) sType=4;
else if(chkMatchWord.checked) sType=2;
else sType=0;
oSel.collapse(false)
if(oSel.findText(inpSearch.value,1000000000,sType)) oSel.select();
else
{
if(confirm(getTxt("Finished searching")))
{
oSel.expand("textedit");
oSel.collapse("true");
oSel.select();
doSearch();
}
}
}
function doReplace()
{
var oEditor=openerWin.idSource;
var oSel=oEditor.document.selection.createRange();
if(oSel.text.toLowerCase()==inpSearch.value.toLowerCase())
{
oSel.text=inpReplace.value;
doSearch();
}
else
{
doSearch();
}
}
var nReplaced=0;
function doReplaceAll()
{
var oEditor=openerWin.idSource;
oEditor.focus();
var oSel=oEditor.document.selection.createRange();
if(chkMatchCase.checked && chkMatchWord.checked) sType=6;
else if(chkMatchCase.checked) sType=4;
else if(chkMatchWord.checked) sType=2;
else sType=0;
oSel.expand("textedit");
oSel.collapse("true");
oSel.select();
if(oSel.findText(inpSearch.value,1000000000,sType))
{
oSel.select();
oSel.text=inpReplace.value;
nReplaced++;
oSel.select();
doReplaceAll2();
}
else
{
alert(nReplaced+" occurrence(s) replaced.");
nReplaced=0;
return;
}
}
function doReplaceAll2()
{
var oEditor=openerWin.idSource;
oEditor.focus();
var oSel=oEditor.document.selection.createRange();
if(chkMatchCase.checked && chkMatchWord.checked) sType=6;
else if(chkMatchCase.checked) sType=4;
else if(chkMatchWord.checked) sType=2;
else sType=0;
oSel.collapse(false)
if(oSel.findText(inpSearch.value,1000000000,sType))
{
oSel.select();
oSel.text=inpReplace.value;
nReplaced++;
oSel.select();
doReplaceAll2();
}
else
{
alert(nReplaced+" occurrence(s) replaced.");
nReplaced=0;
return;
}
}
function doKeyUp()
{
if(inpSearch.value=="")
{
btnSearch.disabled=true;
btnReplace.disabled=true;
btnReplaceAll.disabled=true;
}
else
{
btnSearch.disabled=false;
btnReplace.disabled=false;
btnReplaceAll.disabled=false;
}
}
</script>
</head>
<body style="overflow:hidden;">
<table width=100% height=100% align=center cellpadding=0 cellspacing=0>
<tr>
<td valign=top style="padding:5;height:100%">
<table width=100%>
<tr>
<td nowrap><span id="txtLang" name="txtLang">Search</span>:</td>
<td width="100%">
<INPUT type="text" name="inpSearch" onkeyup="doKeyUp()" style="width:100%" class="inpTxt">
</td>
<td>
<input type=button name=btnSearch id=btnSearch disabled value="search next" onclick="doSearch()" style="width:90px" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
</td>
</tr>
<tr>
<td nowrap><span id="txtLang" name="txtLang">Replace</span>:</td>
<td width="100%">
<input type="text" name="inpReplace" style="width:100%" class="inpTxt">
</td>
<td>
<input type=button name=btnReplace id=btnReplace disabled value="replace" onclick="doReplace()" style="width:90px" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
</td>
</tr>
<tr>
<td nowrap colspan="2">
<input type="checkbox" name="chkMatchCase" class="inpChk"> <span id="txtLang" name="txtLang">Match case</span>
<input type="checkbox" name="chkMatchWord" class="inpChk"> <span id="txtLang" name="txtLang">Match whole word</span>
</td>
<td>
<input type=button name=btnReplaceAll id=btnReplaceAll disabled value="replace all" onclick="doReplaceAll()" style="width:90px" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
</td>
</tr>
<tr>
<td colspan="2">
</td>
<td>
<input type=button name=btnClose id=btnClose value="close" onclick="self.closeWin()" style="width:90px" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>