currentPic = 0;
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function nextImage()
{
    x = document.getElementById('previewpic');
    currentPic = (currentPic + 1) % (images.length);
    x.src = images[currentPic];
}

function prevImage()
{
    x = document.getElementById('previewpic');
    if (currentPic == 0) 
    {
        currentPic = images.length - 1;
    }
    else
    {
        currentPic = currentPic - 1;
    }
    x.src = images[currentPic];
}
                
//configure the below five variables to change the style of the scroller
var scrollerwidth=233;
var scrollerheight=18;
var scrollerbgcolor='#00000';

//set below to '' if you don't wish to use a background image
var scrollerbackground='img/spacer_black.gif';

//configure the below variable to change the contents of the scroller
var messages=new Array();

  messages[0]="<a href='javascript:Download()' class='menu_2'><u>Click to start playing.</u></a>"
  messages[1]="<a href='javascript:Download()' class='menu'>Casino features superb graphics.</a>"
  messages[2]="<a href='javascript:Download()' class='menu'>Fast download, 3 mb only.</a>"
  messages[3]="<a href='javascript:Download()' class='menu'>High quality sound effects.</a>"
  messages[4]="<a href='javascript:Download()' class='menu'>Use arrows to view game previews.</a>"

if (messages.length>1)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
  tlayer.top=0
  setTimeout("move1(tlayer)",1000)
  setTimeout("move2(document.main.document.second)",1000)
  return
}
if (tlayer.top>=tlayer.document.height*-1){
  tlayer.top-=5
  setTimeout("move1(tlayer)",100)
}else{
  tlayer.top=scrollerheight
  tlayer.document.write(messages[i])
  tlayer.document.close()
  if (i==messages.length-1)
		i=0
  else
		i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",1000)
setTimeout("move1(document.main.document.first)",1000)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",100)
}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",1000)
setTimeout("move4(second2)",1000)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("move3(tdiv)",100)
}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",1000)
setTimeout("move3(first2)",1000)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("move4(second2)",100)
}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (document.all){
move3(first2);
second2.style.top=scrollerheight;
second2.style.visibility='visible';
}
else if (document.layers){
document.main.visibility='show';
move1(document.main.document.first);
document.main.document.second.top=scrollerheight+5;
document.main.document.second.visibility='show';
}
}
