//Slide-in scoller- © Dynamic Drive (www.dynamicdrive.com)

var current_entry_wmp;
var count = 100;  //dummy

function display_currententry()
{
var pl = document.Player_1.currentPlaylist;
for (var i = 0; i < pl.count; i++)
   {
   if (document.Player_1.currentmedia.isIdentical(pl.item(i))) current_entry_wmp = i;
   }
}


var delay=2000
var scrollwidth="490px"
var scrollheight="55px"

mess_pos_begin="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nb : ";
mess_pos_end="/" + document.Player_1.currentPlaylist.count;


if(lang=="uk") mess_first="<i><font face=times new roman size=3 color=#A52A2A>Hello !   <br> <font color=blue><b>To listen to, select a title in the column          &nbsp;</font></b></i><img src='files_gif/button_select.gif' align='top'>";
if(lang=="fr") mess_first="<i><font face=times new roman size=3 color=#A52A2A>Bonjour ! <br> <font color=blue><b>Pour écouter, sélectionner un titre dans la colonne &nbsp;</font></b></i><img src='files_gif/button_select.gif' align='top'>";
if(lang=="sp") mess_first="<i><font face=times new roman size=3 color=#A52A2A>Hola !    <br> <font color=blue><b>Para escuchar, seleccionar un título en la columna  &nbsp;</font></b></i><img src='files_gif/button_select.gif' align='top'>";

var message=new Array()
var openingtag='<table bgcolor="#FFEFD5" width="40%" border="3" cellpadding="0" cellspacing="0" id="display"><tr><td height="90"><font face="times new roman" size="3" color="black">'

message[0]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>gates of heaven   </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>GATES OF HEAVEN<br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[1]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>today             </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>GATES OF HEAVEN<br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan </b>and<b> Oly Wealman <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[2]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>pretty lady       </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>FRONT LINE     <br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[3]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>front line        </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>FRONT LINE     <br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[4]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>a mayday for today</b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>FRONT LINE     <br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[5]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>when she says     </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>FRONT LINE     <br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[6]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>hard life         </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>FRONT LINE     <br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[7]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>magic metal       </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>FRONT LINE     <br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";
message[8]="<i><font face=times new roman size=3 color=#A52A2A> &nbsp;title : <font color=blue><b>lords of light    </b>( metal rock )<b> -  <font color=#A52A2A></b>album: <font color=blue><b>FRONT LINE     <br> <font color=#A52A2A></b>&nbsp;artist : <font color=blue><b>Roy Khanagan - <font color=#A52A2A></b>author : <font color=blue><b>Roy Khanagan                        <br> <font color=#A52A2A></b>&nbsp;copyright : <font color=blue><b>ryp & co   (C) 2005 - <font color=#A52A2A></b>label : <font color=blue><b>NEPTUNE records</font></i></b>";

message[9]=mess_first;        // nb titles+1

var closingtag='</font></td></tr></table>'


var hoffset=500

document.write('<ilayer width=&{scrollwidth}; height=&{scrollheight}; name="sslide">');
document.write('<layer name="sslide2" width=&{scrollwidth}; height=&{scrollheight};></layer>');
document.write('</ilayer>');

var inc;
var ns4=document.layers
var ie5ns6=document.getElementById||document.all

if (ie5ns6) document.write(openingtag+'<div id="flyin" style="position:relative; width:'+scrollwidth+';height:'+scrollheight+';">'+mess_first+'</div>'+closingtag)

function updatemsg()
{
mess_position="";
crossobj.style.left="-2000px"
crossobj.style.fontStyle="italic"
crossobj.innerHTML=message[inc] + mess_position;

crossobj.style.left=crossobj.offsetWidth*(-1)+hoffset+"px"
start=setInterval("animatein()",50)
inc=(inc<message.length-1)? inc+1 : 0
}

function animatein()
{
if (parseInt(crossobj.style.left)<0) crossobj.style.left=parseInt(crossobj.style.left)+20+"px"
else
  {
  crossobj.style.left=0+"px"
  crossobj.style.fontStyle="normal"
  }
}

