New version of the openwindow function
Please visit the following web site:
http://danaisler.freeservers.com
and get the new version of the openwindow function:
The function can be called this way:
<A HREF="javascript:openwindow('imgs\smDeadSea.jpg',550,480,'Salt Formations - Dead Sea - Israel',0)">
<IMG src="tjpg\smDeadSea.jpg" Border=0 Alt="Dead Sea" WIDTH="122" HEIGHT="80">
</A>
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 surronding 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();
}