﻿function play_movie(width, height, basepath, filepath)
{
  document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + width + "\" height=\"" + height + "\" id=\"FLVPlayer\">");
  document.write("<param name=\"movie\" value=\"" + basepath + "flashplayer/flvplayer.swf\" />");
  document.write("<param name=\"salign\" value=\"lt\" />");
  document.write("<param name=\"quality\" value=\"high\" />");
  document.write("<param name=\"scale\" value=\"noscale\" />");
  document.write("<param name=\"FlashVars\" value=\"&MM_ComponentVersion=1&skinName=" + basepath + "flashplayer/skin&streamName=" + basepath + filepath + "&autoPlay=true&autoRewind=true\" />");
  document.write("<embed src=\"" + basepath + "flashplayer/flvplayer.swf\" flashvars=\"&MM_ComponentVersion=1&skinName=" + basepath + "flashplayer/skin&streamName=" + basepath + filepath + "&autoPlay=true&autoRewind=true\" quality=\"high\" scale=\"noscale\" width=\"" + width + "\" height=\"" + height + "\" name=\"FLVPlayer\" salign=\"LT\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
  document.write("</object>");
}

function play_flash(width, height, basepath, filepath)
{
      document.write("<object codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" height=\"" + height + "\" width=\"" + width + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">");
      document.write("<param name=\"_cx\" value=\"20505\"/>");
      document.write("<param name=\"_cy\" value=\"2646\"/>");
      document.write("<param name=\"FlashVars\" value=\"\"/>");
      document.write("<param name=\"Movie\" value=\"" + basepath + filepath + "\"/>");
      document.write("<param name=\"Src\" value=\"" + basepath + filepath + "\"/>");
      document.write("<param name=\"WMode\" value=\"Transparent\"/>");
      document.write("<param name=\"Play\" value=\"-1\"/>");
      document.write("<param name=\"Loop\" value=\"-1\"/>");
      document.write("<param name=\"Quality\" value=\"High\"/>");
      document.write("<param name=\"SAlign\" value=\"\"/>");
      document.write("<param name=\"Menu\" value=\"-1\"/>");
      document.write("<param name=\"Base\" value=\"\"/>");
      document.write("<param name=\"AllowScriptAccess\" value=\"\"/>");
      document.write("<param name=\"Scale\" value=\"ShowAll\"/>");
      document.write("<param name=\"DeviceFont\" value=\"0\"/>");
      document.write("<param name=\"EmbedMovie\" value=\"0\"/>");
      document.write("<param name=\"BGColor\" value=\"\"/>");
      document.write("<param name=\"SWRemote\" value=\"\"/>");
      document.write("<param name=\"MovieData\" value=\"\"/>");
      document.write("<param name=\"SeamlessTabbing\" value=\"1\"/>");
      document.write("<param name=\"Profile\" value=\"0\"/>");
      document.write("<param name=\"ProfileAddress\" value=\"\"/>");
      document.write("<param name=\"ProfilePort\" value=\"0\"/>");
      document.write("<param name=\"AllowNetworking\" value=\"all\"/>");
      document.write("<param name=\"AllowFullScreen\" value=\"false\"/>");
      document.write("<embed src=\"" + basepath + filepath + "\" height=\"" + height + "\" width=\"" + width + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\"></embed>");
      document.write("</object>");
}

function play_images(pics, links, texts,width,height,textheight)
{
    var focus_width = width;  //在这儿设置图片宽度
    var focus_height = height; //在这儿设置图片高度
    var text_height = textheight;   //在这儿设置文本高度
    var swf_height = focus_height + text_height;
    
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/preach/picer.swf"><param name="quality" value="high"><param name="bgcolor" value="#EBF3FA">');
    document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
    document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
    document.write('<embed src="/molive/webjsp/flash/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#EBF3FA" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</object>');
}

function play_pics(pics, links, texts)
{
    var focus_width = 455;  //在这儿设置图片宽度    
    var focus_height = 202; //在这儿设置图片高度    
    var text_height = 18;   //在这儿设置文本高度
    var swf_height = focus_height + text_height;
    
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
    document.write('<param name="allowScriptAccess" value="samedomain"><param name="movie" value="/preach/picer.swf"><param name="quality" value="high"><param name="bgcolor" value="#EBF3FA">');
    document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
    document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
    document.write('<embed src="/preach/picer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#EBF3FA" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="samedomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</object>');
}

//function play_images(pics,links,texts)
//{
//    var pic_width=455; //图片宽度
//    var pic_height=220; //图片高度
//    var button_pos=4; //按扭位置 1左 2右 3上 4下    var stop_time=3000; //图片停留时间(1000为1秒钟)
//    var show_text=0; //是否显示文字标签 1显示 0不显示    var txtcolor="000000"; //文字色    var bgcolor="DDDDDD"; //背景色   
//    var swf_height=show_text==1?pic_height+20:pic_height;
//    
//    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cabversion=6,0,0,0" width="'+ pic_width +'" height="'+ swf_height +'">');
//    document.write('<param name="movie" value="focus.swf">');
//    document.write('<param name="quality" value="high"><param name="wmode" value="opaque">');
//    document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+pic_width+'&pic_height='+pic_height+'&show_text='+show_text+'&txtcolor='+txtcolor+'&bgcolor='+bgcolor+'&button_pos='+button_pos+'&stop_time='+stop_time+'">');
//    document.write('<embed src="focus.swf" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+pic_width+'&pic_height='+pic_height+'&show_text='+show_text+'&txtcolor='+txtcolor+'&bgcolor='+bgcolor+'&button_pos='+button_pos+'&stop_time='+stop_time+'" quality="high" width="'+ pic_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
//    document.write('</object>');
//}

