function opendwin(descript,name) {
  fotowin=window.open(descript, name, "width=700,height=600,dependent,scrollbars,resizable,menubar,top=10,left=10");
  fotowin.focus();
}

function openwin(descript) {
  fotowin=window.open(descript, 'hint', "width=700,height=600,dependent,scrollbars,resizable,menubar,top=10,left=10");
  fotowin.focus();
}
function showpicture(descript) {
  fotowin=window.open(descript, 'hint', 'width=840,height=600,dependent,scrollbars,resizable,menubar,top=60,left=30');
  fotowin.focus();
}
function run() {}

function show(name) {
 o = document.all?document.all[name]:document.getElementById(name);
 o.style.display = (o.style.display=="block")?"none":"block";
}

function openWnd(url, width, height)
{
 width = width + 20;
 height = height + 25;

 if (height < screen.availHeight)
  params = 'height=' + height + ', width=' + width + ', scrollbars=0, status=0, resizeable=0';
 else
  params = 'height=' + (screen.availHeight - 40) + ', width=' + (width + 20) + ', scrollbars=1, status=0, resizeable=1';

 wnd = window.open(url, 'wnd', params);
 wnd.focus();
}

function openWnd_p(url, width, height)
{
  if(width < 400)
     width=width+300;
  else 
    width=width+100;
  height = height + 300;

 if (height < screen.availHeight)
  params = 'height=' + height + ', width=' + width + ', scrollbars=0, status=0, resizeable=0';
 else
  params = 'height=' + (screen.availHeight - 40) + ', width=' + (width + 20) + ', scrollbars=1, status=0, resizeable=1';

 wnd = window.open(url, 'wnd', params);
 wnd.focus();
}

function openWnd_newcd(alb_id)
{
  width = 560;
  height = 364;

 if (height < screen.availHeight)
  params = 'height=' + height + ', width=' + width + ', scrollbars=0, status=0, resizeable=0';
 else
  params = 'height=' + (screen.availHeight - 40) + ', width=' + (width + 20) + ', scrollbars=1, status=0, resizeable=1';

 wnd = window.open('http://www.avariya.ru/sms/newcd.php?alb_id='+alb_id, 'wnd', params);
 wnd.focus();
}
