function OpenImage(src, alt)
{
  image = window.open('','image','left=50, top=50, width=400, height=400, toolbar=no, menubar=no, status=no, resizable=no, scrollbars=no');
  image.focus();
  image.document.write('<html><head><title>' + alt + '</title>');
  image.document.write('<script language="javascript"> function FitPic() { iWidth = document.body.clientWidth; iHeight = document.body.clientHeight; iWidth = document.images[0].width - iWidth; iHeight = document.images[0].height - iHeight; window.resizeBy(iWidth, iHeight); self.focus(); } </script>');
  image.document.write('</head><body onload="FitPic();" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" align="center"><a href="javascript: window.close();"><img src="'+src+'" alt="'+alt+'" border="0" /></a></body></html>');
  image.document.close();
}

function OpenPage(url,width,height)
{
    var left = Math.round(screen.width/2-width/2);
    var top = Math.round(screen.height/2-height/2);

    window.open(url,'','left='+left+', top='+top+', menubar=no, toolbar=no, width='+width+', height='+height+', resizable=no, scrollbars=no, status=no');
}
