    var strMedia_currentId;
    
    function fjsMedia_FlashVideo(strId, strURL, strHeader)
	{  	
	    /*	
	        var strId;      - id on player container
	        var strURL;     - url to flv file
	        var strHeader;  - header text for player container
	    */
	    var oFlash;
	    var oMedia;		    
        var oParent;		
	   
	    //stop loading
	    window.stop;
	    
	    /* test data
	        strId = "Video";
	        //strURL = strApplicationRoot + "flash/media/slippjimmyfri.flv";
	        strURL = strApplicationRoot + "flash/media/adams_epler.flv";
	        strHeader = "test av video";
	    */
	    
	    if (blnDOM)
	    {
	        //remove previous media
	        fjsMedia_remove(strMedia_currentId);
	        //get a parent container
	        oParent = document.getElementById("PageContent");	
	            if (oParent.style.position != "absolute" && oParent.style.position != "relative")
	            {
	               oParent.style.position = "relative"; 
	            }	        
	        //get a media container
	        strMedia_currentId = strId;
		    oMedia = fjsMedia_createContainer(strId, strHeader);
		    oParent.appendChild(oMedia);  
		    //insert flash
		    oFlash = new SWFObject(strApplicationRoot + "flash/media/flash_video_player.swf", "FlashVideoObject" + strId, "559", "420", "8.0", "#ffffff");
		    oFlash.addVariable("input_strApplicationRoot_str", strApplicationRoot);
		    oFlash.addVariable("input_MovieURL_str", strURL);   
		    oFlash.addParam("wmode", "opaque");   
		    oFlash.write("FlashContentId" + strId);     
	    }
	}
			
	function fjsMedia_createContainer(strId, strHeader)
	{
	    var oTmp;
        var oClose;
        
        //create mediacontainer
        var oMedia = document.createElement("div");
            fjsToolBox_setAttribute(oMedia, "id", strId);
            fjsToolBox_setAttribute(oMedia, "class", "Media");                
            //close
            oClose = document.createElement("a");
                fjsToolBox_setAttribute(oClose, "class", "btnClose");  
                fjsToolBox_setAttribute(oClose, "href", "javascript:fjsMedia_remove('" + strId + "');");
                oClose.appendChild(document.createTextNode(String.fromCharCode(215)));                    
                //add close btn
                oMedia.appendChild(oClose);
            //header
            oTmp = document.createElement("div");
                fjsToolBox_setAttribute(oTmp, "class", "Header");
                oTmp.appendChild(document.createTextNode(strHeader));
                oMedia.appendChild(oTmp);
            //content
            oTmp = document.createElement("div");
                fjsToolBox_setAttribute(oTmp, "class", "Content");
                fjsToolBox_setAttribute(oTmp, "id", "FlashContentId" + strId);
                oMedia.appendChild(oTmp);
        
        //return container
        return oMedia;
	}
	
	function fjsMedia_remove(strId)
	{
	    //stop loading
	    window.stop;
	    //remove node
	    if (document.getElementById(strId))
	    {
	        document.getElementById(strId).parentNode.removeChild(document.getElementById(strId));
	    }
	}		