/*
	6/18/01
	Darren Houle
	Health First, Inc.
	
	CreateIpixViewer function creates a generic popup window that contains an embeded
	iPIX image window and controls and utilizes the web sites existing CSS file.
	
	The function requires several parameters to be passed fom the calling javascript command...
	filename:	the full path to the media file to be displayed in the browser
	width:		the width of the image window (will affect the width of the browser popup window)
	height:		the height of the image window (will affect the height of the browser popup window)
	title:		will be displayed in the top left title bar of the browser window
	speed:		message to be displayed above the image window stating speed of file or whatever
*/

function createIpixViewer(filename, width, height, title, speed) {
	
// open window
	ipixwin = window.open("","viewer","status,width="+width+",height="+(height+80));

// output start of page
	ipixwin.focus();
	ipixwin.document.open();
	ipixwin.document.write("<html>\r");
	ipixwin.document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/shared/css/hfwww.css\">\r");

	ipixwin.document.write("<head><title>"+title+"</title></head>\r");
	ipixwin.document.write("<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r");
	ipixwin.document.write("<div align=center>\r");

	ipixwin.document.write("<applet code=\"IpixViewer.class\"\r");
	ipixwin.document.write("	archive=\"IpixViewer.jar\"\r");	
	ipixwin.document.write("	width=\""+width+"\"\r");
	ipixwin.document.write("	height=\""+height+"\"\r");
	ipixwin.document.write("	name=\"IpixViewer\">\r");
	ipixwin.document.write("		<param name=\"URL\" value=\""+filename+"\">\r");
	ipixwin.document.write("		<param name=\"Toolbar\" value=\"none\">\r");
	ipixwin.document.write("		<param name=\"BackgroundColor\" value=\"#ffffcc\">\r");
	ipixwin.document.write("		<param name=\"SpinSpeed\" value=\"1\">\r");
	ipixwin.document.write("		<param name=\"SpinStyle\" value=\"flat\">\r");
	ipixwin.document.write("</applet>\r");

// output close window button

	ipixwin.document.write("<p>Use your arrow keys on your keyboard or click and drag your mouse to rotate this image.\r");
	ipixwin.document.write("</div></body>\r");
	ipixwin.document.write("</html>\r");
	ipixwin.document.close();
	}
