function openwin(link, scroll, width, height)
{
  str = '"menubar=no,';
  if (scroll == "yes") str += ' scrollbars=yes,';
  str += ' width=' + width + ', height=' + height + '"';
  win = window.open(link, "", str);
  win.moveTo(screen.availWidth/2 - width/2, screen.availHeight/2 - height/2);
}

function show(el)
{
  document.all[el].style.visibility = 'visible';
}

function hide(el)
{
  document.all[el].style.visibility = 'hidden';
}

var timer;
function message(type)
{
//  if (event == undefined) event = window.event;

  var el = document.all['message'];
  var top = document.body.scrollTop + screen.availHeight/2 - 100;
//  var top = document.body.scrollTop + event.clientY - 10;
  el.style.top = top;
  el.style.left = screen.availWidth/2 - 100;
//  el.style.right = 100;

  if (type == 1) el.innerHTML = "ТОВАР ДОБАВЛЕН!";
  else el.innerHTML = "Товар временно отсутствует,<br>но Вы его можете заказать!";

  clearTimeout(timer);
  el.style.visibility = 'visible';
  timer = setTimeout("document.all['message'].style.visibility='hidden'", 2000);
}