function WritePlayer_v3(width,height,videofile,player,bgcolor,preroll,postroll,controlcolor,controlalpha,controlautohide, 
                        textcolor,skinr,sking,skinb,skinpath,elementid, mediaMimeType, mediaGuid)
{
    document.write('<script type="text/javascript">');
    document.write('var so = new SWFObject("' + player + '", "video", "' + width + '", "' + height + '", "8", "#ffffff"); ');
    document.write('so.addVariable("videofile", "'+ videofile + '");');
    document.write('so.addVariable("preroll", "'+ preroll +'");');
    document.write('so.addVariable("postroll", "'+ postroll +'");');
    document.write('so.addVariable("controlalpha", "' + controlalpha + '");');
    document.write('so.addVariable("controlcolor", "'+ controlcolor +'");');
    document.write('so.addVariable("controlhide", "' + controlautohide + '");');
    document.write('so.addVariable("skinr", "' + skinr + '");');
    document.write('so.addVariable("sking", "' + sking + '");');
    document.write('so.addVariable("skinb", "' + skinb + '");');
    document.write('so.addVariable("textcolor", "' + textcolor + '");');
    document.write('so.addVariable("skinpath", "' + skinpath + '");');
    document.write('so.addVariable("MediaMimeType", "' + mediaMimeType + '");');
    document.write('so.addVariable("MediaGuid", "' + mediaGuid + '");');    
    document.write('so.addVariable("WebsiteMode", "true");'); 
    
    document.write('so.addVariable("width", "' + width + '");');      
    document.write('so.addVariable("height", "' + height + '");');     
        
    document.write('so.addParam("quality", "best");');
    document.write('so.addParam("allowFullScreen", "true");');
    document.write('so.addParam("allowScriptAccess", "sameDomain");');
    document.write('so.addParam("devicefont", "true");');
    document.write('so.addParam("wmode", "transparent");');
    document.write('so.write("' + elementid + '")');
    document.write('</script>');
    
}

function WriteNewPlayer(width,height,videofile,player,bgcolor,preroll,postroll,controlcolor,controlalpha,controlautohide, 
                        textcolor,skinr,sking,skinb,skinpath,elementid, mediaMimeType)
{
    document.write('<script type="text/javascript">');
    document.write('var so = new SWFObject("' + player + '", "video", "' + width + '", "' + height + '", "8", "#ffffff"); ');
    document.write('so.addVariable("videofile", "'+ videofile + '");');
    document.write('so.addVariable("preroll", "'+ preroll +'");');
    document.write('so.addVariable("postroll", "'+ postroll +'");');
    document.write('so.addVariable("controlalpha", "' + controlalpha + '");');
    document.write('so.addVariable("controlcolor", "'+ controlcolor +'");');
    document.write('so.addVariable("controlhide", "' + controlautohide + '");');
    document.write('so.addVariable("skinr", "' + skinr + '");');
    document.write('so.addVariable("sking", "' + sking + '");');
    document.write('so.addVariable("skinb", "' + skinb + '");');
    document.write('so.addVariable("textcolor", "' + textcolor + '");');
    document.write('so.addVariable("skinpath", "' + skinpath + '");');
    document.write('so.addVariable("MediaMimeType", "' + mediaMimeType + '");');
    
    
    document.write('so.addParam("quality", "best");');
    document.write('so.addParam("allowFullScreen", "true");');
    document.write('so.addParam("allowScriptAccess", "sameDomain");');
    document.write('so.addParam("devicefont", "true");');
    document.write('so.addParam("wmode", "transparent");');
    document.write('so.write("' + elementid + '")');
    document.write('</script>');
    
}

function WritePlayer(width,height,flashvars,player,bgcolor){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="allowFullScreen" value="true" />');
document.write('<param name="devicefont" value="true" />');
document.write('<param name="movie" value="'+player+'" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="bgcolor" value="'+bgcolor+'" />');
document.write('<param name="FlashVars" value="'+flashvars+'"/>');
document.write('<param name="wmode" value="transparent" />');
document.write('<embed src="'+player+'" FlashVars="'+flashvars+'" quality="high" wmode="transparent" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" allowScriptAccess="sameDomain" allowFullScreen="true" devicefont="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}



