function addBookmark(url, title)
{
  if (!url) url = location.href;
  if (!title) title = document.title;
  
  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, "");
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;
  
  return true;
}




function urlencode(text)
{
  var trans = [];
  for (var i=0x410; i<=0x44F; i++) trans[i] = i-0x350;
  trans[0x401] = 0xA8;
  trans[0x451] = 0xB8;
  var ret = [];
  for (var i=0; i<text.length; i++)
  {
    var n = text.charCodeAt(i);
    if(typeof trans[n] != 'undefined') n = trans[n];
    if(n <= 0xFF) ret.push(n);
  }
  return escape(String.fromCharCode.apply(null,ret));
}


function ssearch()
{
var word = 	document.getElementById('searchword').value;

word = urlencode(word);

self.location.href='/do_search/'+ word;
}
