﻿
// JScript File
function videoPreview(path)
{
    var newwindow;
   if (newwindow != null) 
    {
        if(newwindow.closed==false)
            newwindow.close();
    }    
   
 //  alert(path);
    //alert(img.src);
  
   //alert(height+"*---------"+width);
    newwindow=window.open('', '','location=0, menubar=0, resizable=1, scrollbars=1, status=0,titlebar=0, toolbar=0, height=350, width=470');
   // newwindow.moveTo(0,0);
    var htmlString="<html><head><title>Preview Video</title></head><body>";
        htmlString+="<table cellspacing='0' cellpadding='0' border='0' align='center'>";
        htmlString+="<tr><td align='center'>";
        htmlString+="<embed  type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/'"
        htmlString+="name='mediaplayer1' showcontrols='false' showstatusbar='true' enablecontextmenu='false'"
        htmlString+= "autostart='true' width='370' height='320' loop='false' src='"+path+"' /></td</tr><tr><td>&nbsp;</td></tr><tr>";
        htmlString+="<td align='center'>";
        htmlString+="<input type=\"button\" id=\"btnClose\" value=\"Close\" class=\"button\" onclick=\"javascript:window.close()\" />";
        htmlString+="</td>";
        htmlString+="</tr></table></body></html>";
    newwindow.document.write(htmlString);
    newwindow.document.close();
    if (window.focus)
	{
		newwindow.focus();
	}
}


