/* [引　数]
 * @param fpas ムービーへのパス（相対パス可）
 * @param width ムービーの幅
 * @param height ムービーの高さ
 * @param f_controll コントロール表示の有無 "true" | "false"
 * @param f_auto 自動再生の有無 "true" | "false"
 * @param f_status ステータスバー表示の有無 "true" | "false"
*/
function CreateWindowsMediaPlayerObj(fpass,width,height,f_controll,f_auto,f_status){
    htm="";
    if(f_controll=="true"){ // コントロール表示の場合はコントロールの高さ(45px)をプラス
        height=eval(height+45);
    }
    if(f_status=="true"){ // ステータスバー表示の場合はステータスバーの高さ(24px)をプラス
        height=eval(height+24);
    }
    //OBJECT TAG
    htm+="<object";
    htm+=" id='WMP'";
    htm+=" width='"+width+"' height='"+height+"'";
    htm+=" classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'";
    htm+=" codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715'";
    htm+=" standby='Loading MicrosoftR WindowsR Media Player components...'";
    htm+=" type='application/x-oleobject'>\n";
    htm+="<param name='FileName' value='"+fpass+"'>\n";
    htm+="<param name='ShowControls' value='"+f_controll+"'>\n";
    htm+="<param name='AutoStart' value='"+f_auto+"'>\n";
    htm+="<param name='ShowStatusBar' value='"+f_status+"'>\n";
    htm+="<param name='AllowChangeDisplaySize' value='true'>\n";
    htm+="<param name='AutoSize' value='true'>\n";
    htm+="<param name='DisplaySize' value='4'>\n";
    //EMBED TAG
    htm+="<embed name='WMP' type='application/x-mplayer2'";
    htm+=" pluginspage='http://www.microsoft.com/Windows/MediaPlayer/'";
    htm+=" src='"+fpass+"'";
    htm+=" width='"+width+"' height='"+height+"'";
    htm+=" showcontrols='"+((f_controll=="true")?1:0)+"'";
    htm+=" autostart='"+((f_auto=="true")?1:0)+"'";
    htm+=" showstatusbar='"+((f_status=="true")?1:0)+"'>\n";
    htm+="</embed>\n";
    htm+="</object>\n";
    document.write(htm);
}

/* [引　数]
 * @param fpas ムービーへのパス（外部JSファイルからの相対パス）
 * @param width ムービーの幅
 * @param height ムービーの高さ
 * @param bgcolor 背景色
*/
function CreateFlashObj(fpass,width,height,bgcolor){
    htm="";
    htm+="<object id='FLVPlayer' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0'";
    htm+=" width='"+width+"' height='"+height+"' align='middle'>";
    htm+="<param name='allowScriptAccess' value='sameDomain'>\n";
    htm+="<param name='"+bgcolor+"' value='#ffffff'>\n";
    htm+="<param name='movie' value='FLVPlayer_Progressive.swf' />\n";
    htm+="<param name='salign' value='lt' />\n";
    htm+="<param name='quality' value='high' />\n";
    htm+="<param name='scale' value='noscale' />\n";
    htm+="<param name='FlashVars' value='&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName="+fpass+"&autoPlay=true&autoRewind=true' />\n";
    htm+="<embed";
    htm+=" name='FLVPlayer'";
    htm+=" src='FLVPlayer_Progressive.swf'";
    htm+=" flashvars='&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName="+fpass+"&autoPlay=true&autoRewind=true'";
    htm+=" quality='high'";
    htm+=" bgcolor='"+bgcolor+"'";
    htm+=" width='"+width+"' height='"+height+"'";
    htm+=" scale='noscale'";
    htm+=" salign='LT'";
    htm+=" align='middle'";
    htm+=" allowScriptAccess='sameDomain'";
    htm+=" type='application/x-shockwave-flash'";
    htm+=" pluginspage='http://www.macromedia.com/go/getflashplayer'>\n";
    htm+="</embed>\n";
    htm+="</object>\n";
    document.write(htm);
}