Tenías un par de fallitos (no habías cerrado el body y la función debe estar antes del elemento que la llama). Prueba con esto: Código PHP:
<script>
var win;
win = window.open('', 'POPUP' , 'resizable=no, scrollbars=no, status=yes');
var x = 425;
var y = 390;
win.resizeTo(x, y);
win.moveTo((screen.width - x)/2, (screen.height - y)/2);
win.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
win.document.write("<html>");
win.document.write("<head>");
win.document.write("<meta content=\"text/html; charset=iso-8859-1\" http-equiv=\"content-type\">");
win.document.write("<title>Insertar imagen</title>");
win.document.write("</head>");
win.document.write("<body topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginheight=\"0\" marginwidth=\"0\">");
win.document.write("<scr"+"ipt>");
win.document.write("function show() {");
win.document.write(" alert(document.getElementById('p').contentWindow.document.body.innerHTML);");
win.document.write(" return false;");
win.document.write("}");
win.document.write("<\/scr"+"ipt>");
win.document.write("<iframe id=\"p\" src=\"x.html\" onload=\"show();\"></iframe>");
win.document.write("</body>");
win.document.write("</html>");
win.document.close();
</script>