var T="",F=["pics","news","vid","imdb","web","wiki"];
function go(){
T=document.location.href;
var i=T.indexOf("?n=");
if(i>0){
 var S=T.substring(i+3);
 T=unescape(S);
 if(T.length>3){
  document.getElementById("thecn").innerHTML=T;jsLinks();
//  document.getElementById("amazon").innerHTML="<iframe src='http://rcm.amazon.com/e/cm?t=celebritcom0b-20&o=1&p=8&l=st1&mode=books&search=\""+S+"\"&fc1=000000&lt1=&lc1=3366FF&bg1=FFFFFF&f=ifr' width=120 height=240 border=0 frameborder=0 scrolling=no></iframe>";
 }else nameClick();
}else nameClick();
}
var nClick=0;
function nameClick(){
if(nClick>0)return;
nClick=1;
document.getElementById("thecn").style.fontSize=11;
document.getElementById("thecn").innerHTML="<form name=f style='margin:0px;padding:0px'><textarea name=C rows=1 spellcheck=false style='font:bold 12pt Verdana;color:red;background-color:CCFFCC;text-align:center;text-transform:uppercase;width:160'>"+T+"</textarea></form>edit name and click links below";
//border:none;overflow:auto
jsLinks();
document.f.C.select();
document.f.C.focus();
document.getElementById("topbox").title="";
}
function jsLinks(){
for(var i=0;i<F.length;i++){
document.getElementById("L"+F[i]).target="";
document.getElementById("L"+F[i]).href="javascript:heynow('"+F[i]+"')";
}
}
function heynow(n){
var c=T;
if(nClick){
c=document.f.C.value;
//rid bad chars,or not
}
if(n=="pics")c="http://images.search.yahoo.com/search/images?p="+c;
//if(n=="pics")c="http://images.google.com/images?q=\""+c+"\"";
else if(n=="news")c="http://news.search.yahoo.com/news/search?p="+c;
else if(n=="vid")c="http://www.bing.com/videos/search?&view=grid&q="+c;
//else if(n=="vid")c="http://youtube.com/results?search_query="+c;
else if(n=="imdb"){
while(1){var goo=c.indexOf(" ");if(goo>-1)c=c.substring(0,goo)+"+"+c.substring(goo+1);else break;}
c="http://imdb.com/find?s=nm&q="+c;
}
else if(n=="web")c="http://www.bing.com/search?q="+c;
//else if(n=="web")c="http://www.google.com/search?q="+c;
else if(n=="wiki")c="http://en.wikipedia.org/wiki/Special:Search?search="+c;
parent.frames["arti"].location.href=c;
}
