 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:theImage, 
                    link:theLink,  
                    start:"0", 
                    title:"", 
                    type:"", 

                    controlbar:"bottom",
                    logo:theLogo, 
                    playlist:"none", 
                    playlistsize:"180",  
                    skin:"http://dna.gravlab.com/mediaplayer/skins/stijl",

                    autostart:theAutostart, 
                    bufferlength:"1", 
                    displayclick:"play", 
                    item:"0",
                    mute:"false", 
                    quality:"true", 
                    repeat:"none", 
                    shuffle:"false", 
                    stretching:"uniform",
                    volume:"90",  

                    abouttext:"",
                    aboutlink:"",
                    linktarget:"_blank",
                    streamer:"http://lifewavellc.gravlab.com/mediaplayer/stream.php",
                    tracecall:""
            }
            var params = {
                    allowfullscreen:"true", 
                    allowscriptaccess:"always"
            }
            var attributes = {
                    id:thePlayerId,  
                    name:thePlayerId
            }
            swfobject.embedSWF("http://dna.gravlab.com/mediaplayer/player.swf", thePlaceholder, theWidth, theHeight, "9.0.115", false, flashvars, params, attributes);
        }


        function initPlayer(theFile, theImage, theLogo, theAutostart) {
			$("#top-link").click();           
 			deletePlayer('wrapper1', 'placeholder1', 'player1'); 
            createPlayer('placeholder1', 'player1',
                    '486', '320', 
                    theFile, 
                    theImage, 
                    'http://lifewavetraining.com', 
                    theLogo,
                    theAutostart)
        }
		
		

