function popupvideo(url, paramId, ptitle, alttext, IdLang, videowidth, videoheight) {
  var isIE = (navigator.appName == "Microsoft Internet Explorer");
  var PreviewVideoWidth = (videowidth!="" ? videowidth*1 : DefaultPreviewVideoWidth*1);
  var PreviewVideoHeight = (videoheight!="" ? videoheight*1 : DefaultPreviewVideoHeight*1);
  var PreviewWindowWidth = PreviewVideoWidth*1+20;
  var PreviewWindowHeight = PreviewVideoHeight*1+90;
  var l = Math.floor((screen.width-PreviewWindowWidth)/2);
  var t = Math.floor((screen.height-PreviewWindowHeight)/2);
  //var MyTextField = document.getElementById (paramId);
  //var tempURL = url + MyTextField.value;
  //var didascalia = (alttext!="" ? alttext : MyTextField.value);
  var tempURL = url;
  var didascalia = alttext;
  
  //alert (url);

  if ((ptitle=='')) {wintitle = defaultwintitle;} else {wintitle = ptitle;}
  if ((IdLang=='italian')) {TxtCloseWin = 'Chiudi finestra';TxtPrintWin = 'Stampa immagine';} else {TxtCloseWin = 'Close window';TxtPrintWin = 'Print image';}
  w=open("",'image','width='+PreviewWindowWidth+',height='+PreviewWindowHeight+',toolbar=no,scrollbars=no,resizable=no,status=yes,location=no,menubar=no'+',left='+l+',top='+t);
  w.document.writeln("<html>");
  w.document.writeln("  <head>");
  w.document.writeln("    <title>"+wintitle+"</title>");
  w.document.writeln("    <link rel='stylesheet' type='text/css' href='"+DefIncludeFileCSS+"' media='all' />");
  w.document.writeln("    <script language=javascript type='text/javascript'>function checksize() { if (1==1) {"); //document.images[0].complete
  if (isIE) { // (document.all) 
      //IE4 = true;
	w.document.writeln("    		DeltaHeight = 170;");
	w.document.writeln("    		DeltaWidth = 18;");
  }
  else {
      //IE4 = false;
	w.document.writeln("    		DeltaHeight = 140;");
	w.document.writeln("    		DeltaWidth = 18;");
  }
//  w.document.writeln("    			window.resizeTo(document.images[0].width+DeltaWidth,document.images[0].height+DeltaHeight); window.focus();");
  w.document.writeln("    		} else { setTimeout('checksize()',250) }");
  w.document.writeln("    }");
  w.document.writeln("    </"+"script>");
  w.document.writeln("  </head>");
  if (isIE) { // (document.all)
      //IE4 = true;
    w.document.writeln("  <body id='popup' onload='checksize();' onblur='self.close();'>");
  }
  else {
      //IE4 = false;
    w.document.writeln("  <body id='popup' onload='checksize();' onblur='window.close();'>");
  }
  w.document.writeln("    <div>");
  w.document.writeln("      <div align='center' id='popupVideo'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+PreviewVideoWidth+"' height='"+PreviewVideoHeight+"'>");
  w.document.writeln("			          <param name='movie' value='/swf/jw_allvideos_player.swf?file="+tempURL+"&amp;showdigits=true&amp;autostart=true' />");
  w.document.writeln("			          <param name='quality' value='high' />");
  w.document.writeln("			          <embed src='/swf/jw_allvideos_player.swf?file="+tempURL+"&amp;showdigits=true&amp;autostart=true' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+PreviewVideoWidth+"' height='"+PreviewVideoHeight+"'></embed>");
  w.document.writeln("					</object></div>");
  w.document.writeln("      <div id='putext'>"+didascalia+"</div>");
  w.document.writeln("      <div id='pubuttons'>");
  w.document.writeln("        <form>");
  w.document.writeln("          <span><input type='button' name='close' id='close' value='"+TxtCloseWin+"' onClick='top.close()' /></span>");

//    if (isIE) { // (document.all)
      //IE4 = true;
//    w.document.writeln("          <span><input type='button' name='print' id='print' value='"+TxtPrintWin+"' onClick='javascript:self.print();return false;' /></span>");
//      }
//  else {
//      //IE4 = false;
//   w.document.writeln("          <span><input type='button' name='print' id='print' value='"+TxtPrintWin+"' onClick='javascript:document.getElementById(\"btprint\").style.visibility=\"hidden\";document.getElementById(\"btclose\").style.visibility=\"hidden\";window.print();return false;'>");
//
//        ///if (document.layers) {
//      //  //NS4 = true;
//    //}
//    //else {
//      //  //NS4 = false;
//    //}
//  }
  w.document.writeln("        </form>");
  w.document.writeln("      </div>");
  w.document.writeln("    </div>");
  w.document.writeln("  </body>");
  w.document.write("</html>");
  w.document.close();
}
