player.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /////////////////////////////////////////////////////////////////////////////////////////////
  2. /////////////////////////////////////////////////////////////////////////////////////////////
  3. function ShowBuffering(isbuf){
  4. if(isbuf){
  5. bufimg.style.visibility = "visible";
  6. MP.style.visibility = "hidden";
  7. }else{
  8. bufimg.style.visibility = "hidden";
  9. MP.style.visibility = "visible";
  10. strMsg="";
  11. }
  12. }
  13. /////////////////////////////////////////////////////////////////////////////////////////////
  14. function WindowMove_Start(){
  15. if(event.button!=1&&!DRAG_POS) {
  16. CanMove=false;
  17. }else{
  18. mouse_e_x=by_x=window.event.x+document.body.scrollLeft;
  19. mouse_e_y=by_y=window.event.y+document.body.scrollTop;
  20. CanMove=true;
  21. }
  22. }
  23. function WindowMove_End(){
  24. if (event.button==2){
  25. event.returnValue = true;
  26. }
  27. CanMove=false;
  28. }
  29. function WindowMove(){
  30. if (!CanMove) return;
  31. if(event.button!=1){
  32. CanMove=false;
  33. }else{
  34. mouse_e_x=window.event.x+document.body.scrollLeft;
  35. mouse_e_y=window.event.y+document.body.scrollTop;
  36. window.moveBy(mouse_e_x-by_x,mouse_e_y-by_y);
  37. }
  38. }
  39. /////////////////////////////////////////////////////////////////////////////////////////////
  40. function ShowAdv(){
  41. SHOW_FULL=!SHOW_FULL;
  42. if (SHOW_FULL){
  43. myadvPanel.style.top = -86;
  44. window.resizeBy(0,70);
  45. }else{
  46. window.resizeBy(0,-70);
  47. myadvPanel.style.top = -150;
  48. }
  49. ResizePlayer();
  50. }
  51. /////////////////////////////////////////////////////////////////////////////////////////////
  52. function ResizePlayer(){
  53. if(SHOW_FULL){
  54. fh=parseInt(document.all.Player.height)+205+2;
  55. fw=parseInt(document.all.Player.width)+25+2;
  56. }else{
  57. fh=parseInt(document.all.Player.height)+140+2;
  58. fw=parseInt(document.all.Player.width)+25+2;
  59. }
  60. window.resizeTo(fw,fh);
  61. }
  62. /////////////////////////////////////////////////////////////////////////////////////////////
  63. function MM_findObj(n, d) { //v3.0
  64. var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  65. d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  66. if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  67. for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
  68. }
  69. function MM_swapImage() { //v3.0
  70. var i,j=0,x,a=MM_swapImage.arguments;
  71. document.MM_sr=new Array;
  72. for(i=0;i<(a.length-2);i+=3)
  73. if ((x=MM_findObj(a[i]))!=null){
  74. document.MM_sr[j++]=x;
  75. if(!x.oSrc)
  76. x.oSrc=x.src; x.src=a[i+2];
  77. }
  78. }
  79. function MM_preloadImages() { //v3.0
  80. var d=document;
  81. if(d.images){
  82. if(!d.MM_p)
  83. d.MM_p=new Array();
  84. var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
  85. for(i=0; i<a.length; i++)
  86. if (a[i].indexOf("#")!=0){
  87. d.MM_p[j]=new Image;
  88. d.MM_p[j++].src=a[i];
  89. }
  90. }
  91. }
  92. function MM_swapImgRestore() { //v3.0
  93. var i,x,a=document.MM_sr;
  94. for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
  95. x.src=x.oSrc;
  96. }