function writeSo(flvName) {
	
	var swfwidth = 540;
	var swfheight = 420;
	  
   var so = new SWFObject("test.swf", "mymovie", swfwidth, swfheight, "8", "#d5d9dc");
     //this is to allow a target to open in a window besides _blank
   so.addParam("allowScriptAccess", "always");
    so.addParam("wmode", "transparent");
   so.addVariable("swfHeight", swfheight);
   so.addVariable("swfWidth", swfwidth);
   
     //flv loads in a single video file
     //if you use "flv" you have to comment out "xml"
   so.addVariable("flv", flvName);
     //url defines a link for clicking on the video area of the flv player
     //to disable it, comment it out
   //so.addVariable("url", "test.html");
     //target defines where the url will open
     //choices are _self, _parent, _top, _blank
   so.addVariable("target", "_self");
   
     //xml loads in a playlist with flvs and urls
     //if you use "xml", you have to comment out "flv"
   //so.addVariable("xml", "test.xml");
   
     //flvWidth and flvHeight are required variables - don't comment them out
     //they define the width and height of the videoArea
     //To fill up the entire area set them to one pixel less than the swf size
     //to allow for thpe control area, set the height minus the height of the control area
	 //never have the height more than 29 pixels difference from the swfheight if you are using the playlist controls
   so.addVariable("flvWidth",340);
   so.addVariable("flvHeight", 230);
   so.addVariable("controlWidth", 340);
   so.addVariable("controlHeight", 35);
   so.addVariable("offsetBgX", 20);
   so.addVariable("offsetBgY", 20);
   so.addVariable("bgWidth", 480);
   so.addVariable("bgHeight", 320);
   
     //autoplay is required - it must not be commented out
	 //true automatically plays the video, false requires you a click before playing
   so.addVariable("autoplay", "true");
   
     //loop is required - it must not be commented out
	 //true sets the entire video and video list to replay
	 //false will play through the video once and the entire playlist once
   so.addVariable("loop", "true");
   
     //controls is required - it must not be commented out
	 //if true, the main controls under the video area is visible
	 //if false, there is no main control area
     //if controls == true, make sure to turn off innerControls & vice versa
   so.addVariable("controls", "true");
   	 //innerControls is required - it must not be commented out
	 //if true, the play/pause is visible inside the video area
	 //if false, there is no inner controls
	 //if innerControls == true, make sure to turn off controls & vice versa 
   //so.addVariable("innerControls", "true");
     //playlistControls is required - it must not be commented out
	 //if true, the prev/next controls for the playlist are active
	 //if false, there are no playlist controls
   //so.addVariable("playlistControls", "true");
   
   	 //still image is the image that displays in the video area if the autoplay is turned off
	 //to have no still image, comment this out
   //so.addVariable("stillImage", "images/stilltest.jpg");
     //playerbg is the background image behind the video area
	 //to have no bg, comment this out
   //so.addVariable("playerbg", "images/bgplaya.png");
 
	
	 //the next six variables can be commented out if you want to use the default icons 
     //controlsbg is the bg for the entire main control area
   so.addVariable("controlsbg", "images/controlstest.png");
     //playImage is the image for the play button
   so.addVariable("playImage", "images/playimagetest.png");
   so.addVariable("playImageRO", "images/playimagetest.png");
     //pauseImage is the image for the pause button
   so.addVariable("pauseImage", "images/pauseimagetest.png");
   so.addVariable("pauseImageRO", "images/pauseimagetest.png");
     //playX is for the X coord of the play/pause area in pixels
   so.addVariable("playX", 5);
     //thumbImage is the image for the scrubber thumb
	 //if you use one of the next 3, you  have to use them all
   so.addVariable("thumbImage", "images/thumbimagetest.png");
     //loadedTrackImage is the image for the loaded scrub bar
   so.addVariable("loadedTrackImage", "images/loadedtrackimagetest.png");
     //trackImage is the image for the unloaded scrub bar
   so.addVariable("trackImage", "images/trackimagetest.png"); 
     //trackX is for the X coord of the track in pixels
   so.addVariable("trackX", 30);
   
     //the following 4 are required parameters
     //timeFont is for the font face of the time displays
   so.addVariable("timeFont", "arial");
     //timeSize is for the size of the time displays font
   so.addVariable("timeSize", 10);
     //elapsedX is the X coord for the elapsed time
   so.addVariable("elapsedX",25);
     //durationX is the X coord for the duration time
   so.addVariable("durationX", 280);
   so.addVariable("elapsed", "false");
   so.addVariable("duration", "true");

     //if you add a volumeImage, you have to add them all or comment them all out
	 //volumeImage is the image for the speaker icon
   so.addVariable("volumeImage", "images/volumeimagetest.png");
     //volumeIconX is for the X coord of the volume Icon in pixels
   so.addVariable("volumeIconX",325);
     //soundWavesImage is the image for the waves coming out of the speaker
   so.addVariable("soundWavesImage", "images/soundwavesimagetest.png");
     //muteImage is the image for the mute icon
	 //if one of these next 3 is commented out, all them have to be
   so.addVariable("muteImage", "images/muteimagetest.png");
     //volumeThumbImage is the image for the thumb on the scrubber bar
   so.addVariable("volumeThumbImage", "images/volumethumbtest.png");
     //volumeTrackImage is the image for the scrubber bar
   so.addVariable("volumeTrackImage", "images/volumetracktest.png");
     //volumeTrackX is for the X coord of the volume track in pixels
   so.addVariable("volumeTrackX", 355);
     //if innerControls is turned on, these must not be commented out
     //innerPause if the image for the pause icon on the inner controls
   //so.addVariable("innerPause", "images/innerpausetest.png");
     //innerPlay is the image for the play icon on the inner controls
   //so.addVariable("innerPlay", "images/innerplaytest.png");
    so.addVariable("volumeIcon", "true");
    so.addVariable("volumeTrack", "true"); 
   
     //if playlistControls is turned on, these must not be commented out
   so.addVariable("playlistCtrlsBg", "images/plctrlsbg.jpg");
   so.addVariable("playlistCtrlsPrev", "images/plctrlsprev.png");
   so.addVariable("playlistCtrlsPrevRO", "images/plctrlsprevro.png");
   so.addVariable("playlistCtrlsNext", "images/plctrlsnext.png");
   so.addVariable("playlistCtrlsNextRO", "images/plctrlsnextro.png");
   so.addVariable("playlistCtrlsCurrent", "images/plctrlscurrent.png");
   so.addVariable("playlistCtrlsChange", "images/plctrlschange.png");
   so.addVariable("playlistCtrlsOther", "images/plctrlsother.png");
   
   		  //if a text description of the flv is specified in the xml playlist, set this bg to the color you want
			 //otherwise comment this out
  			// so.addVariable("descriptionBg", 0xFFFF00);
    
	//if controls is turned on and no images are set above these must not be commented out
    //these control the color of the default icons on the control areas
	//for movieBorderColor - must use 0x000001 for a black movieBorderColor 
   so.addVariable("movieBorderColor", 0x000001);
   so.addVariable("timeColor", 0x000000);
   so.addVariable("durationColor", 0x000000);
   so.addVariable("volumeBgColor", 0x999999);
   so.addVariable("volumeIconColor", 0x444444);
   so.addVariable("volumeHandleColor", 0x444444);
   so.addVariable("muteIconColor", 0xFF0000);
   so.addVariable("playIconColor", 0x444444);
   so.addVariable("pauseIconColor", 0x444444);
   so.addVariable("scrubberHandleColor", 0x444444);
   so.addVariable("scrubberBgColor", 0x999999);
   so.addVariable("scrubberLoadedColor", 0xFFFFFF);
   so.addVariable("mainBgColor", 0x5D555A);
   so.addVariable("separatorColor", 0x000000);
   so.write("flashcontent");

}

function writeDesc(text) {
	var oDiv = document.getElementById('description');
	alert('!! ' + oDiv.style.height);
	var oDivText = document.createTextNode(text);
	oDiv.appendChild(oDivText);
}
