var ShowInfoNoticeFlag = 0;
var ThisPage = window.location.href;
$(document).ready(function()
{
  if (ThisPage.match(/\home(_new)?\.php/))
  {
    if (!BrowserSupported())
    {
      ShowBrowserNotSupported();
    }
  }
  MoverScript();
  if ($("#Loading").length) $("#Loading").html('');
});

function MoverScript()
{
  if (window.WhichAnimation == undefined) WhichAnimation = 1;
  if (WhichAnimation)
  {
    MoverInit(WhichAnimation, document.getElementById("MainObject"), document.getElementById("InnerObject"));
  }
  if (ShowInfoNoticeFlag)
  {
    StartShowInfoNotice(1);
  }
  if (ThisPage.indexOf("home") >= 0)
  {
    if (window.GetSoundStatus)
    {
      PlaySound();
    }
  }
}

function StartShowInfoNotice(flg)
{
  if (ThisPage.indexOf("home.") > 0)
  {
    setTimeout('ShowInfoNotice(' + flg + ')', 50); 
  }
}

function ShowInfoNotice(flg) // 1=start w/cookie, 2=continue w/cookie, -1=start ignore cookie, -2=continue ignore cookie
{
  if (flg > 0)
  {
    var cookie = document.cookie;
    if (cookie.indexOf("ShowInfoNotice3=false") >= 0) // increment number to make it show
    {
      return;
    }
  }
  var imgobj;
  imgobj = document.getElementById("InfoNotice");
  if (!imgobj)
  {
    return;
  }
  
  if (Math.abs(flg) == 1)
  {
    InfoNoticeTop = 0;
    InfoNoticeHeight = imgobj.style.height;
    imgobj.style.top = InfoNoticeTop;
    imgobj.style.display = "";
  }
  else
  {
    InfoNoticeTop += 5;
    imgobj.style.top = InfoNoticeTop;
  }
  if (flg < 0)
  {
    flg = -2;
  }
  else
  {
    flg = 2;
  }
  if (InfoNoticeTop < 130)
  {
    setTimeout('ShowInfoNotice(' + flg + ')', 50); 
  }
}

function CloseInfoNotice(dontshow)
{
  var imgobj;
  imgobj = document.getElementById("InfoNotice");
  if (!imgobj)
  {
    return;
  }
  imgobj.style.display = "none";
  if (dontshow)
  {
    DontShowInfoNotice();
  }
}

function DontShowInfoNotice()
{
  var cookie = document.cookie;
  document.cookie = "ShowInfoNotice3=false; expires=" + GetCookieExp(30);
}


