home *** CD-ROM | disk | FTP | other *** search
/ Hentai 69 / HENTAI69.iso / Extra / MPSetup.exe / 1033 / RCDATA / CABINET / wmploc.DLL / 256 / MAINAPPSKIN.JS < prev    next >
Text File  |  2002-12-14  |  20KB  |  516 lines

  1. var g_kTaskBarWidth = 84;
  2.  
  3. var g_kTaskBtnNowPlayingCaption_offsetTop               = 5;   // left="20"
  4. var g_kTaskBtnMediaGuideCaption_offsetTop               = 45;  // left="30"
  5. var g_kTaskBtnCDAudioCaption_offsetTop                  = 85;  // left="11"
  6. var g_kTaskBtnMediaLibraryCaption_offsetTop             = 125; // left="23"
  7. var g_kTaskBtnRadioTunerCaption_offsetTop               = 165; // left="29"
  8. var g_kTaskBtnPortableDeviceCaption_offsetTop           = 205; // left="14"
  9. var g_kTaskBtnSubscriptionsCaption_offsetTop            = 245; // left="14"
  10. var g_kTaskBtnSkinChooserCaption_offsetTop              = 285; // left="15"
  11.  
  12. var g_previousContrastMode="";
  13. var g_tracktimeTextWidth=-1;
  14.  
  15. var g_fGoingDown = true;
  16. var g_kAnimationSpeed = 25;
  17. var g_kBigButtonCover = 436;
  18. var g_kSmallButtonCover = g_kBigButtonCover - g_kTaskBarWidth;
  19. var g_ButtonCover = app.taskbarVisible ? g_kBigButtonCover : g_kSmallButtonCover;
  20.  
  21. var g_LastVolume = -1;
  22.  
  23. function ColorSetting(hue,sat)
  24. {
  25.     this.hue=hue;
  26.     this.sat=sat;
  27. }
  28.  
  29. var g_rgColorPresets = new Array
  30. (
  31. //====================================================================
  32. /*                   HUE     SATURATION            || TITLE         */
  33. //====================================================================
  34.     new ColorSetting(0,      1),                    // defaultblue
  35.     new ColorSetting(330,    0.491124272346497),    // teal_new
  36.     new ColorSetting(330,    1),                    // teal_current
  37.     new ColorSetting(300,    0.491124272346497),    // seagreen_new
  38.     new ColorSetting(300,    1),                    // seagreen_current
  39.     new ColorSetting(240,    0.491124272346497),    // green_new
  40.     new ColorSetting(240,    1),                    // green_current
  41.     new ColorSetting(210,    0.491124272346497),    // xpolive
  42.     new ColorSetting(210,    1),                    // olive_current
  43.     new ColorSetting(180,    0.272189348936081),    // putty
  44.     new ColorSetting(180,    1),                    // brown_current
  45.     new ColorSetting(171.48, 1.84),                 // orange 
  46.     new ColorSetting(150,    0.491124272346497),    // bronze_new
  47.     new ColorSetting(150,    1),                    // bronze_current
  48.     new ColorSetting(120,    1),                    // red_current
  49.     new ColorSetting(90,     1),                    // magenta_current
  50.     new ColorSetting(60,     0.461538463830948),    // violet_new
  51.     new ColorSetting(60,     1),                    // violet_current
  52.     new ColorSetting(30,     0.467455625534058),    // purple_new
  53.     new ColorSetting(30,     1.0),                  // purple_current
  54.     new ColorSetting(0,         0.0),                  // grey            
  55.     new ColorSetting(0,         0.272189348936081),    // xpsilver
  56.     new ColorSetting(0,      0.491124272346497)     // blue   
  57. );
  58.  
  59. var g_nCurrentColorPreset=parseInt(theme.loadPreference("CurrentColorPreset"));
  60.  
  61. function CycleColors(interval)
  62. {
  63.     if ( isNaN( g_nCurrentColorPreset ) )
  64.     {
  65.         g_nCurrentColorPreset=0;
  66.     }
  67.     else
  68.     {
  69.         g_nCurrentColorPreset = (g_nCurrentColorPreset+interval)%g_rgColorPresets.length;
  70.     }
  71.     mediacenter.backHueShift    = g_rgColorPresets[g_nCurrentColorPreset].hue;
  72.     mediacenter.backSaturation  = g_rgColorPresets[g_nCurrentColorPreset].sat;
  73. }
  74.  
  75. function InitNewControls()
  76. {
  77.     var cm = mediacenter.contrastMode;
  78.                
  79.     if ( (cm=="WB") || (cm=="BW") )
  80.     {
  81.         var IDB_APPAUTOHIDEBTN_BW               =1902;
  82.         var IDB_APPEQBTN_BW                     =1904;
  83.         var IDB_APPPLAYLISTBTN_BW               =1906;
  84.         var IDB_APPSHUFFLEBTN_BW                =1908;
  85.         var IDB_BTNGROUP_BW                     =1910;
  86.         var IDB_FASTFORWARD_BTN_BW              =1912;
  87.         var IDB_REWIND_BTN_BW                   =1914;
  88.         var IDB_MINCLOSE_BTNGRP_BW              =1916;
  89.         var IDB_MUTE_BTN_BW                     =1918;
  90.         var IDB_PLAY_BTN_BW                     =1920;
  91.         var IDB_PLAY_PAUSE_BTN_BW               =1922;
  92.         var IDB_RESIZE_BW                       =1924;
  93.         var IDB_SEEK_SLDR_BKG_BW                =1926;
  94.         var IDB_SOUND_BTN_BW                    =1928;
  95.         var IDB_STOP_BTN_BW                     =1930;
  96.         var IDB_TASKBAR_HANDLE_CLOSE_BW         =1932;
  97.         var IDB_TASKBAR_HANDLE_OPEN_BW          =1934;
  98.         var IDB_TASKBTNSCROLLDOWN_BW            =1936;
  99.         var IDB_VOL_SLDR_FORE_BW                =1942;
  100.         var IDB_TASKBAR_BUTTONGROUP_HOVER_BW    =1950;
  101.         var IDB_TASKBAR_BUTTONGROUP_UP_BW       =1948;
  102.         var IDB_SEEK_THUMB_BW                   =1683;
  103.         var IDB_OLDSTRBMP_VOL_THUMB_BW          =1978;
  104.         var IDB_RESTOREDOWN_BW                  =2054;
  105.         var IDB_OLDSTRBMP_PLAY_PAUSE_BTN_BW     =1922;
  106.         var IDB_SKINMODE_HUESHIFT_BW            =2075;
  107.         var IDB_DROPDOWN_BG_BW                  =2160;
  108.         var IDB_DROPDOWN_ICON_BW                =2162;
  109.  
  110.         // The resource IDs for the high contrast images are set up so that if the black on white
  111.         // version has an ID of N, the white on black has an ID of N+1
  112.         //
  113.         // "BW" means Black-on-White, which means we want to use the base resource ID (offset=0)
  114.         // "WB" means White-on-Black, which means we want to increment the BW resource ID by one (offset=1)
  115.         var offset = (cm=="BW") ? 0 : 1;
  116.         var inverseOffset = (offset==0) ? 1 : 0;
  117.         
  118.         if (""==g_previousContrastMode)
  119.         {
  120.             CacheImage("TaskBarButtons.image");
  121.             CacheImage("TaskBarButtons.downImage");
  122.             CacheImage("TaskBarButtons.hoverImage");
  123.             //CacheImage("taskbar_handle.hoverDownImage"); ??
  124.         }
  125.         
  126.         SetAllButtonImages("autohide",                  "res://wmploc/#" + (IDB_APPAUTOHIDEBTN_BW+inverseOffset));
  127.         autohide.image=                                 "res://wmploc/#" + (IDB_APPAUTOHIDEBTN_BW+offset);
  128.         SetAllButtonImages("shufflegroup",              "res://wmploc/#" + (IDB_APPSHUFFLEBTN_BW+inverseOffset));
  129.         shufflegroup.image=                             "res://wmploc/#" + (IDB_APPSHUFFLEBTN_BW+offset);
  130.         SetAllButtonImages("TransportButtongroup",      "res://wmploc/#" + (IDB_BTNGROUP_BW+inverseOffset));
  131.         TransportButtongroup.image=                     "res://wmploc/#" + (IDB_BTNGROUP_BW+offset);
  132.         TransportButtongroup.disabledImage=             "res://wmploc/#" + (IDB_BTNGROUP_BW+offset);
  133.         
  134.         SetAllButtonImages("PauseButtonGroup",          "res://wmploc/#" + (IDB_OLDSTRBMP_PLAY_PAUSE_BTN_BW+inverseOffset));
  135.         PauseButtonGroup.image=                         "res://wmploc/#" + (IDB_OLDSTRBMP_PLAY_PAUSE_BTN_BW+offset);
  136.         SetAllButtonImages("ffwdGroup",                 "res://wmploc/#" + (IDB_FASTFORWARD_BTN_BW+inverseOffset));
  137.         ffwdGroup.image=                                "res://wmploc/#" + (IDB_FASTFORWARD_BTN_BW+offset);
  138.         SetAllButtonImages("rewGroup",                  "res://wmploc/#" + (IDB_REWIND_BTN_BW+inverseOffset));
  139.         rewGroup.image=                                 "res://wmploc/#" + (IDB_REWIND_BTN_BW+offset);
  140.         SetAllButtonImages("btngrpMinClose",            "res://wmploc/#" + (IDB_MINCLOSE_BTNGRP_BW+inverseOffset));
  141.         btngrpMinClose.image=                           "res://wmploc/#" + (IDB_MINCLOSE_BTNGRP_BW+offset);
  142.         SetAllButtonImages("btngrpRestore",             "res://wmploc/#" + (IDB_RESTOREDOWN_BW+offset));
  143.         SetAllButtonImages("btnResizeHide",             "res://wmploc/#" + (IDB_RESIZE_BW+offset));
  144.         SetAllButtonImages("btnResizeShow",             "res://wmploc/#" + (IDB_RESIZE_BW+offset));
  145.         btnResizeShow.transparencyColor="#FF00ff";
  146.  
  147.         if(""==g_previousContrastMode)
  148.         {
  149.             CacheImage("seek.foregroundImage");
  150.             CacheImage("seek.backgroundImage");
  151.             CacheImage("seek.thumbImage");
  152.             CacheImage("seek.thumbHoverImage");
  153.             CacheImage("seek.thumbDownImage");
  154.             CacheImage("volume.foregroundImage");
  155.             CacheImage("volume.thumbImage");
  156.             CacheImage("volume.thumbHoverImage");
  157.             CacheImage("volume.thumbDownImage");
  158.             CacheImage("Playlist_Drop_Down.dropDownImage");
  159.             CacheImage("Playlist_Drop_Down.dropDownBackgroundImage");
  160.         }
  161.         seek.foregroundImage    = "res://wmploc/#" + (IDB_SEEK_SLDR_BKG_BW+offset);
  162.         seek.backgroundImage    = "res://wmploc/#" + (IDB_SEEK_SLDR_BKG_BW+offset);
  163.         seek.thumbImage         = "res://wmploc/#" + (IDB_SEEK_THUMB_BW+offset);
  164.         seek.thumbHoverImage    = "res://wmploc/#" + (IDB_SEEK_THUMB_BW+inverseOffset);
  165.         seek.thumbDownImage     = "res://wmploc/#" + (IDB_SEEK_THUMB_BW+inverseOffset);
  166.         volume.foregroundImage  = "res://wmploc/#" + (IDB_VOL_SLDR_FORE_BW+offset);
  167.         volume.thumbImage       = "res://wmploc/#" + (IDB_OLDSTRBMP_VOL_THUMB_BW+offset);
  168.         volume.thumbHoverImage  = "res://wmploc/#" + (IDB_OLDSTRBMP_VOL_THUMB_BW+inverseOffset);
  169.         volume.thumbDownImage   = "res://wmploc/#" + (IDB_OLDSTRBMP_VOL_THUMB_BW+inverseOffset);
  170.         Playlist_Drop_Down.dropDownBackgroundImage  = "res://wmploc/#" + (IDB_DROPDOWN_BG_BW+offset);;
  171.         Playlist_Drop_Down.dropDownImage            = "res://wmploc/#" + (IDB_DROPDOWN_ICON_BW+offset);
  172.         
  173.         SetAllButtonImages("taskbar_handle", "res://wmploc/#" + (IDB_TASKBAR_HANDLE_OPEN_BW+offset));
  174.         taskbar_handle.downImage =           "res://wmploc/#" + (IDB_TASKBAR_HANDLE_CLOSE_BW+offset);
  175.         taskbar_handle.hoverDownImage =      "res://wmploc/#" + (IDB_TASKBAR_HANDLE_CLOSE_BW+offset);
  176.         SetAllButtonImages("MoreButton",     "res://wmploc/#" + (IDB_TASKBTNSCROLLDOWN_BW+offset));
  177.  
  178.         SetAllButtonImages("TaskBarButtons", "res://wmploc/#" + (IDB_TASKBAR_BUTTONGROUP_HOVER_BW+offset));
  179.         TaskBarButtons.image             =   "res://wmploc/#" + (IDB_TASKBAR_BUTTONGROUP_UP_BW+offset);
  180.  
  181.         SetAllButtonImages("CornerButtons", "res://wmploc/#" + (2046+inverseOffset));
  182.         CornerButtons.image                ="res://wmploc/#" + (2046+offset);
  183.         taskBtnNowPlayingCaption.foregroundColor = (cm=="BW") ? "black" : "white";
  184.     }
  185.  
  186.     else
  187.     {
  188.         if (g_previousContrastMode!="")
  189.         {
  190.             UnCacheAllImages();
  191.         }
  192.         btnResizeShow.transparencyColor="";
  193.         taskBtnNowPlayingCaption.foregroundColor = getDarkTextColor();
  194.     }
  195.     
  196.     
  197.     // Not sure about exposing this just yet leave it commented out until we get a ruling
  198.     // If enabled, verify app start up perf regressions before checking in the enabled code
  199.     
  200.     // If XP or better and DVD is available update the TaskButton
  201.     //
  202. /*    if(false &&  player.dvd.isAvailable("dvddecoder"))
  203.     {
  204.         taskBtnCDAudioCaption.value="res://wmploc/RT_STRING/#1279";
  205.         taskBtnCDAudio.accKeyboardShortcut="res://wmploc/RT_STRING/#2114";
  206.         taskBtnCDAudio.upToolTip="res://wmploc/RT_STRING/#1280";
  207.         taskBtnCDAudio.downToolTip="res://wmploc/RT_STRING/#1280";
  208.         taskBtnCDAudio.accName="res://wmploc/RT_STRING/#2162";
  209.     }
  210. */  
  211.     g_previousContrastMode=cm;
  212.     btnShuffle.down = player.settings.getMode( 'shuffle' );
  213.     g_bufferingProgress = player.network.bufferingProgress;
  214.     
  215.     if (app.titleBarVisible)
  216.     {
  217.         btngrpMinClose.alphablend       = 0;
  218.     }
  219.    
  220.     OnOpenStateChangeTransport(player.openState);
  221.     OnPlayStateChangeTransport(player.playState);
  222.     OnStatusChangeTransport(player.status);
  223.     player.settings.mute = (theme.loadPreference("mute")=="True");
  224. }
  225.  
  226. function LayoutMarquee()
  227. {
  228.     if ( (g_tracktimeTextWidth!=-1) && (g_tracktimeTextWidth == tracktime.textwidth)) return;
  229.     g_tracktimeTextWidth = tracktime.textwidth;
  230.     var marqueeSize = svMarquee.width - 2;
  231.  
  232.     var margin=parseInt(theme.loadString("res://wmploc/RT_STRING/#1272"));
  233.  
  234.     tracktime.horizontalAlignment='left'; 
  235.     tracktime.left = marqueeSize - tracktime.textwidth;
  236.     tracktime.horizontalAlignment='right';
  237.  
  238.     running_background_plugins.horizontalAlignment='left'; 
  239.     running_background_plugins.left = marqueeSize - tracktime.textwidth - margin - running_background_plugins.width;
  240.     running_background_plugins.horizontalAlignment='right'; 
  241.  
  242.     metadata.width = marqueeSize - tracktime.textwidth - margin - running_background_plugins.width - margin - metadata.left;
  243. }
  244.  
  245.  
  246.  
  247. function SetAllButtonImages(btn,imagename)
  248. {
  249.         try
  250.         {
  251.                 var actualButton = eval(btn);
  252.                 if (""==g_previousContrastMode)
  253.                 {
  254.                         CacheImage(btn + ".image");
  255.                         CacheImage(btn + ".downImage");
  256.                         CacheImage(btn + ".hoverImage");
  257.                         CacheImage(btn + ".disabledImage");
  258.                         CacheImage(btn + ".hoverDownImage");
  259.                 }
  260.                 actualButton.image=imagename;
  261.                 actualButton.downImage=imagename;
  262.                 actualButton.hoverImage=imagename;
  263.                 actualButton.disabledImage=imagename;
  264.                 actualButton.hoverDownImage=imagename;
  265.         }
  266.         catch(err){}
  267. }
  268. function SetAllSliderImages(sldr, bkg, thumb)
  269. {
  270.     var actualSlider = eval(sldr);
  271.     if (""==g_previousContrastMode)
  272.     {
  273.         CacheImage(sldr + ".backgroundImage");
  274.         CacheImage(sldr + ".foregroundImage");
  275.         CacheImage(sldr + ".thumbImage");
  276.         CacheImage(sldr + ".thumbHoverImage");
  277.         CacheImage(sldr + ".thumbDownImage");
  278.     }
  279.     actualSlider.backgroundImage = bkg;
  280.     actualSlider.foregroundImage = bkg;
  281.     actualSlider.thumbImage      = thumb;
  282.     actualSlider.thumbHoverImage = thumb;
  283.     actualSlider.thumbDownImage  = thumb;
  284. }
  285.  
  286. var g_ArrayOfAllImages = new Array();
  287.  
  288. function CacheImage(imageID)
  289. {
  290.     g_ArrayOfAllImages[imageID] = eval(imageID);
  291. }
  292.  
  293. function UnCacheAllImages()
  294. {
  295.     for (var img in g_ArrayOfAllImages)
  296.     {
  297.         eval(img + ' = g_ArrayOfAllImages[img]');
  298.     }
  299.     g_ArrayOfAllImages.length=0;
  300. }
  301.  
  302. function currentTaskChange()
  303. {
  304.     var btnDown = null;
  305.     switch(app.currentTask)
  306.     {
  307.         case 'NowPlaying':
  308.             btnDown = taskBtnNowPlaying;
  309.             break;
  310.         case 'MediaGuide':
  311.             ShowLoadingText();
  312.             btnDown = taskBtnMediaGuide;
  313.             break;
  314.         case 'CDAudio':
  315.             btnDown = taskBtnCDAudio;
  316.             break;
  317.         case 'MediaLibrary':
  318.             btnDown = taskBtnMediaLibrary;
  319.             break;
  320.         case 'RadioTuner':
  321.             ShowLoadingText();
  322.             btnDown = taskBtnRadioTuner;
  323.             break;
  324.         case 'PortableDevice':
  325.             btnDown = taskBtnPortableDevice;
  326.             break;
  327.         case 'Services':
  328.             btnDown = taskBtnSubscriptions;
  329.             break;
  330.         case 'SkinViewer':
  331.             btnDown = taskBtnSkinChooser;
  332.             break;
  333.     }
  334.     taskBtnNowPlaying.down      = false;
  335.     taskBtnMediaGuide.down      = false;
  336.     taskBtnCDAudio.down         = false;
  337.     taskBtnMediaLibrary.down    = false;
  338.     taskBtnRadioTuner.down      = false;
  339.     taskBtnPortableDevice.down  = false;
  340.     taskBtnSubscriptions.down   = false;
  341.     taskBtnSkinChooser.down     = false;
  342.  
  343.     if (btnDown)
  344.     {
  345.         btnDown.down = true;
  346.     }
  347. }
  348.  
  349. function ShowLoadingText()
  350. {
  351.     LoadingTxt.alphaBlend=0;
  352.     LoadingTxt.alphaBlendTo(0xff,4500);
  353. }
  354.  
  355. function SetTaskBarVisible(bVisible)
  356. {
  357.     var Sign        = bVisible ? -1 : 1;
  358.     var OldWidth    = view.width;
  359.  
  360.     svEntireApp.horizontalAlignment="right";
  361.     TaskBarVisibleMaster.visible = bVisible;
  362.     if(bVisible)
  363.     {
  364.         taskbar_handle.accName="res://wmploc.dll/RT_STRING/#2151";
  365.     }
  366.     else
  367.     {
  368.         taskbar_handle.accName="res://wmploc.dll/RT_STRING/#2152";
  369.     }
  370.  
  371.     g_ButtonCover = bVisible ? g_kBigButtonCover : g_kSmallButtonCover;
  372.  
  373.     app.adjustLeft( Sign * g_kTaskBarWidth );
  374.     var MoveDist = Sign * (OldWidth - view.width);
  375.     if (MoveDist < g_kTaskBarWidth)
  376.     {
  377.         svEntireApp.width += Sign * (g_kTaskBarWidth - MoveDist);
  378.     }
  379.  
  380.     svEntireApp.horizontalAlignment="stretch";
  381.     autohide2.tabStop=!bVisible;
  382.     autohide.tabStop=bVisible;
  383. }
  384.  
  385. function CheckShowCloseMinimizeButtons()
  386. {
  387.     return (!app.titleBarVisible);
  388. }
  389.  
  390. function UpdateTitleBarRelatedUI()
  391. {
  392.     var showMinCloseButtons = CheckShowCloseMinimizeButtons();
  393.     if (btnMinimize.enabled != showMinCloseButtons)
  394.     {
  395.         btnMinimize.enabled = showMinCloseButtons;
  396.         if (showMinCloseButtons) btngrpMinClose.visible = true;
  397.         btngrpMinClose.alphaBlendTo(showMinCloseButtons ? 0xff : 0, 330);
  398.     }
  399.     
  400.     if (app.titleBarVisible)
  401.     {
  402.         appautohidebtn.accName="res://wmploc.dll/RT_STRING/#2155";
  403.         
  404.     }
  405.     else
  406.     {
  407.         appautohidebtn.accName="res://wmploc.dll/RT_STRING/#2156";
  408.     }
  409. }
  410.  
  411. /*
  412. function InitNewBuyMe()
  413. {
  414.     var BuyBMP = mediacenter.getNamedString("BuyMusicButton");
  415.     var BuyURL = mediacenter.getNamedString("BuyMusicURL");
  416.  
  417.     if (BuyBMP != "" && BuyURL != "")
  418.     {
  419.         buyme.Image     = 'BuyMusicButton';
  420.         buyme.visible = true;
  421.     }
  422. }
  423. */
  424.  
  425. function ShowPlayMenu()
  426. {
  427.         mnuPlay.show("Play");
  428. }
  429.  
  430. function UpdateTextColors()
  431. {
  432.     metadata.foregroundColor=getHighlightTextColor();
  433.     var cm = mediacenter.contrastMode;
  434.     if ("BW"==cm) taskBtnNowPlayingCaption.foregroundColor = "#000000";
  435.     else if ("WB"==cm) taskBtnNowPlayingCaption.foregroundColor = "#FFFFFF";
  436.     else taskBtnNowPlayingCaption.foregroundColor = getDarkTextColor();
  437. }
  438.  
  439. function dummybutton()
  440. {
  441.     this.down = false;
  442. }
  443. //main app and fullscreen have new super ffwd buttons (ffwd_multi), but they need
  444. //a dummy button to keep transport.js from freaking out
  445. var ffwd = new dummybutton();
  446.  
  447.  
  448. function ShowTaskMenu(menu)
  449. {
  450.     menu.deleteAllItems();
  451.     menu.appendItem(0,"res://wmploc/RT_STRING/#2141");
  452.     menu.appendItem(1,"res://wmploc/RT_STRING/#2142");
  453.     menu.appendItem(2,"res://wmploc/RT_STRING/#2143");
  454.     menu.appendItem(3,"res://wmploc/RT_STRING/#2144");
  455.     menu.appendItem(4,"res://wmploc/RT_STRING/#2145");
  456.     menu.appendItem(5,"res://wmploc/RT_STRING/#2146");
  457.     menu.appendItem(6,"res://wmploc/RT_STRING/#2147");
  458.     menu.appendItem(7,"res://wmploc/RT_STRING/#2157");
  459.     var sel = menu.show();
  460.     switch (sel)
  461.     {
  462.         case 0:
  463.             app.currentTask = 'NowPlaying';
  464.             break;
  465.         case 1:
  466.             app.currentTask = 'MediaGuide';
  467.             break;
  468.         case 2:
  469.             app.currentTask = 'CDAudio';
  470.             break;
  471.         case 3:
  472.             app.currentTask = 'MediaLibrary';
  473.             break;
  474.         case 4:
  475.             app.currentTask = 'RadioTuner';
  476.             break;
  477.         case 5:
  478.             app.currentTask = 'PortableDevice';
  479.             break;
  480.         case 6:
  481.             app.currentTask = 'Services';
  482.             break;
  483.         case 7:
  484.             app.currentTask = 'SkinViewer';
  485.             break;
  486.         default:
  487.             break;
  488.     }
  489. }
  490.  
  491. function SaveSettings()
  492. {
  493.     theme.savePreference('mute',player.settings.mute);
  494.     if(false==isNaN(g_nCurrentColorPreset))
  495.     {
  496.         theme.savePreference('CurrentColorPreset',g_nCurrentColorPreset);
  497.     }
  498. }
  499.  
  500. function TransportMenu(event)
  501. {
  502.     if ( (event.clientX < (TransportSubview.left+TransportSubview.width)) 
  503.     &&   (event.clientY > (TransportSubview.top)) )
  504.     {
  505.         mnuPlay2.top=(event.clientY-TransportSubview.top);
  506.         if (app.taskBarVisible)
  507.         {
  508.             mnuPlay2.left=event.clientX-g_kTaskBarWidth;
  509.         }
  510.         else
  511.         {
  512.             mnuPlay2.left=event.clientX;
  513.         }
  514.         mnuPlay2.show('play');
  515.     }
  516. }