home *** CD-ROM | disk | FTP | other *** search
- <SCRIPT LANGUAGE="JavaScript">
- var parentWin = external.menuArguments;
- 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;
- }
- }
-
- curlocation = "" + document.location;
- tmp = curlocation.split('/');
- newlocation = '';
- for (var i = 0; i + 1 < tmp.length; i++)
- newlocation = newlocation + tmp[i] + "/";
-
- newWin = top.window.open(newlocation + 'INTEGRATION_BAND_SEARCHBAR_HTML#' + searchtext, 'CopernicAgentSearch', 'toolbar=no,scrollbars=no,resizable=no,width=270,height=261');
- if (newWin.document.all.queryinp)
- newWin.document.all.queryinp.value = searchtext;
- }
- </SCRIPT>