function open_picture_window(location,picWidth,picHeight,comment) 
{
picWidth = 600;
picHeight = 600;

var closeMsg = "close"; 
if (picWidth < 100) {picWidth = 100} if (picHeight < 100) {picHeight = 100} availHeight = screen.height; 
availWidth = screen.width; if (availHeight < picHeight) {posTop = 0;
} 
else {posTop = (availHeight - picHeight)/5;
} 
if (availWidth < picWidth) {posLeft = 0;
} 
else 
{
posLeft = (availWidth - picWidth)/10;
}

picfile = new Image(); 
picfile.src =(location);
picWidth = picfile.width;
picHeight = picfile.height;

var scrollbar = 0;

if (picWidth > 601)
{
scrollbar = 1;
}

if (picHeight > 601)
{
scrollbar = 1;
}


atts = "width=600,height=600,directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,top=" + posTop + ",left=" + posLeft;
win4Pic = window.open('','win4Pic',atts);
win4Pic.document.open();
win4Pic.document.write("<html><head><title>" + comment + "</title><meta http-equiv='Content-Type' content='text/html; charset=windows-1250'></head><body marginwidth='0' marginheight='0' leftmargin='0' topmargin='0' onLoad='self.focus()' onBlur='self.close();' bgcolor='#009966'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'><tr><td align='center' valign='middle'><a href='#' onClick='self.close()'><img src='" + location + "' border='0' alt='" + closeMsg + "'></a></td></tr></table></body></html>");
win4Pic.document.close();
}

