var browserName = navigator.appName;
var browserVer = navigator.userAgent; 

//alert(browserName);
//alert(browserVer); 

var ie = false;
var iPad = false;
var newIE = false; 

if (browserVer.indexOf('iPad') != -1) 
    {iPad = true;}
else 
{    
    if (browserName == "Microsoft Internet Explorer") 
    {        
        ie = true;         
        
        if (browserVer.indexOf('MSIE 9') != -1)
            newIE = true;    
    }
}
    
//alert('IE is ' + ie);    
//alert('iPad is ' + iPad);
//alert('newIE is ' + newIE);      

function getVideo(filePath, title, w, h) 
{	    
    newwindow2=window.open('','vidWin','height=' + h + ',width=' + w);	    
    var tmp = newwindow2.document;	    
    tmp.write('<html><head><title>' + title + '</title>'); 	    
    tmp.write('</head><body margin = "0">');	    
    tmp.write('<div align = "center"><embed src = "' + filePath + '"  width = "'+ w +'" height = "'+ h +'" autostart = "true" /></div>');	    
    tmp.write('</body></html>');	    
    tmp.close();    
}    
function getVideo2(filePath, title, w, h, mimeType) 
{        
    newwindow2 = window.open('', 'vidWin', 'height=' + h + ',width=' + w);        
    var tmp = newwindow2.document;        
    tmp.write('<html><head><title>' + title + '</title>');        
    tmp.write('</head><body margin = "0">');        
    tmp.write('<div align = "center"><embed src = "' + filePath + '"  width = "' + w + '" height = "' + h + '" autostart = "true" mimetype = "' + mimeType + '"/></div>');        
    tmp.write('</body></html>');        
    tmp.close();    
}     
function getVideo3(filePath, title, w, h) 
{        
    newwindow2 = window.open('', 'vidWin', 'height=' + h + ',width=' + w);        
    var tmp = newwindow2.document;        
    tmp.write('<html><head><title>' + title + '</title>');        
    tmp.write('</head><body margin = "0">');        
    tmp.write('<div align = "center"><video src = "' + filePath + '"  width = "' + w + '" height = "' + h + '" autoplay = "autoplay" type = "video/mp4"/></div>');        
    tmp.write('</body></html>');        
    tmp.close();    
} 

