//<![CDATA[
    var myListener = new Object();
    
    myListener.onInit = function()
    {
        this.position = 0;
    };

    myListener.onUpdate = function()
    {
        //document.getElementById("info_playing").innerHTML = this.isPlaying;
        //document.getElementById("info_url").innerHTML = this.url;
        //document.getElementById("info_volume").innerHTML = this.volume;
        //document.getElementById("info_position").innerHTML = this.position;
        //document.getElementById("info_duration").innerHTML = this.duration;
        //document.getElementById("info_bytes").innerHTML = this.bytesLoaded + "/" + this.bytesTotal + " (" + this.bytesPercent + "%)";
        
        //var isPlaying = (this.isPlaying == "true");
        //document.getElementById("playerplay").style.display = (isPlaying)?"none":"block";
        //document.getElementById("playerpause").style.display = (isPlaying)?"block":"none";
    };
    
    function getFlashObject()
    {
        return document.getElementById("myFlash");
    }
    function play(url)
    {
        if (myListener.position == 0) {
            getFlashObject().SetVariable("method:setUrl", url);
        }
        getFlashObject().SetVariable("method:play", "");
        getFlashObject().SetVariable("enabled", "true");
    }
    function pause()
    {
        getFlashObject().SetVariable("method:pause", "");
    }
    function stop()
    {
        getFlashObject().SetVariable("method:stop", "");
    }
    function setPosition()
    {
        var position = document.getElementById("inputPosition").value;
        getFlashObject().SetVariable("method:setPosition", position);
    }
    function setVolume()
    {
        var volume = document.getElementById("inputVolume").value;
        getFlashObject().SetVariable("method:setVolume", volume);
    }
//]]>