home *** CD-ROM | disk | FTP | other *** search
/ Kompuutteri Kaikille K-CD 2001 #5 / K-CD_2001-05.iso / WMPSkins / Setup.exe / skin.js < prev    next >
Text File  |  2000-07-27  |  2KB  |  107 lines

  1. var plIsOpen = false;
  2. var eqIsOpen = false;
  3. var speed = 250;
  4. var isOpen = false;
  5. var isOpen2 = false;
  6.  
  7. function moveDrawer1() {
  8.         righthand.visible="true"
  9.         righthandclose.visible="false"
  10.         isOpen = true;
  11.         plist.visible = true;
  12. }
  13.  
  14. function closerighthand() {
  15.     righthand.visible="false"
  16.     righthandclose.visible="true"
  17. }
  18.  
  19. function displaylefthand() {
  20.         lefthand.visible="true"
  21.         lefthandclose.visible="false"
  22.         isOpen = true; 
  23. }
  24.  
  25. function closelefthand() {
  26.     lefthand.visible="false"
  27.     lefthandclose.visible="true"
  28. }
  29.  
  30. function Init()
  31. {
  32.    plist.setColumnResizeMode( 0, "Stretches" );
  33.    plist.setColumnResizeMode( 1, "AutoSizeData" );
  34.  
  35. }
  36.  
  37. function togglePlView() {
  38.     if(plIsOpen) {
  39.         plist.visible = false;
  40.         vPlist.moveto(0,0,speed);
  41.     } else {
  42.         vPlist.moveto(100,100,speed);
  43.     }
  44.     plIsOpen = !plIsOpen;
  45. }
  46.  
  47. function vPListOnEndMove(){
  48.     if(plIsOpen) {
  49.         plist.visible = true;
  50.     } else {
  51.  
  52.     }
  53. }
  54.  
  55.  
  56. function togglePlVis(bool) {
  57.     if(plIsOpen) {
  58.         plist.visible = true;    
  59.     }
  60. }
  61.  
  62. function resetEq() {
  63.     eq.gainLevel1=0;
  64.     eq.gainLevel2=0;
  65.     eq.gainLevel3=0;
  66.     eq.gainLevel4=0;
  67.     eq.gainLevel5=0;
  68.     eq.gainLevel6=0;
  69.     eq.gainLevel7=0;
  70.     eq.gainLevel8=0;
  71.     eq.gainLevel9=0;
  72.     eq.gainLevel10=0;
  73. }
  74.  
  75. function OnTimerTick()
  76. {
  77.     var position = player.Controls.currentPosition;
  78.     var mm = ((position < 600)   ? "0" : "")
  79.         + Math.floor(position / 60);
  80.     var ss = ((position%60) < 10 ? "0" : "")
  81.         + Math.floor(position % 60);
  82.     metadataTime.value = mm + ":" + ss;
  83. }
  84.  
  85. function OnOpenStateChange()
  86. {
  87.     if(player.OpenState == osMediaOpen)
  88.     {
  89.         UpdateMetadata();
  90.     }
  91. }
  92.  
  93. function UpdateMetadata()
  94. {
  95.     metadata.value =
  96.         player.currentmedia.getiteminfo("author");
  97.     var temp = player.currentmedia.name;
  98.     if(temp != "")
  99.     {
  100.         if(metadata.value != "")
  101.         {
  102.             metadata.value +=  " -- ";
  103.         }
  104.         metadata.value += temp;
  105.     }
  106.     metadata.scrolling = metadata.textWidth>metadata.width;
  107. }