function doit(){document.forms[0].q.onkeyup=function(){ hints(); };document.forms[0].onsubmit=function(){ go(document.getElementById('q').value,a); return false; };document.body.onclick=function(){ document.forms[0].q.focus(); };document.body.ondblclick=function(){ document.forms[0].q.select(); };hints();document.forms[0].q.focus();}
var cp=[];var rcmds='';var goBack=function(c){var q=document.forms[0].q;c=c.split(',');var regex=new RegExp(cp.join('([.]|[ ])')+'([.]|[ ])','g');c[c.length-1]=null;q.value=q.value.replace(regex,c.join(' '));hints();q.focus();}
var hints=function(val){var hd=document.getElementById('hints');var v=document.forms[0].q.value;var ob=a;var command='';var ret='';var halted=false;var commandPath=[];var cmds='';for(var i=0; c=v.charAt(i); i++){if(c!=' ' && c!='.'){command+=c;}
if((c==' ' || c=='.') && ob[command] && command.indexOf('$')==-1){ob=ob[command];commandPath.push(command);cp=commandPath;if(ob.$d)
ret+='<a onclick="goBack(\''+commandPath+'\'); return false;" href="" class="active">'+ob.$d+'</a>';if(ob.$i)
document.body.style.backgroundImage='url('+(ob.$i.indexOf('http://')<0?'http://':'')+ob.$i+')';command='';}
else if((c==' ' || c=='.') && (!ob[command] || command.indexOf('$')==0)) {halted=true;break;}
else if(ob[command] && i==v.length-1 && command.indexOf('$')==-1) {ob=ob[command];commandPath.push(command);if(ob.$d)
ret+='<b>'+ob.$d+'</b>';}}

for(var i in ob){if(i.indexOf('$')==-1){if(command && i.indexOf(command)>-1){cmds+='<a href="" title="'+ob[i].$d+'" onclick="return sl(this.innerHTML);">'+i+'</a>';}
else if(!halted && command || !command){cmds+='<a href="" title="'+ob[i].$d+'" onclick="return sl(this.innerHTML);">'+i+'</a>';}}}
if(!ret && !cmds)
ret='<b class="active">'+a.$d+'</b>';if(ob.$i)
document.body.style.backgroundImage='url('+(ob.$i.indexOf('http://')<0?'http://':'')+ob.$i+')';hd.innerHTML=ret+cmds+'<a title="Add New Alias" href=/a/?path='+commandPath.join('.')+'>+</a>';}
var sl=function(l){var q=document.forms[0].q;if(q.value.charAt(q.value.length-1)!=' ' && q.value)
q.value+=' '+l;else q.value+=l+' ';hints();q.focus();return false;}
var a={$d:'google',$i:'taguno.com/l.gif',$:'google.com/search?q={q}',a:{$d:'ask.com',$i:'sp.ask.com/sh/i/h/logo_ask.gif',$:'www.ask.com/web?q={q}'},al:{$d:'alexa ranking',$i:'client.alexa.com/common/images/alexa.gif',$:'alexa.com/data/details/traffic_details?url={q}'},c:{$d:'craig\'s list',dc:{$d:'washington dc',$:'washingtondc.craigslist.org/search/sss?query={q}'},sf:{$d:'san francisco bay',$:'sfbay.craigslist.org/search/sss?query={q}'},ny:{$d:'new york',$:'newyork.craigslist.org/search/sss?query={q}'}},d:{$d:'dictionary',$i:'cache.lexico.com/g/d/dictionary_logo.gif',$:'dictionary.reference.com/browse/{q}'},dn:{$d:'dnsstuff',$:'http://www.dnsstuff.com/',w:{$d:'whois',$:'dnsstuff.com/tools/whois.ch?ip={q}'},t:{$d:'tracert',$:'dnsstuff.com/tools/tracert.ch?ip={q}'},p:{$d:'ping',$:'dnsstuff.com/tools/ping.ch?ip={q}'}},dg:{$d:'digg',$i:'digg.com/img/badges/32x32-digg-guy.gif',$:'digg.com/search?s={q}',f:{$$:'area=promoted',$d:'front page'}},e:{$d:'ebay',$i:'pics.ebaystatic.com/aw/pics/logos/logoEbay_150x70.gif',$:'search.ebay.com/search/search.dll?satitle={q}',m:{$d:'motors',$i:'pics.ebaystatic.com/aw/pics/motors/home/imgFrMotorsLogo_129X34.gif',$:'motors.search.ebay.com/{q}'}},f:{$d:'flickr',$i:'flickr.com/images/flickr_logo_gamma.gif.v1.2',$:'flickr.com/search/?q={q}',i:{$d:'interesting images',$$:'s=int'}},g:{$d:'google',$i:'www.google.com/intl/en/images/logo.gif',$:'google.com/search?q={q}',i:{$d:'images',$i:'www.google.com/intl/en_ALL/images/images_hp.gif',$:'images.google.com/images?q={q}',s:{$d:'small',$$:'imgsz=icon'},m:{$d:'medium',$$:'imgsz=small|medium|large|xlarge'},l:{$d:'large',$$:'imgsz=xxlarge'}/*,f:{$d:'face finder',$$:'restrict=imageportrait'}*/},f:{$d:'finance',$:'finance.google.com/finance?q={q}'},t:{$d:'trends',$:'google.com/trends?q={q}'},m:{$d:'maps',$:'maps.google.com/maps?q={q}'},n:{$d:'news',$:'news.google.com/news?q={q}'},v:{$d:'video',$:'video.google.com/videosearch?q={q}'}},i:{$d:'imdb',$i:'ia.imdb.com/media/imdb/01/I/03/29/59.gif',$:'imdb.com/find?q={q}',t:{$d:'title',$$:'s=tt'},tv:{$d:'tv shows',$$:'s=ep'},n:{$d:'names',$$:'s=nm'},c:{$d:'companies',$$:'s=co'},ch:{$d:'characters',$:'imdb.com/Find?select=Characters&for={q}'}},m:{$d:'msn',$i:'stc.msn.com/br/hp/en-us/css/2/decoration/msn_b.gif',$:'search.msn.com/results.aspx?q={q}',i:{$d:'images',$:'search.msn.com/images/results.aspx?q={q}'},n:{$d:'news',$:'search.msn.com/news/results.aspx?q={q}'}},t:{$d:'thesaurus',$i:'cache.lexico.com/g/t/thesaurus_logo.gif',$:'thesaurus.reference.com/browse/{q}'},y:{$d:'yahoo',$i:'us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif',$:'http://search.yahoo.com/search?p={q}',a:{$d:'audio',$:'audio.search.yahoo.com/search/audio?p={q}'},i:{$d:'images',$:'images.search.yahoo.com/search/images?p={q}'},f:{$d:'finance',$:'finance.yahoo.com/q?s={q}'},m:{$d:'maps',$:'maps.yahoo.com/maps_result?addr={q}'},n:{$d:'news',$:'news.search.yahoo.com/search/news?p={q}'},v:{$d:'video',$:'video.search.yahoo.com/search/video?p={q}'}},yt:{$d:'youtube',$i:'youtube.com/img/logo_tagline_sm.gif',$:'youtube.com/results?search_query={q}'},w:{$d:'wikipedia',$i:'upload.wikimedia.org/wikipedia/meta/2/2a/Nohat-logo-nowords-bgwhite-200px.jpg',$:'en.wikipedia.org/w/index.php?title=Special%3ASearch&search={q}'},we:{$d:'weather.com',$i:'image.weather.com/web/common/banners/summer/homepage.jpg',$:'weather.com/weather/local/{q}'}}
var getCookie=function(c_name){if (document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=")
if (c_start!=-1){c_start=c_start+c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end)).replace(/\+/g,' ').replace(/&amp;/g,'&');}}
return '';}
var E=function(o,n){for(var i in n){var p=n[i];if(typeof(p)=='object' && !p.length && o[i])E(o[i],p);else o[i]=n[i];}}
var C=getCookie('aliases');if(C.length>0) eval(C);if(typeof(A)=='object') E(a,A);var go=function(q,ob){var $=ob.$;var $$='';var qp='';var qq='';var qs='';var command='';var lastindex=0;for(var i=0; c=q.charAt(i); i++){if(c!=' ' && c!='.')
command+=c;if((c==' ' || c=='.')){if(ob[command] && command.indexOf('$')==-1){ob=ob[command];command='';lastindex=i+1;if(ob.$)
$=ob.$;if(ob.$$)
$$+='&'+ob.$$;if(ob.$p)
qp+=ob.$p;if(ob.$s)
qs+=ob.$s;}
else break;}}
for(i=lastindex; c=q.charAt(i); i++)
qq+=c;var loc=($.indexOf('http://')<0?'http://':'')+$.replace('{q}',encodeURIComponent(qp+qq+qs).replace(/\+/g,'%2B').replace(/%20/g,'+'))+$$;window.location=loc;}
if(Q=location.search.split('q=')[1]) go(decodeURIComponent(Q.replace(/\+/g,'%20')),a);
