<!--
function tooltip(text) {
  //window.event.cancelBubble=true;
  txt="<div style='background-color: #EEEEEE; border-bottom: 1px solid #C0C0C0; padding: 2px'>Информация: <div style='padding-left: 10px; line-height: 16px' nowrap>"+text+"</div></div>";

  openfloatmenu(txt);
  return false;
}

function hidetooltip() {
  window.event.cancelBubble=true;
  hidefloatmenu();
  return false;
}

function replace_string(txt,cut_str,paste_str){
  var f=0;
  var ht='';
  ht = ht + txt;
  f=ht.indexOf(cut_str);

  while (f!=-1){
    f=ht.indexOf(cut_str);
    if (f>0){ ht = ht.substr(0,f) + paste_str + ht.substr(f+cut_str.length); };
  };
  return ht
};

function hidemenu(id) {
  obj=new lib_obj(id)
  obj.hideIt();
}

function showfloat(id) {
  obj=new lib_obj(id)
  obj.showIt();
}

function openpic(cat,num)
{
  open("/mod_gallery/viewpic.php?num=" + num + "&cat=" + cat,"_blank","toolbar=no, scrollbars=yes");
}

function openmessenger(flag,userid)
{
  x=(screen.width-700)/2
  y=(screen.height-600)/2

  if (flag) open("/messenger/index.php?unread=true" , "messenger" , "menubar=no, toolbar=no, width=700, height=510, status=yes, resizable=no, top="+y+", left="+x);
  if (userid) open("/messenger/write.php?rec="+userid , "messenger" , "menubar=no, toolbar=no, width=700, height=510, status=yes, resizable=no, top="+y+", left="+x);
  if (!flag && !userid) open("/messenger/index.php" , "messenger" , "menubar=no, toolbar=no, width=700, height=510, status=yes, resizable=no, top="+y+", left="+x);
}

function bclose()
{
  x=(screen.width-240)/2
  y=(screen.height-345)/2

  open("/admin/auth.php?destroy=true" , "authlogout" , "menubar=no, toolbar=no, width=240, height=255, status=yes, resizable=no, top="+y+", left="+x);
}

function openpiccat(picname)
{
  picn = "/mod_xcat/viewpic.php?filenum=" + picname;
  x=(screen.width-700)/2
  y=(screen.height-600)/2
  eval('open(picn , "222" , "menubar=no, toolbar=no, width=700, height=510, status=yes, resizable=no, top=' + y + ', left=' + x + '")');
}

function PopUp(url, W, H) {
	W+=0;
	H+=0;
	var size="width="+W+",height="+H;
	window.open(url,"","status=no,scrollbars=no,resizable=yes,"+size);
	return false;
}

//-->