

nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false;

function new_window(url, page_title, win_width, win_height)
{
if (nn4 || ie4 || nn6)
{
pos_x = Math.round((screen.width - win_width) / 2);
pos_y = Math.round((screen.height - win_height) / 2);
pos_code = (nn4 || nn6)? 'screenX='+pos_x+',screenY='+pos_y : 'left='+pos_x+',top='+pos_y;
}
else
{
posCode = '';
}
foto = window.open('','_blank','menubar=no,toolbar=no,scrollbars=yes,status=no,width='+718+',height='+700+','+pos_code);
foto.document.open();
foto.document.write('<html><head><title>'+page_title+'</title></head>');
foto.document.write('<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>');
foto.document.write('<a href="#" onclick="window.close()"><img src="'+url+'" width="'+win_width+'" height="'+win_height+'" alt="'+page_title+'" border="0" /></a></body></html>');
foto.document.close();
foto.focus();
}
function picwin(url, page_title, win_width, win_height)
{
var w = win_width +20; h = win_height;
if (nn4 || ie4 || nn6)
{
pos_x = Math.round((screen.width - win_width) / 2);
pos_y = Math.round((screen.height - win_height) / 2);
pos_code = (nn4 || nn6)? 'screenX='+pos_x+',screenY='+pos_y : 'left='+pos_x+',top='+pos_y;
}
else
{
posCode = '';
}
foto = window.open('','_blank','menubar=no,toolbar=no,scrollbars=yes,statusbar=no,width='+w+',height='+h+','+pos_code);
foto.document.open();
foto.document.write('<html><head><title>'+page_title+'</title></head>');
foto.document.write('<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>');
foto.document.write('<a href="#" onclick="window.close()"><img src="'+url+'" width="'+win_width+'" height="'+win_height+'" alt="'+page_title+'" border="0" /></a></body></html>');
foto.document.close();
foto.focus();
}
