<script language="JavaScript">
//Script written by Sammy
var p;
//若想使用中弹出窗口,去除下一行的注释--删去“//”
//p='gb';
var sel;
var site=document.location.hostname;
var enc;
var c;
frame_sel(top);
if (!sel) {
c=document.charset;
switch (p) {
case 'gb': sel=prompt('请输入你想在 “http://'+site+'” 搜索的关键词:','');break;
default: sel=prompt('Enter the keyword to search at "http://'+site+'":','');
}
}
if (sel) {
if (c!="utf-8")
sel=urlencode(sel);
else
sel=window.encodeURIComponent(sel);
sel='http://www.google.com/search?q='+sel+'+site%3A'+site+'&ie='+c;
window.open(sel,'_blank');
} else {
top.status='No keyword to search!';
setTimeout("top.status='';",3000);
}
function frame_sel(win) {
var doc=win.document;
var frms=win.frames;
sel=doc.selection.createRange().text;
c=doc.charset;
if (!sel && frms.length>0) {
for (var i=0;i<frms.length;i++) {
try{
var doc_frame=frms;
frame_sel(doc_frame);
} catch(e) {}
}
}
}