﻿// JScript File

function runSWF(archivo, ancho, alto, version, bgcolor, id, menu, FlashVars, quality, allowScriptAccess) {
    
    if(version!=""){
        var version_data=version;
    }else{
        var version_data="6,0,0,0";
    }
    
    if(menu!=""){
        menu_data=menu;
    }else{
        menu_data=false;
    }
    
    if(bgcolor!=""){
        var bgcolor_data=bgcolor;
    }else{
        var bgcolor_data="#FFFFFF";
    }
    
    if(id!=""){
        id_data=id;
    }else{
        id_data="flashMovie";
    }
    
    if(quality!=""){
        quality_data=quality;
    }else{
        quality_data="high";
    }
    
    if(allowScriptAccess!=""){
        allowScriptAccess_data=allowScriptAccess;
    }else{
        allowScriptAccess_data="always";
    }
    var quality="high"; // calidad de visualización de la peli
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version= '+version_data+'" width='+ancho+' height='+alto+' id='+id_data+'>\n');
    document.write('<param name="movie" value='+archivo+'>\n');
    document.write('<param name= "allowScriptAccess" value= '+allowScriptAccess_data+'>\n');
    document.write('<param name="quality" value='+quality_data+'>\n');
    document.write('<param name="FlashVars" value='+FlashVars+'>\n');
    document.write('<param name="bgcolor" value='+bgcolor_data+'>\n');
    document.write('<param name="menu" value='+menu_data+' >\n');
    document.write('<embed src='+archivo+' bgcolor='+bgcolor_data+' FlashVars='+FlashVars+' menu='+menu_data+' allowScriptAccess='+allowScriptAccess_data+' quality='+quality_data+' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='+ancho+' height='+alto+' swLiveConnect=true name='+id_data+'></embed>');
    document.write('</object>\n');
}

function videoYuring(videoUrl, videoCode, width, height)
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version= 8,0,0,0" id="#230" height="'+height+'" width="'+width+'">');
    document.write('<param name="movie" value="'+videoUrl+'">');
    document.write('<param name="allowScriptAccess" value="always">');
    document.write('<param name="quality" value="high">');
    document.write('<param name="FlashVars" value="vid='+videoCode+'">');
    document.write('<param name="bgcolor" value="#ffffff">');
    document.write('<param name="menu" value="true">');
    document.write('<embed src="'+videoUrl+'" bgcolor="#ffffff" flashvars="vid='+videoCode+'" menu="true" allowscriptaccess="always" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" name="#230" height="'+height+'" width="'+width+'"></object>');
}

function videoYouTube(videoCode, width, height)
{

//    document.write('<object width="'+width+'" height="'+height+'">');
//    document.write('<param name="movie" value="http://www.youtube.com/v/'+videoCode+'&rel=1"></param>');
//    document.write('<param name="wmode" value="transparent"></param>');
//    document.write('<embed src="http://www.youtube.com/v/'+videoCode+'&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="'+width+'" height="'+height+'"></embed>');
//    document.write('</object>');
    
    document.write('<object width="'+width+'" height="'+height+'">');
    document.write('<param name="movie" value="http://www.youtube.com/v/'+videoCode+'"></param>');
    document.write('<param name="wmode" value="transparent"></param>');
    document.write('<embed src="http://www.youtube.com/v/'+videoCode+'" type="application/x-shockwave-flash" wmode="transparent" width="'+width+'" height="'+height+'"></embed>');
    document.write('</object>');
}

function videoGoogle(videoCode, width, height)
{
    document.write('<embed style="width:'+width+'px; height:'+height+'px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId='+videoCode+'" flashvars=""> </embed>');
}

function videoStage6(videoCode, width, height)
{
    document.write('<object codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab" height="'+height+'" width="'+width+'" classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616">');
    document.write('<param name="autoplay" value="false"><param name="src" value="http://video.stage6.com/'+videoCode+'/.divx" />');
    document.write('<param name="custommode" value="Stage6" />');
    document.write('<param name="showpostplaybackad" value="false" />');
    document.write('<embed type="video/divx" src="http://video.stage6.com/'+videoCode+'/.divx" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6" autoplay="false" height="'+height+'" width="'+width+'" />');
    document.write('</object>');
}
