scrollStep=2

timerLeft=""
timerRight=""

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}

function windowheight() {
  myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return(myHeight);
}

function overlay(id)
{
var frame = document.getElementById(id); 
var frame2 = document.getElementById("z" + id); 
var frame3 = document.getElementById("x" + id); 
frame.style.height = getDocHeight() + "px"; 
frame3.style.height = windowheight() + "px"; 
frame2.style.marginTop = ((windowheight()/2)-100) + "px"; 
frame.style.display = 'block';
}

function closeoverlay(id)
{
document.getElementById(id).style.display = 'none';
}

function hide(id)
{
document.getElementById(id).style.display = 'none';
if (document.getElementById('playable') && document.getElementById('playable').style.visibility == 'hidden')
{
document.getElementById('playable').style.visibility = 'visible';
}
}

function showblock(id)
{
document.getElementById(id).style.display = 'block';
if (document.getElementById('playable') && document.getElementById('playable').style.visibility == 'visible')
{
document.getElementById('playable').style.visibility = 'hidden';
}
}


function showinline(id)
{
document.getElementById(id).style.display = 'inline';

}


