﻿// common method to deal with going back to previous
function goBack() {
    history.go(-1);
    return false;
};

// 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();
    }
}

function SharePopup(url) {

    var width = 626;
    var height = 438;
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;

    popup = window.open(url, 'Kidlandia', 'directories=0,status=0,scrollbars=0,resizable=1,menubar=0,toolbar=0,location=0,left=' + left + ',top=' + top + ',width=' + width + ',height=' + height);

    return false;
}


