/*<![CDATA[*/
function showArrow(i)
 {
  var arrow = document.getElementById("howtoArrow");
  if(arrow)
    arrow.style.display = "block";
  if((i==1 || i==3) && arrow)
   {
    arrow.style.right = "160px";
    arrow.style.top = "142px";
    arrow.style.bottom = "auto";
   }
  if(i==2 && arrow)
   {
    arrow.style.right = "160px";
    arrow.style.top = "auto";
    arrow.style.bottom = "100px";
   }
  if((i==5 || i==6) && arrow)
   {
    arrow.style.right = "160px";
    arrow.style.top = "100px";
    arrow.style.bottom = "auto";
   }
 }
function hideArrow()
 {
  if(document.getElementById("howtoArrow"))
    document.getElementById("howtoArrow").style.display = "none";
 }

var helpWidth;
var helpSin = 0;
var howtoInterval;
function howto()
 {
  var howto = document.getElementById("howtoDiv");
  var help = document.getElementById("help");
  var helpImage = document.getElementById("helpImage");
  if(howto && (howto.style.display == "none" || howto.style.display == ""))
   {
    howto.style.display = "block";
    if(help)
     {
      help.style.height = "auto";
      /*if(navigator.userAgent.toLowerCase().indexOf('msie 6') != -1)
        helpWidth = window.screen.availWidth - 400;
      else*/
        helpWidth = window.screen.availWidth - 280;
      help.style.left = "-"+helpWidth+"px";
      help.style.right = window.screen.availWidth+"px";
      /*help.style.left = "0";
      help.style.right = "280px";*/
      howtoInterval = window.setInterval("showHowtoInterval(true)", 25);
      helpImage.src = "/data/img/helpClose.png";
     }
   }
  else if(howto && howto.style.display == "block")
   {
    if(help)
     {
      helpWidth = window.screen.availWidth - 280;
      help.style.left = "0";
      help.style.right = "280px";
      howtoInterval = window.setInterval("showHowtoInterval(false)", 25);
      helpImage.src = "/data/img/helpOpen.png";
     }
   }
 }
function showHowtoInterval(direction)
 {
  var help = document.getElementById("help");
  if(direction == true)
    helpSin += 0.03;
  else
    helpSin -= 0.03;
  var helpWidthSin = helpWidth - Math.round(helpWidth*Math.sin(Math.PI/2*Math.sin(helpSin)));
  if((help && helpSin < 1.57 && direction == true) || (help && helpSin > 0 && direction == false))
   {
    help.style.left = "-"+helpWidthSin+"px";
    var right = window.screen.availWidth - (helpWidth - helpWidthSin);
    help.style.right = right+"px";
   }
  else if(direction == true)
   {
    helpSin = 1.57;
    help.style.left = "0";
    help.style.right = "280px";
    window.clearInterval(howtoInterval);
   }
  else if(direction == false)
   {
    helpSin = 0;
    document.getElementById("howtoDiv").style.display = "none";
    help.style.height = "70%";
    help.style.left = "0px";
    help.style.right = "auto";
    window.clearInterval(howtoInterval);
   }
 }
/*]]>*/
