function deletePlayer(theWrapper, thePlaceholder, thePlayerId) { 
        swfobject.removeSWF(thePlayerId);
        var tmp=document.getElementById(theWrapper);
        if (tmp) { tmp.innerHTML = "<div id=" + thePlaceholder + "></div>"; }
}


function createPlayer(thePlaceholder, thePlayerId, theFile) {
        var flashvars = {
                file:theFile, 
                autostart:"true",
                image:"flash/preview.jpg",
                controlbar:"over",
                height:"288",
                width:"352",
                icons:"false",
                skin:"flash/stylish.swf",
                frontcolor:"#ffffff",
                lightcolor:"#bedc82"
        }
        var params = {
                allowfullscreen:"true", 
                allowscriptaccess:"always"
        }
        var attributes = {
                id:thePlayerId,  
                name:thePlayerId
        }
        swfobject.embedSWF("flash/player.swf", thePlaceholder, "352", "288", "9", false, flashvars, params, attributes);
}


function initPlayer(theFile) { 
        deletePlayer('wrapper', 'placeholder1', 'player1'); 
        createPlayer('placeholder1', 'player1', theFile);
}
