
  function setMedia(mediatype, speed, url, id, mov_width, mov_height,flv_file) {
 // alert(url);
 
  	mov_width = parseInt(mov_width);
	mov_height  = parseInt(mov_height);
	var width = 0;
	var height = 0;
		//alert("1width is" + width + "<--");

	//alert("url is " + url + "<--");
    if (document.getElementById) {
        var classid, type, width, height, codebase, pluginspace, text;
        if (mediatype == "quicktime") { 
            classid = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
            type = "video/quicktime";
            codebase = "http://www.apple.com/qtactivex/qtplugin.cab";
            pluginspage = "http://www.apple.com/quicktime/download/";
            height = 17;
			//height += mov_height; 

        } 
		else if (mediatype=="windowsMedia") { 
            classid = "clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95";
            type = "application/x-mplayer2";
            codebase = "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=,1,52,701";
            pluginspage = "http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"; 
            height = 50;
            //if ("1" == "1")
               // height += 20; 		   
        }
		else if (mediatype=="flashSwf") { 
		//alert("hit!");
            classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
            type = "application/x-shockwave-flash";
            codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0";
            pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
            height = 50;
            //if ("1" == "1")
               // height += 20; 		   
        }
       
			width = width + mov_width;
			height = mov_height ;
			//height = height + mov_height;
		//alert("3width is" + width + "<--");
		objwidth = width; //+ 50;
		
		
		if(mediatype=="quicktime") {
		//alert("quicktime");
        var output = '<object '
            + 'CLASSID="' + classid + '" type="' + type + '" WIDTH="' + objwidth + '" HEIGHT="' + height + '" data="' + url + '" autostart="true" standby="Please wait ..." CODEBASE="' + codebase + '">'
            + '<param name="src" value="' + url + '" />'
            + '<param name="controller" value="true" />'
           // + '<PARAM name="ShowStatusBar" value="1" />'
            + '<param name="autoplay" value="true" />'
            + '<param name="autosize" value="true" />'
            + '<embed SRC="' + url + '" AUTOPLAY="true" autoSize="1"  controller="true" showstatusbar="1" WIDTH="' + width + '" HEIGHT="' + height + '" PLUGINSPAGE="' + pluginspage + '"></embed>'
            + '</object>';		
//			alert (output);
		}		
		else if(mediatype=="windowsMedia") {
		//alert("windows media");
        var output = '<object '
            + 'CLASSID="' + classid + '" type="' + type + '" WIDTH="' + width + '" HEIGHT="' + height + '" data="' + url + '" autostart="true" standby="Please wait ..." CODEBASE="' + codebase + '">'
            + '<param name="src" value="' + url + '" />'
            + '<param name="ShowControls" value="true" />'
            + '<PARAM name="ShowStatusBar" value="1" />'
            + '<param name="autoplay" value="true" />'
            + '<param name="autosize" value="true" />'
            + '<embed SRC="' + url + '" AUTOPLAY="true" autoSize="1"  showcontrols="true" showstatusbar="1" WIDTH="' + width + '" HEIGHT="' + height + '" PLUGINSPAGE="' + pluginspage + '"></embed>'
            + '</object>';
			
			}
			

			/*
			<object width="350" height="300">
  

    <embed   width="350" height="300" ></embed>
  </object>
			*/
		else if(mediatype=="flashSwf") {
		//alert("flash");
		//alert("the width is" + width + "<-- and the height is " + height + "<--");
        var output = '<object '
            + 'CLASSID="' + classid + '" type="' + type + '" WIDTH="' + width + '" HEIGHT="' + height + '" data="' + url + '" autostart="true" standby="Please wait ..." CODEBASE="' + codebase + '">'
			+ '<param name="movie" value="' + url + '" />'
			+ '<param name="wmode" value="transparent" />'
			+ '<param name="quality" value="best" />'			
			+ '<param name="allowFullScreen" value="true" />' 
			+ '<param name="ShowControls" value="true" />'
			
			+ '<param name="FlashVars" value="' + 'flvpVideoSource=' + flv_file + '" />'
			
            + '<embed SRC="' + url + '"  quality="high" allowFullScreen="true" showdisplay="true" showcontrols="true" showstatusbar="1" FlashVars="' + 'flvpVideoSource=' + flv_file + '" WIDTH="' + width + '" HEIGHT="' + height + '" PLUGINSPAGE="' + pluginspage + '" type="' + type + '"></embed>'
            + '</object>';
		//alert("<--" + output + "-->");
			}
			

			
			
        document.getElementById("videoColumnTwo").innerHTML = output;
       // textid = document.getElementById(id).innerHTML;
	  
        //if (text == "") {
            //text = document.getElementById("firstTextObj").innerHTML;
       // }
	   
      
    }    
	
	//useAjax(document.getElementById("videoLinkLongDescription").innerHTML="");
	
  }
  
  
  
 
