/*************************************************************\
 *	ShowVideo - show a video in window 
 *
 *	Copyright (C) 2006, Riccardo 'Rico' Pareschi
 *	This script is released under GPL License.
 *	Feel free to use this script (or part of it) wherever you need
 *	it ...but please, give credit to original author. Thank you. :-)
 *	We will also appreciate any links you could give us.
 *	http://www.rico54.com
 *
 *  usage: <script type="text/javascript" src="ShowVideo.js"></script>
 *
 *	Enjoy! ;-)
\*************************************************************/
		// show an image in a window
		function ShowVideo(ifile,ix,iy,ititle, stylepath) { 
		  var win, iheight;

		  if (ititle != "") {
		  		iheight = iy+30;
		  } else {
		  	iheight = iy;
		  }

		  win = window.open("","videoviewer","width="+(ix+70)+",height="+(iheight+90)+",menubar=no,toolbar=no");
		  win.document.write("<html><head><title>Il Serpente Bianco</title>");
		  win.document.write("<link rel='stylesheet' href='"+stylepath+"' type='text/css'>");
		  win.document.write("</head><body>");
		  win.document.write("<table border=0 align=center>");
		  win.document.write("<tr><td align=center>");
			win.document.write("<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='"+ix+"' height='"+(iy+20)+"' codebase='http://www.apple.com/qtactivex/qtplugin.cab'>");
			win.document.write("<param name='src' value='"+ifile+"'>");
			win.document.write("<param name='controller' value='true'>");
			win.document.write("<param name='bgcolor' value='#6E7677'>");
			win.document.write("<param name='autoplay' value='true'>");
			win.document.write("<param name='cache' value='true'>");
			win.document.write("<embed src='"+ifile+"' width='"+ix+"' height='"+(iy+20)+"' controller='true' autoplay='true' ");
			win.document.write("cache='true' type='video/quicktime' pluginspage='http://www.apple.com/quicktime/download/'></embed>");
			win.document.write("</object>");
		  win.document.write("</td></tr><tr><td colspan=2>");
		  win.document.write("<form style='text-align: center;'>");
		  win.document.write(ititle+"<br />");
		  win.document.write("<input type=button value='Chiudi' onClick='window.close(self)'>");
		  win.document.write("</form><");
		  win.document.write("/td></tr></table>");
		  win.document.write("</body></html>");
		  win.document.close();
		  if (window.theNewWindow) 
  		theNewWindow.close();
		} // ShowVideo

