﻿function WritePlayer(isDetached, local_stationID, local_volume) {
//        $('#flashPlayerContainer').flash(
//            {
//                id: 'GotRadioPlayer',
//                name: 'GotRadioPlayer',
//                src: '/swf/GotRadioPlayer.swf?t=' + (new Date).valueOf() + ';',
//                width: 700,
//                height: 320,
//                bgcolor: '#000000',
//                wmode: 'opaque',
//                flashvars: { stationID: local_stationID, songID: 0, isDetached: (isDetached) ? 'yes' : 'no' }
//            },
//            { version: 9 }
    //        );


    var vars = {
        stationID: local_stationID, 
        songID: 0, 
        isDetached: (isDetached) ? 'yes' : 'no',
        playerVolume: local_volume
    };
    var params = {
        wmode: 'opaque',
        bgcolor: '#000000',
        allowscriptaccess: 'always'
    };
    var attributes = {
        id: 'GotRadioPlayer',
        name: 'GotRadioPlayer'
    };
    var src = '/swf/GotRadioPlayer.swf?t=' + (new Date).valueOf();

    swfobject.embedSWF(src, 'flashPlayerContainer', '700', '320', '10.0.0', '/swf/playerProductInstall.swf', vars, params, attributes);

//    $('#playerReplace').flashembed({
//                        src: "/swf/GotRadioPlayer.swf",
//                        wmode: 'opaque',
//                        width: 700,
//                        height: 320,
//                        bgcolor: '#000000',
//                        version: [10, 1],
//                        expressInstall: true,
//                        onFail: function() {
//                            document.getElementById("info").innerHTML = "You need the latest Flash version to view MP4 movies. " +
//                                                                        "Your version is " + this.getVersion();
//                        } 
//                    }, {
//                        stationID: 0,
//                        songID: 0, 
//                        isDetached: isDetached.toString()
    //                    });


//    $('#playerReplace').flash({
//        'id': 'GotRadioPlayer',
//        'src': '/swf/GotRadioPlayer.swf?t=' + (new Date).valueOf() + ';',
//        'width': '700',
//        'height': '320',
//        'allowfullscreen': 'true',
//        'bgcolor': '#000000',
//        'wmode': 'opaque',
//        'allowscriptaccess': 'always',
//        'flashvars': { 'stationID': local_stationID.toString(), 'songID': '0x000000', 'isDetached': (isDetached) ? 'yes' : 'no' }
//        , { version: '10' }

        //,'flashvars': 'stationID=0&songID=0&isDetached='+isDetached.toString()
    //});
        }
