function newWindow(pic,title,width,height) {
    var pic, title, width, height, winwidth, winheight;
    winwidth = width + 50;
    winheight = height + 80;
    var imageWindow;
    var toppy;
    var lefty;
    toppy = (screen.availHeight-winheight)/2;
    lefty = (screen.availWidth-winwidth)/2;
    imageWindow =window.open('','Fullsize','width='+winwidth+',height='+winheight+',top='+toppy+', left='+lefty);
    imageWindow.document.open();
    imageWindow.document.write('<?xml version="1.0" encoding="UTF-8"?>\n');
    imageWindow.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n');
    imageWindow.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n');
    imageWindow.document.write('<head>\n<base href="http://telrad.co.uk/" />\n<link rel="stylesheet" type="text/css" href="./css/image.css" /> \n<title>'+title+'</title>\n</head>\n<body>\n');
    imageWindow.document.write('<div><img src="./images_new/'+pic+'"  width="'+width+'" height="'+height+'" alt="'+title+'" /></div>\n<form action="none">\n<div><input type="button" value="Close Window" onclick="window.close()" /></div>\n</form>\n</body>\n</html>');
    imageWindow.document.close();
    imageWindow.focus();
}