home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2005 February
/
PCWorld_2005-02_cd.bin
/
software
/
vyzkuste
/
copernic
/
copernicdesktopsearch.exe
/
$R0
/
3084
/
HTML
/
SEARCHEXT
< prev
Wrap
Text File
|
2004-12-07
|
2KB
|
59 lines
<SCRIPT LANGUAGE="JavaScript">
var parentWin = external.menuArguments;
var browserlocation = top.window.location.href.toLowerCase();
var S;
var EndPos = 0;
if (parentWin)
{
var el = parentWin.event.srcElement;
var tag = el.tagName;
var doctxt = parentWin.document.body.createTextRange();
var searchtext = "";
switch (tag) {
case "A":
searchtext = el.innerText;
break;
case "IMG":
searchtext = el.alt;
break;
case "INPUT":
case "TEXTAREA":
if (el.type == "image")
searchtext = el.alt
else if (el.type != "radio") {
searchtext = parentWin.document.selection.createRange().text;
if (searchtext == "")
searchtext = el.createTextRange().text;
}
break;
}
if (searchtext == "") {
searchtext = parentWin.document.selection.createRange().text;
if (searchtext == "") {
doctxt.moveToPoint(parentWin.event.clientX, parentWin.event.clientY);
doctxt.moveStart("word", 1);
doctxt.moveStart("word", -1);
doctxt.moveEnd("word", -1);
doctxt.moveEnd("word", 1);
searchtext = doctxt.text;
}
}
S = 'res://CopernicMeta.dll/';
if (browserlocation.search('res://') == 0)
{
EndPos = browserlocation.search('html/searchext');
if (EndPos > 0)
{
S = browserlocation.substr(0, EndPos);
}
}
top.window.open(S + '/SearchBar_htm#' + searchtext, 'CopernicMetaSearch', 'toolbar=no, scrollbars=yes,resizable=yes, width=270,height=500', false);
}
</SCRIPT>