Provided by: http://danaisler.freeservers.com
The function can be called this way:
The parameters to the function:
1 - the name of the file to show in the new window
2 - width of the new window (in pixels)
3 - height of the new window (in pixels)
4 - message to appear at the top of the picture
5 - If you wish to create a border surrounding the picture:1, no border:0
The code of the function:
function openwindow(cPicture,nWidth,nHeight,cMessage,nBorder){
         var output;
         if (lOpened){
         newWind.close();
         }
         lOpened=true;
         newWind = window.open("","winnam","HEIGHT="+nHeight+",WIDTH="+nWidth+",scrollbars=yes,resizable=yes,top=5,left=5");
         output="<HTML><BODY BGCOLOR='beige'><CENTER>"
         output+="<FONT FACE='Comic Sans MS' SIZE='+2' COLOR='Maroon'><B>"+cMessage+"</B></FONT><BR>"
         if (nBorder==1) {
         output+="<TABLE BORDER='8'><TR><TD>"
         }
         output+="<IMG SRC='"+cPicture+"'>"
         if (nBorder==1){
         output+="</TD></TR></TABLE>"
         }
         output+="<FORM><TABLE BORDER='5'><TR><TD>"
         output+="<INPUT TYPE='button' VALUE='Close' onClick='self.close()'>"
         output+="</TD></TR></TABLE></FORM></CENTER></BODY></HTML>"
         newWind.document.write(output);
         newWind.document.close();
         }
GOOD LUCK !!!!