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(db, photo, text, w, h)
{
  var el = document.all['img_win'];
  var top = document.body.scrollTop + screen.availHeight/2 - h/2 - 100;

  if (top < 0) top = 0;
  el.style.top = top;
  el.style.left = screen.availWidth/2 - w/2;
  el.style.visibility = 'visible';

  img.src = 'img/1x1.gif';
  img.width = w;
  img.height = h;
  img.src = 'img.php?db=' + db + '&pic=' + photo + '&text=' + text + '&w=' + w;
}

function hide()
{
  document.all['img_win'].style.visibility = 'hidden';
  img.src = 'img/1x1.gif';
}



var n = new Array();
n0 = new Image(14, 20); n0.src = "img/n0.gif";
n1 = new Image(14, 20); n1.src = "img/n1.gif";
n2 = new Image(14, 20); n2.src = "img/n2.gif";
n3 = new Image(14, 20); n3.src = "img/n3.gif";
n4 = new Image(14, 20); n4.src = "img/n4.gif";
n5 = new Image(14, 20); n5.src = "img/n5.gif";
n6 = new Image(14, 20); n6.src = "img/n6.gif";
n7 = new Image(14, 20); n7.src = "img/n7.gif";
n8 = new Image(14, 20); n8.src = "img/n8.gif";
n9 = new Image(14, 20); n9.src = "img/n9.gif";

function time()
{
  var date = new Date();
  var hour = date.getHours();
  var minute = date.getMinutes();

  hour = hour.toString();
  minute = minute.toString();
  if (hour < 10) hour = 0 + hour;
  if (minute < 10) minute = 0 + minute;

  document.all['h1'].src = eval('n' + hour.substring(0,1) + '.src');
  document.all['h2'].src = eval('n' + hour.substring(1,2) + '.src');
  document.all['m1'].src = eval('n' + minute.substring(0,1) + '.src');
  document.all['m2'].src = eval('n' + minute.substring(1,2) + '.src');

  setTimeout("time()", 1000);
}