var over_menu = 0;

function Turn(id, mode)
{
var time=100;
  if(mode)
   setTimeout("On("+ id+ ");",time);
  else{
  over_menu = 0;
   setTimeout("Off("+ id+ ");",time);
   }
}

function On(id)
{
  document.getElementById('smenu' + id).style.visibility = "visible";
}

function Off(id)
{
  if(over_menu==0)
    {
    document.getElementById('smenu'+ id).style.visibility = "hidden";
	    }
}
/* добавить в избранное */
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;
}
/* popap */
function open_win(win_file) {
var t=Math.floor(Math.random()*10000) + 1
window.open(win_file, 's'+t, 'resizable=yes,width=280,height=100,toolbar=no,scrollbars=no,location=no,menubar=no,status=no')
}
