home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 June
/
Chip_2004-06_cd1.bin
/
opsys
/
wmakeup
/
downloads
/
Pioneer_AVIC_N1.wmz
/
pioneer.js
< prev
next >
Wrap
Text File
|
2004-02-07
|
53KB
|
2,184 lines
/*
http://www.choiceinternet.com
Marcelo Caetano Martins Muniz
marcelo@marcelomuniz.com.br
Pioneer AVIC-N1 WMP Skin
*/
/*
Copyright ⌐ 2004. CHOICE ENTERPRIESES, LLC. All Rights Reserved.
This code may not be reproduced in whole or in part without express permission of CHOICE ENTERPRIESES, LLC.
*/
var playing = false;
var currentMenu = 1;
/*
currentMenu
1 - Main Menu
2 - Additional Media Info
3 - Playlist
4 - Visualizations
5 - Setup Menu
6 - Eq Menu
7 - Background selection
8 - Video Settings
9 - Balance crossfade
10 - SRS WOW effects
11 - Video Menu
12 - Product Info Main Menu
13 - Product Info Text
14 - Gallery Menu
15 - Web Destination Menu
16 - Bg Image selectio
*/
var currentDispMode = 1;
/*
currentDispMode
1 - track name
2 - disc title
3 - album name
*/
var band = 1;
/*
1 - Low
2 - Mid
3 - High
*/
var freq = 1;
/*
1 - 31Hz
2 - 62Hz
3 - 125Hz
4 - 250Hz
5 - 500Hz
6 - 1KHz
7 - 2KHz
8 - 4KHz
9 - 8KHz
10 - 16KHz
*/
var currentpl; // Current playlist
var currentpl_n = -1; // Current playlist number
var displayFolder = true;
var seekdown = false;
var seekup = false;
var playlistOn = false;
var vidMenuOn = false;
var vidIsRunning = false;
var isPicAsBack = "true";
var isScreenOpen = "false";
var counter = 0;
var imageGallery = 1;
var bgImage = "1";
var frame = 2;
var opened = false;
var change = false;
function onLoadPreview(){
if(player){}
view.width = 0;
view.height = 0;
view.backgroundImage = "";
theme.currentViewID = "mainView";
change = true;
}
function OnLoad()
{
vidIsRunning = (player.currentMedia.ImageSourceWidth>0);
if (player.playState == 3)
{
playing = true;
play_pause.upToolTip = "Pause";
} else {
playing = false;
play_pause.upToolTip = "Play";
}
visEffects.currentEffectType = mediacenter.effectType;
visEffects.currentPreset = mediacenter.effectPreset;
updateMetadata();
if("false"==theme.loadPreference("PictureAsBackground")){
isPicAsBack = "false";
}
if ("true"== theme.loadPreference("isScreenOpen"))
{
Touchscreen.visible = true;
TouchscreenButtons.visible = true;
logo.visible = true;
Touchscreen_back.visible = true;
open_b.visible = false;
fold_b.visible = false;
pgm_b.visible = false;
disp_b.visible = false;
animation.visible = false;
TopButtons.visible = true;
SystemButtons.visible = true;
change = false;
opened = true;
isScreenOpen = "true";
showBackground();
if (vidIsRunning) {
StartVideo();
} else {
if (currentMenu == 11) showMenu(1);
else showMenu(currentMenu);
}
lcd.visible = false;
frame = 13;
} else {
isScreenOpen = "false";
opened = false;
change = true;
AnimateScreen();
}
var temp = theme.loadPreference("bgImage");
if ((temp != "0") && (temp != "1") && (temp != "2")&& (temp != "3")&& (temp != "4")&& (temp != "5"))
{
bgImage = "1";
} else {
bgImage = temp;
}
background.backgroundImage = "background" + bgImage + ".png";
}
function OnClose()
{
mediacenter.effectType = visEffects.currentEffectType;
mediacenter.effectPreset = visEffects.currentPreset;
theme.savePreference("PictureAsBackground", isPicAsBack);
theme.savePreference("isScreenOpen", isScreenOpen);
theme.savePreference("bgImage", bgImage);
}
function updateMetadata(){
metadata.value = "";
var type = player.currentMedia.getItemInfo("FileType").toUpperCase();
authorppl = player.currentmedia.getiteminfo("author");
if (authorppl != "") {
authorppl += " - ";
}
metadata.value += authorppl;
metadata.value += player.currentmedia.name;
metadata2.value = metadata.value;
if (type == "AUDIO" ) {
type = "CD";
}
mediaType.value = type;
mediaType2.value = type;
mediaType3.value = type;
mediaType4.value = type;
//metadata.scrolling = (metadata.textWidth>metadata.width);
getMediaInfo();
updateDisp();
vidIsRunning = (player.currentMedia.ImageSourceWidth>0);
if (currentMenu == 11)
{
if (!vidIsRunning)
{
if (opened) {
showMenu(1);
}
}
}
if (currentMenu == 3){
if ((displayFolder == false)&& (currentpl_n == 0) && (playlistFolder1_b.visible == true))
{
currentpl = player.currentPlaylist;
n = currentpl.count;
pos = 0;
if (n <= 6) {
scroll_seeker.visible = false;
scroll_up_b.visible = false;
scroll_down_b.visible = false;
}
if (n > 6) {
n = n - 6;
pos = n - scroll_seeker.value;
}
// esconde os bot⌡es
FolderLabel1.visible = false;
FolderLabel1_dark.visible = false;
playlistFolder1_b.visible = false;
FolderLabel2.visible = false;
FolderLabel2_dark.visible = false;
playlistFolder2_b.visible = false;
FolderLabel3.visible = false;
FolderLabel3_dark.visible = false;
playlistFolder3_b.visible = false;
FolderLabel4.visible = false;
FolderLabel4_dark.visible = false;
playlistFolder4_b.visible = false;
FolderLabel5.visible = false;
FolderLabel5_dark.visible = false;
playlistFolder5_b.visible = false;
FolderLabel6.visible = false;
FolderLabel6_dark.visible = false;
playlistFolder6_b.visible = false;
i = 0;
while ((i <= 6) && ( (n+6) > (i+pos))) {
var f = currentpl.item(i+pos);
setFolderLabel(i, Math.round(i+pos+1) + ": " + f.getItemInfo("Name"));
i++;
}
}
//updatePlaylistFolders();
}
}
function PlayPause(){
if (playing)
{
playing = false;
play_pause.upToolTip = "Play";
play_pause2.upToolTip = "Play";
player.controls.pause();
disp.value = "PAUSE";
} else {
playing = true;
play_pause.upToolTip = "Pause";
play_pause2.upToolTip = "Pause";
player.controls.play();
updateDisp();
if (vidIsRunning) StartVideo();
}
}
function Play(){
playing = true;
play_pause.upToolTip = "Pause";
play_pause2.upToolTip = "Pause";
player.controls.play();
updateDisp();
}
function Stop(){
playing = false;
play_pause.upToolTip = "Play";
play_pause2.upToolTip = "Play";
player.controls.stop();
updateDisp();
}
function updateTime(){
if(player.openState!=13) {
min.value = "";
sec.value = "";
min2.value = "";
sec2.value = "";
return;
}
var seekHours = Math.floor((player.controls.currentPosition / 3600));
var seekMinutes = Math.floor((player.controls.currentPosition - (seekHours*3600))/60);
if (seekMinutes < 10) seekMinutes = "0" + seekMinutes;
var seekSeconds = Math.floor((player.controls.currentPosition - (seekMinutes*60) - (seekHours*3600)));
if (seekSeconds < 10) seekSeconds = "0" + seekSeconds;
if (seekHours > 0)
{
seekMinutes = (seekMinutes*1) + (60 * seekHours);
}
min.value = "" + seekMinutes;
sec.value = "" + seekSeconds;
min2.value = "" + seekMinutes;
sec2.value = "" + seekSeconds;
counter++;
if (counter == 3)
{
counter = 0;
updateDisp();
}
}
function AnimateScreen(){
if (change)
{
// If closed
if (!opened)
{
if (frame < 7)
{
if (frame ==2) {
theme.playSound('open.wav');
SystemButtons2.visible = false;
}
animation.backgroundImage = "open" + frame +".png";
view.timerInterval = 150;
animation.visible = true;
frame++
} else if (frame < 12) {
animation.backgroundImage = "open" + frame +".png";
view.timerInterval = 90;
animation.visible = true;
frame++
} else if (frame == 12) {
view.timerInterval = 1000;
Touchscreen.visible = true;
TouchscreenButtons.visible = true;
logo.visible = true;
Touchscreen_back.visible = true;
open_b.visible = false;
fold_b.visible = false;
pgm_b.visible = false;
disp_b.visible = false;
animation.visible = false;
TopButtons.visible = true;
SystemButtons.visible = true;
frame++
} else {
view.timerInterval = 1000;
change = false;
opened = true;
showBackground();
if (vidIsRunning) {
StartVideo();
} else {
if (currentMenu == 11) showMenu(1);
else showMenu(currentMenu);
}
lcd.visible = false;
isScreenOpen = "true";
theme.savePreference("isScreenOpen", isScreenOpen);
}
}
// If opened
else {
if (frame == 13)
{
hideBackground();
hideMenu();
vid.visible = false;
view.timerInterval = 700;
frame = 11;
} else if (frame > 6) {
if (frame ==11) theme.playSound('close.wav');
animation.backgroundImage = "open" + frame +".png";
view.timerInterval = 110;
animation.visible = true;
open_b.visible = true;
fold_b.visible = true;
pgm_b.visible = true;
disp_b.visible = true;
Touchscreen.visible = false;
TouchscreenButtons.visible = false;
logo.visible = false;
Touchscreen_back.visible = false;
TopButtons.visible = false;
SystemButtons.visible = false;
frame--;
} else if (frame > 1) {
lcd.visible = true;
animation.backgroundImage = "open" + frame +".png";
view.timerInterval = 150;
animation.visible = true;
open_b.visible = true;
fold_b.visible = true;
pgm_b.visible = true;
disp_b.visible = true;
Touchscreen.visible = false;
TouchscreenButtons.visible = false;
logo.visible = false;
Touchscreen_back.visible = false;
SystemButtons2.alphablend = 0;
SystemButtons2.visible = true;
SystemButtons2.alphablendto(255,1500);
frame--;
} else if (frame == 1) {
animation.visible = false;
view.timerInterval = 700;
frame--;
} else {
view.timerInterval = 1500;
change = false;
opened = false;
frame = 2;
isScreenOpen = "false";
theme.savePreference("isScreenOpen", isScreenOpen);
}
}
}
if (seekdown) {
scrollFolderDown();
}
if (seekup){
scrollFolderUp();
}
}
function showMenu(menu){
displayFolder = true;
hideMenu();
vid.visible = false;
showBackground();
switch (menu) {
case 1:
showMainMenu();
if (vidIsRunning) {
backtovideo.visible = true;
hideAddControls_b.visible = false;
} else {
backtovideo.visible = false;
hideAddControls_b.visible = true;
}
break;
case 2:
ShowMediaInfoMenu();
break;
case 3:
showPlaylistMenu();
break;
case 4:
showVisMenu();
break;
case 5:
showSetupMenu();
mediaTypeDisp.visible = true;
break;
case 6:
showEqMenu();
mediaTypeDisp.visible = true;
break;
case 7:
showBackgroundMenu();
break;
case 8:
ShowVideoSetMenu();
mediaTypeDisp.visible = true;
break;
case 9:
showBalanceMenu();
mediaTypeDisp.visible = true;
break;
case 10:
showSRSMenu();
mediaTypeDisp.visible = true;
break;
case 11:
showVideoMenu();
break;
case 12:
showProductInfoMainMenu();
mediaTypeDisp.visible = true;
break;
case 13:
showProductInfoText();
mediaTypeDisp.visible = true;
break;
case 14:
showGalleryMenu();
break;
case 15:
showWebDest();
mediaTypeDisp.visible = true;
break;
case 16:
showBgImageSelection();
break;
default:
showMainMenu();
}
}
function hideMenu(){
mediaTypeDisp.visible = false;
switch (currentMenu) {
case 1:
hideMainMenu();
break;
case 2:
hideMediaInfoMenu();
break;
case 3:
hidePlaylistMenu();
break;
case 4:
hideVisMenu();
break;
case 5:
hideSetupMenu();
break;
case 6:
hideEqMenu();
break;
case 7:
hideBackgroundMenu();
break;
case 8:
hideVideoSetMenu();
break;
case 9:
hideBalanceMenu();
break;
case 10:
hideSRSMenu();
break;
case 11:
hideVideoMenu();
break;
case 12:
hideProductInfoMainMenu();
break;
case 13:
hideProductInfoText();
break;
case 14:
hideGalleryMenu();
break;
case 15:
hideWebDest();
break;
case 16:
hideBgImageSelection();
break;
default:
hideMainMenu();
hideMediaInfoMenu();
hidePlaylistMenu();
hideVisMenu();
hideSetupMenu();
hideBalanceMenu();
hideEqMenu();
hideVideoMenu();
}
}
function showMainMenu() {
backControlButtons.visible = true;
mainMenu.visible = true;
MainMenuBar.visible = true;
MainAddMediaInfo.visible = true;
repeat.visible = true;
shuffle.visible = true;
mute.visible = true;
mainHideAddControls.upToolTip = "Hide Additional Controls";
playlistOn = false;
vidMenuOn = false;
currentMenu = 1;
}
function hideMainMenu() {
backControlButtons.visible = false;
mainMenu.visible = false;
MainMenuBar.visible = false;
}
function ShowMediaInfoMenu()
{
getMediaInfo();
InfoBackground.visible = true;
InfoLabels.visible = true;
MediaInfo.visible = true;
MediaInfoButtons.visible = true;
currentMenu = 2;
}
function hideMediaInfoMenu()
{
InfoBackground.visible = false;
InfoLabels.visible = false;
MediaInfo.visible = false;
MediaInfoButtons.visible = false;
}
function showPlaylistMenu()
{
backControlButtons.visible = true;
MainMenuBar.visible = true;
// show playlist
playlistFileInfo.visible = true;
repeat2.visible = true;
shuffle2.visible = true;
upFolder.visible = true;
PlaylistMenu.visible = true;
playlistOn = true;
getPlaylistFolders();
currentMenu = 3;
}
function hidePlaylistMenu()
{
backControlButtons.visible = false;
MainMenuBar.visible = false;
// hide playlist
PlaylistMenu.visible = false;
playlistFileInfo.visible = false;
repeat2.visible = false;
shuffle2.visible = false;
upFolder.visible = false;
}
function showVisMenu(){
// setVisAsBack();
Videoprogress.visible = false;
progressMain.visible = false;
vis_button_back.visible = true;
vis_button_prev.visible = true;
vis_button_next.visible = true;
vis.visible = true;
currentMenu = 4;
}
function hideVisMenu(){
Videoprogress.visible = true;
progressMain.visible = true;
vis_button_back.visible = false;
vis_button_prev.visible = false;
vis_button_next.visible = false;
}
function showSetupMenu(){
setupMenu.visible = true;
setupMenuBar.visible = true;
currentMenu = 5;
}
function hideSetupMenu(){
setupMenu.visible = false;
setupMenuBar.visible = false;
}
function showEqMenu(){
eqBackBar1.visible = true;
eqBackBar2.visible = true;
eqBackBar3.visible = true;
eqBackBar4.visible = true;
EqLabels.visible = true;
EqMenu.visible = true;
PresetsLabelBack.visible = true;
EqButtons.visible = true;
// BandLow.visible = true;
EqMenuBar.visible = true;
updateFreq();
currentMenu = 6;
}
function hideEqMenu(){
eqBackBar1.visible = false;
eqBackBar2.visible = false;
eqBackBar3.visible = false;
eqBackBar4.visible = false;
EqLabels.visible = false;
EqMenu.visible = false;
EqButtons.visible = false;
PresetsLabelBack.visible = false;
EqMenuBar.visible = false;
BandLow.visible = false;
BandMid.visible = false;
BandHigh.visible = false;
}
function showBackgroundMenu(){
BackgrounMenu.visible = true;
if (isPicAsBack== "true"){
picAsBack.image = "pic_as_back_down.gif";
visAsBack.image = "vis_as_back.gif";
} else {
picAsBack.image = "pic_as_back.gif";
visAsBack.image = "vis_as_back_down.gif";
}
currentMenu = 7;
}
function hideBackgroundMenu(){
BackgrounMenu.visible = false;
}
function ShowVideoSetMenu(){
VideoSetBack.visible = true;
VideoSetLabels.visible = true;
VideoSetMenu.visible = true;
VideoSetMenuBar.visible = true;
currentMenu = 8;
}
function hideVideoSetMenu(){
VideoSetBack.visible = false;
VideoSetLabels.visible = false;
VideoSetMenu.visible = false;
VideoSetMenuBar.visible = false;
}
function showBalanceMenu(){
if (eq.crossFade == true)
{
cross_on.image ="on_down.gif";
cross_off.image ="off.gif";
} else {
cross_on.image ="on.gif";
cross_off.image ="off_down.gif";
}
balanceMenuBar.visible = true;
balanceBack.visible = true;
crossBack.visible = true;
balanceMenu.visible = true;
balanceLabel.visible = true;
crossLabel.visible = true;
balanceSliderBack.visible = true;
currentMenu = 9;
}
function hideBalanceMenu(){
balanceMenuBar.visible = false;
balanceBack.visible = false;
crossBack.visible = false;
balanceMenu.visible = false;
balanceLabel.visible = false;
crossLabel.visible = false;
balanceSliderBack.visible = false;
}
function showSRSMenu(){
if (eq.enhancedAudio)
{
srs_on.image ="on_down.gif";
srs_off.image ="off.gif";
speaker_b1.image = "left_p.gif";
speaker_b2.image = "right_p.gif";
speakerLabel.foregroundColor = "#FFFF00";
wow_b1.image = "left_p.gif";
wow_b2.image = "right_p.gif";
tru_b1.image = "left_p.gif";
tru_b2.image = "right_p.gif";
} else {
srs_on.image ="on.gif";
srs_off.image ="off_down.gif";
speaker_b1.image = "left_p_disabled.gif";
speaker_b2.image = "right_p_disabled.gif";
speakerLabel.foregroundColor = "#FFFFFF";
wow_b1.image = "left_p_disabled.gif";
wow_b2.image = "right_p_disabled.gif";
tru_b1.image = "left_p_disabled.gif";
tru_b2.image = "right_p_disabled.gif";
}
SRSBack.visible = true;
SRSLabels.visible = true;
SRSMenu.visible = true;
SRSMenuBar.visible = true;
updateSpeaker();
currentMenu = 10;
}
function hideSRSMenu(){
SRSBack.visible = false;
SRSLabels.visible = false;
SRSMenu.visible = false;
SRSMenuBar.visible = false;
}
function showVideoMenu(){
vid.visible = true;
VideoMenu.visible = true;
VideoButtons.visible = true;
VideoStatus.visible = true;
currentMenu = 11;
}
function hideVideoMenu(){
VideoMenu.visible = false;
vid.visible = false;
VideoButtons.visible = false;
VideoStatus.visible = false;
}
function showProductInfoMainMenu() {
ProductInfoMainMenu.visible = true;
ProductMenuBar.visible = true;
currentMenu = 12;
}
function hideProductInfoMainMenu() {
ProductInfoMainMenu.visible = false;
ProductMenuBar.visible = false;
}
function showProductInfoText(){
ProductInfoTextMenu.visible = true;
text_back.visible = true;
InfoLayerText.visible = true;
ProductTextBar.visible = true;
currentMenu = 13;
}
function hideProductInfoText(){
ProductInfoTextMenu.visible = false;
text_back.visible = false;
InfoLayerText.visible = false;
ProductTextBar.visible = false;
}
function showGalleryMenu(){
GalleryMenu.visible = true;
GalleryImage.visible = true;
GalleryImageTitle.visible = true;
imageGallery = 1;
GalleryImage.backgroundImage="gallery1.jpg";
GalleryImageTitle.backgroundImage="gallery1_title.png";
currentMenu = 14;
hideBackground();
}
function hideGalleryMenu(){
GalleryMenu.visible = false;
GalleryImage.visible = false;
GalleryImageTitle.visible = false;
}
function showWebDest(){
WebDestBar.visible = true;
WebDestMenu.visible = true;
WebDestBack.visible = true;
currentMenu = 15;
}
function hideWebDest(){
WebDestBar.visible = false;
WebDestMenu.visible = false;
WebDestBack.visible = false;
}
function showBgImageSelection(){
vis.visible = false;
background.visible = true;
BgImageSelection.visible = true;
PictureFolder1_b.image = "file_list_button.gif";
PictureFolder2_b.image = "file_list_button.gif";
PictureFolder3_b.image = "file_list_button.gif";
PictureFolder4_b.image = "file_list_button.gif";
PictureFolder5_b.image = "file_list_button.gif";
PictureFolder6_b.image = "file_list_button.gif";
if (bgImage == "0")
{
PictureFolder1_b.image = "file_list_button_down.gif";
}
if (bgImage == "1")
{
PictureFolder2_b.image = "file_list_button_down.gif";
}
if (bgImage == "2")
{
PictureFolder3_b.image = "file_list_button_down.gif";
}
if (bgImage == "3")
{
PictureFolder4_b.image = "file_list_button_down.gif";
}
if (bgImage == "4")
{
PictureFolder5_b.image = "file_list_button_down.gif";
}
if (bgImage == "5")
{
PictureFolder6_b.image = "file_list_button_down.gif";
}
currentMenu = 16;
}
function hideBgImageSelection(){
BgImageSelection.visible = false;
}
function hideBackground(){
vis.visible = false;
background.visible = false;
}
function showBackground(){
if (isPicAsBack == "true")
{
background.visible = true;
vis.visible = false;
} else
{
vis.visible = true;
background.visible = false;
}
}
// Close touchscreen
function Close(){
view.timerInterval = 150;
change = true;
}
// Open touchscreen
function Open(){
view.timerInterval = 150;
change = true;
}
function StartVideo()
{
if (opened)
{
showMenu(11);
hideBackground();
}
vidMenuOn = true;
}
function EndVideo()
{
vidIsRunning = false;
}
// open file
function openFile()
{
var media = theme.openDialog('FILE_OPEN','FILES_ALLMEDIA');
if(media)
{
player.URL = media;
player.controls.play();
}
}
// Get Additional media info data
function getMediaInfo()
{
infotitle.value = player.currentMedia.getItemInfo("Album");
infotitle2.value = player.currentMedia.getItemInfo("Album");
infotitle.toolTip = player.currentMedia.getItemInfo("Album");
tracktitle.value = player.currentMedia.getItemInfo("Name");
tracktitle2.value = player.currentMedia.getItemInfo("Name");
tracktitle.toolTip = player.currentMedia.getItemInfo("Name");
foldertitle.value = getFolderName(player.currentMedia.getItemInfo("SourceURL"));
foldertitle2.value = getFolderName(player.currentMedia.getItemInfo("SourceURL"));
foldertitle.toolTip = getFolderName(player.currentMedia.getItemInfo("SourceURL"));
filename.value = getFileName(player.currentMedia.getItemInfo("SourceURL"));
filename2.value = getFileName(player.currentMedia.getItemInfo("SourceURL"));
filename.toolTip = getFileName(player.currentMedia.getItemInfo("SourceURL"));
artistname.value = player.currentMedia.getItemInfo("Artist");
artistname2.value = player.currentMedia.getItemInfo("Artist");
artistname.toolTip = player.currentMedia.getItemInfo("Artist");
genre.value = player.currentMedia.getItemInfo("Genre");
genre2.value = player.currentMedia.getItemInfo("Genre");
genre.toolTip = player.currentMedia.getItemInfo("Genre");
year.value = player.currentMedia.getItemInfo("WM/Year");
year2.value = player.currentMedia.getItemInfo("WM/Year");
year.toolTip = player.currentMedia.getItemInfo("WM/Year");
}
function updateVolToolTip(){
volume.toolTip = "Volume - [";
volume.toolTip += player.settings.volume;
volume.toolTip += "%]";
}
function updateSeekToolTip(){
progressMain.toolTip = "Seek - [";
progressMain.toolTip += player.controls.currentPositionString;
progressMain.toolTip += "]";
Videoprogress.toolTip = "Seek - [";
Videoprogress.toolTip += player.controls.currentPositionString;
Videoprogress.toolTip += "]";
}
function getFolderName(source) {
// se Θ um diret≤rio
if (source.indexOf("\\") != -1){
var i = source.lastIndexOf("\\");
source = source.substr(0,i);
if (source.lastIndexOf("\\") != -1){
return source.substr(source.lastIndexOf("\\")+1);
} else {
return source;
}
} else return source;
}
function getFileName(source) {
// se Θ um diret≤rio
if (source.indexOf("\\") != -1){
var i = source.lastIndexOf("\\");
source = source.substr(i+1);
return source;
} else return source;
}
function updateDisp(){
var info = "";
disp.value = "";
switch (currentDispMode) {
case 1:
info = player.currentMedia.getItemInfo("Name");
if (info != "") {
disp.value = info;
disp.toolTip = "Track Name: " + info;
}
break;
case 2:
info = player.currentMedia.getItemInfo("Artist");
if (info != "") {
disp.value = info;
disp.toolTip = "Artist Name: " + info;
}
break;
case 3:
info = player.currentMedia.getItemInfo("Album");
if (info != "") {
disp.value = info;
disp.toolTip = "Disc Title: " + info;
}
break;
default:
disp.value = player.currentMedia.getItemInfo("Name");
disp.toolTip = "Track Name: " + info;
}
}
function nextDispMode(){
if (currentDispMode == 3) {
currentDispMode = 1;
} else {
currentDispMode += 1;
}
updateDisp();
// disp.value = currentDispMode;
}
// Primeiro menu do Playlist (lista de playlists)
function getPlaylistFolders() {
upFolder.image = "up_disable.gif";
upFolder.downImage = "up_disable.gif";
upFolder.cursor = "system";
displayFolder = true;
// troco os bot⌡es
playlistFolder1_b.image="folder_list_button.gif";
playlistFolder1_b.downImage="folder_list_button_down.gif";
playlistFolder2_b.image="folder_list_button.gif";
playlistFolder2_b.downImage="folder_list_button_down.gif";
playlistFolder3_b.image="folder_list_button.gif";
playlistFolder3_b.downImage="folder_list_button_down.gif";
playlistFolder4_b.image="folder_list_button.gif";
playlistFolder4_b.downImage="folder_list_button_down.gif";
playlistFolder5_b.image="folder_list_button.gif";
playlistFolder5_b.downImage="folder_list_button_down.gif";
playlistFolder6_b.image="folder_list_button.gif";
playlistFolder6_b.downImage="folder_list_button_down.gif";
// esconde os bot⌡es
FolderLabel1.visible = false;
FolderLabel1_dark.visible = false;
playlistFolder1_b.visible = false;
FolderLabel2.visible = false;
FolderLabel2_dark.visible = false;
playlistFolder2_b.visible = false;
FolderLabel3.visible = false;
FolderLabel3_dark.visible = false;
playlistFolder3_b.visible = false;
FolderLabel4.visible = false;
FolderLabel4_dark.visible = false;
playlistFolder4_b.visible = false;
FolderLabel5.visible = false;
FolderLabel5_dark.visible = false;
playlistFolder5_b.visible = false;
FolderLabel6.visible = false;
FolderLabel6_dark.visible = false;
playlistFolder6_b.visible = false;
var folders = player.playlistCollection.getAll();
var n = folders.count; // N·mero de myplaylists
var drivers = player.cdromCollection.count; // N·mero de drivers
var n_system_playlists = drivers + 2;
var i = 0;
while ((i <= 6) && ( (n+n_system_playlists) > i)) {
if (i ==0 ) setFolderLabel(i, " : Current Playlist");
else {
if (i == 1) setFolderLabel(i, " : All Media Files");
else {
if ((drivers > 0) && (i < n_system_playlists))
{
setFolderLabel(i, " : Drive (" + player.cdromCollection.item(i-2).driveSpecifier + ")");
} else setFolderLabel(i, " : " + folders.item(i- n_system_playlists).name);
}
}
i++;
}
if (n <= (6-n_system_playlists)) {
scroll_seeker.visible = false;
scroll_up_b.visible = false;
scroll_down_b.visible = false;
} else {
scroll_seeker.max = n - (6 - n_system_playlists);
scroll_seeker.visible = true;
scroll_up_b.visible = true;
scroll_down_b.visible = true;
scroll_seeker.value = n - (6 - n_system_playlists);
}
}
function updatePlaylistFolders(){
var n;
var pos = 0;
var i;
if ( displayFolder == true )
{
var folders = player.playlistCollection.getAll();
var drivers = player.cdromCollection.count; // N·mero de drivers
var n_system_playlists = drivers + 2;
n = folders.count - (6 - n_system_playlists);
pos = n - scroll_seeker.value;
i = pos;
while (i < (6+pos)) {
if (i ==0 ) setFolderLabel(i, " : Current Playlist");
else {
if (i==1) setFolderLabel((i-pos), " : All Media Files");
else {
if ((drivers > 0) && (i < n_system_playlists))
{
setFolderLabel((i-pos), " : Drive (" + player.cdromCollection.item(i-2).driveSpecifier + ")");
} else setFolderLabel((i-pos), " : " + folders.item(i- n_system_playlists).name);
}
}
i++;
}
} else {
n = currentpl.count;
pos = 0;
if (scroll_seeker.visible == true) {
n = n - 6;
pos = n - scroll_seeker.value;
}
i = 0;
while ((i <= 6) && ( (n+6) > (i+pos))) {
var f = currentpl.item(i+pos);
setFolderLabel(i, Math.round(i+pos+1) + ": " + f.getItemInfo("Name"));
i++;
}
}
}
function setFolderLabel(index, name){
index = index + 1;
switch (index) {
case 1:
FolderLabel1.value = name;
playlistFolder1.upToolTip = name;
FolderLabel1.visible = true;
FolderLabel1_dark.value = name;
FolderLabel1_dark.visible = true;
playlistFolder1_b.visible = true;
break;
case 2:
FolderLabel2.value = name;
playlistFolder2.upToolTip = name;
FolderLabel2.visible = true;
FolderLabel2_dark.value = name;
FolderLabel2_dark.visible = true;
playlistFolder2_b.visible = true;
break;
case 3:
FolderLabel3.value = name;
playlistFolder3.upToolTip = name;
FolderLabel3.visible = true;
FolderLabel3_dark.value = name;
FolderLabel3_dark.visible = true;
playlistFolder3_b.visible = true;
break;
case 4:
FolderLabel4.value = name;
playlistFolder4.upToolTip = name;
FolderLabel4.visible = true;
FolderLabel4_dark.value = name;
FolderLabel4_dark.visible = true;
playlistFolder4_b.visible = true;
break;
case 5:
FolderLabel5.value = name;
playlistFolder5.upToolTip = name;
FolderLabel5.visible = true;
FolderLabel5_dark.value = name;
FolderLabel5_dark.visible = true;
playlistFolder5_b.visible = true;
break;
case 6:
FolderLabel6.value = name;
playlistFolder6.upToolTip = name;
FolderLabel6.visible = true;
FolderLabel6_dark.value = name;
FolderLabel6_dark.visible = true;
playlistFolder6_b.visible = true;
break;
}
}
function scrollFolderUp(){
if (scroll_seeker.value != scroll_seeker.max){
scroll_seeker.value++;
}
updatePlaylistFolders();
}
function scrollFolderDown(){
if (scroll_seeker.value != scroll_seeker.min){
scroll_seeker.value--;
}
updatePlaylistFolders();
}
function startScrollDown(){
seekdown = true;
view.timerInterval = 150;
}
function stopScrollDown(){
seekdown = false;
view.timerInterval = 1500;
}
function startScrollUp(){
seekup = true;
view.timerInterval = 150;
}
function stopScrollUp(){
seekup = false;
view.timerInterval = 1500;
}
function PlaylistButton(index){
if (displayFolder == true) {
getPlaylistFiles(index);
upFolder.image = "up.gif";
upFolder.downImage = "up_down.gif";
upFolder.cursor = "hand";
}
else {
var n = currentpl.count;
var pos = 0;
if (scroll_seeker.visible == true) {
n = n - 6;
pos = n - scroll_seeker.value;
}
pos = pos + index;
player.currentPlaylist = currentpl;
player.controls.currentItem = currentpl.item(pos-1);
player.controls.play();
}
}
function getPlaylistFiles(index){
var folders = player.playlistCollection.getAll();
var drivers = player.cdromCollection.count; // N·mero de drivers
var n_system_playlists = drivers + 2;
var n = folders.count;
var pos = 0;
if (scroll_seeker.visible == true) {
n = n - (6 - n_system_playlists);
pos = n - scroll_seeker.value;
}
pos = pos + index;
if (pos > n_system_playlists ) {
currentpl = folders.item(pos - n_system_playlists - 1);
currentpl_n = pos-1;
}
else {
if (pos ==1 ) {
currentpl = player.currentPlaylist;
currentpl_n = 0;
}
else {
if (pos==2) {
currentpl = player.mediaCollection.getAll();
currentpl_n = 1;
}
else {
currentpl = player.cdromCollection.item(pos-3).playlist;
currentpl_n = pos - 1;
}
}
}
// troco os bot⌡es
playlistFolder1_b.image="file_list_button.gif";
playlistFolder1_b.downImage="file_list_button_down.gif";
playlistFolder2_b.image="file_list_button.gif";
playlistFolder2_b.downImage="file_list_button_down.gif";
playlistFolder3_b.image="file_list_button.gif";
playlistFolder3_b.downImage="file_list_button_down.gif";
playlistFolder4_b.image="file_list_button.gif";
playlistFolder4_b.downImage="file_list_button_down.gif";
playlistFolder5_b.image="file_list_button.gif";
playlistFolder5_b.downImage="file_list_button_down.gif";
playlistFolder6_b.image="file_list_button.gif";
playlistFolder6_b.downImage="file_list_button_down.gif";
// esconde os bot⌡es
FolderLabel1.visible = false;
FolderLabel1_dark.visible = false;
playlistFolder1_b.visible = false;
FolderLabel2.visible = false;
FolderLabel2_dark.visible = false;
playlistFolder2_b.visible = false;
FolderLabel3.visible = false;
FolderLabel3_dark.visible = false;
playlistFolder3_b.visible = false;
FolderLabel4.visible = false;
FolderLabel4_dark.visible = false;
playlistFolder4_b.visible = false;
FolderLabel5.visible = false;
FolderLabel5_dark.visible = false;
playlistFolder5_b.visible = false;
FolderLabel6.visible = false;
FolderLabel6_dark.visible = false;
playlistFolder6_b.visible = false;
var n = currentpl.count;
var i = 0;
while ((i <= 6) && ( n > (i))) {
var f = currentpl.item(i);
setFolderLabel(i, (i+1) + ": " + f.getItemInfo("Name"));
i++;
}
if (n <= 6) {
scroll_seeker.visible = false;
scroll_up_b.visible = false;
scroll_down_b.visible = false;
} else {
scroll_seeker.max = n - 6;
scroll_seeker.visible = true;
scroll_up_b.visible = true;
scroll_down_b.visible = true;
scroll_seeker.value = n - 6;
}
displayFolder = false;
}
function hideVisButtons() {
if (currentMenu == 4) {
if ((event.clientX > 62) && (event.clientX < 472)){
if ((event.clientY > 57) && (event.clientY < 254))
{
if (vis_button_back.alphaBlend == 0){
vis_button_back.alphaBlendTo(255,1500);
vis_button_prev.alphaBlendTo(255,1500);
vis_button_next.alphaBlendTo(255,1500);
}
// else Y
} else {
if (vis_button_back.alphaBlend == 255){
vis_button_back.alphaBlendTo(0,1500);
vis_button_prev.alphaBlendTo(0,1500);
vis_button_next.alphaBlendTo(0,1500);
}
}
// else X
} else {
if (vis_button_back.alphaBlend == 255){
vis_button_back.alphaBlendTo(0,1500);
vis_button_prev.alphaBlendTo(0,1500);
vis_button_next.alphaBlendTo(0,1500);
}
}
}
}
function mediaInfoBack(){
if (playlistOn)
{
showMenu(3);
} else {
showMenu(1);
}
}
function hidePlaylistButtons(){
if (playlistFileInfo.visible)
{
playlistFileInfo.visible = false;
repeat2.visible = false;
shuffle2.visible = false;
upFolder.visible = false;
playlistHideButtons.upToolTip = "Show Additional Controls";
} else {
playlistFileInfo.visible = true;
repeat2.visible = true;
shuffle2.visible = true;
upFolder.visible = true;
playlistHideButtons.upToolTip = "Hide Additional Controls";
}
}
// DISP function for playlist menu
var scrollOn = false;
function hidePlaylistSelection() {
if (FolderLabel1.visible)
{
FolderLabel1.visible = false;
FolderLabel1_dark.visible = false;
playlistFolder1_b.visible = false;
FolderLabel2.visible = false;
FolderLabel2_dark.visible = false;
playlistFolder2_b.visible = false;
FolderLabel3.visible = false;
FolderLabel3_dark.visible = false;
playlistFolder3_b.visible = false;
FolderLabel4.visible = false;
FolderLabel4_dark.visible = false;
playlistFolder4_b.visible = false;
FolderLabel5.visible = false;
FolderLabel5_dark.visible = false;
playlistFolder5_b.visible = false;
FolderLabel6.visible = false;
FolderLabel6_dark.visible = false;
playlistFolder6_b.visible = false;
if (scroll_seeker.visible)
{
scroll_seeker.visible = false;
scroll_up_b.visible = false;
scroll_down_b.visible = false;
scrollOn = true;
} else {
scrollOn = false;
}
playlistDisp.upToolTip = "Show Playlist";
} else {
updatePlaylistFolders();
playlistDisp.upToolTip = "Hide Playlist";
if (scrollOn){
scroll_seeker.visible = true;
scroll_up_b.visible = true;
scroll_down_b.visible = true;
}
}
}
// Source button
function sourceFunction(){
if(opened) showMenu(1);
}
function updateBalToolTip(){
balanceSlider.toolTip = "";
balanceSlider.toolTip += player.settings.balance;
}
function turnCrossfade() {
if (eq.crossFade == true)
{
eq.crossFade = false;
cross_on.image ="on.gif";
cross_off.image ="off_down.gif";
} else {
eq.crossFade = true;
cross_on.image ="on_down.gif";
cross_off.image ="off.gif";
}
}
function prevPreset() {
eq.previousPreset();
presetLabel.value = eq.currentPresetTitle.toUpperCase();
presetLabel_dark.value = eq.currentPresetTitle.toUpperCase();
updateFreq();
}
function proxPreset() {
eq.nextPreset();
presetLabel.value = eq.currentPresetTitle.toUpperCase();
presetLabel_dark.value = eq.currentPresetTitle.toUpperCase();
if ((change == false) &&(opened == true) && (currentMenu == 6)) updateFreq();
disp.value = eq.currentPresetTitle.toUpperCase();
disp.toolTip = "EQ PRESET: " + eq.currentPresetTitle.toUpperCase();
counter = 0;
}
function updateFreq(){
freq1.visible = false;
freq2.visible = false;
freq3.visible = false;
freq4.visible = false;
freq5.visible = false;
freq6.visible = false;
freq7.visible = false;
freq8.visible = false;
freq9.visible = false;
freq10.visible = false;
switch (band) {
case 1:
BandLow.visible = true;
BandMid.visible = false;
BandHigh.visible = false;
freq1.visible = true;
freq2.visible = true;
freq3.visible = true;
switch (freq) {
case 1:
freq1.image = "31Hz_down.gif";
freq2.image = "62Hz.gif";
freq3.image = "125Hz.gif";
updateLevel(1);
break;
case 2:
freq1.image = "31Hz.gif";
freq2.image = "62Hz_down.gif";
freq3.image = "125Hz.gif";
updateLevel(2);
break;
case 3:
freq1.image = "31Hz.gif";
freq2.image = "62Hz.gif";
freq3.image = "125Hz_down.gif";
updateLevel(3);
break;
default:
freq = 1;
freq1.image = "31Hz_down.gif";
freq2.image = "62Hz.gif";
freq3.image = "125Hz.gif";
updateLevel(1);
break;
}
break;
case 2:
BandLow.visible = false;
BandMid.visible = true;
BandHigh.visible = false;
freq4.visible = true;
freq5.visible = true;
freq6.visible = true;
switch (freq) {
case 4:
freq4.image = "250Hz_down.gif";
freq5.image = "500Hz.gif";
freq6.image = "1KHz.gif";
updateLevel(4);
break;
case 5:
freq4.image = "250Hz.gif";
freq5.image = "500Hz_down.gif";
freq6.image = "1KHz.gif";
updateLevel(5);
break;
case 6:
freq4.image = "250Hz.gif";
freq5.image = "500Hz.gif";
freq6.image = "1KHz_down.gif";
updateLevel(6);
break;
default :
freq = 4;
freq4.image = "250Hz_down.gif";
freq5.image = "500Hz.gif";
freq6.image = "1KHz.gif";
updateLevel(4);
break;
}
break;
case 3:
BandLow.visible = false;
BandMid.visible = false;
BandHigh.visible = true;
freq7.visible = true;
freq8.visible = true;
freq9.visible = true;
freq10.visible = true;
switch (freq) {
case 7:
freq7.image = "2KHz_down.gif";
freq8.image = "4KHz.gif";
freq9.image = "8KHz.gif";
freq10.image = "16KHz.gif";
updateLevel(7);
break;
case 8:
freq7.image = "2KHz.gif";
freq8.image = "4KHz_down.gif";
freq9.image = "8KHz.gif";
freq10.image = "16KHz.gif";
updateLevel(8);
break;
case 9:
freq7.image = "2KHz.gif";
freq8.image = "4KHz.gif";
freq9.image = "8KHz_down.gif";
freq10.image = "16KHz.gif";
updateLevel(9);
break;
case 10:
freq7.image = "2KHz.gif";
freq8.image = "4KHz.gif";
freq9.image = "8KHz.gif";
freq10.image = "16KHz_down.gif";
updateLevel(10);
break;
default :
freq = 7;
freq7.image = "2KHz_down.gif";
freq8.image = "4KHz.gif";
freq9.image = "8KHz.gif";
freq10.image = "16KHz.gif";
updateLevel(7);
break;
}
break;
}
presetLabel.value = eq.currentPresetTitle.toUpperCase();
presetLabel_dark.value = eq.currentPresetTitle.toUpperCase();
}
function updateLevel(i){
var level = 0;
level = eq.gainLevels(i);
if (level > 0)
{
levelLabel_dark.value = "+" + level;
levelLabel.value = "+" + level;
} else {
levelLabel_dark.value = level;
levelLabel.value = level;
}
levelSlider.value = level;
levelLabel.toolTip = levelLabel.value;
}
function getLevelPos() {
return eq.gainLevels(freq);
}
function updateLevelToolTip(){
levelSlider.toolTip = "";
levelSlider.toolTip += Math.round(eq.gainLevels(freq));
}
function updateGinLevels(){
eq.gainLevels(freq) = Math.round(levelSlider.value);
updateFreq();
}
function prevFreq() {
switch (band) {
case 1:
if (freq <= 1) freq = 1;
else freq--;
break;
case 2:
if (freq <= 4) freq = 4;
else freq--;
break;
case 3:
if (freq <= 7) freq = 7;
else freq --;
break;
}
updateFreq();
}
function nextFreq() {
switch (band) {
case 1:
if (freq >= 3) freq = 3;
else freq++;
break;
case 2:
if (freq >= 6) freq = 6;
else freq++;
break;
case 3:
if (freq >= 10) freq = 10;
else freq ++;
break;
}
updateFreq();
}
function prevBand(){
switch (band) {
case 1:
band = 1;
break;
case 2:
band = 1;
freq = 1;
break;
case 3:
band = 2;
freq = 4;
break;
}
updateFreq();
}
function nextBand(){
switch (band) {
case 1:
band = 2;
freq = 4;
break;
case 2:
band = 3;
freq = 7;
break;
case 3:
band = 3;
break;
}
updateFreq();
}
function hideMainAddControls(){
if (MainAddMediaInfo.visible)
{
MainAddMediaInfo.visible = false;
repeat.visible = false;
shuffle.visible = false;
mute.visible = false;
mainHideAddControls.upToolTip = "Show Additional Controls";
} else {
MainAddMediaInfo.visible = true;
repeat.visible = true;
shuffle.visible = true;
mute.visible = true;
mainHideAddControls.upToolTip = "Hide Additional Controls";
}
}
function optionsHide() {
if (playlist_b.visible)
{
playlist_b.visible = false;
vis_b.visible = false;
equalizer_b.visible = false;
setup_b.visible = false;
hideOptions.upToolTip = "Show Menu";
} else {
playlist_b.visible = true;
vis_b.visible = true;
equalizer_b.visible = true;
setup_b.visible = true;
hideOptions.upToolTip = "Hide Menu";
}
}
function updateSliders(){
if (currentMenu != 4)
{
progressMain.value=player.controls.currentPosition;
Videoprogress.value=player.controls.currentPosition;
}
}
function updateBrightToolTip(){
brightness.toolTip = "";
brightness.toolTip += Math.round(brightness.value);
}
function updateContrastToolTip(){
contrast.toolTip = "";
contrast.toolTip += Math.round(contrast.value);
}
function updateSaturationToolTip() {
saturation.toolTip = "";
saturation.toolTip += Math.round(saturation.value);
}
function updateHueToolTip(){
hue.toolTip = "";
hue.toolTip += Math.round(hue.value);
}
function resetVideoSet(){
brightness.value = 0;
contrast.value = 0;
saturation.value = 0;
hue.value = 0;
vidset.brightness = 0;
vidset.contrast = 0;
vidset.saturation = 0;
vidset.hue = 0;
updateBrightToolTip();
updateContrastToolTip();
updateSaturationToolTip();
updateHueToolTip();
}
function turnSRSeffects() {
if (eq.enhancedAudio == true)
{
eq.enhancedAudio = false;
srs_on.image ="on.gif";
srs_off.image ="off_down.gif";
speaker_b1.image = "left_p_disabled.gif";
speaker_b2.image = "right_p_disabled.gif";
speakerLabel.foregroundColor = "#FFFFFF";
wow_b1.image = "left_p_disabled.gif";
wow_b2.image = "right_p_disabled.gif";
tru_b1.image = "left_p_disabled.gif";
tru_b2.image = "right_p_disabled.gif";
} else {
eq.enhancedAudio = true;
srs_on.image ="on_down.gif";
srs_off.image ="off.gif";
speaker_b1.image = "left_p.gif";
speaker_b2.image = "right_p.gif";
speakerLabel.foregroundColor = "#FFFF00";
wow_b1.image = "left_p.gif";
wow_b2.image = "right_p.gif";
tru_b1.image = "left_p.gif";
tru_b2.image = "right_p.gif";
}
}
function updateSpeaker(){
speakerLabel.value = eq.currentSpeakerName;
speakerLabel_dark.value = eq.currentSpeakerName;
}
function prevSpeakerSize(){
if (eq.speakerSize >= 1)
{
eq.speakerSize--;
} else eq.speakerSize = 2;
updateSpeaker();
}
function nextSpeakerSize(){
if (eq.speakerSize <= 1)
{
eq.speakerSize++;
} else eq.speakerSize = 0;
updateSpeaker();
}
function updateWowEffectToolTip(){
wowEffect.toolTip = "";
wowEffect.toolTip += Math.round(wowEffect.value);
}
function updateTruBassToolTip(){
truBass.toolTip = "";
truBass.toolTip += Math.round(truBass.value);
}
function prevWowLevel(){
var i = eq.wowLevel;
i= i - 2;
wowEffect.value = i;
eq.wowLevel = wowEffect.value;
updateWowEffectToolTip();
}
function nextWowLevel(){
var i = eq.wowLevel;
i= i + 2;
wowEffect.value = i;
eq.wowLevel = wowEffect.value;
updateWowEffectToolTip();
}
function prevTruBassLevel(){
var i = eq.truBassLevel;
i= i - 2;
truBass.value = i;
eq.truBassLevel=truBass.value;
updateTruBassToolTip();
}
function nextTruBassLevel(){
var i = eq.truBassLevel;
i= i + 2;
truBass.value = i;
eq.truBassLevel=truBass.value;
updateTruBassToolTip();
}
function viewHotKeys()
{
switch(event.keycode)
{
case 122:
case 90:
player.controls.previous();
break;
case 120:
case 88:
player.controls.play();
break;
case 99:
case 67:
player.controls.pause();
break;
case 118:
case 86:
player.controls.stop();
break;
case 98:
case 66:
player.controls.next();
break;
case 108:
/* case 104:
if (event.ctrlKey){
repeat.down = player.settings.getMode('loop');
player.settings.setMode('loop',repeat.down);
}
break;
case 116:
if (event.ctrlKey){
shuffle.down = player.settings.getMode('shuffle');
player.settings.setMode('shuffle',shuffle.down);
}
break;*/
case 76:
openFile();
break;
}
}
function nextPlaylist(){
var folders = player.playlistCollection.getAll();
var drivers = player.cdromCollection.count; // N·mero de drivers
var n_system_playlists = drivers + 1;
var n = folders.count + n_system_playlists;
if (currentpl_n < n) currentpl_n++;
else currentpl_n = 1;
if (currentpl_n ==1 ) {
currentpl = player.mediaCollection.getAll();
}
else {
if (currentpl_n < (drivers +1) ){
currentpl = player.cdromCollection.item(currentpl-2).playlist;
} else {
currentpl = folders.item(currentpl_n-(n_system_playlists+1));
}
}
player.currentPlaylist = currentpl;
player.controls.play();
if (currentMenu == 11)
{
if ((player.currentMedia.ImageSourceWidth>0) == false ) showMenu(1);
}
}
function prevPlaylist(){
var folders = player.playlistCollection.getAll();
var drivers = player.cdromCollection.count; // N·mero de drivers
var n_system_playlists = drivers + 1;
var n = folders.count + n_system_playlists;
if (currentpl_n > 1) currentpl_n--;
else currentpl_n = n;
if (currentpl_n ==1 ) {
currentpl = player.mediaCollection.getAll();
}
else {
if (currentpl_n < (drivers +1) ){
currentpl = player.cdromCollection.item(currentpl-2).playlist;
} else {
currentpl = folders.item(currentpl_n-(n_system_playlists+1));
}
}
player.currentPlaylist = currentpl;
player.controls.play();
if (currentMenu == 11)
{
if ((player.currentMedia.ImageSourceWidth>0) == false ) showMenu(1);
}
}
function setPicAsBack(){
isPicAsBack = "true";
picAsBack.image = "pic_as_back_down.gif";
visAsBack.image = "vis_as_back.gif";
showBackground();
}
function setVisAsBack(){
isPicAsBack = "false";
picAsBack.image = "pic_as_back.gif";
visAsBack.image = "vis_as_back_down.gif";
showBackground();
}
function BackVideoSet(){
if (vidMenuOn){
StartVideo();
} else {
showMenu(5);
}
}
function nextGalleryImage(){
if (imageGallery == 8) imageGallery = 1;
else imageGallery++;
GalleryImage.backgroundImage="gallery" +imageGallery + ".jpg";
GalleryImageTitle.backgroundImage="gallery" +imageGallery + "_title.png";
}
function prevGalleryImage(){
if (imageGallery == 1) imageGallery = 8;
else imageGallery--;
GalleryImage.backgroundImage="gallery" +imageGallery + ".jpg";
GalleryImageTitle.backgroundImage="gallery" +imageGallery + "_title.png";
}
function SetBgPicture(i){
PictureFolder1_b.image = "file_list_button.gif";
PictureFolder2_b.image = "file_list_button.gif";
PictureFolder3_b.image = "file_list_button.gif";
PictureFolder4_b.image = "file_list_button.gif";
PictureFolder5_b.image = "file_list_button.gif";
PictureFolder6_b.image = "file_list_button.gif";
switch(i)
{
case 0:
PictureFolder1_b.image = "file_list_button_down.gif";
bgImage = "0";
break;
case 1:
PictureFolder2_b.image = "file_list_button_down.gif";
bgImage = "1";
break;
case 2:
PictureFolder3_b.image = "file_list_button_down.gif";
bgImage = "2";
break;
case 3:
PictureFolder4_b.image = "file_list_button_down.gif";
bgImage = "3";
break;
case 4:
PictureFolder5_b.image = "file_list_button_down.gif";
bgImage = "4";
break;
case 5:
PictureFolder6_b.image = "file_list_button_down.gif";
bgImage = "5";
break;
}
background.backgroundImage = "background" + bgImage + ".png";
theme.savePreference("bgImage",bgImage);
}