﻿

// this close the browser window on IE8 and Firefox supposedly. Needs more testing on other browsers etc    
function closeWindowFromFlash() 
{   
    var isNetscape = (navigator.appVersion.indexOf("Netscape") != -1) ? true : false;
    
    if ( isNetscape )
    {
        // netscape / firefox. I don't think this can be made to work unless we 
        // change the way the window is opened.
        
        window.open('','_parent','');
        
        window.close();
    }
    else
    {
        // IE and all other browsers
        
        window.opener='X'; 
        window.open('','_parent',''); 
        window.close();
    }
} 

