1. <html>
  2. <head>
  3. <title>网页背景音乐播放器-http://www.wscxy.com-QQ:124727276</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta http-equiv="Content-Language" content="UTF-8">
  6. <style>
  7. <!--
  8. body{padding:0px;margin:0px;overflow:hidden}
  9. button{font-family:webdings}
  10. .btnSpanL{float:left;cursor:hand;font-family:webdings;font-size:9pt;width:16;height:15;background-color:silver;color:black;border:gray 2px outset;border-right-width:1px;text-align:center;margin:0px;padding:0px}
  11. .btnSpan{float:left;cursor:hand;font-family:webdings;font-size:9pt;width:16;height:15;background-color:silver;color:black;border:gray 2px outset;border-left-width:0px;border-right-width:1px;text-align:center;margin:0px;padding:0px}
  12. .btnSpanR{float:left;cursor:hand;font-family:webdings;font-size:9pt;width:16;height:15;background-color:silver;color:black;border:gray 2px outset;border-left-width:0px;text-align:center;margin:0px;padding:0px}
  13. -->
  14. </style>
  15. <!-- 播放曲目列表文件,请按实际情况修改 -->
  16. <script language="javascript" src="playList.js"></script>
  17. <script language="javascript">
  18. <!--
  19. /**************************************************************
  20. * 设计制作:shosh (即曾经的mesecretme)
  21. * 作者Site:http://www.wscxy.com/
  22. * 作者QQ:  124727276
  23. * 制作时间:2007年12月下旬
  24. * 本播放器使用者请保留此版权信息,谢谢!
  25. **************************************************************/
  26. var curPlayIndex = 0;  //当前播放的曲目
  27. var manStopped = false;    //是否人工停止播放,或是播放完毕停止,帮助判断是否自动播放下一曲
  28. var timeOutNoDisp; //setTimeout变量,控制播放器控制按钮是否显示
  29. var volInterval;   //setInterval变量,用于控制是否继续改变音量
  30. var playPosInterval;   //setInterval变量,用于控制是否继续快进或快退
  31. //如果想按顺序播放,请将playKinds的值改成2
  32. var playKinds = 0; //0:所有循环1:随机2:单曲循环  //默认值+1为最后的默认值
  33. var playKindsState = "所有循环";
  34. var errCheckTimes = 0; //打开失败控制
  35. var quickBackFor = 0;  //0:关闭快进快退;>0:快进中;<0:快退中;
  36. var infoReporter = 0;  //控制显示信息
  37. var lastSortType = -1;
  38. var theReporter = " (状态栏显示播放信息及简要操作提示)";   //显示信息
  39. var songNumPerPage = 10;   //每页显示的数目>0
  40. var gWinForPlayList;       //记录播放列表窗口
  41. var gWinForPlayListType;   //0没有 1播放列表 2搜索窗口 3歌词窗口
  42. var childAotuShow = true;
  43.  
  44. var initKeyword = "请输入关键字";
  45. var initSearchType = 3;        //1歌名2歌手3both
  46. var bBusyNoAutoShow = false;   //当搜索或排序中为true
  47. var timeoutDelayAutoShow;  //有时候不能够及时更新列表窗口(比如处于显示歌词或搜索结果状态),用于记录timer,该timer设定一定时间再尝试更新
  48. /*回放功能说明:
  49. 按前后键按照回放列表进行播放的前提条件是:播放模式为随机,按上一首按钮启动该功能(可以按停止播放按钮关闭该功能)
  50. 在随机播放模式下:
  51. 若当前回放列表中只有a,第一次按<-,播放a,第二次按<-,播放b,继续则:abababa……
  52. 若当前回放列表中有abcdef,则第一次按<-,播放e(而不是f,这样才感觉播放到了上一首),继续则:dcbafedcbafedc……
  53. 接上一种情况,在回放过程中,多次按了<-,播放了……dcbafedcbafedc,如果此时按->,则播放d,继续连续->,efghi,即f后面的随机生成,这是跟<-不一样的地方(<-会循环向前)
  54. 同样,如果不想在回放过程中按->一直到回放列表的最后才开始随机播放,可以先按停止播放按钮关闭回放模式(如果再按<-重新启动回放模式),然后按->一下即可随机播放歌曲。
  55. 回放列表允许曲目重复,但是相邻曲目不会重复
  56. */
  57. var shoPlayBackList = new Array(); //add the function of play back
  58. var shoCurBackIndex = -1;      //the current index of play back list
  59. var shoIsBackPlayMode = false;     //只有在随机模式下按<-才会设为true,在true的时候播放上一首和下一首的时候会先从回放列表读取
  60. this.name = "ShoshWebPageBackgroundMusicPlayer";
  61.  
  62. if (undefined == musicList)
  63. {
  64.     var musicList = new Array();
  65.     musicList[0] = new Array("http://www.917y.com/tz.mp3", "同桌的你", "老狼", 13947, -15000);
  66.     musicList[1] = new Array("http://server.wxsbxx.com/XSPD/MUSIC/mp3/ny/chumai.mp3", "出卖", "那英", 17120, 0);
  67.     musicList[2] = new Array("http://125.46.42.151/pub_music/divide_part_44/e792a542a731a756ff017667d43b5c16a1fa2ac3.mp3", "怎样", "戴佩妮", 33197, 1500);
  68.     musicList[3] = new Array("http://hflz.com/music/content/chinese/bld/love.mp3", "爱就一个字", "张信哲", 42625, 0);
  69.     musicList[4] = new Array("http://www.lygame.com/onlinemusic/forlygame/029.%BA%C3%D0%C4%B7%D6%CA%D6.mp3", "好心分手", "卢巧音", 49192, 3000);
  70.     musicList[5] = new Array("http://jy.hlj.stats.gov.cn/XiuXianShiGuang/xxsg2006032819-01.mp3", "冰雨", "刘德华", 13904, 0);
  71.     musicList[6] = new Array("http://61.155.11.85/music/20070727_1(fybh).mp3", "我们说好的", "张靓颖", 68555, 0);
  72. }
  73.  
  74. function cmpBySingerAsc(a, b)   //先歌手顺序后歌名顺序
  75. {
  76.     var result = a[2].toUpperCase().localeCompare(b[2].toUpperCase());
  77.     if (0 == result)
  78.         result = a[1].toUpperCase().localeCompare(b[1].toUpperCase());
  79.     return result;
  80. }
  81. function cmpBySingerDesc(b, a)  //先歌手逆序后歌名逆序
  82. {
  83.     var result = a[2].toUpperCase().localeCompare(b[2].toUpperCase());
  84.     if (0 == result)
  85.         result = a[1].toUpperCase().localeCompare(b[1].toUpperCase());
  86.     return result;
  87. }
  88.  
  89. function cmpByWordNumAsc(a, b)  //先字数顺序后歌名顺序,一个单词或一个数字算一个字
  90. {
  91.     var alen = a[1].replace(/[^\u0000-\u00ff]/g, " s ").replace(/\b([a-z0-9]+)\b/gi, "s").replace(/\s/g, "").length;
  92.     var blen = b[1].replace(/[^\u0000-\u00ff]/g, " s ").replace(/\b([a-z0-9]+)\b/gi, "s").replace(/\s/g, "").length;
  93.     if (alen != blen)
  94.         return (alen - blen);
  95.     return a[1].toUpperCase().localeCompare(b[1].toUpperCase());
  96. }
  97. function shoSortList(sortType)
  98. {
  99.     if (lastSortType == sortType)
  100.         return;
  101.     var resorted = true;
  102.     var theIdUrl = musicList[curPlayIndex][0];
  103.     bBusyNoAutoShow = true;
  104.     switch (sortType)
  105.     {
  106.     case 1: //按歌名顺序
  107.         musicList.sort(function(a, b){return a[1].toUpperCase().localeCompare(b[1].toUpperCase())});
  108.         break;
  109.     case 2: //按歌名逆序
  110.         musicList.sort(function(a, b){return b[1].toUpperCase().localeCompare(a[1].toUpperCase())});
  111.         break;
  112.     case 3: //按歌手顺序
  113.         musicList.sort(cmpBySingerAsc);
  114.         break;
  115.     case 4: //按歌手逆序
  116.         musicList.sort(cmpBySingerDesc);
  117.         break;
  118.     case 5: //按字数顺序
  119.         musicList.sort(cmpByWordNumAsc);
  120.         break;
  121.     default:
  122.         resorted = false;
  123.         break;
  124.     }
  125.     if (resorted)
  126.     {
  127.         shoPlayBackList.splice(0, shoPlayBackList.length);
  128.         shoCurBackIndex = -1;
  129.         shoIsBackPlayMode = false;
  130.         lastSortType = sortType;
  131.         for (var i = musicList.length - 1; i >= 0; i--)
  132.         {
  133.             if (theIdUrl == musicList[i][0])
  134.             {
  135.                 curPlayIndex = i;
  136.                 shoPlayBackList.concat(curPlayIndex);  //其他参数在循环前已经设置好
  137.                 break;
  138.             }
  139.         }   
  140.         setListWindow(-33);
  141.     }
  142.     bBusyNoAutoShow = false;
  143. }
  144.         
  145. function setBody()
  146. {
  147. //main body to display
  148.     var url = decodeURI(unescape(document.location.toString())).match(/\$\$\$([^(&&)]*)&&/g);
  149.     if(null != url)
  150.     {
  151.         url[0] = url[0].substring(3,url[0].length-2);
  152.         url[0] = url[0].replace(/(^[\s| ]*)|([\s| ]*$)/g, "");
  153.         if ("" != url[0])
  154.             document.getElementById("mainFrm").src = url[0];
  155.         if (url.length > 1 && document.getElementById("footprint"))
  156.         {
  157.             url[1] = decodeURI(url[1].substring(3, url[1].length - 2));
  158.             url[1] = url[1].replace(/ /g, " ");
  159.             if ("" != url[1].replace(/\s/ig,""))    //允许空格,但是不能够全空。
  160.             {
  161.                 if (url[1].match(/\s$/))
  162.                     url[1] += " ";
  163.                 document.getElementById("footprint").innerText = url[1];
  164.             }
  165.         }
  166.     }
  167.     else
  168.     {
  169.         //请设置成你的网站的默认地址,如 http://www.mysite.com/index.aspx
  170.         document.getElementById("mainFrm").src = "http://www.wscxy.com/shosh/";
  171.     }
  172. //background music
  173.     var myPlayer = document.getElementById("shoPlayer");
  174.     if (1 == (playKinds + 1) % 3 && musicList.length > 1)   //一开始就随机,否则从初始化的值(一般是0)开始
  175.     {
  176.         curPlayIndex = Math.floor(Math.random() * musicList.length);
  177.     }
  178.     if (myPlayer)
  179.     {
  180.         myPlayer.url = musicList[curPlayIndex][0];
  181.         if (0 == shoPlayBackList.length || curPlayIndex != shoPlayBackList[shoPlayBackList.length - 1]) //不能够调换顺序
  182.             shoPlayBackList = shoPlayBackList.concat(curPlayIndex);
  183.         shoIsBackPlayMode = false;
  184.         shoCurBackIndex = -1;
  185.         if (10 == shoPlayer.playState)
  186.         {
  187.             myPlayer.controls.play();
  188.             setRandPlay(); //保证对应,结果为变量初始值+1
  189.             switchQuickOrNext();   //设置快进或下一曲
  190.             setInterval("showProgress('m')", 1000);
  191.         }
  192.     }
  193. }
  194. window.onerror=new function(){return true;}
  195. function switchQuickOrNext()
  196. {
  197.     var obj;
  198.     if (2 == playKinds || musicList.length < 2) //单曲播放,快进
  199.     {
  200.         obj = document.getElementById("PreAndBack");
  201.         if (obj)
  202.         {
  203.             obj.innerText = "7";
  204.             obj.title = "快退";
  205.         }
  206.         obj = document.getElementById("NextAndForward");
  207.         if (obj)
  208.         {
  209.             obj.innerText = "8";
  210.             obj.title = "快进";
  211.         }
  212.     }
  213.     else
  214.     {
  215.         obj = document.getElementById("PreAndBack");
  216.         if (obj)
  217.         {
  218.             obj.innerText = "9";
  219.             obj.title = "上一首";
  220.         }
  221.         obj = document.getElementById("NextAndForward");
  222.         if (obj)
  223.         {
  224.             obj.innerText = ":";
  225.             obj.title = "下一首";
  226.         }
  227.     }
  228. }
  229.  
  230. function shoPause()
  231. {
  232.     if (3 == shoPlayer.playState)
  233.         shoPlayer.controls.pause();
  234.     else if (2 == shoPlayer.playState)
  235.         shoPlayer.controls.play();
  236. }
  237.  
  238. function getState(state)
  239. {
  240.     switch (state)
  241.     {
  242.         case 1: return "[播放已停止";
  243.         case 2:
  244.             if (0 == quickBackFor)
  245.                 return "[播放已暂停";
  246.             else if (quickBackFor > 0)
  247.                 return "[快进中...";
  248.             else
  249.                 return "[快退中...";
  250.         case 3: return "[正在播放...";
  251.         case 4: return "[向前搜索中...";
  252.         case 5: return "[向后搜索中...";
  253.         case 6: return "[缓冲处理中...";
  254.         case 7: return "[等待反应中...";
  255.         case 8: return "[已播放完毕";
  256.         case 9: return "[连接媒体中...";
  257.         case 10: return "[已准备就绪";
  258.         default: return "[数据读取中...";
  259.     }
  260. }
  261. function setInfo()
  262. {
  263.     infoReporter = ++infoReporter % 48;
  264.     switch (infoReporter)
  265.     {
  266.         case 0:
  267.             theReporter = " (设计制作:shosh)";
  268.             break;
  269.         case 4:
  270.             theReporter = " (作者Site:http:\/\/www.wscxy.com)";
  271.             break;
  272.         case 10:
  273.             theReporter = " (作者QQ:124727276)";
  274.             break;
  275.         case 15:
  276.             theReporter = " (最后修改时间:" + document.lastModified + ")";
  277.             break;
  278.         case 20:
  279.             theReporter = " (最后修改内容:重新排序后添加当前播放歌曲到回放列表。)";
  280.             break;
  281.         case 25:
  282.             theReporter = " (鼠标移至页面左上角显示播放器界面)";
  283.             break;
  284.         case 30:
  285.             theReporter = " (在播放器界面上右击鼠标可打开曲目列表窗口)";
  286.             break;
  287.         case 35:
  288.             theReporter = " (在曲目列表窗口可进行播放、排序、查找等各种操作)";
  289.             break;
  290.         case 40:
  291.             theReporter = " (08年2月4日成功完成滚动显示歌词功能)";
  292.             break;
  293.         default:
  294.             break; //do nothing
  295.     }
  296. }
  297. var maxErrTryTimes = 15;   //定义尝试连接播放的次数(时间)
  298. function showProgress(id)
  299. {
  300.     //debug info//
  301.     //top.document.title = shoPlayBackList.toString() + " : " + shoPlayBackList[shoCurBackIndex] + " \/ " + curPlayIndex;
  302.     top.status = getState(shoPlayer.playState);
  303.     if (10 == shoPlayer.playState && errCheckTimes > 0 && errCheckTimes < maxErrTryTimes - 3)   //快速判断
  304.         errCheckTimes = maxErrTryTimes - 3;
  305.     if (errCheckTimes > 0 && shoPlayer.playState > 5)
  306.         top.status += maxErrTryTimes - errCheckTimes;
  307.     else
  308.         errCheckTimes = 0;
  309.     top.status += "|" + playKindsState;
  310.     top.status += shoPlayer.settings.mute ? "|静音] " : "] ";
  311.     top.status += musicList[curPlayIndex][1] + "-" + musicList[curPlayIndex][2] + "  ";
  312.     if (shoPlayer.controls.currentPositionString && shoPlayer.currentMedia.durationString)
  313.         top.status += shoPlayer.controls.currentPositionString + "\/" + shoPlayer.currentMedia.durationString;
  314.     else
  315.         top.status += "00:00\/00:00";
  316.     if (!volInterval)
  317.     {
  318.         setInfo();
  319.         top.status += theReporter;
  320.     }   
  321.     if (!manStopped && "m" == id)
  322.     {
  323.         if (1 == shoPlayer.playState)
  324.         {   
  325.             playNextSong(true);
  326.         }
  327.         else if (shoPlayer.playState > 5)
  328.         {
  329.             if(++errCheckTimes > maxErrTryTimes)    //无法播放,继续
  330.             {
  331.                 errCheckTimes = 0;     
  332.                 top.status = musicList[curPlayIndex][1] + "-" + musicList[curPlayIndex][2] + ":无法播放,尝试" + ((musicList.length > 1 && playKinds != 2) ? "播放下一曲..." : "再次连接打开...");
  333.                 shoIsBackPlayMode = false;
  334.                 shoCurBackIndex = -1;
  335.                 playNextSong(true);
  336.             }
  337.         }
  338.     }
  339. }
  340. function playSpSong(theValue)
  341. {
  342.     clearAllQuickInterval();
  343.     theValue = parseInt(theValue)
  344.     if (theValue < 0 || theValue >= musicList.length)
  345.         return;
  346.     errCheckTimes = 0;
  347.     curPlayIndex = theValue;
  348.     shoPlayer.url = musicList[curPlayIndex][0];
  349.     if (shoPlayBackList.length == 0 || curPlayIndex != shoPlayBackList[shoPlayBackList.length - 1]) //不能够调换顺序
  350.         shoPlayBackList = shoPlayBackList.concat(curPlayIndex);
  351.     shoIsBackPlayMode = false;
  352.     shoCurBackIndex = -1;
  353.     chkSetListWindow();
  354.     if (shoPlayer.playState == 10)
  355.         shoPlayer.controls.play();
  356. }
  357.  
  358. var intvalLrcQuickBack = null;
  359. var intvalLrcQuickForth = null;
  360. function clearAllQuickInterval(noResetBtnText)
  361. {
  362.     if (intvalLrcQuickForth)
  363.     {
  364.         clearInterval(intvalLrcQuickForth);
  365.     }
  366.     if (intvalLrcQuickBack)
  367.     {
  368.         clearInterval(intvalLrcQuickBack);
  369.     }
  370.     if (playPosInterval)
  371.     {
  372.         clearInterval(playPosInterval);
  373.         //shoPlayer.controls.play();
  374.     }
  375.     intvalLrcQuickForth = intvalLrcQuickBack = playPosInterval = null;
  376.     quickBackFor = 0;  //标记未处于快进快退中
  377.     if (!noResetBtnText)
  378.     {
  379.         try
  380.         {
  381.             if (gWinForPlayList && gWinForPlayListType == 3)
  382.             {
  383.                 gWinForPlayList.document.getElementById("lrcBtnQuickBack").innerText = "7";
  384.                 gWinForPlayList.document.getElementById("lrcBtnQuickForth").innerText = "8";
  385.             }
  386.         }catch(e){}
  387.     }
  388. }
  389. function lrcQuickBack(who)
  390. {
  391.     clearAllQuickInterval(true);
  392.     try
  393.     {
  394.         if (who)
  395.         {
  396.             var obj = who.document.getElementById("lrcBtnQuickBack");
  397.             if ("7" == obj.innerText && shoPlayer.controls.currentPosition && shoPlayer.playState < 6)
  398.             {
  399.                 obj.innerText = "4";
  400.                 shoPlayer.controls.pause();
  401.                 quickBackFor = -1;
  402.                 intvalLrcQuickBack = setInterval("setCurPosition(-1)", 100);
  403.             }
  404.             else
  405.             {
  406.                 shoPlayer.controls.play();
  407.                 obj.innerText = "7";
  408.             }
  409.             who.document.getElementById("lrcBtnQuickForth").innerText = "8";
  410.         }
  411.     }catch(e){}
  412. }
  413. function lrcQuickForth(who)
  414. {
  415.     clearAllQuickInterval(true);
  416.     try
  417.     {
  418.         if (who)
  419.         {
  420.             var obj = who.document.getElementById("lrcBtnQuickForth");
  421.             if ("8" == obj.innerText && shoPlayer.controls.currentPosition && shoPlayer.playState < 6)
  422.             {
  423.                 shoPlayer.controls.pause();
  424.                 quickBackFor = 1;
  425.                 intvalLrcQuickForth = setInterval("setCurPosition(1)", 100);
  426.                 obj.innerText = "4";
  427.             }
  428.             else
  429.             {
  430.                 shoPlayer.controls.play();
  431.                 obj.innerText = "8";
  432.             }
  433.             who.document.getElementById("lrcBtnQuickBack").innerText = "7";
  434.         }
  435.     }catch(e){}
  436. }
  437.  
  438. function lrcPlayPrev()
  439. {
  440.     var temPlayKind = playKinds;
  441.     if (2 == temPlayKind)
  442.         playKinds = 1; //单曲变随机
  443.     playPrevSong();
  444.     playKinds = temPlayKind;
  445. }
  446.  
  447. function lrcPlayNext()
  448. {
  449.     var temPlayKind = playKinds;
  450.     if (2 == temPlayKind)
  451.         playKinds = 1; //单曲变随机
  452.     playNextSong();
  453.     playKinds = temPlayKind;
  454. }
  455.  
  456.  
  457. function playNextSong(noFreshStatus)    //该参数一般为false(未传入),当一曲播放失败会显示信息,传入true,要求不要立即更新显示播放信息
  458. {
  459.     clearAllQuickInterval();
  460.     if (2 == playKinds || musicList.length < 2) //单曲循环
  461.     {
  462.         if (noFreshStatus)  //播放完一曲继续从头播放,noFreshStatus为true正说明不是用户手动按下按钮调用该事件的
  463.         {
  464.             shoPlayer.controls.stop();
  465.             shoPlayer.controls.play();
  466.             showProgress();
  467.         }
  468.         else if (shoPlayer.controls.currentPosition && shoPlayer.playState < 6 )    //快进
  469.         {
  470.             shoPlayer.controls.pause();
  471.             if (quickBackFor >= 0)
  472.                 quickBackFor++;    //标记快退
  473.             else
  474.                 quickBackFor = 1;  //正常情况下不会这样,快退时按了快进
  475.             //if (playPosInterval)      //先停止后加速
  476.             //  clearInterval(playPosInterval);
  477.             playPosInterval = setInterval("setCurPosition(" + quickBackFor + ")", 100);
  478.             //shoPlayer.controls.fastForward();
  479.         }
  480.         return;
  481.     }
  482.     
  483.     errCheckTimes = 0;
  484.     if (1 == playKinds && shoIsBackPlayMode && shoCurBackIndex >= 0 &&  shoCurBackIndex < shoPlayBackList.length - 1)   //按回放列表播放下一首
  485.     {
  486.         curPlayIndex = shoPlayBackList[++shoCurBackIndex];
  487.     }
  488.     else
  489.     {
  490.         if (1 == playKinds) //随机
  491.         {
  492.             var temIndex = curPlayIndex;
  493.             while (curPlayIndex == temIndex)
  494.             {
  495.                 temIndex = Math.floor(Math.random() * musicList.length);
  496.             }
  497.             curPlayIndex = temIndex;
  498.         }
  499.         else    //所有循环
  500.             curPlayIndex = (curPlayIndex + 1) % musicList.length;
  501.         if (0 == shoPlayBackList.length || curPlayIndex != shoPlayBackList[shoPlayBackList.length - 1]) //不能够调换顺序
  502.             shoPlayBackList = shoPlayBackList.concat(curPlayIndex);
  503.         shoIsBackPlayMode = false;
  504.         shoCurBackIndex = -1;
  505.     }
  506.     shoPlayer.url = musicList[curPlayIndex][0];
  507.     chkSetListWindow();
  508.     if (!noFreshStatus) //先显示播放失败信息,所以不要更新
  509.         showProgress();    //for quick show the song name
  510.     if (10 == shoPlayer.playState)
  511.         shoPlayer.controls.play();
  512. }
  513. function playPrevSong()
  514. {
  515.     clearAllQuickInterval();
  516.     if ((2 == playKinds || musicList.length < 2))   //单曲循环
  517.     {
  518.         if(shoPlayer.controls.currentPosition && shoPlayer.playState < 6)   //快退
  519.         {
  520.             shoPlayer.controls.pause();
  521.             if (quickBackFor <= 0)
  522.                 quickBackFor--;    //标记快退
  523.             else
  524.                 quickBackFor = -1; //正常情况下不会这样,快进时按了快退
  525.             //if (playPosInterval)      //先停止后加速
  526.             //  clearInterval(playPosInterval);
  527.             playPosInterval = setInterval("setCurPosition(" + quickBackFor + ")", 100);
  528.         }
  529.         return;
  530.     }
  531.     errCheckTimes = 0;
  532.     var doElse = true;
  533.     if (1 == playKinds && shoPlayBackList.length > 0)       //按列表播放上一首
  534.     {
  535.         doElse = false;
  536.         if (shoIsBackPlayMode)
  537.         {
  538.             if (shoPlayBackList.length > 1)
  539.             {
  540.                 shoCurBackIndex--;
  541.                 if (shoCurBackIndex < 0)
  542.                     shoCurBackIndex = shoPlayBackList.length - 1;
  543.                 else
  544.                     shoCurBackIndex %= shoPlayBackList.length; //直接上一首
  545.                 curPlayIndex = shoPlayBackList[shoCurBackIndex];
  546.             }
  547.             else
  548.             {
  549.                 //shoIsBackPlayMode = false;   //只有一首,取消回放模式,set in doElse
  550.                 //shoCurBackIndex = -1;
  551.                 doElse = true;
  552.             }
  553.         }
  554.         else
  555.         {
  556.             if (shoPlayBackList.length > 1)
  557.             {
  558.                 shoIsBackPlayMode = true;
  559.                 shoCurBackIndex = shoPlayBackList.length - 2;  //直接上一首
  560.                 curPlayIndex = shoPlayBackList[shoCurBackIndex];
  561.             }
  562.             else if (1 == shoPlayBackList.length)
  563.             {
  564.                 shoIsBackPlayMode = true;
  565.                 shoCurBackIndex = 0;   //直接上一首
  566.                 curPlayIndex = shoPlayBackList[shoCurBackIndex];
  567.             }
  568.             else
  569.             {
  570.                 doElse = true;
  571.             }
  572.         }
  573.     }
  574.     if (doElse)
  575.     {
  576.         if (1 == playKinds) //随机
  577.         {
  578.             var temIndex = curPlayIndex;
  579.             if (musicList.length > 1)
  580.             {
  581.                 while (curPlayIndex == temIndex)
  582.                 {
  583.                     temIndex = Math.floor(Math.random() * musicList.length);
  584.                 }
  585.                 curPlayIndex = temIndex;
  586.             }
  587.         }
  588.         else    //所有循环
  589.         {
  590.             curPlayIndex--;
  591.             if (curPlayIndex < 0)
  592.                 curPlayIndex = musicList.length - 1;
  593.         }
  594.         if (0 == shoPlayBackList.length || curPlayIndex != shoPlayBackList[shoPlayBackList.length - 1]) //不能够调换顺序
  595.             shoPlayBackList = shoPlayBackList.concat(curPlayIndex);
  596.         shoIsBackPlayMode = false;
  597.         shoCurBackIndex = -1;
  598.         
  599.     }
  600.     showProgress();    //for quick show the song name
  601.     shoPlayer.url = musicList[curPlayIndex][0];
  602.     chkSetListWindow();
  603.     if (10 == shoPlayer.playState)
  604.         shoPlayer.controls.play();
  605. }
  606. function btnPlayMusic()
  607. {
  608.     clearAllQuickInterval();
  609.     errCheckTimes = 0;
  610.     shoPlayer.controls.play();
  611.     manStopped = false; 
  612. }
  613. function btnStopMusic()
  614. {
  615.     clearAllQuickInterval();
  616.     shoPlayer.controls.stop();
  617.     manStopped = true;
  618.     shoCurBackIndex = -1;
  619.     shoIsBackPlayMode = false;
  620. }
  621. function setMute(who)
  622. {
  623.     if (shoPlayer.settings.mute)
  624.     {
  625.         shoPlayer.settings.mute = false;
  626.         who.innerText = "U";
  627.     }
  628.     else
  629.     {
  630.         shoPlayer.settings.mute = true;
  631.         who.innerText = "V";
  632.     }
  633.     showProgress();
  634. }
  635. function volControl(who,offset)
  636. {
  637.     btnClickDown(who);
  638.     if (volInterval)
  639.         clearInterval(volInterval);
  640.     volInterval = setInterval("setVolValue(" + offset + ")", 100);
  641. }
  642. function setVolValue(offset)
  643. {
  644.     if (shoPlayer.settings.mute)
  645.     {
  646.         showProgress();
  647.         top.status += "  请关闭静音状态调节音量。" 
  648.         return;
  649.     }
  650.     var curValue = shoPlayer.settings.volume;
  651.     curValue += offset;
  652.     if (curValue < 0)
  653.     {
  654.         curValue = 0;
  655.         if (volInterval)
  656.             clearInterval(volInterval);
  657.     }
  658.     else if (curValue > 100)
  659.     {
  660.         curValue = 100;
  661.         if (volInterval)
  662.             clearInterval(volInterval);
  663.     }
  664.     shoPlayer.settings.volume = curValue;
  665.     showProgress();
  666.     top.status += "  音量" + (offset>0 ? "增" : "降") + "至 " + curValue + " 。";
  667. }
  668. function setCurPosition(offset)
  669. {
  670.     var curPosition = shoPlayer.controls.currentPosition;
  671.     curPosition += offset;
  672.     if (curPosition <= 0)
  673.     {
  674.         curPosition = 0.1; //保证退到开始处后还能够直接快进
  675.         clearAllQuickInterval(true);
  676.         //playPosInterval = null;
  677.         //quickBackFor = 0;
  678.     }
  679.     else if (curPosition >= shoPlayer.currentMedia.duration)
  680.     {
  681.         curPosition = shoPlayer.currentMedia.duration;
  682.         clearAllQuickInterval(true);
  683.         //playPosInterval = false;
  684.         //quickBackFor = 0;
  685.     }
  686.     shoPlayer.controls.currentPosition = curPosition;
  687.     showProgress();
  688. }
  689.  
  690. //button show functions
  691. function btnMouseOver(who)
  692. {
  693.     if (timeOutNoDisp)
  694.         clearTimeout(timeOutNoDisp);
  695.     if (who)
  696.     {
  697.         who.style.backgroundColor = "gray";
  698.     }
  699. }
  700. function btnMouseOut(who)
  701. {
  702.     timeOutNoDisp=setTimeout("hideCtrlPanel()", 300);
  703.     if (who)
  704.     {
  705.         who.style.backgroundColor = "silver";
  706.         who.style.color = "black";
  707.     }
  708. }
  709. function btnClickDown(who)
  710. {
  711.     if (who)
  712.     {
  713.         who.style.color = "white";
  714.     }
  715. }
  716. function btnClickUp(who)
  717. {
  718.     if (who)
  719.     {
  720.         who.style.color = "black";
  721.     }
  722. }
  723. function setRandPlay()
  724. {
  725.     playKinds = ++playKinds % 3;
  726.     switchQuickOrNext();   //可能需要快进下一曲的切换
  727.     var innerText;
  728.     switch (playKinds)
  729.     {
  730.         case 0:
  731.             playKindsState = "所有循环";
  732.             innerText = "`";
  733.             break;
  734.         case 1:
  735.             playKindsState = "随机";
  736.             innerText = "~";
  737.             break;
  738.         case 2:
  739.             playKindsState = "单曲循环";
  740.             innerText = "q";
  741.             break;
  742.     }
  743.     var who = document.getElementById("PlayState");
  744.     if (who)
  745.         who.innerText = innerText;
  746.     showProgress();
  747. }
  748. function showInformation()
  749. {
  750.     if (window.confirm("播放器信息:\n\tAuther: Shosh\n\tSite: http:\/\/www.wscxy.com\n\tLast Modified: " + document.lastModified + "\n\n点击[确定]显示播放曲目列表(可进行排序搜索查看歌词等操作)\n\n点击[取消]查看更多播放器信息。"))
  751.     {
  752.         if (gWinForPlayList)
  753.         {
  754.             try
  755.             {
  756.                 gWinForPlayList.focus();
  757.             }
  758.             catch(e)
  759.             {
  760.                 setListWindow(-33, true);
  761.             }
  762.         }       
  763.         else
  764.             setListWindow(-33);    //传入-33表示指示当前播放曲目
  765.     }
  766.     else
  767.     {
  768.         document.getElementById("mainFrm").src = "http://www.wscxy.com/shosh/article.asp?id=36"; //请勿修改本地址
  769.     }
  770. }
  771.  
  772. function chkSetListWindow() //当换播歌曲时调用该函数用来处理子窗口
  773. {
  774.     if (!gWinForPlayList)
  775.         return;
  776.     if (childAotuShow && 1 == gWinForPlayListType)
  777.     {
  778.         if(bBusyNoAutoShow)
  779.         {
  780.             if (timeoutDelayAutoShow)
  781.                 clearTimeout(timeoutDelayAutoShow);
  782.             timeoutDelayAutoShow = setTimeout("chkSetListWindow()", 300);
  783.         }
  784.         else
  785.             setListWindow(-33);
  786.     }
  787.     else if (3 == gWinForPlayListType)
  788.     {
  789.         try
  790.         {
  791.             if (false == gWinForPlayList.document.getElementById("stopAutoScroll").checked)
  792.             {
  793.                 showSongLyric(-33);
  794.             }
  795.         }
  796.         catch(e)
  797.         {
  798.             gWinForPlayListType = 1;
  799.         }
  800.     }
  801. }
  802. function setChildWnd(who, shoMusicID)   //shoMusicID仅用于歌词窗口
  803. {
  804.     try
  805.     {
  806.         if (!who)
  807.         {
  808.             who = gWinForPlayList;
  809.             if(!who)
  810.                 return;
  811.         }
  812.         if (1 == gWinForPlayListType || 2 == gWinForPlayListType)   //1播放列表 2搜索窗口
  813.         {
  814.             switch (lastSortType)
  815.             {
  816.             case 1:
  817.                 who.defaultStatus = "@ 歌名(拼音)升序";
  818.                 break;
  819.             case 2:
  820.                 who.defaultStatus = "@ 歌名(拼音)降序";
  821.                 break;
  822.             case 3:
  823.                 who.defaultStatus = "@ 歌手(拼音)升序,后歌名(拼音)升序";
  824.                 break;
  825.             case 4:
  826.                 who.defaultStatus = "@ 歌手(拼音)降序,后歌名(拼音)降序";
  827.                 break;
  828.             case 5:             
  829.                 who.defaultStatus = "@ 先歌名字数(单词记一字,空格不记)升序,后歌名升序";
  830.                 break;
  831.             default:
  832.                 who.defaultStatus = "@ 原始顺序(未经排序)";
  833.                 break;
  834.             }
  835.             
  836.             if (1 == gWinForPlayListType)   //1播放列表
  837.             {
  838.                 var item = who.document.getElementById("ShoSortType" + lastSortType);
  839.                 if (item)
  840.                     item.disabled = true;
  841.             }
  842.         }
  843.         else if (3 == gWinForPlayListType) //3 歌词窗口
  844.         {
  845.             var theObj;
  846.             if (isNaN(shoMusicID))
  847.                 shoMusicID = curPlayIndex;
  848.             else if (shoMusicID < 0 || shoMusicID >= musicList.length)
  849.                 shoMusicID = curPlayIndex;
  850.             //设定自动滚动
  851.             var bNotCurPlayLyric = (shoMusicID != curPlayIndex);
  852.             theObj = who.document.getElementById("stopAutoScroll");
  853.             if (theObj)
  854.                 theObj.checked = bNotCurPlayLyric;
  855.             who.shoStopSelfScroll = bNotCurPlayLyric;
  856.             theObj = who.document.getElementById("showScrollBar");
  857.             if (theObj)
  858.                 theObj.checked = bNotCurPlayLyric;
  859.             theObj = who.document.getElementById("LrcShower_div");
  860.             if (theObj)
  861.                 theObj.style.overflowY = bNotCurPlayLyric ? "scroll" : "hidden";
  862.             
  863.             who.lrcInterface("MPH", musicList[shoMusicID][3]); //load lyric
  864.             //setLyricPlayOffset(musicList[shoMusicID][4]);    //需要等给gWinForPlayList赋值
  865.             setTimeout("setLyricPlayOffset(musicList[" + shoMusicID + "][4])", 300); //set offset time and default status
  866.             who.document.title = "歌词: " + musicList[shoMusicID][1] + " - " + musicList[shoMusicID][2] + " -- shosh网页播放器";
  867.         }
  868.     } catch(e){}
  869. }
  870.  
  871. function setListWindow(page,mustFocus)  //传入-33表示指示当前播放曲目
  872. {
  873.     if (songNumPerPage <= 0)
  874.         songNumPerPage = 10;   //防止设置错误或意外修改
  875.     var maxPage = Math.ceil(musicList.length / songNumPerPage);
  876.     if (-33 == page && songNumPerPage > 0 && musicList.length > 1)
  877.         page = Math.ceil((curPlayIndex + 1) / songNumPerPage);
  878.     if (page)
  879.     {
  880.         page = parseInt(page);
  881.         if (page < 1)
  882.             page = maxPage;    //循环效果
  883.     }
  884.     else
  885.         page = maxPage;
  886.     if (page > maxPage)
  887.         page = 1;  //循环效果
  888.     var startId = songNumPerPage * (page - 1);
  889.     try //当已经被其他窗口打开时再操作会出错
  890.     {
  891.         var hasOpened = gWinForPlayList;
  892.         var winDsnByShosh=window.open('', 'MusicListForShoshMusicPlayer', 'height=310, width=600, top=200, left=200, toolbar=no, menubar=no, resizable=no,location=no, status=yes, scrollbars=yes');
  893.         gWinForPlayListType = 1;
  894.         var i = 0;
  895.         with (winDsnByShosh.document)
  896.         {
  897.             open();
  898.             writeln("<title>shosh 背景音乐-曲目列表<\/title><meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312\"><style>body{font-size:10pt;overflow:auto}a{font-size:10pt;color:green;text-decoration:none}td{font-size:10pt;text-align:center;padding-top:2px;padding-bottom:0px}a.directlink{text-decoration:underline}a:hover{color:red}div,span{font-size:10pt}button{padding:0px;height:20px;background-color:rgb(162,200,169);border:#00AA00 2px output}</style>");
  899.             writeln("<body onkeydown=\"if(event.keyCode == 8)return false\" oncontextmenu=\"return false\" onload=\"if(window.opener==null || window.opener.name != \'ShoshWebPageBackgroundMusicPlayer\'){window.opener=null;window.close();}window.opener.setChildWnd(this)\" text=blue onunload=\"window.opener.gWinForPlayList=null;\">");
  900.  
  901.             writeln("<table width=100% border=0><tr><td style=\"text-align:left\"><button onclick=\"window.opener.showSongLyric(-33)\">显示滚动歌词<\/button><\/td><td style=\"text-align:center\"><label for=\"aotuShowCurPlay\" style=\"color:red\">自动指示<\/label><input type=checkbox id=\"aotuShowCurPlay\" onclick=\"window.opener.childAotuShow=this.checked;\"" + (childAotuShow ? " checked" : "") + "><button onclick=\"window.opener.setListWindow(-33)\">指示当前播放<\/button><\/td><td style=\"text-align:right\"><a class=\"directlink\" href=\"javascript:window.opener.setListWindow(" + (page-1) + ")\">上一页<\/a><span style=\"margin-left:6px;margin-right:6px\">|<\/span><a class=\"directlink\" href=\"javascript:window.opener.setListWindow(" + (page+1) + ")\">下一页<\/a>");
  902.             writeln("<select onchange=\"javascript:window.opener.setListWindow(this.options[this.selectedIndex].value)\" id=\"theCurPageList\">");
  903.         }
  904.         for (= 1; i <= maxPage; i++)
  905.             winDsnByShosh.document.writeln("<option value=\"" + i + "\"" + (== page ? " selected" : "") + ">第" + i + "页<\/option>");
  906.         winDsnByShosh.document.writeln("<\/select><button onclick=\"javascript:window.opener.shoApiSearchMusic(3)\" onmouseover=\"window.status=\'在歌名和歌手中(不需要完整输入歌名或歌名)搜索\'\">搜索<\/button><\/td><\/tr><\/table>");
  907.         winDsnByShosh.document.writeln("<table border=1 width=100%><tr><td title=\'序号==ID\'><b>ID/歌词<\/b><\/td><td><b>歌曲<\/b><button id=\"ShoSortType1\" onclick=\"window.opener.shoSortList(1)\" onmouseover=\"window.status=\'按歌名(拼音)升序排列...\'\">升<\/button><button id=\"ShoSortType2\" onclick=\"window.opener.shoSortList(2)\" onmouseover=\"window.status=\'按歌名(拼音)降序排列...\'\">降<\/button><button id=\"ShoSortType5\" onclick=\"window.opener.shoSortList(5)\" onmouseover=\"window.status=\'先按歌名字数升序后按歌名(拼音)升序排列...\'\">数<\/button><button onclick=\"javascript:window.opener.shoApiSearchMusic(1)\" onmouseover=\"window.status=\'搜索歌名(不需要完整输入歌名)\'\">搜<\/button><\/td><td><b>演唱者<\/b><button id=\"ShoSortType3\" onclick=\"window.opener.shoSortList(3)\" onmouseover=\"window.status=\'先按歌手(拼音)升序后按歌名(拼音)升序排列...\'\">升<\/button><button id=\"ShoSortType4\" onclick=\"window.opener.shoSortList(4)\" onmouseover=\"window.status=\'先按歌手(拼音)降序后按歌名(拼音)降序排列...\'\">降<\/button><button onclick=\"javascript:window.opener.shoApiSearchMusic(2)\" onmouseover=\"window.status=\'搜索歌手(不需要完整输入歌手名字)\'\">搜<\/button> <\/td></thead>");
  908.         var stopId = startId + songNumPerPage;
  909.         if (stopId > musicList.length)
  910.             stopId = musicList.length;
  911.         var lrcHrefText;
  912.         for (= startId; i < stopId; i++)
  913.         {
  914.             if (musicList[i][3] != "undefined" && String(musicList[i][3]) != "0")
  915.                 lrcHrefText = "..<a href=\"javascript:window.opener.showSongLyric(" + i + ")\" title=\"查看歌词\">歌词<\/a>";
  916.             else
  917.                 lrcHrefText = "<a style=\"visibility:hidden\">..歌词<\/a>";
  918.             winDsnByShosh.document.writeln("<tr" +  (== curPlayIndex ? " style=\"background-color:yellow\"" : "" ) + "><td>" + (i+1) + ""+ lrcHrefText + "<\/td><td><a href='javascript:window.opener.playSpSong("+i+")'>"+musicList[i][1]+"<\/a><\/td><td>"+musicList[i][2]+"<\/td><\/tr>");
  919.         }
  920.         winDsnByShosh.document.writeln("<\/table><\/body>");
  921.         winDsnByShosh.document.close();
  922.         if (!hasOpened || 1 != gWinForPlayListType || mustFocus)
  923.             winDsnByShosh.focus();
  924.         gWinForPlayList = winDsnByShosh;
  925.     }
  926.     catch (e)
  927.     {
  928.         alert("播放曲目列表窗口打开失败,可能原因如下:\n\n1、播放曲目列表窗口已经被其他窗口打开。\n\n2、播放曲目列表窗口被弹出窗口拦截程序所拦截,\n请允许弹出窗口或关闭弹窗拦截程序。");
  929.     }
  930. }
  931.  
  932.  
  933. var curPanelAlpha = 80;
  934. var alphaInterval;
  935. function dispCtrlPanel()
  936. {
  937.     if (alphaInterval)
  938.         clearInterval(alphaInterval);
  939.     alphaInterval = setInterval("flashAlphaPanel(20)", 100);
  940.     //document.getElementById('bgMusicControl').style.visibility="visible";
  941.     //document.getElementById("panelContainer").style.filter = "alpha(opacity=20)";
  942. }
  943. function hideCtrlPanel()
  944. {
  945.     if (alphaInterval)
  946.         clearInterval(alphaInterval);
  947.     alphaInterval = setInterval("flashAlphaPanel(-5)", 100);
  948.     //document.getElementById("panelContainer").style.filter = "alpha(opacity=0)";
  949.     //document.getElementById('bgMusicControl').style.visibility="hidden";
  950. }
  951. function flashAlphaPanel(offset)
  952. {
  953.     curPanelAlpha += offset;
  954.     if (curPanelAlpha < 0)
  955.     {
  956.         if (alphaInterval)
  957.             clearInterval(alphaInterval);
  958.         curPanelAlpha = 0;
  959.     }
  960.     else if (curPanelAlpha > 80)
  961.     {
  962.         if (alphaInterval)
  963.             clearInterval(alphaInterval);
  964.         curPanelAlpha = 80;
  965.     }
  966.     document.getElementById("panelContainer").style.filter = "alpha(opacity=" + curPanelAlpha +")";
  967. }
  968. function leavePlayer()
  969. {
  970.     if (gWinForPlayList)
  971.     {
  972.         try
  973.         {
  974.             gWinForPlayList.opener = null;
  975.             gWinForPlayList.close();
  976.         }catch(e){}
  977.     }
  978. }
  979. function shoApiSearchMusic(where)
  980. {
  981.     shoSearchMusic(initKeyword, where);
  982. }
  983. function shoWndSrhBackToWndList()
  984. {
  985.     bBusyNoAutoShow = false;
  986.     if (timeoutDelayAutoShow)
  987.         clearTimeout(timeoutDelayAutoShow);
  988.     setListWindow(-33);
  989. }
  990. function shoSearchMusic(what,where)
  991. {
  992.     if (undefined == what)
  993.         what = initKeyword;
  994.     if (undefined == where)
  995.         where = initSearchType;
  996.     var temWhat = what.replace(/(^[\s| |\|]*)|([\s| |\|]*$)/g, "");
  997.     initSearchType = where;
  998.     initKeyword = what;
  999.     var listLen = musicList.length;
  1000.     var reg = new RegExp();
  1001.     try
  1002.     {
  1003.         what = temWhat.replace(/[\s| ]+/g, "|");
  1004.         if (what.length < 1)
  1005.         {
  1006.             throw "";
  1007.         }
  1008.         reg.compile("\(" + what + "\)", "gi");
  1009.     }
  1010.     catch(e)
  1011.     {
  1012.         alert("Error: 无效关键字。" + "\n\n请输入正确的关键字(支持正则表达)。\n\n正则表达简单举例:\n\\d\t\t\t含有数字\n[a-z]+\t\t\t含有字母\n[^\\u0000-\\u00FF]+\t含非ASCII字符(如汉字)\n.*\t\t\t全部匹配,列出所有曲目\n你.*我|我.*你\t\t同时出现你、我两字\n我.*你\t\t\t同时出现你、我两字,且我字在你字之前\n\\s\t\t\t含有空格\n\n空格表示多关键字或查询(同符号|)");
  1013.         if (gWinForPlayList)
  1014.             gWinForPlayList.focus();
  1015.         return;
  1016.     }
  1017.     try //当已经被其他窗口打开时再操作会出错
  1018.     {
  1019.         bBusyNoAutoShow = true;
  1020.         var winDsnByShosh = window.open('', 'MusicListForShoshMusicPlayer', 'height=310, width=600, top=200, left=200, toolbar=no, menubar=no, resizable=no,location=no, status=yes, scrollbars=yes');
  1021.         gWinForPlayListType = 2;
  1022.         with (winDsnByShosh.document)
  1023.         {
  1024.             open();
  1025.             writeln("<title>搜索结果 - shosh 背景音乐-曲目列表<\/title><meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312\"><style>body{font-size:10pt;overflow:auto}a{font-size:10pt;color:green;text-decoration:none}td{font-size:10pt;text-align:center;padding-top:2px;padding-bottom:0px}a.directlink{text-decoration:underline}a:hover{color:red}div,span{font-size:10pt}button{padding:0px;height:20px;background-color:rgb(162,200,169);border:#00AA00 2px outset}.blackIndex{color:black}</style>");
  1026.             writeln("<body onkeydown=\"if(event.srcElement.tagName.toUpperCase() != \'INPUT\')return false\" oncontextmenu=\"return false\" onload=\"if(window.opener==null || window.opener.name != \'ShoshWebPageBackgroundMusicPlayer\'){window.opener=null;window.close();}window.opener.setChildWnd(this)\" text=blue onunload=\"window.opener.gWinForPlayList=null;\">");
  1027.             writeln("<table width=100% border=0><tr><td style=\"text-align:left\"><button onclick=\"window.opener.shoWndSrhBackToWndList()\">返回曲目列表<\/button><\/td><td style=\"text-align:center\"><button onclick=\"window.opener.showSongLyric(-33)\">显示滚动歌词<\/button><\/td><td style=\"text-align:right\">关键字<input type=text style=\"width:100px\" id=\"srcKeyWord\" value=\"" + temWhat + "\"> 范围<select id=\"searchArea\"><option value=1 " + ((where == 1)?"selected":"") + ">歌曲名<\/option><option value=2 " + ((where == 2)?"selected":"") + ">歌手<\/option><option value=3 " + ((where!=1 && where!=2)?"selected":"") + ">歌名+歌手<\/option><\/select><button onclick=\"window.opener.shoSearchMusic(document.getElementById(\'srcKeyWord\').value,document.getElementById(\'searchArea\').options[document.getElementById(\'searchArea\').selectedIndex].value)\">搜索<\/button><\/td><\/tr><\/table>");
  1028.         }
  1029.         var i = 0;
  1030.         var searchIndex = 0;
  1031.         winDsnByShosh.document.writeln("<table border=1 width=100%><tr><td><b>序号<\/b><\/td><td><b>ID/歌词<\/b><\/td> <td><b>歌曲<\/b><\/td><td><b>演唱者<\/b><\/td></thead>");
  1032.         
  1033.         var lrcHrefText;
  1034.         if (1 == where || 2 == where)
  1035.         {
  1036.             for (= 0; i < listLen; i++)
  1037.             {
  1038.                 if (musicList[i][where].match(reg))
  1039.                 {
  1040.                     searchIndex++;
  1041.    &nb