function encode(str)
{ // Netscape fix thanks to Cyanide_7
 return escape(str.replace(/ /g,'+'));
}

function phpview(what)
{
 var height = screen.height;
 var width = screen.width;
 var leftpos = width / 2 - 50;
 var toppos = height / 2 - 50;
 var url = 'viewer.php?pic='+encode(what);
 top.viewerRef=window.open(url,'Podgl±d','scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=100,height=100,left=' + leftpos + ',top=' + toppos);
}

