function openImage()  // pass 5th parameter to get scrollbars
{
title=openImage.arguments[0];
filename=openImage.arguments[1];
w=openImage.arguments[2];
h=openImage.arguments[3];

if (openImage.arguments.length==4) win = window.open('','',"width="+w+",height="+h+",left=50,top=50, resizable=yes");
else win = window.open('','',"width="+w+",height="+h+",left=50,top=50, scrollbars=yes, resizable=yes");

win.document.write("<html><head><title>"+ title +"</title><style type='text/css'>body {margin: 0,0,0,0;}</style></head>");
win.document.write("<body bgcolor=#000000 marginwidth='0' marginheight='0'>");
win.document.write("<img src = '"+ filename + "' align = center>");
win.document.write("</body></html>");
win.document.close();

win.focus();
win.onBlur = window.close;
}

function openText(title, text, w, h)
{
win = window.open('','',"resize=yes, width="+w+",height="+h+",left=50,top=50, scrollbars=yes");

win.document.write("<html><head><title>"+ title +"</title><style>a:link {color: #5060B0}; a:visited {color: #503080}</style></head>");
win.document.write("<body bgcolor=#F0F0F0>");
win.document.write(text);
win.document.write("</body></html>");
win.document.close();

win.focus();
win.onBlur = window.close;
}

function openEmbed(title, filename, plugin, w, h)
{
win = window.open('','',"width="+w+",height="+h+",left=50,top=50");

win.document.write("<html><head><title>"+ title +"</title><style type='text/css'>body {margin: 0,0,0,0;}</style></head>");
win.document.write("<body bgcolor=#000000 marginwidth='0' marginheight='0'>");
win.document.write("<embed src='"+ filename + "' pluginspage='"+ plugin +"' width='"+ w +"' height='"+ h +"' controller='true' loop='true' autoplay='true'>");
win.document.write("</body></html>");
win.document.close();

win.focus();
win.onBlur = window.close;
}
