/**
 * SOUNDTEC.com.ar::/JS/functions0.js
 * @author Martin A. Tiscornia
 * @version 2004-03-01 13.17
 */
 
/* detalle versiones *
   2004-01-07 16.24 (mat)
    - se saca la funcion CheckAlways (), que se implementó directamente en el HTML
   2004-02-27 19.57
    - se agrega funcion set_titulo
   2004-03-01 13.17
    - se agregan funciones: ChangeBodyMainSize y getWindowHeight
*/
 
function getWindowHeight() 
{
    var windowHeight = 0;
    if (typeof(window.innerHeight) == 'number') 
    {
        windowHeight = window.innerHeight;
    }
    else 
    {
        if (document.documentElement && document.documentElement.clientHeight) 
        {
            windowHeight = document.documentElement.clientHeight;
        }
        else 
        {
            if (document.body && document.body.clientHeight) 
            {
                windowHeight = document.body.clientHeight;
            }
        }
    }
    return windowHeight;
}   

function ChangeBodyMainSize ()
{
    var windowHeight = getWindowHeight();
    var headerHeight = 165;
    var footerHeight = 40; // era 40 - lo pasé a 5 y lo volví a 5 porq habilitaba el scroll en mozilla
    document.getElementById('body-main').style.height = (windowHeight - headerHeight - footerHeight)+'px';
}
 
function set_titulo ($titulo, $seccion)
{
    if ($seccion == false)
    {
        $glb_str_titulo = '<span>' + $titulo + '</span>';    
    }
    else
    {
        $glb_str_titulo = '<span>' + $seccion + ' | ' + $titulo + '</span>';
    }
    window.parent.document.getElementById('body-header').innerHTML = $glb_str_titulo;
}    

function show_hide ($id2show, $id2hide)
{
    if (document.getElementById($id2show))
    {
        document.getElementById($id2show).style.visibility = 'visible';
        document.getElementById($id2show).style.display = 'block';        
    }
    if (document.getElementById($id2hide))
    {
        document.getElementById($id2hide).style.visibility = 'hidden';
        document.getElementById($id2hide).style.display = 'none';            
    }
}
function SeeIntro ()
{
    STintro = openCenteredWindow('/intro/', 'STintro', $glb_int_IntroWindowWidth, $glb_int_IntroWindowHeight, '', '', '', 'opener');
//  STintro = window.open ('/intro/'+$resize, 'STintro', 'toolbars=no,resizable=no,width='+$glb_int_IntroWindowWidth+',height='+$glb_int_IntroWindowHeight+',left=0,top=0');
    STintro.focus();
}
function enterOver ()
{
  document.getElementById('enter_out').style.zIndex = 1;
}
function enterOut ()
{
  document.getElementById('enter_out').style.zIndex = 3;
}
function SkipIntroOver ()
{
  document.getElementById('SkipIntro_out').style.zIndex = 1;
}
function SkipIntroOut ()
{
  document.getElementById('SkipIntro_out').style.zIndex = 3;
}
function SeeIntroOver ()
{
  document.getElementById('SeeIntro_out').style.zIndex = 1;
}
function SeeIntroOut ()
{
  document.getElementById('SeeIntro_out').style.zIndex = 3;
}
function GoInside ()
{
  if (opener.$jump_always)
  {
    opener.top.location = '/index/?AlwaysJumpIntro';
  }
  else
  {
    opener.top.location = '/index/';
  } 
  cerrar_ventana ();
}
function cerrar_ventana ()
{
  window.close();
}
function Enter ()
{
    window.top.location = '/index/';
}

function OpenAlbum ($glb_str_2show)
{
  window.open ('/ALBUM/?show='+$glb_str_2show, 'album', 'height=260, width=780');
}

function Zoom ($glb_str_smallImage)
{
  zoom = openCenteredWindow('/ALBUM/index.php?smallImageSrc='+$glb_str_image, 'zoom', 10, 10, '', '', '', 'opener');
  zoom.focus ();
}

function Album ($glb_str_image)
{
  album = openCenteredWindow('/ALBUM/index.php?imageSrc='+$glb_str_image, 'album', 10, 10, '', '', '', 'opener');
  album.focus ();
}

