var continueLink;
var submitForm;

var browserVersionText = navigator.appVersion;
var browserName = navigator.appName;
var okayForWindow = false;



function getOkayForWindow()
{
	return true;
}

	
function getPlayerWindow( streamerUrl )
{
	// if has connection demographics continue with link, otherwise pop up window to request properties
	if (( member["Connection Speed"] ) && ( member["Player Prefs"] )) {
		return true;   // member ok, link.
	} else {
		continueLink = streamerUrl.href;
		return editPrefs( );
	}
}
function getPlayerWindowForForm( inForm )
{
	// if has connection demographics continue with link, otherwise pop up window to request properties
	if (( member["Connection Speed"] ) && ( member["Player Prefs"] )) {
		return true;   // member ok, link.
	} else if ( ! editPrefs( ) )
    {
		submitForm = inForm;
		return false;
	}
    return true;
}
function go( ) { 
		goValue = false;
    if ( continueLink != null )
    {
        document.location = continueLink; 
        continueLink = null;
        goValue = true;
    }
    else if ( submitForm != null )
    {
        submitForm.submit( );
        submitForm = null;
        goValue = true;
    }
    return goValue;
}
function editPrefs( )
{
	getOkayForWindow();
	if( okayForWindow ) {
		playerWindow = window.open( "/app/player_prefs.jsp?rnd=" + Math.random(), "player_prefs", "directories=no,height=230,width=300,location=no,scrollbars=no,toolbar=no,resizable=yes" );
		return false;   // don't link yet
	} else {
		return true;    // go ahead and link
	}
}
function setMember( inMember ) { 
	member["Connection Speed"] = "set";
	member["Player Prefs"] = "set";
}
