        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, theWidth, theHeight, theFile, theImage, theLink, theLogo, theAutostart) {
            var flashvars = {
                    config:"",

                    author:"",
                    captions:"",
                    description:"",
                    duration:"0",
                    file:theFile, 
                    image:"index/preview.jpg", 
                    link:theLink,  
                    start:"0", 
                    title:"", 
                    type:"", 

                    controlbar:"bottom",
                    logo:theLogo, 
                    playlist:"none", 
                    playlistsize:"180",  
                    skin:"modieus.swf",
                    icons:"false",
                    autostart:"true", 

                    bufferlength:"1", 
                    displayclick:"none", 
                    item:"0",
                    mute:"false", 
                    quality:"true", 
                    repeat:"none", 
                    shuffle:"false", 
                    stretching:"uniform",
                    volume:"100",  

                    abouttext:"",
                    aboutlink:"",
                    linktarget:"_blank",
                    streamer:"",
                    tracecall:""
            }
            var params = {
                    allowfullscreen:"true", 
                    allowscriptaccess:"always"
            }
            var attributes = {
                    id:thePlayerId,  
                    name:thePlayerId
            }
            swfobject.embedSWF("player.swf", thePlaceholder, theWidth, theHeight, "9.0.115", false, flashvars, params, attributes);
        }


        function initPlayer(theFile, theImage, theLogo, theAutostart) {
            deletePlayer('wrapper1', 'placeholder1', 'player1'); 
            createPlayer('placeholder1', 'player1',
                    '640', '492', 
                    theFile, 
                    theImage, 
                    'http://www.jeroenwijering.com', 
                    theLogo,
                    theAutostart)
        }