function updatemsgns4()
{
document.sslide.document.sslide2.document.write(openingtag+message[inc]+closingtag)
document.sslide.document.sslide2.document.close()
inc=(inc<message.length-1)? inc+1 : 0
}

function initialize()
{
if (ie5ns6)
  {
  crossobj=document.getElementById? document.getElementById("flyin") : document.all.flyin
  updatemsg();
  }
else if (ns4)
  {
  document.sslide.document.sslide2.document.write(openingtag+message[inc]+closingtag)
  document.sslide.document.sslide2.document.close()
  updatemsgns4();
  }
}

zaza = 100000;   // dummy at cold start old getentry

//scrolling_titles_alb();         // pour les albums test current entry wmp9 evry 2s 
                                        
function scrolling_titles_alb()
{

  if(flag_select != "repeat") 
    {
    display_currententry(); 
    zozo = current_entry_wmp;
    if(zaza != zozo) {scroll_titles_alb();booklet_change();}  
    }

jumpy = window.setTimeout('scrolling_titles_alb();', 3000);

}


function scroll_titles_alb()
{
display_currententry(); 

switch(current_entry_wmp)    // first=0
          {
          case 0 :   //  1 gates of heaven
          case 1 :   //  2 today
          case 2 :   //  3 pretty lady
          case 3 :   //  4 front line
          case 4 :   //  5 a mayday for today
          case 5 :   //  6 whenshe says
          case 6 :   //  7 hard life
          case 7 :   //  8 magic metal
          case 8 : inc=current_entry_wmp; mess_pos_end="/" + document.Player_1.currentPlaylist.count; mess_position= mess_pos_begin + (current_entry_wmp+1) + mess_pos_end;break; // 9 lords of light

          default: inc=9;  // mess first nodisplay
          }
initialize();
zaza = zozo;
}



function booklet_change()
{
 
switch(current_entry_wmp)    // first=0
          {
          case 0 :   change_booklet(1); visible_mark00(); break; //  1 gates of heaven
          case 1 :   change_booklet(1); visible_mark01(); break; //  2 today
          case 2 :   change_booklet(2); visible_mark02(); break; //  3 pretty lady
          case 3 :   change_booklet(2); visible_mark03(); break; //  4 front line
          case 4 :   change_booklet(2); visible_mark04(); break; //  5 a mayday for today
          case 5 :   change_booklet(2); visible_mark05(); break; //  6 when she says
          case 6 :   change_booklet(2); visible_mark06(); break; //  7 hard life
          case 7 :   change_booklet(2); visible_mark07(); break; //  8 magic metal
          case 8 :   change_booklet(2); visible_mark08(); break; //  9 lords of light

          default: change_booklet(0);
          }
}

flag_select="no";  // flag pour repeat title
change_booklet(0);

// video
function PlayVideo()  {document.Player_1.controls.stop(); document.MediaPlayer1.controls.play();change_booklet(0);window.clearTimeout(jumpy);flag_select="no";invisible_all_marks();}
function StopVideo()  {document.MediaPlayer1.controls.stop();}
function PauseVideo() {document.MediaPlayer1.controls.pause();}
function MuteVideo()  {document.MediaPlayer1.controls.mute();}
function StartVideo() {document.MediaPlayer1.controls.play();}

//audio
function StartMeUp_1 ()  {document.MediaPlayer1.controls.stop(); document.Player_1.controls.play();}
function ShutMeDown_1 () {document.Player_1.controls.stop();document.Player_2.controls.stop(); setTimeout('document.Player_1.controls.stop()',2000);change_booklet(0);inc=9;initialize();flag_select="repeat";invisible_all_marks();}  // stop sound, booklet av0, display initial, no repeat mode

// function Precedent_1(){document.Player_1.controls.previous(); display_currententry();booklet_change();}
// function Suivant_1(){document.Player_1.controls.next();display_currententry();booklet_change();}

//document.Player_1.URL = "streamings/asx_rk/rk_all.asx";
ShutMeDown_1 ();


